@useinsider/guido 1.0.3-beta.a6893cb → 1.0.3-beta.a6a2da8
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 +9 -0
- package/dist/components/Guido.vue.d.ts +2 -2
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +74 -69
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +16 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +24 -0
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +64 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +107 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +2 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +18 -0
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +12 -0
- package/dist/components/wrappers/WpDrawer.vue.d.ts +6 -4
- package/dist/components/wrappers/WpDrawer.vue.js +6 -4
- package/dist/composables/useStripo.js +40 -32
- package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
- package/dist/config/migrator/couponBlockMigrator.d.ts +1 -0
- package/dist/config/migrator/couponBlockMigrator.js +67 -0
- package/dist/config/migrator/index.d.ts +1 -1
- package/dist/config/migrator/index.js +7 -5
- package/dist/config/migrator/unsubscribeMigrator.d.ts +1 -0
- package/dist/config/migrator/unsubscribeMigrator.js +124 -0
- package/dist/enums/defaults.js +6 -3
- package/dist/enums/unsubscribe.d.ts +19 -0
- package/dist/enums/unsubscribe.js +39 -6
- package/dist/extensions/Blocks/Checkbox/block.d.ts +1 -0
- package/dist/extensions/Blocks/Checkbox/block.js +15 -24
- package/dist/extensions/Blocks/Checkbox/control.js +24 -38
- package/dist/extensions/Blocks/Checkbox/extension.js +5 -16
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +18 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +12 -25
- package/dist/extensions/Blocks/Checkbox/template.js +5 -16
- package/dist/extensions/Blocks/CouponBlock/block.d.ts +12 -0
- package/dist/extensions/Blocks/CouponBlock/block.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/extension.d.ts +2 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +8 -0
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +33 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +24 -0
- package/dist/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/extensions/Blocks/CouponBlock/template.js +18 -0
- package/dist/extensions/Blocks/RadioButton/block.d.ts +1 -0
- package/dist/extensions/Blocks/RadioButton/block.js +13 -22
- package/dist/extensions/Blocks/RadioButton/control.js +32 -46
- package/dist/extensions/Blocks/RadioButton/extension.js +4 -15
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +14 -0
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +13 -26
- package/dist/extensions/Blocks/RadioButton/template.js +7 -18
- package/dist/extensions/Blocks/Unsubscribe/block.d.ts +32 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +131 -0
- package/dist/extensions/Blocks/Unsubscribe/control.d.ts +29 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +167 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.d.ts +11 -0
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.d.ts +2 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +21 -0
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +35 -0
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +42 -0
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +10 -0
- package/dist/extensions/Blocks/Unsubscribe/template.d.ts +12 -0
- package/dist/extensions/Blocks/Unsubscribe/template.js +22 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.d.ts +9 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +11 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.d.ts +7 -0
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +6 -0
- package/dist/extensions/Blocks/_Boilerplate/block.d.ts +1 -0
- package/dist/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +4 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +31 -45
- package/dist/extensions/DynamicContent/extension.js +6 -18
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +648 -0
- package/dist/services/unsubscribeApi.d.ts +4 -0
- package/dist/services/unsubscribeApi.js +16 -0
- package/dist/stores/config.d.ts +96 -0
- package/dist/stores/config.js +17 -0
- package/dist/stores/unsubscribe.d.ts +253 -5
- package/dist/stores/unsubscribe.js +126 -6
- package/dist/utils/templatePreparation.js +17 -16
- package/package.json +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -75
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -77
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -123
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -119
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -7
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -24
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -24
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -33
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -40
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -5
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/
|
|
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";
|
|
1
|
+
import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
14
2
|
import { RadioButtonCustomBlock as t } from "./block.js";
|
|
15
3
|
import { RadioButtonControl as i } from "./control.js";
|
|
4
|
+
import { RadioButtonIconsRegistry as n } from "./iconsRegistry.js";
|
|
16
5
|
import { RadioButtonBlockSettingsPanel as r } from "./settingsPanel.js";
|
|
17
|
-
const
|
|
6
|
+
const l = new o().addBlock(t).withSettingsPanelRegistry(r).addControl(i).withIconsRegistry(n).build();
|
|
18
7
|
export {
|
|
19
|
-
|
|
8
|
+
l as default
|
|
20
9
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconsRegistry as i } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
class s extends i {
|
|
3
|
+
registerIconsSvg(t) {
|
|
4
|
+
t["radio-button-icon"] = `
|
|
5
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<circle cx="10" cy="10" r="9" stroke="#666666" fill="#FFFFFF" stroke-width="2"/>
|
|
7
|
+
<circle cx="10" cy="10" r="3" fill="#666666"/>
|
|
8
|
+
</svg>
|
|
9
|
+
`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
s as RadioButtonIconsRegistry
|
|
14
|
+
};
|
|
@@ -1,39 +1,26 @@
|
|
|
1
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 o } 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 e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js";
|
|
14
|
-
import { SettingsPanelTab as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js";
|
|
15
|
-
import { BLOCK_ID as p } from "./block.js";
|
|
16
|
-
import { CONTROL_BLOCK_ID as n } from "./control.js";
|
|
17
|
-
class K extends e {
|
|
18
|
-
registerBlockControls(i) {
|
|
19
|
-
i[p] = [
|
|
20
|
-
new r(
|
|
1
|
+
import { SettingsPanelRegistry as r, SettingsPanelTab as t, SettingsTab as o, ContainerControls as e, TextControls as s } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { BLOCK_ID as T } from "./block.js";
|
|
3
|
+
import { CONTROL_BLOCK_ID as i } from "./control.js";
|
|
4
|
+
class a extends r {
|
|
5
|
+
registerBlockControls(n) {
|
|
6
|
+
n[T] = [
|
|
7
|
+
new t(
|
|
21
8
|
o.SETTINGS,
|
|
22
9
|
[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
i,
|
|
11
|
+
e.EXTERNAL_INDENTS,
|
|
12
|
+
e.DISPLAY_CONDITIONS
|
|
26
13
|
]
|
|
27
14
|
),
|
|
28
|
-
new
|
|
15
|
+
new t(
|
|
29
16
|
o.STYLES,
|
|
30
17
|
[
|
|
31
|
-
|
|
18
|
+
s.TEXT_BLOCK_BACKGROUND_COLOR
|
|
32
19
|
]
|
|
33
20
|
)
|
|
34
21
|
];
|
|
35
22
|
}
|
|
36
23
|
}
|
|
37
24
|
export {
|
|
38
|
-
|
|
25
|
+
a as RadioButtonBlockSettingsPanel
|
|
39
26
|
};
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/
|
|
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 t } 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";
|
|
1
|
+
import { BlockType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
13
2
|
const e = {
|
|
14
3
|
TITLE: "This is a title text",
|
|
15
4
|
DESCRIPTION: "This is a description text",
|
|
16
5
|
YES: "Yes",
|
|
17
6
|
NO: "No"
|
|
18
|
-
},
|
|
7
|
+
}, d = `
|
|
19
8
|
<td align="left" class="radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
|
|
20
9
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
21
10
|
<tbody>
|
|
@@ -86,7 +75,7 @@ const e = {
|
|
|
86
75
|
</tbody>
|
|
87
76
|
</table>
|
|
88
77
|
</td>
|
|
89
|
-
`,
|
|
78
|
+
`, l = `
|
|
90
79
|
<td
|
|
91
80
|
align="left"
|
|
92
81
|
esd-extension-block-id="radio-button-block"
|
|
@@ -151,10 +140,10 @@ const e = {
|
|
|
151
140
|
</table>
|
|
152
141
|
</td>
|
|
153
142
|
`;
|
|
154
|
-
function
|
|
155
|
-
return
|
|
143
|
+
function a() {
|
|
144
|
+
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>`);
|
|
156
145
|
}
|
|
157
146
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
147
|
+
l as default,
|
|
148
|
+
a as getDefaultTemplate
|
|
160
149
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
3
|
+
export declare const UNSUBSCRIBE_BLOCK_ID = "unsubscribe-block";
|
|
4
|
+
export declare class UnsubscribeBlock extends Block {
|
|
5
|
+
private selectEventListener;
|
|
6
|
+
private cancelEventListener;
|
|
7
|
+
private currentNode?;
|
|
8
|
+
constructor();
|
|
9
|
+
getId(): string;
|
|
10
|
+
getIcon(): string;
|
|
11
|
+
getBlockCompositionType(): BlockCompositionType;
|
|
12
|
+
getName(): string;
|
|
13
|
+
getDescription(): string;
|
|
14
|
+
getTemplate(): string;
|
|
15
|
+
onCreated(node: ImmutableHtmlNode): void;
|
|
16
|
+
onSelect(node: ImmutableHtmlNode): undefined;
|
|
17
|
+
onDelete(node: ImmutableHtmlNode): undefined;
|
|
18
|
+
onDestroy(): void;
|
|
19
|
+
private _setupSelectEventListener;
|
|
20
|
+
private _removeSelectEventListener;
|
|
21
|
+
private _setupCancelEventListener;
|
|
22
|
+
private _removeCancelEventListener;
|
|
23
|
+
private _handleCancel;
|
|
24
|
+
private _removeEventListeners;
|
|
25
|
+
private _updateBlock;
|
|
26
|
+
private _getMergeTag;
|
|
27
|
+
private _openDrawer;
|
|
28
|
+
private _checkExistingBlocks;
|
|
29
|
+
private _loadBlockState;
|
|
30
|
+
private _resetStoreState;
|
|
31
|
+
private _removeBlockTemplatesFromStore;
|
|
32
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var d = (n, i, e) => i in n ? _(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
|
|
3
|
+
var u = (n, i, e) => d(n, typeof i != "symbol" ? i + "" : i, e);
|
|
4
|
+
import { PAGE_TYPES as E } from "../../../enums/unsubscribe.js";
|
|
5
|
+
import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
|
|
6
|
+
import { Block as S, BlockCompositionType as h, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
+
import { getDefaultTemplate as L } from "./template.js";
|
|
8
|
+
import { UNSUBSCRIBE_EVENTS as a, DATA_ATTRIBUTES as o } from "./utils/constants.js";
|
|
9
|
+
import { parsePageList as m } from "./utils/utils.js";
|
|
10
|
+
const v = "unsubscribe-block", g = 'a[data-unsubscribe-link="true"]', B = ".unsubscribe-block-v2", f = "{{ins-unsubscribe-link}}", C = {
|
|
11
|
+
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
12
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
13
|
+
};
|
|
14
|
+
class D extends S {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
u(this, "selectEventListener", null);
|
|
18
|
+
u(this, "cancelEventListener", null);
|
|
19
|
+
u(this, "currentNode");
|
|
20
|
+
}
|
|
21
|
+
getId() {
|
|
22
|
+
return v;
|
|
23
|
+
}
|
|
24
|
+
getIcon() {
|
|
25
|
+
return "unsubscribe-icon";
|
|
26
|
+
}
|
|
27
|
+
getBlockCompositionType() {
|
|
28
|
+
return h.BLOCK;
|
|
29
|
+
}
|
|
30
|
+
getName() {
|
|
31
|
+
return this.api.translate("Unsubscribe Block");
|
|
32
|
+
}
|
|
33
|
+
getDescription() {
|
|
34
|
+
return this.api.translate("Unsubscribe Block Description");
|
|
35
|
+
}
|
|
36
|
+
getTemplate() {
|
|
37
|
+
return L();
|
|
38
|
+
}
|
|
39
|
+
onCreated(e) {
|
|
40
|
+
"getAttribute" in e && e.getAttribute("data-migration") || (this.currentNode = e, this._resetStoreState(), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
|
|
41
|
+
}
|
|
42
|
+
onSelect(e) {
|
|
43
|
+
this.currentNode = e, this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener();
|
|
44
|
+
}
|
|
45
|
+
onDelete(e) {
|
|
46
|
+
this._removeEventListeners(), this._removeBlockTemplatesFromStore(e), this._resetStoreState();
|
|
47
|
+
}
|
|
48
|
+
onDestroy() {
|
|
49
|
+
this._removeEventListeners(), this.currentNode = void 0;
|
|
50
|
+
}
|
|
51
|
+
_setupSelectEventListener() {
|
|
52
|
+
this._removeSelectEventListener(), this.selectEventListener = (e) => {
|
|
53
|
+
const r = e, { collectionType: t, selectedPages: s } = r.detail;
|
|
54
|
+
this._updateBlock(t, s.join(","));
|
|
55
|
+
}, document.addEventListener(a.SELECT, this.selectEventListener);
|
|
56
|
+
}
|
|
57
|
+
_removeSelectEventListener() {
|
|
58
|
+
this.selectEventListener && (document.removeEventListener(a.SELECT, this.selectEventListener), this.selectEventListener = null);
|
|
59
|
+
}
|
|
60
|
+
_setupCancelEventListener() {
|
|
61
|
+
this._removeCancelEventListener(), this.cancelEventListener = () => {
|
|
62
|
+
this._handleCancel();
|
|
63
|
+
}, document.addEventListener(a.CANCEL, this.cancelEventListener);
|
|
64
|
+
}
|
|
65
|
+
_removeCancelEventListener() {
|
|
66
|
+
this.cancelEventListener && (document.removeEventListener(a.CANCEL, this.cancelEventListener), this.cancelEventListener = null);
|
|
67
|
+
}
|
|
68
|
+
_handleCancel() {
|
|
69
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).delete().apply(new b("Removed unsubscribe block due to cancel"));
|
|
70
|
+
}
|
|
71
|
+
_removeEventListeners() {
|
|
72
|
+
this._removeSelectEventListener(), this._removeCancelEventListener();
|
|
73
|
+
}
|
|
74
|
+
_updateBlock(e, r) {
|
|
75
|
+
if (!this.currentNode || !("querySelector" in this.currentNode))
|
|
76
|
+
return;
|
|
77
|
+
const t = this.currentNode.querySelector(g);
|
|
78
|
+
if (!t)
|
|
79
|
+
return;
|
|
80
|
+
const s = this._getMergeTag(e);
|
|
81
|
+
this.api.getDocumentModifier().modifyHtml(t).setAttribute("href", s).apply(new b(`Updated unsubscribe link to ${s}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, r).apply(new b("Updated unsubscribe block metadata"));
|
|
82
|
+
}
|
|
83
|
+
_getMergeTag(e) {
|
|
84
|
+
return C[e] ?? f;
|
|
85
|
+
}
|
|
86
|
+
_openDrawer() {
|
|
87
|
+
try {
|
|
88
|
+
const e = c();
|
|
89
|
+
e.typeSelectionDrawerStatus = !0;
|
|
90
|
+
} catch (e) {
|
|
91
|
+
console.error("[UnsubscribeBlock] Failed to open drawer:", e);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
_checkExistingBlocks() {
|
|
95
|
+
const e = c();
|
|
96
|
+
e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(B).forEach((t) => {
|
|
97
|
+
if ("getAttribute" in t) {
|
|
98
|
+
const s = t.getAttribute(o.PAGE_TYPE);
|
|
99
|
+
if (s) {
|
|
100
|
+
const l = Number(s);
|
|
101
|
+
l === E.GLOBAL_UNSUBSCRIBE ? e.isGlobalUnsubscribeDisabled = !0 : l === E.SUBSCRIPTION_PREFERENCE_CENTER && (e.isSubscriptionPreferencesCenterDisabled = !0);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
_loadBlockState(e) {
|
|
107
|
+
if (!("getAttribute" in e))
|
|
108
|
+
return;
|
|
109
|
+
const r = e.getAttribute(o.PAGE_TYPE), t = e.getAttribute(o.PAGE_LIST);
|
|
110
|
+
if (!r || !t)
|
|
111
|
+
return;
|
|
112
|
+
const s = c(), l = Number(r), p = m(t);
|
|
113
|
+
s.setCollectionWithoutAutoSelection(l), s.loadSelectedTemplates(p);
|
|
114
|
+
}
|
|
115
|
+
_resetStoreState() {
|
|
116
|
+
c().$reset();
|
|
117
|
+
}
|
|
118
|
+
_removeBlockTemplatesFromStore(e) {
|
|
119
|
+
if (!("getAttribute" in e))
|
|
120
|
+
return;
|
|
121
|
+
const r = e.getAttribute(o.PAGE_LIST);
|
|
122
|
+
if (!r)
|
|
123
|
+
return;
|
|
124
|
+
const t = c(), s = m(r);
|
|
125
|
+
t.removeUnsubscribePages(s);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
v as UNSUBSCRIBE_BLOCK_ID,
|
|
130
|
+
D as UnsubscribeBlock
|
|
131
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var d = (a, s, e) => s in a ? h(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e;
|
|
3
|
+
var u = (a, s, e) => d(a, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { useUnsubscribeStore as l } from "../../../stores/unsubscribe.js";
|
|
5
|
+
import { Control as T, UEAttr as i, UIElementType as n } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
6
|
+
import { DATA_ATTRIBUTES as p } from "./utils/constants.js";
|
|
7
|
+
import { parsePageList as _ } from "./utils/utils.js";
|
|
8
|
+
const g = "ui-elements-unsubscribe", r = {
|
|
9
|
+
SELECT_BUTTON: "selectTemplateButton",
|
|
10
|
+
PREV_BUTTON: "prevButton",
|
|
11
|
+
NEXT_BUTTON: "nextButton",
|
|
12
|
+
COUNTER_TEXT: "counterText",
|
|
13
|
+
PREVIEW_IMAGE: "previewImage"
|
|
14
|
+
};
|
|
15
|
+
class N extends T {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
u(this, "currentPreviewIndex", 0);
|
|
19
|
+
u(this, "currentNode");
|
|
20
|
+
u(this, "currentPages");
|
|
21
|
+
u(this, "valueChangeHandlers", []);
|
|
22
|
+
u(this, "lastParsedAttribute");
|
|
23
|
+
}
|
|
24
|
+
getId() {
|
|
25
|
+
return g;
|
|
26
|
+
}
|
|
27
|
+
getTemplate() {
|
|
28
|
+
return `
|
|
29
|
+
<div class="unsubscribe-controls-container container stretch widest-spacing">
|
|
30
|
+
${this._getPreview()}
|
|
31
|
+
${this._getButton()}
|
|
32
|
+
</div>
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
onTemplateNodeUpdated(e) {
|
|
36
|
+
if (this.currentNode = e, "getAttribute" in this.currentNode) {
|
|
37
|
+
const t = this.currentNode.getAttribute(p.PAGE_LIST);
|
|
38
|
+
t && (t !== this.lastParsedAttribute && (this.currentPages = _(t), this.lastParsedAttribute = t, this.currentPreviewIndex = 0), this._updatePreview(), this._updateCounter());
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
onRender() {
|
|
42
|
+
this._listenToFormUpdates(), this._updateCounter();
|
|
43
|
+
}
|
|
44
|
+
onDestroy() {
|
|
45
|
+
this.valueChangeHandlers.forEach((e) => {
|
|
46
|
+
typeof e == "function" && e();
|
|
47
|
+
}), this.valueChangeHandlers = [], this.currentNode = void 0, this.currentPages = void 0, this.currentPreviewIndex = 0, this.lastParsedAttribute = void 0;
|
|
48
|
+
}
|
|
49
|
+
get totalTemplates() {
|
|
50
|
+
var e;
|
|
51
|
+
return ((e = this.currentPages) == null ? void 0 : e.length) ?? 0;
|
|
52
|
+
}
|
|
53
|
+
_listenToFormUpdates() {
|
|
54
|
+
this.valueChangeHandlers.push(
|
|
55
|
+
this.api.onValueChanged(r.SELECT_BUTTON, () => this._onButtonClick())
|
|
56
|
+
), this.valueChangeHandlers.push(
|
|
57
|
+
this.api.onValueChanged(r.PREV_BUTTON, () => this._onPrevClick())
|
|
58
|
+
), this.valueChangeHandlers.push(
|
|
59
|
+
this.api.onValueChanged(r.NEXT_BUTTON, () => this._onNextClick())
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
_onButtonClick() {
|
|
63
|
+
try {
|
|
64
|
+
const e = l();
|
|
65
|
+
e.activeType = e.getSelectedCollection[this.currentPreviewIndex], e.pageSelectionUpdateStatus = !0, e.pageSelectionDrawerStatus = !0;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
console.error("[UnsubscribeControl] Failed to open drawer:", e);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
_onPrevClick() {
|
|
71
|
+
this.currentPreviewIndex > 0 && (this.currentPreviewIndex--, this._updatePreview(), this._updateCounter());
|
|
72
|
+
}
|
|
73
|
+
_onNextClick() {
|
|
74
|
+
this.currentPreviewIndex < this.totalTemplates - 1 && (this.currentPreviewIndex++, this._updatePreview(), this._updateCounter());
|
|
75
|
+
}
|
|
76
|
+
_updatePreview() {
|
|
77
|
+
var e;
|
|
78
|
+
if ((e = this.currentPages) != null && e.length)
|
|
79
|
+
try {
|
|
80
|
+
const t = this.currentPages[this.currentPreviewIndex], o = l().getThumbnailByTemplateId(t);
|
|
81
|
+
if (!o) {
|
|
82
|
+
console.warn("[UnsubscribeControl] No thumbnail found for page:", t);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.api.updateValues({
|
|
86
|
+
[r.PREVIEW_IMAGE]: o
|
|
87
|
+
});
|
|
88
|
+
} catch (t) {
|
|
89
|
+
console.error("[UnsubscribeControl] Failed to update preview:", t);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
_updateCounter() {
|
|
93
|
+
const e = this.currentPreviewIndex + 1, t = this.totalTemplates, c = this.currentPreviewIndex === 0, o = this.currentPreviewIndex >= t - 1;
|
|
94
|
+
this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled, c), this.api.setUIEAttribute(r.NEXT_BUTTON, i.BUTTON.disabled, o), this.api.setUIEAttribute(
|
|
95
|
+
r.COUNTER_TEXT,
|
|
96
|
+
i.LABEL.text,
|
|
97
|
+
`${this.api.translate("Showing")} ${e} ${this.api.translate("of")} ${t}`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
_getPreview() {
|
|
101
|
+
return `
|
|
102
|
+
<div class="unsubscribe-preview-container">
|
|
103
|
+
<div class="unsubscribe-preview-header">
|
|
104
|
+
<div class="unsubscribe-preview-title">${this.api.translate("Unsubscribe Template")}</div>
|
|
105
|
+
<div class="unsubscribe-preview-controls">
|
|
106
|
+
${this._getPrevButton()}
|
|
107
|
+
${this._getCounterText()}
|
|
108
|
+
${this._getNextButton()}
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<unsubscribe-preview name="${r.PREVIEW_IMAGE}"></unsubscribe-preview>
|
|
112
|
+
</div>
|
|
113
|
+
`;
|
|
114
|
+
}
|
|
115
|
+
_getButton() {
|
|
116
|
+
return `
|
|
117
|
+
<${n.BUTTON}
|
|
118
|
+
id="${r.SELECT_BUTTON}"
|
|
119
|
+
class="primary full-width"
|
|
120
|
+
${i.BUTTON.name}="${r.SELECT_BUTTON}"
|
|
121
|
+
${i.BUTTON.caption}="${this.api.translate("Select Template")}"
|
|
122
|
+
>
|
|
123
|
+
</${n.BUTTON}>
|
|
124
|
+
`;
|
|
125
|
+
}
|
|
126
|
+
_getLabel(e, t) {
|
|
127
|
+
return `
|
|
128
|
+
<${n.LABEL}
|
|
129
|
+
${i.LABEL.text}="${e}"
|
|
130
|
+
${i.LABEL.name}="${t}"
|
|
131
|
+
>
|
|
132
|
+
</${n.LABEL}>
|
|
133
|
+
`;
|
|
134
|
+
}
|
|
135
|
+
_getIconButton(e, t, c) {
|
|
136
|
+
const o = c ? `${i.BUTTON.disabled}="true"` : "";
|
|
137
|
+
return `
|
|
138
|
+
<${n.BUTTON}
|
|
139
|
+
id="${e}"
|
|
140
|
+
class="flat-inline flat-white"
|
|
141
|
+
${i.BUTTON.name}="${e}"
|
|
142
|
+
${o}
|
|
143
|
+
>
|
|
144
|
+
<${n.ICON}
|
|
145
|
+
src="${t}"
|
|
146
|
+
class="icon-button"
|
|
147
|
+
></${n.ICON}>
|
|
148
|
+
</${n.BUTTON}>
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
_getPrevButton() {
|
|
152
|
+
const e = this.currentPreviewIndex === 0;
|
|
153
|
+
return this._getIconButton(r.PREV_BUTTON, "arrow-back", e);
|
|
154
|
+
}
|
|
155
|
+
_getNextButton() {
|
|
156
|
+
const e = this.currentPreviewIndex >= this.totalTemplates - 1;
|
|
157
|
+
return this._getIconButton(r.NEXT_BUTTON, "arrow-right", e);
|
|
158
|
+
}
|
|
159
|
+
_getCounterText() {
|
|
160
|
+
const t = `Showing ${this.currentPreviewIndex + 1} of ${this.totalTemplates}`;
|
|
161
|
+
return this._getLabel(t, r.COUNTER_TEXT);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export {
|
|
165
|
+
g as UNSUBSCRIBE_CONTROL_ID,
|
|
166
|
+
N as UnsubscribeControl
|
|
167
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var n = (i, t, e) => t in i ? r(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var s = (i, t, e) => n(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { UIElement as m } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
const E = "unsubscribe-preview", l = "img", c = "Unsubscribe page preview";
|
|
6
|
+
class o extends m {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
s(this, "imgElement");
|
|
10
|
+
}
|
|
11
|
+
getId() {
|
|
12
|
+
return E;
|
|
13
|
+
}
|
|
14
|
+
getTemplate() {
|
|
15
|
+
return `
|
|
16
|
+
<div class="unsubscribe-preview-image-container">
|
|
17
|
+
<img
|
|
18
|
+
src=""
|
|
19
|
+
alt="${c}"
|
|
20
|
+
class="unsubscribe-preview-image"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
onRender(e) {
|
|
26
|
+
this.imgElement = e.querySelector(l);
|
|
27
|
+
}
|
|
28
|
+
setValue(e) {
|
|
29
|
+
this.imgElement && (this.imgElement.src = e);
|
|
30
|
+
}
|
|
31
|
+
getValue() {
|
|
32
|
+
var e;
|
|
33
|
+
return ((e = this.imgElement) == null ? void 0 : e.src) ?? "";
|
|
34
|
+
}
|
|
35
|
+
onDestroy() {
|
|
36
|
+
this.imgElement = void 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
E as PREVIEW_UI_ELEMENT_ID,
|
|
41
|
+
o as PreviewUIElement
|
|
42
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExtensionBuilder as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { UnsubscribeBlock as i } from "./block.js";
|
|
3
|
+
import { UnsubscribeControl as t } from "./control.js";
|
|
4
|
+
import { PreviewUIElement as o } from "./elements/preview.js";
|
|
5
|
+
import { UnsubscribeIconsRegistry as r } from "./iconsRegistry.js";
|
|
6
|
+
import { SettingsPanel as s } from "./settingsPanel.js";
|
|
7
|
+
import n from "./styles.css.js";
|
|
8
|
+
import { UnsubscribeTagRegistry as l } from "./tagRegistry.js";
|
|
9
|
+
const f = new e().addBlock(i).withSettingsPanelRegistry(s).addControl(t).addUiElement(o).addStyles(n).withLocalization({
|
|
10
|
+
en: {
|
|
11
|
+
"Unsubscribe Block": "Unsubscribe Block",
|
|
12
|
+
"Unsubscribe Block Description": "Add an unsubscribe link to your email",
|
|
13
|
+
"Select Template": "Select Template",
|
|
14
|
+
"Unsubscribe Template": "Unsubscribe Template",
|
|
15
|
+
Showing: "Showing",
|
|
16
|
+
of: "of"
|
|
17
|
+
}
|
|
18
|
+
}).withUiElementTagRegistry(l).withIconsRegistry(r).build();
|
|
19
|
+
export {
|
|
20
|
+
f as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IconsRegistry as s } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
class i extends s {
|
|
3
|
+
registerIconsSvg(C) {
|
|
4
|
+
C["unsubscribe-icon"] = `
|
|
5
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<path d="M4.5 9C6.98528 9 9 11.0147 9 13.5C9 15.9853 6.98528 18 4.5 18C2.01472 18 0 15.9853 0 13.5C0
|
|
7
|
+
11.0147 2.01472 9 4.5 9ZM2.17383 12.5879C2.06286 12.8707 2 13.1778 2 13.5C2 14.8807 3.11929 16 4.5
|
|
8
|
+
16C4.82196 16 5.12848 15.936 5.41113 15.8252L2.17383 12.5879ZM4.5 11C4.17785 11 3.87068 11.0629 3.58789
|
|
9
|
+
11.1738L6.8252 14.4111C6.93604 14.1285 7 13.822 7 13.5C7 12.1193 5.88071 11 4.5 11ZM16 0C17.1046 0 18
|
|
10
|
+
0.895431 18 2L18 12C18 13.1046 17.1046 14 16 14H11C10.4477 14 10 13.5523 10 13C10 12.4477 10.4477 12 11
|
|
11
|
+
12H16L16 5.93262L9.49609 8.87305C9.35966 8.94801 9.20653 8.99125 9.04883 8.99805C9.03254 8.99891 9.01624
|
|
12
|
+
8.99895 9 8.99902C8.98344 8.99894 8.9668 8.99894 8.9502 8.99805C8.79257 8.99109 8.63925 8.9481 8.50293
|
|
13
|
+
8.87305L2 5.93262L2 8C2 8.55229 1.55228 9 1 9C0.447715 9 0 8.55229 0 8L0 2C0 0.895431 0.895431
|
|
14
|
+
9.69188e-09 2 0L16 0ZM2 3.80664L9 6.96973L16 3.80664V2L2 2L2 3.80664Z" fill="#666666"/>
|
|
15
|
+
</svg>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
i as UnsubscribeIconsRegistry
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SettingsPanelRegistry as e, SettingsPanelTab as N, SettingsTab as t, TextControls as O } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { UNSUBSCRIBE_BLOCK_ID as I } from "./block.js";
|
|
3
|
+
import { UNSUBSCRIBE_CONTROL_ID as _ } from "./control.js";
|
|
4
|
+
class R extends e {
|
|
5
|
+
registerBlockControls(T) {
|
|
6
|
+
T[I] = [
|
|
7
|
+
new N(
|
|
8
|
+
t.SETTINGS,
|
|
9
|
+
[
|
|
10
|
+
_,
|
|
11
|
+
O.FORMAT,
|
|
12
|
+
O.ALIGN,
|
|
13
|
+
O.LINE_HEIGHT,
|
|
14
|
+
O.DIRECTION,
|
|
15
|
+
O.INTERNAL_INDENTS,
|
|
16
|
+
O.HIDDEN_NODE
|
|
17
|
+
]
|
|
18
|
+
),
|
|
19
|
+
new N(
|
|
20
|
+
t.STYLES,
|
|
21
|
+
[
|
|
22
|
+
O.TEXT_BLOCK_BACKGROUND_COLOR,
|
|
23
|
+
O.FONT_FAMILY,
|
|
24
|
+
O.FONT_SIZE,
|
|
25
|
+
O.FONT_COLOR,
|
|
26
|
+
O.FONT_BACKGROUND_COLOR,
|
|
27
|
+
O.LINKS_COLOR
|
|
28
|
+
]
|
|
29
|
+
)
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
R as SettingsPanel
|
|
35
|
+
};
|