@golemui/gui-lit 1.6.0 → 2.0.0-rc.0
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/CHANGELOG.md +76 -0
- package/accordion.element-CE1gDRCy.js +84 -0
- package/alert.element-Bqcad7bR.js +43 -0
- package/{button.element-CKYv0Glr.js → button.element-CjeUWaly.js} +23 -24
- package/{calendar.element-DkHZFBNr.js → calendar.element-DXI9bfFN.js} +17 -22
- package/{checkbox.element-MukoziRw.js → checkbox.element-D8hXKLjW.js} +18 -22
- package/{currency.element-DNumeSKA.js → currency.element-D8t_MtIs.js} +22 -26
- package/{date-picker.element-DpQmremq.js → date-picker.element-X__hfSnj.js} +16 -21
- package/{date-time-calendar.element-GAr8VMGa.js → date-time-calendar.element-Dmyd7LQ0.js} +17 -21
- package/{date-time-picker.element-Bt0GYSpS.js → date-time-picker.element-QGn5dEbf.js} +23 -27
- package/{date-time.element-WfLnY_Cb.js → date-time.element-B0OuRjlf.js} +20 -25
- package/{date.element-ChpTi2AQ.js → date.element-Ba8wmaNU.js} +13 -18
- package/{dropdown.element-Ckh9JvEK.js → dropdown.element-Djee1u1L.js} +15 -29
- package/{file-upload.element-l_l_ubxJ.js → file-upload.element-B3oBEQ_s.js} +18 -23
- package/grid.element-CwDdlQ4b.js +54 -0
- package/index.js +42 -42
- package/index.umd.cjs +289 -352
- package/lib/components/accordion.element.d.ts +2 -2
- package/lib/components/alert.element.d.ts +0 -1
- package/lib/components/calendar.element.d.ts +0 -1
- package/lib/components/checkbox.element.d.ts +0 -1
- package/lib/components/currency.element.d.ts +0 -1
- package/lib/components/date-picker.element.d.ts +0 -1
- package/lib/components/date-time-calendar.element.d.ts +0 -1
- package/lib/components/date-time-picker.element.d.ts +0 -1
- package/lib/components/date-time.element.d.ts +0 -1
- package/lib/components/date.element.d.ts +0 -1
- package/lib/components/dropdown.element.d.ts +0 -1
- package/lib/components/file-upload.element.d.ts +0 -1
- package/lib/components/grid.element.d.ts +3 -3
- package/lib/components/list.element.d.ts +0 -1
- package/lib/components/markdown-text.element.d.ts +0 -1
- package/lib/components/markdown.element.d.ts +0 -1
- package/lib/components/multi-dropdown.element.d.ts +0 -1
- package/lib/components/multi-file-upload.element.d.ts +0 -1
- package/lib/components/multi-list.element.d.ts +0 -1
- package/lib/components/number.element.d.ts +0 -1
- package/lib/components/password.element.d.ts +0 -1
- package/lib/components/radiogroup.element.d.ts +0 -1
- package/lib/components/range-calendar.element.d.ts +0 -1
- package/lib/components/range-date-input.element.d.ts +0 -1
- package/lib/components/range-date-picker.element.d.ts +0 -1
- package/lib/components/range-date-time-calendar.element.d.ts +0 -1
- package/lib/components/range-date-time-input.element.d.ts +0 -1
- package/lib/components/range-date-time-picker.element.d.ts +0 -1
- package/lib/components/range-time-input.element.d.ts +0 -1
- package/lib/components/range-time-picker.element.d.ts +0 -1
- package/lib/components/renderer.element.d.ts +0 -1
- package/lib/components/repeater.element.d.ts +0 -1
- package/lib/components/select.element.d.ts +0 -1
- package/lib/components/tabs.element.d.ts +4 -15
- package/lib/components/tags.element.d.ts +0 -1
- package/lib/components/textarea.element.d.ts +0 -1
- package/lib/components/textinput.element.d.ts +0 -1
- package/lib/components/time-picker.element.d.ts +0 -1
- package/lib/components/time.element.d.ts +0 -1
- package/lib/components/toggle.element.d.ts +0 -1
- package/{list.element-UIKmXzeH.js → list.element-DfLD2X8s.js} +37 -38
- package/{markdown-text.element-DflCQwAo.js → markdown-text.element-Jos6zKYy.js} +17 -22
- package/{markdown.element-DUHHoi2Y.js → markdown.element-7tvZ028P.js} +11 -15
- package/{multi-dropdown.element-mX06nBBb.js → multi-dropdown.element-B1vV4rF-.js} +51 -65
- package/{multi-file-upload.element-DzAZAfc1.js → multi-file-upload.element-4h6JQgRF.js} +16 -21
- package/{multi-list.element-Bs-UN2Cy.js → multi-list.element-CNVHVkj0.js} +44 -45
- package/{number.element-mQSFQsYC.js → number.element-WRHwQGZz.js} +19 -23
- package/package.json +6 -6
- package/{password.element-xw5gugEg.js → password.element-DnV_PqKI.js} +17 -21
- package/{radiogroup.element-TqfrxVyI.js → radiogroup.element-Cqn_48Ao.js} +20 -24
- package/{range-calendar.element-BJr97SVA.js → range-calendar.element-V_56ZeT9.js} +13 -18
- package/{range-date-input.element-DDRYvP9h.js → range-date-input.element-D3ZG8OW-.js} +15 -20
- package/{range-date-picker.element-rdEr0_wu.js → range-date-picker.element-CaNHjueS.js} +21 -26
- package/{range-date-time-calendar.element-UlL1BBRJ.js → range-date-time-calendar.element-DyiiUB5Q.js} +19 -24
- package/{range-date-time-input.element-Cq4IdW7N.js → range-date-time-input.element-CVCPS7FC.js} +20 -25
- package/{range-date-time-picker.element-CnJcIN9C.js → range-date-time-picker.element-6nBQ_NZs.js} +16 -21
- package/{range-time-input.element-Cq0TrGe9.js → range-time-input.element-GXw45kMr.js} +12 -17
- package/{range-time-picker.element-BzlIuZ6m.js → range-time-picker.element-CG4PJg3u.js} +24 -29
- package/{renderer.element-BVwerbtL.js → renderer.element-FWOUTePl.js} +16 -21
- package/{repeater.element-DQNI4b7I.js → repeater.element-V508AKTJ.js} +8 -13
- package/{select.element-RBtbAvLx.js → select.element-BPrqKmDM.js} +17 -20
- package/tabs.element-CeZOk5Bj.js +88 -0
- package/{tags.element-CGvxhMmX.js → tags.element-CVCUsKZ0.js} +12 -17
- package/{textarea.element-E2ntRBtE.js → textarea.element-DrWG3xvs.js} +23 -27
- package/{textinput.element-0q5F5ol3.js → textinput.element-CCgsbYTB.js} +25 -29
- package/{time-picker.element-BiLaLr_c.js → time-picker.element-Q_OWcBVy.js} +21 -26
- package/{time.element-92goKRwJ.js → time.element-B0L2sriD.js} +20 -25
- package/{toggle.element-zDUc9Vja.js → toggle.element-BTjo7IVK.js} +18 -22
- package/accordion.element-BEenQrCh.js +0 -102
- package/alert.element-Dzv49O-1.js +0 -55
- package/flex.element-BW0_kx8z.js +0 -79
- package/grid.element-C019lV76.js +0 -78
- package/lib/components/flex.element.d.ts +0 -16
- package/tabs.element-BiVaQlvt.js +0 -171
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { InputWidgetAdapter as d, formContext as l, inputContext as m } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/date-time-calendar";
|
|
3
|
-
import { consume as
|
|
3
|
+
import { consume as u, provide as p } from "@lit/context";
|
|
4
4
|
import { LitElement as h, html as c } from "lit";
|
|
5
5
|
import { property as $ } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as b, safeDefine as g } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var
|
|
9
|
-
for (var t = void 0,
|
|
10
|
-
(
|
|
11
|
-
return t &&
|
|
8
|
+
var M = Object.defineProperty, o = (a, e, n, f) => {
|
|
9
|
+
for (var t = void 0, i = a.length - 1, s; i >= 0; i--)
|
|
10
|
+
(s = a[i]) && (t = s(e, n, t) || t);
|
|
11
|
+
return t && M(e, n, t), t;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class r extends h {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
16
16
|
}
|
|
17
17
|
createRenderRoot() {
|
|
18
18
|
return this;
|
|
19
19
|
}
|
|
20
|
-
updated(e) {
|
|
21
|
-
super.updated(e);
|
|
22
|
-
const a = this.adapter.templateData.size;
|
|
23
|
-
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
24
|
-
}
|
|
25
20
|
connectedCallback() {
|
|
26
21
|
super.connectedCallback(), this.classList.add("gui-date-time-calendar", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
22
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -36,7 +31,7 @@ class s extends h {
|
|
|
36
31
|
.label=${e.label}
|
|
37
32
|
.hint=${e.hint}
|
|
38
33
|
.errors=${e.errors}
|
|
39
|
-
|
|
34
|
+
.touched=${e.touched}
|
|
40
35
|
?required=${e.validator?.required}
|
|
41
36
|
?disabled=${e.disabled}
|
|
42
37
|
?readonly=${e.readonly}
|
|
@@ -61,14 +56,15 @@ class s extends h {
|
|
|
61
56
|
.maxTime=${e.maxTime}
|
|
62
57
|
.disabledTimeRanges=${e.disabledTimeRanges}
|
|
63
58
|
?allow-custom-time=${e.allowCustomTime}
|
|
59
|
+
.timeLabel=${e.timeLabel}
|
|
64
60
|
.minTimeMessage=${e.minTimeMessage}
|
|
65
61
|
.maxTimeMessage=${e.maxTimeMessage}
|
|
66
62
|
.disabledTimeRangeMessage=${e.disabledTimeRangeMessage}
|
|
67
63
|
.noAvailableTimesMessage=${e.noAvailableTimesMessage}
|
|
68
64
|
.incompleteMessage=${e.incompleteMessage}
|
|
69
|
-
@
|
|
70
|
-
@
|
|
71
|
-
@blur=${() => this.adapter.onBlur()}
|
|
65
|
+
@gui-input=${this.valueChanged}
|
|
66
|
+
@gui-input-error=${this.onInputError}
|
|
67
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
72
68
|
></gui-date-time-calendar>
|
|
73
69
|
`;
|
|
74
70
|
}
|
|
@@ -83,13 +79,13 @@ class s extends h {
|
|
|
83
79
|
}
|
|
84
80
|
}
|
|
85
81
|
o([
|
|
86
|
-
|
|
82
|
+
u({ context: l }),
|
|
87
83
|
$({ attribute: !1 })
|
|
88
|
-
],
|
|
84
|
+
], r.prototype, "formContext");
|
|
89
85
|
o([
|
|
90
|
-
|
|
91
|
-
],
|
|
92
|
-
g("gui-date-time-calendar-input",
|
|
86
|
+
p({ context: m })
|
|
87
|
+
], r.prototype, "adapter");
|
|
88
|
+
g("gui-date-time-calendar-input", r);
|
|
93
89
|
export {
|
|
94
|
-
|
|
90
|
+
r as DateTimeCalendarElement
|
|
95
91
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { InputWidgetAdapter as l, formContext as d, inputContext as m } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/date-time-picker";
|
|
3
|
-
import { consume as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { property as
|
|
6
|
-
import { unsubscribeAll as
|
|
3
|
+
import { consume as u, provide as p } from "@lit/context";
|
|
4
|
+
import { LitElement as b, html as $ } from "lit";
|
|
5
|
+
import { property as h } from "lit/decorators.js";
|
|
6
|
+
import { unsubscribeAll as c, safeDefine as g } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var M = Object.defineProperty, o = (
|
|
9
|
-
for (var a = void 0,
|
|
10
|
-
(n = i
|
|
11
|
-
return a && M(e,
|
|
8
|
+
var M = Object.defineProperty, o = (t, e, s, A) => {
|
|
9
|
+
for (var a = void 0, i = t.length - 1, n; i >= 0; i--)
|
|
10
|
+
(n = t[i]) && (a = n(e, s, a) || a);
|
|
11
|
+
return a && M(e, s, a), a;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class r extends b {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.adapter = new l(), this.subscriptions = [];
|
|
16
16
|
}
|
|
17
17
|
createRenderRoot() {
|
|
18
18
|
return this;
|
|
19
19
|
}
|
|
20
|
-
updated(e) {
|
|
21
|
-
super.updated(e);
|
|
22
|
-
const t = this.adapter.templateData.size;
|
|
23
|
-
t ? this.style.flex = String(t) : this.style.removeProperty("flex");
|
|
24
|
-
}
|
|
25
20
|
connectedCallback() {
|
|
26
21
|
super.connectedCallback(), this.classList.add("gui-date-time-picker", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
22
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -30,13 +25,13 @@ class s extends h {
|
|
|
30
25
|
render() {
|
|
31
26
|
super.render();
|
|
32
27
|
const e = this.adapter.templateData;
|
|
33
|
-
return
|
|
28
|
+
return $`
|
|
34
29
|
<gui-date-time-picker
|
|
35
30
|
.uid=${this.widget.uid}
|
|
36
31
|
.label=${e.label}
|
|
37
32
|
.hint=${e.hint}
|
|
38
33
|
.errors=${e.errors}
|
|
39
|
-
|
|
34
|
+
.touched=${e.touched}
|
|
40
35
|
?required=${e.validator?.required}
|
|
41
36
|
?disabled=${e.disabled}
|
|
42
37
|
?readonly=${e.readonly}
|
|
@@ -69,6 +64,7 @@ class s extends h {
|
|
|
69
64
|
.maxTime=${e.maxTime}
|
|
70
65
|
.disabledTimeRanges=${e.disabledTimeRanges}
|
|
71
66
|
?allow-custom-time=${e.allowCustomTime}
|
|
67
|
+
.timeLabel=${e.timeLabel}
|
|
72
68
|
.invalidDateMessage=${e.invalidDateMessage}
|
|
73
69
|
.minDateMessage=${e.minDateMessage}
|
|
74
70
|
.maxDateMessage=${e.maxDateMessage}
|
|
@@ -78,9 +74,9 @@ class s extends h {
|
|
|
78
74
|
.disabledTimeRangeMessage=${e.disabledTimeRangeMessage}
|
|
79
75
|
.noAvailableTimesMessage=${e.noAvailableTimesMessage}
|
|
80
76
|
.incompleteMessage=${e.incompleteMessage}
|
|
81
|
-
@
|
|
82
|
-
@blur=${() => this.adapter.onBlur()}
|
|
83
|
-
@
|
|
77
|
+
@gui-input-error=${this.onInputError}
|
|
78
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
79
|
+
@gui-input=${this.valueChanged}
|
|
84
80
|
></gui-date-time-picker>
|
|
85
81
|
`;
|
|
86
82
|
}
|
|
@@ -91,17 +87,17 @@ class s extends h {
|
|
|
91
87
|
this.adapter.injectValidationIssues([e.detail.message]);
|
|
92
88
|
}
|
|
93
89
|
disconnectedCallback() {
|
|
94
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
90
|
+
super.disconnectedCallback(), this.adapter.destroy(), c(this.subscriptions);
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
93
|
o([
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
],
|
|
94
|
+
u({ context: d }),
|
|
95
|
+
h({ attribute: !1 })
|
|
96
|
+
], r.prototype, "formContext");
|
|
101
97
|
o([
|
|
102
|
-
|
|
103
|
-
],
|
|
104
|
-
g("gui-date-time-picker-input",
|
|
98
|
+
p({ context: m })
|
|
99
|
+
], r.prototype, "adapter");
|
|
100
|
+
g("gui-date-time-picker-input", r);
|
|
105
101
|
export {
|
|
106
|
-
|
|
102
|
+
r as DateTimePickerElement
|
|
107
103
|
};
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as m, formContext as l, inputContext as n } from "@golemui/lit";
|
|
2
2
|
import { addIcon as o } from "@golemui/gui-components/internals";
|
|
3
3
|
import { unsubscribeAll as h, safeDefine as u } from "@golemui/lit/internals";
|
|
4
4
|
import "@golemui/gui-components/date-time-input";
|
|
5
5
|
import { consume as D, provide as c } from "@lit/context";
|
|
6
|
-
import { LitElement as $, html as
|
|
7
|
-
import { property as
|
|
6
|
+
import { LitElement as $, html as g } from "lit";
|
|
7
|
+
import { property as b } from "lit/decorators.js";
|
|
8
8
|
import "rxjs";
|
|
9
9
|
import { classMap as f } from "lit/directives/class-map.js";
|
|
10
|
-
var x = Object.defineProperty, d = (
|
|
11
|
-
for (var a = void 0,
|
|
12
|
-
(p = i
|
|
13
|
-
return a && x(t,
|
|
10
|
+
var x = Object.defineProperty, d = (e, t, s, v) => {
|
|
11
|
+
for (var a = void 0, i = e.length - 1, p; i >= 0; i--)
|
|
12
|
+
(p = e[i]) && (a = p(t, s, a) || a);
|
|
13
|
+
return a && x(t, s, a), a;
|
|
14
14
|
};
|
|
15
|
-
class
|
|
15
|
+
class r extends $ {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(...arguments), this.adapter = new
|
|
17
|
+
super(...arguments), this.adapter = new m(), this.subscriptions = [];
|
|
18
18
|
}
|
|
19
19
|
createRenderRoot() {
|
|
20
20
|
return this;
|
|
21
21
|
}
|
|
22
|
-
updated(t) {
|
|
23
|
-
super.updated(t);
|
|
24
|
-
const e = this.adapter.templateData.size;
|
|
25
|
-
e ? this.style.flex = String(e) : this.style.removeProperty("flex");
|
|
26
|
-
}
|
|
27
22
|
connectedCallback() {
|
|
28
23
|
super.connectedCallback(), this.classList.add("gui-date-time", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
29
24
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -32,14 +27,14 @@ class s extends $ {
|
|
|
32
27
|
render() {
|
|
33
28
|
super.render();
|
|
34
29
|
const t = o("date-time", this.adapter.templateData);
|
|
35
|
-
return
|
|
30
|
+
return g`
|
|
36
31
|
<gui-date-time
|
|
37
32
|
class=${f(t.widgetClasses)}
|
|
38
33
|
.uid=${this.widget.uid}
|
|
39
34
|
.label=${this.adapter.templateData.label}
|
|
40
35
|
.hint=${this.adapter.templateData.hint}
|
|
41
36
|
.errors=${this.adapter.templateData.errors}
|
|
42
|
-
|
|
37
|
+
.touched=${this.adapter.templateData.touched}
|
|
43
38
|
?required=${this.adapter.templateData.validator?.required}
|
|
44
39
|
?disabled=${this.adapter.templateData.disabled}
|
|
45
40
|
?readonly=${this.adapter.templateData.readonly}
|
|
@@ -64,9 +59,9 @@ class s extends $ {
|
|
|
64
59
|
.incompleteMessage=${this.adapter.templateData.incompleteMessage}
|
|
65
60
|
.hourFormat=${this.adapter.templateData.hourFormat}
|
|
66
61
|
.minuteStep=${this.adapter.templateData.minuteStep}
|
|
67
|
-
@
|
|
68
|
-
@blur=${() => this.adapter.onBlur()}
|
|
69
|
-
@
|
|
62
|
+
@gui-input-error=${this.onInputError}
|
|
63
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
64
|
+
@gui-input=${this.valueChanged}
|
|
70
65
|
></gui-date-time>
|
|
71
66
|
`;
|
|
72
67
|
}
|
|
@@ -81,13 +76,13 @@ class s extends $ {
|
|
|
81
76
|
}
|
|
82
77
|
}
|
|
83
78
|
d([
|
|
84
|
-
D({ context:
|
|
85
|
-
|
|
86
|
-
],
|
|
79
|
+
D({ context: l }),
|
|
80
|
+
b({ attribute: !1 })
|
|
81
|
+
], r.prototype, "formContext");
|
|
87
82
|
d([
|
|
88
83
|
c({ context: n })
|
|
89
|
-
],
|
|
90
|
-
u("gui-date-time-input",
|
|
84
|
+
], r.prototype, "adapter");
|
|
85
|
+
u("gui-date-time-input", r);
|
|
91
86
|
export {
|
|
92
|
-
|
|
87
|
+
r as DateTimeElement
|
|
93
88
|
};
|
|
@@ -7,23 +7,18 @@ import { LitElement as g, html as $ } from "lit";
|
|
|
7
7
|
import { property as b } from "lit/decorators.js";
|
|
8
8
|
import "rxjs";
|
|
9
9
|
import { classMap as f } from "lit/directives/class-map.js";
|
|
10
|
-
var v = Object.defineProperty, d = (
|
|
11
|
-
for (var
|
|
12
|
-
(p =
|
|
13
|
-
return
|
|
10
|
+
var v = Object.defineProperty, d = (e, t, s, C) => {
|
|
11
|
+
for (var a = void 0, i = e.length - 1, p; i >= 0; i--)
|
|
12
|
+
(p = e[i]) && (a = p(t, s, a) || a);
|
|
13
|
+
return a && v(t, s, a), a;
|
|
14
14
|
};
|
|
15
|
-
class
|
|
15
|
+
class r extends g {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this.adapter = new l(), this.subscriptions = [];
|
|
18
18
|
}
|
|
19
19
|
createRenderRoot() {
|
|
20
20
|
return this;
|
|
21
21
|
}
|
|
22
|
-
updated(t) {
|
|
23
|
-
super.updated(t);
|
|
24
|
-
const a = this.adapter.templateData.size;
|
|
25
|
-
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
26
|
-
}
|
|
27
22
|
connectedCallback() {
|
|
28
23
|
super.connectedCallback(), this.classList.add("gui-date", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
29
24
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -39,7 +34,7 @@ class s extends g {
|
|
|
39
34
|
.label=${this.adapter.templateData.label}
|
|
40
35
|
.hint=${this.adapter.templateData.hint}
|
|
41
36
|
.errors=${this.adapter.templateData.errors}
|
|
42
|
-
|
|
37
|
+
.touched=${this.adapter.templateData.touched}
|
|
43
38
|
?required=${this.adapter.templateData.validator?.required}
|
|
44
39
|
?disabled=${this.adapter.templateData.disabled}
|
|
45
40
|
?readonly=${this.adapter.templateData.readonly}
|
|
@@ -55,9 +50,9 @@ class s extends g {
|
|
|
55
50
|
.minDateMessage=${this.adapter.templateData.minDateMessage}
|
|
56
51
|
.maxDateMessage=${this.adapter.templateData.maxDateMessage}
|
|
57
52
|
.incompleteMessage=${this.adapter.templateData.incompleteMessage}
|
|
58
|
-
@
|
|
59
|
-
@blur=${() => this.adapter.onBlur()}
|
|
60
|
-
@
|
|
53
|
+
@gui-input-error=${this.onInputError}
|
|
54
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
55
|
+
@gui-input=${this.valueChanged}
|
|
61
56
|
></gui-date>
|
|
62
57
|
`;
|
|
63
58
|
}
|
|
@@ -74,11 +69,11 @@ class s extends g {
|
|
|
74
69
|
d([
|
|
75
70
|
c({ context: n }),
|
|
76
71
|
b({ attribute: !1 })
|
|
77
|
-
],
|
|
72
|
+
], r.prototype, "formContext");
|
|
78
73
|
d([
|
|
79
74
|
D({ context: o })
|
|
80
|
-
],
|
|
81
|
-
u("gui-date-input",
|
|
75
|
+
], r.prototype, "adapter");
|
|
76
|
+
u("gui-date-input", r);
|
|
82
77
|
export {
|
|
83
|
-
|
|
78
|
+
r as DateElement
|
|
84
79
|
};
|
|
@@ -3,20 +3,21 @@ import { consume as D, provide as R } from "@lit/context";
|
|
|
3
3
|
import { LitElement as L, nothing as p, html as _ } from "lit";
|
|
4
4
|
import { classMap as v } from "lit/directives/class-map.js";
|
|
5
5
|
import { property as k, state as d, query as $ } from "lit/decorators.js";
|
|
6
|
-
import { unsubscribeAll as V, cspStyleMap as S, safeDefine as
|
|
7
|
-
import { Subject as
|
|
6
|
+
import { unsubscribeAll as V, cspStyleMap as S, safeDefine as T } from "@golemui/lit/internals";
|
|
7
|
+
import { Subject as j, debounceTime as P } from "rxjs";
|
|
8
8
|
import { d as q } from "./default-list-item-renderer-CuPJ9jUD.js";
|
|
9
9
|
import "@golemui/gui-components/label";
|
|
10
10
|
import "@golemui/gui-components/list";
|
|
11
11
|
import "@golemui/gui-components/errors";
|
|
12
|
-
|
|
12
|
+
import { live as O } from "lit/directives/live.js";
|
|
13
|
+
var E = Object.defineProperty, l = (g, e, t, s) => {
|
|
13
14
|
for (var i = void 0, u = g.length - 1, h; u >= 0; u--)
|
|
14
15
|
(h = g[u]) && (i = h(e, t, i) || i);
|
|
15
|
-
return i &&
|
|
16
|
+
return i && E(e, t, i), i;
|
|
16
17
|
};
|
|
17
18
|
class a extends L {
|
|
18
19
|
constructor() {
|
|
19
|
-
super(...arguments), this.adapter = new F(), this.debouncer = new
|
|
20
|
+
super(...arguments), this.adapter = new F(), this.debouncer = new j(), this.subscriptions = [], this._range = { start: 0, end: 10 }, this._filteredItems = [], this._listItems = [], this._focusedIndex = -1, this._isFiltering = !1, this._isListVisible = !1, this._selectedItem = void 0, this._ignoreNextFocus = !1, this.onDocumentClick = (e) => {
|
|
20
21
|
if (!this._isListVisible) return;
|
|
21
22
|
const t = e.composedPath(), s = this._inputRef && t.includes(this._inputRef), i = this._panelRef && t.includes(this._panelRef);
|
|
22
23
|
!s && !i && (this._isListVisible = !1);
|
|
@@ -31,18 +32,13 @@ class a extends L {
|
|
|
31
32
|
createRenderRoot() {
|
|
32
33
|
return this;
|
|
33
34
|
}
|
|
34
|
-
updated(e) {
|
|
35
|
-
super.updated(e);
|
|
36
|
-
const t = this.adapter.templateData.size;
|
|
37
|
-
t ? this.style.flex = String(t) : this.style.removeProperty("flex");
|
|
38
|
-
}
|
|
39
35
|
connectedCallback() {
|
|
40
36
|
super.connectedCallback(), typeof document < "u" && document.addEventListener("click", this.onDocumentClick), this.classList.add("gui-dropdown", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this._filteredItems = this.adapter.templateData.items, this.subscriptions.push(
|
|
41
37
|
this.adapter.templateDataChanged$.subscribe(() => {
|
|
42
38
|
const e = this.adapter.templateData;
|
|
43
39
|
e.items && this._listItems?.length === 0 && this._filteredItems?.length === 0 && (this._filteredItems = e.items, this._listItems = e.items), this.requestUpdate();
|
|
44
40
|
}),
|
|
45
|
-
this.debouncer.pipe(
|
|
41
|
+
this.debouncer.pipe(P(this.adapter.templateData.inputDebounce ?? 500)).subscribe((e) => {
|
|
46
42
|
this._filterItems(e);
|
|
47
43
|
})
|
|
48
44
|
);
|
|
@@ -178,17 +174,7 @@ class a extends L {
|
|
|
178
174
|
@mousedown=${this._onToggleMouseDown}
|
|
179
175
|
@click=${this._onToggleClick}
|
|
180
176
|
>
|
|
181
|
-
<
|
|
182
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
183
|
-
width="16"
|
|
184
|
-
height="16"
|
|
185
|
-
viewBox="0 0 256 256"
|
|
186
|
-
aria-hidden="true"
|
|
187
|
-
>
|
|
188
|
-
<path
|
|
189
|
-
d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"
|
|
190
|
-
></path>
|
|
191
|
-
</svg>
|
|
177
|
+
<span class="gui-caret" aria-hidden="true"></span>
|
|
192
178
|
</button>
|
|
193
179
|
|
|
194
180
|
<div
|
|
@@ -199,13 +185,13 @@ class a extends L {
|
|
|
199
185
|
<gui-list
|
|
200
186
|
id=${`${this.widget.uid}-list`}
|
|
201
187
|
.uid=${this.widget.uid}
|
|
202
|
-
.value=${e.value ?? ""}
|
|
188
|
+
.value=${O(e.value ?? "")}
|
|
203
189
|
.valueField=${e.valueField}
|
|
204
190
|
.items=${this._isFiltering && !o ? this._filteredItems : e.items}
|
|
205
191
|
.itemHeight=${e.itemHeight}
|
|
206
192
|
.height=${e.height}
|
|
207
193
|
?required=${e.validator?.required}
|
|
208
|
-
|
|
194
|
+
.touched=${e.touched}
|
|
209
195
|
?disabled=${e.disabled}
|
|
210
196
|
?readonly=${e.readonly}
|
|
211
197
|
?hidden=${!this._isListVisible}
|
|
@@ -213,10 +199,10 @@ class a extends L {
|
|
|
213
199
|
@gui-update-items=${this._onUpdateItems}
|
|
214
200
|
@gui-focus-change=${this._onFocusChange}
|
|
215
201
|
@focus=${this._onFocus}
|
|
216
|
-
@
|
|
202
|
+
@gui-input=${this._onValueChange}
|
|
217
203
|
>
|
|
218
204
|
${s.map((r, f) => {
|
|
219
|
-
const n = this._range.start + f, c = e.value === r.value, b = this._focusedIndex === n,
|
|
205
|
+
const n = this._range.start + f, c = e.value === r.value, b = this._focusedIndex === n, I = !!e.disabled || !!r.disabled, w = e.labelField ?? "label", y = r.template !== null && typeof r.template == "object" && w && !e.itemRenderer ? r.template[w] : r.template;
|
|
220
206
|
return _`
|
|
221
207
|
<div
|
|
222
208
|
role="option"
|
|
@@ -225,7 +211,7 @@ class a extends L {
|
|
|
225
211
|
id="${this.widget.uid}-item-${n}"
|
|
226
212
|
style=${S({ height: `${e.itemHeight || 40}px` })}
|
|
227
213
|
aria-selected=${c ? "true" : "false"}
|
|
228
|
-
aria-disabled=${
|
|
214
|
+
aria-disabled=${I ? "true" : "false"}
|
|
229
215
|
@click=${() => this._onClickItem(r, n)}
|
|
230
216
|
>
|
|
231
217
|
${i({
|
|
@@ -233,7 +219,7 @@ class a extends L {
|
|
|
233
219
|
value: r.value,
|
|
234
220
|
index: n,
|
|
235
221
|
selected: c,
|
|
236
|
-
disabled:
|
|
222
|
+
disabled: I,
|
|
237
223
|
focused: b
|
|
238
224
|
})}
|
|
239
225
|
</div>
|
|
@@ -294,7 +280,7 @@ l([
|
|
|
294
280
|
l([
|
|
295
281
|
$(".gui-picker__panel")
|
|
296
282
|
], a.prototype, "_panelRef");
|
|
297
|
-
|
|
283
|
+
T("gui-dropdown-input", a);
|
|
298
284
|
export {
|
|
299
285
|
a as DropdownElement
|
|
300
286
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as d, formContext as l, inputContext as p } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/file-upload";
|
|
3
3
|
import { consume as u, provide as c } from "@lit/context";
|
|
4
|
-
import { LitElement as m, html as
|
|
5
|
-
import { property as
|
|
4
|
+
import { LitElement as m, html as g } from "lit";
|
|
5
|
+
import { property as h } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as $, safeDefine as b } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
8
|
var f = Object.defineProperty, n = (r, e, t, v) => {
|
|
9
|
-
for (var a = void 0,
|
|
10
|
-
(o = r[
|
|
9
|
+
for (var a = void 0, i = r.length - 1, o; i >= 0; i--)
|
|
10
|
+
(o = r[i]) && (a = o(e, t, a) || a);
|
|
11
11
|
return a && f(e, t, a), a;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class s extends m {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.adapter = new
|
|
15
|
+
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
16
16
|
}
|
|
17
17
|
createRenderRoot() {
|
|
18
18
|
return this;
|
|
19
19
|
}
|
|
20
|
-
updated(e) {
|
|
21
|
-
super.updated(e);
|
|
22
|
-
const t = this.adapter.templateData.size;
|
|
23
|
-
t ? this.style.flex = String(t) : this.style.removeProperty("flex");
|
|
24
|
-
}
|
|
25
20
|
connectedCallback() {
|
|
26
21
|
super.connectedCallback(), this.classList.add("gui-file-upload", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
22
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -30,14 +25,14 @@ class i extends m {
|
|
|
30
25
|
render() {
|
|
31
26
|
super.render();
|
|
32
27
|
const e = this.adapter.templateData;
|
|
33
|
-
return
|
|
28
|
+
return g`
|
|
34
29
|
<gui-file-upload
|
|
35
30
|
.uid=${this.widget.uid}
|
|
36
31
|
.path=${this.widget.path}
|
|
37
32
|
.label=${e.label}
|
|
38
33
|
.hint=${e.hint}
|
|
39
34
|
.errors=${e.errors}
|
|
40
|
-
|
|
35
|
+
.touched=${e.touched}
|
|
41
36
|
?required=${e.validator?.required}
|
|
42
37
|
?disabled=${e.disabled}
|
|
43
38
|
?readonly=${e.readonly}
|
|
@@ -59,9 +54,9 @@ class i extends m {
|
|
|
59
54
|
.uploadedMessage=${e.uploadedMessage}
|
|
60
55
|
.removedMessage=${e.removedMessage}
|
|
61
56
|
.failedMessage=${e.failedMessage}
|
|
62
|
-
@
|
|
63
|
-
@blur=${() => this.adapter.onBlur()}
|
|
64
|
-
@
|
|
57
|
+
@gui-input=${this.valueChanged}
|
|
58
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
59
|
+
@gui-input-error=${this.onInputError}
|
|
65
60
|
></gui-file-upload>
|
|
66
61
|
`;
|
|
67
62
|
}
|
|
@@ -78,13 +73,13 @@ class i extends m {
|
|
|
78
73
|
}
|
|
79
74
|
}
|
|
80
75
|
n([
|
|
81
|
-
u({ context:
|
|
82
|
-
|
|
83
|
-
],
|
|
76
|
+
u({ context: l }),
|
|
77
|
+
h({ attribute: !1 })
|
|
78
|
+
], s.prototype, "formContext");
|
|
84
79
|
n([
|
|
85
80
|
c({ context: p })
|
|
86
|
-
],
|
|
87
|
-
b("gui-file-upload-input",
|
|
81
|
+
], s.prototype, "adapter");
|
|
82
|
+
b("gui-file-upload-input", s);
|
|
88
83
|
export {
|
|
89
|
-
|
|
84
|
+
s as FileUploadElement
|
|
90
85
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LayoutWidgetAdapter as l, formContext as c, layoutContext as u } from "@golemui/lit";
|
|
2
|
+
import { resolveGrid as m, gridClasses as h, gridCellClasses as f } from "@golemui/gui-shared/internals";
|
|
3
|
+
import { consume as g, provide as b } from "@lit/context";
|
|
4
|
+
import { LitElement as C, html as n } from "lit";
|
|
5
|
+
import { property as v } from "lit/decorators.js";
|
|
6
|
+
import { unsubscribeAll as x, safeDefine as y } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
import { repeat as w } from "lit-html/directives/repeat.js";
|
|
9
|
+
var $ = Object.defineProperty, p = (s, e, r, i) => {
|
|
10
|
+
for (var t = void 0, a = s.length - 1, d; a >= 0; a--)
|
|
11
|
+
(d = s[a]) && (t = d(e, r, t) || t);
|
|
12
|
+
return t && $(e, r, t), t;
|
|
13
|
+
};
|
|
14
|
+
class o extends C {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.adapter = new l(), this.subscriptions = [];
|
|
17
|
+
}
|
|
18
|
+
createRenderRoot() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
super.connectedCallback(), this.classList.add("gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
23
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const e = m(this.widget.type, this.adapter.templateData), r = this.adapter.templateData.children || [];
|
|
28
|
+
return n`
|
|
29
|
+
<div class=${h(e)} id=${this.widget?.uid}>
|
|
30
|
+
${w(
|
|
31
|
+
r,
|
|
32
|
+
(i) => i?.uid,
|
|
33
|
+
(i) => n`<div class=${f(e, i.size)}>
|
|
34
|
+
<gui-widget .widget=${i}></gui-widget>
|
|
35
|
+
</div>`
|
|
36
|
+
)}
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
super.disconnectedCallback(), this.adapter.destroy(), x(this.subscriptions);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
p([
|
|
45
|
+
g({ context: c }),
|
|
46
|
+
v({ attribute: !1 })
|
|
47
|
+
], o.prototype, "formContext");
|
|
48
|
+
p([
|
|
49
|
+
b({ context: u })
|
|
50
|
+
], o.prototype, "adapter");
|
|
51
|
+
y("gui-grid-layout", o);
|
|
52
|
+
export {
|
|
53
|
+
o as GridElement
|
|
54
|
+
};
|