Skip to content

armgit / core

Public Imported from GitHub
0

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

Added groups panel to or-asset-viewer (Implements #165)

vlichtenberg85d1d4fc62de
diff --git a/deployment/manager/shared/locales/de/or.json b/deployment/manager/shared/locales/de/or.json
index 03390c2f0..d572b28fc 100644
--- a/deployment/manager/shared/locales/de/or.json
+++ b/deployment/manager/shared/locales/de/or.json
@@ -104,11 +104,13 @@
"matched": "Passend",
"unmatched": "Nicht passend",
"wait": "Warte",
+ "group": "Gruppe",
+ "groupAssetName": "Asset Name",
"history": "Historie",
"attributes": "Attribute",
"info": "Info",
- "logs":"Protokolle",
- "choose_lang":"Sprache wählen",
+ "logs": "Protokolle",
+ "chooseLanguage": "Sprache wählen",
"attributeValueType": {
"PERCENTAGE": "%.2f",
"NUMBER": "%.0f",
diff --git a/deployment/manager/shared/locales/en/or.json b/deployment/manager/shared/locales/en/or.json
index 2be7ff56e..b3291a1d8 100644
--- a/deployment/manager/shared/locales/en/or.json
+++ b/deployment/manager/shared/locales/en/or.json
@@ -139,6 +139,8 @@
"matched": "Matched",
"unmatched": "Unmatched",
"wait": "Wait",
+ "group": "Underlying assets",
+ "groupAssetName": "Asset name",
"history": "History",
"attributes": "Attributes",
"info": "Info",
@@ -169,7 +171,8 @@
"reset": "Reset",
"noLongerMatches": "No longer matches",
"logs":"Logs",
- "choose_lang":"Choose language",
+ "chooseLang": "Choose language",
+ "addRemoveAttributes": "Add/remove attributes",
"attributeValueType": {
"PERCENTAGE": "%.2f",
"NUMBER": "%.0f",
diff --git a/deployment/manager/shared/locales/es/or.json b/deployment/manager/shared/locales/es/or.json
index 0afc02973..4ea8f23df 100644
--- a/deployment/manager/shared/locales/es/or.json
+++ b/deployment/manager/shared/locales/es/or.json
@@ -108,7 +108,7 @@
"attributes": "Atributos",
"info": "Informacion",
"logs":"Registros",
- "choose_lang":"Elige lengua",
+ "chooseLanguage": "Elige lengua",
"attributeValueType": {
"PERCENTAGE": "%.2f",
"NUMBER": "%.0f",
diff --git a/deployment/manager/shared/locales/fr/or.json b/deployment/manager/shared/locales/fr/or.json
index 2f4e5783a..e9cd51527 100644
--- a/deployment/manager/shared/locales/fr/or.json
+++ b/deployment/manager/shared/locales/fr/or.json
@@ -107,8 +107,9 @@
"history": "Historique",
"attributes": "Attributs",
"info": "Info",
- "logs":"Journaux",
- "choose_lang":"Choisissez la langue",
+ "logs": "Journaux",
+ "chooseLanguage": "Choisissez la langue",
+ "addRemoveAttributes": "Add/remove attributes",
"attributeValueType": {
"PERCENTAGE": "%.2f",
"NUMBER": "%.0f",
diff --git a/deployment/manager/shared/locales/nl/or.json b/deployment/manager/shared/locales/nl/or.json
index ee887b1ae..b36249d65 100644
--- a/deployment/manager/shared/locales/nl/or.json
+++ b/deployment/manager/shared/locales/nl/or.json
@@ -139,6 +139,8 @@
"matched": "Dezelfde",
"unmatched": "Niet dezelfde",
"wait": "Wacht",
+ "group": "Onderliggende assets",
+ "groupAssetName": "Asset naam",
"history": "Geschiedenis",
"attributes": "Attributen",
"info": "Info",
@@ -167,9 +169,9 @@
"oncePerDay": "Max. 1x per dag",
"oncePerWeek": "Max. 1x per week",
"reset": "Reset",
- "noLongerMatches": "Niet meer geldig",
- "logs":"Logs",
- "choose_lang":"Kies een taal",
+ "logs": "Logs",
+ "chooseLanguage": "Kies een taal",
+ "addRemoveAttributes": "Attributen toevoegen/verwijderen",
"attributeValueType": {
"PERCENTAGE": "%.2f",
"NUMBER": "%.0f",
diff --git a/ui/app/main/tsconfig.json b/ui/app/main/tsconfig.json
index 1e74afb8b..91deea7af 100644
--- a/ui/app/main/tsconfig.json
+++ b/ui/app/main/tsconfig.json
@@ -18,6 +18,7 @@
{ "path": "../../component/or-attribute-input" },
{ "path": "../../component/or-chart" },
{ "path": "../../component/or-asset-viewer" },
- { "path": "../../component/or-rules" }
+ { "path": "../../component/or-rules" },
+ { "path": "../../component/or-table" }
]
}
\ No newline at end of file
diff --git a/ui/component/or-asset-viewer/package.json b/ui/component/or-asset-viewer/package.json
index ef357c742..04e47796f 100644
--- a/ui/component/or-asset-viewer/package.json
+++ b/ui/component/or-asset-viewer/package.json
@@ -20,9 +20,11 @@
"@openremote/or-attribute-history": "^1.1.0",
"@openremote/or-translate": "^1.1.0",
"@openremote/or-panel": "^1.1.0",
+ "@openremote/or-table": "^1.1.0",
"@openremote/or-map": "^1.1.0",
"@openremote/or-chart": "^1.1.0",
"@openremote/rest": "^1.1.0",
+ "@openremote/or-mwc-components": "^1.1.0",
"lit-element": "^2.2.1"
},
"devDependencies": {
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index 500303b9b..4232f76b6 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -4,12 +4,14 @@ import "@openremote/or-input";
import "@openremote/or-attribute-input";
import "@openremote/or-attribute-history";
import "@openremote/or-chart";
-import "@openremote/or-translate";
-import {translate} from "@openremote/or-translate";
-import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-input";
+import "@openremote/or-table";
import "@openremote/or-map";
-import manager, {AssetModelUtil, subscribe, Util} from "@openremote/core";
import "@openremote/or-panel";
+import "@openremote/or-mwc-components/dist/or-mwc-dialog";
+import {OrTranslate, translate} from "@openremote/or-translate";
+import {InputType, OrInputChangedEvent} from "@openremote/or-input";
+import manager, {AssetModelUtil, subscribe, Util} from "@openremote/core";
+import {OrTable} from "@openremote/or-table";
import {OrChartConfig, OrChartEvent} from "@openremote/or-chart";
import {HistoryConfig, OrAttributeHistory, OrAttributeHistoryEvent} from "@openremote/or-attribute-history";
import {Type as MapType, Util as MapUtil} from "@openremote/or-map";
@@ -21,15 +23,16 @@ import {
Attribute,
AttributeEvent,
AttributeType,
- MetaItemType,
- MetaItem
+ MetaItem,
+ MetaItemType
} from "@openremote/model";
import {style} from "./style";
import i18next from "i18next";
import {styleMap} from "lit-html/directives/style-map";
import {classMap} from "lit-html/directives/class-map";
+import {DialogAction, OrMwcDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";
-export type PanelType = "property" | "location" | "attribute" | "history" | "chart";
+export type PanelType = "property" | "location" | "attribute" | "history" | "chart" | "group";
export interface PanelConfig {
type?: PanelType;
@@ -43,6 +46,13 @@ export interface PanelConfig {
fieldStyles?: { [field: string]: { [style: string]: string } };
}
+export interface GroupPanelConfig extends PanelConfig {
+ childAssetTypes?: { [assetType: string]: {
+ availableAttributes?: string[];
+ selectedAttributes?: string[];
+ }}
+}
+
export interface AssetViewerConfig {
panels: {[name: string]: PanelConfig};
viewerStyles?: { [style: string]: string };
@@ -98,7 +108,17 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
},
panels: {
- "info": {
+ group: {
+ type: "group",
+ // childAssetTypes: {
+ // "urn:openremote:asset:enviroment": {
+ // availableAttributes: ["nO2"],
+ // selectedAttributes: ["nO2"]
+ // }
+ // },
+ panelStyles: {}
+ } as GroupPanelConfig,
+ info: {
type: "attribute",
hideOnMobile: true,
include: ["userNotes", "manufacturer", "model"],
@@ -115,7 +135,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
}
}
},
- "location": {
+ location: {
type: "location",
include: ["location"],
panelStyles: {
@@ -125,17 +145,17 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
}
}
},
- "attributes": {
+ attributes: {
type: "attribute",
panelStyles: {
}
},
- "history": {
+ history: {
type: "history",
panelStyles: {
}
},
- "chart": {
+ chart: {
type: "chart",
hideOnMobile: true,
panelStyles: {
@@ -175,13 +195,12 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
protected _viewerConfig?: AssetViewerConfig;
protected _attributes?: AssetAttribute[];
-
constructor() {
super();
- window.addEventListener('resize', () => OrAssetViewer.generateGrid(this.shadowRoot));
+ window.addEventListener("resize", () => OrAssetViewer.generateGrid(this.shadowRoot));
- this.addEventListener(OrChartEvent.NAME,() => OrAssetViewer.generateGrid(this.shadowRoot));
- this.addEventListener(OrAttributeHistoryEvent.NAME,() => OrAssetViewer.generateGrid(this.shadowRoot));
+ this.addEventListener(OrChartEvent.NAME, () => OrAssetViewer.generateGrid(this.shadowRoot));
+ this.addEventListener(OrAttributeHistoryEvent.NAME, () => OrAssetViewer.generateGrid(this.shadowRoot));
}
shouldUpdate(changedProperties: PropertyValues): boolean {
@@ -238,10 +257,9 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
</div>
<div id="container" style="${this._viewerConfig.viewerStyles ? styleMap(this._viewerConfig.viewerStyles) : ""}">
${html`${Object.entries(this._viewerConfig.panels).map(([name, panelConfig]) => {
- const panelTemplate = OrAssetViewer.getPanel(name, this.asset!, this._attributes!, this._viewerConfig!, panelConfig, this.shadowRoot);
- return panelTemplate || ``;
- })}`
- }
+ const panelTemplate = OrAssetViewer.getPanel(name, this.asset!, this._attributes!, this._viewerConfig!, panelConfig, this.shadowRoot);
+ return panelTemplate || ``;
+ })}`}
</div>
</div>
`;
@@ -303,12 +321,13 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
}
public static getPanel(name: string, asset: Asset, attributes: AssetAttribute[], viewerConfig: AssetViewerConfig, panelConfig: PanelConfig, shadowRoot: ShadowRoot | null) {
+
const content = OrAssetViewer.getPanelContent(name, asset, attributes, viewerConfig, panelConfig, shadowRoot);
if (!content) {
return;
}
- return html`
+ return html`
<div class=${classMap({"panel": true, mobileHidden: panelConfig.hideOnMobile === true})} id="${name}-panel" style="${panelConfig && panelConfig.panelStyles ? styleMap(panelConfig.panelStyles) : ""}">
<div class="panel-content-wrapper">
<div class="panel-title">
@@ -359,7 +378,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
// return prop === "attributes" ? `` : OrAssetViewer.getField(prop, true, style, OrAssetViewer.getPropertyTemplate(prop, (asset as { [index: string]: any })[prop], viewerConfig, panelConfig, shadowRoot));
// })}
// `;
- // } else
+ // } else
if (panelConfig && panelConfig.type === "history") {
// Special handling for history panel which shows an attribute selector and a graph/data table of historical values
const historyAttrs = attrs.filter((attr) => Util.getFirstMetaItem(attr, MetaItemType.STORE_DATA_POINTS.urn!));
@@ -381,15 +400,15 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
}
}
};
-
-
+
+
const options = historyAttrs.map((attr) => {
const attributeDescriptor = AssetModelUtil.getAttributeDescriptorFromAsset(attr.name!);
let label = Util.getAttributeLabel(attr, attributeDescriptor);
let unit = Util.getMetaValue(MetaItemType.UNIT_TYPE, attr, attributeDescriptor);
if(unit) {
label = label + " ("+i18next.t(unit)+")";
- }
+ }
return [attr.name, label]
});
const attrName: string = historyAttrs[0].name!;
@@ -457,6 +476,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
`;
} else if (panelConfig && panelConfig.type === "location") {
+
const attribute = attrs.find((attr) => attr.name === AttributeType.LOCATION.attributeName);
if (attribute) {
// Special handling for location panel which shows an attribute selector and a map showing the location of the attribute
@@ -468,7 +488,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
if (shadowRoot) {
if (attribute) {
-
+
if(asset.id && asset.attributes && asset.attributes.location){
const showOnMapMeta = Util.getFirstMetaItem(attribute, MetaItemType.SHOW_ON_DASHBOARD.urn!);
@@ -490,13 +510,12 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
if (response.status !== 200) {
}
}
-
+
}
}
};
-
content = html`
<style>
or-map {
@@ -515,8 +534,146 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
` : ``}
`;
}
+ } else if (panelConfig && panelConfig.type === "group") {
+
+ if (asset.type !== "urn:openremote:asset:group") {
+ return;
+ }
+
+ // Get child asset type attribute value
+ const childAssetTypeAttribute = Util.getAssetAttribute(asset, "childAssetType");
+ const groupConfig = panelConfig as GroupPanelConfig;
+
+ if (!childAssetTypeAttribute || typeof childAssetTypeAttribute.value !== "string") {
+ return;
+ }
+ let childAssetType = childAssetTypeAttribute.value as string;
+ let childAssets: Asset[] = [];
+
+ // Determine available and selected attributes for the child asset type
+ let availableAttributes: string[] = [];
+ let selectedAttributes: string[] = [];
+ let newlySelectedAttributes: string[] = []; // Updated when the dialog is open
+
+ if (groupConfig.childAssetTypes && groupConfig.childAssetTypes[childAssetType]) {
+ availableAttributes = groupConfig.childAssetTypes[childAssetType].availableAttributes ? groupConfig.childAssetTypes[childAssetType].availableAttributes! : [];
+ selectedAttributes = groupConfig.childAssetTypes[childAssetType].selectedAttributes ? groupConfig.childAssetTypes[childAssetType].selectedAttributes! : [];
+ }
+
+ // Get available and selected attributes from asset descriptor if not defined in config
+ if (availableAttributes.length === 0) {
+ const descriptor = AssetModelUtil.getAssetDescriptor(childAssetType);
+ if (descriptor && descriptor.attributeDescriptors) {
+ availableAttributes = descriptor.attributeDescriptors.map((descriptor) => descriptor.attributeName!);
+ }
+ }
+ if ((!selectedAttributes || selectedAttributes.length === 0) && availableAttributes) {
+ selectedAttributes = [...availableAttributes];
+ }
+
+ const attributePickerModalActions: DialogAction[] = [
+ {
+ actionName: "ok",
+ default: true,
+ content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}"></or-input>`,
+ action: () => {
+ selectedAttributes.length = 0;
+ selectedAttributes.push(...newlySelectedAttributes);
+ updateTable();
+ }
+ },
+ {
+ actionName: "cancel",
+ content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,
+ action: () => {
+ // Nothing to do here
+ }
+ },
+ ];
+
+ const attributePickerModalOpen = () => {
+ const dialog: OrMwcDialog = shadowRoot!.getElementById(panelName + "-attribute-modal") as OrMwcDialog;
+
+ if (dialog) {
+ newlySelectedAttributes.length = 0;
+ newlySelectedAttributes.push(...selectedAttributes);
+ // Update content which will cause a re-render
+ dialog.dialogContent = html`
+ <div style="display:grid">
+ ${availableAttributes.sort().map((attribute) =>
+ html`<div style="grid-column: 1 / -1;">
+ <or-input .type="${InputType.CHECKBOX}" .label="${i18next.t(attribute)}" .value="${!!newlySelectedAttributes.find((selected) => selected === attribute)}"
+ @or-input-changed="${(evt: OrInputChangedEvent) => evt.detail.value ? newlySelectedAttributes.push(attribute) : newlySelectedAttributes.splice(newlySelectedAttributes.findIndex((s) => s == attribute), 1)}"></or-input>
+ </div>`)}
+ </div>
+ `;
+ dialog.open();
+ }
+ };
+
+ // let headers = ["a", "b", "c"];
+ // let rows = [["0", "1", "2"], ["0", "1", "2"], ["0", "1", "2"], ["0", "1", "2"], ["0", "1", "2"],
+ // ["0", "1", "2"], ["0", "1", "2"], ["0", "1", "2"], ["0", "1", "2"], ["0", "1", "2"]];
+ // let columnFilter = viewerConfig.groupConfig!.columnFilters || ["a"];
+
+ // Function to update the table and message when assets or config changes
+ let updateTable = () => {
+
+ const loadingMsg: OrTranslate = shadowRoot!.getElementById(panelName + "-attribute-table-msg") as OrTranslate;
+ const attributeTable: OrTable = shadowRoot!.getElementById(panelName + "-attribute-table") as OrTable;
+
+ if (!loadingMsg || !attributeTable) {
+ return;
+ }
+
+ if (selectedAttributes.length === 0 || !childAssets || childAssets.length === 0) {
+ loadingMsg.value = "noData";
+ loadingMsg.hidden = false;
+ attributeTable.hidden = true;
+ return;
+ }
+
+ // Update table properties which will cause a re-render
+ loadingMsg.hidden = true;
+ attributeTable.hidden = false;
+ const headers = [...selectedAttributes].sort();
+ attributeTable.headers = headers.map((header) => i18next.t(header));
+ attributeTable.headers.unshift(i18next.t("groupAssetName"));
+ attributeTable.rows = childAssets.map((asset) => {
+ // todo: it's only processing including selected headers here...
+ // move this to the columnFilter option of the table
+ const arr = headers.map((attributeName) => {
+ return asset.attributes![attributeName] ? asset.attributes![attributeName].value! as string : "";
+ });
+ arr.unshift(asset.name!);
+ return arr;
+ });
+ };
+
+ // Load child assets async then update the table
+ this.getAssetChildren(asset.id!, asset.attributes!.childAssetType.value).then((assetChildren) => {
+ childAssets = assetChildren;
+ updateTable();
+ });
+
+ // Define the DOM content for this panel
+ content = html`
+ <style>
+ #asset-group-add-remove-columns {
+ position: absolute;
+ top: 20px;
+ right: var(--internal-or-asset-viewer-panel-padding);
+ }
+ </style>
+ <or-icon id="asset-group-add-remove-columns" icon="plus-minus" @click="${() => attributePickerModalOpen()}"></or-icon>
+ <or-table hidden .id="${panelName}-attribute-table" .options="{stickyFirstColumn:true}"></or-table>
+ <span><or-translate id="${panelName}-attribute-table-msg" value="loading"></or-translate></span>
+ <or-mwc-dialog id="${panelName}-attribute-modal" dialogTitle="addRemoveAttributes" .dialogActions="${attributePickerModalActions}"></or-mwc-dialog>
+ `;
} else {
- if(attrs.length === 0) return undefined;
+ if(attrs.length === 0) {
+ return undefined;
+ }
content = html`
${attrs.sort((attr1, attr2) => attr1.name! < attr2.name! ? -1 : attr1.name! > attr2.name! ? 1 : 0).map((attr) => {
@@ -654,19 +811,23 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
return config;
}
- public static async getAssetNames(ids: string[]): Promise<string[]> {
+ public static async getAssetChildren(id: string, childAssetType: string): Promise<Asset[]> {
const response = await manager.rest.api.AssetResource.queryAssets({
select: {
excludePath: true,
excludeParentInfo: true
},
- ids: ids
+ parents: [
+ {
+ id: id
+ }
+ ]
});
- if (response.status !== 200 || !response.data || response.data.length !== ids.length) {
- return ids;
+ if (response.status !== 200 || !response.data) {
+ return [];
}
- return ids.map((id) => response.data.find((asset) => asset.id === id)!.name!);
+ return response.data.filter((asset) => asset.type === childAssetType);
}
}
diff --git a/ui/component/or-asset-viewer/src/style.ts b/ui/component/or-asset-viewer/src/style.ts
index 5b5270f5c..0e7df0ff9 100644
--- a/ui/component/or-asset-viewer/src/style.ts
+++ b/ui/component/or-asset-viewer/src/style.ts
@@ -45,6 +45,15 @@ export const style = css`
-o-animation: fadein 0.3s; /* Opera < 12.1 */
animation: fadein 0.3s;
}
+
+ @media only screen and (max-width: 767px) {
+ #wrapper {
+ position: absolute;
+ left: 0;
+ right: 0;
+ }
+ }
+
@keyframes fadein {
from { opacity: 0; }
@@ -104,6 +113,7 @@ export const style = css`
border: 1px solid #e5e5e5;
border-radius: 5px;
max-width: 100%;
+ position: relative;
}
.panel-content-wrapper {
@@ -128,7 +138,7 @@ export const style = css`
font-weight: bolder;
line-height: 1em;
color: var(--internal-or-asset-viewer-title-text-color);
- margin-bottom: 12px;
+ margin-bottom: 25px;
flex: 0 0 auto;
}
diff --git a/ui/component/or-asset-viewer/tsconfig.json b/ui/component/or-asset-viewer/tsconfig.json
index ffe7e24d4..3f17c111f 100644
--- a/ui/component/or-asset-viewer/tsconfig.json
+++ b/ui/component/or-asset-viewer/tsconfig.json
@@ -15,10 +15,12 @@
{ "path": "../model" },
{ "path": "../or-chart" },
{ "path": "../or-panel" },
+ { "path": "../or-table" },
{ "path": "../or-translate" },
{ "path": "../or-icon" },
{ "path": "../or-map" },
{ "path": "../or-attribute-input" },
- { "path": "../or-attribute-history" }
+ { "path": "../or-attribute-history" },
+ { "path": "../or-mwc-components" }
]
}
\ No newline at end of file
diff --git a/ui/component/or-attribute-history/package.json b/ui/component/or-attribute-history/package.json
index ce403ce5e..64a7dda81 100644
--- a/ui/component/or-attribute-history/package.json
+++ b/ui/component/or-attribute-history/package.json
@@ -12,15 +12,15 @@
"author": "OpenRemote",
"license": "AGPL-3.0-or-later",
"dependencies": {
+ "@material/data-table": "^5.1.0",
"@openremote/core": "^1.1.0",
"@openremote/or-input": "^1.1.0",
"@openremote/or-panel": "^1.1.0",
"@openremote/or-translate": "^1.1.0",
- "@material/data-table": "^4.0.0",
"chart.js": "^2.8.0",
"jsonpath-plus": "^1.1.0",
- "moment": "^2.24.0",
- "lit-element": "^2.2.1"
+ "lit-element": "^2.2.1",
+ "moment": "^2.24.0"
},
"devDependencies": {
"@types/chart.js": "^2.8.5",
diff --git a/ui/component/or-data-viewer/src/style.ts b/ui/component/or-data-viewer/src/style.ts
index fe4147105..83c050cd2 100644
--- a/ui/component/or-data-viewer/src/style.ts
+++ b/ui/component/or-data-viewer/src/style.ts
@@ -96,7 +96,7 @@ export const style = css`
font-weight: bolder;
line-height: 1em;
color: var(--internal-or-asset-viewer-title-text-color);
- margin-bottom: 12px;
+ margin-bottom: 25px;
flex: 0 0 auto;
}
diff --git a/ui/component/or-header/src/index.ts b/ui/component/or-header/src/index.ts
index f4b43cf0f..0e84c3626 100644
--- a/ui/component/or-header/src/index.ts
+++ b/ui/component/or-header/src/index.ts
@@ -1,6 +1,6 @@
import {style} from "./style";
import {customElement, html, LitElement, property, query} from "lit-element";
-import {MDCDialog} from '@material/dialog';
+import {MDCDialog} from "@material/dialog";
import i18next from "i18next";
import manager from "@openremote/core";
import {MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";
@@ -217,15 +217,15 @@ class OrHeader extends LitElement {
setActiveMenu(value: string) {
switch (value) {
case "logout":
- manager.logout()
+ manager.logout();
break;
case "language":
- const modal = this.shadowRoot!.getElementById("language-modal")
- if(modal && modal.shadowRoot) {
+ const modal = this.shadowRoot!.getElementById("language-modal");
+ if (modal && modal.shadowRoot) {
const component = modal.shadowRoot.getElementById("mdc-dialog-language");
- if(component){
+ if (component) {
const dialog = new MDCDialog(component);
- if(dialog){
+ if (dialog) {
dialog.open();
}
}
diff --git a/ui/component/or-header/src/or-language-modal.ts b/ui/component/or-header/src/or-language-modal.ts
index dd6c53a20..7901ebd38 100644
--- a/ui/component/or-header/src/or-language-modal.ts
+++ b/ui/component/or-header/src/or-language-modal.ts
@@ -75,7 +75,7 @@ export class OrLanguageModal extends LitElement {
aria-describedby="my-dialog-content">
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
- <h2 class="mdc-dialog__title" id="my-dialog-title"><or-translate value="choose_lang"></or-translate></h2>
+ <h2 class="mdc-dialog__title" id="my-dialog-title"><or-translate value="chooseLanguage"></or-translate></h2>
<div class="dialog-container mdc-dialog__content" id="language-dialog-content">
<or-input id="language-picker"
.label="${i18next.t("language")}"
diff --git a/ui/component/or-mwc-components/package.json b/ui/component/or-mwc-components/package.json
index aa82e67e7..37f03fb64 100644
--- a/ui/component/or-mwc-components/package.json
+++ b/ui/component/or-mwc-components/package.json
@@ -12,6 +12,7 @@
"dependencies": {
"@material/menu": "^4.0.0",
"@material/drawer": "^4.0.0",
+ "@material/dialog": "^4.0.0",
"lit-element": "^2.2.1"
},
"devDependencies": {
diff --git a/ui/component/or-mwc-components/src/or-mwc-dialog.ts b/ui/component/or-mwc-components/src/or-mwc-dialog.ts
new file mode 100644
index 000000000..c77f90318
--- /dev/null
+++ b/ui/component/or-mwc-components/src/or-mwc-dialog.ts
@@ -0,0 +1,157 @@
+import {
+ css,
+ customElement,
+ html,
+ LitElement,
+ property,
+ PropertyValues,
+ query,
+ TemplateResult,
+ unsafeCSS
+} from "lit-element";
+import {MDCDialog, MDCDialogCloseEventDetail} from "@material/dialog";
+import "@openremote/or-translate";
+
+const dialogStyle = require("!!raw-loader!@material/dialog/dist/mdc.dialog.css");
+
+export interface DialogAction {
+ default?: boolean;
+ content: TemplateResult;
+ actionName: string;
+ action?: () => void;
+}
+
+export class OrMwcDialogOpenedEvent extends CustomEvent<void> {
+
+ public static readonly NAME = "or-mwc-dialog-opened";
+
+ constructor() {
+ super(OrMwcDialogOpenedEvent.NAME, {
+ bubbles: true,
+ composed: true
+ });
+ }
+}
+
+export class OrMwcDialogClosedEvent extends CustomEvent<string | undefined> {
+
+ public static readonly NAME = "or-mwc-dialog-closed";
+
+ constructor(action?: string) {
+ super(OrMwcDialogClosedEvent.NAME, {
+ detail: action,
+ bubbles: true,
+ composed: true
+ });
+ }
+}
+
+declare global {
+ export interface HTMLElementEventMap {
+ [OrMwcDialogOpenedEvent.NAME]: OrMwcDialogOpenedEvent;
+ [OrMwcDialogClosedEvent.NAME]: OrMwcDialogClosedEvent;
+ }
+}
+
+// language=CSS
+const style = css`
+ :host {
+ position: relative;
+ }
+`;
+
+@customElement("or-mwc-dialog")
+export class OrMwcDialog extends LitElement {
+
+ static get styles() {
+ return [
+ css`${unsafeCSS(dialogStyle)}`,
+ style
+ ];
+ }
+
+ @property({type: String})
+ public dialogTitle?: string;
+
+ @property({type: Object, attribute: false})
+ public dialogContent?: TemplateResult;
+
+ @property({type: Array, attribute: false})
+ public dialogActions?: DialogAction[];
+
+ @query("#dialog")
+ protected _mdcElem!: HTMLElement;
+
+ protected _mdcComponent?: MDCDialog;
+
+ public open() {
+ if (this._mdcComponent) {
+ this._mdcComponent.open();
+ }
+ }
+
+ public close(action?: string) {
+ if (this._mdcComponent) {
+ this._mdcComponent.close(action);
+ }
+ }
+
+ disconnectedCallback(): void {
+ super.disconnectedCallback();
+ if (this._mdcComponent) {
+ this._mdcComponent.destroy();
+ this._mdcComponent = undefined;
+ }
+ }
+
+ protected render() {
+
+ return html`
+ <div id="dialog"
+ class="mdc-dialog"
+ role="alertdialog"
+ aria-modal="true"
+ aria-labelledby="dialog-title"
+ aria-describedby="dialog-content"
+ @MDCDialog:opened="${() => this._onDialogOpened()}"
+ @MDCDialog:closed="${(evt: any) => this._onDialogClosed(evt.detail.action)}">
+ <div class="mdc-dialog__container">
+ <div class="mdc-dialog__surface">
+ <h2 class="mdc-dialog__title" id="dialog-title"><or-translate value="${this.dialogTitle}"></or-translate></h2>
+ <div class="dialog-container mdc-dialog__content" id="dialog-content">
+ ${this.dialogContent ? this.dialogContent : html`<div></div>`}
+ </div>
+ <footer class="mdc-dialog__actions">
+ ${this.dialogActions ? this.dialogActions.map((action) => {
+ return html`<div class="mdc-button mdc-dialog__button" ?data-mdc-dialog-button-default="${action.default}" data-mdc-dialog-action="${action.actionName}">${action.content}</div>`
+ }) : ``}
+ </footer>
+ </div>
+ </div>
+ <div class="mdc-dialog__scrim"></div>
+ </div>
+ `;
+ }
+
+ protected firstUpdated(_changedProperties: PropertyValues): void {
+ super.firstUpdated(_changedProperties);
+ if (this._mdcElem) {
+ this._mdcComponent = new MDCDialog(this._mdcElem);
+ }
+ }
+
+ protected _onDialogOpened() {
+ this.dispatchEvent(new OrMwcDialogOpenedEvent());
+ }
+
+ protected _onDialogClosed(action?: string) {
+ this.dispatchEvent(new OrMwcDialogClosedEvent(action));
+
+ if (action && this.dialogActions) {
+ const matchedAction = this.dialogActions.find((dialogAction) => dialogAction.actionName === action);
+ if (matchedAction && matchedAction.action) {
+ matchedAction.action();
+ }
+ }
+ }
+}
diff --git a/ui/component/or-mwc-components/tsconfig.json b/ui/component/or-mwc-components/tsconfig.json
index acb1a2837..8e37015eb 100644
--- a/ui/component/or-mwc-components/tsconfig.json
+++ b/ui/component/or-mwc-components/tsconfig.json
@@ -10,6 +10,7 @@
],
"references": [
{ "path": "../core" },
- { "path": "../or-select" }
+ { "path": "../or-select" },
+ { "path": "../or-translate" }
]
}
\ No newline at end of file
diff --git a/ui/component/or-table/.npmignore b/ui/component/or-table/.npmignore
new file mode 100644
index 000000000..17e64b1ad
--- /dev/null
+++ b/ui/component/or-table/.npmignore
@@ -0,0 +1,8 @@
+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-table/README.md b/ui/component/or-table/README.md
new file mode 100644
index 000000000..ff8d337f1
--- /dev/null
+++ b/ui/component/or-table/README.md
@@ -0,0 +1,31 @@
+# @openremote/or-table \<or-table\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Web Component for displaying an input control.
+
+## Install
+```bash
+npm i @openremote/or-table
+yarn add @openremote/or-table
+```
+
+## 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-table/build.gradle b/ui/component/or-table/build.gradle
new file mode 100644
index 000000000..98cdcb8e2
--- /dev/null
+++ b/ui/component/or-table/build.gradle
@@ -0,0 +1,15 @@
+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-table/package.json b/ui/component/or-table/package.json
new file mode 100644
index 000000000..749ab5e84
--- /dev/null
+++ b/ui/component/or-table/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@openremote/or-table",
+ "version": "1.1.0",
+ "description": "OpenRemote table",
+ "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": {
+ "@material/data-table": "^5.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-table/src/index.ts b/ui/component/or-table/src/index.ts
new file mode 100644
index 000000000..14a23638b
--- /dev/null
+++ b/ui/component/or-table/src/index.ts
@@ -0,0 +1,127 @@
+import {css, customElement, html, LitElement, property, PropertyValues, TemplateResult, unsafeCSS, query} from "lit-element";
+import {classMap} from "lit-html/directives/class-map";
+import {ifDefined} from "lit-html/directives/if-defined";
+import {MDCDataTable} from "@material/data-table";
+
+import {DefaultColor1, DefaultColor4, DefaultColor8} from "@openremote/core";
+
+const dataTableStyle = require("!!raw-loader!@material/data-table/dist/mdc.data-table.css");
+
+interface TableOptions {
+ columnFilter?: string[];
+ stickyFirstColumn?: boolean;
+}
+
+// language=CSS
+const style = css`
+
+ :host {
+ width: 100%;
+ }
+
+ :host([hidden]) {
+ display: none;
+ }
+
+ .mdc-data-table {
+ width: 100%;
+ max-height: 500px;
+ }
+
+ /* first column should be sticky*/
+ .mdc-data-table.has-sticky-first-column tr th:first-of-type,
+ .mdc-data-table.has-sticky-first-column tr td:first-of-type {
+ z-index: 1;
+ position: sticky;
+ left: 0;
+ background-color: var(--internal-or-asset-viewer-panel-color);
+ }
+ .mdc-data-table.has-sticky-first-column tr th:first-of-type {
+ z-index: 2;
+ }
+
+ thead th {
+ box-shadow: 0 1px 0 0 rgb(229, 229, 229);
+ }
+ .mdc-data-table.has-sticky-first-column tr td:first-of-type {
+ box-shadow: 1px 0 0 0 rgb(229, 229, 229);
+ }
+ thead th:first-of-type {
+ box-shadow: 1px 1px 0 0 rgb(229, 229, 229);
+ }
+
+ th {
+ position: sticky;
+ top: 0;
+ background-color: var(--internal-or-asset-viewer-panel-color);
+ }
+
+ th, td {
+ cursor: default;
+ }
+
+ th:not(:first-of-type), td:not(:first-of-type) {
+ max-width: 100px;
+ text-overflow: ellipsis;
+ }
+
+ .mdc-data-table__header-cell {
+ font-weight: 700;
+ color: #aaa;
+ font-size: 12px;
+ }
+`;
+
+@customElement("or-table")
+export class OrTable extends LitElement {
+
+ static get styles() {
+ return [
+ css`${unsafeCSS(dataTableStyle)}`,
+ style
+ ];
+ }
+
+ @property({type: Array})
+ public headers?: string[];
+
+ @property({type: Array})
+ public rows!: string[][];
+
+ @property({type: Array})
+ public options?: TableOptions = {
+ columnFilter: [],
+ stickyFirstColumn: true
+ };
+
+ protected render() {
+
+ const headerTemplate = (!this.headers) ? html`` : html`
+ <thead>
+ <tr class="mdc-data-table__header-row">
+ ${this.headers.map(item => html`
+ <th class="mdc-data-table__header-cell" role="columnheader" scope="col" title="${item}">
+ ${item}
+ </th>
+ `)}
+ </tr>
+ </thead>`;
+ return html`
+ <div class="mdc-data-table ${classMap({"has-sticky-first-column": !!this.options!.stickyFirstColumn})}">
+ <table class="mdc-data-table__table" aria-label="Dessert calories">
+ ${headerTemplate}
+ <tbody class="mdc-data-table__content">
+ ${this.rows.map(item => html`
+ <tr class="mdc-data-table__row">
+ ${item.map((cell: string|number) => {
+ return html`<td class="mdc-data-table__cell ${classMap({"mdc-data-table__cell--numeric": typeof cell === "number"})}" title="${cell}">${cell}</td>`;
+ })}
+ </tr>
+ `)}
+ </tbody>
+ </table>
+ </div>
+ `;
+ }
+
+}
diff --git a/ui/component/or-table/tsconfig.json b/ui/component/or-table/tsconfig.json
new file mode 100644
index 000000000..2d31b45ae
--- /dev/null
+++ b/ui/component/or-table/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../../tsconfig",
+ "compilerOptions": {
+ "outDir": "./dist",
+ "tsBuildInfoFile": "./dist/.tsbuildinfo",
+ "rootDir": "src"
+ },
+ "include": [
+ "./src"
+ ],
+ "references": [
+ { "path": "../core" }
+ ]
+}
\ No newline at end of file
diff --git a/ui/component/or-table/webpack.config.js b/ui/component/or-table/webpack.config.js
new file mode 100644
index 000000000..9fe13702d
--- /dev/null
+++ b/ui/component/or-table/webpack.config.js
@@ -0,0 +1,7 @@
+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 203aacdcb..607b5dd10 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1485,6 +1485,13 @@
dependencies:
tslib "^1.9.3"
+"@material/animation@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/animation/-/animation-5.1.0.tgz#f2d2ffe346f2612bb40d9e8bfb976290b91173f7"
+ integrity sha512-qZuPCZkTsCQCzx5EtY2eNBcmYOMGMbFVq6VTmvQztDCYDykT8JfP8Hpk55Y5bGORHvBbIasUXzoAhfQs6w/Bdg==
+ dependencies:
+ tslib "^1.9.3"
+
"@material/base@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/base/-/base-4.0.0.tgz#535574d0b63c18892cfb70e88b27bc8f8090677a"
@@ -1492,6 +1499,13 @@
dependencies:
tslib "^1.9.3"
+"@material/base@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/base/-/base-5.1.0.tgz#bd252eb3674c27c1ce690ad98905b4b1d39da30a"
+ integrity sha512-UxVFKpSNaoKqd7hHxy9hrvwANp0WJy/BZqu8Rj/aRvKnBZnuHehFuOysI9WqdeTqgveJaQoj6EEkVEqLurR5Sg==
+ 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"
@@ -1522,6 +1536,21 @@
"@material/touch-target" "^4.0.0"
tslib "^1.9.3"
+"@material/checkbox@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-5.1.0.tgz#2f689f6a409f0ed906a0d73bcd0078a768eaf9d1"
+ integrity sha512-NwpWxFdWrZNlSjcSEEcGz8UN7ZQ5k8VthExclJnawpYGPUnCPLTXWogREnA2Tyl22PJ6jOy8Ejb8tnpu2rSiaw==
+ dependencies:
+ "@material/animation" "^5.1.0"
+ "@material/base" "^5.1.0"
+ "@material/density" "^5.1.0"
+ "@material/dom" "^5.1.0"
+ "@material/feature-targeting" "^5.1.0"
+ "@material/ripple" "^5.1.0"
+ "@material/theme" "^5.1.0"
+ "@material/touch-target" "^5.1.0"
+ tslib "^1.9.3"
+
"@material/data-table@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/data-table/-/data-table-4.0.0.tgz#9ad3fe1e05cd893ac097a73c312d1201ea2a07d6"
@@ -1541,11 +1570,34 @@
"@material/typography" "^4.0.0"
tslib "^1.10.0"
+"@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"
+ integrity sha512-vjijTvCHM7sfyPzQ05026nSWT1Bn/3lfj1u0oeYRnym6Ke6Os36x+IF/jFhjsraXKb2we6cof7OdoMFHCU8cqQ==
+ dependencies:
+ "@material/animation" "^5.1.0"
+ "@material/base" "^5.1.0"
+ "@material/checkbox" "^5.1.0"
+ "@material/density" "^5.1.0"
+ "@material/dom" "^5.1.0"
+ "@material/elevation" "^5.1.0"
+ "@material/feature-targeting" "^5.1.0"
+ "@material/rtl" "^5.1.0"
+ "@material/shape" "^5.1.0"
+ "@material/theme" "^5.1.0"
+ "@material/typography" "^5.1.0"
+ tslib "^1.10.0"
+
"@material/density@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/density/-/density-4.0.0.tgz#5bc4bba6c1232f6e075c88295357e6ebdee4353f"
integrity sha512-PuOCPCXlWjimTq+OuCS8biAb1JE9aXCZwT1dRG9REAIAK7bN8KeeTzkeJp6jTj+ggZjWphwKF0lKeX6Gv+e/lw==
+"@material/density@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/density/-/density-5.1.0.tgz#d36512d413a00595122f98303766dae6b9e9fabe"
+ integrity sha512-jmp6AgiNYosl+HicxWCa8vib9pg9tNxRcf+6f9LDkDYJ9jtO90PXuypyd0hO64JZ9Df7BywFj5hTWPERG1FBbw==
+
"@material/dialog@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-4.0.0.tgz#09861315b80c217acf2a8a9f9ea6201e2cf2d2a7"
@@ -1572,6 +1624,13 @@
dependencies:
tslib "^1.9.3"
+"@material/dom@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/dom/-/dom-5.1.0.tgz#fefb96e1f744653dfc3ecdb01f7ebef81ce1faeb"
+ integrity sha512-tBbl3hG34Auv+2sboWhtstXeZ9rx3G7hb/jEXs5xZ5KIfZHwY4mbo0KqR/fSJZKaUsvk2Nc/UEOVcUx2mTNmYg==
+ dependencies:
+ tslib "^1.9.3"
+
"@material/drawer@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/drawer/-/drawer-4.0.0.tgz#07d66e4170f6b802ef902248dbddb1693ead55f2"
@@ -1599,6 +1658,16 @@
"@material/feature-targeting" "^4.0.0"
"@material/theme" "^4.0.0"
+"@material/elevation@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-5.1.0.tgz#569065f858dd1dfb83d3ba4951ed6e449da1d545"
+ integrity sha512-NsWIT+L6x3BLouCOh3H8x885/nCrNNmzCwHEodz/0PcYQsxx9RiIVFkagmJWw/w//jej/D4NotD0xHGKOWTrFA==
+ dependencies:
+ "@material/animation" "^5.1.0"
+ "@material/base" "^5.1.0"
+ "@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"
@@ -1618,6 +1687,11 @@
resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-4.0.0.tgz#8d9d1470801a1fd166773731613d9fa89e0fd85e"
integrity sha512-0gk+f151vqmEdWkrQ9ocPlQRU9aUtSGsVBhletqIbsthLUsZIz9qk25FHjV1wHd/bGHknd9NH+T8ENprv3KLFg==
+"@material/feature-targeting@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-5.1.0.tgz#49265bbd4ff59b1cd20a385b5547f7c246cb1955"
+ integrity sha512-z3JNWF7lP9WOzw1xBwul/HAOu4qC6EpK/8MkhjLNI9APvdYML82PWS1V0k0MiqA6Jk6uxm8DiVAk9VUqBa9/YA==
+
"@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"
@@ -1732,11 +1806,28 @@
"@material/theme" "^4.0.0"
tslib "^1.9.3"
+"@material/ripple@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-5.1.0.tgz#6624e0ff7718d6bfa65fecd0bca4c03d2696c07b"
+ integrity sha512-mluIf+HaaCplszp9/MAl178FpfIJWi5hSyQOpF7w8RTzRSaH8J0uwgmn8VeNnwe1TAWio0vQzHrz4iEg2r7Ngw==
+ dependencies:
+ "@material/animation" "^5.1.0"
+ "@material/base" "^5.1.0"
+ "@material/dom" "^5.1.0"
+ "@material/feature-targeting" "^5.1.0"
+ "@material/theme" "^5.1.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"
integrity sha512-AP8zByVDEWAJVJoxByVccUbH+BX24IeG7ol+L6Qd8JjzPpz1fzPVJ4BeDNaF0a6sXtHsRmj2zN5dsx/BGC3IHg==
+"@material/rtl@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-5.1.0.tgz#abd8c2bb5322b8fbe549e2f467791612720da746"
+ integrity sha512-Hij4KJIfjK63HArdQ3K1INMo0MbigDgL0JhjO1VDk5c+iYmYpjDI7wgPLmV5ISCBtenXRWpo1xbBO3uEmtCd4Q==
+
"@material/select@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/select/-/select-4.0.0.tgz#18d3428a72277858ca92fae543420b4b7f1ec247"
@@ -1763,6 +1854,14 @@
dependencies:
"@material/feature-targeting" "^4.0.0"
+"@material/shape@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/shape/-/shape-5.1.0.tgz#155d01c6fdc90a9225fef297fe146c1946a6c147"
+ integrity sha512-/k27T9fhQ1zj7VCsS26nv0TzsOi142ncik2mycEXq8753PDBotob7Y19pbwivwt9QxkglhMGH0EaWdZPzBoQXw==
+ dependencies:
+ "@material/feature-targeting" "^5.1.0"
+ "@material/rtl" "^5.1.0"
+
"@material/switch@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/switch/-/switch-4.0.0.tgz#5c5da30389f48f4f5245eb9f325cbc0e5f6bf2d4"
@@ -1804,6 +1903,13 @@
dependencies:
"@material/feature-targeting" "^4.0.0"
+"@material/theme@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/theme/-/theme-5.1.0.tgz#013c37d055afc5d4045c77e44c9fd1f940ff865b"
+ integrity sha512-VoaCYAubn/oEG1/fu/yP4nxAw8sLEphFOGGBJxcPGQoLgQ9qcvibsV3G5H9S6AtmhJxgSGU0JnO9TaiuhQq5zA==
+ dependencies:
+ "@material/feature-targeting" "^5.1.0"
+
"@material/touch-target@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-4.0.0.tgz#a7c8dea3dfdb9c13ca81a90ea7e0af33cf7e40ba"
@@ -1811,6 +1917,14 @@
dependencies:
"@material/feature-targeting" "^4.0.0"
+"@material/touch-target@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-5.1.0.tgz#0e03ba901acf118c91eb4cfa02034964424565a2"
+ integrity sha512-lR3eoL1D0I/hyEK6I7bMFDBy/pE0yYvjYUZtL1vC7+2i54A4FgQ2hwnpQJVaZQXzrHdj6xsXmODphmUsH5gqPA==
+ dependencies:
+ "@material/base" "^5.1.0"
+ "@material/feature-targeting" "^5.1.0"
+
"@material/typography@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@material/typography/-/typography-4.0.0.tgz#57be7ac8b819f2ae29d48c9443b113d2f5585ecc"
@@ -1818,6 +1932,14 @@
dependencies:
"@material/feature-targeting" "^4.0.0"
+"@material/typography@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@material/typography/-/typography-5.1.0.tgz#b346f4139b231f17c84c439a1c7af311c40c5844"
+ integrity sha512-yh02koa6JLyPT5u7Zb31kyqhoZoppL0n9FmZK+eHXZcfeDF7ROL0UmtRsEjQxfnCNZRR+FIhAgrzdYxClwH05g==
+ dependencies:
+ "@material/feature-targeting" "^5.1.0"
+ "@material/theme" "^5.1.0"
+
"@mdi/js@^4.5.95":
version "4.5.95"
resolved "https://registry.yarnpkg.com/@mdi/js/-/js-4.5.95.tgz#f9d12c03b9f848001c82fbdcd1aa445a6c9c8d67"
@@ -3044,6 +3166,14 @@ chardet@^0.7.0:
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
+chart.js@^2.4.0:
+ version "2.9.3"
+ resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.9.3.tgz#ae3884114dafd381bc600f5b35a189138aac1ef7"
+ integrity sha512-+2jlOobSk52c1VU6fzkh3UwqHMdSlgH1xFv9FKMqHiNCpXsGPQa/+81AFa+i3jZ253Mq9aAycPwDjnn1XbRNNw==
+ dependencies:
+ chartjs-color "^2.1.0"
+ moment "^2.10.2"
+
chart.js@^2.7.0, chart.js@^2.8.0:
version "2.9.1"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.9.1.tgz#e98893a810d40d1c0a016e6872a13fa5faedcdf8"
@@ -3067,6 +3197,13 @@ chartjs-color@^2.1.0:
chartjs-color-string "^0.6.0"
color-convert "^1.9.3"
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/chartjs-plugin-annotation/-/chartjs-plugin-annotation-0.5.7.tgz#1bf0e30199a6a9ff9889ce0f37a1e755a80d10bf"
+ integrity sha1-G/DjAZmmqf+Yic4PN6HnVagNEL8=
+ dependencies:
+ chart.js "^2.4.0"
+
chokidar@^2.0.2, chokidar@^2.1.8:
version "2.1.8"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917"