@livepreso/content-react 0.6.2 → 0.7.1
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/CHANGELOG.json +24 -0
- package/CHANGELOG.md +15 -1
- package/lib/components/CompanywideJSON.js +2 -2
- package/lib/hooks/use-editable-initial-state.js +4 -1
- package/lib/hooks/use-modes.js +33 -31
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livepreso/content-react",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.7.1",
|
|
6
|
+
"tag": "@livepreso/content-react_v0.7.1",
|
|
7
|
+
"date": "Thu, 03 Apr 2025 22:38:00 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "fix useEditableInitialState user template value retrieval"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.7.0",
|
|
18
|
+
"tag": "@livepreso/content-react_v0.7.0",
|
|
19
|
+
"date": "Thu, 06 Mar 2025 00:08:07 GMT",
|
|
20
|
+
"comments": {
|
|
21
|
+
"minor": [
|
|
22
|
+
{
|
|
23
|
+
"comment": "Add isEmptyPreview to useModes hook, move CWE JSON field to underneath slide"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
4
28
|
{
|
|
5
29
|
"version": "0.6.2",
|
|
6
30
|
"tag": "@livepreso/content-react_v0.6.2",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Change Log - @livepreso/content-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 03 Apr 2025 22:38:00 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.7.1
|
|
6
|
+
Thu, 03 Apr 2025 22:38:00 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- fix useEditableInitialState user template value retrieval
|
|
11
|
+
|
|
12
|
+
## 0.7.0
|
|
13
|
+
Thu, 06 Mar 2025 00:08:07 GMT
|
|
14
|
+
|
|
15
|
+
### Minor changes
|
|
16
|
+
|
|
17
|
+
- Add isEmptyPreview to useModes hook, move CWE JSON field to underneath slide
|
|
4
18
|
|
|
5
19
|
## 0.6.2
|
|
6
20
|
Tue, 25 Feb 2025 03:34:02 GMT
|
|
@@ -38,7 +38,10 @@ function getUserTemplateFieldKey(key) {
|
|
|
38
38
|
|
|
39
39
|
function getUserTemplateData(fieldKey) {
|
|
40
40
|
const userValues = Bridge.Context.getDict()._userTemplateCMSvals;
|
|
41
|
-
return
|
|
41
|
+
return (
|
|
42
|
+
Object.values(userValues || {})?.find?.((vals) => vals.key === fieldKey) ||
|
|
43
|
+
{}
|
|
44
|
+
);
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
/**
|
package/lib/hooks/use-modes.js
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
export function useModes() {
|
|
2
|
-
|
|
2
|
+
const bodyClasses = [...document.body.classList];
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const isMaster = bodyClasses.includes("master");
|
|
5
|
+
const isClient = bodyClasses.includes("client");
|
|
6
|
+
const isOnline = bodyClasses.includes("online");
|
|
7
|
+
const isScreenshot = bodyClasses.includes("screenshot");
|
|
8
|
+
const isReadOnly = bodyClasses.includes("preso-readonly");
|
|
9
|
+
const isThumbnailScreenshot = bodyClasses.includes("screenshot-thumbnail");
|
|
10
|
+
const isPdfScreenshot = bodyClasses.includes("screenshot-full");
|
|
11
|
+
const isShareOnline = bodyClasses.includes("share_online");
|
|
12
|
+
const isPreview = bodyClasses.includes("preview");
|
|
13
|
+
const isPresent = bodyClasses.includes("present");
|
|
14
|
+
const isReview = bodyClasses.includes("review");
|
|
15
|
+
const isPresomanager = bodyClasses.includes("edit-mode");
|
|
16
|
+
const isEmptyPreview = bodyClasses.includes("empty-preview");
|
|
17
|
+
const isRemote = isOnline && isClient && !isShareOnline;
|
|
18
|
+
const isCdk = typeof window.__cdk_version__ !== "undefined";
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
return {
|
|
21
|
+
isMaster,
|
|
22
|
+
isClient,
|
|
23
|
+
isOnline,
|
|
24
|
+
isRemote,
|
|
25
|
+
isScreenshot,
|
|
26
|
+
isReadOnly,
|
|
27
|
+
isShareOnline,
|
|
28
|
+
isThumbnailScreenshot,
|
|
29
|
+
isPdfScreenshot,
|
|
30
|
+
isPreview,
|
|
31
|
+
isPresent,
|
|
32
|
+
isReview,
|
|
33
|
+
isPresomanager,
|
|
34
|
+
isEmptyPreview,
|
|
35
|
+
isCdk,
|
|
36
|
+
};
|
|
35
37
|
}
|