@useinsider/guido 2.1.0-beta.42f5dfa → 2.1.0-beta.486ee9c
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 +36 -0
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/base/Toaster.vue.js +4 -4
- package/dist/components/organisms/base/Toaster.vue2.js +12 -9
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +11 -13
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +54 -23
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +7 -5
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +34 -21
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +11 -11
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +48 -36
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +11 -9
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +107 -119
- package/dist/composables/useRecommendation.js +9 -9
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +28 -23
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +127 -122
- package/dist/config/migrator/recommendationMigrator.js +1 -1
- package/dist/enums/defaults.js +8 -4
- package/dist/extensions/Blocks/Recommendation/block.js +26 -23
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +37 -33
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +16 -12
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +15 -11
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +41 -29
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +16 -16
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +30 -32
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +217 -94
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +97 -39
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +16 -16
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +304 -209
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +14 -14
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +13 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +3 -3
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +223 -99
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +237 -140
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +27 -32
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +27 -30
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +22 -27
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +50 -38
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +8 -8
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +29 -0
- package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
- package/dist/extensions/ModulesTabIcons/extension.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +257 -187
- package/dist/services/recommendationApi.js +11 -9
- package/dist/services/stripoApi.js +20 -17
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +1 -0
- package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +17 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +12 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +12 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +50 -11
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +22 -4
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +36 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +50 -17
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +26 -2
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/migration.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +12 -3
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/filterSchema.d.ts +15 -0
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/static/styles/components/notification.css.js +19 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/components/version-history.css.js +10 -2
- package/dist/static/styles/components/wide-panel.css.js +18 -2
- package/dist/static/styles/customEditorStyle.css.js +59 -31
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/dist/stores/unsubscribe.js +37 -34
- package/package.json +2 -2
|
@@ -5,16 +5,20 @@
|
|
|
5
5
|
* - Column spacing: horizontal gap between cards in the same row
|
|
6
6
|
* - Row spacing: vertical gap between different rows
|
|
7
7
|
*
|
|
8
|
+
* Desktop and mobile have independent spacing controls that toggle
|
|
9
|
+
* visibility based on Stripo's editor preview mode (desktop/mobile).
|
|
10
|
+
*
|
|
8
11
|
* Configuration is stored via node config (persists with template).
|
|
9
12
|
* Actual spacing is applied to DOM elements via inline styles.
|
|
10
13
|
*/
|
|
11
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
14
|
+
import { type ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
12
15
|
import { CommonControl } from '../../../common-control';
|
|
13
16
|
export declare const SPACING_CONTROL_ID = "recommendation-spacing-control";
|
|
14
17
|
/**
|
|
15
18
|
* Control for managing spacing between product cards
|
|
16
19
|
* - Column spacing: horizontal gap between cards in the same row
|
|
17
20
|
* - Row spacing: vertical gap between different rows
|
|
21
|
+
* - Separate controls for desktop and mobile with device-mode toggling
|
|
18
22
|
*/
|
|
19
23
|
export declare class SpacingControl extends CommonControl {
|
|
20
24
|
private store;
|
|
@@ -25,17 +29,28 @@ export declare class SpacingControl extends CommonControl {
|
|
|
25
29
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
26
30
|
onDestroy(): void;
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
32
|
+
* Checks if the editor is currently in mobile preview mode
|
|
33
|
+
* using Stripo's EditorStatePropertyType API.
|
|
34
|
+
*/
|
|
35
|
+
_isMobileMode(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Updates spacing control visibility based on layout orientation, editor mode,
|
|
38
|
+
* and products-per-row count.
|
|
39
|
+
* - List layout: hide column spacing (products are full-width), hide ALL mobile
|
|
40
|
+
* spacing controls (list is responsive — single row spacing applies to both views)
|
|
41
|
+
* - Desktop mode: show desktop spacing, hide mobile spacing
|
|
42
|
+
* - Mobile mode: show mobile spacing, hide desktop spacing
|
|
43
|
+
* - 1 product per row: hide column spacing (no gap between single column)
|
|
31
44
|
*/
|
|
32
|
-
|
|
45
|
+
_updateSpacingVisibility(): void;
|
|
33
46
|
/**
|
|
34
|
-
* Reads spacing values from node config first, falls back to DOM styles
|
|
47
|
+
* Reads spacing values from node config first, falls back to DOM styles.
|
|
48
|
+
* DOM fallback is only used for legacy templates that lack node config.
|
|
35
49
|
*/
|
|
36
50
|
_setFormValues(): void;
|
|
37
51
|
/**
|
|
38
52
|
* Gets stored column spacing from the first attribute row cell's padding.
|
|
53
|
+
* Scoped to the desktop container for accurate readings.
|
|
39
54
|
* For grid layout: cells inside .recommendation-attribute-row have padding applied.
|
|
40
55
|
* For list layout: the parent of .product-card-wrapper has the padding.
|
|
41
56
|
* The padding is applied as "0 {halfSpacing}px", so we extract and multiply by 2.
|
|
@@ -43,27 +58,33 @@ export declare class SpacingControl extends CommonControl {
|
|
|
43
58
|
_getStoredColumnSpacing(): number;
|
|
44
59
|
/**
|
|
45
60
|
* Gets stored row spacing from the first spacer element's height style
|
|
61
|
+
* Scoped to the desktop container for accurate readings.
|
|
46
62
|
*/
|
|
47
63
|
_getStoredRowSpacing(): number;
|
|
48
64
|
/**
|
|
49
|
-
* Handles column spacing changes.
|
|
50
|
-
*
|
|
51
|
-
* For list layout: applies padding to parent of product card wrappers.
|
|
65
|
+
* Handles column spacing changes for desktop.
|
|
66
|
+
* Applies horizontal padding only to the desktop container elements.
|
|
52
67
|
*/
|
|
53
68
|
_onColumnSpacingChange(spacing: number): void;
|
|
54
69
|
/**
|
|
55
|
-
* Handles row spacing changes
|
|
56
|
-
* Applies height to
|
|
70
|
+
* Handles row spacing changes for desktop.
|
|
71
|
+
* Applies height only to spacer elements in the desktop container.
|
|
57
72
|
*/
|
|
58
73
|
_onRowSpacingChange(spacing: number): void;
|
|
59
74
|
/**
|
|
60
|
-
*
|
|
75
|
+
* Handles column spacing changes for mobile.
|
|
76
|
+
* Applies horizontal padding only to the mobile container elements.
|
|
61
77
|
*/
|
|
62
|
-
|
|
78
|
+
_onMobileColumnSpacingChange(spacing: number): void;
|
|
63
79
|
/**
|
|
64
|
-
*
|
|
80
|
+
* Handles row spacing changes for mobile.
|
|
81
|
+
* Applies height only to spacer elements in the mobile container.
|
|
65
82
|
*/
|
|
66
|
-
|
|
83
|
+
_onMobileRowSpacingChange(spacing: number): void;
|
|
84
|
+
/**
|
|
85
|
+
* Stores a spacing value as a data attribute on the block root element
|
|
86
|
+
*/
|
|
87
|
+
_storeDataAttribute(attr: string, spacing: number): void;
|
|
67
88
|
_listenToFormUpdates(): void;
|
|
68
89
|
/**
|
|
69
90
|
* Debounced version of _onColumnSpacingChange
|
|
@@ -72,12 +93,24 @@ export declare class SpacingControl extends CommonControl {
|
|
|
72
93
|
_debouncedOnColumnSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
|
|
73
94
|
/**
|
|
74
95
|
* Debounced version of _onRowSpacingChange
|
|
75
|
-
* Prevents excessive DOM updates when user rapidly adjusts the counter
|
|
76
96
|
*/
|
|
77
97
|
_debouncedOnRowSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
|
|
98
|
+
/**
|
|
99
|
+
* Debounced version of _onMobileColumnSpacingChange
|
|
100
|
+
*/
|
|
101
|
+
_debouncedOnMobileColumnSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
|
|
102
|
+
/**
|
|
103
|
+
* Debounced version of _onMobileRowSpacingChange
|
|
104
|
+
*/
|
|
105
|
+
_debouncedOnMobileRowSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
|
|
78
106
|
/**
|
|
79
107
|
* Subscribe to store orientation changes
|
|
80
|
-
* Updates
|
|
108
|
+
* Updates spacing visibility when layout changes via the layout control
|
|
81
109
|
*/
|
|
82
110
|
_subscribeToOrientationChanges(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Subscribes to editor preview mode changes via Stripo API.
|
|
113
|
+
* Toggles which spacing controls (desktop/mobile) are visible.
|
|
114
|
+
*/
|
|
115
|
+
_subscribeToEditorModeChanges(): void;
|
|
83
116
|
}
|
|
@@ -29,6 +29,10 @@ interface PerBlockState {
|
|
|
29
29
|
filterStatus: boolean;
|
|
30
30
|
filterSelectionDrawerStatus: boolean;
|
|
31
31
|
filterGroup: number;
|
|
32
|
+
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
33
|
+
isInitialized: boolean;
|
|
34
|
+
/** Snapshot of filters taken when the drawer opens, used to revert on cancel */
|
|
35
|
+
filterSnapshot: Filter[] | null;
|
|
32
36
|
}
|
|
33
37
|
interface StoreState {
|
|
34
38
|
recommendationCampaignUrls: Record<string, string>;
|
|
@@ -123,7 +127,9 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
123
127
|
configVersion: number;
|
|
124
128
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): number;
|
|
125
129
|
hasFilters(): boolean;
|
|
130
|
+
hasValidFilters(): boolean;
|
|
126
131
|
getFilterGroupCount(): number;
|
|
132
|
+
getUniqueFilterGroups(): number[];
|
|
127
133
|
getActivePredictiveAlgorithms: (state: {
|
|
128
134
|
recommendationCampaignUrls: Record<string, string>;
|
|
129
135
|
activePredictiveAlgorithms: number[];
|
|
@@ -189,6 +195,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
189
195
|
* Resets currentRecommendationId if it was the deleted block.
|
|
190
196
|
*/
|
|
191
197
|
removeBlockState(id: number): void;
|
|
198
|
+
/**
|
|
199
|
+
* Marks a block as initialized (initial API data has been fetched).
|
|
200
|
+
* Automatically cleaned up when removeBlockState deletes the block entry.
|
|
201
|
+
*/
|
|
202
|
+
markBlockInitialized(id: number): void;
|
|
192
203
|
/**
|
|
193
204
|
* Patches the current block's recommendationConfigs.
|
|
194
205
|
* Replaces `store.$patch({ recommendationConfigs: { ... } })` pattern.
|
|
@@ -196,23 +207,36 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
196
207
|
patchCurrentBlockConfig(updates: Partial<PerBlockConfigs>, options?: {
|
|
197
208
|
triggerRefetch?: boolean;
|
|
198
209
|
}): void;
|
|
210
|
+
/**
|
|
211
|
+
* Creates a filter with the first available attribute and operator pre-selected.
|
|
212
|
+
*/
|
|
213
|
+
createDefaultFilter(filterGroup: number, filterNumber: number): Filter;
|
|
199
214
|
/**
|
|
200
215
|
* Opens the filter selection drawer for the current block.
|
|
201
|
-
*
|
|
216
|
+
* Saves a snapshot of current filters for cancel/revert.
|
|
217
|
+
* If no filters exist, initializes with a default filter
|
|
202
218
|
* so the user has a starting point for input.
|
|
203
219
|
*/
|
|
204
220
|
openFilterDrawer(): void;
|
|
205
221
|
/**
|
|
206
|
-
* Closes the filter selection drawer for the current block
|
|
222
|
+
* Closes the filter selection drawer for the current block.
|
|
223
|
+
* Called after successful apply — discards the snapshot.
|
|
207
224
|
*/
|
|
208
225
|
closeFilterDrawer(): void;
|
|
226
|
+
/**
|
|
227
|
+
* Cancels the filter selection drawer and reverts filters
|
|
228
|
+
* to the snapshot taken when the drawer was opened.
|
|
229
|
+
*/
|
|
230
|
+
cancelFilterDrawer(): void;
|
|
209
231
|
fetchRecommendationCreateData(): Promise<void>;
|
|
210
232
|
fetchRecommendationFilters(): Promise<void>;
|
|
211
233
|
addFilterGroup(filterGroup: number): void;
|
|
234
|
+
deleteFilterGroup(groupId: number): void;
|
|
212
235
|
updateFilter(updatedFilter: Filter): void;
|
|
213
236
|
deleteFilter(filter: Filter): void;
|
|
214
237
|
addFilter(filter: Filter): void;
|
|
215
238
|
generateFilterQuery(): string;
|
|
216
239
|
fetchRecommendationProducts(): Promise<void>;
|
|
240
|
+
_doFetchProducts(): Promise<void>;
|
|
217
241
|
}>;
|
|
218
242
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
2
|
import { DEFAULTS, getDefaultProducts, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY } from '../utils';
|
|
3
|
-
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"
|
|
3
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"recommendation-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
4
4
|
/**
|
|
5
5
|
* Prepares migration product rows with attribute-aligned structure.
|
|
6
6
|
* @param products - Array of products to display
|
|
@@ -30,4 +30,4 @@ export declare function prepareGridProductRows(products: RecommendationProduct[]
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
32
32
|
export declare function getDefaultTemplate(recommendationId?: number): string;
|
|
33
|
-
export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
33
|
+
export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[], mobileProductsPerRow?: number): string;
|
|
@@ -24,12 +24,16 @@ export { DEFAULTS, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY, getDefault
|
|
|
24
24
|
export declare function prepareProductRows(products: RecommendationProduct[], layout: Orientation, options?: PrepareProductRowsOptions): string;
|
|
25
25
|
/**
|
|
26
26
|
* Generates the default template for a given layout.
|
|
27
|
+
* Grid layout includes both desktop and mobile product containers.
|
|
28
|
+
* List layout only populates the desktop container (list rows are responsive).
|
|
27
29
|
* @param layout - The layout orientation ('list' or 'grid')
|
|
28
30
|
* @returns Complete HTML template with default products
|
|
29
31
|
*/
|
|
30
32
|
export declare function getDefaultTemplate(layout?: Orientation): string;
|
|
31
33
|
/**
|
|
32
34
|
* Generates a complete block template with custom products.
|
|
35
|
+
* Grid layout includes both desktop and mobile product containers.
|
|
36
|
+
* List layout only populates the desktop container (list rows are responsive).
|
|
33
37
|
* @param products - Array of products to display
|
|
34
38
|
* @param layout - The layout orientation ('list' or 'grid')
|
|
35
39
|
* @param title - Title for the block
|
|
@@ -4,7 +4,7 @@ import { DEFAULTS, getDefaultProducts } from '../utils';
|
|
|
4
4
|
* Migration template for list layout
|
|
5
5
|
* Used when migrating old recommendation blocks to list format
|
|
6
6
|
*/
|
|
7
|
-
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"
|
|
7
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"recommendation-block-v2 esd-block-recommendation-v3-block\n esd-extension-block es-p20 es-m-p0 ins-recommendation-list-layout\"\n data-layout=\"list\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
8
8
|
export declare function getMigrationTemplate(): string;
|
|
9
9
|
/**
|
|
10
10
|
* Generates a custom list migration template with specified products
|
|
@@ -7,6 +7,8 @@ export type Orientation = 'list' | 'grid';
|
|
|
7
7
|
export interface PrepareProductRowsOptions {
|
|
8
8
|
/** Number of products per row (only for grid layout, defaults to 3) */
|
|
9
9
|
productsPerRow?: number;
|
|
10
|
+
/** Number of products per row on mobile (only for grid layout, defaults to 1) */
|
|
11
|
+
mobileProductsPerRow?: number;
|
|
10
12
|
/** Array defining order of card elements */
|
|
11
13
|
composition?: string[];
|
|
12
14
|
}
|
|
@@ -44,14 +46,21 @@ export declare const PLACEHOLDER_IMAGE = "https://email-static.useinsider.com/st
|
|
|
44
46
|
* @returns Sanitized HTTPS URL or placeholder
|
|
45
47
|
*/
|
|
46
48
|
export declare function sanitizeImageUrl(url: string | undefined | null): string;
|
|
47
|
-
export declare function getDefaultProducts(): RecommendationProduct[];
|
|
49
|
+
export declare function getDefaultProducts(count?: number): RecommendationProduct[];
|
|
48
50
|
/**
|
|
49
51
|
* Creates the block template wrapper HTML for recommendation blocks.
|
|
50
|
-
* The template includes title placeholder and product
|
|
52
|
+
* The template includes title placeholder and both desktop/mobile product containers.
|
|
53
|
+
*
|
|
54
|
+
* The dual-container approach generates two `ins-recommendation-product-container` tables:
|
|
55
|
+
* - Desktop container: visible by default, hidden on mobile via CSS media query
|
|
56
|
+
* - Mobile container: hidden by default (`display: none`), shown on mobile
|
|
57
|
+
*
|
|
58
|
+
* Both share the `.ins-recommendation-product-container` class so existing selectors
|
|
59
|
+
* (spacing, background color, compiler rules) apply automatically to both.
|
|
51
60
|
* @param layout - The layout orientation ('list' or 'grid')
|
|
52
61
|
* @param instanceClass - Optional instance-specific class (e.g., 'ins-recommendation-v3-block-1')
|
|
53
62
|
* for CSS scoping per block instance. Must be included in the initial template HTML because
|
|
54
63
|
* Stripo's Angular rendering manages the class attribute and overwrites dynamic setAttribute changes.
|
|
55
|
-
* @returns HTML template string with {-{-TITLE-}-} and {-{-
|
|
64
|
+
* @returns HTML template string with {-{-TITLE-}-}, {-{-PRODUCT_ROWS-}-}, and {-{-MOBILE_PRODUCT_ROWS-}-} (grid only) placeholders
|
|
56
65
|
*/
|
|
57
66
|
export declare function createBlockTemplate(layout?: Orientation, instanceClass?: string): string;
|
|
@@ -92,6 +92,12 @@ export interface RecommendationNodeConfig {
|
|
|
92
92
|
* Number of products per row (grid layout only)
|
|
93
93
|
*/
|
|
94
94
|
cardsInRow: number;
|
|
95
|
+
/**
|
|
96
|
+
* Number of products per row on mobile (grid layout only)
|
|
97
|
+
* Only applicable when layout is 'grid'
|
|
98
|
+
* @default 1
|
|
99
|
+
*/
|
|
100
|
+
mobileCardsInRow: number;
|
|
95
101
|
/**
|
|
96
102
|
* Horizontal spacing between product cards in pixels (grid layout only)
|
|
97
103
|
*/
|
|
@@ -100,6 +106,14 @@ export interface RecommendationNodeConfig {
|
|
|
100
106
|
* Vertical spacing between product rows in pixels
|
|
101
107
|
*/
|
|
102
108
|
rowSpacing: number;
|
|
109
|
+
/**
|
|
110
|
+
* Horizontal spacing between product cards on mobile in pixels (grid layout only)
|
|
111
|
+
*/
|
|
112
|
+
mobileColumnSpacing: number;
|
|
113
|
+
/**
|
|
114
|
+
* Vertical spacing between product rows on mobile in pixels
|
|
115
|
+
*/
|
|
116
|
+
mobileRowSpacing: number;
|
|
103
117
|
/**
|
|
104
118
|
* Order of card elements from top to bottom
|
|
105
119
|
* Array of ATTR_PRODUCT_* constants
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Filter } from '@@/Types/recommendation';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
export declare const FilterSchema: v.ObjectSchema<{
|
|
4
|
+
readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5
|
+
readonly attribute: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6
|
+
readonly operator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
7
|
+
readonly innerGroupOperator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
8
|
+
readonly outerGroupOperator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
9
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
10
|
+
readonly filterGroup: v.NumberSchema<undefined>;
|
|
11
|
+
readonly filterNumber: v.NumberSchema<undefined>;
|
|
12
|
+
readonly isValid: v.BooleanSchema<undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
export declare function isFilterValid(filter: Filter): boolean;
|
|
15
|
+
export declare function getInvalidFilterFields(filter: Filter): Set<string>;
|
|
@@ -46,6 +46,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
46
46
|
senderName: string;
|
|
47
47
|
subject: string;
|
|
48
48
|
};
|
|
49
|
+
savedModulesFolderName: string;
|
|
50
|
+
defaultModulesFolderName: string;
|
|
49
51
|
};
|
|
50
52
|
ui: {
|
|
51
53
|
showHeader: boolean;
|
|
@@ -141,6 +143,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
141
143
|
senderName: string;
|
|
142
144
|
subject: string;
|
|
143
145
|
};
|
|
146
|
+
savedModulesFolderName: string;
|
|
147
|
+
defaultModulesFolderName: string;
|
|
144
148
|
};
|
|
145
149
|
ui: {
|
|
146
150
|
showHeader: boolean;
|
|
@@ -236,6 +240,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
236
240
|
senderName: string;
|
|
237
241
|
subject: string;
|
|
238
242
|
};
|
|
243
|
+
savedModulesFolderName: string;
|
|
244
|
+
defaultModulesFolderName: string;
|
|
239
245
|
};
|
|
240
246
|
ui: {
|
|
241
247
|
showHeader: boolean;
|
|
@@ -331,6 +337,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
331
337
|
senderName: string;
|
|
332
338
|
subject: string;
|
|
333
339
|
};
|
|
340
|
+
savedModulesFolderName: string;
|
|
341
|
+
defaultModulesFolderName: string;
|
|
334
342
|
};
|
|
335
343
|
ui: {
|
|
336
344
|
showHeader: boolean;
|
|
@@ -426,6 +434,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
426
434
|
senderName: string;
|
|
427
435
|
subject: string;
|
|
428
436
|
};
|
|
437
|
+
savedModulesFolderName: string;
|
|
438
|
+
defaultModulesFolderName: string;
|
|
429
439
|
};
|
|
430
440
|
ui: {
|
|
431
441
|
showHeader: boolean;
|
|
@@ -521,6 +531,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
521
531
|
senderName: string;
|
|
522
532
|
subject: string;
|
|
523
533
|
};
|
|
534
|
+
savedModulesFolderName: string;
|
|
535
|
+
defaultModulesFolderName: string;
|
|
524
536
|
};
|
|
525
537
|
ui: {
|
|
526
538
|
showHeader: boolean;
|
|
@@ -616,6 +628,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
616
628
|
senderName: string;
|
|
617
629
|
subject: string;
|
|
618
630
|
};
|
|
631
|
+
savedModulesFolderName: string;
|
|
632
|
+
defaultModulesFolderName: string;
|
|
619
633
|
};
|
|
620
634
|
ui: {
|
|
621
635
|
showHeader: boolean;
|
|
@@ -711,6 +725,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
711
725
|
senderName: string;
|
|
712
726
|
subject: string;
|
|
713
727
|
};
|
|
728
|
+
savedModulesFolderName: string;
|
|
729
|
+
defaultModulesFolderName: string;
|
|
714
730
|
};
|
|
715
731
|
ui: {
|
|
716
732
|
showHeader: boolean;
|
|
@@ -806,6 +822,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
806
822
|
senderName: string;
|
|
807
823
|
subject: string;
|
|
808
824
|
};
|
|
825
|
+
savedModulesFolderName: string;
|
|
826
|
+
defaultModulesFolderName: string;
|
|
809
827
|
};
|
|
810
828
|
ui: {
|
|
811
829
|
showHeader: boolean;
|
|
@@ -901,6 +919,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
901
919
|
senderName: string;
|
|
902
920
|
subject: string;
|
|
903
921
|
};
|
|
922
|
+
savedModulesFolderName: string;
|
|
923
|
+
defaultModulesFolderName: string;
|
|
904
924
|
};
|
|
905
925
|
ui: {
|
|
906
926
|
showHeader: boolean;
|
|
@@ -996,6 +1016,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
996
1016
|
senderName: string;
|
|
997
1017
|
subject: string;
|
|
998
1018
|
};
|
|
1019
|
+
savedModulesFolderName: string;
|
|
1020
|
+
defaultModulesFolderName: string;
|
|
999
1021
|
};
|
|
1000
1022
|
ui: {
|
|
1001
1023
|
showHeader: boolean;
|
|
@@ -1091,6 +1113,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1091
1113
|
senderName: string;
|
|
1092
1114
|
subject: string;
|
|
1093
1115
|
};
|
|
1116
|
+
savedModulesFolderName: string;
|
|
1117
|
+
defaultModulesFolderName: string;
|
|
1094
1118
|
};
|
|
1095
1119
|
ui: {
|
|
1096
1120
|
showHeader: boolean;
|
|
@@ -1186,6 +1210,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1186
1210
|
senderName: string;
|
|
1187
1211
|
subject: string;
|
|
1188
1212
|
};
|
|
1213
|
+
savedModulesFolderName: string;
|
|
1214
|
+
defaultModulesFolderName: string;
|
|
1189
1215
|
};
|
|
1190
1216
|
ui: {
|
|
1191
1217
|
showHeader: boolean;
|
|
@@ -1281,6 +1307,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1281
1307
|
senderName: string;
|
|
1282
1308
|
subject: string;
|
|
1283
1309
|
};
|
|
1310
|
+
savedModulesFolderName: string;
|
|
1311
|
+
defaultModulesFolderName: string;
|
|
1284
1312
|
};
|
|
1285
1313
|
ui: {
|
|
1286
1314
|
showHeader: boolean;
|
|
@@ -1376,6 +1404,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1376
1404
|
senderName: string;
|
|
1377
1405
|
subject: string;
|
|
1378
1406
|
};
|
|
1407
|
+
savedModulesFolderName: string;
|
|
1408
|
+
defaultModulesFolderName: string;
|
|
1379
1409
|
};
|
|
1380
1410
|
ui: {
|
|
1381
1411
|
showHeader: boolean;
|
|
@@ -1471,6 +1501,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1471
1501
|
senderName: string;
|
|
1472
1502
|
subject: string;
|
|
1473
1503
|
};
|
|
1504
|
+
savedModulesFolderName: string;
|
|
1505
|
+
defaultModulesFolderName: string;
|
|
1474
1506
|
};
|
|
1475
1507
|
ui: {
|
|
1476
1508
|
showHeader: boolean;
|
|
@@ -1566,6 +1598,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1566
1598
|
senderName: string;
|
|
1567
1599
|
subject: string;
|
|
1568
1600
|
};
|
|
1601
|
+
savedModulesFolderName: string;
|
|
1602
|
+
defaultModulesFolderName: string;
|
|
1569
1603
|
};
|
|
1570
1604
|
ui: {
|
|
1571
1605
|
showHeader: boolean;
|
|
@@ -1661,6 +1695,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1661
1695
|
senderName: string;
|
|
1662
1696
|
subject: string;
|
|
1663
1697
|
};
|
|
1698
|
+
savedModulesFolderName: string;
|
|
1699
|
+
defaultModulesFolderName: string;
|
|
1664
1700
|
};
|
|
1665
1701
|
ui: {
|
|
1666
1702
|
showHeader: boolean;
|
|
@@ -4,6 +4,7 @@ const n = `ue-notifications-container {
|
|
|
4
4
|
bottom: 32px;
|
|
5
5
|
top: unset;
|
|
6
6
|
width: unset;
|
|
7
|
+
position: fixed;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
ue-notifications-container ue-message + ue-message {
|
|
@@ -16,6 +17,24 @@ ue-notifications-container .alert-message-wrapper {
|
|
|
16
17
|
padding: 16px 24px;
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
ue-notifications-container .alert-message-wrapper.info,
|
|
21
|
+
ue-notifications-container .alert-message-wrapper.loader {
|
|
22
|
+
background-color: var(--guido-color-background-toaster-info) !important;
|
|
23
|
+
color: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.alert-message-wrapper .alert-message-main {
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ue-notifications-container ue-caption .caption {
|
|
31
|
+
color: var(--guido-color-white) !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
ue-block-thumb-hint {
|
|
35
|
+
text-align: left;
|
|
36
|
+
}
|
|
37
|
+
|
|
19
38
|
ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-content {
|
|
20
39
|
width: calc(100% - 64px);
|
|
21
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = `ue-emoji .emoji-tabs .active-smile-tab {
|
|
2
2
|
border-color: var(--guido-color-primary-500);
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -17,7 +17,11 @@ ue-insert-table .template-cell {
|
|
|
17
17
|
border: 1px solid var(--guido-color-gray-300);
|
|
18
18
|
box-shadow: var(--guido-box-shadow);
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
.ue-popover.dark-tiny {
|
|
22
|
+
text-align: left !important;
|
|
23
|
+
}
|
|
20
24
|
`;
|
|
21
25
|
export {
|
|
22
|
-
|
|
26
|
+
e as default
|
|
23
27
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n = `.patch-session-container {
|
|
2
2
|
row-gap: 16px;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -24,7 +24,15 @@ ue-vh-patch.selected .patch-wrapper {
|
|
|
24
24
|
background-color: var(--guido-color-primary-100);
|
|
25
25
|
box-shadow: 0 0 0 1px var(--guido-color-primary-500);
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
.change-history-panel-wrapper .control-panel-header {
|
|
29
|
+
padding: 16px 0 16px 16px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.change-history-panel-wrapper .header-control-panel-label {
|
|
33
|
+
grid-area: 1 / 1 / 2 / 12;
|
|
34
|
+
}
|
|
27
35
|
`;
|
|
28
36
|
export {
|
|
29
|
-
|
|
37
|
+
n as default
|
|
30
38
|
};
|
|
@@ -60,7 +60,6 @@ ue-control-panel,
|
|
|
60
60
|
|
|
61
61
|
.control-panel-header {
|
|
62
62
|
grid-template-columns: repeat(12, 1fr);
|
|
63
|
-
padding: 16px 0px 16px 16px;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
.control-panel-header > * {
|
|
@@ -94,7 +93,9 @@ ue-control-panel,
|
|
|
94
93
|
.container.droppable-header-container ue-button:last-child {
|
|
95
94
|
margin-right: 0;
|
|
96
95
|
}
|
|
97
|
-
|
|
96
|
+
.container.droppable-header-container {
|
|
97
|
+
margin-top: 13px;
|
|
98
|
+
}
|
|
98
99
|
.secondary-control-group {
|
|
99
100
|
gap: 16px;
|
|
100
101
|
}
|
|
@@ -133,6 +134,21 @@ ue-label.accent-dot:after {
|
|
|
133
134
|
font-size: 13px;
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
.e2e-container-video-size {
|
|
138
|
+
grid-template-columns: 1fr !important;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.e2e-container-video-size .control-shadow-wrapper:not(ue-button) {
|
|
142
|
+
display: flex;
|
|
143
|
+
width: 100%;
|
|
144
|
+
justify-content: flex-end;
|
|
145
|
+
background-color: transparent !important;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.e2e-container-video-size .control-shadow-wrapper input {
|
|
149
|
+
background-color: var(--guido-color-gray-0);
|
|
150
|
+
}
|
|
151
|
+
|
|
136
152
|
.e2e-size,
|
|
137
153
|
.e2e-timer-size {
|
|
138
154
|
grid-auto-flow: row;
|