@pushwoosh/dumb-components 1.1.190 → 1.1.191
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/EmailTemplatePreview/EmailTemplatePreview.js +2 -0
- package/NativeRichMediaPreview/NativeRichMediaPreview.js +2 -0
- package/PushPreview/PushPreview.js +2 -0
- package/RichmediaPreview/RichmediaPreview.js +2 -0
- package/package.json +2 -2
- package/shared/lightIsland.d.ts +3 -0
- package/shared/lightIsland.js +4 -0
|
@@ -3,6 +3,7 @@ import { Liquid } from 'liquidjs';
|
|
|
3
3
|
import { useMemo, useState } from 'react';
|
|
4
4
|
import { replaceLocalization, replacePlaceholders } from './helpers';
|
|
5
5
|
import { IframeStyled } from './styles';
|
|
6
|
+
import { LIGHT_ISLAND_PROPS } from '../shared/lightIsland';
|
|
6
7
|
const createLiquidInstance = () => {
|
|
7
8
|
const liquidInstance = new Liquid();
|
|
8
9
|
const tags = ['email_content', 'connected_content'];
|
|
@@ -47,6 +48,7 @@ export function EmailTemplatePreview(props) {
|
|
|
47
48
|
}
|
|
48
49
|
}, [template, localization, values, liquidInstance]);
|
|
49
50
|
return _jsx(IframeStyled, {
|
|
51
|
+
...LIGHT_ISLAND_PROPS,
|
|
50
52
|
"$scale": scale,
|
|
51
53
|
"$width": width,
|
|
52
54
|
"$height": height,
|
|
@@ -11,6 +11,7 @@ import { parseNativeRichMediaConfig } from './parseNativeRichMediaConfig';
|
|
|
11
11
|
import { resolveLocalization } from './resolveLocalization';
|
|
12
12
|
import { BackdropLayer, ContentFlow, PreviewHost, ScaleViewport, ScrollLayer, SpinnerLayer } from './styles';
|
|
13
13
|
import { NativeRichMediaBannerView, NativeRichMediaCarouselView, NativeRichMediaFullscreenView, NativeRichMediaInvalidView, NativeRichMediaModalView, NativeRichMediaPipView, NativeRichMediaScratchcardView, NativeRichMediaSheetView, NativeRichMediaSpinwheelView, NativeRichMediaStoriesView, NativeRichMediaVideoView } from './views';
|
|
14
|
+
import { LIGHT_ISLAND_PROPS } from '../shared/lightIsland';
|
|
14
15
|
function dimsScreen(config) {
|
|
15
16
|
if (!config) {
|
|
16
17
|
return false;
|
|
@@ -200,6 +201,7 @@ export function NativeRichMediaPreview(props) {
|
|
|
200
201
|
}, [content, localization, language]);
|
|
201
202
|
const shouldDim = !isLoading && dimsScreen(config);
|
|
202
203
|
return _jsxs(PreviewHost, {
|
|
204
|
+
...LIGHT_ISLAND_PROPS,
|
|
203
205
|
width: width,
|
|
204
206
|
height: height,
|
|
205
207
|
"$withBackground": withBackground,
|
|
@@ -6,6 +6,7 @@ import { PREVIEW_ICON_URL } from './constants';
|
|
|
6
6
|
import { getLocalizedContent } from './helpers';
|
|
7
7
|
import { PushBox, PushIcon, PushTitle, PushDescription } from './styles';
|
|
8
8
|
import { RichMessageViewer } from '../RichMessageEditor';
|
|
9
|
+
import { LIGHT_ISLAND_PROPS } from '../shared/lightIsland';
|
|
9
10
|
/**
|
|
10
11
|
* Renders a realistic push-notification preview from a push preset, picking
|
|
11
12
|
* localized strings by `language`, with compact/extended/silent/missed-content modes.
|
|
@@ -39,6 +40,7 @@ export function PushPreview({
|
|
|
39
40
|
return _jsx(MissedContentPreview, {});
|
|
40
41
|
}
|
|
41
42
|
return _jsxs(PushBox, {
|
|
43
|
+
...LIGHT_ISLAND_PROPS,
|
|
42
44
|
view: view,
|
|
43
45
|
"$width": width,
|
|
44
46
|
"$loading": isLoading,
|
|
@@ -3,6 +3,7 @@ import { Color } from '@pushwoosh/kit-constants';
|
|
|
3
3
|
import { Spinner } from '../Spinner';
|
|
4
4
|
import { useRichmediaHtml } from './hooks';
|
|
5
5
|
import { RichMediaPreviewContainer, RichMediaPreviewIframe } from './styles';
|
|
6
|
+
import { LIGHT_ISLAND_PROPS } from '../shared/lightIsland';
|
|
6
7
|
/**
|
|
7
8
|
* Renders a rich-media (in-app) template in a fully isolated sandboxed iframe, resolving
|
|
8
9
|
* params and localization via {@link useRichmediaHtml}. Template scripts run in an opaque
|
|
@@ -32,6 +33,7 @@ export function RichmediaPreview(props) {
|
|
|
32
33
|
baseUrl
|
|
33
34
|
});
|
|
34
35
|
return _jsx(RichMediaPreviewContainer, {
|
|
36
|
+
...LIGHT_ISLAND_PROPS,
|
|
35
37
|
width: width,
|
|
36
38
|
height: height,
|
|
37
39
|
"$isLoading": isLoading,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/dumb-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.191",
|
|
4
4
|
"description": "React components to build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@codemirror/lang-liquid": "^6.2.2",
|
|
50
50
|
"@floating-ui/react-dom": "^2.1.2",
|
|
51
51
|
"@lezer/highlight": "^1.2.1",
|
|
52
|
-
"@pushwoosh/kit-constants": "^1.
|
|
52
|
+
"@pushwoosh/kit-constants": "^1.9.0",
|
|
53
53
|
"@pushwoosh/kit-helpers": "^4.11.0",
|
|
54
54
|
"@pushwoosh/kit-icons": "^2.1.16",
|
|
55
55
|
"@pushwoosh/kit-typography": "^1.7.5",
|