@useinsider/guido 1.0.3-beta.63e6005 → 1.0.3-beta.6541b5a
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/@types/generic.d.ts +0 -8
- package/dist/components/Guido.vue.d.ts +2 -2
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +64 -68
- package/dist/components/wrappers/WpDrawer.vue.d.ts +4 -6
- package/dist/components/wrappers/WpDrawer.vue.js +4 -6
- package/dist/composables/useStripo.js +13 -17
- package/dist/config/compiler/unsubscribeCompilerRules.js +19 -19
- package/dist/config/migrator/couponBlockMigrator.d.ts +1 -0
- package/dist/config/migrator/couponBlockMigrator.js +64 -0
- package/dist/config/migrator/index.d.ts +1 -1
- package/dist/config/migrator/index.js +7 -7
- package/dist/enums/defaults.js +3 -6
- package/dist/enums/unsubscribe.d.ts +0 -19
- package/dist/enums/unsubscribe.js +6 -39
- package/dist/extensions/Blocks/CouponBlock/block.d.ts +11 -0
- package/dist/extensions/Blocks/{Unsubscribe/template.js → CouponBlock/block.js} +30 -20
- package/dist/extensions/Blocks/{Unsubscribe/tagRegistry.js → CouponBlock/extension.js} +5 -8
- package/dist/extensions/Blocks/{Unsubscribe → CouponBlock}/settingsPanel.d.ts +1 -1
- package/dist/extensions/Blocks/{Unsubscribe → CouponBlock}/settingsPanel.js +17 -12
- package/dist/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/extensions/Blocks/CouponBlock/template.js +18 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +1 -2
- package/dist/static/assets/icons/coupon.svg.js +4 -0
- package/dist/stores/unsubscribe.d.ts +5 -183
- package/dist/stores/unsubscribe.js +6 -125
- package/package.json +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -108
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
- package/dist/config/migrator/unsubscribeMigrator.d.ts +0 -1
- package/dist/config/migrator/unsubscribeMigrator.js +0 -112
- package/dist/extensions/Blocks/Unsubscribe/block.d.ts +0 -31
- package/dist/extensions/Blocks/Unsubscribe/block.js +0 -144
- package/dist/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +0 -180
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -54
- package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -32
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
- package/dist/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
- package/dist/services/unsubscribeApi.d.ts +0 -4
- package/dist/services/unsubscribeApi.js +0 -16
- /package/dist/extensions/Blocks/{Unsubscribe → CouponBlock}/extension.d.ts +0 -0
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
var h = Object.defineProperty;
|
|
2
|
-
var d = (o, s, t) => s in o ? h(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
|
|
3
|
-
var u = (o, s, t) => d(o, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
-
import { useUnsubscribeStore as l } from "../../../stores/unsubscribe.js";
|
|
5
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
6
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
7
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
8
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
9
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
10
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
11
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
12
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
13
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
14
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
15
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
16
|
-
import { UEAttr as i } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js";
|
|
17
|
-
import { UIElementType as n } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
18
|
-
import { Control as T } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js";
|
|
19
|
-
import { DATA_ATTRIBUTES as p } from "./utils/constants.js";
|
|
20
|
-
import { parsePageList as _ } from "./utils/utils.js";
|
|
21
|
-
const g = "ui-elements-unsubscribe", r = {
|
|
22
|
-
SELECT_BUTTON: "selectTemplateButton",
|
|
23
|
-
PREV_BUTTON: "prevButton",
|
|
24
|
-
NEXT_BUTTON: "nextButton",
|
|
25
|
-
COUNTER_TEXT: "counterText",
|
|
26
|
-
PREVIEW_IMAGE: "previewImage"
|
|
27
|
-
};
|
|
28
|
-
class R extends T {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
u(this, "currentPreviewIndex", 0);
|
|
32
|
-
u(this, "currentNode");
|
|
33
|
-
u(this, "currentPages");
|
|
34
|
-
u(this, "valueChangeHandlers", []);
|
|
35
|
-
u(this, "lastParsedAttribute");
|
|
36
|
-
}
|
|
37
|
-
getId() {
|
|
38
|
-
return g;
|
|
39
|
-
}
|
|
40
|
-
getTemplate() {
|
|
41
|
-
return `
|
|
42
|
-
<div class="unsubscribe-controls-container container stretch widest-spacing">
|
|
43
|
-
${this._getPreview()}
|
|
44
|
-
${this._getButton()}
|
|
45
|
-
</div>
|
|
46
|
-
`;
|
|
47
|
-
}
|
|
48
|
-
onTemplateNodeUpdated(t) {
|
|
49
|
-
if (this.currentNode = t, "getAttribute" in this.currentNode) {
|
|
50
|
-
const e = this.currentNode.getAttribute(p.PAGE_LIST);
|
|
51
|
-
e && (e !== this.lastParsedAttribute && (this.currentPages = _(e), this.lastParsedAttribute = e, this.currentPreviewIndex = 0), this._updatePreview(), this._updateCounter());
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
onRender() {
|
|
55
|
-
this._listenToFormUpdates(), this._updateCounter();
|
|
56
|
-
}
|
|
57
|
-
onDestroy() {
|
|
58
|
-
this.valueChangeHandlers.forEach((t) => {
|
|
59
|
-
typeof t == "function" && t();
|
|
60
|
-
}), this.valueChangeHandlers = [], this.currentNode = void 0, this.currentPages = void 0, this.currentPreviewIndex = 0, this.lastParsedAttribute = void 0;
|
|
61
|
-
}
|
|
62
|
-
get totalTemplates() {
|
|
63
|
-
var t;
|
|
64
|
-
return ((t = this.currentPages) == null ? void 0 : t.length) ?? 0;
|
|
65
|
-
}
|
|
66
|
-
_listenToFormUpdates() {
|
|
67
|
-
this.valueChangeHandlers.push(
|
|
68
|
-
this.api.onValueChanged(r.SELECT_BUTTON, () => this._onButtonClick())
|
|
69
|
-
), this.valueChangeHandlers.push(
|
|
70
|
-
this.api.onValueChanged(r.PREV_BUTTON, () => this._onPrevClick())
|
|
71
|
-
), this.valueChangeHandlers.push(
|
|
72
|
-
this.api.onValueChanged(r.NEXT_BUTTON, () => this._onNextClick())
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
_onButtonClick() {
|
|
76
|
-
try {
|
|
77
|
-
const t = l();
|
|
78
|
-
t.activeType = t.getSelectedCollection[this.currentPreviewIndex], t.pageSelectionUpdateStatus = !0, t.pageSelectionDrawerStatus = !0;
|
|
79
|
-
} catch (t) {
|
|
80
|
-
console.error("[UnsubscribeControl] Failed to open drawer:", t);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
_onPrevClick() {
|
|
84
|
-
this.currentPreviewIndex > 0 && (this.currentPreviewIndex--, this._updatePreview(), this._updateCounter());
|
|
85
|
-
}
|
|
86
|
-
_onNextClick() {
|
|
87
|
-
this.currentPreviewIndex < this.totalTemplates - 1 && (this.currentPreviewIndex++, this._updatePreview(), this._updateCounter());
|
|
88
|
-
}
|
|
89
|
-
_updatePreview() {
|
|
90
|
-
var t;
|
|
91
|
-
if ((t = this.currentPages) != null && t.length)
|
|
92
|
-
try {
|
|
93
|
-
const e = this.currentPages[this.currentPreviewIndex], a = l().getThumbnailByTemplateId(e);
|
|
94
|
-
if (!a) {
|
|
95
|
-
console.warn("[UnsubscribeControl] No thumbnail found for page:", e);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
this.api.updateValues({
|
|
99
|
-
[r.PREVIEW_IMAGE]: a
|
|
100
|
-
});
|
|
101
|
-
} catch (e) {
|
|
102
|
-
console.error("[UnsubscribeControl] Failed to update preview:", e);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
_updateCounter() {
|
|
106
|
-
const t = this.currentPreviewIndex + 1, e = this.totalTemplates, c = this.currentPreviewIndex === 0, a = this.currentPreviewIndex >= e - 1;
|
|
107
|
-
this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled, c), this.api.setUIEAttribute(r.NEXT_BUTTON, i.BUTTON.disabled, a), this.api.setUIEAttribute(
|
|
108
|
-
r.COUNTER_TEXT,
|
|
109
|
-
i.LABEL.text,
|
|
110
|
-
`${this.api.translate("Showing")} ${t} ${this.api.translate("of")} ${e}`
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
_getPreview() {
|
|
114
|
-
return `
|
|
115
|
-
<div class="unsubscribe-preview-container">
|
|
116
|
-
<div class="unsubscribe-preview-header">
|
|
117
|
-
<div class="unsubscribe-preview-title">${this.api.translate("Unsubscribe Template")}</div>
|
|
118
|
-
<div class="unsubscribe-preview-controls">
|
|
119
|
-
${this._getPrevButton()}
|
|
120
|
-
${this._getCounterText()}
|
|
121
|
-
${this._getNextButton()}
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
<unsubscribe-preview name="${r.PREVIEW_IMAGE}"></unsubscribe-preview>
|
|
125
|
-
</div>
|
|
126
|
-
`;
|
|
127
|
-
}
|
|
128
|
-
_getButton() {
|
|
129
|
-
return `
|
|
130
|
-
<${n.BUTTON}
|
|
131
|
-
id="${r.SELECT_BUTTON}"
|
|
132
|
-
class="primary full-width"
|
|
133
|
-
${i.BUTTON.name}="${r.SELECT_BUTTON}"
|
|
134
|
-
${i.BUTTON.caption}="${this.api.translate("Select Template")}"
|
|
135
|
-
>
|
|
136
|
-
</${n.BUTTON}>
|
|
137
|
-
`;
|
|
138
|
-
}
|
|
139
|
-
_getLabel(t, e) {
|
|
140
|
-
return `
|
|
141
|
-
<${n.LABEL}
|
|
142
|
-
${i.LABEL.text}="${t}"
|
|
143
|
-
${i.LABEL.name}="${e}"
|
|
144
|
-
>
|
|
145
|
-
</${n.LABEL}>
|
|
146
|
-
`;
|
|
147
|
-
}
|
|
148
|
-
_getIconButton(t, e, c) {
|
|
149
|
-
const a = c ? `${i.BUTTON.disabled}="true"` : "";
|
|
150
|
-
return `
|
|
151
|
-
<${n.BUTTON}
|
|
152
|
-
id="${t}"
|
|
153
|
-
class="flat-inline flat-white"
|
|
154
|
-
${i.BUTTON.name}="${t}"
|
|
155
|
-
${a}
|
|
156
|
-
>
|
|
157
|
-
<${n.ICON}
|
|
158
|
-
src="${e}"
|
|
159
|
-
class="icon-button"
|
|
160
|
-
></${n.ICON}>
|
|
161
|
-
</${n.BUTTON}>
|
|
162
|
-
`;
|
|
163
|
-
}
|
|
164
|
-
_getPrevButton() {
|
|
165
|
-
const t = this.currentPreviewIndex === 0;
|
|
166
|
-
return this._getIconButton(r.PREV_BUTTON, "arrow-back", t);
|
|
167
|
-
}
|
|
168
|
-
_getNextButton() {
|
|
169
|
-
const t = this.currentPreviewIndex >= this.totalTemplates - 1;
|
|
170
|
-
return this._getIconButton(r.NEXT_BUTTON, "arrow-right", t);
|
|
171
|
-
}
|
|
172
|
-
_getCounterText() {
|
|
173
|
-
const e = `Showing ${this.currentPreviewIndex + 1} of ${this.totalTemplates}`;
|
|
174
|
-
return this._getLabel(e, r.COUNTER_TEXT);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
export {
|
|
178
|
-
g as UNSUBSCRIBE_CONTROL_ID,
|
|
179
|
-
R as UnsubscribeControl
|
|
180
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UIElement } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare const PREVIEW_UI_ELEMENT_ID = "unsubscribe-preview";
|
|
3
|
-
export declare class PreviewUIElement extends UIElement {
|
|
4
|
-
private imgElement?;
|
|
5
|
-
getId(): string;
|
|
6
|
-
getTemplate(): string;
|
|
7
|
-
onRender(container: HTMLElement): void;
|
|
8
|
-
setValue(value: string): void;
|
|
9
|
-
getValue(): string;
|
|
10
|
-
onDestroy(): void;
|
|
11
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var s = (i, t, e) => t in i ? m(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
-
var r = (i, t, e) => s(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
5
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
6
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
7
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
8
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
9
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
10
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
11
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
12
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
13
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
14
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
15
|
-
import "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
16
|
-
import { UIElement as n } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js";
|
|
17
|
-
const o = "unsubscribe-preview", p = "img", E = "Unsubscribe page preview";
|
|
18
|
-
class A extends n {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
r(this, "imgElement");
|
|
22
|
-
}
|
|
23
|
-
getId() {
|
|
24
|
-
return o;
|
|
25
|
-
}
|
|
26
|
-
getTemplate() {
|
|
27
|
-
return `
|
|
28
|
-
<div class="unsubscribe-preview-image-container">
|
|
29
|
-
<img
|
|
30
|
-
src=""
|
|
31
|
-
alt="${E}"
|
|
32
|
-
class="unsubscribe-preview-image"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
onRender(e) {
|
|
38
|
-
this.imgElement = e.querySelector(p);
|
|
39
|
-
}
|
|
40
|
-
setValue(e) {
|
|
41
|
-
this.imgElement && (this.imgElement.src = e);
|
|
42
|
-
}
|
|
43
|
-
getValue() {
|
|
44
|
-
var e;
|
|
45
|
-
return ((e = this.imgElement) == null ? void 0 : e.src) ?? "";
|
|
46
|
-
}
|
|
47
|
-
onDestroy() {
|
|
48
|
-
this.imgElement = void 0;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
o as PREVIEW_UI_ELEMENT_ID,
|
|
53
|
-
A as PreviewUIElement
|
|
54
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
2
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
3
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
4
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
5
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
6
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
7
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
8
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
9
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
10
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
11
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
13
|
-
import { ExtensionBuilder as i } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js";
|
|
14
|
-
import { UnsubscribeBlock as t } from "./block.js";
|
|
15
|
-
import { UnsubscribeControl as e } from "./control.js";
|
|
16
|
-
import { PreviewUIElement as o } from "./elements/preview.js";
|
|
17
|
-
import { SettingsPanel as r } from "./settingsPanel.js";
|
|
18
|
-
import m from "./styles.css.js";
|
|
19
|
-
import { UnsubscribeTagRegistry as s } from "./tagRegistry.js";
|
|
20
|
-
const x = new i().addBlock(t).withSettingsPanelRegistry(r).addControl(e).addUiElement(o).withStyles(m).withLocalization({
|
|
21
|
-
en: {
|
|
22
|
-
"Unsubscribe Block": "Unsubscribe Block",
|
|
23
|
-
"Unsubscribe Block Description": "Add an unsubscribe link to your email",
|
|
24
|
-
"Select Template": "Select Template",
|
|
25
|
-
"Unsubscribe Template": "Unsubscribe Template",
|
|
26
|
-
Showing: "Showing",
|
|
27
|
-
of: "of"
|
|
28
|
-
}
|
|
29
|
-
}).withUiElementTagRegistry(s).build();
|
|
30
|
-
export {
|
|
31
|
-
x as default
|
|
32
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const n = `/* Unsubscribe Extension Styles */
|
|
2
|
-
|
|
3
|
-
.unsubscribe-preview-container {
|
|
4
|
-
/* Container styling handled by parent classes */
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.unsubscribe-preview-header {
|
|
8
|
-
display: flex;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
margin-bottom: 8px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.unsubscribe-preview-title {
|
|
14
|
-
font-weight: 500;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.unsubscribe-preview-controls {
|
|
18
|
-
display: flex;
|
|
19
|
-
gap: 2px;
|
|
20
|
-
align-items: center;
|
|
21
|
-
color: #666;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* Preview image container and image */
|
|
25
|
-
.unsubscribe-preview-image-container {
|
|
26
|
-
width: 100%;
|
|
27
|
-
max-height: 400px;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.unsubscribe-preview-image {
|
|
35
|
-
object-fit: cover;
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: auto;
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
export {
|
|
41
|
-
n as default
|
|
42
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration template for legacy unsubscribe blocks.
|
|
3
|
-
* This template is used to identify and migrate older versions of the unsubscribe block
|
|
4
|
-
* that may exist in saved email templates. The migration is detected in the Block's
|
|
5
|
-
* onCreated() lifecycle method via the 'data-migration' attribute check.
|
|
6
|
-
*
|
|
7
|
-
* Note: This template is currently exported but not actively used in the codebase.
|
|
8
|
-
* It serves as a reference for the expected structure of legacy blocks during migration.
|
|
9
|
-
*/
|
|
10
|
-
declare const migrationTemplate = "\n <td\n esd-extension-block-id=\"unsubscribe-block\"\n class=\"esd-block-text unsubscribe-block-v2 esd-block-unsubscribe esd-unsubscribe-block esd-extension-block\"\n >\n {-{-TITLE-}-}\n </td>\n";
|
|
11
|
-
export declare function getDefaultTemplate(): string;
|
|
12
|
-
export default migrationTemplate;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const UNSUBSCRIBE_EVENTS: {
|
|
2
|
-
readonly SELECT: "unsubscribe:select";
|
|
3
|
-
readonly CANCEL: "unsubscribe:cancel";
|
|
4
|
-
};
|
|
5
|
-
export type UnsubscribeEvent = typeof UNSUBSCRIBE_EVENTS[keyof typeof UNSUBSCRIBE_EVENTS];
|
|
6
|
-
export declare const DATA_ATTRIBUTES: {
|
|
7
|
-
readonly PAGE_TYPE: "data-unsubscribe-page-type";
|
|
8
|
-
readonly PAGE_LIST: "data-unsubscribe-page-list";
|
|
9
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parses a comma-separated list of page IDs into an array of numbers.
|
|
3
|
-
* Filters out invalid values (NaN, empty strings, negative numbers).
|
|
4
|
-
* @param pageList - Comma-separated string of page IDs
|
|
5
|
-
* @returns Array of valid page IDs
|
|
6
|
-
*/
|
|
7
|
-
export declare function parsePageList(pageList: string): number[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useHttp as t } from "../composables/useHttp.js";
|
|
2
|
-
import { useToaster as n } from "../composables/useToaster.js";
|
|
3
|
-
const u = () => {
|
|
4
|
-
const { get: r } = t(), { handleError: s } = n();
|
|
5
|
-
return { getUnsubscribePages: async () => {
|
|
6
|
-
try {
|
|
7
|
-
const { data: e = [] } = await r("/unsubscribe-pages/get-all");
|
|
8
|
-
return e;
|
|
9
|
-
} catch (e) {
|
|
10
|
-
return s(e, "Failed to fetch unsubscribe pages"), [];
|
|
11
|
-
}
|
|
12
|
-
} };
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
u as useUnsubscribeApi
|
|
16
|
-
};
|
|
File without changes
|