@pushwoosh/dumb-components 1.0.8 → 1.0.10
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.
|
@@ -2,7 +2,18 @@ import { Liquid } from 'liquidjs';
|
|
|
2
2
|
import React, { useMemo, useState } from 'react';
|
|
3
3
|
import { replacePlaceholders } from './helpers';
|
|
4
4
|
import { IframeStyled } from './styles';
|
|
5
|
-
const createLiquidInstance = () =>
|
|
5
|
+
const createLiquidInstance = () => {
|
|
6
|
+
const liquidInstance = new Liquid();
|
|
7
|
+
liquidInstance.registerTag('email_content', {
|
|
8
|
+
parse: function (tagToken) {
|
|
9
|
+
this.content = tagToken.args;
|
|
10
|
+
},
|
|
11
|
+
render: function (_ctx, emitter) {
|
|
12
|
+
emitter.write(`{% email_content ${this.content} %}`);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return liquidInstance;
|
|
16
|
+
};
|
|
6
17
|
export function EmailTemplatePreview(props) {
|
|
7
18
|
const {
|
|
8
19
|
scale,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/dumb-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "React components to build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"npm": ">= 7"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@pushwoosh/frontend-builder-engine": "^1.0.
|
|
23
|
+
"@pushwoosh/frontend-builder-engine": "^1.0.16",
|
|
24
24
|
"@pushwoosh/kit-constants": "^1.6.7",
|
|
25
25
|
"@svgr/webpack": "^8.1.0",
|
|
26
26
|
"@types/lodash": "^4.17.13",
|
|
27
27
|
"@types/react": "^18.2.69",
|
|
28
28
|
"@types/react-dom": "^18.2.22",
|
|
29
|
+
"@types/react-router-dom": "^5.3.3",
|
|
29
30
|
"@types/react-transition-group": "^4.4.12",
|
|
30
31
|
"@types/styled-components": "^5.1.34",
|
|
31
|
-
"@types/react-router-dom": "^5.3.3",
|
|
32
32
|
"pre-commit": "^1.2.2",
|
|
33
33
|
"react": "^18.2.0",
|
|
34
34
|
"react-dom": "^18.2.0",
|