@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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
+
## 2.0.0-rc.0 (2026-10-08)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- ⚠️ **gui-components:** Make @golemui/gui-components a standalone project ([#406](https://github.com/golemui/golemui/pull/406))
|
|
6
|
+
|
|
7
|
+
### ⚠️ Breaking Changes
|
|
8
|
+
|
|
9
|
+
- **gui-components:** Make @golemui/gui-components a standalone project ([#406](https://github.com/golemui/golemui/pull/406))
|
|
10
|
+
Deprecate Flex layout
|
|
11
|
+
* fix(gui-components): add migration guide to v2.0
|
|
12
|
+
BREAKING CHANGE: GolemUI 2.0 makes @golemui/gui-components a standalone project.
|
|
13
|
+
- Styles: index.css no longer includes the form container, repeater and
|
|
14
|
+
invalid submit button styles. Import @golemui/gui-shared/forms.css after it.
|
|
15
|
+
- Styles: every rule is in a golemui.* cascade layer, so unlayered app CSS,
|
|
16
|
+
including global resets, now overrides component styles.
|
|
17
|
+
- Styles: component selectors are no longer nested under .gui-form, and
|
|
18
|
+
narrow layouts query the gui-container container instead of gui-form.
|
|
19
|
+
- Layouts: a grid without direction is now a stack instead of a row. Add
|
|
20
|
+
direction: 'row' to keep a row.
|
|
21
|
+
- Layouts: flex is deprecated and renders as a grid. Grid gaps are tokens
|
|
22
|
+
(none to xl) instead of pixels, justify places children along a row, and
|
|
23
|
+
autoFit, columnGap, rowGap and align are deprecated. The root layout is grid.
|
|
24
|
+
- Markup: tabs, accordions and alerts render gui-tabs, gui-accordion and
|
|
25
|
+
gui-alert. Their old classes (.gui-accordion__section,
|
|
26
|
+
.gui-alert-notification--*, .active) are gone, as are the .gui-flex and
|
|
27
|
+
.gui-grid__widget classes. Errors render as divs instead of a ul.
|
|
28
|
+
- Elements: every event is prefixed with gui- (input/change -> gui-input and
|
|
29
|
+
gui-change, blur -> gui-blur, inputError -> gui-input-error, and so on),
|
|
30
|
+
bubbles and is composed.
|
|
31
|
+
- Elements: multi-word attributes are kebab-case (autogrow -> auto-grow).
|
|
32
|
+
- Elements: gui-button's actionType is now type, and invalid is removed.
|
|
33
|
+
- Elements: touched is unset by default, so errors show as soon as they are set.
|
|
34
|
+
- Packages: @golemui/gui-components only peers on lit, and @golemui/gui-shared
|
|
35
|
+
now depends on it. @golemui/gui-components/internals no longer exports
|
|
36
|
+
createIntersectionObserver or NO_AVAILABLE_TIMES_MESSAGE.
|
|
37
|
+
* chore: update gitignore
|
|
38
|
+
* refactor(lit): move ssr to lit-utils
|
|
39
|
+
move ssr to lit-utils
|
|
40
|
+
* docs: update readme
|
|
41
|
+
* refactor(lit): move ssr to lit-utils, add ssr to components
|
|
42
|
+
* fix(gui-components): report missing upload service when dependencies are set
|
|
43
|
+
* fix(gui-components): avoid duplicated ids in all pickers
|
|
44
|
+
* fix(gui-components): set caret icon as a CSS property
|
|
45
|
+
* test: check ssr parity across frameworks with components
|
|
46
|
+
* ci: add workflow to test lit-labs/ssr against our implementation
|
|
47
|
+
* feat(gui-components): add timeLabel prop to date-time inputs
|
|
48
|
+
* chore: fix lint errors
|
|
49
|
+
* chore: improve ssr performance
|
|
50
|
+
* docs: move components ssr docs to website
|
|
51
|
+
* fix(gui-components): send value in numeric inputs
|
|
52
|
+
* feat(gui-components): add nitro plugin for nuxt users
|
|
53
|
+
* fix(gui-components): avoid ssr rendering for time lists
|
|
54
|
+
* chore: reset harnesses
|
|
55
|
+
* docs: update components readme
|
|
56
|
+
* fix(gui-components): misc issues related with required, aria and styling
|
|
57
|
+
* test(gui-components): fix tests
|
|
58
|
+
* test(gui-components): fix firefox test failing by 0.000001
|
|
59
|
+
* fix(gui-components): fix layout issues with pickers
|
|
60
|
+
* fix(schemas): make grid a the reserved root
|
|
61
|
+
* fix(schemas): make grid a the reserved root
|
|
62
|
+
* docs: fix astro template, update migration guide
|
|
63
|
+
* fix(gui-components): avoid double hints in pickers
|
|
64
|
+
* fix(gui-react): fix singleOpen in react accordion
|
|
65
|
+
* fix(gui-components): fix currency stepping
|
|
66
|
+
* fix(gui-components): reset value on form reset
|
|
67
|
+
* fix(gui-components): Segmented date and time inputs keep an outdated validity
|
|
68
|
+
* fix(gui-components): block pickers submissions with partly typed or impossible dates
|
|
69
|
+
* fix(gui-components): Dates and times outside their bounds now block a native submit
|
|
70
|
+
* fix(gui-components): block native submit with pending uploads in progress
|
|
71
|
+
* test: fix typing issues with specs
|
|
72
|
+
|
|
73
|
+
### ❤️ Thank You
|
|
74
|
+
|
|
75
|
+
- Raúl Jiménez @Elecash
|
|
76
|
+
|
|
1
77
|
## 1.6.0 (2026-10-03)
|
|
2
78
|
|
|
3
79
|
This was a version bump only for gui-lit to align it with other projects, there were no code changes.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { LayoutWidgetAdapter as h, formContext as g, layoutContext as m } from "@golemui/lit";
|
|
2
|
+
import { repeaterIndexSuffix as f, accordionSectionId as b, accordionButtonId as c } from "@golemui/gui-shared/internals";
|
|
3
|
+
import { consume as x, provide as $ } from "@lit/context";
|
|
4
|
+
import { LitElement as v, html as s, nothing as w } from "lit";
|
|
5
|
+
import { property as S } from "lit/decorators.js";
|
|
6
|
+
import { unsubscribeAll as y, safeDefine as C } from "@golemui/lit/internals";
|
|
7
|
+
import "rxjs";
|
|
8
|
+
import { repeat as D } from "lit/directives/repeat.js";
|
|
9
|
+
import "@golemui/gui-components/accordion";
|
|
10
|
+
var O = Object.defineProperty, u = (n, e, i, r) => {
|
|
11
|
+
for (var t = void 0, a = n.length - 1, o; a >= 0; a--)
|
|
12
|
+
(o = n[a]) && (t = o(e, i, t) || t);
|
|
13
|
+
return t && O(e, i, t), t;
|
|
14
|
+
};
|
|
15
|
+
class d extends v {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.activeSections = {}, this.adapter = new h(), this.subscriptions = [], this.rowIndexSuffix = "";
|
|
18
|
+
}
|
|
19
|
+
createRenderRoot() {
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback(), this.classList.add("gui-accordion", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.activeSections = { ...this.adapter.templateData.defaultOpen ?? {} }, this.rowIndexSuffix = f(this.widget.uid), this.subscriptions.push(
|
|
24
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
onToggle(e, i) {
|
|
28
|
+
if (e.target !== e.currentTarget) return;
|
|
29
|
+
const { open: r } = e.detail;
|
|
30
|
+
!!this.activeSections[i] !== r && (r && this.adapter.templateData.singleOpen && Object.keys(this.activeSections).forEach((t) => {
|
|
31
|
+
this.activeSections[t] = !1;
|
|
32
|
+
}), this.activeSections[i] = r, this.adapter.change({ ...this.activeSections }), this.requestUpdate());
|
|
33
|
+
}
|
|
34
|
+
getChild(e) {
|
|
35
|
+
return (this.adapter.templateData.children ?? []).find((r) => r.uid === `${e}${this.rowIndexSuffix}`);
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
if (!this.adapter.templateData) return s``;
|
|
39
|
+
const { sections: e = [], singleOpen: i, renderMode: r } = this.adapter.templateData;
|
|
40
|
+
return s`
|
|
41
|
+
<gui-accordion id=${this.widget.uid} ?multiple=${!i}>
|
|
42
|
+
${D(
|
|
43
|
+
e,
|
|
44
|
+
(t) => t.uid,
|
|
45
|
+
(t) => {
|
|
46
|
+
const a = !!this.activeSections[t.uid], o = this.getChild(t.uid), p = o !== void 0 && (a || r !== "activeOnly") ? s`<section
|
|
47
|
+
class="gui-widget"
|
|
48
|
+
role="region"
|
|
49
|
+
id=${b(this.widget.uid, t.uid)}
|
|
50
|
+
aria-labelledby=${c(this.widget.uid, t.uid)}
|
|
51
|
+
>
|
|
52
|
+
<gui-widget .widget=${o}></gui-widget>
|
|
53
|
+
</section>` : w;
|
|
54
|
+
return s`<gui-accordion-item
|
|
55
|
+
.open=${a}
|
|
56
|
+
@gui-toggle=${(l) => this.onToggle(l, t.uid)}
|
|
57
|
+
>
|
|
58
|
+
<details ?open=${a}>
|
|
59
|
+
<summary id=${c(this.widget.uid, t.uid)}>
|
|
60
|
+
${t.label}
|
|
61
|
+
</summary>
|
|
62
|
+
${p}
|
|
63
|
+
</details>
|
|
64
|
+
</gui-accordion-item>`;
|
|
65
|
+
}
|
|
66
|
+
)}
|
|
67
|
+
</gui-accordion>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
super.disconnectedCallback(), this.adapter.destroy(), y(this.subscriptions);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
u([
|
|
75
|
+
x({ context: g }),
|
|
76
|
+
S({ attribute: !1 })
|
|
77
|
+
], d.prototype, "formContext");
|
|
78
|
+
u([
|
|
79
|
+
$({ context: m })
|
|
80
|
+
], d.prototype, "adapter");
|
|
81
|
+
C("gui-accordion-layout", d);
|
|
82
|
+
export {
|
|
83
|
+
d as AccordionElement
|
|
84
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement as p, html as d } from "lit";
|
|
2
|
+
import { property as l } from "lit/decorators.js";
|
|
3
|
+
import { unsubscribeAll as c, safeDefine as u } from "@golemui/lit/internals";
|
|
4
|
+
import { consume as m, provide as h } from "@lit/context";
|
|
5
|
+
import { DisplayWidgetAdapter as f, formContext as b, displayWidgetContext as g } from "@golemui/lit";
|
|
6
|
+
import "rxjs";
|
|
7
|
+
import "@golemui/gui-components/alert";
|
|
8
|
+
var x = Object.defineProperty, n = (i, e, r, C) => {
|
|
9
|
+
for (var t = void 0, s = i.length - 1, o; s >= 0; s--)
|
|
10
|
+
(o = i[s]) && (t = o(e, r, t) || t);
|
|
11
|
+
return t && x(e, r, t), t;
|
|
12
|
+
};
|
|
13
|
+
class a extends p {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.adapter = new f(), this.subscriptions = [];
|
|
16
|
+
}
|
|
17
|
+
createRenderRoot() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback(), this.classList.add("gui-alert", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
22
|
+
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const { text: e, level: r } = this.adapter.templateData;
|
|
27
|
+
return d`<gui-alert id=${this.widget.uid} variant=${r || "default"}>${e}</gui-alert>`;
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
super.disconnectedCallback(), this.adapter.destroy(), c(this.subscriptions);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
n([
|
|
34
|
+
m({ context: b }),
|
|
35
|
+
l({ attribute: !1 })
|
|
36
|
+
], a.prototype, "formContext");
|
|
37
|
+
n([
|
|
38
|
+
h({ context: g })
|
|
39
|
+
], a.prototype, "adapter");
|
|
40
|
+
u("gui-alert-display", a);
|
|
41
|
+
export {
|
|
42
|
+
a as AlertElement
|
|
43
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { ActionWidgetAdapter as
|
|
2
|
-
import { consume as
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { property as
|
|
5
|
-
import { unsubscribeAll as
|
|
1
|
+
import { ActionWidgetAdapter as d, formContext as c, actionContext as l } from "@golemui/lit";
|
|
2
|
+
import { consume as u, provide as m } from "@lit/context";
|
|
3
|
+
import { LitElement as h, html as b } from "lit";
|
|
4
|
+
import { property as f } from "lit/decorators.js";
|
|
5
|
+
import { unsubscribeAll as g, safeDefine as v } from "@golemui/lit/internals";
|
|
6
6
|
import "rxjs";
|
|
7
7
|
import "@golemui/gui-components/button";
|
|
8
|
-
var
|
|
9
|
-
for (var t = void 0, r = i.length - 1,
|
|
10
|
-
(
|
|
11
|
-
return t &&
|
|
8
|
+
var C = Object.defineProperty, p = (i, e, a, o) => {
|
|
9
|
+
for (var t = void 0, r = i.length - 1, n; r >= 0; r--)
|
|
10
|
+
(n = i[r]) && (t = n(e, a, t) || t);
|
|
11
|
+
return t && C(e, a, t), t;
|
|
12
12
|
};
|
|
13
|
-
class s extends
|
|
13
|
+
class s extends h {
|
|
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(
|
|
21
|
-
super.updated(
|
|
22
|
-
const
|
|
23
|
-
|
|
20
|
+
updated(e) {
|
|
21
|
+
super.updated(e);
|
|
22
|
+
const { invalid: a, actionType: o } = this.adapter.templateData;
|
|
23
|
+
this.classList.toggle("gui-button--invalid", a === !0 && o === "submit");
|
|
24
24
|
}
|
|
25
25
|
connectedCallback() {
|
|
26
26
|
super.connectedCallback(), this.classList.add("gui-button", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
@@ -28,13 +28,12 @@ class s extends m {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return
|
|
31
|
+
return b`
|
|
32
32
|
<gui-button
|
|
33
33
|
.uid=${this.widget.uid}
|
|
34
|
-
.
|
|
34
|
+
.type=${this.adapter.templateData.actionType ?? "button"}
|
|
35
35
|
.label=${this.adapter.templateData.label}
|
|
36
36
|
?disabled=${this.adapter.templateData.disabled === !0}
|
|
37
|
-
?invalid=${this.adapter.templateData.invalid === !0}
|
|
38
37
|
.variant=${this.adapter.templateData.variant}
|
|
39
38
|
.icon=${this.adapter.templateData.icon}
|
|
40
39
|
.iconPosition=${this.adapter.templateData.iconPosition}
|
|
@@ -43,15 +42,15 @@ class s extends m {
|
|
|
43
42
|
`;
|
|
44
43
|
}
|
|
45
44
|
disconnectedCallback() {
|
|
46
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
45
|
+
super.disconnectedCallback(), this.adapter.destroy(), g(this.subscriptions);
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
p([
|
|
49
|
+
u({ context: c }),
|
|
50
|
+
f({ attribute: !1 })
|
|
52
51
|
], s.prototype, "formContext");
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
p([
|
|
53
|
+
m({ context: l })
|
|
55
54
|
], s.prototype, "adapter");
|
|
56
55
|
v("gui-button-interactive", s);
|
|
57
56
|
export {
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as n, formContext as l, inputContext as o } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/calendar";
|
|
3
3
|
import { consume as h, provide as m } from "@lit/context";
|
|
4
4
|
import { LitElement as u, html as c } from "lit";
|
|
5
5
|
import { property as b } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as D, safeDefine as $ } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
(
|
|
11
|
-
return
|
|
8
|
+
var g = Object.defineProperty, d = (r, a, e, f) => {
|
|
9
|
+
for (var t = void 0, i = r.length - 1, s; i >= 0; i--)
|
|
10
|
+
(s = r[i]) && (t = s(a, e, t) || t);
|
|
11
|
+
return t && g(a, e, t), t;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class p extends u {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.adapter = new
|
|
15
|
+
super(...arguments), this.adapter = new n(), this.subscriptions = [];
|
|
16
16
|
}
|
|
17
17
|
createRenderRoot() {
|
|
18
18
|
return this;
|
|
19
19
|
}
|
|
20
|
-
updated(a) {
|
|
21
|
-
super.updated(a);
|
|
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-calendar", "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 u {
|
|
|
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}
|
|
@@ -53,27 +48,27 @@ class s extends u {
|
|
|
53
48
|
.disabledRanges=${this.adapter.templateData.disabledRanges}
|
|
54
49
|
.numberOfMonths=${this.adapter.templateData.numberOfMonths}
|
|
55
50
|
.localeId=${this.adapter.templateData.lang}
|
|
56
|
-
@
|
|
57
|
-
@blur=${() => this.adapter.onBlur()}
|
|
51
|
+
@gui-input=${this.valueChanged}
|
|
52
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
58
53
|
></gui-calendar>
|
|
59
54
|
`;
|
|
60
55
|
}
|
|
61
56
|
valueChanged(a) {
|
|
62
|
-
const
|
|
63
|
-
this.adapter.valueChanged(
|
|
57
|
+
const e = a?.target;
|
|
58
|
+
this.adapter.valueChanged(e.value);
|
|
64
59
|
}
|
|
65
60
|
disconnectedCallback() {
|
|
66
61
|
super.disconnectedCallback(), this.adapter.destroy(), D(this.subscriptions);
|
|
67
62
|
}
|
|
68
63
|
}
|
|
69
64
|
d([
|
|
70
|
-
h({ context:
|
|
65
|
+
h({ context: l }),
|
|
71
66
|
b({ attribute: !1 })
|
|
72
|
-
],
|
|
67
|
+
], p.prototype, "formContext");
|
|
73
68
|
d([
|
|
74
69
|
m({ context: o })
|
|
75
|
-
],
|
|
76
|
-
$("gui-calendar-input",
|
|
70
|
+
], p.prototype, "adapter");
|
|
71
|
+
$("gui-calendar-input", p);
|
|
77
72
|
export {
|
|
78
|
-
|
|
73
|
+
p as CalendarElement
|
|
79
74
|
};
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as d, formContext as n, inputContext as l } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/checkbox";
|
|
3
|
-
import { consume as
|
|
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
6
|
import { unsubscribeAll as f, safeDefine as x } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { live as g } from "lit/directives/live.js";
|
|
9
|
+
var v = Object.defineProperty, p = (r, e, a, C) => {
|
|
10
|
+
for (var t = void 0, i = r.length - 1, o; i >= 0; i--)
|
|
11
|
+
(o = r[i]) && (t = o(e, a, t) || t);
|
|
12
|
+
return t && v(e, a, t), t;
|
|
12
13
|
};
|
|
13
14
|
class s extends c {
|
|
14
15
|
constructor() {
|
|
15
|
-
super(...arguments), this.adapter = new
|
|
16
|
+
super(...arguments), this.adapter = new d(), this.subscriptions = [];
|
|
16
17
|
}
|
|
17
18
|
createRenderRoot() {
|
|
18
19
|
return this;
|
|
19
20
|
}
|
|
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
21
|
connectedCallback() {
|
|
26
22
|
super.connectedCallback(), this.classList.add("gui-checkbox", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
23
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -33,32 +29,32 @@ 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=${g(this.adapter.templateData.value)}
|
|
41
37
|
.hint=${this.adapter.templateData.hint}
|
|
42
38
|
.checkboxPosition=${this.adapter.templateData.checkboxPosition}
|
|
43
|
-
@
|
|
44
|
-
@blur=${() => this.adapter.onBlur()}
|
|
39
|
+
@gui-input=${this.valueChanged}
|
|
40
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
45
41
|
></gui-checkbox>
|
|
46
42
|
`;
|
|
47
43
|
}
|
|
48
44
|
valueChanged(e) {
|
|
49
|
-
const
|
|
50
|
-
this.adapter.valueChanged(
|
|
45
|
+
const a = e.detail.value;
|
|
46
|
+
this.adapter.valueChanged(a);
|
|
51
47
|
}
|
|
52
48
|
disconnectedCallback() {
|
|
53
49
|
super.disconnectedCallback(), this.adapter.destroy(), f(this.subscriptions);
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
p([
|
|
53
|
+
u({ context: n }),
|
|
58
54
|
b({ attribute: !1 })
|
|
59
55
|
], s.prototype, "formContext");
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
p([
|
|
57
|
+
h({ context: l })
|
|
62
58
|
], s.prototype, "adapter");
|
|
63
59
|
x("gui-checkbox-input", s);
|
|
64
60
|
export {
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as n, formContext as o, inputContext as l } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/currency";
|
|
3
3
|
import { consume as u, provide as c } from "@lit/context";
|
|
4
4
|
import { LitElement as m, html as h } from "lit";
|
|
5
5
|
import { property as D } from "lit/decorators.js";
|
|
6
|
-
import { unsubscribeAll as
|
|
6
|
+
import { unsubscribeAll as g, safeDefine as $ } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { live as b } from "lit/directives/live.js";
|
|
9
|
+
var f = Object.defineProperty, d = (r, e, a, v) => {
|
|
10
|
+
for (var t = void 0, i = r.length - 1, s; i >= 0; i--)
|
|
11
|
+
(s = r[i]) && (t = s(e, a, t) || t);
|
|
12
|
+
return t && f(e, a, t), t;
|
|
12
13
|
};
|
|
13
|
-
class
|
|
14
|
+
class p extends m {
|
|
14
15
|
constructor() {
|
|
15
|
-
super(...arguments), this.adapter = new
|
|
16
|
+
super(...arguments), this.adapter = new n(), this.subscriptions = [];
|
|
16
17
|
}
|
|
17
18
|
createRenderRoot() {
|
|
18
19
|
return this;
|
|
19
20
|
}
|
|
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
21
|
connectedCallback() {
|
|
26
22
|
super.connectedCallback(), this.classList.add("gui-currency", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this.subscriptions.push(
|
|
27
23
|
this.adapter.templateDataChanged$.subscribe(() => this.requestUpdate())
|
|
@@ -34,11 +30,11 @@ class s extends m {
|
|
|
34
30
|
.label=${this.adapter.templateData.label}
|
|
35
31
|
.hint=${this.adapter.templateData.hint}
|
|
36
32
|
.errors=${this.adapter.templateData.errors}
|
|
37
|
-
|
|
33
|
+
.touched=${this.adapter.templateData.touched}
|
|
38
34
|
?required=${this.adapter.templateData.validator?.required}
|
|
39
35
|
?disabled=${this.adapter.templateData.disabled}
|
|
40
36
|
?readonly=${this.adapter.templateData.readonly}
|
|
41
|
-
.value=${this.adapter.templateData.value}
|
|
37
|
+
.value=${b(this.adapter.templateData.value)}
|
|
42
38
|
.currency=${this.adapter.templateData.currency}
|
|
43
39
|
.step=${this.adapter.templateData.step}
|
|
44
40
|
.maximumFractionDigits=${this.adapter.templateData.maximumFractionDigits}
|
|
@@ -47,27 +43,27 @@ class s extends m {
|
|
|
47
43
|
.placeholder=${this.adapter.templateData.placeholder}
|
|
48
44
|
.autocomplete=${this.adapter.templateData.autocomplete}
|
|
49
45
|
.localeId=${this.adapter.templateData.lang}
|
|
50
|
-
@input=${this.valueChanged}
|
|
51
|
-
@blur=${() => this.adapter.onBlur()}
|
|
46
|
+
@gui-input=${this.valueChanged}
|
|
47
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
52
48
|
></gui-currency>
|
|
53
49
|
`;
|
|
54
50
|
}
|
|
55
51
|
valueChanged(e) {
|
|
56
|
-
const
|
|
57
|
-
this.adapter.valueChanged(
|
|
52
|
+
const a = e.detail.value;
|
|
53
|
+
this.adapter.valueChanged(a);
|
|
58
54
|
}
|
|
59
55
|
disconnectedCallback() {
|
|
60
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
56
|
+
super.disconnectedCallback(), this.adapter.destroy(), g(this.subscriptions);
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
d([
|
|
64
|
-
u({ context:
|
|
60
|
+
u({ context: o }),
|
|
65
61
|
D({ attribute: !1 })
|
|
66
|
-
],
|
|
62
|
+
], p.prototype, "formContext");
|
|
67
63
|
d([
|
|
68
|
-
c({ context:
|
|
69
|
-
],
|
|
70
|
-
$("gui-currency-input",
|
|
64
|
+
c({ context: l })
|
|
65
|
+
], p.prototype, "adapter");
|
|
66
|
+
$("gui-currency-input", p);
|
|
71
67
|
export {
|
|
72
|
-
|
|
68
|
+
p as CurrencyElement
|
|
73
69
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { InputWidgetAdapter as d, formContext as l, inputContext as p } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/date-picker";
|
|
3
|
-
import { consume as u, provide as
|
|
4
|
-
import { LitElement as
|
|
3
|
+
import { consume as u, provide as c } from "@lit/context";
|
|
4
|
+
import { LitElement as h, html as m } from "lit";
|
|
5
5
|
import { property as b } from "lit/decorators.js";
|
|
6
6
|
import { unsubscribeAll as $, safeDefine as g } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
(
|
|
11
|
-
return
|
|
8
|
+
var M = Object.defineProperty, o = (t, e, n, f) => {
|
|
9
|
+
for (var a = void 0, r = t.length - 1, s; r >= 0; r--)
|
|
10
|
+
(s = t[r]) && (a = s(e, n, a) || a);
|
|
11
|
+
return a && M(e, n, a), a;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class i 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-picker", "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 c {
|
|
|
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}
|
|
@@ -65,9 +60,9 @@ class s extends c {
|
|
|
65
60
|
.maxDateMessage=${e.maxDateMessage}
|
|
66
61
|
.disabledDateRangeMessage=${e.disabledDateRangeMessage}
|
|
67
62
|
.incompleteMessage=${e.incompleteMessage}
|
|
68
|
-
@
|
|
69
|
-
@blur=${() => this.adapter.onBlur()}
|
|
70
|
-
@
|
|
63
|
+
@gui-input-error=${this.onInputError}
|
|
64
|
+
@gui-blur=${() => this.adapter.onBlur()}
|
|
65
|
+
@gui-input=${this.valueChanged}
|
|
71
66
|
></gui-date-picker>
|
|
72
67
|
`;
|
|
73
68
|
}
|
|
@@ -84,11 +79,11 @@ class s extends c {
|
|
|
84
79
|
o([
|
|
85
80
|
u({ context: l }),
|
|
86
81
|
b({ attribute: !1 })
|
|
87
|
-
],
|
|
82
|
+
], i.prototype, "formContext");
|
|
88
83
|
o([
|
|
89
|
-
|
|
90
|
-
],
|
|
91
|
-
g("gui-date-picker-input",
|
|
84
|
+
c({ context: p })
|
|
85
|
+
], i.prototype, "adapter");
|
|
86
|
+
g("gui-date-picker-input", i);
|
|
92
87
|
export {
|
|
93
|
-
|
|
88
|
+
i as DatePickerElement
|
|
94
89
|
};
|