grep-components 2.3.0-GREPF-2280.2 → 2.3.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.
Files changed (36) hide show
  1. package/dist/build/components/AppBar/AppBar.d.ts +1 -1
  2. package/dist/build/components/AppBar/MainAppStyles.d.ts +3 -3
  3. package/dist/build/components/GrepEditor/components/buttons/InlineButton.d.ts +7 -6
  4. package/dist/build/components/GrepEditor/components/buttons/button.d.ts +4 -4
  5. package/dist/build/components/GrepEditor/components/editor.d.ts +2 -37
  6. package/dist/build/components/GrepEditor/components/plugins/CustomHtmlExport.d.ts +3 -0
  7. package/dist/build/components/GrepEditor/components/plugins/DisablePastePlugin.d.ts +5 -0
  8. package/dist/build/components/GrepEditor/components/plugins/HeadingPlugin.d.ts +3 -0
  9. package/dist/build/components/GrepEditor/components/plugins/InitialDataPlugin.d.ts +3 -0
  10. package/dist/build/components/GrepEditor/components/plugins/PreventNewlinesPlugin.d.ts +4 -0
  11. package/dist/build/components/GrepEditor/components/plugins/StyleWrapperPlugin.d.ts +14 -0
  12. package/dist/build/components/GrepEditor/components/plugins/TextNodeStylingPlugin.d.ts +4 -0
  13. package/dist/build/components/GrepEditor/components/plugins/ToolbarPlugin.d.ts +15 -0
  14. package/dist/build/components/GrepEditor/components/utils/getDOMRangeRect.d.ts +8 -0
  15. package/dist/build/components/GrepEditor/components/utils/getSelectedNode.d.ts +2 -0
  16. package/dist/build/components/GrepEditor/components/utils/setFloatingElemPosition.d.ts +1 -0
  17. package/dist/build/components/GrepEditor/entities/index.d.ts +31 -0
  18. package/dist/build/components/GrepEditor/index.d.ts +1 -8
  19. package/dist/build/components/GrepEditor/stories/GrepEditor.stories.d.ts +18 -0
  20. package/dist/build/components/GrepEditor/styles/editorStyles.d.ts +1 -0
  21. package/dist/build/components/GrepEditor/styles/index.d.ts +0 -1
  22. package/dist/build/components/NavGuard/stories/NavGuard.stories.d.ts +2 -21
  23. package/dist/build/components/NavGuard/stories/_scaffold.d.ts +5 -0
  24. package/dist/build/components/NavGuard/stories/standard.d.ts +3 -0
  25. package/dist/build/components/ToC/stories/_scaffold.d.ts +2 -2
  26. package/dist/index.js +3969 -6858
  27. package/dist/index.js.map +1 -1
  28. package/package.json +39 -25
  29. package/dist/build/components/GrepEditor/components/toolbars/floating-toolbar.d.ts +0 -5
  30. package/dist/build/components/GrepEditor/components/toolbars/index.d.ts +0 -8
  31. package/dist/build/components/GrepEditor/context/index.d.ts +0 -10
  32. package/dist/build/components/GrepEditor/context/provider.d.ts +0 -9
  33. package/dist/build/components/GrepEditor/misc/handlers/key.d.ts +0 -6
  34. package/dist/build/components/GrepEditor/misc/plugins/_link.d.ts +0 -14
  35. package/dist/build/components/GrepEditor/misc/utils.d.ts +0 -16
  36. 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.3.0-GREPF-2280.2",
3
+ "version": "2.3.0",
4
4
  "description": "Grep komponentbibliotek",
5
5
  "repository": {
6
6
  "type": "git",
@@ -79,11 +79,15 @@
79
79
  ]
80
80
  },
81
81
  "peerDependencies": {
82
+ "connected-react-router": "6.x",
83
+ "history": "4x || 5.x",
82
84
  "prop-types": "^15.7.2",
83
85
  "react": "^18.x",
84
86
  "react-dom": "^18.x",
85
87
  "react-redux": "8.x || 9.x",
86
- "react-router-dom": "6.x",
88
+ "react-router": "5.x || 6.x",
89
+ "react-router-dom": "5.x || 6.x",
90
+ "react-router-redux": "4.x",
87
91
  "redux": "^4.x || ^5.x"
88
92
  },
89
93
  "devDependencies": {
@@ -91,55 +95,57 @@
91
95
  "@babel/eslint-parser": "^7.11.0",
92
96
  "@babel/plugin-transform-private-property-in-object": "^7.22.11",
93
97
  "@chromatic-com/storybook": "^1.3.3",
94
- "@commitlint/cli": "^19.2.2",
98
+ "@commitlint/cli": "^19.3.0",
95
99
  "@commitlint/config-conventional": "^19.2.2",
100
+ "@lexical/html": "^0.13.1",
101
+ "@lexical/utils": "^0.13.1",
96
102
  "@rollup/plugin-commonjs": "^25.0.7",
97
103
  "@rollup/plugin-json": "^6.0.0",
98
104
  "@rollup/plugin-node-resolve": "^15.0.0",
99
105
  "@rollup/plugin-typescript": "^11.1.5",
100
106
  "@rollup/plugin-url": "^8.0.0",
101
- "@storybook/addon-actions": "^8.0.8",
102
- "@storybook/addon-essentials": "^8.0.8",
103
- "@storybook/addon-links": "^8.0.8",
104
- "@storybook/addon-storysource": "^8.0.8",
107
+ "@storybook/addon-actions": "^8.1.6",
108
+ "@storybook/addon-essentials": "^8.1.6",
109
+ "@storybook/addon-links": "^8.1.6",
110
+ "@storybook/addon-storysource": "^8.1.6",
105
111
  "@storybook/addons": "^7.6.17",
106
- "@storybook/cli": "^8.0.8",
107
- "@storybook/preset-create-react-app": "^8.0.8",
108
- "@storybook/react-webpack5": "^8.0.8",
112
+ "@storybook/cli": "^8.1.6",
113
+ "@storybook/preset-create-react-app": "^8.1.6",
114
+ "@storybook/react-webpack5": "^8.1.6",
109
115
  "@storybook/storybook-deployer": "^2.8.16",
110
- "@testing-library/dom": "^9.3.4",
116
+ "@testing-library/dom": "^10.1.0",
111
117
  "@testing-library/jest-dom": "^6.1.5",
112
- "@testing-library/react": "^14.3.1",
118
+ "@testing-library/react": "^16.0.0",
113
119
  "@testing-library/user-event": "^14.5.1",
114
- "@types/draft-js": "^0.11.3",
115
120
  "@types/history": "^4.7.3",
116
121
  "@types/jest": "^29.5.11",
117
122
  "@types/lodash.debounce": "^4.0.6",
118
123
  "@types/lodash.throttle": "^4.1.6",
119
124
  "@types/react": "^18.2.42",
120
125
  "@types/react-beautiful-dnd": "^13.0.0",
126
+ "@types/react-dom": "^18.3.0",
121
127
  "@types/react-redux": "^7.1.32",
122
128
  "@types/react-router-dom": "^5.1.3",
123
- "@typescript-eslint/eslint-plugin": "^7.7.0",
124
- "@typescript-eslint/parser": "^7.7.0",
129
+ "@typescript-eslint/eslint-plugin": "^7.12.0",
130
+ "@typescript-eslint/parser": "^7.12.0",
125
131
  "babel-jest": "^29.2.0",
126
132
  "babel-loader": "^9.0.0",
127
133
  "babel-plugin-external-helpers": "^6.22.0",
128
134
  "babel-runtime": "^6.26.0",
129
135
  "chalk": "^5.3.0",
130
136
  "clsx": "^2.0.0",
131
- "commitlint": "^19.2.2",
132
- "conventional-changelog-cli": "^4.1.0",
137
+ "commitlint": "^19.3.0",
138
+ "connected-react-router": "^6.9.3",
139
+ "conventional-changelog-cli": "^5.0.0",
133
140
  "cross-env": "^7.0.3",
134
- "draft-js-export-html": "^1.4.1",
135
- "draft-js-import-html": "^1.4.1",
136
141
  "eslint": "^8.57.0",
137
142
  "eslint-plugin-import": "^2.23.4",
138
- "eslint-plugin-jest-dom": "^5.2.0",
143
+ "eslint-plugin-jest-dom": "^5.4.0",
139
144
  "eslint-plugin-react": "^7.24.0",
140
145
  "eslint-plugin-react-hooks": "^4.2.0",
141
146
  "eslint-plugin-storybook": "^0.8.0",
142
147
  "eslint-plugin-testing-library": "^6.2.0",
148
+ "history": "^4.7.2",
143
149
  "husky": "^9.0.11",
144
150
  "jest": "^29.7.0",
145
151
  "jest-environment-jsdom": "^29.7.0",
@@ -151,14 +157,16 @@
151
157
  "react-beautiful-dnd": "^13.1.1",
152
158
  "react-dom": "^18.0.2",
153
159
  "react-redux": "^9.0.2",
154
- "react-router-dom": "^6.23.1",
160
+ "react-router": "^5.3.4",
161
+ "react-router-dom": "^5.3.4",
162
+ "react-router-redux": "^4.0.8",
155
163
  "react-scripts": "^5.0.1",
156
164
  "rollup": "^4.6.1",
157
165
  "rollup-plugin-peer-deps-external": "^2.2.4",
158
166
  "rollup-plugin-postcss": "^4.0.2",
159
167
  "seamless-immutable": "^7.1.4",
160
- "semantic-release": "^23.0.8",
161
- "storybook": "^8.0.8",
168
+ "semantic-release": "^24.0.0",
169
+ "storybook": "^8.1.6",
162
170
  "ts-jest": "^29.1.1",
163
171
  "ts-keycode-enum": "^1.0.6",
164
172
  "tslib": "^2.2.0",
@@ -175,17 +183,23 @@
175
183
  "dependencies": {
176
184
  "@emotion/react": "^11.11.0",
177
185
  "@emotion/styled": "^11.11.0",
186
+ "@lexical/react": "^0.13.1",
178
187
  "@mui/icons-material": "^5.14.19",
179
188
  "@mui/material": "^5.14.20",
180
- "@mui/x-date-pickers": "^7.2.0",
189
+ "@mui/x-date-pickers": "^7.6.1",
181
190
  "dayjs": "^1.11.10",
182
- "draft-js": "^0.11.0"
191
+ "lexical": "^0.13.1"
183
192
  },
184
193
  "overrides": {
185
194
  "fork-ts-checker-webpack-plugin": "^6.5.3",
186
195
  "react-scripts": {
187
196
  "typescript": "^5.3.3"
188
197
  },
198
+ "connected-react-router": {
199
+ "react": "^18.0.0",
200
+ "react-redux": "^9.0.4",
201
+ "redux": "^5.0.0"
202
+ },
189
203
  "react-beautiful-dnd": {
190
204
  "redux": "^5.0.0"
191
205
  },
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ToolbarPropperties } from '.';
3
- type Component = React.FunctionComponent<ToolbarPropperties>;
4
- export declare const FloatingToolbar: Component;
5
- export default FloatingToolbar;
@@ -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,9 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { DraftDecorator } from 'draft-js';
3
- interface Properties {
4
- html?: string;
5
- decorators?: DraftDecorator[];
6
- children: ReactNode;
7
- }
8
- declare const Provider: React.FC<Properties>;
9
- export default Provider;
@@ -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
- };