@bbl-digital/snorre 2.2.81 → 2.2.83
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/bundle.js +5 -3
- package/esm/core/Editor/config.js +0 -1
- package/esm/core/Editor/index.js +6 -3
- package/esm/globals/validation/regularExpressions.js +1 -1
- package/lib/core/Editor/config.d.ts +0 -1
- package/lib/core/Editor/config.d.ts.map +1 -1
- package/lib/core/Editor/config.js +0 -1
- package/lib/core/Editor/index.d.ts +2 -0
- package/lib/core/Editor/index.d.ts.map +1 -1
- package/lib/core/Editor/index.js +6 -3
- package/lib/globals/validation/regularExpressions.js +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -31088,7 +31088,6 @@
|
|
31088
31088
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
31089
31089
|
});
|
31090
31090
|
|
31091
|
-
const TINYMCE_API_KEY = 'v1hbb9qthd0z2fr0keceoglnwbzhyjqwsj4q7n193ovikt8s';
|
31092
31091
|
const editorContentCss = `
|
31093
31092
|
body { font-family:Helvetica,Arial,sans-serif; font-size:16px; } p {margin: 0;} h1,h2,h3,h4,h5,h6 {margin-top: 0;margin-bottom: 0;}
|
31094
31093
|
`;
|
@@ -31099,6 +31098,7 @@
|
|
31099
31098
|
|
31100
31099
|
/** @jsxImportSource @emotion/react */
|
31101
31100
|
|
31101
|
+
// const TINYMCE_API_KEY = 'v1hbb9qthd0z2fr0keceoglnwbzhyjqwsj4q7n193ovikt8s'
|
31102
31102
|
const Editor = ({
|
31103
31103
|
initialValue,
|
31104
31104
|
type = 'basic',
|
@@ -31109,6 +31109,7 @@
|
|
31109
31109
|
invalidMessage,
|
31110
31110
|
allowImages,
|
31111
31111
|
pasteAsText,
|
31112
|
+
disableResize,
|
31112
31113
|
onChange,
|
31113
31114
|
onBlur
|
31114
31115
|
}) => {
|
@@ -31134,8 +31135,8 @@
|
|
31134
31135
|
className: "editor-wrapper",
|
31135
31136
|
children: jsxRuntime$1.jsx(tinymceReact.Editor, {
|
31136
31137
|
onBlur: onBlur,
|
31137
|
-
onInit: () => setLoaded(true)
|
31138
|
-
|
31138
|
+
onInit: () => setLoaded(true) // apiKey={TINYMCE_API_KEY}
|
31139
|
+
,
|
31139
31140
|
value: value,
|
31140
31141
|
onEditorChange: handleChange,
|
31141
31142
|
init: {
|
@@ -31145,6 +31146,7 @@
|
|
31145
31146
|
menubar: false,
|
31146
31147
|
branding: false,
|
31147
31148
|
elementpath: false,
|
31149
|
+
resize: !disableResize,
|
31148
31150
|
plugins,
|
31149
31151
|
toolbar,
|
31150
31152
|
content_style: editorContentCss,
|
package/esm/core/Editor/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { useState } from 'react';
|
3
3
|
import { Editor as TinyEditor } from '@tinymce/tinymce-react';
|
4
4
|
import { ErrorWrapper, Label, styles } from './styles';
|
5
|
-
import { basicToolbar, editorBlockFormats, editorContentCss, plugins, richToolbar
|
5
|
+
import { basicToolbar, editorBlockFormats, editorContentCss, plugins, richToolbar } from './config';
|
6
6
|
import Skeleton from '../Skeleton';
|
7
7
|
import Text from '../Text';
|
8
8
|
import IconErrorOutline from '../../icons/General/IconErrorOutline';
|
@@ -10,6 +10,7 @@ import { useTheme } from '@emotion/react';
|
|
10
10
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
11
11
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
12
12
|
|
13
|
+
// const TINYMCE_API_KEY = 'v1hbb9qthd0z2fr0keceoglnwbzhyjqwsj4q7n193ovikt8s'
|
13
14
|
const Editor = ({
|
14
15
|
initialValue,
|
15
16
|
type = 'basic',
|
@@ -20,6 +21,7 @@ const Editor = ({
|
|
20
21
|
invalidMessage,
|
21
22
|
allowImages,
|
22
23
|
pasteAsText,
|
24
|
+
disableResize,
|
23
25
|
onChange,
|
24
26
|
onBlur
|
25
27
|
}) => {
|
@@ -45,8 +47,8 @@ const Editor = ({
|
|
45
47
|
className: "editor-wrapper",
|
46
48
|
children: _jsx(TinyEditor, {
|
47
49
|
onBlur: onBlur,
|
48
|
-
onInit: () => setLoaded(true)
|
49
|
-
|
50
|
+
onInit: () => setLoaded(true) // apiKey={TINYMCE_API_KEY}
|
51
|
+
,
|
50
52
|
value: value,
|
51
53
|
onEditorChange: handleChange,
|
52
54
|
init: {
|
@@ -56,6 +58,7 @@ const Editor = ({
|
|
56
58
|
menubar: false,
|
57
59
|
branding: false,
|
58
60
|
elementpath: false,
|
61
|
+
resize: !disableResize,
|
59
62
|
plugins,
|
60
63
|
toolbar,
|
61
64
|
content_style: editorContentCss,
|
@@ -4,6 +4,6 @@ const regularExpressions = {
|
|
4
4
|
date: new RegExp(/^(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{4}|(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})|([01][0-9]|2[0-8])(0[0-9]|1[0-2])[0-9][0-9]|30(0[013-9]|1[0-2])[0-9][0-9]|31(0[13578]|1[02])[0-9][0-9]|29((0[013-9]|1[0-2])[0-9][0-9]|02([0246][048]|[13579][26]))|(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{2}$/),
|
5
5
|
email: new RegExp(/^[^<>()\[\]\\.,;:\s@"]+(?:\.[^<>()\[\]\\.,;:\s@"]+)*@(?:[a-zA-ZæÆøØåÅ0-9-]+\.)+[a-zA-Z]{2,}$/),
|
6
6
|
year: new RegExp(/^[12][0-9]{3}$/),
|
7
|
-
url: new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{
|
7
|
+
url: new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{2,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/)
|
8
8
|
};
|
9
9
|
export default regularExpressions;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
export declare const TINYMCE_API_KEY = "v1hbb9qthd0z2fr0keceoglnwbzhyjqwsj4q7n193ovikt8s";
|
2
1
|
export declare const editorContentCss = "\n body { font-family:Helvetica,Arial,sans-serif; font-size:16px; } p {margin: 0;} h1,h2,h3,h4,h5,h6 {margin-top: 0;margin-bottom: 0;}\n";
|
3
2
|
export declare const editorBlockFormats = "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;";
|
4
3
|
export declare const plugins = "autolink lists link image code print preview media paste";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,8IAE5B,CAAA;AAED,eAAO,MAAM,kBAAkB,+FAC+D,CAAA;AAE9F,eAAO,MAAM,OAAO,6DACwC,CAAA;AAE5D,eAAO,MAAM,WAAW,QAKN,CAAA;AAElB,eAAO,MAAM,YAAY,2DACiC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAepC,UAAU,MAAM;IACd,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sBAAsB;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3D;AAID,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,CAuFtB,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/lib/core/Editor/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { useState } from 'react';
|
3
3
|
import { Editor as TinyEditor } from '@tinymce/tinymce-react';
|
4
4
|
import { ErrorWrapper, Label, styles } from './styles';
|
5
|
-
import { basicToolbar, editorBlockFormats, editorContentCss, plugins, richToolbar
|
5
|
+
import { basicToolbar, editorBlockFormats, editorContentCss, plugins, richToolbar } from './config';
|
6
6
|
import Skeleton from '../Skeleton';
|
7
7
|
import Text from '../Text';
|
8
8
|
import IconErrorOutline from '../../icons/General/IconErrorOutline';
|
@@ -10,6 +10,7 @@ import { useTheme } from '@emotion/react';
|
|
10
10
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
11
11
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
12
12
|
|
13
|
+
// const TINYMCE_API_KEY = 'v1hbb9qthd0z2fr0keceoglnwbzhyjqwsj4q7n193ovikt8s'
|
13
14
|
const Editor = ({
|
14
15
|
initialValue,
|
15
16
|
type = 'basic',
|
@@ -20,6 +21,7 @@ const Editor = ({
|
|
20
21
|
invalidMessage,
|
21
22
|
allowImages,
|
22
23
|
pasteAsText,
|
24
|
+
disableResize,
|
23
25
|
onChange,
|
24
26
|
onBlur
|
25
27
|
}) => {
|
@@ -45,8 +47,8 @@ const Editor = ({
|
|
45
47
|
className: "editor-wrapper",
|
46
48
|
children: _jsx(TinyEditor, {
|
47
49
|
onBlur: onBlur,
|
48
|
-
onInit: () => setLoaded(true)
|
49
|
-
|
50
|
+
onInit: () => setLoaded(true) // apiKey={TINYMCE_API_KEY}
|
51
|
+
,
|
50
52
|
value: value,
|
51
53
|
onEditorChange: handleChange,
|
52
54
|
init: {
|
@@ -56,6 +58,7 @@ const Editor = ({
|
|
56
58
|
menubar: false,
|
57
59
|
branding: false,
|
58
60
|
elementpath: false,
|
61
|
+
resize: !disableResize,
|
59
62
|
plugins,
|
60
63
|
toolbar,
|
61
64
|
content_style: editorContentCss,
|
@@ -4,6 +4,6 @@ const regularExpressions = {
|
|
4
4
|
date: new RegExp(/^(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{4}|(0[1-9]|[1-2][0-9]|31(?!(?:0[2469]|11))|30(?!02))(0[1-9]|1[0-2])([12]\d{3})|([01][0-9]|2[0-8])(0[0-9]|1[0-2])[0-9][0-9]|30(0[013-9]|1[0-2])[0-9][0-9]|31(0[13578]|1[02])[0-9][0-9]|29((0[013-9]|1[0-2])[0-9][0-9]|02([0246][048]|[13579][26]))|(0[1-9]|[12][0-9]|3[01])[\.](0[1-9]|1[012])[\.]\d{2}$/),
|
5
5
|
email: new RegExp(/^[^<>()\[\]\\.,;:\s@"]+(?:\.[^<>()\[\]\\.,;:\s@"]+)*@(?:[a-zA-ZæÆøØåÅ0-9-]+\.)+[a-zA-Z]{2,}$/),
|
6
6
|
year: new RegExp(/^[12][0-9]{3}$/),
|
7
|
-
url: new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{
|
7
|
+
url: new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{2,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/)
|
8
8
|
};
|
9
9
|
export default regularExpressions;
|