grep-components 2.2.0-GREPF-2281.1 → 2.2.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 +6658 -3746
- package/dist/index.js.map +1 -1
- package/package.json +30 -29
- 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/TextNodeStylingPlugin.d.ts +0 -4
- 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 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grep-components",
|
|
3
|
-
"version": "2.2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Grep komponentbibliotek",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"yalc:init": "yalc add && yalc push",
|
|
28
28
|
"yalc:build": "rollup -c --no-treeshake --no-sourcemap --environment yalc",
|
|
29
29
|
"yalc:watch": "npm run yalc:build -- -w",
|
|
30
|
-
"prepare": "husky
|
|
30
|
+
"prepare": "husky",
|
|
31
31
|
"deploy-storybook": "storybook-to-ghpages"
|
|
32
32
|
},
|
|
33
33
|
"release": {
|
|
@@ -94,28 +94,28 @@
|
|
|
94
94
|
"@babel/core": "^7.23.5",
|
|
95
95
|
"@babel/eslint-parser": "^7.11.0",
|
|
96
96
|
"@babel/plugin-transform-private-property-in-object": "^7.22.11",
|
|
97
|
-
"@
|
|
98
|
-
"@commitlint/
|
|
99
|
-
"@
|
|
100
|
-
"@lexical/utils": "^0.13.1",
|
|
97
|
+
"@chromatic-com/storybook": "^1.3.3",
|
|
98
|
+
"@commitlint/cli": "^19.2.2",
|
|
99
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
101
100
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
102
101
|
"@rollup/plugin-json": "^6.0.0",
|
|
103
102
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
104
103
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
105
104
|
"@rollup/plugin-url": "^8.0.0",
|
|
106
|
-
"@storybook/addon-actions": "^
|
|
107
|
-
"@storybook/addon-essentials": "^
|
|
108
|
-
"@storybook/addon-links": "^
|
|
109
|
-
"@storybook/addon-storysource": "^
|
|
110
|
-
"@storybook/addons": "^7.6.
|
|
111
|
-
"@storybook/cli": "^
|
|
112
|
-
"@storybook/preset-create-react-app": "^
|
|
113
|
-
"@storybook/react-webpack5": "^
|
|
105
|
+
"@storybook/addon-actions": "^8.0.8",
|
|
106
|
+
"@storybook/addon-essentials": "^8.0.8",
|
|
107
|
+
"@storybook/addon-links": "^8.0.8",
|
|
108
|
+
"@storybook/addon-storysource": "^8.0.8",
|
|
109
|
+
"@storybook/addons": "^7.6.17",
|
|
110
|
+
"@storybook/cli": "^8.0.8",
|
|
111
|
+
"@storybook/preset-create-react-app": "^8.0.8",
|
|
112
|
+
"@storybook/react-webpack5": "^8.0.8",
|
|
114
113
|
"@storybook/storybook-deployer": "^2.8.16",
|
|
115
|
-
"@testing-library/dom": "^9.3.
|
|
114
|
+
"@testing-library/dom": "^9.3.4",
|
|
116
115
|
"@testing-library/jest-dom": "^6.1.5",
|
|
117
|
-
"@testing-library/react": "^14.1
|
|
116
|
+
"@testing-library/react": "^14.3.1",
|
|
118
117
|
"@testing-library/user-event": "^14.5.1",
|
|
118
|
+
"@types/draft-js": "^0.11.3",
|
|
119
119
|
"@types/history": "^4.7.3",
|
|
120
120
|
"@types/jest": "^29.5.11",
|
|
121
121
|
"@types/lodash.debounce": "^4.0.6",
|
|
@@ -124,27 +124,29 @@
|
|
|
124
124
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
125
125
|
"@types/react-redux": "^7.1.32",
|
|
126
126
|
"@types/react-router-dom": "^5.1.3",
|
|
127
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
128
|
-
"@typescript-eslint/parser": "^
|
|
127
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
128
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
129
129
|
"babel-jest": "^29.2.0",
|
|
130
130
|
"babel-loader": "^9.0.0",
|
|
131
131
|
"babel-plugin-external-helpers": "^6.22.0",
|
|
132
132
|
"babel-runtime": "^6.26.0",
|
|
133
133
|
"chalk": "^5.3.0",
|
|
134
134
|
"clsx": "^2.0.0",
|
|
135
|
-
"commitlint": "^
|
|
135
|
+
"commitlint": "^19.2.2",
|
|
136
136
|
"connected-react-router": "^6.9.3",
|
|
137
137
|
"conventional-changelog-cli": "^4.1.0",
|
|
138
138
|
"cross-env": "^7.0.3",
|
|
139
|
-
"
|
|
139
|
+
"draft-js-export-html": "^1.4.1",
|
|
140
|
+
"draft-js-import-html": "^1.4.1",
|
|
141
|
+
"eslint": "^8.57.0",
|
|
140
142
|
"eslint-plugin-import": "^2.23.4",
|
|
141
|
-
"eslint-plugin-jest-dom": "^5.
|
|
143
|
+
"eslint-plugin-jest-dom": "^5.2.0",
|
|
142
144
|
"eslint-plugin-react": "^7.24.0",
|
|
143
145
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
144
|
-
"eslint-plugin-storybook": "^0.
|
|
146
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
145
147
|
"eslint-plugin-testing-library": "^6.2.0",
|
|
146
148
|
"history": "^4.7.2",
|
|
147
|
-
"husky": "^
|
|
149
|
+
"husky": "^9.0.11",
|
|
148
150
|
"jest": "^29.7.0",
|
|
149
151
|
"jest-environment-jsdom": "^29.7.0",
|
|
150
152
|
"lint-staged": "^15.2.0",
|
|
@@ -163,13 +165,13 @@
|
|
|
163
165
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
164
166
|
"rollup-plugin-postcss": "^4.0.2",
|
|
165
167
|
"seamless-immutable": "^7.1.4",
|
|
166
|
-
"semantic-release": "^
|
|
167
|
-
"storybook": "^
|
|
168
|
+
"semantic-release": "^23.0.8",
|
|
169
|
+
"storybook": "^8.0.8",
|
|
168
170
|
"ts-jest": "^29.1.1",
|
|
169
171
|
"ts-keycode-enum": "^1.0.6",
|
|
170
172
|
"tslib": "^2.2.0",
|
|
171
173
|
"tss-react": "^4.0.0",
|
|
172
|
-
"typescript": "^5.
|
|
174
|
+
"typescript": "^5.4.5"
|
|
173
175
|
},
|
|
174
176
|
"files": [
|
|
175
177
|
"dist",
|
|
@@ -181,12 +183,11 @@
|
|
|
181
183
|
"dependencies": {
|
|
182
184
|
"@emotion/react": "^11.11.0",
|
|
183
185
|
"@emotion/styled": "^11.11.0",
|
|
184
|
-
"@lexical/react": "^0.13.1",
|
|
185
186
|
"@mui/icons-material": "^5.14.19",
|
|
186
187
|
"@mui/material": "^5.14.20",
|
|
187
|
-
"@mui/x-date-pickers": "^
|
|
188
|
+
"@mui/x-date-pickers": "^7.2.0",
|
|
188
189
|
"dayjs": "^1.11.10",
|
|
189
|
-
"
|
|
190
|
+
"draft-js": "^0.11.0"
|
|
190
191
|
},
|
|
191
192
|
"overrides": {
|
|
192
193
|
"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,31 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '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
|
-
editorRef?: RefObject<LexicalEditor>;
|
|
22
|
-
/**
|
|
23
|
-
* Undefined: allow all styles.
|
|
24
|
-
* Empty array: disable all styles.
|
|
25
|
-
* Not empty array: allow only specified styles.
|
|
26
|
-
*/
|
|
27
|
-
allowedStyles?: Array<Style>;
|
|
28
|
-
Toolbar?: React.FunctionComponent<ToolbarProperties>;
|
|
29
|
-
classes?: Partial<Record<'root' | 'editor' | 'legend' | 'label', string>>;
|
|
30
|
-
onContentChange?: LexicalOnChange;
|
|
31
|
-
}
|