@useinsider/guido 1.0.3-beta.61ee748 → 1.0.3-beta.63153d1
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/dist/composables/useActionsApi.js +32 -23
- package/dist/composables/useStripo.js +44 -39
- package/dist/extensions/Blocks/Checkbox/control.js +15 -14
- package/dist/extensions/Blocks/Checkbox/template.js +14 -9
- package/dist/extensions/Blocks/RadioButton/control.js +18 -17
- package/dist/extensions/Blocks/RadioButton/template.js +18 -9
- package/dist/src/composables/useActionsApi.d.ts +1 -0
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useToaster as
|
|
1
|
+
import { useToaster as w } from "./useToaster.js";
|
|
2
2
|
const A = () => {
|
|
3
|
-
const { handleError: l } =
|
|
3
|
+
const { handleError: l } = w(), s = (e = {}) => new Promise((t, a) => {
|
|
4
4
|
const i = { ...{
|
|
5
5
|
minimize: !0,
|
|
6
6
|
utmEntity: {
|
|
@@ -20,13 +20,13 @@ const A = () => {
|
|
|
20
20
|
forceAmp: !1,
|
|
21
21
|
resetDataSavedFlag: !1,
|
|
22
22
|
disableLineHeightsReplace: !0
|
|
23
|
-
}, ...
|
|
24
|
-
callback: (
|
|
25
|
-
|
|
26
|
-
html:
|
|
27
|
-
ampHtml:
|
|
28
|
-
ampErrors:
|
|
29
|
-
displayConditions:
|
|
23
|
+
}, ...e }, m = {
|
|
24
|
+
callback: (n, p, c, d, u) => {
|
|
25
|
+
n ? a(n) : t({
|
|
26
|
+
html: p,
|
|
27
|
+
ampHtml: c,
|
|
28
|
+
ampErrors: d,
|
|
29
|
+
displayConditions: u
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
32
|
...i
|
|
@@ -34,44 +34,53 @@ const A = () => {
|
|
|
34
34
|
window.StripoEditorApi.actionsApi.compileEmail(m);
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
|
-
getCompiledEmail:
|
|
38
|
-
getTemplateData: () => new Promise((
|
|
39
|
-
const
|
|
37
|
+
getCompiledEmail: s,
|
|
38
|
+
getTemplateData: () => new Promise((e) => {
|
|
39
|
+
const t = ({ html: a, css: o, width: i, height: r, utmParams: m, syncModulesIds: n }) => e({
|
|
40
40
|
html: a,
|
|
41
41
|
css: o,
|
|
42
42
|
width: i,
|
|
43
43
|
height: r,
|
|
44
44
|
utmParams: m,
|
|
45
|
-
syncModulesIds:
|
|
45
|
+
syncModulesIds: n
|
|
46
46
|
});
|
|
47
|
-
window.StripoEditorApi.actionsApi.getTemplateData(
|
|
47
|
+
window.StripoEditorApi.actionsApi.getTemplateData(t);
|
|
48
48
|
}),
|
|
49
|
-
activateCustomViewStyles: (
|
|
50
|
-
window.StripoEditorApi.actionsApi.activateCustomViewStyles(
|
|
49
|
+
activateCustomViewStyles: (e = !0) => {
|
|
50
|
+
window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
|
|
51
51
|
},
|
|
52
|
-
getPreviewData: async (
|
|
52
|
+
getPreviewData: async (e) => {
|
|
53
53
|
try {
|
|
54
54
|
const {
|
|
55
|
-
html:
|
|
55
|
+
html: t,
|
|
56
56
|
displayConditions: a,
|
|
57
57
|
ampHtml: o = "",
|
|
58
58
|
ampErrors: i = []
|
|
59
|
-
} = await
|
|
59
|
+
} = await s({ minimize: !1, resetDataSavedFlag: !1, ...e });
|
|
60
60
|
return {
|
|
61
|
-
html:
|
|
61
|
+
html: t,
|
|
62
62
|
ampHtml: o,
|
|
63
63
|
ampErrors: i,
|
|
64
64
|
displayConditions: a
|
|
65
65
|
};
|
|
66
|
-
} catch (
|
|
67
|
-
return l(
|
|
66
|
+
} catch (t) {
|
|
67
|
+
return l(t, "Error loading preview"), {
|
|
68
68
|
html: "",
|
|
69
69
|
ampHtml: "",
|
|
70
70
|
ampErrors: [],
|
|
71
71
|
displayConditions: []
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
},
|
|
75
|
+
updateTimerInClonedTemplate: () => new Promise((e) => {
|
|
76
|
+
try {
|
|
77
|
+
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((t, a) => {
|
|
78
|
+
t ? (l(t, "Failed to update timer in cloned template"), e(null)) : e(a || null);
|
|
79
|
+
});
|
|
80
|
+
} catch (t) {
|
|
81
|
+
l(t, "Failed to call updateTimerInClonedTemplate"), e(null);
|
|
82
|
+
}
|
|
83
|
+
})
|
|
75
84
|
};
|
|
76
85
|
};
|
|
77
86
|
export {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useStripoEventHandler as
|
|
6
|
-
import { useToaster as
|
|
7
|
-
import { displayConditions as
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
import
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
import { dynamicContentToMergeTags as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { config: u } =
|
|
15
|
-
var
|
|
16
|
-
const t =
|
|
1
|
+
import { useActionsApi as k } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as V } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as _ } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as A } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as B } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as F } from "./useToaster.js";
|
|
7
|
+
import { displayConditions as I } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as v } from "../services/stripoApi.js";
|
|
9
|
+
import M from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as U } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as D } from "../utils/genericUtil.js";
|
|
12
|
+
import P from "../package.json.js";
|
|
13
|
+
const K = (c) => {
|
|
14
|
+
const { config: u } = _(), { handleError: p } = F(), { getToken: y, getCustomFonts: S } = v(), { handleEvent: C } = B(), { getStripoBlocksConfig: E } = V(), w = async (i, r = []) => {
|
|
15
|
+
var f, g;
|
|
16
|
+
const t = U(), { html: s, css: m, forceRecreate: a } = i, { baseBlocks: e, extensions: d } = await E();
|
|
17
17
|
window.UIEditor.initEditor(
|
|
18
18
|
document.querySelector("#guido-editor"),
|
|
19
19
|
{
|
|
20
|
-
metadata:
|
|
21
|
-
html:
|
|
22
|
-
css:
|
|
20
|
+
metadata: c,
|
|
21
|
+
html: s,
|
|
22
|
+
css: m,
|
|
23
23
|
forceRecreate: a,
|
|
24
24
|
locale: "en",
|
|
25
25
|
undoButtonSelector: "#guido__undo-button",
|
|
@@ -30,12 +30,16 @@ const N = (d) => {
|
|
|
30
30
|
customAppearanceMergetags: !0,
|
|
31
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
-
conditionsEnabled: ((
|
|
33
|
+
customViewStyles: M,
|
|
34
|
+
conditionsEnabled: ((f = u.features) == null ? void 0 : f.displayConditions) ?? !0,
|
|
35
35
|
customConditionsEnabled: ((g = u.features) == null ? void 0 : g.displayConditions) ?? !0,
|
|
36
|
-
conditionCategories:
|
|
36
|
+
conditionCategories: I,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
|
-
messageSettingsEnabled: !
|
|
38
|
+
messageSettingsEnabled: !0,
|
|
39
|
+
displayGmailAnnotations: !0,
|
|
40
|
+
displayHiddenPreheader: !1,
|
|
41
|
+
displayTitle: !1,
|
|
42
|
+
displayUTM: !1,
|
|
39
43
|
selectElementAfterDrop: !0,
|
|
40
44
|
...e ? { baseBlocks: e } : {},
|
|
41
45
|
editorFonts: {
|
|
@@ -45,25 +49,26 @@ const N = (d) => {
|
|
|
45
49
|
},
|
|
46
50
|
mergeTags: [
|
|
47
51
|
{
|
|
48
|
-
entries:
|
|
52
|
+
entries: D(c.preselectedDynamicContentList)
|
|
49
53
|
}
|
|
50
54
|
],
|
|
51
55
|
async onTokenRefreshRequest(o) {
|
|
52
56
|
try {
|
|
53
|
-
const
|
|
54
|
-
o(
|
|
55
|
-
} catch (
|
|
56
|
-
|
|
57
|
+
const n = await y();
|
|
58
|
+
o(n);
|
|
59
|
+
} catch (n) {
|
|
60
|
+
p(n, "Failed to refresh token");
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
onTemplateLoaded() {
|
|
64
|
+
var o, n;
|
|
60
65
|
try {
|
|
61
|
-
const { importCss:
|
|
62
|
-
|
|
66
|
+
const { importCss: l } = A(), { activateCustomViewStyles: b, updateTimerInClonedTemplate: T } = k();
|
|
67
|
+
l(), b(), typeof ((n = (o = window.StripoEditorApi) == null ? void 0 : o.actionsApi) == null ? void 0 : n.updateTimerInClonedTemplate) == "function" && T(), c.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
63
68
|
t.hasChanges = !1;
|
|
64
69
|
}, 1e3);
|
|
65
|
-
} catch (
|
|
66
|
-
l
|
|
70
|
+
} catch (l) {
|
|
71
|
+
p(l, "Failed to load custom interface appearance");
|
|
67
72
|
}
|
|
68
73
|
},
|
|
69
74
|
onCodeEditorVisibilityChanged(o) {
|
|
@@ -84,16 +89,16 @@ const N = (d) => {
|
|
|
84
89
|
".in-on-board-wrapper",
|
|
85
90
|
".in-drawer__container"
|
|
86
91
|
],
|
|
87
|
-
extensions:
|
|
92
|
+
extensions: d
|
|
88
93
|
}
|
|
89
94
|
);
|
|
90
|
-
},
|
|
91
|
-
var
|
|
95
|
+
}, h = (i) => new Promise((r, t) => {
|
|
96
|
+
var d;
|
|
92
97
|
if (document.getElementById("UiEditorScript")) {
|
|
93
98
|
i(), r();
|
|
94
99
|
return;
|
|
95
100
|
}
|
|
96
|
-
const
|
|
101
|
+
const s = P.guido, a = `https://email-static.useinsider.com/guido/${(d = s == null ? void 0 : s.stripo) == null ? void 0 : d.version}/UIEditor.js`, e = document.createElement("script");
|
|
97
102
|
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
98
103
|
i(), r();
|
|
99
104
|
}, e.onerror = () => {
|
|
@@ -101,12 +106,12 @@ const N = (d) => {
|
|
|
101
106
|
}, document.body.appendChild(e);
|
|
102
107
|
});
|
|
103
108
|
return { initPlugin: async (i) => {
|
|
104
|
-
await
|
|
109
|
+
await h(async () => {
|
|
105
110
|
const r = await S();
|
|
106
|
-
await
|
|
111
|
+
await w(i, r);
|
|
107
112
|
});
|
|
108
113
|
} };
|
|
109
114
|
};
|
|
110
115
|
export {
|
|
111
|
-
|
|
116
|
+
K as useStripo
|
|
112
117
|
};
|
|
@@ -2,9 +2,9 @@ var d = Object.defineProperty;
|
|
|
2
2
|
var l = (r, n, e) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
|
|
3
3
|
var o = (r, n, e) => l(r, typeof n != "symbol" ? n + "" : n, e);
|
|
4
4
|
import { useHttp as L } from "../../../composables/useHttp.js";
|
|
5
|
-
import { DEFAULT_UNSUBSCRIBE_GROUP as
|
|
5
|
+
import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
|
|
6
6
|
import { Control as h, UIElementType as i, UEAttr as t, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
-
const m = "ui-elements-checkbox",
|
|
7
|
+
const m = "ui-elements-checkbox", u = "select", { get: C } = L();
|
|
8
8
|
class S extends h {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
@@ -16,15 +16,16 @@ class S extends h {
|
|
|
16
16
|
return m;
|
|
17
17
|
}
|
|
18
18
|
_setFormValues() {
|
|
19
|
-
if (this.currentNode && "getAttribute" in this.currentNode) {
|
|
19
|
+
if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
|
|
20
20
|
const e = this.currentNode.getAttribute("id");
|
|
21
21
|
if (e) {
|
|
22
|
-
const s = e ===
|
|
23
|
-
s && (this.selectedUnsubGroup = s
|
|
24
|
-
[a]: this.selectedUnsubGroup
|
|
25
|
-
}));
|
|
22
|
+
const s = e === c.sendGridId ? e : Number(e);
|
|
23
|
+
s && (this.selectedUnsubGroup = s);
|
|
26
24
|
}
|
|
27
25
|
}
|
|
26
|
+
this.api.updateValues({
|
|
27
|
+
[u]: this.selectedUnsubGroup
|
|
28
|
+
});
|
|
28
29
|
}
|
|
29
30
|
_getLabel(e, s = `${Math.random()}`) {
|
|
30
31
|
return `
|
|
@@ -54,7 +55,7 @@ class S extends h {
|
|
|
54
55
|
</${i.LABEL}>
|
|
55
56
|
|
|
56
57
|
<${i.SELECTPICKER}
|
|
57
|
-
${t.SELECTPICKER.name}="${
|
|
58
|
+
${t.SELECTPICKER.name}="${u}"
|
|
58
59
|
${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
59
60
|
${this._getSelect()}
|
|
60
61
|
</${i.SELECTPICKER}>
|
|
@@ -66,21 +67,21 @@ class S extends h {
|
|
|
66
67
|
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new p(`Updated text to ${e}`));
|
|
67
68
|
}
|
|
68
69
|
_listenToFormUpdates() {
|
|
69
|
-
this.api.onValueChanged(
|
|
70
|
+
this.api.onValueChanged(u, (e) => this._onSelectChange(e));
|
|
70
71
|
}
|
|
71
72
|
onTemplateNodeUpdated(e) {
|
|
72
|
-
this.currentNode = e;
|
|
73
|
+
this.currentNode = e, this._setFormValues();
|
|
73
74
|
}
|
|
74
75
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
75
76
|
async onRender() {
|
|
76
77
|
const e = await C(
|
|
77
78
|
"/unsubscribe-groups/unsubscribe-list"
|
|
78
|
-
), s = [
|
|
79
|
-
[t.SELECT_ITEM.text]:
|
|
80
|
-
[t.SELECT_ITEM.value]:
|
|
79
|
+
), s = [c, ...e.data], E = s.map((a) => ({
|
|
80
|
+
[t.SELECT_ITEM.text]: a.name,
|
|
81
|
+
[t.SELECT_ITEM.value]: a.sendGridId
|
|
81
82
|
}));
|
|
82
83
|
this.unsubList = s, this.api.setUIEAttribute(
|
|
83
|
-
|
|
84
|
+
u,
|
|
84
85
|
t.SELECTPICKER.items,
|
|
85
86
|
E
|
|
86
87
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
@@ -3,7 +3,7 @@ const e = {
|
|
|
3
3
|
TITLE: "Unsubscribe From All Email Lists",
|
|
4
4
|
DESCRIPTION: "You will still receive important transactional and billing-related emails."
|
|
5
5
|
}, l = `
|
|
6
|
-
<td align="left" class="checkbox-block-v2 esd-block-checkbox es-p20">
|
|
6
|
+
<td align="left" class="checkbox-block checkbox-block-v2 esd-block-checkbox es-p20">
|
|
7
7
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
8
8
|
<tbody>
|
|
9
9
|
<tr>
|
|
@@ -26,11 +26,16 @@ const e = {
|
|
|
26
26
|
</tbody>
|
|
27
27
|
</table>
|
|
28
28
|
</td>
|
|
29
|
-
`,
|
|
30
|
-
<td
|
|
31
|
-
align="left"
|
|
32
|
-
esd-extension-block-id="checkbox-block"
|
|
33
|
-
class="
|
|
29
|
+
`, o = `
|
|
30
|
+
<td
|
|
31
|
+
align="left"
|
|
32
|
+
esd-extension-block-id="checkbox-block"
|
|
33
|
+
class="
|
|
34
|
+
checkbox-block
|
|
35
|
+
checkbox-block-v2
|
|
36
|
+
esd-block-checkbox
|
|
37
|
+
esd-checkbox-block
|
|
38
|
+
esd-extension-block es-p20"
|
|
34
39
|
>
|
|
35
40
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
36
41
|
<tbody>
|
|
@@ -55,10 +60,10 @@ const e = {
|
|
|
55
60
|
</table>
|
|
56
61
|
</td>
|
|
57
62
|
`;
|
|
58
|
-
function
|
|
63
|
+
function a() {
|
|
59
64
|
return l.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`);
|
|
60
65
|
}
|
|
61
66
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
o as default,
|
|
68
|
+
a as getDefaultTemplate
|
|
64
69
|
};
|
|
@@ -2,10 +2,10 @@ var d = Object.defineProperty;
|
|
|
2
2
|
var l = (r, n, t) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
|
|
3
3
|
var o = (r, n, t) => l(r, typeof n != "symbol" ? n + "" : n, t);
|
|
4
4
|
import { useHttp as L } from "../../../composables/useHttp.js";
|
|
5
|
-
import { DEFAULT_UNSUBSCRIBE_GROUP as
|
|
5
|
+
import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
|
|
6
6
|
import { Control as p, UIElementType as i, UEAttr as e, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
-
const m = "ui-elements-radio-button",
|
|
8
|
-
class
|
|
7
|
+
const m = "ui-elements-radio-button", u = "select", { get: $ } = L();
|
|
8
|
+
class S extends p {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
o(this, "currentNode");
|
|
@@ -16,15 +16,16 @@ class _ extends p {
|
|
|
16
16
|
return m;
|
|
17
17
|
}
|
|
18
18
|
_setFormValues() {
|
|
19
|
-
if (this.currentNode && "getAttribute" in this.currentNode) {
|
|
19
|
+
if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
|
|
20
20
|
const t = this.currentNode.getAttribute("id");
|
|
21
21
|
if (t) {
|
|
22
|
-
const s = t ===
|
|
23
|
-
s && (this.selectedUnsubGroup = s
|
|
24
|
-
[a]: this.selectedUnsubGroup
|
|
25
|
-
}));
|
|
22
|
+
const s = t === c.sendGridId ? t : Number(t);
|
|
23
|
+
s && (this.selectedUnsubGroup = s);
|
|
26
24
|
}
|
|
27
25
|
}
|
|
26
|
+
this.api.updateValues({
|
|
27
|
+
[u]: this.selectedUnsubGroup
|
|
28
|
+
});
|
|
28
29
|
}
|
|
29
30
|
_getLabel(t, s = `${Math.random()}`) {
|
|
30
31
|
return `
|
|
@@ -54,7 +55,7 @@ class _ extends p {
|
|
|
54
55
|
</${i.LABEL}>
|
|
55
56
|
|
|
56
57
|
<${i.SELECTPICKER}
|
|
57
|
-
${e.SELECTPICKER.name}="${
|
|
58
|
+
${e.SELECTPICKER.name}="${u}"
|
|
58
59
|
${e.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
59
60
|
${this._getSelect()}
|
|
60
61
|
</${i.SELECTPICKER}>
|
|
@@ -66,27 +67,27 @@ class _ extends p {
|
|
|
66
67
|
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new h(`Updated text to ${t}`));
|
|
67
68
|
}
|
|
68
69
|
_listenToFormUpdates() {
|
|
69
|
-
this.api.onValueChanged(
|
|
70
|
+
this.api.onValueChanged(u, (t) => this._onSelectChange(t));
|
|
70
71
|
}
|
|
71
72
|
onTemplateNodeUpdated(t) {
|
|
72
|
-
this.currentNode = t;
|
|
73
|
+
this.currentNode = t, this._setFormValues();
|
|
73
74
|
}
|
|
74
75
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
75
76
|
async onRender() {
|
|
76
77
|
const t = await $(
|
|
77
78
|
"/unsubscribe-groups/unsubscribe-list"
|
|
78
|
-
), s = [
|
|
79
|
-
[e.SELECT_ITEM.text]:
|
|
80
|
-
[e.SELECT_ITEM.value]:
|
|
79
|
+
), s = [c, ...t.data], E = s.map((a) => ({
|
|
80
|
+
[e.SELECT_ITEM.text]: a.name,
|
|
81
|
+
[e.SELECT_ITEM.value]: a.sendGridId
|
|
81
82
|
}));
|
|
82
83
|
this.unsubList = s, this.api.setUIEAttribute(
|
|
83
|
-
|
|
84
|
+
u,
|
|
84
85
|
e.SELECTPICKER.items,
|
|
85
|
-
|
|
86
|
+
E
|
|
86
87
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
export {
|
|
90
91
|
m as CONTROL_BLOCK_ID,
|
|
91
|
-
|
|
92
|
+
S as RadioButtonControl
|
|
92
93
|
};
|
|
@@ -5,7 +5,7 @@ const e = {
|
|
|
5
5
|
YES: "Yes",
|
|
6
6
|
NO: "No"
|
|
7
7
|
}, d = `
|
|
8
|
-
<td align="left" class="radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
|
|
8
|
+
<td align="left" class="radio-button radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
|
|
9
9
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
10
10
|
<tbody>
|
|
11
11
|
<tr>
|
|
@@ -75,12 +75,21 @@ const e = {
|
|
|
75
75
|
</tbody>
|
|
76
76
|
</table>
|
|
77
77
|
</td>
|
|
78
|
-
`,
|
|
79
|
-
<td
|
|
80
|
-
align="left"
|
|
81
|
-
esd-extension-block-id="radio-button-block"
|
|
78
|
+
`, a = `
|
|
79
|
+
<td
|
|
80
|
+
align="left"
|
|
81
|
+
esd-extension-block-id="radio-button-block"
|
|
82
82
|
esd-handler-name="esd-extension-RadioButtonBlock"
|
|
83
|
-
class="
|
|
83
|
+
class="
|
|
84
|
+
radio-button
|
|
85
|
+
radio-button-v2
|
|
86
|
+
esd-block-ra
|
|
87
|
+
esd-radio-button-block
|
|
88
|
+
esd-extension-block
|
|
89
|
+
es-p10t
|
|
90
|
+
es-p10b
|
|
91
|
+
es-p30r
|
|
92
|
+
es-p30l"
|
|
84
93
|
>
|
|
85
94
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
86
95
|
<tbody>
|
|
@@ -140,10 +149,10 @@ const e = {
|
|
|
140
149
|
</table>
|
|
141
150
|
</td>
|
|
142
151
|
`;
|
|
143
|
-
function
|
|
152
|
+
function l() {
|
|
144
153
|
return d.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
|
|
145
154
|
}
|
|
146
155
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
a as default,
|
|
157
|
+
l as getDefaultTemplate
|
|
149
158
|
};
|
|
@@ -5,4 +5,5 @@ export declare const useActionsApi: () => {
|
|
|
5
5
|
getTemplateData: () => Promise<TemplateData>;
|
|
6
6
|
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
7
7
|
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
8
|
+
updateTimerInClonedTemplate: () => Promise<string | null>;
|
|
8
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td
|
|
1
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"checkbox-block\"\n class=\"\n checkbox-block\n checkbox-block-v2\n esd-block-checkbox\n esd-checkbox-block\n esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" style=\"vertical-align: top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
2
|
/**
|
|
3
3
|
* @returns The template for the default checkbox block
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td
|
|
1
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;>\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
2
|
/**
|
|
3
3
|
* @returns The template for the default checkbox block
|
|
4
4
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.63153d1",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@cspell/eslint-plugin": "8.17.5",
|
|
45
45
|
"@eslint/eslintrc": "3.3.0",
|
|
46
46
|
"@eslint/js": "8.57.1",
|
|
47
|
-
"@playwright/test": "1.
|
|
47
|
+
"@playwright/test": "1.57.0",
|
|
48
48
|
"@stylistic/eslint-plugin": "3.1.0",
|
|
49
49
|
"@stylistic/eslint-plugin-migrate": "3.1.0",
|
|
50
50
|
"@types/eslint": "8.56.12",
|