@openremote/or-components 1.8.0-snapshot.20250725070921 → 1.8.0-snapshot.20250725120000
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 +31 -31
- package/lib/or-ace-editor.js +165 -22
- package/lib/or-collapsible-panel.js +161 -91
- package/lib/or-file-uploader.d.ts +1 -1
- package/lib/or-file-uploader.js +186 -76
- package/lib/or-form.d.ts +1 -1
- package/lib/or-form.js +77 -12
- package/lib/or-loading-indicator.d.ts +1 -1
- package/lib/or-loading-indicator.js +122 -72
- package/lib/or-loading-wrapper.js +77 -32
- package/lib/or-panel.js +96 -56
- package/package.json +4 -4
|
@@ -1,32 +1,77 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
/**
|
|
10
|
+
* A simple loading wrapper around some other content that will hide the content whilst loading property is true
|
|
11
|
+
*/
|
|
12
|
+
let OrLoadingWrapper = class OrLoadingWrapper extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.loadDom = true;
|
|
16
|
+
this.fadeContent = false;
|
|
17
|
+
this.loading = false;
|
|
18
|
+
}
|
|
19
|
+
// language=CSS
|
|
20
|
+
static get styles() {
|
|
21
|
+
return css `
|
|
22
|
+
:host {
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.hidden {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.faded {
|
|
31
|
+
opacity: 0.5;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#wrapper {
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#loader {
|
|
39
|
+
position: absolute;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return html `
|
|
47
|
+
<div id="wrapper">
|
|
48
|
+
${this.loading ? html `<div id="loader">LOADING</div>` : ``}
|
|
49
|
+
${this.loadDom || !this.loading ? html `
|
|
50
|
+
<div id="content-wrapper" class="${this.loading ? this.fadeContent ? "faded" : "hidden" : ""}">
|
|
51
|
+
<slot></slot>
|
|
52
|
+
${this.content || ``}
|
|
53
|
+
</div>` : ``}
|
|
54
|
+
</div>
|
|
55
|
+
`;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
__decorate([
|
|
59
|
+
property({ type: Number })
|
|
60
|
+
], OrLoadingWrapper.prototype, "loadingHeight", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
property({ type: Boolean })
|
|
63
|
+
], OrLoadingWrapper.prototype, "loadDom", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: Boolean })
|
|
66
|
+
], OrLoadingWrapper.prototype, "fadeContent", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
property({ type: Boolean })
|
|
69
|
+
], OrLoadingWrapper.prototype, "loading", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property({ type: Object, attribute: false })
|
|
72
|
+
], OrLoadingWrapper.prototype, "content", void 0);
|
|
73
|
+
OrLoadingWrapper = __decorate([
|
|
74
|
+
customElement("or-loading-wrapper")
|
|
75
|
+
], OrLoadingWrapper);
|
|
76
|
+
export { OrLoadingWrapper };
|
|
77
|
+
//# sourceMappingURL=or-loading-wrapper.js.map
|
package/lib/or-panel.js
CHANGED
|
@@ -1,58 +1,98 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement, unsafeCSS } from "lit";
|
|
8
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
9
|
+
import { DefaultColor2, DefaultColor3 } from "@openremote/core";
|
|
10
|
+
import { when } from "lit/directives/when.js";
|
|
11
|
+
// TODO: Add webpack/rollup to build so consumers aren't forced to use the same tooling
|
|
12
|
+
const simpleBarStyle = require("simplebar/dist/simplebar.css");
|
|
13
|
+
const elevationStyle = require("@material/elevation/dist/mdc.elevation.css");
|
|
14
|
+
// language=CSS
|
|
15
|
+
const style = css `
|
|
16
|
+
|
|
17
|
+
:host {
|
|
18
|
+
--internal-or-panel-background-color: var(--or-panel-background-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
|
|
19
|
+
--internal-or-panel-padding: var(--or-panel-padding, 10px);
|
|
20
|
+
--internal-or-panel-border: var(--or-panel-border, 1px solid #e5e5e5);
|
|
21
|
+
--internal-or-panel-border-radius: var(--or-panel-border-radius, 5px);
|
|
22
|
+
--internal-or-panel-heading-margin: var(--or-panel-heading-margin, 0 0 10px 7px);
|
|
23
|
+
--internal-or-panel-heading-min-height: var(--or-panel-heading-min-height, 36px);
|
|
24
|
+
--internal-or-panel-heading-color: var(--or-panel-heading-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
|
|
25
|
+
--internal-or-panel-heading-font-size: var(--or-panel-heading-font-size, larger);
|
|
26
|
+
--internal-or-panel-heading-font-weight: var(--or-panel-heading-font-weight, bolder);
|
|
27
|
+
--internal-or-panel-heading-text-transform: var(--or-panel-heading-text-transform, unset);
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([hidden]) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#wrapper {
|
|
36
|
+
height: 100%;
|
|
37
|
+
flex: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#panel {
|
|
41
|
+
padding: var(--internal-or-panel-padding);
|
|
42
|
+
background-color: var(--internal-or-panel-background-color);
|
|
43
|
+
border: var(--internal-or-panel-border);
|
|
44
|
+
border-radius: var(--internal-or-panel-border-radius);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#heading {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
margin: var(--internal-or-panel-heading-margin);
|
|
51
|
+
min-height: var(--internal-or-panel-heading-min-height);
|
|
52
|
+
font-size: var(--internal-or-panel-heading-font-size);
|
|
53
|
+
font-weight: var(--internal-or-panel-heading-font-weight);
|
|
54
|
+
color: var(--internal-or-panel-heading-color);
|
|
55
|
+
text-transform: var(--internal-or-panel-heading-text-transform);
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
let OrPanel = class OrPanel extends LitElement {
|
|
59
|
+
static get styles() {
|
|
60
|
+
return [
|
|
61
|
+
css `${unsafeCSS(elevationStyle)}`,
|
|
62
|
+
css `${unsafeCSS(simpleBarStyle)}`,
|
|
63
|
+
style
|
|
64
|
+
];
|
|
15
65
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
66
|
+
render() {
|
|
67
|
+
return html `
|
|
68
|
+
<div id="wrapper">
|
|
69
|
+
<div id="panel">
|
|
70
|
+
${this.heading ? html `
|
|
71
|
+
${when(!(typeof this.heading === 'string'), () => html `
|
|
72
|
+
${this.heading}
|
|
73
|
+
`, () => html `
|
|
74
|
+
<div id="heading">
|
|
75
|
+
<span>${this.heading}</span>
|
|
76
|
+
</div>
|
|
77
|
+
`)}
|
|
78
|
+
` : ``}
|
|
79
|
+
<slot></slot>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
`;
|
|
19
83
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
align-items: center;
|
|
36
|
-
margin: var(--internal-or-panel-heading-margin);
|
|
37
|
-
min-height: var(--internal-or-panel-heading-min-height);
|
|
38
|
-
font-size: var(--internal-or-panel-heading-font-size);
|
|
39
|
-
font-weight: var(--internal-or-panel-heading-font-weight);
|
|
40
|
-
color: var(--internal-or-panel-heading-color);
|
|
41
|
-
text-transform: var(--internal-or-panel-heading-text-transform);
|
|
42
|
-
}
|
|
43
|
-
`,OrPanel=class extends n{static get styles(){return[e`${a(elevationStyle)}`,e`${a(simpleBarStyle)}`,style]}render(){return r`
|
|
44
|
-
<div id="wrapper">
|
|
45
|
-
<div id="panel">
|
|
46
|
-
${this.heading?r`
|
|
47
|
-
${p("string"!=typeof this.heading,()=>r`
|
|
48
|
-
${this.heading}
|
|
49
|
-
`,()=>r`
|
|
50
|
-
<div id="heading">
|
|
51
|
-
<span>${this.heading}</span>
|
|
52
|
-
</div>
|
|
53
|
-
`)}
|
|
54
|
-
`:""}
|
|
55
|
-
<slot></slot>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
`}};__decorate([t({type:Number})],OrPanel.prototype,"zLevel",void 0),__decorate([t({type:String})],OrPanel.prototype,"heading",void 0),__decorate([i("#panel")],OrPanel.prototype,"_panel",void 0),OrPanel=__decorate([o("or-panel")],OrPanel);export{OrPanel};
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Number })
|
|
87
|
+
], OrPanel.prototype, "zLevel", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: String })
|
|
90
|
+
], OrPanel.prototype, "heading", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
query("#panel")
|
|
93
|
+
], OrPanel.prototype, "_panel", void 0);
|
|
94
|
+
OrPanel = __decorate([
|
|
95
|
+
customElement("or-panel")
|
|
96
|
+
], OrPanel);
|
|
97
|
+
export { OrPanel };
|
|
98
|
+
//# sourceMappingURL=or-panel.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openremote/or-components",
|
|
3
|
-
"version": "1.8.0-snapshot.
|
|
3
|
+
"version": "1.8.0-snapshot.20250725120000",
|
|
4
4
|
"description": "OpenRemote basic UI components",
|
|
5
5
|
"customElements": "custom-elements.json",
|
|
6
6
|
"main": "dist/umd/index.bundle.js",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"license": "AGPL-3.0-or-later",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@material/elevation": "^9.0.0",
|
|
29
|
-
"@openremote/core": "1.8.0-snapshot.
|
|
30
|
-
"@openremote/or-mwc-components": "1.8.0-snapshot.
|
|
29
|
+
"@openremote/core": "1.8.0-snapshot.20250725120000",
|
|
30
|
+
"@openremote/or-mwc-components": "1.8.0-snapshot.20250725120000",
|
|
31
31
|
"ace-builds": "^1.41.0",
|
|
32
32
|
"lit": "^2.0.2",
|
|
33
33
|
"simplebar": "^5.3.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@openremote/util": "1.8.0-snapshot.
|
|
36
|
+
"@openremote/util": "1.8.0-snapshot.20250725120000"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|