@useinsider/guido 3.23.0-beta.9f6bfbf → 3.23.0-beta.a35efcf
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 +9 -1
- package/dist/@types/config/schemas.js +26 -26
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +88 -86
- package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
- package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +30 -0
- package/dist/composables/useModuleRepair.js +30 -23
- package/dist/config/migrator/index.js +16 -16
- package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
- package/dist/enums/academy.js +2 -1
- package/dist/extensions/Blocks/Items/block.js +77 -115
- package/dist/extensions/Blocks/Items/constants/currency.js +14 -59
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +22 -33
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +51 -62
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +17 -18
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +31 -42
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +120 -141
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +1 -1
- package/dist/extensions/Blocks/Items/extension.js +8 -9
- package/dist/extensions/Blocks/Items/items.css.js +0 -19
- package/dist/extensions/Blocks/Items/settingsPanel.js +25 -34
- package/dist/extensions/Blocks/Items/template.js +212 -250
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +0 -1
- package/dist/guido.css +1 -1
- package/dist/package.json.js +2 -2
- package/dist/src/@types/config/schemas.d.ts +4 -4
- package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +2 -2
- package/dist/src/composables/useModuleRepair.d.ts +2 -11
- package/dist/src/config/migrator/index.d.ts +1 -4
- package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +9 -6
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -4
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -12
- package/dist/src/stores/config.d.ts +20 -20
- package/dist/src/stores/editor.d.ts +25 -0
- package/dist/src/utils/itemsCurrencyRepair.d.ts +1 -5
- package/dist/src/utils/legacyUnsubscribeConversion.d.ts +10 -0
- package/dist/static/stripo-runtime-manifest.json.js +1 -1
- package/dist/stores/editor.js +15 -14
- package/dist/utils/itemsCurrencyRepair.js +24 -29
- package/dist/utils/legacyUnsubscribeConversion.js +49 -0
- package/dist/utils/pairProductVariables.js +99 -119
- package/package.json +2 -2
- package/dist/config/migrator/itemsPriceFormatMigrator.js +0 -20
- package/dist/extensions/Blocks/Items/controls/priceFormat.js +0 -145
- package/dist/extensions/Blocks/Items/utils/priceFormatOps.js +0 -185
- package/dist/src/config/migrator/itemsPriceFormatMigrator.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/priceFormat.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/priceFormatOps.d.ts +0 -61
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-57fa0ab1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-57fa0ab1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-57fa0ab1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{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}
|
package/dist/package.json.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const o = "3.23.0-beta.
|
|
1
|
+
const o = "3.23.0-beta.a35efcf", s = { stripo: { version: "2.83.1" } }, e = {
|
|
2
2
|
version: o,
|
|
3
3
|
guido: s
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default,
|
|
7
7
|
s as guido,
|
|
8
8
|
o as version
|
|
9
9
|
};
|
|
@@ -414,8 +414,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
414
414
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
415
415
|
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
416
416
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
417
|
-
/**
|
|
418
|
-
readonly
|
|
417
|
+
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
418
|
+
readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
419
419
|
}, undefined>;
|
|
420
420
|
/**
|
|
421
421
|
* Default block types available in Stripo
|
|
@@ -834,8 +834,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
834
834
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
835
835
|
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
836
836
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
837
|
-
/**
|
|
838
|
-
readonly
|
|
837
|
+
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
838
|
+
readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
839
839
|
}, undefined>, {}>;
|
|
840
840
|
/** Block configuration */
|
|
841
841
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -104,7 +104,7 @@ export declare const useConfig: () => {
|
|
|
104
104
|
linkTrackingIds: boolean;
|
|
105
105
|
allowSaveWithErrors: boolean;
|
|
106
106
|
reusableRecommendationStrategy: boolean;
|
|
107
|
-
|
|
107
|
+
legacyUnsubscribeConversion: boolean;
|
|
108
108
|
};
|
|
109
109
|
blocks: {
|
|
110
110
|
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")[];
|
|
@@ -244,7 +244,7 @@ export declare const useConfig: () => {
|
|
|
244
244
|
linkTrackingIds: boolean;
|
|
245
245
|
allowSaveWithErrors: boolean;
|
|
246
246
|
reusableRecommendationStrategy: boolean;
|
|
247
|
-
|
|
247
|
+
legacyUnsubscribeConversion: boolean;
|
|
248
248
|
} | null>;
|
|
249
249
|
blocks: import("vue").ComputedRef<{
|
|
250
250
|
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,17 +1,8 @@
|
|
|
1
1
|
import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
|
|
2
2
|
export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
|
|
3
3
|
/**
|
|
4
|
-
* Repairs saved modules
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - Dynamic content: saved modules serialize merge-tag chips by their display label
|
|
8
|
-
* (`{{ Phone Number }}`); this maps them back to their canonical token
|
|
9
|
-
* (`{{phone_number}}`) using the account's dynamic-content list.
|
|
10
|
-
* - Items currency: v2 Items blocks can carry price `data-curency` /
|
|
11
|
-
* `data-currency_symbol` attrs that drifted from their `esd-ext-config`; these are
|
|
12
|
-
* healed from config (the export contract reads those exact attrs).
|
|
13
|
-
*
|
|
14
|
-
* Wired into Stripo via the `onModuleAdd` init callback (see `useStripo`).
|
|
4
|
+
* Repairs dropped/copied saved modules (items currency, linkless legacy unsubscribe → text block,
|
|
5
|
+
* dynamic-content labels → tokens) in one write-back; wired via Stripo's `onModuleAdd` (see `useStripo`).
|
|
15
6
|
*/
|
|
16
7
|
export declare const useModuleRepair: () => {
|
|
17
8
|
handleModuleAdd: (data: ModuleAddData, modifier: ModuleModifier) => void;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { LegacyRecommendationConfig } from '@@/Types/config';
|
|
2
2
|
import { type PartnerScopeMigrationOptions } from './recommendationPartnerMigrator';
|
|
3
|
-
export
|
|
4
|
-
itemsPriceFormatting?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions, features?: MigrationFeatureFlags) => Promise<string>;
|
|
3
|
+
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions) => Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const migrateLegacyUnsubscribeText: (html: string) => string;
|
|
@@ -9,5 +9,6 @@ export declare const ACADEMY_LINKS: {
|
|
|
9
9
|
readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com/docs/global-unsubscribe-preference-center";
|
|
10
10
|
readonly AMP_FOR_EMAILS: "https://academy.insiderone.com/docs/amp-for-emails";
|
|
11
11
|
readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
|
|
12
|
+
readonly LEGACY_UNSUBSCRIBE_MODULE: "https://academy.insiderone.com/docs/new-editor-add-unsubscribe-pages-into-emails";
|
|
12
13
|
};
|
|
13
14
|
export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
|
|
@@ -71,12 +71,15 @@ export declare class ItemsBlock extends Block {
|
|
|
71
71
|
*/
|
|
72
72
|
private _resolveInstanceId;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
74
|
+
* Stamps the export-read currency attrs onto every price `<p>` from config, so a template whose
|
|
75
|
+
* attrs drifted (e.g. a location toggle before the sync fix) self-heals to match the editor.
|
|
76
|
+
* Config is the source of truth — never derive from visible text.
|
|
77
|
+
*
|
|
78
|
+
* Authority split lives in `currencyAttrTargets` (SD-147588) — position only when a location
|
|
79
|
+
* is recorded, symbol only when customized — so this heal and the module-drop repair can't drift.
|
|
80
|
+
*
|
|
81
|
+
* Returns true only when an attr actually changed, so the caller can skip an empty apply that
|
|
82
|
+
* would otherwise re-trigger onDocumentChanged and loop.
|
|
76
83
|
*/
|
|
77
84
|
private _reconcileCurrencyDomAttributes;
|
|
78
|
-
/** Legacy `<p>` contract via `currencyAttrTargets`: position when recorded, symbol only when custom. */
|
|
79
|
-
private _reconcileLegacyCurrencyAttributes;
|
|
80
|
-
private _priceParagraphs;
|
|
81
|
-
private _isPriceFormattingEnabled;
|
|
82
85
|
}
|
|
@@ -41,35 +41,3 @@ export declare function currencyAttrTargets(config: {
|
|
|
41
41
|
priceCurrencyLocation?: string;
|
|
42
42
|
priceCurrencySymbol?: string;
|
|
43
43
|
}): CurrencyAttrTargets;
|
|
44
|
-
export declare const ITEMS_PRICE_FORMAT_ATTR: {
|
|
45
|
-
readonly SYMBOL: "currency-symbol";
|
|
46
|
-
readonly ALIGNMENT: "currency-alignment";
|
|
47
|
-
readonly THOUSAND_SEPARATOR: "currency-thousand-separator";
|
|
48
|
-
readonly DECIMAL_SEPARATOR: "currency-decimal-separator";
|
|
49
|
-
readonly DECIMAL_COUNT: "currency-decimal-count";
|
|
50
|
-
readonly SINGLE_PRICE: "data-single_price";
|
|
51
|
-
};
|
|
52
|
-
/** Price `<p>` attrs of the legacy model; a new-format block carries none of them. */
|
|
53
|
-
export declare const LEGACY_PRICE_PARAGRAPH_ATTRS: readonly ["data-formated", "data-single_price", "data-curency", "data-currency_symbol"];
|
|
54
|
-
export declare const PRICE_FORMAT_CONFIG_KEYS: readonly ["priceThousandSeparator", "priceDecimalSeparator", "priceDecimalCount"];
|
|
55
|
-
export interface ItemsPriceFormat {
|
|
56
|
-
thousandSeparator: string;
|
|
57
|
-
decimalSeparator: string;
|
|
58
|
-
decimalCount: number;
|
|
59
|
-
}
|
|
60
|
-
/** en-US, the shape the legacy pre-formatted price tags produced. */
|
|
61
|
-
export declare const DEFAULT_ITEMS_PRICE_FORMAT: ItemsPriceFormat;
|
|
62
|
-
export interface PriceFormatConfigSlice {
|
|
63
|
-
priceThousandSeparator?: string;
|
|
64
|
-
priceDecimalSeparator?: string;
|
|
65
|
-
priceDecimalCount?: number;
|
|
66
|
-
}
|
|
67
|
-
export declare function normalizeDecimalCount(value: unknown): number;
|
|
68
|
-
/** Config → format, defaulting each missing key independently. */
|
|
69
|
-
export declare function priceFormatFromConfig(config: PriceFormatConfigSlice | null | undefined): ItemsPriceFormat;
|
|
70
|
-
export declare function isNewPriceFormatConfig(config: PriceFormatConfigSlice | null | undefined): boolean;
|
|
71
|
-
export interface AttributeReader {
|
|
72
|
-
getAttribute(name: string): string | null | undefined;
|
|
73
|
-
}
|
|
74
|
-
/** The export/control switch: a root carrying `currency-decimal-count` is in the new format. */
|
|
75
|
-
export declare function isNewPriceFormatRoot(root: AttributeReader | null | undefined): boolean;
|
|
@@ -35,7 +35,6 @@ export declare class ItemsBlockControl extends CommonControl {
|
|
|
35
35
|
_reFillTemplate(itemsType?: ProductType): void;
|
|
36
36
|
_recalculateTrimming(): void;
|
|
37
37
|
private _getParagraphFromBlock;
|
|
38
|
-
private _replacePriceText;
|
|
39
38
|
private _escapeRegex;
|
|
40
39
|
private _removeCurrencySymbol;
|
|
41
40
|
private _replacePriceNumber;
|
|
@@ -46,7 +46,6 @@ export declare enum ItemsBlockControlId {
|
|
|
46
46
|
PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control",
|
|
47
47
|
PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control",
|
|
48
48
|
PRICE_ORIENTATION = "items-block-price-orientation-control",
|
|
49
|
-
PRICE_FORMAT = "items-block-price-format-control",
|
|
50
49
|
NAME_ALIGN = "items-block-name-align-control",
|
|
51
50
|
NAME_COLOR = "items-block-name-color-control",
|
|
52
51
|
NAME_SIZE = "items-block-name-size-control",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type ItemsPriceFormat } from './constants/currency';
|
|
2
1
|
import { type ItemsBlockConfig } from './utils/nodeConfigUtils';
|
|
3
2
|
declare const migrationTemplate = "ADD YOUR MIGRATION HERE";
|
|
4
3
|
type ProductType = 'CART_ITEMS' | 'BROWSED_ITEMS' | 'PURCHASED_ITEMS';
|
|
@@ -37,8 +36,6 @@ type TemplateParameters = {
|
|
|
37
36
|
quantityStyles?: string;
|
|
38
37
|
/** Price orientation within the card ('vertical' = stacked, 'horizontal' = side-by-side) */
|
|
39
38
|
priceOrientation?: PriceOrientationType;
|
|
40
|
-
/** New price model (itemsPriceFormatting): root attrs + raw dummy amounts; absent = legacy output. */
|
|
41
|
-
priceFormat?: ItemsPriceFormat;
|
|
42
39
|
};
|
|
43
40
|
/**
|
|
44
41
|
* Applies price orientation styles to the generated HTML template.
|
|
@@ -70,5 +67,5 @@ export declare const applyPriceOrientationStyles: (html: string, layoutOrientati
|
|
|
70
67
|
* @param params.formattedPrice - Whether to use formatted price display
|
|
71
68
|
* @returns HTML template string for the Items Block
|
|
72
69
|
*/
|
|
73
|
-
export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, migrate, formattedPrice, configBlockAttributes, nodeConfig, nameStyles, buttonStyles, priceStyles, originalPriceStyles, quantityStyles, priceOrientation,
|
|
70
|
+
export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, migrate, formattedPrice, configBlockAttributes, nodeConfig, nameStyles, buttonStyles, priceStyles, originalPriceStyles, quantityStyles, priceOrientation, }: TemplateParameters): string;
|
|
74
71
|
export default migrationTemplate;
|
|
@@ -18,9 +18,6 @@ export interface ItemsBlockConfig {
|
|
|
18
18
|
priceCurrencySymbol: string;
|
|
19
19
|
priceCurrencyLocation: string;
|
|
20
20
|
priceOrientation: 'vertical' | 'horizontal';
|
|
21
|
-
priceThousandSeparator?: string;
|
|
22
|
-
priceDecimalSeparator?: string;
|
|
23
|
-
priceDecimalCount?: number;
|
|
24
21
|
quantityControlEnabled: boolean;
|
|
25
22
|
buttonLink: string;
|
|
26
23
|
imageLink: string;
|
|
@@ -14,18 +14,6 @@ export interface FormatPriceOptions {
|
|
|
14
14
|
/** Currency configuration */
|
|
15
15
|
currency: CurrencyConfig;
|
|
16
16
|
}
|
|
17
|
-
export interface FormatNumberOptions {
|
|
18
|
-
thousandSeparator: string;
|
|
19
|
-
decimalSeparator: string;
|
|
20
|
-
decimalCount: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Formats a number with custom thousand and decimal separators
|
|
24
|
-
* @param value - The numeric value to format
|
|
25
|
-
* @param options - Formatting options
|
|
26
|
-
* @returns Formatted number string
|
|
27
|
-
*/
|
|
28
|
-
export declare function formatNumber(value: number, options: FormatNumberOptions): string;
|
|
29
17
|
/**
|
|
30
18
|
* Formats a numeric price according to currency settings
|
|
31
19
|
* @example
|
|
@@ -109,7 +109,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
109
109
|
linkTrackingIds: boolean;
|
|
110
110
|
allowSaveWithErrors: boolean;
|
|
111
111
|
reusableRecommendationStrategy: boolean;
|
|
112
|
-
|
|
112
|
+
legacyUnsubscribeConversion: boolean;
|
|
113
113
|
};
|
|
114
114
|
blocks: {
|
|
115
115
|
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")[];
|
|
@@ -255,7 +255,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
255
255
|
linkTrackingIds: boolean;
|
|
256
256
|
allowSaveWithErrors: boolean;
|
|
257
257
|
reusableRecommendationStrategy: boolean;
|
|
258
|
-
|
|
258
|
+
legacyUnsubscribeConversion: boolean;
|
|
259
259
|
};
|
|
260
260
|
blocks: {
|
|
261
261
|
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")[];
|
|
@@ -401,7 +401,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
401
401
|
linkTrackingIds: boolean;
|
|
402
402
|
allowSaveWithErrors: boolean;
|
|
403
403
|
reusableRecommendationStrategy: boolean;
|
|
404
|
-
|
|
404
|
+
legacyUnsubscribeConversion: boolean;
|
|
405
405
|
};
|
|
406
406
|
blocks: {
|
|
407
407
|
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")[];
|
|
@@ -547,7 +547,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
547
547
|
linkTrackingIds: boolean;
|
|
548
548
|
allowSaveWithErrors: boolean;
|
|
549
549
|
reusableRecommendationStrategy: boolean;
|
|
550
|
-
|
|
550
|
+
legacyUnsubscribeConversion: boolean;
|
|
551
551
|
};
|
|
552
552
|
blocks: {
|
|
553
553
|
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")[];
|
|
@@ -693,7 +693,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
693
693
|
linkTrackingIds: boolean;
|
|
694
694
|
allowSaveWithErrors: boolean;
|
|
695
695
|
reusableRecommendationStrategy: boolean;
|
|
696
|
-
|
|
696
|
+
legacyUnsubscribeConversion: boolean;
|
|
697
697
|
};
|
|
698
698
|
blocks: {
|
|
699
699
|
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")[];
|
|
@@ -839,7 +839,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
839
839
|
linkTrackingIds: boolean;
|
|
840
840
|
allowSaveWithErrors: boolean;
|
|
841
841
|
reusableRecommendationStrategy: boolean;
|
|
842
|
-
|
|
842
|
+
legacyUnsubscribeConversion: boolean;
|
|
843
843
|
};
|
|
844
844
|
blocks: {
|
|
845
845
|
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")[];
|
|
@@ -985,7 +985,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
985
985
|
linkTrackingIds: boolean;
|
|
986
986
|
allowSaveWithErrors: boolean;
|
|
987
987
|
reusableRecommendationStrategy: boolean;
|
|
988
|
-
|
|
988
|
+
legacyUnsubscribeConversion: boolean;
|
|
989
989
|
};
|
|
990
990
|
blocks: {
|
|
991
991
|
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")[];
|
|
@@ -1131,7 +1131,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1131
1131
|
linkTrackingIds: boolean;
|
|
1132
1132
|
allowSaveWithErrors: boolean;
|
|
1133
1133
|
reusableRecommendationStrategy: boolean;
|
|
1134
|
-
|
|
1134
|
+
legacyUnsubscribeConversion: boolean;
|
|
1135
1135
|
};
|
|
1136
1136
|
blocks: {
|
|
1137
1137
|
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")[];
|
|
@@ -1277,7 +1277,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1277
1277
|
linkTrackingIds: boolean;
|
|
1278
1278
|
allowSaveWithErrors: boolean;
|
|
1279
1279
|
reusableRecommendationStrategy: boolean;
|
|
1280
|
-
|
|
1280
|
+
legacyUnsubscribeConversion: boolean;
|
|
1281
1281
|
};
|
|
1282
1282
|
blocks: {
|
|
1283
1283
|
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")[];
|
|
@@ -1423,7 +1423,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1423
1423
|
linkTrackingIds: boolean;
|
|
1424
1424
|
allowSaveWithErrors: boolean;
|
|
1425
1425
|
reusableRecommendationStrategy: boolean;
|
|
1426
|
-
|
|
1426
|
+
legacyUnsubscribeConversion: boolean;
|
|
1427
1427
|
};
|
|
1428
1428
|
blocks: {
|
|
1429
1429
|
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")[];
|
|
@@ -1569,7 +1569,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1569
1569
|
linkTrackingIds: boolean;
|
|
1570
1570
|
allowSaveWithErrors: boolean;
|
|
1571
1571
|
reusableRecommendationStrategy: boolean;
|
|
1572
|
-
|
|
1572
|
+
legacyUnsubscribeConversion: boolean;
|
|
1573
1573
|
};
|
|
1574
1574
|
blocks: {
|
|
1575
1575
|
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")[];
|
|
@@ -1715,7 +1715,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1715
1715
|
linkTrackingIds: boolean;
|
|
1716
1716
|
allowSaveWithErrors: boolean;
|
|
1717
1717
|
reusableRecommendationStrategy: boolean;
|
|
1718
|
-
|
|
1718
|
+
legacyUnsubscribeConversion: boolean;
|
|
1719
1719
|
};
|
|
1720
1720
|
blocks: {
|
|
1721
1721
|
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")[];
|
|
@@ -1861,7 +1861,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1861
1861
|
linkTrackingIds: boolean;
|
|
1862
1862
|
allowSaveWithErrors: boolean;
|
|
1863
1863
|
reusableRecommendationStrategy: boolean;
|
|
1864
|
-
|
|
1864
|
+
legacyUnsubscribeConversion: boolean;
|
|
1865
1865
|
};
|
|
1866
1866
|
blocks: {
|
|
1867
1867
|
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")[];
|
|
@@ -2007,7 +2007,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2007
2007
|
linkTrackingIds: boolean;
|
|
2008
2008
|
allowSaveWithErrors: boolean;
|
|
2009
2009
|
reusableRecommendationStrategy: boolean;
|
|
2010
|
-
|
|
2010
|
+
legacyUnsubscribeConversion: boolean;
|
|
2011
2011
|
};
|
|
2012
2012
|
blocks: {
|
|
2013
2013
|
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")[];
|
|
@@ -2153,7 +2153,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2153
2153
|
linkTrackingIds: boolean;
|
|
2154
2154
|
allowSaveWithErrors: boolean;
|
|
2155
2155
|
reusableRecommendationStrategy: boolean;
|
|
2156
|
-
|
|
2156
|
+
legacyUnsubscribeConversion: boolean;
|
|
2157
2157
|
};
|
|
2158
2158
|
blocks: {
|
|
2159
2159
|
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")[];
|
|
@@ -2299,7 +2299,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2299
2299
|
linkTrackingIds: boolean;
|
|
2300
2300
|
allowSaveWithErrors: boolean;
|
|
2301
2301
|
reusableRecommendationStrategy: boolean;
|
|
2302
|
-
|
|
2302
|
+
legacyUnsubscribeConversion: boolean;
|
|
2303
2303
|
};
|
|
2304
2304
|
blocks: {
|
|
2305
2305
|
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")[];
|
|
@@ -2445,7 +2445,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2445
2445
|
linkTrackingIds: boolean;
|
|
2446
2446
|
allowSaveWithErrors: boolean;
|
|
2447
2447
|
reusableRecommendationStrategy: boolean;
|
|
2448
|
-
|
|
2448
|
+
legacyUnsubscribeConversion: boolean;
|
|
2449
2449
|
};
|
|
2450
2450
|
blocks: {
|
|
2451
2451
|
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")[];
|
|
@@ -2603,7 +2603,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2603
2603
|
linkTrackingIds: boolean;
|
|
2604
2604
|
allowSaveWithErrors: boolean;
|
|
2605
2605
|
reusableRecommendationStrategy: boolean;
|
|
2606
|
-
|
|
2606
|
+
legacyUnsubscribeConversion: boolean;
|
|
2607
2607
|
};
|
|
2608
2608
|
blocks: {
|
|
2609
2609
|
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")[];
|
|
@@ -2749,7 +2749,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2749
2749
|
linkTrackingIds: boolean;
|
|
2750
2750
|
allowSaveWithErrors: boolean;
|
|
2751
2751
|
reusableRecommendationStrategy: boolean;
|
|
2752
|
-
|
|
2752
|
+
legacyUnsubscribeConversion: boolean;
|
|
2753
2753
|
};
|
|
2754
2754
|
blocks: {
|
|
2755
2755
|
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")[];
|
|
@@ -2897,7 +2897,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2897
2897
|
linkTrackingIds: boolean;
|
|
2898
2898
|
allowSaveWithErrors: boolean;
|
|
2899
2899
|
reusableRecommendationStrategy: boolean;
|
|
2900
|
-
|
|
2900
|
+
legacyUnsubscribeConversion: boolean;
|
|
2901
2901
|
};
|
|
2902
2902
|
blocks: {
|
|
2903
2903
|
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")[];
|