@fvc/richtext 1.0.18 → 1.0.19

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 s}from"@cyber-wysiwyg/richtexteditor";import*as a from"react";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/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";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/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){var b=y.testId,p=void 0===b?"richtext":b,m=y.toolbarSettings,d=void 0===m?n:m,u=y.quickToolbarSettings,g=void 0===u?c:u,w=y.height,h=void 0===w?450:w,f=y.enableTabKey,v=void 0===f||f,x=y.enableHtmlSanitizer,S=void 0===x||x,j=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"]),O=a.useRef(null),T=a.useMemo(function(){return"function"==typeof d?d(n):d},[d]);return a.createElement(e,l({ref:O,"data-testId":p,tabIndex:0,height:h,enableTabKey:v,toolbarSettings:T,quickToolbarSettings:g,enableHtmlSanitizer:S},j),a.createElement(t,{services:[r,i,o,s]}))};export{y as Richtext};
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { RichtextProps } from './types';
3
3
  import '@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css';
4
- import '@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css';
5
4
  import '@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css';
6
- import '@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css';
5
+ import '@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css';
7
6
  import '@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css';
8
7
  import '@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css';
9
8
  import '@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css';
10
9
  import '@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css';
11
10
  import '@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css';
11
+ import '@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css';
12
12
  export declare const Richtext: ({ testId, toolbarSettings, quickToolbarSettings, height, enableTabKey, enableHtmlSanitizer, ...rest }: RichtextProps) => React.JSX.Element;
@@ -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.18",
3
+ "version": "1.0.19",
4
4
  "main": "./dist/lib/index.js",
5
5
  "types": "./dist/lib/richtext/src/index.d.ts",
6
6
  "files": [
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "scripts": {
21
- "build": "rm -rf dist && rm -rf .rollup.cache && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
21
+ "build": "rollup -c ./rollup.config.mjs"
22
22
  },
23
23
  "dependencies": {
24
24
  "@cyber-wysiwyg/richtexteditor": "^1.0.10",
@@ -30,4 +30,4 @@
30
30
  "react": "^18.0.0",
31
31
  "@cyber-wysiwyg/richtexteditor": "^1.0.10"
32
32
  }
33
- }
33
+ }