@gisce/ooui 2.38.0-alpha.2 → 2.38.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.
package/dist/Card.d.ts CHANGED
@@ -6,6 +6,12 @@ declare class Card extends Spinner {
6
6
  _icon: string | null;
7
7
  get icon(): string | null;
8
8
  set icon(value: string | null);
9
+ /**
10
+ * Height of the card component
11
+ */
12
+ _height: number | undefined;
13
+ get height(): number | undefined;
14
+ set height(value: number | undefined);
9
15
  constructor(props: any);
10
16
  }
11
17
  export default Card;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,cAAM,IAAK,SAAQ,OAAO;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC7B,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAEzB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE7B;IAED,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE5B;gBAEW,KAAK,EAAE,GAAG;CAWvB;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,cAAM,IAAK,SAAQ,OAAO;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC7B,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAEzB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE7B;IAED,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE5B;IAED;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IAExC,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEnC;gBAEW,KAAK,EAAE,GAAG;CAevB;AAED,eAAe,IAAI,CAAC"}
package/dist/ooui.es.js CHANGED
@@ -5,7 +5,7 @@ import { decode as xe } from "html-entities";
5
5
  import { evaluateCondition as pe } 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), Fe = ({
8
+ const we = (i = !1) => (i = JSON.parse(i.toString().toLowerCase()), +i > 0), ve = ({
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), Fe
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 x = h[g].map((y) => Fe({ entry: y, values: t, fields: e })).every((y) => y);
72
+ const x = h[g].map((y) => ve({ entry: y, values: t, fields: e })).every((y) => y);
73
73
  x ? u[g] = !0 : g === "readonly" && !x && 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), Fe
84
84
  }
85
85
  else
86
86
  return i;
87
- }, ve = ({
87
+ }, Fe = ({
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), Fe
127
127
  let a = {};
128
128
  if (i.json_attrs)
129
129
  try {
130
- a = ve({
130
+ a = Fe({
131
131
  attrs: i.json_attrs,
132
132
  values: t,
133
133
  fields: e,
@@ -669,7 +669,7 @@ const W = class W extends w {
669
669
  }
670
670
  };
671
671
  r(W, "_defaultColspan", 3);
672
- let A = W;
672
+ let N = W;
673
673
  class j extends w {
674
674
  constructor(e) {
675
675
  super(e);
@@ -835,7 +835,7 @@ class We extends w {
835
835
  }
836
836
  class Te extends f {
837
837
  }
838
- class N extends f {
838
+ class A extends f {
839
839
  constructor(e) {
840
840
  super(e);
841
841
  /**
@@ -1182,9 +1182,9 @@ class Me extends C {
1182
1182
  return null;
1183
1183
  }
1184
1184
  }
1185
- class Ae extends z {
1185
+ class Ne extends z {
1186
1186
  }
1187
- class Ne extends f {
1187
+ class Ae extends f {
1188
1188
  constructor(e) {
1189
1189
  super(e);
1190
1190
  /**
@@ -1548,7 +1548,7 @@ class et extends w {
1548
1548
  return this._container.rows.flat().filter((e) => !e.invisible);
1549
1549
  }
1550
1550
  }
1551
- class tt extends N {
1551
+ class tt extends A {
1552
1552
  get showText() {
1553
1553
  return this.parsedWidgetProps.show_text ?? !0;
1554
1554
  }
@@ -1572,7 +1572,14 @@ class st extends j {
1572
1572
  super(e);
1573
1573
  r(this, "_title", null);
1574
1574
  r(this, "_icon", null);
1575
- e && (e.title && (this._title = e.title), e.icon && (this._icon = e.icon));
1575
+ /**
1576
+ * Height of the card component
1577
+ */
1578
+ r(this, "_height");
1579
+ if (e && (e.title && (this._title = e.title), e.icon && (this._icon = e.icon), e.height)) {
1580
+ const s = parseInt(e.height);
1581
+ this._height = isNaN(s) ? void 0 : s;
1582
+ }
1576
1583
  }
1577
1584
  get title() {
1578
1585
  return this._title;
@@ -1586,6 +1593,12 @@ class st extends j {
1586
1593
  set icon(e) {
1587
1594
  this._icon = e;
1588
1595
  }
1596
+ get height() {
1597
+ return this._height;
1598
+ }
1599
+ set height(e) {
1600
+ this._height = e;
1601
+ }
1589
1602
  }
1590
1603
  class $ {
1591
1604
  constructor() {
@@ -1597,7 +1610,7 @@ class $ {
1597
1610
  setWidgetClass(t) {
1598
1611
  switch (t) {
1599
1612
  case "notebook":
1600
- this._widgetClass = A;
1613
+ this._widgetClass = N;
1601
1614
  break;
1602
1615
  case "page":
1603
1616
  this._widgetClass = Pe;
@@ -1612,7 +1625,7 @@ class $ {
1612
1625
  this._widgetClass = Z;
1613
1626
  break;
1614
1627
  case "char":
1615
- this._widgetClass = N;
1628
+ this._widgetClass = A;
1616
1629
  break;
1617
1630
  case "text":
1618
1631
  this._widgetClass = L;
@@ -1668,16 +1681,16 @@ class $ {
1668
1681
  this._widgetClass = Me;
1669
1682
  break;
1670
1683
  case "url":
1671
- this._widgetClass = N;
1684
+ this._widgetClass = A;
1672
1685
  break;
1673
1686
  case "email":
1674
1687
  this._widgetClass = Ze;
1675
1688
  break;
1676
1689
  case "reference":
1677
- this._widgetClass = Ae;
1690
+ this._widgetClass = Ne;
1678
1691
  break;
1679
1692
  case "binary":
1680
- this._widgetClass = Ne;
1693
+ this._widgetClass = Ae;
1681
1694
  break;
1682
1695
  case "image":
1683
1696
  this._widgetClass = Be;
@@ -2012,7 +2025,7 @@ class It {
2012
2025
  }) {
2013
2026
  const n = new $();
2014
2027
  t.filter((a) => typeof a == "object").forEach((a) => {
2015
- var F, v;
2028
+ var v, F;
2016
2029
  const { tagName: l, attributes: o, children: d } = a;
2017
2030
  let _ = l, h = o;
2018
2031
  if (l === "field") {
@@ -2051,7 +2064,7 @@ class It {
2051
2064
  fields: this._fields
2052
2065
  });
2053
2066
  const c = ne({
2054
- context: h.context || ((F = this._fields[h.name]) == null ? void 0 : F.context),
2067
+ context: h.context || ((v = this._fields[h.name]) == null ? void 0 : v.context),
2055
2068
  values: s,
2056
2069
  fields: this._fields
2057
2070
  });
@@ -2059,7 +2072,7 @@ class It {
2059
2072
  h.on_change
2060
2073
  ));
2061
2074
  let b;
2062
- 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;
2075
+ 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;
2063
2076
  const x = {
2064
2077
  ...u,
2065
2078
  ...g,
@@ -2518,7 +2531,7 @@ function q({
2518
2531
  }
2519
2532
  return { value: n, label: n };
2520
2533
  }
2521
- const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2534
+ const Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2522
2535
  __proto__: null,
2523
2536
  getFieldsToRetrieve: mt,
2524
2537
  getValueAndLabelForField: q
@@ -2623,17 +2636,17 @@ function wt({
2623
2636
  }) {
2624
2637
  return i.map((e) => ({
2625
2638
  ...e,
2626
- x: Ft({
2639
+ x: vt({
2627
2640
  date: e.x,
2628
2641
  timerange: t
2629
2642
  })
2630
2643
  }));
2631
2644
  }
2632
- function Ft({
2645
+ function vt({
2633
2646
  date: i,
2634
2647
  timerange: t
2635
2648
  }) {
2636
- let e = vt(i);
2649
+ let e = Ft(i);
2637
2650
  const s = T(i, e);
2638
2651
  switch (t) {
2639
2652
  case "hour": {
@@ -2659,7 +2672,7 @@ function Ft({
2659
2672
  }
2660
2673
  return s.format(e);
2661
2674
  }
2662
- function vt(i) {
2675
+ function Ft(i) {
2663
2676
  return i.indexOf(":") ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
2664
2677
  }
2665
2678
  function ue(i, t) {
@@ -2723,13 +2736,13 @@ const Ct = {
2723
2736
  Object.keys(n).forEach((b) => {
2724
2737
  const x = n[b].label, y = n[b].entries;
2725
2738
  if (c.label) {
2726
- const F = R({
2739
+ const v = R({
2727
2740
  fieldName: c.label,
2728
2741
  values: y,
2729
2742
  fields: e
2730
2743
  });
2731
- Object.keys(F).forEach((v) => {
2732
- const p = F[v].entries, S = F[v].label, ge = B({
2744
+ Object.keys(v).forEach((F) => {
2745
+ const p = v[F].entries, S = v[F].label, ge = B({
2733
2746
  entries: p,
2734
2747
  fields: e,
2735
2748
  fieldName: c.name
@@ -2746,17 +2759,17 @@ const Ct = {
2746
2759
  });
2747
2760
  });
2748
2761
  } else {
2749
- const F = B({
2762
+ const v = B({
2750
2763
  entries: y,
2751
2764
  fields: e,
2752
2765
  fieldName: c.name
2753
- }), v = Y({
2754
- values: F,
2766
+ }), F = Y({
2767
+ values: v,
2755
2768
  operator: c.operator
2756
2769
  });
2757
2770
  a.push({
2758
2771
  x: x || !1,
2759
- value: v,
2772
+ value: F,
2760
2773
  type: _e({
2761
2774
  yAxis: c,
2762
2775
  fields: e
@@ -2880,7 +2893,7 @@ function fe(i, t = 0.1) {
2880
2893
  max: n + a
2881
2894
  };
2882
2895
  }
2883
- const Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2896
+ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2884
2897
  __proto__: null,
2885
2898
  getAllObjectsInGroupedValues: Pt,
2886
2899
  getMinMax: fe,
@@ -2895,13 +2908,13 @@ export {
2895
2908
  Te as ActionButtons,
2896
2909
  Ue as Alert,
2897
2910
  ke as Avatar,
2898
- Ne as Binary,
2911
+ Ae as Binary,
2899
2912
  te as Boolean,
2900
2913
  ee as Button,
2901
2914
  We as ButtonGroup,
2902
2915
  st as Card,
2903
2916
  et as Carousel,
2904
- N as Char,
2917
+ A as Char,
2905
2918
  re as CodeEditor,
2906
2919
  tt as ColorPicker,
2907
2920
  Ke as Comments,
@@ -2934,13 +2947,13 @@ export {
2934
2947
  Se as Markdown,
2935
2948
  se as MultiCheckbox,
2936
2949
  K as NewLine,
2937
- A as Notebook,
2950
+ N as Notebook,
2938
2951
  ie as One2many,
2939
2952
  Pe as Page,
2940
2953
  Ye as ProgressBar,
2941
2954
  it as QRCode,
2942
2955
  Je as Radio,
2943
- Ae as Reference,
2956
+ Ne as Reference,
2944
2957
  ct as SearchFieldTypes,
2945
2958
  Vt as SearchFilter,
2946
2959
  z as Selection,
@@ -2955,8 +2968,8 @@ export {
2955
2968
  Le as Timeline,
2956
2969
  Et as Tree,
2957
2970
  C as Widget,
2958
- At as graphFieldUtils,
2959
- Nt as graphProcessor,
2971
+ Nt as graphFieldUtils,
2972
+ At as graphProcessor,
2960
2973
  ne as parseContext,
2961
2974
  St as parseContextFields,
2962
2975
  Dt as parseDomainFields,