@openremote/or-attribute-picker 1.2.0-snapshot.20240512155932

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @openremote/or-attribute-input \<or-attribute-input\>
2
+ [![NPM Version][npm-image]][npm-url]
3
+ [![Linux Build][travis-image]][travis-url]
4
+ [![Test Coverage][coveralls-image]][coveralls-url]
5
+
6
+ Web Component for displaying an input control.
7
+
8
+ ## Install
9
+ ```bash
10
+ npm i @openremote/or-attribute-input
11
+ yarn add @openremote/or-attribute-input
12
+ ```
13
+
14
+ ## Usage
15
+ For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
16
+
17
+
18
+ ## Supported Browsers
19
+ The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
20
+ Internet Explorer 11 is also supported.
21
+
22
+
23
+ ## License
24
+ [GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
25
+
26
+ [npm-image]: https://img.shields.io/npm/v/live-xxx.svg
27
+ [npm-url]: https://npmjs.org/package/@openremote/or-attribute-input
28
+ [travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
29
+ [travis-url]: https://travis-ci.org/live-js/live-xxx
30
+ [coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
31
+ [coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
package/lib/index.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ import { TemplateResult } from "lit";
2
+ import "@openremote/or-asset-tree";
3
+ import "@openremote/or-translate";
4
+ import "@openremote/or-mwc-components/or-mwc-input";
5
+ import "@openremote/or-mwc-components/or-mwc-list";
6
+ import { OrAssetTreeSelectionEvent } from "@openremote/or-asset-tree";
7
+ import { OrMwcInput } from "@openremote/or-mwc-components/or-mwc-input";
8
+ import { Asset, Attribute, AttributeRef } from "@openremote/model";
9
+ import { DialogAction, DialogActionBase, OrMwcDialog } from "@openremote/or-mwc-components/or-mwc-dialog";
10
+ export declare class OrAttributePickerPickedEvent extends CustomEvent<AttributeRef[]> {
11
+ static readonly NAME = "or-attribute-picker-picked";
12
+ constructor(detail: AttributeRef[]);
13
+ }
14
+ declare global {
15
+ export interface HTMLElementEventMap {
16
+ [OrAttributePickerPickedEvent.NAME]: OrAttributePickerPickedEvent;
17
+ }
18
+ }
19
+ export declare class OrAttributePicker extends OrMwcDialog {
20
+ showOnlyDatapointAttrs?: boolean;
21
+ showOnlyRuleStateAttrs?: boolean;
22
+ attributeFilter?: (attribute: Attribute<any>) => boolean;
23
+ multiSelect?: boolean;
24
+ selectedAttributes: AttributeRef[];
25
+ selectedAssets: string[];
26
+ protected assetAttributes?: (Attribute<any>)[];
27
+ protected asset?: Asset;
28
+ protected addBtn: OrMwcInput;
29
+ constructor();
30
+ setShowOnlyDatapointAttrs(showOnlyDatapointAttrs: boolean | undefined): OrAttributePicker;
31
+ setShowOnlyRuleStateAttrs(showOnlyRuleStateAttrs: boolean | undefined): OrAttributePicker;
32
+ setAttributeFilter(attributeFilter: ((attribute: Attribute<any>) => boolean) | undefined): OrAttributePicker;
33
+ setMultiSelect(multiSelect: boolean | undefined): OrAttributePicker;
34
+ setSelectedAttributes(selectedAttributes: AttributeRef[]): OrAttributePicker;
35
+ setSelectedAssets(selectedAssets: string[]): OrAttributePicker;
36
+ setOpen(isOpen: boolean): OrAttributePicker;
37
+ setHeading(heading: TemplateResult | string | undefined): OrAttributePicker;
38
+ setContent(content: TemplateResult | (() => TemplateResult) | undefined): OrAttributePicker;
39
+ setActions(actions: DialogAction[] | undefined): OrAttributePicker;
40
+ setDismissAction(action: DialogActionBase | null | undefined): OrAttributePicker;
41
+ setStyles(styles: string | TemplateResult | undefined): OrAttributePicker;
42
+ setAvatar(avatar: boolean | undefined): OrAttributePicker;
43
+ protected setDialogActions(): void;
44
+ protected setDialogContent(): void;
45
+ protected _onAssetSelectionChanged(event: OrAssetTreeSelectionEvent): Promise<void>;
46
+ protected _onAttributeSelectionChanged(attributeRefs: AttributeRef[]): void;
47
+ }
package/lib/index.js ADDED
@@ -0,0 +1,31 @@
1
+ var __decorate=this&&this.__decorate||function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n},__awaiter=this&&this.__awaiter||function(t,e,s,i){return new(s||(s=Promise))((function(r,o){function n(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}l((i=i.apply(t,e||[])).next())}))};import{html,unsafeCSS}from"lit";import{customElement,property,query,state}from"lit/decorators.js";import"@openremote/or-asset-tree";import"@openremote/or-translate";import"@openremote/or-mwc-components/or-mwc-input";import"@openremote/or-mwc-components/or-mwc-list";import{InputType}from"@openremote/or-mwc-components/or-mwc-input";import{i18next}from"@openremote/or-translate";import manager,{DefaultColor2,DefaultColor4,DefaultColor5,Util}from"@openremote/core";import{ListType}from"@openremote/or-mwc-components/or-mwc-list";import{OrMwcDialog}from"@openremote/or-mwc-components/or-mwc-dialog";export class OrAttributePickerPickedEvent extends CustomEvent{constructor(t){super(OrAttributePickerPickedEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAttributePickerPickedEvent.NAME="or-attribute-picker-picked";let OrAttributePicker=class extends OrMwcDialog{constructor(){super(),this.showOnlyDatapointAttrs=!1,this.showOnlyRuleStateAttrs=!1,this.multiSelect=!1,this.selectedAttributes=[],this.selectedAssets=[],this.heading=i18next.t("selectAttributes"),this.setDialogContent(),this.setDialogActions(),this.dismissAction=null,this.styles=`\n .attributes-header {\n line-height: 48px;\n padding: 0 15px;\n background-color: ${unsafeCSS(DefaultColor2)};\n font-weight: bold;\n border-bottom: 1px solid ${unsafeCSS(DefaultColor2)};\n }\n footer.mdc-dialog__actions {\n border-top: 1px solid ${unsafeCSS(DefaultColor5)};\n }\n #header {\n background-color: ${unsafeCSS(DefaultColor4)} !important;\n }\n #dialog-content {\n padding: 0;\n }\n `}setShowOnlyDatapointAttrs(t){return this.showOnlyDatapointAttrs=t,this}setShowOnlyRuleStateAttrs(t){return this.showOnlyRuleStateAttrs=t,this}setAttributeFilter(t){return this.attributeFilter=t,this}setMultiSelect(t){return this.multiSelect=t,this}setSelectedAttributes(t){return this.selectedAttributes=t,this}setSelectedAssets(t){return this.selectedAssets=t,this.setDialogContent(),this}setOpen(t){return super.setOpen(t),this}setHeading(t){return super.setHeading(t),this}setContent(t){throw new Error("Cannot modify attribute picker content")}setActions(t){throw new Error("Cannot modify attribute picker actions")}setDismissAction(t){throw new Error("Cannot modify attribute picker dismiss action")}setStyles(t){throw new Error("Cannot modify attribute picker styles")}setAvatar(t){throw new Error("Cannot modify attribute picker avatar setting")}setDialogActions(){this.actions=[{actionName:"cancel",content:"cancel"},{actionName:"add",content:html`<or-mwc-input id="add-btn" class="button" label="add"
2
+ .type="${InputType.BUTTON}" ?disabled="${!this.selectedAttributes.length}"
3
+ @or-mwc-input-changed="${t=>{if(!this.selectedAttributes.length)return t.stopPropagation(),!1}}"></or-mwc-input>`,action:()=>{this.selectedAttributes.length&&this.dispatchEvent(new OrAttributePickerPickedEvent(this.selectedAttributes))}}]}setDialogContent(){const t=()=>this.assetAttributes?this.assetAttributes.map((t=>({text:Util.getAttributeLabel(void 0,t,void 0,!0),value:t.name}))):[];let e;!this.multiSelect&&1===this.selectedAttributes.length&&this.selectedAttributes[0].name&&(e={text:Util.getAttributeLabel(void 0,this.selectedAttributes[0],void 0,!0),value:this.selectedAttributes[0].name}),this.content=()=>html`
4
+ <div class="row" style="display: flex;height: 600px;width: 800px;border-top: 1px solid ${unsafeCSS(DefaultColor5)};">
5
+ <div class="col" style="width: 260px;overflow: auto;border-right: 1px solid ${unsafeCSS(DefaultColor5)};">
6
+ <or-asset-tree id="chart-asset-tree" readonly
7
+ .selectedIds="${this.selectedAssets.length>0?this.selectedAssets:null}"
8
+ @or-asset-tree-selection="${t=>this._onAssetSelectionChanged(t)}">
9
+ </or-asset-tree>
10
+ </div>
11
+ <div class="col" style="flex: 1 1 auto;width: 260px;overflow: auto;">
12
+ ${this.assetAttributes&&this.assetAttributes.length>0?html`
13
+ <div class="attributes-header">
14
+ <or-translate value="attribute_plural"></or-translate>
15
+ </div>
16
+ ${this.multiSelect?html`<div style="display: grid">
17
+ <or-mwc-list
18
+ id="attribute-selector" .type="${ListType.MULTI_CHECKBOX}" .listItems="${t()}"
19
+ .values="${this.selectedAttributes.filter((t=>t.id===this.asset.id)).map((t=>t.name))}"
20
+ @or-mwc-list-changed="${t=>this._onAttributeSelectionChanged([...this.selectedAttributes.filter((t=>t.id!==this.asset.id)),...t.detail.map((t=>({id:this.asset.id,name:t.value})))])}"></or-mwc-list>
21
+ </div>`:html`<or-mwc-input id="attribute-selector"
22
+ style="display:flex;"
23
+ .label="${i18next.t("attribute")}"
24
+ .type="${InputType.LIST}"
25
+ .options="${t().map((t=>[t,t.text]))}"
26
+ @or-mwc-input-changed="${t=>{this._onAttributeSelectionChanged([{id:this.asset.id,name:t.detail.value.value}])}}"></or-mwc-input>`}
27
+ `:html`<div style="display: flex;align-items: center;text-align: center;height: 100%;padding: 0 20px;"><span style="width:100%">
28
+ <or-translate value="${this.assetAttributes&&0===this.assetAttributes.length?this.showOnlyDatapointAttrs&&this.showOnlyRuleStateAttrs?"noDatapointsOrRuleStateAttributes":this.showOnlyDatapointAttrs?"noDatapointsAttributes":this.showOnlyRuleStateAttrs?"noRuleStateAttributes":"noAttributesToShow":"selectAssetOnTheLeft"}">
29
+ </or-translate></span></div>`}
30
+ </div>
31
+ `}_onAssetSelectionChanged(t){return __awaiter(this,void 0,void 0,(function*(){this.assetAttributes=void 0,this.multiSelect||(this.selectedAttributes=[]),this.addBtn.disabled=0===this.selectedAttributes.length;const e=t.target;e.disabled=!0;let s=0===t.detail.newNodes.length?void 0:t.detail.newNodes[0].asset;if(this.asset=s,s){const t=yield manager.rest.api.AssetResource.get(s.id);s=t.data,s&&(this.assetAttributes=Object.values(s.attributes).map((t=>Object.assign(Object.assign({},t),{id:s.id}))).sort(Util.sortByString((t=>t.name))),this.attributeFilter&&(this.assetAttributes=this.assetAttributes.filter((t=>this.attributeFilter(t)))),this.showOnlyDatapointAttrs&&this.showOnlyRuleStateAttrs?this.assetAttributes=this.assetAttributes.filter((t=>t.meta&&(t.meta.storeDataPoints||t.meta.ruleState||t.meta.agentLink))):this.showOnlyDatapointAttrs?this.assetAttributes=this.assetAttributes.filter((t=>t.meta&&(t.meta.storeDataPoints||t.meta.agentLink))):this.showOnlyRuleStateAttrs&&(this.assetAttributes=this.assetAttributes.filter((t=>t.meta&&(t.meta.ruleState||t.meta.agentLink)))))}e.disabled=!1}))}_onAttributeSelectionChanged(t){this.selectedAttributes=t,this.addBtn.disabled=0===this.selectedAttributes.length}};__decorate([property({type:Boolean})],OrAttributePicker.prototype,"showOnlyDatapointAttrs",void 0),__decorate([property({type:Boolean})],OrAttributePicker.prototype,"showOnlyRuleStateAttrs",void 0),__decorate([property()],OrAttributePicker.prototype,"attributeFilter",void 0),__decorate([property({type:Boolean})],OrAttributePicker.prototype,"multiSelect",void 0),__decorate([state()],OrAttributePicker.prototype,"assetAttributes",void 0),__decorate([query("#add-btn")],OrAttributePicker.prototype,"addBtn",void 0),OrAttributePicker=__decorate([customElement("or-attribute-picker")],OrAttributePicker);export{OrAttributePicker};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,IAAI,EAAkB,SAAS,EAAC,MAAM,KAAK,CAAC;AACpD,OAAO,EAAC,aAAa,EAAE,QAAQ,E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a,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,KAAK,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AA3PU;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;iEACsB;AAGzC;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;iEACsB;AAIzC;IADN,QAAQ,EAAE;0DACqD;AAIzD;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;sDACW;AAM3B;IADT,KAAK,EAAE;0DACuC;AAIrC;IADT,KAAK,CAAC,UAAU,CAAC;iDACY;AAxBrB,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA8P7B"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@openremote/or-attribute-picker",
3
+ "version": "1.2.0-snapshot.20240512155932",
4
+ "description": "OpenRemote attribute picker dialog",
5
+ "main": "dist/umd/index.bundle.js",
6
+ "module": "lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./*": "./lib/*.js"
10
+ },
11
+ "types": "lib/index.d.ts",
12
+ "scripts": {
13
+ "test": "echo \"No tests\" && exit 0",
14
+ "prepublishOnly": "npx webpack"
15
+ },
16
+ "author": "OpenRemote",
17
+ "license": "AGPL-3.0-or-later",
18
+ "dependencies": {
19
+ "@openremote/core": "1.2.0-snapshot.20240512155932",
20
+ "@openremote/or-asset-tree": "1.2.0-snapshot.20240512155932",
21
+ "@openremote/or-mwc-components": "1.2.0-snapshot.20240512155932",
22
+ "@openremote/or-translate": "1.2.0-snapshot.20240512155932",
23
+ "lit": "^2.0.2"
24
+ },
25
+ "devDependencies": {
26
+ "@openremote/util": "1.2.0-snapshot.20240512155932"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ }
31
+ }