@useinsider/guido 3.19.0-beta.3abc7c5 → 3.19.0-beta.3d545d6
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 +0 -1
- package/dist/@types/config/schemas.js +31 -33
- package/dist/components/Guido.vue.js +9 -9
- package/dist/components/Guido.vue2.js +57 -58
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -9
- package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
- package/dist/components/organisms/base/AuthErrorModal.vue2.js +29 -0
- package/dist/components/organisms/header/EditorActions.vue.js +5 -5
- package/dist/components/organisms/header/EditorActions.vue2.js +55 -85
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +12 -16
- package/dist/components/wrappers/WpDrawer.vue.js +7 -9
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/components/wrappers/WpModal.vue.js +1 -1
- package/dist/components/wrappers/WpModal.vue2.js +4 -3
- package/dist/composables/useAuthError.js +51 -0
- package/dist/composables/useHtmlCompiler.js +26 -37
- package/dist/composables/useHtmlValidator.js +0 -2
- package/dist/composables/useHttp.js +58 -51
- package/dist/composables/useSave.js +45 -90
- package/dist/composables/useToaster.js +17 -15
- package/dist/composables/validators/useCouponBlockValidator.js +21 -24
- package/dist/composables/validators/useLiquidValidator.js +15 -15
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +27 -34
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +47 -54
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/components/Guido.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -17
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -17
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +3 -4
- package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
- package/dist/src/composables/useAuthError.d.ts +11 -0
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useHtmlValidator.d.ts +0 -21
- package/dist/src/composables/useHttp.d.ts +2 -0
- package/dist/src/composables/useSave.d.ts +1 -6
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +0 -3
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
- package/dist/src/stores/config.d.ts +0 -32
- package/dist/src/utils/templatePreparation.d.ts +0 -30
- package/dist/stores/config.js +67 -84
- package/dist/utils/templatePreparation.js +36 -39
- package/package.json +1 -1
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +0 -20
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +0 -48
- package/dist/composables/useSaveValidation.js +0 -279
- package/dist/composables/useSaveValidationRollout.js +0 -9
- package/dist/enums/save-validation.js +0 -4
- package/dist/src/@types/save-validation.d.ts +0 -19
- package/dist/src/composables/useSaveValidation.d.ts +0 -6
- package/dist/src/composables/useSaveValidationRollout.d.ts +0 -3
- package/dist/src/enums/save-validation.d.ts +0 -27
- package/dist/src/stores/save-validation.d.ts +0 -22
- package/dist/stores/save-validation.js +0 -30
- /package/dist/src/components/organisms/{validation/ValidationErrorDrawer.vue.d.ts → base/AuthErrorModal.vue.d.ts} +0 -0
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-4f4ce4cc]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-c61cc8ea]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-080ff767]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-080ff767]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-080ff767]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
|
@@ -403,8 +403,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
403
403
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
404
404
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
405
405
|
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
406
|
-
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
407
|
-
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
408
406
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
409
407
|
}, undefined>;
|
|
410
408
|
/**
|
|
@@ -813,8 +811,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
813
811
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
814
812
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
815
813
|
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
816
|
-
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
817
|
-
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
818
814
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
819
815
|
}, undefined>, {}>;
|
|
820
816
|
/** Block configuration */
|
|
@@ -15,23 +15,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
close: () => void;
|
|
16
16
|
};
|
|
17
17
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
18
|
-
saveSilent: () => Promise<
|
|
19
|
-
dynamicContentList: import("@@/Types/generic").DynamicContent[];
|
|
20
|
-
compiledHtml: string;
|
|
21
|
-
rawHtml: string;
|
|
22
|
-
css: string;
|
|
23
|
-
ampHtml: string;
|
|
24
|
-
ampErrors: string[];
|
|
25
|
-
modules: number[];
|
|
26
|
-
recommendation: {
|
|
27
|
-
campaignUrls: Record<string, import("../@types/recommendation").RecommendationCampaignUrlValue>;
|
|
28
|
-
configs: Record<string, string>;
|
|
29
|
-
};
|
|
30
|
-
unsubscribe: {
|
|
31
|
-
status: boolean;
|
|
32
|
-
config: number[];
|
|
33
|
-
};
|
|
34
|
-
} | undefined> | undefined;
|
|
18
|
+
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
35
19
|
setLoading: (value: boolean) => void;
|
|
36
20
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
37
21
|
"dynamic-content:open": (detail: {
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<
|
|
3
|
-
dynamicContentList: import("../../../@types/generic.js").DynamicContent[];
|
|
4
|
-
compiledHtml: string;
|
|
5
|
-
rawHtml: string;
|
|
6
|
-
css: string;
|
|
7
|
-
ampHtml: string;
|
|
8
|
-
ampErrors: string[];
|
|
9
|
-
modules: number[];
|
|
10
|
-
recommendation: {
|
|
11
|
-
campaignUrls: Record<string, import("../../../@types/recommendation.js").RecommendationCampaignUrlValue>;
|
|
12
|
-
configs: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
unsubscribe: {
|
|
15
|
-
status: boolean;
|
|
16
|
-
config: number[];
|
|
17
|
-
};
|
|
18
|
-
} | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
19
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
4
|
export default _default;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<
|
|
3
|
-
dynamicContentList: import("../../../@types/generic.js").DynamicContent[];
|
|
4
|
-
compiledHtml: string;
|
|
5
|
-
rawHtml: string;
|
|
6
|
-
css: string;
|
|
7
|
-
ampHtml: string;
|
|
8
|
-
ampErrors: string[];
|
|
9
|
-
modules: number[];
|
|
10
|
-
recommendation: {
|
|
11
|
-
campaignUrls: Record<string, import("../../../@types/recommendation.js").RecommendationCampaignUrlValue>;
|
|
12
|
-
configs: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
unsubscribe: {
|
|
15
|
-
status: boolean;
|
|
16
|
-
config: number[];
|
|
17
|
-
};
|
|
18
|
-
} | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
19
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
4
|
export default _default;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<
|
|
3
|
-
dynamicContentList: import("../../../@types/generic.js").DynamicContent[];
|
|
4
|
-
compiledHtml: string;
|
|
5
|
-
rawHtml: string;
|
|
6
|
-
css: string;
|
|
7
|
-
ampHtml: string;
|
|
8
|
-
ampErrors: string[];
|
|
9
|
-
modules: number[];
|
|
10
|
-
recommendation: {
|
|
11
|
-
campaignUrls: Record<string, import("../../../@types/recommendation.js").RecommendationCampaignUrlValue>;
|
|
12
|
-
configs: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
unsubscribe: {
|
|
15
|
-
status: boolean;
|
|
16
|
-
config: number[];
|
|
17
|
-
};
|
|
18
|
-
} | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
19
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
4
|
export default _default;
|
|
@@ -10,11 +10,11 @@ interface Props {
|
|
|
10
10
|
status: boolean;
|
|
11
11
|
titleText: string;
|
|
12
12
|
}
|
|
13
|
-
declare var
|
|
13
|
+
declare var __VLS_12: {}, __VLS_14: {};
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
|
-
headerBottomSlot?: (props: typeof
|
|
15
|
+
headerBottomSlot?: (props: typeof __VLS_12) => any;
|
|
16
16
|
} & {
|
|
17
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_14) => any;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
20
20
|
className: string;
|
|
@@ -26,7 +26,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
26
|
cancelOrBackButtonEvent: () => void;
|
|
27
27
|
onCloseEvent: () => void;
|
|
28
28
|
primaryButtonEvent: () => void;
|
|
29
|
-
secondaryButtonEvent: () => void;
|
|
30
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
31
30
|
className: string;
|
|
32
31
|
size: string;
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
state?: 'default' | 'primary' | 'warning' | 'danger';
|
|
6
7
|
size?: 'X-small' | 'small' | 'medium' | 'large';
|
|
7
8
|
footerButtonOptions?: FooterButtonGroup;
|
|
8
9
|
closeButtonStatus?: boolean;
|
|
@@ -15,6 +16,7 @@ type __VLS_Slots = {} & {
|
|
|
15
16
|
};
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
17
18
|
description: string;
|
|
19
|
+
state: string;
|
|
18
20
|
size: string;
|
|
19
21
|
footerButtonOptions: undefined;
|
|
20
22
|
closeButtonStatus: boolean;
|
|
@@ -26,6 +28,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
28
|
"secondary-action": () => void;
|
|
27
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
28
30
|
description: string;
|
|
31
|
+
state: string;
|
|
29
32
|
size: string;
|
|
30
33
|
footerButtonOptions: undefined;
|
|
31
34
|
closeButtonStatus: boolean;
|
|
@@ -34,9 +37,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
37
|
}>>>, {
|
|
35
38
|
size: "X-small" | "small" | "medium" | "large";
|
|
36
39
|
description: string;
|
|
37
|
-
|
|
40
|
+
state: "default" | "primary" | "warning" | "danger";
|
|
38
41
|
footerButtonOptions: FooterButtonGroup;
|
|
39
42
|
closeButtonStatus: boolean;
|
|
43
|
+
closeOnOutsideClick: boolean;
|
|
40
44
|
footerStatus: boolean;
|
|
41
45
|
}>;
|
|
42
46
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface AuthErrorState {
|
|
2
|
+
status: number;
|
|
3
|
+
data: Record<string, unknown> | null;
|
|
4
|
+
}
|
|
5
|
+
export declare const reportAuthError: (status: number, body: string, url: string) => void;
|
|
6
|
+
export declare const useAuthError: () => {
|
|
7
|
+
authError: import("vue").Ref<{
|
|
8
|
+
status: number;
|
|
9
|
+
data: Record<string, unknown> | null;
|
|
10
|
+
} | null>;
|
|
11
|
+
};
|
|
@@ -101,7 +101,6 @@ export declare const useConfig: () => {
|
|
|
101
101
|
autosave: boolean;
|
|
102
102
|
allowlistEnabled: boolean;
|
|
103
103
|
linkTrackingIds: boolean;
|
|
104
|
-
allowSaveWithErrors: boolean;
|
|
105
104
|
reusableRecommendationStrategy: boolean;
|
|
106
105
|
};
|
|
107
106
|
blocks: {
|
|
@@ -239,7 +238,6 @@ export declare const useConfig: () => {
|
|
|
239
238
|
autosave: boolean;
|
|
240
239
|
allowlistEnabled: boolean;
|
|
241
240
|
linkTrackingIds: boolean;
|
|
242
|
-
allowSaveWithErrors: boolean;
|
|
243
241
|
reusableRecommendationStrategy: boolean;
|
|
244
242
|
} | null>;
|
|
245
243
|
blocks: import("vue").ComputedRef<{
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import type { DynamicContent } from '@@/Types/generic';
|
|
2
2
|
import type { FiltersResponse } from '@@/Types/recommendation';
|
|
3
|
-
/**
|
|
4
|
-
* Extracts recommendation block IDs directly from the HTML by parsing
|
|
5
|
-
* the recommendation-id attribute on block elements.
|
|
6
|
-
* This avoids depending on store state which may not be populated
|
|
7
|
-
* when the settings panel hasn't been opened yet (e.g., saved templates).
|
|
8
|
-
*/
|
|
9
|
-
export declare function getRecommendationBlockIds(html: string): string[];
|
|
10
3
|
/**
|
|
11
4
|
* Parses a `{{recoId_index_attributeName}}` variable (already stripped of the
|
|
12
5
|
* braces/whitespace) into its recommendation id and attribute name. Returns
|
|
@@ -34,20 +27,6 @@ export declare function buildPartnerAttributeNameSet(filterList: FiltersResponse
|
|
|
34
27
|
* before, so flagging it would false-positive on merge tags like `{{user.name}}`.
|
|
35
28
|
*/
|
|
36
29
|
export declare function findInvalidCustomFields(html: string, validCustomFields: string[], recommendationBlockIds: string[], ignoredIds: Set<string>, ignoredAttributeNames: Set<string> | null): string[];
|
|
37
|
-
/**
|
|
38
|
-
* Returns the invalid `{{ ... }}` dynamic-content tags found in the HTML.
|
|
39
|
-
*
|
|
40
|
-
* A tag's variable name is the part before the first `|` (everything after it is the fallback).
|
|
41
|
-
* Surrounding whitespace is always allowed (trimmed). A tag is valid only when the variable name
|
|
42
|
-
* is an allowed system token, or it is a clean identifier (`[A-Za-z0-9_.]`) and — when a `|` is
|
|
43
|
-
* present — the fallback after it is not empty. Otherwise the tag is invalid (e.g.
|
|
44
|
-
* `{{Api Response: OA1 Main Item Url}}` — spaces/`:` — or `{{bounce|}}` — empty fallback).
|
|
45
|
-
*
|
|
46
|
-
* `data-*` block-config attribute values are excluded from the scan: blocks such as Items/cart
|
|
47
|
-
* store product merge tags (`data-product_button_link="{{Abandoned Cart Item (1) Url}}"`) that the
|
|
48
|
-
* backend resolves through its own pipeline, so they must not be treated as user-authored tags.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getInvalidDynamicContentTags(html: string): string[];
|
|
51
30
|
export declare const useHtmlValidator: () => {
|
|
52
31
|
validateHtml: (html: string, customFields: DynamicContent[], isOnSaveValidation?: boolean) => Promise<boolean>;
|
|
53
32
|
};
|
|
@@ -16,6 +16,7 @@ export interface HttpError {
|
|
|
16
16
|
status?: number;
|
|
17
17
|
statusText?: string;
|
|
18
18
|
response?: Response;
|
|
19
|
+
authReported?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
21
22
|
loading: import("vue").ComputedRef<boolean>;
|
|
@@ -65,6 +66,7 @@ export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
|
65
66
|
json: () => Promise<any>;
|
|
66
67
|
text: () => Promise<string>;
|
|
67
68
|
} | undefined;
|
|
69
|
+
authReported?: boolean | undefined;
|
|
68
70
|
} | null>;
|
|
69
71
|
hasError: import("vue").ComputedRef<boolean>;
|
|
70
72
|
request: <T = unknown>(method: HttpMethod, url: string, data?: unknown, options?: HttpOptions) => Promise<HttpResponse<T>>;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
2
|
-
type SaveDetails = Omit<SavedTemplateDetails, 'metadata' | 'silent'>;
|
|
3
|
-
type SaveResult = SaveDetails | undefined;
|
|
4
2
|
export declare const useSave: () => {
|
|
5
|
-
save: (suppressEmit?: boolean, silent?: boolean) => Promise<
|
|
6
|
-
saveWithErrors: () => Promise<SaveResult>;
|
|
7
|
-
saveRawOnly: () => Promise<SaveResult>;
|
|
3
|
+
save: (suppressEmit?: boolean, silent?: boolean) => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined>;
|
|
8
4
|
};
|
|
9
|
-
export {};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export declare const COUPON_TAG_MODIFIED_KEY = "newsletter.coupon-tag-modified";
|
|
2
|
-
/** Pure core: the tag text of every coupon block whose code was modified. */
|
|
3
|
-
export declare function findInvalidCouponBlocks(html: string): string[];
|
|
4
1
|
export declare const useCouponBlockValidator: () => {
|
|
5
2
|
validateCouponBlockTags: (html: string) => boolean;
|
|
6
3
|
};
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
declare const SINGLETON_BLOCK_RULES: {
|
|
2
|
-
pageType: number;
|
|
3
|
-
messageKey: string;
|
|
4
|
-
}[];
|
|
5
|
-
export declare const EMPTY_BLOCK_KEY = "unsubscription-preference.select-page-to-continue";
|
|
6
|
-
/** Pure core: the singleton rules whose page type appears more than once. */
|
|
7
|
-
export declare function findDuplicateUnsubPageTypes(html: string): typeof SINGLETON_BLOCK_RULES;
|
|
8
|
-
/** Pure core: count of unsubscribe blocks with no page type or page list chosen. */
|
|
9
|
-
export declare function countUnsubBlocksWithoutPage(html: string): number;
|
|
10
1
|
export declare const useUnsubscribeBlockValidator: () => {
|
|
11
2
|
validateUnsubscribeBlockUniqueness: (html: string) => boolean;
|
|
12
3
|
validateUnsubscribeBlockHasTemplate: (html: string) => boolean;
|
|
13
4
|
};
|
|
14
|
-
export {};
|
|
@@ -612,11 +612,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
612
612
|
* every block's recommendationConfigs across user edits.
|
|
613
613
|
*/
|
|
614
614
|
hasInvalidBlock(): boolean;
|
|
615
|
-
/**
|
|
616
|
-
* Per-instance counterpart to `hasInvalidBlock`: the ids of every block
|
|
617
|
-
* that fails required-field validation, one drawer row each (SD-147430).
|
|
618
|
-
*/
|
|
619
|
-
invalidBlockIds(): string[];
|
|
620
615
|
/**
|
|
621
616
|
* Which required fields are missing across the design's blocks, so the save
|
|
622
617
|
* toaster can name the cause instead of always showing the generic message.
|
|
@@ -106,7 +106,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
106
106
|
autosave: boolean;
|
|
107
107
|
allowlistEnabled: boolean;
|
|
108
108
|
linkTrackingIds: boolean;
|
|
109
|
-
allowSaveWithErrors: boolean;
|
|
110
109
|
reusableRecommendationStrategy: boolean;
|
|
111
110
|
};
|
|
112
111
|
blocks: {
|
|
@@ -250,7 +249,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
250
249
|
autosave: boolean;
|
|
251
250
|
allowlistEnabled: boolean;
|
|
252
251
|
linkTrackingIds: boolean;
|
|
253
|
-
allowSaveWithErrors: boolean;
|
|
254
252
|
reusableRecommendationStrategy: boolean;
|
|
255
253
|
};
|
|
256
254
|
blocks: {
|
|
@@ -394,7 +392,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
394
392
|
autosave: boolean;
|
|
395
393
|
allowlistEnabled: boolean;
|
|
396
394
|
linkTrackingIds: boolean;
|
|
397
|
-
allowSaveWithErrors: boolean;
|
|
398
395
|
reusableRecommendationStrategy: boolean;
|
|
399
396
|
};
|
|
400
397
|
blocks: {
|
|
@@ -538,7 +535,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
538
535
|
autosave: boolean;
|
|
539
536
|
allowlistEnabled: boolean;
|
|
540
537
|
linkTrackingIds: boolean;
|
|
541
|
-
allowSaveWithErrors: boolean;
|
|
542
538
|
reusableRecommendationStrategy: boolean;
|
|
543
539
|
};
|
|
544
540
|
blocks: {
|
|
@@ -682,7 +678,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
682
678
|
autosave: boolean;
|
|
683
679
|
allowlistEnabled: boolean;
|
|
684
680
|
linkTrackingIds: boolean;
|
|
685
|
-
allowSaveWithErrors: boolean;
|
|
686
681
|
reusableRecommendationStrategy: boolean;
|
|
687
682
|
};
|
|
688
683
|
blocks: {
|
|
@@ -826,7 +821,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
826
821
|
autosave: boolean;
|
|
827
822
|
allowlistEnabled: boolean;
|
|
828
823
|
linkTrackingIds: boolean;
|
|
829
|
-
allowSaveWithErrors: boolean;
|
|
830
824
|
reusableRecommendationStrategy: boolean;
|
|
831
825
|
};
|
|
832
826
|
blocks: {
|
|
@@ -970,7 +964,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
970
964
|
autosave: boolean;
|
|
971
965
|
allowlistEnabled: boolean;
|
|
972
966
|
linkTrackingIds: boolean;
|
|
973
|
-
allowSaveWithErrors: boolean;
|
|
974
967
|
reusableRecommendationStrategy: boolean;
|
|
975
968
|
};
|
|
976
969
|
blocks: {
|
|
@@ -1114,7 +1107,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1114
1107
|
autosave: boolean;
|
|
1115
1108
|
allowlistEnabled: boolean;
|
|
1116
1109
|
linkTrackingIds: boolean;
|
|
1117
|
-
allowSaveWithErrors: boolean;
|
|
1118
1110
|
reusableRecommendationStrategy: boolean;
|
|
1119
1111
|
};
|
|
1120
1112
|
blocks: {
|
|
@@ -1258,7 +1250,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1258
1250
|
autosave: boolean;
|
|
1259
1251
|
allowlistEnabled: boolean;
|
|
1260
1252
|
linkTrackingIds: boolean;
|
|
1261
|
-
allowSaveWithErrors: boolean;
|
|
1262
1253
|
reusableRecommendationStrategy: boolean;
|
|
1263
1254
|
};
|
|
1264
1255
|
blocks: {
|
|
@@ -1402,7 +1393,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1402
1393
|
autosave: boolean;
|
|
1403
1394
|
allowlistEnabled: boolean;
|
|
1404
1395
|
linkTrackingIds: boolean;
|
|
1405
|
-
allowSaveWithErrors: boolean;
|
|
1406
1396
|
reusableRecommendationStrategy: boolean;
|
|
1407
1397
|
};
|
|
1408
1398
|
blocks: {
|
|
@@ -1546,7 +1536,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1546
1536
|
autosave: boolean;
|
|
1547
1537
|
allowlistEnabled: boolean;
|
|
1548
1538
|
linkTrackingIds: boolean;
|
|
1549
|
-
allowSaveWithErrors: boolean;
|
|
1550
1539
|
reusableRecommendationStrategy: boolean;
|
|
1551
1540
|
};
|
|
1552
1541
|
blocks: {
|
|
@@ -1690,7 +1679,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1690
1679
|
autosave: boolean;
|
|
1691
1680
|
allowlistEnabled: boolean;
|
|
1692
1681
|
linkTrackingIds: boolean;
|
|
1693
|
-
allowSaveWithErrors: boolean;
|
|
1694
1682
|
reusableRecommendationStrategy: boolean;
|
|
1695
1683
|
};
|
|
1696
1684
|
blocks: {
|
|
@@ -1834,7 +1822,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1834
1822
|
autosave: boolean;
|
|
1835
1823
|
allowlistEnabled: boolean;
|
|
1836
1824
|
linkTrackingIds: boolean;
|
|
1837
|
-
allowSaveWithErrors: boolean;
|
|
1838
1825
|
reusableRecommendationStrategy: boolean;
|
|
1839
1826
|
};
|
|
1840
1827
|
blocks: {
|
|
@@ -1978,7 +1965,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1978
1965
|
autosave: boolean;
|
|
1979
1966
|
allowlistEnabled: boolean;
|
|
1980
1967
|
linkTrackingIds: boolean;
|
|
1981
|
-
allowSaveWithErrors: boolean;
|
|
1982
1968
|
reusableRecommendationStrategy: boolean;
|
|
1983
1969
|
};
|
|
1984
1970
|
blocks: {
|
|
@@ -2122,7 +2108,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2122
2108
|
autosave: boolean;
|
|
2123
2109
|
allowlistEnabled: boolean;
|
|
2124
2110
|
linkTrackingIds: boolean;
|
|
2125
|
-
allowSaveWithErrors: boolean;
|
|
2126
2111
|
reusableRecommendationStrategy: boolean;
|
|
2127
2112
|
};
|
|
2128
2113
|
blocks: {
|
|
@@ -2266,7 +2251,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2266
2251
|
autosave: boolean;
|
|
2267
2252
|
allowlistEnabled: boolean;
|
|
2268
2253
|
linkTrackingIds: boolean;
|
|
2269
|
-
allowSaveWithErrors: boolean;
|
|
2270
2254
|
reusableRecommendationStrategy: boolean;
|
|
2271
2255
|
};
|
|
2272
2256
|
blocks: {
|
|
@@ -2410,7 +2394,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2410
2394
|
autosave: boolean;
|
|
2411
2395
|
allowlistEnabled: boolean;
|
|
2412
2396
|
linkTrackingIds: boolean;
|
|
2413
|
-
allowSaveWithErrors: boolean;
|
|
2414
2397
|
reusableRecommendationStrategy: boolean;
|
|
2415
2398
|
};
|
|
2416
2399
|
blocks: {
|
|
@@ -2454,18 +2437,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2454
2437
|
};
|
|
2455
2438
|
} | null;
|
|
2456
2439
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
2457
|
-
/**
|
|
2458
|
-
* Transactional campaigns keep the hard save block. Reactive getter, so
|
|
2459
|
-
* consumers stay safe in setup where a raw config read snapshots null (SD-147945).
|
|
2460
|
-
*/
|
|
2461
|
-
isTransactional(): boolean;
|
|
2462
|
-
/**
|
|
2463
|
-
* Soft-save policy: may the editor persist a template with validation errors?
|
|
2464
|
-
* Default true (host sets features.allowSaveWithErrors=false for transactional +
|
|
2465
|
-
* unsub). Reactive getter defaulting true — reading via isFeatureEnabled would
|
|
2466
|
-
* floor to false pre-init and momentarily hide the soft-save option (SD-147430).
|
|
2467
|
-
*/
|
|
2468
|
-
allowSaveWithErrors(): boolean;
|
|
2469
2440
|
/**
|
|
2470
2441
|
* Get the username
|
|
2471
2442
|
*/
|
|
@@ -2566,7 +2537,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2566
2537
|
autosave: boolean;
|
|
2567
2538
|
allowlistEnabled: boolean;
|
|
2568
2539
|
linkTrackingIds: boolean;
|
|
2569
|
-
allowSaveWithErrors: boolean;
|
|
2570
2540
|
reusableRecommendationStrategy: boolean;
|
|
2571
2541
|
};
|
|
2572
2542
|
blocks: {
|
|
@@ -2710,7 +2680,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2710
2680
|
autosave: boolean;
|
|
2711
2681
|
allowlistEnabled: boolean;
|
|
2712
2682
|
linkTrackingIds: boolean;
|
|
2713
|
-
allowSaveWithErrors: boolean;
|
|
2714
2683
|
reusableRecommendationStrategy: boolean;
|
|
2715
2684
|
};
|
|
2716
2685
|
blocks: {
|
|
@@ -2856,7 +2825,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2856
2825
|
autosave: boolean;
|
|
2857
2826
|
allowlistEnabled: boolean;
|
|
2858
2827
|
linkTrackingIds: boolean;
|
|
2859
|
-
allowSaveWithErrors: boolean;
|
|
2860
2828
|
reusableRecommendationStrategy: boolean;
|
|
2861
2829
|
};
|
|
2862
2830
|
blocks: {
|
|
@@ -15,36 +15,6 @@ import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
|
15
15
|
* same source), so it is reliably present regardless of how the block was added.
|
|
16
16
|
*/
|
|
17
17
|
export declare function getHtmlReferencedUnsubscribePages(html: string): number[];
|
|
18
|
-
/**
|
|
19
|
-
* Hydrates the recommendation extension store from the persisted `esd-ext-config`
|
|
20
|
-
* JSON blob on each `.recommendation-block-v2` element in the raw editor HTML.
|
|
21
|
-
*
|
|
22
|
-
* Why this runs before `compileHtml`:
|
|
23
|
-
* The HTML compiler's `prepareRecommendationBlocks` rule asks
|
|
24
|
-
* `useRecommendation.buildCampaignUrl(id)` to assemble each block's API URL
|
|
25
|
-
* from `blockStates[id].recommendationConfigs`. That Pinia entry is normally
|
|
26
|
-
* populated by `RecommendationBlockControl._syncNodeConfigToStore`, which
|
|
27
|
-
* only fires when the user *selects* the block. Saving without ever
|
|
28
|
-
* selecting a migrated block would otherwise build the URL from empty/
|
|
29
|
-
* default state and the campaign URL would not be saved.
|
|
30
|
-
*
|
|
31
|
-
* Why we read raw HTML, not compiled HTML:
|
|
32
|
-
* Stripo's `compileEmail()` strips editor-only attributes (`esd-*`) from the
|
|
33
|
-
* compiled output, so `esd-ext-config` is gone by the time the compiler
|
|
34
|
-
* pipeline sees the HTML. The raw HTML from `getTemplateData()` preserves
|
|
35
|
-
* the attribute as the migrator wrote it.
|
|
36
|
-
*
|
|
37
|
-
* Reference data pre-load:
|
|
38
|
-
* When the template has recommendation blocks, this also pre-loads the
|
|
39
|
-
* shared reference data (languages / currency list) so the save-time
|
|
40
|
-
* required-fields validator can check each block's locale and currency
|
|
41
|
-
* against the partner's real options. Best-effort — on a fetch failure the
|
|
42
|
-
* validator degrades to its empty-list guard (`requiredFields.ts`) instead
|
|
43
|
-
* of blocking the save or stranding the Save button.
|
|
44
|
-
*/
|
|
45
|
-
declare function hydrateRecommendationStoreFromRawHtml(rawHtml: string): Promise<void>;
|
|
46
18
|
export declare const useTemplatePreparation: () => {
|
|
47
19
|
prepareTemplateDetails: () => Promise<Omit<SavedTemplateDetails, "metadata">>;
|
|
48
|
-
hydrateRecommendationStore: typeof hydrateRecommendationStoreFromRawHtml;
|
|
49
20
|
};
|
|
50
|
-
export {};
|