@webiny/app-website-builder 6.0.0-alpha.2 → 6.0.0-alpha.4
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/BaseEditor/defaultConfig/Toolbar/InsertElements/InlineSvg.js +1 -1
- package/BaseEditor/defaultConfig/Toolbar/InsertElements/InlineSvg.js.map +1 -1
- package/package.json +27 -27
- package/modules/redirects/configs/list/Browser/FolderFieldDecorator.d.ts +0 -7
- package/modules/redirects/configs/list/Browser/FolderFieldDecorator.js +0 -16
- package/modules/redirects/configs/list/Browser/FolderFieldDecorator.js.map +0 -1
|
@@ -11,7 +11,7 @@ export const InlineSvg = ({
|
|
|
11
11
|
if (className.length > 0) {
|
|
12
12
|
svgElement.documentElement.classList.add(...className.split(" "));
|
|
13
13
|
}
|
|
14
|
-
ref.current.
|
|
14
|
+
ref.current.innerHTML = svgElement.documentElement.outerHTML;
|
|
15
15
|
}
|
|
16
16
|
}, []);
|
|
17
17
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useRef","InlineSvg","src","className","ref","setSvg","svg","current","domParser","DOMParser","svgElement","parseFromString","length","documentElement","classList","add","split","outerHTML","startsWith","base64","atob","fetch","then","res","text","catch","console","error","createElement"],"sources":["InlineSvg.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from \"react\";\n\ninterface InlineSvgProps {\n src: string;\n className?: string;\n}\n\nexport const InlineSvg = ({ src, className = \"\" }: InlineSvgProps) => {\n const ref = useRef<HTMLObjectElement | null>(null);\n\n const setSvg = useCallback((svg: string) => {\n if (ref.current) {\n const domParser = new DOMParser();\n const svgElement = domParser.parseFromString(svg, \"image/svg+xml\");\n\n if (className.length > 0) {\n svgElement.documentElement.classList.add(...className.split(\" \"));\n }\n ref.current.
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useRef","InlineSvg","src","className","ref","setSvg","svg","current","domParser","DOMParser","svgElement","parseFromString","length","documentElement","classList","add","split","innerHTML","outerHTML","startsWith","base64","atob","fetch","then","res","text","catch","console","error","createElement"],"sources":["InlineSvg.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from \"react\";\n\ninterface InlineSvgProps {\n src: string;\n className?: string;\n}\n\nexport const InlineSvg = ({ src, className = \"\" }: InlineSvgProps) => {\n const ref = useRef<HTMLObjectElement | null>(null);\n\n const setSvg = useCallback((svg: string) => {\n if (ref.current) {\n const domParser = new DOMParser();\n const svgElement = domParser.parseFromString(svg, \"image/svg+xml\");\n\n if (className.length > 0) {\n svgElement.documentElement.classList.add(...className.split(\" \"));\n }\n ref.current.innerHTML = svgElement.documentElement.outerHTML;\n }\n }, []);\n\n useEffect(() => {\n if (src.startsWith(\"<svg\") && ref.current) {\n setSvg(src);\n return;\n }\n\n if (src.startsWith(\"data:image/svg+xml\")) {\n const base64 = src.split(\",\")[1];\n setSvg(atob(base64));\n return;\n }\n\n fetch(src)\n .then(res => res.text())\n .then(svg => setSvg(svg))\n .catch(console.error);\n }, [src]);\n\n return <div ref={ref} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAO7D,OAAO,MAAMC,SAAS,GAAGA,CAAC;EAAEC,GAAG;EAAEC,SAAS,GAAG;AAAmB,CAAC,KAAK;EAClE,MAAMC,GAAG,GAAGJ,MAAM,CAA2B,IAAI,CAAC;EAElD,MAAMK,MAAM,GAAGP,WAAW,CAAEQ,GAAW,IAAK;IACxC,IAAIF,GAAG,CAACG,OAAO,EAAE;MACb,MAAMC,SAAS,GAAG,IAAIC,SAAS,CAAC,CAAC;MACjC,MAAMC,UAAU,GAAGF,SAAS,CAACG,eAAe,CAACL,GAAG,EAAE,eAAe,CAAC;MAElE,IAAIH,SAAS,CAACS,MAAM,GAAG,CAAC,EAAE;QACtBF,UAAU,CAACG,eAAe,CAACC,SAAS,CAACC,GAAG,CAAC,GAAGZ,SAAS,CAACa,KAAK,CAAC,GAAG,CAAC,CAAC;MACrE;MACAZ,GAAG,CAACG,OAAO,CAACU,SAAS,GAAGP,UAAU,CAACG,eAAe,CAACK,SAAS;IAChE;EACJ,CAAC,EAAE,EAAE,CAAC;EAENnB,SAAS,CAAC,MAAM;IACZ,IAAIG,GAAG,CAACiB,UAAU,CAAC,MAAM,CAAC,IAAIf,GAAG,CAACG,OAAO,EAAE;MACvCF,MAAM,CAACH,GAAG,CAAC;MACX;IACJ;IAEA,IAAIA,GAAG,CAACiB,UAAU,CAAC,oBAAoB,CAAC,EAAE;MACtC,MAAMC,MAAM,GAAGlB,GAAG,CAACc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;MAChCX,MAAM,CAACgB,IAAI,CAACD,MAAM,CAAC,CAAC;MACpB;IACJ;IAEAE,KAAK,CAACpB,GAAG,CAAC,CACLqB,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACvBF,IAAI,CAACjB,GAAG,IAAID,MAAM,CAACC,GAAG,CAAC,CAAC,CACxBoB,KAAK,CAACC,OAAO,CAACC,KAAK,CAAC;EAC7B,CAAC,EAAE,CAAC1B,GAAG,CAAC,CAAC;EAET,oBAAOL,KAAA,CAAAgC,aAAA;IAAKzB,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC5B,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-website-builder",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
"@monaco-editor/react": "4.7.0",
|
|
17
17
|
"@svgr/webpack": "6.5.1",
|
|
18
18
|
"@types/react": "18.2.79",
|
|
19
|
-
"@webiny/admin-ui": "6.0.0-alpha.
|
|
20
|
-
"@webiny/app": "6.0.0-alpha.
|
|
21
|
-
"@webiny/app-aco": "6.0.0-alpha.
|
|
22
|
-
"@webiny/app-admin": "6.0.0-alpha.
|
|
23
|
-
"@webiny/app-headless-cms-common": "6.0.0-alpha.
|
|
24
|
-
"@webiny/app-i18n": "6.0.0-alpha.
|
|
25
|
-
"@webiny/app-security": "6.0.0-alpha.
|
|
26
|
-
"@webiny/app-tenancy": "6.0.0-alpha.
|
|
27
|
-
"@webiny/app-utils": "6.0.0-alpha.
|
|
28
|
-
"@webiny/error": "6.0.0-alpha.
|
|
29
|
-
"@webiny/form": "6.0.0-alpha.
|
|
30
|
-
"@webiny/icons": "6.0.0-alpha.
|
|
31
|
-
"@webiny/lexical-converter": "6.0.0-alpha.
|
|
32
|
-
"@webiny/lexical-editor": "6.0.0-alpha.
|
|
33
|
-
"@webiny/lexical-nodes": "6.0.0-alpha.
|
|
34
|
-
"@webiny/lexical-theme": "6.0.0-alpha.
|
|
35
|
-
"@webiny/react-composition": "6.0.0-alpha.
|
|
36
|
-
"@webiny/react-properties": "6.0.0-alpha.
|
|
37
|
-
"@webiny/react-router": "6.0.0-alpha.
|
|
38
|
-
"@webiny/ui": "6.0.0-alpha.
|
|
39
|
-
"@webiny/utils": "6.0.0-alpha.
|
|
40
|
-
"@webiny/validation": "6.0.0-alpha.
|
|
41
|
-
"@webiny/website-builder-sdk": "6.0.0-alpha.
|
|
19
|
+
"@webiny/admin-ui": "6.0.0-alpha.4",
|
|
20
|
+
"@webiny/app": "6.0.0-alpha.4",
|
|
21
|
+
"@webiny/app-aco": "6.0.0-alpha.4",
|
|
22
|
+
"@webiny/app-admin": "6.0.0-alpha.4",
|
|
23
|
+
"@webiny/app-headless-cms-common": "6.0.0-alpha.4",
|
|
24
|
+
"@webiny/app-i18n": "6.0.0-alpha.4",
|
|
25
|
+
"@webiny/app-security": "6.0.0-alpha.4",
|
|
26
|
+
"@webiny/app-tenancy": "6.0.0-alpha.4",
|
|
27
|
+
"@webiny/app-utils": "6.0.0-alpha.4",
|
|
28
|
+
"@webiny/error": "6.0.0-alpha.4",
|
|
29
|
+
"@webiny/form": "6.0.0-alpha.4",
|
|
30
|
+
"@webiny/icons": "6.0.0-alpha.4",
|
|
31
|
+
"@webiny/lexical-converter": "6.0.0-alpha.4",
|
|
32
|
+
"@webiny/lexical-editor": "6.0.0-alpha.4",
|
|
33
|
+
"@webiny/lexical-nodes": "6.0.0-alpha.4",
|
|
34
|
+
"@webiny/lexical-theme": "6.0.0-alpha.4",
|
|
35
|
+
"@webiny/react-composition": "6.0.0-alpha.4",
|
|
36
|
+
"@webiny/react-properties": "6.0.0-alpha.4",
|
|
37
|
+
"@webiny/react-router": "6.0.0-alpha.4",
|
|
38
|
+
"@webiny/ui": "6.0.0-alpha.4",
|
|
39
|
+
"@webiny/utils": "6.0.0-alpha.4",
|
|
40
|
+
"@webiny/validation": "6.0.0-alpha.4",
|
|
41
|
+
"@webiny/website-builder-sdk": "6.0.0-alpha.4",
|
|
42
42
|
"apollo-cache": "1.3.5",
|
|
43
43
|
"apollo-client": "2.6.10",
|
|
44
44
|
"apollo-link": "1.2.14",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@types/react-virtualized": "9.22.0",
|
|
75
75
|
"@types/resize-observer-browser": "0.1.7",
|
|
76
76
|
"@types/store": "2.0.2",
|
|
77
|
-
"@webiny/cli": "6.0.0-alpha.
|
|
78
|
-
"@webiny/project-utils": "6.0.0-alpha.
|
|
77
|
+
"@webiny/cli": "6.0.0-alpha.4",
|
|
78
|
+
"@webiny/project-utils": "6.0.0-alpha.4",
|
|
79
79
|
"execa": "5.1.1",
|
|
80
80
|
"rimraf": "6.0.1",
|
|
81
81
|
"typescript": "5.3.3"
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "eb196ccd2f32296e10f7add6dd7220d4e3abece4"
|
|
99
99
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import type { FieldElement } from "@webiny/app-headless-cms-common";
|
|
3
|
-
export type FieldProps = React.ComponentProps<typeof FieldElement>;
|
|
4
|
-
export type FolderFieldDecoratorProps = {
|
|
5
|
-
id?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const shouldDecorateFolderField: (decoratorProps: FolderFieldDecoratorProps, componentProps: FieldProps) => boolean;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useFoldersType } from "@webiny/app-aco";
|
|
2
|
-
export const shouldDecorateFolderField = (decoratorProps, componentProps) => {
|
|
3
|
-
const {
|
|
4
|
-
id
|
|
5
|
-
} = decoratorProps;
|
|
6
|
-
const type = useFoldersType();
|
|
7
|
-
if (type !== "FmFile") {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
if (id) {
|
|
11
|
-
return id === "*" ? true : id === componentProps.field.id;
|
|
12
|
-
}
|
|
13
|
-
return true;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=FolderFieldDecorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useFoldersType","shouldDecorateFolderField","decoratorProps","componentProps","id","type","field"],"sources":["FolderFieldDecorator.tsx"],"sourcesContent":["import type React from \"react\";\nimport type { FieldElement } from \"@webiny/app-headless-cms-common\";\nimport { useFoldersType } from \"@webiny/app-aco\";\n\nexport type FieldProps = React.ComponentProps<typeof FieldElement>;\n\nexport type FolderFieldDecoratorProps = {\n id?: string;\n};\n\nexport const shouldDecorateFolderField = (\n decoratorProps: FolderFieldDecoratorProps,\n componentProps: FieldProps\n) => {\n const { id } = decoratorProps;\n const type = useFoldersType();\n\n if (type !== \"FmFile\") {\n return false;\n }\n\n if (id) {\n return id === \"*\" ? true : id === componentProps.field.id;\n }\n\n return true;\n};\n"],"mappings":"AAEA,SAASA,cAAc,QAAQ,iBAAiB;AAQhD,OAAO,MAAMC,yBAAyB,GAAGA,CACrCC,cAAyC,EACzCC,cAA0B,KACzB;EACD,MAAM;IAAEC;EAAG,CAAC,GAAGF,cAAc;EAC7B,MAAMG,IAAI,GAAGL,cAAc,CAAC,CAAC;EAE7B,IAAIK,IAAI,KAAK,QAAQ,EAAE;IACnB,OAAO,KAAK;EAChB;EAEA,IAAID,EAAE,EAAE;IACJ,OAAOA,EAAE,KAAK,GAAG,GAAG,IAAI,GAAGA,EAAE,KAAKD,cAAc,CAACG,KAAK,CAACF,EAAE;EAC7D;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|