@useinsider/guido 1.0.3-beta.c2cbb62 → 1.0.3-beta.c4d9021

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 (164) hide show
  1. package/README.md +0 -3
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  4. package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
  5. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
  6. package/dist/composables/useActionsApi.js +1 -1
  7. package/dist/composables/useBlocksConfig.js +2 -1
  8. package/dist/composables/useHtmlCompiler.js +13 -15
  9. package/dist/composables/useHtmlValidator.js +35 -36
  10. package/dist/composables/useStripo.js +28 -32
  11. package/dist/enums/extensions/recommendationBlock.js +2 -2
  12. package/dist/enums/onboarding.js +3 -7
  13. package/dist/extensions/Blocks/Checkbox/block.js +2 -5
  14. package/dist/extensions/Blocks/Checkbox/control.js +14 -15
  15. package/dist/extensions/Blocks/Checkbox/template.js +9 -14
  16. package/dist/extensions/Blocks/RadioButton/block.js +2 -5
  17. package/dist/extensions/Blocks/RadioButton/control.js +17 -18
  18. package/dist/extensions/Blocks/RadioButton/template.js +9 -18
  19. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +43 -43
  20. package/dist/extensions/Blocks/Unsubscribe/block.js +41 -45
  21. package/dist/extensions/Blocks/common-control.js +110 -174
  22. package/dist/guido.css +1 -1
  23. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +168 -213
  24. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  25. package/dist/node_modules/lodash-es/keysIn.js +3 -3
  26. package/dist/package.json.js +1 -1
  27. package/dist/services/recommendationApi.js +19 -13
  28. package/dist/src/enums/onboarding.d.ts +0 -4
  29. package/dist/src/extensions/Blocks/Checkbox/block.d.ts +0 -1
  30. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
  31. package/dist/src/extensions/Blocks/RadioButton/block.d.ts +0 -1
  32. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  33. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +4 -3
  34. package/dist/src/extensions/Blocks/common-control.d.ts +7 -44
  35. package/dist/src/stores/onboarding.d.ts +0 -334
  36. package/dist/static/styles/customEditorStyle.css.js +1 -1
  37. package/dist/stores/onboarding.js +12 -20
  38. package/dist/utils/genericUtil.js +17 -16
  39. package/package.json +4 -6
  40. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +0 -21
  41. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +0 -99
  42. package/dist/config/compiler/itemsCompilerRules.js +0 -14
  43. package/dist/extensions/Blocks/Items/block.js +0 -67
  44. package/dist/extensions/Blocks/Items/controls/button/link.js +0 -68
  45. package/dist/extensions/Blocks/Items/controls/cardComposition.js +0 -193
  46. package/dist/extensions/Blocks/Items/controls/image/link.js +0 -68
  47. package/dist/extensions/Blocks/Items/controls/index.js +0 -217
  48. package/dist/extensions/Blocks/Items/controls/name/trimming.js +0 -70
  49. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +0 -107
  50. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +0 -123
  51. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +0 -76
  52. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +0 -61
  53. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +0 -92
  54. package/dist/extensions/Blocks/Items/controls/settingsControl.js +0 -316
  55. package/dist/extensions/Blocks/Items/enums/controlEnums.js +0 -5
  56. package/dist/extensions/Blocks/Items/enums/productEnums.js +0 -274
  57. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +0 -77
  58. package/dist/extensions/Blocks/Items/extension.js +0 -20
  59. package/dist/extensions/Blocks/Items/iconsRegistry.js +0 -32
  60. package/dist/extensions/Blocks/Items/items.css.js +0 -23
  61. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +0 -62
  62. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +0 -72
  63. package/dist/extensions/Blocks/Items/settingsPanel.js +0 -132
  64. package/dist/extensions/Blocks/Items/store/items-block.js +0 -75
  65. package/dist/extensions/Blocks/Items/template.js +0 -195
  66. package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
  67. package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
  68. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
  69. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
  70. package/dist/extensions/Blocks/controlFactories.js +0 -223
  71. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  72. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  73. package/dist/node_modules/lodash-es/_Set.js +0 -6
  74. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  75. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  76. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  77. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  78. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  79. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  80. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  81. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  82. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  83. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  84. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  85. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  86. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  87. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  88. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  89. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  90. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  91. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  92. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  93. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  94. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  95. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  96. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  97. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  98. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  99. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  100. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  101. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  102. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  103. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  104. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  105. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  106. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  107. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  108. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  109. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  110. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  111. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  112. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  113. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  114. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  115. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  116. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  117. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  118. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  119. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  120. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  121. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  122. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  123. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  124. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  125. package/dist/node_modules/lodash-es/get.js +0 -8
  126. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  127. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  128. package/dist/node_modules/lodash-es/keys.js +0 -9
  129. package/dist/node_modules/lodash-es/map.js +0 -11
  130. package/dist/node_modules/lodash-es/property.js +0 -10
  131. package/dist/node_modules/lodash-es/range.js +0 -5
  132. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  133. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  134. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  135. package/dist/node_modules/lodash-es/toString.js +0 -7
  136. package/dist/src/components/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -2
  137. package/dist/src/config/compiler/itemsCompilerRules.d.ts +0 -2
  138. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -27
  139. package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -14
  140. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -33
  141. package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -14
  142. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +0 -501
  143. package/dist/src/extensions/Blocks/Items/controls/name/trimming.d.ts +0 -14
  144. package/dist/src/extensions/Blocks/Items/controls/price/currencyLocation.d.ts +0 -19
  145. package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -21
  146. package/dist/src/extensions/Blocks/Items/controls/price/formattedPrice.d.ts +0 -14
  147. package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +0 -13
  148. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -15
  149. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -48
  150. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -62
  151. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -163
  152. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -50
  153. package/dist/src/extensions/Blocks/Items/extension.d.ts +0 -2
  154. package/dist/src/extensions/Blocks/Items/iconsRegistry.d.ts +0 -4
  155. package/dist/src/extensions/Blocks/Items/settingsPanel.d.ts +0 -4
  156. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -43
  157. package/dist/src/extensions/Blocks/Items/template.d.ts +0 -24
  158. package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
  159. package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
  160. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
  161. package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
  162. package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -312
  163. package/dist/src/utils/pairProductVariables.d.ts +0 -7
  164. package/dist/utils/pairProductVariables.js +0 -136
@@ -1,48 +0,0 @@
1
- import { ProductType } from '@@/Types/extensions/items';
2
- import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
3
- import { CommonControl } from '../../common-control';
4
- export declare const CONTROL_BLOCK_ID = "ui-elements-items-block";
5
- export declare class ItemsBlockControl extends CommonControl {
6
- private store;
7
- getId(): string;
8
- getTemplate(): string;
9
- onRender(): void;
10
- onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
11
- onDestroy(): void;
12
- _getItemsType(): string;
13
- _getOrientation(): string;
14
- _getItemInCart(): string;
15
- _onOrientationChange(value: string): void;
16
- _onItemsTypeChange(value: string): void;
17
- _onItemIdsChange(value: string): void;
18
- _initializeSelectItems(): void;
19
- _listenToFormUpdates(): void;
20
- _renderTemplate(): void;
21
- _getTemplateData(): {
22
- imageSrc: string;
23
- name: string;
24
- price: string;
25
- originalPrice: string;
26
- quantity: string;
27
- button: string;
28
- };
29
- _updateImageSrc(imageSrc: string): void;
30
- _updateName(name: string): void;
31
- _updatePrice(price: string): void;
32
- _updateOriginalPrice(originalPrice: string): void;
33
- _updateQuantity(quantity: string): void;
34
- /**
35
- * @todo Optimize template reordering for performance.
36
- * @description Reorders the template structure based on current orientation and visibility settings.
37
- */
38
- _reOrderTemplate(): void;
39
- _updateDataTypeAttributes(itemsType: ProductType): void;
40
- _updateDataNumberAttributes(itemId: string): void;
41
- _reFillTemplate(): void;
42
- _recalculateTrimming(): void;
43
- private _getParagraphFromBlock;
44
- private _escapeRegex;
45
- private _removeCurrencySymbol;
46
- private _replacePriceNumber;
47
- private _buildPriceContent;
48
- }
@@ -1,62 +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 ItemsBlockId {
6
- BUTTON = "items-block-button",
7
- IMAGE = "items-block-image",
8
- ORIGINAL_PRICE = "items-block-original-price",
9
- PRICE = "items-block-price",
10
- QUANTITY = "items-block-quantity",
11
- NAME = "items-block-name"
12
- }
13
- export declare enum ItemsBlockControlId {
14
- BUTTON_ALIGN = "items-block-button-align-control",
15
- BUTTON_BORDER = "items-block-button-border-control",
16
- BUTTON_BORDER_RADIUS = "items-block-button-border-radius-control",
17
- BUTTON_COLOR = "items-block-button-color-control",
18
- BUTTON_FIT_TO_CONTENT = "items-block-button-fit-to-content-control",
19
- BUTTON_FONT_FAMILY = "items-block-button-font-family-control",
20
- BUTTON_MARGINS = "items-block-button-margins-control",
21
- BUTTON_PADDINGS = "items-block-button-paddings-control",
22
- BUTTON_TEXT = "items-block-button-text-control",
23
- BUTTON_TEXT_SIZE = "items-block-button-text-size-control",
24
- BUTTON_TEXT_STYLE_AND_FONT_COLOR = "items-block-button-text-style-and-font-color-control",
25
- BUTTON_LINK = "items-block-button-link-control",
26
- IMAGE_SIZE = "items-block-image-size-control",
27
- IMAGE_MARGINS = "items-block-image-margins-control",
28
- IMAGE_LINK = "items-block-image-link-control",
29
- ORIGINAL_PRICE_ALIGN = "items-block-original-price-align-control",
30
- ORIGINAL_PRICE_COLOR = "items-block-original-price-color-control",
31
- ORIGINAL_PRICE_SIZE = "items-block-original-price-size-control",
32
- ORIGINAL_PRICE_STYLE = "items-block-original-price-style-control",
33
- ORIGINAL_PRICE_FONT_FAMILY = "items-block-original-price-font-family-control",
34
- ORIGINAL_PRICE_BACKGROUND = "items-block-original-price-background-control",
35
- ORIGINAL_PRICE_PADDINGS = "items-block-original-price-paddings-control",
36
- PRICE_ALIGN = "items-block-price-align-control",
37
- PRICE_COLOR = "items-block-price-color-control",
38
- PRICE_SIZE = "items-block-price-size-control",
39
- PRICE_STYLE = "items-block-price-style-control",
40
- PRICE_FONT_FAMILY = "items-block-price-font-family-control",
41
- PRICE_BACKGROUND = "items-block-price-background-control",
42
- PRICE_PADDINGS = "items-block-price-paddings-control",
43
- PRICE_HIDE_DISCOUNT = "items-block-price-hide-discount-control",
44
- PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control",
45
- PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control",
46
- PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control",
47
- PRICE_ORIENTATION = "items-block-price-orientation-control",
48
- NAME_ALIGN = "items-block-name-align-control",
49
- NAME_COLOR = "items-block-name-color-control",
50
- NAME_SIZE = "items-block-name-size-control",
51
- NAME_STYLE = "items-block-name-style-control",
52
- NAME_FONT_FAMILY = "items-block-name-font-family-control",
53
- NAME_BACKGROUND = "items-block-name-background-control",
54
- NAME_TRIMMING = "items-block-name-trimming-control",
55
- NAME_PADDINGS = "items-block-name-paddings-control",
56
- QUANTITY_ALIGN = "items-block-quantity-align-control",
57
- QUANTITY_COLOR = "items-block-quantity-color-control",
58
- QUANTITY_FONT_FAMILY = "items-block-quantity-font-family-control",
59
- QUANTITY_PADDINGS = "items-block-quantity-paddings-control",
60
- QUANTITY_SIZE = "items-block-quantity-size-control",
61
- QUANTITY_STYLE = "items-block-quantity-style-control"
62
- }
@@ -1,163 +0,0 @@
1
- export declare const templateFirstLine = "<td align=\"center\" class=\"ins-product-td items-block items-block-v2\">";
2
- export declare const configAttributes: {
3
- TYPE: string;
4
- ITEMS_INDEX_SELECT_CONTROL_VALUE: string;
5
- ORIENTATION: string;
6
- PRODUCT_NAME_TRIMMING: string;
7
- PRODUCT_PRICE_HIDE_DISCOUNT: string;
8
- PRODUCT_PRICE_FORMATTED: string;
9
- PRODUCT_PRICE_CURRENCY_SYMBOL: string;
10
- PRODUCT_PRICE_CURRENCY_LOCATION: string;
11
- PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION: string;
12
- PRODUCT_BUTTON_LINK: string;
13
- PRODUCT_IMAGE_LINK: string;
14
- PRODUCT_NAME_CONTROL_VALUE: string;
15
- PRODUCT_QUANTITY_CONTROL_VALUE: string;
16
- PRODUCT_PRICE_CONTROL_VALUE: string;
17
- BLOCK_INSTANCE_ID: string;
18
- NAME_CONTROL_ENABLED: string;
19
- QUANTITY_CONTROL_ENABLED: string;
20
- PRICE_CONTROL_OPENED: string;
21
- PRODUCT_IMAGE_VISIBLE: string;
22
- PRODUCT_NAME_VISIBLE: string;
23
- PRODUCT_QUANTITY_VISIBLE: string;
24
- PRODUCT_PRICE_VISIBLE: string;
25
- PRODUCT_ORIGINAL_PRICE_VISIBLE: string;
26
- PRODUCT_BUTTON_VISIBLE: string;
27
- };
28
- export declare const productPairs: {
29
- PAIRS_FOR_EXTENSION: {
30
- imageSrc: {
31
- CART_ITEMS: {
32
- ATTR: string;
33
- DEFAULT: string[];
34
- };
35
- BROWSED_ITEMS: {
36
- ATTR: string;
37
- DEFAULT: string[];
38
- };
39
- PURCHASED_ITEMS: {
40
- ATTR: string;
41
- DEFAULT: string[];
42
- };
43
- };
44
- name: {
45
- CART_ITEMS: {
46
- ATTR: string;
47
- DEFAULT: string[];
48
- HREF: string;
49
- DEFAULT_HREF: string;
50
- };
51
- BROWSED_ITEMS: {
52
- ATTR: string;
53
- DEFAULT: string[];
54
- HREF: string;
55
- DEFAULT_HREF: string;
56
- };
57
- PURCHASED_ITEMS: {
58
- ATTR: string;
59
- DEFAULT: string[];
60
- HREF: string;
61
- DEFAULT_HREF: string;
62
- };
63
- };
64
- quantity: {
65
- CART_ITEMS: {
66
- ATTR: string;
67
- DEFAULT: string;
68
- };
69
- BROWSED_ITEMS: {
70
- ATTR: string;
71
- DEFAULT: string;
72
- };
73
- PURCHASED_ITEMS: {
74
- ATTR: string;
75
- DEFAULT: string;
76
- };
77
- };
78
- price: {
79
- CART_ITEMS: {
80
- PRICE: string;
81
- PRICE_FORMATTED: string;
82
- CURRENCY: string;
83
- DEFAULT_PRICE: string;
84
- DEFAULT_PRICE_FORMATTED: string;
85
- DEFAULT_CURRENCY: string;
86
- };
87
- BROWSED_ITEMS: {
88
- PRICE: string;
89
- PRICE_FORMATTED: string;
90
- CURRENCY: string;
91
- DEFAULT_PRICE: string;
92
- DEFAULT_PRICE_FORMATTED: string;
93
- DEFAULT_CURRENCY: string;
94
- };
95
- PURCHASED_ITEMS: {
96
- PRICE: string;
97
- PRICE_FORMATTED: string;
98
- CURRENCY: string;
99
- DEFAULT_PRICE: string;
100
- DEFAULT_PRICE_FORMATTED: string;
101
- DEFAULT_CURRENCY: string;
102
- };
103
- };
104
- originalPrice: {
105
- CART_ITEMS: {
106
- PRICE: string;
107
- PRICE_FORMATTED: string;
108
- CURRENCY: string;
109
- DEFAULT_PRICE: string;
110
- DEFAULT_PRICE_FORMATTED: string;
111
- DEFAULT_CURRENCY: string;
112
- };
113
- BROWSED_ITEMS: {
114
- PRICE: string;
115
- PRICE_FORMATTED: string;
116
- CURRENCY: string;
117
- DEFAULT_PRICE: string;
118
- DEFAULT_PRICE_FORMATTED: string;
119
- DEFAULT_CURRENCY: string;
120
- };
121
- PURCHASED_ITEMS: {
122
- PRICE: string;
123
- PRICE_FORMATTED: string;
124
- CURRENCY: string;
125
- DEFAULT_PRICE: string;
126
- DEFAULT_PRICE_FORMATTED: string;
127
- DEFAULT_CURRENCY: string;
128
- };
129
- };
130
- button: {
131
- CART_ITEMS: {
132
- HREF: string;
133
- DEFAULT_HREF: string;
134
- DEFAULT_LABEL: string;
135
- };
136
- BROWSED_ITEMS: {
137
- HREF: string;
138
- DEFAULT_HREF: string;
139
- DEFAULT_LABEL: string;
140
- };
141
- PURCHASED_ITEMS: {
142
- HREF: string;
143
- DEFAULT_HREF: string;
144
- DEFAULT_LABEL: string;
145
- };
146
- };
147
- itemLink: {
148
- CART_ITEMS: {
149
- HREF: string;
150
- DEFAULT_HREF: string;
151
- };
152
- BROWSED_ITEMS: {
153
- HREF: string;
154
- DEFAULT_HREF: string;
155
- };
156
- PURCHASED_ITEMS: {
157
- HREF: string;
158
- DEFAULT_HREF: string;
159
- };
160
- };
161
- };
162
- };
163
- export declare const itemsBlockDynamicVariables: string[];
@@ -1,50 +0,0 @@
1
- export declare const SETTINGS_ENUMS: {
2
- ITEMS_TYPE: {
3
- CART_ITEMS: string;
4
- BROWSED_ITEMS: string;
5
- PURCHASED_ITEMS: string;
6
- };
7
- ORIENTATION: {
8
- VERTICAL: string;
9
- HORIZONTAL: string;
10
- };
11
- };
12
- export declare const ItemTypeOptions: {
13
- text: string;
14
- value: string;
15
- }[];
16
- export declare const OrientationOptions: {
17
- icon: string;
18
- value: string;
19
- }[];
20
- export declare const DefaultConfigValues: {
21
- itemsType: string;
22
- isDataInitialized: string;
23
- cartItemsSelectControlValue: string;
24
- cardOrientationControlValue: string;
25
- productNameTrimmingControlValue: string;
26
- productPriceHideDiscountControlValue: string;
27
- productPriceFormattedControlValue: string;
28
- productPriceCurrencySymbolControlValue: string;
29
- productPriceCurrencyLocationControlValue: string;
30
- productButtonLinkControlValue: string;
31
- productImageLinkControlValue: string;
32
- productNameControlEnabled: string;
33
- productQuantityControlOpened: string;
34
- productNameControlTrim: string;
35
- productQuantityControlEnabled: string;
36
- productPriceControlOpened: string;
37
- productImageVisible: string;
38
- productNameVisible: string;
39
- productQuantityVisible: string;
40
- productPriceVisible: string;
41
- productOriginalPriceVisible: string;
42
- productButtonVisible: string;
43
- productImageWidth: string;
44
- };
45
- export declare const ItemInCartOptions: {
46
- [x: string]: {
47
- text: string;
48
- value: string;
49
- }[];
50
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("@stripoinc/ui-editor-extensions").Extension;
2
- export default _default;
@@ -1,4 +0,0 @@
1
- import { IconsRegistry } from '@stripoinc/ui-editor-extensions';
2
- export declare class ItemsIconsRegistry extends IconsRegistry {
3
- registerIconsSvg(iconsMap: Record<string, string>): void;
4
- }
@@ -1,4 +0,0 @@
1
- import { SettingsPanelRegistry, SettingsPanelTab } from '@stripoinc/ui-editor-extensions';
2
- export declare class SettingsPanel extends SettingsPanelRegistry {
3
- registerBlockControls(blockControlsMap: Record<string, SettingsPanelTab[]>): void;
4
- }
@@ -1,43 +0,0 @@
1
- import type { OrientationType, ProductType } from '@@/Types/extensions/items';
2
- interface ItemsBlockState {
3
- itemsType: ProductType;
4
- itemIds: string;
5
- imageLink: string;
6
- buttonLink: string;
7
- orientation: OrientationType;
8
- nameTrimming: boolean;
9
- hideDiscount: boolean;
10
- currencySymbol: string;
11
- currencyLocation: string;
12
- formattedPrice: boolean;
13
- priceOrientation: 'vertical' | 'horizontal';
14
- templateData: {
15
- imageSrc: string;
16
- name: string;
17
- price: string;
18
- originalPrice: string;
19
- quantity: string;
20
- button: string;
21
- };
22
- }
23
- export declare const useItemsBlockStore: import("pinia").StoreDefinition<"guidoItemsBlock", ItemsBlockState, {}, {
24
- setItemsType(itemsType: ProductType): void;
25
- setItemIds(itemIds: string): void;
26
- setImageLink(imageLink: string): void;
27
- setButtonLink(buttonLink: string): void;
28
- setOrientation(orientation: OrientationType): void;
29
- setNameTrimming(nameTrimming: boolean): void;
30
- setHideDiscount(hideDiscount: boolean): void;
31
- setCurrencySymbol(currencySymbol: string): void;
32
- setCurrencyLocation(currencyLocation: string): void;
33
- setFormattedPrice(formattedPrice: boolean): void;
34
- setPriceOrientation(priceOrientation: "vertical" | "horizontal"): void;
35
- setTemplateData(templateData: ItemsBlockState["templateData"]): void;
36
- updateFromAttributes(attributes: {
37
- itemsType?: string;
38
- itemIds?: string;
39
- orientation?: string;
40
- }): void;
41
- reset(): void;
42
- }>;
43
- export {};
@@ -1,24 +0,0 @@
1
- declare const migrationTemplate = "ADD YOUR MIGRATION HERE";
2
- type ProductType = 'CART_ITEMS' | 'BROWSED_ITEMS' | 'PURCHASED_ITEMS';
3
- type OrientationType = 'vertical' | 'horizontal';
4
- type TemplateParameters = {
5
- orientation: OrientationType;
6
- itemsType: ProductType;
7
- itemId: string;
8
- currencySymbol?: string;
9
- currencyLocation?: string;
10
- formattedPrice?: boolean;
11
- };
12
- /**
13
- * Generates the default template for the Items Block.
14
- * @param params - Template parameters including orientation, items type, item ID, and formatting options
15
- * @param params.orientation - Layout orientation ('vertical' or 'horizontal')
16
- * @param params.itemsType - Product data source type ('CART_ITEMS', 'BROWSED_ITEMS', or 'PURCHASED_ITEMS')
17
- * @param params.itemId - The merge tag for the item (e.g., '{{Abandoned Cart Item (1) Url}}')
18
- * @param params.currencySymbol - Currency symbol to display (e.g., 'USD')
19
- * @param params.currencyLocation - Currency position ('0' for before, '1' for after)
20
- * @param params.formattedPrice - Whether to use formatted price display
21
- * @returns HTML template string for the Items Block
22
- */
23
- export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, formattedPrice, }: TemplateParameters): string;
24
- export default migrationTemplate;
@@ -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;