@useinsider/guido 1.0.3-beta.367d151 → 1.0.3-beta.3757462

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.
Files changed (111) hide show
  1. package/dist/@types/generic.d.ts +0 -14
  2. package/dist/components/Guido.vue.d.ts +2 -3
  3. package/dist/components/Guido.vue.js +9 -11
  4. package/dist/components/Guido.vue2.js +69 -75
  5. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +1 -3
  6. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
  7. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +17 -30
  8. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +1 -3
  9. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +10 -12
  10. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -19
  11. package/dist/components/wrappers/WpDrawer.vue.d.ts +4 -6
  12. package/dist/components/wrappers/WpDrawer.vue.js +4 -6
  13. package/dist/composables/useStripo.js +18 -26
  14. package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
  15. package/dist/config/migrator/index.d.ts +1 -1
  16. package/dist/config/migrator/index.js +6 -7
  17. package/dist/enums/defaults.js +0 -4
  18. package/dist/enums/unsubscribe.d.ts +0 -23
  19. package/dist/enums/unsubscribe.js +6 -43
  20. package/dist/extensions/Blocks/Checkbox/control.js +54 -53
  21. package/dist/extensions/Blocks/RadioButton/control.js +45 -44
  22. package/dist/extensions/Blocks/RadioButton/template.js +6 -6
  23. package/dist/guido.css +1 -1
  24. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +71 -83
  25. package/dist/stores/editor.d.ts +0 -21
  26. package/dist/stores/editor.js +1 -2
  27. package/dist/stores/unsubscribe.d.ts +5 -253
  28. package/dist/stores/unsubscribe.js +6 -126
  29. package/dist/utils/dateUtil.d.ts +0 -4
  30. package/dist/utils/dateUtil.js +12 -8
  31. package/dist/utils/genericUtil.d.ts +0 -1
  32. package/dist/utils/genericUtil.js +7 -8
  33. package/dist/utils/templatePreparation.js +16 -17
  34. package/package.json +2 -2
  35. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
  36. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
  37. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
  38. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -2
  39. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
  40. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
  41. package/dist/components/organisms/extensions/recommendation/Filters.vue.d.ts +0 -2
  42. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
  43. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
  44. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
  45. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
  46. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
  47. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
  48. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
  49. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
  50. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
  51. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
  52. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
  53. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
  54. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
  55. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
  56. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
  57. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
  58. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
  59. package/dist/config/migrator/unsubscribeMigrator.d.ts +0 -1
  60. package/dist/config/migrator/unsubscribeMigrator.js +0 -124
  61. package/dist/enums/date.d.ts +0 -13
  62. package/dist/enums/date.js +0 -16
  63. package/dist/enums/extensions/recommendationBlock.d.ts +0 -16
  64. package/dist/enums/extensions/recommendationBlock.js +0 -80
  65. package/dist/extensions/Blocks/Recommendation/block.d.ts +0 -10
  66. package/dist/extensions/Blocks/Recommendation/block.js +0 -27
  67. package/dist/extensions/Blocks/Recommendation/control.d.ts +0 -29
  68. package/dist/extensions/Blocks/Recommendation/control.js +0 -277
  69. package/dist/extensions/Blocks/Recommendation/extension.d.ts +0 -2
  70. package/dist/extensions/Blocks/Recommendation/extension.js +0 -10
  71. package/dist/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
  72. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
  73. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
  74. package/dist/extensions/Blocks/Recommendation/settingsPanel.d.ts +0 -4
  75. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -32
  76. package/dist/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
  77. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
  78. package/dist/extensions/Blocks/Recommendation/template.d.ts +0 -6
  79. package/dist/extensions/Blocks/Recommendation/template.js +0 -200
  80. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
  81. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
  82. package/dist/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
  83. package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
  84. package/dist/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
  85. package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
  86. package/dist/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
  87. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
  88. package/dist/extensions/Blocks/Unsubscribe/extension.d.ts +0 -2
  89. package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
  90. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
  91. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
  92. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
  93. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
  94. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
  95. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
  96. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
  97. package/dist/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
  98. package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
  99. package/dist/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
  100. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
  101. package/dist/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
  102. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
  103. package/dist/extensions/Blocks/common-control.d.ts +0 -66
  104. package/dist/extensions/Blocks/common-control.js +0 -102
  105. package/dist/mock/api/recommendation.d.ts +0 -2
  106. package/dist/services/recommendationApi.d.ts +0 -6
  107. package/dist/services/recommendationApi.js +0 -43
  108. package/dist/services/unsubscribeApi.d.ts +0 -4
  109. package/dist/services/unsubscribeApi.js +0 -16
  110. package/dist/stores/config.d.ts +0 -97
  111. package/dist/stores/config.js +0 -17
@@ -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,167 +0,0 @@
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
- };
@@ -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,42 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("@stripoinc/ui-editor-extensions").Extension;
2
- export default _default;
@@ -1,21 +0,0 @@
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
- };
@@ -1,4 +0,0 @@
1
- import { IconsRegistry } from '@stripoinc/ui-editor-extensions';
2
- export declare class UnsubscribeIconsRegistry extends IconsRegistry {
3
- registerIconsSvg(iconsMap: Record<string, string>): void;
4
- }
@@ -1,21 +0,0 @@
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
- };
@@ -1,4 +0,0 @@
1
- import { SettingsPanelRegistry, SettingsPanelTab } from '@stripoinc/ui-editor-extensions';
2
- export declare class SettingsPanel extends SettingsPanelRegistry {
3
- registerBlockControls(blockControlsMap: Record<string, SettingsPanelTab[]>): void;
4
- }
@@ -1,35 +0,0 @@
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
- };
@@ -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,4 +0,0 @@
1
- import { UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
2
- export declare class UnsubscribeTagRegistry extends UIElementTagRegistry {
3
- registerUiElements(uiElementsTagsMap: Record<string, string>): void;
4
- }
@@ -1,10 +0,0 @@
1
- import { UIElementTagRegistry as s } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { PREVIEW_UI_ELEMENT_ID as e } from "./elements/preview.js";
3
- class m extends s {
4
- registerUiElements(r) {
5
- r[e] = e;
6
- }
7
- }
8
- export {
9
- m as UnsubscribeTagRegistry
10
- };
@@ -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,22 +0,0 @@
1
- import { BlockType as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- const s = "unsubscribe", n = "{{ins-unsubscribe-link}}", t = `
3
- <${e.BLOCK_TEXT}
4
- class="unsubscribe-block-v2 esd-block-unsubscribe es-p0"
5
- align="center"
6
- data-unsubscribe-page-type=""
7
- data-unsubscribe-page-list=""
8
- >
9
- <p>You can <strong><a
10
- href="${n}"
11
- class="unsubscribe-link"
12
- target="_blank"
13
- data-unsubscribe-link="true"
14
- >${s}</a></strong> from our emails, if you need to.</p>
15
- </${e.BLOCK_TEXT}>
16
- `;
17
- function r() {
18
- return t;
19
- }
20
- export {
21
- r as getDefaultTemplate
22
- };
@@ -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,11 +0,0 @@
1
- const s = {
2
- SELECT: "unsubscribe:select",
3
- CANCEL: "unsubscribe:cancel"
4
- }, e = {
5
- PAGE_TYPE: "data-unsubscribe-page-type",
6
- PAGE_LIST: "data-unsubscribe-page-list"
7
- };
8
- export {
9
- e as DATA_ATTRIBUTES,
10
- s as UNSUBSCRIBE_EVENTS
11
- };
@@ -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,6 +0,0 @@
1
- function t(e) {
2
- return e.split(",").map((r) => Number(r.trim())).filter((r) => !Number.isNaN(r) && r > 0);
3
- }
4
- export {
5
- t as parsePageList
6
- };
@@ -1,66 +0,0 @@
1
- import { Control, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
- interface TextInputProps {
3
- name: string;
4
- placeholder?: string;
5
- className?: string;
6
- }
7
- interface LabelProps {
8
- text: string;
9
- name?: string;
10
- position?: 'top' | 'left';
11
- }
12
- interface IconButtonProps {
13
- name: string;
14
- icon: string;
15
- className?: string;
16
- }
17
- interface SelectProps {
18
- name: string;
19
- placeholder: string;
20
- options: {
21
- text: string;
22
- value: string;
23
- }[];
24
- className?: string;
25
- }
26
- interface CounterProps {
27
- name: string;
28
- maxValue: number;
29
- minValue?: number;
30
- step?: number;
31
- }
32
- interface ButtonProps {
33
- name: string;
34
- label: string;
35
- id?: string;
36
- }
37
- /**
38
- * Common control for all blocks which includes common UI Elements.
39
- * If you need to add a new UI Element, you can add it here.
40
- */
41
- export declare abstract class CommonControl extends Control {
42
- currentNode?: ImmutableHtmlNode;
43
- abstract getId(): string;
44
- abstract getTemplate(): string;
45
- abstract onRender(): Promise<void> | void;
46
- getContainer(): ShadowRoot;
47
- onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
48
- _GuLabel({ text, name, position }: LabelProps): string;
49
- _GuToggle(name: string): string;
50
- _GuSelectItem({ text, value }: {
51
- text: string;
52
- value: string;
53
- }): string;
54
- _GuSelect({ name, placeholder, options, className }: SelectProps): string;
55
- _GuTextInput({ name, placeholder, className }: TextInputProps): string;
56
- _GuCounter({ name, maxValue, minValue, step }: CounterProps): string;
57
- _GuButton({ name, label, id }: ButtonProps): string;
58
- /**
59
- *
60
- * @param param0
61
- * @returns It returns a button with an icon.
62
- */
63
- _GuIconButton({ name, icon, className }: IconButtonProps): string;
64
- _GuTwoColumns(children: string[]): string;
65
- }
66
- export {};
@@ -1,102 +0,0 @@
1
- var l = Object.defineProperty;
2
- var C = (E, o, e) => o in E ? l(E, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : E[o] = e;
3
- var u = (E, o, e) => C(E, typeof o != "symbol" ? o + "" : o, e);
4
- import { Control as c, UIElementType as $, UEAttr as t } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- class L extends c {
6
- constructor() {
7
- super(...arguments);
8
- u(this, "currentNode");
9
- }
10
- getContainer() {
11
- var e;
12
- return (e = document.querySelector("ui-editor")) == null ? void 0 : e.shadowRoot;
13
- }
14
- onTemplateNodeUpdated(e) {
15
- this.currentNode = e;
16
- }
17
- _GuLabel({ text: e, name: T = "", position: n = "top" }) {
18
- return `
19
- <${$.LABEL}
20
- style="${n === "top" ? "margin-bottom: 8px;" : ""}"
21
- ${t.LABEL.text}="${e}"
22
- ${t.LABEL.name}="${T || `${e} Label`}">
23
- </${$.LABEL}>
24
- `;
25
- }
26
- _GuToggle(e) {
27
- return `
28
- <${$.SWITCHER}
29
- ${t.SWITCHER.name}="${e}">
30
- </${$.SWITCHER}>
31
- `;
32
- }
33
- _GuSelectItem({ text: e, value: T }) {
34
- return `
35
- <${$.SELECT_ITEM}
36
- ${t.SELECT_ITEM.text}="${e}"
37
- ${t.SELECT_ITEM.value}="${T}">
38
- </${$.SELECT_ITEM}>`;
39
- }
40
- _GuSelect({ name: e, placeholder: T, options: n, className: r = "es-180w" }) {
41
- return `
42
- <${$.SELECTPICKER}
43
- class="${r}"
44
- ${t.SELECTPICKER.name}="${e}"
45
- ${t.SELECTPICKER.placeholder}="${T}">
46
- ${n.map((a) => this._GuSelectItem(a)).join("")}
47
- </${$.SELECTPICKER}>
48
- `;
49
- }
50
- _GuTextInput({ name: e, placeholder: T, className: n = "" }) {
51
- return `
52
- <${$.TEXT}
53
- class=${n}
54
- ${t.TEXT.name}="${e}"
55
- placeholder="${T || e}">
56
- </${$.TEXT}>
57
- `;
58
- }
59
- _GuCounter({ name: e, maxValue: T, minValue: n = 1, step: r = 1 }) {
60
- return `
61
- <${$.COUNTER}
62
- ${t.COUNTER.name}="${e}"
63
- ${t.COUNTER.minValue}="${n}"
64
- ${t.COUNTER.maxValue}="${T}"
65
- ${t.COUNTER.step}="${r}">
66
- </${$.COUNTER}>
67
- `;
68
- }
69
- _GuButton({ name: e, label: T, id: n = "" }) {
70
- return `
71
- <${$.BUTTON}
72
- ${t.BUTTON.name}="${e}"
73
- ${n ? `id="${n}"` : ""}
74
- ${t.BUTTON.caption}="${T}"}>
75
- </${$.BUTTON}>
76
- `;
77
- }
78
- /**
79
- *
80
- * @param param0
81
- * @returns It returns a button with an icon.
82
- */
83
- _GuIconButton({ name: e, icon: T, className: n = "" }) {
84
- return `
85
- <${$.BUTTON}
86
- class="${n}"
87
- ${t.BUTTON.name}="${e}"
88
- ${t.BUTTON.icon}="${T}">
89
- </${$.BUTTON}>
90
- `;
91
- }
92
- _GuTwoColumns(e) {
93
- return `
94
- <div class="checkbox-select-container container two-columns">
95
- ${e.join("")}
96
- </div>
97
- `;
98
- }
99
- }
100
- export {
101
- L as CommonControl
102
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("msw").HttpHandler[];
2
- export default _default;
@@ -1,6 +0,0 @@
1
- import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams } from '@@/Types/recommendation';
2
- export declare const useRecommendationApi: () => {
3
- fetchRecommendationCreateData: () => Promise<InitialResponse>;
4
- fetchRecommendationFilters: () => Promise<FiltersResponse>;
5
- fetchRecommendationProducts: (strategy: string, params: RecommendationProductsParams) => Promise<RecommendationProduct[]>;
6
- };