@progress/kendo-react-editor 11.1.0-develop.1 → 11.1.0

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.
@@ -31,7 +31,7 @@ body > .k-content {
31
31
  .k-content table {
32
32
  white-space: pre-wrap;
33
33
  }
34
- .k-content .k-text-selected, .k-content::selection {
34
+ .k-content .k-text-selected {
35
35
  color: HighlightText;
36
36
  background-color: Highlight;
37
37
  }
@@ -193,4 +193,7 @@ body > .k-content {
193
193
  background: rgba(200, 200, 255, 0.4);
194
194
  pointer-events: none;
195
195
  }
196
+ .ProseMirror .selectedCell ::selection {
197
+ background-color: transparent;
198
+ }
196
199
  `,o="body { direction: rtl }";exports.defaultStyle=e;exports.rtlStyles=o;exports.tablesStyles=r;
@@ -31,7 +31,7 @@ body > .k-content {
31
31
  .k-content table {
32
32
  white-space: pre-wrap;
33
33
  }
34
- .k-content .k-text-selected, .k-content::selection {
34
+ .k-content .k-text-selected {
35
35
  color: HighlightText;
36
36
  background-color: Highlight;
37
37
  }
@@ -193,6 +193,9 @@ body > .k-content {
193
193
  background: rgba(200, 200, 255, 0.4);
194
194
  pointer-events: none;
195
195
  }
196
+ .ProseMirror .selectedCell ::selection {
197
+ background-color: transparent;
198
+ }
196
199
  `, o = "body { direction: rtl }";
197
200
  export {
198
201
  e as defaultStyle,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../messages/index.js"),s=require("@progress/kendo-svg-icons"),l=require("@progress/kendo-editor-common"),i={...l.indentRules.listsTypes};exports.EditorToolsSettings=void 0;(n=>{const a={type:"button"};n.bold={...l.bold,props:{icon:"bold",svgIcon:s.boldIcon,...a},messages:{title:e.keys.bold},commandName:"Bold"},n.italic={...l.italic,props:{icon:"italic",svgIcon:s.italicIcon,...a},messages:{title:e.keys.italic},commandName:"Italic"},n.underline={...l.underline,props:{icon:"underline",svgIcon:s.underlineIcon,...a},messages:{title:e.keys.underline},commandName:"Underline"},n.strikethrough={...l.strikethrough,props:{icon:"strikethrough",svgIcon:s.strikethroughIcon,...a},messages:{title:e.keys.strikethrough},commandName:"Strikethrough"},n.subscript={...l.subscript,props:{icon:"subscript",svgIcon:s.subscriptIcon,...a},messages:{title:e.keys.subscript},commandName:"Subscript"},n.superscript={...l.superscript,props:{icon:"supscript",svgIcon:s.supscriptIcon,...a},messages:{title:e.keys.superscript},commandName:"Superscript"},n.link={...l.link,props:{icon:"link",svgIcon:s.linkIcon,...a},messages:{insertHyperlink:e.keys.insertHyperlink,insertHyperlinkDialogTitle:e.keys.insertHyperlinkDialogTitle,insertHyperlinkAddress:e.keys.insertHyperlinkAddress,insertHyperlinkTitle:e.keys.insertHyperlinkTitle,insertHyperlinkNewWindow:e.keys.insertHyperlinkNewWindow,insertHyperlinkCancel:e.keys.insertHyperlinkCancel,insertHyperlinkInsert:e.keys.insertHyperlinkInsert},commandName:"Link"},n.insertFile={...l.link,props:{icon:"file-add",svgIcon:s.fileAddIcon,...a},messages:{insertHyperlink:e.keys.insertFile,insertHyperlinkDialogTitle:e.keys.insertFileDialogTitle,insertHyperlinkAddress:e.keys.insertFileAddress,insertHyperlinkTitle:e.keys.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:e.keys.insertFileCancel,insertHyperlinkInsert:e.keys.insertFileInsert},commandName:"InsertFile",linkTarget:!1},n.insertTable={props:{icon:"table-add",svgIcon:s.tableAddIcon,...a},messages:{createTable:e.keys.createTable,createTableHint:e.keys.createTableHint},commandName:"InsertTable"},n.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:s.tableRowInsertAboveIcon,...a},messages:{title:e.keys.addRowBefore},commandName:"AddRowBefore"},n.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:s.tableRowInsertBelowIcon,...a},messages:{title:e.keys.addRowAfter},commandName:"AddRowAfter"},n.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:s.tableColumnInsertLeftIcon,...a},messages:{title:e.keys.addColumnBefore},commandName:"AddColumnBefore"},n.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:s.tableColumnInsertRightIcon,...a},messages:{title:e.keys.addColumnAfter},commandName:"AddColumnAfter"},n.deleteRow={props:{icon:"table-row-delete",svgIcon:s.tableRowDeleteIcon,...a},messages:{title:e.keys.deleteRow},commandName:"DeleteRow"},n.deleteColumn={props:{icon:"table-column-delete",svgIcon:s.tableColumnDeleteIcon,...a},messages:{title:e.keys.deleteColumn},commandName:"DeleteColumn"},n.deleteTable={props:{icon:"table-delete",svgIcon:s.tableDeleteIcon,...a},messages:{title:e.keys.deleteTable},commandName:"DeleteTable"},n.mergeCells={props:{icon:"cells-merge",svgIcon:s.cellsMergeIcon,...a},messages:{title:e.keys.mergeCells},commandName:"MergeCells"},n.splitCell={props:{icon:"cell-split-horizontally",svgIcon:s.cellSplitHorizontallyIcon,...a},messages:{title:e.keys.splitCell},commandName:"SplitCell"},n.print={props:{icon:"print",svgIcon:s.printIcon,...a},messages:{title:e.keys.print}},n.selectAll={props:{icon:"select-all",svgIcon:s.selectAllIcon,...a},messages:{title:e.keys.selectAll}},n.pdf={props:{icon:"file-pdf",svgIcon:s.filePdfIcon,...a},messages:{title:e.keys.pdf}},n.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},n.cleanFormatting={props:{icon:"clear-css",svgIcon:s.clearCssIcon,...a},messages:{title:e.keys.cleanFormatting},commandName:"CleanFormatting"},n.image={node:"image",props:{icon:"image",svgIcon:s.imageIcon,...a},messages:{insertImage:e.keys.insertImage,insertImageDialogTitle:e.keys.insertImageDialogTitle,insertImageAddress:e.keys.insertImageAddress,insertImageTitle:e.keys.insertImageTitle,insertImageAltText:e.keys.insertImageAltText,insertImageWidth:e.keys.insertImageWidth,insertImageHeight:e.keys.insertImageHeight,insertImageCancel:e.keys.insertImageCancel,insertImageInsert:e.keys.insertImageInsert},commandName:"InsertImage"},n.viewHtml={props:{icon:"code",svgIcon:s.codeIcon,...a},messages:{viewHtml:e.keys.viewHtml,viewHtmlDialogTitle:e.keys.viewHtmlDialogTitle,viewHtmlCancel:e.keys.viewHtmlCancel,viewHtmlUpdate:e.keys.viewHtmlUpdate},commandName:"SetContent"},n.findAndReplace={props:{icon:"find",svgIcon:s.binocularsIcon,...a},messages:{findReplaceToolTitle:e.keys.findReplaceToolTitle,findReplaceDialogTitle:e.keys.findReplaceDialogTitle,findReplaceTabFind:e.keys.findReplaceTabFind,findReplaceTabReplace:e.keys.findReplaceTabReplace,findReplaceFindWhat:e.keys.findReplaceFindWhat,findReplaceReplaceWith:e.keys.findReplaceReplaceWith,findReplaceReplace:e.keys.findReplaceReplace,findReplaceReplaceAll:e.keys.findReplaceReplaceAll,findReplaceMatchCase:e.keys.findReplaceMatchCase,findReplaceMatchWord:e.keys.findReplaceMatchWord,findReplaceMatchCyclic:e.keys.findReplaceMatchCyclic,findReplaceUseRegExp:e.keys.findReplaceUseRegExp,findReplacePrevMatch:e.keys.findReplacePrevMatch,findReplaceNextMatch:e.keys.findReplaceNextMatch,findReplaceMatches:e.keys.findReplaceMatches}},n.unlink={...l.link,props:{icon:"unlink",svgIcon:s.unlinkIcon,...a},messages:{title:e.keys.unlink},commandName:"Unlink"},n.undo={props:{icon:"undo",svgIcon:s.undoIcon,...a},messages:{title:e.keys.undo},commandName:"Undo"},n.redo={props:{icon:"redo",svgIcon:s.redoIcon,...a},messages:{title:e.keys.redo},commandName:"Redo"},n.fontSize={style:"font-size",defaultItem:{text:e.messages[e.keys.fontSize],value:"",localizationKey:e.keys.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},n.fontName={style:"font-family",defaultItem:{text:e.messages[e.keys.fontName],value:"",localizationKey:e.keys.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},n.formatBlock={defaultItem:{text:e.messages[e.keys.format],value:"",localizationKey:e.keys.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},n.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:s.foregroundColorIcon,view:"palette",title:e.keys.foregroundColor,ariaLabel:e.keys.foreColorLabel},commandName:"ForeColor"},n.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:s.dropletIcon,view:"palette",title:e.keys.backgroundColor,ariaLabel:e.keys.backColorLabel},commandName:"BackColor"},n.alignLeft={actions:[...l.alignLeftRules],props:{icon:"align-left",svgIcon:s.alignLeftIcon,...a},messages:{title:e.keys.alignLeft},commandName:"AlignLeft"},n.alignRight={actions:[...l.alignRightRules],props:{icon:"align-right",svgIcon:s.alignRightIcon,...a},messages:{title:e.keys.alignRight},commandName:"AlignRight"},n.alignCenter={actions:[...l.alignCenterRules],props:{icon:"align-center",svgIcon:s.alignCenterIcon,...a},messages:{title:e.keys.alignCenter},commandName:"AlignCenter"},n.alignJustify={actions:[...l.alignJustifyRules],props:{icon:"align-justify",svgIcon:s.alignJustifyIcon,...a},messages:{title:e.keys.alignJustify},commandName:"AlignJustify"},n.alignRemove={actions:[...l.alignRemoveRules],props:{icon:"align-remove",svgIcon:s.alignRemoveIcon,...a},messages:{},commandName:"AlignRemove"},n.indent={actions:l.indentRules.nodes,listsTypes:i,props:{icon:"indent",svgIcon:s.indentIcon,...a},messages:{title:e.keys.indent},commandName:"Indent"},n.outdent={actions:l.outdentRules.nodes,listsTypes:i,props:{icon:"outdent",svgIcon:s.outdentIcon,...a},messages:{title:e.keys.outdent},commandName:"Outdent"},n.orderedList={listType:i.orderedList,props:{icon:"list-ordered",svgIcon:s.listOrderedIcon,...a},messages:{title:e.keys.orderedList},commandName:"OrderedList",types:{...i}},n.bulletList={listType:i.bulletList,props:{icon:"list-unordered",svgIcon:s.listUnorderedIcon,...a},messages:{title:e.keys.bulletList},commandName:"UnorderedList",types:{...i}}})(exports.EditorToolsSettings||(exports.EditorToolsSettings={}));exports.listsTypes=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../messages/index.js"),a=require("@progress/kendo-svg-icons"),l=require("@progress/kendo-editor-common"),i={...l.indentRules.listsTypes};exports.EditorToolsSettings=void 0;(n=>{const s={type:"button"};n.bold={...l.bold,props:{icon:"bold",svgIcon:a.boldIcon,...s},messages:{title:e.keys.bold},commandName:"Bold"},n.italic={...l.italic,props:{icon:"italic",svgIcon:a.italicIcon,...s},messages:{title:e.keys.italic},commandName:"Italic"},n.underline={...l.underline,props:{icon:"underline",svgIcon:a.underlineIcon,...s},messages:{title:e.keys.underline},commandName:"Underline"},n.strikethrough={...l.strikethrough,props:{icon:"strikethrough",svgIcon:a.strikethroughIcon,...s},messages:{title:e.keys.strikethrough},commandName:"Strikethrough"},n.subscript={...l.subscript,props:{icon:"subscript",svgIcon:a.subscriptIcon,...s},messages:{title:e.keys.subscript},commandName:"Subscript"},n.superscript={...l.superscript,props:{icon:"supscript",svgIcon:a.supscriptIcon,...s},messages:{title:e.keys.superscript},commandName:"Superscript"},n.link={...l.link,props:{icon:"link",svgIcon:a.linkIcon,...s},messages:{insertHyperlink:e.keys.insertHyperlink,insertHyperlinkDialogTitle:e.keys.insertHyperlinkDialogTitle,insertHyperlinkAddress:e.keys.insertHyperlinkAddress,insertHyperlinkTitle:e.keys.insertHyperlinkTitle,insertHyperlinkNewWindow:e.keys.insertHyperlinkNewWindow,insertHyperlinkCancel:e.keys.insertHyperlinkCancel,insertHyperlinkInsert:e.keys.insertHyperlinkInsert},commandName:"Link"},n.insertFile={...l.link,props:{icon:"file-add",svgIcon:a.fileAddIcon,...s},messages:{insertHyperlink:e.keys.insertFile,insertHyperlinkDialogTitle:e.keys.insertFileDialogTitle,insertHyperlinkAddress:e.keys.insertFileAddress,insertHyperlinkTitle:e.keys.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:e.keys.insertFileCancel,insertHyperlinkInsert:e.keys.insertFileInsert},commandName:"InsertFile",linkTarget:!1},n.insertTable={props:{icon:"table-add",svgIcon:a.tableAddIcon,...s},messages:{createTable:e.keys.createTable,createTableHint:e.keys.createTableHint},commandName:"InsertTable"},n.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:a.tableRowInsertAboveIcon,...s},messages:{title:e.keys.addRowBefore},commandName:"AddRowBefore"},n.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:a.tableRowInsertBelowIcon,...s},messages:{title:e.keys.addRowAfter},commandName:"AddRowAfter"},n.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:a.tableColumnInsertLeftIcon,...s},messages:{title:e.keys.addColumnBefore},commandName:"AddColumnBefore"},n.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:a.tableColumnInsertRightIcon,...s},messages:{title:e.keys.addColumnAfter},commandName:"AddColumnAfter"},n.deleteRow={props:{icon:"table-row-delete",svgIcon:a.tableRowDeleteIcon,...s},messages:{title:e.keys.deleteRow},commandName:"DeleteRow"},n.deleteColumn={props:{icon:"table-column-delete",svgIcon:a.tableColumnDeleteIcon,...s},messages:{title:e.keys.deleteColumn},commandName:"DeleteColumn"},n.deleteTable={props:{icon:"table-delete",svgIcon:a.tableDeleteIcon,...s},messages:{title:e.keys.deleteTable},commandName:"DeleteTable"},n.mergeCells={props:{icon:"cells-merge",svgIcon:a.cellsMergeIcon,...s},messages:{title:e.keys.mergeCells},commandName:"MergeCells"},n.splitCell={props:{icon:"cell-split-horizontally",svgIcon:a.cellSplitHorizontallyIcon,...s},messages:{title:e.keys.splitCell},commandName:"SplitCell"},n.print={props:{icon:"print",svgIcon:a.printIcon,...s},messages:{title:e.keys.print}},n.selectAll={props:{icon:"select-all",svgIcon:a.selectAllIcon,...s},messages:{title:e.keys.selectAll}},n.pdf={props:{icon:"file-pdf",svgIcon:a.filePdfIcon,...s},messages:{title:e.keys.pdf}},n.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},n.cleanFormatting={props:{icon:"clear-css",svgIcon:a.clearCssIcon,...s},messages:{title:e.keys.cleanFormatting},commandName:"CleanFormatting"},n.image={node:"image",props:{icon:"image",svgIcon:a.imageIcon,...s},messages:{insertImage:e.keys.insertImage,insertImageDialogTitle:e.keys.insertImageDialogTitle,insertImageAddress:e.keys.insertImageAddress,insertImageTitle:e.keys.insertImageTitle,insertImageAltText:e.keys.insertImageAltText,insertImageWidth:e.keys.insertImageWidth,insertImageHeight:e.keys.insertImageHeight,insertImageCancel:e.keys.insertImageCancel,insertImageInsert:e.keys.insertImageInsert},commandName:"InsertImage"},n.viewHtml={props:{icon:"code",svgIcon:a.codeIcon,...s},messages:{viewHtml:e.keys.viewHtml,viewHtmlDialogTitle:e.keys.viewHtmlDialogTitle,viewHtmlCancel:e.keys.viewHtmlCancel,viewHtmlUpdate:e.keys.viewHtmlUpdate},commandName:"SetContent"},n.findAndReplace={props:{icon:"find",svgIcon:a.binocularsIcon,...s},messages:{findReplaceToolTitle:e.keys.findReplaceToolTitle,findReplaceDialogTitle:e.keys.findReplaceDialogTitle,findReplaceTabFind:e.keys.findReplaceTabFind,findReplaceTabReplace:e.keys.findReplaceTabReplace,findReplaceFindWhat:e.keys.findReplaceFindWhat,findReplaceReplaceWith:e.keys.findReplaceReplaceWith,findReplaceReplace:e.keys.findReplaceReplace,findReplaceReplaceAll:e.keys.findReplaceReplaceAll,findReplaceMatchCase:e.keys.findReplaceMatchCase,findReplaceMatchWord:e.keys.findReplaceMatchWord,findReplaceMatchCyclic:e.keys.findReplaceMatchCyclic,findReplaceUseRegExp:e.keys.findReplaceUseRegExp,findReplacePrevMatch:e.keys.findReplacePrevMatch,findReplaceNextMatch:e.keys.findReplaceNextMatch,findReplaceMatches:e.keys.findReplaceMatches,findReplaceInvalidRegExp:e.keys.findReplaceInvalidRegExp}},n.unlink={...l.link,props:{icon:"unlink",svgIcon:a.unlinkIcon,...s},messages:{title:e.keys.unlink},commandName:"Unlink"},n.undo={props:{icon:"undo",svgIcon:a.undoIcon,...s},messages:{title:e.keys.undo},commandName:"Undo"},n.redo={props:{icon:"redo",svgIcon:a.redoIcon,...s},messages:{title:e.keys.redo},commandName:"Redo"},n.fontSize={style:"font-size",defaultItem:{text:e.messages[e.keys.fontSize],value:"",localizationKey:e.keys.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},n.fontName={style:"font-family",defaultItem:{text:e.messages[e.keys.fontName],value:"",localizationKey:e.keys.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},n.formatBlock={defaultItem:{text:e.messages[e.keys.format],value:"",localizationKey:e.keys.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},n.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:a.foregroundColorIcon,view:"palette",title:e.keys.foregroundColor,ariaLabel:e.keys.foreColorLabel},commandName:"ForeColor"},n.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:a.dropletIcon,view:"palette",title:e.keys.backgroundColor,ariaLabel:e.keys.backColorLabel},commandName:"BackColor"},n.alignLeft={actions:[...l.alignLeftRules],props:{icon:"align-left",svgIcon:a.alignLeftIcon,...s},messages:{title:e.keys.alignLeft},commandName:"AlignLeft"},n.alignRight={actions:[...l.alignRightRules],props:{icon:"align-right",svgIcon:a.alignRightIcon,...s},messages:{title:e.keys.alignRight},commandName:"AlignRight"},n.alignCenter={actions:[...l.alignCenterRules],props:{icon:"align-center",svgIcon:a.alignCenterIcon,...s},messages:{title:e.keys.alignCenter},commandName:"AlignCenter"},n.alignJustify={actions:[...l.alignJustifyRules],props:{icon:"align-justify",svgIcon:a.alignJustifyIcon,...s},messages:{title:e.keys.alignJustify},commandName:"AlignJustify"},n.alignRemove={actions:[...l.alignRemoveRules],props:{icon:"align-remove",svgIcon:a.alignRemoveIcon,...s},messages:{},commandName:"AlignRemove"},n.indent={actions:l.indentRules.nodes,listsTypes:i,props:{icon:"indent",svgIcon:a.indentIcon,...s},messages:{title:e.keys.indent},commandName:"Indent"},n.outdent={actions:l.outdentRules.nodes,listsTypes:i,props:{icon:"outdent",svgIcon:a.outdentIcon,...s},messages:{title:e.keys.outdent},commandName:"Outdent"},n.orderedList={listType:i.orderedList,props:{icon:"list-ordered",svgIcon:a.listOrderedIcon,...s},messages:{title:e.keys.orderedList},commandName:"OrderedList",types:{...i}},n.bulletList={listType:i.bulletList,props:{icon:"list-unordered",svgIcon:a.listUnorderedIcon,...s},messages:{title:e.keys.bulletList},commandName:"UnorderedList",types:{...i}}})(exports.EditorToolsSettings||(exports.EditorToolsSettings={}));exports.listsTypes=i;
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { keys as e, messages as i } from "../messages/index.mjs";
9
- import { boldIcon as c, italicIcon as r, underlineIcon as m, strikethroughIcon as p, subscriptIcon as d, supscriptIcon as g, linkIcon as f, fileAddIcon as u, tableAddIcon as I, tableRowInsertAboveIcon as v, tableRowInsertBelowIcon as y, tableColumnInsertLeftIcon as R, tableColumnInsertRightIcon as b, tableRowDeleteIcon as h, tableColumnDeleteIcon as C, tableDeleteIcon as k, cellsMergeIcon as N, cellSplitHorizontallyIcon as H, printIcon as w, selectAllIcon as x, filePdfIcon as A, clearCssIcon as L, imageIcon as F, codeIcon as M, binocularsIcon as z, unlinkIcon as W, undoIcon as D, redoIcon as B, foregroundColorIcon as P, dropletIcon as T, alignLeftIcon as U, alignRightIcon as G, alignCenterIcon as J, alignJustifyIcon as O, alignRemoveIcon as K, indentIcon as V, outdentIcon as j, listOrderedIcon as q, listUnorderedIcon as Q } from "@progress/kendo-svg-icons";
9
+ import { boldIcon as c, italicIcon as r, underlineIcon as m, strikethroughIcon as p, subscriptIcon as d, supscriptIcon as g, linkIcon as f, fileAddIcon as I, tableAddIcon as u, tableRowInsertAboveIcon as v, tableRowInsertBelowIcon as y, tableColumnInsertLeftIcon as R, tableColumnInsertRightIcon as b, tableRowDeleteIcon as h, tableColumnDeleteIcon as C, tableDeleteIcon as k, cellsMergeIcon as N, cellSplitHorizontallyIcon as H, printIcon as x, selectAllIcon as w, filePdfIcon as A, clearCssIcon as L, imageIcon as F, codeIcon as M, binocularsIcon as z, unlinkIcon as W, undoIcon as D, redoIcon as B, foregroundColorIcon as P, dropletIcon as T, alignLeftIcon as U, alignRightIcon as G, alignCenterIcon as J, alignJustifyIcon as O, alignRemoveIcon as K, indentIcon as V, outdentIcon as j, listOrderedIcon as q, listUnorderedIcon as Q } from "@progress/kendo-svg-icons";
10
10
  import { indentRules as o, bold as X, italic as Y, underline as Z, strikethrough as _, subscript as $, superscript as S, link as t, alignLeftRules as E, alignRightRules as ee, alignCenterRules as ne, alignJustifyRules as ae, alignRemoveRules as le, outdentRules as ie } from "@progress/kendo-editor-common";
11
11
  const l = { ...o.listsTypes };
12
12
  var s;
@@ -101,7 +101,7 @@ var s;
101
101
  ...t,
102
102
  props: {
103
103
  icon: "file-add",
104
- svgIcon: u,
104
+ svgIcon: I,
105
105
  ...a
106
106
  },
107
107
  messages: {
@@ -118,7 +118,7 @@ var s;
118
118
  }, n.insertTable = {
119
119
  props: {
120
120
  icon: "table-add",
121
- svgIcon: I,
121
+ svgIcon: u,
122
122
  ...a
123
123
  },
124
124
  messages: {
@@ -219,7 +219,7 @@ var s;
219
219
  }, n.print = {
220
220
  props: {
221
221
  icon: "print",
222
- svgIcon: w,
222
+ svgIcon: x,
223
223
  ...a
224
224
  },
225
225
  messages: {
@@ -228,7 +228,7 @@ var s;
228
228
  }, n.selectAll = {
229
229
  props: {
230
230
  icon: "select-all",
231
- svgIcon: x,
231
+ svgIcon: w,
232
232
  ...a
233
233
  },
234
234
  messages: {
@@ -310,7 +310,8 @@ var s;
310
310
  findReplaceUseRegExp: e.findReplaceUseRegExp,
311
311
  findReplacePrevMatch: e.findReplacePrevMatch,
312
312
  findReplaceNextMatch: e.findReplaceNextMatch,
313
- findReplaceMatches: e.findReplaceMatches
313
+ findReplaceMatches: e.findReplaceMatches,
314
+ findReplaceInvalidRegExp: e.findReplaceInvalidRegExp
314
315
  }
315
316
  }, n.unlink = {
316
317
  ...t,
@@ -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 A=require("react"),E=require("@progress/kendo-react-buttons"),B=require("@progress/kendo-react-dialogs"),R=require("@progress/kendo-react-layout"),N=require("@progress/kendo-react-intl"),l=require("../messages/index.js"),j=require("../config/toolsSettings.js"),P=require("../tools/utils.js"),m=require("@progress/kendo-editor-common"),F=require("@progress/kendo-react-common"),f=require("@progress/kendo-react-inputs"),C=require("@progress/kendo-react-form"),M=require("@progress/kendo-svg-icons");function K(u){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const e in u)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(u,e);Object.defineProperty(s,e,a.get?a:{enumerable:!0,get:()=>u[e]})}}return s.default=u,Object.freeze(s)}const t=K(A),U=13,_=27,V=j.EditorToolsSettings.findAndReplace;let w=class extends t.Component{constructor(s){super(s),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,a=e.state,c=a.tr.setSelection(m.TextSelection.create(a.doc,a.selection.from,a.selection.to));e.updateState(a.apply(c)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const a=this.state.matches,c=this.state.nextMatch;let o=0,i=0;if(a&&c){const n=a.findIndex(r=>r.eq(c));o=n===-1?a.length:n+1,i=a.length}return P.formatString(e,o,i)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const a=this.props.view,{searchText:c,matchCase:o,matchCyclic:i,matchWord:n,useRegExp:r}=this.state,h={text:c,matchWord:n,matchCase:o,useRegExp:r,backward:e,matchCyclic:i},d=m.find(a.state,h);if(d){const g=a.state.tr.setSelection(d);g.scrollIntoView(),a.updateState(a.state.apply(g)),this.setState({nextMatch:d})}},this.onReplace=()=>{const e=this.props.view,a=e.state.selection,{replaceText:c}=this.state;if(!a.empty){const o=a.from,i=o+c.length,n=m.replace(a,c,e.state.tr);n.setSelection(m.TextSelection.create(n.doc,o,i)),n.scrollIntoView(),e.dispatch(n),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:a,replaceText:c,matchCase:o,matchWord:i,useRegExp:n}=this.state,r={text:a,matchWord:i,matchCase:o,useRegExp:n},h=m.replaceAll(e.state,c,r);h&&e.dispatch(h),this.setNextState({})},this.onKeyDown=e=>{e.keyCode===U?this.onFindNext():e.keyCode===_&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const a={...this.state,...e,matches:void 0,nextMatch:void 0},c=this.props.view;if(a.searchText){const{searchText:o,matchWord:i,matchCase:n,useRegExp:r,matchCyclic:h}=a,d={text:o,matchWord:i,matchCase:n,useRegExp:r},g=c.state.selection,p=m.findAll(c.state.doc,d),S=x=>!x&&p[0]||p.find(k=>k.from>=g.from)||h&&p[0]||void 0;this.setState(x=>({...a,matches:p,nextMatch:S(x.searchText)}))}else this.setState(a)},this.state={selectedTab:0,searchText:m.selectedLineTextOnly(s.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||V}componentDidUpdate(s,e){const a=this.props.view,{matches:c=[],nextMatch:o}=this.state;if(e.nextMatch!==o){const i=a.state,n=i.tr,r=[];c.forEach(h=>{r.push({from:h.from,to:h.to,attrs:{class:o&&h.eq(o)?"k-text-selected":"k-text-highlighted"}})}),n.setMeta(m.textHighlightKey,r),n.setSelection(o||m.TextSelection.create(i.doc,i.selection.from)),a.dispatch(n)}}render(){const s=N.provideLocalizationService(this),{findReplaceDialogTitle:e,findReplaceTabFind:a,findReplaceTabReplace:c,findReplaceFindWhat:o,findReplaceReplaceWith:i,findReplaceReplace:n,findReplaceReplaceAll:r,findReplaceMatchCase:h,findReplaceMatchWord:d,findReplaceMatchCyclic:g,findReplaceUseRegExp:p,findReplacePrevMatch:S,findReplaceNextMatch:x,findReplaceMatches:k}=this.settings.messages,{matchCase:W,matchWord:L,matchCyclic:q,useRegExp:I,searchText:D,replaceText:O,nextMatch:b}=this.state,v=t.createElement("div",{className:"k-search-options"},t.createElement("span",null,t.createElement(f.Checkbox,{id:"match-case",checked:W,onChange:this.onMatchCaseChecked}),t.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},s.toLanguageString(h,l.messages[h]))),t.createElement("span",null,t.createElement(f.Checkbox,{id:"match-whole",checked:L,onChange:this.onMatchWordChecked}),t.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},s.toLanguageString(d,l.messages[d]))),t.createElement("span",null,t.createElement(f.Checkbox,{id:"match-cyclic",checked:q,onChange:this.onMatchCyclicChecked}),t.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},s.toLanguageString(g,l.messages[g]))),t.createElement("span",null,t.createElement(f.Checkbox,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked}),t.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},s.toLanguageString(p,l.messages[p])))),T=t.createElement("div",{className:"k-matches-container"},t.createElement(E.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},t.createElement(F.IconWrap,{name:"chevron-left",icon:M.chevronLeftIcon}),s.toLanguageString(S,l.messages[S])),t.createElement("span",null,this.matchesMessage(s.toLanguageString(k,l.messages[k]))),t.createElement(E.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},s.toLanguageString(x,l.messages[x]),t.createElement(F.IconWrap,{name:"chevron-right",icon:M.chevronRightIcon}))),y=t.createElement(C.Form,{render:()=>t.createElement(C.FormElement,{horizontal:!0},t.createElement(C.FieldWrapper,null,t.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},s.toLanguageString(o,l.messages[o])),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(f.Input,{id:"findWhat",type:"text",value:D,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))))}),z=t.createElement(C.Form,{render:()=>t.createElement(C.FormElement,{horizontal:!0},t.createElement(C.FieldWrapper,null,t.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},s.toLanguageString(i,l.messages[i])),t.createElement("div",{className:"k-form-field-wrap"},t.createElement(f.Input,{id:"replaceWith",type:"text",value:O,onChange:this.onReplaceChange}))))});return t.createElement(B.Window,{title:s.toLanguageString(e,l.messages[e]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},t.createElement(R.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},t.createElement(R.TabStripTab,{title:s.toLanguageString(a,l.messages[a])},y,v,T),t.createElement(R.TabStripTab,{title:s.toLanguageString(c,l.messages[c])},y,z,t.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},t.createElement(E.Button,{disabled:!b,onClick:this.onReplace},s.toLanguageString(n,l.messages[n])),t.createElement(E.Button,{disabled:!b,onClick:this.onReplaceAll},s.toLanguageString(r,l.messages[r]))),v,T)))}};N.registerForLocalization(w);exports.FindAndReplaceDialog=w;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),R=require("@progress/kendo-react-buttons"),B=require("@progress/kendo-react-dialogs"),k=require("@progress/kendo-react-layout"),w=require("@progress/kendo-react-intl"),l=require("../messages/index.js"),j=require("../config/toolsSettings.js"),P=require("../tools/utils.js"),d=require("@progress/kendo-editor-common"),M=require("@progress/kendo-react-common"),x=require("@progress/kendo-react-inputs"),S=require("@progress/kendo-react-form"),K=require("@progress/kendo-react-labels"),F=require("@progress/kendo-svg-icons");function U(f){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const e in f)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(f,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>f[e]})}}return s.default=f,Object.freeze(s)}const a=U(A),_=13,V=27,H=j.EditorToolsSettings.findAndReplace;let N=class extends a.Component{constructor(s){super(s),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,t=e.state,c=t.tr.setSelection(d.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(c)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const t=this.state.matches,c=this.state.nextMatch;let o=0,i=0;if(t&&c){const n=t.findIndex(r=>r.eq(c));o=n===-1?t.length:n+1,i=t.length}return P.formatString(e,o,i)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:c,matchCase:o,matchCyclic:i,matchWord:n,useRegExp:r}=this.state,h={text:c,matchWord:n,matchCase:o,useRegExp:r,backward:e,matchCyclic:i},m=d.find(t.state,h);if(m){const u=t.state.tr.setSelection(m);u.scrollIntoView(),t.updateState(t.state.apply(u)),this.setState({nextMatch:m})}},this.onReplace=()=>{const e=this.props.view,t=e.state.selection,{replaceText:c}=this.state;if(!t.empty){const o=t.from,i=o+c.length,n=d.replace(t,c,e.state.tr);n.setSelection(d.TextSelection.create(n.doc,o,i)),n.scrollIntoView(),e.dispatch(n),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:c,matchCase:o,matchWord:i,useRegExp:n}=this.state,r={text:t,matchWord:i,matchCase:o,useRegExp:n},h=d.replaceAll(e.state,c,r);h&&e.dispatch(h),this.setNextState({})},this.onKeyDown=e=>{e.keyCode===_?this.onFindNext():e.keyCode===V&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const t={...this.state,...e,matches:void 0,nextMatch:void 0,error:void 0},c=this.props.view;if(t.searchText){const{searchText:o,matchWord:i,matchCase:n,useRegExp:r,matchCyclic:h}=t,m={text:o,matchWord:i,matchCase:n,useRegExp:r},u=c.state.selection;let g=[];try{g=d.findAll(c.state.doc,m)}catch(p){p instanceof SyntaxError&&(t.error=this.settings.messages.findReplaceInvalidRegExp),this.setState(t);return}const C=p=>!p&&g[0]||g.find(E=>E.from>=u.from)||h&&g[0]||void 0;this.setState(p=>({...t,matches:g,nextMatch:C(p.searchText)}))}else this.setState(t)},this.state={selectedTab:0,searchText:d.selectedLineTextOnly(s.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||H}componentDidUpdate(s,e){const t=this.props.view,{matches:c=[],nextMatch:o}=this.state;if(e.nextMatch!==o){const i=t.state,n=i.tr,r=[];c.forEach(h=>{r.push({from:h.from,to:h.to,attrs:{class:o&&h.eq(o)?"k-text-selected":"k-text-highlighted"}})}),n.setMeta(d.textHighlightKey,r),n.setSelection(o||d.TextSelection.create(i.doc,i.selection.from)),t.dispatch(n)}}render(){const s=w.provideLocalizationService(this),{findReplaceDialogTitle:e,findReplaceTabFind:t,findReplaceTabReplace:c,findReplaceFindWhat:o,findReplaceReplaceWith:i,findReplaceReplace:n,findReplaceReplaceAll:r,findReplaceMatchCase:h,findReplaceMatchWord:m,findReplaceMatchCyclic:u,findReplaceUseRegExp:g,findReplacePrevMatch:C,findReplaceNextMatch:p,findReplaceMatches:E}=this.settings.messages,{matchCase:W,matchWord:L,matchCyclic:q,useRegExp:I,searchText:D,replaceText:O,nextMatch:v}=this.state,b=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement(x.Checkbox,{id:"match-case",checked:W,onChange:this.onMatchCaseChecked,label:s.toLanguageString(h,l.messages[h])})),a.createElement("span",null,a.createElement(x.Checkbox,{id:"match-whole",checked:L,onChange:this.onMatchWordChecked,label:s.toLanguageString(m,l.messages[m])})),a.createElement("span",null,a.createElement(x.Checkbox,{id:"match-cyclic",checked:q,onChange:this.onMatchCyclicChecked,label:s.toLanguageString(u,l.messages[u])})),a.createElement("span",null,a.createElement(x.Checkbox,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked,label:s.toLanguageString(g,l.messages[g])}))),y=a.createElement("div",{className:"k-matches-container"},a.createElement(R.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},a.createElement(M.IconWrap,{name:"chevron-left",icon:F.chevronLeftIcon}),s.toLanguageString(C,l.messages[C])),a.createElement("span",null,this.matchesMessage(s.toLanguageString(E,l.messages[E]))),a.createElement(R.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},s.toLanguageString(p,l.messages[p]),a.createElement(M.IconWrap,{name:"chevron-right",icon:F.chevronRightIcon}))),T=a.createElement(S.Form,{render:()=>a.createElement(S.FormElement,{horizontal:!0},a.createElement(S.FieldWrapper,null,a.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},s.toLanguageString(o,l.messages[o])),a.createElement("div",{className:"k-form-field-wrap"},a.createElement(x.Input,{id:"findWhat",type:"text",value:D,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&a.createElement(K.Error,null,s.toLanguageString(this.state.error,l.messages[this.state.error])))))}),z=a.createElement(S.Form,{render:()=>a.createElement(S.FormElement,{horizontal:!0},a.createElement(S.FieldWrapper,null,a.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},s.toLanguageString(i,l.messages[i])),a.createElement("div",{className:"k-form-field-wrap"},a.createElement(x.Input,{id:"replaceWith",type:"text",value:O,onChange:this.onReplaceChange}))))});return a.createElement(B.Window,{title:s.toLanguageString(e,l.messages[e]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},a.createElement(k.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(k.TabStripTab,{title:s.toLanguageString(t,l.messages[t])},T,b,y),a.createElement(k.TabStripTab,{title:s.toLanguageString(c,l.messages[c])},T,z,a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement(R.Button,{disabled:!v,onClick:this.onReplace},s.toLanguageString(n,l.messages[n])),a.createElement(R.Button,{disabled:!v,onClick:this.onReplaceAll},s.toLanguageString(r,l.messages[r]))),b,y)))}};w.registerForLocalization(N);exports.FindAndReplaceDialog=N;
@@ -5,77 +5,87 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as e from "react";
8
+ import * as t from "react";
9
9
  import { Button as x } from "@progress/kendo-react-buttons";
10
10
  import { Window as K } from "@progress/kendo-react-dialogs";
11
- import { TabStrip as O, TabStripTab as b } from "@progress/kendo-react-layout";
11
+ import { TabStrip as O, TabStripTab as y } from "@progress/kendo-react-layout";
12
12
  import { registerForLocalization as U, provideLocalizationService as B } from "@progress/kendo-react-intl";
13
13
  import { messages as l } from "../messages/index.mjs";
14
14
  import { EditorToolsSettings as P } from "../config/toolsSettings.mjs";
15
15
  import { formatString as q } from "../tools/utils.mjs";
16
16
  import { TextSelection as E, find as V, replace as j, replaceAll as H, findAll as _, selectedLineTextOnly as $, textHighlightKey as G } from "@progress/kendo-editor-common";
17
17
  import { IconWrap as T } from "@progress/kendo-react-common";
18
- import { Checkbox as C, Input as y } from "@progress/kendo-react-inputs";
19
- import { Form as M, FormElement as F, FieldWrapper as N } from "@progress/kendo-react-form";
20
- import { chevronLeftIcon as J, chevronRightIcon as Q } from "@progress/kendo-svg-icons";
21
- const X = 13, Y = 27, Z = P.findAndReplace;
22
- let ee = class extends e.Component {
23
- constructor(o) {
24
- super(o), this.onTabSelect = (t) => {
25
- this.setState({ selectedTab: t.selected });
18
+ import { Checkbox as C, Input as M } from "@progress/kendo-react-inputs";
19
+ import { Form as b, FormElement as w, FieldWrapper as F } from "@progress/kendo-react-form";
20
+ import { Error as J } from "@progress/kendo-react-labels";
21
+ import { chevronLeftIcon as Q, chevronRightIcon as X } from "@progress/kendo-svg-icons";
22
+ const Y = 13, Z = 27, ee = P.findAndReplace;
23
+ let te = class extends t.Component {
24
+ constructor(s) {
25
+ super(s), this.onTabSelect = (e) => {
26
+ this.setState({ selectedTab: e.selected });
26
27
  }, this.onClose = () => {
27
- const t = this.props.view, a = t.state, n = a.tr.setSelection(
28
+ const e = this.props.view, a = e.state, c = a.tr.setSelection(
28
29
  E.create(a.doc, a.selection.from, a.selection.to)
29
30
  );
30
- t.updateState(a.apply(n)), t.focus(), this.props.onClose.call(void 0);
31
- }, this.matchesMessage = (t) => {
32
- const a = this.state.matches, n = this.state.nextMatch;
33
- let s = 0, i = 0;
34
- if (a && n) {
35
- const c = a.findIndex((r) => r.eq(n));
36
- s = c === -1 ? a.length : c + 1, i = a.length;
31
+ e.updateState(a.apply(c)), e.focus(), this.props.onClose.call(void 0);
32
+ }, this.matchesMessage = (e) => {
33
+ const a = this.state.matches, c = this.state.nextMatch;
34
+ let i = 0, o = 0;
35
+ if (a && c) {
36
+ const n = a.findIndex((r) => r.eq(c));
37
+ i = n === -1 ? a.length : n + 1, o = a.length;
37
38
  }
38
- return q(t, s, i);
39
+ return q(e, i, o);
39
40
  }, this.onFindNext = () => {
40
41
  this.onFind();
41
42
  }, this.onFindPrev = () => {
42
43
  this.onFind(!0);
43
- }, this.onFind = (t = !1) => {
44
- const a = this.props.view, { searchText: n, matchCase: s, matchCyclic: i, matchWord: c, useRegExp: r } = this.state, h = { text: n, matchWord: c, matchCase: s, useRegExp: r, backward: t, matchCyclic: i }, m = V(a.state, h);
44
+ }, this.onFind = (e = !1) => {
45
+ const a = this.props.view, { searchText: c, matchCase: i, matchCyclic: o, matchWord: n, useRegExp: r } = this.state, h = { text: c, matchWord: n, matchCase: i, useRegExp: r, backward: e, matchCyclic: o }, m = V(a.state, h);
45
46
  if (m) {
46
- const d = a.state.tr.setSelection(m);
47
- d.scrollIntoView(), a.updateState(a.state.apply(d)), this.setState({ nextMatch: m });
47
+ const g = a.state.tr.setSelection(m);
48
+ g.scrollIntoView(), a.updateState(a.state.apply(g)), this.setState({ nextMatch: m });
48
49
  }
49
50
  }, this.onReplace = () => {
50
- const t = this.props.view, a = t.state.selection, { replaceText: n } = this.state;
51
+ const e = this.props.view, a = e.state.selection, { replaceText: c } = this.state;
51
52
  if (!a.empty) {
52
- const s = a.from, i = s + n.length, c = j(a, n, t.state.tr);
53
- c.setSelection(E.create(c.doc, s, i)), c.scrollIntoView(), t.dispatch(c), this.setNextState({});
53
+ const i = a.from, o = i + c.length, n = j(a, c, e.state.tr);
54
+ n.setSelection(E.create(n.doc, i, o)), n.scrollIntoView(), e.dispatch(n), this.setNextState({});
54
55
  }
55
56
  }, this.onReplaceAll = () => {
56
- const t = this.props.view, { searchText: a, replaceText: n, matchCase: s, matchWord: i, useRegExp: c } = this.state, r = { text: a, matchWord: i, matchCase: s, useRegExp: c }, h = H(t.state, n, r);
57
- h && t.dispatch(h), this.setNextState({});
58
- }, this.onKeyDown = (t) => {
59
- t.keyCode === X ? this.onFindNext() : t.keyCode === Y && this.onClose();
60
- }, this.onMatchCaseChecked = (t) => this.setNextState({ matchCase: t.value }), this.onMatchWordChecked = (t) => this.setNextState({ matchWord: t.value }), this.onMatchCyclicChecked = (t) => this.setNextState({ matchCyclic: t.value }), this.onUseRegExpChecked = (t) => this.setNextState({ useRegExp: t.value }), this.onSearchChange = (t) => this.setNextState({ searchText: t.target.value }), this.onReplaceChange = (t) => this.setNextState({ replaceText: t.target.value }), this.setNextState = (t) => {
57
+ const e = this.props.view, { searchText: a, replaceText: c, matchCase: i, matchWord: o, useRegExp: n } = this.state, r = { text: a, matchWord: o, matchCase: i, useRegExp: n }, h = H(e.state, c, r);
58
+ h && e.dispatch(h), this.setNextState({});
59
+ }, this.onKeyDown = (e) => {
60
+ e.keyCode === Y ? this.onFindNext() : e.keyCode === Z && this.onClose();
61
+ }, this.onMatchCaseChecked = (e) => this.setNextState({ matchCase: e.value }), this.onMatchWordChecked = (e) => this.setNextState({ matchWord: e.value }), this.onMatchCyclicChecked = (e) => this.setNextState({ matchCyclic: e.value }), this.onUseRegExpChecked = (e) => this.setNextState({ useRegExp: e.value }), this.onSearchChange = (e) => this.setNextState({ searchText: e.target.value }), this.onReplaceChange = (e) => this.setNextState({ replaceText: e.target.value }), this.setNextState = (e) => {
61
62
  const a = {
62
63
  ...this.state,
63
- ...t,
64
+ ...e,
64
65
  matches: void 0,
65
- nextMatch: void 0
66
- }, n = this.props.view;
66
+ nextMatch: void 0,
67
+ error: void 0
68
+ }, c = this.props.view;
67
69
  if (a.searchText) {
68
- const { searchText: s, matchWord: i, matchCase: c, useRegExp: r, matchCyclic: h } = a, m = { text: s, matchWord: i, matchCase: c, useRegExp: r }, d = n.state.selection, p = _(n.state.doc, m), f = (g) => !g && p[0] || p.find((u) => u.from >= d.from) || h && p[0] || void 0;
69
- this.setState((g) => ({
70
+ const { searchText: i, matchWord: o, matchCase: n, useRegExp: r, matchCyclic: h } = a, m = { text: i, matchWord: o, matchCase: n, useRegExp: r }, g = c.state.selection;
71
+ let d = [];
72
+ try {
73
+ d = _(c.state.doc, m);
74
+ } catch (p) {
75
+ p instanceof SyntaxError && (a.error = this.settings.messages.findReplaceInvalidRegExp), this.setState(a);
76
+ return;
77
+ }
78
+ const f = (p) => !p && d[0] || d.find((u) => u.from >= g.from) || h && d[0] || void 0;
79
+ this.setState((p) => ({
70
80
  ...a,
71
- matches: p,
72
- nextMatch: f(g.searchText)
81
+ matches: d,
82
+ nextMatch: f(p.searchText)
73
83
  }));
74
84
  } else
75
85
  this.setState(a);
76
86
  }, this.state = {
77
87
  selectedTab: 0,
78
- searchText: $(o.view.state),
88
+ searchText: $(s.view.state),
79
89
  replaceText: "",
80
90
  matchCase: !1,
81
91
  matchWord: !1,
@@ -84,58 +94,99 @@ let ee = class extends e.Component {
84
94
  };
85
95
  }
86
96
  get settings() {
87
- return this.props.settings || Z;
97
+ return this.props.settings || ee;
88
98
  }
89
99
  /**
90
100
  * @hidden
91
101
  */
92
- componentDidUpdate(o, t) {
93
- const a = this.props.view, { matches: n = [], nextMatch: s } = this.state;
94
- if (t.nextMatch !== s) {
95
- const i = a.state, c = i.tr, r = [];
96
- n.forEach((h) => {
102
+ componentDidUpdate(s, e) {
103
+ const a = this.props.view, { matches: c = [], nextMatch: i } = this.state;
104
+ if (e.nextMatch !== i) {
105
+ const o = a.state, n = o.tr, r = [];
106
+ c.forEach((h) => {
97
107
  r.push({
98
108
  from: h.from,
99
109
  to: h.to,
100
110
  attrs: {
101
- class: s && h.eq(s) ? "k-text-selected" : "k-text-highlighted"
111
+ class: i && h.eq(i) ? "k-text-selected" : "k-text-highlighted"
102
112
  }
103
113
  });
104
- }), c.setMeta(G, r), c.setSelection(s || E.create(i.doc, i.selection.from)), a.dispatch(c);
114
+ }), n.setMeta(G, r), n.setSelection(i || E.create(o.doc, o.selection.from)), a.dispatch(n);
105
115
  }
106
116
  }
107
117
  /**
108
118
  * @hidden
109
119
  */
110
120
  render() {
111
- const o = B(this), {
112
- findReplaceDialogTitle: t,
121
+ const s = B(this), {
122
+ findReplaceDialogTitle: e,
113
123
  findReplaceTabFind: a,
114
- findReplaceTabReplace: n,
115
- findReplaceFindWhat: s,
116
- findReplaceReplaceWith: i,
117
- findReplaceReplace: c,
124
+ findReplaceTabReplace: c,
125
+ findReplaceFindWhat: i,
126
+ findReplaceReplaceWith: o,
127
+ findReplaceReplace: n,
118
128
  findReplaceReplaceAll: r,
119
129
  findReplaceMatchCase: h,
120
130
  findReplaceMatchWord: m,
121
- findReplaceMatchCyclic: d,
122
- findReplaceUseRegExp: p,
131
+ findReplaceMatchCyclic: g,
132
+ findReplaceUseRegExp: d,
123
133
  findReplacePrevMatch: f,
124
- findReplaceNextMatch: g,
134
+ findReplaceNextMatch: p,
125
135
  findReplaceMatches: u
126
- } = this.settings.messages, { matchCase: w, matchWord: W, matchCyclic: L, useRegExp: A, searchText: z, replaceText: D, nextMatch: S } = this.state, k = /* @__PURE__ */ e.createElement("div", { className: "k-search-options" }, /* @__PURE__ */ e.createElement("span", null, /* @__PURE__ */ e.createElement(C, { id: "match-case", checked: w, onChange: this.onMatchCaseChecked }), /* @__PURE__ */ e.createElement("label", { htmlFor: "match-case", className: "k-checkbox-label" }, o.toLanguageString(h, l[h]))), /* @__PURE__ */ e.createElement("span", null, /* @__PURE__ */ e.createElement(C, { id: "match-whole", checked: W, onChange: this.onMatchWordChecked }), /* @__PURE__ */ e.createElement("label", { htmlFor: "match-whole", className: "k-checkbox-label" }, o.toLanguageString(m, l[m]))), /* @__PURE__ */ e.createElement("span", null, /* @__PURE__ */ e.createElement(C, { id: "match-cyclic", checked: L, onChange: this.onMatchCyclicChecked }), /* @__PURE__ */ e.createElement("label", { htmlFor: "match-cyclic", className: "k-checkbox-label" }, o.toLanguageString(
127
- d,
128
- l[d]
129
- ))), /* @__PURE__ */ e.createElement("span", null, /* @__PURE__ */ e.createElement(C, { id: "regular-expression", checked: A, onChange: this.onUseRegExpChecked }), /* @__PURE__ */ e.createElement("label", { htmlFor: "regular-expression", className: "k-checkbox-label" }, o.toLanguageString(p, l[p])))), R = /* @__PURE__ */ e.createElement("div", { className: "k-matches-container" }, /* @__PURE__ */ e.createElement(x, { fillMode: "flat", themeColor: "primary", onClick: this.onFindPrev }, /* @__PURE__ */ e.createElement(T, { name: "chevron-left", icon: J }), o.toLanguageString(f, l[f])), /* @__PURE__ */ e.createElement("span", null, this.matchesMessage(
130
- o.toLanguageString(u, l[u])
131
- )), /* @__PURE__ */ e.createElement(x, { fillMode: "flat", themeColor: "primary", onClick: this.onFindNext }, o.toLanguageString(g, l[g]), /* @__PURE__ */ e.createElement(T, { name: "chevron-right", icon: Q }))), v = /* @__PURE__ */ e.createElement(
132
- M,
136
+ } = this.settings.messages, { matchCase: N, matchWord: W, matchCyclic: L, useRegExp: A, searchText: z, replaceText: D, nextMatch: S } = this.state, R = /* @__PURE__ */ t.createElement("div", { className: "k-search-options" }, /* @__PURE__ */ t.createElement("span", null, /* @__PURE__ */ t.createElement(
137
+ C,
133
138
  {
134
- render: () => /* @__PURE__ */ e.createElement(F, { horizontal: !0 }, /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement("label", { htmlFor: "findWhat", className: "k-form-label" }, o.toLanguageString(
135
- s,
136
- l[s]
137
- )), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
138
- y,
139
+ id: "match-case",
140
+ checked: N,
141
+ onChange: this.onMatchCaseChecked,
142
+ label: s.toLanguageString(
143
+ h,
144
+ l[h]
145
+ )
146
+ }
147
+ )), /* @__PURE__ */ t.createElement("span", null, /* @__PURE__ */ t.createElement(
148
+ C,
149
+ {
150
+ id: "match-whole",
151
+ checked: W,
152
+ onChange: this.onMatchWordChecked,
153
+ label: s.toLanguageString(
154
+ m,
155
+ l[m]
156
+ )
157
+ }
158
+ )), /* @__PURE__ */ t.createElement("span", null, /* @__PURE__ */ t.createElement(
159
+ C,
160
+ {
161
+ id: "match-cyclic",
162
+ checked: L,
163
+ onChange: this.onMatchCyclicChecked,
164
+ label: s.toLanguageString(
165
+ g,
166
+ l[g]
167
+ )
168
+ }
169
+ )), /* @__PURE__ */ t.createElement("span", null, /* @__PURE__ */ t.createElement(
170
+ C,
171
+ {
172
+ id: "regular-expression",
173
+ checked: A,
174
+ onChange: this.onUseRegExpChecked,
175
+ label: s.toLanguageString(
176
+ d,
177
+ l[d]
178
+ )
179
+ }
180
+ ))), v = /* @__PURE__ */ t.createElement("div", { className: "k-matches-container" }, /* @__PURE__ */ t.createElement(x, { fillMode: "flat", themeColor: "primary", onClick: this.onFindPrev }, /* @__PURE__ */ t.createElement(T, { name: "chevron-left", icon: Q }), s.toLanguageString(f, l[f])), /* @__PURE__ */ t.createElement("span", null, this.matchesMessage(
181
+ s.toLanguageString(u, l[u])
182
+ )), /* @__PURE__ */ t.createElement(x, { fillMode: "flat", themeColor: "primary", onClick: this.onFindNext }, s.toLanguageString(p, l[p]), /* @__PURE__ */ t.createElement(T, { name: "chevron-right", icon: X }))), k = /* @__PURE__ */ t.createElement(
183
+ b,
184
+ {
185
+ render: () => /* @__PURE__ */ t.createElement(w, { horizontal: !0 }, /* @__PURE__ */ t.createElement(F, null, /* @__PURE__ */ t.createElement("label", { htmlFor: "findWhat", className: "k-form-label" }, s.toLanguageString(
186
+ i,
187
+ l[i]
188
+ )), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
189
+ M,
139
190
  {
140
191
  id: "findWhat",
141
192
  type: "text",
@@ -145,16 +196,19 @@ let ee = class extends e.Component {
145
196
  onKeyDown: this.onKeyDown,
146
197
  autoFocus: !0
147
198
  }
148
- ))))
199
+ ), this.state.error && /* @__PURE__ */ t.createElement(J, null, s.toLanguageString(
200
+ this.state.error,
201
+ l[this.state.error]
202
+ )))))
149
203
  }
150
- ), I = /* @__PURE__ */ e.createElement(
151
- M,
204
+ ), I = /* @__PURE__ */ t.createElement(
205
+ b,
152
206
  {
153
- render: () => /* @__PURE__ */ e.createElement(F, { horizontal: !0 }, /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement("label", { htmlFor: "replaceWith", className: "k-form-label" }, o.toLanguageString(
154
- i,
155
- l[i]
156
- )), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
157
- y,
207
+ render: () => /* @__PURE__ */ t.createElement(w, { horizontal: !0 }, /* @__PURE__ */ t.createElement(F, null, /* @__PURE__ */ t.createElement("label", { htmlFor: "replaceWith", className: "k-form-label" }, s.toLanguageString(
208
+ o,
209
+ l[o]
210
+ )), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ t.createElement(
211
+ M,
158
212
  {
159
213
  id: "replaceWith",
160
214
  type: "text",
@@ -164,17 +218,17 @@ let ee = class extends e.Component {
164
218
  ))))
165
219
  }
166
220
  );
167
- return /* @__PURE__ */ e.createElement(
221
+ return /* @__PURE__ */ t.createElement(
168
222
  K,
169
223
  {
170
- title: o.toLanguageString(t, l[t]),
224
+ title: s.toLanguageString(e, l[e]),
171
225
  onClose: this.onClose,
172
226
  style: { width: "auto", height: "auto", userSelect: "none" },
173
227
  resizable: !1,
174
228
  minimizeButton: () => null,
175
229
  maximizeButton: () => null
176
230
  },
177
- /* @__PURE__ */ e.createElement(
231
+ /* @__PURE__ */ t.createElement(
178
232
  O,
179
233
  {
180
234
  selected: this.state.selectedTab,
@@ -182,40 +236,40 @@ let ee = class extends e.Component {
182
236
  onSelect: this.onTabSelect,
183
237
  animation: !1
184
238
  },
185
- /* @__PURE__ */ e.createElement(
186
- b,
239
+ /* @__PURE__ */ t.createElement(
240
+ y,
187
241
  {
188
- title: o.toLanguageString(a, l[a])
242
+ title: s.toLanguageString(a, l[a])
189
243
  },
190
- v,
191
244
  k,
192
- R
245
+ R,
246
+ v
193
247
  ),
194
- /* @__PURE__ */ e.createElement(
195
- b,
248
+ /* @__PURE__ */ t.createElement(
249
+ y,
196
250
  {
197
- title: o.toLanguageString(
198
- n,
199
- l[n]
251
+ title: s.toLanguageString(
252
+ c,
253
+ l[c]
200
254
  )
201
255
  },
202
- v,
256
+ k,
203
257
  I,
204
- /* @__PURE__ */ e.createElement("div", { className: "k-actions k-hstack k-justify-content-end" }, /* @__PURE__ */ e.createElement(x, { disabled: !S, onClick: this.onReplace }, o.toLanguageString(
205
- c,
206
- l[c]
207
- )), /* @__PURE__ */ e.createElement(x, { disabled: !S, onClick: this.onReplaceAll }, o.toLanguageString(
258
+ /* @__PURE__ */ t.createElement("div", { className: "k-actions k-hstack k-justify-content-end" }, /* @__PURE__ */ t.createElement(x, { disabled: !S, onClick: this.onReplace }, s.toLanguageString(
259
+ n,
260
+ l[n]
261
+ )), /* @__PURE__ */ t.createElement(x, { disabled: !S, onClick: this.onReplaceAll }, s.toLanguageString(
208
262
  r,
209
263
  l[r]
210
264
  ))),
211
- k,
212
- R
265
+ R,
266
+ v
213
267
  )
214
268
  )
215
269
  );
216
270
  }
217
271
  };
218
- U(ee);
272
+ U(te);
219
273
  export {
220
- ee as FindAndReplaceDialog
274
+ te as FindAndReplaceDialog
221
275
  };