@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
package/README.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# @openremote/or-components
|
|
2
|
-
[![NPM Version][npm-image]][npm-url]
|
|
3
|
-
[![Linux Build][travis-image]][travis-url]
|
|
4
|
-
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
5
|
-
|
|
6
|
-
Contains basic UI components
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
```bash
|
|
10
|
-
npm i @openremote/or-components
|
|
11
|
-
yarn add @openremote/or-components
|
|
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-components
|
|
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
|
|
1
|
+
# @openremote/or-components
|
|
2
|
+
[![NPM Version][npm-image]][npm-url]
|
|
3
|
+
[![Linux Build][travis-image]][travis-url]
|
|
4
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
5
|
+
|
|
6
|
+
Contains basic UI components
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
```bash
|
|
10
|
+
npm i @openremote/or-components
|
|
11
|
+
yarn add @openremote/or-components
|
|
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-components
|
|
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/or-ace-editor.js
CHANGED
|
@@ -1,25 +1,168 @@
|
|
|
1
|
-
var __decorate=this&&this.__decorate
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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, query } from "lit/decorators.js";
|
|
9
|
+
import ace from "ace-builds";
|
|
10
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-groovy";
|
|
13
|
+
export class OrAceEditorChangedEvent extends CustomEvent {
|
|
14
|
+
constructor(value, valid) {
|
|
15
|
+
super(OrAceEditorChangedEvent.NAME, {
|
|
16
|
+
bubbles: true,
|
|
17
|
+
composed: true,
|
|
18
|
+
detail: {
|
|
19
|
+
value: value,
|
|
20
|
+
valid: valid
|
|
6
21
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
OrAceEditorChangedEvent.NAME = "or-ace-editor-changed";
|
|
26
|
+
export class OrAceEditorEditEvent extends CustomEvent {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(OrAceEditorEditEvent.NAME, {
|
|
29
|
+
bubbles: true,
|
|
30
|
+
composed: true
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
OrAceEditorEditEvent.NAME = "or-ace-editor-edit";
|
|
35
|
+
let OrAceEditor = class OrAceEditor extends LitElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this.mode = "ace/mode/json";
|
|
39
|
+
this._lastValue = "";
|
|
40
|
+
this._editing = false;
|
|
41
|
+
}
|
|
42
|
+
// language=CSS
|
|
43
|
+
static get styles() {
|
|
44
|
+
return css `
|
|
45
|
+
:host {
|
|
46
|
+
display: block;
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#ace-editor {
|
|
52
|
+
position: relative;
|
|
53
|
+
height: 100%;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media screen and (max-width: 1400px) {
|
|
58
|
+
:host > * {
|
|
59
|
+
flex-grow: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host {
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
this.destroyEditor();
|
|
70
|
+
super.disconnectedCallback();
|
|
71
|
+
}
|
|
72
|
+
updated(_changedProperties) {
|
|
73
|
+
super.updated(_changedProperties);
|
|
74
|
+
if (_changedProperties.has("mode")) {
|
|
75
|
+
this.destroyEditor();
|
|
76
|
+
this.initEditor();
|
|
77
|
+
}
|
|
78
|
+
if (_changedProperties.has("value")) {
|
|
79
|
+
if (this._aceEditor) {
|
|
80
|
+
this._lastValue = this.value !== undefined ? typeof this.value === "string" ? this.value : JSON.stringify(this.value, null, 2) : "";
|
|
81
|
+
this._aceEditor.setValue(this._lastValue);
|
|
12
82
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
return html `
|
|
87
|
+
<div id="ace-editor"></div>
|
|
88
|
+
`;
|
|
89
|
+
}
|
|
90
|
+
destroyEditor() {
|
|
91
|
+
if (this._aceEditor) {
|
|
92
|
+
this._aceEditor.destroy();
|
|
93
|
+
this._aceEditor = undefined;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
initEditor() {
|
|
97
|
+
if (this._aceElem) {
|
|
98
|
+
this._aceEditor = ace.edit(this._aceElem, {
|
|
99
|
+
mode: this.mode,
|
|
100
|
+
value: this._lastValue,
|
|
101
|
+
useSoftTabs: true,
|
|
102
|
+
tabSize: 2,
|
|
103
|
+
readOnly: this.readonly,
|
|
104
|
+
showPrintMargin: false
|
|
105
|
+
});
|
|
106
|
+
this._aceEditor.renderer.attachToShadowRoot();
|
|
107
|
+
// Use the changeAnnotation event instead of change event so we have up to date validation info
|
|
108
|
+
// @ts-ignore
|
|
109
|
+
this._aceEditor.getSession().on("changeAnnotation", () => this._onEditorChange());
|
|
110
|
+
this._aceEditor.on("change", () => this._onEditorEdit());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
_onEditorEdit() {
|
|
114
|
+
if (!this._editing) {
|
|
115
|
+
this.dispatchEvent(new OrAceEditorEditEvent());
|
|
116
|
+
this._editing = true;
|
|
117
|
+
}
|
|
118
|
+
if (this._changeTimer) {
|
|
119
|
+
window.clearTimeout(this._changeTimer);
|
|
120
|
+
}
|
|
121
|
+
// Set change timer to expire after annotation web worker
|
|
122
|
+
this._changeTimer = window.setTimeout(() => {
|
|
123
|
+
this._changeTimer = undefined;
|
|
124
|
+
if (this._editing) {
|
|
125
|
+
this._onEditorChange();
|
|
22
126
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
127
|
+
}, 600);
|
|
128
|
+
}
|
|
129
|
+
_onEditorChange() {
|
|
130
|
+
this._editing = false;
|
|
131
|
+
const newValue = this.getValue() || "";
|
|
132
|
+
if (this._lastValue !== newValue) {
|
|
133
|
+
this._lastValue = newValue;
|
|
134
|
+
const valid = this.validate();
|
|
135
|
+
this.dispatchEvent(new OrAceEditorChangedEvent(newValue, valid));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
getValue() {
|
|
139
|
+
if (!this._aceEditor) {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
return this._aceEditor.getValue();
|
|
143
|
+
}
|
|
144
|
+
validate() {
|
|
145
|
+
if (!this._aceEditor) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
const annotations = this._aceEditor.getSession().getAnnotations();
|
|
149
|
+
return !annotations || annotations.length === 0;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: Boolean, attribute: false })
|
|
154
|
+
], OrAceEditor.prototype, "readonly", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ attribute: false })
|
|
157
|
+
], OrAceEditor.prototype, "value", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: String, attribute: false })
|
|
160
|
+
], OrAceEditor.prototype, "mode", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
query("#ace-editor")
|
|
163
|
+
], OrAceEditor.prototype, "_aceElem", void 0);
|
|
164
|
+
OrAceEditor = __decorate([
|
|
165
|
+
customElement("or-ace-editor")
|
|
166
|
+
], OrAceEditor);
|
|
167
|
+
export { OrAceEditor };
|
|
168
|
+
//# sourceMappingURL=or-ace-editor.js.map
|
|
@@ -1,95 +1,165 @@
|
|
|
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
|
+
/*
|
|
8
|
+
* Copyright 2017, OpenRemote Inc.
|
|
9
|
+
*
|
|
10
|
+
* See the CONTRIBUTORS.txt file in the distribution for a
|
|
11
|
+
* full listing of individual contributors.
|
|
12
|
+
*
|
|
13
|
+
* This program is free software: you can redistribute it and/or modify
|
|
14
|
+
* it under the terms of the GNU Affero General Public License as
|
|
15
|
+
* published by the Free Software Foundation, either version 3 of the
|
|
16
|
+
* License, or (at your option) any later version.
|
|
17
|
+
*
|
|
18
|
+
* This program is distributed in the hope that it will be useful,
|
|
19
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
21
|
+
* GNU Affero General Public License for more details.
|
|
22
|
+
*
|
|
23
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
24
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
25
|
+
*/
|
|
26
|
+
import { css, html, LitElement, unsafeCSS } from "lit";
|
|
27
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
28
|
+
import { i18next } from "@openremote/or-translate";
|
|
29
|
+
import { DefaultColor5 } from "@openremote/core";
|
|
30
|
+
import { until } from 'lit/directives/until.js';
|
|
31
|
+
// language=CSS
|
|
32
|
+
const style = css `
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
display: block;
|
|
36
|
+
box-sizing: content-box;
|
|
37
|
+
margin: 0;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
transition: margin 225ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
40
|
+
position: relative;
|
|
41
|
+
border-color: var(--or-app-color5, ${unsafeCSS(DefaultColor5)});
|
|
42
|
+
background-color: var(--or-collapisble-panel-background-color);
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
border-width: 1px;
|
|
45
|
+
border-style: solid;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([hidden]) {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#header {
|
|
53
|
+
display: flex;
|
|
54
|
+
height: 48px;
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
font-family: Roboto,Helvetica Neue,sans-serif;
|
|
57
|
+
font-size: 15px;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
align-items: center;
|
|
60
|
+
padding: 0 24px 0 16px;
|
|
61
|
+
border-radius: inherit;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#header.expandable {
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
transition: height 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#header.expanded {
|
|
70
|
+
height: 64px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#header.expanded > #indicator {
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
#header-content {
|
|
77
|
+
flex: 1;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#header-title, #header-description {
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
#header-description {
|
|
89
|
+
flex-grow: 2;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
#indicator {
|
|
93
|
+
align-self: center;
|
|
94
|
+
margin-right: 6px;
|
|
95
|
+
margin-left: -5px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
#content {
|
|
99
|
+
height: 0;
|
|
100
|
+
visibility: hidden;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
#content.expanded {
|
|
104
|
+
height: unset;
|
|
105
|
+
visibility: visible;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
or-icon {
|
|
109
|
+
vertical-align: middle;
|
|
110
|
+
--or-icon-width: 20px;
|
|
111
|
+
--or-icon-height: 20px;
|
|
112
|
+
margin-right: 2px;
|
|
113
|
+
margin-left: -5px;
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
let OrCollapsiblePanel = class OrCollapsiblePanel extends LitElement {
|
|
117
|
+
constructor() {
|
|
118
|
+
super(...arguments);
|
|
119
|
+
this.expanded = false;
|
|
120
|
+
this.expandable = true;
|
|
15
121
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
122
|
+
static get styles() {
|
|
123
|
+
return [
|
|
124
|
+
style
|
|
125
|
+
];
|
|
19
126
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
font-size: 15px;
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
align-items: center;
|
|
29
|
-
padding: 0 24px 0 16px;
|
|
30
|
-
border-radius: inherit;
|
|
127
|
+
_onHeaderClicked(ev) {
|
|
128
|
+
if (!this.expandable) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
ev.preventDefault();
|
|
132
|
+
this.expanded = !this.expanded;
|
|
31
133
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
134
|
+
render() {
|
|
135
|
+
return html `
|
|
136
|
+
<div id="header" class="${this.expandable ? "expandable" : ""} ${this.expandable && this.expanded ? "expanded" : ""}" @click="${(ev) => this._onHeaderClicked(ev)}">
|
|
137
|
+
${this.expandable ? html `<or-icon icon="chevron-${this.expanded ? "down" : "right"}"></or-icon>` : ""}
|
|
138
|
+
<span id="header-content">
|
|
139
|
+
<span id="header-title"><slot name="header"></slot></span>
|
|
140
|
+
<span id="header-description"><slot name="header-description"></slot></span>
|
|
141
|
+
</span>
|
|
142
|
+
</div>
|
|
143
|
+
<div id="content" class="${this.expandable && this.expanded ? "expanded" : ""}">
|
|
144
|
+
${this.lazycontent ? this.expanded && until(this.lazycontent, html `${i18next.t('loading')}`) : html `<slot name="content"></slot>`}
|
|
145
|
+
</div>
|
|
146
|
+
`;
|
|
36
147
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
#header-description {
|
|
58
|
-
flex-grow: 2;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#indicator {
|
|
62
|
-
align-self: center;
|
|
63
|
-
margin-right: 6px;
|
|
64
|
-
margin-left: -5px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
#content {
|
|
68
|
-
height: 0;
|
|
69
|
-
visibility: hidden;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
#content.expanded {
|
|
73
|
-
height: unset;
|
|
74
|
-
visibility: visible;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
or-icon {
|
|
78
|
-
vertical-align: middle;
|
|
79
|
-
--or-icon-width: 20px;
|
|
80
|
-
--or-icon-height: 20px;
|
|
81
|
-
margin-right: 2px;
|
|
82
|
-
margin-left: -5px;
|
|
83
|
-
}
|
|
84
|
-
`,OrCollapsiblePanel=class extends i{constructor(){super(...arguments),this.expanded=!1,this.expandable=!0}static get styles(){return[style]}_onHeaderClicked(e){this.expandable&&(e.preventDefault(),this.expanded=!this.expanded)}render(){return t`
|
|
85
|
-
<div id="header" class="${this.expandable?"expandable":""} ${this.expandable&&this.expanded?"expanded":""}" @click="${e=>this._onHeaderClicked(e)}">
|
|
86
|
-
${this.expandable?t`<or-icon icon="chevron-${this.expanded?"down":"right"}"></or-icon>`:""}
|
|
87
|
-
<span id="header-content">
|
|
88
|
-
<span id="header-title"><slot name="header"></slot></span>
|
|
89
|
-
<span id="header-description"><slot name="header-description"></slot></span>
|
|
90
|
-
</span>
|
|
91
|
-
</div>
|
|
92
|
-
<div id="content" class="${this.expandable&&this.expanded?"expanded":""}">
|
|
93
|
-
${this.lazycontent?this.expanded&&s(this.lazycontent,t`${l.t("loading")}`):t`<slot name="content"></slot>`}
|
|
94
|
-
</div>
|
|
95
|
-
`}};__decorate([n({type:Promise})],OrCollapsiblePanel.prototype,"lazycontent",void 0),__decorate([n({type:Boolean})],OrCollapsiblePanel.prototype,"expanded",void 0),__decorate([n({type:Boolean})],OrCollapsiblePanel.prototype,"expandable",void 0),__decorate([a("#header")],OrCollapsiblePanel.prototype,"headerElem",void 0),OrCollapsiblePanel=__decorate([r("or-collapsible-panel")],OrCollapsiblePanel);export{OrCollapsiblePanel};
|
|
148
|
+
};
|
|
149
|
+
__decorate([
|
|
150
|
+
property({ type: (Promise) })
|
|
151
|
+
], OrCollapsiblePanel.prototype, "lazycontent", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: Boolean })
|
|
154
|
+
], OrCollapsiblePanel.prototype, "expanded", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ type: Boolean })
|
|
157
|
+
], OrCollapsiblePanel.prototype, "expandable", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
query("#header")
|
|
160
|
+
], OrCollapsiblePanel.prototype, "headerElem", void 0);
|
|
161
|
+
OrCollapsiblePanel = __decorate([
|
|
162
|
+
customElement("or-collapsible-panel")
|
|
163
|
+
], OrCollapsiblePanel);
|
|
164
|
+
export { OrCollapsiblePanel };
|
|
165
|
+
//# sourceMappingURL=or-collapsible-panel.js.map
|
|
@@ -12,5 +12,5 @@ export declare class OrFileUploader extends LitElement {
|
|
|
12
12
|
static get styles(): import("lit").CSSResult;
|
|
13
13
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
14
14
|
_onChange(e: any): Promise<void>;
|
|
15
|
-
render(): import("lit").TemplateResult<1>;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
16
|
}
|