@useinsider/guido 3.13.1-beta.a1e3c5f → 3.13.1-beta.de07673
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +13 -15
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +66 -67
- package/dist/config/migrator/index.js +7 -7
- package/dist/config/migrator/productNameLinkMigrator.js +27 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +16 -16
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +36 -35
- package/dist/extensions/Blocks/Items/template.js +228 -263
- package/dist/extensions/Blocks/Items/utils/nameNode.js +4 -0
- package/dist/guido.css +1 -1
- package/dist/library.js +9 -14
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/config/migrator/index.d.ts +1 -4
- package/dist/src/config/migrator/productNameLinkMigrator.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/utils/nameNode.d.ts +9 -0
- package/dist/src/library.d.ts +0 -2
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/src/stores/editor.d.ts +0 -25
- package/dist/src/utils/unwrapProductNameLink.d.ts +15 -0
- package/dist/stores/editor.js +1 -4
- package/dist/utils/pairProductVariables.js +27 -24
- package/dist/utils/templatePreparation.js +59 -70
- package/dist/utils/unwrapProductNameLink.js +37 -0
- package/package.json +1 -1
- package/dist/config/migrator/trackIdMigrator.js +0 -11
- package/dist/src/config/migrator/trackIdMigrator.d.ts +0 -6
- package/dist/src/utils/linkTrackingIds.d.ts +0 -25
- package/dist/utils/linkTrackingIds.js +0 -44
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-5079a1c8]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5079a1c8]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5079a1c8]{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,19 +1,14 @@
|
|
|
1
1
|
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
-
import { MessageType as
|
|
2
|
+
import { MessageType as f, ProductType as t } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
5
|
-
import { TRACK_ID_ATTRIBUTE as m, TRACK_SEQ_ATTRIBUTE as l, assignTrackingIds as x, readTrackSeq as A } from "./utils/linkTrackingIds.js";
|
|
4
|
+
import { getValidationErrors as s, isValidConfig as d, parseConfig as g, parseConfigSafe as n, validateConfig as l } from "./@types/config/validator.js";
|
|
6
5
|
export {
|
|
7
6
|
a as Guido,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
d as parseConfig,
|
|
16
|
-
g as parseConfigSafe,
|
|
17
|
-
A as readTrackSeq,
|
|
18
|
-
n as validateConfig
|
|
7
|
+
f as MessageType,
|
|
8
|
+
t as ProductType,
|
|
9
|
+
s as getValidationErrors,
|
|
10
|
+
d as isValidConfig,
|
|
11
|
+
g as parseConfig,
|
|
12
|
+
n as parseConfigSafe,
|
|
13
|
+
l as validateConfig
|
|
19
14
|
};
|
|
@@ -385,8 +385,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
385
385
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
386
386
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
387
387
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
388
|
-
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
389
|
-
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
390
388
|
}, undefined>;
|
|
391
389
|
/**
|
|
392
390
|
* Default block types available in Stripo
|
|
@@ -776,8 +774,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
776
774
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
777
775
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
778
776
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
779
|
-
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
780
|
-
readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
781
777
|
}, undefined>, {}>;
|
|
782
778
|
/** Block configuration */
|
|
783
779
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -97,7 +97,6 @@ export declare const useConfig: () => {
|
|
|
97
97
|
liquidSyntax: boolean;
|
|
98
98
|
autosave: boolean;
|
|
99
99
|
allowlistEnabled: boolean;
|
|
100
|
-
linkTrackingIds: boolean;
|
|
101
100
|
};
|
|
102
101
|
blocks: {
|
|
103
102
|
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")[];
|
|
@@ -230,7 +229,6 @@ export declare const useConfig: () => {
|
|
|
230
229
|
liquidSyntax: boolean;
|
|
231
230
|
autosave: boolean;
|
|
232
231
|
allowlistEnabled: boolean;
|
|
233
|
-
linkTrackingIds: boolean;
|
|
234
232
|
} | null>;
|
|
235
233
|
blocks: import("vue").ComputedRef<{
|
|
236
234
|
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,5 +1,2 @@
|
|
|
1
1
|
import type { LegacyRecommendationConfig } from '@@/Types/config';
|
|
2
|
-
export
|
|
3
|
-
linkTrackingIds?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, options?: MigrateOptions) => Promise<string>;
|
|
2
|
+
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>) => Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function migrateProductNameLink(html: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ImmutableHtmlElementNode, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the element carrying the product name text.
|
|
4
|
+
*
|
|
5
|
+
* New blocks put `product-attr="name"` on the `<p>`; blocks saved before SD-147616 still
|
|
6
|
+
* carry it on the inner `<a>`, and the oldest ones have no attribute at all — hence the
|
|
7
|
+
* `p > a` fallback. Without it, trimming silently no-ops on legacy blocks.
|
|
8
|
+
*/
|
|
9
|
+
export declare const findNameTextNode: (container?: ImmutableHtmlNode) => ImmutableHtmlElementNode | undefined;
|
package/dist/src/library.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
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';
|
|
6
4
|
export type { StripoEventType } from './@types/events';
|
|
7
5
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -102,7 +102,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
102
102
|
liquidSyntax: boolean;
|
|
103
103
|
autosave: boolean;
|
|
104
104
|
allowlistEnabled: boolean;
|
|
105
|
-
linkTrackingIds: boolean;
|
|
106
105
|
};
|
|
107
106
|
blocks: {
|
|
108
107
|
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")[];
|
|
@@ -241,7 +240,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
241
240
|
liquidSyntax: boolean;
|
|
242
241
|
autosave: boolean;
|
|
243
242
|
allowlistEnabled: boolean;
|
|
244
|
-
linkTrackingIds: boolean;
|
|
245
243
|
};
|
|
246
244
|
blocks: {
|
|
247
245
|
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")[];
|
|
@@ -380,7 +378,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
380
378
|
liquidSyntax: boolean;
|
|
381
379
|
autosave: boolean;
|
|
382
380
|
allowlistEnabled: boolean;
|
|
383
|
-
linkTrackingIds: boolean;
|
|
384
381
|
};
|
|
385
382
|
blocks: {
|
|
386
383
|
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")[];
|
|
@@ -519,7 +516,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
519
516
|
liquidSyntax: boolean;
|
|
520
517
|
autosave: boolean;
|
|
521
518
|
allowlistEnabled: boolean;
|
|
522
|
-
linkTrackingIds: boolean;
|
|
523
519
|
};
|
|
524
520
|
blocks: {
|
|
525
521
|
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")[];
|
|
@@ -658,7 +654,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
658
654
|
liquidSyntax: boolean;
|
|
659
655
|
autosave: boolean;
|
|
660
656
|
allowlistEnabled: boolean;
|
|
661
|
-
linkTrackingIds: boolean;
|
|
662
657
|
};
|
|
663
658
|
blocks: {
|
|
664
659
|
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")[];
|
|
@@ -797,7 +792,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
797
792
|
liquidSyntax: boolean;
|
|
798
793
|
autosave: boolean;
|
|
799
794
|
allowlistEnabled: boolean;
|
|
800
|
-
linkTrackingIds: boolean;
|
|
801
795
|
};
|
|
802
796
|
blocks: {
|
|
803
797
|
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")[];
|
|
@@ -936,7 +930,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
936
930
|
liquidSyntax: boolean;
|
|
937
931
|
autosave: boolean;
|
|
938
932
|
allowlistEnabled: boolean;
|
|
939
|
-
linkTrackingIds: boolean;
|
|
940
933
|
};
|
|
941
934
|
blocks: {
|
|
942
935
|
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")[];
|
|
@@ -1075,7 +1068,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1075
1068
|
liquidSyntax: boolean;
|
|
1076
1069
|
autosave: boolean;
|
|
1077
1070
|
allowlistEnabled: boolean;
|
|
1078
|
-
linkTrackingIds: boolean;
|
|
1079
1071
|
};
|
|
1080
1072
|
blocks: {
|
|
1081
1073
|
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")[];
|
|
@@ -1214,7 +1206,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1214
1206
|
liquidSyntax: boolean;
|
|
1215
1207
|
autosave: boolean;
|
|
1216
1208
|
allowlistEnabled: boolean;
|
|
1217
|
-
linkTrackingIds: boolean;
|
|
1218
1209
|
};
|
|
1219
1210
|
blocks: {
|
|
1220
1211
|
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")[];
|
|
@@ -1353,7 +1344,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1353
1344
|
liquidSyntax: boolean;
|
|
1354
1345
|
autosave: boolean;
|
|
1355
1346
|
allowlistEnabled: boolean;
|
|
1356
|
-
linkTrackingIds: boolean;
|
|
1357
1347
|
};
|
|
1358
1348
|
blocks: {
|
|
1359
1349
|
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")[];
|
|
@@ -1492,7 +1482,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1492
1482
|
liquidSyntax: boolean;
|
|
1493
1483
|
autosave: boolean;
|
|
1494
1484
|
allowlistEnabled: boolean;
|
|
1495
|
-
linkTrackingIds: boolean;
|
|
1496
1485
|
};
|
|
1497
1486
|
blocks: {
|
|
1498
1487
|
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")[];
|
|
@@ -1631,7 +1620,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1631
1620
|
liquidSyntax: boolean;
|
|
1632
1621
|
autosave: boolean;
|
|
1633
1622
|
allowlistEnabled: boolean;
|
|
1634
|
-
linkTrackingIds: boolean;
|
|
1635
1623
|
};
|
|
1636
1624
|
blocks: {
|
|
1637
1625
|
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")[];
|
|
@@ -1770,7 +1758,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1770
1758
|
liquidSyntax: boolean;
|
|
1771
1759
|
autosave: boolean;
|
|
1772
1760
|
allowlistEnabled: boolean;
|
|
1773
|
-
linkTrackingIds: boolean;
|
|
1774
1761
|
};
|
|
1775
1762
|
blocks: {
|
|
1776
1763
|
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")[];
|
|
@@ -1909,7 +1896,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1909
1896
|
liquidSyntax: boolean;
|
|
1910
1897
|
autosave: boolean;
|
|
1911
1898
|
allowlistEnabled: boolean;
|
|
1912
|
-
linkTrackingIds: boolean;
|
|
1913
1899
|
};
|
|
1914
1900
|
blocks: {
|
|
1915
1901
|
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")[];
|
|
@@ -2048,7 +2034,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2048
2034
|
liquidSyntax: boolean;
|
|
2049
2035
|
autosave: boolean;
|
|
2050
2036
|
allowlistEnabled: boolean;
|
|
2051
|
-
linkTrackingIds: boolean;
|
|
2052
2037
|
};
|
|
2053
2038
|
blocks: {
|
|
2054
2039
|
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")[];
|
|
@@ -2187,7 +2172,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2187
2172
|
liquidSyntax: boolean;
|
|
2188
2173
|
autosave: boolean;
|
|
2189
2174
|
allowlistEnabled: boolean;
|
|
2190
|
-
linkTrackingIds: boolean;
|
|
2191
2175
|
};
|
|
2192
2176
|
blocks: {
|
|
2193
2177
|
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")[];
|
|
@@ -2326,7 +2310,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2326
2310
|
liquidSyntax: boolean;
|
|
2327
2311
|
autosave: boolean;
|
|
2328
2312
|
allowlistEnabled: boolean;
|
|
2329
|
-
linkTrackingIds: boolean;
|
|
2330
2313
|
};
|
|
2331
2314
|
blocks: {
|
|
2332
2315
|
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")[];
|
|
@@ -2467,7 +2450,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2467
2450
|
liquidSyntax: boolean;
|
|
2468
2451
|
autosave: boolean;
|
|
2469
2452
|
allowlistEnabled: boolean;
|
|
2470
|
-
linkTrackingIds: boolean;
|
|
2471
2453
|
};
|
|
2472
2454
|
blocks: {
|
|
2473
2455
|
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")[];
|
|
@@ -9,7 +9,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
9
9
|
isStripoInitialized: boolean;
|
|
10
10
|
templateId: string;
|
|
11
11
|
syncModulesEnabled: boolean;
|
|
12
|
-
trackIdSessionFloor: number;
|
|
13
12
|
}, {
|
|
14
13
|
isEditorToolbarVisible: (state: {
|
|
15
14
|
loadingStatus: boolean;
|
|
@@ -22,7 +21,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
22
21
|
isStripoInitialized: boolean;
|
|
23
22
|
templateId: string;
|
|
24
23
|
syncModulesEnabled: boolean;
|
|
25
|
-
trackIdSessionFloor: number;
|
|
26
24
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
27
25
|
loadingStatus: boolean;
|
|
28
26
|
isCodeEditorOpen: boolean;
|
|
@@ -34,7 +32,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
34
32
|
isStripoInitialized: boolean;
|
|
35
33
|
templateId: string;
|
|
36
34
|
syncModulesEnabled: boolean;
|
|
37
|
-
trackIdSessionFloor: number;
|
|
38
35
|
}>) => boolean;
|
|
39
36
|
isUndoButtonDisabled: (state: {
|
|
40
37
|
loadingStatus: boolean;
|
|
@@ -47,7 +44,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
47
44
|
isStripoInitialized: boolean;
|
|
48
45
|
templateId: string;
|
|
49
46
|
syncModulesEnabled: boolean;
|
|
50
|
-
trackIdSessionFloor: number;
|
|
51
47
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
52
48
|
loadingStatus: boolean;
|
|
53
49
|
isCodeEditorOpen: boolean;
|
|
@@ -59,7 +55,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
59
55
|
isStripoInitialized: boolean;
|
|
60
56
|
templateId: string;
|
|
61
57
|
syncModulesEnabled: boolean;
|
|
62
|
-
trackIdSessionFloor: number;
|
|
63
58
|
}>) => boolean;
|
|
64
59
|
isRedoButtonDisabled: (state: {
|
|
65
60
|
loadingStatus: boolean;
|
|
@@ -72,7 +67,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
72
67
|
isStripoInitialized: boolean;
|
|
73
68
|
templateId: string;
|
|
74
69
|
syncModulesEnabled: boolean;
|
|
75
|
-
trackIdSessionFloor: number;
|
|
76
70
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
77
71
|
loadingStatus: boolean;
|
|
78
72
|
isCodeEditorOpen: boolean;
|
|
@@ -84,7 +78,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
84
78
|
isStripoInitialized: boolean;
|
|
85
79
|
templateId: string;
|
|
86
80
|
syncModulesEnabled: boolean;
|
|
87
|
-
trackIdSessionFloor: number;
|
|
88
81
|
}>) => boolean;
|
|
89
82
|
isCodeEditorButtonDisabled: (state: {
|
|
90
83
|
loadingStatus: boolean;
|
|
@@ -97,7 +90,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
97
90
|
isStripoInitialized: boolean;
|
|
98
91
|
templateId: string;
|
|
99
92
|
syncModulesEnabled: boolean;
|
|
100
|
-
trackIdSessionFloor: number;
|
|
101
93
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
102
94
|
loadingStatus: boolean;
|
|
103
95
|
isCodeEditorOpen: boolean;
|
|
@@ -109,7 +101,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
109
101
|
isStripoInitialized: boolean;
|
|
110
102
|
templateId: string;
|
|
111
103
|
syncModulesEnabled: boolean;
|
|
112
|
-
trackIdSessionFloor: number;
|
|
113
104
|
}>) => boolean;
|
|
114
105
|
isPreviewButtonDisabled: (state: {
|
|
115
106
|
loadingStatus: boolean;
|
|
@@ -122,7 +113,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
122
113
|
isStripoInitialized: boolean;
|
|
123
114
|
templateId: string;
|
|
124
115
|
syncModulesEnabled: boolean;
|
|
125
|
-
trackIdSessionFloor: number;
|
|
126
116
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
127
117
|
loadingStatus: boolean;
|
|
128
118
|
isCodeEditorOpen: boolean;
|
|
@@ -134,7 +124,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
134
124
|
isStripoInitialized: boolean;
|
|
135
125
|
templateId: string;
|
|
136
126
|
syncModulesEnabled: boolean;
|
|
137
|
-
trackIdSessionFloor: number;
|
|
138
127
|
}>) => boolean;
|
|
139
128
|
isViewOptionsDisabled: (state: {
|
|
140
129
|
loadingStatus: boolean;
|
|
@@ -147,7 +136,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
147
136
|
isStripoInitialized: boolean;
|
|
148
137
|
templateId: string;
|
|
149
138
|
syncModulesEnabled: boolean;
|
|
150
|
-
trackIdSessionFloor: number;
|
|
151
139
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
152
140
|
loadingStatus: boolean;
|
|
153
141
|
isCodeEditorOpen: boolean;
|
|
@@ -159,7 +147,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
159
147
|
isStripoInitialized: boolean;
|
|
160
148
|
templateId: string;
|
|
161
149
|
syncModulesEnabled: boolean;
|
|
162
|
-
trackIdSessionFloor: number;
|
|
163
150
|
}>) => boolean;
|
|
164
151
|
isVersionHistoryButtonDisabled: (state: {
|
|
165
152
|
loadingStatus: boolean;
|
|
@@ -172,7 +159,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
172
159
|
isStripoInitialized: boolean;
|
|
173
160
|
templateId: string;
|
|
174
161
|
syncModulesEnabled: boolean;
|
|
175
|
-
trackIdSessionFloor: number;
|
|
176
162
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
177
163
|
loadingStatus: boolean;
|
|
178
164
|
isCodeEditorOpen: boolean;
|
|
@@ -184,7 +170,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
184
170
|
isStripoInitialized: boolean;
|
|
185
171
|
templateId: string;
|
|
186
172
|
syncModulesEnabled: boolean;
|
|
187
|
-
trackIdSessionFloor: number;
|
|
188
173
|
}>) => boolean;
|
|
189
174
|
isExportButtonDisabled: (state: {
|
|
190
175
|
loadingStatus: boolean;
|
|
@@ -197,7 +182,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
197
182
|
isStripoInitialized: boolean;
|
|
198
183
|
templateId: string;
|
|
199
184
|
syncModulesEnabled: boolean;
|
|
200
|
-
trackIdSessionFloor: number;
|
|
201
185
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
202
186
|
loadingStatus: boolean;
|
|
203
187
|
isCodeEditorOpen: boolean;
|
|
@@ -209,7 +193,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
209
193
|
isStripoInitialized: boolean;
|
|
210
194
|
templateId: string;
|
|
211
195
|
syncModulesEnabled: boolean;
|
|
212
|
-
trackIdSessionFloor: number;
|
|
213
196
|
}>) => boolean;
|
|
214
197
|
isSaveAsButtonDisabled: (state: {
|
|
215
198
|
loadingStatus: boolean;
|
|
@@ -222,7 +205,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
222
205
|
isStripoInitialized: boolean;
|
|
223
206
|
templateId: string;
|
|
224
207
|
syncModulesEnabled: boolean;
|
|
225
|
-
trackIdSessionFloor: number;
|
|
226
208
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
227
209
|
loadingStatus: boolean;
|
|
228
210
|
isCodeEditorOpen: boolean;
|
|
@@ -234,7 +216,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
234
216
|
isStripoInitialized: boolean;
|
|
235
217
|
templateId: string;
|
|
236
218
|
syncModulesEnabled: boolean;
|
|
237
|
-
trackIdSessionFloor: number;
|
|
238
219
|
}>) => boolean;
|
|
239
220
|
isTestButtonDisabled: (state: {
|
|
240
221
|
loadingStatus: boolean;
|
|
@@ -247,7 +228,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
247
228
|
isStripoInitialized: boolean;
|
|
248
229
|
templateId: string;
|
|
249
230
|
syncModulesEnabled: boolean;
|
|
250
|
-
trackIdSessionFloor: number;
|
|
251
231
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
252
232
|
loadingStatus: boolean;
|
|
253
233
|
isCodeEditorOpen: boolean;
|
|
@@ -259,7 +239,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
259
239
|
isStripoInitialized: boolean;
|
|
260
240
|
templateId: string;
|
|
261
241
|
syncModulesEnabled: boolean;
|
|
262
|
-
trackIdSessionFloor: number;
|
|
263
242
|
}>) => boolean;
|
|
264
243
|
isSaveButtonDisabled: (state: {
|
|
265
244
|
loadingStatus: boolean;
|
|
@@ -272,7 +251,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
272
251
|
isStripoInitialized: boolean;
|
|
273
252
|
templateId: string;
|
|
274
253
|
syncModulesEnabled: boolean;
|
|
275
|
-
trackIdSessionFloor: number;
|
|
276
254
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
277
255
|
loadingStatus: boolean;
|
|
278
256
|
isCodeEditorOpen: boolean;
|
|
@@ -284,7 +262,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
284
262
|
isStripoInitialized: boolean;
|
|
285
263
|
templateId: string;
|
|
286
264
|
syncModulesEnabled: boolean;
|
|
287
|
-
trackIdSessionFloor: number;
|
|
288
265
|
}>) => boolean;
|
|
289
266
|
isInSaveableState: (state: {
|
|
290
267
|
loadingStatus: boolean;
|
|
@@ -297,7 +274,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
297
274
|
isStripoInitialized: boolean;
|
|
298
275
|
templateId: string;
|
|
299
276
|
syncModulesEnabled: boolean;
|
|
300
|
-
trackIdSessionFloor: number;
|
|
301
277
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
302
278
|
loadingStatus: boolean;
|
|
303
279
|
isCodeEditorOpen: boolean;
|
|
@@ -309,6 +285,5 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
309
285
|
isStripoInitialized: boolean;
|
|
310
286
|
templateId: string;
|
|
311
287
|
syncModulesEnabled: boolean;
|
|
312
|
-
trackIdSessionFloor: number;
|
|
313
288
|
}>) => boolean;
|
|
314
289
|
}, {}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unwraps the `<a>` around an Items-block product name so the name compiles as plain text.
|
|
3
|
+
*
|
|
4
|
+
* Outlook's Word engine ignores `color: inherit` on an `<a>` and paints its own blue link
|
|
5
|
+
* color (SD-147616). New blocks no longer emit the anchor, but templates saved before the
|
|
6
|
+
* fix still carry it in their stored HTML — this heals them at compile time.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Removes the product-name link from every `.ins-product-td` in the document, in place.
|
|
10
|
+
*
|
|
11
|
+
* Scoped like `pairProductVariables` so partner or legacy recommendation markup outside a
|
|
12
|
+
* product cell is never touched. Idempotent.
|
|
13
|
+
* @param doc - Parsed template document, mutated in place
|
|
14
|
+
*/
|
|
15
|
+
export declare function unwrapProductNameLinks(doc: Document): void;
|
package/dist/stores/editor.js
CHANGED
|
@@ -10,10 +10,7 @@ const o = e("guidoEditor", {
|
|
|
10
10
|
hasChanges: !1,
|
|
11
11
|
isStripoInitialized: !1,
|
|
12
12
|
templateId: "",
|
|
13
|
-
syncModulesEnabled: !1
|
|
14
|
-
// In-session id high-water mark; floors tracking-id minting so ids
|
|
15
|
-
// deleted by a version restore / paste-over are never reused.
|
|
16
|
-
trackIdSessionFloor: 0
|
|
13
|
+
syncModulesEnabled: !1
|
|
17
14
|
}),
|
|
18
15
|
getters: {
|
|
19
16
|
// Middle Slot
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { productPairs as
|
|
1
|
+
import { productPairs as q } from "../extensions/Blocks/Items/enums/productEnums.js";
|
|
2
2
|
import { DefaultConfigValues as O } from "../extensions/Blocks/Items/enums/settingsEnums.js";
|
|
3
|
-
import { preserveTextStyles as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { preserveTextStyles as y } from "./preserveTextStyles.js";
|
|
4
|
+
import { unwrapProductNameLinks as U } from "./unwrapProductNameLink.js";
|
|
5
|
+
function Y(L) {
|
|
6
|
+
const H = L.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), T = new DOMParser().parseFromString(H, "text/html");
|
|
7
|
+
U(T);
|
|
8
|
+
const C = q.PAIRS_FOR_EXTENSION;
|
|
9
|
+
Object.entries(C).forEach(([r, f]) => {
|
|
10
|
+
T.querySelectorAll(".ins-product-td").forEach((c) => {
|
|
11
|
+
const A = c.getAttribute("data-number") || "1", m = c.getAttribute("data-type") || "CART_ITEMS";
|
|
9
12
|
c.querySelectorAll(`[product-attr="${r}"]`).forEach((t) => {
|
|
10
13
|
var F, I, w;
|
|
11
|
-
const
|
|
14
|
+
const $ = t.getAttribute("data-type") || m, u = t.getAttribute("data-number") || A, d = f[$];
|
|
12
15
|
if (d)
|
|
13
16
|
switch (r) {
|
|
14
17
|
case "imageSrc": {
|
|
@@ -19,13 +22,13 @@ function V(L) {
|
|
|
19
22
|
if (a && e.src) {
|
|
20
23
|
const o = e.src;
|
|
21
24
|
a.some((h) => {
|
|
22
|
-
const l = h.split("/").pop() || "",
|
|
23
|
-
return o.includes(h) || o.includes(l) ||
|
|
25
|
+
const l = h.split("/").pop() || "", b = o.split("/").pop() || "";
|
|
26
|
+
return o.includes(h) || o.includes(l) || b === l;
|
|
24
27
|
}) && (e.src = `{{${s}_${u}}}`);
|
|
25
28
|
}
|
|
26
|
-
const n = (I = (F =
|
|
29
|
+
const n = (I = (F = C.name) == null ? void 0 : F[$]) == null ? void 0 : I.ATTR;
|
|
27
30
|
if (n && e.setAttribute("alt", `{{${n}_${u}}}`), i) {
|
|
28
|
-
const o = (w =
|
|
31
|
+
const o = (w = C.itemLink) == null ? void 0 : w[$];
|
|
29
32
|
if (o) {
|
|
30
33
|
const E = o.HREF, h = o.DEFAULT_HREF || "#!", l = i.href;
|
|
31
34
|
(l === "#" || l === "" || l.endsWith("#!") || l.endsWith(h) || l === `${window.location.href}${h}` || !l || l === window.location.href) && (i.href = `{{${E}_${u}}}`);
|
|
@@ -35,7 +38,7 @@ function V(L) {
|
|
|
35
38
|
}
|
|
36
39
|
case "name": {
|
|
37
40
|
const e = d, i = e.ATTR, a = e.DEFAULT_HREF || "#!", s = e.HREF;
|
|
38
|
-
t.textContent && (t.innerHTML =
|
|
41
|
+
t.textContent && (t.innerHTML = y(t, `{{${i}_${u}}}`));
|
|
39
42
|
const n = t.closest("a") || (t.tagName === "A" ? t : null);
|
|
40
43
|
if (n && s) {
|
|
41
44
|
const o = n.href, E = `${window.location.href}${a}`;
|
|
@@ -50,14 +53,14 @@ function V(L) {
|
|
|
50
53
|
n ? E = s ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : E = s ? e.PRICE_FORMATTED : e.PRICE;
|
|
51
54
|
const h = e.CURRENCY;
|
|
52
55
|
let l = `{{${E}_${u}}}`;
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
+
const b = (t.getAttribute("data-currency_symbol") || "").trim(), N = b !== "" && b !== O.productPriceCurrencySymbolControlValue;
|
|
57
|
+
let g = "";
|
|
58
|
+
N ? g = b : h && (g = `{{${h}_${u}}}`), g && (l = o === "after" ? `${l} ${g}` : `${g} ${l}`), t.innerHTML = y(t, l);
|
|
56
59
|
break;
|
|
57
60
|
}
|
|
58
61
|
case "quantity": {
|
|
59
62
|
const e = d, i = e.ATTR, a = e.DEFAULT;
|
|
60
|
-
t.textContent && t.textContent.trim() === a && (t.innerHTML =
|
|
63
|
+
t.textContent && t.textContent.trim() === a && (t.innerHTML = y(t, `{{${i}_${u}}}`));
|
|
61
64
|
break;
|
|
62
65
|
}
|
|
63
66
|
case "button": {
|
|
@@ -79,7 +82,7 @@ function V(L) {
|
|
|
79
82
|
default: {
|
|
80
83
|
if ("ATTR" in d) {
|
|
81
84
|
const e = d.ATTR;
|
|
82
|
-
t.textContent && (t.innerHTML =
|
|
85
|
+
t.textContent && (t.innerHTML = y(t, `{{${e}_${u}}}`));
|
|
83
86
|
}
|
|
84
87
|
break;
|
|
85
88
|
}
|
|
@@ -88,7 +91,7 @@ function V(L) {
|
|
|
88
91
|
});
|
|
89
92
|
});
|
|
90
93
|
const k = H.match(/<!DOCTYPE[^>]*>/i), P = k ? `${k[0]}
|
|
91
|
-
` : "", D =
|
|
94
|
+
` : "", D = T.querySelectorAll(".ins-product-td"), M = [];
|
|
92
95
|
D.forEach((r) => {
|
|
93
96
|
const f = r.getAttribute("data-type") || "CART_ITEMS", p = r.getAttribute("data-number") || "1", c = r.getAttribute("data-nodup"), A = r.outerHTML;
|
|
94
97
|
M.push({
|
|
@@ -99,7 +102,7 @@ function V(L) {
|
|
|
99
102
|
nodup: c || void 0
|
|
100
103
|
});
|
|
101
104
|
});
|
|
102
|
-
let _ = P +
|
|
105
|
+
let _ = P + T.documentElement.outerHTML;
|
|
103
106
|
M.reverse().forEach(({ outerHtml: r, type: f, number: p }) => {
|
|
104
107
|
let c = "";
|
|
105
108
|
switch (f) {
|
|
@@ -114,11 +117,11 @@ function V(L) {
|
|
|
114
117
|
break;
|
|
115
118
|
}
|
|
116
119
|
if (c) {
|
|
117
|
-
const
|
|
118
|
-
_ = _.replace(r,
|
|
120
|
+
const m = parseInt(p) - 1, $ = `${`{% if ${c} > ${m} %}`}${r}{% endif %}`;
|
|
121
|
+
_ = _.replace(r, $);
|
|
119
122
|
}
|
|
120
123
|
});
|
|
121
|
-
const x =
|
|
124
|
+
const x = T.querySelectorAll('[product-attr="originalPrice"][data-type="CART_ITEMS"]'), R = [];
|
|
122
125
|
return x.forEach((r) => {
|
|
123
126
|
const f = r.getAttribute("data-number"), p = r.getAttribute("data-type");
|
|
124
127
|
if (!f || p !== "CART_ITEMS")
|
|
@@ -137,5 +140,5 @@ function V(L) {
|
|
|
137
140
|
}), _.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
138
141
|
}
|
|
139
142
|
export {
|
|
140
|
-
|
|
143
|
+
Y as pairProductVariables
|
|
141
144
|
};
|