@useinsider/guido 2.1.0-beta.36cf49a → 2.1.0-beta.3889d62

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.
@@ -1,8 +1,8 @@
1
1
  var B = Object.defineProperty;
2
- var U = (e, t, r) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var M = (e, t, r) => U(e, typeof t != "symbol" ? t + "" : t, r);
2
+ var U = (r, t, e) => t in r ? B(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var M = (r, t, e) => U(r, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { productPairs as v } from "../../extensions/Blocks/Items/enums/productEnums.js";
5
- import { ItemInCartOptions as E, DefaultConfigValues as g, SETTINGS_ENUMS as u } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
5
+ import { ItemInCartOptions as E, DefaultConfigValues as g, SETTINGS_ENUMS as d } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
6
6
  import { getDefaultTemplate as K } from "../../extensions/Blocks/Items/template.js";
7
7
  const w = {
8
8
  img: {
@@ -74,76 +74,76 @@ const w = {
74
74
  function F() {
75
75
  return String(Date.now() + Math.floor(Math.random() * 1e3));
76
76
  }
77
- function q(e) {
78
- return e ? {
79
- CartItems: u.ITEMS_TYPE.CART_ITEMS,
80
- BrowsedItems: u.ITEMS_TYPE.BROWSED_ITEMS,
81
- PurchasedItems: u.ITEMS_TYPE.PURCHASED_ITEMS,
82
- CART_ITEMS: u.ITEMS_TYPE.CART_ITEMS,
83
- BROWSED_ITEMS: u.ITEMS_TYPE.BROWSED_ITEMS,
84
- PURCHASED_ITEMS: u.ITEMS_TYPE.PURCHASED_ITEMS
85
- }[e] || u.ITEMS_TYPE.CART_ITEMS : u.ITEMS_TYPE.CART_ITEMS;
77
+ function q(r) {
78
+ return r ? {
79
+ CartItems: d.ITEMS_TYPE.CART_ITEMS,
80
+ BrowsedItems: d.ITEMS_TYPE.BROWSED_ITEMS,
81
+ PurchasedItems: d.ITEMS_TYPE.PURCHASED_ITEMS,
82
+ CART_ITEMS: d.ITEMS_TYPE.CART_ITEMS,
83
+ BROWSED_ITEMS: d.ITEMS_TYPE.BROWSED_ITEMS,
84
+ PURCHASED_ITEMS: d.ITEMS_TYPE.PURCHASED_ITEMS
85
+ }[r] || d.ITEMS_TYPE.CART_ITEMS : d.ITEMS_TYPE.CART_ITEMS;
86
86
  }
87
- function R(e) {
88
- const t = (a, o) => a == null ? o : a === "1" || a === "true", r = (a, o) => a || o, c = e["data-type"] || e["data-source"], i = q(c);
89
- let n = e["data-cart_items_select_control_value"] || g.cartItemsSelectControlValue;
87
+ function R(r) {
88
+ const t = (a, o) => a == null ? o : a === "1" || a === "true", e = (a, o) => a || o, i = r["data-type"] || r["data-source"], l = q(i);
89
+ let n = r["data-cart_items_select_control_value"] || g.cartItemsSelectControlValue;
90
90
  if (n && !n.includes("{{") && /^\d+$/.test(n)) {
91
- const a = parseInt(n) - 1, o = E[i];
91
+ const a = parseInt(n) - 1, o = E[l];
92
92
  o && o[a] && (n = o[a].value);
93
93
  }
94
94
  return {
95
95
  initialized: !0,
96
- blockInstanceId: r(e["data-block-instance-id"], F()),
97
- source: i,
98
- type: i,
96
+ blockInstanceId: e(r["data-block-instance-id"], F()),
97
+ source: l,
98
+ type: l,
99
99
  itemsSelectValue: n,
100
- orientation: e["data-card_orientation_control_value"] || u.ORIENTATION.VERTICAL,
101
- nameTrimming: t(e["data-product_name_control_trim"], !0),
102
- priceHideDiscount: t(e["data-product_price_control_nodup"], !0),
103
- priceFormatted: t(e["data-product_price_control_formated"], !0),
104
- priceSinglePrice: t(e["data-product_price_control_single_price"], !1),
105
- priceCurrencySymbol: r(
106
- e["data-product_price_control_currency_symbol"],
100
+ orientation: r["data-card_orientation_control_value"] || d.ORIENTATION.VERTICAL,
101
+ nameTrimming: t(r["data-product_name_control_trim"], !0),
102
+ priceHideDiscount: t(r["data-product_price_control_nodup"], !0),
103
+ priceFormatted: t(r["data-product_price_control_formated"], !0),
104
+ priceSinglePrice: t(r["data-product_price_control_single_price"], !1),
105
+ priceCurrencySymbol: e(
106
+ r["data-product_price_control_currency_symbol"],
107
107
  g.productPriceCurrencySymbolControlValue
108
108
  ),
109
- priceCurrencyLocation: r(
110
- e["data-product_price_currency_location"],
109
+ priceCurrencyLocation: e(
110
+ r["data-product_price_currency_location"],
111
111
  g.productPriceCurrencyLocationControlValue
112
112
  ),
113
- priceOrientation: e["data-product_original_price_control_orientation"] || "horizontal",
114
- quantityControlEnabled: t(e["data-product_quantity_control_enabled"], !0),
115
- buttonLink: r(e["data-product_button_link"], g.productButtonLinkControlValue),
116
- imageLink: r(e["data-product_image_link"], g.productImageLinkControlValue),
117
- buttonLabel: r(e["data-product_button_control_label"], "Buy"),
118
- buttonFullWidth: t(e["data-product_button_control_atw"], !0),
119
- imageVisible: t(e["data-product_image_control_enabled"], !0),
120
- nameVisible: t(e["data-product_name_control_enabled"], !0),
121
- quantityVisible: t(e["data-product_quantity_control_enabled"], !0),
122
- priceVisible: t(e["data-product_price_control_enabled"], !0),
123
- originalPriceVisible: t(e["data-product_original_price_control_enabled"], !0),
124
- buttonVisible: t(e["data-product_button_control_enabled"], !0)
113
+ priceOrientation: r["data-product_original_price_control_orientation"] || "horizontal",
114
+ quantityControlEnabled: t(r["data-product_quantity_control_enabled"], !0),
115
+ buttonLink: e(r["data-product_button_link"], g.productButtonLinkControlValue),
116
+ imageLink: e(r["data-product_image_link"], g.productImageLinkControlValue),
117
+ buttonLabel: e(r["data-product_button_control_label"], "Buy"),
118
+ buttonFullWidth: t(r["data-product_button_control_atw"], !0),
119
+ imageVisible: t(r["data-product_image_control_enabled"], !0),
120
+ nameVisible: t(r["data-product_name_control_enabled"], !0),
121
+ quantityVisible: t(r["data-product_quantity_control_enabled"], !0),
122
+ priceVisible: t(r["data-product_price_control_enabled"], !0),
123
+ originalPriceVisible: t(r["data-product_original_price_control_enabled"], !0),
124
+ buttonVisible: t(r["data-product_button_control_enabled"], !0)
125
125
  };
126
126
  }
127
- const O = {
127
+ const $ = {
128
128
  ins_apr: "CART_ITEMS",
129
129
  browsed_item: "BROWSED_ITEMS",
130
130
  purchased_item: "PURCHASED_ITEMS"
131
131
  };
132
- function $(e, t) {
133
- const r = {
132
+ function x(r, t) {
133
+ const e = {
134
134
  CART_ITEMS: `{{Abandoned Cart Item (${t}) Image}}`,
135
135
  BROWSED_ITEMS: `{{Browsed Item (${t}) Image}}`,
136
136
  PURCHASED_ITEMS: `{{Purchased Item (${t}) Image}}`
137
137
  };
138
- return r[e] || r.CART_ITEMS;
138
+ return e[r] || e.CART_ITEMS;
139
139
  }
140
- function x(e, t) {
141
- const r = {
140
+ function O(r, t) {
141
+ const e = {
142
142
  CART_ITEMS: `{{Abandoned Cart Item (${t}) Url}}`,
143
143
  BROWSED_ITEMS: `{{Browsed Item (${t}) Url}}`,
144
144
  PURCHASED_ITEMS: `{{Purchased Item (${t}) Url}}`
145
145
  };
146
- return r[e] || r.CART_ITEMS;
146
+ return e[r] || e.CART_ITEMS;
147
147
  }
148
148
  class V {
149
149
  constructor() {
@@ -152,12 +152,12 @@ class V {
152
152
  }
153
153
  migrate(t) {
154
154
  try {
155
- let r = this.removeJinjaConditionals(t);
156
- r = this.replaceTemplateVariables(r);
157
- const c = this.parser.parseFromString(r, "text/html"), i = c.querySelectorAll(
155
+ let e = this.removeJinjaConditionals(t);
156
+ e = this.replaceTemplateVariables(e);
157
+ const i = this.parser.parseFromString(e, "text/html"), l = i.querySelectorAll(
158
158
  "td.esd-cart-items-block, td.esd-browsed-items-block, td.esd-purchased-items-block"
159
159
  );
160
- return i.length === 0 ? (console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), r) : (i.forEach((n) => {
160
+ return l.length === 0 ? (console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), e) : (l.forEach((n) => {
161
161
  const a = this.extractConfiguration(n), o = K({
162
162
  orientation: a.orientation,
163
163
  itemsType: a.itemsType,
@@ -173,19 +173,19 @@ class V {
173
173
  originalPriceStyles: a.originalPriceStyles,
174
174
  quantityStyles: a.quantityStyles,
175
175
  nodeConfig: R(a.configBlockAttributes)
176
- }), l = this.parser.parseFromString(
176
+ }), c = this.parser.parseFromString(
177
177
  `<table><tbody><tr>${o}</tr></tbody></table>`,
178
178
  "text/html"
179
179
  ).querySelector("td");
180
- if (l && n.parentNode) {
180
+ if (c && n.parentNode) {
181
181
  const f = R(a.configBlockAttributes);
182
- l.setAttribute("esd-ext-config", JSON.stringify(f));
183
- const d = l.querySelector("esd-config-block");
184
- d && d.remove(), n.parentNode.replaceChild(l, n);
182
+ c.setAttribute("esd-ext-config", JSON.stringify(f));
183
+ const u = c.querySelector("esd-config-block");
184
+ u && u.remove(), n.parentNode.replaceChild(c, n);
185
185
  }
186
- }), c.documentElement.outerHTML);
187
- } catch (r) {
188
- return console.error("ItemsBlockMigrator failed:", r), t;
186
+ }), i.documentElement.outerHTML);
187
+ } catch (e) {
188
+ return console.error("ItemsBlockMigrator failed:", e), t;
189
189
  }
190
190
  }
191
191
  /**
@@ -196,22 +196,22 @@ class V {
196
196
  */
197
197
  extractConfiguration(t) {
198
198
  var C, D, P;
199
- const r = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", c = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", i = parseInt(c) - 1, n = E[r], a = ((P = n == null ? void 0 : n[i]) == null ? void 0 : P.value) || n[0].value, o = t.querySelector('[product-attr="price"]'), _ = (o == null ? void 0 : o.getAttribute("data-currency_symbol")) || "USD", f = ((o == null ? void 0 : o.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", d = (o == null ? void 0 : o.getAttribute("data-formated")) !== "false", s = this.extractConfigBlockAttributes(t, r, c), S = s["data-card_orientation_control_value"];
200
- let b;
201
- S ? b = S === "horizontal" ? "horizontal" : "vertical" : b = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
202
- const p = t.querySelector('a[product-attr="name"]'), I = (p == null ? void 0 : p.getAttribute("style")) || void 0, y = t.querySelector('a[product-attr="button"]'), m = (y == null ? void 0 : y.getAttribute("style")) || void 0, h = (o == null ? void 0 : o.getAttribute("style")) || void 0, T = t.querySelector("p.original-price"), k = (T == null ? void 0 : T.getAttribute("style")) || void 0, A = t.querySelector('[product-attr="quantity"]'), L = (A == null ? void 0 : A.getAttribute("style")) || void 0;
199
+ const e = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", i = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", l = parseInt(i) - 1, n = E[e], a = ((P = n == null ? void 0 : n[l]) == null ? void 0 : P.value) || n[0].value, o = t.querySelector('[product-attr="price"]'), _ = (o == null ? void 0 : o.getAttribute("data-currency_symbol")) || "USD", f = ((o == null ? void 0 : o.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", u = (o == null ? void 0 : o.getAttribute("data-formated")) !== "false", s = this.extractConfigBlockAttributes(t, e, i), b = s["data-card_orientation_control_value"];
200
+ let S;
201
+ b ? S = b === "horizontal" ? "horizontal" : "vertical" : S = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
202
+ const p = t.querySelector('a[product-attr="name"]'), T = (p == null ? void 0 : p.getAttribute("style")) || void 0, y = t.querySelector('a[product-attr="button"]'), m = (y == null ? void 0 : y.getAttribute("style")) || void 0, k = (o == null ? void 0 : o.getAttribute("style")) || void 0, I = t.querySelector("p.original-price"), h = (I == null ? void 0 : I.getAttribute("style")) || void 0, A = t.querySelector('[product-attr="quantity"]'), L = (A == null ? void 0 : A.getAttribute("style")) || void 0;
203
203
  return {
204
- orientation: b,
205
- itemsType: r,
204
+ orientation: S,
205
+ itemsType: e,
206
206
  itemId: a,
207
207
  currencySymbol: _,
208
208
  currencyLocation: f,
209
- formattedPrice: d,
209
+ formattedPrice: u,
210
210
  configBlockAttributes: s,
211
- nameStyles: I,
211
+ nameStyles: T,
212
212
  buttonStyles: m,
213
- priceStyles: h,
214
- originalPriceStyles: k,
213
+ priceStyles: k,
214
+ originalPriceStyles: h,
215
215
  quantityStyles: L
216
216
  };
217
217
  }
@@ -222,17 +222,17 @@ class V {
222
222
  * @param itemsType - The type of items (CART_ITEMS, BROWSED_ITEMS, PURCHASED_ITEMS)
223
223
  * @param itemNumber - The item number (1-based index)
224
224
  */
225
- extractConfigBlockAttributes(t, r, c) {
226
- const i = t.querySelector("esd-config-block"), n = {};
227
- if (!i)
225
+ extractConfigBlockAttributes(t, e, i) {
226
+ const l = t.querySelector("esd-config-block"), n = {};
227
+ if (!l)
228
228
  return this.getDefaultConfigBlockAttributes();
229
- if (Array.from(i.attributes).forEach((o) => {
229
+ if (Array.from(l.attributes).forEach((o) => {
230
230
  o.name.startsWith("data-") && (n[o.name] = o.value);
231
231
  }), n["data-cart_items_select_control_value"]) {
232
232
  const o = n["data-cart_items_select_control_value"];
233
233
  if (/^\d+$/.test(o)) {
234
- const _ = parseInt(o) - 1, l = E[r];
235
- l && l[_] && (n["data-cart_items_select_control_value"] = l[_].value);
234
+ const _ = parseInt(o) - 1, c = E[e];
235
+ c && c[_] && (n["data-cart_items_select_control_value"] = c[_].value);
236
236
  }
237
237
  }
238
238
  if (n["data-product_price_control_curency"]) {
@@ -242,7 +242,7 @@ class V {
242
242
  }
243
243
  (!n["data-product_price_control_currency_symbol"] || n["data-product_price_control_currency_symbol"].trim() === "") && (n["data-product_price_control_currency_symbol"] = "USD");
244
244
  const a = { ...this.getDefaultConfigBlockAttributes(), ...n };
245
- return a["data-type"] = r, a["data-source"] = r, a["data-product_image_link"] = $(r, c), a["data-product_button_link"] = x(r, c), a;
245
+ return a["data-type"] = e, a["data-source"] = e, a["data-product_image_link"] = x(e, i), a["data-product_button_link"] = O(e, i), a;
246
246
  }
247
247
  /**
248
248
  * Returns default esd-config-block attributes based on the old template structure
@@ -297,22 +297,18 @@ class V {
297
297
  * - Cart Items: ins_apr_total_product_kind, ins_apr_price_N, ins_apr_originalprice_N
298
298
  * - Browsed Items: browsed_item_total_product_kind, browsed_item_price_N, browsed_item_originalprice_N
299
299
  * - Purchased Items: purchased_item_total_product_kind, purchased_item_price_N, purchased_item_originalprice_N
300
- *
301
- * IMPORTANT: Preserves the esd-custom-display-conditions attribute on <body> which
302
- * contains display condition Jinja scripts that should NOT be removed.
303
300
  */
304
301
  removeJinjaConditionals(t) {
305
- const r = "__ESD_DISPLAY_CONDITIONS_PLACEHOLDER__", c = t.match(/esd-custom-display-conditions="[^"]*"/);
306
- let i = c ? t.replace(c[0], r) : t;
307
- return i = i.replace(
302
+ let e = t.replace(
308
303
  /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_total_product_kind\s*(&gt;|>)\s*\d+\s*%\}/g,
309
304
  ""
310
- ), i = i.replace(
305
+ );
306
+ return e = e.replace(
311
307
  /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_price_\d+\s*(!&#61;|!=)\s*\1_originalprice_\d+\s*%\}/g,
312
308
  ""
313
- ), i = i.replace(/\{%\s*endif\s*%\}/g, ""), c && (i = i.replace(r, c[0])), i = i.replace(/\n\s*\n\s*\n/g, `
309
+ ), e = e.replace(/\{%\s*endif\s*%\}/g, ""), e = e.replace(/\n\s*\n\s*\n/g, `
314
310
 
315
- `), i;
311
+ `), e;
316
312
  }
317
313
  /**
318
314
  * Replaces template variables with default values from productPairs
@@ -324,31 +320,31 @@ class V {
324
320
  * - {{purchased_item_formattedprice_5}} → '1,490.49' (PURCHASED_ITEMS)
325
321
  */
326
322
  replaceTemplateVariables(t) {
327
- const { PAIRS_FOR_EXTENSION: r } = v;
328
- return t.replace(/{{([^}]+)}}/g, (c, i) => {
329
- const n = i.match(/^(ins_apr|browsed_item|purchased_item)_([a-z_]+)_(\d+)$/);
323
+ const { PAIRS_FOR_EXTENSION: e } = v;
324
+ return t.replace(/{{([^}]+)}}/g, (i, l) => {
325
+ const n = l.match(/^(ins_apr|browsed_item|purchased_item)_([a-z_]+)_(\d+)$/);
330
326
  if (!n)
331
- return c;
332
- const [, a, o, _] = n, l = O[a];
333
- if (!l)
334
- return console.warn(`Unknown variable prefix: ${a}`), c;
327
+ return i;
328
+ const [, a, o, _] = n, c = $[a];
329
+ if (!c)
330
+ return console.warn(`Unknown variable prefix: ${a}`), i;
335
331
  const f = w[o];
336
332
  if (!f)
337
- return console.warn(`Unknown variable suffix mapping for: ${o}`), c;
338
- const { pairsKey: d, defaultKey: s, isArray: S } = f, p = r[d][l];
333
+ return console.warn(`Unknown variable suffix mapping for: ${o}`), i;
334
+ const { pairsKey: u, defaultKey: s, isArray: b } = f, p = e[u][c];
339
335
  if (!p)
340
- return console.warn(`No data found for: ${d}.${l}`), c;
341
- if (S) {
336
+ return console.warn(`No data found for: ${u}.${c}`), i;
337
+ if (b) {
342
338
  const y = parseInt(_) - 1, m = p[s];
343
- return Array.isArray(m) && m[y] ? m[y] : (console.warn(`Array value not found: ${d}.${l}.${s}[${y}]`), c);
339
+ return Array.isArray(m) && m[y] ? m[y] : (console.warn(`Array value not found: ${u}.${c}.${s}[${y}]`), i);
344
340
  }
345
- const I = p[s];
346
- return I !== void 0 ? String(I) : (console.warn(`Default value not found: ${d}.${l}.${s}`), c);
341
+ const T = p[s];
342
+ return T !== void 0 ? String(T) : (console.warn(`Default value not found: ${u}.${c}.${s}`), i);
347
343
  });
348
344
  }
349
345
  }
350
- function G(e) {
351
- return new V().migrate(e);
346
+ function G(r) {
347
+ return new V().migrate(r);
352
348
  }
353
349
  export {
354
350
  G as migrateItemsBlock
@@ -1,44 +1,47 @@
1
- import { useHttp as m } from "../composables/useHttp.js";
2
- import { useToaster as i } from "../composables/useToaster.js";
3
- import { MAX_DEFAULT_TEMPLATE_ID as p } from "../enums/defaults.js";
4
- const y = () => {
5
- const { get: r } = m(), { handleError: o } = i();
1
+ import { useHttp as l } from "../composables/useHttp.js";
2
+ import { useToaster as u } from "../composables/useToaster.js";
3
+ import { MAX_DEFAULT_TEMPLATE_ID as d } from "../enums/defaults.js";
4
+ import f from "../static/templates/empty/index.html.js";
5
+ import g from "../static/templates/empty/style.css.js";
6
+ const D = () => {
7
+ const { get: o } = l(), { handleError: a } = u();
6
8
  return {
7
9
  getToken: async () => {
8
10
  try {
9
- const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await r(`/stripo/get-user-token?test=${t}`);
11
+ const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await o(`/stripo/get-user-token?test=${t}`);
10
12
  return e.body.token;
11
13
  } catch (t) {
12
- return o(t, "Failed to fetch token"), "";
14
+ return a(t, "Failed to fetch token"), "";
13
15
  }
14
16
  },
15
17
  getCustomFonts: async () => {
16
18
  try {
17
- const { data: t = [] } = await r("/stripo/get-partner-custom-fonts");
19
+ const { data: t = [] } = await o("/stripo/get-partner-custom-fonts");
18
20
  return t.map((e) => ({
19
21
  ...e,
20
22
  active: !0
21
23
  }));
22
24
  } catch (t) {
23
- return o(t, "Failed to fetch custom fonts"), [];
25
+ return a(t, "Failed to fetch custom fonts"), [];
24
26
  }
25
27
  },
26
28
  getDefaultTemplate: async () => {
27
29
  const t = {
28
- html: "",
29
- css: ""
30
+ html: f,
31
+ css: g
30
32
  };
31
33
  try {
32
- const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <= p ? s : 0, { data: n } = await r(
33
- `/stripo/default-template/${l}`
34
- ), a = typeof n == "string" ? JSON.parse(n) : n;
35
- return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t : a;
34
+ const e = new URLSearchParams(window.location.search), c = e.get("default-template"), p = e.get("master"), s = c ? parseInt(c) : 0, m = s >= 1 && s <= d ? s : 0;
35
+ if (!m && !p)
36
+ return t;
37
+ const i = `/stripo/default-template/${m}`, { data: n } = await o(i), r = typeof n == "string" ? JSON.parse(n) : n;
38
+ return !r || typeof r != "object" || !("html" in r) || !("css" in r) ? t : r;
36
39
  } catch (e) {
37
- return o(e, "Failed to fetch default template"), t;
40
+ return a(e, "Failed to fetch default template"), t;
38
41
  }
39
42
  }
40
43
  };
41
44
  };
42
45
  export {
43
- y as useStripoApi
46
+ D as useStripoApi
44
47
  };
@@ -0,0 +1,74 @@
1
+ const t = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta content="width=device-width, initial-scale=1" name="viewport">
7
+ <meta name="x-apple-disable-message-reformatting">
8
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
9
+ <meta content="telephone=no" name="format-detection">
10
+ <title></title>
11
+ <!--[if (mso 16)]><style type="text/css">a{text-decoration:none}</style><![endif]-->
12
+ <!--[if gte mso 9]><style>sup{font-size:100% !important}</style><![endif]-->
13
+ <!--[if gte mso 9]><style>sup{font-size:100% !important}</style><![endif]-->
14
+ <!--[if gte mso 9]><style>sup{font-size:100% !important}</style><![endif]-->
15
+ <!--[if gte mso 9]><style>sup{font-size:100% !important}</style><![endif]-->
16
+ <!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]-->
17
+ </head>
18
+
19
+ <body>
20
+ <div class="es-wrapper-color">
21
+ <!--[if gte mso 9]>
22
+ <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
23
+ <v:fill type="tile" color="#f6f6f6"></v:fill>
24
+ </v:background>
25
+ <![endif]-->
26
+ <table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0">
27
+ <tbody>
28
+ <tr>
29
+ <td class="esd-email-paddings" valign="top">
30
+ <table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center">
31
+ <tbody>
32
+ <tr>
33
+ <td class="esd-stripe" align="center">
34
+ <table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center">
35
+ <tbody>
36
+ <tr>
37
+ <td class="esd-structure es-p20" align="left">
38
+ <table cellpadding="0" cellspacing="0" width="100%">
39
+ <tbody>
40
+ <tr>
41
+ <td width="560" class="esd-container-frame" align="center" valign="top">
42
+ <table cellpadding="0" cellspacing="0" width="100%">
43
+ <tbody>
44
+ <tr>
45
+ <td align="center" class="esd-empty-container" style="display: none;"></td>
46
+ </tr>
47
+ </tbody>
48
+ </table>
49
+ </td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
53
+ </td>
54
+ </tr>
55
+ </tbody>
56
+ </table>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+ </td>
62
+ </tr>
63
+ </tbody>
64
+ </table>
65
+ </div>
66
+ <div style="position: absolute; left: -9999px; top: -9999px; margin: 0px;"></div>
67
+ <div style="position: absolute; left: -9999px; top: -9999px; margin: 0px; padding: 0px; border: 0px none; width: 1px;"></div>
68
+ </body>
69
+
70
+ </html>
71
+ `;
72
+ export {
73
+ t as default
74
+ };
@@ -0,0 +1,779 @@
1
+ const n = `/* CONFIG STYLES Please do not delete and edit CSS styles below */
2
+ /* IMPORTANT THIS STYLES MUST BE ON FINAL EMAIL */
3
+ #outlook a {
4
+ padding: 0;
5
+ }
6
+
7
+ .ExternalClass {
8
+ width: 100%;
9
+ }
10
+
11
+ .ExternalClass,
12
+ .ExternalClass p,
13
+ .ExternalClass span,
14
+ .ExternalClass font,
15
+ .ExternalClass td,
16
+ .ExternalClass div {
17
+ line-height: 100%;
18
+ }
19
+
20
+ .es-button {
21
+ mso-style-priority: 100 !important;
22
+ text-decoration: none !important;
23
+ }
24
+
25
+ a[x-apple-data-detectors] {
26
+ color: inherit !important;
27
+ text-decoration: none !important;
28
+ font-size: inherit !important;
29
+ font-family: inherit !important;
30
+ font-weight: inherit !important;
31
+ line-height: inherit !important;
32
+ }
33
+
34
+ .es-desk-hidden {
35
+ display: none;
36
+ float: left;
37
+ overflow: hidden;
38
+ width: 0;
39
+ max-height: 0;
40
+ line-height: 0;
41
+ mso-hide: all;
42
+ }
43
+
44
+ /* END OF IMPORTANT */
45
+ body {
46
+ width: 100%;
47
+ font-family: arial, 'helvetica neue', helvetica, sans-serif;
48
+ -webkit-text-size-adjust: 100%;
49
+ -ms-text-size-adjust: 100%;
50
+ }
51
+
52
+ table {
53
+ mso-table-lspace: 0pt;
54
+ mso-table-rspace: 0pt;
55
+ border-collapse: collapse;
56
+ border-spacing: 0px;
57
+ }
58
+
59
+ table td,
60
+ html,
61
+ body,
62
+ .es-wrapper {
63
+ padding: 0;
64
+ Margin: 0;
65
+ }
66
+
67
+ .es-content,
68
+ .es-header,
69
+ .es-footer {
70
+ table-layout: fixed !important;
71
+ width: 100%;
72
+ }
73
+
74
+ img {
75
+ display: block;
76
+ border: 0;
77
+ outline: none;
78
+ text-decoration: none;
79
+ -ms-interpolation-mode: bicubic;
80
+ }
81
+
82
+ table tr {
83
+ border-collapse: collapse;
84
+ }
85
+
86
+ p,
87
+ hr {
88
+ Margin: 0;
89
+ }
90
+
91
+ h1,
92
+ h2,
93
+ h3,
94
+ h4,
95
+ h5 {
96
+ Margin: 0;
97
+ line-height: 120%;
98
+ mso-line-height-rule: exactly;
99
+ font-family: arial, 'helvetica neue', helvetica, sans-serif;
100
+ }
101
+
102
+ p,
103
+ ul li,
104
+ ol li,
105
+ a {
106
+ -webkit-text-size-adjust: none;
107
+ -ms-text-size-adjust: none;
108
+ mso-line-height-rule: exactly;
109
+ }
110
+
111
+ .es-left {
112
+ float: left;
113
+ }
114
+
115
+ .es-right {
116
+ float: right;
117
+ }
118
+
119
+ .es-p5 {
120
+ padding: 5px;
121
+ }
122
+
123
+ .es-p5t {
124
+ padding-top: 5px;
125
+ }
126
+
127
+ .es-p5b {
128
+ padding-bottom: 5px;
129
+ }
130
+
131
+ .es-p5l {
132
+ padding-left: 5px;
133
+ }
134
+
135
+ .es-p5r {
136
+ padding-right: 5px;
137
+ }
138
+
139
+ .es-p10 {
140
+ padding: 10px;
141
+ }
142
+
143
+ .es-p10t {
144
+ padding-top: 10px;
145
+ }
146
+
147
+ .es-p10b {
148
+ padding-bottom: 10px;
149
+ }
150
+
151
+ .es-p10l {
152
+ padding-left: 10px;
153
+ }
154
+
155
+ .es-p10r {
156
+ padding-right: 10px;
157
+ }
158
+
159
+ .es-p15 {
160
+ padding: 15px;
161
+ }
162
+
163
+ .es-p15t {
164
+ padding-top: 15px;
165
+ }
166
+
167
+ .es-p15b {
168
+ padding-bottom: 15px;
169
+ }
170
+
171
+ .es-p15l {
172
+ padding-left: 15px;
173
+ }
174
+
175
+ .es-p15r {
176
+ padding-right: 15px;
177
+ }
178
+
179
+ .es-p20 {
180
+ padding: 20px;
181
+ }
182
+
183
+ .es-p20t {
184
+ padding-top: 20px;
185
+ }
186
+
187
+ .es-p20b {
188
+ padding-bottom: 20px;
189
+ }
190
+
191
+ .es-p20l {
192
+ padding-left: 20px;
193
+ }
194
+
195
+ .es-p20r {
196
+ padding-right: 20px;
197
+ }
198
+
199
+ .es-p25 {
200
+ padding: 25px;
201
+ }
202
+
203
+ .es-p25t {
204
+ padding-top: 25px;
205
+ }
206
+
207
+ .es-p25b {
208
+ padding-bottom: 25px;
209
+ }
210
+
211
+ .es-p25l {
212
+ padding-left: 25px;
213
+ }
214
+
215
+ .es-p25r {
216
+ padding-right: 25px;
217
+ }
218
+
219
+ .es-p30 {
220
+ padding: 30px;
221
+ }
222
+
223
+ .es-p30t {
224
+ padding-top: 30px;
225
+ }
226
+
227
+ .es-p30b {
228
+ padding-bottom: 30px;
229
+ }
230
+
231
+ .es-p30l {
232
+ padding-left: 30px;
233
+ }
234
+
235
+ .es-p30r {
236
+ padding-right: 30px;
237
+ }
238
+
239
+ .es-p35 {
240
+ padding: 35px;
241
+ }
242
+
243
+ .es-p35t {
244
+ padding-top: 35px;
245
+ }
246
+
247
+ .es-p35b {
248
+ padding-bottom: 35px;
249
+ }
250
+
251
+ .es-p35l {
252
+ padding-left: 35px;
253
+ }
254
+
255
+ .es-p35r {
256
+ padding-right: 35px;
257
+ }
258
+
259
+ .es-p40 {
260
+ padding: 40px;
261
+ }
262
+
263
+ .es-p40t {
264
+ padding-top: 40px;
265
+ }
266
+
267
+ .es-p40b {
268
+ padding-bottom: 40px;
269
+ }
270
+
271
+ .es-p40l {
272
+ padding-left: 40px;
273
+ }
274
+
275
+ .es-p40r {
276
+ padding-right: 40px;
277
+ }
278
+
279
+ .es-menu td {
280
+ border: 0;
281
+ }
282
+
283
+ .es-menu td a img {
284
+ display: inline !important;
285
+ }
286
+
287
+ /* END CONFIG STYLES */
288
+ a {
289
+ text-decoration: underline;
290
+ }
291
+
292
+ p,
293
+ ul li,
294
+ ol li {
295
+ font-family: arial, 'helvetica neue', helvetica, sans-serif;
296
+ line-height: 150%;
297
+ }
298
+
299
+ ul li,
300
+ ol li {
301
+ Margin-bottom: 15px;
302
+ margin-left: 0;
303
+ }
304
+
305
+ .es-menu td a {
306
+ text-decoration: none;
307
+ display: block;
308
+ font-family: arial, 'helvetica neue', helvetica, sans-serif;
309
+ }
310
+
311
+ .es-wrapper {
312
+ width: 100%;
313
+ height: 100%;
314
+ background-image: ;
315
+ background-repeat: repeat;
316
+ background-position: center top;
317
+ }
318
+
319
+ .es-wrapper-color,
320
+ .es-wrapper {
321
+ background-color: #f6f6f6;
322
+ }
323
+
324
+ .es-header {
325
+ background-color: transparent;
326
+ background-image: ;
327
+ background-repeat: repeat;
328
+ background-position: center top;
329
+ }
330
+
331
+ .es-header-body {
332
+ background-color: transparent;
333
+ }
334
+
335
+ .es-header-body p,
336
+ .es-header-body ul li,
337
+ .es-header-body ol li {
338
+ color: #333333;
339
+ font-size: 14px;
340
+ }
341
+
342
+ .es-header-body a {
343
+ color: #333333;
344
+ font-size: 14px;
345
+ }
346
+
347
+ .es-content-body {
348
+ background-color: #ffffff;
349
+ }
350
+
351
+ .es-content-body p,
352
+ .es-content-body ul li,
353
+ .es-content-body ol li {
354
+ color: #333333;
355
+ font-size: 14px;
356
+ }
357
+
358
+ .es-content-body a {
359
+ color: #333333;
360
+ font-size: 14px;
361
+ }
362
+
363
+ .es-footer {
364
+ background-color: transparent;
365
+ background-image: ;
366
+ background-repeat: repeat;
367
+ background-position: center top;
368
+ }
369
+
370
+ .es-footer-body {
371
+ background-color: #333333;
372
+ }
373
+
374
+ .es-footer-body p,
375
+ .es-footer-body ul li,
376
+ .es-footer-body ol li {
377
+ color: #ffffff;
378
+ font-size: 14px;
379
+ }
380
+
381
+ .es-footer-body a {
382
+ color: #ffffff;
383
+ font-size: 14px;
384
+ }
385
+
386
+ .es-infoblock,
387
+ .es-infoblock p,
388
+ .es-infoblock ul li,
389
+ .es-infoblock ol li {
390
+ line-height: 120%;
391
+ font-size: 12px;
392
+ color: #cccccc;
393
+ }
394
+
395
+ .es-infoblock a {
396
+ font-size: 12px;
397
+ color: #cccccc;
398
+ }
399
+
400
+ h1 {
401
+ font-size: 30px;
402
+ font-style: normal;
403
+ font-weight: normal;
404
+ color: #333333;
405
+ }
406
+
407
+ h2 {
408
+ font-size: 24px;
409
+ font-style: normal;
410
+ font-weight: normal;
411
+ color: #333333;
412
+ }
413
+
414
+ h3 {
415
+ font-size: 20px;
416
+ font-style: normal;
417
+ font-weight: normal;
418
+ color: #333333;
419
+ }
420
+
421
+ .es-header-body h1 a,
422
+ .es-content-body h1 a,
423
+ .es-footer-body h1 a {
424
+ font-size: 30px;
425
+ }
426
+
427
+ .es-header-body h2 a,
428
+ .es-content-body h2 a,
429
+ .es-footer-body h2 a {
430
+ font-size: 24px;
431
+ }
432
+
433
+ .es-header-body h3 a,
434
+ .es-content-body h3 a,
435
+ .es-footer-body h3 a {
436
+ font-size: 20px;
437
+ }
438
+
439
+ a.es-button,
440
+ button.es-button {
441
+ display: inline-block;
442
+ background: #f0f0f0;
443
+ border-radius: 0px;
444
+ font-size: 16px;
445
+ font-family: arial, 'helvetica neue', helvetica, sans-serif;
446
+ font-weight: normal;
447
+ font-style: normal;
448
+ line-height: 120%;
449
+ color: #333333;
450
+ text-decoration: none;
451
+ width: auto;
452
+ text-align: center;
453
+ padding: 5px 30px 5px 30px;
454
+ mso-padding-alt: 0;
455
+ mso-border-alt: 10px solid #f0f0f0;
456
+ }
457
+
458
+ .es-button-border {
459
+ border-style: solid solid solid solid;
460
+ border-color: #808080 #808080 #808080 #808080;
461
+ background: #f0f0f0;
462
+ border-width: 2px 2px 2px 2px;
463
+ display: inline-block;
464
+ border-radius: 0px;
465
+ width: auto;
466
+ }
467
+
468
+ .ins-trim-text {
469
+ overflow: hidden;
470
+ text-overflow: ellipsis;
471
+ white-space: nowrap;
472
+ padding-top: 10px;
473
+ padding-bottom: 10px;
474
+ }
475
+
476
+ /* RESPONSIVE STYLES Please do not delete and edit CSS styles below. If you don't need responsive layout, please delete this section. */
477
+ @media only screen and (max-width: 600px) {
478
+
479
+ p,
480
+ ul li,
481
+ ol li,
482
+ a {
483
+ line-height: 150% !important;
484
+ }
485
+
486
+ h1,
487
+ h2,
488
+ h3,
489
+ h1 a,
490
+ h2 a,
491
+ h3 a {
492
+ line-height: 120% !important;
493
+ }
494
+
495
+ h1 {
496
+ font-size: 30px !important;
497
+ text-align: center;
498
+ }
499
+
500
+ h2 {
501
+ font-size: 26px !important;
502
+ text-align: center;
503
+ }
504
+
505
+ h3 {
506
+ font-size: 20px !important;
507
+ text-align: center;
508
+ }
509
+
510
+ .es-header-body h1 a,
511
+ .es-content-body h1 a,
512
+ .es-footer-body h1 a {
513
+ font-size: 30px !important;
514
+ }
515
+
516
+ .es-header-body h2 a,
517
+ .es-content-body h2 a,
518
+ .es-footer-body h2 a {
519
+ font-size: 26px !important;
520
+ }
521
+
522
+ .es-header-body h3 a,
523
+ .es-content-body h3 a,
524
+ .es-footer-body h3 a {
525
+ font-size: 20px !important;
526
+ }
527
+
528
+ .es-menu td a {
529
+ font-size: 13px !important;
530
+ }
531
+
532
+ .es-header-body p,
533
+ .es-header-body ul li,
534
+ .es-header-body ol li,
535
+ .es-header-body a {
536
+ font-size: 16px !important;
537
+ }
538
+
539
+ .es-content-body p,
540
+ .es-content-body ul li,
541
+ .es-content-body ol li,
542
+ .es-content-body a {
543
+ font-size: 16px !important;
544
+ }
545
+
546
+ .es-footer-body p,
547
+ .es-footer-body ul li,
548
+ .es-footer-body ol li,
549
+ .es-footer-body a {
550
+ font-size: 16px !important;
551
+ }
552
+
553
+ .es-infoblock p,
554
+ .es-infoblock ul li,
555
+ .es-infoblock ol li,
556
+ .es-infoblock a {
557
+ font-size: 12px !important;
558
+ }
559
+
560
+ *[class="gmail-fix"] {
561
+ display: none !important;
562
+ }
563
+
564
+ .es-m-txt-c,
565
+ .es-m-txt-c h1,
566
+ .es-m-txt-c h2,
567
+ .es-m-txt-c h3 {
568
+ text-align: center !important;
569
+ }
570
+
571
+ .es-m-txt-r,
572
+ .es-m-txt-r h1,
573
+ .es-m-txt-r h2,
574
+ .es-m-txt-r h3 {
575
+ text-align: right !important;
576
+ }
577
+
578
+ .es-m-txt-l,
579
+ .es-m-txt-l h1,
580
+ .es-m-txt-l h2,
581
+ .es-m-txt-l h3 {
582
+ text-align: left !important;
583
+ }
584
+
585
+ .es-m-txt-r img,
586
+ .es-m-txt-c img,
587
+ .es-m-txt-l img {
588
+ display: inline !important;
589
+ }
590
+
591
+ .es-button-border {
592
+ display: block !important;
593
+ }
594
+
595
+ a.es-button,
596
+ button.es-button {
597
+ font-size: 16px !important;
598
+ display: block !important;
599
+ padding: 10px 0px 10px 0px !important;
600
+ }
601
+
602
+ .es-btn-fw {
603
+ border-width: 10px 0px !important;
604
+ text-align: center !important;
605
+ }
606
+
607
+ .es-adaptive table,
608
+ .es-btn-fw,
609
+ .es-btn-fw-brdr,
610
+ .es-left,
611
+ .es-right {
612
+ width: 100% !important;
613
+ }
614
+
615
+ .ext-product-button,
616
+ .ext-product-price p,
617
+ .ext-product-original-price p {
618
+ width: 100% !important;
619
+ }
620
+
621
+ .ext-product-button a {
622
+ max-width: 100% !important;
623
+ }
624
+
625
+ .ext-product-name.ins-vertical p {
626
+ height: 90px !important;
627
+ overflow: hidden !important;
628
+ word-break: break-all !important;
629
+ font-size: 12px !important;
630
+ line-height: 150% !important;
631
+ }
632
+
633
+ .ext-product-name.ins-vertical {
634
+ height: 100px !important;
635
+ }
636
+
637
+ .ext-product-name p {
638
+ height: unset !important;
639
+ width: 100% !important;
640
+ overflow: hidden !important;
641
+ font-size: 16px !important;
642
+ line-height: 150% !important;
643
+ }
644
+
645
+ .ext-product-name {
646
+ height: unset !important;
647
+ }
648
+
649
+ .ext-product-price.ins-vertical p {
650
+ overflow: hidden !important;
651
+ word-break: break-all !important;
652
+ height: 36px !important;
653
+ font-size: 12px !important;
654
+ line-height: 150% !important;
655
+ }
656
+
657
+ .ext-product-price.ins-vertical {
658
+ height: 56px !important;
659
+ }
660
+
661
+ .ext-product-original-price.ins-vertical p {
662
+ overflow: hidden !important;
663
+ word-break: break-all !important;
664
+ height: 36px !important;
665
+ font-size: 12px !important;
666
+ line-height: 150% !important;
667
+ }
668
+
669
+ .ext-product-original-price.ins-vertical {
670
+ height: 56px !important;
671
+ }
672
+
673
+ .ext-ins-attr.ins-vertical p {
674
+ overflow: hidden !important;
675
+ word-break: break-all !important;
676
+ height: 54px !important;
677
+ font-size: 12px !important;
678
+ line-height: 150% !important;
679
+ width: 100% !important;
680
+ }
681
+
682
+ .ext-ins-attr.ins-vertical {
683
+ height: 74px !important;
684
+ }
685
+
686
+ .ext-product-button a.ins-vertical {
687
+ word-break: break-all !important;
688
+ font-size: 12px !important;
689
+ }
690
+
691
+ .ext-product-image.ins-vertical {
692
+ height: unset !important;
693
+ }
694
+
695
+ td.esdev-mso-td.ins-vertical {
696
+ vertical-align: bottom !important;
697
+ }
698
+
699
+ .es-content table,
700
+ .es-header table,
701
+ .es-footer table,
702
+ .es-content,
703
+ .es-footer,
704
+ .es-header {
705
+ width: 100% !important;
706
+ max-width: 600px !important;
707
+ }
708
+
709
+ .es-adapt-td {
710
+ display: block !important;
711
+ width: 100% !important;
712
+ }
713
+
714
+ .adapt-img {
715
+ width: 100% !important;
716
+ height: auto !important;
717
+ }
718
+
719
+ .es-m-p0 {
720
+ padding: 0px !important;
721
+ }
722
+
723
+ .es-m-p0r {
724
+ padding-right: 0px !important;
725
+ }
726
+
727
+ .es-m-p0l {
728
+ padding-left: 0px !important;
729
+ }
730
+
731
+ .es-m-p0t {
732
+ padding-top: 0px !important;
733
+ }
734
+
735
+ .es-m-p0b {
736
+ padding-bottom: 0 !important;
737
+ }
738
+
739
+ .es-m-p20b {
740
+ padding-bottom: 20px !important;
741
+ }
742
+
743
+ .es-mobile-hidden,
744
+ .es-hidden {
745
+ display: none !important;
746
+ }
747
+
748
+ .es-desk-hidden {
749
+ display: table-row !important;
750
+ width: auto !important;
751
+ overflow: visible !important;
752
+ float: none !important;
753
+ max-height: inherit !important;
754
+ line-height: inherit !important;
755
+ }
756
+
757
+ .es-desk-menu-hidden {
758
+ display: table-cell !important;
759
+ }
760
+
761
+ table.es-table-not-adapt,
762
+ .esd-block-html table {
763
+ width: auto !important;
764
+ }
765
+
766
+ table.es-social {
767
+ display: inline-block !important;
768
+ }
769
+
770
+ table.es-social td {
771
+ display: inline-block !important;
772
+ }
773
+ }
774
+
775
+ /* END RESPONSIVE STYLES */
776
+ `;
777
+ export {
778
+ n as default
779
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "2.1.0-beta.36cf49a",
3
+ "version": "2.1.0-beta.3889d62",
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",