@openremote/or-dashboard-builder 1.6.0 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +457 -7571
- package/dist/umd/index.js +8 -7
- package/dist/umd/index.orbundle.js +139 -138
- package/lib/panels/attributes-panel.js +2 -2
- package/lib/panels/attributes-panel.js.map +1 -1
- package/package.json +11 -11
- package/src/panels/attributes-panel.ts +5 -5
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate||function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},__awaiter=this&&this.__awaiter||function(t,e,i,r){return new(i||(i=Promise))((function(o,s){function a(t){try{l(r.next(t))}catch(t){s(t)}}function n(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,n)}l((r=r.apply(t,e||[])).next())}))};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,state}from"lit/decorators.js";import{AssetModelUtil}from"@openremote/model";import{style}from"../style";import{when}from"lit/directives/when.js";import{map}from"lit/directives/map.js";import{guard}from"lit/directives/guard.js";import{i18next}from"@openremote/or-translate";import"@openremote/or-translate";import{InputType}from"@openremote/or-mwc-components/or-mwc-input";import manager,{DefaultColor5,Util}from"@openremote/core";import{getAssetDescriptorIconTemplate}from"@openremote/or-icon";import{
|
|
1
|
+
var __decorate=this&&this.__decorate||function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},__awaiter=this&&this.__awaiter||function(t,e,i,r){return new(i||(i=Promise))((function(o,s){function a(t){try{l(r.next(t))}catch(t){s(t)}}function n(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,n)}l((r=r.apply(t,e||[])).next())}))};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,state}from"lit/decorators.js";import{AssetModelUtil}from"@openremote/model";import{style}from"../style";import{when}from"lit/directives/when.js";import{map}from"lit/directives/map.js";import{guard}from"lit/directives/guard.js";import{i18next}from"@openremote/or-translate";import"@openremote/or-translate";import{InputType}from"@openremote/or-mwc-components/or-mwc-input";import manager,{DefaultColor5,Util}from"@openremote/core";import{getAssetDescriptorIconTemplate}from"@openremote/or-icon";import{OrAssetAttributePicker,OrAssetAttributePickerPickedEvent}from"@openremote/or-attribute-picker";import{showDialog}from"@openremote/or-mwc-components/or-mwc-dialog";import{showSnackbar}from"@openremote/or-mwc-components/or-mwc-snackbar";export class AttributeActionEvent extends CustomEvent{constructor(t,e,i){super(AttributeActionEvent.NAME,{bubbles:!0,composed:!0,detail:{asset:t,attributeRef:e,action:i}})}}AttributeActionEvent.NAME="attribute-action";export class AttributesSelectEvent extends CustomEvent{constructor(t,e){super(AttributesSelectEvent.NAME,{bubbles:!0,composed:!0,detail:{assets:t,attributeRefs:e}})}}AttributesSelectEvent.NAME="attribute-select";const styling=css`
|
|
2
2
|
#attribute-list {
|
|
3
3
|
overflow: auto;
|
|
4
4
|
flex: 1 1 0;
|
|
@@ -78,7 +78,7 @@ var __decorate=this&&this.__decorate||function(t,e,i,r){var o,s=arguments.length
|
|
|
78
78
|
.button-action:hover {
|
|
79
79
|
--or-icon-fill: var(--or-app-color4);
|
|
80
80
|
}
|
|
81
|
-
`;let AttributesPanel=class extends LitElement{constructor(){super(...arguments),this.attributeRefs=[],this.multi=!1,this.onlyDataAttrs=!1,this.loadedAssets=[]}static get styles(){return[styling,style]}willUpdate(t){super.willUpdate(t),this.attributeRefs||(this.attributeRefs=[]),t.has("attributeRefs")&&this.attributeRefs&&this.loadAssets().then((e=>{t.get("attributeRefs")&&this.dispatchEvent(new AttributesSelectEvent(e,this.attributeRefs))}))}getLoadedAsset(t){var e;return null===(e=this.loadedAssets)||void 0===e?void 0:e.find((e=>e.id===t.id))}removeWidgetAttribute(t){null!=this.attributeRefs&&(this.attributeRefs=this.attributeRefs.filter((e=>e!==t)))}loadAssets(){return __awaiter(this,void 0,void 0,(function*(){if(this.attributeRefs.filter((t=>!this.getLoadedAsset(t))).length>0){const t=yield this.fetchAssets(this.attributeRefs);return this.loadedAssets=t,t}return this.loadedAssets}))}fetchAssets(t=[]){return __awaiter(this,void 0,void 0,(function*(){let e=[];return yield manager.rest.api.AssetResource.queryAssets({ids:t.map((t=>t.id)),realm:{name:manager.displayRealm},select:{attributes:t.map((t=>t.name))}}).then((t=>{e=t.data})).catch((t=>{console.error(t),showSnackbar(void 0,"errorOccurred")})),e}))}onAttributeActionClick(t,e,i){this.dispatchEvent(new AttributeActionEvent(t,e,i))}openAttributeSelector(t,e,i=!0,r){let o;o=showDialog(null!=t?(new
|
|
81
|
+
`;let AttributesPanel=class extends LitElement{constructor(){super(...arguments),this.attributeRefs=[],this.multi=!1,this.onlyDataAttrs=!1,this.loadedAssets=[]}static get styles(){return[styling,style]}willUpdate(t){super.willUpdate(t),this.attributeRefs||(this.attributeRefs=[]),t.has("attributeRefs")&&this.attributeRefs&&this.loadAssets().then((e=>{t.get("attributeRefs")&&this.dispatchEvent(new AttributesSelectEvent(e,this.attributeRefs))}))}getLoadedAsset(t){var e;return null===(e=this.loadedAssets)||void 0===e?void 0:e.find((e=>e.id===t.id))}removeWidgetAttribute(t){null!=this.attributeRefs&&(this.attributeRefs=this.attributeRefs.filter((e=>e!==t)))}loadAssets(){return __awaiter(this,void 0,void 0,(function*(){if(this.attributeRefs.filter((t=>!this.getLoadedAsset(t))).length>0){const t=yield this.fetchAssets(this.attributeRefs);return this.loadedAssets=t,t}return this.loadedAssets}))}fetchAssets(t=[]){return __awaiter(this,void 0,void 0,(function*(){let e=[];return yield manager.rest.api.AssetResource.queryAssets({ids:t.map((t=>t.id)),realm:{name:manager.displayRealm},select:{attributes:t.map((t=>t.name))}}).then((t=>{e=t.data})).catch((t=>{console.error(t),showSnackbar(void 0,"errorOccurred")})),e}))}onAttributeActionClick(t,e,i){this.dispatchEvent(new AttributeActionEvent(t,e,i))}openAttributeSelector(t,e,i=!0,r){let o;o=showDialog(null!=t?(new OrAssetAttributePicker).setMultiSelect(e).setSelectedAttributes(t).setShowOnlyDatapointAttrs(i).setAttributeFilter(r):(new OrAssetAttributePicker).setMultiSelect(e).setShowOnlyDatapointAttrs(i)),o.addEventListener(OrAssetAttributePickerPickedEvent.NAME,(t=>{this.attributeRefs=t.detail}))}render(){return html`
|
|
82
82
|
<div>
|
|
83
83
|
${when(this.attributeRefs.length>0,(()=>html`
|
|
84
84
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes-panel.js","sourceRoot":"","sources":["../../src/panels/attributes-panel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,GAAG,EAAa,IAAI,EAAE,UAAU,EAAkC,SAAS,EAAC,MAAM,KAAK,CAAC;AAChG,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAQ,cAAc,EAA0B,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAC,GAAG,EAAC,MAAM,uBAAuB,CAAC;AAC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CAAC,iBAAiB;;uDAEzG,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,eAAe,CAAC;;;SAGxJ,CAAC;IACN,CAAC;CAEJ,CAAA;AAlKa;IADT,QAAQ,EAAE;sDACkC;AAGnC;IADT,QAAQ,EAAE;8CACsB;AAGvB;IADT,QAAQ,EAAE;sDAC8B;AAG/B;IADT,QAAQ,EAAE;wDACwD;AAGzD;IADT,QAAQ,EAAE;+DAC4G;AAG7G;IADT,QAAQ,EAAE;gEACuE;AAGxE;IADT,KAAK,EAAE;qDAC6B;AArB5B,eAAe;IAD3B,aAAa,CAAC,kBAAkB,CAAC;GACrB,eAAe,CAqK3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openremote/or-dashboard-builder",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "OpenRemote Dashboard Builder",
|
|
5
5
|
"customElements": "custom-elements.json",
|
|
6
6
|
"main": "dist/umd/index.bundle.js",
|
|
@@ -11,26 +11,26 @@
|
|
|
11
11
|
},
|
|
12
12
|
"types": "lib/index.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
|
-
"analyze": "npx cem analyze --config ../custom-elements-manifest.config.
|
|
14
|
+
"analyze": "npx cem analyze --config ../custom-elements-manifest.config.mjs",
|
|
15
15
|
"test": "echo \"No tests\" && exit 0",
|
|
16
16
|
"prepack": "npx webpack"
|
|
17
17
|
},
|
|
18
18
|
"author": "OpenRemote",
|
|
19
19
|
"license": "AGPL-3.0-or-later",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@openremote/core": "1.6.
|
|
22
|
-
"@openremote/model": "1.6.
|
|
23
|
-
"@openremote/or-attribute-card": "1.6.
|
|
24
|
-
"@openremote/or-attribute-input": "1.6.
|
|
25
|
-
"@openremote/or-chart": "1.6.
|
|
26
|
-
"@openremote/or-gauge": "1.6.
|
|
27
|
-
"@openremote/or-map": "1.6.
|
|
28
|
-
"@openremote/rest": "1.6.
|
|
21
|
+
"@openremote/core": "1.6.3",
|
|
22
|
+
"@openremote/model": "1.6.3",
|
|
23
|
+
"@openremote/or-attribute-card": "1.6.3",
|
|
24
|
+
"@openremote/or-attribute-input": "1.6.3",
|
|
25
|
+
"@openremote/or-chart": "1.6.3",
|
|
26
|
+
"@openremote/or-gauge": "1.6.3",
|
|
27
|
+
"@openremote/or-map": "1.6.3",
|
|
28
|
+
"@openremote/rest": "1.6.3",
|
|
29
29
|
"gridstack": "^7.2.0",
|
|
30
30
|
"lit": "^2.0.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@openremote/util": "1.6.
|
|
33
|
+
"@openremote/util": "1.6.3"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
@@ -10,7 +10,7 @@ import "@openremote/or-translate";
|
|
|
10
10
|
import {InputType} from "@openremote/or-mwc-components/or-mwc-input";
|
|
11
11
|
import manager, {DefaultColor5, Util} from "@openremote/core";
|
|
12
12
|
import {getAssetDescriptorIconTemplate} from "@openremote/or-icon";
|
|
13
|
-
import {
|
|
13
|
+
import {OrAssetAttributePicker, OrAssetAttributePickerPickedEvent} from "@openremote/or-attribute-picker";
|
|
14
14
|
import {showDialog} from "@openremote/or-mwc-components/or-mwc-dialog";
|
|
15
15
|
import {showSnackbar} from "@openremote/or-mwc-components/or-mwc-snackbar";
|
|
16
16
|
|
|
@@ -226,13 +226,13 @@ export class AttributesPanel extends LitElement {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
protected openAttributeSelector(attributeRefs: AttributeRef[], multi: boolean, onlyDataAttrs = true, attributeFilter?: (attribute: Attribute<any>) => boolean) {
|
|
229
|
-
let dialog:
|
|
229
|
+
let dialog: OrAssetAttributePicker;
|
|
230
230
|
if (attributeRefs != null) {
|
|
231
|
-
dialog = showDialog(new
|
|
231
|
+
dialog = showDialog(new OrAssetAttributePicker().setMultiSelect(multi).setSelectedAttributes(attributeRefs).setShowOnlyDatapointAttrs(onlyDataAttrs).setAttributeFilter(attributeFilter));
|
|
232
232
|
} else {
|
|
233
|
-
dialog = showDialog(new
|
|
233
|
+
dialog = showDialog(new OrAssetAttributePicker().setMultiSelect(multi).setShowOnlyDatapointAttrs(onlyDataAttrs))
|
|
234
234
|
}
|
|
235
|
-
dialog.addEventListener(
|
|
235
|
+
dialog.addEventListener(OrAssetAttributePickerPickedEvent.NAME, (event: CustomEvent) => {
|
|
236
236
|
this.attributeRefs = event.detail;
|
|
237
237
|
})
|
|
238
238
|
}
|