@useinsider/guido 3.2.0-beta.565bfaf → 3.2.0-beta.570fb6d

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 (282) hide show
  1. package/dist/@types/config/schemas.js +1 -1
  2. package/dist/@types/config/validator.js +27 -34
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +76 -81
  5. package/dist/components/organisms/base/Toaster.vue2.js +10 -11
  6. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
  7. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
  8. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +9 -15
  9. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +31 -40
  10. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +19 -20
  11. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +11 -14
  12. package/dist/components/organisms/header/EditorActions.vue.js +11 -12
  13. package/dist/components/organisms/header/EditorActions.vue2.js +18 -22
  14. package/dist/components/organisms/header/HeaderWrapper.vue2.js +12 -15
  15. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -19
  16. package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -11
  17. package/dist/components/organisms/header/RightSlot.vue2.js +14 -17
  18. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -12
  19. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +20 -22
  20. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +11 -12
  21. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +38 -41
  22. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +11 -12
  23. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +38 -43
  24. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +18 -21
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +27 -31
  26. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +11 -12
  27. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +27 -29
  28. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +11 -12
  29. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +19 -21
  30. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +8 -9
  31. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +9 -10
  32. package/dist/composables/useActionsApi.js +37 -38
  33. package/dist/composables/useBlocksConfig.js +26 -26
  34. package/dist/composables/useFullStoryBridge.js +13 -0
  35. package/dist/composables/useHtmlCompiler.js +34 -26
  36. package/dist/composables/useHtmlValidator.js +101 -109
  37. package/dist/composables/useHttp.js +30 -30
  38. package/dist/composables/usePartner.js +1 -1
  39. package/dist/composables/useRecommendation.js +14 -15
  40. package/dist/composables/useSave.js +21 -22
  41. package/dist/composables/useStripo.js +47 -42
  42. package/dist/composables/useSyncModuleExtractor.js +31 -29
  43. package/dist/composables/useTimerClone.js +24 -25
  44. package/dist/composables/useTranslations.js +23 -16
  45. package/dist/composables/useValidation.js +7 -8
  46. package/dist/composables/validators/useLiquidValidator.js +13 -13
  47. package/dist/config/compiler/recommendationCompilerRules.js +72 -67
  48. package/dist/config/compiler/unsubscribeCompilerRules.js +38 -37
  49. package/dist/config/compiler/utils/recommendationCompilerUtils.js +36 -34
  50. package/dist/config/migrator/checkboxMigrator.js +20 -21
  51. package/dist/config/migrator/couponBlockMigrator.js +18 -19
  52. package/dist/config/migrator/itemsBlockMigrator.js +87 -89
  53. package/dist/config/migrator/radioButtonMigrator.js +12 -13
  54. package/dist/config/migrator/recommendationMigrator.js +107 -110
  55. package/dist/config/migrator/unsubscribeMigrator.js +10 -11
  56. package/dist/enums/displayConditions.js +78 -82
  57. package/dist/enums/extensions/recommendationBlock.js +41 -95
  58. package/dist/enums/unsubscribe.js +35 -30
  59. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  60. package/dist/extensions/Blocks/Items/block.js +9 -9
  61. package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
  62. package/dist/extensions/Blocks/Items/controls/cardComposition.js +89 -97
  63. package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
  64. package/dist/extensions/Blocks/Items/controls/name/trimming.js +23 -24
  65. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +13 -14
  66. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +44 -47
  67. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
  68. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
  69. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +38 -40
  70. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
  71. package/dist/extensions/Blocks/Items/controls/settingsControl.js +155 -162
  72. package/dist/extensions/Blocks/Items/enums/productEnums.js +21 -14
  73. package/dist/extensions/Blocks/Items/template.js +210 -210
  74. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  75. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  76. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
  77. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +128 -133
  78. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +23 -20
  79. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  80. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
  81. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +19 -20
  82. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +4 -6
  83. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +84 -90
  84. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
  85. package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
  86. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +35 -36
  87. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +134 -135
  88. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
  89. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  90. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
  91. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
  92. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
  93. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
  94. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
  95. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
  96. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
  97. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
  98. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  99. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
  100. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +18 -20
  101. package/dist/extensions/Blocks/Recommendation/extension.js +31 -32
  102. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +25 -32
  103. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +72 -69
  104. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +22 -23
  105. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
  106. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
  107. package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
  108. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +24 -25
  109. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
  110. package/dist/extensions/Blocks/Recommendation/templates/utils.js +45 -47
  111. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  112. package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +13 -16
  113. package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
  114. package/dist/extensions/Blocks/Unsubscribe/control.js +11 -13
  115. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +16 -18
  116. package/dist/extensions/Blocks/common-control.js +25 -26
  117. package/dist/extensions/DynamicContent/dynamic-content.js +53 -58
  118. package/dist/guido.css +1 -1
  119. package/dist/library.js +11 -12
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +272 -167
  121. package/dist/node_modules/valibot/dist/index.js +122 -126
  122. package/dist/package.json.js +1 -1
  123. package/dist/services/recommendationApi.js +14 -17
  124. package/dist/services/templateLibraryApi.js +37 -38
  125. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  126. package/dist/src/composables/useActionsApi.d.ts +1 -1
  127. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  128. package/dist/src/composables/useHtmlCompiler.d.ts +1 -2
  129. package/dist/src/composables/useTranslations.d.ts +1 -1
  130. package/dist/src/enums/displayConditions.d.ts +1 -5
  131. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
  132. package/dist/src/enums/unsubscribe.d.ts +8 -8
  133. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  134. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  135. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  136. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  137. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  138. package/dist/src/stores/dynamic-content.d.ts +3 -3
  139. package/dist/static/styles/components/button.css.js +16 -9
  140. package/dist/static/styles/components/loader.css.js +4 -0
  141. package/dist/static/styles/components/narrow-panel.css.js +52 -0
  142. package/dist/stores/config.js +25 -81
  143. package/dist/stores/dynamic-content.js +6 -11
  144. package/dist/stores/onboarding.js +5 -5
  145. package/dist/stores/preview.js +6 -9
  146. package/dist/stores/unsubscribe.js +1 -4
  147. package/dist/utils/dateUtil.js +7 -10
  148. package/dist/utils/genericUtil.js +10 -13
  149. package/dist/utils/pairProductVariables.js +13 -14
  150. package/package.json +8 -5
  151. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  152. package/dist/node_modules/lodash-es/_Hash.js +0 -20
  153. package/dist/node_modules/lodash-es/_ListCache.js +0 -20
  154. package/dist/node_modules/lodash-es/_Map.js +0 -6
  155. package/dist/node_modules/lodash-es/_MapCache.js +0 -20
  156. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  157. package/dist/node_modules/lodash-es/_Set.js +0 -6
  158. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  159. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  160. package/dist/node_modules/lodash-es/_Symbol.js +0 -5
  161. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  162. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  163. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  164. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -20
  165. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  166. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  167. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  168. package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -10
  169. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  170. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  171. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  172. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  173. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  174. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  175. package/dist/node_modules/lodash-es/_baseGetTag.js +0 -10
  176. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  177. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  178. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  179. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  180. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  181. package/dist/node_modules/lodash-es/_baseIsNative.js +0 -16
  182. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  183. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  184. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  185. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  186. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  187. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  188. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  189. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  190. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  191. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  192. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  193. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  194. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  195. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  196. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  197. package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
  198. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  199. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  200. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  201. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  202. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  203. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  204. package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
  205. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  206. package/dist/node_modules/lodash-es/_getMapData.js +0 -8
  207. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  208. package/dist/node_modules/lodash-es/_getNative.js +0 -9
  209. package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
  210. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  211. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  212. package/dist/node_modules/lodash-es/_getValue.js +0 -6
  213. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  214. package/dist/node_modules/lodash-es/_hashClear.js +0 -7
  215. package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
  216. package/dist/node_modules/lodash-es/_hashGet.js +0 -13
  217. package/dist/node_modules/lodash-es/_hashHas.js +0 -9
  218. package/dist/node_modules/lodash-es/_hashSet.js +0 -9
  219. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  220. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  221. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  222. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  223. package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
  224. package/dist/node_modules/lodash-es/_isMasked.js +0 -11
  225. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  226. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  227. package/dist/node_modules/lodash-es/_listCacheClear.js +0 -6
  228. package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
  229. package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
  230. package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
  231. package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
  232. package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
  233. package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  234. package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
  235. package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
  236. package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
  237. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  238. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  239. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  240. package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
  241. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  242. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  243. package/dist/node_modules/lodash-es/_objectToString.js +0 -7
  244. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  245. package/dist/node_modules/lodash-es/_root.js +0 -5
  246. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  247. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  248. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  249. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  250. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  251. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  252. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  253. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  254. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  255. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  256. package/dist/node_modules/lodash-es/_toSource.js +0 -17
  257. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  258. package/dist/node_modules/lodash-es/eq.js +0 -6
  259. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  260. package/dist/node_modules/lodash-es/get.js +0 -8
  261. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  262. package/dist/node_modules/lodash-es/identity.js +0 -6
  263. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  264. package/dist/node_modules/lodash-es/isArray.js +0 -4
  265. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  266. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  267. package/dist/node_modules/lodash-es/isFunction.js +0 -12
  268. package/dist/node_modules/lodash-es/isLength.js +0 -7
  269. package/dist/node_modules/lodash-es/isObject.js +0 -7
  270. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  271. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  272. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  273. package/dist/node_modules/lodash-es/keys.js +0 -9
  274. package/dist/node_modules/lodash-es/map.js +0 -11
  275. package/dist/node_modules/lodash-es/memoize.js +0 -18
  276. package/dist/node_modules/lodash-es/property.js +0 -10
  277. package/dist/node_modules/lodash-es/range.js +0 -5
  278. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  279. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  280. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  281. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  282. package/dist/node_modules/lodash-es/toString.js +0 -7
@@ -1,17 +1,17 @@
1
- import { getRecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as k } from "../../../../enums/extensions/recommendationBlock.js";
2
- import { useRecommendationApi as y } from "../../../../services/recommendationApi.js";
1
+ import { RecommendationFeedSourceMaps as p, getOperatorOptions as I, PriceAttributes as R } from "../../../../enums/extensions/recommendationBlock.js";
2
+ import { useRecommendationApi as k } from "../../../../services/recommendationApi.js";
3
3
  import { useConfigStore as C } from "../../../../stores/config.js";
4
- import { defineStore as G } from "pinia";
5
- import { DEFAULT_CARDS_IN_ROW as F } from "../constants/layout.js";
6
- import { EXCLUDED_ALGORITHM_IDS as w } from "../constants/defaultConfig.js";
4
+ import { defineStore as y } from "pinia";
5
+ import { generateCompleteFilterQuery as g } from "../utils/filterUtil.js";
6
+ import { isFilterValid as G } from "../validation/filterSchema.js";
7
7
  import { getDefaultProducts as S } from "../templates/utils.js";
8
- import { generateCompleteFilterQuery as b } from "../utils/filterUtil.js";
9
- import { isFilterValid as D } from "../validation/filterSchema.js";
10
- const h = y();
11
- let u = null, m = null, d = null;
12
- function I() {
8
+ import { EXCLUDED_ALGORITHM_IDS as F } from "../constants/defaultConfig.js";
9
+ import { DEFAULT_CARDS_IN_ROW as w } from "../constants/layout.js";
10
+ const h = k();
11
+ let m = null, u = null, d = null;
12
+ function b() {
13
13
  return {
14
- cardsInRow: F,
14
+ cardsInRow: w,
15
15
  currencySettings: {
16
16
  name: "USD",
17
17
  value: "USD",
@@ -37,9 +37,9 @@ function I() {
37
37
  customAttributes: []
38
38
  };
39
39
  }
40
- function P() {
40
+ function D() {
41
41
  return {
42
- recommendationConfigs: I(),
42
+ recommendationConfigs: b(),
43
43
  recommendationProducts: [],
44
44
  filterStatus: !1,
45
45
  filterSelectionDrawerStatus: !1,
@@ -48,7 +48,7 @@ function P() {
48
48
  filterSnapshot: null
49
49
  };
50
50
  }
51
- const v = () => ({
51
+ const P = () => ({
52
52
  recommendationCampaignUrls: {},
53
53
  activePredictiveAlgorithms: [],
54
54
  languages: {},
@@ -57,8 +57,8 @@ const v = () => ({
57
57
  blockStates: {},
58
58
  currentRecommendationId: null,
59
59
  configVersion: 0
60
- }), E = G("guidoRecommendationExtension", {
61
- state: () => v(),
60
+ }), _ = y("guidoRecommendationExtension", {
61
+ state: () => P(),
62
62
  getters: {
63
63
  // ====================================================================
64
64
  // Proxy Getters — Backward Compatible Access to Current Block State
@@ -68,7 +68,7 @@ const v = () => ({
68
68
  * This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
69
69
  */
70
70
  recommendationConfigs(t) {
71
- return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : I();
71
+ return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : b();
72
72
  },
73
73
  /**
74
74
  * Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
@@ -114,8 +114,8 @@ const v = () => ({
114
114
  },
115
115
  getActivePredictiveAlgorithms: (t) => {
116
116
  const r = [];
117
- return t.activePredictiveAlgorithms.filter((e) => !w.includes(e)).forEach((e) => {
118
- r.push(...g().filter((n) => n.id === e));
117
+ return t.activePredictiveAlgorithms.filter((e) => !F.includes(e)).forEach((e) => {
118
+ r.push(...p.filter((i) => i.id === e));
119
119
  }), r.map((e) => ({
120
120
  text: e.name,
121
121
  value: e.key
@@ -131,11 +131,10 @@ const v = () => ({
131
131
  })),
132
132
  getFilterList() {
133
133
  return Object.values(this.filterList).map((t) => {
134
- const r = t.type === "defaultAttribute", e = k.includes(t.attributeName);
135
- let n = r ? t.attributeName : `product_attributes.${t.attributeName}`;
136
- return n = e ? `${n}.${this.recommendationConfigs.currencySettings.value}` : n, {
134
+ let r;
135
+ return t.type === "productAttribute" ? r = `product_attributes.${t.attributeName}` : R.includes(t.attributeName) ? r = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : r = t.attributeName, {
137
136
  text: t.displayName,
138
- value: n,
137
+ value: r,
139
138
  type: t.attributeType
140
139
  };
141
140
  });
@@ -155,7 +154,7 @@ const v = () => ({
155
154
  setCurrentBlock(t) {
156
155
  this.blockStates[t] || (this.blockStates = {
157
156
  ...this.blockStates,
158
- [t]: P()
157
+ [t]: D()
159
158
  }), this.currentRecommendationId = t;
160
159
  },
161
160
  /**
@@ -163,10 +162,15 @@ const v = () => ({
163
162
  * Resets currentRecommendationId if it was the deleted block.
164
163
  */
165
164
  removeBlockState(t) {
166
- const r = { ...this.blockStates };
167
- if (delete r[t], this.blockStates = r, this.currentRecommendationId === t) {
168
- const e = Object.keys(this.blockStates).map(Number);
169
- this.currentRecommendationId = e.length > 0 ? e[0] : null;
165
+ const r = t.toString();
166
+ if (this.recommendationCampaignUrls[r]) {
167
+ const i = { ...this.recommendationCampaignUrls };
168
+ delete i[r], this.recommendationCampaignUrls = i;
169
+ }
170
+ const e = { ...this.blockStates };
171
+ if (delete e[t], this.blockStates = e, this.currentRecommendationId === t) {
172
+ const i = Object.keys(this.blockStates).map(Number);
173
+ this.currentRecommendationId = i.length > 0 ? i[0] : null;
170
174
  }
171
175
  },
172
176
  /**
@@ -192,18 +196,18 @@ const v = () => ({
192
196
  ...t.currencySettings || {}
193
197
  }
194
198
  };
195
- const { triggerRefetch: n = !0 } = r;
196
- n && this.configVersion++;
199
+ const { triggerRefetch: i = !0 } = r;
200
+ i && this.configVersion++;
197
201
  },
198
202
  /**
199
203
  * Creates a filter with the first available attribute and operator pre-selected.
200
204
  */
201
205
  createDefaultFilter(t, r) {
202
- const [e] = this.getFilterList, [n] = R(e == null ? void 0 : e.type);
206
+ const [e] = this.getFilterList, [i] = I(e?.type);
203
207
  return {
204
208
  type: "standardFilter",
205
- attribute: (e == null ? void 0 : e.value) ?? "",
206
- operator: (n == null ? void 0 : n.value) ?? "",
209
+ attribute: e?.value ?? "",
210
+ operator: i?.value ?? "",
207
211
  innerGroupOperator: "*",
208
212
  outerGroupOperator: "*",
209
213
  filterNumber: r,
@@ -251,43 +255,43 @@ const v = () => ({
251
255
  // ====================================================================
252
256
  async fetchRecommendationCreateData() {
253
257
  if (!this.activePredictiveAlgorithms.length) {
254
- if (u) {
255
- await u;
258
+ if (m) {
259
+ await m;
256
260
  return;
257
261
  }
258
- u = (async () => {
262
+ m = (async () => {
259
263
  const {
260
264
  activePredictiveAlgorithms: t,
261
265
  languages: r,
262
266
  currencies: e
263
267
  } = await h.fetchRecommendationCreateData();
264
268
  if (this.activePredictiveAlgorithms = t, this.languages = r, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
265
- const n = this.blockStates[this.currentRecommendationId];
266
- n.filterStatus = !!n.recommendationConfigs.filters.length;
269
+ const i = this.blockStates[this.currentRecommendationId];
270
+ i.filterStatus = !!i.recommendationConfigs.filters.length;
267
271
  }
268
272
  this.currencyList = e;
269
273
  })();
270
274
  try {
271
- await u;
275
+ await m;
272
276
  } finally {
273
- u = null;
277
+ m = null;
274
278
  }
275
279
  }
276
280
  },
277
281
  async fetchRecommendationFilters() {
278
282
  if (!Object.keys(this.filterList).length) {
279
- if (m) {
280
- await m;
283
+ if (u) {
284
+ await u;
281
285
  return;
282
286
  }
283
- m = (async () => {
287
+ u = (async () => {
284
288
  const t = await h.fetchRecommendationFilters();
285
289
  this.filterList = t;
286
290
  })();
287
291
  try {
288
- await m;
292
+ await u;
289
293
  } finally {
290
- m = null;
294
+ u = null;
291
295
  }
292
296
  }
293
297
  },
@@ -302,41 +306,41 @@ const v = () => ({
302
306
  deleteFilterGroup(t) {
303
307
  if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
304
308
  return;
305
- const r = this.blockStates[this.currentRecommendationId], e = r.recommendationConfigs.filters.filter((i) => i.filterGroup !== t), n = [...new Set(e.map((i) => i.filterGroup))].sort((i, o) => i - o), c = new Map(n.map((i, o) => [i, o + 1]));
306
- r.recommendationConfigs.filters = e.map((i) => ({
307
- ...i,
308
- filterGroup: c.get(i.filterGroup) ?? i.filterGroup
309
+ const r = this.blockStates[this.currentRecommendationId], e = r.recommendationConfigs.filters.filter((n) => n.filterGroup !== t), i = [...new Set(e.map((n) => n.filterGroup))].sort((n, o) => n - o), c = new Map(i.map((n, o) => [n, o + 1]));
310
+ r.recommendationConfigs.filters = e.map((n) => ({
311
+ ...n,
312
+ filterGroup: c.get(n.filterGroup) ?? n.filterGroup
309
313
  }));
310
314
  },
311
315
  updateFilter(t) {
312
316
  if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
313
317
  return;
314
- const r = this.blockStates[this.currentRecommendationId], e = r.recommendationConfigs.filters.findIndex((n) => n.filterNumber === t.filterNumber && n.filterGroup === t.filterGroup);
318
+ const r = this.blockStates[this.currentRecommendationId], e = r.recommendationConfigs.filters.findIndex((i) => i.filterNumber === t.filterNumber && i.filterGroup === t.filterGroup);
315
319
  if (e !== -1) {
316
- const n = [...r.recommendationConfigs.filters];
317
- n[e] = {
320
+ const i = [...r.recommendationConfigs.filters];
321
+ i[e] = {
318
322
  ...t,
319
- isValid: D(t)
320
- }, r.recommendationConfigs.filters = n;
323
+ isValid: G(t)
324
+ }, r.recommendationConfigs.filters = i;
321
325
  }
322
326
  },
323
327
  deleteFilter(t) {
324
328
  if (this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])
325
329
  return;
326
- const r = this.blockStates[this.currentRecommendationId], e = [...r.recommendationConfigs.filters].findIndex((n) => n.filterNumber === t.filterNumber && n.filterGroup === t.filterGroup);
330
+ const r = this.blockStates[this.currentRecommendationId], e = [...r.recommendationConfigs.filters].findIndex((i) => i.filterNumber === t.filterNumber && i.filterGroup === t.filterGroup);
327
331
  if (e !== -1) {
328
- let n = [...r.recommendationConfigs.filters];
329
- if (n.splice(e, 1), n.some((i) => i.filterGroup === t.filterGroup)) {
330
- let i = 1;
331
- n = n.map((o) => o.filterGroup === t.filterGroup ? { ...o, filterNumber: i++ } : o);
332
+ let i = [...r.recommendationConfigs.filters];
333
+ if (i.splice(e, 1), i.some((n) => n.filterGroup === t.filterGroup)) {
334
+ let n = 1;
335
+ i = i.map((o) => o.filterGroup === t.filterGroup ? { ...o, filterNumber: n++ } : o);
332
336
  } else {
333
- const i = [...new Set(n.map((s) => s.filterGroup))].sort((s, l) => s - l), o = new Map(i.map((s, l) => [s, l + 1]));
334
- n = n.map((s) => ({
337
+ const n = [...new Set(i.map((s) => s.filterGroup))].sort((s, l) => s - l), o = new Map(n.map((s, l) => [s, l + 1]));
338
+ i = i.map((s) => ({
335
339
  ...s,
336
340
  filterGroup: o.get(s.filterGroup) ?? s.filterGroup
337
341
  }));
338
342
  }
339
- r.recommendationConfigs.filters = n;
343
+ r.recommendationConfigs.filters = i;
340
344
  }
341
345
  },
342
346
  addFilter(t) {
@@ -344,8 +348,8 @@ const v = () => ({
344
348
  return;
345
349
  const r = this.blockStates[this.currentRecommendationId], e = [...r.recommendationConfigs.filters], c = e.filter(
346
350
  (o) => o.filterGroup === t.filterGroup
347
- ).length + 1, i = e.findLastIndex((o) => o.filterGroup === t.filterGroup);
348
- i !== -1 ? e.splice(i + 1, 0, {
351
+ ).length + 1, n = e.findLastIndex((o) => o.filterGroup === t.filterGroup);
352
+ n !== -1 ? e.splice(n + 1, 0, {
349
353
  ...t,
350
354
  filterNumber: c
351
355
  }) : e.push({
@@ -354,7 +358,7 @@ const v = () => ({
354
358
  }), r.recommendationConfigs.filters = e;
355
359
  },
356
360
  generateFilterQuery() {
357
- return b(this.recommendationConfigs.filters);
361
+ return g(this.recommendationConfigs.filters);
358
362
  },
359
363
  // ====================================================================
360
364
  // Per-Block Product Fetching
@@ -374,8 +378,7 @@ const v = () => ({
374
378
  }
375
379
  },
376
380
  async _doFetchProducts() {
377
- var p;
378
- const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c = b(n), i = ((p = g().find((a) => a.key === e.strategy)) == null ? void 0 : p.path) || "", o = C(), s = {
381
+ const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, i = e.filters.filter((a) => a.isValid), c = g(i), n = p.find((a) => a.key === e.strategy)?.path || "", o = C(), s = {
379
382
  locale: e.language,
380
383
  currency: e.currencySettings.value,
381
384
  partnerName: o.partnerName,
@@ -387,7 +390,7 @@ const v = () => ({
387
390
  const l = parseInt(e.size) || 6;
388
391
  let f;
389
392
  try {
390
- f = await h.fetchRecommendationProducts(i, s);
393
+ f = await h.fetchRecommendationProducts(n, s);
391
394
  } catch {
392
395
  f = [];
393
396
  }
@@ -399,5 +402,5 @@ const v = () => ({
399
402
  }
400
403
  });
401
404
  export {
402
- E as useRecommendationExtensionStore
405
+ _ as useRecommendationExtensionStore
403
406
  };
@@ -1,11 +1,11 @@
1
+ import { useRecommendationExtensionStore as p } from "../../store/recommendation.js";
2
+ import { formatPrice as b } from "../../utils/priceFormatter.js";
3
+ import { sanitizeImageUrl as g, CUSTOM_CELL_HTML as u } from "../utils.js";
4
+ import { ATTR_PRODUCT_ATTR as m, ATTR_PRODUCT_BUTTON as h, ATTR_PRODUCT_OMNIBUS_DISCOUNT as y, ATTR_PRODUCT_OMNIBUS_PRICE as T, ATTR_PRODUCT_OLD_PRICE as f, ATTR_PRODUCT_PRICE as x, ATTR_PRODUCT_NAME as _, ATTR_PRODUCT_IMAGE as $ } from "../../constants/selectors.js";
1
5
  import { RecommendationBlockId as s } from "../../constants/blockIds.js";
2
- import { ATTR_PRODUCT_ATTR as g, ATTR_PRODUCT_BUTTON as u, ATTR_PRODUCT_OMNIBUS_DISCOUNT as m, ATTR_PRODUCT_OMNIBUS_PRICE as h, ATTR_PRODUCT_OLD_PRICE as y, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as f, ATTR_PRODUCT_IMAGE as x } from "../../constants/selectors.js";
3
- import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
4
- import { formatPrice as $ } from "../../utils/priceFormatter.js";
5
- import { sanitizeImageUrl as C, CUSTOM_CELL_HTML as R } from "../utils.js";
6
6
  const a = "0 5px", l = "attribute-cell";
7
- function p() {
8
- const t = _(), { currencySettings: e } = t.recommendationConfigs;
7
+ function c() {
8
+ const t = p(), { currencySettings: e } = t.recommendationConfigs;
9
9
  return {
10
10
  code: e.value,
11
11
  symbol: e.symbol,
@@ -16,14 +16,14 @@ function p() {
16
16
  };
17
17
  }
18
18
  function r(t, e = "price") {
19
- const o = p(), n = t[e], d = (n == null ? void 0 : n[o.code]) ?? Object.values(n ?? {})[0] ?? 0;
20
- return $({
19
+ const o = c(), n = t[e], d = n?.[o.code] ?? Object.values(n ?? {})[0] ?? 0;
20
+ return b({
21
21
  price: d,
22
22
  currency: o
23
23
  });
24
24
  }
25
- const I = {
26
- [x]: (t) => `
25
+ const U = {
26
+ [$]: (t) => `
27
27
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
28
28
  <table
29
29
  class="product-card-segment"
@@ -40,7 +40,7 @@ const I = {
40
40
  esd-extension-block-id="${s.IMAGE}">
41
41
  <a target="_blank" href="${t.url}">
42
42
  <img
43
- src="${C(t.image_url)}"
43
+ src="${g(t.image_url)}"
44
44
  alt="${t.name}"
45
45
  style="display: block; max-width: 100%; height: auto;"
46
46
  class="adapt-img">
@@ -51,7 +51,7 @@ const I = {
51
51
  </table>
52
52
  </td>
53
53
  `,
54
- [f]: (t) => `
54
+ [_]: (t) => `
55
55
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
56
56
  <table
57
57
  class="product-card-segment"
@@ -76,7 +76,7 @@ const I = {
76
76
  </table>
77
77
  </td>
78
78
  `,
79
- [T]: (t) => `
79
+ [x]: (t) => `
80
80
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
81
81
  <table
82
82
  class="product-card-segment"
@@ -100,7 +100,7 @@ const I = {
100
100
  </table>
101
101
  </td>
102
102
  `,
103
- [y]: (t) => `
103
+ [f]: (t) => `
104
104
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
105
105
  <table
106
106
  class="product-card-segment"
@@ -124,7 +124,7 @@ const I = {
124
124
  </table>
125
125
  </td>
126
126
  `,
127
- [h]: (t) => `
127
+ [T]: (t) => `
128
128
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
129
129
  <table
130
130
  class="product-card-segment"
@@ -152,9 +152,8 @@ const I = {
152
152
  </table>
153
153
  </td>
154
154
  `,
155
- [m]: (t) => {
156
- var c, i;
157
- const e = p(), o = ((c = t.original_price) == null ? void 0 : c[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, n = ((i = t.price) == null ? void 0 : i[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, d = o > 0 ? Math.round((o - n) / o * 100) : 0, b = d > 0 ? `-${d}%` : "0%";
155
+ [y]: (t) => {
156
+ const e = c(), o = t.original_price?.[e.code] ?? Object.values(t.original_price ?? {})[0] ?? 0, n = t.price?.[e.code] ?? Object.values(t.price ?? {})[0] ?? 0, d = o > 0 ? Math.round((o - n) / o * 100) : 0, i = d > 0 ? `-${d}%` : "0%";
158
157
  return `
159
158
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
160
159
  <table
@@ -174,7 +173,7 @@ const I = {
174
173
  esd-extension-block-id="${s.OMNIBUS_DISCOUNT}">
175
174
  <p contenteditable="false" style="font-size: 12px; color: #666666;">
176
175
  <span class="omnibus-text-before"></span>
177
- <span class="omnibus-discount-value">${b}</span>
176
+ <span class="omnibus-discount-value">${i}</span>
178
177
  <span class="omnibus-text-after"></span>
179
178
  </p>
180
179
  </td>
@@ -184,7 +183,7 @@ const I = {
184
183
  </td>
185
184
  `;
186
185
  },
187
- [u]: () => `
186
+ [h]: () => `
188
187
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="top">
189
188
  <table
190
189
  class="product-card-segment"
@@ -227,7 +226,7 @@ const I = {
227
226
  * @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
228
227
  * @param content - Display content for the cell
229
228
  */
230
- [R]: (t, e) => `
229
+ [u]: (t, e) => `
231
230
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
232
231
  <table
233
232
  class="product-card-segment"
@@ -240,7 +239,7 @@ const I = {
240
239
  <tbody>
241
240
  <tr valign="top">
242
241
  <td
243
- ${g}="${t}"
242
+ ${m}="${t}"
244
243
  class="esd-block-text product-custom-attribute es-p0t es-p0b es-p15l es-p15r"
245
244
  align="center"
246
245
  esd-extension-block-id="${s.CUSTOM_ATTRIBUTE}">
@@ -255,5 +254,5 @@ const I = {
255
254
  export {
256
255
  l as ATTRIBUTE_CELL_CLASS,
257
256
  a as DEFAULT_CELL_PADDING,
258
- I as gridElementRenderer
257
+ U as gridElementRenderer
259
258
  };
@@ -1,5 +1,5 @@
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 { prepareGridProductRows as b } from "./template.js";
1
+ import { prepareGridProductRows as s } from "./template.js";
2
+ import { ATTR_PRODUCT_BUTTON as d, ATTR_PRODUCT_OMNIBUS_DISCOUNT as c, ATTR_PRODUCT_OMNIBUS_PRICE as o, ATTR_PRODUCT_OLD_PRICE as i, ATTR_PRODUCT_PRICE as r, ATTR_PRODUCT_NAME as p, ATTR_PRODUCT_IMAGE as b } from "../../constants/selectors.js";
3
3
  const u = `
4
4
  <td
5
5
  align="left"
@@ -55,7 +55,7 @@ const u = `
55
55
  </table>
56
56
  </td>
57
57
  `, e = "0 5px", a = "attribute-cell", g = {
58
- [p]: (t) => `
58
+ [b]: (t) => `
59
59
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
60
60
  <table
61
61
  class="product-card-segment"
@@ -83,7 +83,7 @@ const u = `
83
83
  </table>
84
84
  </td>
85
85
  `,
86
- [r]: (t) => `
86
+ [p]: (t) => `
87
87
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
88
88
  <table
89
89
  class="product-card-segment"
@@ -108,7 +108,7 @@ const u = `
108
108
  </table>
109
109
  </td>
110
110
  `,
111
- [i]: () => `
111
+ [r]: () => `
112
112
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
113
113
  <table
114
114
  class="product-card-segment"
@@ -133,7 +133,7 @@ const u = `
133
133
  </table>
134
134
  </td>
135
135
  `,
136
- [o]: () => `
136
+ [i]: () => `
137
137
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
138
138
  <table
139
139
  class="product-card-segment"
@@ -158,7 +158,7 @@ const u = `
158
158
  </table>
159
159
  </td>
160
160
  `,
161
- [c]: () => `
161
+ [o]: () => `
162
162
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
163
163
  <table
164
164
  class="product-card-segment"
@@ -186,7 +186,7 @@ const u = `
186
186
  </table>
187
187
  </td>
188
188
  `,
189
- [d]: () => `
189
+ [c]: () => `
190
190
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
191
191
  <table
192
192
  class="product-card-segment"
@@ -214,7 +214,7 @@ const u = `
214
214
  </table>
215
215
  </td>
216
216
  `,
217
- [s]: (t) => `
217
+ [d]: (t) => `
218
218
  <td class="${a}" style="padding: ${e}; height: 100%;" valign="top">
219
219
  <table
220
220
  class="product-card-segment"
@@ -243,7 +243,7 @@ const u = `
243
243
  `
244
244
  };
245
245
  function T(t, l, n) {
246
- return b(t, l, g, n);
246
+ return s(t, l, g, n);
247
247
  }
248
248
  export {
249
249
  u as default,
@@ -1,6 +1,6 @@
1
- import { DEFAULT_PRODUCTS_PER_ROW as L } from "../../constants/layout.js";
2
- import { DEFAULT_CARD_COMPOSITION as E, spacer as I, getDefaultProducts as _, createBlockTemplate as S, DEFAULTS as b, buildElementRenderer as A, DEFAULT_CARD_VISIBILITY as f } from "../utils.js";
3
- import { gridElementRenderer as w, ATTRIBUTE_CELL_CLASS as D, DEFAULT_CELL_PADDING as C } from "./elementRenderer.js";
1
+ import { DEFAULT_CARD_COMPOSITION as L, spacer as E, getDefaultProducts as I, createBlockTemplate as _, DEFAULTS as S, buildElementRenderer as b, DEFAULT_CARD_VISIBILITY as A } from "../utils.js";
2
+ import { gridElementRenderer as f, ATTRIBUTE_CELL_CLASS as w, DEFAULT_CELL_PADDING as D } from "./elementRenderer.js";
3
+ import { DEFAULT_PRODUCTS_PER_ROW as C } from "../../constants/layout.js";
4
4
  const O = `
5
5
  <tr class="recommendation-product-row">
6
6
  <td>
@@ -27,10 +27,10 @@ const O = `
27
27
  {-{-CELLS-}-}
28
28
  </tr>
29
29
  `;
30
- function P(t, e, o, r = E, n = {}) {
31
- const c = (100 / e).toFixed(2), i = e - t.length, l = `<td class="${D}" style="padding: ${C};" width="${c}%"></td>`, d = i > 0 ? l.repeat(i) : "", a = A(o, r, n);
30
+ function P(t, e, o, r = L, n = {}) {
31
+ const c = (100 / e).toFixed(2), i = e - t.length, l = `<td class="${w}" style="padding: ${D};" width="${c}%"></td>`, d = i > 0 ? l.repeat(i) : "", a = b(o, r, n);
32
32
  return r.filter((s) => a[s]).map((s) => {
33
- const T = f[s] ?? !0, u = T ? "" : 'style="display: none;"', R = t.map((m) => a[s](m).replace("<td", `<td width="${c}%"`)).join("");
33
+ const T = A[s] ?? !0, u = T ? "" : 'style="display: none;"', R = t.map((m) => a[s](m).replace("<td", `<td width="${c}%"`)).join("");
34
34
  return g.replace("{-{-ATTR_TYPE-}-}", s).replace("{-{-VISIBILITY-}-}", T ? "1" : "0").replace("{-{-DISPLAY_STYLE-}-}", u).replace("{-{-CELLS-}-}", R + d);
35
35
  }).join("");
36
36
  }
@@ -46,15 +46,15 @@ function U(t, e, o, r, n = {}) {
46
46
  r,
47
47
  n
48
48
  ), p = O.replace("{-{-ATTRIBUTE_ROWS-}-}", a);
49
- return d > 0 ? I + p : p;
49
+ return d > 0 ? E + p : p;
50
50
  }).join("");
51
51
  }
52
52
  function h(t, e, o, r = {}) {
53
- return U(t, e, w, o, r);
53
+ return U(t, e, f, o, r);
54
54
  }
55
55
  function F(t) {
56
- const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o = S("grid", e), r = _(), n = h(r, L);
57
- return o.replace("{-{-TITLE-}-}", b.TITLE).replace("{-{-PRODUCT_ROWS-}-}", n).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
56
+ const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o = _("grid", e), r = I(), n = h(r, C);
57
+ return o.replace("{-{-TITLE-}-}", S.TITLE).replace("{-{-PRODUCT_ROWS-}-}", n).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
58
58
  }
59
59
  export {
60
60
  F as getDefaultTemplate,
@@ -1,11 +1,11 @@
1
- import { DEFAULT_PRODUCTS_PER_ROW as s } from "../constants/layout.js";
2
- import { prepareProductRows as c } from "./grid/template.js";
3
- import { prepareProductRows as R } from "./list/template.js";
1
+ import { prepareProductRows as s } from "./grid/template.js";
2
+ import { prepareProductRows as c } from "./list/template.js";
3
+ import { DEFAULT_PRODUCTS_PER_ROW as R } from "../constants/layout.js";
4
4
  function a(o, t, r = {}) {
5
5
  if (t === "list")
6
- return R(o, r.composition, r.filterList);
7
- const { productsPerRow: e = s, composition: p, filterList: i } = r;
8
- return c(o, e, p, i);
6
+ return c(o, r.composition, r.filterList);
7
+ const { productsPerRow: e = R, composition: p, filterList: i } = r;
8
+ return s(o, e, p, i);
9
9
  }
10
10
  export {
11
11
  a as prepareProductRows