@gisce/ooui 2.33.0-alpha.1 → 2.33.0-alpha.3

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.
@@ -18,6 +18,12 @@ declare class Indicator extends Selection {
18
18
  _actionId: number | undefined;
19
19
  get actionId(): number | undefined;
20
20
  set actionId(value: number | undefined);
21
+ /**
22
+ * Action field
23
+ */
24
+ _actionField: string | undefined;
25
+ get actionField(): string | undefined;
26
+ set actionField(value: string | undefined);
21
27
  _height: number | undefined;
22
28
  get height(): number | undefined;
23
29
  set height(value: number | undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"Indicator.d.ts","sourceRoot":"","sources":["../src/Indicator.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,cAAM,SAAU,SAAQ,SAAS;IAC/B,QAAQ,EAAE,OAAO,CAAQ;IAEzB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,OAAO,EAEtB;IAED,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAa;IAC1C,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAErC;IAED,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,IAAI,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,9 +48,9 @@ declare class One2many extends Field {
48
48
  /**
49
49
  * Infinite mode
50
50
  */
51
- _infinite: boolean;
52
- get infinite(): boolean;
53
- set infinite(value: boolean);
51
+ _infinite: string | undefined;
52
+ get infinite(): string | undefined;
53
+ set infinite(value: string | undefined);
54
54
  constructor(props: any);
55
55
  }
56
56
  export default One2many;
@@ -1 +1 @@
1
- {"version":3,"file":"One2many.d.ts","sourceRoot":"","sources":["../src/One2many.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH,cAAM,QAAS,SAAQ,KAAK;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAO;IACpB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED;;OAEG;IACH,SAAS,EAAE,MAAM,CAAM;IACvB,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEzB;IAED;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEtC;IAED;;OAEG;IACH,MAAM,EAAE,GAAG,CAAQ;IACnB,IAAI,KAAK,IAAI,GAAG,CAEf;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAEnB;IAED;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAM;IACrB,IAAI,IAAI,IAAI,MAAM,EAAE,CAEnB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAEvB;IAED;;OAEG;IACH,WAAW,EAAE,OAAO,CAAS;IAC7B,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,EAE5B;IAED;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,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,KAAK,EAAE,OAAO,EAE5B;IAED;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAa;IAC1C,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAErC;gBAEW,KAAK,EAAE,GAAG;CA2CvB;AAED,eAAe,QAAQ,CAAC"}
package/dist/ooui.es.js CHANGED
@@ -5,7 +5,7 @@ import { decode as pe } from "html-entities";
5
5
  import { evaluateCondition as xe } from "@gisce/conscheck";
6
6
  import * as D from "txml";
7
7
  import T from "moment";
8
- const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
8
+ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), Fe = ({
9
9
  entry: i,
10
10
  values: t,
11
11
  fields: e
@@ -69,7 +69,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
69
69
  }) => {
70
70
  const d = i.replace(/\(/g, "[").replace(/\)/g, "]").replace(/'/g, '"').replace(/True/g, "true").replace(/False/g, "false"), _ = m(d), h = JSON.parse(_), u = {};
71
71
  for (const g of Object.keys(h)) {
72
- const p = h[g].map((y) => ve({ entry: y, values: t, fields: e })).every((y) => y);
72
+ const p = h[g].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
73
73
  p ? u[g] = !0 : g === "readonly" && !p && s === "button" && (u[g] = !1);
74
74
  }
75
75
  return u;
@@ -84,7 +84,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
84
84
  }
85
85
  else
86
86
  return i;
87
- }, Fe = ({
87
+ }, ve = ({
88
88
  attrs: i,
89
89
  values: t,
90
90
  fields: e,
@@ -127,7 +127,7 @@ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve
127
127
  let a = {};
128
128
  if (i.json_attrs)
129
129
  try {
130
- a = Fe({
130
+ a = ve({
131
131
  attrs: i.json_attrs,
132
132
  values: t,
133
133
  fields: e,
@@ -567,7 +567,7 @@ class V {
567
567
  }), e;
568
568
  }
569
569
  }
570
- const P = class P extends C {
570
+ const O = class O extends C {
571
571
  constructor(e) {
572
572
  super(e);
573
573
  /**
@@ -590,7 +590,7 @@ const P = class P extends C {
590
590
  r(this, "_label", "");
591
591
  this._container = new V(
592
592
  e == null ? void 0 : e.col,
593
- P._defaultColspan,
593
+ O._defaultColspan,
594
594
  this.readOnly,
595
595
  e == null ? void 0 : e.key
596
596
  ), e && (e.name && (this._id = e.name), e.colspan ? this._container.colspan = +e.colspan : this._mustExpand = !0, e.string && (this._label = m(e.string)));
@@ -602,10 +602,10 @@ const P = class P extends C {
602
602
  this._id = e;
603
603
  }
604
604
  static get defaultColspan() {
605
- return P._defaultColspan;
605
+ return O._defaultColspan;
606
606
  }
607
607
  static set defaultColspan(e) {
608
- P._defaultColspan = e;
608
+ O._defaultColspan = e;
609
609
  }
610
610
  get container() {
611
611
  return this._container;
@@ -639,20 +639,20 @@ const P = class P extends C {
639
639
  return e === this.id ? this : this.container.findById(e);
640
640
  }
641
641
  };
642
- r(P, "_defaultColspan", 6);
643
- let w = P;
644
- const O = class O extends w {
642
+ r(O, "_defaultColspan", 6);
643
+ let w = O;
644
+ const P = class P extends w {
645
645
  constructor(e) {
646
646
  super(e);
647
647
  r(this, "_tabPosition", "top");
648
648
  r(this, "_pages", []);
649
- this.colspan = O._defaultColspan, e && (e.colspan && (this.colspan = e.colspan), e.tabpos && (this._tabPosition = e.tabpos));
649
+ this.colspan = P._defaultColspan, e && (e.colspan && (this.colspan = e.colspan), e.tabpos && (this._tabPosition = e.tabpos));
650
650
  }
651
651
  static get defaultColspan() {
652
- return O._defaultColspan;
652
+ return P._defaultColspan;
653
653
  }
654
654
  static set defaultColspan(e) {
655
- O._defaultColspan = e;
655
+ P._defaultColspan = e;
656
656
  }
657
657
  get tabPosition() {
658
658
  return this._tabPosition;
@@ -664,8 +664,8 @@ const O = class O extends w {
664
664
  return [].concat.apply([], this._container.rows);
665
665
  }
666
666
  };
667
- r(O, "_defaultColspan", 3);
668
- let M = O;
667
+ r(P, "_defaultColspan", 3);
668
+ let M = P;
669
669
  class L extends w {
670
670
  constructor(e) {
671
671
  super(e);
@@ -679,7 +679,7 @@ class L extends w {
679
679
  this._loading = e;
680
680
  }
681
681
  }
682
- class Pe extends L {
682
+ class Oe extends L {
683
683
  constructor(e) {
684
684
  super(e);
685
685
  r(this, "_icon", null);
@@ -692,7 +692,7 @@ class Pe extends L {
692
692
  this._icon = e;
693
693
  }
694
694
  }
695
- class Oe extends L {
695
+ class Pe extends L {
696
696
  constructor(e) {
697
697
  var s;
698
698
  super(e);
@@ -1090,7 +1090,7 @@ class ie extends f {
1090
1090
  /**
1091
1091
  * Infinite mode
1092
1092
  */
1093
- r(this, "_infinite", !1);
1093
+ r(this, "_infinite");
1094
1094
  if (e) {
1095
1095
  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)
1096
1096
  try {
@@ -1098,7 +1098,7 @@ class ie extends f {
1098
1098
  } catch {
1099
1099
  this._height = void 0;
1100
1100
  }
1101
- e.widget_props && (this.parsedWidgetProps.infinite === "1" || this.parsedWidgetProps.infinite === 1 || this.parsedWidgetProps.infinite === !0) && (this._infinite = !0);
1101
+ e.widget_props && (this._infinite = e.widget_props.infinite);
1102
1102
  }
1103
1103
  }
1104
1104
  get size() {
@@ -1249,8 +1249,12 @@ class Ge extends z {
1249
1249
  * Action id
1250
1250
  */
1251
1251
  r(this, "_actionId");
1252
+ /**
1253
+ * Action field
1254
+ */
1255
+ r(this, "_actionField");
1252
1256
  r(this, "_height");
1253
- 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.height))
1257
+ 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))
1254
1258
  try {
1255
1259
  this._height = parseInt(e.height);
1256
1260
  } catch (s) {
@@ -1284,6 +1288,12 @@ class Ge extends z {
1284
1288
  set actionId(e) {
1285
1289
  this._actionId = e;
1286
1290
  }
1291
+ get actionField() {
1292
+ return this._actionField;
1293
+ }
1294
+ set actionField(e) {
1295
+ this._actionField = e;
1296
+ }
1287
1297
  get height() {
1288
1298
  return this._height;
1289
1299
  }
@@ -1540,10 +1550,10 @@ class $ {
1540
1550
  this._widgetClass = M;
1541
1551
  break;
1542
1552
  case "page":
1543
- this._widgetClass = Pe;
1553
+ this._widgetClass = Oe;
1544
1554
  break;
1545
1555
  case "group":
1546
- this._widgetClass = Oe;
1556
+ this._widgetClass = Pe;
1547
1557
  break;
1548
1558
  case "label":
1549
1559
  this._widgetClass = Z;
@@ -1942,7 +1952,7 @@ class Tt {
1942
1952
  }) {
1943
1953
  const n = new $();
1944
1954
  t.filter((a) => typeof a == "object").forEach((a) => {
1945
- var v, F;
1955
+ var F, v;
1946
1956
  const { tagName: l, attributes: o, children: d } = a;
1947
1957
  let _ = l, h = o;
1948
1958
  if (l === "field") {
@@ -1981,7 +1991,7 @@ class Tt {
1981
1991
  fields: this._fields
1982
1992
  });
1983
1993
  const c = ne({
1984
- context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
1994
+ context: h.context || ((F = this._fields[h.name]) == null ? void 0 : F.context),
1985
1995
  values: s,
1986
1996
  fields: this._fields
1987
1997
  });
@@ -1989,7 +1999,7 @@ class Tt {
1989
1999
  h.on_change
1990
2000
  ));
1991
2001
  let b;
1992
- Q(h.domain) ? b = h.domain : Q((F = this._fields[h.name]) == null ? void 0 : F.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2002
+ 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;
1993
2003
  const p = {
1994
2004
  ...u,
1995
2005
  ...g,
@@ -2638,7 +2648,7 @@ const wt = {
2638
2648
  avg: "average",
2639
2649
  min: "min",
2640
2650
  max: "max"
2641
- }, vt = ({
2651
+ }, Ft = ({
2642
2652
  ooui: i,
2643
2653
  values: t,
2644
2654
  fields: e,
@@ -2653,13 +2663,13 @@ const wt = {
2653
2663
  Object.keys(n).forEach((b) => {
2654
2664
  const p = n[b].label, y = n[b].entries;
2655
2665
  if (c.label) {
2656
- const v = B({
2666
+ const F = B({
2657
2667
  fieldName: c.label,
2658
2668
  values: y,
2659
2669
  fields: e
2660
2670
  });
2661
- Object.keys(v).forEach((F) => {
2662
- const x = v[F].entries, I = v[F].label, ge = N({
2671
+ Object.keys(F).forEach((v) => {
2672
+ const x = F[v].entries, I = F[v].label, ge = N({
2663
2673
  entries: x,
2664
2674
  fields: e,
2665
2675
  fieldName: c.name
@@ -2676,17 +2686,17 @@ const wt = {
2676
2686
  });
2677
2687
  });
2678
2688
  } else {
2679
- const v = N({
2689
+ const F = N({
2680
2690
  entries: y,
2681
2691
  fields: e,
2682
2692
  fieldName: c.name
2683
- }), F = Y({
2684
- values: v,
2693
+ }), v = Y({
2694
+ values: F,
2685
2695
  operator: c.operator
2686
2696
  });
2687
2697
  a.push({
2688
2698
  x: p || !1,
2689
- value: F,
2699
+ value: v,
2690
2700
  type: _e({
2691
2701
  yAxis: c,
2692
2702
  fields: e
@@ -2787,7 +2797,7 @@ function B({
2787
2797
  s[a] || (s[a] = { label: l, entries: [] }), s[a].entries.push(n);
2788
2798
  }), s;
2789
2799
  }
2790
- function Ft(i) {
2800
+ function vt(i) {
2791
2801
  let t = [];
2792
2802
  return Object.keys(i).forEach((e) => {
2793
2803
  const s = i[e];
@@ -2812,14 +2822,14 @@ function fe(i, t = 0.1) {
2812
2822
  }
2813
2823
  const jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2814
2824
  __proto__: null,
2815
- getAllObjectsInGroupedValues: Ft,
2825
+ getAllObjectsInGroupedValues: vt,
2816
2826
  getMinMax: fe,
2817
2827
  getValueForOperator: Y,
2818
2828
  getValuesForYField: N,
2819
2829
  getValuesGroupedByField: B,
2820
2830
  getYAxisFieldname: _e,
2821
2831
  labelsForOperator: wt,
2822
- processGraphData: vt
2832
+ processGraphData: Ft
2823
2833
  }, Symbol.toStringTag, { value: "Module" }));
2824
2834
  export {
2825
2835
  Xe as Alert,
@@ -2851,7 +2861,7 @@ export {
2851
2861
  ot as GraphIndicatorField,
2852
2862
  ht as GraphXAxis,
2853
2863
  ut as GraphYAxis,
2854
- Oe as Group,
2864
+ Pe as Group,
2855
2865
  Se as HTMLPreview,
2856
2866
  Ne as Image,
2857
2867
  Ge as Indicator,
@@ -2864,7 +2874,7 @@ export {
2864
2874
  K as NewLine,
2865
2875
  M as Notebook,
2866
2876
  ie as One2many,
2867
- Pe as Page,
2877
+ Oe as Page,
2868
2878
  Ve as ProgressBar,
2869
2879
  qe as Radio,
2870
2880
  Me as Reference,