@gisce/ooui 2.34.0 → 2.36.0-alpha.1

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/ooui.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  var be = Object.defineProperty;
2
2
  var ye = (i, t, e) => t in i ? be(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var r = (i, t, e) => (ye(i, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { decode as pe } from "html-entities";
5
- import { evaluateCondition as xe } from "@gisce/conscheck";
4
+ import { decode as xe } from "html-entities";
5
+ import { evaluateCondition as pe } from "@gisce/conscheck";
6
6
  import * as D from "txml";
7
7
  import T from "moment";
8
8
  const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe = ({
@@ -41,7 +41,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
41
41
  default:
42
42
  return !1;
43
43
  }
44
- }, m = (i) => pe(i, { level: "xml" }), X = ({
44
+ }, m = (i) => xe(i, { level: "xml" }), X = ({
45
45
  fieldName: i,
46
46
  valueInObject: t,
47
47
  expectedValue: e,
@@ -67,12 +67,12 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
67
67
  fields: e,
68
68
  widgetType: s
69
69
  }) => {
70
- const d = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(d), h = JSON.parse(_), u = {};
70
+ const u = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(u), h = JSON.parse(_), d = {};
71
71
  for (const g of Object.keys(h)) {
72
- const p = h[g].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
73
- p ? u[g] = !0 : g === "readonly" && !p && s === "button" && (u[g] = !1);
72
+ const x = h[g].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
73
+ x ? d[g] = !0 : g === "readonly" && !x && s === "button" && (d[g] = !1);
74
74
  }
75
- return u;
75
+ return d;
76
76
  }, U = (i) => {
77
77
  if (i === void 0)
78
78
  return {};
@@ -95,21 +95,21 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
95
95
  n.replace(/'/g, '"')
96
96
  ), l = {};
97
97
  for (const o of Object.keys(a)) {
98
- const d = xe({
98
+ const u = pe({
99
99
  object: t,
100
100
  condition: a[o],
101
101
  evaluateFieldComparison: ({
102
102
  fieldName: _,
103
103
  valueInObject: h,
104
- expectedValue: u
104
+ expectedValue: d
105
105
  }) => X({
106
106
  fieldName: _,
107
107
  valueInObject: h,
108
- expectedValue: u,
108
+ expectedValue: d,
109
109
  fields: e
110
110
  })
111
111
  });
112
- d ? l[o] = !0 : o === "readonly" && !d && s === "button" && (l[o] = !1);
112
+ u ? l[o] = !0 : o === "readonly" && !u && s === "button" && (l[o] = !1);
113
113
  }
114
114
  return l;
115
115
  } catch (n) {
@@ -157,7 +157,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
157
157
  attrs: void 0,
158
158
  json_attrs: void 0
159
159
  };
160
- }, W = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", k = class k {
160
+ }, k = (i) => i === 1 || i === "1" || i === !0 || i === "True" || i === "true", O = class O {
161
161
  constructor(t) {
162
162
  /**
163
163
  * Determines if widget is read only (default is undefined)
@@ -194,13 +194,13 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
194
194
  * Base type of the field
195
195
  */
196
196
  r(this, "_fieldType", "");
197
- this._colspan = k._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = W(t.readonly)), t.invisible && (t.invisible === 1 || t.invisible === "1" || t.invisible === !0) && (this._invisible = !0), t.type && (this._type = t.type), t.context && (this._context = t.context), t.domain && (typeof t.domain != "string" ? this._domain = m(JSON.stringify(t.domain)) : this._domain = m(t.domain)), t.type && (this._fieldType = t.fieldsWidgetType), t.widget_props && (this._parsedWidgetProps = U(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function), t.is_sortable && (this._isSortable = t.is_sortable));
197
+ this._colspan = O._defaultColspan, this._invisible = !1, t && (t.colspan && (this._colspan = +t.colspan), t.readonly !== void 0 && (this._readOnly = k(t.readonly)), t.invisible && (t.invisible === 1 || t.invisible === "1" || t.invisible === !0) && (this._invisible = !0), t.type && (this._type = t.type), t.context && (this._context = t.context), t.domain && (typeof t.domain != "string" ? this._domain = m(JSON.stringify(t.domain)) : this._domain = m(t.domain)), t.type && (this._fieldType = t.fieldsWidgetType), t.widget_props && (this._parsedWidgetProps = U(t.widget_props)), t.key && (this._key = t.key), t.is_function && (this._isFunction = t.is_function), t.is_sortable && (this._isSortable = t.is_sortable));
198
198
  }
199
199
  static get defaultColspan() {
200
- return k._defaultColspan;
200
+ return O._defaultColspan;
201
201
  }
202
202
  static set defaultColspan(t) {
203
- k._defaultColspan = t;
203
+ O._defaultColspan = t;
204
204
  }
205
205
  get readOnly() {
206
206
  return this._readOnly;
@@ -266,8 +266,8 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe
266
266
  /**
267
267
  * Default colspan
268
268
  */
269
- r(k, "_defaultColspan", 1);
270
- let C = k;
269
+ r(O, "_defaultColspan", 1);
270
+ let C = O;
271
271
  class f extends C {
272
272
  constructor(e) {
273
273
  super(e);
@@ -316,7 +316,7 @@ class f extends C {
316
316
  r(this, "_selectionValues", /* @__PURE__ */ new Map([]));
317
317
  r(this, "_autoRefresh", !1);
318
318
  r(this, "_raw_props");
319
- this._activated = !0, e && (this._raw_props = e, e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = m(e.string)), e.help && (this._tooltip = m(e.help)), e.nolabel && (e.nolabel === "1" || typeof e.nolabel == "boolean" && e.nolabel === !0) && (this._nolabel = !0), e.required && (e.required === "1" || e.required === !0 || e.required === "True") && (this._required = !0), e.sum && (this._sum = m(e.sum)), e.selection && (this._selectionValues = new Map(e.selection)), e.help_inline && (this.tooltipInline = we(e.help_inline)), e.autorefresh && (this.autoRefresh = W(e.autorefresh)));
319
+ this._activated = !0, e && (this._raw_props = e, e.name && (this._id = e.name), e.activated && (this._activated = e.activated), e.string && (this._label = m(e.string)), e.help && (this._tooltip = m(e.help)), e.nolabel && (e.nolabel === "1" || typeof e.nolabel == "boolean" && e.nolabel === !0) && (this._nolabel = !0), e.required && (e.required === "1" || e.required === !0 || e.required === "True") && (this._required = !0), e.sum && (this._sum = m(e.sum)), e.selection && (this._selectionValues = new Map(e.selection)), e.help_inline && (this.tooltipInline = we(e.help_inline)), e.autorefresh && (this.autoRefresh = k(e.autorefresh)));
320
320
  }
321
321
  get id() {
322
322
  return this._id;
@@ -459,7 +459,7 @@ class Z extends f {
459
459
  }
460
460
  get humanDate() {
461
461
  var e;
462
- return W(((e = this._parsedWidgetProps) == null ? void 0 : e.human_date) ?? !1);
462
+ return k(((e = this._parsedWidgetProps) == null ? void 0 : e.human_date) ?? !1);
463
463
  }
464
464
  get fieldForLabel() {
465
465
  return this._fieldForLabel;
@@ -645,18 +645,18 @@ const P = class P extends C {
645
645
  };
646
646
  r(P, "_defaultColspan", 6);
647
647
  let w = P;
648
- const O = class O extends w {
648
+ const W = class W extends w {
649
649
  constructor(e) {
650
650
  super(e);
651
651
  r(this, "_tabPosition", "top");
652
652
  r(this, "_pages", []);
653
- this.colspan = O._defaultColspan, e && (e.colspan && (this.colspan = e.colspan), e.tabpos && (this._tabPosition = e.tabpos));
653
+ this.colspan = W._defaultColspan, e && (e.colspan && (this.colspan = e.colspan), e.tabpos && (this._tabPosition = e.tabpos));
654
654
  }
655
655
  static get defaultColspan() {
656
- return O._defaultColspan;
656
+ return W._defaultColspan;
657
657
  }
658
658
  static set defaultColspan(e) {
659
- O._defaultColspan = e;
659
+ W._defaultColspan = e;
660
660
  }
661
661
  get tabPosition() {
662
662
  return this._tabPosition;
@@ -668,9 +668,9 @@ const O = class O extends w {
668
668
  return [].concat.apply([], this._container.rows);
669
669
  }
670
670
  };
671
- r(O, "_defaultColspan", 3);
672
- let M = O;
673
- class L extends w {
671
+ r(W, "_defaultColspan", 3);
672
+ let M = W;
673
+ class R extends w {
674
674
  constructor(e) {
675
675
  super(e);
676
676
  r(this, "_loading", !1);
@@ -683,7 +683,7 @@ class L extends w {
683
683
  this._loading = e;
684
684
  }
685
685
  }
686
- class Pe extends L {
686
+ class Oe extends R {
687
687
  constructor(e) {
688
688
  super(e);
689
689
  r(this, "_icon", null);
@@ -696,7 +696,7 @@ class Pe extends L {
696
696
  this._icon = e;
697
697
  }
698
698
  }
699
- class Oe extends L {
699
+ class Pe extends R {
700
700
  constructor(e) {
701
701
  var s;
702
702
  super(e);
@@ -876,7 +876,7 @@ class A extends f {
876
876
  this._translatable = e;
877
877
  }
878
878
  }
879
- class G extends f {
879
+ class L extends f {
880
880
  constructor(e) {
881
881
  super(e);
882
882
  /**
@@ -991,7 +991,7 @@ class Te extends f {
991
991
  return this.parsedWidgetProps.showMenu;
992
992
  }
993
993
  }
994
- class ze extends G {
994
+ class ze extends L {
995
995
  }
996
996
  class te extends f {
997
997
  constructor(t) {
@@ -1003,7 +1003,7 @@ class Se extends f {
1003
1003
  super(t);
1004
1004
  }
1005
1005
  }
1006
- class R extends f {
1006
+ class G extends f {
1007
1007
  constructor(e) {
1008
1008
  super(e);
1009
1009
  /**
@@ -1036,11 +1036,11 @@ class R extends f {
1036
1036
  this._decimalDigits = e;
1037
1037
  }
1038
1038
  }
1039
- class Ie extends R {
1039
+ class Ie extends G {
1040
1040
  }
1041
1041
  class Ee extends f {
1042
1042
  }
1043
- class Ve extends R {
1043
+ class Ve extends G {
1044
1044
  }
1045
1045
  class Ye extends f {
1046
1046
  constructor(t) {
@@ -1094,7 +1094,7 @@ class ie extends f {
1094
1094
  /**
1095
1095
  * Infinite mode
1096
1096
  */
1097
- r(this, "_infinite", !1);
1097
+ r(this, "_infinite");
1098
1098
  if (e) {
1099
1099
  if (e.size && (this._size = e.size), e.relation && (this._relation = e.relation), e.mode && (this._mode = e.mode.split(",")), e.views && (this._views = e.views), e.colspan ? this.colspan = e.colspan : this._mustExpand = !0, e.inv_field && (this._inv_field = e.inv_field), e.height)
1100
1100
  try {
@@ -1102,7 +1102,7 @@ class ie extends f {
1102
1102
  } catch {
1103
1103
  this._height = void 0;
1104
1104
  }
1105
- e.widget_props && (this.parsedWidgetProps.infinite === "1" || this.parsedWidgetProps.infinite === 1 || this.parsedWidgetProps.infinite === !0) && (this._infinite = !0);
1105
+ e.widget_props && (this._infinite = e.widget_props.infinite);
1106
1106
  }
1107
1107
  }
1108
1108
  get size() {
@@ -1209,7 +1209,7 @@ class Be extends f {
1209
1209
  super(t);
1210
1210
  }
1211
1211
  }
1212
- class Le extends ie {
1212
+ class Re extends ie {
1213
1213
  constructor(e) {
1214
1214
  super(e);
1215
1215
  /**
@@ -1241,7 +1241,7 @@ class Le extends ie {
1241
1241
  return this.parsedWidgetProps.colorField;
1242
1242
  }
1243
1243
  }
1244
- class Ge extends z {
1244
+ class Le extends z {
1245
1245
  constructor(e) {
1246
1246
  super(e);
1247
1247
  r(this, "_nolabel", !0);
@@ -1258,12 +1258,16 @@ class Ge extends z {
1258
1258
  */
1259
1259
  r(this, "_actionField");
1260
1260
  r(this, "_height");
1261
- if (this._card = !1, this._icon = "", this._suffix = "", this._parsedWidgetProps && (this._card = this._parsedWidgetProps.card || !1, this._icon = m(this._parsedWidgetProps.icon) || "", this._suffix = this._parsedWidgetProps.suffix || "", this._color = m(this._parsedWidgetProps.color) || ""), e && (e.action_id && (this._actionId = parseInt(e.action_id)), e.action_field && (this._actionField = e.action_field), e.height))
1262
- try {
1263
- this._height = parseInt(e.height);
1264
- } catch (s) {
1265
- console.error(s);
1266
- }
1261
+ r(this, "_autoRefresh");
1262
+ if (this._card = !1, this._icon = "", this._suffix = "", this._autoRefresh = !1, this._parsedWidgetProps && (this._card = this._parsedWidgetProps.card || !1, this._icon = m(this._parsedWidgetProps.icon) || "", this._suffix = this._parsedWidgetProps.suffix || "", this._color = m(this._parsedWidgetProps.color) || ""), e) {
1263
+ if (e.action_id && (this._actionId = parseInt(e.action_id)), e.action_field && (this._actionField = e.action_field), e.height)
1264
+ try {
1265
+ this._height = parseInt(e.height);
1266
+ } catch (s) {
1267
+ console.error(s);
1268
+ }
1269
+ this._autoRefresh = k(e.autorefresh);
1270
+ }
1267
1271
  }
1268
1272
  get card() {
1269
1273
  return this._card;
@@ -1304,6 +1308,12 @@ class Ge extends z {
1304
1308
  set height(e) {
1305
1309
  this._height = e;
1306
1310
  }
1311
+ get autoRefresh() {
1312
+ return this._autoRefresh;
1313
+ }
1314
+ set autoRefresh(e) {
1315
+ this._autoRefresh = e;
1316
+ }
1307
1317
  }
1308
1318
  class se extends f {
1309
1319
  constructor(e) {
@@ -1358,7 +1368,7 @@ class se extends f {
1358
1368
  this._columns = e;
1359
1369
  }
1360
1370
  }
1361
- class Re extends se {
1371
+ class Ge extends se {
1362
1372
  }
1363
1373
  class $e extends z {
1364
1374
  get colors() {
@@ -1417,7 +1427,7 @@ class He extends f {
1417
1427
  this._lastStep = e;
1418
1428
  }
1419
1429
  }
1420
- class re extends G {
1430
+ class re extends L {
1421
1431
  constructor(e) {
1422
1432
  super(e);
1423
1433
  r(this, "_lang", null);
@@ -1524,7 +1534,7 @@ class Ze extends w {
1524
1534
  constructor(e) {
1525
1535
  super(e);
1526
1536
  r(this, "_autoPlay", !0);
1527
- e && "auto_play" in e && (this._autoPlay = W(e.auto_play));
1537
+ e && "auto_play" in e && (this._autoPlay = k(e.auto_play));
1528
1538
  }
1529
1539
  get autoPlay() {
1530
1540
  return this._autoPlay;
@@ -1554,10 +1564,10 @@ class $ {
1554
1564
  this._widgetClass = M;
1555
1565
  break;
1556
1566
  case "page":
1557
- this._widgetClass = Pe;
1567
+ this._widgetClass = Oe;
1558
1568
  break;
1559
1569
  case "group":
1560
- this._widgetClass = Oe;
1570
+ this._widgetClass = Pe;
1561
1571
  break;
1562
1572
  case "label":
1563
1573
  this._widgetClass = Z;
@@ -1566,7 +1576,7 @@ class $ {
1566
1576
  this._widgetClass = A;
1567
1577
  break;
1568
1578
  case "text":
1569
- this._widgetClass = G;
1579
+ this._widgetClass = L;
1570
1580
  break;
1571
1581
  case "button":
1572
1582
  this._widgetClass = ee;
@@ -1587,7 +1597,7 @@ class $ {
1587
1597
  this._widgetClass = Se;
1588
1598
  break;
1589
1599
  case "float":
1590
- this._widgetClass = R;
1600
+ this._widgetClass = G;
1591
1601
  break;
1592
1602
  case "float_time":
1593
1603
  this._widgetClass = Ie;
@@ -1634,13 +1644,13 @@ class $ {
1634
1644
  this._widgetClass = Be;
1635
1645
  break;
1636
1646
  case "timeline":
1637
- this._widgetClass = Le;
1647
+ this._widgetClass = Re;
1638
1648
  break;
1639
1649
  case "indicator":
1640
- this._widgetClass = Ge;
1650
+ this._widgetClass = Le;
1641
1651
  break;
1642
1652
  case "tags":
1643
- this._widgetClass = Re;
1653
+ this._widgetClass = Ge;
1644
1654
  break;
1645
1655
  case "tag":
1646
1656
  this._widgetClass = $e;
@@ -1682,7 +1692,7 @@ class $ {
1682
1692
  this._widgetClass = H;
1683
1693
  break;
1684
1694
  case "spinner":
1685
- this._widgetClass = L;
1695
+ this._widgetClass = R;
1686
1696
  break;
1687
1697
  case "carousel":
1688
1698
  this._widgetClass = Ze;
@@ -1725,15 +1735,15 @@ const tt = ({
1725
1735
  const n = {}, a = {};
1726
1736
  for (const o of Object.keys(s))
1727
1737
  if (t.state === o) {
1728
- const d = s[o];
1729
- for (const _ of d) {
1730
- const [h, u] = _;
1731
- a[h] || (a[h] = []), a[h].push(u);
1738
+ const u = s[o];
1739
+ for (const _ of u) {
1740
+ const [h, d] = _;
1741
+ a[h] || (a[h] = []), a[h].push(d);
1732
1742
  }
1733
1743
  }
1734
1744
  for (const o of Object.keys(a)) {
1735
- const d = a[o];
1736
- n[o] = d.some((_) => _);
1745
+ const u = a[o];
1746
+ n[o] = u.some((_) => _);
1737
1747
  }
1738
1748
  return n;
1739
1749
  }, it = ({
@@ -1769,16 +1779,16 @@ const ne = ({
1769
1779
  return s;
1770
1780
  if (i.trim().length === 0)
1771
1781
  return;
1772
- const u = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), g = {};
1773
- return u.forEach((c) => {
1782
+ const d = i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((c) => c.split(":")), g = {};
1783
+ return d.forEach((c) => {
1774
1784
  const b = c[1];
1775
1785
  if (!c[1].includes("'") && c[1] !== "true" && c[1] !== "false") {
1776
- const p = st({
1786
+ const x = st({
1777
1787
  values: t,
1778
1788
  fields: e,
1779
1789
  fieldName: b === "active_id" ? "id" : b
1780
1790
  });
1781
- g[c[0].replace(/'/g, "")] = p || void 0;
1791
+ g[c[0].replace(/'/g, "")] = x || void 0;
1782
1792
  } else
1783
1793
  c[1] === "true" ? g[c[0].replace(/'/g, "")] = !0 : c[1] === "false" ? g[c[0].replace(/'/g, "")] = !1 : g[c[0].replace(/'/g, "")] = c[1].replace(
1784
1794
  /'/g,
@@ -1791,8 +1801,8 @@ const ne = ({
1791
1801
  }, Wt = (i) => {
1792
1802
  const t = [];
1793
1803
  try {
1794
- return !i || le(i) || typeof i != "string" ? t : ae(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((u) => u.split(":")).forEach((u) => {
1795
- !u[1].includes("'") && u[1] !== "true" && u[1] !== "false" && t.push(u[1].replace(/'/g, ""));
1804
+ return !i || le(i) || typeof i != "string" ? t : ae(i) !== null ? [] : (i.trim().length === 0 || i.replace(/"/g, "'").replace(/\s/g, "").replace(/True/g, "true").replace(/False/g, "false").replace(/\{/g, "").replace(/\}/g, "").split(",").map((d) => d.split(":")).forEach((d) => {
1805
+ !d[1].includes("'") && d[1] !== "true" && d[1] !== "false" && t.push(d[1].replace(/'/g, ""));
1796
1806
  }), t);
1797
1807
  } catch {
1798
1808
  }
@@ -1937,17 +1947,17 @@ class Tt {
1937
1947
  }
1938
1948
  parse(t, e) {
1939
1949
  var o;
1940
- const { values: s = {}, readOnly: n = !1 } = e || {}, a = D.parse(t).filter((d) => d.tagName === "form")[0];
1950
+ const { values: s = {}, readOnly: n = !1 } = e || {}, a = D.parse(t).filter((u) => u.tagName === "form")[0];
1941
1951
  this._string = ((o = a.attributes) == null ? void 0 : o.string) || null, this._string && (this._string = m(this._string)), this._readOnly = n, this._context = s.id ? { active_id: s.id, active_ids: [s.id] } : {}, this._invisibleFields = [], this.parseNode({
1942
1952
  fields: a.children,
1943
1953
  container: this._container,
1944
1954
  values: s
1945
1955
  });
1946
1956
  const l = nt(this._container._rows);
1947
- l.forEach((d) => {
1948
- const _ = d;
1949
- _._id && _._context && (this._contextForFields[_._id] = d._context);
1950
- }), this._autorefreshableFields = l.filter((d) => d instanceof f && d.autoRefresh).map((d) => d._id);
1957
+ l.forEach((u) => {
1958
+ const _ = u;
1959
+ _._id && _._context && (this._contextForFields[_._id] = u._context);
1960
+ }), this._autorefreshableFields = l.filter((u) => u instanceof f && u.autoRefresh).map((u) => u._id);
1951
1961
  }
1952
1962
  parseNode({
1953
1963
  fields: t,
@@ -1957,29 +1967,29 @@ class Tt {
1957
1967
  const n = new $();
1958
1968
  t.filter((a) => typeof a == "object").forEach((a) => {
1959
1969
  var F, v;
1960
- const { tagName: l, attributes: o, children: d } = a;
1970
+ const { tagName: l, attributes: o, children: u } = a;
1961
1971
  let _ = l, h = o;
1962
1972
  if (l === "field") {
1963
- const { name: x, widget: S } = o;
1973
+ const { name: p, widget: S } = o;
1964
1974
  if (S)
1965
1975
  _ = S;
1966
- else if (x) {
1967
- if (!this._fields[x])
1976
+ else if (p) {
1977
+ if (!this._fields[p])
1968
1978
  throw new Error(
1969
- `Field ${x} doesn't exist in fields defintion`
1979
+ `Field ${p} doesn't exist in fields defintion`
1970
1980
  );
1971
- _ = this._fields[x].type, o.widget_props = {
1981
+ _ = this._fields[p].type, o.widget_props = {
1972
1982
  ...U(o.widget_props),
1973
- ...this._fields[x].widget_props || {}
1983
+ ...this._fields[p].widget_props || {}
1974
1984
  };
1975
1985
  }
1976
1986
  h = {
1977
- ...this._fields[x],
1987
+ ...this._fields[p],
1978
1988
  ...o,
1979
- fieldsWidgetType: this._fields[x].type
1989
+ fieldsWidgetType: this._fields[p].type
1980
1990
  };
1981
1991
  }
1982
- const u = Ce({
1992
+ const d = Ce({
1983
1993
  tagAttributes: h,
1984
1994
  values: s,
1985
1995
  fields: this._fields,
@@ -2004,17 +2014,17 @@ class Tt {
2004
2014
  ));
2005
2015
  let b;
2006
2016
  Q(h.domain) ? b = h.domain : Q((v = this._fields[h.name]) == null ? void 0 : v.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2007
- const p = {
2008
- ...u,
2017
+ const x = {
2018
+ ...d,
2009
2019
  ...g,
2010
2020
  context: c,
2011
2021
  domain: b,
2012
2022
  key: `${this._keyIdx}`
2013
2023
  };
2014
- e.readOnly && (p.readonly = !0);
2015
- const y = n.createWidget(_, p);
2016
- y.invisible && y instanceof f && this._invisibleFields.push(p.name), y instanceof w && this.parseNode({
2017
- fields: d,
2024
+ e.readOnly && (x.readonly = !0);
2025
+ const y = n.createWidget(_, x);
2026
+ y.invisible && y instanceof f && this._invisibleFields.push(x.name), y instanceof w && this.parseNode({
2027
+ fields: u,
2018
2028
  container: y.container,
2019
2029
  values: s
2020
2030
  }), y instanceof ee && y.readOnly !== void 0 || (y.readOnly = y.readOnly || this.readOnly), e.addWidget(y);
@@ -2110,30 +2120,30 @@ class zt {
2110
2120
  const { tagName: a, attributes: l } = n;
2111
2121
  let o = null;
2112
2122
  if (a === "field") {
2113
- const { name: d, widget: _ } = l;
2123
+ const { name: u, widget: _ } = l;
2114
2124
  let h = l;
2115
- if (d) {
2116
- if (!this._fields[d])
2117
- throw new Error(`Field ${d} doesn't exist in fields defintion`);
2118
- const u = this._fields[d];
2119
- o = u.type, (Array.isArray(u == null ? void 0 : u.domain) && (u == null ? void 0 : u.domain.length) === 0 || (u == null ? void 0 : u.domain) === !1) && l.domain && l.domain.length > 0 && delete u.domain;
2125
+ if (u) {
2126
+ if (!this._fields[u])
2127
+ throw new Error(`Field ${u} doesn't exist in fields defintion`);
2128
+ const d = this._fields[u];
2129
+ o = d.type, (Array.isArray(d == null ? void 0 : d.domain) && (d == null ? void 0 : d.domain.length) === 0 || (d == null ? void 0 : d.domain) === !1) && l.domain && l.domain.length > 0 && delete d.domain;
2120
2130
  const g = ne({
2121
- context: l.context || u.context,
2131
+ context: l.context || d.context,
2122
2132
  values: {},
2123
2133
  fields: this._fields
2124
2134
  });
2125
2135
  h = {
2126
- ...u,
2136
+ ...d,
2127
2137
  ...l,
2128
- fieldsWidgetType: u == null ? void 0 : u.type,
2138
+ fieldsWidgetType: d == null ? void 0 : d.type,
2129
2139
  context: g
2130
- }, this._contextForFields[d] = g;
2140
+ }, this._contextForFields[u] = g;
2131
2141
  }
2132
2142
  if (_ && (o = _), !h.invisible) {
2133
- const u = s.createWidget(o, h);
2134
- this._columns.push(u);
2143
+ const d = s.createWidget(o, h);
2144
+ this._columns.push(d);
2135
2145
  }
2136
- W(h.autorefresh) && this._autorefreshableFields.push(d);
2146
+ k(h.autorefresh) && this._autorefreshableFields.push(u);
2137
2147
  }
2138
2148
  });
2139
2149
  }
@@ -2226,11 +2236,11 @@ const It = ({
2226
2236
  if (!Array.isArray(s))
2227
2237
  return;
2228
2238
  const [n, a, l] = s;
2229
- let o, d;
2230
- n.indexOf(".") !== -1 ? (o = n.substr(0, n.indexOf(".")), d = n.substr(
2239
+ let o, u;
2240
+ n.indexOf(".") !== -1 ? (o = n.substr(0, n.indexOf(".")), u = n.substr(
2231
2241
  n.indexOf(".") + 1,
2232
2242
  n.length - 1
2233
- )) : (o = n, d = "id"), o === t && e.push([d, a, l]);
2243
+ )) : (o = n, u = "id"), o === t && e.push([u, a, l]);
2234
2244
  }), e;
2235
2245
  }, Et = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2236
2246
  class lt {
@@ -2300,7 +2310,7 @@ class ce extends oe {
2300
2310
  r(this, "_totalDomain", null);
2301
2311
  r(this, "_showPercent", !1);
2302
2312
  r(this, "_suffix", null);
2303
- this._type = e, this._color = s.attributes.color || null, this._color && (this._color = m(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = m(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = m(s.attributes.totalDomain) || null, this._showPercent = W(s.attributes.showPercent);
2313
+ this._type = e, this._color = s.attributes.color || null, this._color && (this._color = m(this._color)), this._icon = s.attributes.icon || null, this._icon && (this._icon = m(this._icon)), this._suffix = s.attributes.suffix || null, this._totalDomain = m(s.attributes.totalDomain) || null, this._showPercent = k(s.attributes.showPercent);
2304
2314
  }
2305
2315
  get color() {
2306
2316
  return this._color;
@@ -2343,7 +2353,7 @@ const ct = (i) => {
2343
2353
  let e;
2344
2354
  if (i.forEach((s) => {
2345
2355
  if (s.tagName === "field") {
2346
- const n = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, d = s.attributes.stacked || void 0;
2356
+ const n = s.attributes.axis, a = s.attributes.operator, l = s.attributes.name, o = s.attributes.label || void 0, u = s.attributes.stacked || void 0;
2347
2357
  if (!n)
2348
2358
  throw new Error(`Field ${l} doesn't have an axis`);
2349
2359
  if (!l)
@@ -2351,11 +2361,11 @@ const ct = (i) => {
2351
2361
  n === "x" ? e = new ht({
2352
2362
  name: l
2353
2363
  }) : n === "y" && t.push(
2354
- new ut({
2364
+ new dt({
2355
2365
  name: l,
2356
2366
  operator: a,
2357
2367
  label: o,
2358
- stacked: d
2368
+ stacked: u
2359
2369
  })
2360
2370
  );
2361
2371
  }
@@ -2384,7 +2394,7 @@ class j extends oe {
2384
2394
  return this._y;
2385
2395
  }
2386
2396
  }
2387
- const dt = {
2397
+ const ut = {
2388
2398
  indicator: ce,
2389
2399
  indicatorField: ot,
2390
2400
  line: j,
@@ -2394,12 +2404,12 @@ const dt = {
2394
2404
  const t = D.parse(i).filter((n) => n.tagName === "graph")[0], e = t.attributes.type;
2395
2405
  if (!e)
2396
2406
  throw new Error(`${e} is not a valid graph`);
2397
- const s = dt[e];
2407
+ const s = ut[e];
2398
2408
  if (!s)
2399
2409
  throw new Error(`${e} not found as a GraphModel`);
2400
2410
  return new s(e, t);
2401
2411
  };
2402
- class de {
2412
+ class ue {
2403
2413
  constructor({ name: t, axis: e }) {
2404
2414
  r(this, "_name");
2405
2415
  r(this, "_axis");
@@ -2412,7 +2422,7 @@ class de {
2412
2422
  return this._axis;
2413
2423
  }
2414
2424
  }
2415
- class ut extends de {
2425
+ class dt extends ue {
2416
2426
  constructor({
2417
2427
  name: e,
2418
2428
  operator: s,
@@ -2435,7 +2445,7 @@ class ut extends de {
2435
2445
  return this._stacked;
2436
2446
  }
2437
2447
  }
2438
- class ht extends de {
2448
+ class ht extends ue {
2439
2449
  constructor({ name: t }) {
2440
2450
  super({ name: t, axis: "x" });
2441
2451
  }
@@ -2493,15 +2503,15 @@ function gt({
2493
2503
  groupBy: "type-stacked"
2494
2504
  }), a = `${t}s`;
2495
2505
  return Object.keys(n).forEach((o) => {
2496
- const d = n[o];
2497
- for (let _ = 0; _ < d.length; _++) {
2498
- const h = d[_];
2499
- if (s.push(h), _ === d.length - 1)
2506
+ const u = n[o];
2507
+ for (let _ = 0; _ < u.length; _++) {
2508
+ const h = u[_];
2509
+ if (s.push(h), _ === u.length - 1)
2500
2510
  return;
2501
- const u = h.x, g = d[_ + 1].x;
2502
- if (!ue([u, g], a)) {
2511
+ const d = h.x, g = u[_ + 1].x;
2512
+ if (!de([d, g], a)) {
2503
2513
  const c = mt({
2504
- dates: [u, g],
2514
+ dates: [d, g],
2505
2515
  timerange: t,
2506
2516
  interval: e
2507
2517
  });
@@ -2515,7 +2525,7 @@ function gt({
2515
2525
  );
2516
2526
  }
2517
2527
  }
2518
- }), s.sort((o, d) => o.x < d.x ? -1 : o.x > d.x ? 1 : 0);
2528
+ }), s.sort((o, u) => o.x < u.x ? -1 : o.x > u.x ? 1 : 0);
2519
2529
  }
2520
2530
  function mt({
2521
2531
  dates: i,
@@ -2527,12 +2537,12 @@ function mt({
2527
2537
  return i;
2528
2538
  const a = i.sort((l, o) => l < o ? -1 : l > o ? 1 : 0);
2529
2539
  for (let l = 0; l < a.length - 1; l++) {
2530
- const o = a[l], d = a[l + 1];
2531
- if (!ue([o, d], n)) {
2540
+ const o = a[l], u = a[l + 1];
2541
+ if (!de([o, u], n)) {
2532
2542
  const _ = T(o, E(n)).add(
2533
2543
  e,
2534
2544
  n
2535
- ), h = T(d, E(n));
2545
+ ), h = T(u, E(n));
2536
2546
  for (; _.isBefore(h); )
2537
2547
  s.push(_.format(E(n))), _.add(e, n);
2538
2548
  }
@@ -2551,13 +2561,13 @@ function bt({
2551
2561
  groupBy: "all"
2552
2562
  });
2553
2563
  return Object.keys(n).forEach((a) => {
2554
- const l = n[a], o = l[0].operator === "count" ? "+" : l[0].operator, d = Y({
2564
+ const l = n[a], o = l[0].operator === "count" ? "+" : l[0].operator, u = Y({
2555
2565
  values: l.map((_) => _.value),
2556
2566
  operator: o
2557
2567
  });
2558
2568
  s.push({
2559
2569
  ...l[0],
2560
- value: d
2570
+ value: u
2561
2571
  });
2562
2572
  }), s;
2563
2573
  }
@@ -2567,17 +2577,17 @@ function yt({
2567
2577
  }) {
2568
2578
  return i.map((e) => ({
2569
2579
  ...e,
2570
- x: pt({
2580
+ x: xt({
2571
2581
  date: e.x,
2572
2582
  timerange: t
2573
2583
  })
2574
2584
  }));
2575
2585
  }
2576
- function pt({
2586
+ function xt({
2577
2587
  date: i,
2578
2588
  timerange: t
2579
2589
  }) {
2580
- let e = xt(i);
2590
+ let e = pt(i);
2581
2591
  const s = T(i, e);
2582
2592
  switch (t) {
2583
2593
  case "hour": {
@@ -2603,10 +2613,10 @@ function pt({
2603
2613
  }
2604
2614
  return s.format(e);
2605
2615
  }
2606
- function xt(i) {
2616
+ function pt(i) {
2607
2617
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2608
2618
  }
2609
- function ue(i, t) {
2619
+ function de(i, t) {
2610
2620
  let e = !1;
2611
2621
  const s = E(t);
2612
2622
  if (i.length === 0)
@@ -2665,7 +2675,7 @@ const wt = {
2665
2675
  }), a = [];
2666
2676
  i.y.forEach((c) => {
2667
2677
  Object.keys(n).forEach((b) => {
2668
- const p = n[b].label, y = n[b].entries;
2678
+ const x = n[b].label, y = n[b].entries;
2669
2679
  if (c.label) {
2670
2680
  const F = B({
2671
2681
  fieldName: c.label,
@@ -2673,8 +2683,8 @@ const wt = {
2673
2683
  fields: e
2674
2684
  });
2675
2685
  Object.keys(F).forEach((v) => {
2676
- const x = F[v].entries, S = F[v].label, ge = N({
2677
- entries: x,
2686
+ const p = F[v].entries, S = F[v].label, ge = N({
2687
+ entries: p,
2678
2688
  fields: e,
2679
2689
  fieldName: c.name
2680
2690
  }), me = Y({
@@ -2682,7 +2692,7 @@ const wt = {
2682
2692
  operator: c.operator
2683
2693
  });
2684
2694
  a.push({
2685
- x: p || !1,
2695
+ x: x || !1,
2686
2696
  value: me,
2687
2697
  type: S,
2688
2698
  operator: c.operator,
@@ -2699,7 +2709,7 @@ const wt = {
2699
2709
  operator: c.operator
2700
2710
  });
2701
2711
  a.push({
2702
- x: p || !1,
2712
+ x: x || !1,
2703
2713
  value: v,
2704
2714
  type: _e({
2705
2715
  yAxis: c,
@@ -2718,21 +2728,21 @@ const wt = {
2718
2728
  i.type === "pie" && h.some((c) => c.x === !1) ? h = h.map((c) => c.x === !1 ? { ...c, x: (s == null ? void 0 : s.uninformedString) || "Not informed" } : c) : _.some((c) => c.x === !1) && (h = h.filter(
2719
2729
  (c) => c.x !== !1
2720
2730
  ));
2721
- let u = h;
2722
- i.timerange ? u = ft({
2723
- values: u,
2731
+ let d = h;
2732
+ i.timerange ? d = ft({
2733
+ values: d,
2724
2734
  timerange: i.timerange,
2725
2735
  interval: i.interval
2726
- }) : i.type == "pie" && (u = h.sort((c, b) => b.value - c.value));
2736
+ }) : i.type == "pie" && (d = h.sort((c, b) => b.value - c.value));
2727
2737
  const g = {
2728
- data: u,
2738
+ data: d,
2729
2739
  isGroup: o || l,
2730
2740
  isStack: o
2731
2741
  };
2732
2742
  if (i.type === "line" && i.y_range && (g.yAxisOpts = {
2733
2743
  mode: i.y_range
2734
2744
  }, i.y_range === "auto")) {
2735
- const { min: c, max: b } = fe(u);
2745
+ const { min: c, max: b } = fe(d);
2736
2746
  g.yAxisOpts.valueOpts = { min: c, max: b };
2737
2747
  }
2738
2748
  return g;
@@ -2855,20 +2865,20 @@ export {
2855
2865
  De as DateTime,
2856
2866
  Ke as Email,
2857
2867
  f as Field,
2858
- R as Float,
2868
+ G as Float,
2859
2869
  Ie as FloatTime,
2860
2870
  Tt as Form,
2861
2871
  oe as Graph,
2862
- de as GraphAxis,
2872
+ ue as GraphAxis,
2863
2873
  j as GraphChart,
2864
2874
  ce as GraphIndicator,
2865
2875
  ot as GraphIndicatorField,
2866
2876
  ht as GraphXAxis,
2867
- ut as GraphYAxis,
2868
- Oe as Group,
2877
+ dt as GraphYAxis,
2878
+ Pe as Group,
2869
2879
  Ee as HTMLPreview,
2870
2880
  Ne as Image,
2871
- Ge as Indicator,
2881
+ Le as Indicator,
2872
2882
  Se as Integer,
2873
2883
  H as JSONField,
2874
2884
  Z as Label,
@@ -2878,7 +2888,7 @@ export {
2878
2888
  K as NewLine,
2879
2889
  M as Notebook,
2880
2890
  ie as One2many,
2881
- Pe as Page,
2891
+ Oe as Page,
2882
2892
  Ve as ProgressBar,
2883
2893
  qe as Radio,
2884
2894
  Me as Reference,
@@ -2886,14 +2896,14 @@ export {
2886
2896
  St as SearchFilter,
2887
2897
  z as Selection,
2888
2898
  je as Separator,
2889
- L as Spinner,
2899
+ R as Spinner,
2890
2900
  He as Steps,
2891
2901
  Je as Switch,
2892
2902
  $e as Tag,
2893
- Re as Tags,
2894
- G as Text,
2903
+ Ge as Tags,
2904
+ L as Text,
2895
2905
  Qe as Time,
2896
- Le as Timeline,
2906
+ Re as Timeline,
2897
2907
  zt as Tree,
2898
2908
  C as Widget,
2899
2909
  Dt as graphFieldUtils,