@gisce/ooui 2.40.0-alpha.4 → 2.40.0-alpha.6

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/Kanban.d.ts CHANGED
@@ -24,6 +24,8 @@ declare class Kanban {
24
24
  get buttons(): KanbanButton[];
25
25
  _string: string | null;
26
26
  get string(): string | null;
27
+ _status: string | null;
28
+ get status(): string | null;
27
29
  /**
28
30
  * Widget type
29
31
  */
@@ -32,18 +34,24 @@ declare class Kanban {
32
34
  /**
33
35
  * Field that defines the columns (e.g., "state")
34
36
  */
35
- _column_field: string | null;
36
- get column_field(): string | null;
37
+ _column_field: string;
38
+ get column_field(): string;
39
+ /**
40
+ * Domain for filtering columns (for many2one fields)
41
+ * Example: "[('fold', '!=', True)]"
42
+ */
43
+ _column_domain: string | null;
44
+ get column_domain(): string | null;
37
45
  /**
38
46
  * Enable dragging cards between columns
39
47
  */
40
48
  _drag: boolean;
41
49
  get drag(): boolean;
42
50
  /**
43
- * Enable sorting cards within columns
51
+ * Field name to use for sorting cards within columns
44
52
  */
45
- _sort: boolean;
46
- get sort(): boolean;
53
+ _sort: string | undefined;
54
+ get sort(): string | undefined;
47
55
  /**
48
56
  * Enable setting max cards per column (WIP limits)
49
57
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Kanban.d.ts","sourceRoot":"","sources":["../src/Kanban.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAM9B,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,cAAM,MAAM;IACV;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,MAAM,QAET;IAED;;OAEG;IACH,YA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IAAI,OAAO,CAElB;IAED;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAa;IACtC,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAE7B;IAED;;OAEG;IACH,cAAc,EAAE,OAAO,CAAS;IAChC,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC5C,IAAI,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAE1C;IAED,IAAI,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAE9C;IAED;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAC3C,IAAI,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEzC;gBAEW,MAAM,EAAE,MAAM;IAI1B,KAAK,CAAC,GAAG,EAAE,MAAM;IAgDjB,OAAO,CAAC,WAAW;IAkEnB,OAAO,CAAC,YAAY;IAwBpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAqBpC;AAED,eAAe,MAAM,CAAC"}
package/dist/ooui.es.js CHANGED
@@ -1462,7 +1462,7 @@ class Ht extends I {
1462
1462
  }
1463
1463
  class Qt extends it {
1464
1464
  }
1465
- class Kt extends f {
1465
+ class Xt extends f {
1466
1466
  constructor(t) {
1467
1467
  super(t);
1468
1468
  /**
@@ -1505,7 +1505,7 @@ class nt extends $ {
1505
1505
  this._lang = t;
1506
1506
  }
1507
1507
  }
1508
- class Xt extends f {
1508
+ class Kt extends f {
1509
1509
  constructor(e) {
1510
1510
  super(e);
1511
1511
  }
@@ -1569,7 +1569,7 @@ class Zt extends f {
1569
1569
  this._height = t;
1570
1570
  }
1571
1571
  }
1572
- class K extends nt {
1572
+ class X extends nt {
1573
1573
  constructor() {
1574
1574
  super(...arguments);
1575
1575
  r(this, "_lang", "json");
@@ -1789,13 +1789,13 @@ class D {
1789
1789
  this._widgetClass = Qt;
1790
1790
  break;
1791
1791
  case "steps":
1792
- this._widgetClass = Kt;
1792
+ this._widgetClass = Xt;
1793
1793
  break;
1794
1794
  case "codeeditor":
1795
1795
  this._widgetClass = nt;
1796
1796
  break;
1797
1797
  case "time":
1798
- this._widgetClass = Xt;
1798
+ this._widgetClass = Kt;
1799
1799
  break;
1800
1800
  case "html_preview":
1801
1801
  this._widgetClass = Vt;
@@ -1807,10 +1807,10 @@ class D {
1807
1807
  this._widgetClass = Zt;
1808
1808
  break;
1809
1809
  case "json":
1810
- this._widgetClass = K;
1810
+ this._widgetClass = X;
1811
1811
  break;
1812
1812
  case "arrow_steps":
1813
- this._widgetClass = K;
1813
+ this._widgetClass = X;
1814
1814
  break;
1815
1815
  case "spinner":
1816
1816
  this._widgetClass = N;
@@ -2138,7 +2138,7 @@ class Ee {
2138
2138
  h.on_change
2139
2139
  ));
2140
2140
  let b;
2141
- X(h.domain) ? b = h.domain : X((C = this._fields[h.name]) == null ? void 0 : C.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2141
+ K(h.domain) ? b = h.domain : K((C = this._fields[h.name]) == null ? void 0 : C.domain) && (b = this._fields[h.name].domain), this._keyIdx = this._keyIdx + 1;
2142
2142
  const x = {
2143
2143
  ...u,
2144
2144
  ...m,
@@ -2163,7 +2163,7 @@ class Ee {
2163
2163
  return this.container.findById(e);
2164
2164
  }
2165
2165
  }
2166
- function X(i) {
2166
+ function K(i) {
2167
2167
  return i ? Array.isArray(i) && i.length > 0 ? !0 : typeof i == "string" && i !== "" && i !== "[]" : !1;
2168
2168
  }
2169
2169
  class Ve {
@@ -2295,6 +2295,7 @@ class Ye {
2295
2295
  */
2296
2296
  r(this, "_buttons", []);
2297
2297
  r(this, "_string", null);
2298
+ r(this, "_status", null);
2298
2299
  /**
2299
2300
  * Widget type
2300
2301
  */
@@ -2302,15 +2303,20 @@ class Ye {
2302
2303
  /**
2303
2304
  * Field that defines the columns (e.g., "state")
2304
2305
  */
2305
- r(this, "_column_field", null);
2306
+ r(this, "_column_field", "state");
2307
+ /**
2308
+ * Domain for filtering columns (for many2one fields)
2309
+ * Example: "[('fold', '!=', True)]"
2310
+ */
2311
+ r(this, "_column_domain", null);
2306
2312
  /**
2307
2313
  * Enable dragging cards between columns
2308
2314
  */
2309
2315
  r(this, "_drag", !0);
2310
2316
  /**
2311
- * Enable sorting cards within columns
2317
+ * Field name to use for sorting cards within columns
2312
2318
  */
2313
- r(this, "_sort", !0);
2319
+ r(this, "_sort");
2314
2320
  /**
2315
2321
  * Enable setting max cards per column (WIP limits)
2316
2322
  */
@@ -2342,12 +2348,18 @@ class Ye {
2342
2348
  get string() {
2343
2349
  return this._string;
2344
2350
  }
2351
+ get status() {
2352
+ return this._status;
2353
+ }
2345
2354
  get type() {
2346
2355
  return this._type;
2347
2356
  }
2348
2357
  get column_field() {
2349
2358
  return this._column_field;
2350
2359
  }
2360
+ get column_domain() {
2361
+ return this._column_domain;
2362
+ }
2351
2363
  get drag() {
2352
2364
  return this._drag;
2353
2365
  }
@@ -2371,9 +2383,7 @@ class Ye {
2371
2383
  }
2372
2384
  parse(e) {
2373
2385
  const t = T.parse(e).filter((n) => n.tagName === "kanban")[0];
2374
- if (this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._column_field = t.attributes.column_field || null, !this._column_field)
2375
- throw new Error("Kanban view must have a column_field attribute");
2376
- this._drag = t.attributes.drag !== void 0 ? p(t.attributes.drag) : !0, this._sort = t.attributes.sort !== void 0 ? p(t.attributes.sort) : !0, this._set_max_cards = t.attributes.set_max_cards !== void 0 ? p(t.attributes.set_max_cards) : !1, this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors));
2386
+ this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), this._column_field = t.attributes.column_field || "state", this._column_domain = t.attributes.column_domain || null, this._drag = t.attributes.drag !== void 0 ? p(t.attributes.drag) : !0, this._sort = t.attributes.sort || void 0, this._set_max_cards = t.attributes.set_max_cards !== void 0 ? p(t.attributes.set_max_cards) : !1, this._colors = t.attributes.colors || null, this._colors && (this._colors = g(this._colors)), this._status = t.attributes.status || null, this._status && (this._status = g(this._status));
2377
2387
  const s = new D();
2378
2388
  t.children.forEach((n) => {
2379
2389
  const { tagName: a, attributes: o } = n;
@@ -3160,7 +3170,7 @@ export {
3160
3170
  At as Image,
3161
3171
  $t as Indicator,
3162
3172
  St as Integer,
3163
- K as JSONField,
3173
+ X as JSONField,
3164
3174
  Ye as Kanban,
3165
3175
  et as Label,
3166
3176
  Tt as Many2one,
@@ -3179,12 +3189,12 @@ export {
3179
3189
  I as Selection,
3180
3190
  Dt as Separator,
3181
3191
  N as Spinner,
3182
- Kt as Steps,
3192
+ Xt as Steps,
3183
3193
  Qt as Switch,
3184
3194
  Jt as Tag,
3185
3195
  qt as Tags,
3186
3196
  $ as Text,
3187
- Xt as Time,
3197
+ Kt as Time,
3188
3198
  Gt as Timeline,
3189
3199
  Ve as Tree,
3190
3200
  k as Widget,