@gisce/ooui 2.31.0 → 2.32.0-alpha.2

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # OpenObject User Interface
2
2
 
3
+ :scream:
4
+
3
5
  ## Test
4
6
 
5
7
  ```sh
@@ -3,7 +3,12 @@ import Field from "./Field";
3
3
  * DateTime input
4
4
  */
5
5
  declare class DateTime extends Field {
6
- constructor(props?: any);
6
+ _timezone: string | undefined;
7
+ get timezone(): string | undefined;
8
+ set timezone(value: string | undefined);
9
+ constructor(props?: {
10
+ timezone?: string;
11
+ } & any);
7
12
  }
8
13
  export default DateTime;
9
14
  //# sourceMappingURL=DateTime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../src/DateTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH,cAAM,QAAS,SAAQ,KAAK;gBACd,KAAK,CAAC,EAAE,GAAG;CAGxB;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../src/DateTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH,cAAM,QAAS,SAAQ,KAAK;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAa;IAE1C,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAErC;gBAEW,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,GAAG;CAIhD;AAED,eAAe,QAAQ,CAAC"}
package/dist/ooui.es.js CHANGED
@@ -936,7 +936,7 @@ class G extends f {
936
936
  this._translatable = e;
937
937
  }
938
938
  }
939
- class I extends f {
939
+ class z extends f {
940
940
  constructor(e) {
941
941
  super(e);
942
942
  /**
@@ -987,14 +987,14 @@ class Te extends f {
987
987
  return this.parsedWidgetProps.showMenu ?? !0;
988
988
  }
989
989
  }
990
- class Ie extends G {
990
+ class ze extends G {
991
991
  }
992
992
  class te extends f {
993
993
  constructor(t) {
994
994
  super(t);
995
995
  }
996
996
  }
997
- class Ee extends f {
997
+ class Ie extends f {
998
998
  constructor(t) {
999
999
  super(t);
1000
1000
  }
@@ -1032,9 +1032,9 @@ class R extends f {
1032
1032
  this._decimalDigits = e;
1033
1033
  }
1034
1034
  }
1035
- class Se extends R {
1035
+ class Ee extends R {
1036
1036
  }
1037
- class ze extends f {
1037
+ class Se extends f {
1038
1038
  }
1039
1039
  class Ve extends R {
1040
1040
  }
@@ -1044,8 +1044,16 @@ class Ye extends f {
1044
1044
  }
1045
1045
  }
1046
1046
  class De extends f {
1047
- constructor(t) {
1048
- super(t);
1047
+ constructor(e) {
1048
+ super(e);
1049
+ r(this, "_timezone");
1050
+ this._timezone = (e == null ? void 0 : e.timezone) || void 0;
1051
+ }
1052
+ get timezone() {
1053
+ return this._timezone;
1054
+ }
1055
+ set timezone(e) {
1056
+ this._timezone = e;
1049
1057
  }
1050
1058
  }
1051
1059
  class ie extends f {
@@ -1168,7 +1176,7 @@ class je extends C {
1168
1176
  return null;
1169
1177
  }
1170
1178
  }
1171
- class Me extends I {
1179
+ class Me extends z {
1172
1180
  }
1173
1181
  class Ae extends f {
1174
1182
  constructor(e) {
@@ -1229,7 +1237,7 @@ class Le extends ie {
1229
1237
  return this.parsedWidgetProps.colorField;
1230
1238
  }
1231
1239
  }
1232
- class Ge extends I {
1240
+ class Ge extends z {
1233
1241
  constructor(e) {
1234
1242
  super(e);
1235
1243
  r(this, "_nolabel", !0);
@@ -1338,7 +1346,7 @@ class se extends f {
1338
1346
  }
1339
1347
  class Re extends se {
1340
1348
  }
1341
- class $e extends I {
1349
+ class $e extends z {
1342
1350
  get colors() {
1343
1351
  return this._parsedWidgetProps.colors || {};
1344
1352
  }
@@ -1347,7 +1355,7 @@ class $e extends I {
1347
1355
  return ((t = this._parsedWidgetProps) == null ? void 0 : t.colorField) || null;
1348
1356
  }
1349
1357
  }
1350
- class qe extends I {
1358
+ class qe extends z {
1351
1359
  constructor(e) {
1352
1360
  super(e);
1353
1361
  /**
@@ -1553,7 +1561,7 @@ class $ {
1553
1561
  this._widgetClass = We;
1554
1562
  break;
1555
1563
  case "selection":
1556
- this._widgetClass = I;
1564
+ this._widgetClass = z;
1557
1565
  break;
1558
1566
  case "many2one":
1559
1567
  this._widgetClass = Te;
@@ -1562,13 +1570,13 @@ class $ {
1562
1570
  this._widgetClass = te;
1563
1571
  break;
1564
1572
  case "integer":
1565
- this._widgetClass = Ee;
1573
+ this._widgetClass = Ie;
1566
1574
  break;
1567
1575
  case "float":
1568
1576
  this._widgetClass = R;
1569
1577
  break;
1570
1578
  case "float_time":
1571
- this._widgetClass = Se;
1579
+ this._widgetClass = Ee;
1572
1580
  break;
1573
1581
  case "date":
1574
1582
  this._widgetClass = Ye;
@@ -1580,7 +1588,7 @@ class $ {
1580
1588
  this._widgetClass = Ve;
1581
1589
  break;
1582
1590
  case "markdown":
1583
- this._widgetClass = Ie;
1591
+ this._widgetClass = ze;
1584
1592
  break;
1585
1593
  case "many2many":
1586
1594
  case "one2many":
@@ -1645,7 +1653,7 @@ class $ {
1645
1653
  this._widgetClass = Qe;
1646
1654
  break;
1647
1655
  case "html_preview":
1648
- this._widgetClass = ze;
1656
+ this._widgetClass = Se;
1649
1657
  break;
1650
1658
  case "alert":
1651
1659
  this._widgetClass = Xe;
@@ -1938,9 +1946,9 @@ class Tt {
1938
1946
  const { tagName: l, attributes: o, children: u } = a;
1939
1947
  let _ = l, h = o;
1940
1948
  if (l === "field") {
1941
- const { name: x, widget: E } = o;
1942
- if (E)
1943
- _ = E;
1949
+ const { name: x, widget: I } = o;
1950
+ if (I)
1951
+ _ = I;
1944
1952
  else if (x) {
1945
1953
  if (!this._fields[x])
1946
1954
  throw new Error(
@@ -2009,7 +2017,7 @@ class Tt {
2009
2017
  function Q(i) {
2010
2018
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2011
2019
  }
2012
- class It {
2020
+ class zt {
2013
2021
  constructor(t) {
2014
2022
  /**
2015
2023
  * Object containing fields specification of the form.
@@ -2136,7 +2144,7 @@ const at = {
2136
2144
  date: "date",
2137
2145
  datetime: "datetime"
2138
2146
  };
2139
- class Et {
2147
+ class It {
2140
2148
  constructor(t, e, s = 8) {
2141
2149
  /**
2142
2150
  * Object containing the specific fields for primary and secondary search fields
@@ -2195,7 +2203,7 @@ class Et {
2195
2203
  return this.advancedSearchContainer.findById(t);
2196
2204
  }
2197
2205
  }
2198
- const St = ({
2206
+ const Et = ({
2199
2207
  domain: i,
2200
2208
  widgetFieldName: t
2201
2209
  }) => {
@@ -2210,7 +2218,7 @@ const St = ({
2210
2218
  n.length - 1
2211
2219
  )) : (o = n, u = "id"), o === t && e.push([u, a, l]);
2212
2220
  }), e;
2213
- }, zt = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2221
+ }, St = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((t) => t.trim()).filter((t) => !t.includes("'"));
2214
2222
  class lt {
2215
2223
  constructor(t) {
2216
2224
  r(this, "_action_id", null);
@@ -2507,12 +2515,12 @@ function mt({
2507
2515
  for (let l = 0; l < a.length - 1; l++) {
2508
2516
  const o = a[l], u = a[l + 1];
2509
2517
  if (!de([o, u], n)) {
2510
- const _ = T(o, z(n)).add(
2518
+ const _ = T(o, S(n)).add(
2511
2519
  e,
2512
2520
  n
2513
- ), h = T(u, z(n));
2521
+ ), h = T(u, S(n));
2514
2522
  for (; _.isBefore(h); )
2515
- s.push(_.format(z(n))), _.add(e, n);
2523
+ s.push(_.format(S(n))), _.add(e, n);
2516
2524
  }
2517
2525
  }
2518
2526
  return s;
@@ -2586,7 +2594,7 @@ function xt(i) {
2586
2594
  }
2587
2595
  function de(i, t) {
2588
2596
  let e = !1;
2589
- const s = z(t);
2597
+ const s = S(t);
2590
2598
  if (i.length === 0)
2591
2599
  return !1;
2592
2600
  if (i.length === 1)
@@ -2607,7 +2615,7 @@ function he({
2607
2615
  e[o] || (e[o] = []), e[o].push(s);
2608
2616
  }), e;
2609
2617
  }
2610
- function z(i) {
2618
+ function S(i) {
2611
2619
  switch (i) {
2612
2620
  case "days":
2613
2621
  return "YYYY-MM-DD";
@@ -2651,7 +2659,7 @@ const wt = {
2651
2659
  fields: e
2652
2660
  });
2653
2661
  Object.keys(v).forEach((F) => {
2654
- const x = v[F].entries, E = v[F].label, ge = N({
2662
+ const x = v[F].entries, I = v[F].label, ge = N({
2655
2663
  entries: x,
2656
2664
  fields: e,
2657
2665
  fieldName: c.name
@@ -2662,7 +2670,7 @@ const wt = {
2662
2670
  a.push({
2663
2671
  x: p || !1,
2664
2672
  value: me,
2665
- type: E,
2673
+ type: I,
2666
2674
  operator: c.operator,
2667
2675
  stacked: c.stacked
2668
2676
  });
@@ -2734,26 +2742,26 @@ function Y({
2734
2742
  case "count":
2735
2743
  return t.length;
2736
2744
  case "+":
2737
- return S(
2745
+ return E(
2738
2746
  t.reduce(function(e, s) {
2739
2747
  return e + s;
2740
2748
  })
2741
2749
  );
2742
2750
  case "-":
2743
- return S(
2751
+ return E(
2744
2752
  t.reduce(function(e, s) {
2745
2753
  return e - s;
2746
2754
  })
2747
2755
  );
2748
2756
  case "*":
2749
- return S(
2757
+ return E(
2750
2758
  t.reduce(function(e, s) {
2751
2759
  return e * s;
2752
2760
  })
2753
2761
  );
2754
2762
  case "avg": {
2755
2763
  const s = t.reduce((n, a) => n + a, 0) / t.length || 0;
2756
- return S(s);
2764
+ return E(s);
2757
2765
  }
2758
2766
  case "min":
2759
2767
  return Math.min(...t);
@@ -2761,7 +2769,7 @@ function Y({
2761
2769
  return Math.max(...t);
2762
2770
  }
2763
2771
  }
2764
- function S(i) {
2772
+ function E(i) {
2765
2773
  return Math.round((i + Number.EPSILON) * 100) / 100;
2766
2774
  }
2767
2775
  function B({
@@ -2834,7 +2842,7 @@ export {
2834
2842
  Ke as Email,
2835
2843
  f as Field,
2836
2844
  R as Float,
2837
- Se as FloatTime,
2845
+ Ee as FloatTime,
2838
2846
  Tt as Form,
2839
2847
  oe as Graph,
2840
2848
  ue as GraphAxis,
@@ -2844,14 +2852,14 @@ export {
2844
2852
  ht as GraphXAxis,
2845
2853
  dt as GraphYAxis,
2846
2854
  Oe as Group,
2847
- ze as HTMLPreview,
2855
+ Se as HTMLPreview,
2848
2856
  Ne as Image,
2849
2857
  Ge as Indicator,
2850
- Ee as Integer,
2858
+ Ie as Integer,
2851
2859
  H as JSONField,
2852
2860
  Z as Label,
2853
2861
  Te as Many2one,
2854
- Ie as Markdown,
2862
+ ze as Markdown,
2855
2863
  se as MultiCheckbox,
2856
2864
  K as NewLine,
2857
2865
  M as Notebook,
@@ -2861,8 +2869,8 @@ export {
2861
2869
  qe as Radio,
2862
2870
  Me as Reference,
2863
2871
  at as SearchFieldTypes,
2864
- Et as SearchFilter,
2865
- I as Selection,
2872
+ It as SearchFilter,
2873
+ z as Selection,
2866
2874
  je as Separator,
2867
2875
  L as Spinner,
2868
2876
  He as Steps,
@@ -2872,14 +2880,14 @@ export {
2872
2880
  G as Text,
2873
2881
  Qe as Time,
2874
2882
  Le as Timeline,
2875
- It as Tree,
2883
+ zt as Tree,
2876
2884
  C as Widget,
2877
2885
  Dt as graphFieldUtils,
2878
2886
  jt as graphProcessor,
2879
2887
  ne as parseContext,
2880
2888
  Wt as parseContextFields,
2881
- zt as parseDomainFields,
2889
+ St as parseDomainFields,
2882
2890
  Yt as parseGraph,
2883
- St as transformDomainForChildWidget
2891
+ Et as transformDomainForChildWidget
2884
2892
  };
2885
2893
  //# sourceMappingURL=ooui.es.js.map