@senx/discovery-widgets
Version:
Discovery Widgets Elements
43 lines (39 loc) • 4.32 kB
JavaScript
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
const discoverySpinnerCss = "/*!\n * Copyright 2022 SenX S.A.S.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *//*!\n* Copyright 2022-2024 SenX S.A.S.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/:host{width:100%;height:100%}:host>div{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center}:host .discovery-back-drop{background-color:var(--warp-view-modal-backdrop-color, rgba(0, 0, 0, 0.4));padding:20px;-ms-flex-pack:center;justify-content:center;--warp-view-font-color:#ffffff;--warp-view-spinner-size:50px;font-weight:bold;height:calc(100% - 40px)}:host span.message{color:var(--warp-view-font-color, #404040);padding-left:10px}:host .hidden{color:transparent;font-size:0;height:0;overflow:hidden}:host .loader{width:var(--warp-view-spinner-size, 12px);height:var(--warp-view-spinner-size, 12px);border:calc(var(--warp-view-spinner-size, 12px) / 10) solid transparent;border-bottom-color:var(--warp-view-spinner-color, #ff9900);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
const DiscoverySpinnerStyle0 = discoverySpinnerCss;
const DiscoverySpinner = /*@__PURE__*/ proxyCustomElement(class DiscoverySpinner extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
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' })))));
}
get el() { return this; }
static get style() { return DiscoverySpinnerStyle0; }
}, [1, "discovery-spinner", {
"message": [1025],
"backdrop": [1028]
}]);
function defineCustomElement() {
if (typeof customElements === "undefined") {
return;
}
const components = ["discovery-spinner"];
components.forEach(tagName => { switch (tagName) {
case "discovery-spinner":
if (!customElements.get(tagName)) {
customElements.define(tagName, DiscoverySpinner);
}
break;
} });
}
export { DiscoverySpinner as D, defineCustomElement as d };
//# sourceMappingURL=discovery-spinner2.js.map