@gooddata/sdk-ui-kit 10.33.0-alpha.29 → 10.33.0-alpha.30
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentHeader.d.ts","sourceRoot":"","sources":["../../src/DocumentHeader/DocumentHeader.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DocumentHeader.d.ts","sourceRoot":"","sources":["../../src/DocumentHeader/DocumentHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2BlD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// (C) 2007-
|
|
2
|
-
import
|
|
3
|
-
import { Helmet } from "react-helmet";
|
|
1
|
+
// (C) 2007-2025 GoodData Corporation
|
|
2
|
+
import { useEffect } from "react";
|
|
4
3
|
import compact from "lodash/compact.js";
|
|
5
4
|
function getEffectiveTitle(pageTitle, brandTitle) {
|
|
6
5
|
return compact([pageTitle, brandTitle]).join(" - ");
|
|
@@ -8,12 +7,25 @@ function getEffectiveTitle(pageTitle, brandTitle) {
|
|
|
8
7
|
/**
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
|
-
const DocumentHeader = (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const DocumentHeader = ({ pageTitle = "", brandTitle = "", appleTouchIconUrl = "", faviconUrl = "", }) => {
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (!document)
|
|
13
|
+
return;
|
|
14
|
+
document.title = getEffectiveTitle(pageTitle, brandTitle);
|
|
15
|
+
const linkApple = (document.querySelector("link[rel='apple-touch-icon']") ||
|
|
16
|
+
document.createElement("link"));
|
|
17
|
+
linkApple.rel = "apple-touch-icon";
|
|
18
|
+
linkApple.type = "image/png";
|
|
19
|
+
linkApple.href = appleTouchIconUrl;
|
|
20
|
+
document.head.appendChild(linkApple);
|
|
21
|
+
const linkFavicon = (document.querySelector("link[rel~='icon']") ||
|
|
22
|
+
document.createElement("link"));
|
|
23
|
+
linkFavicon.rel = "shortcut icon";
|
|
24
|
+
linkFavicon.type = "image/x-icon";
|
|
25
|
+
linkFavicon.href = faviconUrl;
|
|
26
|
+
document.head.appendChild(linkFavicon);
|
|
27
|
+
}, [pageTitle, brandTitle, appleTouchIconUrl, faviconUrl]);
|
|
28
|
+
return null;
|
|
17
29
|
};
|
|
18
30
|
export default DocumentHeader;
|
|
19
31
|
//# sourceMappingURL=DocumentHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentHeader.js","sourceRoot":"","sources":["../../src/DocumentHeader/DocumentHeader.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"DocumentHeader.js","sourceRoot":"","sources":["../../src/DocumentHeader/DocumentHeader.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AAYxC,SAAS,iBAAiB,CAAC,SAAiB,EAAE,UAAkB;IAC5D,OAAO,OAAO,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,cAAc,GAAmC,CAAC,EACpD,SAAS,GAAG,EAAE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"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"react-content-loader": "^6.2.0",
|
|
54
54
|
"react-day-picker": "^8.7.1",
|
|
55
55
|
"react-fast-compare": "^3.2.0",
|
|
56
|
-
"react-helmet": "^6.1.0",
|
|
57
56
|
"react-intl": "6.8.9",
|
|
58
57
|
"react-loading-skeleton": "^3.4.0",
|
|
59
58
|
"react-markdown": "^9.0.1",
|
|
@@ -78,11 +77,11 @@
|
|
|
78
77
|
"@floating-ui/dom": "1.6.13",
|
|
79
78
|
"@floating-ui/react-dom": "2.1.2",
|
|
80
79
|
"@floating-ui/react": "~0.27.12",
|
|
81
|
-
"@gooddata/sdk-backend-spi": "10.33.0-alpha.
|
|
82
|
-
"@gooddata/sdk-
|
|
83
|
-
"@gooddata/sdk-
|
|
84
|
-
"@gooddata/sdk-ui-theme-provider": "10.33.0-alpha.
|
|
85
|
-
"@gooddata/util": "10.33.0-alpha.
|
|
80
|
+
"@gooddata/sdk-backend-spi": "10.33.0-alpha.30",
|
|
81
|
+
"@gooddata/sdk-ui": "10.33.0-alpha.30",
|
|
82
|
+
"@gooddata/sdk-model": "10.33.0-alpha.30",
|
|
83
|
+
"@gooddata/sdk-ui-theme-provider": "10.33.0-alpha.30",
|
|
84
|
+
"@gooddata/util": "10.33.0-alpha.30"
|
|
86
85
|
},
|
|
87
86
|
"peerDependencies": {
|
|
88
87
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -103,7 +102,6 @@
|
|
|
103
102
|
"@types/raf": "^3.4.0",
|
|
104
103
|
"@types/react": "18.3.23",
|
|
105
104
|
"@types/react-dom": "18.3.7",
|
|
106
|
-
"@types/react-helmet": "^6.1.4",
|
|
107
105
|
"@types/react-measure": "^2.0.8",
|
|
108
106
|
"@types/react-portal": "^4.0.7",
|
|
109
107
|
"@types/react-transition-group": "^4.4.4",
|
|
@@ -139,8 +137,8 @@
|
|
|
139
137
|
"typescript": "5.3.3",
|
|
140
138
|
"vitest": "3.0.8",
|
|
141
139
|
"vitest-dom": "0.1.1",
|
|
142
|
-
"@gooddata/reference-workspace": "10.33.0-alpha.
|
|
143
|
-
"@gooddata/sdk-backend-mockingbird": "10.33.0-alpha.
|
|
140
|
+
"@gooddata/reference-workspace": "10.33.0-alpha.30",
|
|
141
|
+
"@gooddata/sdk-backend-mockingbird": "10.33.0-alpha.30"
|
|
144
142
|
},
|
|
145
143
|
"scripts": {
|
|
146
144
|
"clean": "rm -rf ci dist esm coverage styles/css *.log tsconfig.tsbuildinfo",
|