@useinsider/guido 2.0.0-beta.5ccd854 → 2.0.0-beta.689d09e

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.
Files changed (77) hide show
  1. package/README.md +2 -0
  2. package/dist/@types/config/schemas.js +55 -39
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +15 -17
  5. package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
  6. package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
  7. package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
  8. package/dist/composables/useConfig.js +29 -27
  9. package/dist/composables/useSave.js +13 -11
  10. package/dist/composables/useStripo.js +42 -40
  11. package/dist/config/migrator/itemsBlockMigrator.js +184 -125
  12. package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
  13. package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
  14. package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
  15. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
  16. package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
  17. package/dist/extensions/Blocks/Items/block.js +1 -1
  18. package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
  19. package/dist/extensions/Blocks/Items/controls/cardComposition.js +59 -36
  20. package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
  21. package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
  22. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
  23. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
  24. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +44 -38
  25. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
  26. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +1 -1
  27. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
  28. package/dist/extensions/Blocks/Items/controls/settingsControl.js +99 -95
  29. package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
  30. package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
  31. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +2 -1
  32. package/dist/extensions/Blocks/Items/extension.js +7 -6
  33. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +0 -1
  34. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +0 -1
  35. package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
  36. package/dist/extensions/Blocks/Items/store/items-block.js +9 -5
  37. package/dist/extensions/Blocks/Items/template.js +285 -221
  38. package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +94 -82
  39. package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
  40. package/dist/extensions/Blocks/common-control.js +45 -57
  41. package/dist/extensions/Blocks/controlFactories.js +139 -118
  42. package/dist/guido.css +1 -1
  43. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +53 -48
  44. package/dist/package.json.js +7 -0
  45. package/dist/services/stripoApi.js +6 -10
  46. package/dist/src/@types/config/index.d.ts +2 -2
  47. package/dist/src/@types/config/schemas.d.ts +30 -0
  48. package/dist/src/@types/config/types.d.ts +7 -1
  49. package/dist/src/composables/useConfig.d.ts +8 -0
  50. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
  51. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
  52. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  53. package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
  54. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
  55. package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
  56. package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
  57. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
  58. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
  59. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -0
  60. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
  61. package/dist/src/extensions/Blocks/Items/template.d.ts +3 -1
  62. package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +4 -2
  63. package/dist/src/extensions/Blocks/common-control.d.ts +1 -7
  64. package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
  65. package/dist/src/stores/config.d.ts +164 -1
  66. package/dist/static/styles/components/button.css.js +1 -1
  67. package/dist/stores/config.js +7 -0
  68. package/dist/utils/pairProductVariables.js +61 -58
  69. package/package.json +1 -1
  70. package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
  71. package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
  72. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -67
  73. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
  74. package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
  75. package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
  76. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
  77. package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
@@ -1,5 +1,5 @@
1
- import { ModificationDescription as _ } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { DefaultConfigValues as e, SETTINGS_ENUMS as n, ItemInCartOptions as g } from "../enums/settingsEnums.js";
1
+ import { ModificationDescription as b } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { DefaultConfigValues as r, SETTINGS_ENUMS as n, ItemInCartOptions as g } from "../enums/settingsEnums.js";
3
3
  function d() {
4
4
  return String(Date.now() + Math.floor(Math.random() * 1e3));
5
5
  }
@@ -9,36 +9,39 @@ function f() {
9
9
  blockInstanceId: d(),
10
10
  source: n.ITEMS_TYPE.CART_ITEMS,
11
11
  type: n.ITEMS_TYPE.CART_ITEMS,
12
- itemsSelectValue: e.cartItemsSelectControlValue,
12
+ itemsSelectValue: r.cartItemsSelectControlValue,
13
13
  orientation: n.ORIENTATION.VERTICAL,
14
- nameTrimming: e.productNameTrimmingControlValue === "1",
15
- nameControlEnabled: e.productNameControlEnabled === "1",
16
- priceHideDiscount: e.productPriceHideDiscountControlValue === "1",
17
- priceFormatted: e.productPriceFormattedControlValue === "1",
18
- priceCurrencySymbol: e.productPriceCurrencySymbolControlValue,
19
- priceCurrencyLocation: e.productPriceCurrencyLocationControlValue,
20
- priceControlOpened: e.productPriceControlOpened === "1",
14
+ nameTrimming: r.productNameTrimmingControlValue === "1",
15
+ nameControlEnabled: r.productNameControlEnabled === "1",
16
+ priceHideDiscount: r.productPriceHideDiscountControlValue === "1",
17
+ priceFormatted: r.productPriceFormattedControlValue === "1",
18
+ priceSinglePrice: !1,
19
+ priceCurrencySymbol: r.productPriceCurrencySymbolControlValue,
20
+ priceCurrencyLocation: r.productPriceCurrencyLocationControlValue,
21
+ priceControlOpened: r.productPriceControlOpened === "1",
21
22
  priceOrientation: "horizontal",
22
- quantityControlEnabled: e.productQuantityControlEnabled === "1",
23
- buttonLink: e.productButtonLinkControlValue,
24
- imageLink: e.productImageLinkControlValue,
23
+ quantityControlEnabled: r.productQuantityControlEnabled === "1",
24
+ buttonLink: r.productButtonLinkControlValue,
25
+ imageLink: r.productImageLinkControlValue,
25
26
  buttonLabel: "Buy",
26
- imageVisible: e.productImageVisible === "1",
27
- nameVisible: e.productNameVisible === "1",
28
- quantityVisible: e.productQuantityVisible === "1",
29
- priceVisible: e.productPriceVisible === "1",
30
- originalPriceVisible: e.productOriginalPriceVisible === "1",
31
- buttonVisible: e.productButtonVisible === "1"
27
+ buttonFullWidth: !0,
28
+ // Default to full width (es-fw class)
29
+ imageVisible: r.productImageVisible === "1",
30
+ nameVisible: r.productNameVisible === "1",
31
+ quantityVisible: r.productQuantityVisible === "1",
32
+ priceVisible: r.productPriceVisible === "1",
33
+ originalPriceVisible: r.productOriginalPriceVisible === "1",
34
+ buttonVisible: r.productButtonVisible === "1"
32
35
  };
33
36
  }
34
- function s(r) {
35
- if (!r)
37
+ function p(o) {
38
+ if (!o)
36
39
  return null;
37
- const t = r.closest(".items-block-v2");
38
- return t || r.closest(".esd-cart-items-block");
40
+ const t = o.closest(".items-block-v2");
41
+ return t || o.closest(".esd-cart-items-block");
39
42
  }
40
- function m(r) {
41
- return r ? {
43
+ function m(o) {
44
+ return o ? {
42
45
  CartItems: n.ITEMS_TYPE.CART_ITEMS,
43
46
  BrowsedItems: n.ITEMS_TYPE.BROWSED_ITEMS,
44
47
  PurchasedItems: n.ITEMS_TYPE.PURCHASED_ITEMS,
@@ -46,127 +49,136 @@ function m(r) {
46
49
  CART_ITEMS: n.ITEMS_TYPE.CART_ITEMS,
47
50
  BROWSED_ITEMS: n.ITEMS_TYPE.BROWSED_ITEMS,
48
51
  PURCHASED_ITEMS: n.ITEMS_TYPE.PURCHASED_ITEMS
49
- }[r] || n.ITEMS_TYPE.CART_ITEMS : n.ITEMS_TYPE.CART_ITEMS;
52
+ }[o] || n.ITEMS_TYPE.CART_ITEMS : n.ITEMS_TYPE.CART_ITEMS;
50
53
  }
51
- function C(r, t) {
52
- if (!r)
53
- return e.cartItemsSelectControlValue;
54
- if (r.includes("{{"))
55
- return r;
56
- if (/^\d+$/.test(r)) {
57
- const i = parseInt(r) - 1, o = g[t];
58
- if (o && o[i])
59
- return o[i].value;
54
+ function C(o, t) {
55
+ if (!o)
56
+ return r.cartItemsSelectControlValue;
57
+ if (o.includes("{{"))
58
+ return o;
59
+ if (/^\d+$/.test(o)) {
60
+ const e = parseInt(o) - 1, i = g[t];
61
+ if (i && i[e])
62
+ return i[e].value;
60
63
  }
61
- return e.cartItemsSelectControlValue;
64
+ return r.cartItemsSelectControlValue;
62
65
  }
63
- function I(r) {
64
- const t = r.querySelector("esd-config-block");
66
+ function I(o) {
67
+ const t = o.querySelector("esd-config-block");
65
68
  if (!t)
66
69
  return null;
67
- const i = (c, a) => c == null ? a : c === "1" || c === "true", o = (c, a) => c || a, l = t.getAttribute("data-type"), u = m(l), p = t.getAttribute("data-cart_items_select_control_value"), b = C(p, u);
70
+ const e = (c, a) => c == null ? a : c === "1" || c === "true", i = (c, a) => c || a, l = t.getAttribute("data-type"), u = m(l), s = t.getAttribute("data-cart_items_select_control_value"), _ = C(s, u);
68
71
  return {
69
- initialized: i(t.getAttribute("data-initialized"), !1),
70
- blockInstanceId: o(
72
+ initialized: e(t.getAttribute("data-initialized"), !1),
73
+ blockInstanceId: i(
71
74
  t.getAttribute("data-block-instance-id"),
72
75
  d()
73
76
  ),
74
77
  source: u,
75
78
  type: u,
76
- itemsSelectValue: b,
79
+ itemsSelectValue: _,
77
80
  orientation: t.getAttribute("data-card_orientation_control_value") || n.ORIENTATION.VERTICAL,
78
- nameTrimming: i(
79
- t.getAttribute("data-product_name_trimming"),
81
+ nameTrimming: e(
82
+ t.getAttribute("data-product_name_control_trim"),
80
83
  !0
81
84
  ),
82
- nameControlEnabled: i(
85
+ nameControlEnabled: e(
83
86
  t.getAttribute("data-product_name_control_enabled"),
84
87
  !0
85
88
  ),
86
- priceHideDiscount: i(
87
- t.getAttribute("data-product_price_hide_discount"),
89
+ priceHideDiscount: e(
90
+ t.getAttribute("data-product_price_control_nodup"),
88
91
  !0
89
92
  ),
90
- priceFormatted: i(
91
- t.getAttribute("data-product_price_formatted"),
93
+ priceFormatted: e(
94
+ t.getAttribute("data-product_price_control_formated"),
92
95
  !0
93
96
  ),
94
- priceCurrencySymbol: o(
97
+ priceSinglePrice: e(
98
+ t.getAttribute("data-product_price_control_single_price"),
99
+ !1
100
+ ),
101
+ priceCurrencySymbol: i(
95
102
  t.getAttribute("data-product_price_currency_symbol"),
96
- e.productPriceCurrencySymbolControlValue
103
+ r.productPriceCurrencySymbolControlValue
97
104
  ),
98
- priceCurrencyLocation: o(
105
+ priceCurrencyLocation: i(
99
106
  t.getAttribute("data-product_price_currency_location"),
100
- e.productPriceCurrencyLocationControlValue
107
+ r.productPriceCurrencyLocationControlValue
101
108
  ),
102
- priceControlOpened: i(
109
+ priceControlOpened: e(
103
110
  t.getAttribute("data-product_price_control_opened"),
104
111
  !0
105
112
  ),
106
113
  priceOrientation: t.getAttribute("data-product_original_price_control_orientation") || "horizontal",
107
- quantityControlEnabled: i(
114
+ quantityControlEnabled: e(
108
115
  t.getAttribute("data-product_quantity_control_enabled"),
109
116
  !0
110
117
  ),
111
- buttonLink: o(
118
+ buttonLink: i(
112
119
  t.getAttribute("data-product_button_link"),
113
- e.productButtonLinkControlValue
120
+ r.productButtonLinkControlValue
114
121
  ),
115
- imageLink: o(
122
+ imageLink: i(
116
123
  t.getAttribute("data-product_image_link"),
117
- e.productImageLinkControlValue
124
+ r.productImageLinkControlValue
118
125
  ),
119
- buttonLabel: o(
126
+ buttonLabel: i(
120
127
  t.getAttribute("data-product_button_control_label"),
121
128
  "Buy"
122
129
  ),
123
- imageVisible: i(
124
- t.getAttribute("data-product_image_visible"),
130
+ buttonFullWidth: e(
131
+ t.getAttribute("data-product_button_control_atw"),
125
132
  !0
133
+ // Default to full width
126
134
  ),
127
- nameVisible: i(
128
- t.getAttribute("data-product_name_visible"),
135
+ imageVisible: e(
136
+ t.getAttribute("data-product_image_control_enabled"),
129
137
  !0
130
138
  ),
131
- quantityVisible: i(
139
+ nameVisible: e(
140
+ t.getAttribute("data-product_name_control_enabled"),
141
+ !0
142
+ ),
143
+ quantityVisible: e(
132
144
  t.getAttribute("data-product_quantity_visible"),
133
145
  !0
134
146
  ),
135
- priceVisible: i(
147
+ priceVisible: e(
136
148
  t.getAttribute("data-product_price_visible"),
137
149
  !0
138
150
  ),
139
- originalPriceVisible: i(
151
+ originalPriceVisible: e(
140
152
  t.getAttribute("data-product_original_price_control_enabled"),
141
153
  !0
142
154
  ),
143
- buttonVisible: i(
155
+ buttonVisible: e(
144
156
  t.getAttribute("data-product_button_visible"),
145
157
  !0
146
158
  )
147
159
  };
148
160
  }
149
- function S(r) {
150
- const t = s(r);
161
+ function S(o) {
162
+ const t = p(o);
151
163
  if (!t)
152
164
  return null;
153
- const i = t.getNodeConfig();
154
- if (i && i.initialized)
155
- return i;
156
- const o = I(t);
157
- return o || null;
165
+ const e = t.getNodeConfig();
166
+ if (e && e.initialized)
167
+ return e;
168
+ const i = I(t);
169
+ return i || null;
158
170
  }
159
- function y(r, t, i) {
160
- const o = s(r);
161
- if (!o)
171
+ function A(o, t, e) {
172
+ const i = p(o);
173
+ if (!i)
162
174
  return;
163
- const u = { ...o.getNodeConfig() || {}, ...i };
164
- t.getDocumentModifier().modifyHtml(o).setNodeConfig(u).apply(new _("Update Items block configuration"));
175
+ const u = { ...i.getNodeConfig() || {}, ...e };
176
+ t.getDocumentModifier().modifyHtml(i).setNodeConfig(u).apply(new b("Update Items block configuration"));
165
177
  }
166
178
  export {
167
179
  d as generateBlockInstanceId,
168
180
  f as getDefaultItemsBlockConfig,
169
181
  S as getItemsBlockConfig,
170
- s as getItemsBlockContainer,
171
- y as setItemsBlockConfig
182
+ p as getItemsBlockContainer,
183
+ A as setItemsBlockConfig
172
184
  };
@@ -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 o } from "./elements/preview.js";
5
- import { UnsubscribeIconsRegistry as r } from "./iconsRegistry.js";
6
- import { SettingsPanel as s } from "./settingsPanel.js";
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 l } from "./tagRegistry.js";
9
- const f = new e().addBlock(i).withSettingsPanelRegistry(s).addControl(t).addUiElement(o).addStyles(n).withLocalization({
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 Block",
12
- "Unsubscribe Block Description": "Add an unsubscribe link to your email",
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(l).withIconsRegistry(r).build();
18
+ }).withUiElementTagRegistry(c).withIconsRegistry(o).build();
19
19
  export {
20
- f as default
20
+ g as default
21
21
  };
@@ -1,12 +1,12 @@
1
- var c = Object.defineProperty;
2
- var I = (T, r, e) => r in T ? c(T, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[r] = e;
3
- var l = (T, r, e) => I(T, typeof r != "symbol" ? r + "" : r, e);
4
- import { Control as s, UIElementType as t, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- class B extends s {
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
+ import { Control as O, UIElementType as t, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ class _ extends O {
6
6
  constructor() {
7
7
  super(...arguments);
8
- l(this, "currentNode");
9
- l(this, "lastBlockInstanceId", null);
8
+ u(this, "currentNode");
9
+ u(this, "lastBlockInstanceId", null);
10
10
  }
11
11
  getContainer() {
12
12
  var e;
@@ -26,16 +26,7 @@ class B extends s {
26
26
  return this.currentNode ? this.currentNode.closest(".items-block-v2") : null;
27
27
  }
28
28
  /**
29
- * Gets the config block element from the current node (legacy support).
30
- * @deprecated Use getNodeConfig() from nodeConfigUtils instead for Stripo V2
31
- * @returns The config block element or null if not found
32
- */
33
- getConfigBlock() {
34
- const e = this.getItemsBlockContainer();
35
- return e ? e.querySelector("esd-config-block") : null;
36
- }
37
- /**
38
- * Gets the current block instance ID from the node config (Stripo V2) or legacy config block.
29
+ * Gets the current block instance ID from the node config (Stripo V2).
39
30
  * @returns The block instance ID or null if not found
40
31
  */
41
32
  getBlockInstanceId() {
@@ -43,10 +34,7 @@ class B extends s {
43
34
  if (!e)
44
35
  return null;
45
36
  const n = e.getNodeConfig();
46
- if (n && typeof n.blockInstanceId == "string")
47
- return n.blockInstanceId;
48
- const o = this.getConfigBlock();
49
- return o ? o.getAttribute("data-block-instance-id") : null;
37
+ return n && typeof n.blockInstanceId == "string" ? n.blockInstanceId : null;
50
38
  }
51
39
  /**
52
40
  * Handles block instance change detection and syncing.
@@ -57,16 +45,16 @@ class B extends s {
57
45
  * @returns true if block instance changed, false otherwise
58
46
  */
59
47
  handleBlockInstanceChange(e, n) {
60
- const o = this.getBlockInstanceId();
61
- if (!o)
48
+ const E = this.getBlockInstanceId();
49
+ if (!E)
62
50
  return !1;
63
- const E = o !== this.lastBlockInstanceId;
64
- return E ? (this.currentNode && e(this.currentNode), n(), this.lastBlockInstanceId = o) : n(), E;
51
+ const o = E !== this.lastBlockInstanceId;
52
+ return o ? (this.currentNode && e(this.currentNode), n(), this.lastBlockInstanceId = E) : n(), o;
65
53
  }
66
- _GuLabel({ text: e, name: n = "", position: o = "top" }) {
54
+ _GuLabel({ text: e, name: n = "", position: E = "top" }) {
67
55
  return `
68
56
  <${t.LABEL}
69
- style="${o === "top" ? "margin-bottom: 8px;" : ""}"
57
+ style="${E === "top" ? "margin-bottom: 8px;" : ""}"
70
58
  ${$.LABEL.text}="${e}"
71
59
  ${$.LABEL.name}="${n || `${e} Label`}">
72
60
  </${t.LABEL}>
@@ -86,59 +74,59 @@ class B extends s {
86
74
  ${$.SELECT_ITEM.value}="${n}">
87
75
  </${t.SELECT_ITEM}>`;
88
76
  }
89
- _GuSelect({ name: e, placeholder: n, options: o, className: E = "es-180w" }) {
77
+ _GuSelect({ name: e, placeholder: n, options: E, className: o = "es-180w" }) {
90
78
  return `
91
79
  <${t.SELECTPICKER}
92
- class="${E}"
80
+ class="${o}"
93
81
  ${$.SELECTPICKER.name}="${e}"
94
82
  ${$.SELECTPICKER.placeholder}="${n}">
95
- ${o.map((a) => this._GuSelectItem(a)).join("")}
83
+ ${E.map((a) => this._GuSelectItem(a)).join("")}
96
84
  </${t.SELECTPICKER}>
97
85
  `;
98
86
  }
99
- _GuTextInput({ name: e, placeholder: n, className: o = "", disabled: E = !1 }) {
87
+ _GuTextInput({ name: e, placeholder: n, className: E = "", disabled: o = !1 }) {
100
88
  return `
101
89
  <${t.TEXT}
102
- class=${o}
90
+ class=${E}
103
91
  ${$.TEXT.name}="${e}"
104
92
  placeholder="${n || e}"
105
- ${E ? `${$.TEXT.disabled}="true"` : ""}>
93
+ ${o ? `${$.TEXT.disabled}="true"` : ""}>
106
94
  </${t.TEXT}>
107
95
  `;
108
96
  }
109
- _GuCounter({ name: e, maxValue: n, minValue: o = 1, step: E = 1 }) {
97
+ _GuCounter({ name: e, maxValue: n, minValue: E = 1, step: o = 1 }) {
110
98
  return `
111
99
  <${t.COUNTER}
112
100
  ${$.COUNTER.name}="${e}"
113
- ${$.COUNTER.minValue}="${o}"
101
+ ${$.COUNTER.minValue}="${E}"
114
102
  ${$.COUNTER.maxValue}="${n}"
115
- ${$.COUNTER.step}="${E}">
103
+ ${$.COUNTER.step}="${o}">
116
104
  </${t.COUNTER}>
117
105
  `;
118
106
  }
119
- _GuRadioButtonItem({ text: e, value: n, icon: o }) {
107
+ _GuRadioButtonItem({ text: e, value: n, icon: E }) {
120
108
  return `
121
109
  <${t.RADIO_ITEM}
122
110
  ${$.RADIO_ITEM.value}="${n}"
123
111
  ${e ? `${$.RADIO_ITEM.text}="${e}"` : ""}
124
- ${o ? `${$.RADIO_ITEM.icon}="${o}"` : ""}>
112
+ ${E ? `${$.RADIO_ITEM.icon}="${E}"` : ""}>
125
113
  </${t.RADIO_ITEM}>
126
114
  `;
127
115
  }
128
- _GuRadioButton({ name: e, buttons: n, id: o = "" }) {
116
+ _GuRadioButton({ name: e, buttons: n, id: E = "" }) {
129
117
  return `
130
118
  <${t.RADIO_BUTTONS}
131
- ${o ? `id="${o}"` : ""}
119
+ ${E ? `id="${E}"` : ""}
132
120
  ${$.RADIO_BUTTONS.name}="${e}">
133
- ${n.map((E) => this._GuRadioButtonItem(E)).join("")}
121
+ ${n.map((o) => this._GuRadioButtonItem(o)).join("")}
134
122
  </${t.RADIO_BUTTONS}>
135
123
  `;
136
124
  }
137
- _GuButton({ name: e, label: n, id: o = "" }) {
125
+ _GuButton({ name: e, label: n, id: E = "" }) {
138
126
  return `
139
127
  <${t.BUTTON}
140
128
  ${$.BUTTON.name}="${e}"
141
- ${o ? `id="${o}"` : ""}
129
+ ${E ? `id="${E}"` : ""}
142
130
  ${$.BUTTON.caption}="${n}"}>
143
131
  </${t.BUTTON}>
144
132
  `;
@@ -148,10 +136,10 @@ class B extends s {
148
136
  * @param param0
149
137
  * @returns It returns a button with an icon.
150
138
  */
151
- _GuIconButton({ name: e, icon: n, className: o = "" }) {
139
+ _GuIconButton({ name: e, icon: n, className: E = "" }) {
152
140
  return `
153
141
  <${t.BUTTON}
154
- class="${o}"
142
+ class="${E}"
155
143
  ${$.BUTTON.name}="${e}"
156
144
  ${$.BUTTON.icon}="${n}">
157
145
  </${t.BUTTON}>
@@ -179,19 +167,19 @@ class B extends s {
179
167
  * @returns HTML string for the orderable control
180
168
  */
181
169
  _GuOrderable(e, n) {
182
- let o = "";
170
+ let E = "";
183
171
  n.forEach((a) => {
184
- const u = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
185
- o += `
186
- <${t.ORDERABLE_ITEM} ${u}="${a.key}">
172
+ const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
173
+ E += `
174
+ <${t.ORDERABLE_ITEM} ${l}="${a.key}">
187
175
  ${a.content}
188
176
  </${t.ORDERABLE_ITEM}>
189
177
  `;
190
178
  });
191
- const E = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
179
+ const o = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
192
180
  return `
193
- <${t.ORDERABLE} ${E}="${e}">
194
- ${o}
181
+ <${t.ORDERABLE} ${o}="${e}">
182
+ ${E}
195
183
  </${t.ORDERABLE}>
196
184
  `;
197
185
  }
@@ -232,16 +220,16 @@ class B extends s {
232
220
  `;
233
221
  }
234
222
  _GuRadioButtons(e, n) {
235
- const o = n.map((E) => `
223
+ const E = n.map((o) => `
236
224
  <${t.RADIO_ITEM}
237
- ${$.RADIO_ITEM.text}="${E.text}"
238
- ${$.RADIO_ITEM.value}="${E.value}">
225
+ ${$.RADIO_ITEM.text}="${o.text}"
226
+ ${$.RADIO_ITEM.value}="${o.value}">
239
227
  </${t.RADIO_ITEM}>
240
228
  `).join("");
241
229
  return `
242
230
  <${t.RADIO_BUTTONS}
243
231
  ${$.RADIO_BUTTONS.name}="${e}">
244
- ${o}
232
+ ${E}
245
233
  </${t.RADIO_BUTTONS}>
246
234
  `;
247
235
  }
@@ -255,5 +243,5 @@ class B extends s {
255
243
  }
256
244
  }
257
245
  export {
258
- B as CommonControl
246
+ _ as CommonControl
259
247
  };