@useinsider/guido 3.13.0 → 3.13.1-beta.88c2f20
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 +1 -1
- package/dist/@types/config/defaults.js +6 -2
- package/dist/@types/config/schemas.js +24 -17
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +78 -72
- package/dist/composables/useActionsApi.js +24 -18
- package/dist/composables/useEmailTemplateApplier.js +26 -24
- package/dist/composables/useTimerClone.js +1 -1
- package/dist/composables/useTranslations.js +7 -5
- package/dist/config/compiler/outlookCompilerRules.js +21 -8
- package/dist/config/migrator/index.js +11 -10
- package/dist/config/migrator/trackIdMigrator.js +11 -0
- package/dist/guido.css +1 -1
- package/dist/library.js +14 -9
- package/dist/src/@types/config/schemas.d.ts +14 -0
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +0 -5
- package/dist/src/config/migrator/index.d.ts +6 -1
- package/dist/src/config/migrator/trackIdMigrator.d.ts +6 -0
- package/dist/src/library.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/src/stores/editor.d.ts +25 -0
- package/dist/src/utils/linkTrackingIds.d.ts +25 -0
- package/dist/stores/editor.js +4 -1
- package/dist/utils/linkTrackingIds.js +44 -0
- package/dist/utils/templatePreparation.js +70 -59
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = `
|
|
2
2
|
<!--[if gte mso 9]>
|
|
3
3
|
<xml>
|
|
4
4
|
<o:OfficeDocumentSettings>
|
|
@@ -6,15 +6,21 @@ const c = `
|
|
|
6
6
|
<o:PixelsPerInch>96</o:PixelsPerInch>
|
|
7
7
|
</o:OfficeDocumentSettings>
|
|
8
8
|
</xml>
|
|
9
|
-
<![endif]-->`,
|
|
9
|
+
<![endif]-->`, n = {
|
|
10
10
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
11
11
|
"xmlns:o": "urn:schemas-microsoft-com:office:office"
|
|
12
|
-
},
|
|
12
|
+
}, p = `
|
|
13
|
+
<style type="text/css">
|
|
14
|
+
ul, ol { padding: 0px 0px 0px 40px; }
|
|
15
|
+
li p { mso-margin-bottom-alt: 15px; }
|
|
16
|
+
.es-text-ltr ul, .es-text-ltr ol { padding: 0px 0px 0px 40px; }
|
|
17
|
+
.es-text-rtl ol, .es-text-rtl ul { padding: 0px 40px 0px 0px; }
|
|
18
|
+
</style>`, l = [
|
|
13
19
|
{
|
|
14
20
|
id: "append-office-xml",
|
|
15
21
|
description: "Appending office XML into the head if it does not exist.",
|
|
16
22
|
type: "custom",
|
|
17
|
-
processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${
|
|
23
|
+
processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${r}</head>`),
|
|
18
24
|
priority: 70
|
|
19
25
|
},
|
|
20
26
|
{
|
|
@@ -23,14 +29,21 @@ const c = `
|
|
|
23
29
|
type: "custom",
|
|
24
30
|
processor: (e) => {
|
|
25
31
|
let t = e;
|
|
26
|
-
return Object.entries(
|
|
27
|
-
const
|
|
28
|
-
t.search(
|
|
32
|
+
return Object.entries(n).forEach(([o, i]) => {
|
|
33
|
+
const s = new RegExp(`${o}="[^"]*"`);
|
|
34
|
+
t.search(s) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
|
|
29
35
|
}), t;
|
|
30
36
|
},
|
|
31
37
|
priority: 71
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "append-outlook-list-css",
|
|
41
|
+
description: "Appending Outlook list rules into the head if the base CSS does not already carry them.",
|
|
42
|
+
type: "custom",
|
|
43
|
+
processor: (e) => e.includes("mso-margin-bottom-alt") ? e : e.replace("</head>", `${p}</head>`),
|
|
44
|
+
priority: 73
|
|
32
45
|
}
|
|
33
46
|
];
|
|
34
47
|
export {
|
|
35
|
-
|
|
48
|
+
l as outlookCompilerRules
|
|
36
49
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { migrateCheckbox as
|
|
2
|
-
import { migrateCouponBlock as
|
|
1
|
+
import { migrateCheckbox as i } from "./checkboxMigrator.js";
|
|
2
|
+
import { migrateCouponBlock as a } from "./couponBlockMigrator.js";
|
|
3
3
|
import { migrateItemsBlock as e } from "./itemsBlockMigrator.js";
|
|
4
|
-
import { migrateRadioButton as
|
|
5
|
-
import { migrateRecommendation as
|
|
6
|
-
import { migrateSocialIcons as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { migrateRadioButton as c } from "./radioButtonMigrator.js";
|
|
5
|
+
import { migrateRecommendation as g } from "./recommendationMigrator.js";
|
|
6
|
+
import { migrateSocialIcons as n } from "./socialIconMigrator.js";
|
|
7
|
+
import { migrateTrackIds as f } from "./trackIdMigrator.js";
|
|
8
|
+
import { migrateUnsubscribe as p } from "./unsubscribeMigrator.js";
|
|
9
|
+
const x = async (o, t = {}, m = {}) => {
|
|
10
|
+
let r = o;
|
|
11
|
+
return r = i(r), r = c(r), r = await p(r), r = a(r), r = g(r, t), r = e(r), r = n(r), m.linkTrackingIds && (r = f(r, m.trackIdFloor)), r;
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
x as migrate
|
|
14
15
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.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-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__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-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__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-6e711fd7]{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-
|
|
1
|
+
.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-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__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-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__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-6e711fd7]{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-8d695bf5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-8d695bf5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-8d695bf5]{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-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}
|
package/dist/library.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
-
import { MessageType as
|
|
2
|
+
import { MessageType as T, ProductType as f } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
4
|
+
import { getValidationErrors as t, isValidConfig as p, parseConfig as d, parseConfigSafe as g, validateConfig as n } from "./@types/config/validator.js";
|
|
5
|
+
import { TRACK_ID_ATTRIBUTE as m, TRACK_SEQ_ATTRIBUTE as l, assignTrackingIds as x, readTrackSeq as A } from "./utils/linkTrackingIds.js";
|
|
5
6
|
export {
|
|
6
7
|
a as Guido,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
T as MessageType,
|
|
9
|
+
f as ProductType,
|
|
10
|
+
m as TRACK_ID_ATTRIBUTE,
|
|
11
|
+
l as TRACK_SEQ_ATTRIBUTE,
|
|
12
|
+
x as assignTrackingIds,
|
|
13
|
+
t as getValidationErrors,
|
|
14
|
+
p as isValidConfig,
|
|
15
|
+
d as parseConfig,
|
|
16
|
+
g as parseConfigSafe,
|
|
17
|
+
A as readTrackSeq,
|
|
18
|
+
n as validateConfig
|
|
14
19
|
};
|
|
@@ -262,6 +262,11 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
262
262
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
263
263
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
264
264
|
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
265
|
+
/**
|
|
266
|
+
* Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
|
|
267
|
+
* during migration so a rolled-back document never re-mints retired tracking ids.
|
|
268
|
+
*/
|
|
269
|
+
readonly trackIdCounter: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
265
270
|
/** Migration-only inputs (legacy block configs) */
|
|
266
271
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
267
272
|
/**
|
|
@@ -385,6 +390,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
385
390
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
386
391
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
387
392
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
393
|
+
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
394
|
+
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
388
395
|
}, undefined>;
|
|
389
396
|
/**
|
|
390
397
|
* Default block types available in Stripo
|
|
@@ -666,6 +673,11 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
666
673
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
667
674
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
668
675
|
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
676
|
+
/**
|
|
677
|
+
* Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
|
|
678
|
+
* during migration so a rolled-back document never re-mints retired tracking ids.
|
|
679
|
+
*/
|
|
680
|
+
readonly trackIdCounter: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
669
681
|
/** Migration-only inputs (legacy block configs) */
|
|
670
682
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
671
683
|
/**
|
|
@@ -774,6 +786,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
774
786
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
775
787
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
776
788
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
789
|
+
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
790
|
+
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
777
791
|
}, undefined>, {}>;
|
|
778
792
|
/** Block configuration */
|
|
779
793
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -6,6 +6,6 @@ export declare const useActionsApi: () => {
|
|
|
6
6
|
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
7
7
|
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
8
8
|
updateTimerInClonedTemplate: () => Promise<string | null>;
|
|
9
|
-
updateHtmlAndCss: (html: string, css: string) => void
|
|
9
|
+
updateHtmlAndCss: (html: string, css: string) => Promise<void>;
|
|
10
10
|
editorSave: () => Promise<boolean>;
|
|
11
11
|
};
|
|
@@ -40,6 +40,7 @@ export declare const useConfig: () => {
|
|
|
40
40
|
customFieldAttributes: string[];
|
|
41
41
|
selectedUnsubscribePages: number[];
|
|
42
42
|
forceRecreate: boolean;
|
|
43
|
+
trackIdCounter: number;
|
|
43
44
|
migration: {
|
|
44
45
|
recommendationConfigs: {
|
|
45
46
|
[x: string]: {
|
|
@@ -97,6 +98,7 @@ export declare const useConfig: () => {
|
|
|
97
98
|
liquidSyntax: boolean;
|
|
98
99
|
autosave: boolean;
|
|
99
100
|
allowlistEnabled: boolean;
|
|
101
|
+
linkTrackingIds: boolean;
|
|
100
102
|
};
|
|
101
103
|
blocks: {
|
|
102
104
|
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")[];
|
|
@@ -172,6 +174,7 @@ export declare const useConfig: () => {
|
|
|
172
174
|
customFieldAttributes: string[];
|
|
173
175
|
selectedUnsubscribePages: number[];
|
|
174
176
|
forceRecreate: boolean;
|
|
177
|
+
trackIdCounter: number;
|
|
175
178
|
migration: {
|
|
176
179
|
recommendationConfigs: {
|
|
177
180
|
[x: string]: {
|
|
@@ -229,6 +232,7 @@ export declare const useConfig: () => {
|
|
|
229
232
|
liquidSyntax: boolean;
|
|
230
233
|
autosave: boolean;
|
|
231
234
|
allowlistEnabled: boolean;
|
|
235
|
+
linkTrackingIds: boolean;
|
|
232
236
|
} | null>;
|
|
233
237
|
blocks: import("vue").ComputedRef<{
|
|
234
238
|
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")[];
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
|
|
2
|
-
/**
|
|
3
|
-
* Host-registered translation key for the "some attributes could not be
|
|
4
|
-
* converted" toaster. Guido resolves it against the host's `window.trans.en`;
|
|
5
|
-
* the copy is registered host-side.
|
|
6
|
-
*/
|
|
7
2
|
export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
|
|
8
3
|
/**
|
|
9
4
|
* Repairs label-form dynamic-content tokens in saved modules as they are dropped
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { LegacyRecommendationConfig } from '@@/Types/config';
|
|
2
|
-
export
|
|
2
|
+
export interface MigrateOptions {
|
|
3
|
+
linkTrackingIds?: boolean;
|
|
4
|
+
/** Consumer-persisted id high-water mark — ids are minted above it. */
|
|
5
|
+
trackIdFloor?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, options?: MigrateOptions) => Promise<string>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backfills persistent link tracking ids (SD-141414) at load so legacy
|
|
3
|
+
* templates, library imports and externally edited HTML enter the editor
|
|
4
|
+
* already tagged — before Stripo sees the document (no dirty flag, no undo).
|
|
5
|
+
*/
|
|
6
|
+
export declare function migrateTrackIds(html: string, floor?: number): string;
|
package/dist/src/library.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as Guido } from './components/Guido.vue';
|
|
2
2
|
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
|
|
3
3
|
export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
|
|
4
|
+
export { assignTrackingIds, readTrackSeq, TRACK_ID_ATTRIBUTE, TRACK_SEQ_ATTRIBUTE, } from './utils/linkTrackingIds';
|
|
5
|
+
export type { TrackingIdResult } from './utils/linkTrackingIds';
|
|
4
6
|
export type { StripoEventType } from './@types/events';
|
|
5
7
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -45,6 +45,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
45
45
|
customFieldAttributes: string[];
|
|
46
46
|
selectedUnsubscribePages: number[];
|
|
47
47
|
forceRecreate: boolean;
|
|
48
|
+
trackIdCounter: number;
|
|
48
49
|
migration: {
|
|
49
50
|
recommendationConfigs: {
|
|
50
51
|
[x: string]: {
|
|
@@ -102,6 +103,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
102
103
|
liquidSyntax: boolean;
|
|
103
104
|
autosave: boolean;
|
|
104
105
|
allowlistEnabled: boolean;
|
|
106
|
+
linkTrackingIds: boolean;
|
|
105
107
|
};
|
|
106
108
|
blocks: {
|
|
107
109
|
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")[];
|
|
@@ -183,6 +185,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
183
185
|
customFieldAttributes: string[];
|
|
184
186
|
selectedUnsubscribePages: number[];
|
|
185
187
|
forceRecreate: boolean;
|
|
188
|
+
trackIdCounter: number;
|
|
186
189
|
migration: {
|
|
187
190
|
recommendationConfigs: {
|
|
188
191
|
[x: string]: {
|
|
@@ -240,6 +243,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
240
243
|
liquidSyntax: boolean;
|
|
241
244
|
autosave: boolean;
|
|
242
245
|
allowlistEnabled: boolean;
|
|
246
|
+
linkTrackingIds: boolean;
|
|
243
247
|
};
|
|
244
248
|
blocks: {
|
|
245
249
|
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")[];
|
|
@@ -321,6 +325,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
321
325
|
customFieldAttributes: string[];
|
|
322
326
|
selectedUnsubscribePages: number[];
|
|
323
327
|
forceRecreate: boolean;
|
|
328
|
+
trackIdCounter: number;
|
|
324
329
|
migration: {
|
|
325
330
|
recommendationConfigs: {
|
|
326
331
|
[x: string]: {
|
|
@@ -378,6 +383,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
378
383
|
liquidSyntax: boolean;
|
|
379
384
|
autosave: boolean;
|
|
380
385
|
allowlistEnabled: boolean;
|
|
386
|
+
linkTrackingIds: boolean;
|
|
381
387
|
};
|
|
382
388
|
blocks: {
|
|
383
389
|
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")[];
|
|
@@ -459,6 +465,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
459
465
|
customFieldAttributes: string[];
|
|
460
466
|
selectedUnsubscribePages: number[];
|
|
461
467
|
forceRecreate: boolean;
|
|
468
|
+
trackIdCounter: number;
|
|
462
469
|
migration: {
|
|
463
470
|
recommendationConfigs: {
|
|
464
471
|
[x: string]: {
|
|
@@ -516,6 +523,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
516
523
|
liquidSyntax: boolean;
|
|
517
524
|
autosave: boolean;
|
|
518
525
|
allowlistEnabled: boolean;
|
|
526
|
+
linkTrackingIds: boolean;
|
|
519
527
|
};
|
|
520
528
|
blocks: {
|
|
521
529
|
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")[];
|
|
@@ -597,6 +605,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
597
605
|
customFieldAttributes: string[];
|
|
598
606
|
selectedUnsubscribePages: number[];
|
|
599
607
|
forceRecreate: boolean;
|
|
608
|
+
trackIdCounter: number;
|
|
600
609
|
migration: {
|
|
601
610
|
recommendationConfigs: {
|
|
602
611
|
[x: string]: {
|
|
@@ -654,6 +663,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
654
663
|
liquidSyntax: boolean;
|
|
655
664
|
autosave: boolean;
|
|
656
665
|
allowlistEnabled: boolean;
|
|
666
|
+
linkTrackingIds: boolean;
|
|
657
667
|
};
|
|
658
668
|
blocks: {
|
|
659
669
|
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")[];
|
|
@@ -735,6 +745,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
735
745
|
customFieldAttributes: string[];
|
|
736
746
|
selectedUnsubscribePages: number[];
|
|
737
747
|
forceRecreate: boolean;
|
|
748
|
+
trackIdCounter: number;
|
|
738
749
|
migration: {
|
|
739
750
|
recommendationConfigs: {
|
|
740
751
|
[x: string]: {
|
|
@@ -792,6 +803,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
792
803
|
liquidSyntax: boolean;
|
|
793
804
|
autosave: boolean;
|
|
794
805
|
allowlistEnabled: boolean;
|
|
806
|
+
linkTrackingIds: boolean;
|
|
795
807
|
};
|
|
796
808
|
blocks: {
|
|
797
809
|
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")[];
|
|
@@ -873,6 +885,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
873
885
|
customFieldAttributes: string[];
|
|
874
886
|
selectedUnsubscribePages: number[];
|
|
875
887
|
forceRecreate: boolean;
|
|
888
|
+
trackIdCounter: number;
|
|
876
889
|
migration: {
|
|
877
890
|
recommendationConfigs: {
|
|
878
891
|
[x: string]: {
|
|
@@ -930,6 +943,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
930
943
|
liquidSyntax: boolean;
|
|
931
944
|
autosave: boolean;
|
|
932
945
|
allowlistEnabled: boolean;
|
|
946
|
+
linkTrackingIds: boolean;
|
|
933
947
|
};
|
|
934
948
|
blocks: {
|
|
935
949
|
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")[];
|
|
@@ -1011,6 +1025,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1011
1025
|
customFieldAttributes: string[];
|
|
1012
1026
|
selectedUnsubscribePages: number[];
|
|
1013
1027
|
forceRecreate: boolean;
|
|
1028
|
+
trackIdCounter: number;
|
|
1014
1029
|
migration: {
|
|
1015
1030
|
recommendationConfigs: {
|
|
1016
1031
|
[x: string]: {
|
|
@@ -1068,6 +1083,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1068
1083
|
liquidSyntax: boolean;
|
|
1069
1084
|
autosave: boolean;
|
|
1070
1085
|
allowlistEnabled: boolean;
|
|
1086
|
+
linkTrackingIds: boolean;
|
|
1071
1087
|
};
|
|
1072
1088
|
blocks: {
|
|
1073
1089
|
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")[];
|
|
@@ -1149,6 +1165,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1149
1165
|
customFieldAttributes: string[];
|
|
1150
1166
|
selectedUnsubscribePages: number[];
|
|
1151
1167
|
forceRecreate: boolean;
|
|
1168
|
+
trackIdCounter: number;
|
|
1152
1169
|
migration: {
|
|
1153
1170
|
recommendationConfigs: {
|
|
1154
1171
|
[x: string]: {
|
|
@@ -1206,6 +1223,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1206
1223
|
liquidSyntax: boolean;
|
|
1207
1224
|
autosave: boolean;
|
|
1208
1225
|
allowlistEnabled: boolean;
|
|
1226
|
+
linkTrackingIds: boolean;
|
|
1209
1227
|
};
|
|
1210
1228
|
blocks: {
|
|
1211
1229
|
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")[];
|
|
@@ -1287,6 +1305,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1287
1305
|
customFieldAttributes: string[];
|
|
1288
1306
|
selectedUnsubscribePages: number[];
|
|
1289
1307
|
forceRecreate: boolean;
|
|
1308
|
+
trackIdCounter: number;
|
|
1290
1309
|
migration: {
|
|
1291
1310
|
recommendationConfigs: {
|
|
1292
1311
|
[x: string]: {
|
|
@@ -1344,6 +1363,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1344
1363
|
liquidSyntax: boolean;
|
|
1345
1364
|
autosave: boolean;
|
|
1346
1365
|
allowlistEnabled: boolean;
|
|
1366
|
+
linkTrackingIds: boolean;
|
|
1347
1367
|
};
|
|
1348
1368
|
blocks: {
|
|
1349
1369
|
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")[];
|
|
@@ -1425,6 +1445,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1425
1445
|
customFieldAttributes: string[];
|
|
1426
1446
|
selectedUnsubscribePages: number[];
|
|
1427
1447
|
forceRecreate: boolean;
|
|
1448
|
+
trackIdCounter: number;
|
|
1428
1449
|
migration: {
|
|
1429
1450
|
recommendationConfigs: {
|
|
1430
1451
|
[x: string]: {
|
|
@@ -1482,6 +1503,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1482
1503
|
liquidSyntax: boolean;
|
|
1483
1504
|
autosave: boolean;
|
|
1484
1505
|
allowlistEnabled: boolean;
|
|
1506
|
+
linkTrackingIds: boolean;
|
|
1485
1507
|
};
|
|
1486
1508
|
blocks: {
|
|
1487
1509
|
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")[];
|
|
@@ -1563,6 +1585,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1563
1585
|
customFieldAttributes: string[];
|
|
1564
1586
|
selectedUnsubscribePages: number[];
|
|
1565
1587
|
forceRecreate: boolean;
|
|
1588
|
+
trackIdCounter: number;
|
|
1566
1589
|
migration: {
|
|
1567
1590
|
recommendationConfigs: {
|
|
1568
1591
|
[x: string]: {
|
|
@@ -1620,6 +1643,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1620
1643
|
liquidSyntax: boolean;
|
|
1621
1644
|
autosave: boolean;
|
|
1622
1645
|
allowlistEnabled: boolean;
|
|
1646
|
+
linkTrackingIds: boolean;
|
|
1623
1647
|
};
|
|
1624
1648
|
blocks: {
|
|
1625
1649
|
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")[];
|
|
@@ -1701,6 +1725,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1701
1725
|
customFieldAttributes: string[];
|
|
1702
1726
|
selectedUnsubscribePages: number[];
|
|
1703
1727
|
forceRecreate: boolean;
|
|
1728
|
+
trackIdCounter: number;
|
|
1704
1729
|
migration: {
|
|
1705
1730
|
recommendationConfigs: {
|
|
1706
1731
|
[x: string]: {
|
|
@@ -1758,6 +1783,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1758
1783
|
liquidSyntax: boolean;
|
|
1759
1784
|
autosave: boolean;
|
|
1760
1785
|
allowlistEnabled: boolean;
|
|
1786
|
+
linkTrackingIds: boolean;
|
|
1761
1787
|
};
|
|
1762
1788
|
blocks: {
|
|
1763
1789
|
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")[];
|
|
@@ -1839,6 +1865,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1839
1865
|
customFieldAttributes: string[];
|
|
1840
1866
|
selectedUnsubscribePages: number[];
|
|
1841
1867
|
forceRecreate: boolean;
|
|
1868
|
+
trackIdCounter: number;
|
|
1842
1869
|
migration: {
|
|
1843
1870
|
recommendationConfigs: {
|
|
1844
1871
|
[x: string]: {
|
|
@@ -1896,6 +1923,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1896
1923
|
liquidSyntax: boolean;
|
|
1897
1924
|
autosave: boolean;
|
|
1898
1925
|
allowlistEnabled: boolean;
|
|
1926
|
+
linkTrackingIds: boolean;
|
|
1899
1927
|
};
|
|
1900
1928
|
blocks: {
|
|
1901
1929
|
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")[];
|
|
@@ -1977,6 +2005,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1977
2005
|
customFieldAttributes: string[];
|
|
1978
2006
|
selectedUnsubscribePages: number[];
|
|
1979
2007
|
forceRecreate: boolean;
|
|
2008
|
+
trackIdCounter: number;
|
|
1980
2009
|
migration: {
|
|
1981
2010
|
recommendationConfigs: {
|
|
1982
2011
|
[x: string]: {
|
|
@@ -2034,6 +2063,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2034
2063
|
liquidSyntax: boolean;
|
|
2035
2064
|
autosave: boolean;
|
|
2036
2065
|
allowlistEnabled: boolean;
|
|
2066
|
+
linkTrackingIds: boolean;
|
|
2037
2067
|
};
|
|
2038
2068
|
blocks: {
|
|
2039
2069
|
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")[];
|
|
@@ -2115,6 +2145,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2115
2145
|
customFieldAttributes: string[];
|
|
2116
2146
|
selectedUnsubscribePages: number[];
|
|
2117
2147
|
forceRecreate: boolean;
|
|
2148
|
+
trackIdCounter: number;
|
|
2118
2149
|
migration: {
|
|
2119
2150
|
recommendationConfigs: {
|
|
2120
2151
|
[x: string]: {
|
|
@@ -2172,6 +2203,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2172
2203
|
liquidSyntax: boolean;
|
|
2173
2204
|
autosave: boolean;
|
|
2174
2205
|
allowlistEnabled: boolean;
|
|
2206
|
+
linkTrackingIds: boolean;
|
|
2175
2207
|
};
|
|
2176
2208
|
blocks: {
|
|
2177
2209
|
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")[];
|
|
@@ -2253,6 +2285,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2253
2285
|
customFieldAttributes: string[];
|
|
2254
2286
|
selectedUnsubscribePages: number[];
|
|
2255
2287
|
forceRecreate: boolean;
|
|
2288
|
+
trackIdCounter: number;
|
|
2256
2289
|
migration: {
|
|
2257
2290
|
recommendationConfigs: {
|
|
2258
2291
|
[x: string]: {
|
|
@@ -2310,6 +2343,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2310
2343
|
liquidSyntax: boolean;
|
|
2311
2344
|
autosave: boolean;
|
|
2312
2345
|
allowlistEnabled: boolean;
|
|
2346
|
+
linkTrackingIds: boolean;
|
|
2313
2347
|
};
|
|
2314
2348
|
blocks: {
|
|
2315
2349
|
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")[];
|
|
@@ -2393,6 +2427,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2393
2427
|
customFieldAttributes: string[];
|
|
2394
2428
|
selectedUnsubscribePages: number[];
|
|
2395
2429
|
forceRecreate: boolean;
|
|
2430
|
+
trackIdCounter: number;
|
|
2396
2431
|
migration: {
|
|
2397
2432
|
recommendationConfigs: {
|
|
2398
2433
|
[x: string]: {
|
|
@@ -2450,6 +2485,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2450
2485
|
liquidSyntax: boolean;
|
|
2451
2486
|
autosave: boolean;
|
|
2452
2487
|
allowlistEnabled: boolean;
|
|
2488
|
+
linkTrackingIds: boolean;
|
|
2453
2489
|
};
|
|
2454
2490
|
blocks: {
|
|
2455
2491
|
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")[];
|