grep-components 2.1.0-GREPF-2281.2 → 2.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.
- package/dist/build/components/AppBar/AppBar.d.ts +1 -1
- package/dist/build/components/GrepEditor/components/buttons/InlineButton.d.ts +6 -7
- package/dist/build/components/GrepEditor/components/buttons/button.d.ts +4 -4
- package/dist/build/components/GrepEditor/components/editor.d.ts +37 -2
- package/dist/build/components/GrepEditor/components/toolbars/floating-toolbar.d.ts +5 -0
- package/dist/build/components/GrepEditor/components/toolbars/index.d.ts +8 -0
- package/dist/build/components/GrepEditor/context/index.d.ts +10 -0
- package/dist/build/components/GrepEditor/context/provider.d.ts +9 -0
- package/dist/build/components/GrepEditor/index.d.ts +8 -1
- package/dist/build/components/GrepEditor/misc/handlers/key.d.ts +6 -0
- package/dist/build/components/GrepEditor/misc/plugins/_link.d.ts +14 -0
- package/dist/build/components/GrepEditor/misc/utils.d.ts +16 -0
- package/dist/build/components/GrepEditor/stories/GrepEditor.stories.d.ts +0 -18
- package/dist/build/components/GrepEditor/styles/editorStyles.d.ts +0 -1
- package/dist/build/components/GrepEditor/styles/index.d.ts +1 -0
- package/dist/build/components/GrepEditor/styles/toolbarStyles.d.ts +11 -0
- package/dist/index.js +6653 -3612
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/build/components/GrepEditor/components/plugins/CustomHtmlExport.d.ts +0 -3
- package/dist/build/components/GrepEditor/components/plugins/DisablePastePlugin.d.ts +0 -5
- package/dist/build/components/GrepEditor/components/plugins/HeadingPlugin.d.ts +0 -3
- package/dist/build/components/GrepEditor/components/plugins/InitialDataPlugin.d.ts +0 -3
- package/dist/build/components/GrepEditor/components/plugins/PreventNewlinesPlugin.d.ts +0 -4
- package/dist/build/components/GrepEditor/components/plugins/StyleWrapperPlugin.d.ts +0 -14
- package/dist/build/components/GrepEditor/components/plugins/ToolbarPlugin.d.ts +0 -15
- package/dist/build/components/GrepEditor/components/utils/getDOMRangeRect.d.ts +0 -8
- package/dist/build/components/GrepEditor/components/utils/getSelectedNode.d.ts +0 -2
- package/dist/build/components/GrepEditor/components/utils/setFloatingElemPosition.d.ts +0 -1
- package/dist/build/components/GrepEditor/entities/index.d.ts +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grep-components",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Grep komponentbibliotek",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -96,8 +96,6 @@
|
|
|
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",
|
|
101
99
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
102
100
|
"@rollup/plugin-json": "^6.0.0",
|
|
103
101
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
@@ -116,6 +114,7 @@
|
|
|
116
114
|
"@testing-library/jest-dom": "^6.1.5",
|
|
117
115
|
"@testing-library/react": "^14.1.2",
|
|
118
116
|
"@testing-library/user-event": "^14.5.1",
|
|
117
|
+
"@types/draft-js": "^0.11.3",
|
|
119
118
|
"@types/history": "^4.7.3",
|
|
120
119
|
"@types/jest": "^29.5.11",
|
|
121
120
|
"@types/lodash.debounce": "^4.0.6",
|
|
@@ -136,6 +135,8 @@
|
|
|
136
135
|
"connected-react-router": "^6.9.3",
|
|
137
136
|
"conventional-changelog-cli": "^4.1.0",
|
|
138
137
|
"cross-env": "^7.0.3",
|
|
138
|
+
"draft-js-export-html": "^1.4.1",
|
|
139
|
+
"draft-js-import-html": "^1.4.1",
|
|
139
140
|
"eslint": "^8.8.0",
|
|
140
141
|
"eslint-plugin-import": "^2.23.4",
|
|
141
142
|
"eslint-plugin-jest-dom": "^5.1.0",
|
|
@@ -181,12 +182,11 @@
|
|
|
181
182
|
"dependencies": {
|
|
182
183
|
"@emotion/react": "^11.11.0",
|
|
183
184
|
"@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
|
+
"draft-js": "^0.11.0"
|
|
190
190
|
},
|
|
191
191
|
"overrides": {
|
|
192
192
|
"fork-ts-checker-webpack-plugin": "^6.5.3",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DOMExportOutput, KlassConstructor, LexicalEditor, LexicalNode } from 'lexical';
|
|
2
|
-
export declare const htmlExportMap: Map<KlassConstructor<typeof LexicalNode>, (editor: LexicalEditor, target: LexicalNode) => DOMExportOutput>;
|
|
3
|
-
export declare function ApplyFormatting(element: HTMLElement, formatting: Record<string, boolean>): HTMLElement;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface CharcounteHelpertextPPayload {
|
|
3
|
-
showCharcount?: boolean;
|
|
4
|
-
helperText?: string;
|
|
5
|
-
readOnly?: boolean;
|
|
6
|
-
classes?: Partial<Record<'root' | 'editor' | 'legend' | 'label', string>>;
|
|
7
|
-
label?: string;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
autoFocus?: boolean;
|
|
10
|
-
toolbarAnchor: (_floatingAnchorElem: HTMLDivElement) => void;
|
|
11
|
-
hasCustomToolbar?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function StyleWrapperPlugin({ showCharcount, helperText, readOnly, classes, label, children, autoFocus, toolbarAnchor, hasCustomToolbar, }: CharcounteHelpertextPPayload): React.JSX.Element | '' | undefined;
|
|
14
|
-
export default StyleWrapperPlugin;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
import { FC } from 'react';
|
|
9
|
-
import { Button } from '../buttons';
|
|
10
|
-
import { ToolbarProperties } from '../../entities';
|
|
11
|
-
export default function FloatingTextFormatToolbarPlugin({ anchorElem, buttons, CustomToolbar, }: {
|
|
12
|
-
anchorElem: HTMLElement;
|
|
13
|
-
buttons?: Button[];
|
|
14
|
-
CustomToolbar?: FC<ToolbarProperties>;
|
|
15
|
-
}): JSX.Element | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDOMRangeRect(nativeSelection: Selection, rootElement: HTMLElement): DOMRect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function setFloatingElemPosition(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, verticalGap?: number): void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Button, Style } from '../components/buttons';
|
|
3
|
-
import { EditorState, LexicalEditor } from 'lexical';
|
|
4
|
-
export interface ToolbarProperties {
|
|
5
|
-
editor: LexicalEditor;
|
|
6
|
-
buttons: Button[];
|
|
7
|
-
isSelected: boolean[];
|
|
8
|
-
}
|
|
9
|
-
export type LexicalOnChange = (editorState: EditorState, editor: LexicalEditor, tags: Set<string>) => void;
|
|
10
|
-
export interface Properties {
|
|
11
|
-
html?: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
readOnly?: boolean;
|
|
14
|
-
autoFocus?: boolean;
|
|
15
|
-
showCharCount?: boolean;
|
|
16
|
-
helperText?: string;
|
|
17
|
-
buttons?: Array<Button>;
|
|
18
|
-
disableNewlines?: boolean;
|
|
19
|
-
stripPastedStyles?: boolean;
|
|
20
|
-
blockPasting?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Undefined: allow all styles.
|
|
23
|
-
* Empty array: disable all styles.
|
|
24
|
-
* Not empty array: allow only specified styles.
|
|
25
|
-
*/
|
|
26
|
-
allowedStyles?: Array<Style>;
|
|
27
|
-
Toolbar?: React.FunctionComponent<ToolbarProperties>;
|
|
28
|
-
classes?: Partial<Record<'root' | 'editor' | 'legend' | 'label', string>>;
|
|
29
|
-
onContentChange?: LexicalOnChange;
|
|
30
|
-
}
|