@fvc/richtext 1.0.20 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/index.js CHANGED
@@ -1 +1 @@
1
- import*as e from"react";import{RichTextEditorComponent as t,Inject as r,Toolbar as i,HtmlEditor as o,Table as s,QuickToolbar as a}from"@cyber-wysiwyg/richtexteditor";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";var l=function(){return l=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var n={items:["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Formats","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|","ClearFormat","|"]},c={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},y=function(y){y.testId;var b=y.toolbarSettings,p=void 0===b?n:b,m=y.quickToolbarSettings,d=void 0===m?c:m,g=y.height,u=void 0===g?450:g,w=y.enableTabKey,h=void 0===w||w,f=y.enableHtmlSanitizer,v=void 0===f||f,S=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r}(y,["testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer"]),j=e.useRef(null);return e.createElement(t,l({ref:j,tabIndex:0,height:u,enableTabKey:h,toolbarSettings:p,quickToolbarSettings:d,enableHtmlSanitizer:v},S),e.createElement(r,{services:[i,o,s,a]}))};export{y as Richtext};
1
+ import{RichTextEditorComponent as e,Inject as t,Toolbar as r,HtmlEditor as i,Table as o,QuickToolbar as n}from"@cyber-wysiwyg/richtexteditor";import*as s from"react";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";var a=function(){return a=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}");var l={items:["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Formats","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|","ClearFormat","|"]},c={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},y=function(y){y.testId;var d=y.toolbarSettings,p=void 0===d?l:d,m=y.quickToolbarSettings,b=void 0===m?c:m,u=y.height,g=void 0===u?450:u,h=y.enableTabKey,f=void 0===h||h,w=y.enableHtmlSanitizer,x=void 0===w||w,v=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r}(y,["testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer"]),S=s.useRef(null),T=s.useMemo((function(){return"function"==typeof p?p(l):p}),[p]);return s.createElement(e,a({ref:S,tabIndex:0,height:g,enableTabKey:f,toolbarSettings:T,quickToolbarSettings:b,enableHtmlSanitizer:x},v),s.createElement(t,{services:[r,i,o,n]}))};export{y as Richtext};
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { RichtextProps } from './types';
3
+ import './styles/RichText.scss';
3
4
  import '@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css';
4
5
  import '@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css';
5
6
  import '@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css';
@@ -1,4 +1,5 @@
1
1
  import { RichTextEditor } from '@cyber-wysiwyg/richtexteditor/ej2-react-richtexteditor';
2
- export type RichtextProps = Partial<RichTextEditor> & {
2
+ export type RichtextProps = Partial<Omit<RichTextEditor, 'toolbarSettings'>> & {
3
3
  testId?: string;
4
+ toolbarSettings?: RichTextEditor['toolbarSettings'] | ((defaultToolbarSettings: RichTextEditor['toolbarSettings']) => RichTextEditor['toolbarSettings']);
4
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fvc/richtext",
3
- "version": "1.0.20",
3
+ "version": "1.3.1",
4
4
  "main": "./dist/lib/index.js",
5
5
  "types": "./dist/lib/richtext/src/index.d.ts",
6
6
  "files": [