@toptal/picasso-rich-text-editor 16.0.1 → 17.0.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.
- package/dist-package/src/RichTextEditor/RichTextEditor.d.ts +0 -5
- package/dist-package/src/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist-package/src/RichTextEditor/RichTextEditor.js +1 -8
- package/dist-package/src/RichTextEditor/RichTextEditor.js.map +1 -1
- package/package.json +17 -17
- package/src/RichTextEditor/RichTextEditor.tsx +1 -15
|
@@ -15,11 +15,6 @@ export interface Props extends BaseProps {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
/** unique identifier */
|
|
17
17
|
id: string;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated [FX-4715] Use the `status` prop instead to support success and error states
|
|
20
|
-
* Indicate whether `RichTextEditor` is in error state
|
|
21
|
-
*/
|
|
22
|
-
error?: boolean;
|
|
23
18
|
/** Indicate `RichTextEditor` is in `error` or `default` state */
|
|
24
19
|
status?: Extract<OutlinedInputStatus, 'error' | 'default'>;
|
|
25
20
|
/** Used inside Form with combination of Label to enable forHtml functionality */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAEnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,OAAO,KAAoD,MAAM,OAAO,CAAA;AAExE,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAG1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEnD,MAAM,WAAW,KAAM,SA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AAC,EAAE,oBAAoB,CAAA;IACvC;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,2GAA2G;IAC3G,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAA;IACpE,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAA;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAC3B,CAAA;IACD,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAA;CAClD;AAMD,eAAO,MAAM,cAAc,8EAqG1B,CAAA;AAaD,eAAe,cAAc,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core/styles';
|
|
2
2
|
import { InputMultilineAdornment } from '@toptal/picasso-input-adornment';
|
|
3
3
|
import { useHasMultilineCounter } from '@toptal/picasso-shared';
|
|
4
|
-
import { noop
|
|
4
|
+
import { noop } from '@toptal/picasso-utils';
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import React, { forwardRef, useCallback, useRef, useState } from 'react';
|
|
7
7
|
import LexicalEditor from '../LexicalEditor';
|
|
@@ -14,13 +14,6 @@ export const RichTextEditor = forwardRef(function RichTextEditor(props, ref) {
|
|
|
14
14
|
const { 'data-testid': dataTestId, plugins, autoFocus = false, className, defaultValue, disabled, id, onChange = noop, onFocus = noop, onBlur = noop, placeholder, minLength, maxLength, minLengthMessage, maxLengthMessage, style, status, testIds, hiddenInputId, setHasMultilineCounter, name, highlight, customEmojis, } = props;
|
|
15
15
|
const classes = useStyles();
|
|
16
16
|
const wrapperRef = useRef(null);
|
|
17
|
-
// TODO: [FX-4715]
|
|
18
|
-
usePropDeprecationWarning({
|
|
19
|
-
props,
|
|
20
|
-
name: 'error',
|
|
21
|
-
componentName: 'RichTextEditor',
|
|
22
|
-
description: 'Use the `status` prop instead. `error` is deprecated and will be removed in the next major release.',
|
|
23
|
-
});
|
|
24
17
|
// Possibly use useRef for synchronous updates but no re-rendering effect
|
|
25
18
|
const [hasFocus, setFocus] = useState(false);
|
|
26
19
|
const handleFocus = useCallback(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA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AAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,GAC5B,CACE;QACL,cAAc,IAAI,CACjB,oBAAC,uBAAuB,IAAC,KAAK,EAAE,YAAY,IACzC,cAAc,CACS,CAC3B,CACA,CACJ,CAAA;AACH,CAAC,CACF,CAAA;AAED,cAAc,CAAC,YAAY,GAAG;IAC5B,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,eAAe,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-rich-text-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Picasso rich text editor",
|
|
5
5
|
"author": "Toptal",
|
|
6
6
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso-rich-text-editor#readme",
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"@emoji-mart/react": "^1.1.1",
|
|
42
42
|
"@lexical/html": "0.11.2",
|
|
43
43
|
"@lexical/react": "0.11.2",
|
|
44
|
-
"@toptal/picasso-container": "3.0.
|
|
45
|
-
"@toptal/picasso-button": "4.0.
|
|
46
|
-
"@toptal/picasso-icons": "1.6.
|
|
47
|
-
"@toptal/picasso-file-input": "
|
|
48
|
-
"@toptal/picasso-image": "3.0.
|
|
49
|
-
"@toptal/picasso-outlined-input": "
|
|
50
|
-
"@toptal/picasso-list": "5.0.
|
|
51
|
-
"@toptal/picasso-link": "3.0.
|
|
52
|
-
"@toptal/picasso-select": "
|
|
53
|
-
"@toptal/picasso-input-adornment": "3.0.
|
|
54
|
-
"@toptal/picasso-typography": "4.0.
|
|
55
|
-
"@toptal/picasso-modal": "3.0.
|
|
56
|
-
"@toptal/picasso-form": "
|
|
57
|
-
"@toptal/picasso-input": "
|
|
58
|
-
"@toptal/picasso-utils": "
|
|
44
|
+
"@toptal/picasso-container": "3.0.1",
|
|
45
|
+
"@toptal/picasso-button": "4.0.2",
|
|
46
|
+
"@toptal/picasso-icons": "1.6.1",
|
|
47
|
+
"@toptal/picasso-file-input": "4.0.0",
|
|
48
|
+
"@toptal/picasso-image": "3.0.1",
|
|
49
|
+
"@toptal/picasso-outlined-input": "4.0.0",
|
|
50
|
+
"@toptal/picasso-list": "5.0.1",
|
|
51
|
+
"@toptal/picasso-link": "3.0.1",
|
|
52
|
+
"@toptal/picasso-select": "4.0.0",
|
|
53
|
+
"@toptal/picasso-input-adornment": "3.0.1",
|
|
54
|
+
"@toptal/picasso-typography": "4.0.1",
|
|
55
|
+
"@toptal/picasso-modal": "3.0.13",
|
|
56
|
+
"@toptal/picasso-form": "6.0.0",
|
|
57
|
+
"@toptal/picasso-input": "4.0.0",
|
|
58
|
+
"@toptal/picasso-utils": "2.0.0",
|
|
59
59
|
"classnames": "^2.5.1",
|
|
60
60
|
"emoji-mart": "^5.5.2",
|
|
61
61
|
"hast-to-hyperscript": "^9.0.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@material-ui/core": "4.12.4",
|
|
70
70
|
"@testing-library/react-hooks": "^8.0.1",
|
|
71
71
|
"@toptal/picasso-test-utils": "1.1.1",
|
|
72
|
-
"@toptal/picasso-tailwind-merge": "2.0.
|
|
72
|
+
"@toptal/picasso-tailwind-merge": "2.0.1",
|
|
73
73
|
"@types/classnames": "^2.3.1"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
@@ -4,7 +4,7 @@ import type { Status as OutlinedInputStatus } from '@toptal/picasso-outlined-inp
|
|
|
4
4
|
import { InputMultilineAdornment } from '@toptal/picasso-input-adornment'
|
|
5
5
|
import type { BaseProps } from '@toptal/picasso-shared'
|
|
6
6
|
import { useHasMultilineCounter } from '@toptal/picasso-shared'
|
|
7
|
-
import { noop
|
|
7
|
+
import { noop } from '@toptal/picasso-utils'
|
|
8
8
|
import cx from 'classnames'
|
|
9
9
|
import React, { forwardRef, useCallback, useRef, useState } from 'react'
|
|
10
10
|
|
|
@@ -30,11 +30,6 @@ export interface Props extends BaseProps {
|
|
|
30
30
|
disabled?: boolean
|
|
31
31
|
/** unique identifier */
|
|
32
32
|
id: string
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated [FX-4715] Use the `status` prop instead to support success and error states
|
|
35
|
-
* Indicate whether `RichTextEditor` is in error state
|
|
36
|
-
*/
|
|
37
|
-
error?: boolean
|
|
38
33
|
/** Indicate `RichTextEditor` is in `error` or `default` state */
|
|
39
34
|
status?: Extract<OutlinedInputStatus, 'error' | 'default'>
|
|
40
35
|
/** Used inside Form with combination of Label to enable forHtml functionality */
|
|
@@ -124,15 +119,6 @@ export const RichTextEditor = forwardRef<HTMLDivElement, Props>(
|
|
|
124
119
|
const classes = useStyles()
|
|
125
120
|
const wrapperRef = useRef<HTMLDivElement | null>(null)
|
|
126
121
|
|
|
127
|
-
// TODO: [FX-4715]
|
|
128
|
-
usePropDeprecationWarning({
|
|
129
|
-
props,
|
|
130
|
-
name: 'error',
|
|
131
|
-
componentName: 'RichTextEditor',
|
|
132
|
-
description:
|
|
133
|
-
'Use the `status` prop instead. `error` is deprecated and will be removed in the next major release.',
|
|
134
|
-
})
|
|
135
|
-
|
|
136
122
|
// Possibly use useRef for synchronous updates but no re-rendering effect
|
|
137
123
|
const [hasFocus, setFocus] = useState(false)
|
|
138
124
|
|