@senx/discovery-widgets
Version:
Discovery Widgets Elements
43 lines (39 loc) • 4.33 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: '91a3d7d01a085c11915e80ac04b4c8e849462e63' }, h("div", { key: '19e9d3ffec94ad3621ab64bea190ac9ea46f9f82', class: { 'discovery-back-drop': this.backdrop } }, h("div", { key: '455c76f51ec6fbf7e3c89221e0b2522bbb767df5', class: "loader" }), h("span", { key: 'eb75f7e55317f4fc2196e585d0660263e26d081a', class: "message" }, this.message), h("span", { key: '278780b6af15a0be7d56867540a6a403b6db2de8', class: "hidden" }, h("slot", { key: '254bc50acb3c3f4418ed20c29755922f9bdf1692' })))));
}
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