@useinsider/guido 1.0.2-beta.ad1dcd9 → 1.0.2-beta.b11c72f
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/README.md +1 -1
- package/dist/@types/generic.d.ts +0 -8
- package/dist/_virtual/AddCustomFont.js +4 -0
- package/dist/_virtual/AiAssistantValueType.js +4 -0
- package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
- package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
- package/dist/_virtual/Block.js +4 -0
- package/dist/_virtual/BlockAttributes.js +4 -0
- package/dist/_virtual/BlockCompositionType.js +4 -0
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/BlockRenderer.js +4 -0
- package/dist/_virtual/BlockType.js +4 -0
- package/dist/_virtual/BlocksPanel.js +4 -0
- package/dist/_virtual/BuiltInControl.js +4 -0
- package/dist/_virtual/BuiltInControlTypes.js +4 -0
- package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
- package/dist/_virtual/ContextAction.js +4 -0
- package/dist/_virtual/ContextActionType.js +4 -0
- package/dist/_virtual/Control.js +4 -0
- package/dist/_virtual/EditorStatePropertyType.js +4 -0
- package/dist/_virtual/Extension.js +4 -0
- package/dist/_virtual/ExtensionBuilder.js +4 -0
- package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
- package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
- package/dist/_virtual/ModificationDescription.js +4 -0
- package/dist/_virtual/PanelPosition.js +4 -0
- package/dist/_virtual/PreviewDeviceMode.js +4 -0
- package/dist/_virtual/SettingsPanelRegistry.js +4 -0
- package/dist/_virtual/SettingsPanelTab.js +4 -0
- package/dist/_virtual/SettingsTab.js +4 -0
- package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/TextColorBuiltInControl.js +4 -0
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
- package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
- package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
- package/dist/_virtual/UIElement.js +4 -0
- package/dist/_virtual/UIElementTagRegistry.js +4 -0
- package/dist/_virtual/UIElementType.js +4 -0
- package/dist/_virtual/UIElementsAttributes.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Guido.vue.d.ts +2 -2
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +63 -68
- package/dist/components/wrappers/WpDrawer.vue.d.ts +4 -6
- package/dist/components/wrappers/WpDrawer.vue.js +4 -6
- package/dist/composables/useHtmlValidator.d.ts +1 -2
- package/dist/composables/useHtmlValidator.js +95 -114
- package/dist/composables/useSave.js +6 -6
- package/dist/composables/useStripo.js +29 -35
- package/dist/config/compiler/unsubscribeCompilerRules.js +19 -19
- 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/DynamicContent/dynamic-content.js +27 -41
- package/dist/extensions/DynamicContent/extension.js +6 -18
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +48 -72
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +49 -74
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +38 -120
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +101 -116
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +43 -23
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +17 -21
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +15 -8
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +29 -30
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +23 -19
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +19 -37
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +15 -2
- package/dist/stores/unsubscribe.d.ts +5 -183
- package/dist/stores/unsubscribe.js +6 -125
- package/package.json +2 -2
- 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/checkboxMigrator.d.ts +0 -1
- package/dist/config/migrator/checkboxMigrator.js +0 -83
- package/dist/config/migrator/index.d.ts +0 -1
- package/dist/config/migrator/index.js +0 -9
- package/dist/config/migrator/unsubscribeMigrator.d.ts +0 -1
- package/dist/config/migrator/unsubscribeMigrator.js +0 -112
- package/dist/extensions/Blocks/Checkbox/block.d.ts +0 -10
- package/dist/extensions/Blocks/Checkbox/block.js +0 -39
- package/dist/extensions/Blocks/Checkbox/control.d.ts +0 -22
- package/dist/extensions/Blocks/Checkbox/control.js +0 -104
- package/dist/extensions/Blocks/Checkbox/extension.d.ts +0 -2
- package/dist/extensions/Blocks/Checkbox/extension.js +0 -20
- package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +0 -38
- package/dist/extensions/Blocks/Checkbox/template.d.ts +0 -6
- package/dist/extensions/Blocks/Checkbox/template.js +0 -75
- package/dist/extensions/Blocks/Unsubscribe/block.d.ts +0 -30
- package/dist/extensions/Blocks/Unsubscribe/block.js +0 -141
- 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.d.ts +0 -2
- package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -32
- package/dist/extensions/Blocks/Unsubscribe/template.d.ts +0 -3
- package/dist/extensions/Blocks/Unsubscribe/template.js +0 -28
- 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/extensions/Blocks/_Boilerplate/block.d.ts +0 -10
- package/dist/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
- package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
- package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
- package/dist/mock/api/unsubscribe.d.ts +0 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +0 -12
- package/dist/services/unsubscribeApi.d.ts +0 -4
- package/dist/services/unsubscribeApi.js +0 -16
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
var S = Object.defineProperty;
|
|
2
|
-
var _ = (n, s, e) => s in n ? S(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
3
|
-
var u = (n, s, e) => _(n, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
-
import { PAGE_TYPES as E } from "../../../enums/unsubscribe.js";
|
|
5
|
-
import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
|
|
6
|
-
import { Block as d } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js";
|
|
7
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
8
|
-
import { BlockCompositionType as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
9
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
10
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
11
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
12
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
13
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
14
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
15
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
16
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
17
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
18
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
19
|
-
import { ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js";
|
|
20
|
-
import { getDefaultTemplate as L } from "./template.js";
|
|
21
|
-
import { UNSUBSCRIBE_EVENTS as a, DATA_ATTRIBUTES as o } from "./utils/constants.js";
|
|
22
|
-
import { parsePageList as p } from "./utils/utils.js";
|
|
23
|
-
const v = "unsubscribe-block", g = 'a[data-unsubscribe-link="true"]', f = ".unsubscribe-block-v2", B = "{{ins-unsubscribe-link}}", C = {
|
|
24
|
-
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
25
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
26
|
-
};
|
|
27
|
-
class $ extends d {
|
|
28
|
-
constructor() {
|
|
29
|
-
super(...arguments);
|
|
30
|
-
u(this, "selectEventListener", null);
|
|
31
|
-
u(this, "cancelEventListener", null);
|
|
32
|
-
u(this, "currentNode");
|
|
33
|
-
}
|
|
34
|
-
getId() {
|
|
35
|
-
return v;
|
|
36
|
-
}
|
|
37
|
-
getIcon() {
|
|
38
|
-
return "mail-info";
|
|
39
|
-
}
|
|
40
|
-
getBlockCompositionType() {
|
|
41
|
-
return h.BLOCK;
|
|
42
|
-
}
|
|
43
|
-
getName() {
|
|
44
|
-
return this.api.translate("Unsubscribe Block");
|
|
45
|
-
}
|
|
46
|
-
getDescription() {
|
|
47
|
-
return this.api.translate("Unsubscribe Block Description");
|
|
48
|
-
}
|
|
49
|
-
getTemplate() {
|
|
50
|
-
return L();
|
|
51
|
-
}
|
|
52
|
-
onCreated(e) {
|
|
53
|
-
console.debug("on created", e), !("getAttribute" in e && e.getAttribute("data-migration")) && (this.currentNode = e, this._resetStoreState(), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
|
|
54
|
-
}
|
|
55
|
-
onSelect(e) {
|
|
56
|
-
this.currentNode = e, this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener();
|
|
57
|
-
}
|
|
58
|
-
onDelete(e) {
|
|
59
|
-
this._removeEventListeners(), this._removeBlockTemplatesFromStore(e), this._resetStoreState();
|
|
60
|
-
}
|
|
61
|
-
_setupSelectEventListener() {
|
|
62
|
-
this._removeSelectEventListener(), this.selectEventListener = (e) => {
|
|
63
|
-
const i = e, { collectionType: t, selectedPages: r } = i.detail;
|
|
64
|
-
this._updateBlock(t, r.join(","));
|
|
65
|
-
}, document.addEventListener(a.SELECT, this.selectEventListener);
|
|
66
|
-
}
|
|
67
|
-
_removeSelectEventListener() {
|
|
68
|
-
this.selectEventListener && (document.removeEventListener(a.SELECT, this.selectEventListener), this.selectEventListener = null);
|
|
69
|
-
}
|
|
70
|
-
_setupCancelEventListener() {
|
|
71
|
-
this._removeCancelEventListener(), this.cancelEventListener = () => {
|
|
72
|
-
this._handleCancel();
|
|
73
|
-
}, document.addEventListener(a.CANCEL, this.cancelEventListener);
|
|
74
|
-
}
|
|
75
|
-
_removeCancelEventListener() {
|
|
76
|
-
this.cancelEventListener && (document.removeEventListener(a.CANCEL, this.cancelEventListener), this.cancelEventListener = null);
|
|
77
|
-
}
|
|
78
|
-
_handleCancel() {
|
|
79
|
-
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).delete().apply(new m("Removed unsubscribe block due to cancel"));
|
|
80
|
-
}
|
|
81
|
-
_removeEventListeners() {
|
|
82
|
-
this._removeSelectEventListener(), this._removeCancelEventListener();
|
|
83
|
-
}
|
|
84
|
-
_updateBlock(e, i) {
|
|
85
|
-
if (!this.currentNode || !("querySelector" in this.currentNode))
|
|
86
|
-
return;
|
|
87
|
-
const t = this.currentNode.querySelector(g);
|
|
88
|
-
if (!t)
|
|
89
|
-
return;
|
|
90
|
-
const r = this._getMergeTag(e);
|
|
91
|
-
this.api.getDocumentModifier().modifyHtml(t).setAttribute("href", r).apply(new m(`Updated unsubscribe link to ${r}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, i).apply(new m("Updated unsubscribe block metadata"));
|
|
92
|
-
}
|
|
93
|
-
_getMergeTag(e) {
|
|
94
|
-
return C[e] ?? B;
|
|
95
|
-
}
|
|
96
|
-
_openDrawer() {
|
|
97
|
-
try {
|
|
98
|
-
const e = c();
|
|
99
|
-
e.typeSelectionDrawerStatus = !0;
|
|
100
|
-
} catch (e) {
|
|
101
|
-
console.error("[UnsubscribeBlock] Failed to open drawer:", e);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
_checkExistingBlocks() {
|
|
105
|
-
const e = c();
|
|
106
|
-
e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(f).forEach((t) => {
|
|
107
|
-
if ("getAttribute" in t) {
|
|
108
|
-
const r = t.getAttribute(o.PAGE_TYPE);
|
|
109
|
-
if (r) {
|
|
110
|
-
const l = Number(r);
|
|
111
|
-
l === E.GLOBAL_UNSUBSCRIBE ? e.isGlobalUnsubscribeDisabled = !0 : l === E.SUBSCRIPTION_PREFERENCE_CENTER && (e.isSubscriptionPreferencesCenterDisabled = !0);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
_loadBlockState(e) {
|
|
117
|
-
if (!("getAttribute" in e))
|
|
118
|
-
return;
|
|
119
|
-
const i = e.getAttribute(o.PAGE_TYPE), t = e.getAttribute(o.PAGE_LIST);
|
|
120
|
-
if (!i || !t)
|
|
121
|
-
return;
|
|
122
|
-
const r = c(), l = Number(i), b = p(t);
|
|
123
|
-
r.setCollectionWithoutAutoSelection(l), r.loadSelectedTemplates(b);
|
|
124
|
-
}
|
|
125
|
-
_resetStoreState() {
|
|
126
|
-
c().$reset();
|
|
127
|
-
}
|
|
128
|
-
_removeBlockTemplatesFromStore(e) {
|
|
129
|
-
if (!("getAttribute" in e))
|
|
130
|
-
return;
|
|
131
|
-
const i = e.getAttribute(o.PAGE_LIST);
|
|
132
|
-
if (!i)
|
|
133
|
-
return;
|
|
134
|
-
const t = c(), r = p(i);
|
|
135
|
-
t.removeUnsubscribePages(r);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
export {
|
|
139
|
-
v as UNSUBSCRIBE_BLOCK_ID,
|
|
140
|
-
$ as UnsubscribeBlock
|
|
141
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { Control } from '@stripoinc/ui-editor-extensions';
|
|
3
|
-
export declare const UNSUBSCRIBE_CONTROL_ID = "ui-elements-unsubscribe";
|
|
4
|
-
export declare class UnsubscribeControl extends Control {
|
|
5
|
-
private currentPreviewIndex;
|
|
6
|
-
private currentNode?;
|
|
7
|
-
private currentPages?;
|
|
8
|
-
private valueChangeHandlers;
|
|
9
|
-
private lastParsedAttribute?;
|
|
10
|
-
getId(): string;
|
|
11
|
-
getTemplate(): string;
|
|
12
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
13
|
-
onRender(): void;
|
|
14
|
-
onDestroy(): void;
|
|
15
|
-
private get totalTemplates();
|
|
16
|
-
private _listenToFormUpdates;
|
|
17
|
-
private _onButtonClick;
|
|
18
|
-
private _onPrevClick;
|
|
19
|
-
private _onNextClick;
|
|
20
|
-
private _updatePreview;
|
|
21
|
-
private _updateCounter;
|
|
22
|
-
private _getPreview;
|
|
23
|
-
private _getButton;
|
|
24
|
-
private _getLabel;
|
|
25
|
-
private _getIconButton;
|
|
26
|
-
private _getPrevButton;
|
|
27
|
-
private _getNextButton;
|
|
28
|
-
private _getCounterText;
|
|
29
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
var d = Object.defineProperty;
|
|
2
|
-
var h = (o, n, t) => n in o ? d(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t;
|
|
3
|
-
var u = (o, n, t) => h(o, typeof n != "symbol" ? n + "" : n, 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 s } 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 g } from "./utils/utils.js";
|
|
21
|
-
const _ = "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 y 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 _;
|
|
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 = g(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
|
-
`Showing ${t} of ${e}`
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
_getPreview() {
|
|
114
|
-
return `
|
|
115
|
-
<div class="unsubscribe-preview-container">
|
|
116
|
-
<div style="display: flex; justify-content: space-between; margin-bottom: 8px;">
|
|
117
|
-
<div style="font-weight: 500;">Unsubscribe Template</div>
|
|
118
|
-
<div style="display: flex; gap: 2px; align-items: center; color: #666;">
|
|
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
|
-
<${s.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
|
-
</${s.BUTTON}>
|
|
137
|
-
`;
|
|
138
|
-
}
|
|
139
|
-
_getLabel(t, e) {
|
|
140
|
-
return `
|
|
141
|
-
<${s.LABEL}
|
|
142
|
-
${i.LABEL.text}="${t}"
|
|
143
|
-
${i.LABEL.name}="${e}"
|
|
144
|
-
>
|
|
145
|
-
</${s.LABEL}>
|
|
146
|
-
`;
|
|
147
|
-
}
|
|
148
|
-
_getIconButton(t, e, c) {
|
|
149
|
-
const a = c ? `${i.BUTTON.disabled}="true"` : "";
|
|
150
|
-
return `
|
|
151
|
-
<${s.BUTTON}
|
|
152
|
-
id="${t}"
|
|
153
|
-
class="flat-inline flat-white"
|
|
154
|
-
${i.BUTTON.name}="${t}"
|
|
155
|
-
${a}
|
|
156
|
-
>
|
|
157
|
-
<${s.ICON}
|
|
158
|
-
src="${e}"
|
|
159
|
-
class="icon-button"
|
|
160
|
-
></${s.ICON}>
|
|
161
|
-
</${s.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
|
-
_ as UNSUBSCRIBE_CONTROL_ID,
|
|
179
|
-
y 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 o = (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) => o(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 s = "unsubscribe-preview", E = "width: 100%; max-height: 400px; overflow: hidden; display: flex; align-items: center; justify-content: center;", l = "object-fit: cover; width: 100%; height: auto;", p = "img", c = "Unsubscribe page preview";
|
|
18
|
-
class A extends n {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
r(this, "imgElement");
|
|
22
|
-
}
|
|
23
|
-
getId() {
|
|
24
|
-
return s;
|
|
25
|
-
}
|
|
26
|
-
getTemplate() {
|
|
27
|
-
return `
|
|
28
|
-
<div style="${E}">
|
|
29
|
-
<img
|
|
30
|
-
src=""
|
|
31
|
-
alt="${c}"
|
|
32
|
-
style="${l}"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
onRender(e) {
|
|
38
|
-
this.imgElement = e.querySelector(p);
|
|
39
|
-
}
|
|
40
|
-
setValue(e) {
|
|
41
|
-
console.debug("ui set value", e), 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
|
-
s as PREVIEW_UI_ELEMENT_ID,
|
|
53
|
-
A as PreviewUIElement
|
|
54
|
-
};
|
|
@@ -1,21 +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 o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js";
|
|
14
|
-
import { UnsubscribeBlock as t } from "./block.js";
|
|
15
|
-
import { UnsubscribeControl as r } from "./control.js";
|
|
16
|
-
import { PreviewUIElement as i } from "./elements/preview.js";
|
|
17
|
-
import { SettingsPanel as m } from "./settingsPanel.js";
|
|
18
|
-
const P = new o().addBlock(t).withSettingsPanelRegistry(m).addControl(r).addUiElement(i).build();
|
|
19
|
-
export {
|
|
20
|
-
P as default
|
|
21
|
-
};
|
|
@@ -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 { TextControls as o } from "../../../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 { SettingsTab as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
13
|
-
import { SettingsPanelRegistry as i } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js";
|
|
14
|
-
import { SettingsPanelTab as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js";
|
|
15
|
-
import { UNSUBSCRIBE_BLOCK_ID as e } from "./block.js";
|
|
16
|
-
import { UNSUBSCRIBE_CONTROL_ID as p } from "./control.js";
|
|
17
|
-
class c extends i {
|
|
18
|
-
registerBlockControls(t) {
|
|
19
|
-
t[e] = [
|
|
20
|
-
new m(
|
|
21
|
-
r.SETTINGS,
|
|
22
|
-
[
|
|
23
|
-
p,
|
|
24
|
-
...Object.values(o)
|
|
25
|
-
]
|
|
26
|
-
)
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
c as SettingsPanel
|
|
32
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
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";
|
|
2
|
-
export declare function getDefaultTemplate(): string;
|
|
3
|
-
export default migrationTemplate;
|
|
@@ -1,28 +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 { BlockType as r } from "../../../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
|
-
const t = "unsubscribe", o = "{{ins-unsubscribe-link}}", i = `
|
|
14
|
-
<${r.BLOCK_TEXT} class="unsubscribe-block-v2 esd-block-unsubscribe es-p0" align="center">
|
|
15
|
-
<p>You can <strong><a
|
|
16
|
-
href="${o}"
|
|
17
|
-
class="unsubscribe-link"
|
|
18
|
-
target="_blank"
|
|
19
|
-
data-unsubscribe-link="true"
|
|
20
|
-
>${t}</a></strong> from our emails, if you need to.</p>
|
|
21
|
-
</${r.BLOCK_TEXT}>
|
|
22
|
-
`;
|
|
23
|
-
function E() {
|
|
24
|
-
return i;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
E as getDefaultTemplate
|
|
28
|
-
};
|
|
@@ -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,10 +0,0 @@
|
|
|
1
|
-
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare const BLOCK_ID = "{{your-block}}";
|
|
3
|
-
export declare class CustomBlock extends Block {
|
|
4
|
-
getId(): string;
|
|
5
|
-
getIcon(): string;
|
|
6
|
-
getBlockCompositionType(): BlockCompositionType;
|
|
7
|
-
getName(): string;
|
|
8
|
-
getDescription(): string;
|
|
9
|
-
getTemplate(): string;
|
|
10
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Control, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare const CONTROL_BLOCK_ID = "ui-elements-{{your-control-block}}";
|
|
3
|
-
export declare class CustomControl extends Control {
|
|
4
|
-
private currentNode?;
|
|
5
|
-
private selectedUnsubGroup?;
|
|
6
|
-
private unsubList;
|
|
7
|
-
getId(): string;
|
|
8
|
-
_setFormValues(): void;
|
|
9
|
-
_getLabel(text: string, name?: string): string;
|
|
10
|
-
_getSelectItem(text: string, value: string): string;
|
|
11
|
-
_getSelect(): string;
|
|
12
|
-
getTemplate(): string;
|
|
13
|
-
_onSelectChange(value: string | number): void;
|
|
14
|
-
_listenToFormUpdates(): void;
|
|
15
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
16
|
-
onRender(): Promise<void>;
|
|
17
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td \n align=\"left\" \n esd-extension-block-id=\"checkbox-block\" \n class=\"checkbox-block-v2 esd-block-checkbox esd-checkbox-block 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>{-{-TITLE-}-}</tr>\n <tr>{-{-DESCRIPTION-}-}</tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
|
-
/**
|
|
3
|
-
* @returns The template for the default checkbox block
|
|
4
|
-
*/
|
|
5
|
-
export declare function getDefaultTemplate(): string;
|
|
6
|
-
export default migrationTemplate;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var d;
|
|
2
|
-
(function(s) {
|
|
3
|
-
s.BUTTON = "esd-block-button", s.TEXT = "esd-block-text", s.IMAGE = "esd-block-image", s.STRUCTURE = "esd-structure", s.VIDEO = "esd-block-video", s.SOCIAL = "esd-block-social", s.BANNER = "esd-block-banner", s.TIMER = "esd-block-timer", s.MENU = "esd-block-menu", s.HTML = "esd-block-html", s.SPACER = "esd-block-spacer", s.CONTAINER = "esd-container-frame";
|
|
4
|
-
})(d || (d = {}));
|
|
5
|
-
var b;
|
|
6
|
-
(function(s) {
|
|
7
|
-
s.BUTTON = ".esd-block-button", s.TEXT = ".esd-block-text", s.IMAGE = ".esd-block-image", s.STRUCTURE = ".esd-structure", s.VIDEO = ".esd-block-video", s.SOCIAL = ".esd-block-social", s.BANNER = ".esd-block-banner", s.TIMER = ".esd-block-timer", s.MENU = ".esd-block-menu", s.HTML = ".esd-block-html", s.SPACER = ".esd-block-spacer", s.CONTAINER = ".esd-container-frame", s.STRIPE = ".esd-stripe", s.FORM = ".esd-amp-form";
|
|
8
|
-
})(b || (b = {}));
|
|
9
|
-
export {
|
|
10
|
-
d as BlockName,
|
|
11
|
-
b as BlockSelector
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var T;
|
|
2
|
-
(function(t) {
|
|
3
|
-
t.TOP = "top", t.RIGHT = "right", t.BOTTOM = "bottom", t.LEFT = "left";
|
|
4
|
-
})(T || (T = {}));
|
|
5
|
-
var a;
|
|
6
|
-
(function(t) {
|
|
7
|
-
t.AI_HIDDEN_PREHEADER = "aiHiddenPreheader", t.AI_SUBJECT = "aiSubject", t.AI_TEXT = "aiText";
|
|
8
|
-
})(a || (a = {}));
|
|
9
|
-
export {
|
|
10
|
-
a as ExtensionPopoverType,
|
|
11
|
-
T as PopoverSide
|
|
12
|
-
};
|