@openremote/or-components 1.8.0-snapshot.20250725120001 → 1.8.0-snapshot.20250725123024

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.
@@ -1,187 +1,77 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- /*
17
- * Copyright 2022, OpenRemote Inc.
18
- *
19
- * See the CONTRIBUTORS.txt file in the distribution for a
20
- * full listing of individual contributors.
21
- *
22
- * This program is free software: you can redistribute it and/or modify
23
- * it under the terms of the GNU Affero General Public License as
24
- * published by the Free Software Foundation, either version 3 of the
25
- * License, or (at your option) any later version.
26
- *
27
- * This program is distributed in the hope that it will be useful,
28
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
29
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
- * GNU Affero General Public License for more details.
31
- *
32
- * You should have received a copy of the GNU Affero General Public License
33
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
34
- */
35
- import { css, html, LitElement } from "lit";
36
- import { customElement, property } from "lit/decorators.js";
37
- import { i18next } from "@openremote/or-translate";
38
- import "./or-loading-indicator";
39
- let OrFileUploader = class OrFileUploader extends LitElement {
40
- constructor() {
41
- super(...arguments);
42
- // Contains the content that will be shown towards the user.
43
- this.src = "";
44
- this.managerUrl = "";
45
- this.title = "";
46
- this.accept = "image/png,image/jpeg,image/vnd.microsoft.icon,image/svg+xml";
47
- this.loading = false;
48
- this.files = [];
49
- }
50
- get Files() {
51
- return this.files;
52
- }
53
- static get styles() {
54
- return css `
55
- #imageContainer {
56
- position: relative;
57
- max-width: 150px;
58
- background-color: whitesmoke;
59
- border: 1px solid var(--or-app-color5, #CCC);;
60
- cursor: pointer;
61
- border-radius: 4px;
62
- padding: 4px;
63
- }
64
-
65
- #imageContainer img {
66
- max-width: 100%;
67
- max-height: 100%;
68
- border-radius: 2px;
69
- margin: unset;
70
- }
71
-
72
- input {
73
- display: none;
74
- }
75
-
76
- .placeholder-container {
77
- text-align: center;
78
- width: 100%;
79
- }
80
-
81
- .placeholder-container or-icon {
82
- font-size: 24px;
83
- margin: 16px 0;
84
- max-height: 24px;
85
- width: 100%;
86
- text-align: center;
87
- }
88
-
89
- #imageContainer:hover .pencil-container{
90
- display: flex;
91
- }
92
-
93
- #imageContainer .pencil-container {
94
- position: absolute;
95
- top: 0;
96
- bottom: 0;
97
- left: 0;
98
- right: 0;
99
- background: rgba(0,0,0,.4);
100
- color: var(--or-app-color4);
101
- display: none;
102
- justify-content: center;
103
- align-items: center;
104
- }
105
-
106
- .container {
107
- position: relative;
108
- }
109
- `;
110
- }
111
- firstUpdated(_changedProperties) {
112
- var _a, _b;
113
- super.firstUpdated(_changedProperties);
114
- const fileInput = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('fileInput');
115
- const imageContainer = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.getElementById('imageContainer');
116
- fileInput === null || fileInput === void 0 ? void 0 : fileInput.addEventListener("input", (e) => {
117
- this._onChange(e);
118
- });
119
- imageContainer === null || imageContainer === void 0 ? void 0 : imageContainer.addEventListener("click", (e) => {
120
- fileInput === null || fileInput === void 0 ? void 0 : fileInput.click();
121
- });
122
- }
123
- _onChange(e) {
124
- return __awaiter(this, void 0, void 0, function* () {
125
- var _a;
126
- this.files = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.files;
127
- this.loading = true;
128
- this.requestUpdate();
129
- this.dispatchEvent(new CustomEvent("change", {
130
- detail: { value: this.files },
131
- }));
132
- this.loading = false;
133
- this.requestUpdate();
134
- });
135
- }
136
- render() {
137
- const file = () => {
138
- if (this.src) {
139
- if (this.src.includes("data:image")) {
140
- return this.src;
141
- }
142
- else {
143
- return this.managerUrl + this.src;
144
- }
1
+ var __decorate=this&&this.__decorate||function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},__awaiter=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))(function(o,n){function a(e){try{c(r.next(e))}catch(e){n(e)}}function l(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,l)}c((r=r.apply(e,t||[])).next())})};import{css as e,html as t,LitElement as i}from"lit";import{customElement as r,property as o}from"lit/decorators.js";import{i18next as n}from"@openremote/or-translate";import"./or-loading-indicator";let OrFileUploader=class extends i{constructor(){super(...arguments),this.src="",this.managerUrl="",this.title="",this.accept="image/png,image/jpeg,image/vnd.microsoft.icon,image/svg+xml",this.loading=!1,this.files=[]}get Files(){return this.files}static get styles(){return e`
2
+ #imageContainer {
3
+ position: relative;
4
+ max-width: 150px;
5
+ background-color: whitesmoke;
6
+ border: 1px solid var(--or-app-color5, #CCC);;
7
+ cursor: pointer;
8
+ border-radius: 4px;
9
+ padding: 4px;
145
10
  }
146
- };
147
- return html `
148
- <div class="container">
149
- ${this.loading ? html `
150
- <or-loading-indicator .overlay="${true}"></or-loading-indicator>` : ""}
151
- <div class="title">${this.title}</div>
152
- <div id="imageContainer">
153
-
154
- ${this.src ? html `
155
- <img src="${file()}" alt="OR-File-Uploader">
156
- <div class="pencil-container">
157
- <or-icon icon="pencil-circle"></or-icon>
158
- </div>
159
- ` : html `
160
- <div class="placeholder-container">
161
- <or-icon icon="upload"></or-icon>
162
- ${i18next.t('uploadFile')}
163
- </div>
164
- `}
165
- </div>
166
- <input type="file" id="fileInput" accept="${this.accept}">
167
- </div>
168
- `;
169
- }
170
- };
171
- __decorate([
172
- property({ attribute: false })
173
- ], OrFileUploader.prototype, "src", void 0);
174
- __decorate([
175
- property({ attribute: false })
176
- ], OrFileUploader.prototype, "managerUrl", void 0);
177
- __decorate([
178
- property()
179
- ], OrFileUploader.prototype, "title", void 0);
180
- __decorate([
181
- property({ attribute: false })
182
- ], OrFileUploader.prototype, "accept", void 0);
183
- OrFileUploader = __decorate([
184
- customElement("or-file-uploader")
185
- ], OrFileUploader);
186
- export { OrFileUploader };
187
- //# sourceMappingURL=or-file-uploader.js.map
11
+
12
+ #imageContainer img {
13
+ max-width: 100%;
14
+ max-height: 100%;
15
+ border-radius: 2px;
16
+ margin: unset;
17
+ }
18
+
19
+ input {
20
+ display: none;
21
+ }
22
+
23
+ .placeholder-container {
24
+ text-align: center;
25
+ width: 100%;
26
+ }
27
+
28
+ .placeholder-container or-icon {
29
+ font-size: 24px;
30
+ margin: 16px 0;
31
+ max-height: 24px;
32
+ width: 100%;
33
+ text-align: center;
34
+ }
35
+
36
+ #imageContainer:hover .pencil-container{
37
+ display: flex;
38
+ }
39
+
40
+ #imageContainer .pencil-container {
41
+ position: absolute;
42
+ top: 0;
43
+ bottom: 0;
44
+ left: 0;
45
+ right: 0;
46
+ background: rgba(0,0,0,.4);
47
+ color: var(--or-app-color4);
48
+ display: none;
49
+ justify-content: center;
50
+ align-items: center;
51
+ }
52
+
53
+ .container {
54
+ position: relative;
55
+ }
56
+ `}firstUpdated(e){var t,i;super.firstUpdated(e);let r=null==(t=this.shadowRoot)?void 0:t.getElementById("fileInput"),o=null==(i=this.shadowRoot)?void 0:i.getElementById("imageContainer");null==r||r.addEventListener("input",e=>{this._onChange(e)}),null==o||o.addEventListener("click",e=>{null==r||r.click()})}_onChange(e){return __awaiter(this,void 0,void 0,function*(){var t;this.files=null==(t=null==e?void 0:e.target)?void 0:t.files,this.loading=!0,this.requestUpdate(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.files}})),this.loading=!1,this.requestUpdate()})}render(){return t`
57
+ <div class="container">
58
+ ${this.loading?t`
59
+ <or-loading-indicator .overlay="${!0}"></or-loading-indicator>`:""}
60
+ <div class="title">${this.title}</div>
61
+ <div id="imageContainer">
62
+
63
+ ${this.src?t`
64
+ <img src="${(()=>{if(this.src)if(this.src.includes("data:image"))return this.src;else return this.managerUrl+this.src})()}" alt="OR-File-Uploader">
65
+ <div class="pencil-container">
66
+ <or-icon icon="pencil-circle"></or-icon>
67
+ </div>
68
+ `:t`
69
+ <div class="placeholder-container">
70
+ <or-icon icon="upload"></or-icon>
71
+ ${n.t("uploadFile")}
72
+ </div>
73
+ `}
74
+ </div>
75
+ <input type="file" id="fileInput" accept="${this.accept}">
76
+ </div>
77
+ `}};__decorate([o({attribute:!1})],OrFileUploader.prototype,"src",void 0),__decorate([o({attribute:!1})],OrFileUploader.prototype,"managerUrl",void 0),__decorate([o()],OrFileUploader.prototype,"title",void 0),__decorate([o({attribute:!1})],OrFileUploader.prototype,"accept",void 0),OrFileUploader=__decorate([r("or-file-uploader")],OrFileUploader);export{OrFileUploader};
package/lib/or-form.js CHANGED
@@ -1,77 +1,12 @@
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, queryAssignedElements } from "lit/decorators.js";
9
- import { OrMwcInput } from "@openremote/or-mwc-components/or-mwc-input";
10
- // language=CSS
11
- const style = css `
12
-
13
- :host {
14
- display: block;
15
- }
16
-
17
- :host([hidden]) {
18
- display: none;
19
- }
20
- `;
21
- /**
22
- * This is a form element that supports any element that has a value property
23
- */
24
- // TODO: Support any form element
25
- let OrForm = class OrForm extends LitElement {
26
- firstUpdated(_changedProperties) {
27
- super.firstUpdated(_changedProperties);
28
- // if (this._panel) {
29
- // new SimpleBar(this._panel, {
30
- // autoHide: this.autoHide,
31
- // // @ts-ignore
32
- // forceVisible: this.forceVisible
33
- // });
34
- // }
35
- }
36
- render() {
37
- return html `
38
- <slot></slot>
39
- `;
40
- }
41
- checkValidity() {
42
- let valid = false;
43
- this.formNodes.filter(node => node instanceof OrMwcInput && node.name).map(node => node).forEach(orMwcInput => {
44
- const inputValid = orMwcInput.checkValidity();
45
- valid = valid && inputValid;
46
- });
47
- return valid;
48
- }
49
- reportValidity() {
50
- let valid = true;
51
- this.formNodes.filter(node => node instanceof OrMwcInput && node.name).map(node => node).forEach(orMwcInput => {
52
- const inputValid = orMwcInput.reportValidity();
53
- valid = valid && inputValid;
54
- });
55
- return valid;
56
- }
57
- submit() {
58
- const data = {};
59
- this.formNodes.filter(node => node instanceof OrMwcInput && node.name).map(node => node).forEach(orMwcInput => {
60
- data[orMwcInput.name] = orMwcInput.value;
61
- });
62
- return data;
63
- }
64
- reset() {
65
- this.formNodes.filter(node => node instanceof OrMwcInput && node.name).map(node => node).forEach(orMwcInput => {
66
- orMwcInput.value = undefined;
67
- });
68
- }
69
- };
70
- __decorate([
71
- queryAssignedElements()
72
- ], OrForm.prototype, "formNodes", void 0);
73
- OrForm = __decorate([
74
- customElement("or-form")
75
- ], OrForm);
76
- export { OrForm };
77
- //# sourceMappingURL=or-form.js.map
1
+ var __decorate=this&&this.__decorate||function(e,t,r,o){var i,a=arguments.length,n=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,r,n):i(t,r))||n);return a>3&&n&&Object.defineProperty(t,r,n),n};import{css as e,html as t,LitElement as r}from"lit";import{customElement as o,queryAssignedElements as i}from"lit/decorators.js";import{OrMwcInput as a}from"@openremote/or-mwc-components/or-mwc-input";let style=e`
2
+
3
+ :host {
4
+ display: block;
5
+ }
6
+
7
+ :host([hidden]) {
8
+ display: none;
9
+ }
10
+ `,OrForm=class extends r{firstUpdated(e){super.firstUpdated(e)}render(){return t`
11
+ <slot></slot>
12
+ `}checkValidity(){let e=!1;return this.formNodes.filter(e=>e instanceof a&&e.name).map(e=>e).forEach(t=>{let r=t.checkValidity();e=e&&r}),e}reportValidity(){let e=!0;return this.formNodes.filter(e=>e instanceof a&&e.name).map(e=>e).forEach(t=>{let r=t.reportValidity();e=e&&r}),e}submit(){let e={};return this.formNodes.filter(e=>e instanceof a&&e.name).map(e=>e).forEach(t=>{e[t.name]=t.value}),e}reset(){this.formNodes.filter(e=>e instanceof a&&e.name).map(e=>e).forEach(e=>{e.value=void 0})}};__decorate([i()],OrForm.prototype,"formNodes",void 0),OrForm=__decorate([o("or-form")],OrForm);export{OrForm};
@@ -1,123 +1,73 @@
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 2022, 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 } from "lit";
27
- import { customElement, property } from "lit/decorators.js";
28
- let OrLoadingIndicator = class OrLoadingIndicator extends LitElement {
29
- constructor() {
30
- super(...arguments);
31
- this.overlay = false;
32
- }
33
- static get styles() {
34
- return css `
35
- .loader-container {
36
- position: absolute;
37
- top: 0;
38
- left: 0;
39
- right: 0;
40
- bottom: 0;
41
- background-color: rgba(0, 0, 0, .2);
42
- z-index: 1000;
43
- }
44
-
45
- .loader {
46
- position: absolute;
47
- left: 50%;
48
- transform: translate(-50%, -50%);
49
- top: 50%;
50
- z-index: 1010;
51
- }
52
-
53
- .loader svg {
54
- height: 60px;
55
- width: 60px;
56
- }
57
-
58
- @-webkit-keyframes rotate-right {
59
- from {
60
- -webkit-transform: rotate(0deg);
61
- }
62
- to {
63
- -webkit-transform: rotate(360deg);
64
- }
65
- }
66
- @-webkit-keyframes rotate-left {
67
- from {
68
- -webkit-transform: rotate(0deg);
69
- }
70
- to {
71
- -webkit-transform: rotate(-360deg);
72
- }
73
- }
74
-
75
- .loader #circle1 {
76
- -webkit-transform: translate3d(0, 0, 0);
77
- -webkit-transform-origin: 54.1px 53.6px;
78
- -webkit-animation: rotate-right 7s linear 0s infinite;
79
- }
80
-
81
- .loader #circle2 {
82
- -webkit-transform: translate3d(0, 0, 0);
83
- -webkit-transform-origin: 54.1px 53.6px;
84
- -webkit-animation: rotate-left 6s linear 0s infinite;
85
- }
86
-
87
- .loader #circle3 {
88
- -webkit-transform: translate3d(0, 0, 0);
89
- -webkit-transform-origin: 54.1px 53.6px;
90
- -webkit-animation: rotate-right 5s linear 0s infinite;
91
- }
92
- `;
93
- }
94
- render() {
95
- const loader = html `
96
- <div class="loader">
97
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 110 110"
98
- xml:space="preserve">
99
- <path fill="#d2d2d2" id="circle1"
100
- d="M53.648,107.296C24.068,107.296,0,83.236,0,53.646h11.234c0,23.391,19.025,42.42,42.414,42.42 c23.385,0,42.416-19.029,42.416-42.42c0-23.382-19.031-42.408-42.416-42.408V0c29.582,0,53.65,24.068,53.65,53.646 C107.299,83.236,83.23,107.296,53.648,107.296L53.648,107.296z" />
101
- <path fill="#a5a5a5" id="circle2"
102
- d="M45.525,92.57c-10.395-2.166-19.324-8.262-25.145-17.137c-5.814-8.884-7.826-19.511-5.654-29.906 c2.174-10.399,8.258-19.325,17.141-25.145c8.889-5.815,19.506-7.825,29.906-5.655c21.463,4.479,35.281,25.582,30.803,47.041 L81.58,59.478c3.207-15.397-6.703-30.539-22.105-33.751c-7.461-1.56-15.078-0.119-21.455,4.06 c-6.369,4.169-10.736,10.58-12.299,18.039c-1.555,7.458-0.113,15.075,4.064,21.453c4.17,6.37,10.576,10.744,18.041,12.297 L45.525,92.57L45.525,92.57z" />
103
- <path fill="#878787" id="circle3"
104
- d="M53.682,79.428c-0.432,0-0.871-0.012-1.309-0.032c-6.869-0.342-13.205-3.344-17.83-8.439 c-4.621-5.108-6.982-11.705-6.639-18.582l11.215,0.553c-0.188,3.879,1.141,7.609,3.75,10.488c2.604,2.879,6.186,4.568,10.059,4.761 c3.869,0.179,7.607-1.142,10.48-3.748c2.887-2.603,4.576-6.179,4.773-10.057c0.391-8.012-5.803-14.854-13.816-15.248l0.559-11.222 c14.201,0.71,25.178,12.823,24.475,27.021c-0.344,6.883-3.336,13.212-8.441,17.831C66.174,77.086,60.084,79.428,53.682,79.428 L53.682,79.428z" />
105
- </svg>
106
- </div>`;
107
- if (this.overlay) {
108
- return html `
109
- <div class="loader-container">
110
- ${loader}
111
- </div>`;
1
+ var __decorate=this&&this.__decorate||function(t,e,r,i){var o,a=arguments.length,n=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,r,n):o(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n};import{css as t,html as e,LitElement as r}from"lit";import{customElement as i,property as o}from"lit/decorators.js";let OrLoadingIndicator=class extends r{constructor(){super(...arguments),this.overlay=!1}static get styles(){return t`
2
+ .loader-container {
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ background-color: rgba(0, 0, 0, .2);
9
+ z-index: 1000;
10
+ }
11
+
12
+ .loader {
13
+ position: absolute;
14
+ left: 50%;
15
+ transform: translate(-50%, -50%);
16
+ top: 50%;
17
+ z-index: 1010;
18
+ }
19
+
20
+ .loader svg {
21
+ height: 60px;
22
+ width: 60px;
23
+ }
24
+
25
+ @-webkit-keyframes rotate-right {
26
+ from {
27
+ -webkit-transform: rotate(0deg);
112
28
  }
113
- return loader;
114
- }
115
- };
116
- __decorate([
117
- property({ attribute: true })
118
- ], OrLoadingIndicator.prototype, "overlay", void 0);
119
- OrLoadingIndicator = __decorate([
120
- customElement("or-loading-indicator")
121
- ], OrLoadingIndicator);
122
- export { OrLoadingIndicator };
123
- //# sourceMappingURL=or-loading-indicator.js.map
29
+ to {
30
+ -webkit-transform: rotate(360deg);
31
+ }
32
+ }
33
+ @-webkit-keyframes rotate-left {
34
+ from {
35
+ -webkit-transform: rotate(0deg);
36
+ }
37
+ to {
38
+ -webkit-transform: rotate(-360deg);
39
+ }
40
+ }
41
+
42
+ .loader #circle1 {
43
+ -webkit-transform: translate3d(0, 0, 0);
44
+ -webkit-transform-origin: 54.1px 53.6px;
45
+ -webkit-animation: rotate-right 7s linear 0s infinite;
46
+ }
47
+
48
+ .loader #circle2 {
49
+ -webkit-transform: translate3d(0, 0, 0);
50
+ -webkit-transform-origin: 54.1px 53.6px;
51
+ -webkit-animation: rotate-left 6s linear 0s infinite;
52
+ }
53
+
54
+ .loader #circle3 {
55
+ -webkit-transform: translate3d(0, 0, 0);
56
+ -webkit-transform-origin: 54.1px 53.6px;
57
+ -webkit-animation: rotate-right 5s linear 0s infinite;
58
+ }
59
+ `}render(){let t=e`
60
+ <div class="loader">
61
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 110 110"
62
+ xml:space="preserve">
63
+ <path fill="#d2d2d2" id="circle1"
64
+ d="M53.648,107.296C24.068,107.296,0,83.236,0,53.646h11.234c0,23.391,19.025,42.42,42.414,42.42 c23.385,0,42.416-19.029,42.416-42.42c0-23.382-19.031-42.408-42.416-42.408V0c29.582,0,53.65,24.068,53.65,53.646 C107.299,83.236,83.23,107.296,53.648,107.296L53.648,107.296z" />
65
+ <path fill="#a5a5a5" id="circle2"
66
+ d="M45.525,92.57c-10.395-2.166-19.324-8.262-25.145-17.137c-5.814-8.884-7.826-19.511-5.654-29.906 c2.174-10.399,8.258-19.325,17.141-25.145c8.889-5.815,19.506-7.825,29.906-5.655c21.463,4.479,35.281,25.582,30.803,47.041 L81.58,59.478c3.207-15.397-6.703-30.539-22.105-33.751c-7.461-1.56-15.078-0.119-21.455,4.06 c-6.369,4.169-10.736,10.58-12.299,18.039c-1.555,7.458-0.113,15.075,4.064,21.453c4.17,6.37,10.576,10.744,18.041,12.297 L45.525,92.57L45.525,92.57z" />
67
+ <path fill="#878787" id="circle3"
68
+ d="M53.682,79.428c-0.432,0-0.871-0.012-1.309-0.032c-6.869-0.342-13.205-3.344-17.83-8.439 c-4.621-5.108-6.982-11.705-6.639-18.582l11.215,0.553c-0.188,3.879,1.141,7.609,3.75,10.488c2.604,2.879,6.186,4.568,10.059,4.761 c3.869,0.179,7.607-1.142,10.48-3.748c2.887-2.603,4.576-6.179,4.773-10.057c0.391-8.012-5.803-14.854-13.816-15.248l0.559-11.222 c14.201,0.71,25.178,12.823,24.475,27.021c-0.344,6.883-3.336,13.212-8.441,17.831C66.174,77.086,60.084,79.428,53.682,79.428 L53.682,79.428z" />
69
+ </svg>
70
+ </div>`;return this.overlay?e`
71
+ <div class="loader-container">
72
+ ${t}
73
+ </div>`:t}};__decorate([o({attribute:!0})],OrLoadingIndicator.prototype,"overlay",void 0),OrLoadingIndicator=__decorate([i("or-loading-indicator")],OrLoadingIndicator);export{OrLoadingIndicator};