@useinsider/guido 1.4.4-beta.c341e0d → 1.4.4-beta.dc62a4d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +664 -295
- package/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +92 -64
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -18
- package/dist/components/organisms/header/RightSlot.vue.js +10 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +28 -25
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +19 -22
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
- package/dist/composables/useBlocksConfig.js +20 -23
- package/dist/composables/useConfig.js +5 -51
- package/dist/composables/useGuidoActions.js +28 -18
- package/dist/composables/useHtmlCompiler.js +19 -20
- package/dist/composables/useHtmlValidator.js +41 -41
- package/dist/composables/usePartner.js +9 -19
- package/dist/composables/useStripo.js +11 -11
- package/dist/composables/useTranslations.js +2 -3
- package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
- package/dist/enums/defaults.js +67 -3
- package/dist/enums/unsubscribe.js +20 -23
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +11 -12
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/guido.css +1 -1
- package/dist/library.js +2 -12
- package/dist/node_modules/lodash-es/_apply.js +16 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
- package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
- package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
- package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/_copyArray.js +9 -0
- package/dist/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
- package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
- package/dist/node_modules/lodash-es/_overRest.js +15 -0
- package/dist/node_modules/lodash-es/_safeGet.js +7 -0
- package/dist/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/lodash-es/_shortOut.js +16 -0
- package/dist/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
- package/dist/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/valibot/dist/index.js +103 -476
- package/dist/services/templateLibraryApi.js +18 -18
- package/dist/src/@types/generic.d.ts +45 -4
- package/dist/src/components/Guido.vue.d.ts +13 -13
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +2 -184
- package/dist/src/composables/useGuidoActions.d.ts +10 -0
- package/dist/src/composables/usePartner.d.ts +0 -8
- package/dist/src/enums/defaults.d.ts +6 -4
- package/dist/src/enums/unsubscribe.d.ts +1 -5
- package/dist/src/library.d.ts +1 -3
- package/dist/src/stores/config.d.ts +102 -1547
- package/dist/stores/config.js +9 -141
- package/package.json +1 -1
- package/dist/@types/config/defaults.js +0 -44
- package/dist/@types/config/schemas.js +0 -229
- package/dist/@types/config/validator.js +0 -56
- package/dist/src/@types/config/defaults.d.ts +0 -68
- package/dist/src/@types/config/index.d.ts +0 -14
- package/dist/src/@types/config/schemas.d.ts +0 -505
- package/dist/src/@types/config/types.d.ts +0 -142
- package/dist/src/@types/config/validator.d.ts +0 -119
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useConfig as
|
|
2
|
-
import { useHttp as
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { EditorType as
|
|
6
|
-
import { useSaveAsTemplateStore as
|
|
1
|
+
import { useConfig as u } from "../composables/useConfig.js";
|
|
2
|
+
import { useHttp as d } from "../composables/useHttp.js";
|
|
3
|
+
import { useToaster as T } from "../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as f } from "../composables/useTranslations.js";
|
|
5
|
+
import { EditorType as w } from "../enums/defaults.js";
|
|
6
|
+
import { useSaveAsTemplateStore as b } from "../stores/save-as-template.js";
|
|
7
7
|
import { base64EncodeWithSpecialChars as a } from "../utils/base64.js";
|
|
8
|
-
import { useTemplatePreparation as
|
|
9
|
-
const
|
|
10
|
-
const { get: m, post: n } =
|
|
8
|
+
import { useTemplatePreparation as h } from "../utils/templatePreparation.js";
|
|
9
|
+
const I = () => {
|
|
10
|
+
const { get: m, post: n } = d(), { handleError: o, showToaster: i } = T(), { config: l } = u(), p = f();
|
|
11
11
|
return {
|
|
12
12
|
getCategories: async () => {
|
|
13
13
|
try {
|
|
@@ -35,14 +35,14 @@ const L = () => {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
createTemplate: async () => {
|
|
38
|
-
var e, t
|
|
38
|
+
var e, t;
|
|
39
39
|
try {
|
|
40
|
-
const { prepareTemplateDetails: c } =
|
|
40
|
+
const { prepareTemplateDetails: c } = h(), r = b(), s = await c(), g = {
|
|
41
41
|
name: r.getTemplateName,
|
|
42
42
|
categories: r.getSelectedCategoryIds,
|
|
43
|
-
productId: ((
|
|
44
|
-
editorType:
|
|
45
|
-
messageType: ((
|
|
43
|
+
productId: ((e = l.partner) == null ? void 0 : e.productType) || 0,
|
|
44
|
+
editorType: w,
|
|
45
|
+
messageType: ((t = l.partner) == null ? void 0 : t.messageType) || 0,
|
|
46
46
|
content: a(s.compiledHtml),
|
|
47
47
|
css: a(s.css),
|
|
48
48
|
unsubscriptionPreferencePageStatus: !1,
|
|
@@ -55,11 +55,11 @@ const L = () => {
|
|
|
55
55
|
html: s.rawHtml,
|
|
56
56
|
css: s.css
|
|
57
57
|
})
|
|
58
|
-
}, { data: { type:
|
|
58
|
+
}, { data: { type: y } } = await n(
|
|
59
59
|
"/newsletter/template-library/create-template",
|
|
60
|
-
|
|
60
|
+
g
|
|
61
61
|
);
|
|
62
|
-
if (
|
|
62
|
+
if (y === "alert") {
|
|
63
63
|
i({
|
|
64
64
|
message: p(
|
|
65
65
|
"newsletter.template-library-save-alert",
|
|
@@ -83,5 +83,5 @@ const L = () => {
|
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
I as useTemplateLibraryApi
|
|
87
87
|
};
|
|
@@ -1,7 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { CompilerRule } from './html-compiler';
|
|
2
|
+
type Extensions = {
|
|
3
|
+
unsubscribe?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type Features = {
|
|
6
|
+
dynamicContent?: boolean;
|
|
7
|
+
saveAsTemplate?: boolean;
|
|
8
|
+
versionHistory?: boolean;
|
|
9
|
+
testMessage?: boolean;
|
|
10
|
+
displayConditions?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type Partner = {
|
|
13
|
+
partnerName: string;
|
|
14
|
+
productType: number;
|
|
15
|
+
messageType: number;
|
|
16
|
+
};
|
|
17
|
+
export type GuidoBlockType = 'amp-accordion' | 'amp-carousel' | 'amp-form-controls' | 'banner-block' | 'button-block' | 'html-block' | 'image-block' | 'menu-block' | 'social-block' | 'spacer-block' | 'text-block' | 'timer-block' | 'video-block';
|
|
18
|
+
export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
|
|
19
|
+
type BlocksConfig = {
|
|
20
|
+
excludeDefaults?: GuidoBlockType[];
|
|
21
|
+
includeCustoms?: GuidoCustomBlockType[];
|
|
22
|
+
};
|
|
23
|
+
export type GuidoConfig = {
|
|
24
|
+
translationsPath: string;
|
|
25
|
+
htmlCompilerRules?: CompilerRule[];
|
|
26
|
+
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
27
|
+
useHeader?: boolean;
|
|
28
|
+
emailHeader: EmailHeader;
|
|
29
|
+
migrationDate: number;
|
|
30
|
+
partner?: Partner;
|
|
31
|
+
extensions?: Extensions;
|
|
32
|
+
features?: Features;
|
|
33
|
+
blocks?: BlocksConfig;
|
|
34
|
+
backButtonLabel?: string;
|
|
35
|
+
};
|
|
36
|
+
export type TemplateConfig = {
|
|
37
|
+
preselectedDynamicContentList?: DynamicContent[];
|
|
38
|
+
selectedUnsubscribePages?: number[];
|
|
39
|
+
variationId?: string;
|
|
40
|
+
};
|
|
5
41
|
export type BaseDynamicContent = {
|
|
6
42
|
value: string;
|
|
7
43
|
fallback?: string;
|
|
@@ -35,6 +71,10 @@ export type MergeTagClickEvent = {
|
|
|
35
71
|
tagValue: string | null;
|
|
36
72
|
tagLabel: string | null;
|
|
37
73
|
};
|
|
74
|
+
export interface EmailHeader {
|
|
75
|
+
senderName: string;
|
|
76
|
+
subject: string;
|
|
77
|
+
}
|
|
38
78
|
export interface TooltipOptions {
|
|
39
79
|
id: string;
|
|
40
80
|
dynamicPosition: boolean;
|
|
@@ -55,3 +95,4 @@ export interface L10n {
|
|
|
55
95
|
timezone?: string;
|
|
56
96
|
time?: number;
|
|
57
97
|
}
|
|
98
|
+
export {};
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type { DynamicContent,
|
|
2
|
-
import type { PositionData } from '@@/Types/generic';
|
|
1
|
+
import type { DynamicContent, GuidoConfig, PositionData, TemplateConfig } from '@@/Types/generic';
|
|
3
2
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
4
3
|
type __VLS_Props = {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
templateId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
messageType?: number;
|
|
7
|
+
partnerName?: string;
|
|
8
|
+
productType?: number;
|
|
9
|
+
username?: string;
|
|
10
|
+
html?: string;
|
|
11
|
+
css?: string;
|
|
12
|
+
guidoConfig: GuidoConfig;
|
|
13
|
+
templateConfig?: TemplateConfig;
|
|
14
|
+
onSaveBefore?: () => Promise<boolean>;
|
|
7
15
|
};
|
|
8
16
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
9
17
|
dynamicContent: {
|
|
@@ -13,15 +21,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
13
21
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
14
22
|
saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
|
|
15
23
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
16
|
-
"dynamic-content:open": (detail:
|
|
17
|
-
text: string;
|
|
18
|
-
value: string;
|
|
19
|
-
fallback?: string | undefined;
|
|
20
|
-
format?: {
|
|
21
|
-
key: string;
|
|
22
|
-
value: string;
|
|
23
|
-
} | undefined;
|
|
24
|
-
} | null, position?: PositionData | undefined) => void;
|
|
24
|
+
"dynamic-content:open": (detail: DynamicContent | null, position?: PositionData | undefined) => void;
|
|
25
25
|
back: () => void;
|
|
26
26
|
"save:start": () => void;
|
|
27
27
|
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
32
32
|
closeOnOutsideClick: boolean;
|
|
33
33
|
footerStatus: boolean;
|
|
34
34
|
}>>>, {
|
|
35
|
-
description: string;
|
|
36
35
|
size: "small" | "medium" | "large";
|
|
36
|
+
description: string;
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
38
|
footerButtonOptions: FooterButtonGroup;
|
|
39
39
|
closeButtonStatus: boolean;
|
|
@@ -1,186 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig
|
|
2
|
-
/**
|
|
3
|
-
* Composable for accessing Guido configuration
|
|
4
|
-
*
|
|
5
|
-
* Provides access to the validated configuration from the config store.
|
|
6
|
-
* All values are reactive and will update when the config changes.
|
|
7
|
-
*/
|
|
1
|
+
import type { GuidoConfig } from '@@/Types/generic';
|
|
8
2
|
export declare const useConfig: () => {
|
|
9
|
-
config:
|
|
10
|
-
identity: {
|
|
11
|
-
templateId: string;
|
|
12
|
-
userId: string;
|
|
13
|
-
variationId?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
partner: {
|
|
16
|
-
name: string;
|
|
17
|
-
productType: 60 | 49 | 97;
|
|
18
|
-
messageType: 1 | 2;
|
|
19
|
-
username: string;
|
|
20
|
-
};
|
|
21
|
-
template: {
|
|
22
|
-
html: string;
|
|
23
|
-
css: string;
|
|
24
|
-
preselectedDynamicContent: {
|
|
25
|
-
text: string;
|
|
26
|
-
value: string;
|
|
27
|
-
fallback?: string | undefined;
|
|
28
|
-
format?: {
|
|
29
|
-
key: string;
|
|
30
|
-
value: string;
|
|
31
|
-
} | undefined;
|
|
32
|
-
}[];
|
|
33
|
-
selectedUnsubscribePages: number[];
|
|
34
|
-
};
|
|
35
|
-
editor: {
|
|
36
|
-
locale: string;
|
|
37
|
-
translationsPath: string;
|
|
38
|
-
migrationDate: number;
|
|
39
|
-
emailHeader: {
|
|
40
|
-
senderName: string;
|
|
41
|
-
subject: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
ui: {
|
|
45
|
-
showHeader: boolean;
|
|
46
|
-
backButtonLabel?: string | undefined;
|
|
47
|
-
};
|
|
48
|
-
features: {
|
|
49
|
-
dynamicContent: boolean;
|
|
50
|
-
saveAsTemplate: boolean;
|
|
51
|
-
versionHistory: boolean;
|
|
52
|
-
testMessage: boolean;
|
|
53
|
-
displayConditions: boolean;
|
|
54
|
-
unsubscribe: boolean;
|
|
55
|
-
};
|
|
56
|
-
blocks: {
|
|
57
|
-
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
58
|
-
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
59
|
-
};
|
|
60
|
-
compiler: {
|
|
61
|
-
customRules: ({
|
|
62
|
-
type: "replace";
|
|
63
|
-
search: string;
|
|
64
|
-
replacement: string;
|
|
65
|
-
replaceAll?: boolean | undefined;
|
|
66
|
-
id: string;
|
|
67
|
-
description?: string | undefined;
|
|
68
|
-
priority: number;
|
|
69
|
-
} | {
|
|
70
|
-
type: "regex";
|
|
71
|
-
pattern: string;
|
|
72
|
-
replacement: string;
|
|
73
|
-
flags?: string | undefined;
|
|
74
|
-
id: string;
|
|
75
|
-
description?: string | undefined;
|
|
76
|
-
priority: number;
|
|
77
|
-
} | {
|
|
78
|
-
type: "remove";
|
|
79
|
-
targets: string[];
|
|
80
|
-
id: string;
|
|
81
|
-
description?: string | undefined;
|
|
82
|
-
priority: number;
|
|
83
|
-
} | {
|
|
84
|
-
type: "custom";
|
|
85
|
-
processor: (html: string) => string;
|
|
86
|
-
id: string;
|
|
87
|
-
description?: string | undefined;
|
|
88
|
-
priority: number;
|
|
89
|
-
})[];
|
|
90
|
-
ignoreDefaultRules: boolean;
|
|
91
|
-
};
|
|
92
|
-
} | null>;
|
|
93
|
-
initialized: import("vue").Ref<boolean>;
|
|
94
|
-
identity: import("vue").ComputedRef<{
|
|
95
|
-
templateId: string;
|
|
96
|
-
userId: string;
|
|
97
|
-
variationId?: string | undefined;
|
|
98
|
-
} | null>;
|
|
99
|
-
partner: import("vue").ComputedRef<{
|
|
100
|
-
name: string;
|
|
101
|
-
productType: 60 | 49 | 97;
|
|
102
|
-
messageType: 1 | 2;
|
|
103
|
-
username: string;
|
|
104
|
-
} | null>;
|
|
105
|
-
template: import("vue").ComputedRef<{
|
|
106
|
-
html: string;
|
|
107
|
-
css: string;
|
|
108
|
-
preselectedDynamicContent: {
|
|
109
|
-
text: string;
|
|
110
|
-
value: string;
|
|
111
|
-
fallback?: string | undefined;
|
|
112
|
-
format?: {
|
|
113
|
-
key: string;
|
|
114
|
-
value: string;
|
|
115
|
-
} | undefined;
|
|
116
|
-
}[];
|
|
117
|
-
selectedUnsubscribePages: number[];
|
|
118
|
-
} | null>;
|
|
119
|
-
editor: import("vue").ComputedRef<{
|
|
120
|
-
locale: string;
|
|
121
|
-
translationsPath: string;
|
|
122
|
-
migrationDate: number;
|
|
123
|
-
emailHeader: {
|
|
124
|
-
senderName: string;
|
|
125
|
-
subject: string;
|
|
126
|
-
};
|
|
127
|
-
} | null>;
|
|
128
|
-
ui: import("vue").ComputedRef<{
|
|
129
|
-
showHeader: boolean;
|
|
130
|
-
backButtonLabel?: string | undefined;
|
|
131
|
-
} | null>;
|
|
132
|
-
features: import("vue").ComputedRef<{
|
|
133
|
-
dynamicContent: boolean;
|
|
134
|
-
saveAsTemplate: boolean;
|
|
135
|
-
versionHistory: boolean;
|
|
136
|
-
testMessage: boolean;
|
|
137
|
-
displayConditions: boolean;
|
|
138
|
-
unsubscribe: boolean;
|
|
139
|
-
} | null>;
|
|
140
|
-
blocks: import("vue").ComputedRef<{
|
|
141
|
-
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
142
|
-
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
143
|
-
} | null>;
|
|
144
|
-
compiler: import("vue").ComputedRef<{
|
|
145
|
-
customRules: ({
|
|
146
|
-
type: "replace";
|
|
147
|
-
search: string;
|
|
148
|
-
replacement: string;
|
|
149
|
-
replaceAll?: boolean | undefined;
|
|
150
|
-
id: string;
|
|
151
|
-
description?: string | undefined;
|
|
152
|
-
priority: number;
|
|
153
|
-
} | {
|
|
154
|
-
type: "regex";
|
|
155
|
-
pattern: string;
|
|
156
|
-
replacement: string;
|
|
157
|
-
flags?: string | undefined;
|
|
158
|
-
id: string;
|
|
159
|
-
description?: string | undefined;
|
|
160
|
-
priority: number;
|
|
161
|
-
} | {
|
|
162
|
-
type: "remove";
|
|
163
|
-
targets: string[];
|
|
164
|
-
id: string;
|
|
165
|
-
description?: string | undefined;
|
|
166
|
-
priority: number;
|
|
167
|
-
} | {
|
|
168
|
-
type: "custom";
|
|
169
|
-
processor: (html: string) => string;
|
|
170
|
-
id: string;
|
|
171
|
-
description?: string | undefined;
|
|
172
|
-
priority: number;
|
|
173
|
-
})[];
|
|
174
|
-
ignoreDefaultRules: boolean;
|
|
175
|
-
} | null>;
|
|
176
|
-
templateId: import("vue").ComputedRef<string>;
|
|
177
|
-
userId: import("vue").ComputedRef<string>;
|
|
178
|
-
variationId: import("vue").ComputedRef<string>;
|
|
179
|
-
partnerName: import("vue").ComputedRef<string>;
|
|
180
|
-
productType: import("vue").ComputedRef<number>;
|
|
181
|
-
messageType: import("vue").ComputedRef<number>;
|
|
182
|
-
username: import("vue").ComputedRef<string>;
|
|
183
|
-
showHeader: import("vue").ComputedRef<boolean>;
|
|
184
|
-
getConfig: () => GuidoConfig | null;
|
|
185
|
-
isFeatureEnabled: (feature: keyof FeaturesConfig) => boolean;
|
|
3
|
+
config: GuidoConfig;
|
|
186
4
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
2
2
|
import type { InjectionKey } from 'vue';
|
|
3
3
|
export type BackHandler = () => void;
|
|
4
|
+
export type SaveBeforeHandler = () => Promise<boolean>;
|
|
4
5
|
export type SaveStartHandler = () => void;
|
|
5
6
|
export type SaveCompleteHandler = (template: Omit<SavedTemplateDetails, 'forceRecreate'>) => void;
|
|
6
7
|
export type TestEmailClickHandler = () => void;
|
|
7
8
|
export declare const BACK_KEY: InjectionKey<BackHandler>;
|
|
9
|
+
export declare const SAVE_BEFORE_KEY: InjectionKey<SaveBeforeHandler>;
|
|
8
10
|
export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
|
|
9
11
|
export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
|
|
10
12
|
export declare const TEST_EMAIL_CLICK_KEY: InjectionKey<TestEmailClickHandler>;
|
|
@@ -13,6 +15,7 @@ export declare const TEST_EMAIL_CLICK_KEY: InjectionKey<TestEmailClickHandler>;
|
|
|
13
15
|
*/
|
|
14
16
|
export declare const provideGuidoActions: (actions: {
|
|
15
17
|
onBack: BackHandler;
|
|
18
|
+
onSaveBefore: SaveBeforeHandler;
|
|
16
19
|
onSaveStart: SaveStartHandler;
|
|
17
20
|
onSaveComplete: SaveCompleteHandler;
|
|
18
21
|
onTestEmailClick: TestEmailClickHandler;
|
|
@@ -21,6 +24,7 @@ export declare const provideGuidoActions: (actions: {
|
|
|
21
24
|
* Provides individual Guido action handlers
|
|
22
25
|
*/
|
|
23
26
|
export declare const provideBackHandler: (handler: BackHandler) => void;
|
|
27
|
+
export declare const provideSaveBeforeHandler: (handler: SaveBeforeHandler) => void;
|
|
24
28
|
export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
|
|
25
29
|
export declare const provideSaveCompleteHandler: (handler: SaveCompleteHandler) => void;
|
|
26
30
|
/**
|
|
@@ -28,6 +32,11 @@ export declare const provideSaveCompleteHandler: (handler: SaveCompleteHandler)
|
|
|
28
32
|
* @returns Back navigation function
|
|
29
33
|
*/
|
|
30
34
|
export declare const useBack: () => BackHandler;
|
|
35
|
+
/**
|
|
36
|
+
* Hook to use the save before handler
|
|
37
|
+
* @returns Save before function that returns Promise<boolean>
|
|
38
|
+
*/
|
|
39
|
+
export declare const useSaveBefore: () => SaveBeforeHandler;
|
|
31
40
|
/**
|
|
32
41
|
* Hook to use the save start handler
|
|
33
42
|
* @returns Save start function
|
|
@@ -49,6 +58,7 @@ export declare const useTestEmailClick: () => TestEmailClickHandler;
|
|
|
49
58
|
*/
|
|
50
59
|
export declare const useGuidoActions: () => {
|
|
51
60
|
back: BackHandler;
|
|
61
|
+
saveBefore: SaveBeforeHandler;
|
|
52
62
|
saveStart: SaveStartHandler;
|
|
53
63
|
saveComplete: SaveCompleteHandler;
|
|
54
64
|
testEmailClick: TestEmailClickHandler;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composable for accessing partner information
|
|
3
|
-
*
|
|
4
|
-
* Provides access to partner data from the config store,
|
|
5
|
-
* with fallbacks to URL-based detection for backward compatibility.
|
|
6
|
-
*/
|
|
7
1
|
export declare const usePartner: () => {
|
|
8
2
|
getPartnerName: () => string;
|
|
9
3
|
getProductType: () => number;
|
|
10
|
-
getMessageType: () => number;
|
|
11
|
-
getUsername: () => string;
|
|
12
4
|
isTestPartner: () => boolean;
|
|
13
5
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Note: Configuration defaults are now in @types/config/defaults.ts
|
|
4
|
-
*/
|
|
1
|
+
import type { GuidoConfig } from '@@/Types/generic';
|
|
2
|
+
export declare const DefaultGuidoConfig: GuidoConfig;
|
|
5
3
|
export declare const TemplateTypes: {
|
|
6
4
|
promotional: number;
|
|
7
5
|
transactional: number;
|
|
8
6
|
};
|
|
7
|
+
export declare const DefaultProductType = "email";
|
|
8
|
+
export declare const DefaultUsername = "Guido User";
|
|
9
|
+
export declare const DefaultMessageType: number;
|
|
9
10
|
export declare const EditorType: number;
|
|
10
11
|
export declare const ProductIds: Record<string, number>;
|
|
12
|
+
export declare const TEST_PARTNER_LIST: string[];
|
|
@@ -29,11 +29,7 @@ export declare const PAGE_TYPES: {
|
|
|
29
29
|
export declare const TYPE_COLLECTIONS: {
|
|
30
30
|
[x: number]: number[];
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
* Get type translations lazily to avoid Pinia initialization issues.
|
|
34
|
-
* Must be called within a Vue component context or after Pinia is initialized.
|
|
35
|
-
*/
|
|
36
|
-
export declare const getTypeTranslations: () => {
|
|
32
|
+
export declare const TYPE_TRANSLATIONS: {
|
|
37
33
|
[x: number]: string;
|
|
38
34
|
};
|
|
39
35
|
export declare const MERGE_TAGS: {
|
package/dist/src/library.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { default as Guido } from './components/Guido.vue';
|
|
2
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
|
|
3
|
-
export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
|
|
4
2
|
export type { StripoEventType } from './@types/events';
|
|
5
|
-
export type
|
|
3
|
+
export type * from './@types/generic';
|