@openremote/or-tree-menu 1.8.0-snapshot.20250723094757 → 1.8.0-snapshot.20250725074716
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/dist/umd/index.bundle.js +124 -122
- package/dist/umd/index.bundle.js.map +1 -0
- package/dist/umd/index.js +124 -122
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/index.orbundle.js +131 -129
- package/dist/umd/index.orbundle.js.map +1 -0
- package/lib/index.js +18 -18
- package/lib/or-tree-group.js +5 -5
- package/lib/or-tree-node.js +3 -3
- package/lib/util.js +1 -1
- package/package.json +6 -6
- package/rspack.config.js +13 -0
- package/dist/umd/index.bundle.js.LICENSE.txt +0 -136
- package/dist/umd/index.js.LICENSE.txt +0 -136
- package/dist/umd/index.orbundle.js.LICENSE.txt +0 -166
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var
|
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},__awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function s(e){try{d(o.next(e))}catch(e){n(e)}}function l(e){try{d(o.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,l)}d((o=o.apply(e,t||[])).next())})};import{css as e,html as t,LitElement as r}from"lit";import{customElement as o,property as i,queryAll as n}from"lit/decorators.js";import{map as s}from"lit/directives/map.js";import{when as l}from"lit/directives/when.js";import{InputType as d}from"@openremote/or-mwc-components/or-mwc-input";import{getContentWithMenuTemplate as a}from"@openremote/or-mwc-components/or-mwc-menu";import{Util as h}from"@openremote/core";import{moveNodesToGroupNode as p}from"./util";import{OrTreeDragEvent as c,OrTreeSelectEvent as u,TreeMenuSelection as g,TreeMenuSorting as _}from"./model";import{i18next as f}from"@openremote/or-translate";import"./or-tree-group";import"./or-tree-node";export*from"./or-tree-group";export*from"./or-tree-node";export*from"./model";let styles=e`
|
|
2
2
|
* {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
}
|
|
@@ -50,48 +50,48 @@ var __decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length
|
|
|
50
50
|
display: flex;
|
|
51
51
|
align-items: center;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
`,OrTreeMenu=class extends r{constructor(){super(...arguments),this.nodes=[],this.selection=g.LEAF,this.draggable=!1,this.noHeader=!1,this.menuTitle="Tree Menu",this.sortBy=_.A_TO_Z,this.groupFirst=!1,this._treeNodeCache=new Map}static get styles(){return[styles]}willUpdate(e){return(e.has("nodes")||e.has("sortBy")||e.has("groupFirst"))&&this.nodes&&(this.nodes=this._sortNodes(this.nodes,this.sortBy,this.groupFirst)),e.has("selection")&&e.get("selection")&&this.selection&&this.deselectAllNodes(),super.willUpdate(e)}render(){return t`
|
|
54
54
|
<div id="tree-container">
|
|
55
|
-
${
|
|
55
|
+
${l(!this.noHeader,()=>this._getHeaderTemplate())}
|
|
56
56
|
${this._getTreeTemplate(this.nodes)}
|
|
57
57
|
${this._getErrorTemplate()}
|
|
58
58
|
</div>
|
|
59
|
-
`}moveNodesToGroup(e,t){this.nodes=
|
|
59
|
+
`}moveNodesToGroup(e,t){this.nodes=p(e,t,this.nodes)}_getTreeTemplate(e){return this._treeNodeCache=new Map,t`
|
|
60
60
|
<ol id="tree-list" @dragover=${this._onDragOverList} @drop=${this._onDragDropList}>
|
|
61
|
-
${
|
|
61
|
+
${s(e,e=>this._getNodeTemplate(e))}
|
|
62
62
|
</ol>
|
|
63
|
-
`}_getNodeTemplate(e,t){return e.children?this._getGroupNodeTemplate(e,t):this._getSingleNodeTemplate(e,t)}_getSingleNodeTemplate(e,
|
|
63
|
+
`}_getNodeTemplate(e,t){return e.children?this._getGroupNodeTemplate(e,t):this._getSingleNodeTemplate(e,t)}_getSingleNodeTemplate(e,r){let o=this._setTreeNodeId(e);return t`
|
|
64
64
|
<li draggable=${this.draggable}
|
|
65
65
|
@dragstart=${t=>this._onDragStart(t,e)}
|
|
66
|
-
@dragover=${
|
|
67
|
-
@dragleave=${
|
|
68
|
-
@drop=${
|
|
69
|
-
<or-tree-node id=${
|
|
66
|
+
@dragover=${t=>this._onDragOverSingleNode(t,e,r)}
|
|
67
|
+
@dragleave=${t=>this._onDragLeaveSingleNode(t,e,r)}
|
|
68
|
+
@drop=${t=>this._onDragDropSingleNode(t,e,r)}>
|
|
69
|
+
<or-tree-node id=${o} ?selected=${e.selected} ?readonly=${e.readonly} @click="${this._onTreeNodeClick}">
|
|
70
70
|
${this._getSingleNodeSlotTemplate(e)}
|
|
71
71
|
</or-tree-node>
|
|
72
72
|
</li>
|
|
73
|
-
`}_getSingleNodeSlotTemplate(e){return
|
|
73
|
+
`}_getSingleNodeSlotTemplate(e){return t`
|
|
74
74
|
<or-icon slot="prefix" icon="flag"></or-icon>
|
|
75
75
|
<span>${e.label}</span>
|
|
76
76
|
<span slot="suffix"></span>
|
|
77
|
-
`}_getGroupNodeTemplate(e,
|
|
77
|
+
`}_getGroupNodeTemplate(e,r){let o=this.selection===g.LEAF,i=this._setTreeNodeId(e);return t`
|
|
78
78
|
<li>
|
|
79
|
-
<or-tree-group ?leaf=${
|
|
80
|
-
<or-tree-node slot="parent" id=${
|
|
79
|
+
<or-tree-group ?leaf=${o} ?expanded=${e.expanded}>
|
|
80
|
+
<or-tree-node slot="parent" id=${i} ?readonly=${o}
|
|
81
81
|
@click=${this._onTreeGroupClick}
|
|
82
82
|
@dragover=${t=>this._onDragOverGroup(t,e)}
|
|
83
83
|
@dragleave=${t=>this._onDragLeaveGroup(t,e)}
|
|
84
84
|
@drop=${t=>this._onDragDropGroup(t,e)}>
|
|
85
85
|
${this._getGroupNodeSlotTemplate(e)}
|
|
86
86
|
</or-tree-node>
|
|
87
|
-
${
|
|
87
|
+
${s(e.children,t=>this._getNodeTemplate(t,e))}
|
|
88
88
|
</or-tree-group>
|
|
89
89
|
</li>
|
|
90
|
-
`}_getGroupNodeSlotTemplate(e){return
|
|
90
|
+
`}_getGroupNodeSlotTemplate(e){return t`
|
|
91
91
|
<or-icon slot="prefix" icon="folder"></or-icon>
|
|
92
92
|
<span>${e.label}</span>
|
|
93
93
|
<span slot="suffix"></span>
|
|
94
|
-
`}_getHeaderTemplate(){return
|
|
94
|
+
`}_getHeaderTemplate(){return t`
|
|
95
95
|
<div id="tree-header">
|
|
96
96
|
<h3 id="tree-header-title">
|
|
97
97
|
<or-translate value=${this.menuTitle}></or-translate>
|
|
@@ -100,4 +100,4 @@ var __decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length
|
|
|
100
100
|
${this._getSortActionTemplate(this.sortBy,this.sortOptions)}
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
103
|
-
`}_getSortActionTemplate(e,
|
|
103
|
+
`}_getSortActionTemplate(e,r){return a(t`<or-mwc-input type=${d.BUTTON} icon="sort-variant" title="${f.t("sort")}"></or-mwc-input>`,(r||[]).map(e=>({value:e,text:e})),e,e=>this._onSortClick(String(e)))}_getErrorTemplate(){return t``}_onSortClick(e){this.sortBy=e}_onTreeGroupClick(e){let t=e.currentTarget,r=t.parentElement,o=(e,t)=>{e.select(),this._lastSelectedNode=t,this._notifyNodesSelect()};switch(this.selection){case g.LEAF:return;case g.MULTI:if(e.shiftKey&&this._lastSelectedNode){let e=Array.from(this._uiNodes||[]),t=r.getGroupNode();if(t){let r=e.indexOf(t),o=e.indexOf(this._lastSelectedNode);this._selectNodesBetween(e,r,o);return}}else if(e.ctrlKey)return void o(r,t);this.deselectAllNodes(),o(r,t);return;case g.SINGLE:this.deselectAllNodes(),o(r,t);return}}_onTreeNodeClick(e){let t=e.currentTarget;if(t)if(this.selection===g.MULTI){if(e.shiftKey&&this._lastSelectedNode){let e=Array.from(this._uiNodes||[]),r=e.indexOf(this._lastSelectedNode),o=e.indexOf(t);if(r>-1&&o>-1)return void this._selectNodesBetween(e,r,o)}else if(e.ctrlKey)return void this._selectNode(t);this.deselectAllNodes(),this._selectNode(t);return}else{this.deselectAllNodes(),this._selectNode(t);return}}_onDragStart(e,t){var r;e.target?null==(r=e.dataTransfer)||r.setData("treeNode",JSON.stringify(t)):e.preventDefault()}_onDragOverList(e){this.draggable&&e.preventDefault()}_onDragOverSingleNode(e,t,r){if(this.draggable&&(e.preventDefault(),r)){let e=this._getUiNodeFromTree(r);null==e||e.setAttribute("drophover","true")}}_onDragOverGroup(e,t){this.draggable&&(e.preventDefault(),e.currentTarget.setAttribute("drophover","true"))}_onDragLeaveSingleNode(e,t,r){if(r&&this.draggable){e.preventDefault();let t=this._getUiNodeFromTree(r);null==t||t.removeAttribute("drophover")}}_onDragLeaveGroup(e,t){this.draggable&&e.currentTarget.removeAttribute("drophover")}_onDragDropList(e){this._onDragDropGroup(e)}_onDragDropSingleNode(e,t,r){this._onDragDropGroup(e,r)}_onDragDropGroup(e,t){var r,o;if(this.draggable){e.preventDefault(),e.stopPropagation(),t&&(null==(r=this._getUiNodeFromTree(t))||r.removeAttribute("drophover"));let i=[],n=null==(o=e.dataTransfer)?void 0:o.getData("treeNode");if(n){let e=JSON.parse(n);e&&i.push(e)}if(this.selection===g.MULTI){let e=this._findSelectedTreeNodes();(e=e.filter(e=>!e.children)).length>0&&(this.deselectAllNodes(),i.push(...e.filter(e=>!i.find(t=>JSON.stringify(t)===JSON.stringify(e)))))}(null==t?void 0:t.children)&&(i=i.filter(e=>{var r;return!(null==(r=t.children)?void 0:r.find(t=>t.id===e.id))})),i.length>0&&this._dispatchCancellableDragEvent(i,t,this.nodes).then(()=>{this.nodes=p(i,t,this.nodes)}).catch(e=>{})}}_dispatchCancellableDragEvent(e,t,r=[]){return new Promise((o,i)=>{this.dispatchEvent(new c(e,t,r))?o():i()})}_selectNode(e,t=!0){if(e){if(t){let t=[...this._findSelectedTreeNodes()],r=this._getTreeNodeFromTree(e);if(r&&t.push(r),!this._dispatchSelectEvent(t))return}e.selected=!0,this._lastSelectedNode=e}}_selectNodesBetween(e,t,r,o=!0){let i=[];if(t<r)for(let o=t;o<=r;o++)i.push(e[o]);else if(t>r)for(let o=r;o<=t;o++)i.push(e[o]);if(o){let e=i.map(e=>this._getTreeNodeFromTree(e)).filter(e=>e);if(!this._notifyNodesSelect(e))return}i.forEach(e=>this._selectNode(e))}_notifyNodesSelect(e){return __awaiter(this,void 0,void 0,function*(){return yield this.getUpdateComplete(),e||(e=this._findSelectedTreeNodes()),this._dispatchSelectEvent(e)})}_findSelectedTreeNodes(e=Array.from(this._uiNodes||[]),t=this._treeNodeCache){let r=e.filter(e=>e.selected),o=Array.from(t.entries());return r.map(e=>o.find(t=>t[1]===e.id)).map(e=>null==e?void 0:e[0]).filter(e=>void 0!==e)}_getTreeNodeFromTree(e,t=this._treeNodeCache){var r;return null==(r=Array.from(t.entries()).find(t=>t[1]===e.id))?void 0:r[0]}_getUiNodeFromTree(e,t=this._treeNodeCache){var r;let o=Array.from(t.entries()),i=JSON.stringify(e),n=null==(r=o.find(e=>JSON.stringify(e[0])===i))?void 0:r[1];return n?this.shadowRoot.getElementById(n):void 0}_dispatchSelectEvent(e){return this.dispatchEvent(new u(e||[]))}deselectAllNodes(){(this._uiGroups||[]).forEach(e=>e.deselect()),(this._uiNodes||[]).forEach(e=>e.selected=!1)}_sortNodes(e,t,r=!1){console.debug(`Sorting nodes in the tree menu using '${t}'`);let o=e.filter(e=>void 0!==e.children);if(o.forEach(e=>{var r;return null==(r=e.children)?void 0:r.sort(this._getSortFunction(t))}),r){let r=e.filter(e=>void 0===e.children);return o.sort(this._getSortFunction(t)),r.sort(this._getSortFunction(t)),[...o,...r]}return e.sort(this._getSortFunction(t))}_setTreeNodeId(e,t=Math.random().toString(36).substring(2,11)){return this._treeNodeCache.get(e)?this._treeNodeCache.get(e):(this._treeNodeCache.set(e,t),t)}_getSortFunction(e){return e===_.Z_TO_A?(e,t)=>t.label.localeCompare(e.label):h.sortByString(e=>e.label)}expandGroup(e){this.updateComplete.then(()=>{let t=this.nodes.find(t=>t.id===e&&t.children);t&&(t.expanded=!0,this.requestUpdate())})}};__decorate([i({type:Array})],OrTreeMenu.prototype,"nodes",void 0),__decorate([i({type:String})],OrTreeMenu.prototype,"selection",void 0),__decorate([i({type:Boolean})],OrTreeMenu.prototype,"draggable",void 0),__decorate([i({type:Boolean,attribute:"no-header"})],OrTreeMenu.prototype,"noHeader",void 0),__decorate([i({type:String,attribute:"menu-title"})],OrTreeMenu.prototype,"menuTitle",void 0),__decorate([i({type:Array,attribute:"sort-options"})],OrTreeMenu.prototype,"sortOptions",void 0),__decorate([i({type:String,attribute:"sort-by",reflect:!0})],OrTreeMenu.prototype,"sortBy",void 0),__decorate([i({type:Boolean,attribute:"group-first"})],OrTreeMenu.prototype,"groupFirst",void 0),__decorate([n("or-tree-node")],OrTreeMenu.prototype,"_uiNodes",void 0),__decorate([n("or-tree-group")],OrTreeMenu.prototype,"_uiGroups",void 0),OrTreeMenu=__decorate([o("or-tree-menu")],OrTreeMenu);export{OrTreeMenu};
|
package/lib/or-tree-group.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,t,o,r){var n,
|
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,o,r){var n,l=arguments.length,s=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(s=(l<3?n(s):l>3?n(t,o,s):n(t,o))||s);return l>3&&s&&Object.defineProperty(t,o,s),s};import{css as e,html as t,LitElement as o}from"lit";import{customElement as r,property as n,queryAssignedElements as l}from"lit/decorators.js";import{when as s}from"lit/directives/when.js";let getStyles=()=>e`
|
|
2
2
|
* {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
}
|
|
@@ -36,14 +36,14 @@ var __decorate=this&&this.__decorate||function(e,t,o,r){var n,s=arguments.length
|
|
|
36
36
|
:host(:not([readonly])) > #chevron {
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
${
|
|
39
|
+
`,OrTreeGroup=class extends o{constructor(){super(...arguments),this.expanded=!1,this.leaf=!1,this.readonly=!1,this._slotClickListener=e=>this.leaf?this._onExpandToggle(e):null,this._chevronClickListener=e=>this._onExpandToggle(e)}static get styles(){return[getStyles()]}select(){let e=this.getGroupNode();!this.leaf&&e&&(e.selected=!0)}selectAll(){this.select(),this.getChildNodes().forEach(e=>e.selected=!0)}deselect(){let e=this.getGroupNode();e&&(e.selected=!1)}deselectAll(){this.deselect(),this.getChildNodes().forEach(e=>e.selected=!1)}getGroupNode(){var e;return null==(e=this._parentNodes)?void 0:e[0]}getChildNodes(){return Array.from(this._childNodes||[]).map(e=>e.querySelector("or-tree-node")).filter(e=>null!=e)}firstUpdated(e){var t;return null==(t=this._parentNodes)||t.forEach(e=>{e.addEventListener("click",this._slotClickListener)}),super.firstUpdated(e)}disconnectedCallback(){var e;null==(e=this._parentNodes)||e.forEach(e=>{e.removeEventListener("click",this._slotClickListener)}),super.disconnectedCallback()}render(){return t`
|
|
40
|
+
${s(!this.readonly,()=>this._getIconTemplate(this.expanded))}
|
|
41
41
|
<slot name="parent"></slot>
|
|
42
42
|
<ol ?hidden=${!this.expanded}>
|
|
43
43
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
44
44
|
</ol>
|
|
45
|
-
`}_getIconTemplate(e=!1){return
|
|
45
|
+
`}_getIconTemplate(e=!1){return t`
|
|
46
46
|
<or-icon id="chevron" part="chevron" icon="${e?"chevron-down":"chevron-right"}"
|
|
47
47
|
@click="${this._chevronClickListener}"
|
|
48
48
|
></or-icon>
|
|
49
|
-
`}_onExpandToggle(e){this.expanded=!this.expanded}_onSlotChange(e){this._applyIndentToChildren()}_applyIndentToChildren(e=this.getChildNodes()){e.forEach(
|
|
49
|
+
`}_onExpandToggle(e){this.expanded=!this.expanded}_onSlotChange(e){this._applyIndentToChildren()}_applyIndentToChildren(e=this.getChildNodes()){e.forEach(e=>{let t=(e=>{let t=0;for(;e;)"or-tree-group"===e.tagName.toLowerCase()&&t++,e=e.parentElement;return t})(e);"parent"===e.slot&&t--,e.style.setProperty("--or-tree-node-indent",`${24+12*t}px`)})}};__decorate([n({type:Boolean,reflect:!0})],OrTreeGroup.prototype,"expanded",void 0),__decorate([n({type:Boolean})],OrTreeGroup.prototype,"leaf",void 0),__decorate([n({type:Boolean})],OrTreeGroup.prototype,"readonly",void 0),__decorate([l({slot:void 0})],OrTreeGroup.prototype,"_childNodes",void 0),__decorate([l({slot:"parent"})],OrTreeGroup.prototype,"_parentNodes",void 0),OrTreeGroup=__decorate([r("or-tree-group")],OrTreeGroup);export{OrTreeGroup};
|
package/lib/or-tree-node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,r,o,t){var n
|
|
1
|
+
var __decorate=this&&this.__decorate||function(e,r,o,t){var d,n=arguments.length,l=n<3?r:null===t?t=Object.getOwnPropertyDescriptor(r,o):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,r,o,t);else for(var s=e.length-1;s>=0;s--)(d=e[s])&&(l=(n<3?d(l):n>3?d(r,o,l):d(r,o))||l);return n>3&&l&&Object.defineProperty(r,o,l),l};import{css as e,html as r,LitElement as o}from"lit";import{customElement as t,property as d}from"lit/decorators.js";let styles=e`
|
|
2
2
|
* {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
}
|
|
@@ -36,8 +36,8 @@ var __decorate=this&&this.__decorate||function(e,r,o,t){var n,d=arguments.length
|
|
|
36
36
|
::slotted(*:not([slot])) {
|
|
37
37
|
flex: 1;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
`,OrTreeNode=class extends o{constructor(){super(...arguments),this.readonly=!1,this.selected=!1}static get styles(){return[styles]}render(){return r`
|
|
40
40
|
<slot name="prefix"></slot>
|
|
41
41
|
<slot></slot>
|
|
42
42
|
<slot name="suffix"></slot>
|
|
43
|
-
`}};__decorate([
|
|
43
|
+
`}};__decorate([d({type:Boolean,reflect:!0})],OrTreeNode.prototype,"readonly",void 0),__decorate([d({type:Boolean,reflect:!0})],OrTreeNode.prototype,"selected",void 0),OrTreeNode=__decorate([t("or-tree-node")],OrTreeNode);export{OrTreeNode};
|
package/lib/util.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function moveNodesToGroupNode(e,n,o=[]){console.debug(`Moving nodes '${e.map(
|
|
1
|
+
export function moveNodesToGroupNode(e,n,o=[]){console.debug(`Moving nodes '${e.map(e=>e.label).join(", ")}' into group '${null==n?void 0:n.label}'. Tree nodes are`,n);let l=function o(l){return l.map(l=>{if(e.some(e=>l.id===e.id))return console.debug("Removed the node from original position."),null;let i=Object.assign({},l);return i.children&&(i.children=o(i.children).filter(e=>null!==e)),n&&l.id===(null==n?void 0:n.id)&&e.forEach(e=>{i.children=i.children?[...i.children,e]:[e]}),i}).filter(e=>null!==e)}(o);return n||l.push(...e),l}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openremote/or-tree-menu",
|
|
3
|
-
"version": "1.8.0-snapshot.
|
|
3
|
+
"version": "1.8.0-snapshot.20250725074716",
|
|
4
4
|
"description": "Web Component for displaying a tree menu of items with a predefined hierarchy",
|
|
5
5
|
"customElements": "custom-elements.json",
|
|
6
6
|
"main": "dist/umd/index.bundle.js",
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"analyze": "npx cem analyze --config ../custom-elements-manifest.config.mjs",
|
|
15
15
|
"test": "echo \"No tests\" && exit 0",
|
|
16
|
-
"prepack": "npx
|
|
16
|
+
"prepack": "npx rspack"
|
|
17
17
|
},
|
|
18
18
|
"author": "OpenRemote",
|
|
19
19
|
"license": "AGPL-3.0-or-later",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@mdi/js": "^5.9.55",
|
|
22
|
-
"@openremote/core": "1.8.0-snapshot.
|
|
23
|
-
"@openremote/or-mwc-components": "1.8.0-snapshot.
|
|
24
|
-
"@openremote/or-translate": "1.8.0-snapshot.
|
|
22
|
+
"@openremote/core": "1.8.0-snapshot.20250725074716",
|
|
23
|
+
"@openremote/or-mwc-components": "1.8.0-snapshot.20250725074716",
|
|
24
|
+
"@openremote/or-translate": "1.8.0-snapshot.20250725074716",
|
|
25
25
|
"lit": "^3.2.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@openremote/util": "1.8.0-snapshot.
|
|
28
|
+
"@openremote/util": "1.8.0-snapshot.20250725074716"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
package/rspack.config.js
ADDED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2016 Google Inc.
|
|
19
|
-
*
|
|
20
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
22
|
-
* in the Software without restriction, including without limitation the rights
|
|
23
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
25
|
-
* furnished to do so, subject to the following conditions:
|
|
26
|
-
*
|
|
27
|
-
* The above copyright notice and this permission notice shall be included in
|
|
28
|
-
* all copies or substantial portions of the Software.
|
|
29
|
-
*
|
|
30
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
36
|
-
* THE SOFTWARE.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @license
|
|
41
|
-
* Copyright 2017 Google LLC
|
|
42
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @license
|
|
47
|
-
* Copyright 2018 Google Inc.
|
|
48
|
-
*
|
|
49
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
50
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
51
|
-
* in the Software without restriction, including without limitation the rights
|
|
52
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
53
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
54
|
-
* furnished to do so, subject to the following conditions:
|
|
55
|
-
*
|
|
56
|
-
* The above copyright notice and this permission notice shall be included in
|
|
57
|
-
* all copies or substantial portions of the Software.
|
|
58
|
-
*
|
|
59
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
60
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
61
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
62
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
63
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
64
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
65
|
-
* THE SOFTWARE.
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @license
|
|
70
|
-
* Copyright 2018 Google LLC
|
|
71
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @license
|
|
76
|
-
* Copyright 2019 Google Inc.
|
|
77
|
-
*
|
|
78
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
79
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
80
|
-
* in the Software without restriction, including without limitation the rights
|
|
81
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
82
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
83
|
-
* furnished to do so, subject to the following conditions:
|
|
84
|
-
*
|
|
85
|
-
* The above copyright notice and this permission notice shall be included in
|
|
86
|
-
* all copies or substantial portions of the Software.
|
|
87
|
-
*
|
|
88
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
89
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
90
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
91
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
92
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
93
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
94
|
-
* THE SOFTWARE.
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* @license
|
|
99
|
-
* Copyright 2019 Google LLC
|
|
100
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @license
|
|
105
|
-
* Copyright 2020 Google Inc.
|
|
106
|
-
*
|
|
107
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
108
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
109
|
-
* in the Software without restriction, including without limitation the rights
|
|
110
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
111
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
112
|
-
* furnished to do so, subject to the following conditions:
|
|
113
|
-
*
|
|
114
|
-
* The above copyright notice and this permission notice shall be included in
|
|
115
|
-
* all copies or substantial portions of the Software.
|
|
116
|
-
*
|
|
117
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
118
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
119
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
120
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
121
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
122
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
123
|
-
* THE SOFTWARE.
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @license
|
|
128
|
-
* Copyright 2020 Google LLC
|
|
129
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @license
|
|
134
|
-
* Copyright 2021 Google LLC
|
|
135
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
136
|
-
*/
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2016 Google Inc.
|
|
19
|
-
*
|
|
20
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
22
|
-
* in the Software without restriction, including without limitation the rights
|
|
23
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
25
|
-
* furnished to do so, subject to the following conditions:
|
|
26
|
-
*
|
|
27
|
-
* The above copyright notice and this permission notice shall be included in
|
|
28
|
-
* all copies or substantial portions of the Software.
|
|
29
|
-
*
|
|
30
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
36
|
-
* THE SOFTWARE.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @license
|
|
41
|
-
* Copyright 2017 Google LLC
|
|
42
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @license
|
|
47
|
-
* Copyright 2018 Google Inc.
|
|
48
|
-
*
|
|
49
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
50
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
51
|
-
* in the Software without restriction, including without limitation the rights
|
|
52
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
53
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
54
|
-
* furnished to do so, subject to the following conditions:
|
|
55
|
-
*
|
|
56
|
-
* The above copyright notice and this permission notice shall be included in
|
|
57
|
-
* all copies or substantial portions of the Software.
|
|
58
|
-
*
|
|
59
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
60
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
61
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
62
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
63
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
64
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
65
|
-
* THE SOFTWARE.
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @license
|
|
70
|
-
* Copyright 2018 Google LLC
|
|
71
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @license
|
|
76
|
-
* Copyright 2019 Google Inc.
|
|
77
|
-
*
|
|
78
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
79
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
80
|
-
* in the Software without restriction, including without limitation the rights
|
|
81
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
82
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
83
|
-
* furnished to do so, subject to the following conditions:
|
|
84
|
-
*
|
|
85
|
-
* The above copyright notice and this permission notice shall be included in
|
|
86
|
-
* all copies or substantial portions of the Software.
|
|
87
|
-
*
|
|
88
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
89
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
90
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
91
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
92
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
93
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
94
|
-
* THE SOFTWARE.
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* @license
|
|
99
|
-
* Copyright 2019 Google LLC
|
|
100
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @license
|
|
105
|
-
* Copyright 2020 Google Inc.
|
|
106
|
-
*
|
|
107
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
108
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
109
|
-
* in the Software without restriction, including without limitation the rights
|
|
110
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
111
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
112
|
-
* furnished to do so, subject to the following conditions:
|
|
113
|
-
*
|
|
114
|
-
* The above copyright notice and this permission notice shall be included in
|
|
115
|
-
* all copies or substantial portions of the Software.
|
|
116
|
-
*
|
|
117
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
118
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
119
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
120
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
121
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
122
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
123
|
-
* THE SOFTWARE.
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @license
|
|
128
|
-
* Copyright 2020 Google LLC
|
|
129
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @license
|
|
134
|
-
* Copyright 2021 Google LLC
|
|
135
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
136
|
-
*/
|