@useinsider/guido 2.0.0-beta.edc1f0a → 2.0.0-beta.eee5ecc
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 +53 -39
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -2
- 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/useActionsApi.js +33 -30
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/itemsBlockMigrator.js +334 -0
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/extensions/Blocks/Items/block.js +36 -40
- package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +70 -59
- package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +36 -36
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +146 -131
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +4 -5
- package/dist/extensions/Blocks/Items/extension.js +11 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -49
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -59
- package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
- package/dist/extensions/Blocks/Items/store/items-block.js +11 -7
- package/dist/extensions/Blocks/Items/template.js +389 -141
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +176 -0
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +103 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/control.js +306 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +43 -40
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +4 -13
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +72 -128
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +26 -29
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +160 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +152 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +180 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +30 -32
- package/dist/extensions/Blocks/controlFactories.js +106 -130
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +125 -116
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +26 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -0
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -2
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +22 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +76 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +28 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +11 -19
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +16 -17
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{vertical/migration.d.ts → migrationTemplate.d.ts} +4 -11
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +44 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +10 -11
- package/dist/src/stores/config.d.ts +147 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +2 -38
- package/dist/stores/config.js +7 -0
- package/dist/utils/pairProductVariables.js +61 -58
- package/dist/utils/templatePreparation.js +17 -17
- package/package.json +1 -1
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +0 -12
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -11
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -80
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -232
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +0 -104
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +0 -86
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +0 -134
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +0 -54
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +0 -147
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +0 -64
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +0 -111
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +0 -60
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -114
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -76
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -211
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.js +0 -157
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/template.js +0 -72
- package/dist/extensions/Blocks/Recommendation/templates/index.js +0 -12
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +0 -173
- package/dist/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.js +0 -186
- package/dist/extensions/Blocks/Recommendation/templates/vertical/migration.js +0 -251
- package/dist/extensions/Blocks/Recommendation/templates/vertical/template.js +0 -62
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -36
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +0 -46
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -12
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +0 -27
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -19
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -143
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -31
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -24
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +0 -34
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -17
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +0 -22
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -62
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -39
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -81
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -97
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -73
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.d.ts +0 -8
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/migration.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/template.d.ts +0 -18
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +0 -39
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +0 -45
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/template.d.ts +0 -33
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +0 -77
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { ATTR_PRODUCT_BUTTON as s, ATTR_PRODUCT_OMNIBUS_DISCOUNT as d, ATTR_PRODUCT_OMNIBUS_PRICE as c, ATTR_PRODUCT_OLD_PRICE as o, ATTR_PRODUCT_PRICE as i, ATTR_PRODUCT_NAME as r, ATTR_PRODUCT_IMAGE as p } from "../../constants/selectors.js";
|
|
2
|
-
import { prepareVerticalProductRows as b } from "./template.js";
|
|
3
|
-
const u = `
|
|
4
|
-
<td
|
|
5
|
-
align="left"
|
|
6
|
-
esd-extension-block-id="recommendation-block"
|
|
7
|
-
esd-handler-name="esd-extension-RecommendationBlock"
|
|
8
|
-
class="ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20"
|
|
9
|
-
>
|
|
10
|
-
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
11
|
-
<tr>
|
|
12
|
-
<td align="center">
|
|
13
|
-
<table
|
|
14
|
-
class="container"
|
|
15
|
-
width="100%"
|
|
16
|
-
cellpadding="0"
|
|
17
|
-
cellspacing="0"
|
|
18
|
-
border="0">
|
|
19
|
-
<tbody>
|
|
20
|
-
<tr>
|
|
21
|
-
<td>
|
|
22
|
-
<table
|
|
23
|
-
width="100%"
|
|
24
|
-
cellpadding="0"
|
|
25
|
-
cellspacing="0"
|
|
26
|
-
border="0">
|
|
27
|
-
<tbody>
|
|
28
|
-
<tr>
|
|
29
|
-
{-{-TITLE-}-}
|
|
30
|
-
</tr>
|
|
31
|
-
</tbody>
|
|
32
|
-
</table>
|
|
33
|
-
</td>
|
|
34
|
-
</tr>
|
|
35
|
-
<tr>
|
|
36
|
-
<td class="spacer" style="height: 20px;"></td>
|
|
37
|
-
</tr>
|
|
38
|
-
<tr>
|
|
39
|
-
<td>
|
|
40
|
-
<table
|
|
41
|
-
class="ins-recommendation-product-container"
|
|
42
|
-
width="100%"
|
|
43
|
-
cellpadding="0"
|
|
44
|
-
cellspacing="0"
|
|
45
|
-
border="0"
|
|
46
|
-
>
|
|
47
|
-
{-{-PRODUCT_ROWS-}-}
|
|
48
|
-
</table>
|
|
49
|
-
</td>
|
|
50
|
-
</tr>
|
|
51
|
-
</tbody>
|
|
52
|
-
</table>
|
|
53
|
-
</td>
|
|
54
|
-
</tr>
|
|
55
|
-
</table>
|
|
56
|
-
</td>
|
|
57
|
-
`, e = "0 5px", a = "attribute-cell", g = {
|
|
58
|
-
[p]: (t) => `
|
|
59
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
60
|
-
<table
|
|
61
|
-
class="product-card-segment"
|
|
62
|
-
width="100%"
|
|
63
|
-
height="100%"
|
|
64
|
-
cellpadding="0"
|
|
65
|
-
cellspacing="0"
|
|
66
|
-
border="0">
|
|
67
|
-
<tr>
|
|
68
|
-
<td
|
|
69
|
-
class="esd-block-image product-image"
|
|
70
|
-
esd-extension-block-id="recommendation-block-image"
|
|
71
|
-
align="center"
|
|
72
|
-
style="font-size: 0px;">
|
|
73
|
-
<a target="_blank" href="${t.url}">
|
|
74
|
-
<img
|
|
75
|
-
src="${t.image_url}"
|
|
76
|
-
alt="${t.name}"
|
|
77
|
-
width="120"
|
|
78
|
-
style="display: block; max-width: 100%; height: auto;"
|
|
79
|
-
class="adapt-img">
|
|
80
|
-
</a>
|
|
81
|
-
</td>
|
|
82
|
-
</tr>
|
|
83
|
-
</table>
|
|
84
|
-
</td>
|
|
85
|
-
`,
|
|
86
|
-
[r]: (t) => `
|
|
87
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
88
|
-
<table
|
|
89
|
-
class="product-card-segment"
|
|
90
|
-
width="100%"
|
|
91
|
-
height="100%"
|
|
92
|
-
cellpadding="0"
|
|
93
|
-
cellspacing="0"
|
|
94
|
-
border="0">
|
|
95
|
-
<tr>
|
|
96
|
-
<td
|
|
97
|
-
class="esd-block-text product-name"
|
|
98
|
-
esd-extension-block-id="recommendation-block-name"
|
|
99
|
-
align="center">
|
|
100
|
-
<p
|
|
101
|
-
path="1"
|
|
102
|
-
contenteditable="false"
|
|
103
|
-
style="font-size: 16px; color: #333333; font-weight: 600; text-align: center;">
|
|
104
|
-
<strong path="1,0">${t.name}</strong>
|
|
105
|
-
</p>
|
|
106
|
-
</td>
|
|
107
|
-
</tr>
|
|
108
|
-
</table>
|
|
109
|
-
</td>
|
|
110
|
-
`,
|
|
111
|
-
[i]: () => `
|
|
112
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
113
|
-
<table
|
|
114
|
-
class="product-card-segment"
|
|
115
|
-
width="100%"
|
|
116
|
-
height="100%"
|
|
117
|
-
cellpadding="0"
|
|
118
|
-
cellspacing="0"
|
|
119
|
-
border="0">
|
|
120
|
-
<tr>
|
|
121
|
-
<td
|
|
122
|
-
class="esd-block-text product-price"
|
|
123
|
-
esd-extension-block-id="recommendation-block-price"
|
|
124
|
-
align="center">
|
|
125
|
-
<p
|
|
126
|
-
path="1"
|
|
127
|
-
contenteditable="false"
|
|
128
|
-
style="font-size: 16px; color: #333333; font-weight: bold; text-align: center;">
|
|
129
|
-
<strong path="1,0">18,00 TRY</strong>
|
|
130
|
-
</p>
|
|
131
|
-
</td>
|
|
132
|
-
</tr>
|
|
133
|
-
</table>
|
|
134
|
-
</td>
|
|
135
|
-
`,
|
|
136
|
-
[o]: () => `
|
|
137
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
138
|
-
<table
|
|
139
|
-
class="product-card-segment"
|
|
140
|
-
width="100%"
|
|
141
|
-
height="100%"
|
|
142
|
-
cellpadding="0"
|
|
143
|
-
cellspacing="0"
|
|
144
|
-
border="0">
|
|
145
|
-
<tr>
|
|
146
|
-
<td
|
|
147
|
-
class="esd-block-text product-old-price"
|
|
148
|
-
esd-extension-block-id="recommendation-block-old-price"
|
|
149
|
-
align="center">
|
|
150
|
-
<p
|
|
151
|
-
path="1"
|
|
152
|
-
contenteditable="false"
|
|
153
|
-
style="font-size: 14px; color: #999999; text-decoration: line-through; text-align: center;">
|
|
154
|
-
<s path="1,0">20,00 TRY</s>
|
|
155
|
-
</p>
|
|
156
|
-
</td>
|
|
157
|
-
</tr>
|
|
158
|
-
</table>
|
|
159
|
-
</td>
|
|
160
|
-
`,
|
|
161
|
-
[c]: () => `
|
|
162
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
163
|
-
<table
|
|
164
|
-
class="product-card-segment"
|
|
165
|
-
width="100%"
|
|
166
|
-
height="100%"
|
|
167
|
-
cellpadding="0"
|
|
168
|
-
cellspacing="0"
|
|
169
|
-
border="0">
|
|
170
|
-
<tr>
|
|
171
|
-
<td
|
|
172
|
-
class="esd-block-text product-omnibus-price"
|
|
173
|
-
esd-extension-block-id="recommendation-block-omnibus-price"
|
|
174
|
-
data-text-before="Lowest 30-day price: "
|
|
175
|
-
data-text-after=""
|
|
176
|
-
align="center">
|
|
177
|
-
<p
|
|
178
|
-
path="1"
|
|
179
|
-
contenteditable="false"
|
|
180
|
-
style="font-size: 14px; color: #666666; text-align: center;"><span
|
|
181
|
-
class="omnibus-text-before">Lowest 30-day price: </span><span
|
|
182
|
-
class="omnibus-price-value">17,00 TRY</span><span
|
|
183
|
-
class="omnibus-text-after"></span></p>
|
|
184
|
-
</td>
|
|
185
|
-
</tr>
|
|
186
|
-
</table>
|
|
187
|
-
</td>
|
|
188
|
-
`,
|
|
189
|
-
[d]: () => `
|
|
190
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
191
|
-
<table
|
|
192
|
-
class="product-card-segment"
|
|
193
|
-
width="100%"
|
|
194
|
-
height="100%"
|
|
195
|
-
cellpadding="0"
|
|
196
|
-
cellspacing="0"
|
|
197
|
-
border="0">
|
|
198
|
-
<tr>
|
|
199
|
-
<td
|
|
200
|
-
class="esd-block-text product-omnibus-discount"
|
|
201
|
-
esd-extension-block-id="recommendation-block-omnibus-discount"
|
|
202
|
-
data-text-before=""
|
|
203
|
-
data-text-after=""
|
|
204
|
-
align="center">
|
|
205
|
-
<p
|
|
206
|
-
path="1"
|
|
207
|
-
contenteditable="false"
|
|
208
|
-
style="font-size: 14px; color: #666666; text-align: center;"><span
|
|
209
|
-
class="omnibus-text-before"></span><span
|
|
210
|
-
class="omnibus-discount-value">-6%</span><span
|
|
211
|
-
class="omnibus-text-after"></span></p>
|
|
212
|
-
</td>
|
|
213
|
-
</tr>
|
|
214
|
-
</table>
|
|
215
|
-
</td>
|
|
216
|
-
`,
|
|
217
|
-
[s]: (t) => `
|
|
218
|
-
<td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
|
|
219
|
-
<table
|
|
220
|
-
class="product-card-segment"
|
|
221
|
-
width="100%"
|
|
222
|
-
height="100%"
|
|
223
|
-
cellpadding="0"
|
|
224
|
-
cellspacing="0"
|
|
225
|
-
border="0">
|
|
226
|
-
<tr>
|
|
227
|
-
<td
|
|
228
|
-
class="esd-block-button product-button"
|
|
229
|
-
esd-extension-block-id="recommendation-block-button"
|
|
230
|
-
align="center">
|
|
231
|
-
<span class="es-button-border" style="display: block;">
|
|
232
|
-
<a
|
|
233
|
-
href="${t.url}"
|
|
234
|
-
target="_blank"
|
|
235
|
-
class="es-button">
|
|
236
|
-
{-{-PRODUCT_BUTTON_TEXT-}-}
|
|
237
|
-
</a>
|
|
238
|
-
</span>
|
|
239
|
-
</td>
|
|
240
|
-
</tr>
|
|
241
|
-
</table>
|
|
242
|
-
</td>
|
|
243
|
-
`
|
|
244
|
-
};
|
|
245
|
-
function T(t, l, n) {
|
|
246
|
-
return b(t, l, g, n);
|
|
247
|
-
}
|
|
248
|
-
export {
|
|
249
|
-
u as default,
|
|
250
|
-
T as prepareProductRows
|
|
251
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_PRODUCTS_PER_ROW as u } from "../../constants/layout.js";
|
|
2
|
-
import { DEFAULT_CARD_COMPOSITION as d, spacer as m, createBlockTemplate as R, DEFAULTS as I, getDefaultProducts as L, DEFAULT_CARD_VISIBILITY as w } from "../utils.js";
|
|
3
|
-
import { verticalElementRenderer as E } from "./elementRenderer.js";
|
|
4
|
-
const S = `
|
|
5
|
-
<tr class="recommendation-product-row">
|
|
6
|
-
<td>
|
|
7
|
-
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" class="product-card-wrapper">
|
|
8
|
-
<tbody>
|
|
9
|
-
{-{-ATTRIBUTE_ROWS-}-}
|
|
10
|
-
</tbody>
|
|
11
|
-
</table>
|
|
12
|
-
</td>
|
|
13
|
-
</tr>
|
|
14
|
-
`, b = `
|
|
15
|
-
<tr
|
|
16
|
-
class="recommendation-attribute-row"
|
|
17
|
-
data-attribute-type="{-{-ATTR_TYPE-}-}"
|
|
18
|
-
data-visibility="{-{-VISIBILITY-}-}"
|
|
19
|
-
{-{-DISPLAY_STYLE-}-}>
|
|
20
|
-
{-{-CELLS-}-}
|
|
21
|
-
</tr>
|
|
22
|
-
`;
|
|
23
|
-
function _(r, e, o, n = d) {
|
|
24
|
-
const c = (100 / e).toFixed(2);
|
|
25
|
-
return n.filter((t) => o[t]).map((t) => {
|
|
26
|
-
const l = w[t] ?? !0, i = l ? "" : 'style="display: none;"', a = r.map((p) => {
|
|
27
|
-
const T = o[t];
|
|
28
|
-
return T(p).replace("<td", `<td width="${c}%"`);
|
|
29
|
-
}).join("");
|
|
30
|
-
return b.replace("{-{-ATTR_TYPE-}-}", t).replace("{-{-VISIBILITY-}-}", l ? "1" : "0").replace("{-{-DISPLAY_STYLE-}-}", i).replace("{-{-CELLS-}-}", a);
|
|
31
|
-
}).join("");
|
|
32
|
-
}
|
|
33
|
-
function A(r, e, o, n) {
|
|
34
|
-
const c = [];
|
|
35
|
-
for (let t = 0; t < r.length; t += e)
|
|
36
|
-
c.push(r.slice(t, t + e));
|
|
37
|
-
return c.map((t, l) => {
|
|
38
|
-
const i = _(
|
|
39
|
-
t,
|
|
40
|
-
e,
|
|
41
|
-
o,
|
|
42
|
-
n
|
|
43
|
-
), a = S.replace("{-{-ATTRIBUTE_ROWS-}-}", i);
|
|
44
|
-
return l > 0 ? m + a : a;
|
|
45
|
-
}).join("");
|
|
46
|
-
}
|
|
47
|
-
function D(r, e, o) {
|
|
48
|
-
return A(r, e, E, o);
|
|
49
|
-
}
|
|
50
|
-
function U() {
|
|
51
|
-
const r = R("vertical"), e = D(
|
|
52
|
-
L(),
|
|
53
|
-
u
|
|
54
|
-
);
|
|
55
|
-
return r.replace("{-{-TITLE-}-}", I.TITLE).replace("{-{-PRODUCT_ROWS-}-}", e);
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
U as getDefaultTemplate,
|
|
59
|
-
D as prepareProductRows,
|
|
60
|
-
_ as prepareVerticalAttributeRows,
|
|
61
|
-
A as prepareVerticalProductRows
|
|
62
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
function p(t) {
|
|
2
|
-
const r = {
|
|
3
|
-
"&": "&",
|
|
4
|
-
"<": "<",
|
|
5
|
-
">": ">",
|
|
6
|
-
'"': """,
|
|
7
|
-
"'": "'"
|
|
8
|
-
};
|
|
9
|
-
return t.replace(/[&<>"']/g, (n) => r[n]);
|
|
10
|
-
}
|
|
11
|
-
function m(t) {
|
|
12
|
-
return "getInnerHTML" in t && typeof t.getInnerHTML == "function" ? t.getInnerHTML() : "innerHTML" in t ? t.innerHTML : "";
|
|
13
|
-
}
|
|
14
|
-
function T(t, r) {
|
|
15
|
-
const n = p(r);
|
|
16
|
-
if (!t)
|
|
17
|
-
return n;
|
|
18
|
-
const e = m(t);
|
|
19
|
-
if (!e || e.trim() === "" || !/<(strong|em|u|s|b|i)\b/i.test(e))
|
|
20
|
-
return n;
|
|
21
|
-
const i = [], o = [];
|
|
22
|
-
let c = e.trim();
|
|
23
|
-
for (; ; ) {
|
|
24
|
-
const u = c.match(/^<(strong|em|u|s|b|i)(\s[^>]*)?>(.*)$/is);
|
|
25
|
-
if (!u)
|
|
26
|
-
break;
|
|
27
|
-
const [, s, f = "", g] = u, a = new RegExp(`</${s}>$`, "i");
|
|
28
|
-
if (!a.test(g))
|
|
29
|
-
break;
|
|
30
|
-
i.push(`<${s}${f}>`), o.unshift(`</${s}>`), c = g.replace(a, "").trim();
|
|
31
|
-
}
|
|
32
|
-
return i.length > 0 ? i.join("") + n + o.join("") : n;
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
T as preserveTextStyles
|
|
36
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
function a(t) {
|
|
2
|
-
return typeof t == "object" && t !== null && "tagName" in t && typeof t.tagName == "string";
|
|
3
|
-
}
|
|
4
|
-
function r(t) {
|
|
5
|
-
return typeof t == "object" && t !== null && "getTagName" in t && typeof t.getTagName == "function";
|
|
6
|
-
}
|
|
7
|
-
function n(t) {
|
|
8
|
-
return typeof t == "object" && t !== null && "getStyle" in t && typeof t.getStyle == "function";
|
|
9
|
-
}
|
|
10
|
-
function u(t) {
|
|
11
|
-
return typeof t == "object" && t !== null && "parent" in t && typeof t.parent == "function";
|
|
12
|
-
}
|
|
13
|
-
function g(t) {
|
|
14
|
-
return typeof t == "object" && t !== null && "tagName" in t && t.tagName === "TD";
|
|
15
|
-
}
|
|
16
|
-
function p(t, e) {
|
|
17
|
-
return !t || !n(t) ? null : t.getStyle(e);
|
|
18
|
-
}
|
|
19
|
-
function N(t) {
|
|
20
|
-
return !t || !u(t) ? null : t.parent();
|
|
21
|
-
}
|
|
22
|
-
function l(t, e = "UNKNOWN") {
|
|
23
|
-
return t ? a(t) ? t.tagName.toUpperCase() : r(t) ? t.getTagName().toUpperCase() : e : e;
|
|
24
|
-
}
|
|
25
|
-
const f = /* @__PURE__ */ new Set(["TD", "BLOCK_IMAGE", "BLOCK_BUTTON"]);
|
|
26
|
-
function i(t) {
|
|
27
|
-
return f.has(t.toUpperCase());
|
|
28
|
-
}
|
|
29
|
-
function c(t) {
|
|
30
|
-
const e = l(t);
|
|
31
|
-
return i(e);
|
|
32
|
-
}
|
|
33
|
-
function s(t) {
|
|
34
|
-
return c(t) ? "table-cell" : "table-row";
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
s as getTableDisplayValue,
|
|
38
|
-
l as getTagName,
|
|
39
|
-
n as hasGetStyle,
|
|
40
|
-
u as hasParent,
|
|
41
|
-
c as isTableCellNode,
|
|
42
|
-
i as isTableCellTag,
|
|
43
|
-
g as isTdNode,
|
|
44
|
-
N as safeGetParent,
|
|
45
|
-
p as safeGetStyle
|
|
46
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlElementNode, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
/**
|
|
3
|
-
* Gets the esd-config-block element from the current node.
|
|
4
|
-
* Searches within the closest .items-block-v2 container.
|
|
5
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
6
|
-
* @returns The config block element or null if not found
|
|
7
|
-
*/
|
|
8
|
-
export declare function getConfigBlock(currentNode: ImmutableHtmlNode | undefined): ImmutableHtmlElementNode | null;
|
|
9
|
-
/**
|
|
10
|
-
* Converts an attribute value to a boolean.
|
|
11
|
-
* Handles string values '1', 'true', and null/undefined cases.
|
|
12
|
-
* @param value - The attribute value (string or null)
|
|
13
|
-
* @param defaultValue - Default value to return if value is null/undefined (default: false)
|
|
14
|
-
* @returns The boolean value
|
|
15
|
-
*/
|
|
16
|
-
export declare function attributeToBoolean(value: string | null, defaultValue?: boolean): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Gets a string attribute value with a default fallback.
|
|
19
|
-
* @param value - The attribute value (string or null)
|
|
20
|
-
* @param defaultValue - Default value to return if value is null/undefined (default: '')
|
|
21
|
-
* @returns The string value or default
|
|
22
|
-
*/
|
|
23
|
-
export declare function attributeToString(value: string | null, defaultValue?: string): string;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { configAttributes } from '../enums/productEnums';
|
|
3
|
-
type StoreSetter<T> = (value: T) => void;
|
|
4
|
-
interface SyncConfig<T> {
|
|
5
|
-
attributeName: keyof typeof configAttributes;
|
|
6
|
-
storeSetter: StoreSetter<T>;
|
|
7
|
-
converter: (value: string | null) => T;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Generic utility to sync an attribute value from esd-config-block to the store.
|
|
11
|
-
* This makes attribute values mutable by syncing them from the DOM.
|
|
12
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
13
|
-
* @param config - Configuration object with attribute name, store setter, and value converter
|
|
14
|
-
*/
|
|
15
|
-
export declare function syncAttributeFromConfigBlock<T>(currentNode: ImmutableHtmlNode | undefined, config: SyncConfig<T>): void;
|
|
16
|
-
/**
|
|
17
|
-
* Helper to create a sync config for boolean attributes.
|
|
18
|
-
* @param attributeName - The attribute name from configAttributes
|
|
19
|
-
* @param storeSetter - The store setter function
|
|
20
|
-
* @param defaultValue - Default value if attribute is not set (default: false)
|
|
21
|
-
* @returns Sync configuration object
|
|
22
|
-
*/
|
|
23
|
-
export declare function createBooleanSyncConfig(attributeName: keyof typeof configAttributes, storeSetter: StoreSetter<boolean>, defaultValue?: boolean): SyncConfig<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Helper to create a sync config for string attributes.
|
|
26
|
-
* @param attributeName - The attribute name from configAttributes
|
|
27
|
-
* @param storeSetter - The store setter function
|
|
28
|
-
* @param defaultValue - Default value if attribute is not set (default: '')
|
|
29
|
-
* @returns Sync configuration object
|
|
30
|
-
*/
|
|
31
|
-
export declare function createStringSyncConfig(attributeName: keyof typeof configAttributes, storeSetter: StoreSetter<string>, defaultValue?: string): SyncConfig<string>;
|
|
32
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
/**
|
|
3
|
-
* Reads name trimming value from esd-config-block attribute and updates the store.
|
|
4
|
-
* This makes the trimming value mutable by syncing it from the DOM.
|
|
5
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
6
|
-
*/
|
|
7
|
-
export declare function syncNameTrimmingFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
8
|
-
/**
|
|
9
|
-
* Reads hide discount value from esd-config-block attribute and updates the store.
|
|
10
|
-
* This makes the hide discount value mutable by syncing it from the DOM.
|
|
11
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
12
|
-
*/
|
|
13
|
-
export declare function syncHideDiscountFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
14
|
-
/**
|
|
15
|
-
* Reads formatted price value from esd-config-block attribute and updates the store.
|
|
16
|
-
* This makes the formatted price value mutable by syncing it from the DOM.
|
|
17
|
-
* Defaults to true if not set, since formatted is the default.
|
|
18
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
19
|
-
*/
|
|
20
|
-
export declare function syncFormattedPriceFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
21
|
-
/**
|
|
22
|
-
* Reads currency symbol value from esd-config-block attribute and updates the store.
|
|
23
|
-
* This makes the currency symbol value mutable by syncing it from the DOM.
|
|
24
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
25
|
-
*/
|
|
26
|
-
export declare function syncCurrencySymbolFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
27
|
-
/**
|
|
28
|
-
* Reads currency location value from esd-config-block attribute and updates the store.
|
|
29
|
-
* This makes the currency location value mutable by syncing it from the DOM.
|
|
30
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
31
|
-
*/
|
|
32
|
-
export declare function syncCurrencyLocationFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
33
|
-
/**
|
|
34
|
-
* Reads button link value from esd-config-block attribute and updates the store.
|
|
35
|
-
* This makes the button link value mutable by syncing it from the DOM.
|
|
36
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
37
|
-
*/
|
|
38
|
-
export declare function syncButtonLinkFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
39
|
-
/**
|
|
40
|
-
* Reads image link value from esd-config-block attribute and updates the store.
|
|
41
|
-
* This makes the image link value mutable by syncing it from the DOM.
|
|
42
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
43
|
-
*/
|
|
44
|
-
export declare function syncImageLinkFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
45
|
-
/**
|
|
46
|
-
* Reads price orientation value from esd-config-block attribute and updates the store.
|
|
47
|
-
* This makes the price orientation value mutable by syncing it from the DOM.
|
|
48
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
49
|
-
*/
|
|
50
|
-
export declare function syncPriceOrientationFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode, ControlApi } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
/**
|
|
3
|
-
* Updates attributes on the esd-config-block element based on current store state.
|
|
4
|
-
* This utility can be called from controls whenever they change values that affect attributes.
|
|
5
|
-
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
6
|
-
* @param api - The API object from the control (usually this.api)
|
|
7
|
-
*/
|
|
8
|
-
export declare function updateConfigBlockAttributes(currentNode: ImmutableHtmlNode | undefined, api: ControlApi): void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Block IDs used in the Recommendation Extension
|
|
3
|
-
* These IDs are used in the esd-extension-block-id attribute to identify specific blocks
|
|
4
|
-
*/
|
|
5
|
-
export declare enum RecommendationBlockId {
|
|
6
|
-
BUTTON = "recommendation-block-button",
|
|
7
|
-
NAME = "recommendation-block-name",
|
|
8
|
-
PRICE = "recommendation-block-price",
|
|
9
|
-
OLD_PRICE = "recommendation-block-old-price",
|
|
10
|
-
OMNIBUS_PRICE = "recommendation-block-omnibus-price",
|
|
11
|
-
OMNIBUS_DISCOUNT = "recommendation-block-omnibus-discount",
|
|
12
|
-
IMAGE = "recommendation-block-image"
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recommendation Extension Constants
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports all constants for the Recommendation extension.
|
|
5
|
-
* Import from this file for cleaner imports.
|
|
6
|
-
* @example
|
|
7
|
-
* import { RecommendationBlockId, CONTAINER_SELECTOR } from './constants';
|
|
8
|
-
*/
|
|
9
|
-
export { RecommendationBlockId } from './blockIds';
|
|
10
|
-
export { RecommendationControlId } from './controlIds';
|
|
11
|
-
export { CONTAINER_SELECTOR, 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 './selectors';
|
|
12
|
-
export { DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout-related constants for Recommendation block
|
|
3
|
-
*
|
|
4
|
-
* Centralizes magic numbers for product grid/layout configuration
|
|
5
|
-
*/
|
|
6
|
-
/** Default number of products displayed per row in vertical layout */
|
|
7
|
-
export declare const DEFAULT_PRODUCTS_PER_ROW = 3;
|
|
8
|
-
/** Default number of cards in a row (used in store initialization) */
|
|
9
|
-
export declare const DEFAULT_CARDS_IN_ROW = 3;
|
|
10
|
-
/** Maximum number of products that can be displayed */
|
|
11
|
-
export declare const MAX_PRODUCT_COUNT = 9;
|
|
12
|
-
/** Minimum number of products that can be displayed */
|
|
13
|
-
export declare const MIN_PRODUCT_COUNT = 1;
|
|
14
|
-
/** Maximum number of products per row in vertical layout */
|
|
15
|
-
export declare const MAX_PRODUCTS_PER_ROW = 4;
|
|
16
|
-
/** Minimum number of products per row in vertical layout */
|
|
17
|
-
export declare const MIN_PRODUCTS_PER_ROW = 1;
|
|
18
|
-
/** Default column spacing between product cards (5px on each side = 10px total) */
|
|
19
|
-
export declare const DEFAULT_COLUMN_SPACING = 10;
|
|
20
|
-
/** Default row spacing between product rows */
|
|
21
|
-
export declare const DEFAULT_ROW_SPACING = 20;
|
|
22
|
-
/** Minimum spacing value */
|
|
23
|
-
export declare const MIN_SPACING = 0;
|
|
24
|
-
/** Maximum spacing value */
|
|
25
|
-
export declare const MAX_SPACING = 50;
|
|
26
|
-
/** Spacing adjustment step */
|
|
27
|
-
export declare const SPACING_STEP = 5;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS selectors and data attributes used across the Recommendation extension
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Container selector for the product container element
|
|
6
|
-
* Used across controls to target elements within the recommendation block
|
|
7
|
-
*/
|
|
8
|
-
export declare const CONTAINER_SELECTOR = ".ins-recommendation-product-container";
|
|
9
|
-
/**
|
|
10
|
-
* Attribute type constants used in templates
|
|
11
|
-
* These are used as keys in ElementRenderer and composition arrays
|
|
12
|
-
*/
|
|
13
|
-
export declare const ATTR_PRODUCT_IMAGE = "productImage";
|
|
14
|
-
export declare const ATTR_PRODUCT_NAME = "productName";
|
|
15
|
-
export declare const ATTR_PRODUCT_PRICE = "productPrice";
|
|
16
|
-
export declare const ATTR_PRODUCT_OLD_PRICE = "productOldPrice";
|
|
17
|
-
export declare const ATTR_PRODUCT_OMNIBUS_PRICE = "productOmnibusPrice";
|
|
18
|
-
export declare const ATTR_PRODUCT_OMNIBUS_DISCOUNT = "productOmnibusDiscount";
|
|
19
|
-
export declare const ATTR_PRODUCT_BUTTON = "productButton";
|