@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/ooui",
3
- "version": "2.34.0",
3
+ "version": "2.36.0-alpha.1",
4
4
  "engines": {
5
5
  "node": "20.5.0"
6
6
  },
package/src/Indicator.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import Selection from "./Selection";
2
2
  import { replaceEntities } from "./helpers/attributeParser";
3
+ import { parseBoolAttribute } from "./helpers/nodeParser";
3
4
 
4
5
  class Indicator extends Selection {
5
6
  _nolabel: boolean = true;
@@ -69,11 +70,21 @@ class Indicator extends Selection {
69
70
  this._height = value;
70
71
  }
71
72
 
73
+ _autoRefresh: boolean;
74
+ get autoRefresh(): boolean {
75
+ return this._autoRefresh;
76
+ }
77
+
78
+ set autoRefresh(value: boolean) {
79
+ this._autoRefresh = value;
80
+ }
81
+
72
82
  constructor(props: any) {
73
83
  super(props);
74
84
  this._card = false;
75
85
  this._icon = "";
76
86
  this._suffix = "";
87
+ this._autoRefresh = false;
77
88
  if (this._parsedWidgetProps) {
78
89
  this._card = this._parsedWidgetProps.card || false;
79
90
  this._icon = replaceEntities(this._parsedWidgetProps.icon) || "";
@@ -94,6 +105,7 @@ class Indicator extends Selection {
94
105
  console.error(e);
95
106
  }
96
107
  }
108
+ this._autoRefresh = parseBoolAttribute(props.autorefresh);
97
109
  }
98
110
  }
99
111
  }
package/src/One2many.ts CHANGED
@@ -91,12 +91,12 @@ class One2many extends Field {
91
91
  /**
92
92
  * Infinite mode
93
93
  */
94
- _infinite: boolean = false;
95
- get infinite(): boolean {
94
+ _infinite: string | boolean | undefined = undefined;
95
+ get infinite(): string | boolean | undefined {
96
96
  return this._infinite;
97
97
  }
98
98
 
99
- set infinite(value: boolean) {
99
+ set infinite(value: string | undefined) {
100
100
  this._infinite = value;
101
101
  }
102
102
 
@@ -139,13 +139,7 @@ class One2many extends Field {
139
139
  }
140
140
 
141
141
  if (props.widget_props) {
142
- if (
143
- this.parsedWidgetProps.infinite === "1" ||
144
- this.parsedWidgetProps.infinite === 1 ||
145
- this.parsedWidgetProps.infinite === true
146
- ) {
147
- this._infinite = true;
148
- }
142
+ this._infinite = props.widget_props.infinite;
149
143
  }
150
144
  }
151
145
  }