@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.
- package/README.md +30 -0
- package/custom-elements-jsx.d.ts +324 -0
- package/custom-elements.json +772 -0
- package/lib/or-vaadin-checkbox.d.ts +5 -0
- package/lib/or-vaadin-checkbox.d.ts.map +1 -0
- package/lib/or-vaadin-checkbox.js +34 -0
- package/lib/or-vaadin-checkbox.js.map +1 -0
- package/lib/or-vaadin-dialog.d.ts +6 -0
- package/lib/or-vaadin-dialog.d.ts.map +1 -0
- package/lib/or-vaadin-dialog.js +35 -0
- package/lib/or-vaadin-dialog.js.map +1 -0
- package/lib/or-vaadin-input.d.ts +103 -0
- package/lib/or-vaadin-input.d.ts.map +1 -0
- package/lib/or-vaadin-input.js +264 -0
- package/lib/or-vaadin-input.js.map +1 -0
- package/lib/or-vaadin-numberfield.d.ts +9 -0
- package/lib/or-vaadin-numberfield.d.ts.map +1 -0
- package/lib/or-vaadin-numberfield.js +38 -0
- package/lib/or-vaadin-numberfield.js.map +1 -0
- package/lib/or-vaadin-passwordfield.d.ts +9 -0
- package/lib/or-vaadin-passwordfield.d.ts.map +1 -0
- package/lib/or-vaadin-passwordfield.js +38 -0
- package/lib/or-vaadin-passwordfield.js.map +1 -0
- package/lib/or-vaadin-select.d.ts +5 -0
- package/lib/or-vaadin-select.d.ts.map +1 -0
- package/lib/or-vaadin-select.js +34 -0
- package/lib/or-vaadin-select.js.map +1 -0
- package/lib/or-vaadin-textarea.d.ts +9 -0
- package/lib/or-vaadin-textarea.d.ts.map +1 -0
- package/lib/or-vaadin-textarea.js +38 -0
- package/lib/or-vaadin-textarea.js.map +1 -0
- package/lib/or-vaadin-textfield.d.ts +9 -0
- package/lib/or-vaadin-textfield.d.ts.map +1 -0
- package/lib/or-vaadin-textfield.js +38 -0
- package/lib/or-vaadin-textfield.js.map +1 -0
- package/lib/util.d.ts +68 -0
- package/lib/util.d.ts.map +1 -0
- package/lib/util.js +372 -0
- package/lib/util.js.map +1 -0
- package/package.json +48 -0
- package/stories/or-vaadin-textfield.stories.ts +61 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"or-vaadin-select.js","sourceRoot":"","sources":["../src/or-vaadin-select.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAIzC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,MAAM;CAEzC,CAAA;AAFY,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAE1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextArea } from "@vaadin/text-area";
|
|
2
|
+
import { OrVaadinComponent } from "./util";
|
|
3
|
+
import { LitElement } from "lit";
|
|
4
|
+
declare const OrVaadinTextarea_base: new () => TextArea & LitElement;
|
|
5
|
+
export declare class OrVaadinTextarea extends OrVaadinTextarea_base implements OrVaadinComponent {
|
|
6
|
+
_onEnter(ev: KeyboardEvent): void;
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=or-vaadin-textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"or-vaadin-textarea.d.ts","sourceRoot":"","sources":["../src/or-vaadin-textarea.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;qCAGoB,UAAU,QAAQ,GAAG,UAAU;AADlF,qBACa,gBAAiB,SAAQ,qBAA8C,YAAW,iBAAiB;IAEnG,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 { TextArea } from "@vaadin/text-area";
|
|
28
|
+
let OrVaadinTextarea = class OrVaadinTextarea extends TextArea {
|
|
29
|
+
_onEnter(ev) {
|
|
30
|
+
this.dispatchEvent(new CustomEvent("submit", { bubbles: true, composed: true }));
|
|
31
|
+
return super._onEnter(ev);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
OrVaadinTextarea = __decorate([
|
|
35
|
+
customElement("or-vaadin-textarea")
|
|
36
|
+
], OrVaadinTextarea);
|
|
37
|
+
export { OrVaadinTextarea };
|
|
38
|
+
//# sourceMappingURL=or-vaadin-textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"or-vaadin-textarea.js","sourceRoot":"","sources":["../src/or-vaadin-textarea.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAKpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAS,QAA4C;IAEtE,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,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAM5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextField } from "@vaadin/text-field";
|
|
2
|
+
import { LitElement } from "lit";
|
|
3
|
+
import { OrVaadinComponent } from "./util";
|
|
4
|
+
declare const OrVaadinTextfield_base: new () => TextField & LitElement;
|
|
5
|
+
export declare class OrVaadinTextfield extends OrVaadinTextfield_base implements OrVaadinComponent {
|
|
6
|
+
_onEnter(ev: KeyboardEvent): void;
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=or-vaadin-textfield.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"or-vaadin-textfield.d.ts","sourceRoot":"","sources":["../src/or-vaadin-textfield.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;sCAGY,UAAU,SAAS,GAAG,UAAU;AADrF,qBACa,iBAAkB,SAAQ,sBAAgD,YAAW,iBAAiB;IAEtG,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 { TextField } from "@vaadin/text-field";
|
|
28
|
+
let OrVaadinTextfield = class OrVaadinTextfield extends TextField {
|
|
29
|
+
_onEnter(ev) {
|
|
30
|
+
this.dispatchEvent(new CustomEvent("submit", { bubbles: true, composed: true }));
|
|
31
|
+
return super._onEnter(ev);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
OrVaadinTextfield = __decorate([
|
|
35
|
+
customElement("or-vaadin-textfield")
|
|
36
|
+
], OrVaadinTextfield);
|
|
37
|
+
export { OrVaadinTextfield };
|
|
38
|
+
//# sourceMappingURL=or-vaadin-textfield.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"or-vaadin-textfield.js","sourceRoot":"","sources":["../src/or-vaadin-textfield.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAKtC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAS,SAA8C;IAEzE,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,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAM7B"}
|
package/lib/util.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { AssetDescriptor, NameHolder, ValueDescriptor, ValueDescriptorHolder, ValueHolder } from "@openremote/model";
|
|
2
|
+
import { TemplateResult } from "lit";
|
|
3
|
+
export declare enum InputType {
|
|
4
|
+
BUTTON = "button",
|
|
5
|
+
BUTTON_TOGGLE = "button-toggle",
|
|
6
|
+
BUTTON_MOMENTARY = "button-momentary",
|
|
7
|
+
CHECKBOX = "checkbox",
|
|
8
|
+
CHECKBOX_LIST = "checkbox-list",
|
|
9
|
+
COLOUR = "color",
|
|
10
|
+
DATE = "date",
|
|
11
|
+
DATETIME = "datetime-local",
|
|
12
|
+
EMAIL = "email",
|
|
13
|
+
JSON = "json",
|
|
14
|
+
JSON_OBJECT = "json-object",
|
|
15
|
+
MONTH = "month",
|
|
16
|
+
NUMBER = "number",
|
|
17
|
+
BIG_INT = "big-int",
|
|
18
|
+
PASSWORD = "password",
|
|
19
|
+
RADIO = "radio",
|
|
20
|
+
SWITCH = "switch",
|
|
21
|
+
RANGE = "range",
|
|
22
|
+
TELEPHONE = "tel",
|
|
23
|
+
TEXT = "text",
|
|
24
|
+
TEXTAREA = "textarea",
|
|
25
|
+
TIME = "time",
|
|
26
|
+
URL = "url",
|
|
27
|
+
WEEK = "week",
|
|
28
|
+
SELECT = "select",
|
|
29
|
+
LIST = "list",
|
|
30
|
+
CRON = "cron",
|
|
31
|
+
DURATION = "duration",
|
|
32
|
+
DURATION_TIME = "duration-time",
|
|
33
|
+
DURATION_PERIOD = "duration-period"
|
|
34
|
+
}
|
|
35
|
+
export interface OrVaadinComponent {
|
|
36
|
+
getAttributeNames(): string[];
|
|
37
|
+
}
|
|
38
|
+
export interface ValueInputProviderOptions {
|
|
39
|
+
label?: string;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
readonly?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
compact?: boolean;
|
|
44
|
+
rounded?: boolean;
|
|
45
|
+
outlined?: boolean;
|
|
46
|
+
comfortable?: boolean;
|
|
47
|
+
resizeVertical?: boolean;
|
|
48
|
+
inputType?: InputType;
|
|
49
|
+
}
|
|
50
|
+
export interface ValueInputProvider {
|
|
51
|
+
templateFunction: ValueInputTemplateFunction;
|
|
52
|
+
supportsHelperText: boolean;
|
|
53
|
+
supportsLabel: boolean;
|
|
54
|
+
supportsSendButton: boolean;
|
|
55
|
+
validator?: () => boolean;
|
|
56
|
+
}
|
|
57
|
+
export type ValueInputTemplateFunction = ((value: any, focused: boolean, loading: boolean, sending: boolean, error: boolean, helperText: string | undefined) => TemplateResult | PromiseLike<TemplateResult>) | undefined;
|
|
58
|
+
export type ValueInputProviderGenerator = (assetDescriptor: AssetDescriptor | string, valueHolder: NameHolder & ValueHolder<any> | undefined, valueHolderDescriptor: ValueDescriptorHolder | undefined, valueDescriptor: ValueDescriptor, valueChangeNotifier: (value: any, updateImmediately?: boolean) => void, options: ValueInputProviderOptions) => ValueInputProvider;
|
|
59
|
+
/**
|
|
60
|
+
* Internal function to retrieve HTML template based on the Asset-, attribute-, and value descriptors
|
|
61
|
+
* It generates a template using `or-vaadin-input`, together with respective HTML attributes like min/max, pattern, and of course 'input type'.
|
|
62
|
+
* For example, a 'positive number' attribute will render a `<or-vaadin-input type="number" min="0">`.
|
|
63
|
+
* If the Vaadin input doesn't support the 'input type', it will automatically fall back to the older `or-mwc-input`.
|
|
64
|
+
*
|
|
65
|
+
* This is mostly copied over from `or-mwc-input`, so this will need optimizing once that has been deprecated.
|
|
66
|
+
*/
|
|
67
|
+
export declare const getValueHolderInputTemplateProvider: ValueInputProviderGenerator;
|
|
68
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACR,eAAe,EAIf,UAAU,EAeV,eAAe,EACf,qBAAqB,EAErB,WAAW,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAO,cAAc,EAAC,MAAM,KAAK,CAAC;AAMzC,oBAAY,SAAS;IACjB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,gBAAgB,q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AAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,KAAK,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC,GAAG,SAAS,CAAC;AAE1N,MAAM,MAAM,2BAA2B,GAAG,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,EAAE,WAAW,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,SAAS,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,EAAE,eAAe,EAAE,eAAe,EAC3L,mBAAmB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,iBAAiB,CAAC,EAAE,OAAO,KAAK,IAAI,EAAE,OAAO,EAAE,yBAAyB,KAAK,kBAAkB,CAAC;AAiC/K;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,2BAiSjD,CAAC"}
|
package/lib/util.js
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025, OpenRemote Inc.
|
|
3
|
+
*
|
|
4
|
+
* See the CONTRIBUTORS.txt file in the distribution for a
|
|
5
|
+
* full listing of individual contributors.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Affero General Public License as
|
|
9
|
+
* published by the Free Software Foundation, either version 3 of the
|
|
10
|
+
* License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Affero General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
18
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Util } from "@openremote/core";
|
|
21
|
+
import { html } from "lit";
|
|
22
|
+
import { ref, createRef } from "lit/directives/ref.js";
|
|
23
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
24
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
25
|
+
import { OrVaadinInput } from "./or-vaadin-input";
|
|
26
|
+
export var InputType;
|
|
27
|
+
(function (InputType) {
|
|
28
|
+
InputType["BUTTON"] = "button";
|
|
29
|
+
InputType["BUTTON_TOGGLE"] = "button-toggle";
|
|
30
|
+
InputType["BUTTON_MOMENTARY"] = "button-momentary";
|
|
31
|
+
InputType["CHECKBOX"] = "checkbox";
|
|
32
|
+
InputType["CHECKBOX_LIST"] = "checkbox-list";
|
|
33
|
+
InputType["COLOUR"] = "color";
|
|
34
|
+
InputType["DATE"] = "date";
|
|
35
|
+
InputType["DATETIME"] = "datetime-local";
|
|
36
|
+
InputType["EMAIL"] = "email";
|
|
37
|
+
InputType["JSON"] = "json";
|
|
38
|
+
InputType["JSON_OBJECT"] = "json-object";
|
|
39
|
+
InputType["MONTH"] = "month";
|
|
40
|
+
InputType["NUMBER"] = "number";
|
|
41
|
+
InputType["BIG_INT"] = "big-int";
|
|
42
|
+
InputType["PASSWORD"] = "password";
|
|
43
|
+
InputType["RADIO"] = "radio";
|
|
44
|
+
InputType["SWITCH"] = "switch";
|
|
45
|
+
InputType["RANGE"] = "range";
|
|
46
|
+
InputType["TELEPHONE"] = "tel";
|
|
47
|
+
InputType["TEXT"] = "text";
|
|
48
|
+
InputType["TEXTAREA"] = "textarea";
|
|
49
|
+
InputType["TIME"] = "time";
|
|
50
|
+
InputType["URL"] = "url";
|
|
51
|
+
InputType["WEEK"] = "week";
|
|
52
|
+
InputType["SELECT"] = "select";
|
|
53
|
+
InputType["LIST"] = "list";
|
|
54
|
+
InputType["CRON"] = "cron";
|
|
55
|
+
InputType["DURATION"] = "duration";
|
|
56
|
+
InputType["DURATION_TIME"] = "duration-time";
|
|
57
|
+
InputType["DURATION_PERIOD"] = "duration-period";
|
|
58
|
+
})(InputType || (InputType = {}));
|
|
59
|
+
/**
|
|
60
|
+
* Returns whether the {@link InputType} should show a "send" button within the attribute input UI.
|
|
61
|
+
* Some input types have internal mechanics for updating attributes, which is why they should return `false`.
|
|
62
|
+
* Generic input types, like a text field, "support a send button", so should return `true`
|
|
63
|
+
*/
|
|
64
|
+
function inputTypeSupportsSendButton(inputType) {
|
|
65
|
+
return inputType === InputType.NUMBER
|
|
66
|
+
|| inputType === InputType.BIG_INT
|
|
67
|
+
|| inputType === InputType.TELEPHONE
|
|
68
|
+
|| inputType === InputType.TEXT
|
|
69
|
+
|| inputType === InputType.PASSWORD
|
|
70
|
+
|| inputType === InputType.DATE
|
|
71
|
+
|| inputType === InputType.DATETIME
|
|
72
|
+
|| inputType === InputType.EMAIL
|
|
73
|
+
|| inputType === InputType.JSON
|
|
74
|
+
|| inputType === InputType.JSON_OBJECT
|
|
75
|
+
|| inputType === InputType.MONTH
|
|
76
|
+
|| inputType === InputType.TEXTAREA
|
|
77
|
+
|| inputType === InputType.TIME
|
|
78
|
+
|| inputType === InputType.URL
|
|
79
|
+
|| inputType === InputType.WEEK;
|
|
80
|
+
}
|
|
81
|
+
function inputTypeSupportsHelperText(inputType) {
|
|
82
|
+
return inputTypeSupportsSendButton(inputType) || inputType === InputType.SELECT;
|
|
83
|
+
}
|
|
84
|
+
function inputTypeSupportsLabel(inputType) {
|
|
85
|
+
return inputTypeSupportsHelperText(inputType) || inputType === InputType.CHECKBOX || inputType === InputType.BUTTON_MOMENTARY;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Internal function to retrieve HTML template based on the Asset-, attribute-, and value descriptors
|
|
89
|
+
* It generates a template using `or-vaadin-input`, together with respective HTML attributes like min/max, pattern, and of course 'input type'.
|
|
90
|
+
* For example, a 'positive number' attribute will render a `<or-vaadin-input type="number" min="0">`.
|
|
91
|
+
* If the Vaadin input doesn't support the 'input type', it will automatically fall back to the older `or-mwc-input`.
|
|
92
|
+
*
|
|
93
|
+
* This is mostly copied over from `or-mwc-input`, so this will need optimizing once that has been deprecated.
|
|
94
|
+
*/
|
|
95
|
+
export const getValueHolderInputTemplateProvider = (assetDescriptor, valueHolder, valueHolderDescriptor, valueDescriptor, valueChangeNotifier, options) => {
|
|
96
|
+
let inputType = options.inputType;
|
|
97
|
+
let step;
|
|
98
|
+
let pattern;
|
|
99
|
+
let min;
|
|
100
|
+
let max;
|
|
101
|
+
let multiple;
|
|
102
|
+
let required;
|
|
103
|
+
let selectOptions;
|
|
104
|
+
let valueConverter;
|
|
105
|
+
const styles = {};
|
|
106
|
+
const assetType = typeof assetDescriptor === "string" ? assetDescriptor : assetDescriptor.name;
|
|
107
|
+
const constraints = (valueHolder && (valueHolder.meta) || (valueDescriptor && valueDescriptor.meta) ? Util.getAttributeValueConstraints(valueHolder, valueHolderDescriptor, assetType) : Util.getMetaValueConstraints(valueHolder, valueHolderDescriptor, assetType)) || [];
|
|
108
|
+
const format = (valueHolder && (valueHolder.meta) || (valueDescriptor && valueDescriptor.meta) ? Util.getAttributeValueFormat(valueHolder, valueHolderDescriptor, assetType) : Util.getMetaValueFormat(valueHolder, valueHolderDescriptor, assetType));
|
|
109
|
+
const supportsVaadinInput = (type) => (OrVaadinInput.TEMPLATES.has(type) && !(format === null || format === void 0 ? void 0 : format.asSlider) && !(format === null || format === void 0 ? void 0 : format.asOnOff));
|
|
110
|
+
// Determine input type
|
|
111
|
+
if (!inputType) {
|
|
112
|
+
switch (valueDescriptor.name) {
|
|
113
|
+
case "text" /* WellknownValueTypes.TEXT */:
|
|
114
|
+
case "email" /* WellknownValueTypes.EMAIL */:
|
|
115
|
+
case "UUID" /* WellknownValueTypes.UUID */:
|
|
116
|
+
case "assetID" /* WellknownValueTypes.ASSETID */:
|
|
117
|
+
case "hostOrIPAddress" /* WellknownValueTypes.HOSTORIPADDRESS */:
|
|
118
|
+
case "IPAddress" /* WellknownValueTypes.IPADDRESS */:
|
|
119
|
+
inputType = Util.getMetaValue("multiline" /* WellknownMetaItems.MULTILINE */, valueHolder, valueHolderDescriptor) === true ? InputType.TEXTAREA : InputType.TEXT;
|
|
120
|
+
break;
|
|
121
|
+
case "boolean" /* WellknownValueTypes.BOOLEAN */:
|
|
122
|
+
if (format && format.asNumber) {
|
|
123
|
+
inputType = InputType.NUMBER;
|
|
124
|
+
step = 1;
|
|
125
|
+
min = 0;
|
|
126
|
+
max = 1;
|
|
127
|
+
valueConverter = v => !!v;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
if (format && (format.asOnOff || format.asOpenClosed)) {
|
|
131
|
+
inputType = InputType.SWITCH;
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
inputType = InputType.CHECKBOX;
|
|
135
|
+
}
|
|
136
|
+
if ((format && format.asMomentary) || (Util.getMetaValue("momentary" /* WellknownMetaItems.MOMENTARY */, valueHolder, valueHolderDescriptor) === true)) {
|
|
137
|
+
inputType = InputType.BUTTON_MOMENTARY;
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
case "bigNumber" /* WellknownValueTypes.BIGNUMBER */:
|
|
141
|
+
case "number" /* WellknownValueTypes.NUMBER */:
|
|
142
|
+
case "positiveInteger" /* WellknownValueTypes.POSITIVEINTEGER */:
|
|
143
|
+
case "positiveNumber" /* WellknownValueTypes.POSITIVENUMBER */:
|
|
144
|
+
case "long" /* WellknownValueTypes.LONG */:
|
|
145
|
+
case "integer" /* WellknownValueTypes.INTEGER */:
|
|
146
|
+
case "byte" /* WellknownValueTypes.BYTE */:
|
|
147
|
+
case "integerByte" /* WellknownValueTypes.INTEGERBYTE */:
|
|
148
|
+
case "direction" /* WellknownValueTypes.DIRECTION */:
|
|
149
|
+
case "TCP_IPPortNumber" /* WellknownValueTypes.TCPIPPORTNUMBER */:
|
|
150
|
+
if (valueDescriptor.name === "byte" /* WellknownValueTypes.BYTE */ || valueDescriptor.name === "integerByte" /* WellknownValueTypes.INTEGERBYTE */) {
|
|
151
|
+
min = 0;
|
|
152
|
+
max = 255;
|
|
153
|
+
step = 1;
|
|
154
|
+
}
|
|
155
|
+
else if (valueDescriptor.name === "integer" /* WellknownValueTypes.INTEGER */ || valueDescriptor.name === "long" /* WellknownValueTypes.LONG */) {
|
|
156
|
+
step = 1;
|
|
157
|
+
}
|
|
158
|
+
if (format && format.asDate) {
|
|
159
|
+
inputType = InputType.DATETIME;
|
|
160
|
+
}
|
|
161
|
+
else if (format && format.asBoolean) {
|
|
162
|
+
inputType = InputType.CHECKBOX;
|
|
163
|
+
valueConverter = v => v ? 1 : 0;
|
|
164
|
+
}
|
|
165
|
+
else if (format && format.asSlider) {
|
|
166
|
+
inputType = InputType.RANGE;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
inputType = InputType.NUMBER;
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
case "bigInteger" /* WellknownValueTypes.BIGINTEGER */:
|
|
173
|
+
inputType = InputType.BIG_INT;
|
|
174
|
+
step = 1;
|
|
175
|
+
break;
|
|
176
|
+
case "colourRGB" /* WellknownValueTypes.COLOURRGB */:
|
|
177
|
+
inputType = InputType.COLOUR;
|
|
178
|
+
break;
|
|
179
|
+
case "dateAndTime" /* WellknownValueTypes.DATEANDTIME */:
|
|
180
|
+
case "timestamp" /* WellknownValueTypes.TIMESTAMP */:
|
|
181
|
+
case "timestampISO8601" /* WellknownValueTypes.TIMESTAMPISO8601 */:
|
|
182
|
+
inputType = InputType.DATETIME;
|
|
183
|
+
break;
|
|
184
|
+
case "CRONExpression" /* WellknownValueTypes.CRONEXPRESSION */:
|
|
185
|
+
inputType = InputType.CRON;
|
|
186
|
+
break;
|
|
187
|
+
case "timeDurationISO8601" /* WellknownValueTypes.TIMEDURATIONISO8601 */:
|
|
188
|
+
inputType = InputType.DURATION_TIME;
|
|
189
|
+
break;
|
|
190
|
+
case "periodDurationISO8601" /* WellknownValueTypes.PERIODDURATIONISO8601 */:
|
|
191
|
+
inputType = InputType.DURATION_PERIOD;
|
|
192
|
+
break;
|
|
193
|
+
case "timeAndPeriodDurationISO8601" /* WellknownValueTypes.TIMEANDPERIODDURATIONISO8601 */:
|
|
194
|
+
inputType = InputType.DURATION;
|
|
195
|
+
break;
|
|
196
|
+
case "JSONObject" /* WellknownValueTypes.JSONOBJECT */:
|
|
197
|
+
inputType = InputType.JSON_OBJECT;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
if (valueDescriptor.arrayDimensions && valueDescriptor.arrayDimensions > 0) {
|
|
201
|
+
inputType = InputType.JSON;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (!inputType) {
|
|
205
|
+
switch (valueDescriptor.jsonType) {
|
|
206
|
+
case "number":
|
|
207
|
+
case "bigint":
|
|
208
|
+
inputType = InputType.NUMBER;
|
|
209
|
+
break;
|
|
210
|
+
case "boolean":
|
|
211
|
+
inputType = InputType.CHECKBOX;
|
|
212
|
+
break;
|
|
213
|
+
case "string":
|
|
214
|
+
inputType = InputType.TEXT;
|
|
215
|
+
break;
|
|
216
|
+
case "date":
|
|
217
|
+
inputType = InputType.DATETIME;
|
|
218
|
+
break;
|
|
219
|
+
default:
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
if (!inputType) {
|
|
224
|
+
inputType = InputType.JSON;
|
|
225
|
+
}
|
|
226
|
+
// Apply any constraints
|
|
227
|
+
const sizeConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "size");
|
|
228
|
+
const patternConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "pattern");
|
|
229
|
+
const minConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "min");
|
|
230
|
+
const maxConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "max");
|
|
231
|
+
const allowedValuesConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "allowedValues");
|
|
232
|
+
const pastConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "past");
|
|
233
|
+
const pastOrPresentConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "pastOrPresent");
|
|
234
|
+
const futureConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "future");
|
|
235
|
+
const futureOrPresentConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "futureOrPresent");
|
|
236
|
+
const notEmptyConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "notEmpty");
|
|
237
|
+
const notBlankConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "notBlank");
|
|
238
|
+
const notNullConstraint = constraints === null || constraints === void 0 ? void 0 : constraints.find(c => c.type === "notNull");
|
|
239
|
+
if (sizeConstraint) {
|
|
240
|
+
min = sizeConstraint.min;
|
|
241
|
+
max = sizeConstraint.max;
|
|
242
|
+
}
|
|
243
|
+
if (minConstraint) {
|
|
244
|
+
min = minConstraint.min;
|
|
245
|
+
}
|
|
246
|
+
if (maxConstraint) {
|
|
247
|
+
max = maxConstraint.max;
|
|
248
|
+
}
|
|
249
|
+
if (patternConstraint) {
|
|
250
|
+
pattern = patternConstraint.regexp;
|
|
251
|
+
}
|
|
252
|
+
if (notNullConstraint) {
|
|
253
|
+
required = true;
|
|
254
|
+
}
|
|
255
|
+
if (notBlankConstraint && !pattern) {
|
|
256
|
+
pattern = String.raw `\S+`;
|
|
257
|
+
}
|
|
258
|
+
else if (notEmptyConstraint && !pattern) {
|
|
259
|
+
pattern = ".+";
|
|
260
|
+
}
|
|
261
|
+
if (allowedValuesConstraint === null || allowedValuesConstraint === void 0 ? void 0 : allowedValuesConstraint.allowedValues) {
|
|
262
|
+
const allowedLabels = allowedValuesConstraint.allowedValueNames && allowedValuesConstraint.allowedValueNames.length === allowedValuesConstraint.allowedValues.length ? allowedValuesConstraint.allowedValueNames : undefined;
|
|
263
|
+
selectOptions = allowedValuesConstraint.allowedValues.map((v, i) => {
|
|
264
|
+
let label = allowedLabels ? allowedLabels[i] : "" + v;
|
|
265
|
+
label = Util.getAllowedValueLabel(label);
|
|
266
|
+
return {
|
|
267
|
+
value: v,
|
|
268
|
+
label: label || "" + v
|
|
269
|
+
};
|
|
270
|
+
});
|
|
271
|
+
inputType = InputType.SELECT;
|
|
272
|
+
if (valueDescriptor.arrayDimensions && valueDescriptor.arrayDimensions > 0) {
|
|
273
|
+
multiple = true;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (inputType === InputType.DATETIME) {
|
|
277
|
+
if (pastConstraint || pastOrPresentConstraint) {
|
|
278
|
+
min = undefined;
|
|
279
|
+
max = new Date();
|
|
280
|
+
}
|
|
281
|
+
else if (futureConstraint || futureOrPresentConstraint) {
|
|
282
|
+
min = new Date();
|
|
283
|
+
max = undefined;
|
|
284
|
+
}
|
|
285
|
+
// Refine the input type based on formatting
|
|
286
|
+
if (format) {
|
|
287
|
+
if (format.timeStyle && !format.dateStyle) {
|
|
288
|
+
inputType = InputType.TIME;
|
|
289
|
+
}
|
|
290
|
+
else if (format.dateStyle && !format.timeStyle) {
|
|
291
|
+
inputType = InputType.DATE;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
if (inputType === InputType.NUMBER && (format === null || format === void 0 ? void 0 : format.resolution)) {
|
|
296
|
+
step = format.resolution;
|
|
297
|
+
}
|
|
298
|
+
if (inputType === InputType.COLOUR) {
|
|
299
|
+
styles.marginLeft = "24px";
|
|
300
|
+
}
|
|
301
|
+
const supportsHelperText = inputTypeSupportsHelperText(inputType);
|
|
302
|
+
const supportsLabel = inputTypeSupportsLabel(inputType);
|
|
303
|
+
const supportsSendButton = inputTypeSupportsSendButton(inputType);
|
|
304
|
+
const readonly = options.readonly;
|
|
305
|
+
required = required || options.required;
|
|
306
|
+
const comfortable = options.comfortable;
|
|
307
|
+
const resizeVertical = options.resizeVertical;
|
|
308
|
+
const inputRef = createRef();
|
|
309
|
+
const templateFunction = (value, focused, loading, sending, _error, helperText) => {
|
|
310
|
+
const disabled = options.disabled || loading || sending;
|
|
311
|
+
const label = supportsLabel ? options.label : undefined;
|
|
312
|
+
const inputStyle = styles ? styleMap(styles) : undefined;
|
|
313
|
+
const onValueChange = (ev) => {
|
|
314
|
+
var _a;
|
|
315
|
+
ev.stopPropagation();
|
|
316
|
+
const elem = ev.currentTarget;
|
|
317
|
+
if (elem === null || elem === void 0 ? void 0 : elem.checkValidity()) {
|
|
318
|
+
const doRemoteUpdate = (!OrVaadinInput.CHANGE_EVENTS.has(inputType) || (OrVaadinInput.CHANGE_EVENTS.get(inputType) === ev.type));
|
|
319
|
+
valueChangeNotifier((_a = valueConverter === null || valueConverter === void 0 ? void 0 : valueConverter(elem.nativeValue)) !== null && _a !== void 0 ? _a : elem.nativeValue, doRemoteUpdate);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
if (supportsVaadinInput(inputType)) {
|
|
323
|
+
// or-vaadin-checkbox has multiple states (like indeterminate), so it uses the 'checked' HTML attribute instead of 'value'.
|
|
324
|
+
let checked = false;
|
|
325
|
+
if (inputType === InputType.CHECKBOX) {
|
|
326
|
+
checked = Boolean(value);
|
|
327
|
+
value = undefined;
|
|
328
|
+
}
|
|
329
|
+
return html `
|
|
330
|
+
<or-vaadin-input ${ref(inputRef)} id="input" style="${ifDefined(inputStyle)}" type=${ifDefined(inputType)}
|
|
331
|
+
label=${ifDefined(label)} value=${ifDefined(value)} ?checked="${checked}" pattern=${ifDefined(pattern)}
|
|
332
|
+
min=${ifDefined(min)} max=${ifDefined(max)} ?multiple=${multiple} .format=${ifDefined(format)}
|
|
333
|
+
?autofocus=${focused} ?required=${required} ?readonly=${readonly} ?disabled=${disabled}
|
|
334
|
+
.items=${ifDefined(selectOptions)} step=${ifDefined(step)}
|
|
335
|
+
helper-text="${ifDefined(helperText)}" ?resizeVertical="${resizeVertical}"
|
|
336
|
+
?rounded="${options.rounded}" ?outlined="${options.outlined}"
|
|
337
|
+
@change="${onValueChange}"
|
|
338
|
+
@submit="${onValueChange}"
|
|
339
|
+
></or-vaadin-input>
|
|
340
|
+
`;
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
// Fallback code to use deprecated or-mwc-input. This should be removed in the future, once all input types are supported and mapped.
|
|
344
|
+
// Be aware: this function only creates the template, so it does not import or-mwc-input by default.
|
|
345
|
+
return html `
|
|
346
|
+
<or-mwc-input ${ref(inputRef)} id="input" style="${styleMap(styles)}" .type="${inputType}" .label="${label}" .value="${value}" .pattern="${pattern}"
|
|
347
|
+
.min="${min}" .max="${max}" .format="${format}" .focused="${focused}" .required="${required}" .multiple="${multiple}"
|
|
348
|
+
.options="${selectOptions}" .comfortable="${comfortable}" .readonly="${readonly}" .disabled="${disabled}" .step="${step}"
|
|
349
|
+
.helperText="${helperText}" .helperPersistent="${true}" .resizeVertical="${resizeVertical}"
|
|
350
|
+
.rounded="${options.rounded}" .outlined="${options.outlined}"
|
|
351
|
+
@or-mwc-input-changed="${(e) => {
|
|
352
|
+
e.stopPropagation();
|
|
353
|
+
valueChangeNotifier(valueConverter ? valueConverter(e.detail.value) : e.detail.value);
|
|
354
|
+
}}"
|
|
355
|
+
></or-mwc-input>
|
|
356
|
+
`;
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
return {
|
|
360
|
+
templateFunction: templateFunction,
|
|
361
|
+
supportsHelperText: supportsHelperText,
|
|
362
|
+
supportsSendButton: supportsSendButton,
|
|
363
|
+
supportsLabel: supportsLabel,
|
|
364
|
+
validator: () => {
|
|
365
|
+
if (!inputRef.value) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
return inputRef.value.checkValidity();
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
//# sourceMappingURL=util.js.map
|
package/lib/util.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","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gBACxC,CAAC,CAAC,eAAe,EAAE,CAAC;gBACpB,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC1F,CAAC;;aAElB,CAAC;QACN,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,gBAAgB;QAClC,kBAAkB,EAAE,kBAAkB;QACtC,kBAAkB,EAAE,kBAAkB;QACtC,aAAa,EAAE,aAAa;QAC5B,SAAS,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;gBAClB,OAAO,KAAK,CAAC;YACjB,CAAC;YACD,OAAO,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAC1C,CAAC;KACJ,CAAC;AACN,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openremote/or-vaadin-components",
|
|
3
|
+
"version": "1.13.1",
|
|
4
|
+
"description": "Vaadin Components packaged as components aligned with the OpenRemote design system",
|
|
5
|
+
"customElements": "custom-elements.json",
|
|
6
|
+
"main": "dist/umd/index.bundle.js",
|
|
7
|
+
"module": "lib/index.js",
|
|
8
|
+
"types": "src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./lib/index.js",
|
|
11
|
+
"./*": "./lib/*.js",
|
|
12
|
+
"./jsx": {
|
|
13
|
+
"types": "./custom-elements-jsx.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"typesVersions": {
|
|
17
|
+
"*": {
|
|
18
|
+
"*": [
|
|
19
|
+
"lib/*"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"clean": "npx tsc -b --clean && npx shx rm -rf dist lib",
|
|
25
|
+
"analyze": "npx cem analyze --config ../custom-elements-manifest.config.mjs",
|
|
26
|
+
"build": "npx tsc -b",
|
|
27
|
+
"test": "npx tsc -b && npx playwright test",
|
|
28
|
+
"prepack": "npx tsc -b"
|
|
29
|
+
},
|
|
30
|
+
"author": "OpenRemote",
|
|
31
|
+
"repository": "https://github.com/openremote/openremote",
|
|
32
|
+
"license": "AGPL-3.0-or-later",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@openremote/core": "1.13.1",
|
|
35
|
+
"@openremote/model": "1.13.1",
|
|
36
|
+
"@vaadin/checkbox": "~25.0.1",
|
|
37
|
+
"@vaadin/dialog": "~25.0.1",
|
|
38
|
+
"@vaadin/number-field": "~25.0.1",
|
|
39
|
+
"@vaadin/password-field": "~25.0.1",
|
|
40
|
+
"@vaadin/select": "~25.0.1",
|
|
41
|
+
"@vaadin/text-area": "~25.0.1",
|
|
42
|
+
"@vaadin/text-field": "~25.0.1",
|
|
43
|
+
"lit": "^3.3.1"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|