@openremote/or-vaadin-components 1.13.1

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.
Files changed (41) hide show
  1. package/README.md +30 -0
  2. package/custom-elements-jsx.d.ts +324 -0
  3. package/custom-elements.json +772 -0
  4. package/lib/or-vaadin-checkbox.d.ts +5 -0
  5. package/lib/or-vaadin-checkbox.d.ts.map +1 -0
  6. package/lib/or-vaadin-checkbox.js +34 -0
  7. package/lib/or-vaadin-checkbox.js.map +1 -0
  8. package/lib/or-vaadin-dialog.d.ts +6 -0
  9. package/lib/or-vaadin-dialog.d.ts.map +1 -0
  10. package/lib/or-vaadin-dialog.js +35 -0
  11. package/lib/or-vaadin-dialog.js.map +1 -0
  12. package/lib/or-vaadin-input.d.ts +103 -0
  13. package/lib/or-vaadin-input.d.ts.map +1 -0
  14. package/lib/or-vaadin-input.js +264 -0
  15. package/lib/or-vaadin-input.js.map +1 -0
  16. package/lib/or-vaadin-numberfield.d.ts +9 -0
  17. package/lib/or-vaadin-numberfield.d.ts.map +1 -0
  18. package/lib/or-vaadin-numberfield.js +38 -0
  19. package/lib/or-vaadin-numberfield.js.map +1 -0
  20. package/lib/or-vaadin-passwordfield.d.ts +9 -0
  21. package/lib/or-vaadin-passwordfield.d.ts.map +1 -0
  22. package/lib/or-vaadin-passwordfield.js +38 -0
  23. package/lib/or-vaadin-passwordfield.js.map +1 -0
  24. package/lib/or-vaadin-select.d.ts +5 -0
  25. package/lib/or-vaadin-select.d.ts.map +1 -0
  26. package/lib/or-vaadin-select.js +34 -0
  27. package/lib/or-vaadin-select.js.map +1 -0
  28. package/lib/or-vaadin-textarea.d.ts +9 -0
  29. package/lib/or-vaadin-textarea.d.ts.map +1 -0
  30. package/lib/or-vaadin-textarea.js +38 -0
  31. package/lib/or-vaadin-textarea.js.map +1 -0
  32. package/lib/or-vaadin-textfield.d.ts +9 -0
  33. package/lib/or-vaadin-textfield.d.ts.map +1 -0
  34. package/lib/or-vaadin-textfield.js +38 -0
  35. package/lib/or-vaadin-textfield.js.map +1 -0
  36. package/lib/util.d.ts +68 -0
  37. package/lib/util.d.ts.map +1 -0
  38. package/lib/util.js +372 -0
  39. package/lib/util.js.map +1 -0
  40. package/package.json +48 -0
  41. package/stories/or-vaadin-textfield.stories.ts +61 -0
@@ -0,0 +1,5 @@
1
+ import { Checkbox } from "@vaadin/checkbox";
2
+ import { OrVaadinComponent } from "./util";
3
+ export declare class OrVaadinCheckbox extends Checkbox implements OrVaadinComponent {
4
+ }
5
+ //# sourceMappingURL=or-vaadin-checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-checkbox.d.ts","sourceRoot":"","sources":["../src/or-vaadin-checkbox.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AAEzC,qBACa,gBAAiB,SAAQ,QAAS,YAAW,iBAAiB;CAE1E"}
@@ -0,0 +1,34 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /*
8
+ * Copyright 2025, OpenRemote Inc.
9
+ *
10
+ * See the CONTRIBUTORS.txt file in the distribution for a
11
+ * full listing of individual contributors.
12
+ *
13
+ * This program is free software: you can redistribute it and/or modify
14
+ * it under the terms of the GNU Affero General Public License as
15
+ * published by the Free Software Foundation, either version 3 of the
16
+ * License, or (at your option) any later version.
17
+ *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU Affero General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Affero General Public License
24
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
+ */
26
+ import { customElement } from "lit/decorators.js";
27
+ import { Checkbox } from "@vaadin/checkbox";
28
+ let OrVaadinCheckbox = class OrVaadinCheckbox extends Checkbox {
29
+ };
30
+ OrVaadinCheckbox = __decorate([
31
+ customElement("or-vaadin-checkbox")
32
+ ], OrVaadinCheckbox);
33
+ export { OrVaadinCheckbox };
34
+ //# sourceMappingURL=or-vaadin-checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-checkbox.js","sourceRoot":"","sources":["../src/or-vaadin-checkbox.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAInC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,QAAQ;CAE7C,CAAA;AAFY,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAE5B"}
@@ -0,0 +1,6 @@
1
+ import { Dialog } from "@vaadin/dialog";
2
+ import { OrVaadinComponent } from "./util";
3
+ export { dialogFooterRenderer, dialogRenderer } from "@vaadin/dialog/lit.js";
4
+ export declare class OrVaadinDialog extends Dialog implements OrVaadinComponent {
5
+ }
6
+ //# sourceMappingURL=or-vaadin-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-dialog.d.ts","sourceRoot":"","sources":["../src/or-vaadin-dialog.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAE3E,qBACa,cAAe,SAAQ,MAAO,YAAW,iBAAiB;CAEtE"}
@@ -0,0 +1,35 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /*
8
+ * Copyright 2026, OpenRemote Inc.
9
+ *
10
+ * See the CONTRIBUTORS.txt file in the distribution for a
11
+ * full listing of individual contributors.
12
+ *
13
+ * This program is free software: you can redistribute it and/or modify
14
+ * it under the terms of the GNU Affero General Public License as
15
+ * published by the Free Software Foundation, either version 3 of the
16
+ * License, or (at your option) any later version.
17
+ *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU Affero General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Affero General Public License
24
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
+ */
26
+ import { Dialog } from "@vaadin/dialog";
27
+ import { customElement } from "lit/decorators.js";
28
+ export { dialogFooterRenderer, dialogRenderer } from "@vaadin/dialog/lit.js";
29
+ let OrVaadinDialog = class OrVaadinDialog extends Dialog {
30
+ };
31
+ OrVaadinDialog = __decorate([
32
+ customElement("or-vaadin-dialog")
33
+ ], OrVaadinDialog);
34
+ export { OrVaadinDialog };
35
+ //# sourceMappingURL=or-vaadin-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-dialog.js","sourceRoot":"","sources":["../src/or-vaadin-dialog.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAGpE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,MAAM;CAEzC,CAAA;AAFY,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAE1B"}
@@ -0,0 +1,103 @@
1
+ import { LitElement, PropertyValues, TemplateResult } from "lit";
2
+ import { InputType } from "./util";
3
+ import "./or-vaadin-checkbox";
4
+ import "./or-vaadin-numberfield";
5
+ import "./or-vaadin-passwordfield";
6
+ import "./or-vaadin-textfield";
7
+ import "./or-vaadin-textarea";
8
+ import "./or-vaadin-select";
9
+ /**
10
+ * Custom element that wraps various Vaadin input components based on the specified `type`.
11
+ * Provides a unified interface for interacting with different types of inputs.
12
+ * @customElement "or-vaadin-input"
13
+ */
14
+ export declare class OrVaadinInput extends LitElement {
15
+ /**
16
+ * Static list of Vaadin component classes to scan through during attribute changes.
17
+ * It's important that the complete list of CustomElements is defined here.
18
+ * Be aware: all CustomElements defined here need to be imported during initialization; dynamic imports are not expected to work.
19
+ */
20
+ static readonly VAADIN_CLASSES: (CustomElementConstructor | undefined)[];
21
+ /**
22
+ * Static map of template functions that are used to render the Vaadin components.
23
+ * For example, {@link InputType.CHECKBOX} generates a `<or-vaadin-checkbox>` element.
24
+ * The map value contains a function, with an {@link onChange} callback parameter for handling events.
25
+ */
26
+ static readonly TEMPLATES: Map<InputType, (onChange: (ev: Event) => void) => TemplateResult>;
27
+ /**
28
+ * Static map of what HTML event to listen for when a value changes. By default, or when undefined, the "change" event is used.
29
+ * Sometimes you'd like to override this, such as a text field, where it should only be updated "on submit".
30
+ */
31
+ static readonly CHANGE_EVENTS: Map<InputType, string>;
32
+ /**
33
+ * List of forbidden attributes that are not processed nor "bubbled down" to the child Vaadin component.
34
+ * So `<or-vaadin-input id="myId" type="text">`, wouldn't render `<or-vaadin-textfield id="myId">`, but `<or-vaadin-textfield>`.
35
+ */
36
+ static readonly FORBIDDEN_ATTRIBUTES: string[];
37
+ /**
38
+ * The input type that determines which Vaadin component to render.
39
+ * Refer to {@link InputType} and {@link OrVaadinInput.TEMPLATES} for the supported types.
40
+ */
41
+ type: InputType;
42
+ protected _elem?: HTMLInputElement;
43
+ /**
44
+ * Internal observer for tracking attribute updates on the root element.
45
+ * @protected
46
+ */
47
+ protected _observer: MutationObserver;
48
+ static get styles(): import("lit").CSSResult;
49
+ connectedCallback(): void;
50
+ disconnectedCallback(): void;
51
+ updated(changedProps: PropertyValues): void;
52
+ firstUpdated(_changedProps: PropertyValues): void;
53
+ /**
54
+ * Returns the native Vaadin input element.
55
+ */
56
+ get native(): HTMLInputElement | undefined;
57
+ /**
58
+ * Returns the value of the native Vaadin input element.
59
+ */
60
+ get nativeValue(): any;
61
+ /**
62
+ * Function that returns a boolean which indicates if the element meets any constraint validation rules applied to it.
63
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity|HTMLInputElement/checkValidity}
64
+ */
65
+ checkValidity(): boolean;
66
+ render(): TemplateResult;
67
+ /**
68
+ * Internal {@link MutationCallback} function for handling attribute changes from an {@link MutationObserver}.
69
+ * @param mutations - Array of mutations occurring in a single event
70
+ * @param _observer - The observer causing the {@link MutationCallback}
71
+ * @protected
72
+ */
73
+ protected _onAttributeChange(mutations: MutationRecord[], _observer: MutationObserver): void;
74
+ /**
75
+ * Internal function for handling property changes during the Lit lifecycle.
76
+ * @param name - Property key that was changed
77
+ * @param newValue - (optional) the new value to apply
78
+ * @protected
79
+ */
80
+ protected _onPropertyChange(name: string, newValue?: any): void;
81
+ /**
82
+ * Internal callback function when a user changes the value inside the Vaadin element.
83
+ * Normally this is caused by an `@change` event.
84
+ * @param ev Event that occurred
85
+ * @protected
86
+ */
87
+ protected _onValueChange(ev: Event): void;
88
+ /**
89
+ * Internal function to apply an attribute to the child Vaadin element.
90
+ * @param name - Attribute name
91
+ * @param value - Value to apply
92
+ * @param elem - Optional {@link HTMLInputElement} to apply the change to
93
+ * @protected
94
+ */
95
+ protected _applyAttribute(name: string, value?: any, elem?: HTMLInputElement | undefined): void;
96
+ static getCheckboxTemplate(onChange?: (e: Event) => void): TemplateResult<1>;
97
+ static getNumberFieldTemplate(onChange?: (e: Event) => void): TemplateResult<1>;
98
+ static getTextAreaTemplate(onChange?: (e: Event) => void): TemplateResult<1>;
99
+ static getTextFieldTemplate(onChange?: (e: Event) => void): TemplateResult<1>;
100
+ static getPasswordFieldTemplate(onChange?: (e: Event) => void): TemplateResult<1>;
101
+ static getSelectTemplate(onChange?: (e: Event) => void): TemplateResult<1>;
102
+ }
103
+ //# sourceMappingURL=or-vaadin-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-input.d.ts","sourceRoot":"","sources":["../src/or-vaadin-input.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAY,UAAU,EAAE,cAAc,EAAE,cAAc,EAAC,MAAM,KAAK,CAAC;AAE1E,OAAO,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,yBAAyB,CAAC;AACjC,OAAO,2BAA2B,CAAC;AACnC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAiB5B;;;;GAIG;AACH,qBACa,aAAc,SAAQ,UAAU;IAEzC;;;;OAIG;IACH,gBAAuB,cAAc,EAAE,CAAC,wBAAwB,GAAG,SAAS,CAAC,EAAE,CAM7E;IAEF;;;;OAIG;IACH,gBAAuB,SAAS,4BAAiC,CAAC,EAAE,EAAE,KAAK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,KAAK,IAAI;WAIlD,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI;WAItD,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI;CAGhE"}
@@ -0,0 +1,264 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var OrVaadinInput_1;
8
+ /*
9
+ * Copyright 2025, OpenRemote Inc.
10
+ *
11
+ * See the CONTRIBUTORS.txt file in the distribution for a
12
+ * full listing of individual contributors.
13
+ *
14
+ * This program is free software: you can redistribute it and/or modify
15
+ * it under the terms of the GNU Affero General Public License as
16
+ * published by the Free Software Foundation, either version 3 of the
17
+ * License, or (at your option) any later version.
18
+ *
19
+ * This program is distributed in the hope that it will be useful,
20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ * GNU Affero General Public License for more details.
23
+ *
24
+ * You should have received a copy of the GNU Affero General Public License
25
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+ */
27
+ import { css, html, LitElement } from "lit";
28
+ import { customElement, property, query } from "lit/decorators.js";
29
+ import { InputType } from "./util";
30
+ import "./or-vaadin-checkbox";
31
+ import "./or-vaadin-numberfield";
32
+ import "./or-vaadin-passwordfield";
33
+ import "./or-vaadin-textfield";
34
+ import "./or-vaadin-textarea";
35
+ import "./or-vaadin-select";
36
+ /**
37
+ * Function to register properties (get/setter) of a CustomElement to the child Vaadin element.
38
+ * When the Vaadin element does not recognize the HTML attribute or class property, it is ignored.
39
+ * @param constructors - List of CustomElements to scan for available properties
40
+ */
41
+ function registerProperties(constructors) {
42
+ constructors
43
+ .filter(constr => !!constr)
44
+ .map(contr => contr)
45
+ .forEach(constr => constr.observedAttributes
46
+ .filter(attr => !OrVaadinInput.elementProperties.has(attr))
47
+ .forEach(attr => OrVaadinInput.createProperty(attr, constr.getPropertyOptions(attr))));
48
+ }
49
+ /**
50
+ * Custom element that wraps various Vaadin input components based on the specified `type`.
51
+ * Provides a unified interface for interacting with different types of inputs.
52
+ * @customElement "or-vaadin-input"
53
+ */
54
+ let OrVaadinInput = OrVaadinInput_1 = class OrVaadinInput extends LitElement {
55
+ constructor() {
56
+ super(...arguments);
57
+ /**
58
+ * The input type that determines which Vaadin component to render.
59
+ * Refer to {@link InputType} and {@link OrVaadinInput.TEMPLATES} for the supported types.
60
+ */
61
+ this.type = InputType.TEXT;
62
+ /**
63
+ * Internal observer for tracking attribute updates on the root element.
64
+ * @protected
65
+ */
66
+ this._observer = new MutationObserver((mutations, observer) => this._onAttributeChange(mutations, observer));
67
+ }
68
+ static get styles() {
69
+ return css `
70
+ #elem {
71
+ width: 100%;
72
+ }
73
+ or-vaadin-textarea {
74
+ max-height: 200px;
75
+ }
76
+ `;
77
+ }
78
+ connectedCallback() {
79
+ this._observer.observe(this, { attributes: true });
80
+ return super.connectedCallback();
81
+ }
82
+ disconnectedCallback() {
83
+ this._observer.disconnect();
84
+ return super.disconnectedCallback();
85
+ }
86
+ updated(changedProps) {
87
+ changedProps.forEach((_, key) => this._onPropertyChange(String(key)));
88
+ return super.updated(changedProps);
89
+ }
90
+ firstUpdated(_changedProps) {
91
+ for (const name of this.getAttributeNames()) {
92
+ this._applyAttribute(name, this.getAttribute(name), this._elem);
93
+ }
94
+ return super.firstUpdated(_changedProps);
95
+ }
96
+ /**
97
+ * Returns the native Vaadin input element.
98
+ */
99
+ get native() {
100
+ return this._elem;
101
+ }
102
+ /**
103
+ * Returns the value of the native Vaadin input element.
104
+ */
105
+ get nativeValue() {
106
+ var _a, _b;
107
+ switch (this.type) {
108
+ case InputType.CHECKBOX: {
109
+ return (_a = this._elem) === null || _a === void 0 ? void 0 : _a.checked;
110
+ }
111
+ default: {
112
+ return (_b = this._elem) === null || _b === void 0 ? void 0 : _b.value;
113
+ }
114
+ }
115
+ }
116
+ /**
117
+ * Function that returns a boolean which indicates if the element meets any constraint validation rules applied to it.
118
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity|HTMLInputElement/checkValidity}
119
+ */
120
+ checkValidity() {
121
+ var _a, _b;
122
+ return (_b = (_a = this._elem) === null || _a === void 0 ? void 0 : _a.checkValidity()) !== null && _b !== void 0 ? _b : false;
123
+ }
124
+ render() {
125
+ var _a, _b;
126
+ return (_b = (_a = OrVaadinInput_1.TEMPLATES.get(this.type)) === null || _a === void 0 ? void 0 : _a(this._onValueChange)) !== null && _b !== void 0 ? _b : html `Not supported yet.`;
127
+ }
128
+ /**
129
+ * Internal {@link MutationCallback} function for handling attribute changes from an {@link MutationObserver}.
130
+ * @param mutations - Array of mutations occurring in a single event
131
+ * @param _observer - The observer causing the {@link MutationCallback}
132
+ * @protected
133
+ */
134
+ _onAttributeChange(mutations, _observer) {
135
+ this.getUpdateComplete().then(() => {
136
+ mutations
137
+ .filter(mutation => mutation.type === "attributes" && mutation.attributeName)
138
+ .forEach(mutation => {
139
+ this._applyAttribute(mutation.attributeName, this.getAttribute(mutation.attributeName), this._elem);
140
+ });
141
+ });
142
+ }
143
+ /**
144
+ * Internal function for handling property changes during the Lit lifecycle.
145
+ * @param name - Property key that was changed
146
+ * @param newValue - (optional) the new value to apply
147
+ * @protected
148
+ */
149
+ _onPropertyChange(name, newValue) {
150
+ newValue !== null && newValue !== void 0 ? newValue : (newValue = this[String(name)]);
151
+ this._applyAttribute(name, JSON.stringify(newValue), this._elem);
152
+ }
153
+ /**
154
+ * Internal callback function when a user changes the value inside the Vaadin element.
155
+ * Normally this is caused by an `@change` event.
156
+ * @param ev Event that occurred
157
+ * @protected
158
+ */
159
+ _onValueChange(ev) {
160
+ ev.stopPropagation();
161
+ if (ev.defaultPrevented)
162
+ return;
163
+ this.dispatchEvent(new CustomEvent("change", { bubbles: true }));
164
+ }
165
+ /**
166
+ * Internal function to apply an attribute to the child Vaadin element.
167
+ * @param name - Attribute name
168
+ * @param value - Value to apply
169
+ * @param elem - Optional {@link HTMLInputElement} to apply the change to
170
+ * @protected
171
+ */
172
+ _applyAttribute(name, value, elem = this._elem) {
173
+ if (elem && !OrVaadinInput_1.FORBIDDEN_ATTRIBUTES.includes(name)) {
174
+ switch (typeof value) {
175
+ case "boolean": {
176
+ elem === null || elem === void 0 ? void 0 : elem.toggleAttribute(name, value);
177
+ break;
178
+ }
179
+ default: {
180
+ if (value !== null) {
181
+ elem === null || elem === void 0 ? void 0 : elem.setAttribute(name, value);
182
+ }
183
+ else {
184
+ elem === null || elem === void 0 ? void 0 : elem.removeAttribute(name);
185
+ }
186
+ break;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ static getCheckboxTemplate(onChange) {
192
+ return html `<or-vaadin-checkbox id="elem" @change=${onChange}></or-vaadin-checkbox>`;
193
+ }
194
+ static getNumberFieldTemplate(onChange) {
195
+ return html `<or-vaadin-numberfield id="elem" @change=${onChange}></or-vaadin-numberfield>`;
196
+ }
197
+ static getTextAreaTemplate(onChange) {
198
+ return html `<or-vaadin-textarea id="elem" @change=${onChange}></or-vaadin-textarea>`;
199
+ }
200
+ static getTextFieldTemplate(onChange) {
201
+ return html `<or-vaadin-textfield id="elem" @change=${onChange}></or-vaadin-textfield>`;
202
+ }
203
+ static getPasswordFieldTemplate(onChange) {
204
+ return html `<or-vaadin-passwordfield id="elem" @change=${onChange}></or-vaadin-passwordfield>`;
205
+ }
206
+ static getSelectTemplate(onChange) {
207
+ return html `<or-vaadin-select id="elem" @change=${onChange}></or-vaadin-select>`;
208
+ }
209
+ };
210
+ /**
211
+ * Static list of Vaadin component classes to scan through during attribute changes.
212
+ * It's important that the complete list of CustomElements is defined here.
213
+ * Be aware: all CustomElements defined here need to be imported during initialization; dynamic imports are not expected to work.
214
+ */
215
+ OrVaadinInput.VAADIN_CLASSES = [
216
+ customElements.get("or-vaadin-numberfield"),
217
+ customElements.get("or-vaadin-passwordfield"),
218
+ customElements.get("or-vaadin-select"),
219
+ customElements.get("or-vaadin-textarea"),
220
+ customElements.get("or-vaadin-textfield")
221
+ ];
222
+ /**
223
+ * Static map of template functions that are used to render the Vaadin components.
224
+ * For example, {@link InputType.CHECKBOX} generates a `<or-vaadin-checkbox>` element.
225
+ * The map value contains a function, with an {@link onChange} callback parameter for handling events.
226
+ */
227
+ OrVaadinInput.TEMPLATES = new Map([
228
+ [InputType.CHECKBOX, OrVaadinInput_1.getCheckboxTemplate],
229
+ [InputType.BIG_INT, OrVaadinInput_1.getNumberFieldTemplate],
230
+ [InputType.NUMBER, OrVaadinInput_1.getNumberFieldTemplate],
231
+ [InputType.TEXTAREA, OrVaadinInput_1.getTextAreaTemplate],
232
+ [InputType.TEXT, OrVaadinInput_1.getTextFieldTemplate],
233
+ [InputType.PASSWORD, OrVaadinInput_1.getPasswordFieldTemplate],
234
+ [InputType.SELECT, OrVaadinInput_1.getSelectTemplate]
235
+ ]);
236
+ /**
237
+ * Static map of what HTML event to listen for when a value changes. By default, or when undefined, the "change" event is used.
238
+ * Sometimes you'd like to override this, such as a text field, where it should only be updated "on submit".
239
+ */
240
+ OrVaadinInput.CHANGE_EVENTS = new Map([
241
+ [InputType.BIG_INT, "submit"],
242
+ [InputType.NUMBER, "submit"],
243
+ [InputType.TEXTAREA, "submit"],
244
+ [InputType.TEXT, "submit"],
245
+ [InputType.PASSWORD, "submit"]
246
+ ]);
247
+ /**
248
+ * List of forbidden attributes that are not processed nor "bubbled down" to the child Vaadin component.
249
+ * So `<or-vaadin-input id="myId" type="text">`, wouldn't render `<or-vaadin-textfield id="myId">`, but `<or-vaadin-textfield>`.
250
+ */
251
+ OrVaadinInput.FORBIDDEN_ATTRIBUTES = ["id"];
252
+ __decorate([
253
+ property({ type: String })
254
+ ], OrVaadinInput.prototype, "type", void 0);
255
+ __decorate([
256
+ query("#elem")
257
+ ], OrVaadinInput.prototype, "_elem", void 0);
258
+ OrVaadinInput = OrVaadinInput_1 = __decorate([
259
+ customElement("or-vaadin-input")
260
+ ], OrVaadinInput);
261
+ export { OrVaadinInput };
262
+ // Before the class is initialized, register the property fields of the underlying Vaadin classes
263
+ registerProperties(OrVaadinInput.VAADIN_CLASSES);
264
+ //# sourceMappingURL=or-vaadin-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-input.js","sourceRoot":"","sources":["../src/or-vaadin-input.ts"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAiC,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AACjC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,yBAAyB,CAAC;AACjC,OAAO,2BAA2B,CAAC;AACnC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,YAAsD;IAC9E,YAAY;SACP,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;SAC1B,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAA0B,CAAC;SACxC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,kBAAkB;SACvC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,CAAC,IA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,SAAS,CAAC,QAAQ,EAAE,eAAa,CAAC,mBAAmB,CAAC;IACvD,CAAC,SAAS,CAAC,IAAI,EAAE,eAAa,CAAC,oBAAoB,CAAC;IACpD,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAa,CAAC,wBAAwB,CAAC;IAC5D,CAAC,SAAS,CAAC,MAAM,EAAE,eAAa,CAAC,iBAAiB,CAAC;CACtD,CAAC,AAR8B,CAQ7B;AAEH;;;GAGG;AACoB,2BAAa,GAAG,IAAI,GAAG,CAAoB;IAC9D,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC7B,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC5B,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC9B,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC;IAC1B,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;CACjC,CAAC,AANkC,CAMjC;AAEH;;;GAGG;AACoB,kCAAoB,GAAG,CAAC,IAAI,CAAC,AAAT,CAAU;AAO9C;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;2CACe;AAG9B;IADT,KAAK,CAAC,OAAO,CAAC;4CACoB;AAxD1B,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CA0NzB;;AAED,iGAAiG;AACjG,kBAAkB,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { NumberField } from "@vaadin/number-field";
2
+ import { OrVaadinComponent } from "./util";
3
+ import { LitElement } from "lit";
4
+ declare const OrVaadinNumberfield_base: new () => NumberField & LitElement;
5
+ export declare class OrVaadinNumberfield extends OrVaadinNumberfield_base implements OrVaadinComponent {
6
+ _onEnter(ev: KeyboardEvent): void;
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=or-vaadin-numberfield.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-numberfield.d.ts","sourceRoot":"","sources":["../src/or-vaadin-numberfield.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;wCAG0B,UAAU,WAAW,GAAG,UAAU;AAD3F,qBACa,mBAAoB,SAAQ,wBAAoD,YAAW,iBAAiB;IAE5G,QAAQ,CAAC,EAAE,EAAE,aAAa;CAItC"}
@@ -0,0 +1,38 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /*
8
+ * Copyright 2025, OpenRemote Inc.
9
+ *
10
+ * See the CONTRIBUTORS.txt file in the distribution for a
11
+ * full listing of individual contributors.
12
+ *
13
+ * This program is free software: you can redistribute it and/or modify
14
+ * it under the terms of the GNU Affero General Public License as
15
+ * published by the Free Software Foundation, either version 3 of the
16
+ * License, or (at your option) any later version.
17
+ *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU Affero General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Affero General Public License
24
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
+ */
26
+ import { customElement } from "lit/decorators.js";
27
+ import { NumberField } from "@vaadin/number-field";
28
+ let OrVaadinNumberfield = class OrVaadinNumberfield extends NumberField {
29
+ _onEnter(ev) {
30
+ this.dispatchEvent(new CustomEvent("submit", { bubbles: true, composed: true }));
31
+ return super._onEnter(ev);
32
+ }
33
+ };
34
+ OrVaadinNumberfield = __decorate([
35
+ customElement("or-vaadin-numberfield")
36
+ ], OrVaadinNumberfield);
37
+ export { OrVaadinNumberfield };
38
+ //# sourceMappingURL=or-vaadin-numberfield.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-numberfield.js","sourceRoot":"","sources":["../src/or-vaadin-numberfield.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAK1C,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAS,WAAkD;IAE/E,QAAQ,CAAC,EAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;QAC/E,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACJ,CAAA;AANY,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CAM/B"}
@@ -0,0 +1,9 @@
1
+ import { PasswordField } from "@vaadin/password-field";
2
+ import { OrVaadinComponent } from "./util";
3
+ import { LitElement } from "lit";
4
+ declare const OrVaadinPasswordField_base: new () => PasswordField & LitElement;
5
+ export declare class OrVaadinPasswordField extends OrVaadinPasswordField_base implements OrVaadinComponent {
6
+ _onEnter(ev: KeyboardEvent): void;
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=or-vaadin-passwordfield.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-passwordfield.d.ts","sourceRoot":"","sources":["../src/or-vaadin-passwordfield.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;0CAG8B,UAAU,aAAa,GAAG,UAAU;AADjG,qBACa,qBAAsB,SAAQ,0BAAwD,YAAW,iBAAiB;IAElH,QAAQ,CAAC,EAAE,EAAE,aAAa;CAItC"}
@@ -0,0 +1,38 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /*
8
+ * Copyright 2025, OpenRemote Inc.
9
+ *
10
+ * See the CONTRIBUTORS.txt file in the distribution for a
11
+ * full listing of individual contributors.
12
+ *
13
+ * This program is free software: you can redistribute it and/or modify
14
+ * it under the terms of the GNU Affero General Public License as
15
+ * published by the Free Software Foundation, either version 3 of the
16
+ * License, or (at your option) any later version.
17
+ *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU Affero General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Affero General Public License
24
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
+ */
26
+ import { customElement } from "lit/decorators.js";
27
+ import { PasswordField } from "@vaadin/password-field";
28
+ let OrVaadinPasswordField = class OrVaadinPasswordField extends PasswordField {
29
+ _onEnter(ev) {
30
+ this.dispatchEvent(new CustomEvent("submit", { bubbles: true, composed: true }));
31
+ return super._onEnter(ev);
32
+ }
33
+ };
34
+ OrVaadinPasswordField = __decorate([
35
+ customElement("or-vaadin-passwordfield")
36
+ ], OrVaadinPasswordField);
37
+ export { OrVaadinPasswordField };
38
+ //# sourceMappingURL=or-vaadin-passwordfield.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-passwordfield.js","sourceRoot":"","sources":["../src/or-vaadin-passwordfield.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAK9C,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAS,aAAsD;IAErF,QAAQ,CAAC,EAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;QAC/E,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACJ,CAAA;AANY,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAMjC"}
@@ -0,0 +1,5 @@
1
+ import { Select } from "@vaadin/select";
2
+ import { OrVaadinComponent } from "./util";
3
+ export declare class OrVaadinSelect extends Select implements OrVaadinComponent {
4
+ }
5
+ //# sourceMappingURL=or-vaadin-select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-vaadin-select.d.ts","sourceRoot":"","sources":["../src/or-vaadin-select.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AAEzC,qBACa,cAAe,SAAQ,MAAO,YAAW,iBAAiB;CAEtE"}
@@ -0,0 +1,34 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /*
8
+ * Copyright 2025, OpenRemote Inc.
9
+ *
10
+ * See the CONTRIBUTORS.txt file in the distribution for a
11
+ * full listing of individual contributors.
12
+ *
13
+ * This program is free software: you can redistribute it and/or modify
14
+ * it under the terms of the GNU Affero General Public License as
15
+ * published by the Free Software Foundation, either version 3 of the
16
+ * License, or (at your option) any later version.
17
+ *
18
+ * This program is distributed in the hope that it will be useful,
19
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ * GNU Affero General Public License for more details.
22
+ *
23
+ * You should have received a copy of the GNU Affero General Public License
24
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
+ */
26
+ import { Select } from "@vaadin/select";
27
+ import { customElement } from "lit/decorators.js";
28
+ let OrVaadinSelect = class OrVaadinSelect extends Select {
29
+ };
30
+ OrVaadinSelect = __decorate([
31
+ customElement("or-vaadin-select")
32
+ ], OrVaadinSelect);
33
+ export { OrVaadinSelect };
34
+ //# sourceMappingURL=or-vaadin-select.js.map