@sitecore-content-sdk/react 1.1.0-canary.32 → 1.1.0-canary.33
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.
|
@@ -23,8 +23,14 @@ const EditingScripts = () => {
|
|
|
23
23
|
}
|
|
24
24
|
// In case of Design Library - render only the script for Design Library
|
|
25
25
|
if (mode.isDesignLibrary) {
|
|
26
|
-
// Add cache buster to the script URL
|
|
27
|
-
const
|
|
26
|
+
// Add cache buster to the script URL (format hh-dd-mm-yyyy, UTC)
|
|
27
|
+
const now = new Date();
|
|
28
|
+
const hour = String(now.getUTCHours()).padStart(2, '0');
|
|
29
|
+
const day = String(now.getUTCDate()).padStart(2, '0');
|
|
30
|
+
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
|
|
31
|
+
const year = String(now.getUTCFullYear());
|
|
32
|
+
const cacheTimestamp = `${hour}-${day}-${month}-${year}`;
|
|
33
|
+
const scriptUrl = `${(0, editing_2.getDesignLibraryScriptLink)((_a = api === null || api === void 0 ? void 0 : api.edge) === null || _a === void 0 ? void 0 : _a.edgeUrl)}?cb=${cacheTimestamp}`;
|
|
28
34
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
29
35
|
react_1.default.createElement("script", { src: scriptUrl, suppressHydrationWarning: true })));
|
|
30
36
|
}
|
|
@@ -17,8 +17,14 @@ export const EditingScripts = () => {
|
|
|
17
17
|
}
|
|
18
18
|
// In case of Design Library - render only the script for Design Library
|
|
19
19
|
if (mode.isDesignLibrary) {
|
|
20
|
-
// Add cache buster to the script URL
|
|
21
|
-
const
|
|
20
|
+
// Add cache buster to the script URL (format hh-dd-mm-yyyy, UTC)
|
|
21
|
+
const now = new Date();
|
|
22
|
+
const hour = String(now.getUTCHours()).padStart(2, '0');
|
|
23
|
+
const day = String(now.getUTCDate()).padStart(2, '0');
|
|
24
|
+
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
|
|
25
|
+
const year = String(now.getUTCFullYear());
|
|
26
|
+
const cacheTimestamp = `${hour}-${day}-${month}-${year}`;
|
|
27
|
+
const scriptUrl = `${getDesignLibraryScriptLink((_a = api === null || api === void 0 ? void 0 : api.edge) === null || _a === void 0 ? void 0 : _a.edgeUrl)}?cb=${cacheTimestamp}`;
|
|
22
28
|
return (React.createElement(React.Fragment, null,
|
|
23
29
|
React.createElement("script", { src: scriptUrl, suppressHydrationWarning: true })));
|
|
24
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/react",
|
|
3
|
-
"version": "1.1.0-canary.
|
|
3
|
+
"version": "1.1.0-canary.33",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"react-dom": "^19.1.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@sitecore-content-sdk/core": "1.1.0-canary.
|
|
75
|
+
"@sitecore-content-sdk/core": "1.1.0-canary.33",
|
|
76
76
|
"fast-deep-equal": "^3.1.3"
|
|
77
77
|
},
|
|
78
78
|
"description": "",
|
|
79
79
|
"types": "types/index.d.ts",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "233354c55e37eb4bd81fa52a64d29da947a596c3",
|
|
81
81
|
"files": [
|
|
82
82
|
"dist",
|
|
83
83
|
"types"
|