@useinsider/guido 3.22.0 → 3.23.0-beta.0e4cf11
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 +42 -5
- package/dist/@types/config/schemas.js +11 -10
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +124 -103
- package/dist/components/organisms/AutoSaveController.vue2.js +20 -10
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +58 -73
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +99 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +11 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +60 -35
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +11 -11
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +9 -9
- package/dist/composables/useAccessibilityApi.js +51 -0
- package/dist/composables/useCustomInterfaceAppearance.js +42 -41
- package/dist/composables/useEditorOpenMetrics.js +167 -0
- package/dist/composables/useStripo.js +93 -82
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +22 -22
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/config/migrator/recommendation/compositionMapper.js +56 -49
- package/dist/config/migrator/recommendation/extractors.js +100 -40
- package/dist/config/migrator/recommendation/htmlBuilder.js +285 -207
- package/dist/config/migrator/recommendation/settingsMapper.js +37 -36
- package/dist/config/migrator/recommendation/themeMapper.js +53 -41
- package/dist/config/migrator/recommendationMigrator.js +68 -61
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -17
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +14 -17
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -17
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +9 -10
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -13
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +29 -30
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +15 -16
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +25 -26
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +27 -28
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +75 -80
- package/dist/extensions/Blocks/Recommendation/block.js +33 -24
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +27 -26
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +13 -13
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +165 -175
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +8 -8
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +15 -15
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +12 -12
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +23 -22
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +19 -18
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +82 -91
- package/dist/extensions/Blocks/Recommendation/utils/inlinePriceOrder.js +12 -0
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +3 -2
- package/dist/extensions/Blocks/common-control.js +62 -55
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -10
- package/dist/package.json.js +6 -4
- package/dist/public/prefetchRuntime.js +4 -0
- package/dist/sprite.svg +10 -0
- package/dist/src/@types/config/schemas.d.ts +2 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +19 -1
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -19
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -19
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useEditorOpenMetrics.d.ts +27 -0
- package/dist/src/composables/useStripo.d.ts +3 -2
- package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +3 -1
- package/dist/src/config/migrator/recommendation/extractors.d.ts +35 -6
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +3 -1
- package/dist/src/config/migrator/recommendation/themeMapper.d.ts +3 -1
- package/dist/src/config/migrator/recommendation/types.d.ts +11 -1
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +5 -10
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +1 -13
- package/dist/src/extensions/Blocks/Recommendation/utils/inlinePriceOrder.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +2 -19
- package/dist/src/extensions/Blocks/common-control.d.ts +2 -0
- package/dist/src/library.d.ts +1 -0
- package/dist/src/public/prefetchRuntime.d.ts +1 -0
- package/dist/src/stores/autosave.d.ts +73 -1
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/onboarding.d.ts +966 -35
- package/dist/src/stores/unsubscribe.d.ts +10 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/runtimePrefetch.d.ts +4 -0
- package/dist/src/utils/stripoRuntime.d.ts +3 -0
- package/dist/src/utils/templatePreparation.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +5 -8
- package/dist/static/stripo-runtime-manifest.json.js +9 -0
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/autosave.js +12 -7
- package/dist/stores/editor.js +8 -3
- package/dist/stores/onboarding.js +48 -22
- package/dist/stores/unsubscribe.js +33 -29
- package/dist/utils/runtimePrefetch.js +26 -0
- package/dist/utils/stripoRuntime.js +13 -0
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +8 -3
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LegacyPaddingViewport, LegacyVariable } from './types';
|
|
1
2
|
export declare function extractTitleText(block: Element): string;
|
|
2
3
|
/**
|
|
3
4
|
* Fallback for legacy configs that carry no `p_recommendation_title` variable:
|
|
@@ -7,6 +8,31 @@ export declare function extractTitleText(block: Element): string;
|
|
|
7
8
|
* @returns True when the legacy block renders a visible title
|
|
8
9
|
*/
|
|
9
10
|
export declare function hasVisibleTitle(block: Element): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* A rendered title container with no text showed the user no title, whatever the config's `hidden` flag says.
|
|
13
|
+
* @param block - The legacy recommendation block element
|
|
14
|
+
* @returns True when the legacy block renders an empty title container
|
|
15
|
+
*/
|
|
16
|
+
export declare function hasEmptyTitle(block: Element): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Reads which price the legacy card renders first. Prices sharing a `positionIdx` are ordered by this.
|
|
19
|
+
* @param block - The legacy recommendation block element
|
|
20
|
+
* @returns True only when both prices render and the original price comes first
|
|
21
|
+
*/
|
|
22
|
+
export declare function isOldPriceFirst(block: Element): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Reads the legacy "Move to next line" state from the rendered card, for blocks whose config does not carry it.
|
|
25
|
+
* @param block - The legacy recommendation block element
|
|
26
|
+
* @returns True only when both prices render in separate rows and neither row is laid out inline (`table-cell`)
|
|
27
|
+
*/
|
|
28
|
+
export declare function isPriceOnNextLine(block: Element): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Legacy keeps the text color and the name's trim toggle in the rendered `<p>`, not in the config theme.
|
|
31
|
+
* @param variables - The legacy composition variables
|
|
32
|
+
* @param block - The legacy recommendation block element
|
|
33
|
+
* @returns The variables, with `textColor` / `textTrimming` filled from the rendered HTML where the theme lacks them
|
|
34
|
+
*/
|
|
35
|
+
export declare function withRenderedTextTheme(variables: LegacyVariable[] | undefined, block: Element): LegacyVariable[] | undefined;
|
|
10
36
|
/**
|
|
11
37
|
* Card background lives on either the block (`bgcolor`/`style`) or per-card
|
|
12
38
|
* cells (`.product-card`). Returns empty string when no background is set —
|
|
@@ -14,13 +40,16 @@ export declare function hasVisibleTitle(block: Element): boolean;
|
|
|
14
40
|
*/
|
|
15
41
|
export declare function extractCardBgColor(block: Element): string;
|
|
16
42
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
43
|
+
* `currencySettings` for a block whose legacy config has none: the code and symbol come from the block,
|
|
44
|
+
* the formatting from the legacy editor's defaults, which it rendered without reading the block's attributes.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractCurrencyFromBlock(block: Element): Record<string, string | number>;
|
|
47
|
+
/**
|
|
48
|
+
* Block padding as the legacy product row renders it, for configs whose theme has no `blockPadding`.
|
|
49
|
+
* @param block - The legacy recommendation block element
|
|
50
|
+
* @returns The row's `es-p{n}{side}` padding, or undefined when the block has no product row
|
|
22
51
|
*/
|
|
23
|
-
export declare function
|
|
52
|
+
export declare function extractRenderedBlockPadding(block: Element): LegacyPaddingViewport | undefined;
|
|
24
53
|
/**
|
|
25
54
|
* True when a PM has manually opted the legacy block out of content
|
|
26
55
|
* regeneration by adding the `ins-skip-compile` class. Detected before rebuild
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MappedComposition } from './types';
|
|
1
|
+
import type { MappedBlockPadding, MappedComposition } from './types';
|
|
2
2
|
import type { RecommendationNodeConfig } from '@@/Extensions/Blocks/Recommendation/types/nodeConfig';
|
|
3
3
|
export declare function buildBlockHtml(params: {
|
|
4
4
|
nodeConfig: RecommendationNodeConfig;
|
|
@@ -16,4 +16,6 @@ export declare function buildBlockHtml(params: {
|
|
|
16
16
|
preserveInnerHtml?: string;
|
|
17
17
|
/** Adds the `ins-skip-compile` opt-out class to the migrated block. */
|
|
18
18
|
skipCompile?: boolean;
|
|
19
|
+
/** Legacy desktop block padding; without it the block keeps the default `es-p20`. */
|
|
20
|
+
blockPadding?: MappedBlockPadding;
|
|
19
21
|
}): string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { LegacyButtonTheme, LegacyImageTheme, LegacyTextTheme, MappedButtonStyle, MappedImageStyle, MappedTextStyle } from './types';
|
|
1
|
+
import type { LegacyButtonTheme, LegacyImageTheme, LegacyPaddingViewport, LegacyTextTheme, MappedBlockPadding, MappedButtonStyle, MappedImageStyle, MappedTextStyle } from './types';
|
|
2
2
|
export declare function mapTextTheme(theme: LegacyTextTheme | undefined): MappedTextStyle;
|
|
3
3
|
export declare function mapButtonTheme(theme: LegacyButtonTheme | undefined): MappedButtonStyle;
|
|
4
4
|
export declare function mapImageTheme(theme: LegacyImageTheme | undefined): MappedImageStyle;
|
|
5
|
+
/** Stripo `es-p{n}{side}` classes where a step class exists, inline `padding-{side}` otherwise; 0 needs neither. */
|
|
6
|
+
export declare function mapBlockPadding(padding: LegacyPaddingViewport | undefined): MappedBlockPadding | undefined;
|
|
5
7
|
export declare function appendStyle(existing: string | undefined, addition: string | undefined): string;
|
|
@@ -30,7 +30,9 @@ export interface LegacyPadding {
|
|
|
30
30
|
/** Border-radius shape — observed in two flavours: shorthand or per-corner. */
|
|
31
31
|
export interface LegacyBorderRadius {
|
|
32
32
|
/** Single shorthand value (e.g. `radius: 4`). */
|
|
33
|
-
radius?: number;
|
|
33
|
+
radius?: number | string;
|
|
34
|
+
/** Shorthand the legacy button theme stores under `theme.borderRadius` (e.g. `borderRadius: "4"`). */
|
|
35
|
+
borderRadius?: number | string;
|
|
34
36
|
/** Per-corner: top-left / top-right / bottom-right / bottom-left (in px). */
|
|
35
37
|
lt?: number;
|
|
36
38
|
rt?: number;
|
|
@@ -96,6 +98,7 @@ export interface LegacyButtonTheme {
|
|
|
96
98
|
color?: LegacySides<string>;
|
|
97
99
|
};
|
|
98
100
|
buttonBorderRadius?: LegacyBorderRadius;
|
|
101
|
+
borderRadius?: LegacyBorderRadius;
|
|
99
102
|
buttonAlign?: {
|
|
100
103
|
align?: string;
|
|
101
104
|
};
|
|
@@ -167,6 +170,13 @@ export interface MappedTextStyle {
|
|
|
167
170
|
/** True if `textTrimming: true` in theme. */
|
|
168
171
|
textTrimming: boolean;
|
|
169
172
|
}
|
|
173
|
+
/** Resolved block wrapper padding. */
|
|
174
|
+
export interface MappedBlockPadding {
|
|
175
|
+
/** Space-separated `es-p{n}{side}` classes. */
|
|
176
|
+
classes: string;
|
|
177
|
+
/** Inline `padding-{side}` declarations for values without a step class. */
|
|
178
|
+
style: string;
|
|
179
|
+
}
|
|
170
180
|
/** Resolved button styles. */
|
|
171
181
|
export interface MappedButtonStyle {
|
|
172
182
|
/** Inline CSS for outer `<td>` (external padding). */
|
|
@@ -65,6 +65,7 @@ export declare class RecommendationBlock extends Block {
|
|
|
65
65
|
*/
|
|
66
66
|
onDelete(node: ImmutableHtmlNode): void;
|
|
67
67
|
private _ensureMobileFitRule;
|
|
68
|
+
private _ensureTextTrimCss;
|
|
68
69
|
private _syncHeightBound;
|
|
69
70
|
/**
|
|
70
71
|
* Warns (dark advisory toaster) when the design holds more than one live
|
|
@@ -42,7 +42,7 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
42
42
|
private get _subControls();
|
|
43
43
|
getTemplate(): string;
|
|
44
44
|
private _showControlsForBlock;
|
|
45
|
-
onRender():
|
|
45
|
+
onRender(): void;
|
|
46
46
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
47
47
|
onDestroy(): void;
|
|
48
48
|
/**
|
|
@@ -50,6 +50,7 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
50
50
|
* Each sub-control manages its own form values and event listeners
|
|
51
51
|
*/
|
|
52
52
|
private _initializeSubControls;
|
|
53
|
+
private _renderWithPanelNode;
|
|
53
54
|
/**
|
|
54
55
|
* Syncs persisted node config into the Pinia store's block state.
|
|
55
56
|
*
|
|
@@ -115,20 +116,14 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
115
116
|
* 2. Smart defaults for new blocks (currency, algorithm) — sequential
|
|
116
117
|
* 3. Product data with correct defaults — sequential
|
|
117
118
|
*
|
|
118
|
-
*
|
|
119
|
+
* Called from onTemplateNodeUpdated() once the node config is synced.
|
|
119
120
|
* Marks the block as initialized to prevent redundant fetches on re-selection.
|
|
120
121
|
*/
|
|
121
122
|
private _fetchBlockData;
|
|
122
123
|
private _isPanelOn;
|
|
123
124
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* For new blocks (config still matches hardcoded defaults), validates that
|
|
127
|
-
* the default currency and algorithm are available from the API response.
|
|
128
|
-
* If not, falls back to the first available option.
|
|
129
|
-
*
|
|
130
|
-
* Saved templates with user-customized config are left unchanged because
|
|
131
|
-
* their values won't match the hardcoded defaults.
|
|
125
|
+
* Falls back to the first available option when the block's currency or locale is not offered (a new block on
|
|
126
|
+
* the hard-coded default, or a block copied from another account). Only the default strategy gets an algorithm.
|
|
132
127
|
*/
|
|
133
128
|
private _applySmartDefaults;
|
|
134
129
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CurrencyConfig } from '../types/nodeConfig';
|
|
2
2
|
import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
|
|
3
3
|
import { ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON } from '../constants';
|
|
4
|
+
export { resolveInlinePriceOrder } from '../utils/inlinePriceOrder';
|
|
4
5
|
type PriceKey = 'price' | 'original_price' | 'discount';
|
|
5
6
|
/**
|
|
6
7
|
* Current currency configuration from the store, in CurrencyConfig shape.
|
|
@@ -22,18 +23,6 @@ export declare function isSamePrice(product: RecommendationProduct): boolean;
|
|
|
22
23
|
* e.g., "rating_star" → "Rating Star"
|
|
23
24
|
*/
|
|
24
25
|
export declare function toDisplayName(attrName: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Resolves the inline (side-by-side) price layout from the composition order so
|
|
27
|
-
* it matches the stacked order. `anchor` is whichever of price / original price
|
|
28
|
-
* comes first in the composition (the merged cell renders there); `skip` is the
|
|
29
|
-
* other (dropped, since it's merged in); `originalFirst` puts the original price
|
|
30
|
-
* on the left when it precedes the sale price (the default composition order).
|
|
31
|
-
*/
|
|
32
|
-
export declare function resolveInlinePriceOrder(composition: string[]): {
|
|
33
|
-
originalFirst: boolean;
|
|
34
|
-
anchor: string;
|
|
35
|
-
skip: string;
|
|
36
|
-
};
|
|
37
26
|
/**
|
|
38
27
|
* Reduces a raw product-attribute value to a displayable scalar string.
|
|
39
28
|
* Array-type attributes (filter types `Strings`/`Numbers`) are substituted with
|
|
@@ -328,4 +317,3 @@ export declare function getDefaultProducts(count?: number): RecommendationProduc
|
|
|
328
317
|
* @returns HTML template string with {-{-TITLE-}-}, {-{-PRODUCT_ROWS-}-}, and {-{-MOBILE_PRODUCT_ROWS-}-} (grid only) placeholders
|
|
329
318
|
*/
|
|
330
319
|
export declare function createBlockTemplate(layout?: Orientation, instanceClass?: string): string;
|
|
331
|
-
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the inline price layout from the composition order: `anchor` is whichever price comes first (the merged
|
|
3
|
+
* cell renders there), `skip` is the other; `originalFirst` puts the original price on the left.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveInlinePriceOrder(composition: string[]): {
|
|
6
|
+
originalFirst: boolean;
|
|
7
|
+
anchor: string;
|
|
8
|
+
skip: string;
|
|
9
|
+
};
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Maps legacy
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Renames are matched by feed-source id:
|
|
6
|
-
* - `viewedTogether` → `similarViewed` (id 11, path `viewed-together`)
|
|
7
|
-
* - `purchasedTogether` → `similarBought` (id 12, path `purchased-together`)
|
|
8
|
-
* - `trending` → `trendingProducts` (id 40, path `trending`)
|
|
9
|
-
* - `mostValuable` → `mostValuableOfPartner` (id 46, path `most-valuable`)
|
|
10
|
-
* - `topSellers` → `mostPurchased` (id 62, path `top-sellers`)
|
|
11
|
-
* - `mostViewed` → `mostPopular` (id 61, path `most-popular`)
|
|
12
|
-
*
|
|
13
|
-
* Used at two boundaries:
|
|
14
|
-
* 1. The migrator (`settingsMapper`), so freshly migrated node configs carry
|
|
15
|
-
* the new key.
|
|
16
|
-
* 2. The algorithm dropdown control, so already-saved blocks that still carry
|
|
17
|
-
* a legacy key resolve to a matching dropdown option.
|
|
18
|
-
*
|
|
19
|
-
* Unknown values pass through untouched so a future-added algorithm doesn't
|
|
20
|
-
* silently default.
|
|
2
|
+
* Maps legacy strategy keys to `RecommendationFeedSourceMaps` keys; product-bound ones (ids 11, 12, excluded from the
|
|
3
|
+
* dropdown) become `mostPopular`. Unknown keys pass through so a future algorithm is not silently defaulted.
|
|
21
4
|
*/
|
|
22
5
|
export declare function mapLegacyStrategy(legacy: string | undefined): string | undefined;
|
|
@@ -67,12 +67,14 @@ interface ButtonProps {
|
|
|
67
67
|
export declare abstract class CommonControl extends Control {
|
|
68
68
|
currentNode?: ImmutableHtmlNode;
|
|
69
69
|
protected lastBlockInstanceId: string | null;
|
|
70
|
+
protected isAwaitingPanelNode: boolean;
|
|
70
71
|
abstract getId(): string;
|
|
71
72
|
abstract getTemplate(): string;
|
|
72
73
|
abstract onRender(): Promise<void> | void;
|
|
73
74
|
getContainer(): ShadowRoot;
|
|
74
75
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
75
76
|
onDestroy(): void;
|
|
77
|
+
protected forgetLastPanelNode(): void;
|
|
76
78
|
/**
|
|
77
79
|
* Gets the Items block container element from the current node.
|
|
78
80
|
* @returns The container element or null if not found
|
package/dist/src/library.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidat
|
|
|
4
4
|
export { assignTrackingIds, readTrackFloor, readTrackSeq } from './public/trackingIds';
|
|
5
5
|
export { useGuidoEmailEditorStore } from './public/editorState';
|
|
6
6
|
export type { GuidoEmailEditorState } from './public/editorState';
|
|
7
|
+
export { prefetchGuidoRuntime } from './public/prefetchRuntime';
|
|
7
8
|
export type { StripoEventType } from './@types/events';
|
|
8
9
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { prefetchGuidoRuntime } from '../utils/runtimePrefetch';
|
|
@@ -9,4 +9,76 @@ export declare const useAutosaveStore: import("pinia").StoreDefinition<"guidoAut
|
|
|
9
9
|
isOn: boolean;
|
|
10
10
|
lastSavedAt: Date | null;
|
|
11
11
|
status: AutosaveStatus;
|
|
12
|
-
}, {
|
|
12
|
+
}, {
|
|
13
|
+
hasStatusLabel: (state: {
|
|
14
|
+
isOn: boolean;
|
|
15
|
+
lastSavedAt: {
|
|
16
|
+
toString: () => string;
|
|
17
|
+
toDateString: () => string;
|
|
18
|
+
toTimeString: () => string;
|
|
19
|
+
toLocaleString: {
|
|
20
|
+
(): string;
|
|
21
|
+
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
22
|
+
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
23
|
+
};
|
|
24
|
+
toLocaleDateString: {
|
|
25
|
+
(): string;
|
|
26
|
+
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
27
|
+
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
28
|
+
};
|
|
29
|
+
toLocaleTimeString: {
|
|
30
|
+
(): string;
|
|
31
|
+
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
32
|
+
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
33
|
+
};
|
|
34
|
+
valueOf: () => number;
|
|
35
|
+
getTime: () => number;
|
|
36
|
+
getFullYear: () => number;
|
|
37
|
+
getUTCFullYear: () => number;
|
|
38
|
+
getMonth: () => number;
|
|
39
|
+
getUTCMonth: () => number;
|
|
40
|
+
getDate: () => number;
|
|
41
|
+
getUTCDate: () => number;
|
|
42
|
+
getDay: () => number;
|
|
43
|
+
getUTCDay: () => number;
|
|
44
|
+
getHours: () => number;
|
|
45
|
+
getUTCHours: () => number;
|
|
46
|
+
getMinutes: () => number;
|
|
47
|
+
getUTCMinutes: () => number;
|
|
48
|
+
getSeconds: () => number;
|
|
49
|
+
getUTCSeconds: () => number;
|
|
50
|
+
getMilliseconds: () => number;
|
|
51
|
+
getUTCMilliseconds: () => number;
|
|
52
|
+
getTimezoneOffset: () => number;
|
|
53
|
+
setTime: (time: number) => number;
|
|
54
|
+
setMilliseconds: (ms: number) => number;
|
|
55
|
+
setUTCMilliseconds: (ms: number) => number;
|
|
56
|
+
setSeconds: (sec: number, ms?: number) => number;
|
|
57
|
+
setUTCSeconds: (sec: number, ms?: number) => number;
|
|
58
|
+
setMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
59
|
+
setUTCMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
60
|
+
setHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
61
|
+
setUTCHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
62
|
+
setDate: (date: number) => number;
|
|
63
|
+
setUTCDate: (date: number) => number;
|
|
64
|
+
setMonth: (month: number, date?: number) => number;
|
|
65
|
+
setUTCMonth: (month: number, date?: number) => number;
|
|
66
|
+
setFullYear: (year: number, month?: number, date?: number) => number;
|
|
67
|
+
setUTCFullYear: (year: number, month?: number, date?: number) => number;
|
|
68
|
+
toUTCString: () => string;
|
|
69
|
+
toISOString: () => string;
|
|
70
|
+
toJSON: (key?: any) => string;
|
|
71
|
+
[Symbol.toPrimitive]: {
|
|
72
|
+
(hint: "default"): string;
|
|
73
|
+
(hint: "string"): string;
|
|
74
|
+
(hint: "number"): number;
|
|
75
|
+
(hint: string): string | number;
|
|
76
|
+
};
|
|
77
|
+
} | null;
|
|
78
|
+
status: AutosaveStatus;
|
|
79
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
80
|
+
isOn: boolean;
|
|
81
|
+
lastSavedAt: Date | null;
|
|
82
|
+
status: AutosaveStatus;
|
|
83
|
+
}>) => boolean;
|
|
84
|
+
}, {}>;
|
|
@@ -105,6 +105,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
105
105
|
modulesDisabled: boolean;
|
|
106
106
|
liquidSyntax: boolean;
|
|
107
107
|
autosave: boolean;
|
|
108
|
+
accessibilityTesting: boolean;
|
|
108
109
|
allowlistEnabled: boolean;
|
|
109
110
|
linkTrackingIds: boolean;
|
|
110
111
|
allowSaveWithErrors: boolean;
|
|
@@ -250,6 +251,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
250
251
|
modulesDisabled: boolean;
|
|
251
252
|
liquidSyntax: boolean;
|
|
252
253
|
autosave: boolean;
|
|
254
|
+
accessibilityTesting: boolean;
|
|
253
255
|
allowlistEnabled: boolean;
|
|
254
256
|
linkTrackingIds: boolean;
|
|
255
257
|
allowSaveWithErrors: boolean;
|
|
@@ -395,6 +397,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
395
397
|
modulesDisabled: boolean;
|
|
396
398
|
liquidSyntax: boolean;
|
|
397
399
|
autosave: boolean;
|
|
400
|
+
accessibilityTesting: boolean;
|
|
398
401
|
allowlistEnabled: boolean;
|
|
399
402
|
linkTrackingIds: boolean;
|
|
400
403
|
allowSaveWithErrors: boolean;
|
|
@@ -540,6 +543,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
540
543
|
modulesDisabled: boolean;
|
|
541
544
|
liquidSyntax: boolean;
|
|
542
545
|
autosave: boolean;
|
|
546
|
+
accessibilityTesting: boolean;
|
|
543
547
|
allowlistEnabled: boolean;
|
|
544
548
|
linkTrackingIds: boolean;
|
|
545
549
|
allowSaveWithErrors: boolean;
|
|
@@ -685,6 +689,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
685
689
|
modulesDisabled: boolean;
|
|
686
690
|
liquidSyntax: boolean;
|
|
687
691
|
autosave: boolean;
|
|
692
|
+
accessibilityTesting: boolean;
|
|
688
693
|
allowlistEnabled: boolean;
|
|
689
694
|
linkTrackingIds: boolean;
|
|
690
695
|
allowSaveWithErrors: boolean;
|
|
@@ -830,6 +835,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
830
835
|
modulesDisabled: boolean;
|
|
831
836
|
liquidSyntax: boolean;
|
|
832
837
|
autosave: boolean;
|
|
838
|
+
accessibilityTesting: boolean;
|
|
833
839
|
allowlistEnabled: boolean;
|
|
834
840
|
linkTrackingIds: boolean;
|
|
835
841
|
allowSaveWithErrors: boolean;
|
|
@@ -975,6 +981,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
975
981
|
modulesDisabled: boolean;
|
|
976
982
|
liquidSyntax: boolean;
|
|
977
983
|
autosave: boolean;
|
|
984
|
+
accessibilityTesting: boolean;
|
|
978
985
|
allowlistEnabled: boolean;
|
|
979
986
|
linkTrackingIds: boolean;
|
|
980
987
|
allowSaveWithErrors: boolean;
|
|
@@ -1120,6 +1127,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1120
1127
|
modulesDisabled: boolean;
|
|
1121
1128
|
liquidSyntax: boolean;
|
|
1122
1129
|
autosave: boolean;
|
|
1130
|
+
accessibilityTesting: boolean;
|
|
1123
1131
|
allowlistEnabled: boolean;
|
|
1124
1132
|
linkTrackingIds: boolean;
|
|
1125
1133
|
allowSaveWithErrors: boolean;
|
|
@@ -1265,6 +1273,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1265
1273
|
modulesDisabled: boolean;
|
|
1266
1274
|
liquidSyntax: boolean;
|
|
1267
1275
|
autosave: boolean;
|
|
1276
|
+
accessibilityTesting: boolean;
|
|
1268
1277
|
allowlistEnabled: boolean;
|
|
1269
1278
|
linkTrackingIds: boolean;
|
|
1270
1279
|
allowSaveWithErrors: boolean;
|
|
@@ -1410,6 +1419,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1410
1419
|
modulesDisabled: boolean;
|
|
1411
1420
|
liquidSyntax: boolean;
|
|
1412
1421
|
autosave: boolean;
|
|
1422
|
+
accessibilityTesting: boolean;
|
|
1413
1423
|
allowlistEnabled: boolean;
|
|
1414
1424
|
linkTrackingIds: boolean;
|
|
1415
1425
|
allowSaveWithErrors: boolean;
|
|
@@ -1555,6 +1565,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1555
1565
|
modulesDisabled: boolean;
|
|
1556
1566
|
liquidSyntax: boolean;
|
|
1557
1567
|
autosave: boolean;
|
|
1568
|
+
accessibilityTesting: boolean;
|
|
1558
1569
|
allowlistEnabled: boolean;
|
|
1559
1570
|
linkTrackingIds: boolean;
|
|
1560
1571
|
allowSaveWithErrors: boolean;
|
|
@@ -1700,6 +1711,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1700
1711
|
modulesDisabled: boolean;
|
|
1701
1712
|
liquidSyntax: boolean;
|
|
1702
1713
|
autosave: boolean;
|
|
1714
|
+
accessibilityTesting: boolean;
|
|
1703
1715
|
allowlistEnabled: boolean;
|
|
1704
1716
|
linkTrackingIds: boolean;
|
|
1705
1717
|
allowSaveWithErrors: boolean;
|
|
@@ -1845,6 +1857,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1845
1857
|
modulesDisabled: boolean;
|
|
1846
1858
|
liquidSyntax: boolean;
|
|
1847
1859
|
autosave: boolean;
|
|
1860
|
+
accessibilityTesting: boolean;
|
|
1848
1861
|
allowlistEnabled: boolean;
|
|
1849
1862
|
linkTrackingIds: boolean;
|
|
1850
1863
|
allowSaveWithErrors: boolean;
|
|
@@ -1990,6 +2003,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1990
2003
|
modulesDisabled: boolean;
|
|
1991
2004
|
liquidSyntax: boolean;
|
|
1992
2005
|
autosave: boolean;
|
|
2006
|
+
accessibilityTesting: boolean;
|
|
1993
2007
|
allowlistEnabled: boolean;
|
|
1994
2008
|
linkTrackingIds: boolean;
|
|
1995
2009
|
allowSaveWithErrors: boolean;
|
|
@@ -2135,6 +2149,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2135
2149
|
modulesDisabled: boolean;
|
|
2136
2150
|
liquidSyntax: boolean;
|
|
2137
2151
|
autosave: boolean;
|
|
2152
|
+
accessibilityTesting: boolean;
|
|
2138
2153
|
allowlistEnabled: boolean;
|
|
2139
2154
|
linkTrackingIds: boolean;
|
|
2140
2155
|
allowSaveWithErrors: boolean;
|
|
@@ -2280,6 +2295,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2280
2295
|
modulesDisabled: boolean;
|
|
2281
2296
|
liquidSyntax: boolean;
|
|
2282
2297
|
autosave: boolean;
|
|
2298
|
+
accessibilityTesting: boolean;
|
|
2283
2299
|
allowlistEnabled: boolean;
|
|
2284
2300
|
linkTrackingIds: boolean;
|
|
2285
2301
|
allowSaveWithErrors: boolean;
|
|
@@ -2425,6 +2441,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2425
2441
|
modulesDisabled: boolean;
|
|
2426
2442
|
liquidSyntax: boolean;
|
|
2427
2443
|
autosave: boolean;
|
|
2444
|
+
accessibilityTesting: boolean;
|
|
2428
2445
|
allowlistEnabled: boolean;
|
|
2429
2446
|
linkTrackingIds: boolean;
|
|
2430
2447
|
allowSaveWithErrors: boolean;
|
|
@@ -2582,6 +2599,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2582
2599
|
modulesDisabled: boolean;
|
|
2583
2600
|
liquidSyntax: boolean;
|
|
2584
2601
|
autosave: boolean;
|
|
2602
|
+
accessibilityTesting: boolean;
|
|
2585
2603
|
allowlistEnabled: boolean;
|
|
2586
2604
|
linkTrackingIds: boolean;
|
|
2587
2605
|
allowSaveWithErrors: boolean;
|
|
@@ -2727,6 +2745,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2727
2745
|
modulesDisabled: boolean;
|
|
2728
2746
|
liquidSyntax: boolean;
|
|
2729
2747
|
autosave: boolean;
|
|
2748
|
+
accessibilityTesting: boolean;
|
|
2730
2749
|
allowlistEnabled: boolean;
|
|
2731
2750
|
linkTrackingIds: boolean;
|
|
2732
2751
|
allowSaveWithErrors: boolean;
|
|
@@ -2874,6 +2893,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2874
2893
|
modulesDisabled: boolean;
|
|
2875
2894
|
liquidSyntax: boolean;
|
|
2876
2895
|
autosave: boolean;
|
|
2896
|
+
accessibilityTesting: boolean;
|
|
2877
2897
|
allowlistEnabled: boolean;
|
|
2878
2898
|
linkTrackingIds: boolean;
|
|
2879
2899
|
allowSaveWithErrors: boolean;
|