@useinsider/guido 2.0.0-beta.e68b206 → 2.0.0-beta.e73ba15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +39 -53
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +2 -2
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +27 -29
- package/dist/composables/useSave.js +11 -13
- package/dist/config/migrator/index.js +8 -9
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/extensions/Blocks/Items/block.js +40 -39
- package/dist/extensions/Blocks/Items/controls/button/link.js +29 -22
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +59 -70
- package/dist/extensions/Blocks/Items/controls/image/link.js +30 -23
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +17 -19
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +29 -31
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +36 -36
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +19 -21
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +27 -29
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +144 -159
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -43
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +3 -4
- package/dist/extensions/Blocks/Items/extension.js +6 -7
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +49 -58
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +59 -48
- package/dist/extensions/Blocks/Items/settingsPanel.js +26 -27
- package/dist/extensions/Blocks/Items/store/items-block.js +7 -11
- package/dist/extensions/Blocks/Items/template.js +129 -366
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +17 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +28 -0
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +76 -0
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +46 -0
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +7 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +11 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +100 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +243 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +104 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +86 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +134 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +54 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +106 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +124 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +60 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +112 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +76 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +224 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -43
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +5 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +128 -72
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +22 -21
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.js +157 -0
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/template.js +72 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +173 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.js +186 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/template.js +62 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +30 -29
- package/dist/extensions/Blocks/controlFactories.js +130 -106
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +116 -125
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +0 -26
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/composables/useConfig.d.ts +0 -6
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -9
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +4 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +26 -24
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -22
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +23 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +32 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +50 -0
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +19 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +54 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +40 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +81 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +77 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +16 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +39 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +45 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → vertical/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +10 -9
- package/dist/src/stores/config.d.ts +1 -147
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +38 -2
- package/dist/stores/config.js +0 -7
- package/dist/utils/pairProductVariables.js +58 -61
- package/package.json +1 -1
- package/dist/config/migrator/itemsBlockMigrator.js +0 -342
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +0 -93
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +0 -184
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
- package/dist/extensions/Blocks/Recommendation/control.js +0 -306
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +0 -6
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +0 -18
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -73
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElementRenderer } from '../utils';
|
|
2
|
+
/**
|
|
3
|
+
* Horizontal element renderer
|
|
4
|
+
* - Image and Button return `<td>` cells for the 3-column layout
|
|
5
|
+
* - Name and Prices return `<tr><td>` rows for the info cell table
|
|
6
|
+
* All elements have esd-block-* classes for Stripo selection
|
|
7
|
+
*/
|
|
8
|
+
export declare const horizontalElementRenderer: ElementRenderer;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
+
import { DEFAULTS, getDefaultProducts } from '../utils';
|
|
3
|
+
/**
|
|
4
|
+
* Migration template for horizontal layout
|
|
5
|
+
* Used when migrating old recommendation blocks to horizontal format
|
|
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=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n data-layout=\"horizontal\"\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
|
+
export declare function getMigrationTemplate(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Generates a custom horizontal migration template with specified products
|
|
11
|
+
* @param products - Array of products to display
|
|
12
|
+
* @param title - Optional title for the block
|
|
13
|
+
* @param composition - Optional array defining order of card elements
|
|
14
|
+
* @returns Complete HTML template
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateMigrationTemplate(products: RecommendationProduct[], title?: string, composition?: string[]): string;
|
|
17
|
+
/**
|
|
18
|
+
* Prepares horizontal product rows for migration
|
|
19
|
+
* @param products - Array of products to display
|
|
20
|
+
* @param composition - Optional array defining order of card elements
|
|
21
|
+
* @returns HTML string for product rows
|
|
22
|
+
*/
|
|
23
|
+
export declare function prepareProductRows(products: RecommendationProduct[], composition?: string[]): string;
|
|
24
|
+
export { DEFAULTS, getDefaultProducts };
|
|
25
|
+
export default migrationTemplate;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a horizontal product card with 3-column layout
|
|
4
|
+
* Uses horizontalElementRenderer to render Image, Info content, and Button
|
|
5
|
+
* Layout: [Image (120px)] [Info table (flexible)] [Button (100px)]
|
|
6
|
+
* @param product - The product data
|
|
7
|
+
* @returns HTML string for a single product card row
|
|
8
|
+
*/
|
|
9
|
+
export declare function getHorizontalProductCard(product: RecommendationProduct): string;
|
|
10
|
+
/**
|
|
11
|
+
* Prepares horizontal product rows
|
|
12
|
+
* Each product is a full-width row with 3-column layout
|
|
13
|
+
* @param products - Array of products to display
|
|
14
|
+
* @returns HTML string for product rows
|
|
15
|
+
*/
|
|
16
|
+
export declare function prepareProductRows(products: RecommendationProduct[]): string;
|
|
17
|
+
export declare function getDefaultTemplate(): string;
|
|
18
|
+
export declare function generateBlockTemplate(products: RecommendationProduct[], title?: string): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Template API for Recommendation Block
|
|
3
|
+
*
|
|
4
|
+
* This module provides a single entry point for working with recommendation
|
|
5
|
+
* block templates, abstracting away the layout-specific implementations.
|
|
6
|
+
*/
|
|
7
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
8
|
+
import { type Orientation, type PrepareProductRowsOptions } from './utils';
|
|
9
|
+
export { DEFAULTS, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY, getDefaultProducts, spacer, createBlockTemplate, type Orientation, type PrepareProductRowsOptions, type ElementRenderer, type ProductCardGetter, } from './utils';
|
|
10
|
+
/**
|
|
11
|
+
* Unified function to prepare product rows for any layout.
|
|
12
|
+
* Delegates to the appropriate layout-specific implementation.
|
|
13
|
+
* @example
|
|
14
|
+
* // Horizontal layout (full-width rows)
|
|
15
|
+
* prepareProductRows(products, 'horizontal');
|
|
16
|
+
* @example
|
|
17
|
+
* // Vertical layout (grid)
|
|
18
|
+
* prepareProductRows(products, 'vertical', { productsPerRow: 3 });
|
|
19
|
+
* @param products - Array of products to display
|
|
20
|
+
* @param layout - The layout orientation ('horizontal' or 'vertical')
|
|
21
|
+
* @param options - Layout-specific options
|
|
22
|
+
* @returns HTML string for product rows
|
|
23
|
+
*/
|
|
24
|
+
export declare function prepareProductRows(products: RecommendationProduct[], layout: Orientation, options?: PrepareProductRowsOptions): string;
|
|
25
|
+
/**
|
|
26
|
+
* Generates the default template for a given layout.
|
|
27
|
+
* @param layout - The layout orientation ('horizontal' or 'vertical')
|
|
28
|
+
* @returns Complete HTML template with default products
|
|
29
|
+
*/
|
|
30
|
+
export declare function getDefaultTemplate(layout?: Orientation): string;
|
|
31
|
+
/**
|
|
32
|
+
* Generates a complete block template with custom products.
|
|
33
|
+
* @param products - Array of products to display
|
|
34
|
+
* @param layout - The layout orientation ('horizontal' or 'vertical')
|
|
35
|
+
* @param title - Title for the block
|
|
36
|
+
* @param options - Layout-specific options
|
|
37
|
+
* @returns Complete HTML template
|
|
38
|
+
*/
|
|
39
|
+
export declare function generateBlockTemplate(products: RecommendationProduct[], layout: Orientation, title?: string, options?: PrepareProductRowsOptions): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
+
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';
|
|
3
|
+
export type Orientation = 'horizontal' | 'vertical';
|
|
4
|
+
/**
|
|
5
|
+
* Options for prepareProductRows unified function
|
|
6
|
+
*/
|
|
7
|
+
export interface PrepareProductRowsOptions {
|
|
8
|
+
/** Number of products per row (only for vertical layout, defaults to 3) */
|
|
9
|
+
productsPerRow?: number;
|
|
10
|
+
/** Array defining order of card elements */
|
|
11
|
+
composition?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Element renderer interface for product card elements
|
|
15
|
+
* Keys are ATTR_PRODUCT_* constants for consistent naming
|
|
16
|
+
*/
|
|
17
|
+
export interface ElementRenderer {
|
|
18
|
+
[ATTR_PRODUCT_IMAGE]: (product: RecommendationProduct) => string;
|
|
19
|
+
[ATTR_PRODUCT_NAME]: (product: RecommendationProduct) => string;
|
|
20
|
+
[ATTR_PRODUCT_PRICE]: (product: RecommendationProduct) => string;
|
|
21
|
+
[ATTR_PRODUCT_OLD_PRICE]: (product: RecommendationProduct) => string;
|
|
22
|
+
[ATTR_PRODUCT_OMNIBUS_PRICE]: (product: RecommendationProduct) => string;
|
|
23
|
+
[ATTR_PRODUCT_OMNIBUS_DISCOUNT]: (product: RecommendationProduct) => string;
|
|
24
|
+
[ATTR_PRODUCT_BUTTON]: (product: RecommendationProduct) => string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Product card getter function type
|
|
28
|
+
* Used by prepareProductRows to generate individual product cards
|
|
29
|
+
*/
|
|
30
|
+
export type ProductCardGetter = (product: RecommendationProduct, composition?: string[]) => string;
|
|
31
|
+
export declare const DEFAULTS: {
|
|
32
|
+
TITLE: string;
|
|
33
|
+
DESCRIPTION: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const DEFAULT_CARD_COMPOSITION: string[];
|
|
36
|
+
export declare const DEFAULT_CARD_VISIBILITY: Record<string, boolean>;
|
|
37
|
+
export declare const spacer = "\n <tr>\n <td class=\"spacer\" style=\"height: 10px;\"></td>\n </tr>\n";
|
|
38
|
+
export declare function getDefaultProducts(): RecommendationProduct[];
|
|
39
|
+
/**
|
|
40
|
+
* Creates the block template wrapper HTML for recommendation blocks.
|
|
41
|
+
* The template includes title placeholder and product container.
|
|
42
|
+
* @param layout - The layout orientation ('horizontal' or 'vertical')
|
|
43
|
+
* @returns HTML template string with {-{-TITLE-}-} and {-{-PRODUCT_ROWS-}-} placeholders
|
|
44
|
+
*/
|
|
45
|
+
export declare function createBlockTemplate(layout?: Orientation): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementRenderer } from '../utils';
|
|
2
|
+
/**
|
|
3
|
+
* Class name for outer cells in attribute rows
|
|
4
|
+
* Used by controls to reliably select direct children for spacing adjustments
|
|
5
|
+
*/
|
|
6
|
+
export declare const ATTRIBUTE_CELL_CLASS = "attribute-cell";
|
|
7
|
+
export declare const verticalElementRenderer: ElementRenderer;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
import { DEFAULTS, getDefaultProducts } from '
|
|
2
|
+
import { DEFAULTS, getDefaultProducts, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY } from '../utils';
|
|
3
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=\"ins-recommendation-v3-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
|
+
/**
|
|
5
|
+
* Prepares migration product rows with attribute-aligned structure.
|
|
6
|
+
* @param products - Array of products to display
|
|
7
|
+
* @param productsPerRow - Number of products per row
|
|
8
|
+
* @param composition - Array defining element order
|
|
9
|
+
* @returns HTML string for product rows
|
|
10
|
+
*/
|
|
11
|
+
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
4
12
|
export declare function getMigrationTemplate(): string;
|
|
5
13
|
/**
|
|
6
|
-
* Generates a custom migration template with specified products and layout
|
|
14
|
+
* Generates a custom migration template with specified products and layout.
|
|
7
15
|
* @param products - Array of products to display
|
|
8
16
|
* @param productsPerRow - Number of products per row
|
|
9
17
|
* @param title - Optional title for the block
|
|
@@ -11,6 +19,5 @@ export declare function getMigrationTemplate(): string;
|
|
|
11
19
|
* @returns Complete HTML template
|
|
12
20
|
*/
|
|
13
21
|
export declare function generateMigrationTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
14
|
-
export
|
|
15
|
-
export { DEFAULTS, getDefaultProducts };
|
|
22
|
+
export { DEFAULTS, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY, getDefaultProducts, };
|
|
16
23
|
export default migrationTemplate;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
+
import { type ElementRenderer } from '../utils';
|
|
3
|
+
/**
|
|
4
|
+
* Generates attribute-aligned product rows for vertical layout.
|
|
5
|
+
* Creates rows where each row contains one attribute type from all products.
|
|
6
|
+
* @param products - Array of products in this row group
|
|
7
|
+
* @param productsPerRow - Number of products per row (for column width calculation)
|
|
8
|
+
* @param elementRenderer - Object mapping attribute types to render functions
|
|
9
|
+
* @param composition - Array defining order of card elements
|
|
10
|
+
* @returns HTML string for attribute-aligned rows
|
|
11
|
+
*/
|
|
12
|
+
export declare function prepareVerticalAttributeRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Prepares vertical product rows with attribute-aligned structure
|
|
15
|
+
* Groups products into rows, then generates attribute-aligned HTML for each group
|
|
16
|
+
* @param products - Array of products to display
|
|
17
|
+
* @param productsPerRow - Number of products per row
|
|
18
|
+
* @param elementRenderer - Object mapping attribute types to render functions
|
|
19
|
+
* @param composition - Array defining order of card elements
|
|
20
|
+
* @returns HTML string for all product rows
|
|
21
|
+
*/
|
|
22
|
+
export declare function prepareVerticalProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
|
|
23
|
+
/**
|
|
24
|
+
* Prepares vertical product rows with attribute-aligned structure.
|
|
25
|
+
* Uses row-based rendering where each attribute type forms a single row across all products.
|
|
26
|
+
* @param products - Array of products to display
|
|
27
|
+
* @param productsPerRow - Number of products per row
|
|
28
|
+
* @param composition - Array defining element order
|
|
29
|
+
* @returns HTML string for product rows
|
|
30
|
+
*/
|
|
31
|
+
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
32
|
+
export declare function getDefaultTemplate(): string;
|
|
33
|
+
export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for preserving text styling when updating innerHTML
|
|
3
|
+
*/
|
|
4
|
+
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
5
|
+
/**
|
|
6
|
+
* Preserves existing style tags when updating text content
|
|
7
|
+
*
|
|
8
|
+
* When users apply text styles (bold, italic, etc.) in Stripo, the editor wraps
|
|
9
|
+
* content in tags like <strong>, <em>, <u>, <s>. This function extracts those
|
|
10
|
+
* style tags from the original HTML and re-applies them to the new text content.
|
|
11
|
+
* @example
|
|
12
|
+
* // Original: <span class="omnibus-text-before"><strong>Lowest price: </strong></span>
|
|
13
|
+
* // After calling preserveTextStyles(element, 'Best price: ')
|
|
14
|
+
* // Result: <strong>Best price: </strong>
|
|
15
|
+
* @param element - The DOM element or ImmutableHtmlNode containing the styled text
|
|
16
|
+
* @param newText - The new text content to insert
|
|
17
|
+
* @returns The new text wrapped in the original style tags
|
|
18
|
+
*/
|
|
19
|
+
export declare function preserveTextStyles(element: ImmutableHtmlNode | Element, newText: string): string;
|
|
@@ -56,24 +56,25 @@ export declare abstract class CommonControl extends Control {
|
|
|
56
56
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
57
57
|
onDestroy(): void;
|
|
58
58
|
/**
|
|
59
|
-
* Gets the
|
|
60
|
-
* @returns The
|
|
59
|
+
* Gets the config block element from the current node.
|
|
60
|
+
* @returns The config block element or null if not found
|
|
61
61
|
*/
|
|
62
|
-
protected
|
|
62
|
+
protected getConfigBlock(): ImmutableHtmlElementNode | null;
|
|
63
63
|
/**
|
|
64
|
-
* Gets the current block instance ID from the
|
|
64
|
+
* Gets the current block instance ID from the config block.
|
|
65
|
+
* @param blockInstanceIdAttribute - The attribute name for block instance ID (default: 'data-block-instance-id')
|
|
65
66
|
* @returns The block instance ID or null if not found
|
|
66
67
|
*/
|
|
67
|
-
protected getBlockInstanceId(): string | null;
|
|
68
|
+
protected getBlockInstanceId(blockInstanceIdAttribute?: string): string | null;
|
|
68
69
|
/**
|
|
69
70
|
* Handles block instance change detection and syncing.
|
|
70
|
-
* This is a helper method for controls that need to sync
|
|
71
|
-
*
|
|
72
|
-
* @param syncFunction - Function to call when block instance changes (to sync from node config)
|
|
71
|
+
* This is a helper method for controls that need to sync attributes when switching between block instances.
|
|
72
|
+
* @param syncFunction - Function to call when block instance changes (to sync from attributes)
|
|
73
73
|
* @param updateUI - Function to call to update the UI (called both on change and when same block)
|
|
74
|
+
* @param blockInstanceIdAttribute - The attribute name for block instance ID (default: 'data-block-instance-id')
|
|
74
75
|
* @returns true if block instance changed, false otherwise
|
|
75
76
|
*/
|
|
76
|
-
protected handleBlockInstanceChange(syncFunction: (node: ImmutableHtmlNode) => void, updateUI: () => void): boolean;
|
|
77
|
+
protected handleBlockInstanceChange(syncFunction: (node: ImmutableHtmlNode) => void, updateUI: () => void, blockInstanceIdAttribute?: string): boolean;
|
|
77
78
|
_GuLabel({ text, name, position }: LabelProps): string;
|
|
78
79
|
_GuToggle(name: string): string;
|
|
79
80
|
_GuSelectItem({ text, value }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig
|
|
1
|
+
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig } from '@@/Types/config';
|
|
2
2
|
interface ConfigStoreState {
|
|
3
3
|
/** Whether the config has been initialized */
|
|
4
4
|
initialized: boolean;
|
|
@@ -96,9 +96,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
96
96
|
})[];
|
|
97
97
|
ignoreDefaultRules: boolean;
|
|
98
98
|
};
|
|
99
|
-
callbacks: {
|
|
100
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
101
|
-
};
|
|
102
99
|
} | null;
|
|
103
100
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
104
101
|
/**
|
|
@@ -191,9 +188,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
191
188
|
})[];
|
|
192
189
|
ignoreDefaultRules: boolean;
|
|
193
190
|
};
|
|
194
|
-
callbacks: {
|
|
195
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
196
|
-
};
|
|
197
191
|
} | null;
|
|
198
192
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
199
193
|
/**
|
|
@@ -286,9 +280,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
286
280
|
})[];
|
|
287
281
|
ignoreDefaultRules: boolean;
|
|
288
282
|
};
|
|
289
|
-
callbacks: {
|
|
290
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
291
|
-
};
|
|
292
283
|
} | null;
|
|
293
284
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
294
285
|
/**
|
|
@@ -381,9 +372,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
381
372
|
})[];
|
|
382
373
|
ignoreDefaultRules: boolean;
|
|
383
374
|
};
|
|
384
|
-
callbacks: {
|
|
385
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
386
|
-
};
|
|
387
375
|
} | null;
|
|
388
376
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
389
377
|
/**
|
|
@@ -476,9 +464,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
476
464
|
})[];
|
|
477
465
|
ignoreDefaultRules: boolean;
|
|
478
466
|
};
|
|
479
|
-
callbacks: {
|
|
480
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
481
|
-
};
|
|
482
467
|
} | null;
|
|
483
468
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
484
469
|
/**
|
|
@@ -571,9 +556,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
571
556
|
})[];
|
|
572
557
|
ignoreDefaultRules: boolean;
|
|
573
558
|
};
|
|
574
|
-
callbacks: {
|
|
575
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
576
|
-
};
|
|
577
559
|
} | null;
|
|
578
560
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
579
561
|
/**
|
|
@@ -666,9 +648,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
666
648
|
})[];
|
|
667
649
|
ignoreDefaultRules: boolean;
|
|
668
650
|
};
|
|
669
|
-
callbacks: {
|
|
670
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
671
|
-
};
|
|
672
651
|
} | null;
|
|
673
652
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
674
653
|
/**
|
|
@@ -761,106 +740,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
761
740
|
})[];
|
|
762
741
|
ignoreDefaultRules: boolean;
|
|
763
742
|
};
|
|
764
|
-
callbacks: {
|
|
765
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
766
|
-
};
|
|
767
743
|
} | null;
|
|
768
744
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
769
|
-
/**
|
|
770
|
-
* Get the callbacks configuration
|
|
771
|
-
*/
|
|
772
|
-
callbacks: (state: {
|
|
773
|
-
initialized: boolean;
|
|
774
|
-
config: {
|
|
775
|
-
identity: {
|
|
776
|
-
templateId: string;
|
|
777
|
-
userId: string;
|
|
778
|
-
variationId?: string | undefined;
|
|
779
|
-
};
|
|
780
|
-
partner: {
|
|
781
|
-
name: string;
|
|
782
|
-
productType: 60 | 49 | 97;
|
|
783
|
-
messageType: 1 | 2;
|
|
784
|
-
username: string;
|
|
785
|
-
};
|
|
786
|
-
template: {
|
|
787
|
-
html: string;
|
|
788
|
-
css: string;
|
|
789
|
-
preselectedDynamicContent: {
|
|
790
|
-
text: string;
|
|
791
|
-
value: string;
|
|
792
|
-
fallback?: string | undefined;
|
|
793
|
-
format?: {
|
|
794
|
-
key: string;
|
|
795
|
-
value: string;
|
|
796
|
-
} | undefined;
|
|
797
|
-
}[];
|
|
798
|
-
selectedUnsubscribePages: number[];
|
|
799
|
-
forceRecreate: boolean;
|
|
800
|
-
};
|
|
801
|
-
editor: {
|
|
802
|
-
locale: string;
|
|
803
|
-
translationsPath: string;
|
|
804
|
-
migrationDate: number;
|
|
805
|
-
emailHeader: {
|
|
806
|
-
senderName: string;
|
|
807
|
-
subject: string;
|
|
808
|
-
};
|
|
809
|
-
};
|
|
810
|
-
ui: {
|
|
811
|
-
showHeader: boolean;
|
|
812
|
-
backButtonLabel?: string | undefined;
|
|
813
|
-
};
|
|
814
|
-
features: {
|
|
815
|
-
dynamicContent: boolean;
|
|
816
|
-
saveAsTemplate: boolean;
|
|
817
|
-
versionHistory: boolean;
|
|
818
|
-
testMessage: boolean;
|
|
819
|
-
displayConditions: boolean;
|
|
820
|
-
unsubscribe: boolean;
|
|
821
|
-
modulesDisabled: boolean;
|
|
822
|
-
};
|
|
823
|
-
blocks: {
|
|
824
|
-
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")[];
|
|
825
|
-
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
826
|
-
};
|
|
827
|
-
compiler: {
|
|
828
|
-
customRules: ({
|
|
829
|
-
type: "replace";
|
|
830
|
-
search: string;
|
|
831
|
-
replacement: string;
|
|
832
|
-
replaceAll?: boolean | undefined;
|
|
833
|
-
id: string;
|
|
834
|
-
description?: string | undefined;
|
|
835
|
-
priority: number;
|
|
836
|
-
} | {
|
|
837
|
-
type: "regex";
|
|
838
|
-
pattern: string;
|
|
839
|
-
replacement: string;
|
|
840
|
-
flags?: string | undefined;
|
|
841
|
-
id: string;
|
|
842
|
-
description?: string | undefined;
|
|
843
|
-
priority: number;
|
|
844
|
-
} | {
|
|
845
|
-
type: "remove";
|
|
846
|
-
targets: string[];
|
|
847
|
-
id: string;
|
|
848
|
-
description?: string | undefined;
|
|
849
|
-
priority: number;
|
|
850
|
-
} | {
|
|
851
|
-
type: "custom";
|
|
852
|
-
processor: (html: string) => string;
|
|
853
|
-
id: string;
|
|
854
|
-
description?: string | undefined;
|
|
855
|
-
priority: number;
|
|
856
|
-
})[];
|
|
857
|
-
ignoreDefaultRules: boolean;
|
|
858
|
-
};
|
|
859
|
-
callbacks: {
|
|
860
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
861
|
-
};
|
|
862
|
-
} | null;
|
|
863
|
-
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
864
745
|
/**
|
|
865
746
|
* Get the template ID
|
|
866
747
|
*/
|
|
@@ -951,9 +832,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
951
832
|
})[];
|
|
952
833
|
ignoreDefaultRules: boolean;
|
|
953
834
|
};
|
|
954
|
-
callbacks: {
|
|
955
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
956
|
-
};
|
|
957
835
|
} | null;
|
|
958
836
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
959
837
|
/**
|
|
@@ -1046,9 +924,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1046
924
|
})[];
|
|
1047
925
|
ignoreDefaultRules: boolean;
|
|
1048
926
|
};
|
|
1049
|
-
callbacks: {
|
|
1050
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1051
|
-
};
|
|
1052
927
|
} | null;
|
|
1053
928
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1054
929
|
/**
|
|
@@ -1141,9 +1016,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1141
1016
|
})[];
|
|
1142
1017
|
ignoreDefaultRules: boolean;
|
|
1143
1018
|
};
|
|
1144
|
-
callbacks: {
|
|
1145
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1146
|
-
};
|
|
1147
1019
|
} | null;
|
|
1148
1020
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1149
1021
|
/**
|
|
@@ -1236,9 +1108,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1236
1108
|
})[];
|
|
1237
1109
|
ignoreDefaultRules: boolean;
|
|
1238
1110
|
};
|
|
1239
|
-
callbacks: {
|
|
1240
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1241
|
-
};
|
|
1242
1111
|
} | null;
|
|
1243
1112
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1244
1113
|
/**
|
|
@@ -1331,9 +1200,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1331
1200
|
})[];
|
|
1332
1201
|
ignoreDefaultRules: boolean;
|
|
1333
1202
|
};
|
|
1334
|
-
callbacks: {
|
|
1335
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1336
|
-
};
|
|
1337
1203
|
} | null;
|
|
1338
1204
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1339
1205
|
/**
|
|
@@ -1426,9 +1292,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1426
1292
|
})[];
|
|
1427
1293
|
ignoreDefaultRules: boolean;
|
|
1428
1294
|
};
|
|
1429
|
-
callbacks: {
|
|
1430
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1431
|
-
};
|
|
1432
1295
|
} | null;
|
|
1433
1296
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1434
1297
|
/**
|
|
@@ -1521,9 +1384,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1521
1384
|
})[];
|
|
1522
1385
|
ignoreDefaultRules: boolean;
|
|
1523
1386
|
};
|
|
1524
|
-
callbacks: {
|
|
1525
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1526
|
-
};
|
|
1527
1387
|
} | null;
|
|
1528
1388
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1529
1389
|
/**
|
|
@@ -1616,9 +1476,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1616
1476
|
})[];
|
|
1617
1477
|
ignoreDefaultRules: boolean;
|
|
1618
1478
|
};
|
|
1619
|
-
callbacks: {
|
|
1620
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1621
|
-
};
|
|
1622
1479
|
} | null;
|
|
1623
1480
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
1624
1481
|
/**
|
|
@@ -1711,9 +1568,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1711
1568
|
})[];
|
|
1712
1569
|
ignoreDefaultRules: boolean;
|
|
1713
1570
|
};
|
|
1714
|
-
callbacks: {
|
|
1715
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1716
|
-
};
|
|
1717
1571
|
} | null;
|
|
1718
1572
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
|
1719
1573
|
}, {
|
|
@@ -6,10 +6,6 @@ ue-main-editor-container[panel-position=SETTINGS_BLOCKS] ue-wide-panel {
|
|
|
6
6
|
right: calc(100% - calc(var(--ue-spacing-step, 5px) * 3) - 425px);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
ue-main-tabs-panel-component .fixed-panel-header {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
/* Remove with this writing task DT-28355 */
|
|
14
10
|
ue-description a {
|
|
15
11
|
display: none;
|
|
@@ -19,10 +19,46 @@ const n = `.esd-x,
|
|
|
19
19
|
box-shadow: none;
|
|
20
20
|
}
|
|
21
21
|
.ins-product-cart ue-node-actions,
|
|
22
|
-
|
|
23
|
-
.ins-recommendation-v3-block-v2 .product-
|
|
22
|
+
/* Horizontal layout - hide for info, image, and button cells */
|
|
23
|
+
.ins-recommendation-v3-block-v2 .product-info-cell ue-node-actions,
|
|
24
|
+
.ins-recommendation-v3-block-v2 .product-info-cell ue-node-panel,
|
|
25
|
+
.ins-recommendation-v3-block-v2 .product-image-cell ue-node-actions,
|
|
26
|
+
.ins-recommendation-v3-block-v2 .product-image-cell ue-node-panel,
|
|
27
|
+
.ins-recommendation-v3-block-v2 .button-cell ue-node-actions,
|
|
28
|
+
.ins-recommendation-v3-block-v2 .button-cell ue-node-panel,
|
|
29
|
+
/* Vertical layout - hide for product-card-segment inner cells */
|
|
30
|
+
.ins-recommendation-v3-block-v2 .product-card-segment ue-node-actions,
|
|
31
|
+
.ins-recommendation-v3-block-v2 .product-card-segment ue-node-panel,
|
|
32
|
+
/* Hide for specific product attribute cells in both layouts */
|
|
33
|
+
.ins-recommendation-v3-block-v2 .product-image ue-node-actions,
|
|
34
|
+
.ins-recommendation-v3-block-v2 .product-image ue-node-panel,
|
|
35
|
+
.ins-recommendation-v3-block-v2 .product-name ue-node-actions,
|
|
36
|
+
.ins-recommendation-v3-block-v2 .product-name ue-node-panel,
|
|
37
|
+
.ins-recommendation-v3-block-v2 .product-price ue-node-actions,
|
|
38
|
+
.ins-recommendation-v3-block-v2 .product-price ue-node-panel,
|
|
39
|
+
.ins-recommendation-v3-block-v2 .product-old-price ue-node-actions,
|
|
40
|
+
.ins-recommendation-v3-block-v2 .product-old-price ue-node-panel,
|
|
41
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-price ue-node-actions,
|
|
42
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-price ue-node-panel,
|
|
43
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-discount ue-node-actions,
|
|
44
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-discount ue-node-panel,
|
|
45
|
+
.ins-recommendation-v3-block-v2 .product-button ue-node-actions,
|
|
46
|
+
.ins-recommendation-v3-block-v2 .product-button ue-node-panel {
|
|
24
47
|
display: none !important;
|
|
25
48
|
}
|
|
49
|
+
|
|
50
|
+
/* Apply to the table cell (td) with text-trim-enabled class */
|
|
51
|
+
.text-trim-enabled {
|
|
52
|
+
max-width: 0 !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.text-trim-enabled p {
|
|
56
|
+
overflow: hidden !important;
|
|
57
|
+
text-overflow: ellipsis !important;
|
|
58
|
+
white-space: nowrap !important;
|
|
59
|
+
margin: 0 !important;
|
|
60
|
+
display: block !important;
|
|
61
|
+
}
|
|
26
62
|
`;
|
|
27
63
|
export {
|
|
28
64
|
n as default
|
package/dist/stores/config.js
CHANGED
|
@@ -64,13 +64,6 @@ const s = o("guido-config", {
|
|
|
64
64
|
var e;
|
|
65
65
|
return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
|
|
66
66
|
},
|
|
67
|
-
/**
|
|
68
|
-
* Get the callbacks configuration
|
|
69
|
-
*/
|
|
70
|
-
callbacks: (i) => {
|
|
71
|
-
var e;
|
|
72
|
-
return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
|
|
73
|
-
},
|
|
74
67
|
/**
|
|
75
68
|
* Get the template ID
|
|
76
69
|
*/
|