@useinsider/guido 2.0.0-beta.c588e27 → 2.0.0-beta.c6d6ca6
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/@types/config/schemas.js +53 -39
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +2 -2
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/itemsBlockMigrator.js +334 -0
- package/dist/extensions/Blocks/Items/block.js +36 -40
- package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +66 -46
- package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +36 -36
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +176 -162
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +4 -5
- package/dist/extensions/Blocks/Items/extension.js +11 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -49
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -59
- package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
- package/dist/extensions/Blocks/Items/store/items-block.js +11 -7
- package/dist/extensions/Blocks/Items/template.js +387 -140
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +174 -0
- package/dist/extensions/Blocks/Recommendation/control.js +1 -1
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +26 -27
- package/dist/extensions/Blocks/controlFactories.js +55 -45
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +364 -285
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +26 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -2
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +22 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +71 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +9 -10
- package/dist/src/stores/config.d.ts +147 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/stores/config.js +7 -0
- package/dist/utils/pairProductVariables.js +61 -58
- package/package.json +3 -3
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { ModificationDescription as b } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { DefaultConfigValues as i, SETTINGS_ENUMS as n, ItemInCartOptions as g } from "../enums/settingsEnums.js";
|
|
3
|
+
function d() {
|
|
4
|
+
return String(Date.now() + Math.floor(Math.random() * 1e3));
|
|
5
|
+
}
|
|
6
|
+
function E() {
|
|
7
|
+
return {
|
|
8
|
+
initialized: !0,
|
|
9
|
+
blockInstanceId: d(),
|
|
10
|
+
source: n.ITEMS_TYPE.CART_ITEMS,
|
|
11
|
+
type: n.ITEMS_TYPE.CART_ITEMS,
|
|
12
|
+
itemsSelectValue: i.cartItemsSelectControlValue,
|
|
13
|
+
orientation: n.ORIENTATION.VERTICAL,
|
|
14
|
+
nameTrimming: i.productNameTrimmingControlValue === "1",
|
|
15
|
+
priceHideDiscount: i.productPriceHideDiscountControlValue === "1",
|
|
16
|
+
priceFormatted: i.productPriceFormattedControlValue === "1",
|
|
17
|
+
priceSinglePrice: !1,
|
|
18
|
+
priceCurrencySymbol: i.productPriceCurrencySymbolControlValue,
|
|
19
|
+
priceCurrencyLocation: i.productPriceCurrencyLocationControlValue,
|
|
20
|
+
priceOrientation: "horizontal",
|
|
21
|
+
quantityControlEnabled: i.productQuantityControlEnabled === "1",
|
|
22
|
+
buttonLink: i.productButtonLinkControlValue,
|
|
23
|
+
imageLink: i.productImageLinkControlValue,
|
|
24
|
+
buttonLabel: "Buy",
|
|
25
|
+
buttonFullWidth: !0,
|
|
26
|
+
// Default to full width (es-fw class)
|
|
27
|
+
imageVisible: i.productImageVisible === "1",
|
|
28
|
+
nameVisible: i.productNameVisible === "1",
|
|
29
|
+
quantityVisible: i.productQuantityVisible === "1",
|
|
30
|
+
priceVisible: i.productPriceVisible === "1",
|
|
31
|
+
originalPriceVisible: i.productOriginalPriceVisible === "1",
|
|
32
|
+
buttonVisible: i.productButtonVisible === "1"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function s(o) {
|
|
36
|
+
if (!o)
|
|
37
|
+
return null;
|
|
38
|
+
const t = o.closest(".items-block-v2");
|
|
39
|
+
return t || o.closest(".esd-cart-items-block");
|
|
40
|
+
}
|
|
41
|
+
function m(o) {
|
|
42
|
+
return o ? {
|
|
43
|
+
CartItems: n.ITEMS_TYPE.CART_ITEMS,
|
|
44
|
+
BrowsedItems: n.ITEMS_TYPE.BROWSED_ITEMS,
|
|
45
|
+
PurchasedItems: n.ITEMS_TYPE.PURCHASED_ITEMS,
|
|
46
|
+
// Also handle already correct formats
|
|
47
|
+
CART_ITEMS: n.ITEMS_TYPE.CART_ITEMS,
|
|
48
|
+
BROWSED_ITEMS: n.ITEMS_TYPE.BROWSED_ITEMS,
|
|
49
|
+
PURCHASED_ITEMS: n.ITEMS_TYPE.PURCHASED_ITEMS
|
|
50
|
+
}[o] || n.ITEMS_TYPE.CART_ITEMS : n.ITEMS_TYPE.CART_ITEMS;
|
|
51
|
+
}
|
|
52
|
+
function I(o, t) {
|
|
53
|
+
if (!o)
|
|
54
|
+
return i.cartItemsSelectControlValue;
|
|
55
|
+
if (o.includes("{{"))
|
|
56
|
+
return o;
|
|
57
|
+
if (/^\d+$/.test(o)) {
|
|
58
|
+
const e = parseInt(o) - 1, r = g[t];
|
|
59
|
+
if (r && r[e])
|
|
60
|
+
return r[e].value;
|
|
61
|
+
}
|
|
62
|
+
return i.cartItemsSelectControlValue;
|
|
63
|
+
}
|
|
64
|
+
function C(o) {
|
|
65
|
+
const t = o.querySelector("esd-config-block");
|
|
66
|
+
if (!t)
|
|
67
|
+
return null;
|
|
68
|
+
const e = (c, a) => c == null ? a : c === "1" || c === "true", r = (c, a) => c || a, l = t.getAttribute("data-type"), u = m(l), _ = t.getAttribute("data-cart_items_select_control_value"), p = I(_, u);
|
|
69
|
+
return {
|
|
70
|
+
initialized: e(t.getAttribute("data-initialized"), !1),
|
|
71
|
+
blockInstanceId: r(
|
|
72
|
+
t.getAttribute("data-block-instance-id"),
|
|
73
|
+
d()
|
|
74
|
+
),
|
|
75
|
+
source: u,
|
|
76
|
+
type: u,
|
|
77
|
+
itemsSelectValue: p,
|
|
78
|
+
orientation: t.getAttribute("data-card_orientation_control_value") || n.ORIENTATION.VERTICAL,
|
|
79
|
+
nameTrimming: e(
|
|
80
|
+
t.getAttribute("data-product_name_control_trim"),
|
|
81
|
+
!0
|
|
82
|
+
),
|
|
83
|
+
priceHideDiscount: e(
|
|
84
|
+
t.getAttribute("data-product_price_control_nodup"),
|
|
85
|
+
!0
|
|
86
|
+
),
|
|
87
|
+
priceFormatted: e(
|
|
88
|
+
t.getAttribute("data-product_price_control_formated"),
|
|
89
|
+
!0
|
|
90
|
+
),
|
|
91
|
+
priceSinglePrice: e(
|
|
92
|
+
t.getAttribute("data-product_price_control_single_price"),
|
|
93
|
+
!1
|
|
94
|
+
),
|
|
95
|
+
priceCurrencySymbol: r(
|
|
96
|
+
t.getAttribute("data-product_price_currency_symbol"),
|
|
97
|
+
i.productPriceCurrencySymbolControlValue
|
|
98
|
+
),
|
|
99
|
+
priceCurrencyLocation: r(
|
|
100
|
+
t.getAttribute("data-product_price_currency_location"),
|
|
101
|
+
i.productPriceCurrencyLocationControlValue
|
|
102
|
+
),
|
|
103
|
+
priceOrientation: t.getAttribute("data-product_original_price_control_orientation") || "horizontal",
|
|
104
|
+
quantityControlEnabled: e(
|
|
105
|
+
t.getAttribute("data-product_quantity_control_enabled"),
|
|
106
|
+
!0
|
|
107
|
+
),
|
|
108
|
+
buttonLink: r(
|
|
109
|
+
t.getAttribute("data-product_button_link"),
|
|
110
|
+
i.productButtonLinkControlValue
|
|
111
|
+
),
|
|
112
|
+
imageLink: r(
|
|
113
|
+
t.getAttribute("data-product_image_link"),
|
|
114
|
+
i.productImageLinkControlValue
|
|
115
|
+
),
|
|
116
|
+
buttonLabel: r(
|
|
117
|
+
t.getAttribute("data-product_button_control_label"),
|
|
118
|
+
"Buy"
|
|
119
|
+
),
|
|
120
|
+
buttonFullWidth: e(
|
|
121
|
+
t.getAttribute("data-product_button_control_atw"),
|
|
122
|
+
!0
|
|
123
|
+
// Default to full width
|
|
124
|
+
),
|
|
125
|
+
imageVisible: e(
|
|
126
|
+
t.getAttribute("data-product_image_control_enabled"),
|
|
127
|
+
!0
|
|
128
|
+
),
|
|
129
|
+
nameVisible: e(
|
|
130
|
+
t.getAttribute("data-product_name_control_enabled"),
|
|
131
|
+
!0
|
|
132
|
+
),
|
|
133
|
+
quantityVisible: e(
|
|
134
|
+
t.getAttribute("data-product_quantity_control_enabled"),
|
|
135
|
+
!0
|
|
136
|
+
),
|
|
137
|
+
priceVisible: e(
|
|
138
|
+
t.getAttribute("data-product_price_control_enabled"),
|
|
139
|
+
!0
|
|
140
|
+
),
|
|
141
|
+
originalPriceVisible: e(
|
|
142
|
+
t.getAttribute("data-product_original_price_control_enabled"),
|
|
143
|
+
!0
|
|
144
|
+
),
|
|
145
|
+
buttonVisible: e(
|
|
146
|
+
t.getAttribute("data-product_button_control_enabled"),
|
|
147
|
+
!0
|
|
148
|
+
)
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function S(o) {
|
|
152
|
+
const t = s(o);
|
|
153
|
+
if (!t)
|
|
154
|
+
return null;
|
|
155
|
+
const e = t.getNodeConfig();
|
|
156
|
+
if (e && e.initialized)
|
|
157
|
+
return e;
|
|
158
|
+
const r = C(t);
|
|
159
|
+
return r || null;
|
|
160
|
+
}
|
|
161
|
+
function y(o, t, e) {
|
|
162
|
+
const r = s(o);
|
|
163
|
+
if (!r)
|
|
164
|
+
return;
|
|
165
|
+
const u = { ...r.getNodeConfig() || {}, ...e };
|
|
166
|
+
t.getDocumentModifier().modifyHtml(r).setNodeConfig(u).apply(new b("Update Items block configuration"));
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
d as generateBlockInstanceId,
|
|
170
|
+
E as getDefaultItemsBlockConfig,
|
|
171
|
+
S as getItemsBlockConfig,
|
|
172
|
+
s as getItemsBlockContainer,
|
|
173
|
+
y as setItemsBlockConfig
|
|
174
|
+
};
|
|
@@ -289,7 +289,7 @@ class b extends g {
|
|
|
289
289
|
t.CURRENCY_DECIMAL_COUNT
|
|
290
290
|
].forEach((i) => {
|
|
291
291
|
this.api.onValueChanged(i, (a) => this._onCurrencyConfigChange(i, a));
|
|
292
|
-
}), this.api.onValueChanged(t.PRODUCT_COUNT, (i) => this._onDataChange(t.PRODUCT_COUNT, i
|
|
292
|
+
}), this.api.onValueChanged(t.PRODUCT_COUNT, (i) => this._onDataChange(t.PRODUCT_COUNT, String(i))), this.api.onValueChanged(t.PRODUCT_IN_ROW, (i) => this._onDataChange(t.PRODUCT_IN_ROW, i)), this.api.onValueChanged(t.SHUFFLE_PRODUCTS, (i) => this._onDataChange(t.SHUFFLE_PRODUCTS, i)), this.api.onValueChanged(t.RESPONSIVE, (i) => this._onDataChange(t.RESPONSIVE, i)), this.addFilterListener = this._onFilterSelectClick.bind(this), this.addFilterButton = this.getContainer().querySelector("#guido__btn-add-filter"), (o = this.addFilterButton) == null || o.addEventListener("click", this.addFilterListener);
|
|
293
293
|
}
|
|
294
294
|
_listenStateUpdates() {
|
|
295
295
|
this.storeUnsubscription = this.store.$subscribe((e) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ExtensionBuilder as e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { UnsubscribeBlock as i } from "./block.js";
|
|
3
3
|
import { UnsubscribeControl as t } from "./control.js";
|
|
4
|
-
import { PreviewUIElement as
|
|
5
|
-
import { UnsubscribeIconsRegistry as
|
|
6
|
-
import { SettingsPanel as
|
|
4
|
+
import { PreviewUIElement as s } from "./elements/preview.js";
|
|
5
|
+
import { UnsubscribeIconsRegistry as o } from "./iconsRegistry.js";
|
|
6
|
+
import { SettingsPanel as r } from "./settingsPanel.js";
|
|
7
7
|
import n from "./styles.css.js";
|
|
8
|
-
import { UnsubscribeTagRegistry as
|
|
9
|
-
const
|
|
8
|
+
import { UnsubscribeTagRegistry as c } from "./tagRegistry.js";
|
|
9
|
+
const g = new e().addBlock(i).withSettingsPanelRegistry(r).addControl(t).addUiElement(s).addStyles(n).withLocalization({
|
|
10
10
|
en: {
|
|
11
|
-
"Unsubscribe Block": "Unsubscribe
|
|
12
|
-
"Unsubscribe Block Description": "
|
|
11
|
+
"Unsubscribe Block": "Unsubscribe",
|
|
12
|
+
"Unsubscribe Block Description": "Unsubscribe lets you add an Unsubscribe Link to direct users to opt out of receiving your messages.",
|
|
13
13
|
"Select Template": "Select Template",
|
|
14
14
|
"Unsubscribe Template": "Unsubscribe Template",
|
|
15
15
|
Showing: "Showing",
|
|
16
16
|
of: "of"
|
|
17
17
|
}
|
|
18
|
-
}).withUiElementTagRegistry(
|
|
18
|
+
}).withUiElementTagRegistry(c).withIconsRegistry(o).build();
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
g as default
|
|
21
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var c = (T, r, e) => r in T ? I(T, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[r] = e;
|
|
3
|
+
var u = (T, r, e) => c(T, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { Control as O, UIElementType as t, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
class _ extends O {
|
|
6
6
|
constructor() {
|
|
@@ -19,38 +19,37 @@ class _ extends O {
|
|
|
19
19
|
this.lastBlockInstanceId = null;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Gets the
|
|
23
|
-
* @returns The
|
|
22
|
+
* Gets the Items block container element from the current node.
|
|
23
|
+
* @returns The container element or null if not found
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return null;
|
|
28
|
-
const e = this.currentNode.closest(".items-block-v2");
|
|
29
|
-
return e ? e.querySelector("esd-config-block") : null;
|
|
25
|
+
getItemsBlockContainer() {
|
|
26
|
+
return this.currentNode ? this.currentNode.closest(".items-block-v2") : null;
|
|
30
27
|
}
|
|
31
28
|
/**
|
|
32
|
-
* Gets the current block instance ID from the config
|
|
33
|
-
* @param blockInstanceIdAttribute - The attribute name for block instance ID (default: 'data-block-instance-id')
|
|
29
|
+
* Gets the current block instance ID from the node config (Stripo V2).
|
|
34
30
|
* @returns The block instance ID or null if not found
|
|
35
31
|
*/
|
|
36
|
-
getBlockInstanceId(
|
|
37
|
-
const
|
|
38
|
-
|
|
32
|
+
getBlockInstanceId() {
|
|
33
|
+
const e = this.getItemsBlockContainer();
|
|
34
|
+
if (!e)
|
|
35
|
+
return null;
|
|
36
|
+
const n = e.getNodeConfig();
|
|
37
|
+
return n && typeof n.blockInstanceId == "string" ? n.blockInstanceId : null;
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
40
|
* Handles block instance change detection and syncing.
|
|
42
|
-
* This is a helper method for controls that need to sync
|
|
43
|
-
*
|
|
41
|
+
* This is a helper method for controls that need to sync config when switching between block instances.
|
|
42
|
+
* Uses Stripo V2 nodeConfig API for block instance tracking.
|
|
43
|
+
* @param syncFunction - Function to call when block instance changes (to sync from node config)
|
|
44
44
|
* @param updateUI - Function to call to update the UI (called both on change and when same block)
|
|
45
|
-
* @param blockInstanceIdAttribute - The attribute name for block instance ID (default: 'data-block-instance-id')
|
|
46
45
|
* @returns true if block instance changed, false otherwise
|
|
47
46
|
*/
|
|
48
|
-
handleBlockInstanceChange(e, n
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
47
|
+
handleBlockInstanceChange(e, n) {
|
|
48
|
+
const E = this.getBlockInstanceId();
|
|
49
|
+
if (!E)
|
|
51
50
|
return !1;
|
|
52
|
-
const
|
|
53
|
-
return
|
|
51
|
+
const o = E !== this.lastBlockInstanceId;
|
|
52
|
+
return o ? (this.currentNode && e(this.currentNode), n(), this.lastBlockInstanceId = E) : n(), o;
|
|
54
53
|
}
|
|
55
54
|
_GuLabel({ text: e, name: n = "" }) {
|
|
56
55
|
return `
|
|
@@ -80,7 +79,7 @@ class _ extends O {
|
|
|
80
79
|
class="${o}"
|
|
81
80
|
${$.SELECTPICKER.name}="${e}"
|
|
82
81
|
${$.SELECTPICKER.placeholder}="${n}">
|
|
83
|
-
${E.map((
|
|
82
|
+
${E.map((a) => this._GuSelectItem(a)).join("")}
|
|
84
83
|
</${t.SELECTPICKER}>
|
|
85
84
|
`;
|
|
86
85
|
}
|
|
@@ -168,11 +167,11 @@ class _ extends O {
|
|
|
168
167
|
*/
|
|
169
168
|
_GuOrderable(e, n) {
|
|
170
169
|
let E = "";
|
|
171
|
-
n.forEach((
|
|
170
|
+
n.forEach((a) => {
|
|
172
171
|
const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
|
|
173
172
|
E += `
|
|
174
|
-
<${t.ORDERABLE_ITEM} ${l}="${
|
|
175
|
-
${
|
|
173
|
+
<${t.ORDERABLE_ITEM} ${l}="${a.key}">
|
|
174
|
+
${a.content}
|
|
176
175
|
</${t.ORDERABLE_ITEM}>
|
|
177
176
|
`;
|
|
178
177
|
});
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import { TextAlignBuiltInControl as
|
|
2
|
-
function $(r, t, n) {
|
|
3
|
-
return class extends o {
|
|
4
|
-
getId() {
|
|
5
|
-
return r;
|
|
6
|
-
}
|
|
7
|
-
getTargetNodes(e) {
|
|
8
|
-
return !t || !n ? [e] : e.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
1
|
+
import { TextAlignBuiltInControl as l, TextColorBuiltInControl as s, TextSizeBuiltInControl as u, TextStyleBuiltInControl as i, TextFontFamilyBuiltInControl as c, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as a, ImageSizeBuiltInControl as g, ImageMarginsBuiltInControl as x, ButtonAlignBuiltInControl as C, ButtonBorderBuiltInControl as B, ButtonBorderRadiusBuiltInControl as T, ButtonColorBuiltInControl as I, ButtonFontFamilyBuiltInControl as f, ButtonMarginsBuiltInControl as y, ButtonPaddingsBuiltInControl as m, ButtonTextBuiltInControl as A, ButtonTextSizeBuiltInControl as S, ButtonTextStyleAndFontColorBuiltInControl as N, ButtonFitToContainerBuiltInControl as b, TextLineSpacingBuiltInControl as q } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
12
2
|
function k(r, t, n) {
|
|
13
3
|
return class extends l {
|
|
14
4
|
getId() {
|
|
@@ -69,28 +59,28 @@ function P(r, t, n) {
|
|
|
69
59
|
}
|
|
70
60
|
};
|
|
71
61
|
}
|
|
72
|
-
function
|
|
73
|
-
return class extends
|
|
62
|
+
function h(r, t, n) {
|
|
63
|
+
return class extends a {
|
|
74
64
|
getId() {
|
|
75
65
|
return r;
|
|
76
66
|
}
|
|
77
67
|
getTargetNodes(e) {
|
|
78
|
-
return [e];
|
|
68
|
+
return !t || !n ? [e] : e.closest(n).querySelectorAll(`[esd-extension-block-id="${t}"]`);
|
|
79
69
|
}
|
|
80
70
|
};
|
|
81
71
|
}
|
|
82
|
-
function
|
|
83
|
-
return class extends
|
|
72
|
+
function L(r, t, n) {
|
|
73
|
+
return class extends q {
|
|
84
74
|
getId() {
|
|
85
75
|
return r;
|
|
86
76
|
}
|
|
87
77
|
getTargetNodes(e) {
|
|
88
|
-
return e
|
|
78
|
+
return [e];
|
|
89
79
|
}
|
|
90
80
|
};
|
|
91
81
|
}
|
|
92
|
-
function
|
|
93
|
-
return class extends
|
|
82
|
+
function R(r, t, n = ".ins-recommendation-product-container") {
|
|
83
|
+
return class extends C {
|
|
94
84
|
getId() {
|
|
95
85
|
return r;
|
|
96
86
|
}
|
|
@@ -100,7 +90,7 @@ function h(r, t, n = ".ins-recommendation-product-container") {
|
|
|
100
90
|
};
|
|
101
91
|
}
|
|
102
92
|
function j(r, t, n = ".ins-recommendation-product-container") {
|
|
103
|
-
return class extends
|
|
93
|
+
return class extends I {
|
|
104
94
|
getId() {
|
|
105
95
|
return r;
|
|
106
96
|
}
|
|
@@ -120,7 +110,7 @@ function v(r, t, n = ".ins-recommendation-product-container") {
|
|
|
120
110
|
};
|
|
121
111
|
}
|
|
122
112
|
function w(r, t, n = ".ins-recommendation-product-container") {
|
|
123
|
-
return class extends
|
|
113
|
+
return class extends T {
|
|
124
114
|
getId() {
|
|
125
115
|
return r;
|
|
126
116
|
}
|
|
@@ -140,7 +130,7 @@ function D(r, t, n = ".ins-recommendation-product-container") {
|
|
|
140
130
|
};
|
|
141
131
|
}
|
|
142
132
|
function E(r, t, n = ".ins-recommendation-product-container") {
|
|
143
|
-
return class extends
|
|
133
|
+
return class extends y {
|
|
144
134
|
getId() {
|
|
145
135
|
return r;
|
|
146
136
|
}
|
|
@@ -150,7 +140,7 @@ function E(r, t, n = ".ins-recommendation-product-container") {
|
|
|
150
140
|
};
|
|
151
141
|
}
|
|
152
142
|
function G(r, t, n = ".ins-recommendation-product-container") {
|
|
153
|
-
return class extends
|
|
143
|
+
return class extends m {
|
|
154
144
|
getId() {
|
|
155
145
|
return r;
|
|
156
146
|
}
|
|
@@ -169,7 +159,7 @@ function H(r, t, n = ".ins-recommendation-product-container") {
|
|
|
169
159
|
}
|
|
170
160
|
};
|
|
171
161
|
}
|
|
172
|
-
function J(r, t, n) {
|
|
162
|
+
function J(r, t, n = ".ins-recommendation-product-container") {
|
|
173
163
|
return class extends S {
|
|
174
164
|
getId() {
|
|
175
165
|
return r;
|
|
@@ -190,7 +180,7 @@ function K(r, t, n) {
|
|
|
190
180
|
};
|
|
191
181
|
}
|
|
192
182
|
function O(r, t, n) {
|
|
193
|
-
return class extends
|
|
183
|
+
return class extends b {
|
|
194
184
|
getId() {
|
|
195
185
|
return r;
|
|
196
186
|
}
|
|
@@ -205,30 +195,50 @@ function Q(r, t, n) {
|
|
|
205
195
|
return r;
|
|
206
196
|
}
|
|
207
197
|
getTargetNodes(e) {
|
|
208
|
-
|
|
198
|
+
try {
|
|
199
|
+
const o = e.closest(n);
|
|
200
|
+
return o ? o.querySelectorAll(`[esd-extension-block-id="${t}"]`) : [];
|
|
201
|
+
} catch {
|
|
202
|
+
return [];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function U(r, t, n) {
|
|
208
|
+
return class extends x {
|
|
209
|
+
getId() {
|
|
210
|
+
return r;
|
|
211
|
+
}
|
|
212
|
+
getTargetNodes(e) {
|
|
213
|
+
try {
|
|
214
|
+
const o = e.closest(n);
|
|
215
|
+
return o ? o.querySelectorAll(`[esd-extension-block-id="${t}"]`) : [];
|
|
216
|
+
} catch {
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
209
219
|
}
|
|
210
220
|
};
|
|
211
221
|
}
|
|
212
222
|
export {
|
|
213
223
|
R as createButtonAlignControl,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
v as createButtonBorderControl,
|
|
225
|
+
w as createButtonBorderRadiusControl,
|
|
226
|
+
j as createButtonColorControl,
|
|
227
|
+
O as createButtonFitToContainerControl,
|
|
228
|
+
D as createButtonFontFamilyControl,
|
|
229
|
+
E as createButtonMarginsControl,
|
|
230
|
+
G as createButtonPaddingsControl,
|
|
231
|
+
H as createButtonTextControl,
|
|
232
|
+
J as createButtonTextSizeControl,
|
|
233
|
+
K as createButtonTextStyleAndFontColorControl,
|
|
234
|
+
U as createImageMarginsControl,
|
|
235
|
+
Q as createImageSizeControl,
|
|
236
|
+
h as createPaddingsControl,
|
|
237
|
+
k as createTextAlignControl,
|
|
238
|
+
P as createTextBackgroundColorControl,
|
|
239
|
+
p as createTextColorControl,
|
|
240
|
+
M as createTextFontFamilyControl,
|
|
231
241
|
L as createTextLineSpacingControl,
|
|
232
|
-
|
|
233
|
-
|
|
242
|
+
F as createTextSizeControl,
|
|
243
|
+
z as createTextStyleControl
|
|
234
244
|
};
|
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-3bf5c743] .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}
|