@golemui/gui-lit 1.6.0-rc.1 → 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 +84 -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
package/{range-date-time-input.element-Cq4IdW7N.js → range-date-time-input.element-CVCPS7FC.js}
RENAMED
|
@@ -2,26 +2,21 @@ import { InputWidgetAdapter as p, formContext as m, inputContext as n } from "@g
|
|
|
2
2
|
import "@golemui/gui-components/range-date-time-input";
|
|
3
3
|
import { consume as o, provide as h } from "@lit/context";
|
|
4
4
|
import { LitElement as u, html as D } from "lit";
|
|
5
|
-
import { property as
|
|
6
|
-
import { unsubscribeAll as
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { unsubscribeAll as c, safeDefine as $ } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var g = Object.defineProperty, l = (
|
|
9
|
-
for (var
|
|
10
|
-
(d = i
|
|
11
|
-
return
|
|
8
|
+
var g = Object.defineProperty, l = (t, a, s, L) => {
|
|
9
|
+
for (var e = void 0, i = t.length - 1, d; i >= 0; i--)
|
|
10
|
+
(d = t[i]) && (e = d(a, s, e) || e);
|
|
11
|
+
return e && g(a, s, e), e;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class r extends u {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.adapter = new p(), 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-range-date-time", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
22
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -35,7 +30,7 @@ class s extends u {
|
|
|
35
30
|
.hint=${this.adapter.templateData.hint}
|
|
36
31
|
.icon=${this.adapter.templateData.icon}
|
|
37
32
|
.errors=${this.adapter.templateData.errors}
|
|
38
|
-
|
|
33
|
+
.touched=${this.adapter.templateData.touched}
|
|
39
34
|
?required=${this.adapter.templateData.validator?.required}
|
|
40
35
|
?disabled=${this.adapter.templateData.disabled}
|
|
41
36
|
?readonly=${this.adapter.templateData.readonly}
|
|
@@ -67,29 +62,29 @@ class s extends u {
|
|
|
67
62
|
.editStartedMessage=${this.adapter.templateData.editStartedMessage}
|
|
68
63
|
.editCommittedMessage=${this.adapter.templateData.editCommittedMessage}
|
|
69
64
|
.editCancelledMessage=${this.adapter.templateData.editCancelledMessage}
|
|
70
|
-
@
|
|
71
|
-
@
|
|
65
|
+
@gui-input=${this.valueChanged}
|
|
66
|
+
@gui-input-error=${this.onInputError}
|
|
72
67
|
></gui-range-date-time>
|
|
73
68
|
`;
|
|
74
69
|
}
|
|
75
|
-
valueChanged(
|
|
76
|
-
this.adapter.injectValidationIssues(null), this.adapter.valueChanged(
|
|
70
|
+
valueChanged(a) {
|
|
71
|
+
this.adapter.injectValidationIssues(null), this.adapter.valueChanged(a.detail.value);
|
|
77
72
|
}
|
|
78
|
-
onInputError(
|
|
79
|
-
this.adapter.injectValidationIssues([
|
|
73
|
+
onInputError(a) {
|
|
74
|
+
this.adapter.injectValidationIssues([a.detail.message]);
|
|
80
75
|
}
|
|
81
76
|
disconnectedCallback() {
|
|
82
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
77
|
+
super.disconnectedCallback(), this.adapter.destroy(), c(this.subscriptions);
|
|
83
78
|
}
|
|
84
79
|
}
|
|
85
80
|
l([
|
|
86
81
|
o({ context: m }),
|
|
87
|
-
|
|
88
|
-
],
|
|
82
|
+
b({ attribute: !1 })
|
|
83
|
+
], r.prototype, "formContext");
|
|
89
84
|
l([
|
|
90
85
|
h({ context: n })
|
|
91
|
-
],
|
|
92
|
-
$("gui-range-date-time-input",
|
|
86
|
+
], r.prototype, "adapter");
|
|
87
|
+
$("gui-range-date-time-input", r);
|
|
93
88
|
export {
|
|
94
|
-
|
|
89
|
+
r as RangeDateTimeInputElement
|
|
95
90
|
};
|
package/{range-date-time-picker.element-CnJcIN9C.js → range-date-time-picker.element-6nBQ_NZs.js}
RENAMED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { InputWidgetAdapter as o, formContext as d, inputContext as m } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/range-date-time-picker";
|
|
3
|
-
import { consume as b, provide as
|
|
4
|
-
import { LitElement as
|
|
3
|
+
import { consume as b, provide as u } from "@lit/context";
|
|
4
|
+
import { LitElement as p, html as $ } from "lit";
|
|
5
5
|
import { property as c } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as h, safeDefine as g } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var L = Object.defineProperty, n = (
|
|
9
|
-
for (var a = void 0,
|
|
10
|
-
(
|
|
11
|
-
return a && L(e,
|
|
8
|
+
var L = Object.defineProperty, n = (t, e, l, A) => {
|
|
9
|
+
for (var a = void 0, i = t.length - 1, s; i >= 0; i--)
|
|
10
|
+
(s = t[i]) && (a = s(e, l, a) || a);
|
|
11
|
+
return a && L(e, l, a), a;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class r extends p {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.adapter = new o(), 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-range-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())
|
|
@@ -37,7 +32,7 @@ class s extends u {
|
|
|
37
32
|
.hint=${e.hint}
|
|
38
33
|
.icon=${e.icon}
|
|
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}
|
|
@@ -88,9 +83,9 @@ class s extends u {
|
|
|
88
83
|
.editCancelledMessage=${e.editCancelledMessage}
|
|
89
84
|
.dayCountAriaLabel=${e.dayCountAriaLabel}
|
|
90
85
|
.disabledDayCountAriaLabel=${e.disabledDayCountAriaLabel}
|
|
91
|
-
@
|
|
92
|
-
@
|
|
93
|
-
@blur=${() => this.adapter.onBlur()}
|
|
86
|
+
@gui-input=${this.valueChanged}
|
|
87
|
+
@gui-input-error=${this.onInputError}
|
|
88
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
94
89
|
></gui-range-date-time-picker>
|
|
95
90
|
`;
|
|
96
91
|
}
|
|
@@ -107,11 +102,11 @@ class s extends u {
|
|
|
107
102
|
n([
|
|
108
103
|
b({ context: d }),
|
|
109
104
|
c({ attribute: !1 })
|
|
110
|
-
],
|
|
105
|
+
], r.prototype, "formContext");
|
|
111
106
|
n([
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
g("gui-range-date-time-picker-input",
|
|
107
|
+
u({ context: m })
|
|
108
|
+
], r.prototype, "adapter");
|
|
109
|
+
g("gui-range-date-time-picker-input", r);
|
|
115
110
|
export {
|
|
116
|
-
|
|
111
|
+
r as RangeDateTimePickerElement
|
|
117
112
|
};
|
|
@@ -5,23 +5,18 @@ import { LitElement as u, html as c } from "lit";
|
|
|
5
5
|
import { property as g } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as b, safeDefine as $ } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var D = Object.defineProperty, p = (
|
|
9
|
-
for (var t = void 0,
|
|
10
|
-
(d = i
|
|
11
|
-
return t && D(e,
|
|
8
|
+
var D = Object.defineProperty, p = (a, e, s, L) => {
|
|
9
|
+
for (var t = void 0, i = a.length - 1, d; i >= 0; i--)
|
|
10
|
+
(d = a[i]) && (t = d(e, s, t) || t);
|
|
11
|
+
return t && D(e, s, t), t;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class r extends u {
|
|
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 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-range-time", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
22
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -35,7 +30,7 @@ class s extends u {
|
|
|
35
30
|
.hint=${this.adapter.templateData.hint}
|
|
36
31
|
.icon=${this.adapter.templateData.icon}
|
|
37
32
|
.errors=${this.adapter.templateData.errors}
|
|
38
|
-
|
|
33
|
+
.touched=${this.adapter.templateData.touched}
|
|
39
34
|
?required=${this.adapter.templateData.validator?.required}
|
|
40
35
|
?disabled=${this.adapter.templateData.disabled}
|
|
41
36
|
?readonly=${this.adapter.templateData.readonly}
|
|
@@ -64,8 +59,8 @@ class s extends u {
|
|
|
64
59
|
.editStartedMessage=${this.adapter.templateData.editStartedMessage}
|
|
65
60
|
.editCommittedMessage=${this.adapter.templateData.editCommittedMessage}
|
|
66
61
|
.editCancelledMessage=${this.adapter.templateData.editCancelledMessage}
|
|
67
|
-
@
|
|
68
|
-
@
|
|
62
|
+
@gui-input=${this.valueChanged}
|
|
63
|
+
@gui-input-error=${this.onInputError}
|
|
69
64
|
></gui-range-time>
|
|
70
65
|
`;
|
|
71
66
|
}
|
|
@@ -82,11 +77,11 @@ class s extends u {
|
|
|
82
77
|
p([
|
|
83
78
|
o({ context: m }),
|
|
84
79
|
g({ attribute: !1 })
|
|
85
|
-
],
|
|
80
|
+
], r.prototype, "formContext");
|
|
86
81
|
p([
|
|
87
82
|
h({ context: n })
|
|
88
|
-
],
|
|
89
|
-
$("gui-range-time-input",
|
|
83
|
+
], r.prototype, "adapter");
|
|
84
|
+
$("gui-range-time-input", r);
|
|
90
85
|
export {
|
|
91
|
-
|
|
86
|
+
r as RangeTimeInputElement
|
|
92
87
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as d, formContext as o, inputContext as m } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/range-time-picker";
|
|
3
|
-
import { consume as
|
|
4
|
-
import { LitElement as g, html as
|
|
5
|
-
import { property as
|
|
3
|
+
import { consume as u, provide as p } from "@lit/context";
|
|
4
|
+
import { LitElement as g, html as b } from "lit";
|
|
5
|
+
import { property as c } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as $, safeDefine as h } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var L = Object.defineProperty,
|
|
9
|
-
for (var a = void 0,
|
|
10
|
-
(l = i
|
|
11
|
-
return a && L(e,
|
|
8
|
+
var L = Object.defineProperty, n = (t, e, s, A) => {
|
|
9
|
+
for (var a = void 0, i = t.length - 1, l; i >= 0; i--)
|
|
10
|
+
(l = t[i]) && (a = l(e, s, a) || a);
|
|
11
|
+
return a && L(e, s, a), a;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class r extends g {
|
|
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-range-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 g {
|
|
|
30
25
|
render() {
|
|
31
26
|
super.render();
|
|
32
27
|
const e = this.adapter.templateData;
|
|
33
|
-
return
|
|
28
|
+
return b`
|
|
34
29
|
<gui-range-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}
|
|
@@ -75,9 +70,9 @@ class s extends g {
|
|
|
75
70
|
.editStartedMessage=${e.editStartedMessage}
|
|
76
71
|
.editCommittedMessage=${e.editCommittedMessage}
|
|
77
72
|
.editCancelledMessage=${e.editCancelledMessage}
|
|
78
|
-
@
|
|
79
|
-
@blur=${() => this.adapter.onBlur()}
|
|
80
|
-
@
|
|
73
|
+
@gui-input-error=${this.onInputError}
|
|
74
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
75
|
+
@gui-input=${this.valueChanged}
|
|
81
76
|
></gui-range-time-picker>
|
|
82
77
|
`;
|
|
83
78
|
}
|
|
@@ -91,14 +86,14 @@ class s extends g {
|
|
|
91
86
|
super.disconnectedCallback(), this.adapter.destroy(), $(this.subscriptions);
|
|
92
87
|
}
|
|
93
88
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
],
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
],
|
|
101
|
-
h("gui-range-time-picker-input",
|
|
89
|
+
n([
|
|
90
|
+
u({ context: o }),
|
|
91
|
+
c({ attribute: !1 })
|
|
92
|
+
], r.prototype, "formContext");
|
|
93
|
+
n([
|
|
94
|
+
p({ context: m })
|
|
95
|
+
], r.prototype, "adapter");
|
|
96
|
+
h("gui-range-time-picker-input", r);
|
|
102
97
|
export {
|
|
103
|
-
|
|
98
|
+
r as RangeTimePickerElement
|
|
104
99
|
};
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
import { DisplayWidgetAdapter as
|
|
2
|
-
import { consume as
|
|
1
|
+
import { DisplayWidgetAdapter as d, formContext as p, displayWidgetContext as c } from "@golemui/lit";
|
|
2
|
+
import { consume as l, provide as u } from "@lit/context";
|
|
3
3
|
import { LitElement as m, html as h } from "lit";
|
|
4
4
|
import { property as f } from "lit/decorators.js";
|
|
5
5
|
import { unsubscribeAll as b, safeDefine as g } from "@golemui/lit/internals";
|
|
6
6
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
(o =
|
|
10
|
-
return
|
|
7
|
+
var C = Object.defineProperty, n = (e, s, a, x) => {
|
|
8
|
+
for (var t = void 0, r = e.length - 1, o; r >= 0; r--)
|
|
9
|
+
(o = e[r]) && (t = o(s, a, t) || t);
|
|
10
|
+
return t && C(s, a, t), t;
|
|
11
11
|
};
|
|
12
|
-
class
|
|
12
|
+
class i extends m {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
14
|
+
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
15
15
|
}
|
|
16
16
|
createRenderRoot() {
|
|
17
17
|
return this;
|
|
18
18
|
}
|
|
19
|
-
updated(r) {
|
|
20
|
-
super.updated(r);
|
|
21
|
-
const t = this.adapter.templateData.size;
|
|
22
|
-
t ? this.style.flex = String(t) : this.style.removeProperty("flex");
|
|
23
|
-
}
|
|
24
19
|
connectedCallback() {
|
|
25
20
|
super.connectedCallback(), this.classList.add("gui-renderer", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
26
21
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -35,14 +30,14 @@ class a extends m {
|
|
|
35
30
|
super.disconnectedCallback(), this.adapter.destroy(), b(this.subscriptions);
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
n([
|
|
34
|
+
l({ context: p }),
|
|
40
35
|
f({ attribute: !1 })
|
|
41
|
-
],
|
|
42
|
-
|
|
43
|
-
u({ context:
|
|
44
|
-
],
|
|
45
|
-
g("gui-renderer-component",
|
|
36
|
+
], i.prototype, "formContext");
|
|
37
|
+
n([
|
|
38
|
+
u({ context: c })
|
|
39
|
+
], i.prototype, "adapter");
|
|
40
|
+
g("gui-renderer-component", i);
|
|
46
41
|
export {
|
|
47
|
-
|
|
42
|
+
i as RendererElement
|
|
48
43
|
};
|
|
@@ -8,10 +8,10 @@ import { unsubscribeAll as w, safeDefine as C } from "@golemui/lit/internals";
|
|
|
8
8
|
import "rxjs";
|
|
9
9
|
import "@golemui/gui-components/label";
|
|
10
10
|
import "@golemui/gui-components/errors";
|
|
11
|
-
var
|
|
12
|
-
for (var e = void 0,
|
|
13
|
-
(p =
|
|
14
|
-
return e &&
|
|
11
|
+
var I = Object.defineProperty, n = (u, t, r, a) => {
|
|
12
|
+
for (var e = void 0, d = u.length - 1, p; d >= 0; d--)
|
|
13
|
+
(p = u[d]) && (e = p(t, r, e) || e);
|
|
14
|
+
return e && I(t, r, e), e;
|
|
15
15
|
};
|
|
16
16
|
class s extends b {
|
|
17
17
|
constructor() {
|
|
@@ -20,11 +20,6 @@ class s extends b {
|
|
|
20
20
|
createRenderRoot() {
|
|
21
21
|
return this;
|
|
22
22
|
}
|
|
23
|
-
updated(t) {
|
|
24
|
-
super.updated(t);
|
|
25
|
-
const r = this.adapter.templateData.size;
|
|
26
|
-
r ? this.style.flex = String(r) : this.style.removeProperty("flex");
|
|
27
|
-
}
|
|
28
23
|
connectedCallback() {
|
|
29
24
|
super.connectedCallback(), this.classList.add("gui-repeater", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
30
25
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -114,17 +109,17 @@ class s extends b {
|
|
|
114
109
|
"structuredClone" in window ? this.adapter.valueChanged(structuredClone(r)) : this.adapter.valueChanged(JSON.parse(JSON.stringify(r))), this.requestUpdate();
|
|
115
110
|
}
|
|
116
111
|
}
|
|
117
|
-
|
|
112
|
+
n([
|
|
118
113
|
m({ context: l }),
|
|
119
114
|
f({ attribute: !1 })
|
|
120
115
|
], s.prototype, "formContext");
|
|
121
|
-
|
|
116
|
+
n([
|
|
122
117
|
g({ context: h })
|
|
123
118
|
], s.prototype, "adapter");
|
|
124
|
-
|
|
119
|
+
n([
|
|
125
120
|
v()
|
|
126
121
|
], s.prototype, "isFocused");
|
|
127
|
-
|
|
122
|
+
n([
|
|
128
123
|
_(".gui-repeater__main-card")
|
|
129
124
|
], s.prototype, "_repeaterRef");
|
|
130
125
|
C("gui-repeater-input", s);
|
|
@@ -3,12 +3,13 @@ import "@golemui/gui-components/select";
|
|
|
3
3
|
import { consume as u, provide as h } from "@lit/context";
|
|
4
4
|
import { LitElement as c, html as m } from "lit";
|
|
5
5
|
import { property as b } from "lit/decorators.js";
|
|
6
|
-
import { unsubscribeAll as
|
|
6
|
+
import { unsubscribeAll as g, safeDefine as $ } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
|
|
8
|
+
import { live as v } from "lit/directives/live.js";
|
|
9
|
+
var f = Object.defineProperty, p = (i, e, t, D) => {
|
|
9
10
|
for (var a = void 0, r = i.length - 1, l; r >= 0; r--)
|
|
10
|
-
(l = i[r]) && (a = l(
|
|
11
|
-
return a &&
|
|
11
|
+
(l = i[r]) && (a = l(e, t, a) || a);
|
|
12
|
+
return a && f(e, t, a), a;
|
|
12
13
|
};
|
|
13
14
|
class s extends c {
|
|
14
15
|
constructor() {
|
|
@@ -17,11 +18,6 @@ class s extends c {
|
|
|
17
18
|
createRenderRoot() {
|
|
18
19
|
return this;
|
|
19
20
|
}
|
|
20
|
-
updated(t) {
|
|
21
|
-
super.updated(t);
|
|
22
|
-
const e = this.adapter.templateData.size;
|
|
23
|
-
e ? this.style.flex = String(e) : this.style.removeProperty("flex");
|
|
24
|
-
}
|
|
25
21
|
connectedCallback() {
|
|
26
22
|
super.connectedCallback(), this.classList.add("gui-select", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
23
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -33,11 +29,11 @@ class s extends c {
|
|
|
33
29
|
.uid=${this.widget.uid}
|
|
34
30
|
.label=${this.adapter.templateData.label}
|
|
35
31
|
.errors=${this.adapter.templateData.errors}
|
|
36
|
-
|
|
32
|
+
.touched=${this.adapter.templateData.touched}
|
|
37
33
|
?required=${this.adapter.templateData.validator?.required}
|
|
38
34
|
?disabled=${this.adapter.templateData.disabled}
|
|
39
35
|
?readonly=${this.adapter.templateData.readonly}
|
|
40
|
-
.value=${this.adapter.templateData.value}
|
|
36
|
+
.value=${v(this.adapter.templateData.value)}
|
|
41
37
|
.hint=${this.adapter.templateData.hint}
|
|
42
38
|
.icon=${this.adapter.templateData.icon}
|
|
43
39
|
.placeholder=${this.adapter.templateData.placeholder}
|
|
@@ -46,22 +42,23 @@ class s extends c {
|
|
|
46
42
|
.labelField=${this.adapter.templateData.labelField}
|
|
47
43
|
.valueField=${this.adapter.templateData.valueField}
|
|
48
44
|
.invalidOptionMessage=${this.adapter.templateData.invalidOptionMessage}
|
|
49
|
-
@
|
|
50
|
-
@
|
|
51
|
-
@blur=${() => this.adapter.onBlur()}
|
|
45
|
+
@gui-input=${this.valueChanged}
|
|
46
|
+
@gui-input-error=${this.onInputError}
|
|
47
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
52
48
|
></gui-select>
|
|
53
49
|
`;
|
|
54
50
|
}
|
|
55
|
-
valueChanged(
|
|
51
|
+
valueChanged(e) {
|
|
56
52
|
this.adapter.injectValidationIssues(null);
|
|
57
|
-
const
|
|
58
|
-
this.adapter.valueChanged(
|
|
53
|
+
const t = e.detail.value;
|
|
54
|
+
this.adapter.valueChanged(t);
|
|
59
55
|
}
|
|
60
|
-
onInputError(
|
|
61
|
-
|
|
56
|
+
onInputError(e) {
|
|
57
|
+
const t = e.detail.message;
|
|
58
|
+
this.adapter.injectValidationIssues(t ? [t] : null);
|
|
62
59
|
}
|
|
63
60
|
disconnectedCallback() {
|
|
64
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
61
|
+
super.disconnectedCallback(), this.adapter.destroy(), g(this.subscriptions);
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
p([
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { LayoutWidgetAdapter as g, formContext as f, layoutContext as b } from "@golemui/lit";
|
|
2
|
+
import { unsubscribeAll as m, safeDefine as x } from "@golemui/lit/internals";
|
|
3
|
+
import { repeaterIndexSuffix as $, tabButtonId as p, tabPanelId as c } from "@golemui/gui-shared/internals";
|
|
4
|
+
import { consume as v, provide as w } from "@lit/context";
|
|
5
|
+
import { LitElement as C, html as s } from "lit";
|
|
6
|
+
import { repeat as l } from "lit/directives/repeat.js";
|
|
7
|
+
import { property as y, state as T } from "lit/decorators.js";
|
|
8
|
+
import "rxjs";
|
|
9
|
+
import "@golemui/gui-components/tabs";
|
|
10
|
+
var D = Object.defineProperty, n = (u, i, r, o) => {
|
|
11
|
+
for (var e = void 0, t = u.length - 1, a; t >= 0; t--)
|
|
12
|
+
(a = u[t]) && (e = a(i, r, e) || e);
|
|
13
|
+
return e && D(i, r, e), e;
|
|
14
|
+
};
|
|
15
|
+
class d extends C {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.adapter = new g(), this.activeTab = "", this.subscriptions = [], this.rowIndexSuffix = "", this.onTabChange = (i) => {
|
|
18
|
+
i.target === i.currentTarget && (this.activeTab = i.detail.value, this.adapter.change(i.detail.value));
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
createRenderRoot() {
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback(), this.classList.add("gui-tabs", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget);
|
|
26
|
+
const i = this.adapter.templateData;
|
|
27
|
+
this.activeTab = i.defaultOpen ?? i.tabs?.[0]?.uid ?? "", this.rowIndexSuffix = $(this.widget.uid), this.subscriptions.push(
|
|
28
|
+
this.adapter.templateDataChanged$.subscribe(() => {
|
|
29
|
+
this.requestUpdate();
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
if (!this.adapter.templateData) return s``;
|
|
35
|
+
const { tabs: i = [], children: r = [], renderMode: o } = this.adapter.templateData, e = i.map((t) => ({
|
|
36
|
+
tab: t,
|
|
37
|
+
child: r.find((a) => a.uid === `${t.uid}${this.rowIndexSuffix}`),
|
|
38
|
+
isActive: t.uid === this.activeTab
|
|
39
|
+
})).filter(({ child: t, isActive: a }) => t && (a || o !== "activeOnly"));
|
|
40
|
+
return s`<gui-tabs
|
|
41
|
+
id=${this.widget.uid}
|
|
42
|
+
.active=${this.activeTab}
|
|
43
|
+
@gui-tab-change=${this.onTabChange}
|
|
44
|
+
>
|
|
45
|
+
<gui-tab-list>
|
|
46
|
+
${l(
|
|
47
|
+
i,
|
|
48
|
+
(t) => t.uid,
|
|
49
|
+
(t) => s`<gui-tab
|
|
50
|
+
panel=${t.uid}
|
|
51
|
+
id=${p(this.widget.uid, t.uid)}
|
|
52
|
+
data-cy=${p(this.widget.uid, t.uid)}
|
|
53
|
+
>${t.label}</gui-tab
|
|
54
|
+
>`
|
|
55
|
+
)}
|
|
56
|
+
</gui-tab-list>
|
|
57
|
+
${l(
|
|
58
|
+
e,
|
|
59
|
+
({ tab: t }) => t.uid,
|
|
60
|
+
({ tab: t, child: a, isActive: h }) => s`<gui-tab-panel
|
|
61
|
+
name=${t.uid}
|
|
62
|
+
id=${c(this.widget.uid, t.uid)}
|
|
63
|
+
data-cy=${c(this.widget.uid, t.uid)}
|
|
64
|
+
?hidden=${!h}
|
|
65
|
+
>
|
|
66
|
+
<gui-widget .widget=${a}></gui-widget>
|
|
67
|
+
</gui-tab-panel>`
|
|
68
|
+
)}
|
|
69
|
+
</gui-tabs>`;
|
|
70
|
+
}
|
|
71
|
+
disconnectedCallback() {
|
|
72
|
+
super.disconnectedCallback(), this.adapter.destroy(), m(this.subscriptions);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
n([
|
|
76
|
+
v({ context: f }),
|
|
77
|
+
y({ attribute: !1 })
|
|
78
|
+
], d.prototype, "formContext");
|
|
79
|
+
n([
|
|
80
|
+
w({ context: b })
|
|
81
|
+
], d.prototype, "adapter");
|
|
82
|
+
n([
|
|
83
|
+
T()
|
|
84
|
+
], d.prototype, "activeTab");
|
|
85
|
+
x("gui-tabs-layout", d);
|
|
86
|
+
export {
|
|
87
|
+
d as TabsElement
|
|
88
|
+
};
|
|
@@ -3,12 +3,12 @@ import "@golemui/gui-components/tags";
|
|
|
3
3
|
import { consume as u, provide as h } from "@lit/context";
|
|
4
4
|
import { LitElement as m, html as c } from "lit";
|
|
5
5
|
import { property as b } from "lit/decorators.js";
|
|
6
|
-
import { unsubscribeAll as
|
|
6
|
+
import { unsubscribeAll as g, safeDefine as D } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
(p = r[i]) && (
|
|
11
|
-
return
|
|
8
|
+
var $ = Object.defineProperty, l = (r, e, a, v) => {
|
|
9
|
+
for (var t = void 0, i = r.length - 1, p; i >= 0; i--)
|
|
10
|
+
(p = r[i]) && (t = p(e, a, t) || t);
|
|
11
|
+
return t && $(e, a, t), t;
|
|
12
12
|
};
|
|
13
13
|
class s extends m {
|
|
14
14
|
constructor() {
|
|
@@ -17,11 +17,6 @@ class s extends m {
|
|
|
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-tags", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
22
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -34,7 +29,7 @@ class s extends m {
|
|
|
34
29
|
.label=${this.adapter.templateData.label}
|
|
35
30
|
.hint=${this.adapter.templateData.hint}
|
|
36
31
|
.errors=${this.adapter.templateData.errors}
|
|
37
|
-
|
|
32
|
+
.touched=${this.adapter.templateData.touched}
|
|
38
33
|
?required=${this.adapter.templateData.validator?.required}
|
|
39
34
|
?disabled=${this.adapter.templateData.disabled}
|
|
40
35
|
?readonly=${this.adapter.templateData.readonly}
|
|
@@ -46,17 +41,17 @@ class s extends m {
|
|
|
46
41
|
.trim=${this.adapter.templateData.trim ?? !0}
|
|
47
42
|
.removeAriaLabel=${this.adapter.templateData.removeAriaLabel}
|
|
48
43
|
.removeIcon=${this.adapter.templateData.removeIcon}
|
|
49
|
-
@
|
|
50
|
-
@blur=${() => this.adapter.onBlur()}
|
|
44
|
+
@gui-input=${this.valueChanged}
|
|
45
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
51
46
|
></gui-tags>
|
|
52
47
|
`;
|
|
53
48
|
}
|
|
54
49
|
valueChanged(e) {
|
|
55
|
-
const
|
|
56
|
-
this.adapter.valueChanged(
|
|
50
|
+
const a = e.detail.value;
|
|
51
|
+
this.adapter.valueChanged(a);
|
|
57
52
|
}
|
|
58
53
|
disconnectedCallback() {
|
|
59
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
54
|
+
super.disconnectedCallback(), this.adapter.destroy(), g(this.subscriptions);
|
|
60
55
|
}
|
|
61
56
|
}
|
|
62
57
|
l([
|
|
@@ -66,7 +61,7 @@ l([
|
|
|
66
61
|
l([
|
|
67
62
|
h({ context: n })
|
|
68
63
|
], s.prototype, "adapter");
|
|
69
|
-
|
|
64
|
+
D("gui-tags-input", s);
|
|
70
65
|
export {
|
|
71
66
|
s as TagsElement
|
|
72
67
|
};
|