@gisce/ooui 2.40.0-alpha.1 → 2.40.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/dist/Image.d.ts +7 -0
- package/dist/Image.d.ts.map +1 -1
- package/dist/ooui.es.js +78 -51
- package/dist/ooui.es.js.map +1 -1
- package/package.json +1 -1
- package/src/Image.ts +34 -0
- package/src/spec/Image.spec.ts +28 -0
package/dist/Image.d.ts
CHANGED
|
@@ -3,7 +3,14 @@ import Field from "./Field";
|
|
|
3
3
|
* Image base64 field
|
|
4
4
|
*/
|
|
5
5
|
declare class Image extends Field {
|
|
6
|
+
_width?: number;
|
|
7
|
+
get width(): number | undefined;
|
|
8
|
+
set width(value: number | undefined);
|
|
9
|
+
_height?: number;
|
|
10
|
+
get height(): number | undefined;
|
|
11
|
+
set height(value: number | undefined);
|
|
6
12
|
get showControls(): boolean;
|
|
13
|
+
constructor(props: any);
|
|
7
14
|
}
|
|
8
15
|
export default Image;
|
|
9
16
|
//# sourceMappingURL=Image.d.ts.map
|
package/dist/Image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH,cAAM,KAAM,SAAQ,KAAK;IACvB,IAAI,YAAY,IAAI,OAAO,CAE1B;
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B;;GAEG;AACH,cAAM,KAAM,SAAQ,KAAK;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAElC;IAED,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEnC;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;gBAEW,KAAK,EAAE,GAAG;CAevB;AAED,eAAe,KAAK,CAAC"}
|
package/dist/ooui.es.js
CHANGED
|
@@ -669,8 +669,8 @@ const W = class W extends F {
|
|
|
669
669
|
}
|
|
670
670
|
};
|
|
671
671
|
r(W, "_defaultColspan", 3);
|
|
672
|
-
let
|
|
673
|
-
class
|
|
672
|
+
let B = W;
|
|
673
|
+
class N extends F {
|
|
674
674
|
constructor(t) {
|
|
675
675
|
super(t);
|
|
676
676
|
r(this, "_loading", !1);
|
|
@@ -683,7 +683,7 @@ class D extends F {
|
|
|
683
683
|
this._loading = t;
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
class Pt extends
|
|
686
|
+
class Pt extends N {
|
|
687
687
|
constructor(t) {
|
|
688
688
|
super(t);
|
|
689
689
|
r(this, "_icon", null);
|
|
@@ -696,7 +696,7 @@ class Pt extends D {
|
|
|
696
696
|
this._icon = t;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
class Ot extends
|
|
699
|
+
class Ot extends N {
|
|
700
700
|
constructor(t) {
|
|
701
701
|
var s;
|
|
702
702
|
super(t);
|
|
@@ -835,7 +835,7 @@ class Wt extends F {
|
|
|
835
835
|
}
|
|
836
836
|
class Tt extends f {
|
|
837
837
|
}
|
|
838
|
-
class
|
|
838
|
+
class A extends f {
|
|
839
839
|
constructor(t) {
|
|
840
840
|
super(t);
|
|
841
841
|
/**
|
|
@@ -1049,7 +1049,7 @@ class jt extends f {
|
|
|
1049
1049
|
super(e);
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
|
-
class
|
|
1052
|
+
class Nt extends f {
|
|
1053
1053
|
constructor(t) {
|
|
1054
1054
|
super(t);
|
|
1055
1055
|
r(this, "_timezone");
|
|
@@ -1156,7 +1156,7 @@ class st extends f {
|
|
|
1156
1156
|
this._infinite = t;
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
|
-
class
|
|
1159
|
+
class Dt extends k {
|
|
1160
1160
|
constructor(t) {
|
|
1161
1161
|
super(t);
|
|
1162
1162
|
/**
|
|
@@ -1182,9 +1182,9 @@ class Mt extends k {
|
|
|
1182
1182
|
return null;
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
|
-
class
|
|
1185
|
+
class Mt extends z {
|
|
1186
1186
|
}
|
|
1187
|
-
class
|
|
1187
|
+
class Bt extends f {
|
|
1188
1188
|
constructor(t) {
|
|
1189
1189
|
super(t);
|
|
1190
1190
|
/**
|
|
@@ -1200,10 +1200,37 @@ class At extends f {
|
|
|
1200
1200
|
this._filenameField = t;
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
class
|
|
1203
|
+
class At extends f {
|
|
1204
|
+
constructor(t) {
|
|
1205
|
+
super(t);
|
|
1206
|
+
r(this, "_width");
|
|
1207
|
+
r(this, "_height");
|
|
1208
|
+
if (t) {
|
|
1209
|
+
if (t.width) {
|
|
1210
|
+
const s = parseInt(t.width);
|
|
1211
|
+
this._width = isNaN(s) ? void 0 : s;
|
|
1212
|
+
}
|
|
1213
|
+
if (t.height) {
|
|
1214
|
+
const s = parseInt(t.height);
|
|
1215
|
+
this._height = isNaN(s) ? void 0 : s;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
get width() {
|
|
1220
|
+
return this._width;
|
|
1221
|
+
}
|
|
1222
|
+
set width(t) {
|
|
1223
|
+
this._width = t;
|
|
1224
|
+
}
|
|
1225
|
+
get height() {
|
|
1226
|
+
return this._height;
|
|
1227
|
+
}
|
|
1228
|
+
set height(t) {
|
|
1229
|
+
this._height = t;
|
|
1230
|
+
}
|
|
1204
1231
|
get showControls() {
|
|
1205
|
-
var
|
|
1206
|
-
return ((
|
|
1232
|
+
var t;
|
|
1233
|
+
return ((t = this.parsedWidgetProps) == null ? void 0 : t.showControls) ?? !0;
|
|
1207
1234
|
}
|
|
1208
1235
|
}
|
|
1209
1236
|
class Rt extends f {
|
|
@@ -1548,7 +1575,7 @@ class te extends F {
|
|
|
1548
1575
|
return this._container.rows.flat().filter((t) => !t.invisible);
|
|
1549
1576
|
}
|
|
1550
1577
|
}
|
|
1551
|
-
class ee extends
|
|
1578
|
+
class ee extends A {
|
|
1552
1579
|
get showText() {
|
|
1553
1580
|
return this.parsedWidgetProps.show_text ?? !0;
|
|
1554
1581
|
}
|
|
@@ -1567,7 +1594,7 @@ class ie extends f {
|
|
|
1567
1594
|
return console.log(this.parsedWidgetProps), ((e = this.parsedWidgetProps) == null ? void 0 : e.showValue) ?? !1;
|
|
1568
1595
|
}
|
|
1569
1596
|
}
|
|
1570
|
-
class se extends
|
|
1597
|
+
class se extends N {
|
|
1571
1598
|
constructor(t) {
|
|
1572
1599
|
super(t);
|
|
1573
1600
|
r(this, "_title", null);
|
|
@@ -1600,7 +1627,7 @@ class se extends D {
|
|
|
1600
1627
|
this._height = t;
|
|
1601
1628
|
}
|
|
1602
1629
|
}
|
|
1603
|
-
class
|
|
1630
|
+
class D {
|
|
1604
1631
|
constructor() {
|
|
1605
1632
|
/**
|
|
1606
1633
|
* Widget class
|
|
@@ -1610,7 +1637,7 @@ class M {
|
|
|
1610
1637
|
setWidgetClass(e) {
|
|
1611
1638
|
switch (e) {
|
|
1612
1639
|
case "notebook":
|
|
1613
|
-
this._widgetClass =
|
|
1640
|
+
this._widgetClass = B;
|
|
1614
1641
|
break;
|
|
1615
1642
|
case "page":
|
|
1616
1643
|
this._widgetClass = Pt;
|
|
@@ -1625,7 +1652,7 @@ class M {
|
|
|
1625
1652
|
this._widgetClass = et;
|
|
1626
1653
|
break;
|
|
1627
1654
|
case "char":
|
|
1628
|
-
this._widgetClass =
|
|
1655
|
+
this._widgetClass = A;
|
|
1629
1656
|
break;
|
|
1630
1657
|
case "text":
|
|
1631
1658
|
this._widgetClass = $;
|
|
@@ -1661,7 +1688,7 @@ class M {
|
|
|
1661
1688
|
this._widgetClass = jt;
|
|
1662
1689
|
break;
|
|
1663
1690
|
case "datetime":
|
|
1664
|
-
this._widgetClass =
|
|
1691
|
+
this._widgetClass = Nt;
|
|
1665
1692
|
break;
|
|
1666
1693
|
case "progressbar":
|
|
1667
1694
|
this._widgetClass = Yt;
|
|
@@ -1678,22 +1705,22 @@ class M {
|
|
|
1678
1705
|
this._widgetClass = tt;
|
|
1679
1706
|
break;
|
|
1680
1707
|
case "separator":
|
|
1681
|
-
this._widgetClass =
|
|
1708
|
+
this._widgetClass = Dt;
|
|
1682
1709
|
break;
|
|
1683
1710
|
case "url":
|
|
1684
|
-
this._widgetClass =
|
|
1711
|
+
this._widgetClass = A;
|
|
1685
1712
|
break;
|
|
1686
1713
|
case "email":
|
|
1687
1714
|
this._widgetClass = Zt;
|
|
1688
1715
|
break;
|
|
1689
1716
|
case "reference":
|
|
1690
|
-
this._widgetClass =
|
|
1717
|
+
this._widgetClass = Mt;
|
|
1691
1718
|
break;
|
|
1692
1719
|
case "binary":
|
|
1693
|
-
this._widgetClass =
|
|
1720
|
+
this._widgetClass = Bt;
|
|
1694
1721
|
break;
|
|
1695
1722
|
case "image":
|
|
1696
|
-
this._widgetClass =
|
|
1723
|
+
this._widgetClass = At;
|
|
1697
1724
|
break;
|
|
1698
1725
|
case "fiber_grid":
|
|
1699
1726
|
this._widgetClass = Rt;
|
|
@@ -1747,7 +1774,7 @@ class M {
|
|
|
1747
1774
|
this._widgetClass = K;
|
|
1748
1775
|
break;
|
|
1749
1776
|
case "spinner":
|
|
1750
|
-
this._widgetClass =
|
|
1777
|
+
this._widgetClass = N;
|
|
1751
1778
|
break;
|
|
1752
1779
|
case "carousel":
|
|
1753
1780
|
this._widgetClass = te;
|
|
@@ -2023,7 +2050,7 @@ class Se {
|
|
|
2023
2050
|
container: t,
|
|
2024
2051
|
values: s
|
|
2025
2052
|
}) {
|
|
2026
|
-
const n = new
|
|
2053
|
+
const n = new D();
|
|
2027
2054
|
e.filter((a) => typeof a == "object").forEach((a) => {
|
|
2028
2055
|
var v, C;
|
|
2029
2056
|
const { tagName: o, attributes: l, children: d } = a;
|
|
@@ -2174,7 +2201,7 @@ class Ee {
|
|
|
2174
2201
|
parse(e) {
|
|
2175
2202
|
const t = I.parse(e).filter((n) => n.tagName === "tree")[0];
|
|
2176
2203
|
this._string = t.attributes.string || null, this._string && (this._string = g(this._string)), 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)), this._editable = t.attributes.editable || null, this._infinite = t.attributes.infinite || !1;
|
|
2177
|
-
const s = new
|
|
2204
|
+
const s = new D();
|
|
2178
2205
|
t.children.forEach((n) => {
|
|
2179
2206
|
const { tagName: a, attributes: o } = n;
|
|
2180
2207
|
let l = null;
|
|
@@ -2308,7 +2335,7 @@ class Ve {
|
|
|
2308
2335
|
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)
|
|
2309
2336
|
throw new Error("Kanban view must have a column_field attribute");
|
|
2310
2337
|
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));
|
|
2311
|
-
const s = new
|
|
2338
|
+
const s = new D();
|
|
2312
2339
|
t.children.forEach((n) => {
|
|
2313
2340
|
const { tagName: a, attributes: o } = n;
|
|
2314
2341
|
a === "field" ? this._parseField(n, o, s) : a === "button" && this._parseButton(n, o);
|
|
@@ -2402,7 +2429,7 @@ class Ye {
|
|
|
2402
2429
|
return this._advancedSearchContainer;
|
|
2403
2430
|
}
|
|
2404
2431
|
parse() {
|
|
2405
|
-
const e = new
|
|
2432
|
+
const e = new D();
|
|
2406
2433
|
this.parseFields(
|
|
2407
2434
|
this.searchFields.primary,
|
|
2408
2435
|
e
|
|
@@ -2449,7 +2476,7 @@ const je = ({
|
|
|
2449
2476
|
n.length - 1
|
|
2450
2477
|
)) : (l = n, d = "id"), l === e && t.push([d, a, o]);
|
|
2451
2478
|
}), t;
|
|
2452
|
-
},
|
|
2479
|
+
}, Ne = (i) => typeof i != "string" ? [] : i.replace(/[()[\]]/g, "").split(",").map((e) => e.trim()).filter((e) => !e.includes("'"));
|
|
2453
2480
|
class de {
|
|
2454
2481
|
constructor(e) {
|
|
2455
2482
|
r(this, "_action_id", null);
|
|
@@ -2463,7 +2490,7 @@ class de {
|
|
|
2463
2490
|
return this._position;
|
|
2464
2491
|
}
|
|
2465
2492
|
}
|
|
2466
|
-
class
|
|
2493
|
+
class De {
|
|
2467
2494
|
constructor(e) {
|
|
2468
2495
|
r(this, "_string", null);
|
|
2469
2496
|
r(this, "_items", []);
|
|
@@ -2585,7 +2612,7 @@ const he = (i) => {
|
|
|
2585
2612
|
y: e
|
|
2586
2613
|
};
|
|
2587
2614
|
};
|
|
2588
|
-
class
|
|
2615
|
+
class M extends ot {
|
|
2589
2616
|
constructor(t, s) {
|
|
2590
2617
|
super(s);
|
|
2591
2618
|
r(this, "_x");
|
|
@@ -2604,10 +2631,10 @@ class B extends ot {
|
|
|
2604
2631
|
const _e = {
|
|
2605
2632
|
indicator: ct,
|
|
2606
2633
|
indicatorField: ue,
|
|
2607
|
-
line:
|
|
2608
|
-
bar:
|
|
2609
|
-
pie:
|
|
2610
|
-
},
|
|
2634
|
+
line: M,
|
|
2635
|
+
bar: M,
|
|
2636
|
+
pie: M
|
|
2637
|
+
}, Me = (i) => {
|
|
2611
2638
|
const e = I.parse(i).filter((n) => n.tagName === "graph")[0], t = e.attributes.type;
|
|
2612
2639
|
if (!t)
|
|
2613
2640
|
throw new Error(`${t} is not a valid graph`);
|
|
@@ -2679,7 +2706,7 @@ function H({
|
|
|
2679
2706
|
}
|
|
2680
2707
|
return { value: n, label: n };
|
|
2681
2708
|
}
|
|
2682
|
-
const
|
|
2709
|
+
const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2683
2710
|
__proto__: null,
|
|
2684
2711
|
getFieldsToRetrieve: me,
|
|
2685
2712
|
getValueAndLabelForField: H
|
|
@@ -3041,7 +3068,7 @@ function ft(i, e = 0.1) {
|
|
|
3041
3068
|
max: n + a
|
|
3042
3069
|
};
|
|
3043
3070
|
}
|
|
3044
|
-
const
|
|
3071
|
+
const Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3045
3072
|
__proto__: null,
|
|
3046
3073
|
getAllObjectsInGroupedValues: Pe,
|
|
3047
3074
|
getMinMax: ft,
|
|
@@ -3056,22 +3083,22 @@ export {
|
|
|
3056
3083
|
Tt as ActionButtons,
|
|
3057
3084
|
Xt as Alert,
|
|
3058
3085
|
kt as Avatar,
|
|
3059
|
-
|
|
3086
|
+
Bt as Binary,
|
|
3060
3087
|
it as Boolean,
|
|
3061
3088
|
G as Button,
|
|
3062
3089
|
Wt as ButtonGroup,
|
|
3063
3090
|
se as Card,
|
|
3064
3091
|
te as Carousel,
|
|
3065
|
-
|
|
3092
|
+
A as Char,
|
|
3066
3093
|
nt as CodeEditor,
|
|
3067
3094
|
ee as ColorPicker,
|
|
3068
3095
|
Ut as Comments,
|
|
3069
3096
|
Y as Container,
|
|
3070
3097
|
F as ContainerWidget,
|
|
3071
|
-
|
|
3098
|
+
De as Dashboard,
|
|
3072
3099
|
de as DashboardItem,
|
|
3073
3100
|
jt as Date,
|
|
3074
|
-
|
|
3101
|
+
Nt as DateTime,
|
|
3075
3102
|
Zt as Email,
|
|
3076
3103
|
f as Field,
|
|
3077
3104
|
q as Float,
|
|
@@ -3079,14 +3106,14 @@ export {
|
|
|
3079
3106
|
Se as Form,
|
|
3080
3107
|
ot as Graph,
|
|
3081
3108
|
dt as GraphAxis,
|
|
3082
|
-
|
|
3109
|
+
M as GraphChart,
|
|
3083
3110
|
ct as GraphIndicator,
|
|
3084
3111
|
ue as GraphIndicatorField,
|
|
3085
3112
|
ge as GraphXAxis,
|
|
3086
3113
|
fe as GraphYAxis,
|
|
3087
3114
|
Ot as Group,
|
|
3088
3115
|
Vt as HTMLPreview,
|
|
3089
|
-
|
|
3116
|
+
At as Image,
|
|
3090
3117
|
Gt as Indicator,
|
|
3091
3118
|
St as Integer,
|
|
3092
3119
|
K as JSONField,
|
|
@@ -3096,18 +3123,18 @@ export {
|
|
|
3096
3123
|
zt as Markdown,
|
|
3097
3124
|
rt as MultiCheckbox,
|
|
3098
3125
|
tt as NewLine,
|
|
3099
|
-
|
|
3126
|
+
B as Notebook,
|
|
3100
3127
|
st as One2many,
|
|
3101
3128
|
Pt as Page,
|
|
3102
3129
|
Yt as ProgressBar,
|
|
3103
3130
|
ie as QRCode,
|
|
3104
3131
|
Jt as Radio,
|
|
3105
|
-
|
|
3132
|
+
Mt as Reference,
|
|
3106
3133
|
ce as SearchFieldTypes,
|
|
3107
3134
|
Ye as SearchFilter,
|
|
3108
3135
|
z as Selection,
|
|
3109
|
-
|
|
3110
|
-
|
|
3136
|
+
Dt as Separator,
|
|
3137
|
+
N as Spinner,
|
|
3111
3138
|
Qt as Steps,
|
|
3112
3139
|
Ht as Switch,
|
|
3113
3140
|
qt as Tag,
|
|
@@ -3117,12 +3144,12 @@ export {
|
|
|
3117
3144
|
Lt as Timeline,
|
|
3118
3145
|
Ee as Tree,
|
|
3119
3146
|
k as Widget,
|
|
3120
|
-
|
|
3121
|
-
|
|
3147
|
+
Be as graphFieldUtils,
|
|
3148
|
+
Ae as graphProcessor,
|
|
3122
3149
|
J as parseContext,
|
|
3123
3150
|
ze as parseContextFields,
|
|
3124
|
-
|
|
3125
|
-
|
|
3151
|
+
Ne as parseDomainFields,
|
|
3152
|
+
Me as parseGraph,
|
|
3126
3153
|
je as transformDomainForChildWidget
|
|
3127
3154
|
};
|
|
3128
3155
|
//# sourceMappingURL=ooui.es.js.map
|