@golemui/gui-lit 1.2.0 → 1.2.1-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 +19 -0
- package/{accordion.element-BIgxl5e9.js → accordion.element-C9GzfKrY.js} +29 -30
- package/alert.element-CHn49Yaf.js +55 -0
- package/button.element-C9fHivSw.js +59 -0
- package/{calendar.element-Cv3RBphf.js → calendar.element-XkojKTJk.js} +30 -31
- package/checkbox.element-DU_tVMXu.js +66 -0
- package/currency.element-BmAH5KS_.js +73 -0
- package/date-picker.element-Bg3rF95F.js +94 -0
- package/{date-time-calendar.element-DlbWZjoe.js → date-time-calendar.element-sywQCeQQ.js} +24 -24
- package/date-time-picker.element-HHpwjWTQ.js +107 -0
- package/{date-time.element-CLLxM2nV.js → date-time.element-ucETvSTC.js} +26 -26
- package/{date.element-B8ZHK9KJ.js → date.element-BEHGxRFF.js} +27 -27
- package/default-list-item-renderer-CuPJ9jUD.js +24 -0
- package/{dropdown.element-DMZ7oL5n.js → dropdown.element-DUqG_p1x.js} +85 -84
- package/{flex.element-DG4Uaj_X.js → flex.element-pwba7621.js} +27 -28
- package/{grid.element-DCZsh-3J.js → grid.element-C8K7_Qi3.js} +29 -30
- package/index.js +1316 -3883
- package/index.umd.cjs +117 -2132
- package/{list.element-ADtUK2na.js → list.element-ZtEMKE2x.js} +41 -40
- package/markdown-text.element-DDm36qD0.js +54 -0
- package/markdown.element-DWz3U9rG.js +84 -0
- package/number.element-VkG5wScD.js +71 -0
- package/package.json +6 -6
- package/password.element-C5vQHq5P.js +72 -0
- package/radiogroup.element-CKdO9HwO.js +69 -0
- package/{range-calendar.element-D5eb2f7p.js → range-calendar.element-BznGrej5.js} +23 -24
- package/{range-date-input.element-C35grlYo.js → range-date-input.element-BloTHRDl.js} +24 -24
- package/range-date-picker.element-DKhwFasW.js +98 -0
- package/{range-date-time-calendar.element-BV0J96Gu.js → range-date-time-calendar.element-CZCET-sb.js} +26 -26
- package/{range-date-time-input.element-CzgRbR9F.js → range-date-time-input.element-Dr2VrYhG.js} +24 -24
- package/range-date-time-picker.element-CYeIMWLp.js +109 -0
- package/{range-time-input.element-BOHLUO8z.js → range-time-input.element-7OZhPQqx.js} +23 -23
- package/range-time-picker.element-D0mRFZkK.js +96 -0
- package/renderer.element-DbsFoBba.js +48 -0
- package/{repeater.element-Da8YN1Vy.js → repeater.element-DGEbwvhY.js} +54 -65
- package/select.element-Bb_9jAVB.js +76 -0
- package/{tabs.element-CvcIA8P3.js → tabs.element-BYDNF_pm.js} +49 -50
- package/tags.element-BSN3i9Gx.js +73 -0
- package/textarea.element-Dl1ZEOqO.js +71 -0
- package/textinput.element-C5Vbbkxq.js +68 -0
- package/{time-picker.element-C3oR0EkQ.js → time-picker.element-Crmj9YDy.js} +26 -26
- package/{time.element-X286nthD.js → time.element-DfSeAZp4.js} +29 -29
- package/toggle.element-ORsprZ2M.js +66 -0
- package/alert.element-DPWq9-0F.js +0 -56
- package/button.element-CJay43iR.js +0 -132
- package/calendar-DleRbmvP.js +0 -267
- package/checkbox.element-CpmrzdH0.js +0 -200
- package/currency.element-Cezgzbbs.js +0 -276
- package/date-DBuYpvcO.js +0 -849
- package/date-input-B3yHsn-g.js +0 -204
- package/date-picker.element-ByZefznr.js +0 -357
- package/date-time-calendar-CB5cNoOX.js +0 -374
- package/date-time-input-DrY68YDX.js +0 -246
- package/date-time-picker.element-CYwmumfq.js +0 -440
- package/day-status-ljexnwEO.js +0 -554
- package/errors-Bs_vYN-_.js +0 -110
- package/focus-leave.controller-2gV0pQd5.js +0 -73
- package/list-D730tmGN.js +0 -297
- package/markdown-text-X-BRJT6K.js +0 -30
- package/markdown-text.element-B8TfVLIO.js +0 -55
- package/markdown.element-D5zcxAUS.js +0 -693
- package/number.element-DEY5tR_y.js +0 -291
- package/numeric-jmOOKz30.js +0 -12
- package/one-of-anKkm7mD.js +0 -50
- package/part-templates-VORbpgs2.js +0 -691
- package/password.element-C1aQh_iz.js +0 -240
- package/pill-ranges-DpvWwP-3.js +0 -48
- package/pills-BDMO2NiR.js +0 -348
- package/popup.controller-B33OvX_y.js +0 -86
- package/radiogroup.element-B2G-XyGx.js +0 -235
- package/range-calendar-D7sG24Kx.js +0 -466
- package/range-commit-8-MmYUyo.js +0 -14
- package/range-date-input-BChaoBC1.js +0 -311
- package/range-date-picker.element-Do5YsL5V.js +0 -434
- package/range-date-time-calendar-DulGK2EQ.js +0 -734
- package/range-date-time-input-8ggqckP7.js +0 -353
- package/range-date-time-picker.element-hi5KdopZ.js +0 -472
- package/range-selection-CU3hxLJE.js +0 -25
- package/range-time-input-D7GFdDeA.js +0 -348
- package/range-time-picker.element-DDNQMA_u.js +0 -470
- package/renderer.element-CNyMn2Lu.js +0 -49
- package/select.element-SDxBhGjz.js +0 -266
- package/tabs-DzSCq_98.js +0 -13
- package/tags.element-Bnhfevp3.js +0 -369
- package/templates-Df7abEkB.js +0 -92
- package/textarea.element-Dx7eYEnl.js +0 -239
- package/textinput.element-BnIoDRmY.js +0 -205
- package/time-input-Kk4EX6at.js +0 -201
- package/time-list-DLcq8BAp.js +0 -217
- package/time-picker-DLj1rhOf.js +0 -299
- package/toggle.element-Dokdat_o.js +0 -203
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
2
|
-
import { consume as
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { property as
|
|
1
|
+
import { InputWidgetAdapter as _, formContext as $, inputContext as v } from "@golemui/lit";
|
|
2
|
+
import { consume as I, provide as x } from "@lit/context";
|
|
3
|
+
import { LitElement as y, nothing as o, html as u } from "lit";
|
|
4
|
+
import { property as C, state as h, query as R } from "lit/decorators.js";
|
|
5
|
+
import { safeDefine as w } from "@golemui/lit/internals";
|
|
5
6
|
import "rxjs";
|
|
6
|
-
import { d as
|
|
7
|
-
import "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import { d as D } from "./default-list-item-renderer-CuPJ9jUD.js";
|
|
8
|
+
import "@golemui/gui-components/label";
|
|
9
|
+
import "@golemui/gui-components/list";
|
|
10
|
+
import "@golemui/gui-components/errors";
|
|
11
|
+
var L = Object.defineProperty, r = (n, e, i, p) => {
|
|
12
|
+
for (var s = void 0, t = n.length - 1, d; t >= 0; t--)
|
|
13
|
+
(d = n[t]) && (s = d(e, i, s) || s);
|
|
14
|
+
return s && L(e, i, s), s;
|
|
12
15
|
};
|
|
13
|
-
|
|
16
|
+
class a extends y {
|
|
14
17
|
constructor() {
|
|
15
|
-
super(...arguments), this.adapter = new
|
|
18
|
+
super(...arguments), this.adapter = new _(), this.subscriptions = [], this._range = { start: 0, end: 10 }, this._listItems = [], this._focusedIndex = -1;
|
|
16
19
|
}
|
|
17
20
|
createRenderRoot() {
|
|
18
21
|
return this;
|
|
@@ -34,9 +37,9 @@ let a = class extends x {
|
|
|
34
37
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((e) => e.unsubscribe());
|
|
35
38
|
}
|
|
36
39
|
render() {
|
|
37
|
-
const e = this.adapter.templateData, i = e.touched && e.errors && e.errors.length > 0,
|
|
40
|
+
const e = this.adapter.templateData, i = e.touched && e.errors && e.errors.length > 0, p = this._listItems.slice(this._range.start, this._range.end), s = this.adapter.getItemRenderer(
|
|
38
41
|
e.itemRenderer,
|
|
39
|
-
|
|
42
|
+
D
|
|
40
43
|
);
|
|
41
44
|
return u`
|
|
42
45
|
<gui-label
|
|
@@ -70,26 +73,26 @@ let a = class extends x {
|
|
|
70
73
|
@blur=${() => this.adapter.onBlur()}
|
|
71
74
|
@change=${this._valueChanged}
|
|
72
75
|
>
|
|
73
|
-
${
|
|
74
|
-
const
|
|
76
|
+
${p.map((t, d) => {
|
|
77
|
+
const l = this._range.start + d, c = e.value === t.value, f = this._focusedIndex === l, g = !!e.disabled || !!t.disabled, m = e.labelField ?? "label", b = t.template !== null && typeof t.template == "object" && m && !e.itemRenderer ? t.template[m] : t.template;
|
|
75
78
|
return u`
|
|
76
79
|
<div
|
|
77
80
|
role="option"
|
|
78
81
|
tabindex="-1"
|
|
79
82
|
class="gui-list__item-wrapper"
|
|
80
|
-
id="${this.widget.uid}-item-${
|
|
83
|
+
id="${this.widget.uid}-item-${l}"
|
|
81
84
|
style="height: ${e.itemHeight || 40}px"
|
|
82
|
-
aria-selected=${
|
|
83
|
-
aria-disabled=${
|
|
84
|
-
@click=${() => this._onClickItem(t,
|
|
85
|
+
aria-selected=${c ? "true" : "false"}
|
|
86
|
+
aria-disabled=${g ? "true" : "false"}
|
|
87
|
+
@click=${() => this._onClickItem(t, l)}
|
|
85
88
|
>
|
|
86
|
-
${
|
|
87
|
-
template:
|
|
89
|
+
${s({
|
|
90
|
+
template: b,
|
|
88
91
|
value: t.value,
|
|
89
|
-
index:
|
|
90
|
-
selected:
|
|
91
|
-
disabled:
|
|
92
|
-
focused:
|
|
92
|
+
index: l,
|
|
93
|
+
selected: c,
|
|
94
|
+
disabled: g,
|
|
95
|
+
focused: f
|
|
93
96
|
})}
|
|
94
97
|
</div>
|
|
95
98
|
`;
|
|
@@ -119,29 +122,27 @@ let a = class extends x {
|
|
|
119
122
|
_valueChanged(e) {
|
|
120
123
|
this.adapter.templateData.readonly || this.adapter.valueChanged(e.detail.value);
|
|
121
124
|
}
|
|
122
|
-
}
|
|
125
|
+
}
|
|
123
126
|
r([
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
], a.prototype, "formContext"
|
|
127
|
+
I({ context: $ }),
|
|
128
|
+
C({ attribute: !1 })
|
|
129
|
+
], a.prototype, "formContext");
|
|
127
130
|
r([
|
|
128
|
-
|
|
129
|
-
], a.prototype, "adapter"
|
|
131
|
+
x({ context: v })
|
|
132
|
+
], a.prototype, "adapter");
|
|
130
133
|
r([
|
|
131
134
|
h()
|
|
132
|
-
], a.prototype, "_range"
|
|
135
|
+
], a.prototype, "_range");
|
|
133
136
|
r([
|
|
134
137
|
h()
|
|
135
|
-
], a.prototype, "_listItems"
|
|
138
|
+
], a.prototype, "_listItems");
|
|
136
139
|
r([
|
|
137
140
|
h()
|
|
138
|
-
], a.prototype, "_focusedIndex"
|
|
141
|
+
], a.prototype, "_focusedIndex");
|
|
139
142
|
r([
|
|
140
|
-
|
|
141
|
-
], a.prototype, "_guiListRef"
|
|
142
|
-
a
|
|
143
|
-
R("gui-list-input")
|
|
144
|
-
], a);
|
|
143
|
+
R("gui-list")
|
|
144
|
+
], a.prototype, "_guiListRef");
|
|
145
|
+
w("gui-list-input", a);
|
|
145
146
|
export {
|
|
146
147
|
a as ListElement
|
|
147
148
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LitElement as p, html as n } from "lit";
|
|
2
|
+
import { property as l } from "lit/decorators.js";
|
|
3
|
+
import { safeDefine as m } from "@golemui/lit/internals";
|
|
4
|
+
import { consume as c, provide as u } from "@lit/context";
|
|
5
|
+
import { DisplayWidgetAdapter as h, formContext as f, displayWidgetContext as x } from "@golemui/lit";
|
|
6
|
+
import "@golemui/gui-components/markdown-text";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var g = Object.defineProperty, o = (i, t, r, b) => {
|
|
9
|
+
for (var e = void 0, s = i.length - 1, d; s >= 0; s--)
|
|
10
|
+
(d = i[s]) && (e = d(t, r, e) || e);
|
|
11
|
+
return e && g(t, r, e), e;
|
|
12
|
+
};
|
|
13
|
+
class a extends p {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new h(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
updated(t) {
|
|
21
|
+
super.updated(t);
|
|
22
|
+
const r = this.adapter.templateData.size;
|
|
23
|
+
r ? this.style.flex = String(r) : this.style.removeProperty("flex");
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-markdown-text", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return n`
|
|
32
|
+
<div class="gui-widget" id=${this.widget.uid}>
|
|
33
|
+
<gui-markdown-text
|
|
34
|
+
.md=${this.adapter.templateData.md}
|
|
35
|
+
.dependencies=${this.adapter.templateData.deps}
|
|
36
|
+
></gui-markdown-text>
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
o([
|
|
45
|
+
c({ context: f }),
|
|
46
|
+
l({ attribute: !1 })
|
|
47
|
+
], a.prototype, "formContext");
|
|
48
|
+
o([
|
|
49
|
+
u({ context: x })
|
|
50
|
+
], a.prototype, "adapter");
|
|
51
|
+
m("gui-markdown-text-display", a);
|
|
52
|
+
export {
|
|
53
|
+
a as MarkdownTextElement
|
|
54
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { InputWidgetAdapter as s, formContext as o, inputContext as n } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/markdown";
|
|
3
|
+
import { consume as h, provide as m } from "@lit/context";
|
|
4
|
+
import { LitElement as u, html as c } from "lit";
|
|
5
|
+
import { property as $ } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as D } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var b = Object.defineProperty, d = (i, t, e, f) => {
|
|
9
|
+
for (var a = void 0, r = i.length - 1, p; r >= 0; r--)
|
|
10
|
+
(p = i[r]) && (a = p(t, e, a) || a);
|
|
11
|
+
return a && b(t, e, a), a;
|
|
12
|
+
};
|
|
13
|
+
class l extends u {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new s(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
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
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-markdown", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return super.render(), c`
|
|
32
|
+
<gui-markdown
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.label=${this.adapter.templateData.label}
|
|
35
|
+
.errors=${this.adapter.templateData.errors}
|
|
36
|
+
?touched=${this.adapter.templateData.touched}
|
|
37
|
+
?required=${this.adapter.templateData.validator?.required}
|
|
38
|
+
?disabled=${this.adapter.templateData.disabled}
|
|
39
|
+
?readonly=${this.adapter.templateData.readonly}
|
|
40
|
+
.value=${this.adapter.templateData.value}
|
|
41
|
+
.hint=${this.adapter.templateData.hint}
|
|
42
|
+
.placeholder=${this.adapter.templateData.placeholder}
|
|
43
|
+
.autocomplete=${this.adapter.templateData.autocomplete}
|
|
44
|
+
.counterMode=${this.adapter.templateData.counterMode}
|
|
45
|
+
.minimumHeight=${this.adapter.templateData.minimumHeight}
|
|
46
|
+
.autoGrow=${this.adapter.templateData.autoGrow}
|
|
47
|
+
.tools=${this.adapter.templateData.tools}
|
|
48
|
+
.headingTitle=${this.adapter.templateData.headingTitle}
|
|
49
|
+
.boldTitle=${this.adapter.templateData.boldTitle}
|
|
50
|
+
.italicTitle=${this.adapter.templateData.italicTitle}
|
|
51
|
+
.strikethroughTitle=${this.adapter.templateData.strikethroughTitle}
|
|
52
|
+
.quoteTitle=${this.adapter.templateData.quoteTitle}
|
|
53
|
+
.linkTitle=${this.adapter.templateData.linkTitle}
|
|
54
|
+
.orderedListTitle=${this.adapter.templateData.orderedListTitle}
|
|
55
|
+
.unorderedListTitle=${this.adapter.templateData.unorderedListTitle}
|
|
56
|
+
.splitViewTitle=${this.adapter.templateData.splitViewTitle}
|
|
57
|
+
.toolbarAriaLabel=${this.adapter.templateData.toolbarAriaLabel}
|
|
58
|
+
.defaultOpenPreview=${this.adapter.templateData.defaultOpenPreview}
|
|
59
|
+
.maxLength=${this.adapter.templateData.validator?.maxLength}
|
|
60
|
+
.dependencies=${this.adapter.templateData.deps}
|
|
61
|
+
@input=${this.valueChanged}
|
|
62
|
+
@blur=${() => this.adapter.onBlur()}
|
|
63
|
+
></gui-markdown>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
valueChanged(t) {
|
|
67
|
+
const e = t.detail.value;
|
|
68
|
+
this.adapter.valueChanged(e);
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
d([
|
|
75
|
+
h({ context: o }),
|
|
76
|
+
$({ attribute: !1 })
|
|
77
|
+
], l.prototype, "formContext");
|
|
78
|
+
d([
|
|
79
|
+
m({ context: n })
|
|
80
|
+
], l.prototype, "adapter");
|
|
81
|
+
D("gui-markdown-input", l);
|
|
82
|
+
export {
|
|
83
|
+
l as MarkdownElement
|
|
84
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { InputWidgetAdapter as o, formContext as l, inputContext as u } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/number";
|
|
3
|
+
import { consume as n, provide as m } from "@lit/context";
|
|
4
|
+
import { LitElement as h, html as c } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as f } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var $ = Object.defineProperty, d = (r, t, e, D) => {
|
|
9
|
+
for (var a = void 0, i = r.length - 1, p; i >= 0; i--)
|
|
10
|
+
(p = r[i]) && (a = p(t, e, a) || a);
|
|
11
|
+
return a && $(t, e, a), a;
|
|
12
|
+
};
|
|
13
|
+
class s extends h {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new o(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
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
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-number", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return super.render(), c`
|
|
32
|
+
<gui-number
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.label=${this.adapter.templateData.label}
|
|
35
|
+
.hint=${this.adapter.templateData.hint}
|
|
36
|
+
.errors=${this.adapter.templateData.errors}
|
|
37
|
+
?touched=${this.adapter.templateData.touched}
|
|
38
|
+
?required=${this.adapter.templateData.validator?.required}
|
|
39
|
+
?disabled=${this.adapter.templateData.disabled}
|
|
40
|
+
?readonly=${this.adapter.templateData.readonly}
|
|
41
|
+
.value=${this.adapter.templateData.value}
|
|
42
|
+
.step=${this.adapter.templateData.step}
|
|
43
|
+
.minimum=${this.adapter.templateData.minimum}
|
|
44
|
+
.maximum=${this.adapter.templateData.maximum}
|
|
45
|
+
.autoGrow=${this.adapter.templateData.autoGrow}
|
|
46
|
+
.placeholder=${this.adapter.templateData.placeholder}
|
|
47
|
+
.autocomplete=${this.adapter.templateData.autocomplete}
|
|
48
|
+
@input=${this.valueChanged}
|
|
49
|
+
@blur=${() => this.adapter.onBlur()}
|
|
50
|
+
></gui-number>
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
valueChanged(t) {
|
|
54
|
+
const e = t.detail.value;
|
|
55
|
+
this.adapter.valueChanged(e);
|
|
56
|
+
}
|
|
57
|
+
disconnectedCallback() {
|
|
58
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
d([
|
|
62
|
+
n({ context: l }),
|
|
63
|
+
b({ attribute: !1 })
|
|
64
|
+
], s.prototype, "formContext");
|
|
65
|
+
d([
|
|
66
|
+
m({ context: u })
|
|
67
|
+
], s.prototype, "adapter");
|
|
68
|
+
f("gui-number-input", s);
|
|
69
|
+
export {
|
|
70
|
+
s as NumberElement
|
|
71
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemui/gui-lit",
|
|
3
|
-
"version": "1.2.0",
|
|
3
|
+
"version": "1.2.1-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"*.md"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@golemui/lit": "1.2.0",
|
|
29
|
-
"@golemui/core": "1.2.0",
|
|
30
|
-
"@golemui/gui-components": "1.2.0",
|
|
31
|
-
"@golemui/gui-shared": "1.2.0",
|
|
32
|
-
"@golemui/gui-validators": "1.2.0",
|
|
28
|
+
"@golemui/lit": "1.2.1-rc.0",
|
|
29
|
+
"@golemui/core": "1.2.1-rc.0",
|
|
30
|
+
"@golemui/gui-components": "1.2.1-rc.0",
|
|
31
|
+
"@golemui/gui-shared": "1.2.1-rc.0",
|
|
32
|
+
"@golemui/gui-validators": "1.2.1-rc.0",
|
|
33
33
|
"@lit/context": "^1.1.6",
|
|
34
34
|
"lit-html": "^3.3.1",
|
|
35
35
|
"lit": "^3.3.1",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { InputWidgetAdapter as p, formContext as l, inputContext as n } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/password";
|
|
3
|
+
import { consume as h, provide as u } from "@lit/context";
|
|
4
|
+
import { LitElement as c, html as m } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as f } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var w = Object.defineProperty, o = (r, t, e, $) => {
|
|
9
|
+
for (var a = void 0, s = r.length - 1, d; s >= 0; s--)
|
|
10
|
+
(d = r[s]) && (a = d(t, e, a) || a);
|
|
11
|
+
return a && w(t, e, a), a;
|
|
12
|
+
};
|
|
13
|
+
class i extends c {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new p(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
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
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-password", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return super.render(), m`
|
|
32
|
+
<gui-password
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.label=${this.adapter.templateData.label}
|
|
35
|
+
.hint=${this.adapter.templateData.hint}
|
|
36
|
+
.errors=${this.adapter.templateData.errors}
|
|
37
|
+
?touched=${this.adapter.templateData.touched}
|
|
38
|
+
?required=${this.adapter.templateData.validator?.required}
|
|
39
|
+
?disabled=${this.adapter.templateData.disabled}
|
|
40
|
+
?readonly=${this.adapter.templateData.readonly}
|
|
41
|
+
.value=${this.adapter.templateData.value}
|
|
42
|
+
.icon=${this.adapter.templateData.icon}
|
|
43
|
+
.placeholder=${this.adapter.templateData.placeholder}
|
|
44
|
+
.autocomplete=${this.adapter.templateData.autocomplete}
|
|
45
|
+
.showPasswordIcon=${this.adapter.templateData.showPasswordIcon}
|
|
46
|
+
.hidePasswordIcon=${this.adapter.templateData.hidePasswordIcon}
|
|
47
|
+
.showPasswordLabel=${this.adapter.templateData.showPasswordLabel}
|
|
48
|
+
.hidePasswordLabel=${this.adapter.templateData.hidePasswordLabel}
|
|
49
|
+
@input=${this.valueChanged}
|
|
50
|
+
@blur=${() => this.adapter.onBlur()}
|
|
51
|
+
></gui-password>
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
valueChanged(t) {
|
|
55
|
+
const e = t.detail.value;
|
|
56
|
+
this.adapter.valueChanged(e);
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
o([
|
|
63
|
+
h({ context: l }),
|
|
64
|
+
b({ attribute: !1 })
|
|
65
|
+
], i.prototype, "formContext");
|
|
66
|
+
o([
|
|
67
|
+
u({ context: n })
|
|
68
|
+
], i.prototype, "adapter");
|
|
69
|
+
f("gui-password-input", i);
|
|
70
|
+
export {
|
|
71
|
+
i as PasswordElement
|
|
72
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { InputWidgetAdapter as o, formContext as l, inputContext as n } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/radiogroup";
|
|
3
|
+
import { consume as u, provide as h } from "@lit/context";
|
|
4
|
+
import { LitElement as m, html as c } from "lit";
|
|
5
|
+
import { property as f } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as b } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
var g = Object.defineProperty, p = (r, t, e, v) => {
|
|
9
|
+
for (var a = void 0, i = r.length - 1, d; i >= 0; i--)
|
|
10
|
+
(d = r[i]) && (a = d(t, e, a) || a);
|
|
11
|
+
return a && g(t, e, a), a;
|
|
12
|
+
};
|
|
13
|
+
class s extends m {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new o(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
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
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), this.classList.add("gui-radiogroup", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return super.render(), c`
|
|
32
|
+
<gui-radiogroup
|
|
33
|
+
.uid=${this.widget.uid}
|
|
34
|
+
.label=${this.adapter.templateData.label}
|
|
35
|
+
.errors=${this.adapter.templateData.errors}
|
|
36
|
+
?touched=${this.adapter.templateData.touched}
|
|
37
|
+
?required=${this.adapter.templateData.validator?.required}
|
|
38
|
+
?disabled=${this.adapter.templateData.disabled}
|
|
39
|
+
?readonly=${this.adapter.templateData.readonly}
|
|
40
|
+
.value=${this.adapter.templateData.value}
|
|
41
|
+
.hint=${this.adapter.templateData.hint}
|
|
42
|
+
.options=${this.adapter.templateData.options}
|
|
43
|
+
.labelField=${this.adapter.templateData.labelField}
|
|
44
|
+
.valueField=${this.adapter.templateData.valueField}
|
|
45
|
+
.direction=${this.adapter.templateData.direction}
|
|
46
|
+
@change=${this.valueChanged}
|
|
47
|
+
@blur=${() => this.adapter.onBlur()}
|
|
48
|
+
></gui-radiogroup>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
valueChanged(t) {
|
|
52
|
+
const e = t.detail.value;
|
|
53
|
+
this.adapter.valueChanged(e);
|
|
54
|
+
}
|
|
55
|
+
disconnectedCallback() {
|
|
56
|
+
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
p([
|
|
60
|
+
u({ context: l }),
|
|
61
|
+
f({ attribute: !1 })
|
|
62
|
+
], s.prototype, "formContext");
|
|
63
|
+
p([
|
|
64
|
+
h({ context: n })
|
|
65
|
+
], s.prototype, "adapter");
|
|
66
|
+
b("gui-radiogroup-input", s);
|
|
67
|
+
export {
|
|
68
|
+
s as RadiogroupElement
|
|
69
|
+
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
2
|
-
import "
|
|
3
|
-
import { consume as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { property as
|
|
1
|
+
import { InputWidgetAdapter as p, formContext as n, inputContext as o } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/range-calendar";
|
|
3
|
+
import { consume as h, provide as m } from "@lit/context";
|
|
4
|
+
import { LitElement as u, html as c } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as D } from "@golemui/lit/internals";
|
|
6
7
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var a =
|
|
9
|
-
(
|
|
10
|
-
return
|
|
8
|
+
var $ = Object.defineProperty, l = (r, t, e, g) => {
|
|
9
|
+
for (var a = void 0, i = r.length - 1, d; i >= 0; i--)
|
|
10
|
+
(d = r[i]) && (a = d(t, e, a) || a);
|
|
11
|
+
return a && $(t, e, a), a;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
class s extends u {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
15
|
+
super(...arguments), this.adapter = new p(), this.subscriptions = [];
|
|
15
16
|
}
|
|
16
17
|
createRenderRoot() {
|
|
17
18
|
return this;
|
|
@@ -27,7 +28,7 @@ let i = class extends c {
|
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return super.render(),
|
|
31
|
+
return super.render(), c`
|
|
31
32
|
<gui-range-calendar
|
|
32
33
|
.uid=${this.widget.uid}
|
|
33
34
|
.label=${this.adapter.templateData.label}
|
|
@@ -70,17 +71,15 @@ let i = class extends c {
|
|
|
70
71
|
disconnectedCallback() {
|
|
71
72
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
72
73
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
],
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
],
|
|
81
|
-
|
|
82
|
-
$("gui-range-calendar-input")
|
|
83
|
-
], i);
|
|
74
|
+
}
|
|
75
|
+
l([
|
|
76
|
+
h({ context: n }),
|
|
77
|
+
b({ attribute: !1 })
|
|
78
|
+
], s.prototype, "formContext");
|
|
79
|
+
l([
|
|
80
|
+
m({ context: o })
|
|
81
|
+
], s.prototype, "adapter");
|
|
82
|
+
D("gui-range-calendar-input", s);
|
|
84
83
|
export {
|
|
85
|
-
|
|
84
|
+
s as RangeCalendarElement
|
|
86
85
|
};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
2
|
-
import "
|
|
3
|
-
import { consume as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { property as
|
|
1
|
+
import { InputWidgetAdapter as l, formContext as n, inputContext as o } from "@golemui/lit";
|
|
2
|
+
import "@golemui/gui-components/range-date-input";
|
|
3
|
+
import { consume as h, provide as u } from "@lit/context";
|
|
4
|
+
import { LitElement as m, html as c } from "lit";
|
|
5
|
+
import { property as b } from "lit/decorators.js";
|
|
6
|
+
import { safeDefine as D } from "@golemui/lit/internals";
|
|
6
7
|
import "rxjs";
|
|
7
|
-
var
|
|
8
|
-
for (var
|
|
9
|
-
(
|
|
10
|
-
return
|
|
8
|
+
var g = Object.defineProperty, d = (r, t, a, $) => {
|
|
9
|
+
for (var e = void 0, i = r.length - 1, p; i >= 0; i--)
|
|
10
|
+
(p = r[i]) && (e = p(t, a, e) || e);
|
|
11
|
+
return e && g(t, a, e), e;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
class s extends m {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(...arguments), this.adapter = new
|
|
15
|
+
super(...arguments), this.adapter = new l(), this.subscriptions = [];
|
|
15
16
|
}
|
|
16
17
|
createRenderRoot() {
|
|
17
18
|
return this;
|
|
18
19
|
}
|
|
19
20
|
updated(t) {
|
|
20
21
|
super.updated(t);
|
|
21
|
-
const
|
|
22
|
-
|
|
22
|
+
const a = this.adapter.templateData.size;
|
|
23
|
+
a ? this.style.flex = String(a) : this.style.removeProperty("flex");
|
|
23
24
|
}
|
|
24
25
|
connectedCallback() {
|
|
25
26
|
super.connectedCallback(), this.classList.add("gui-range-date", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
@@ -27,7 +28,7 @@ let i = class extends c {
|
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return super.render(),
|
|
31
|
+
return super.render(), c`
|
|
31
32
|
<gui-range-date
|
|
32
33
|
.uid=${this.widget.uid}
|
|
33
34
|
.label=${this.adapter.templateData.label}
|
|
@@ -44,6 +45,7 @@ let i = class extends c {
|
|
|
44
45
|
.monthAriaLabel=${this.adapter.templateData.monthAriaLabel}
|
|
45
46
|
.yearAriaLabel=${this.adapter.templateData.yearAriaLabel}
|
|
46
47
|
.invalidDateMessage=${this.adapter.templateData.invalidDateMessage}
|
|
48
|
+
.incompleteMessage=${this.adapter.templateData.incompleteMessage}
|
|
47
49
|
.separator=${this.adapter.templateData.separator}
|
|
48
50
|
.removePillAriaLabel=${this.adapter.templateData.removePillAriaLabel}
|
|
49
51
|
.startDateAriaLabel=${this.adapter.templateData.startDateAriaLabel}
|
|
@@ -62,17 +64,15 @@ let i = class extends c {
|
|
|
62
64
|
disconnectedCallback() {
|
|
63
65
|
super.disconnectedCallback(), this.adapter.destroy(), this.subscriptions.forEach((t) => t.unsubscribe());
|
|
64
66
|
}
|
|
65
|
-
}
|
|
67
|
+
}
|
|
66
68
|
d([
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
],
|
|
69
|
+
h({ context: n }),
|
|
70
|
+
b({ attribute: !1 })
|
|
71
|
+
], s.prototype, "formContext");
|
|
70
72
|
d([
|
|
71
|
-
|
|
72
|
-
],
|
|
73
|
-
|
|
74
|
-
g("gui-range-date-input")
|
|
75
|
-
], i);
|
|
73
|
+
u({ context: o })
|
|
74
|
+
], s.prototype, "adapter");
|
|
75
|
+
D("gui-range-date-input", s);
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
s as RangeDateInputElement
|
|
78
78
|
};
|