@useinsider/guido 2.0.0-beta.689d09e → 2.0.0-beta.6b1a3c9
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/email-preview/amp/AmpToggle.vue.js +2 -2
- package/dist/components/organisms/header/LeftSlot.vue.js +8 -8
- package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +32 -38
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +34 -28
- package/dist/extensions/Blocks/common-control.js +1 -2
- package/dist/guido.css +1 -1
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import o from "./AmpToggle.vue2.js";
|
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
5
|
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
6
|
-
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-
|
|
6
|
+
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
|
|
7
7
|
return e.previewStore.openErrorModal();
|
|
8
8
|
} } }) : r._e()], 1)]);
|
|
9
9
|
}, a = [], i = /* @__PURE__ */ n(
|
|
@@ -12,7 +12,7 @@ var s = function() {
|
|
|
12
12
|
a,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"5196584c"
|
|
16
16
|
);
|
|
17
17
|
const d = i.exports;
|
|
18
18
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
5
5
|
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
|
|
7
|
-
},
|
|
6
|
+
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "disabled-status": t.isBackButtonDisabled, "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
|
|
7
|
+
}, n = [], r = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
|
-
r,
|
|
10
9
|
i,
|
|
10
|
+
n,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"7f267190"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = r.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useBack as
|
|
4
|
-
import { usePreviewMode as
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
import { defineComponent as l, computed as p, ref as d } from "vue";
|
|
2
|
+
import { useConfig as k } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useBack as B } from "../../../composables/useGuidoActions.js";
|
|
4
|
+
import { usePreviewMode as b } from "../../../composables/usePreviewMode.js";
|
|
5
|
+
import { useTranslations as v } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useEditorStore as V } from "../../../stores/editor.js";
|
|
8
|
+
import { InButtonV2 as w } from "@useinsider/design-system-vue";
|
|
9
|
+
import y from "./version-history/RestoreButton.vue.js";
|
|
10
|
+
import { useDebounceFn as C } from "../../../node_modules/@vueuse/shared/index.js";
|
|
11
|
+
const F = /* @__PURE__ */ l({
|
|
11
12
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
var
|
|
15
|
-
return
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
i();
|
|
13
|
+
setup(H) {
|
|
14
|
+
const e = V(), i = B(), { closeVersionHistory: n } = _(), { closePreviewMode: s } = b(), o = v(), { config: t } = k(), f = p(() => {
|
|
15
|
+
var u, m;
|
|
16
|
+
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (u = t.value) == null ? void 0 : u.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
|
|
17
|
+
}), r = d(!1), c = () => {
|
|
18
|
+
if (e.isVersionHistoryOpen) {
|
|
19
|
+
n();
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
23
|
-
|
|
22
|
+
if (e.isPreviewModeOpen) {
|
|
23
|
+
s();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
},
|
|
26
|
+
i();
|
|
27
|
+
}, a = C(() => {
|
|
28
|
+
c(), r.value = !1;
|
|
29
|
+
}, 500);
|
|
30
|
+
return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: f, isBackButtonDisabled: r, executeBackAction: c, debouncedBackAction: a, handleBackClick: () => {
|
|
31
|
+
r.value = !0, a();
|
|
32
|
+
}, InButtonV2: w, RestoreButton: y };
|
|
28
33
|
}
|
|
29
34
|
});
|
|
30
35
|
export {
|
|
31
|
-
|
|
36
|
+
F as default
|
|
32
37
|
};
|
|
@@ -1,82 +1,76 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ModificationDescription as
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var _ = (i, t, e) => t in i ? R(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var m = (i, t, e) => _(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ModificationDescription as F, UIElementType as P, UEAttr as C } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
import { CommonControl as h } from "../../../common-control.js";
|
|
6
|
-
import { ItemsBlockControlId as
|
|
7
|
-
import { productPairs as
|
|
8
|
-
import { useItemsBlockStore as
|
|
9
|
-
import { getItemsBlockConfig as
|
|
10
|
-
const
|
|
6
|
+
import { ItemsBlockControlId as p, ItemsBlockId as g } from "../../enums/controlEnums.js";
|
|
7
|
+
import { productPairs as T } from "../../enums/productEnums.js";
|
|
8
|
+
import { useItemsBlockStore as A } from "../../store/items-block.js";
|
|
9
|
+
import { getItemsBlockConfig as f, setItemsBlockConfig as u } from "../../utils/nodeConfigUtils.js";
|
|
10
|
+
const D = p.PRICE_FORMATTED_PRICE, n = {
|
|
11
11
|
FORMATTED_PRICE: "formattedPrice"
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class k extends h {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
|
-
|
|
16
|
+
m(this, "store", A());
|
|
17
17
|
}
|
|
18
18
|
getId() {
|
|
19
|
-
return
|
|
19
|
+
return D;
|
|
20
20
|
}
|
|
21
21
|
getTemplate() {
|
|
22
22
|
return `
|
|
23
|
-
<div class="container ${
|
|
23
|
+
<div class="container ${p.PRICE_FORMATTED_PRICE}">
|
|
24
24
|
${this._getFormattedPrice()}
|
|
25
25
|
</div>
|
|
26
26
|
`;
|
|
27
27
|
}
|
|
28
28
|
onRender() {
|
|
29
|
-
this.api.updateValues({ [
|
|
29
|
+
this.api.updateValues({ [n.FORMATTED_PRICE]: this.store.formattedPrice }), this.api.onValueChanged(n.FORMATTED_PRICE, (e) => {
|
|
30
30
|
this._onFormattedPriceChange(e);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
onTemplateNodeUpdated(e) {
|
|
34
34
|
super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(
|
|
35
35
|
() => {
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const r = f(this.currentNode);
|
|
37
|
+
r && this.store.setFormattedPrice(r.priceFormatted ?? !0);
|
|
38
38
|
},
|
|
39
39
|
() => {
|
|
40
|
-
this.api.updateValues({ [
|
|
40
|
+
this.api.updateValues({ [n.FORMATTED_PRICE]: this.store.formattedPrice });
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
_onFormattedPriceChange(e) {
|
|
45
|
-
if (console.debug("Formatted price changed to: ", e), this.store.setFormattedPrice(e),
|
|
45
|
+
if (console.debug("Formatted price changed to: ", e), this.store.setFormattedPrice(e), u(this.currentNode, this.api, { priceFormatted: e }), !this.currentNode)
|
|
46
46
|
return;
|
|
47
|
-
const { itemsType:
|
|
48
|
-
i ? t.DEFAULT_SINGLE_PRICE : t.DEFAULT_PRICE,
|
|
49
|
-
i ? t.DEFAULT_SINGLE_PRICE_FORMATTED : t.DEFAULT_PRICE_FORMATTED
|
|
50
|
-
] : [
|
|
51
|
-
i ? t.DEFAULT_SINGLE_PRICE_FORMATTED : t.DEFAULT_PRICE_FORMATTED,
|
|
52
|
-
i ? t.DEFAULT_SINGLE_PRICE : t.DEFAULT_PRICE
|
|
53
|
-
], d = i ? s.DEFAULT_SINGLE_PRICE : s.DEFAULT_PRICE, P = i ? s.DEFAULT_SINGLE_PRICE_FORMATTED : s.DEFAULT_PRICE_FORMATTED, [p, F] = e ? [d, P] : [P, d];
|
|
47
|
+
const { itemsType: r } = this.store, o = T.PAIRS_FOR_EXTENSION.price[r], s = T.PAIRS_FOR_EXTENSION.originalPrice[r], [c, a] = e ? [o.DEFAULT_PRICE, o.DEFAULT_PRICE_FORMATTED] : [o.DEFAULT_PRICE_FORMATTED, o.DEFAULT_PRICE], [l, I] = e ? [s.DEFAULT_PRICE, s.DEFAULT_PRICE_FORMATTED] : [s.DEFAULT_PRICE_FORMATTED, s.DEFAULT_PRICE];
|
|
54
48
|
this._updatePriceBlock(
|
|
55
49
|
this.currentNode,
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
c,
|
|
51
|
+
a,
|
|
58
52
|
"price"
|
|
59
53
|
);
|
|
60
|
-
const
|
|
61
|
-
|
|
54
|
+
const d = this.currentNode.closest(".items-block"), E = d == null ? void 0 : d.querySelector(`[esd-extension-block-id="${g.ORIGINAL_PRICE}"]`);
|
|
55
|
+
E && this._updatePriceBlock(E, l, I, "original price");
|
|
62
56
|
}
|
|
63
|
-
_updatePriceBlock(e,
|
|
64
|
-
const
|
|
65
|
-
this.api.getDocumentModifier().modifyHtml(e).setInnerHtml(
|
|
57
|
+
_updatePriceBlock(e, r, o, s) {
|
|
58
|
+
const c = e.getInnerHTML().replace(r, o), a = `Updated ${s} to ${this.store.formattedPrice ? "formatted" : "unformatted"}`;
|
|
59
|
+
this.api.getDocumentModifier().modifyHtml(e).setInnerHtml(c).apply(new F(a));
|
|
66
60
|
}
|
|
67
61
|
_getFormattedPrice() {
|
|
68
62
|
return `
|
|
69
63
|
<div class="display-flex align-items-center justify-content-between">
|
|
70
|
-
<${
|
|
71
|
-
${
|
|
64
|
+
<${P.LABEL}
|
|
65
|
+
${C.LABEL.text}="${this.api.translate("Formatted Price (e.g. $9.90)")}"
|
|
72
66
|
>
|
|
73
|
-
</${
|
|
74
|
-
${this._GuToggle(
|
|
67
|
+
</${P.LABEL}>
|
|
68
|
+
${this._GuToggle(n.FORMATTED_PRICE)}
|
|
75
69
|
</div>
|
|
76
70
|
`;
|
|
77
71
|
}
|
|
78
72
|
}
|
|
79
73
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
D as CONTROL_BLOCK_ID,
|
|
75
|
+
k as PriceFormattedPriceControl
|
|
82
76
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var L = Object.defineProperty;
|
|
2
|
-
var M = (
|
|
3
|
-
var
|
|
4
|
-
import { UEAttr as
|
|
2
|
+
var M = (g, p, e) => p in g ? L(g, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[p] = e;
|
|
3
|
+
var C = (g, p, e) => M(g, typeof p != "symbol" ? p + "" : p, e);
|
|
4
|
+
import { UEAttr as O, ModificationDescription as u } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
import { CommonControl as D } from "../../common-control.js";
|
|
6
6
|
import { ItemsBlockId as m } from "../enums/controlEnums.js";
|
|
7
|
-
import { productPairs as
|
|
7
|
+
import { productPairs as _, templateFirstLine as b } from "../enums/productEnums.js";
|
|
8
8
|
import { ItemTypeOptions as R, OrientationOptions as x, ItemInCartOptions as N, SETTINGS_ENUMS as S, DefaultConfigValues as A } from "../enums/settingsEnums.js";
|
|
9
9
|
import H from "../layouts/horizontal.html.js";
|
|
10
10
|
import k from "../layouts/vertical.html.js";
|
|
11
11
|
import { useItemsBlockStore as U } from "../store/items-block.js";
|
|
12
|
-
import { getDefaultTemplate as
|
|
12
|
+
import { getDefaultTemplate as $ } from "../template.js";
|
|
13
13
|
import { getItemsBlockConfig as P, setItemsBlockConfig as f } from "../utils/nodeConfigUtils.js";
|
|
14
|
-
const
|
|
14
|
+
const F = "ui-elements-items-block", a = {
|
|
15
15
|
ITEMS_TYPE: "itemsType",
|
|
16
16
|
ORIENTATION: "orientation",
|
|
17
17
|
ITEM_IDS: "itemIds"
|
|
@@ -19,10 +19,10 @@ const $ = "ui-elements-items-block", a = {
|
|
|
19
19
|
class K extends D {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
|
-
|
|
22
|
+
C(this, "store", U());
|
|
23
23
|
}
|
|
24
24
|
getId() {
|
|
25
|
-
return
|
|
25
|
+
return F;
|
|
26
26
|
}
|
|
27
27
|
getTemplate() {
|
|
28
28
|
return `
|
|
@@ -124,7 +124,7 @@ class K extends D {
|
|
|
124
124
|
_initializeSelectItems() {
|
|
125
125
|
this.api.setUIEAttribute(
|
|
126
126
|
a.ITEMS_TYPE,
|
|
127
|
-
|
|
127
|
+
O.SELECTPICKER.items,
|
|
128
128
|
R
|
|
129
129
|
);
|
|
130
130
|
const { itemsType: e, itemIds: t } = this.store;
|
|
@@ -134,7 +134,7 @@ class K extends D {
|
|
|
134
134
|
const i = N[e];
|
|
135
135
|
this.api.setUIEAttribute(
|
|
136
136
|
a.ITEM_IDS,
|
|
137
|
-
|
|
137
|
+
O.SELECTPICKER.items,
|
|
138
138
|
i
|
|
139
139
|
), this.api.updateValues({
|
|
140
140
|
[a.ITEM_IDS]: t
|
|
@@ -161,7 +161,7 @@ class K extends D {
|
|
|
161
161
|
currencyLocation: n,
|
|
162
162
|
formattedPrice: s
|
|
163
163
|
} = this.store;
|
|
164
|
-
this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(
|
|
164
|
+
this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml($({
|
|
165
165
|
orientation: e,
|
|
166
166
|
itemsType: t,
|
|
167
167
|
itemId: i,
|
|
@@ -173,12 +173,12 @@ class K extends D {
|
|
|
173
173
|
_getTemplateData() {
|
|
174
174
|
const { itemsType: e, itemIds: t, formattedPrice: i } = this.store, r = N[e].findIndex((s) => s.value === t), n = r > -1 ? r : 0;
|
|
175
175
|
return {
|
|
176
|
-
imageSrc:
|
|
177
|
-
name:
|
|
178
|
-
price: i ?
|
|
179
|
-
originalPrice: i ?
|
|
180
|
-
quantity:
|
|
181
|
-
button:
|
|
176
|
+
imageSrc: _.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[n],
|
|
177
|
+
name: _.PAIRS_FOR_EXTENSION.name[e].DEFAULT[n],
|
|
178
|
+
price: i ? _.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE_FORMATTED : _.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE,
|
|
179
|
+
originalPrice: i ? _.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE_FORMATTED : _.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE,
|
|
180
|
+
quantity: _.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT,
|
|
181
|
+
button: _.PAIRS_FOR_EXTENSION.button[e].DEFAULT_LABEL
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
_updateImageSrc(e) {
|
|
@@ -196,15 +196,15 @@ class K extends D {
|
|
|
196
196
|
r = r.replace(i, e), this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(r).apply(new u("Updated name"));
|
|
197
197
|
}
|
|
198
198
|
_updatePrice(e) {
|
|
199
|
-
var
|
|
200
|
-
const t = (
|
|
199
|
+
var I;
|
|
200
|
+
const t = (I = this.currentNode) == null ? void 0 : I.querySelector(`[esd-extension-block-id="${m.PRICE}"]`);
|
|
201
201
|
if (!t)
|
|
202
202
|
return;
|
|
203
203
|
const i = this._getParagraphFromBlock(t);
|
|
204
204
|
if (!i)
|
|
205
205
|
return;
|
|
206
|
-
const r = i.getInnerHTML() || "", n = i.getInnerText() || "", { currencySymbol: s, currencyLocation: l } = this.store, o = (s == null ? void 0 : s.trim()) || "", c = this._removeCurrencySymbol(n, o),
|
|
207
|
-
this.api.getDocumentModifier().modifyHtml(i).setInnerHtml(
|
|
206
|
+
const r = i.getInnerHTML() || "", n = i.getInnerText() || "", { currencySymbol: s, currencyLocation: l } = this.store, o = (s == null ? void 0 : s.trim()) || "", c = this._removeCurrencySymbol(n, o), d = this._replacePriceNumber(c, e), h = this._buildPriceContent(d, o, l), T = r.replace(n, h);
|
|
207
|
+
this.api.getDocumentModifier().modifyHtml(i).setInnerHtml(T).apply(new u("Updated price"));
|
|
208
208
|
}
|
|
209
209
|
_updateOriginalPrice(e) {
|
|
210
210
|
var E;
|
|
@@ -219,21 +219,27 @@ class K extends D {
|
|
|
219
219
|
const r = i.querySelector("s");
|
|
220
220
|
if (!r)
|
|
221
221
|
return;
|
|
222
|
-
const n = r.getInnerHTML() || "", s = r.getInnerText() || "", { currencySymbol: l, currencyLocation: o } = this.store, c = (l == null ? void 0 : l.trim()) || "",
|
|
222
|
+
const n = r.getInnerHTML() || "", s = r.getInnerText() || "", { currencySymbol: l, currencyLocation: o } = this.store, c = (l == null ? void 0 : l.trim()) || "", d = this._removeCurrencySymbol(s, c), h = this._replacePriceNumber(d, e), T = this._buildPriceContent(h, c, o), y = `<s>${n.replace(s, T)}</s>`;
|
|
223
223
|
this.api.getDocumentModifier().modifyHtml(i).setInnerHtml(y).apply(new u("Updated original price"));
|
|
224
224
|
}
|
|
225
225
|
_updateQuantity(e) {
|
|
226
|
-
var
|
|
227
|
-
const t = this.store.itemsType !== S.ITEMS_TYPE.BROWSED_ITEMS, i = P(this.currentNode), r = (i == null ? void 0 : i.quantityControlEnabled) !== !1, n = t && r, s = (
|
|
226
|
+
var d;
|
|
227
|
+
const t = this.store.itemsType !== S.ITEMS_TYPE.BROWSED_ITEMS, i = P(this.currentNode), r = (i == null ? void 0 : i.quantityControlEnabled) !== !1, n = t && r, s = (d = this.currentNode) == null ? void 0 : d.querySelector(`[esd-extension-block-id="${m.QUANTITY}"]`);
|
|
228
228
|
if (!s)
|
|
229
229
|
return;
|
|
230
230
|
const l = s.getInnerText().trim();
|
|
231
231
|
let o = s.getInnerHTML();
|
|
232
|
-
|
|
232
|
+
function c(h, T, I) {
|
|
233
|
+
return h.replace(
|
|
234
|
+
new RegExp(`(>\\s*)${T}(\\s*<)`, "g"),
|
|
235
|
+
`$1${I}$2`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
o = c(o, l, e), this.api.getDocumentModifier().modifyHtml(s).setInnerHtml(o).setStyle("display", n ? "table-cell" : "none").apply(new u("Updated quantity"));
|
|
233
239
|
}
|
|
234
240
|
_reOrderTemplate() {
|
|
235
|
-
var
|
|
236
|
-
const e = (
|
|
241
|
+
var d, h, T, I, y, E;
|
|
242
|
+
const e = (d = this.currentNode) == null ? void 0 : d.querySelector(`[esd-extension-block-id="${m.IMAGE}"]`), t = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${m.NAME}"]`), i = (T = this.currentNode) == null ? void 0 : T.querySelector(`[esd-extension-block-id="${m.PRICE}"]`), r = (I = this.currentNode) == null ? void 0 : I.querySelector(
|
|
237
243
|
`[esd-extension-block-id="${m.ORIGINAL_PRICE}"]`
|
|
238
244
|
), n = (y = this.currentNode) == null ? void 0 : y.querySelector(`[esd-extension-block-id="${m.QUANTITY}"]`), s = (E = this.currentNode) == null ? void 0 : E.querySelector(`[esd-extension-block-id="${m.BUTTON}"]`);
|
|
239
245
|
if (!e || !t || !i || !r || !n || !s)
|
|
@@ -320,6 +326,6 @@ class K extends D {
|
|
|
320
326
|
}
|
|
321
327
|
}
|
|
322
328
|
export {
|
|
323
|
-
|
|
329
|
+
F as CONTROL_BLOCK_ID,
|
|
324
330
|
K as ItemsBlockControl
|
|
325
331
|
};
|
|
@@ -51,10 +51,9 @@ class _ extends O {
|
|
|
51
51
|
const o = E !== this.lastBlockInstanceId;
|
|
52
52
|
return o ? (this.currentNode && e(this.currentNode), n(), this.lastBlockInstanceId = E) : n(), o;
|
|
53
53
|
}
|
|
54
|
-
_GuLabel({ text: e, name: n = ""
|
|
54
|
+
_GuLabel({ text: e, name: n = "" }) {
|
|
55
55
|
return `
|
|
56
56
|
<${t.LABEL}
|
|
57
|
-
style="${E === "top" ? "margin-bottom: 8px;" : ""}"
|
|
58
57
|
${$.LABEL.text}="${e}"
|
|
59
58
|
${$.LABEL.name}="${n || `${e} Label`}">
|
|
60
59
|
</${t.LABEL}>
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-
|
|
1
|
+
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-7f267190] .in-button-v2__wrapper{line-height:0}[data-v-5196584c] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.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}.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}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-890b5336]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-890b5336]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-890b5336]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-bb3bb07c] .guido__verion-history-view-option-selection-desktop svg,[data-v-bb3bb07c] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-bb3bb07c] .in-segments-wrapper__button_selected,[data-v-bb3bb07c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-b37f3f6d],[data-v-b37f3f6d] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-4b876c1b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -74,7 +74,7 @@ export declare abstract class CommonControl extends Control {
|
|
|
74
74
|
* @returns true if block instance changed, false otherwise
|
|
75
75
|
*/
|
|
76
76
|
protected handleBlockInstanceChange(syncFunction: (node: ImmutableHtmlNode) => void, updateUI: () => void): boolean;
|
|
77
|
-
_GuLabel({ text, name
|
|
77
|
+
_GuLabel({ text, name }: LabelProps): string;
|
|
78
78
|
_GuToggle(name: string): string;
|
|
79
79
|
_GuSelectItem({ text, value }: {
|
|
80
80
|
text: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.6b1a3c9",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|