@useinsider/guido 1.0.3-beta.dfb1fcf → 1.0.3-beta.e0403cf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +73 -79
- package/dist/components/organisms/header/RightSlot.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +22 -23
- package/dist/composables/useGuidoActions.js +9 -19
- package/dist/composables/useStripo.js +38 -44
- package/dist/config/compiler/unsubscribeCompilerRules.js +28 -33
- package/dist/enums/defaults.js +1 -2
- package/dist/enums/unsubscribe.js +25 -27
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +68 -158
- package/dist/extensions/Blocks/Recommendation/constants.js +1 -10
- package/dist/extensions/Blocks/Recommendation/control.js +59 -74
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -16
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +71 -124
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +65 -89
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +19 -56
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +45 -74
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +33 -128
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +70 -75
- package/dist/src/@types/generic.d.ts +6 -27
- package/dist/src/components/Guido.vue.d.ts +2 -3
- package/dist/src/composables/useGuidoActions.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +3 -54
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +1 -41
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +2 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +7 -15
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -52
- package/dist/src/stores/config.d.ts +2 -3
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/src/stores/editor.d.ts +1 -1
- package/dist/src/stores/onboarding.d.ts +1 -1
- package/dist/src/stores/preview.d.ts +1 -1
- package/dist/src/stores/recommendation.d.ts +1 -1
- package/dist/src/stores/save-as-template.d.ts +1 -1
- package/dist/src/stores/toaster.d.ts +1 -1
- package/dist/src/stores/unsubscribe.d.ts +1 -1
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/genericUtil.d.ts +0 -1
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -14
- package/dist/stores/config.js +5 -5
- package/dist/stores/dynamic-content.js +2 -2
- package/dist/stores/editor.js +1 -1
- package/dist/stores/onboarding.js +27 -27
- package/dist/stores/preview.js +1 -1
- package/dist/stores/recommendation.js +3 -3
- package/dist/stores/save-as-template.js +2 -2
- package/dist/stores/toaster.js +1 -1
- package/dist/stores/unsubscribe.js +1 -1
- package/dist/stores/version-history.js +4 -4
- package/dist/utils/genericUtil.js +9 -20
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -272
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/priceHideControl.js +0 -60
- package/dist/extensions/Blocks/Recommendation/controls/priceInlineLayoutControl.js +0 -160
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/extensions/Blocks/controlFactories.js +0 -234
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -71
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/priceHideControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/priceInlineLayoutControl.d.ts +0 -50
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +0 -60
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
- package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -95
- package/dist/src/utils/environmentUtil.d.ts +0 -5
- package/dist/utils/environmentUtil.js +0 -4
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
function a(n) {
|
|
2
|
-
return "getInnerHTML" in n && typeof n.getInnerHTML == "function" ? n.getInnerHTML() : "innerHTML" in n ? n.innerHTML : "";
|
|
3
|
-
}
|
|
4
|
-
function H(n, t) {
|
|
5
|
-
if (!n)
|
|
6
|
-
return t;
|
|
7
|
-
const r = a(n);
|
|
8
|
-
if (!r || r.trim() === "" || !/<(strong|em|u|s|b|i)\b/i.test(r))
|
|
9
|
-
return t;
|
|
10
|
-
const i = [], s = [];
|
|
11
|
-
let o = r.trim();
|
|
12
|
-
for (; ; ) {
|
|
13
|
-
const u = o.match(/^<(strong|em|u|s|b|i)(\s[^>]*)?>(.*)$/is);
|
|
14
|
-
if (!u)
|
|
15
|
-
break;
|
|
16
|
-
const [, e, f = "", g] = u, c = new RegExp(`</${e}>$`, "i");
|
|
17
|
-
if (!c.test(g))
|
|
18
|
-
break;
|
|
19
|
-
i.push(`<${e}${f}>`), s.unshift(`</${e}>`), o = g.replace(c, "").trim();
|
|
20
|
-
}
|
|
21
|
-
return i.length > 0 ? i.join("") + t + s.join("") : t;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
H as preserveTextStyles
|
|
25
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { ButtonAlignBuiltInControl as r, ButtonBorderBuiltInControl as l, ButtonBorderRadiusBuiltInControl as s, ButtonColorBuiltInControl as c, ButtonFitToContainerBuiltInControl as u, ButtonFontFamilyBuiltInControl as i, ButtonMarginsBuiltInControl as d, ButtonPaddingsBuiltInControl as a, ButtonTextBuiltInControl as g, ButtonTextSizeBuiltInControl as x, ButtonTextStyleAndFontColorBuiltInControl as C, ImageMarginsBuiltInControl as B, ImageSizeBuiltInControl as I, TextAlignBuiltInControl as T, ButtonBackgroundColorBuiltInControl as m, TextColorBuiltInControl as S, TextFontFamilyBuiltInControl as y, TextLineSpacingBuiltInControl as A, TextPaddingsBuiltInControl as k, TextSizeBuiltInControl as f, TextStyleBuiltInControl as b } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
-
function N(e, t, n) {
|
|
3
|
-
return class extends T {
|
|
4
|
-
getId() {
|
|
5
|
-
return e;
|
|
6
|
-
}
|
|
7
|
-
getTargetNodes(o) {
|
|
8
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function $(e, t, n = ".ins-recommendation-product-container") {
|
|
13
|
-
return class extends S {
|
|
14
|
-
getId() {
|
|
15
|
-
return e;
|
|
16
|
-
}
|
|
17
|
-
getTargetNodes(o) {
|
|
18
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function p(e, t, n = ".ins-recommendation-product-container") {
|
|
23
|
-
return class extends f {
|
|
24
|
-
getId() {
|
|
25
|
-
return e;
|
|
26
|
-
}
|
|
27
|
-
getTargetNodes(o) {
|
|
28
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function F(e, t, n = ".ins-recommendation-product-container") {
|
|
33
|
-
return class extends b {
|
|
34
|
-
getId() {
|
|
35
|
-
return e;
|
|
36
|
-
}
|
|
37
|
-
getTargetNodes(o) {
|
|
38
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function z(e, t, n = ".ins-recommendation-product-container") {
|
|
43
|
-
return class extends y {
|
|
44
|
-
getId() {
|
|
45
|
-
return e;
|
|
46
|
-
}
|
|
47
|
-
getTargetNodes(o) {
|
|
48
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function M(e, t, n = ".ins-recommendation-product-container") {
|
|
53
|
-
return class extends m {
|
|
54
|
-
getId() {
|
|
55
|
-
return e;
|
|
56
|
-
}
|
|
57
|
-
getTargetNodes(o) {
|
|
58
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function P(e, t, n = ".ins-recommendation-product-container") {
|
|
63
|
-
return class extends k {
|
|
64
|
-
getId() {
|
|
65
|
-
return e;
|
|
66
|
-
}
|
|
67
|
-
getTargetNodes(o) {
|
|
68
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function L(e, t, n = ".ins-recommendation-product-container") {
|
|
73
|
-
return class extends A {
|
|
74
|
-
getId() {
|
|
75
|
-
return e;
|
|
76
|
-
}
|
|
77
|
-
getTargetNodes(o) {
|
|
78
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
function R(e, t, n = ".ins-recommendation-product-container") {
|
|
83
|
-
return class extends r {
|
|
84
|
-
getId() {
|
|
85
|
-
return e;
|
|
86
|
-
}
|
|
87
|
-
getTargetNodes(o) {
|
|
88
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function h(e, t, n = ".ins-recommendation-product-container") {
|
|
93
|
-
return class extends c {
|
|
94
|
-
getId() {
|
|
95
|
-
return e;
|
|
96
|
-
}
|
|
97
|
-
getTargetNodes(o) {
|
|
98
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function j(e, t, n = ".ins-recommendation-product-container") {
|
|
103
|
-
return class extends l {
|
|
104
|
-
getId() {
|
|
105
|
-
return e;
|
|
106
|
-
}
|
|
107
|
-
getTargetNodes(o) {
|
|
108
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
function v(e, t, n = ".ins-recommendation-product-container") {
|
|
113
|
-
return class extends s {
|
|
114
|
-
getId() {
|
|
115
|
-
return e;
|
|
116
|
-
}
|
|
117
|
-
getTargetNodes(o) {
|
|
118
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function w(e, t, n = ".ins-recommendation-product-container") {
|
|
123
|
-
return class extends i {
|
|
124
|
-
getId() {
|
|
125
|
-
return e;
|
|
126
|
-
}
|
|
127
|
-
getTargetNodes(o) {
|
|
128
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
function D(e, t, n = ".ins-recommendation-product-container") {
|
|
133
|
-
return class extends d {
|
|
134
|
-
getId() {
|
|
135
|
-
return e;
|
|
136
|
-
}
|
|
137
|
-
getTargetNodes(o) {
|
|
138
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function E(e, t, n = ".ins-recommendation-product-container") {
|
|
143
|
-
return class extends a {
|
|
144
|
-
getId() {
|
|
145
|
-
return e;
|
|
146
|
-
}
|
|
147
|
-
getTargetNodes(o) {
|
|
148
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function G(e, t, n = ".ins-recommendation-product-container") {
|
|
153
|
-
return class extends g {
|
|
154
|
-
getId() {
|
|
155
|
-
return e;
|
|
156
|
-
}
|
|
157
|
-
getTargetNodes(o) {
|
|
158
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
function H(e, t, n = ".ins-recommendation-product-container") {
|
|
163
|
-
return class extends x {
|
|
164
|
-
getId() {
|
|
165
|
-
return e;
|
|
166
|
-
}
|
|
167
|
-
getTargetNodes(o) {
|
|
168
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
function J(e, t, n) {
|
|
173
|
-
return class extends C {
|
|
174
|
-
getId() {
|
|
175
|
-
return e;
|
|
176
|
-
}
|
|
177
|
-
getTargetNodes(o) {
|
|
178
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
function K(e, t, n) {
|
|
183
|
-
return class extends u {
|
|
184
|
-
getId() {
|
|
185
|
-
return e;
|
|
186
|
-
}
|
|
187
|
-
getTargetNodes(o) {
|
|
188
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function O(e, t, n) {
|
|
193
|
-
return class extends I {
|
|
194
|
-
getId() {
|
|
195
|
-
return e;
|
|
196
|
-
}
|
|
197
|
-
getTargetNodes(o) {
|
|
198
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
function Q(e, t, n) {
|
|
203
|
-
return class extends B {
|
|
204
|
-
getId() {
|
|
205
|
-
return e;
|
|
206
|
-
}
|
|
207
|
-
getTargetNodes(o) {
|
|
208
|
-
return o.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
export {
|
|
213
|
-
R as createButtonAlignControl,
|
|
214
|
-
j as createButtonBorderControl,
|
|
215
|
-
v as createButtonBorderRadiusControl,
|
|
216
|
-
h as createButtonColorControl,
|
|
217
|
-
K as createButtonFitToContainerControl,
|
|
218
|
-
w as createButtonFontFamilyControl,
|
|
219
|
-
D as createButtonMarginsControl,
|
|
220
|
-
E as createButtonPaddingsControl,
|
|
221
|
-
G as createButtonTextControl,
|
|
222
|
-
H as createButtonTextSizeControl,
|
|
223
|
-
J as createButtonTextStyleAndFontColorControl,
|
|
224
|
-
Q as createImageMarginsControl,
|
|
225
|
-
O as createImageSizeControl,
|
|
226
|
-
P as createPaddingsControl,
|
|
227
|
-
N as createTextAlignControl,
|
|
228
|
-
M as createTextBackgroundColorControl,
|
|
229
|
-
$ as createTextColorControl,
|
|
230
|
-
z as createTextFontFamilyControl,
|
|
231
|
-
L as createTextLineSpacingControl,
|
|
232
|
-
p as createTextSizeControl,
|
|
233
|
-
F as createTextStyleControl
|
|
234
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
export declare const CARD_BACKGROUND_COLOR_CONTROL_ID = "recommendation-card-background-color-control";
|
|
4
|
-
/**
|
|
5
|
-
* Control for managing recommendation card background color
|
|
6
|
-
* This control is displayed in the Styles tab
|
|
7
|
-
*/
|
|
8
|
-
export declare class CardBackgroundColorControl extends CommonControl {
|
|
9
|
-
getId(): string;
|
|
10
|
-
getTemplate(): string;
|
|
11
|
-
onRender(): void;
|
|
12
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
13
|
-
_setFormValues(): void;
|
|
14
|
-
/**
|
|
15
|
-
* Reads the current background color from the first product card wrapper
|
|
16
|
-
* @returns The background color value or 'transparent' if not found
|
|
17
|
-
*/
|
|
18
|
-
_getCurrentCardBackgroundColor(): string;
|
|
19
|
-
/**
|
|
20
|
-
* Handles card background color changes
|
|
21
|
-
* Applies the color to all product card wrapper elements
|
|
22
|
-
*/
|
|
23
|
-
_onCardBackgroundColorChange(color: string): void;
|
|
24
|
-
_listenToFormUpdates(): void;
|
|
25
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recommendation Block Control Instances
|
|
3
|
-
*
|
|
4
|
-
* This file generates all control instances for the Recommendation Block
|
|
5
|
-
* using the reusable factory functions from ./factories.ts
|
|
6
|
-
*
|
|
7
|
-
* Note: Factory-generated controls use runtime class generation which TypeScript
|
|
8
|
-
* cannot fully type-check. The controls are type-safe at runtime.
|
|
9
|
-
*/
|
|
10
|
-
export declare const NameAlignControl: any;
|
|
11
|
-
export declare const NameColorControl: any;
|
|
12
|
-
export declare const NameSizeControl: any;
|
|
13
|
-
export declare const NameStyleControl: any;
|
|
14
|
-
export declare const NameFontFamilyControl: any;
|
|
15
|
-
export declare const NameBackgroundControl: any;
|
|
16
|
-
export declare const NamePaddingsControl: any;
|
|
17
|
-
export declare const NameLineSpacingControl: any;
|
|
18
|
-
export { NameTextTrimControl } from './nameTextTrimControl';
|
|
19
|
-
export declare const PriceAlignControl: any;
|
|
20
|
-
export declare const PriceColorControl: any;
|
|
21
|
-
export declare const PriceSizeControl: any;
|
|
22
|
-
export declare const PriceStyleControl: any;
|
|
23
|
-
export declare const PriceFontFamilyControl: any;
|
|
24
|
-
export declare const PriceBackgroundControl: any;
|
|
25
|
-
export declare const PricePaddingsControl: any;
|
|
26
|
-
export declare const PriceLineSpacingControl: any;
|
|
27
|
-
export { PriceHideControl } from './priceHideControl';
|
|
28
|
-
export declare const OldPriceAlignControl: any;
|
|
29
|
-
export declare const OldPriceColorControl: any;
|
|
30
|
-
export declare const OldPriceSizeControl: any;
|
|
31
|
-
export declare const OldPriceStyleControl: any;
|
|
32
|
-
export declare const OldPriceFontFamilyControl: any;
|
|
33
|
-
export declare const OldPriceBackgroundControl: any;
|
|
34
|
-
export declare const OldPricePaddingsControl: any;
|
|
35
|
-
export declare const OldPriceLineSpacingControl: any;
|
|
36
|
-
export declare const OmnibusPriceAlignControl: any;
|
|
37
|
-
export declare const OmnibusPriceColorControl: any;
|
|
38
|
-
export declare const OmnibusPriceSizeControl: any;
|
|
39
|
-
export declare const OmnibusPriceStyleControl: any;
|
|
40
|
-
export declare const OmnibusPriceFontFamilyControl: any;
|
|
41
|
-
export declare const OmnibusPriceBackgroundControl: any;
|
|
42
|
-
export declare const OmnibusPricePaddingsControl: any;
|
|
43
|
-
export declare const OmnibusPriceLineSpacingControl: any;
|
|
44
|
-
export { OmnibusPriceTextBeforeControl } from './omnibusPriceTextBeforeControl';
|
|
45
|
-
export { OmnibusPriceTextAfterControl } from './omnibusPriceTextAfterControl';
|
|
46
|
-
export declare const OmnibusDiscountAlignControl: any;
|
|
47
|
-
export declare const OmnibusDiscountColorControl: any;
|
|
48
|
-
export declare const OmnibusDiscountSizeControl: any;
|
|
49
|
-
export declare const OmnibusDiscountStyleControl: any;
|
|
50
|
-
export declare const OmnibusDiscountFontFamilyControl: any;
|
|
51
|
-
export declare const OmnibusDiscountBackgroundControl: any;
|
|
52
|
-
export declare const OmnibusDiscountPaddingsControl: any;
|
|
53
|
-
export declare const OmnibusDiscountLineSpacingControl: any;
|
|
54
|
-
export { OmnibusDiscountTextBeforeControl } from './omnibusDiscountTextBeforeControl';
|
|
55
|
-
export { OmnibusDiscountTextAfterControl } from './omnibusDiscountTextAfterControl';
|
|
56
|
-
export declare const ButtonAlignControl: any;
|
|
57
|
-
export declare const ButtonBorderControl: any;
|
|
58
|
-
export declare const ButtonBorderRadiusControl: any;
|
|
59
|
-
export declare const ButtonColorControl: any;
|
|
60
|
-
export declare const ButtonFontFamilyControl: any;
|
|
61
|
-
export declare const ButtonMarginsControl: any;
|
|
62
|
-
export declare const ButtonPaddingsControl: any;
|
|
63
|
-
export declare const ButtonTextControl: any;
|
|
64
|
-
export declare const ButtonTextSizeControl: any;
|
|
65
|
-
export declare const ButtonTextStyleAndFontColorControl: any;
|
|
66
|
-
export declare const ButtonFitToContentControl: any;
|
|
67
|
-
export declare const ImageSizeControl: any;
|
|
68
|
-
export declare const ImageMarginsControl: any;
|
|
69
|
-
export { CardBackgroundColorControl } from './cardBackgroundColorControl';
|
|
70
|
-
export { SpacingControl } from './spacingControl';
|
|
71
|
-
export { PriceInlineLayoutControl } from './priceInlineLayoutControl';
|
|
@@ -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
|
-
}
|
package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
/**
|
|
4
|
-
* Control for setting text after Omnibus Discount value
|
|
5
|
-
*/
|
|
6
|
-
export declare class OmnibusDiscountTextAfterControl extends CommonControl {
|
|
7
|
-
getId(): string;
|
|
8
|
-
getTemplate(): string;
|
|
9
|
-
onRender(): void;
|
|
10
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
-
_setFormValues(): void;
|
|
12
|
-
_getCurrentText(): string;
|
|
13
|
-
_onTextChange(newText: string): void;
|
|
14
|
-
_listenToFormUpdates(): void;
|
|
15
|
-
}
|
package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
/**
|
|
4
|
-
* Control for setting text before Omnibus Discount value
|
|
5
|
-
*/
|
|
6
|
-
export declare class OmnibusDiscountTextBeforeControl extends CommonControl {
|
|
7
|
-
getId(): string;
|
|
8
|
-
getTemplate(): string;
|
|
9
|
-
onRender(): void;
|
|
10
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
-
_setFormValues(): void;
|
|
12
|
-
_getCurrentText(): string;
|
|
13
|
-
_onTextChange(newText: string): void;
|
|
14
|
-
_listenToFormUpdates(): void;
|
|
15
|
-
}
|
package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
/**
|
|
4
|
-
* Control for setting text after Omnibus Price value
|
|
5
|
-
*/
|
|
6
|
-
export declare class OmnibusPriceTextAfterControl extends CommonControl {
|
|
7
|
-
getId(): string;
|
|
8
|
-
getTemplate(): string;
|
|
9
|
-
onRender(): void;
|
|
10
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
-
_setFormValues(): void;
|
|
12
|
-
_getCurrentText(): string;
|
|
13
|
-
_onTextChange(newText: string): void;
|
|
14
|
-
_listenToFormUpdates(): void;
|
|
15
|
-
}
|
package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
/**
|
|
4
|
-
* Control for setting text before Omnibus Price value
|
|
5
|
-
*/
|
|
6
|
-
export declare class OmnibusPriceTextBeforeControl extends CommonControl {
|
|
7
|
-
getId(): string;
|
|
8
|
-
getTemplate(): string;
|
|
9
|
-
onRender(): void;
|
|
10
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
-
_setFormValues(): void;
|
|
12
|
-
_getCurrentText(): string;
|
|
13
|
-
_onTextChange(newText: string): void;
|
|
14
|
-
_listenToFormUpdates(): void;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
/**
|
|
4
|
-
* Control for hiding the price when it's the same as the discounted price
|
|
5
|
-
* When enabled, adds an attribute hide-price="true" to the recommendation block container
|
|
6
|
-
*/
|
|
7
|
-
export declare class PriceHideControl extends CommonControl {
|
|
8
|
-
getId(): string;
|
|
9
|
-
getTemplate(): string;
|
|
10
|
-
onRender(): void;
|
|
11
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
12
|
-
_setFormValues(): void;
|
|
13
|
-
_getCurrentHideState(): boolean;
|
|
14
|
-
_onHidePriceChange(enabled: boolean): void;
|
|
15
|
-
_listenToFormUpdates(): void;
|
|
16
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
import { RecommendationControlId } from '../constants';
|
|
4
|
-
export declare const PRICE_INLINE_LAYOUT_CONTROL_ID = RecommendationControlId.PRICE_INLINE_LAYOUT;
|
|
5
|
-
/**
|
|
6
|
-
* Price Inline Layout Control
|
|
7
|
-
*
|
|
8
|
-
* Provides a toggle to switch between inline and separate row layouts for Price and Old Price.
|
|
9
|
-
* - Toggle OFF (default): Price and Old Price in separate rows
|
|
10
|
-
* - Toggle ON: Price and Old Price side by side in the same row (inline)
|
|
11
|
-
*
|
|
12
|
-
* Uses DOM manipulation (not regeneration) to restructure the existing elements,
|
|
13
|
-
* preserving all styles and content.
|
|
14
|
-
*/
|
|
15
|
-
export declare class PriceInlineLayoutControl extends CommonControl {
|
|
16
|
-
getId(): string;
|
|
17
|
-
getTemplate(): string;
|
|
18
|
-
onRender(): void;
|
|
19
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
20
|
-
/**
|
|
21
|
-
* Reads the current price inline state from the block's data attribute
|
|
22
|
-
* and updates the toggle UI
|
|
23
|
-
* Note: Toggle ON = separate rows (next line), Toggle OFF = inline (same row)
|
|
24
|
-
*/
|
|
25
|
-
private _initializePriceInlineState;
|
|
26
|
-
/**
|
|
27
|
-
* Reads the price inline state from the block wrapper's data attribute
|
|
28
|
-
*/
|
|
29
|
-
private _readPriceInlineState;
|
|
30
|
-
/**
|
|
31
|
-
* Registers listener for toggle changes
|
|
32
|
-
*/
|
|
33
|
-
private _registerValueChangeListener;
|
|
34
|
-
/**
|
|
35
|
-
* Applies the price inline layout by restructuring the DOM
|
|
36
|
-
* When enabling inline: Merges Old Price content into Price row (side by side)
|
|
37
|
-
* When disabling inline: Separates them back into individual rows
|
|
38
|
-
*/
|
|
39
|
-
private _applyPriceInlineLayout;
|
|
40
|
-
/**
|
|
41
|
-
* Merges Old Price content into the same row as Price (inline layout)
|
|
42
|
-
* Creates a structure where both prices are side by side in one row
|
|
43
|
-
*/
|
|
44
|
-
private _mergeOldPriceIntoPrice;
|
|
45
|
-
/**
|
|
46
|
-
* Separates Old Price from Price row back into individual rows
|
|
47
|
-
* Restores the original separate row structure
|
|
48
|
-
*/
|
|
49
|
-
private _separateOldPriceFromPrice;
|
|
50
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
import { CommonControl } from '../../common-control';
|
|
3
|
-
export declare const SPACING_CONTROL_ID = "recommendation-spacing-control";
|
|
4
|
-
/**
|
|
5
|
-
* Control for managing spacing between product cards
|
|
6
|
-
* - Column spacing: horizontal gap between cards in the same row
|
|
7
|
-
* - Row spacing: vertical gap between different rows
|
|
8
|
-
*/
|
|
9
|
-
export declare class SpacingControl extends CommonControl {
|
|
10
|
-
getId(): string;
|
|
11
|
-
getTemplate(): string;
|
|
12
|
-
onRender(): void;
|
|
13
|
-
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
14
|
-
/**
|
|
15
|
-
* Reads spacing values from data attributes or returns defaults
|
|
16
|
-
*/
|
|
17
|
-
_setFormValues(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Gets stored column spacing from the first product card wrapper's parent element's padding
|
|
20
|
-
* Reads the actual padding value instead of relying on data attributes
|
|
21
|
-
*
|
|
22
|
-
* The padding is applied as "0 {halfSpacing}px" on the parent TD element,
|
|
23
|
-
* so we need to extract the horizontal padding value and multiply by 2 to get total spacing.
|
|
24
|
-
*/
|
|
25
|
-
_getStoredColumnSpacing(): number;
|
|
26
|
-
/**
|
|
27
|
-
* Gets stored row spacing from the first spacer element's height style
|
|
28
|
-
* Reads the actual height value instead of relying on data attributes
|
|
29
|
-
*/
|
|
30
|
-
_getStoredRowSpacing(): number;
|
|
31
|
-
/**
|
|
32
|
-
* Handles column spacing changes
|
|
33
|
-
* Applies horizontal padding to all product card wrappers
|
|
34
|
-
*/
|
|
35
|
-
_onColumnSpacingChange(spacing: number): void;
|
|
36
|
-
/**
|
|
37
|
-
* Handles row spacing changes
|
|
38
|
-
* Applies height to all spacer elements between product rows
|
|
39
|
-
*/
|
|
40
|
-
_onRowSpacingChange(spacing: number): void;
|
|
41
|
-
/**
|
|
42
|
-
* Stores column spacing value in block data attribute
|
|
43
|
-
*/
|
|
44
|
-
_storeColumnSpacing(spacing: number): void;
|
|
45
|
-
/**
|
|
46
|
-
* Stores row spacing value in block data attribute
|
|
47
|
-
*/
|
|
48
|
-
_storeRowSpacing(spacing: number): void;
|
|
49
|
-
_listenToFormUpdates(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Debounced version of _onColumnSpacingChange
|
|
52
|
-
* Prevents excessive DOM updates when user rapidly adjusts the counter
|
|
53
|
-
*/
|
|
54
|
-
_debouncedOnColumnSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
|
|
55
|
-
/**
|
|
56
|
-
* Debounced version of _onRowSpacingChange
|
|
57
|
-
* Prevents excessive DOM updates when user rapidly adjusts the counter
|
|
58
|
-
*/
|
|
59
|
-
_debouncedOnRowSpacingChange: import("@vueuse/shared").PromisifyFn<(spacing: number) => void>;
|
|
60
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility for preserving text styling when updating innerHTML
|
|
3
|
-
*/
|
|
4
|
-
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
5
|
-
/**
|
|
6
|
-
* Preserves existing style tags when updating text content
|
|
7
|
-
*
|
|
8
|
-
* When users apply text styles (bold, italic, etc.) in Stripo, the editor wraps
|
|
9
|
-
* content in tags like <strong>, <em>, <u>, <s>. This function extracts those
|
|
10
|
-
* style tags from the original HTML and re-applies them to the new text content.
|
|
11
|
-
* @example
|
|
12
|
-
* // Original: <span class="omnibus-text-before"><strong>Lowest price: </strong></span>
|
|
13
|
-
* // After calling preserveTextStyles(element, 'Best price: ')
|
|
14
|
-
* // Result: <strong>Best price: </strong>
|
|
15
|
-
* @param element - The DOM element or ImmutableHtmlNode containing the styled text
|
|
16
|
-
* @param newText - The new text content to insert
|
|
17
|
-
* @returns The new text wrapped in the original style tags
|
|
18
|
-
*/
|
|
19
|
-
export declare function preserveTextStyles(element: ImmutableHtmlNode | Element, newText: string): string;
|