@useinsider/guido 2.1.0-beta.d5b6dd6 → 2.1.0-beta.d770bbd

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.
Files changed (161) hide show
  1. package/dist/components/organisms/base/Toaster.vue.js +4 -4
  2. package/dist/components/organisms/base/Toaster.vue2.js +12 -9
  3. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +5 -5
  4. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
  5. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
  6. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +1 -1
  7. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +19 -19
  8. package/dist/composables/useHtmlValidator.js +114 -104
  9. package/dist/composables/useRecommendation.js +54 -21
  10. package/dist/composables/useStripo.js +1 -1
  11. package/dist/config/compiler/recommendationCompilerRules.js +45 -39
  12. package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
  13. package/dist/config/{localePatch → i18n/en}/index.js +5 -7
  14. package/dist/config/{localePatch → i18n/en}/toasters.json.js +7 -2
  15. package/dist/config/i18n/index.js +7 -0
  16. package/dist/config/migrator/itemsBlockMigrator.js +127 -122
  17. package/dist/config/migrator/recommendationMigrator.js +2 -2
  18. package/dist/enums/extensions/recommendationBlock.js +1 -1
  19. package/dist/enums/recommendation.js +16 -15
  20. package/dist/extensions/Blocks/Recommendation/block.js +133 -9
  21. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
  22. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
  23. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +66 -0
  24. package/dist/extensions/Blocks/Recommendation/constants/layout.js +22 -0
  25. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +21 -0
  26. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
  27. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
  28. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
  29. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
  30. package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +92 -0
  31. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
  32. package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +209 -0
  33. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
  34. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +250 -0
  35. package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
  36. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +160 -0
  37. package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
  38. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +307 -0
  39. package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
  40. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
  41. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
  42. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
  43. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
  44. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
  45. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
  46. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
  47. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
  48. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
  49. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
  50. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +222 -0
  51. package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
  52. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
  53. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
  54. package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
  55. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
  56. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -207
  57. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +228 -0
  58. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
  59. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +66 -0
  60. package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
  61. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +169 -0
  62. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
  63. package/dist/extensions/Blocks/Recommendation/templates/utils.js +134 -0
  64. package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
  65. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
  66. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
  67. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
  68. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
  69. package/dist/extensions/Blocks/Unsubscribe/block.js +29 -29
  70. package/dist/extensions/Blocks/Unsubscribe/control.js +12 -9
  71. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +13 -11
  72. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +31 -1
  73. package/dist/extensions/Blocks/controlFactories.js +125 -93
  74. package/dist/guido.css +1 -1
  75. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +242 -186
  76. package/dist/services/recommendationApi.js +11 -8
  77. package/dist/services/stripoApi.js +20 -17
  78. package/dist/services/templateLibraryApi.js +16 -13
  79. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
  80. package/dist/src/composables/useRecommendation.d.ts +1 -0
  81. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
  82. package/dist/src/config/i18n/en/index.d.ts +1 -0
  83. package/dist/src/config/i18n/index.d.ts +16 -0
  84. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
  85. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
  86. package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
  87. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +49 -0
  88. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
  89. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +41 -0
  90. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +35 -0
  91. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
  92. package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
  93. package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
  94. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
  95. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
  96. package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
  97. package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
  98. package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
  99. package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
  100. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +79 -0
  101. package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
  102. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +60 -0
  103. package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
  104. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +221 -0
  105. package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
  106. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
  107. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
  108. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
  109. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
  110. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
  111. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
  112. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
  113. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
  114. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
  115. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
  116. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +83 -0
  117. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
  118. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
  119. package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
  120. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -468
  121. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
  122. package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
  123. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
  124. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +41 -0
  125. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
  126. package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
  127. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
  128. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +66 -0
  129. package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
  130. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +166 -0
  131. package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
  132. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
  133. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
  134. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +1 -0
  135. package/dist/static/styles/components/notification.css.js +4 -0
  136. package/dist/static/styles/components/tools.css.js +6 -2
  137. package/dist/static/styles/customEditorStyle.css.js +35 -11
  138. package/dist/static/styles/variables.css.js +2 -1
  139. package/dist/static/templates/empty/index.html.js +74 -0
  140. package/dist/static/templates/empty/style.css.js +779 -0
  141. package/dist/stores/unsubscribe.js +37 -34
  142. package/dist/utils/pairProductVariables.js +57 -56
  143. package/dist/utils/templatePreparation.js +15 -14
  144. package/package.json +2 -2
  145. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
  146. package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
  147. package/dist/extensions/Blocks/Recommendation/control.js +0 -336
  148. package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
  149. package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
  150. package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
  151. package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
  152. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
  153. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
  154. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
  155. package/dist/src/config/localePatch/index.d.ts +0 -140
  156. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
  157. package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
  158. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
  159. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
  160. /package/dist/config/{localePatch → i18n/en}/labels.json.js +0 -0
  161. /package/dist/config/{localePatch → i18n/en}/tooltips.json.js +0 -0
@@ -1,209 +0,0 @@
1
- import { ATTR_PRODUCT_IMAGE as h, ATTR_PRODUCT_NAME as C, ATTR_PRODUCT_OLD_PRICE as D, ATTR_PRODUCT_PRICE as b, ATTR_PRODUCT_OMNIBUS_PRICE as P, ATTR_PRODUCT_OMNIBUS_DISCOUNT as U, ATTR_PRODUCT_BUTTON as N } from "../constants.js";
2
- const E = {
3
- TITLE: "You May Also Like!"
4
- }, I = `
5
- <tr>
6
- <td class="spacer" style="height: 10px;"></td>
7
- </tr>
8
- `, A = `
9
- <tr class="recommendation-product-row">
10
- <td>
11
- <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
12
- {-{-PRODUCTS-}-}
13
- </table>
14
- </td>
15
- </tr>
16
- `, o = `
17
- <td width="{-{-COLUMN_WIDTH-}-}" style="padding: 0 5px;" valign="top" height="100%">
18
- <table
19
- width="100%"
20
- height="100%"
21
- cellpadding="0"
22
- cellspacing="0"
23
- border="0"
24
- class="product-card-wrapper">
25
- <tr>
26
- <td
27
- class="product-attribute-cell"
28
- valign="top">
29
- <table cellpadding="0" cellspacing="0" role="presentation" width="100%">
30
- <tbody>
31
- {-{-PRODUCT_CONTENT-}-}
32
- </tbody>
33
- </table>
34
- </td>
35
- </tr>
36
- </table>
37
- </td>
38
- `, Y = [
39
- h,
40
- C,
41
- D,
42
- b,
43
- P,
44
- U,
45
- N
46
- ], S = {
47
- [h]: !0,
48
- [C]: !0,
49
- [b]: !0,
50
- [D]: !0,
51
- [P]: !1,
52
- [U]: !1,
53
- [N]: !0
54
- };
55
- function M() {
56
- return [
57
- {
58
- name: "Product Name",
59
- image_url: "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png",
60
- price: { USD: 18 },
61
- original_price: { USD: 20 },
62
- discount: { USD: 2 },
63
- url: "https://example.com/product/1",
64
- item_id: "1",
65
- in_stock: 1,
66
- locale: "en",
67
- product_attributes: {},
68
- category: []
69
- },
70
- {
71
- name: "Belt",
72
- image_url: "https://inshoppingcart.com/ins-html/wp-content/uploads/2018/09/belt-2.jpg",
73
- price: { TRY: 55 },
74
- original_price: { TRY: 65 },
75
- discount: { TRY: 10 },
76
- url: "https://example.com/product/2",
77
- item_id: "2",
78
- in_stock: 1,
79
- locale: "tr",
80
- product_attributes: {},
81
- category: []
82
- },
83
- {
84
- name: "Beanie",
85
- image_url: "https://inshoppingcart.com/ins-html/wp-content/uploads/2018/08/beanie-with-logo-1.jpg",
86
- price: { TRY: 18 },
87
- original_price: { TRY: 20 },
88
- discount: { TRY: 2 },
89
- url: "https://example.com/product/3",
90
- item_id: "3",
91
- in_stock: 1,
92
- locale: "tr",
93
- product_attributes: {},
94
- category: []
95
- },
96
- {
97
- name: "Album",
98
- image_url: "https://inshoppingcart.com/ins-html/wp-content/uploads/2018/12/poster_2_up.jpg",
99
- price: { TRY: 15 },
100
- original_price: { TRY: 15 },
101
- discount: { TRY: 0 },
102
- url: "https://example.com/product/4",
103
- item_id: "4",
104
- in_stock: 1,
105
- locale: "tr",
106
- product_attributes: {},
107
- category: []
108
- },
109
- {
110
- name: "Flying Ninja with a very long product name",
111
- image_url: "https://inshoppingcart.com/ins-html/wp-content/uploads/2018/09/belt-2.jpg",
112
- price: { TRY: 12 },
113
- original_price: { TRY: 15 },
114
- discount: { TRY: 3 },
115
- url: "https://example.com/product/5",
116
- item_id: "5",
117
- in_stock: 1,
118
- locale: "tr",
119
- product_attributes: {},
120
- category: []
121
- },
122
- {
123
- name: "Single",
124
- image_url: "https://inshoppingcart.com/ins-html/wp-content/uploads/2018/12/poster_2_up.jpg",
125
- price: { TRY: 22555 },
126
- original_price: { TRY: 33989 },
127
- discount: { TRY: 11434 },
128
- url: "https://example.com/product/6",
129
- item_id: "6",
130
- in_stock: 1,
131
- locale: "tr",
132
- product_attributes: {},
133
- category: []
134
- }
135
- ];
136
- }
137
- function f(a, r, e, l = Y) {
138
- const s = (100 / r).toFixed(2), p = [];
139
- for (let i = 0; i < a.length; i += r)
140
- p.push(a.slice(i, i + r));
141
- let c = "";
142
- return p.forEach((i, w) => {
143
- w > 0 && (c += I);
144
- let n = "", u = "", d = "", T = "", m = "", _ = "", g = "";
145
- i.forEach((t) => {
146
- n += o.replace(
147
- "{-{-PRODUCT_CONTENT-}-}",
148
- e.productImage(t)
149
- ), u += o.replace(
150
- "{-{-PRODUCT_CONTENT-}-}",
151
- e.productName(t)
152
- ), d += o.replace(
153
- "{-{-PRODUCT_CONTENT-}-}",
154
- e.productPrice(t)
155
- ), T += o.replace(
156
- "{-{-PRODUCT_CONTENT-}-}",
157
- e.productOldPrice(t)
158
- ), m += o.replace(
159
- "{-{-PRODUCT_CONTENT-}-}",
160
- e.productOmnibusPrice(t)
161
- ), _ += o.replace(
162
- "{-{-PRODUCT_CONTENT-}-}",
163
- e.productOmnibusDiscount(t)
164
- ), g += o.replace(
165
- "{-{-PRODUCT_CONTENT-}-}",
166
- e.productButton(t)
167
- );
168
- });
169
- const R = {
170
- productImage: n,
171
- productName: u,
172
- productPrice: d,
173
- productOldPrice: T,
174
- productOmnibusPrice: m,
175
- productOmnibusDiscount: _,
176
- productButton: g
177
- }, y = l.filter((t) => !!R[t]).map((t) => {
178
- const O = S[t] ?? !0;
179
- return `
180
- <tr class="recommendation-attribute-row"
181
- data-attribute-type="${t}"
182
- data-visibility="${O ? "1" : "0"}"${O ? "" : ' style="display: none;"'}>
183
- ${R[t]}
184
- </tr>
185
- `;
186
- }).join("");
187
- c += A.replace("{-{-PRODUCTS-}-}", y);
188
- }), c.replaceAll("{-{-COLUMN_WIDTH-}-}", `${s}%`);
189
- }
190
- function j(a, r, e, l, s = E.TITLE, p) {
191
- const c = f(
192
- r,
193
- e,
194
- l,
195
- p
196
- );
197
- return a.replace("{-{-TITLE-}-}", s).replace("{-{-PRODUCT_ROWS-}-}", c);
198
- }
199
- export {
200
- E as DEFAULTS,
201
- Y as DEFAULT_CARD_COMPOSITION,
202
- S as DEFAULT_CARD_VISIBILITY,
203
- j as generateTemplate,
204
- M as getDefaultProducts,
205
- f as prepareProductRows,
206
- o as productCardWrapper,
207
- A as productRow,
208
- I as spacer
209
- };
@@ -1,140 +0,0 @@
1
- /**
2
- * Stripo Editor Translation Overrides
3
- *
4
- * Custom translations for Stripo editor UI elements.
5
- * Translations are stored in JSON files for easier maintenance.
6
- *
7
- * Reference: https://email-static.useinsider.com/guido/{version}/assets/i18n/en.json
8
- * @module config/localePatch
9
- */
10
- /**
11
- * Combined locale patch for Stripo editor initialization.
12
- * Merges labels, tooltips, and toasters into a single object.
13
- */
14
- export declare const localePatch: {
15
- en: {
16
- "The image has been deleted.": string;
17
- "Aim for the drop zone!": string;
18
- "Image processing": string;
19
- "Can not get image from an external source.": string;
20
- "The selected basic color cannot be added to My Palette. Please choose a different one from the color picker.": string;
21
- "Copied to clipboard": string;
22
- "The file {fileName} has wrong format {fileFormat}": string;
23
- "The file {fileName} size exceeds the allowed size {maxFileSize}": string;
24
- "Image link invalid": string;
25
- "Image upload failed": string;
26
- "Image upload error": string;
27
- "Error message from video service": string;
28
- "Error message from image processing": string;
29
- "The AI is fine-tuning your result... Please wait! This may take up to 1 minute.": string;
30
- "Can not complete AI request. Try again later": string;
31
- "Http failure response for https://plugins.stripo.email/api/v1/documents/v3/documents/base64: 400 OK": string;
32
- "AI is processing your request": string;
33
- "Whoops, something went wrong. Our experts are working to resolve this issue. Try again later please": string;
34
- "Unable to paste text. Limit is 256kB. Please trim it down.": string;
35
- "Banner src included merge tag": string;
36
- "Module deletion error": string;
37
- "Can`t delete the module": string;
38
- "Block action error": string;
39
- history_revert_to_patch: string;
40
- "There is no connection to the server. Please reload the page or click 'Reconnect' to continue.": string;
41
- "Reconnecting...": string;
42
- "Failed to load version history. Contact support for assistance.": string;
43
- "Connection restored": string;
44
- "Invalid base64 image format. Please replace the image link.": string;
45
- "Timer update error": string;
46
- "Cannot edit base64 images": string;
47
- "Failed to copy URL": string;
48
- "Error message from image service": string;
49
- "Error message from image preload": string;
50
- "An error has occurred. Please report the error code to support: {trace_id} and reload the editor. Also, send a bug report with email logs to the development team.": string;
51
- "The number of requests within your session has been exceeded. Please wait.": string;
52
- "An error has occurred. Please report the error code to support.": string;
53
- "Warning: custom fonts": string;
54
- "Image recovery error": string;
55
- "Image moved to trash": string;
56
- Recover: string;
57
- "Image delete error": string;
58
- "The maximum number of users who can simultaneously work with the sheet has been exceeded. Maximum allowed number: {{max_users_per_model}}": string;
59
- "The monthly limit of Timer basic block is reached. Please change the subscription pricing plan to activate new quotas": string;
60
- "Add template/pre-built modules, or structures with containers": string;
61
- "Allows uploading and editing images": string;
62
- "Allows working on text styles, adding merge tags and lists": string;
63
- "Allows designing buttons of any shape, size, and color": string;
64
- "Meant to visually separate elements with a horizontal line": string;
65
- "Offers 70+ social media icons and chats of different design styles": string;
66
- "Helps taking users from emails to necessary pages on your site": string;
67
- "Allows adding elements with custom code in emails": string;
68
- "Allows applying filters to images and placing text over them": string;
69
- "Allows setting thumbnail images & play buttons for videos": string;
70
- "Adds a countdown to a specific date. Use the timer in emails for promotions, launches, and events": string;
71
- "The \"AMP Carousel\" block is currently being developed. Switch to the Old version of the Editor to access the full functionality needed to continue working on this email. Please note, that all changes you have already made to this email will be saved and available in the Old version": string;
72
- "The \"AMP Accordion\" block is currently being development. Switch to the Old version of the Editor to access the full functionality needed to continue working on this email. Please note, that all changes you have already made to this email will be saved and available in the Old version": string;
73
- "An AMP Form block lets users collect feedback or run surveys directly in an email. It includes input fields and can be added in the Editor, allowing recipients to respond right from their inbox": string;
74
- "Will be applied to the entire email": string;
75
- "Background image for the entire email. Some email clients (Windows 10 Mail, Android 4.4, the Gmail app for iOS, and Android for non-Gmail accounts) do not support background images. Thus, we recommend choosing a background color for the entire email similar to the selected image as a fallback.": string;
76
- "Repetition of the email background image. In Outlook for Windows, the image will be repeated in any case, regardless of whether this option is enabled or not. To bypass the Outlook limitation, you need to create an image in a third-party editor of the needed color and size so that it fits the entire background size, apply the required graphics to it, upload it, and center-align it in the email. The dimensions of such a background image should be at least 1,920 pixels in width, and the height should be equal to the height of the email.": string;
77
- "The standard width of the email varies between 540-700 pixels. <a href=\"https://stripo.email/blog/email-template-size-width-height/\" target=\"_blank\" aria-label=\"Read more about the message width in our blog.\">Read more here</a>": string;
78
- "Alignment of the email content area ": string;
79
- "Your email will automatically adjust for smaller screens by displaying content in a single column. Side-by-side blocks will be stacked vertically": string;
80
- "Your email will display the desktop version on mobile devices. Mobile-specific settings will be turned off in the Editor": string;
81
- "Enable the right-to-left (RTL) text direction to build emails easily without coding for recipients using RTL scripts, such as Arabic, Hebrew, Persian, Urdu, etc.": string;
82
- "Margins around the email message area": string;
83
- "The background image of the stripe. The image will not be displayed in an Outlook app on Windows email clients. We recommend choosing a stripe background color similar to the selected image as a fallback": string;
84
- "We automatically calculate the optimal indentation for your text. It depends on font size and line spacing <a href=\"https://en.wikipedia.org/wiki/Leading\" target=\"_blank\">leading<a/>": string;
85
- "Padding in the \"Text\" block makes space around the added text.": string;
86
- "If an email client doesn't support the non-standard font, a similar standard font will be used instead.": string;
87
- "This option ensures the most accurate display of your buttons in MS Outlook email clients by inserting a special VML-code. When this option is activated, the email message size can be increased up to kilobyte for each added button.": string;
88
- "Outlook for Windows does not have support for a separate button border width setting": string;
89
- "Outlook for Windows does not have a support for the border radius property. We recommend enabling the Outlook support option.": string;
90
- "The option \"hover button styles\" (changing colors upon a mouseover) is supported by a limited number of email clients. <a href=\"{link}\" target=\"_blank\">Learn more</a>": string;
91
- "Button padding that makes the space around the button text": string;
92
- "The icon inside the button will not show in Outlook 2002, 2007, 2010, 2013, 2016, 2019 on Windows.": string;
93
- "Margins around the button": string;
94
- "It only works with CSS styles, so it is not supported by Outlook on Windows. We recommend enabling the Support for Outlook option.": string;
95
- "Not supported by Outlook on Windows, so we recommend enabling the Support for Outlook option in the General Settings tab.": string;
96
- "Add content to the email, click it, and choose \u201CSave as a module\u201D. Stripes, Structures, and Containers can be saved as a module.": string;
97
- "This feature is only supported by Yahoo! Mail, Ukr.net, AOL, Gmail, iCloud Mail, Outlook 2003, Outlook for Mac and macOS Apple Mail": string;
98
- "The aspect ratio of the added image does not match the others. Please replace it to match the {ratio} format": string;
99
- "Margins around the image": string;
100
- "The image will automatically adjust to the width of the screen on mobile devices that support it": string;
101
- "Images won't be adjusted to the width of the screen on mobile devices, which may lead to poor display of images and content": string;
102
- "Make the image to fit to the width of a mobile screen. Please note: It only works on devices that have support for media queries.": string;
103
- "You have the option of displaying a different image when your countdown timer expires.": string;
104
- "Margins around the timer": string;
105
- "Not all email clients support the selected link protocol. Check the <a href=\"https://support.stripo.email/en/articles/5332466-what-are-link-protocols-compatible-with-emails\" target=\"_blank\">compatibility guide</a> to learn more about supported clients.": string;
106
- "This forces the accordion to only allow one expanded section at any given time. Expanding one section will cause any other open sections to close.": string;
107
- "Outlook for Windows does not have support for dashed and dotted borders": string;
108
- "Internal padding creates space around containers and blocks": string;
109
- "Margins around the separator line": string;
110
- "Use your own title and alternative text to each icon": string;
111
- "Margins around social network icons": string;
112
- "Makes the menu fit to the container width": string;
113
- "Margins around elements formed by custom code": string;
114
- "Margins around the banner": string;
115
- "Creates an anchor for this element. Anchor links in emails are designed to make navigation easier. They help take readers to specific places in the email without the need to scroll. <a href=\"https://support.stripo.email/en/articles/3174098-how-to-apply-anchor-hyperlinks\" target=\"_blank\">Learn more</a> about how it works and how to create one with Stripo.": string;
116
- "Include the element in the necessary version of the email, or in both. <a target=\"_blank\" href=\"https://stripo.email/blog/how-to-build-amp-emails-with-stripo/\">Learn more about \u26A1 HTML (AMP HTML).</a>": string;
117
- "The element will be included in both MIME versions of the email: classic HTML and AMP HTML": string;
118
- "The element will be included only in the HTML MIME version of the email message. The item will be hidden in the AMP HTML version": string;
119
- "The element will be included only in the AMP HTML MIME version of the email message. The item will be hidden in the HTML version": string;
120
- "This element will not be hidden in email clients which do not support media queries.": string;
121
- "The element will be hidden on Yahoo mobile App, as well as in mobile email client which do not support media queries.": string;
122
- "The element already hidden on Desktop. Activating this option you turning off hidden state for Desktop.": string;
123
- "The element already hidden on Mobile. Activating this option you turning off hidden state for Mobile.": string;
124
- "An anchor link should not exceed more than 150 characters": string;
125
- "An alternate text should not exceed more than 255 characters": string;
126
- "A HEX color value should not exceed more than 8 symbols": string;
127
- "A keyword must have at least 2 characters": string;
128
- "Button label should not exceed more than 255 characters": string;
129
- "Link Name should not exceed more than 500 characters": string;
130
- "Menu Item Name should not exceed more than 255 characters": string;
131
- "It is not possible to upload more than 50 files simultaneously. If possible, please try to complete this over a few iterations.": string;
132
- "Please enter a valid link": string;
133
- "The image with the invalid link cannot be saved to the image gallery": string;
134
- "The data source link is unavailable. Please, make sure there is an access to the data source.": string;
135
- "The file should not exceed the maximum resolution of {maxImageResolution}px.": string;
136
- "The option is disabled because was overridden in the Code editor": string;
137
- "Global Styles & Layout": string;
138
- "Structures & Modules": string;
139
- };
140
- };
@@ -1,38 +0,0 @@
1
- import { CommonControl } from '../common-control';
2
- export declare const CONTROL_BLOCK_ID = "ui-elements-recommendation-block";
3
- export declare class RecommendationBlockControl extends CommonControl {
4
- private store;
5
- private storeUnsubscription;
6
- private addFilterListener;
7
- private addFilterButton;
8
- getId(): string;
9
- getTemplate(): string;
10
- onRender(): Promise<void>;
11
- onDestroy(): void;
12
- _setFormValues(): void;
13
- _initializeSelectItems(): void;
14
- _getAlgorithms(): string;
15
- _getLanguages(): string;
16
- _getCurrency(): string;
17
- _getProductLayout(): string;
18
- _getFilterStatus(): string;
19
- _getShuffleProducts(): string;
20
- _onFilterSelectClick(): void;
21
- _onDataChange(item: string, value: string | number | string[]): void;
22
- /**
23
- * Get the current card composition from block data attribute or use default
24
- */
25
- _getCardComposition(): string[];
26
- _regenerateProductRows(): void;
27
- /**
28
- * Reapply spacing values after product regeneration
29
- * This ensures spacing persists when products are regenerated
30
- */
31
- _reapplySpacing(): void;
32
- _debouncedRegenerateProductRows: import("@vueuse/shared").PromisifyFn<() => void>;
33
- _onCurrencyConfigChange(item: string, value: string | number): void;
34
- _onCurrencyChange(value: string): void;
35
- _setProductIdsVisibility(): void;
36
- _listenToFormUpdates(): void;
37
- _listenStateUpdates(): void;
38
- }
@@ -1,16 +0,0 @@
1
- import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
- import { CommonControl } from '../../common-control';
3
- /**
4
- * Control for enabling/disabling text trimming on product names
5
- * When enabled, adds a CSS class that applies text-overflow: ellipsis
6
- */
7
- export declare class NameTextTrimControl extends CommonControl {
8
- getId(): string;
9
- getTemplate(): string;
10
- onRender(): void;
11
- onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
12
- _setFormValues(): void;
13
- _getCurrentTrimState(): boolean;
14
- _onTextTrimChange(enabled: boolean): void;
15
- _listenToFormUpdates(): void;
16
- }
@@ -1,16 +0,0 @@
1
- import type { RecommendationProduct } from '@@/Types/recommendation';
2
- import { DEFAULTS, getDefaultProducts, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY } from './templateUtils';
3
- declare const blockTemplate = "\n <td align=\"left\" class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block es-p20\">\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 <BLOCK_TEXT\n class=\"es-p10t es-p10b es-p20l es-p20r\"\n align=\"center\">\n <p path=\"1\" style=\"font-size: 28px; color: #333333;\">\n <strong path=\"1,0\">{-{-TITLE-}-}</strong>\n </p>\n </BLOCK_TEXT>\n </tbody>\n </table>\n </td>\n </tr>\n \n <tr>\n <td class=\"spacer\" style=\"height: 10px;\"></td>\n </tr>\n\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
- export declare function getDefaultTemplate(): string;
5
- /**
6
- * Generates a custom template with specified products and layout
7
- * @param products - Array of products to display
8
- * @param productsPerRow - Number of products per row
9
- * @param title - Optional title for the block
10
- * @param composition - Optional array defining order of card elements
11
- * @returns Complete HTML template
12
- */
13
- export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
14
- export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
15
- export { DEFAULTS, DEFAULT_CARD_COMPOSITION, DEFAULT_CARD_VISIBILITY, getDefaultProducts, };
16
- export default blockTemplate;
@@ -1,52 +0,0 @@
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 interface ElementRenderer {
4
- [ATTR_PRODUCT_IMAGE]: (product: RecommendationProduct) => string;
5
- [ATTR_PRODUCT_NAME]: (product: RecommendationProduct) => string;
6
- [ATTR_PRODUCT_PRICE]: (product: RecommendationProduct) => string;
7
- [ATTR_PRODUCT_OLD_PRICE]: (product: RecommendationProduct) => string;
8
- [ATTR_PRODUCT_OMNIBUS_PRICE]: (product: RecommendationProduct) => string;
9
- [ATTR_PRODUCT_OMNIBUS_DISCOUNT]: (product: RecommendationProduct) => string;
10
- [ATTR_PRODUCT_BUTTON]: (product: RecommendationProduct) => string;
11
- }
12
- export interface TemplateConfig {
13
- spacer: string;
14
- blockTemplate: string;
15
- productRow: string;
16
- productCardWrapper: string;
17
- elementRenderer: ElementRenderer;
18
- }
19
- export declare const DEFAULTS: {
20
- TITLE: string;
21
- DESCRIPTION: string;
22
- };
23
- export declare const spacer = "\n <tr>\n <td class=\"spacer\" style=\"height: 10px;\"></td>\n </tr>\n";
24
- export declare const productRow = "\n <tr class=\"recommendation-product-row\">\n <td>\n <table width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n {-{-PRODUCTS-}-}\n </table>\n </td>\n </tr>\n";
25
- export declare const productCardWrapper = "\n <td width=\"{-{-COLUMN_WIDTH-}-}\" style=\"padding: 0 5px;\" valign=\"top\" height=\"100%\">\n <table\n width=\"100%\"\n height=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n class=\"product-card-wrapper\">\n <tr>\n <td\n class=\"product-attribute-cell\"\n valign=\"top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n {-{-PRODUCT_CONTENT-}-}\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
26
- export declare const DEFAULT_CARD_COMPOSITION: string[];
27
- /**
28
- * Default visibility settings for card composition elements
29
- * Omnibus Price and Omnibus Discount are hidden by default
30
- */
31
- export declare const DEFAULT_CARD_VISIBILITY: Record<string, boolean>;
32
- export declare function getDefaultProducts(): RecommendationProduct[];
33
- /**
34
- * Core template generation logic that works with any element renderer
35
- * @param products - Array of products to display
36
- * @param productsPerRow - Number of products per row
37
- * @param elementRenderer - Object with methods to render each product element
38
- * @param composition - Optional array defining order of card elements
39
- * @returns HTML string for product rows
40
- */
41
- export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
42
- /**
43
- * Generates complete HTML template with dynamic products and layout
44
- * @param blockTemplate - The base block template string
45
- * @param products - Array of products to display
46
- * @param productsPerRow - Number of products per row
47
- * @param elementRenderer - Element renderer for generating product HTML
48
- * @param title - Title for the block
49
- * @param composition - Optional array defining order of card elements
50
- * @returns Complete HTML template
51
- */
52
- export declare function generateTemplate(blockTemplate: string, products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, title?: string, composition?: string[]): string;