Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: Updated to latest material packages, removed obsolete or-select and add number input to accompany InputType.RANGE (fixes #206, implements #209)

Rich Turner18b0437bfec9
diff --git a/ui/component/core/src/util.ts b/ui/component/core/src/util.ts
index 6eeeccc0c..bc01ec3f5 100644
--- a/ui/component/core/src/util.ts
+++ b/ui/component/core/src/util.ts
@@ -183,41 +183,32 @@ export function isObject(object: any): boolean {
}
export function objectsEqual(obj1?: any, obj2?: any, deep: boolean = true): boolean {
- if (obj1 === obj2) {
- return true;
- }
-
- if (!obj1 || !obj2) {
- return false;
- }
+ if (obj1 === null || obj1 === undefined || obj2 === null || obj2 === undefined) { return obj1 === obj2; }
+ // after this just checking type of one would be enough
+ if (obj1.constructor !== obj2.constructor) { return false; }
+ // if they are functions, they should exactly refer to same one (because of closures)
+ if (obj1 instanceof Function) { return obj1 === obj2; }
+ // if they are regexps, they should exactly refer to same one (it is hard to better equality check on current ES)
+ if (obj1 instanceof RegExp) { return obj1 === obj2; }
+ if (obj1 === obj2 || obj1.valueOf() === obj2.valueOf()) { return true; }
+ if (Array.isArray(obj1) && obj1.length !== obj2.length) { return false; }
+
+ // if they are dates, they must had equal valueOf
+ if (obj1 instanceof Date) { return false; }
+
+ // if they are strictly equal, they both need to be object at least
+ if (!(obj1 instanceof Object)) { return false; }
+ if (!(obj2 instanceof Object)) { return false; }
if (deep) {
- let iterator1: [string, any][] | undefined;
- let iterator2: [string, any][] | undefined;
-
- if (Array.isArray(obj1) || typeof obj1 === "object") {
- if (typeof obj2 !== typeof obj1) {
- return false;
- }
- iterator1 = Object.entries(obj1).sort((a, b) => b[0].localeCompare(a[0]));
- iterator2 = Object.entries(obj2).sort((a, b) => b[0].localeCompare(a[0]));
- }
-
- if (!iterator1 || !iterator2) {
- return false;
- }
-
- if (iterator1.length !== iterator2.length) {
- return false;
- }
-
- for (let i = iterator1.length; i--;) {
- if (iterator1[i][0] !== iterator2[i][0] || !objectsEqual(iterator1[i][1], iterator2[i][1])) {
- return false;
- }
- }
-
- return true;
+ // recursive object equality check
+ const p = Object.keys(obj1);
+ return Object.keys(obj2).every((i) => {
+ return p.indexOf(i) !== -1;
+ }) &&
+ p.every((i) => {
+ return objectsEqual(obj1[i], obj2[i]);
+ });
}
return false;
diff --git a/ui/component/or-asset-tree/package.json b/ui/component/or-asset-tree/package.json
index 879f02c42..d4b7cd756 100644
--- a/ui/component/or-asset-tree/package.json
+++ b/ui/component/or-asset-tree/package.json
@@ -16,7 +16,6 @@
"@openremote/core": "^1.1.0",
"@openremote/model": "^1.1.0",
"@openremote/or-icon": "^1.1.0",
- "@openremote/or-select": "^1.1.0",
"@openremote/or-translate": "^1.1.0",
"@openremote/rest": "^1.1.0",
"lit-element": "^2.2.1",
diff --git a/ui/component/or-asset-tree/src/style.ts b/ui/component/or-asset-tree/src/style.ts
index c77b4c120..6e0026245 100644
--- a/ui/component/or-asset-tree/src/style.ts
+++ b/ui/component/or-asset-tree/src/style.ts
@@ -68,13 +68,6 @@ export const style = css`
flex-direction: row;
text-transform: capitalize;
padding-left: 15px;
-
- --or-select-text-color: var(--internal-or-asset-tree-header-text-color);
- --or-select-option-text-color: var(--internal-or-asset-tree-header-menu-text-color);
- --or-select-option-background-color: var(--internal-or-asset-tree-header-menu-background-color);
- --or-select-background-color: none;
- --or-select-border-color: none;
- --or-select-padding: 5px 20px 5px 5px;
}
#title {
diff --git a/ui/component/or-asset-viewer/src/components/or-asset-info.ts b/ui/component/or-asset-viewer/src/components/or-asset-info.ts
deleted file mode 100644
index bd2cd175d..000000000
--- a/ui/component/or-asset-viewer/src/components/or-asset-info.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import {customElement, html, LitElement, property, PropertyValues, TemplateResult, css} from "lit-element";
-import "@openremote/or-select";
-import "@openremote/or-icon";
-import "@openremote/or-translate";
-
-@customElement("or-asset-info")
-export class OrAssetInfo extends LitElement {
-
- @property({type: Boolean, reflect: true})
- public show: boolean = false;
-
- @property({type: Boolean})
- public dismissible: boolean = true;
-
- public static get styles() {
- return css`
- :host {
- position: relative;
- }
-
- div[hidden] {
- height: 0px;
- }
-
- div {
- transition: all 0.8s ease-in;
- position: absolute;
- height: auto;
- }
- `;
- }
-
- protected updated(_changedProperties: PropertyValues): void {
- super.updated(_changedProperties);
-
- if (_changedProperties.has("show") && this.dismissible) {
- if (this.show) {
- document.body.addEventListener("click", this._onMouseClick);
- } else {
- document.body.removeEventListener("click", this._onMouseClick)
- }
- }
- }
-
- protected _onMouseClick(evt: MouseEvent) {
- if (!this.contains(evt.target as Node)) {
- this.show = false;
- }
- }
-
- protected render(): TemplateResult | void {
- return html`<div ?hidden="${!this.show}">TEST</div>`;
- }
-}
\ No newline at end of file
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index b3c322da2..033751eb0 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -241,7 +241,7 @@ export function getPanelContent(panelName: string, asset: Asset, attributes: Ass
}
</style>
<div id="history-controls">
- <or-input id="history-attribute-picker" .checkAssetWrite="${false}" value="${historyAttrs[0].name}" .label="${i18next.t("attribute")}" @or-input-changed="${(evt: OrInputChangedEvent) => attributeChanged(evt.detail.value)}" .type="${InputType.SELECT}" .options="${options}"></or-input>
+ <or-input id="history-attribute-picker" .checkAssetWrite="${false}" .value="${historyAttrs[0].name}" .label="${i18next.t("attribute")}" @or-input-changed="${(evt: OrInputChangedEvent) => attributeChanged(evt.detail.value)}" .type="${InputType.SELECT}" .options="${options}"></or-input>
</div>
<or-attribute-history id="attribute-history" .config="${viewerConfig.historyConfig}" .assetType="${asset.type}"></or-attribute-history>
diff --git a/ui/component/or-attribute-history/src/index.ts b/ui/component/or-attribute-history/src/index.ts
index f3f08869b..049c67adb 100644
--- a/ui/component/or-attribute-history/src/index.ts
+++ b/ui/component/or-attribute-history/src/index.ts
@@ -309,9 +309,9 @@ export class OrAttributeHistory extends translate(i18next)(LitElement) {
return html`
<div id="container">
<div id="controls">
- <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.period = evt.detail.value}" .value="${this.period}" .options="${this._getPeriodOptions().map(item => item.value)}"></or-input>
+ <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.period = evt.detail.value}" .value="${this.period}" .options="${this._getPeriodOptions()}"></or-input>
<div id="ending-controls">
- <or-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled}" label="${i18next.t("ending")}" .value="${this.fromTimestamp}" @or-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>
+ <or-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled}" label="${i18next.t("ending")}" .value="${this.fromTimestamp}" @or-input-changed="${(evt: OrInputChangedEvent) => this.fromTimestamp = this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>
<or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-left" @click="${() => this.fromTimestamp = this._updateTimestamp(this.fromTimestamp!, false)}"></or-icon>
<or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-right" @click="${() => this.fromTimestamp = this._updateTimestamp(this.fromTimestamp!, true)}"></or-icon>
<or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-double-right" @click="${() => this.fromTimestamp = this._updateTimestamp(new Date())}"></or-icon>
@@ -617,26 +617,11 @@ export class OrAttributeHistory extends translate(i18next)(LitElement) {
}
protected _getPeriodOptions() {
return [
- {
- text: i18next.t(DatapointInterval.HOUR),
- value: "hour"
- },
- {
- text: i18next.t(DatapointInterval.DAY),
- value: "day"
- },
- {
- text: i18next.t(DatapointInterval.WEEK),
- value: "week"
- },
- {
- text: i18next.t(DatapointInterval.MONTH),
- value: "month"
- },
- {
- text: i18next.t(DatapointInterval.YEAR),
- value: "year"
- }
+ DatapointInterval.HOUR.toLowerCase(),
+ DatapointInterval.DAY.toLowerCase(),
+ DatapointInterval.WEEK.toLowerCase(),
+ DatapointInterval.MONTH.toLowerCase(),
+ DatapointInterval.YEAR.toLowerCase()
];
}
diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.ts
index c4855beed..1d4ec588e 100644
--- a/ui/component/or-attribute-input/src/index.ts
+++ b/ui/component/or-attribute-input/src/index.ts
@@ -1,4 +1,5 @@
import {css, customElement, unsafeCSS, html, LitElement, property, PropertyValues, query, TemplateResult} from "lit-element";
+import {ifDefined} from "lit-html/directives/if-defined";
import {i18next, translate} from "@openremote/or-translate";
import {
AssetAttribute,
@@ -9,8 +10,7 @@ import {
AttributeValueType,
MetaItemType,
ValueType,
- SharedEvent,
- Attribute
+ SharedEvent
} from "@openremote/model";
import manager, {AssetModelUtil, subscribe, Util, DefaultColor4} from "@openremote/core";
import "@openremote/or-input";
@@ -106,21 +106,22 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
#wrapper-helper {
display: flex;
flex: 1;
+ flex-direction: column;
}
- #wrapper-helper > or-input {
+ #wrapper-input {
flex: 1;
- margin-top: -15px;
+ margin-left: 16px;
}
- #wrapper-helper-inner {
- margin-right: 20px;
+ #wrapper-input > or-input {
+ width: 100%;
}
/* Copy of mdc text field helper text styles */
#helper-text {
+ margin-left: 16px;
min-width: 255px;
- margin-top: 3px;
color: rgba(0, 0, 0, 0.6);
font-family: Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
@@ -135,11 +136,16 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
top: 0;
right: 0;
bottom: 0;
- background: transparent;
+ background: white;
+ opacity: 0.2;
display: flex;
align-items: center;
justify-content: center;
}
+
+ #scrim.hidden {
+ display: none;
+ }
#send-btn {
flex: 0;
@@ -305,17 +311,21 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
@property({type: Boolean})
public disableSubscribe: boolean = false;
+ @property()
+ protected _attributeEvent?: AttributeEvent;
+
+ @property()
+ protected _writeTimeoutHandler?: number;
+
@query("#input")
protected _attrInput!: OrInput;
@query("#send-btn")
protected _sendButton!: OrInput;
-
- @property()
- protected _attributeEvent?: AttributeEvent;
+ @query("#scrim")
+ protected _scrimElem!: HTMLDivElement;
public customProvider?: AttributeInputCustomProvider;
public writeTimeout?: number = DEFAULT_TIMEOUT;
-
protected _template?: (value: any) => TemplateResult;
protected _attributeDescriptor?: AttributeDescriptor;
protected _attributeValueDescriptor?: AttributeValueDescriptor;
@@ -332,9 +342,6 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
protected _valueFormat?: string;
protected _sendError = false;
- @property({attribute: false})
- protected _writeTimeoutHandler?: number;
-
public disconnectedCallback() {
super.disconnectedCallback();
this._clearWriteTimeout();
@@ -556,7 +563,7 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
public render() {
// Check if attribute hasn't been loaded yet or pending write
- const loading = (this.attributeRefs && !this._attributeEvent) || this._writeTimeoutHandler;
+ const loading = (this.attributeRefs && !this._attributeEvent) || !!this._writeTimeoutHandler;
let content: TemplateResult | string | undefined = "";
const value = this.getValue();
@@ -571,6 +578,7 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
const helperText = this.getHelperText();
const buttonIcon = this._writeTimeoutHandler ? "send-clock" : "send";
+ const supportsHelperText = this.inputTypeSupportsHelperText();
let label = this._label;
if (helperText && !this.inputTypeSupportsHelperText()) {
@@ -580,9 +588,9 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
content = html`<or-input id="input" .type="${this._inputType}" .label="${label}" .value="${value}"
.allowedValues="${this._options}" .min="${this._min}" .max="${this._max}" .format="${this._valueFormat}"
.options="${this._options}" .readonly="${this._readonly}" .disabled="${this._disabled || loading}"
- .helperText="${helperText}" .helperPersistent="${true}"
+ .helperText="${supportsHelperText ? helperText : undefined}" .helperPersistent="${true}" disableSliderNumberInput="${this._readonly}"
@keyup="${(e: KeyboardEvent) => {
- if (e.code === "Enter" && this._inputType !== InputType.JSON && this._inputType !== InputType.TEXTAREA) {
+ if ((e.code === "Enter" || e.code === "NumpadEnter") && this._inputType !== InputType.JSON && this._inputType !== InputType.TEXTAREA) {
this._updateValue(this._attrInput.value);
}
}}" @or-input-changed="${(e: OrInputChangedEvent) => {
@@ -592,15 +600,13 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
}
}}"></or-input>`;
- if (helperText && !this.inputTypeSupportsHelperText()) {
+ if (helperText && !supportsHelperText) {
// Manually provide helper text outside of or-input
content = html`
<div id="wrapper-helper">
- <div id="wrapper-helper-inner">
- <div>${this._label}</div>
- <div id="helper-text">${helperText}</div>
- </div>
- ${content}
+ <div>${this._label}</div>
+ <div id="wrapper-input">${content}</div>
+ <div id="helper-text">${helperText}</div>
</div>
`;
}
@@ -619,13 +625,19 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
return html`
<div id="wrapper" class="${this._showButton || this.disableButton ? "no-padding" : "right-padding"}">
${content}
- ${loading
- ? html`<div id="scrim"><progress class="pure-material-progress-circular"></progress></div>`
- : ``}
+ <div id="scrim" class="${ifDefined(loading ? undefined : "hidden")}"><progress class="pure-material-progress-circular"></progress></div>
</div>
`;
}
+ protected updated(_changedProperties: PropertyValues): void {
+ if (_changedProperties.has("_writeTimeoutHandler") && !this._writeTimeoutHandler) {
+ if (this._attrInput) {
+ this._attrInput.focus();
+ }
+ }
+ }
+
protected getValue(): any {
return this._attributeEvent ? this._attributeEvent.attributeState!.value : this.attribute ? this.attribute.value : this.value;
}
@@ -709,6 +721,10 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
return;
}
+ if (this._writeTimeoutHandler) {
+ return;
+ }
+
// If we have an attributeRef then send an update and wait for the updated attribute event to come back through
// the system or for the attribute property to be updated by a parent control or timeout and reset the value
const attributeRef = this._getAttributeRef();
@@ -733,8 +749,8 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
protected _clearWriteTimeout() {
if (this._writeTimeoutHandler) {
window.clearTimeout(this._writeTimeoutHandler);
- this._writeTimeoutHandler = undefined;
}
+ this._writeTimeoutHandler = undefined;
}
protected _onWriteTimeout() {
diff --git a/ui/component/or-input/package.json b/ui/component/or-input/package.json
index 131addf42..bdf14c101 100644
--- a/ui/component/or-input/package.json
+++ b/ui/component/or-input/package.json
@@ -13,18 +13,18 @@
"author": "OpenRemote",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@material/button": "^4.0.0",
- "@material/checkbox": "^4.0.0",
- "@material/fab": "^4.0.0",
- "@material/floating-label": "^4.0.0",
- "@material/form-field": "^4.0.0",
- "@material/icon-button": "^4.0.0",
- "@material/line-ripple": "^4.0.0",
- "@material/ripple": "^4.0.0",
- "@material/select": "^4.0.0",
+ "@material/button": "^7.0.0",
+ "@material/checkbox": "^7.0.0",
+ "@material/fab": "^7.0.0",
+ "@material/floating-label": "^7.0.0",
+ "@material/form-field": "^7.0.0",
+ "@material/icon-button": "^7.0.0",
+ "@material/line-ripple": "^7.0.0",
+ "@material/ripple": "^7.0.0",
+ "@material/select": "^7.0.0",
"@material/slider": "^7.0.0",
- "@material/switch": "^4.0.0",
- "@material/textfield": "^4.0.0",
+ "@material/switch": "^7.0.0",
+ "@material/textfield": "^7.0.0",
"lit-element": "^2.2.1"
},
"devDependencies": {
diff --git a/ui/component/or-input/src/index.ts b/ui/component/or-input/src/index.ts
index ba3ec90b9..740f9353d 100644
--- a/ui/component/or-input/src/index.ts
+++ b/ui/component/or-input/src/index.ts
@@ -108,13 +108,15 @@ const style = css`
height: 56px;
}
- #switch-wrapper {
+ #wrapper {
display: flex;
align-items: center;
+ min-height: 48px;
height: 100%;
}
- #switch-wrapper > label {
+ #wrapper > label {
+ white-space: nowrap;
margin-right: 20px;
}
@@ -144,13 +146,6 @@ const style = css`
::-webkit-datetime-edit { padding: 0em;}
::-webkit-datetime-edit-text { padding: 0; }
-
- /* MDC TEXT FIELD AND SELECT DON'T USE THEME VARS */
- .mdc-select #menu-anchor,
- .mdc-text-field {
- background-color: #fbfbfb!important;
- }
-
.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
color: var(--mdc-theme-primary);
}
@@ -159,10 +154,6 @@ const style = css`
color: var(--mdc-theme-primary);
}
- .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label {
- color: var(--mdc-theme-primary);
- }
-
.mdc-text-field, .mdc-text-field-helper-line {
width: inherit;
}
@@ -182,15 +173,7 @@ const style = css`
.mdc-select {
white-space: nowrap;
}
-
- .mdc-select__dropdown-icon {
- background: none;
- }
- .mdc-select--focused .mdc-select__dropdown-icon {
- --or-icon-fill: var(--internal-or-input-color);
- }
-
.mdc-icon-button {
padding: 0;
color: var(--internal-or-input-color);
@@ -242,9 +225,6 @@ export class OrInput extends LitElement {
@property({type: Boolean})
public readonly: boolean = false;
- @property({type: Boolean})
- public disabled: boolean = false;
-
@property({type: Boolean})
public required: boolean = false;
@@ -321,6 +301,9 @@ export class OrInput extends LitElement {
@property({type: String})
public format?: string;
+ @property({type: Boolean})
+ public disableSliderNumberInput: boolean = false;
+
/* BUTTON STYLES END */
/* TEXT INPUT STYLES START */
@@ -343,10 +326,27 @@ export class OrInput extends LitElement {
@property({type: String})
public label?: string;
+ @property()
+ protected _disabled: boolean = false;
+
+ public set disabled(disabled: boolean) {
+ this._disabled = disabled;
+ if (this._mdcComponent) {
+ (this._mdcComponent as any).disabled = disabled;
+ }
+ if (this.type === InputType.RANGE && this._mdcComponent2) {
+ (this._mdcComponent2 as any).disabled = disabled;
+ }
+ }
+
+ public get disabled() {
+ return this._disabled;
+ }
+
/* TEXT INPUT STYLES END */
protected _mdcComponent?: MDCComponent<any>;
- protected _mdcField?: MDCComponent<any>;
+ protected _mdcComponent2?: MDCComponent<any>;
protected _selectedIndex = -1;
disconnectedCallback(): void {
@@ -355,9 +355,35 @@ export class OrInput extends LitElement {
this._mdcComponent.destroy();
this._mdcComponent = undefined;
}
- if (this._mdcField) {
- this._mdcField.destroy();
- this._mdcField = undefined;
+ if (this._mdcComponent2) {
+ this._mdcComponent2.destroy();
+ this._mdcComponent2 = undefined;
+ }
+ }
+
+ protected shouldUpdate(_changedProperties: PropertyValues) {
+
+ if (!this.type && this.value) {
+ if (this.value instanceof Date) {
+ this.type = InputType.DATETIME;
+ } else if (typeof(this.value) === "boolean") {
+ this.type = InputType.CHECKBOX;
+ } else if (typeof(this.value) === "number") {
+ this.type = InputType.NUMBER;
+ } else if (typeof(this.value) === "string") {
+ this.type = InputType.TEXT;
+ } else {
+ this.type = InputType.JSON;
+ }
+ }
+ return true;
+ }
+
+ public focus() {
+ if (this.type === InputType.RANGE && this._mdcComponent2) {
+ (this._mdcComponent2 as any).focus();
+ } else if (this._mdcComponent && typeof (this._mdcComponent as any).focus === "function") {
+ (this._mdcComponent as any).focus();
}
}
@@ -366,22 +392,22 @@ export class OrInput extends LitElement {
if (this.type) {
const showLabel = !this.fullWidth && this.label;
- const outlined = !this.fullWidth && this.outlined;
- const hasHelper = !!this.helperText;
+ let outlined = !this.fullWidth && this.outlined;
+ let hasHelper = !!this.helperText;
const showValidationMessage = this.validationMessage;
const helperClasses = {
"mdc-text-field-helper-text--persistent": this.helperPersistent,
"mdc-text-field-helper-text--validation-msg": showValidationMessage,
};
const hasValue = this.value || this.value === false;
- const labelTemplate = showLabel ? html`<label class="mdc-floating-label ${hasValue ? "mdc-floating-label--float-above" : ""}" for="elem">${this.label}</label>` : ``;
+ const labelTemplate = showLabel ? html`<span class="mdc-floating-label ${hasValue ? "mdc-floating-label--float-above" : ""}" id="label">${this.label}</span>` : undefined;
switch (this.type) {
case InputType.RADIO:
return html`<span>RADIO</span>`;
case InputType.SWITCH:
return html`
- <span id="switch-wrapper">
+ <span id="wrapper">
${this.label ? html`<label for="elem" class="${this.disabled ? "mdc-switch--disabled" : ""}">${this.label}</label>` : ``}
<div id="component" class="mdc-switch ${this.disabled || this.readonly ? "mdc-switch--disabled" : ""} ${this.value ? "mdc-switch--checked" : ""}">
<div class="mdc-switch__track"></div>
@@ -434,6 +460,7 @@ export class OrInput extends LitElement {
case InputType.SELECT:
const classes = {
"mdc-select--outlined": outlined,
+ "mdc-select--filled": !outlined,
"mdc-select--disabled": this.disabled || this.readonly,
"mdc-select--required": this.required,
"mdc-select--dense": false, // this.dense,
@@ -454,29 +481,48 @@ export class OrInput extends LitElement {
this._selectedIndex = -1;
return html`
- <div id="component"
- class="mdc-select ${classMap(classes)}"
+ <div id="component"
+ class="mdc-select ${classMap(classes)}"
@MDCSelect:change="${(e: MDCSelectEvent) => this.onValueChange(undefined, e.detail.index === -1 ? undefined : Array.isArray(this.options![e.detail.index]) ? this.options![e.detail.index][0] : this.options![e.detail.index])}">
<div id="menu-anchor" class="mdc-select__anchor select-class">
- <or-icon class="mdc-select__dropdown-icon" icon="menu-down"></or-icon>
- <input id="elem" readonly class="mdc-select__selected-text" role="button" value="${valueLabel ? i18next.t(valueLabel) : ""}" aria-haspopup="listbox" aria-controls="component-helper-text" aria-describedby="component-helper-text" aria-labelledby="component-label component"/>
+ <span class="mdc-select__ripple"></span>
+ <span class="mdc-select__selected-text">${valueLabel ? i18next.t(valueLabel) : ""}</span>
+ <span class="mdc-select__dropdown-icon">
+ <svg
+ class="mdc-select__dropdown-icon-graphic"
+ viewBox="7 10 10 5">
+ <polygon
+ class="mdc-select__dropdown-icon-inactive"
+ stroke="none"
+ fill-rule="evenodd"
+ points="7 10 12 15 17 10">
+ </polygon>
+ <polygon
+ class="mdc-select__dropdown-icon-active"
+ stroke="none"
+ fill-rule="evenodd"
+ points="7 15 12 10 17 15">
+ </polygon>
+ </svg>
+ </span>
${outlined ? this.renderOutlined(labelTemplate) : labelTemplate}
${!outlined ? html`<div class="mdc-line-ripple"></div>` : ``}
- </div>
-
+ </div>
+
<div class="mdc-select__menu mdc-menu mdc-menu-surface select-class" role="listbox">
<ul class="mdc-list">
${opts ? opts.map(([optValue, optDisplay], index) => {
if (this.value === optValue) {
this._selectedIndex = index;
}
- return html`<li class="mdc-list-item ${this._selectedIndex === index ? "mdc-menu-item--selected" : ""}" role="option" aria-checked="${this._selectedIndex === index}" data-value="${optValue}">
- <span><or-translate value="${optDisplay}"></or-translate></span>
+ return html`<li class="mdc-list-item ${this._selectedIndex === index ? "mdc-list-item--selected" : ""}" role="option" aria-selected="${this._selectedIndex === index}" data-value="${optValue}">
+ <span class="mdc-list-item__ripple"></span>
+ <span class="mdc-list-item__text">${i18next.t(optDisplay)}</span>
</li>`;
}) : ``}
</ul>
- </div>
-
+ </div>
+
${hasHelper ? html`
<p id="component-helper-text" class="mdc-select-helper-text ${classMap(helperClasses)}" aria-hidden="true">
${showValidationMessage ? this.validationMessage : this.helperText}
@@ -615,81 +661,106 @@ export class OrInput extends LitElement {
}
}
+ let inputElem: TemplateResult | undefined;
+ let label = this.label;
+ let type = this.type;
+ let componentId = "component";
+ let denseDefault = true;
+ let denseCompact = false;
+ let rounded = false;
+
if (this.type === InputType.RANGE) {
- return html`
- <div id="component" class="mdc-slider mdc-slider--discrete" tabindex="10" role="slider"
- aria-valuemin="${ifDefined(valMinMax[1])}" aria-valuemax="${ifDefined(valMinMax[2])}"
- aria-valuenow="${ifDefined(valMinMax[0])}" aria-label="${ifDefined(this.label)}"
- aria-disabled="${(this.readonly || this.disabled) ? "true" : "false"}"
- @MDCSlider:change="${() => this.onValueChange(undefined, (this._mdcComponent as MDCSlider).value)}">
- <div class="mdc-slider__track-container">
- <div class="mdc-slider__track"></div>
- </div>
- <div class="mdc-slider__thumb-container">
- <div class="mdc-slider__pin">
- <span class="mdc-slider__pin-value-marker"></span>
- </div>
- <svg class="mdc-slider__thumb" width="21" height="21">
- <circle cx="10.5" cy="10.5" r="7.875"></circle>
- </svg>
- <div class="mdc-slider__focus-ring"></div>
- </div>
- </div>
- `;
+ // Change vars so number input can be included alongside the slider
+ label = undefined;
+ outlined = true;
+ hasHelper = false;
+ denseCompact = true;
+ denseDefault = false;
+ rounded = true;
+ type = InputType.NUMBER;
+ componentId = "number";
}
- const classes = {
- "mdc-text-field--outlined": outlined,
- "mdc-text-field--textarea": this.type === InputType.TEXTAREA || this.type === InputType.JSON,
- "mdc-text-field--disabled": this.disabled,
- "mdc-text-field--fullwidth": this.fullWidth,
- "mdc-text-field--dense": false, // this.type !== InputType.TEXTAREA && this.type !== InputType.JSON && this.dense,
- "mdc-text-field--no-label": !this.label,
- "mdc-text-field--with-leading-icon": !!this.icon,
- "mdc-text-field--with-trailing-icon": !!this.iconTrailing
- };
+ if (!(this.type === InputType.RANGE && this.disableSliderNumberInput)) {
+ const classes = {
+ "mdc-text-field": true,
+ "mdc-text-field--filled": !outlined,
+ "mdc-text-field--outlined": outlined,
+ "mdc-text-field--textarea": type === InputType.TEXTAREA || type === InputType.JSON,
+ "mdc-text-field--disabled": this.disabled,
+ "mdc-text-field--fullwidth": this.fullWidth && !outlined,
+ "dense-default": denseDefault,
+ "dense-compact": denseCompact,
+ "is-rounded": rounded,
+ "mdc-text-field--label-floating" : hasValue,
+ "mdc-text-field--no-label": !this.label,
+ "mdc-text-field--with-leading-icon": !!this.icon,
+ "mdc-text-field--with-trailing-icon": !!this.iconTrailing
+ };
- return html`
- <div id="component" class="mdc-text-field ${classMap(classes)}">
- ${this.icon ? html`<or-icon class="mdc-text-field__icon" aria-hidden="true" icon="${this.icon}"></or-icon>` : ``}
- ${this.type === InputType.TEXTAREA || this.type === InputType.JSON ? html`
- <textarea id="elem" class="mdc-text-field__input"
- ?required="${this.required}"
- ?readonly="${this.readonly}"
- ?disabled="${this.disabled}"
- @change="${(e: Event) => this.onValueChange((e.target as HTMLTextAreaElement), (e.target as HTMLTextAreaElement).value)}"
- minlength="${ifDefined(this.minLength)}"
- maxlength="${ifDefined(this.maxLength)}"
- rows="${this.rows ? this.rows : 5}"
- cols="${ifDefined(this.cols)}"
- aria-label="${ifDefined(this.label)}">${valMinMax[0] ? valMinMax[0] : ""}</textarea>
- ${this.renderOutlined(labelTemplate)}
- ` :
- html`<input type="${this.type}" id="elem" class="mdc-text-field__input"
- ?required="${this.required}"
- ?readonly="${this.readonly}"
- ?disabled="${this.disabled}"
- @change="${(e: Event) => this.onValueChange((e.target as HTMLInputElement), (e.target as HTMLInputElement).value)}"
- .value="${valMinMax[0] !== null && valMinMax[0] !== undefined ? valMinMax[0] : ""}"
- min="${ifDefined(valMinMax[1])}"
- max="${ifDefined(valMinMax[2])}"
- step="${this.step ? this.step : "any"}"
- aria-label="${ifDefined(this.label)}"
- minlength="${ifDefined(this.minLength)}"
- maxlength="${ifDefined(this.maxLength)}"
- placeholder="${ifDefined(this.placeHolder)}" />
- ${outlined ? this.renderOutlined(labelTemplate) : labelTemplate}
- ${!outlined ? html`<div class="mdc-line-ripple"></div>` : ``}
- ${this.iconTrailing ? html`<or-icon class="mdc-text-field__icon" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>` : ``}
- `}
- </div>
+ inputElem = type === InputType.TEXTAREA || type === InputType.JSON
+ ? html`
+ <textarea id="elem" class="mdc-text-field__input" ?required="${this.required}"
+ ?readonly="${this.readonly}" ?disabled="${this.disabled}" minlength="${ifDefined(this.minLength)}"
+ maxlength="${ifDefined(this.maxLength)}" rows="${this.rows ? this.rows : 5}"
+ cols="${ifDefined(this.cols)}" aria-label="${ifDefined(label)}"
+ aria-labelledby="${ifDefined(label ? "label" : undefined)}"
+ @change="${(e: Event) => this.onValueChange((e.target as HTMLTextAreaElement), (e.target as HTMLTextAreaElement).value)}">${valMinMax[0] ? valMinMax[0] : ""}</textarea>`
+ : html`
+ <input type="${type}" id="elem" aria-labelledby="${ifDefined(label ? "label" : undefined)}"
+ class="mdc-text-field__input" ?required="${this.required}" ?readonly="${this.readonly}"
+ ?disabled="${this.disabled}" min="${ifDefined(valMinMax[1])}" max="${ifDefined(valMinMax[2])}"
+ step="${this.step ? this.step : "any"}" minlength="${ifDefined(this.minLength)}"
+ maxlength="${ifDefined(this.maxLength)}" placeholder="${ifDefined(this.placeHolder)}"
+ .value="${valMinMax[0] !== null && valMinMax[0] !== undefined ? valMinMax[0] : ""}"
+ @change="${(e: Event) => this.onValueChange((e.target as HTMLInputElement), (e.target as HTMLInputElement).value)}" />`;
+
+ inputElem = html`
+ <label id="${componentId}" class="${classMap(classes)}">
+ ${this.icon ? html`<or-icon class="mdc-text-field__icon mdc-text-field__icon--leading" aria-hidden="true" icon="${this.icon}"></or-icon>` : ``}
+ ${outlined ? `` : html`<span class="mdc-text-field__ripple"></span>`}
+ ${inputElem}
+ ${outlined ? this.renderOutlined(labelTemplate) : labelTemplate}
+ ${outlined ? `` : html`<span class="mdc-line-ripple"></span>`}
+ ${this.iconTrailing ? html`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>` : ``}
+ </label>
${hasHelper ? html`
<div class="mdc-text-field-helper-line">
<div class="mdc-text-field-helper-text ${classMap(helperClasses)}">${showValidationMessage ? this.validationMessage : this.helperText}</div>
${this.charCounter && !this.readonly ? html`<div class="mdc-text-field-character-counter"></div>` : ``}
</div>
` : ``}
- `;
+ `;
+ }
+
+ if (this.type === InputType.RANGE) {
+ inputElem = html`
+ <span id="wrapper">
+ ${this.label ? html`<label for="component" class="${this.disabled ? "mdc-switch--disabled" : ""}">${this.label}</label>` : ``}
+ <div id="component" class="mdc-slider mdc-slider--discrete" tabindex="10" role="slider"
+ aria-valuemin="${ifDefined(valMinMax[1])}" aria-valuemax="${ifDefined(valMinMax[2])}"
+ aria-valuenow="${ifDefined(valMinMax[0])}" aria-label="${ifDefined(this.label)}"
+ aria-disabled="${(this.readonly || this.disabled) ? "true" : "false"}"
+ @MDCSlider:change="${() => this.onValueChange(undefined, (this._mdcComponent as MDCSlider).value)}">
+ <div class="mdc-slider__track-container">
+ <div class="mdc-slider__track"></div>
+ </div>
+ <div class="mdc-slider__thumb-container">
+ <div class="mdc-slider__pin">
+ <span class="mdc-slider__pin-value-marker"></span>
+ </div>
+ <svg class="mdc-slider__thumb" width="21" height="21">
+ <circle cx="10.5" cy="10.5" r="7.875"></circle>
+ </svg>
+ <div class="mdc-slider__focus-ring"></div>
+ </div>
+ </div>
+ ${inputElem ? html`<div style="width: 75px; margin-left: 10px;">${inputElem}</div>` : ``}
+ </span>
+ `;
+ }
+
+ return inputElem;
}
}
}
@@ -706,9 +777,9 @@ export class OrInput extends LitElement {
this._mdcComponent.destroy();
this._mdcComponent = undefined;
}
- if (this._mdcField) {
- this._mdcField.destroy();
- this._mdcField = undefined;
+ if (this._mdcComponent2) {
+ this._mdcComponent2.destroy();
+ this._mdcComponent2 = undefined;
}
if (component && this.type) {
@@ -743,7 +814,7 @@ export class OrInput extends LitElement {
if (field) {
const mdcField = new MDCFormField(field);
mdcField.input = this._mdcComponent as unknown as MDCFormFieldInput;
- this._mdcField = mdcField;
+ this._mdcComponent2 = mdcField;
}
break;
case InputType.SWITCH:
@@ -751,6 +822,12 @@ export class OrInput extends LitElement {
break;
case InputType.RANGE:
this._mdcComponent = new MDCSlider(component);
+ const numberComponent = this.shadowRoot!.getElementById("number");
+ if (numberComponent) {
+ const numberField = new MDCTextField(numberComponent);
+ numberField.useNativeValidation = false;
+ this._mdcComponent2 = numberField;
+ }
break;
default:
const textField = new MDCTextField(component);
@@ -758,6 +835,10 @@ export class OrInput extends LitElement {
this._mdcComponent = textField;
break;
}
+
+ if (this._mdcComponent && this.focused && typeof((this._mdcComponent as any).focus) === "function") {
+ (this._mdcComponent as any).focus();
+ }
}
} else {
if (this.type === InputType.SELECT && this._mdcComponent) {
@@ -771,35 +852,19 @@ export class OrInput extends LitElement {
slider.value = this.value;
}
}
-
- if (!this.type && this.value) {
- if (this.value instanceof Date) {
- this.type = InputType.DATETIME;
- } else if (typeof(this.value) === "boolean") {
- this.type = InputType.CHECKBOX;
- } else if (typeof(this.value) === "number") {
- this.type = InputType.NUMBER;
- } else if (typeof(this.value) === "string") {
- this.type = InputType.TEXT;
- } else {
- this.type = InputType.JSON;
- }
- }
-
- if (this.focused && this._mdcComponent && typeof((this._mdcComponent as any).focus) === "function") {
- (this._mdcComponent as any).focus();
- }
}
- protected renderOutlined(labelTemplate: TemplateResult | "") {
+ protected renderOutlined(labelTemplate: TemplateResult | undefined) {
return html`
- <div class="mdc-notched-outline">
- <div class="mdc-notched-outline__leading"></div>
- <div class="mdc-notched-outline__notch">
+ <span class="mdc-notched-outline">
+ <span class="mdc-notched-outline__leading"></span>
+ ${labelTemplate ? html`
+ <span class="mdc-notched-outline__notch">
${labelTemplate}
- </div>
- <div class="mdc-notched-outline__trailing"></div>
- </div>
+ </span>
+ ` : ``}
+ <span class="mdc-notched-outline__trailing"></span>
+ </span>
`;
}
@@ -851,6 +916,12 @@ export class OrInput extends LitElement {
this.value = newValue;
if (newValue !== previousValue) {
+ if (this.type === InputType.RANGE) {
+ (this._mdcComponent as MDCSlider).value = newValue;
+ if (this._mdcComponent2) {
+ (this._mdcComponent2 as MDCTextField).value = newValue;
+ }
+ }
this.dispatchEvent(new OrInputChangedEvent(this.value, previousValue));
}
}
diff --git a/ui/component/or-input/tsconfig.json b/ui/component/or-input/tsconfig.json
index acb1a2837..444f15092 100644
--- a/ui/component/or-input/tsconfig.json
+++ b/ui/component/or-input/tsconfig.json
@@ -9,7 +9,6 @@
"./src"
],
"references": [
- { "path": "../core" },
- { "path": "../or-select" }
+ { "path": "../core" }
]
-}
\ No newline at end of file
+}
diff --git a/ui/component/or-mwc-components/tsconfig.json b/ui/component/or-mwc-components/tsconfig.json
index 8e37015eb..b18fb4430 100644
--- a/ui/component/or-mwc-components/tsconfig.json
+++ b/ui/component/or-mwc-components/tsconfig.json
@@ -10,7 +10,6 @@
],
"references": [
{ "path": "../core" },
- { "path": "../or-select" },
{ "path": "../or-translate" }
]
-}
\ No newline at end of file
+}
diff --git a/ui/component/or-rules/package.json b/ui/component/or-rules/package.json
index ce508f268..e3a2b1ac0 100644
--- a/ui/component/or-rules/package.json
+++ b/ui/component/or-rules/package.json
@@ -19,7 +19,6 @@
"@openremote/or-input": "^1.1.0",
"@openremote/or-mwc-components": "^1.1.0",
"@openremote/or-panel": "^1.1.0",
- "@openremote/or-select": "^1.1.0",
"@openremote/or-translate": "^1.1.0",
"@openremote/rest": "^1.1.0",
"ace-builds": "^1.4.7",
diff --git a/ui/component/or-rules/src/index.ts b/ui/component/or-rules/src/index.ts
index 95954d2e1..276502b4a 100644
--- a/ui/component/or-rules/src/index.ts
+++ b/ui/component/or-rules/src/index.ts
@@ -10,12 +10,10 @@ import manager, {
DefaultColor6
} from "@openremote/core";
import i18next from "i18next";
-import "@openremote/or-select";
import "@openremote/or-icon";
import {
AssetDescriptor,
AssetQuery,
- Attribute,
AttributeDescriptor,
AttributeValueDescriptor,
JsonRule,
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts
index 3cf927348..e3af1f252 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts
@@ -116,7 +116,7 @@ export class OrRuleActionAttribute extends translate(i18next)(LitElement) {
if (asset) {
attributes = Util.getAssetAttributes(asset).filter((attr) => !Util.hasMetaItem(attr, MetaItemType.READ_ONLY.urn!))
.map((attr) => {
- const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset.type, attribute);
+ const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset.type, attr);
const label = Util.getAttributeLabel(attribute, descriptors[0], descriptors[1], false);
return [attr.name!, label];
});
@@ -124,7 +124,7 @@ export class OrRuleActionAttribute extends translate(i18next)(LitElement) {
attributes = !assetDescriptor || !assetDescriptor.attributeDescriptors ? []
: assetDescriptor.attributeDescriptors.filter((ad) => !AssetModelUtil.hasMetaItem(ad, MetaItemType.READ_ONLY.urn!))
.map((ad) => {
- const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset!.type, attribute);
+ const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(assetType, ad);
const label = Util.getAttributeLabel(attribute, descriptors[0], descriptors[1], false);
return [ad.attributeName!, label];
});
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
index a243aa8e2..c0d492665 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts
@@ -24,7 +24,6 @@ import {
getAssetTypeFromQuery,
RulesConfig
} from "../index";
-import {OrSelectChangedEvent} from "@openremote/or-select";
import "@openremote/or-input";
import {InputType, OrInputChangedEvent} from "@openremote/or-input";
import "@openremote/or-attribute-input";
@@ -152,7 +151,7 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
attributes = Util.getAssetAttributes(asset)
.filter((attr) => Util.hasMetaItem(attr, MetaItemType.RULE_STATE.urn!))
.map((attr) => {
- const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset.type, attribute);
+ const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset.type, attr);
const label = Util.getAttributeLabel(attribute, descriptors[0], descriptors[1], false);
return [attr.name!, label];
});
@@ -160,7 +159,7 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
attributes = !assetDescriptor || !assetDescriptor.attributeDescriptors ? []
: assetDescriptor.attributeDescriptors
.map((ad) => {
- const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset!.type, attribute);
+ const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(undefined, ad);
const label = Util.getAttributeLabel(attribute, descriptors[0], descriptors[1], false);
return [ad.attributeName!, label];
});
@@ -169,9 +168,9 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
const operators = this.getOperators(assetDescriptor, attribute, attributeName);
return html`
- <or-input type="${InputType.SELECT}" @or-input-changed="${(e: OrSelectChangedEvent) => this.setAttributeName(attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${attributes}" .value="${attributeName}" .label="${i18next.t("attribute")}"></or-input>
+ <or-input type="${InputType.SELECT}" @or-input-changed="${(e: OrInputChangedEvent) => this.setAttributeName(attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${attributes}" .value="${attributeName}" .label="${i18next.t("attribute")}"></or-input>
- ${attributeName ? html`<or-input type="${InputType.SELECT}" @or-input-changed="${(e: OrSelectChangedEvent) => this.setOperator(assetDescriptor, attribute, attributeName, attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${operators}" .value="${operator}" .label="${i18next.t("operator")}"></or-input>` : ``}
+ ${attributeName ? html`<or-input type="${InputType.SELECT}" @or-input-changed="${(e: OrInputChangedEvent) => this.setOperator(assetDescriptor, attribute, attributeName, attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${operators}" .value="${operator}" .label="${i18next.t("operator")}"></or-input>` : ``}
${attributePredicate ? this.attributePredicateValueEditorTemplate(assetDescriptor, attributePredicate) : ``}
`;
diff --git a/ui/component/or-select/.npmignore b/ui/component/or-select/.npmignore
deleted file mode 100644
index 17e64b1ad..000000000
--- a/ui/component/or-select/.npmignore
+++ /dev/null
@@ -1,8 +0,0 @@
-build/
-build.gradle
-test/
-src/
-webpack.config.js
-tsconfig.json
-dist/*.map
-.tsbuildinfo
\ No newline at end of file
diff --git a/ui/component/or-select/README.md b/ui/component/or-select/README.md
deleted file mode 100644
index 95e5f6cac..000000000
--- a/ui/component/or-select/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# @openremote/or-select \<or-select\>
-[![NPM Version][npm-image]][npm-url]
-[![Linux Build][travis-image]][travis-url]
-[![Test Coverage][coveralls-image]][coveralls-url]
-
-Web Component for displaying a drop down.
-
-## Install
-```bash
-npm i @openremote/or-select
-yarn add @openremote/or-select
-```
-
-## Usage
-For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-
-
-## Supported Browsers
-The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
-Internet Explorer 11 is also supported.
-
-
-## License
-[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
-
-[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/@openremote/or-input
-[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
-[travis-url]: https://travis-ci.org/live-js/live-xxx
-[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
-[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-select/build.gradle b/ui/component/or-select/build.gradle
deleted file mode 100644
index 98cdcb8e2..000000000
--- a/ui/component/or-select/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-buildDir = "dist"
-
-task clean() {
- doLast {
- delete "dist"
- }
-}
-
-task prepareUi() {
- dependsOn clean, npmPrepare
-}
-
-task publishUi() {
- dependsOn clean, npmPublish
-}
\ No newline at end of file
diff --git a/ui/component/or-select/package.json b/ui/component/or-select/package.json
deleted file mode 100644
index 32d077149..000000000
--- a/ui/component/or-select/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "@openremote/or-select",
- "version": "1.1.0",
- "description": "OpenRemote select",
- "main": "dist/umd/index.bundle.js",
- "module": "dist/index.js",
- "types": "dist/index.d.ts",
- "scripts": {
- "build": "npx tsc -b",
- "test": "echo \"No tests\" && exit 0",
- "prepublishOnly": "npx tsc -b && npx webpack"
- },
- "author": "OpenRemote",
- "license": "AGPL-3.0-or-later",
- "dependencies": {
- "@openremote/core": "^1.1.0",
- "lit-element": "^2.2.1"
- },
- "devDependencies": {
- "tslint": ">=5.11.0",
- "typescript": ">=3.4.5",
- "webpack": "^4.41.2",
- "webpack-cli": "^3.3.9"
- }
-}
diff --git a/ui/component/or-select/src/index.ts b/ui/component/or-select/src/index.ts
deleted file mode 100644
index ccd352901..000000000
--- a/ui/component/or-select/src/index.ts
+++ /dev/null
@@ -1,162 +0,0 @@
-import {html, LitElement, property, customElement, PropertyValues, query} from "lit-element";
-import {optionColorVar, selectStyle} from "./style";
-
-export class OrSelectChangedEvent extends CustomEvent<OrSelectChangedEventDetail> {
-
- public static readonly NAME = "or-select-changed";
-
- constructor(value?: string, previousValue?: string) {
- super(OrSelectChangedEvent.NAME, {
- detail: {
- value: value,
- previousValue: previousValue
- },
- bubbles: true,
- composed: true
- });
- }
-}
-
-export interface OrSelectChangedEventDetail {
- value?: string;
- previousValue?: string;
-}
-
-declare global {
- export interface HTMLElementEventMap {
- [OrSelectChangedEvent.NAME]: OrSelectChangedEvent;
- }
-}
-
-@customElement("or-select")
-export class OrSelect extends LitElement {
-
- static get styles() {
- return [
- selectStyle
- ];
- }
-
- @property({type: String})
- public value?: string;
-
- @property({type: Boolean})
- public readonly?: boolean;
-
- @property({type: Boolean})
- public required?: boolean;
-
- @property({type: Boolean})
- public noAutoSize?: boolean;
-
- @property({type: Boolean, attribute: true})
- public noEmpty?: boolean;
-
- @property({type: Array})
- public options!: string[] | [string, string][];
-
- @query("#or-select")
- protected _select!: HTMLSelectElement;
-
- @query("#width_tmp_select")
- protected _tmpSelect!: HTMLSelectElement;
-
- protected _optColor?: string;
-
- connectedCallback(): void {
- super.connectedCallback();
-
- // Take color from host as select will override color inheritance otherwise
- const style = window.getComputedStyle(this);
-
- if(style.getPropertyValue("--internal-or-select-option-text-color").indexOf("inherit") >= 0) {
- this._optColor = style.getPropertyValue("color");
- }
- }
-
- protected onChange() {
- if (this._select.value == this.value) {
- return;
- }
-
- if (!this.noAutoSize) {
- this._resize();
- }
- const previousValue = this.value;
- this.value = this._select.value && this._select.value.length > 0 ? this._select.value : undefined;
- this.dispatchEvent(new OrSelectChangedEvent(this.value, previousValue));
- }
-
- protected updated(_changedProperties: PropertyValues): void {
- super.updated(_changedProperties);
-
- if (_changedProperties.has("options") || _changedProperties.has("value")) {
- let val = this.value;
-
- let index: number;
- if (this.options.length === 1 || (this.noEmpty && !val)) {
- const opt = this.options[0];
- const firstValue = Array.isArray(opt) ? opt[0] : opt;
- if (this.value !== firstValue) {
- val = firstValue;
- }
- index = 0;
- } else {
- index = this.options.findIndex((opt: string | [string, string]) => {
- const value = Array.isArray(opt) ? opt[0] : opt;
- return value === val;
- });
-
- if (!this.noEmpty) {
- index = index + 1;
- }
- }
-
- const indexChanged = this._select.selectedIndex !== index;
- this._select.selectedIndex = index;
-
- if (val !== this.value) {
- this.onChange();
- } else {
- if (!this.noAutoSize) {
- this._resize();
- }
- }
- }
- }
-
- protected render() {
- const isSingular = this.options.length === 1;
-
- return html`
- <div class="mdc-select">
- <select id="or-select" ?required="${this.required}" @change="${this.onChange}" ?disabled="${this.readonly || isSingular}">
- ${!this.noEmpty && !isSingular ? html`<option value=""></option>` : ``}
- ${this.options.length > 0 && Array.isArray(this.options[0]) ?
- (this.options as [string, string][]).map((option: [string, string]) => {
- return html`<option style="color: ${this._optColor || optionColorVar};" value="${option[0]}">${option[1]}</option>`;
- }) :
- (this.options as string[]).map((option: string) => {
- return html`<option style="color: ${this._optColor || optionColorVar};" value="${option}">${option}</option>`;
- })
- }
- </select>
- <svg viewBox="0 0 24 24">
- <path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
- </svg>
- <select id="width_tmp_select">
- <option id="width_tmp_option"></option>
- </select>
- </div>
- `;
- }
-
- protected _resize() {
- let width = 20;
- if (this._select.selectedOptions.length > 0) {
- (this._tmpSelect.options.item(0)! as HTMLOptionElement).innerHTML = this._select.selectedOptions.item(0)!.text;
- width = this._tmpSelect.offsetWidth;
- }
- this._select.style.setProperty("width", width + "px");
- }
-}
diff --git a/ui/component/or-select/src/style.ts b/ui/component/or-select/src/style.ts
deleted file mode 100644
index a69bf0b8d..000000000
--- a/ui/component/or-select/src/style.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import {css, unsafeCSS} from "lit-element";
-import {DefaultColor1, DefaultColor2, DefaultColor5} from "@openremote/core";
-
-// TODO this is temp work, should be replaced with material design components / styling
-
-export const optionColorVar = "--internal-or-select-option-text-color";
-
-// language=CSS
-export const selectStyle = css`
-
- :host {
- display: inline-block;
-
- --internal-or-select-background-color: var(--or-select-background-color, var(--or-app-color1, ${unsafeCSS(DefaultColor2)}));
- --internal-or-select-border-color: var(--or-select-border-color, var(--or-app-color1, ${unsafeCSS(DefaultColor5)}));
- --internal-or-select-text-color: var(--or-select-text-color, inherit);
- --internal-or-select-padding: var(--or-select-padding, 10px 40px 10px 10px);
- --internal-or-select-option-text-color: var(--or-select-option-text-color, inherit);
- --internal-or-select-option-background-color: var(--or-select-option-background-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)}));
- }
-
- select:invalid {
- border-bottom: 2px solid red;
- }
-
- .mdc-select {
- font-family: 'Roboto','Helvetica','Arial',sans-serif;
- position: relative;
- display: inline-block;
- fill: var(--internal-or-select-text-color);
- }
-
- select {
- cursor: pointer;
- position: relative;
- font-family: inherit;
- padding: var(--internal-or-select-padding);
- border-radius: 0;
- border: none;
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- font-size: 14px;
- outline: none;
- color: var(--internal-or-select-text-color);
- border-bottom: 1px solid var(--internal-or-select-border-color);
- background-color: var(--internal-or-select-background-color);
- }
-
- #width_tmp_select {
- position: absolute;
- visibility: hidden;
- pointer-events: none;
- }
-
- select > option {
- background-color: var(--internal-or-select-option-background-color);
- }
-
- svg {
- width: 20px;
- height: 100%;
- position: absolute;
- right: 0;
- top: 0;
- pointer-events: none;
- }
-
-`;
\ No newline at end of file
diff --git a/ui/component/or-select/tsconfig.json b/ui/component/or-select/tsconfig.json
deleted file mode 100644
index 1e51a2601..000000000
--- a/ui/component/or-select/tsconfig.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "./dist",
- "tsBuildInfoFile": "./dist/.tsbuildinfo",
- "rootDir": "src"
- },
- "include": [
- "./src"
- ],
- "references": [
- { "path": "../core" },
- { "path": "../rest" },
- { "path": "../or-icon" }
- ]
-}
\ No newline at end of file
diff --git a/ui/component/or-select/webpack.config.js b/ui/component/or-select/webpack.config.js
deleted file mode 100644
index 9fe13702d..000000000
--- a/ui/component/or-select/webpack.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const util = require("../webpack.util");
-
-bundles = {
- "index.bundle": undefined
-};
-
-module.exports = util.generateExports(__dirname);
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 80e551382..2d4b14a60 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1695,35 +1695,20 @@
dependencies:
tslib "^1.9.3"
-"@material/button@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/button/-/button-4.0.0.tgz#714cba51a6d3d33c51fe106f8d0d114596d95b1d"
- integrity sha512-CoQjShblZ7evChPJoM+Cao90Fwi25NCIhdTequzZifD73BvQegyN7MlNdbHaGqpecYzOrm0xq+nocg+yQN90qg==
- dependencies:
- "@material/density" "^4.0.0"
- "@material/elevation" "^4.0.0"
- "@material/feature-targeting" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/shape" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/touch-target" "^4.0.0"
- "@material/typography" "^4.0.0"
-
-"@material/checkbox@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-4.0.0.tgz#1fd5826f008685ea8d9899fea0606ecf65be9a26"
- integrity sha512-2ONHncYAmyIQewvedKDJGeiMvLjmX7wBH5Lx0OBYSwa9nuwjXGWEQR8tNOHIZzevV+nPyGexl6HyvgZ2QNUVZg==
+"@material/button@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/button/-/button-7.0.0.tgz#9d80a580997d5e053d2947cb879031d042929473"
+ integrity sha512-Y6dGxtXBEXa2Bnkj66nyXQo4yc2OTXH00NCGinf+rP24pASxIV27pHwW64zjoTAdJYhZbyrx+wyk8fN9tk2yag==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/base" "^4.0.0"
- "@material/density" "^4.0.0"
- "@material/dom" "^4.0.0"
- "@material/feature-targeting" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/touch-target" "^4.0.0"
- tslib "^1.9.3"
+ "@material/density" "^7.0.0"
+ "@material/elevation" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/touch-target" "^7.0.0"
+ "@material/typography" "^7.0.0"
"@material/checkbox@^5.1.0":
version "5.1.0"
@@ -1740,6 +1725,21 @@
"@material/touch-target" "^5.1.0"
tslib "^1.9.3"
+"@material/checkbox@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-7.0.0.tgz#8941fe7f31570b7a055b72fda73c3ba4bc829f19"
+ integrity sha512-GMQzABt8vLZNzq44qHSPKmUurZ2R1sKPX8gtwbwcGBoE7MJXIYkMj3+IYv38Mki9B3BlJPDVqBn5jU20mPCmBQ==
+ dependencies:
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/density" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/touch-target" "^7.0.0"
+ tslib "^1.9.3"
+
"@material/data-table@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@material/data-table/-/data-table-5.1.0.tgz#4c15a0a18f7ee6d8dba77e435d4fbe064fe1f009"
@@ -1768,6 +1768,11 @@
resolved "https://registry.yarnpkg.com/@material/density/-/density-5.1.0.tgz#d36512d413a00595122f98303766dae6b9e9fabe"
integrity sha512-jmp6AgiNYosl+HicxWCa8vib9pg9tNxRcf+6f9LDkDYJ9jtO90PXuypyd0hO64JZ9Df7BywFj5hTWPERG1FBbw==
+"@material/density@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/density/-/density-7.0.0.tgz#ad59ebb62566c1085b51e94375b20b5149d5e9e6"
+ integrity sha512-UsSngxrpI7fX8xS3QHjg7zHBxO07ftHdgBWEYklH/7xnv/qeR1OeqhLwZJkBrKJq1BDnJpeBJ2CHeiw8C5Ir+A==
+
"@material/dialog@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-4.0.0.tgz#09861315b80c217acf2a8a9f9ea6201e2cf2d2a7"
@@ -1846,19 +1851,31 @@
"@material/feature-targeting" "^5.1.0"
"@material/theme" "^5.1.0"
-"@material/fab@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/fab/-/fab-4.0.0.tgz#634035a4ef087856fbc639de60efc32772d8dcb1"
- integrity sha512-YG5fubnZUEFLumBuc3Fw6Hcnek244OKJleSQhWVtFS6I2EgHqmr0gD8ZCKvXARmieyh4LRn7jKDK/WFJh74ayA==
+"@material/elevation@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-7.0.0.tgz#2fb3983dbb791d52efe2d377531453231cdcb03c"
+ integrity sha512-vUN/nPxWKa8+c23GMuvtsCQTY4x76U2jLO4BsI77Rr2oKuHHXcAYxyAoY/jggnpRfLZsNTmmZ4EVKbKqYgrocg==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/elevation" "^4.0.0"
- "@material/feature-targeting" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/shape" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/typography" "^4.0.0"
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/theme" "^7.0.0"
+
+"@material/fab@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/fab/-/fab-7.0.0.tgz#b6687e35b8f6b65e9547dfec09b6572848ee466f"
+ integrity sha512-KNnAEQ/YYc0aQrDI81Y51zVa35YHeQccHpG6NArGAr2LOAIwl1Y62EPzEw4pCaddgsBdqZwAqk2DXfjeUwZ0VA==
+ dependencies:
+ "@material/animation" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/elevation" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/touch-target" "^7.0.0"
+ "@material/typography" "^7.0.0"
"@material/feature-targeting@^4.0.0":
version "4.0.0"
@@ -1875,50 +1892,55 @@
resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-7.0.0.tgz#9ee8afcc4b2f3f3a0cf39db5be0f3339b9830cee"
integrity sha512-png4Ep/eW53qU0lt7ELq9B/LR+ro3jQiMkRWpKaNBBijTgRDA6LAo9mlpbMcXvovcgu8TjLce+kpL9M0HWgbWg==
-"@material/floating-label@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/floating-label/-/floating-label-4.0.0.tgz#288eac6b82ff472472f678032fc94024155a42c8"
- integrity sha512-ovuZKhH7U+YmZk8kXftYCdEaU9InJdkBsPe4TP+dg4HiO1lWmd7ZxVsMo6iTl4yaFofkBPj3VDkbE1fLnHxKPA==
+"@material/floating-label@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/floating-label/-/floating-label-7.0.0.tgz#fc73bed011cc0e63f32cf1db87afe45885b5246b"
+ integrity sha512-tAiP6lWcSlJ2Zrwymt/v3hn/anPdH5gXJp/1NYXXhauHyjHW5jFizJeNLQWSdTwqUkagp6FH74XbiKTaC9WY5g==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/base" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/typography" "^4.0.0"
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/typography" "^7.0.0"
tslib "^1.9.3"
-"@material/form-field@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-4.0.0.tgz#196dc80fa35876ee2d6e4321e8186429ae9401bb"
- integrity sha512-M5+c7mitD4NIH+3kU2+uX1mUJJJPNYSUN3bAmhjbMxMISY9jkrbv9k5T9jlWRaIqvO6qJ1aDFOQASV8CsWstYQ==
+"@material/form-field@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-7.0.0.tgz#e32c8fbf5a947aaa96d9c5f8ada75fbabb1504b7"
+ integrity sha512-bx3klwE48FosNeqE6Q1jGkCnRLv0nBaopR+vkfijVpeIcy0JtLgDDgA7rzm35nEpXqTdyHTVzNaUo8GHRMYlcg==
dependencies:
- "@material/base" "^4.0.0"
- "@material/feature-targeting" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/typography" "^4.0.0"
+ "@material/base" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/typography" "^7.0.0"
tslib "^1.9.3"
-"@material/icon-button@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-4.0.0.tgz#f7293462f1b4967712f9b8755b87c2228dcccc3d"
- integrity sha512-b1SyWtr2cwlKgIVo+irxRgW0lpIzauADLAxQEJ8/RTO9qVFviohJUnS+5QQCkC5zex5Q52OmQ+aNl0KRjkUdvQ==
+"@material/icon-button@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-7.0.0.tgz#6ad9d51e51f73b033a9b6ee3a87579a0a448eb36"
+ integrity sha512-ppU7yie70KM3czpBXMwYN+Ape6mF8FYQtv1iAYW/fLYQQV/iszB9o+s4CovONltLkavMj9/FQWGyyssSmKGAzg==
dependencies:
- "@material/base" "^4.0.0"
- "@material/feature-targeting" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/theme" "^4.0.0"
+ "@material/base" "^7.0.0"
+ "@material/density" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/theme" "^7.0.0"
tslib "^1.9.3"
-"@material/line-ripple@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/line-ripple/-/line-ripple-4.0.0.tgz#e47eb1fe3ce7e28b36e5271c879dc59fee3bd19b"
- integrity sha512-+vrgKlb2gUBIKxlzVKLn/tX76qJ0Z19RkH2i7mh4IdH8KxeEai8NQQYWqeOOKtyp8JbH0ObGyqJCwPo2VbHDmw==
+"@material/line-ripple@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/line-ripple/-/line-ripple-7.0.0.tgz#3a41c4237d28e10be3433213c7428e396af5a2fc"
+ integrity sha512-oU/TcKa/dVnljFtFPKHmcfBOsSD5o3bjYbEAD/FXR9mCOIAcCmPO6TegQWJDJ3o9y+eBc3S8aDXN+p0ub+DJIw==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/base" "^4.0.0"
- "@material/theme" "^4.0.0"
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/theme" "^7.0.0"
tslib "^1.9.3"
"@material/list@^4.0.0":
@@ -1937,6 +1959,22 @@
"@material/typography" "^4.0.0"
tslib "^1.9.3"
+"@material/list@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/list/-/list-7.0.0.tgz#e9edb306ebb216445cdf2659af86eb8e8b7df464"
+ integrity sha512-bdcL0uuRtVJikHyINa8NhAjHkmZN6Oq/CGtoAdTWkGl3aBCZUNn6p/80ptThdYkROJUjGQiyMkfJnzbdlwU7+A==
+ dependencies:
+ "@material/base" "^7.0.0"
+ "@material/density" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/typography" "^7.0.0"
+ tslib "^1.9.3"
+
"@material/menu-surface@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-4.0.0.tgz#6de670bfbc5d0075f26baf58e46d00a91854131f"
@@ -1951,6 +1989,20 @@
"@material/theme" "^4.0.0"
tslib "^1.9.3"
+"@material/menu-surface@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-7.0.0.tgz#4cd1c899c56044587e295dcd3e934ee020dc9917"
+ integrity sha512-iJh0RuwbqCk3azeqaf8YIChnHx/4F0sE5btAs+y/105MOWJaMveLy/K0JPz3DUD+fAeOoKJiQaEBIzybedDwyg==
+ dependencies:
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/elevation" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ tslib "^1.9.3"
+
"@material/menu@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/menu/-/menu-4.0.0.tgz#febe9194892daea9dd2504a2a38bafc5c76864c1"
@@ -1965,16 +2017,33 @@
"@material/rtl" "^4.0.0"
tslib "^1.9.3"
-"@material/notched-outline@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/notched-outline/-/notched-outline-4.0.0.tgz#63c8d1f856de032b3c9a9f2654419de86f4b2b4a"
- integrity sha512-9WNG7dZS83nu72kmoknA3XyvZQIxx8QBjEB2Q2KGyRp4Q8zrzWxfcvTYgiOsYgvz013JnTqaqe4g0wjl6v789g==
+"@material/menu@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/menu/-/menu-7.0.0.tgz#109b2138b1cf14cf6647683ce00a3d288ac9b0c3"
+ integrity sha512-5dKdeRtxg8DXtPXw7fUE+raUOlZsVdPVMqRoa0OXcLBatbkyqVT606WGqTGy6+QhcisiuWbtYO4ibGrfpCXZyw==
dependencies:
- "@material/base" "^4.0.0"
- "@material/floating-label" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/shape" "^4.0.0"
- "@material/theme" "^4.0.0"
+ "@material/base" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/elevation" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/list" "^7.0.0"
+ "@material/menu-surface" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ tslib "^1.9.3"
+
+"@material/notched-outline@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/notched-outline/-/notched-outline-7.0.0.tgz#3d8b45ed22fb245c8809c647b220d313d8b9e888"
+ integrity sha512-MsOolYO71vy1auR1KOp7ipQY3WNa68FPC8s7thVbJXq6rZ6ZtnX18KJ9UQ+CI/7trJTej/IpGM5DKIQ4htoSVw==
+ dependencies:
+ "@material/base" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/floating-label" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
tslib "^1.9.3"
"@material/ripple@^4.0.0":
@@ -2001,6 +2070,18 @@
"@material/theme" "^5.1.0"
tslib "^1.9.3"
+"@material/ripple@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-7.0.0.tgz#957af9c25bfeb96e6d3a3fb920be8dd234801103"
+ integrity sha512-zUnE67WIuYE0Ipcn+U2NWYM1rELOIjqfRNNsfzTZ2QqQxyfS8cbnlb27Xmz7H8qt7aOV/2vo/8X3W96ynG1vNg==
+ dependencies:
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ tslib "^1.9.3"
+
"@material/rtl@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-4.0.0.tgz#bc07e0a7c47174b2542862c252b0e35b44329c47"
@@ -2018,23 +2099,27 @@
dependencies:
"@material/theme" "^7.0.0"
-"@material/select@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/select/-/select-4.0.0.tgz#18d3428a72277858ca92fae543420b4b7f1ec247"
- integrity sha512-VRGC+m3T0TR+qxT5rvf32QgpMlYRmTW7MHwUIfVBlHWRyoOEEwQ4yiExiChoudwaUMAamSCPRQNK08OdD1Jccw==
+"@material/select@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/select/-/select-7.0.0.tgz#52cb40899b15a167690ad23a24d8fb52daa8f757"
+ integrity sha512-QxBgT/m7dUZY2hiPxfPtEcYiR2BM+NEqKBkOoAjrb4XfvQQqoesl7woXdwNMP1a8RoZzJqcBM7shsdDamG9gYA==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/base" "^4.0.0"
- "@material/floating-label" "^4.0.0"
- "@material/line-ripple" "^4.0.0"
- "@material/menu" "^4.0.0"
- "@material/menu-surface" "^4.0.0"
- "@material/notched-outline" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/shape" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/typography" "^4.0.0"
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/density" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/floating-label" "^7.0.0"
+ "@material/line-ripple" "^7.0.0"
+ "@material/list" "^7.0.0"
+ "@material/menu" "^7.0.0"
+ "@material/menu-surface" "^7.0.0"
+ "@material/notched-outline" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/typography" "^7.0.0"
tslib "^1.9.3"
"@material/shape@^4.0.0":
@@ -2052,6 +2137,15 @@
"@material/feature-targeting" "^5.1.0"
"@material/rtl" "^5.1.0"
+"@material/shape@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/shape/-/shape-7.0.0.tgz#64fe72a560f58b3da02d3077963f21b0f806b759"
+ integrity sha512-17s+B9ohHRFlFZPVDsIiZNwcxlg0Z9lPpETxhSn0CbfJ17UPSI7jQouebrF/APFSpPTyIuoW7mmB95On78Jf7A==
+ dependencies:
+ "@material/feature-targeting" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/theme" "^7.0.0"
+
"@material/slider@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@material/slider/-/slider-7.0.0.tgz#02bb99929728ff39ae4d1abf991754499bfc9513"
@@ -2066,38 +2160,40 @@
"@material/typography" "^7.0.0"
tslib "^1.9.3"
-"@material/switch@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/switch/-/switch-4.0.0.tgz#5c5da30389f48f4f5245eb9f325cbc0e5f6bf2d4"
- integrity sha512-90fvz0bYgeGQNBD14rdTOI/dvAPANwDQLIodOpE/r2bOZjge1K0rHSAm+TVwNCnrrM9HGmG8Ew0sIeEIj3jMMw==
+"@material/switch@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/switch/-/switch-7.0.0.tgz#429494b66e67329c1a18015e302e8d0def1d3d00"
+ integrity sha512-wiGPSkOD/g4ortKDb2BsE6+3aQy4t/M1Bchln3LYWAJsE0YxVukTYnFCD07iWEWPWvxR+DS47MO72Xf7NFe5fw==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/base" "^4.0.0"
- "@material/dom" "^4.0.0"
- "@material/elevation" "^4.0.0"
- "@material/feature-targeting" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/theme" "^4.0.0"
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/density" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/elevation" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/theme" "^7.0.0"
tslib "^1.9.3"
-"@material/textfield@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@material/textfield/-/textfield-4.0.0.tgz#3b39a1ed1aee166b0eb757237ef1359eba312f36"
- integrity sha512-1Xg+nriTqFB8+5k8sGkR8LBeD3dRgNuhvwyU8XrUeAs5l/HMfn4CWgbEyZTaJ2EEtFPxnKGedAYqCEwXngwGWg==
+"@material/textfield@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/textfield/-/textfield-7.0.0.tgz#5a8683723a034edcec0f453f1d7f348583caef97"
+ integrity sha512-MyTOyxGJTqhg/Xwn/gYeCRgKGEWJAyypuS2YHW+YpBZtmLdSstWPUEsCH/pkPB9JQ9gKh0fOAJx9/Jug6U5+8g==
dependencies:
- "@material/animation" "^4.0.0"
- "@material/base" "^4.0.0"
- "@material/density" "^4.0.0"
- "@material/dom" "^4.0.0"
- "@material/floating-label" "^4.0.0"
- "@material/line-ripple" "^4.0.0"
- "@material/notched-outline" "^4.0.0"
- "@material/ripple" "^4.0.0"
- "@material/rtl" "^4.0.0"
- "@material/shape" "^4.0.0"
- "@material/theme" "^4.0.0"
- "@material/typography" "^4.0.0"
+ "@material/animation" "^7.0.0"
+ "@material/base" "^7.0.0"
+ "@material/density" "^7.0.0"
+ "@material/dom" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+ "@material/floating-label" "^7.0.0"
+ "@material/line-ripple" "^7.0.0"
+ "@material/notched-outline" "^7.0.0"
+ "@material/ripple" "^7.0.0"
+ "@material/rtl" "^7.0.0"
+ "@material/shape" "^7.0.0"
+ "@material/theme" "^7.0.0"
+ "@material/typography" "^7.0.0"
tslib "^1.9.3"
"@material/theme@^4.0.0":
@@ -2136,6 +2232,14 @@
"@material/base" "^5.1.0"
"@material/feature-targeting" "^5.1.0"
+"@material/touch-target@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-7.0.0.tgz#9fe2a88d657b50c90db75c45aa00e776b3f00d0c"
+ integrity sha512-9XBtFLMvoUk4ZvNSyVgHjF416DhenLGQ6TWJnqiqQjqIv3i+YK60tYBUl8mqR0j0Bs9VCZCa/FyZ/fx1NPO15g==
+ dependencies:
+ "@material/base" "^7.0.0"
+ "@material/feature-targeting" "^7.0.0"
+
"@material/typography@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/typography/-/typography-4.0.0.tgz#57be7ac8b819f2ae29d48c9443b113d2f5585ecc"