@senx/discovery-widgets
Version:
Discovery Widgets Elements
88 lines (87 loc) • 3.22 kB
JavaScript
/*
* Copyright 2022-2025 SenX S.A.S.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { h, Host } from "@stencil/core";
export class DiscoverySpinner {
constructor() {
this.message = 'Loading...';
this.backdrop = false;
}
// noinspection JSUnusedGlobalSymbols
componentDidLoad() {
this.message = this.el.innerText || this.message;
}
render() {
return (h(Host, { key: '077c384faa44f8db4ea9b02c714b1a2f5911b8f2' }, h("div", { key: '19b134b432f0e2a6cda5e32232747f3eb989ccef', class: { 'discovery-back-drop': this.backdrop } }, h("div", { key: '5b4d2b607889b821ee0ac2c1f892085ccd3b59f6', class: "loader" }), h("span", { key: '241f4d1e3614e81b9d2ea48c49a7988788360465', class: "message" }, this.message), h("span", { key: '854e6d8d2d9ccffbdf4c1c6841f50b109cbff625', class: "hidden" }, h("slot", { key: '09f9a7fdf11cbae7b890959a0efd450856f876ff' })))));
}
static get is() { return "discovery-spinner"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["discovery-spinner.scss"]
};
}
static get styleUrls() {
return {
"$": ["discovery-spinner.css"]
};
}
static get properties() {
return {
"message": {
"type": "string",
"mutable": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "message",
"reflect": false,
"defaultValue": "'Loading...'"
},
"backdrop": {
"type": "boolean",
"mutable": true,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "backdrop",
"reflect": false,
"defaultValue": "false"
}
};
}
static get elementRef() { return "el"; }
}
//# sourceMappingURL=discovery-spinner.js.map