@useinsider/guido 1.0.3-beta.6541b5a → 1.0.3-beta.671eb65
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 +13 -0
- package/dist/components/Guido.vue.d.ts +2 -2
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +74 -68
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +2 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.d.ts +2 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- 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 +26 -18
- package/dist/config/compiler/unsubscribeCompilerRules.js +42 -29
- package/dist/config/migrator/couponBlockMigrator.js +24 -21
- package/dist/config/migrator/index.d.ts +1 -1
- package/dist/config/migrator/index.js +7 -6
- 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/extensions/recommendationBlock.d.ts +16 -0
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/enums/unsubscribe.d.ts +23 -0
- package/dist/enums/unsubscribe.js +43 -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 +55 -67
- 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 +1 -0
- package/dist/extensions/Blocks/CouponBlock/block.js +14 -24
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -16
- 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.js +16 -29
- package/dist/extensions/Blocks/CouponBlock/template.js +1 -1
- 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 +40 -52
- 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 +13 -24
- package/dist/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/extensions/Blocks/Recommendation/block.js +27 -0
- package/dist/extensions/Blocks/Recommendation/control.d.ts +29 -0
- package/dist/extensions/Blocks/Recommendation/control.js +277 -0
- package/dist/extensions/Blocks/Recommendation/extension.d.ts +2 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +10 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +32 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- 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/Blocks/common-control.d.ts +66 -0
- package/dist/extensions/Blocks/common-control.js +102 -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/mock/api/recommendation.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +659 -0
- package/dist/services/recommendationApi.d.ts +6 -0
- package/dist/services/recommendationApi.js +43 -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/editor.d.ts +21 -0
- package/dist/stores/editor.js +2 -1
- package/dist/stores/unsubscribe.d.ts +253 -5
- package/dist/stores/unsubscribe.js +126 -6
- package/dist/utils/genericUtil.d.ts +1 -0
- package/dist/utils/genericUtil.js +8 -7
- package/dist/utils/templatePreparation.js +17 -16
- package/package.json +3 -3
- 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
- package/dist/static/assets/icons/coupon.svg.js +0 -4
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useHttp as c } from "../composables/useHttp.js";
|
|
2
|
+
import { URLS as a } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
import { useEditorStore as m } from "../stores/editor.js";
|
|
4
|
+
import { replaceString as s } from "../utils/genericUtil.js";
|
|
5
|
+
const l = () => {
|
|
6
|
+
const { get: o } = c();
|
|
7
|
+
return {
|
|
8
|
+
fetchRecommendationCreateData: async () => {
|
|
9
|
+
const e = m();
|
|
10
|
+
try {
|
|
11
|
+
return (await o(s(
|
|
12
|
+
"/newsletter/{id}/recommendations/get-campaign-create-data",
|
|
13
|
+
{ id: e.templateId }
|
|
14
|
+
))).data;
|
|
15
|
+
} catch (t) {
|
|
16
|
+
throw console.error("fetchUserModalState error:", t), t;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
fetchRecommendationFilters: async () => {
|
|
20
|
+
try {
|
|
21
|
+
const { data: e } = await o("/stripo/email-recommendation-attributes");
|
|
22
|
+
return e;
|
|
23
|
+
} catch (e) {
|
|
24
|
+
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
fetchRecommendationProducts: async (e, t) => {
|
|
28
|
+
try {
|
|
29
|
+
const r = decodeURIComponent(new URLSearchParams(Object.entries(t)).toString());
|
|
30
|
+
console.debug("🏁 Recommendation API Query:", r);
|
|
31
|
+
const n = await o(
|
|
32
|
+
`${a.RECOMMENDATION_API_URL}/v2/${e}?${r}`
|
|
33
|
+
);
|
|
34
|
+
return (n == null ? void 0 : n.data) ?? [];
|
|
35
|
+
} catch (r) {
|
|
36
|
+
throw console.error("fetchRecommendationProducts error:", r), r;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
l as useRecommendationApi
|
|
43
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useHttp as t } from "../composables/useHttp.js";
|
|
2
|
+
import { useToaster as n } from "../composables/useToaster.js";
|
|
3
|
+
const u = () => {
|
|
4
|
+
const { get: r } = t(), { handleError: s } = n();
|
|
5
|
+
return { getUnsubscribePages: async () => {
|
|
6
|
+
try {
|
|
7
|
+
const { data: e = [] } = await r("/unsubscribe-pages/get-all");
|
|
8
|
+
return e;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return s(e, "Failed to fetch unsubscribe pages"), [];
|
|
11
|
+
}
|
|
12
|
+
} };
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
u as useUnsubscribeApi
|
|
16
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { GuidoConfig, TemplateConfig } from '@@/Types/generic';
|
|
2
|
+
interface StoreState {
|
|
3
|
+
guidoConfig: GuidoConfig;
|
|
4
|
+
templateConfig?: TemplateConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const useConfigStore: import("pinia").StoreDefinition<"config", StoreState, {
|
|
7
|
+
getVariationId: (state: {
|
|
8
|
+
guidoConfig: {
|
|
9
|
+
translationsPath: string;
|
|
10
|
+
htmlCompilerRules?: ({
|
|
11
|
+
type: "replace";
|
|
12
|
+
search: string;
|
|
13
|
+
replacement: string;
|
|
14
|
+
replaceAll?: boolean | undefined;
|
|
15
|
+
id: string;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
priority: number;
|
|
18
|
+
} | {
|
|
19
|
+
type: "regex";
|
|
20
|
+
pattern: string;
|
|
21
|
+
replacement: string;
|
|
22
|
+
flags?: string | undefined;
|
|
23
|
+
id: string;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
priority: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: "remove";
|
|
28
|
+
targets: string[] | {
|
|
29
|
+
exec: (string: string) => RegExpExecArray | null;
|
|
30
|
+
test: (string: string) => boolean;
|
|
31
|
+
readonly source: string;
|
|
32
|
+
readonly global: boolean;
|
|
33
|
+
readonly ignoreCase: boolean;
|
|
34
|
+
readonly multiline: boolean;
|
|
35
|
+
lastIndex: number;
|
|
36
|
+
compile: (pattern: string, flags?: string) => RegExp;
|
|
37
|
+
readonly flags: string;
|
|
38
|
+
readonly sticky: boolean;
|
|
39
|
+
readonly unicode: boolean;
|
|
40
|
+
readonly dotAll: boolean;
|
|
41
|
+
readonly hasIndices: boolean;
|
|
42
|
+
[Symbol.match]: (string: string) => RegExpMatchArray | null;
|
|
43
|
+
[Symbol.replace]: {
|
|
44
|
+
(string: string, replaceValue: string): string;
|
|
45
|
+
(string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
46
|
+
};
|
|
47
|
+
[Symbol.search]: (string: string) => number;
|
|
48
|
+
[Symbol.split]: (string: string, limit?: number) => string[];
|
|
49
|
+
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
|
50
|
+
}[];
|
|
51
|
+
id: string;
|
|
52
|
+
description?: string | undefined;
|
|
53
|
+
priority: number;
|
|
54
|
+
} | {
|
|
55
|
+
type: "custom";
|
|
56
|
+
processor: (html: string) => string;
|
|
57
|
+
id: string;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
priority: number;
|
|
60
|
+
})[] | undefined;
|
|
61
|
+
ignoreDefaultHtmlCompilerRules?: boolean | undefined;
|
|
62
|
+
useHeader?: boolean | undefined;
|
|
63
|
+
emailHeader: {
|
|
64
|
+
senderName: string;
|
|
65
|
+
subject: string;
|
|
66
|
+
};
|
|
67
|
+
partner?: {
|
|
68
|
+
partnerName: string;
|
|
69
|
+
productType: number;
|
|
70
|
+
messageType: number;
|
|
71
|
+
} | undefined;
|
|
72
|
+
extensions?: {
|
|
73
|
+
unsubscribe?: boolean | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
features?: {
|
|
76
|
+
dynamicContent?: boolean | undefined;
|
|
77
|
+
saveAsTemplate?: boolean | undefined;
|
|
78
|
+
versionHistory?: boolean | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
};
|
|
81
|
+
templateConfig?: {
|
|
82
|
+
preselectedDynamicContentList?: {
|
|
83
|
+
value: string;
|
|
84
|
+
text: string;
|
|
85
|
+
fallback?: string | undefined;
|
|
86
|
+
format?: {
|
|
87
|
+
key: string;
|
|
88
|
+
value: string;
|
|
89
|
+
} | undefined;
|
|
90
|
+
}[] | undefined;
|
|
91
|
+
selectedUnsubscribePages?: number[] | undefined;
|
|
92
|
+
variationId?: string | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => string;
|
|
95
|
+
}, {}>;
|
|
96
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DefaultGuidoConfig as e } from "../enums/defaults.js";
|
|
2
|
+
import { defineStore as i } from "pinia";
|
|
3
|
+
const r = i("config", {
|
|
4
|
+
state: () => ({
|
|
5
|
+
guidoConfig: e,
|
|
6
|
+
templateConfig: {}
|
|
7
|
+
}),
|
|
8
|
+
getters: {
|
|
9
|
+
getVariationId: (t) => {
|
|
10
|
+
var o;
|
|
11
|
+
return ((o = t.templateConfig) == null ? void 0 : o.variationId) ?? "";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
r as useConfigStore
|
|
17
|
+
};
|
package/dist/stores/editor.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
7
7
|
editorVisualMode: string;
|
|
8
8
|
hasChanges: boolean;
|
|
9
9
|
isStripoInitialized: boolean;
|
|
10
|
+
templateId: string;
|
|
10
11
|
}, {
|
|
11
12
|
isUndoButtonDisabled: (state: {
|
|
12
13
|
loadingStatus: boolean;
|
|
@@ -17,6 +18,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
17
18
|
editorVisualMode: string;
|
|
18
19
|
hasChanges: boolean;
|
|
19
20
|
isStripoInitialized: boolean;
|
|
21
|
+
templateId: string;
|
|
20
22
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
21
23
|
loadingStatus: boolean;
|
|
22
24
|
isCodeEditorOpen: boolean;
|
|
@@ -26,6 +28,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
26
28
|
editorVisualMode: string;
|
|
27
29
|
hasChanges: boolean;
|
|
28
30
|
isStripoInitialized: boolean;
|
|
31
|
+
templateId: string;
|
|
29
32
|
}>) => boolean;
|
|
30
33
|
isRedoButtonDisabled: (state: {
|
|
31
34
|
loadingStatus: boolean;
|
|
@@ -36,6 +39,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
36
39
|
editorVisualMode: string;
|
|
37
40
|
hasChanges: boolean;
|
|
38
41
|
isStripoInitialized: boolean;
|
|
42
|
+
templateId: string;
|
|
39
43
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
40
44
|
loadingStatus: boolean;
|
|
41
45
|
isCodeEditorOpen: boolean;
|
|
@@ -45,6 +49,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
45
49
|
editorVisualMode: string;
|
|
46
50
|
hasChanges: boolean;
|
|
47
51
|
isStripoInitialized: boolean;
|
|
52
|
+
templateId: string;
|
|
48
53
|
}>) => boolean;
|
|
49
54
|
isCodeEditorButtonDisabled: (state: {
|
|
50
55
|
loadingStatus: boolean;
|
|
@@ -55,6 +60,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
55
60
|
editorVisualMode: string;
|
|
56
61
|
hasChanges: boolean;
|
|
57
62
|
isStripoInitialized: boolean;
|
|
63
|
+
templateId: string;
|
|
58
64
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
59
65
|
loadingStatus: boolean;
|
|
60
66
|
isCodeEditorOpen: boolean;
|
|
@@ -64,6 +70,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
64
70
|
editorVisualMode: string;
|
|
65
71
|
hasChanges: boolean;
|
|
66
72
|
isStripoInitialized: boolean;
|
|
73
|
+
templateId: string;
|
|
67
74
|
}>) => boolean;
|
|
68
75
|
isPreviewButtonDisabled: (state: {
|
|
69
76
|
loadingStatus: boolean;
|
|
@@ -74,6 +81,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
74
81
|
editorVisualMode: string;
|
|
75
82
|
hasChanges: boolean;
|
|
76
83
|
isStripoInitialized: boolean;
|
|
84
|
+
templateId: string;
|
|
77
85
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
78
86
|
loadingStatus: boolean;
|
|
79
87
|
isCodeEditorOpen: boolean;
|
|
@@ -83,6 +91,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
83
91
|
editorVisualMode: string;
|
|
84
92
|
hasChanges: boolean;
|
|
85
93
|
isStripoInitialized: boolean;
|
|
94
|
+
templateId: string;
|
|
86
95
|
}>) => boolean;
|
|
87
96
|
isViewOptionsDisabled: (state: {
|
|
88
97
|
loadingStatus: boolean;
|
|
@@ -93,6 +102,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
93
102
|
editorVisualMode: string;
|
|
94
103
|
hasChanges: boolean;
|
|
95
104
|
isStripoInitialized: boolean;
|
|
105
|
+
templateId: string;
|
|
96
106
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
97
107
|
loadingStatus: boolean;
|
|
98
108
|
isCodeEditorOpen: boolean;
|
|
@@ -102,6 +112,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
102
112
|
editorVisualMode: string;
|
|
103
113
|
hasChanges: boolean;
|
|
104
114
|
isStripoInitialized: boolean;
|
|
115
|
+
templateId: string;
|
|
105
116
|
}>) => boolean;
|
|
106
117
|
isVersionHistoryButtonDisabled: (state: {
|
|
107
118
|
loadingStatus: boolean;
|
|
@@ -112,6 +123,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
112
123
|
editorVisualMode: string;
|
|
113
124
|
hasChanges: boolean;
|
|
114
125
|
isStripoInitialized: boolean;
|
|
126
|
+
templateId: string;
|
|
115
127
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
116
128
|
loadingStatus: boolean;
|
|
117
129
|
isCodeEditorOpen: boolean;
|
|
@@ -121,6 +133,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
121
133
|
editorVisualMode: string;
|
|
122
134
|
hasChanges: boolean;
|
|
123
135
|
isStripoInitialized: boolean;
|
|
136
|
+
templateId: string;
|
|
124
137
|
}>) => boolean;
|
|
125
138
|
isExportButtonDisabled: (state: {
|
|
126
139
|
loadingStatus: boolean;
|
|
@@ -131,6 +144,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
131
144
|
editorVisualMode: string;
|
|
132
145
|
hasChanges: boolean;
|
|
133
146
|
isStripoInitialized: boolean;
|
|
147
|
+
templateId: string;
|
|
134
148
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
135
149
|
loadingStatus: boolean;
|
|
136
150
|
isCodeEditorOpen: boolean;
|
|
@@ -140,6 +154,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
140
154
|
editorVisualMode: string;
|
|
141
155
|
hasChanges: boolean;
|
|
142
156
|
isStripoInitialized: boolean;
|
|
157
|
+
templateId: string;
|
|
143
158
|
}>) => boolean;
|
|
144
159
|
isSaveAsButtonDisabled: (state: {
|
|
145
160
|
loadingStatus: boolean;
|
|
@@ -150,6 +165,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
150
165
|
editorVisualMode: string;
|
|
151
166
|
hasChanges: boolean;
|
|
152
167
|
isStripoInitialized: boolean;
|
|
168
|
+
templateId: string;
|
|
153
169
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
154
170
|
loadingStatus: boolean;
|
|
155
171
|
isCodeEditorOpen: boolean;
|
|
@@ -159,6 +175,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
159
175
|
editorVisualMode: string;
|
|
160
176
|
hasChanges: boolean;
|
|
161
177
|
isStripoInitialized: boolean;
|
|
178
|
+
templateId: string;
|
|
162
179
|
}>) => boolean;
|
|
163
180
|
isTestButtonDisabled: (state: {
|
|
164
181
|
loadingStatus: boolean;
|
|
@@ -169,6 +186,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
169
186
|
editorVisualMode: string;
|
|
170
187
|
hasChanges: boolean;
|
|
171
188
|
isStripoInitialized: boolean;
|
|
189
|
+
templateId: string;
|
|
172
190
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
173
191
|
loadingStatus: boolean;
|
|
174
192
|
isCodeEditorOpen: boolean;
|
|
@@ -178,6 +196,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
178
196
|
editorVisualMode: string;
|
|
179
197
|
hasChanges: boolean;
|
|
180
198
|
isStripoInitialized: boolean;
|
|
199
|
+
templateId: string;
|
|
181
200
|
}>) => boolean;
|
|
182
201
|
isSaveButtonDisabled: (state: {
|
|
183
202
|
loadingStatus: boolean;
|
|
@@ -188,6 +207,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
188
207
|
editorVisualMode: string;
|
|
189
208
|
hasChanges: boolean;
|
|
190
209
|
isStripoInitialized: boolean;
|
|
210
|
+
templateId: string;
|
|
191
211
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
192
212
|
loadingStatus: boolean;
|
|
193
213
|
isCodeEditorOpen: boolean;
|
|
@@ -197,5 +217,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
|
|
|
197
217
|
editorVisualMode: string;
|
|
198
218
|
hasChanges: boolean;
|
|
199
219
|
isStripoInitialized: boolean;
|
|
220
|
+
templateId: string;
|
|
200
221
|
}>) => boolean;
|
|
201
222
|
}, {}>;
|
package/dist/stores/editor.js
CHANGED
|
@@ -1,8 +1,256 @@
|
|
|
1
|
-
type UnsubscribePage
|
|
2
|
-
type: number;
|
|
3
|
-
};
|
|
1
|
+
import type { UnsubscribePage } from '@@/Types/unsubscribe';
|
|
4
2
|
interface StoreState {
|
|
5
|
-
|
|
3
|
+
templates: UnsubscribePage[];
|
|
4
|
+
selectedTemplates: Record<number, number>;
|
|
5
|
+
selectedUnsubscribePages: number[];
|
|
6
|
+
selectedCollectionType: number;
|
|
7
|
+
activeType: number;
|
|
8
|
+
pageSelectionUpdateStatus: boolean;
|
|
9
|
+
pageSelectionDrawerStatus: boolean;
|
|
10
|
+
typeSelectionDrawerStatus: boolean;
|
|
11
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
12
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
6
13
|
}
|
|
7
|
-
export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"unsubscribe", StoreState, {
|
|
14
|
+
export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"unsubscribe", StoreState, {
|
|
15
|
+
getSelectedCollection: (state: {
|
|
16
|
+
templates: {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
type: number;
|
|
20
|
+
isVisible: number;
|
|
21
|
+
html: string;
|
|
22
|
+
originalHtml: string;
|
|
23
|
+
css: string;
|
|
24
|
+
thumbnail: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
status: number;
|
|
28
|
+
}[];
|
|
29
|
+
selectedTemplates: Record<number, number>;
|
|
30
|
+
selectedUnsubscribePages: number[];
|
|
31
|
+
selectedCollectionType: number;
|
|
32
|
+
activeType: number;
|
|
33
|
+
pageSelectionUpdateStatus: boolean;
|
|
34
|
+
pageSelectionDrawerStatus: boolean;
|
|
35
|
+
typeSelectionDrawerStatus: boolean;
|
|
36
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
37
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
38
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number[];
|
|
39
|
+
getSelectedTemplateByActiveType: (state: {
|
|
40
|
+
templates: {
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
type: number;
|
|
44
|
+
isVisible: number;
|
|
45
|
+
html: string;
|
|
46
|
+
originalHtml: string;
|
|
47
|
+
css: string;
|
|
48
|
+
thumbnail: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
status: number;
|
|
52
|
+
}[];
|
|
53
|
+
selectedTemplates: Record<number, number>;
|
|
54
|
+
selectedUnsubscribePages: number[];
|
|
55
|
+
selectedCollectionType: number;
|
|
56
|
+
activeType: number;
|
|
57
|
+
pageSelectionUpdateStatus: boolean;
|
|
58
|
+
pageSelectionDrawerStatus: boolean;
|
|
59
|
+
typeSelectionDrawerStatus: boolean;
|
|
60
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
61
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
62
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number;
|
|
63
|
+
getTemplatesByActiveType: (state: {
|
|
64
|
+
templates: {
|
|
65
|
+
id: number;
|
|
66
|
+
name: string;
|
|
67
|
+
type: number;
|
|
68
|
+
isVisible: number;
|
|
69
|
+
html: string;
|
|
70
|
+
originalHtml: string;
|
|
71
|
+
css: string;
|
|
72
|
+
thumbnail: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
status: number;
|
|
76
|
+
}[];
|
|
77
|
+
selectedTemplates: Record<number, number>;
|
|
78
|
+
selectedUnsubscribePages: number[];
|
|
79
|
+
selectedCollectionType: number;
|
|
80
|
+
activeType: number;
|
|
81
|
+
pageSelectionUpdateStatus: boolean;
|
|
82
|
+
pageSelectionDrawerStatus: boolean;
|
|
83
|
+
typeSelectionDrawerStatus: boolean;
|
|
84
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
85
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
86
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
87
|
+
id: number;
|
|
88
|
+
name: string;
|
|
89
|
+
type: number;
|
|
90
|
+
isVisible: number;
|
|
91
|
+
html: string;
|
|
92
|
+
originalHtml: string;
|
|
93
|
+
css: string;
|
|
94
|
+
thumbnail: string;
|
|
95
|
+
createdAt: string;
|
|
96
|
+
updatedAt: string;
|
|
97
|
+
status: number;
|
|
98
|
+
}[];
|
|
99
|
+
getThumbnailByTemplateId: (state: {
|
|
100
|
+
templates: {
|
|
101
|
+
id: number;
|
|
102
|
+
name: string;
|
|
103
|
+
type: number;
|
|
104
|
+
isVisible: number;
|
|
105
|
+
html: string;
|
|
106
|
+
originalHtml: string;
|
|
107
|
+
css: string;
|
|
108
|
+
thumbnail: string;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
updatedAt: string;
|
|
111
|
+
status: number;
|
|
112
|
+
}[];
|
|
113
|
+
selectedTemplates: Record<number, number>;
|
|
114
|
+
selectedUnsubscribePages: number[];
|
|
115
|
+
selectedCollectionType: number;
|
|
116
|
+
activeType: number;
|
|
117
|
+
pageSelectionUpdateStatus: boolean;
|
|
118
|
+
pageSelectionDrawerStatus: boolean;
|
|
119
|
+
typeSelectionDrawerStatus: boolean;
|
|
120
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
121
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
122
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (id: number) => string;
|
|
123
|
+
getSelectedUnsubscribePagesByCollection: (state: {
|
|
124
|
+
templates: {
|
|
125
|
+
id: number;
|
|
126
|
+
name: string;
|
|
127
|
+
type: number;
|
|
128
|
+
isVisible: number;
|
|
129
|
+
html: string;
|
|
130
|
+
originalHtml: string;
|
|
131
|
+
css: string;
|
|
132
|
+
thumbnail: string;
|
|
133
|
+
createdAt: string;
|
|
134
|
+
updatedAt: string;
|
|
135
|
+
status: number;
|
|
136
|
+
}[];
|
|
137
|
+
selectedTemplates: Record<number, number>;
|
|
138
|
+
selectedUnsubscribePages: number[];
|
|
139
|
+
selectedCollectionType: number;
|
|
140
|
+
activeType: number;
|
|
141
|
+
pageSelectionUpdateStatus: boolean;
|
|
142
|
+
pageSelectionDrawerStatus: boolean;
|
|
143
|
+
typeSelectionDrawerStatus: boolean;
|
|
144
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
145
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
146
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (collectionType: number) => number[];
|
|
147
|
+
isActiveTypeFirstInCollection: (state: {
|
|
148
|
+
templates: {
|
|
149
|
+
id: number;
|
|
150
|
+
name: string;
|
|
151
|
+
type: number;
|
|
152
|
+
isVisible: number;
|
|
153
|
+
html: string;
|
|
154
|
+
originalHtml: string;
|
|
155
|
+
css: string;
|
|
156
|
+
thumbnail: string;
|
|
157
|
+
createdAt: string;
|
|
158
|
+
updatedAt: string;
|
|
159
|
+
status: number;
|
|
160
|
+
}[];
|
|
161
|
+
selectedTemplates: Record<number, number>;
|
|
162
|
+
selectedUnsubscribePages: number[];
|
|
163
|
+
selectedCollectionType: number;
|
|
164
|
+
activeType: number;
|
|
165
|
+
pageSelectionUpdateStatus: boolean;
|
|
166
|
+
pageSelectionDrawerStatus: boolean;
|
|
167
|
+
typeSelectionDrawerStatus: boolean;
|
|
168
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
169
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
170
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
171
|
+
isActiveTypeLastInCollection: (state: {
|
|
172
|
+
templates: {
|
|
173
|
+
id: number;
|
|
174
|
+
name: string;
|
|
175
|
+
type: number;
|
|
176
|
+
isVisible: number;
|
|
177
|
+
html: string;
|
|
178
|
+
originalHtml: string;
|
|
179
|
+
css: string;
|
|
180
|
+
thumbnail: string;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
updatedAt: string;
|
|
183
|
+
status: number;
|
|
184
|
+
}[];
|
|
185
|
+
selectedTemplates: Record<number, number>;
|
|
186
|
+
selectedUnsubscribePages: number[];
|
|
187
|
+
selectedCollectionType: number;
|
|
188
|
+
activeType: number;
|
|
189
|
+
pageSelectionUpdateStatus: boolean;
|
|
190
|
+
pageSelectionDrawerStatus: boolean;
|
|
191
|
+
typeSelectionDrawerStatus: boolean;
|
|
192
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
193
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
194
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
195
|
+
hasTemplatesByCollectionType: (state: {
|
|
196
|
+
templates: {
|
|
197
|
+
id: number;
|
|
198
|
+
name: string;
|
|
199
|
+
type: number;
|
|
200
|
+
isVisible: number;
|
|
201
|
+
html: string;
|
|
202
|
+
originalHtml: string;
|
|
203
|
+
css: string;
|
|
204
|
+
thumbnail: string;
|
|
205
|
+
createdAt: string;
|
|
206
|
+
updatedAt: string;
|
|
207
|
+
status: number;
|
|
208
|
+
}[];
|
|
209
|
+
selectedTemplates: Record<number, number>;
|
|
210
|
+
selectedUnsubscribePages: number[];
|
|
211
|
+
selectedCollectionType: number;
|
|
212
|
+
activeType: number;
|
|
213
|
+
pageSelectionUpdateStatus: boolean;
|
|
214
|
+
pageSelectionDrawerStatus: boolean;
|
|
215
|
+
typeSelectionDrawerStatus: boolean;
|
|
216
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
217
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
218
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => Record<number, boolean>;
|
|
219
|
+
unsubscribePagesStatus: (state: {
|
|
220
|
+
templates: {
|
|
221
|
+
id: number;
|
|
222
|
+
name: string;
|
|
223
|
+
type: number;
|
|
224
|
+
isVisible: number;
|
|
225
|
+
html: string;
|
|
226
|
+
originalHtml: string;
|
|
227
|
+
css: string;
|
|
228
|
+
thumbnail: string;
|
|
229
|
+
createdAt: string;
|
|
230
|
+
updatedAt: string;
|
|
231
|
+
status: number;
|
|
232
|
+
}[];
|
|
233
|
+
selectedTemplates: Record<number, number>;
|
|
234
|
+
selectedUnsubscribePages: number[];
|
|
235
|
+
selectedCollectionType: number;
|
|
236
|
+
activeType: number;
|
|
237
|
+
pageSelectionUpdateStatus: boolean;
|
|
238
|
+
pageSelectionDrawerStatus: boolean;
|
|
239
|
+
typeSelectionDrawerStatus: boolean;
|
|
240
|
+
isGlobalUnsubscribeDisabled: boolean;
|
|
241
|
+
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
242
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
243
|
+
}, {
|
|
244
|
+
$reset(): void;
|
|
245
|
+
fetchTemplates(): Promise<void>;
|
|
246
|
+
setCollection(collectionType: number): void;
|
|
247
|
+
setCollectionWithoutAutoSelection(collectionType: number): void;
|
|
248
|
+
setSelectedTemplate(template: number): void;
|
|
249
|
+
setNextType(): void;
|
|
250
|
+
setPreviousType(): void;
|
|
251
|
+
loadSelectedTemplates(templates: number[]): void;
|
|
252
|
+
getSelectedTemplatesByCollection(type: number): number[];
|
|
253
|
+
addUnsubscribePages(pageIds: number[]): void;
|
|
254
|
+
removeUnsubscribePages(pageIds: number[]): void;
|
|
255
|
+
}>;
|
|
8
256
|
export {};
|