grep-components 2.0.1 → 2.1.0-GREPF-1810.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/build/components/GrepEditor/components/buttons/InlineButton.d.ts +7 -6
- package/dist/build/components/GrepEditor/components/buttons/button.d.ts +4 -4
- package/dist/build/components/GrepEditor/components/editor.d.ts +2 -37
- package/dist/build/components/GrepEditor/components/plugins/CustomHtmlExport.d.ts +3 -0
- package/dist/build/components/GrepEditor/components/plugins/DisablePastePlugin.d.ts +5 -0
- package/dist/build/components/GrepEditor/components/plugins/InitialDataPlugin.d.ts +3 -0
- package/dist/build/components/GrepEditor/components/plugins/PreventNewlinesPlugin.d.ts +4 -0
- package/dist/build/components/GrepEditor/components/plugins/StyleWrapperPlugin.d.ts +14 -0
- package/dist/build/components/GrepEditor/components/plugins/ToolbarPlugin.d.ts +15 -0
- package/dist/build/components/GrepEditor/components/utils/getDOMRangeRect.d.ts +8 -0
- package/dist/build/components/GrepEditor/components/utils/getSelectedNode.d.ts +2 -0
- package/dist/build/components/GrepEditor/components/utils/setFloatingElemPosition.d.ts +1 -0
- package/dist/build/components/GrepEditor/entities/index.d.ts +30 -0
- package/dist/build/components/GrepEditor/index.d.ts +1 -8
- package/dist/build/components/GrepEditor/stories/GrepEditor.stories.d.ts +6 -0
- package/dist/build/components/GrepEditor/styles/editorStyles.d.ts +1 -0
- package/dist/build/components/GrepEditor/styles/index.d.ts +0 -1
- package/dist/index.js +3573 -6645
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/build/components/GrepEditor/components/toolbars/floating-toolbar.d.ts +0 -5
- package/dist/build/components/GrepEditor/components/toolbars/index.d.ts +0 -8
- package/dist/build/components/GrepEditor/context/index.d.ts +0 -10
- package/dist/build/components/GrepEditor/context/provider.d.ts +0 -9
- package/dist/build/components/GrepEditor/misc/handlers/key.d.ts +0 -6
- package/dist/build/components/GrepEditor/misc/plugins/_link.d.ts +0 -14
- package/dist/build/components/GrepEditor/misc/utils.d.ts +0 -16
- package/dist/build/components/GrepEditor/styles/toolbarStyles.d.ts +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grep-components",
|
|
3
|
-
"version": "2.0.1",
|
|
3
|
+
"version": "2.1.0-GREPF-1810.1",
|
|
4
4
|
"description": "Grep komponentbibliotek",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -96,6 +96,8 @@
|
|
|
96
96
|
"@babel/plugin-transform-private-property-in-object": "^7.22.11",
|
|
97
97
|
"@commitlint/cli": "^18.4.3",
|
|
98
98
|
"@commitlint/config-conventional": "^18.4.3",
|
|
99
|
+
"@lexical/html": "^0.13.1",
|
|
100
|
+
"@lexical/utils": "^0.13.1",
|
|
99
101
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
100
102
|
"@rollup/plugin-json": "^6.0.0",
|
|
101
103
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
@@ -114,7 +116,6 @@
|
|
|
114
116
|
"@testing-library/jest-dom": "^6.1.5",
|
|
115
117
|
"@testing-library/react": "^14.1.2",
|
|
116
118
|
"@testing-library/user-event": "^14.5.1",
|
|
117
|
-
"@types/draft-js": "^0.11.3",
|
|
118
119
|
"@types/history": "^4.7.3",
|
|
119
120
|
"@types/jest": "^29.5.11",
|
|
120
121
|
"@types/lodash.debounce": "^4.0.6",
|
|
@@ -135,8 +136,6 @@
|
|
|
135
136
|
"connected-react-router": "^6.9.3",
|
|
136
137
|
"conventional-changelog-cli": "^4.1.0",
|
|
137
138
|
"cross-env": "^7.0.3",
|
|
138
|
-
"draft-js-export-html": "^1.4.1",
|
|
139
|
-
"draft-js-import-html": "^1.4.1",
|
|
140
139
|
"eslint": "^8.8.0",
|
|
141
140
|
"eslint-plugin-import": "^2.23.4",
|
|
142
141
|
"eslint-plugin-jest-dom": "^5.1.0",
|
|
@@ -182,11 +181,12 @@
|
|
|
182
181
|
"dependencies": {
|
|
183
182
|
"@emotion/react": "^11.11.0",
|
|
184
183
|
"@emotion/styled": "^11.11.0",
|
|
184
|
+
"@lexical/react": "^0.13.1",
|
|
185
185
|
"@mui/icons-material": "^5.14.19",
|
|
186
186
|
"@mui/material": "^5.14.20",
|
|
187
187
|
"@mui/x-date-pickers": "^6.18.3",
|
|
188
188
|
"dayjs": "^1.11.10",
|
|
189
|
-
"
|
|
189
|
+
"lexical": "^0.13.1"
|
|
190
190
|
},
|
|
191
191
|
"overrides": {
|
|
192
192
|
"fork-ts-checker-webpack-plugin": "^6.5.3",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Editor } from 'draft-js';
|
|
3
|
-
import { Button } from '../buttons';
|
|
4
|
-
export interface ToolbarPropperties {
|
|
5
|
-
editor: React.MutableRefObject<Editor>;
|
|
6
|
-
buttons: Button[];
|
|
7
|
-
}
|
|
8
|
-
export { default as FloatingToolbar } from './floating-toolbar';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { EditorState, SelectionState } from 'draft-js';
|
|
3
|
-
export interface Context {
|
|
4
|
-
state: EditorState;
|
|
5
|
-
setState: React.Dispatch<React.SetStateAction<EditorState>>;
|
|
6
|
-
selection?: SelectionState;
|
|
7
|
-
setSelection: React.Dispatch<React.SetStateAction<SelectionState | undefined>>;
|
|
8
|
-
}
|
|
9
|
-
export declare const EditorContext: import("react").Context<Context>;
|
|
10
|
-
export default EditorContext;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { EditorState, DraftEditorCommand, DraftHandleValue } from 'draft-js';
|
|
2
|
-
import { Style } from '../../components/buttons';
|
|
3
|
-
export type CustomDraftCommand = DraftEditorCommand | 'shift-split-block';
|
|
4
|
-
export declare const customKeyHandler: (setEditorState: (state: EditorState) => void) => (command: CustomDraftCommand, editorState: EditorState) => DraftHandleValue;
|
|
5
|
-
export declare const keyHandler: (setEditorState: (state: EditorState) => void, allowedStyles?: Array<Style>) => (command: CustomDraftCommand, editorState: EditorState) => DraftHandleValue;
|
|
6
|
-
export default keyHandler;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ContentBlock, ContentState } from 'draft-js';
|
|
3
|
-
interface LinkProperties {
|
|
4
|
-
contentState: ContentState;
|
|
5
|
-
entityKey: string;
|
|
6
|
-
children: import('react').ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const component: ({ contentState, entityKey, children, }: LinkProperties) => JSX.Element;
|
|
9
|
-
export declare function strategy(contentBlock: ContentBlock, callback: (start: number, end: number) => void, contentState: ContentState): void;
|
|
10
|
-
declare const _default: {
|
|
11
|
-
strategy: typeof strategy;
|
|
12
|
-
component: ({ contentState, entityKey, children, }: LinkProperties) => JSX.Element;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DraftDecorator, ContentState, EditorState } from 'draft-js';
|
|
2
|
-
import { Options as Convert2htmlOptions } from 'draft-js-export-html';
|
|
3
|
-
import { InlineStyle } from '../components/buttons';
|
|
4
|
-
export declare const createState: (content?: string, decorators?: DraftDecorator[]) => EditorState;
|
|
5
|
-
export type ParsedContent = {
|
|
6
|
-
txt: string;
|
|
7
|
-
html: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const convert2html: (content: ContentState, options?: Convert2htmlOptions) => string;
|
|
10
|
-
export declare const convert2txt: (content: ContentState) => string;
|
|
11
|
-
export declare const parseContentState: (state: ContentState) => {
|
|
12
|
-
txt: string;
|
|
13
|
-
html: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const parseContent: (content?: string, decorators?: DraftDecorator[]) => ParsedContent;
|
|
16
|
-
export declare const UpdateStyle: (state: EditorState, style: InlineStyle) => EditorState;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const useFloatingToolbarStyles: (params: {
|
|
2
|
-
isVisible: boolean;
|
|
3
|
-
}, muiStyleOverridesParams?: {
|
|
4
|
-
props: Record<string, unknown>;
|
|
5
|
-
ownerState?: Record<string, unknown> | undefined;
|
|
6
|
-
} | undefined) => {
|
|
7
|
-
classes: Record<"root", string>;
|
|
8
|
-
theme: import("@mui/material").Theme;
|
|
9
|
-
css: import("tss-react").Css;
|
|
10
|
-
cx: import("tss-react").Cx;
|
|
11
|
-
};
|