@useinsider/guido 3.0.0-beta.d02d301 → 3.0.0-beta.e6e5a78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +6 -6
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +2 -2
- package/dist/composables/useToaster.js +12 -10
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +71 -73
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +6 -6
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +17 -16
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +218 -324
- package/dist/package.json.js +1 -1
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +3 -3
- package/dist/stores/toaster.js +6 -6
- package/package.json +3 -3
|
@@ -14,17 +14,17 @@ import P from "./MigrationConfirmModal.vue.js";
|
|
|
14
14
|
const Z = /* @__PURE__ */ E({
|
|
15
15
|
__name: "EditorActions",
|
|
16
16
|
setup(j, { expose: H }) {
|
|
17
|
-
const { config: a } = w(), { exportHtml: m } = C(), { save: p } = O(), { openVersionHistory: l, closeVersionHistory:
|
|
17
|
+
const { config: a } = w(), { exportHtml: m } = C(), { save: p } = O(), { openVersionHistory: l, closeVersionHistory: u } = k(), e = B(), c = R(), { hasMigrations: f } = I(c), r = A(), s = n(!1), i = n(!1), v = n(), S = M(), V = () => {
|
|
18
18
|
if (e.isVersionHistoryOpen) {
|
|
19
|
-
|
|
19
|
+
u();
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
l();
|
|
23
23
|
}, T = async () => {
|
|
24
|
-
|
|
24
|
+
s.value = !0, await m(), s.value = !1;
|
|
25
25
|
}, _ = () => {
|
|
26
26
|
e.isSaveAsTemplateDrawerOpen = !0;
|
|
27
|
-
}, h = g(() => e.isVersionHistoryOpen ?
|
|
27
|
+
}, h = g(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), x = g(
|
|
28
28
|
() => {
|
|
29
29
|
var o, t;
|
|
30
30
|
return ((t = (o = a.value) == null ? void 0 : o.features) == null ? void 0 : t.versionHistory) && !e.isPreviewModeOpen;
|
|
@@ -39,11 +39,11 @@ const Z = /* @__PURE__ */ E({
|
|
|
39
39
|
(t = v.value) == null || t.open();
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
d(o);
|
|
42
|
+
return d(o);
|
|
43
43
|
};
|
|
44
44
|
return H({
|
|
45
45
|
handleSave: y
|
|
46
|
-
}), { __sfc: !0, config: a, exportHtml: m, save: p, openVersionHistory: l, closeVersionHistory:
|
|
46
|
+
}), { __sfc: !0, config: a, exportHtml: m, save: p, openVersionHistory: l, closeVersionHistory: u, editorStore: e, templateStore: c, hasMigrations: f, trans: r, isExporting: s, isSaving: i, migrationModalRef: v, testEmailClick: S, handleVersionHistory: V, handleExport: T, handleSaveAs: _, versionHistoryTooltipText: h, isVersionHistoryButtonVisible: x, executeSave: d, handleSave: y, getTooltipOptions: b, InButtonV2: D, MigrationConfirmModal: P };
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
export {
|
|
@@ -20,7 +20,7 @@ const y = /* @__PURE__ */ u({
|
|
|
20
20
|
}), c = a(() => [
|
|
21
21
|
{
|
|
22
22
|
classes: "guido-text-block-onboarding-settings",
|
|
23
|
-
right: "
|
|
23
|
+
right: "426px",
|
|
24
24
|
top: e.value.settings.top,
|
|
25
25
|
position: e.value.settings.position,
|
|
26
26
|
title: i("email-editor.onboarding-text-block-title"),
|
|
@@ -36,7 +36,7 @@ const y = /* @__PURE__ */ u({
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
classes: "guido-text-block-onboarding-dynamic",
|
|
39
|
-
right: "
|
|
39
|
+
right: "426px",
|
|
40
40
|
top: e.value.dynamic.top,
|
|
41
41
|
position: e.value.dynamic.position,
|
|
42
42
|
title: i("email-editor.onboarding-dynamic-content-title"),
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { ToasterTypeOptions as T } from "../enums/toaster.js";
|
|
2
|
-
import { useToasterStore as
|
|
3
|
-
import { watch as
|
|
4
|
-
const
|
|
5
|
-
const t =
|
|
2
|
+
import { useToasterStore as c } from "../stores/toaster.js";
|
|
3
|
+
import { watch as u, nextTick as l } from "vue";
|
|
4
|
+
const p = () => {
|
|
5
|
+
const t = c();
|
|
6
6
|
let o = null;
|
|
7
7
|
const s = () => {
|
|
8
8
|
o && (clearTimeout(o), o = null);
|
|
9
9
|
};
|
|
10
10
|
function r(e = { message: "" }) {
|
|
11
|
-
s(), t.hideToaster(),
|
|
11
|
+
s(), t.hideToaster(), l(() => {
|
|
12
|
+
t.showToaster(e);
|
|
13
|
+
});
|
|
12
14
|
}
|
|
13
15
|
function i() {
|
|
14
16
|
s(), t.hideToaster();
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function n(e, a) {
|
|
17
19
|
const m = e instanceof Error ? e.message : String(e);
|
|
18
|
-
r({ type: T.Alert, message: `${
|
|
20
|
+
r({ type: T.Alert, message: `${a}: ${m}` });
|
|
19
21
|
}
|
|
20
|
-
return
|
|
22
|
+
return u(
|
|
21
23
|
() => t.shouldAutoHide,
|
|
22
24
|
(e) => {
|
|
23
25
|
s(), e && (o = setTimeout(() => {
|
|
24
26
|
t.hideToaster(), s();
|
|
25
27
|
}, 6e3));
|
|
26
28
|
}
|
|
27
|
-
), { showToaster: r, hideToaster: i, handleError:
|
|
29
|
+
), { showToaster: r, hideToaster: i, handleError: n };
|
|
28
30
|
};
|
|
29
31
|
export {
|
|
30
|
-
|
|
32
|
+
p as useToaster
|
|
31
33
|
};
|
|
@@ -75,8 +75,7 @@ const e = {
|
|
|
75
75
|
"The image with the invalid link cannot be saved to the image gallery": "Enter a valid image link to continue.",
|
|
76
76
|
"The data source link is unavailable. Please, make sure there is an access to the data source.": "Enter an accessible Data Source Link to contiue.",
|
|
77
77
|
"The file should not exceed the maximum resolution of {maxImageResolution}px.": "Upload files up to 1024x512 pixels to continue.",
|
|
78
|
-
"The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor."
|
|
79
|
-
"Dropdown with a list of available data services, preliminarily created in the Data section → Services tab of the Account.": "Service for Data Collection lets you enter a form submission URL for the recipients to submit."
|
|
78
|
+
"The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor."
|
|
80
79
|
};
|
|
81
80
|
export {
|
|
82
81
|
e as default
|
|
@@ -148,7 +148,7 @@ class T extends B {
|
|
|
148
148
|
if (e && e.includes(c))
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
|
-
return "querySelector" in t ? t.querySelector(`.${c}`)
|
|
151
|
+
return "querySelector" in t ? t.querySelector(`.${c}`) : null;
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Migrate configuration from legacy format
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var G = Object.defineProperty;
|
|
2
|
-
var R = (p,
|
|
3
|
-
var
|
|
4
|
-
import { EditorStatePropertyType as y, PreviewDeviceMode as w, ModificationDescription as
|
|
2
|
+
var R = (p, c, t) => c in p ? G(p, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[c] = t;
|
|
3
|
+
var h = (p, c, t) => R(p, typeof c != "symbol" ? c + "" : c, t);
|
|
4
|
+
import { EditorStatePropertyType as y, PreviewDeviceMode as w, ModificationDescription as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
import { CommonControl as V } from "../../../common-control.js";
|
|
6
|
-
import { DESKTOP_CONTAINER_SELECTOR as
|
|
7
|
-
import { SPACING_STEP as
|
|
6
|
+
import { DESKTOP_CONTAINER_SELECTOR as m, MOBILE_CONTAINER_SELECTOR as E } from "../../constants/selectors.js";
|
|
7
|
+
import { SPACING_STEP as S, MAX_SPACING as _, MIN_SPACING as N, DEFAULT_COLUMN_SPACING as C, DEFAULT_ROW_SPACING as P } from "../../constants/layout.js";
|
|
8
8
|
import { RecommendationConfigService as d } from "../../services/configService.js";
|
|
9
9
|
import { useRecommendationExtensionStore as B } from "../../store/recommendation.js";
|
|
10
|
-
import { safeGetStyle as
|
|
11
|
-
import { getCurrentLayout as
|
|
12
|
-
import { useDebounceFn as
|
|
10
|
+
import { safeGetStyle as A, safeGetParent as U } from "../../utils/tagName.js";
|
|
11
|
+
import { getCurrentLayout as b, getBlockElement as x } from "../main/utils.js";
|
|
12
|
+
import { useDebounceFn as f } from "../../../../../node_modules/@vueuse/shared/index.js";
|
|
13
13
|
const W = "recommendation-spacing-control", i = {
|
|
14
14
|
COLUMN_SPACING: "columnSpacing",
|
|
15
15
|
COLUMN_SPACING_LABEL: "columnSpacingLabel",
|
|
@@ -19,46 +19,46 @@ const W = "recommendation-spacing-control", i = {
|
|
|
19
19
|
MOBILE_COLUMN_SPACING_LABEL: "mobileColumnSpacingLabel",
|
|
20
20
|
MOBILE_ROW_SPACING: "mobileRowSpacing",
|
|
21
21
|
MOBILE_ROW_SPACING_LABEL: "mobileRowSpacingLabel"
|
|
22
|
-
},
|
|
22
|
+
}, O = {
|
|
23
23
|
COLUMN_SPACING: "data-column-spacing",
|
|
24
24
|
ROW_SPACING: "data-row-spacing",
|
|
25
25
|
MOBILE_COLUMN_SPACING: "data-mobile-column-spacing",
|
|
26
26
|
MOBILE_ROW_SPACING: "data-mobile-row-spacing"
|
|
27
27
|
};
|
|
28
|
-
function
|
|
28
|
+
function L(p, c) {
|
|
29
29
|
if (!p)
|
|
30
|
-
return
|
|
30
|
+
return c;
|
|
31
31
|
const t = parseFloat(p);
|
|
32
|
-
return Number.isNaN(t) ?
|
|
32
|
+
return Number.isNaN(t) ? c : t;
|
|
33
33
|
}
|
|
34
34
|
class X extends V {
|
|
35
35
|
constructor() {
|
|
36
36
|
super(...arguments);
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
h(this, "store", B());
|
|
38
|
+
h(this, "unsubscribeOrientation", null);
|
|
39
39
|
/**
|
|
40
40
|
* Debounced version of _onColumnSpacingChange
|
|
41
41
|
* Prevents excessive DOM updates when user rapidly adjusts the counter
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
h(this, "_debouncedOnColumnSpacingChange", f((t) => {
|
|
44
44
|
this._onColumnSpacingChange(t);
|
|
45
45
|
}, 300));
|
|
46
46
|
/**
|
|
47
47
|
* Debounced version of _onRowSpacingChange
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
h(this, "_debouncedOnRowSpacingChange", f((t) => {
|
|
50
50
|
this._onRowSpacingChange(t);
|
|
51
51
|
}, 300));
|
|
52
52
|
/**
|
|
53
53
|
* Debounced version of _onMobileColumnSpacingChange
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
h(this, "_debouncedOnMobileColumnSpacingChange", f((t) => {
|
|
56
56
|
this._onMobileColumnSpacingChange(t);
|
|
57
57
|
}, 300));
|
|
58
58
|
/**
|
|
59
59
|
* Debounced version of _onMobileRowSpacingChange
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
h(this, "_debouncedOnMobileRowSpacingChange", f((t) => {
|
|
62
62
|
this._onMobileRowSpacingChange(t);
|
|
63
63
|
}, 300));
|
|
64
64
|
}
|
|
@@ -72,16 +72,16 @@ class X extends V {
|
|
|
72
72
|
this._GuLabel({ text: "Column Spacing on Desktop (px)", name: i.COLUMN_SPACING_LABEL }),
|
|
73
73
|
this._GuCounter({
|
|
74
74
|
name: i.COLUMN_SPACING,
|
|
75
|
-
minValue:
|
|
76
|
-
maxValue:
|
|
77
|
-
step:
|
|
75
|
+
minValue: N,
|
|
76
|
+
maxValue: _,
|
|
77
|
+
step: S
|
|
78
78
|
}),
|
|
79
79
|
this._GuLabel({ text: "Row Spacing on Desktop (px)", name: i.ROW_SPACING_LABEL }),
|
|
80
80
|
this._GuCounter({
|
|
81
81
|
name: i.ROW_SPACING,
|
|
82
|
-
minValue:
|
|
83
|
-
maxValue:
|
|
84
|
-
step:
|
|
82
|
+
minValue: N,
|
|
83
|
+
maxValue: _,
|
|
84
|
+
step: S
|
|
85
85
|
}),
|
|
86
86
|
this._GuLabel({
|
|
87
87
|
text: "Column Spacing on Mobile (px)",
|
|
@@ -89,16 +89,16 @@ class X extends V {
|
|
|
89
89
|
}),
|
|
90
90
|
this._GuCounter({
|
|
91
91
|
name: i.MOBILE_COLUMN_SPACING,
|
|
92
|
-
minValue:
|
|
93
|
-
maxValue:
|
|
94
|
-
step:
|
|
92
|
+
minValue: N,
|
|
93
|
+
maxValue: _,
|
|
94
|
+
step: S
|
|
95
95
|
}),
|
|
96
96
|
this._GuLabel({ text: "Row Spacing on Mobile (px)", name: i.MOBILE_ROW_SPACING_LABEL }),
|
|
97
97
|
this._GuCounter({
|
|
98
98
|
name: i.MOBILE_ROW_SPACING,
|
|
99
|
-
minValue:
|
|
100
|
-
maxValue:
|
|
101
|
-
step:
|
|
99
|
+
minValue: N,
|
|
100
|
+
maxValue: _,
|
|
101
|
+
step: S
|
|
102
102
|
})
|
|
103
103
|
])}
|
|
104
104
|
</div>
|
|
@@ -132,8 +132,8 @@ class X extends V {
|
|
|
132
132
|
_updateSpacingVisibility() {
|
|
133
133
|
if (!this.api)
|
|
134
134
|
return;
|
|
135
|
-
const t = d.getConfig(this.currentNode), e = this.store.recommendationConfigs.orientation, n = t.layout || e ||
|
|
136
|
-
this.api.setVisibility(i.COLUMN_SPACING, o && !r &&
|
|
135
|
+
const t = d.getConfig(this.currentNode), e = this.store.recommendationConfigs.orientation, n = t.layout || e || b(this.currentNode), o = n === "grid", a = n === "list", r = this._isMobileMode(), l = t.cardsInRow > 1, u = t.mobileCardsInRow > 1;
|
|
136
|
+
this.api.setVisibility(i.COLUMN_SPACING, o && !r && l), this.api.setVisibility(i.COLUMN_SPACING_LABEL, o && !r && l), this.api.setVisibility(i.ROW_SPACING, a || !r), this.api.setVisibility(i.ROW_SPACING_LABEL, a || !r), this.api.setVisibility(i.MOBILE_COLUMN_SPACING, o && r && u), this.api.setVisibility(i.MOBILE_COLUMN_SPACING_LABEL, o && r && u), this.api.setVisibility(i.MOBILE_ROW_SPACING, !a && r), this.api.setVisibility(i.MOBILE_ROW_SPACING_LABEL, !a && r);
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Reads spacing values from node config first, falls back to DOM styles.
|
|
@@ -159,20 +159,20 @@ class X extends V {
|
|
|
159
159
|
*/
|
|
160
160
|
_getStoredColumnSpacing() {
|
|
161
161
|
if (!this.currentNode)
|
|
162
|
-
return
|
|
163
|
-
const t = this.currentNode.querySelector(
|
|
164
|
-
if (
|
|
165
|
-
const u = t.querySelector(".recommendation-attribute-row"),
|
|
166
|
-
if (!
|
|
167
|
-
return
|
|
168
|
-
const M =
|
|
169
|
-
return M.length < 2 ?
|
|
162
|
+
return C;
|
|
163
|
+
const t = this.currentNode.querySelector(m) ?? this.currentNode;
|
|
164
|
+
if (b(this.currentNode) === "grid") {
|
|
165
|
+
const u = t.querySelector(".recommendation-attribute-row"), s = u == null ? void 0 : u.querySelector("td"), I = A(s, "padding");
|
|
166
|
+
if (!I)
|
|
167
|
+
return C;
|
|
168
|
+
const M = I.trim().split(/\s+/);
|
|
169
|
+
return M.length < 2 ? C : L(M[1], C / 2) * 2;
|
|
170
170
|
}
|
|
171
|
-
const n = t.querySelector(".product-card-wrapper")
|
|
171
|
+
const n = t.querySelector(".product-card-wrapper"), o = U(n), a = A(o, "padding");
|
|
172
172
|
if (!a)
|
|
173
|
-
return
|
|
173
|
+
return C;
|
|
174
174
|
const r = a.trim().split(/\s+/);
|
|
175
|
-
return r.length < 2 ?
|
|
175
|
+
return r.length < 2 ? C : L(r[1], C / 2) * 2;
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
178
|
* Gets stored row spacing from the first spacer element's height style
|
|
@@ -181,8 +181,8 @@ class X extends V {
|
|
|
181
181
|
_getStoredRowSpacing() {
|
|
182
182
|
if (!this.currentNode)
|
|
183
183
|
return P;
|
|
184
|
-
const e = (this.currentNode.querySelector(
|
|
185
|
-
return
|
|
184
|
+
const e = (this.currentNode.querySelector(m) ?? this.currentNode).querySelector(".spacer"), n = A(e, "height");
|
|
185
|
+
return L(n, P);
|
|
186
186
|
}
|
|
187
187
|
// ========================================================================
|
|
188
188
|
// Desktop Spacing Handlers
|
|
@@ -199,18 +199,17 @@ class X extends V {
|
|
|
199
199
|
this.currentNode,
|
|
200
200
|
{ columnSpacing: t },
|
|
201
201
|
`Changed column spacing to ${t}px`
|
|
202
|
-
), this._storeDataAttribute(
|
|
203
|
-
const n = d.getConfig(this.currentNode).layout ||
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
).forEach((
|
|
207
|
-
o.modifyHtml(
|
|
202
|
+
), this._storeDataAttribute(O.COLUMN_SPACING, t);
|
|
203
|
+
const n = d.getConfig(this.currentNode).layout || b(this.currentNode), o = this.api.getDocumentModifier(), r = `0 ${t / 2}px`, l = this.currentNode.querySelector(m);
|
|
204
|
+
l && (n === "grid" ? Array.from(
|
|
205
|
+
l.querySelectorAll(".attribute-cell")
|
|
206
|
+
).forEach((s) => {
|
|
207
|
+
o.modifyHtml(s).setStyle("padding", r);
|
|
208
208
|
}) : Array.from(
|
|
209
|
-
|
|
210
|
-
).forEach((
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}), o.apply(new m(`Update column spacing to ${t}px`)));
|
|
209
|
+
l.querySelectorAll(".product-card-wrapper")
|
|
210
|
+
).forEach((s) => {
|
|
211
|
+
"parent" in s && s.parent() && o.modifyHtml(s.parent()).setStyle("padding", r);
|
|
212
|
+
}), o.apply(new g(`Update column spacing to ${t}px`)));
|
|
214
213
|
}
|
|
215
214
|
/**
|
|
216
215
|
* Handles row spacing changes for desktop.
|
|
@@ -224,8 +223,8 @@ class X extends V {
|
|
|
224
223
|
this.currentNode,
|
|
225
224
|
{ rowSpacing: t },
|
|
226
225
|
`Changed row spacing to ${t}px`
|
|
227
|
-
), this._storeDataAttribute(
|
|
228
|
-
const e = this.currentNode.querySelector(
|
|
226
|
+
), this._storeDataAttribute(O.ROW_SPACING, t);
|
|
227
|
+
const e = this.currentNode.querySelector(m);
|
|
229
228
|
if (!e)
|
|
230
229
|
return;
|
|
231
230
|
const n = Array.from(
|
|
@@ -236,7 +235,7 @@ class X extends V {
|
|
|
236
235
|
const o = this.api.getDocumentModifier(), a = `${t}px`;
|
|
237
236
|
n.forEach((r) => {
|
|
238
237
|
o.modifyHtml(r).setStyle("height", a);
|
|
239
|
-
}), o.apply(new
|
|
238
|
+
}), o.apply(new g(`Update row spacing to ${t}px`));
|
|
240
239
|
}
|
|
241
240
|
// ========================================================================
|
|
242
241
|
// Mobile Spacing Handlers
|
|
@@ -253,18 +252,17 @@ class X extends V {
|
|
|
253
252
|
this.currentNode,
|
|
254
253
|
{ mobileColumnSpacing: t },
|
|
255
254
|
`Changed mobile column spacing to ${t}px`
|
|
256
|
-
), this._storeDataAttribute(
|
|
257
|
-
const n = d.getConfig(this.currentNode).layout ||
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
).forEach((
|
|
261
|
-
o.modifyHtml(
|
|
255
|
+
), this._storeDataAttribute(O.MOBILE_COLUMN_SPACING, t);
|
|
256
|
+
const n = d.getConfig(this.currentNode).layout || b(this.currentNode), o = this.api.getDocumentModifier(), r = `0 ${t / 2}px`, l = this.currentNode.querySelector(E);
|
|
257
|
+
l && (n === "grid" ? Array.from(
|
|
258
|
+
l.querySelectorAll(".attribute-cell")
|
|
259
|
+
).forEach((s) => {
|
|
260
|
+
o.modifyHtml(s).setStyle("padding", r);
|
|
262
261
|
}) : Array.from(
|
|
263
|
-
|
|
264
|
-
).forEach((
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}), o.apply(new m(`Update mobile column spacing to ${t}px`)));
|
|
262
|
+
l.querySelectorAll(".product-card-wrapper")
|
|
263
|
+
).forEach((s) => {
|
|
264
|
+
"parent" in s && s.parent() && o.modifyHtml(s.parent()).setStyle("padding", r);
|
|
265
|
+
}), o.apply(new g(`Update mobile column spacing to ${t}px`)));
|
|
268
266
|
}
|
|
269
267
|
/**
|
|
270
268
|
* Handles row spacing changes for mobile.
|
|
@@ -278,7 +276,7 @@ class X extends V {
|
|
|
278
276
|
this.currentNode,
|
|
279
277
|
{ mobileRowSpacing: t },
|
|
280
278
|
`Changed mobile row spacing to ${t}px`
|
|
281
|
-
), this._storeDataAttribute(
|
|
279
|
+
), this._storeDataAttribute(O.MOBILE_ROW_SPACING, t);
|
|
282
280
|
const e = this.currentNode.querySelector(E);
|
|
283
281
|
if (!e)
|
|
284
282
|
return;
|
|
@@ -290,7 +288,7 @@ class X extends V {
|
|
|
290
288
|
const o = this.api.getDocumentModifier(), a = `${t}px`;
|
|
291
289
|
n.forEach((r) => {
|
|
292
290
|
o.modifyHtml(r).setStyle("height", a);
|
|
293
|
-
}), o.apply(new
|
|
291
|
+
}), o.apply(new g(`Update mobile row spacing to ${t}px`));
|
|
294
292
|
}
|
|
295
293
|
// ========================================================================
|
|
296
294
|
// Data Attribute Storage
|
|
@@ -300,7 +298,7 @@ class X extends V {
|
|
|
300
298
|
*/
|
|
301
299
|
_storeDataAttribute(t, e) {
|
|
302
300
|
const n = x(this.currentNode);
|
|
303
|
-
n && this.api.getDocumentModifier().modifyHtml(n).setAttribute(t, e.toString()).apply(new
|
|
301
|
+
n && this.api.getDocumentModifier().modifyHtml(n).setAttribute(t, e.toString()).apply(new g(`Store ${t}`));
|
|
304
302
|
}
|
|
305
303
|
// ========================================================================
|
|
306
304
|
// Event Listeners
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function a(t) {
|
|
2
2
|
return typeof t == "object" && t !== null && "tagName" in t && typeof t.tagName == "string";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function r(t) {
|
|
5
5
|
return typeof t == "object" && t !== null && "getTagName" in t && typeof t.getTagName == "function";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function n(t) {
|
|
8
8
|
return typeof t == "object" && t !== null && "getStyle" in t && typeof t.getStyle == "function";
|
|
9
9
|
}
|
|
10
10
|
function u(t) {
|
|
@@ -14,13 +14,13 @@ function g(t) {
|
|
|
14
14
|
return typeof t == "object" && t !== null && "tagName" in t && t.tagName === "TD";
|
|
15
15
|
}
|
|
16
16
|
function p(t, e) {
|
|
17
|
-
return !t || !
|
|
17
|
+
return !t || !n(t) ? null : t.getStyle(e);
|
|
18
18
|
}
|
|
19
19
|
function N(t) {
|
|
20
|
-
return !t || !u(t) ? null : t.parent()
|
|
20
|
+
return !t || !u(t) ? null : t.parent();
|
|
21
21
|
}
|
|
22
22
|
function l(t, e = "UNKNOWN") {
|
|
23
|
-
return t ? a(t) ? t.tagName.toUpperCase() :
|
|
23
|
+
return t ? a(t) ? t.tagName.toUpperCase() : r(t) ? t.getTagName().toUpperCase() : e : e;
|
|
24
24
|
}
|
|
25
25
|
const f = /* @__PURE__ */ new Set(["TD", "BLOCK_IMAGE", "BLOCK_BUTTON"]);
|
|
26
26
|
function i(t) {
|
|
@@ -36,7 +36,7 @@ function s(t) {
|
|
|
36
36
|
export {
|
|
37
37
|
s as getTableDisplayValue,
|
|
38
38
|
l as getTagName,
|
|
39
|
-
|
|
39
|
+
n as hasGetStyle,
|
|
40
40
|
u as hasParent,
|
|
41
41
|
c as isTableCellNode,
|
|
42
42
|
i as isTableCellTag,
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { SettingsPanelRegistry as e, SettingsPanelTab as
|
|
1
|
+
import { SettingsPanelRegistry as e, SettingsPanelTab as N, SettingsTab as t, TextControls as O } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { UNSUBSCRIBE_BLOCK_ID as I } from "./block.js";
|
|
3
3
|
import { UNSUBSCRIBE_CONTROL_ID as _ } from "./control.js";
|
|
4
|
-
class
|
|
4
|
+
class R extends e {
|
|
5
5
|
registerBlockControls(T) {
|
|
6
6
|
T[I] = [
|
|
7
|
-
new
|
|
7
|
+
new N(
|
|
8
8
|
t.SETTINGS,
|
|
9
9
|
[
|
|
10
10
|
_,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
O.FORMAT,
|
|
12
|
+
O.ALIGN,
|
|
13
|
+
O.LINE_HEIGHT,
|
|
14
|
+
O.DIRECTION,
|
|
15
|
+
O.INTERNAL_INDENTS,
|
|
16
|
+
O.HIDDEN_NODE
|
|
17
17
|
]
|
|
18
18
|
),
|
|
19
|
-
new
|
|
19
|
+
new N(
|
|
20
20
|
t.STYLES,
|
|
21
21
|
[
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
O.TEXT_BLOCK_BACKGROUND_COLOR,
|
|
23
|
+
O.FONT_FAMILY,
|
|
24
|
+
O.FONT_SIZE,
|
|
25
|
+
O.FONT_COLOR,
|
|
26
|
+
O.FONT_BACKGROUND_COLOR,
|
|
27
|
+
O.LINKS_COLOR
|
|
27
28
|
]
|
|
28
29
|
)
|
|
29
30
|
];
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
R as SettingsPanel
|
|
34
35
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-
|
|
1
|
+
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-acff76a8]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-a26d7792]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-a26d7792]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-a26d7792]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
|