@roots/bud-client 6.0.0
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/LICENSE.md +19 -0
- package/README.md +49 -0
- package/lib/components/indicator/index.cjs +14 -0
- package/lib/components/indicator/index.cjs.map +1 -0
- package/lib/components/indicator/index.d.cts +4 -0
- package/lib/components/indicator/index.d.cts.map +1 -0
- package/lib/components/indicator/indicator.component.cjs +166 -0
- package/lib/components/indicator/indicator.component.cjs.map +1 -0
- package/lib/components/indicator/indicator.component.d.cts +85 -0
- package/lib/components/indicator/indicator.component.d.cts.map +1 -0
- package/lib/components/indicator/indicator.controller.cjs +39 -0
- package/lib/components/indicator/indicator.controller.cjs.map +1 -0
- package/lib/components/indicator/indicator.controller.d.cts +27 -0
- package/lib/components/indicator/indicator.controller.d.cts.map +1 -0
- package/lib/components/indicator/indicator.pulse.cjs +34 -0
- package/lib/components/indicator/indicator.pulse.cjs.map +1 -0
- package/lib/components/indicator/indicator.pulse.d.cts +9 -0
- package/lib/components/indicator/indicator.pulse.d.cts.map +1 -0
- package/lib/components/overlay/index.cjs +14 -0
- package/lib/components/overlay/index.cjs.map +1 -0
- package/lib/components/overlay/index.d.cts +4 -0
- package/lib/components/overlay/index.d.cts.map +1 -0
- package/lib/components/overlay/overlay.component.cjs +106 -0
- package/lib/components/overlay/overlay.component.cjs.map +1 -0
- package/lib/components/overlay/overlay.component.d.cts +34 -0
- package/lib/components/overlay/overlay.component.d.cts.map +1 -0
- package/lib/components/overlay/overlay.controller.cjs +49 -0
- package/lib/components/overlay/overlay.controller.cjs.map +1 -0
- package/lib/components/overlay/overlay.controller.d.cts +38 -0
- package/lib/components/overlay/overlay.controller.d.cts.map +1 -0
- package/lib/hmr/bridge.cjs +290 -0
- package/lib/hmr/bridge.cjs.map +1 -0
- package/lib/hmr/bridge.d.cts +5 -0
- package/lib/hmr/bridge.d.cts.map +1 -0
- package/lib/hmr/index.cjs +88 -0
- package/lib/hmr/index.cjs.map +1 -0
- package/lib/hmr/index.d.cts +19 -0
- package/lib/hmr/index.d.cts.map +1 -0
- package/lib/hmr/update.cjs +154 -0
- package/lib/hmr/update.cjs.map +1 -0
- package/lib/hmr/update.d.cts +8 -0
- package/lib/hmr/update.d.cts.map +1 -0
- package/lib/index.cjs +5 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.cts +4 -0
- package/lib/index.d.cts.map +1 -0
- package/lib/index.d.mts +6 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.mjs +7 -0
- package/lib/index.mjs.map +1 -0
- package/lib/proxy-click-interceptor.cjs +49 -0
- package/lib/proxy-click-interceptor.cjs.map +1 -0
- package/lib/proxy-click-interceptor.d.cts +4 -0
- package/lib/proxy-click-interceptor.d.cts.map +1 -0
- package/package.json +74 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright © Roots Software Foundation LLC
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://cdn.roots.io/app/uploads/logo-bud.svg" height="100" alt="Bud" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img alt="MIT License" src="https://img.shields.io/github/license/roots/bud?color=%23525ddc&style=flat-square" /> <img alt="npm" src="https://img.shields.io/npm/v/@roots/bud.svg?color=%23525ddc&style=flat-square" /> <img alt="Follow Roots" src="https://img.shields.io/twitter/follow/rootswp.svg?color=%23525ddc&style=flat-square" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<h1 align="center">
|
|
10
|
+
<strong>@roots/bud-client</strong>
|
|
11
|
+
</h1>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
Client scripts for @roots/bud
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Install **@roots/bud-client** to your project.
|
|
20
|
+
|
|
21
|
+
```shell
|
|
22
|
+
yarn add @roots/bud-client --dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Community
|
|
26
|
+
|
|
27
|
+
Keep track of development and community news.
|
|
28
|
+
|
|
29
|
+
- Join us on Roots Slack by becoming a [GitHub sponsor](https://github.com/sponsors/roots)
|
|
30
|
+
- Participate on the [Roots Discourse](https://discourse.roots.io/)
|
|
31
|
+
- Follow [@rootswp on Twitter](https://twitter.com/rootswp)
|
|
32
|
+
- Read and subscribe to the [Roots Blog](https://roots.io/blog/)
|
|
33
|
+
- Subscribe to the [Roots Newsletter](https://roots.io/subscribe/)
|
|
34
|
+
|
|
35
|
+
## Contributing
|
|
36
|
+
|
|
37
|
+
Contributions are welcome from everyone.
|
|
38
|
+
|
|
39
|
+
We have [contribution guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started.
|
|
40
|
+
|
|
41
|
+
## Sponsors
|
|
42
|
+
|
|
43
|
+
Help support our open-source development efforts by [becoming a patron](https://www.patreon.com/rootsdev).
|
|
44
|
+
|
|
45
|
+
<a href="https://k-m.com/"><img src="https://cdn.roots.io/app/uploads/km-digital.svg" alt="KM Digital" width="200" height="150"/></a>
|
|
46
|
+
<a href="https://carrot.com/"><img src="https://cdn.roots.io/app/uploads/carrot.svg" alt="Carrot" width="200" height="150"/></a>
|
|
47
|
+
<a href="https://www.c21redwood.com/"><img src="https://cdn.roots.io/app/uploads/c21redwood.svg" alt="C21 Redwood Realty" width="200" height="150"/></a>
|
|
48
|
+
<a href="https://wordpress.com/"><img src="https://cdn.roots.io/app/uploads/wordpress.svg" alt="WordPress.com" width="200" height="150"/></a>
|
|
49
|
+
<a href="https://pantheon.io/"><img src="https://cdn.roots.io/app/uploads/pantheon.svg" alt="Pantheon" width="200" height="150"/></a>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.make = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const indicator_component_cjs_1 = require("./indicator.component.cjs");
|
|
6
|
+
const indicator_controller_cjs_1 = require("./indicator.controller.cjs");
|
|
7
|
+
const make = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
if (customElements.get('bud-activity-indicator'))
|
|
9
|
+
return;
|
|
10
|
+
customElements.define('bud-activity-indicator', indicator_component_cjs_1.Component);
|
|
11
|
+
return new indicator_controller_cjs_1.Controller();
|
|
12
|
+
});
|
|
13
|
+
exports.make = make;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/indicator/index.cts"],"names":[],"mappings":";;;;AAAA,uEAAmD;AACnD,yEAAqD;AAE9C,MAAM,IAAI,GAAG,GAA4C,EAAE;IAChE,IAAI,cAAc,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAAE,OAAM;IAExD,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,mCAAS,CAAC,CAAA;IAE1D,OAAO,IAAI,qCAAU,EAAE,CAAA;AACzB,CAAC,CAAA,CAAA;AANY,QAAA,IAAI,QAMhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/index.cts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;2BAAwC,IAAI;EAM5D,CAAA"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Component = void 0;
|
|
4
|
+
const indicator_pulse_cjs_1 = require("./indicator.pulse.cjs");
|
|
5
|
+
/**
|
|
6
|
+
* Indicator web component
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
class Component extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* Component name
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
this.name = `bud-activity-indicator`;
|
|
17
|
+
/**
|
|
18
|
+
* Status indicator colors
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
this.colors = {
|
|
22
|
+
success: [4, 120, 87],
|
|
23
|
+
error: [220, 38, 38],
|
|
24
|
+
warn: [252, 211, 77],
|
|
25
|
+
pending: [59, 130, 246],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get accessor: has errors
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
get hasErrors() {
|
|
33
|
+
return this.getAttribute('has-errors') == 'true';
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get accessor: has warnings
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
get hasWarnings() {
|
|
40
|
+
return this.getAttribute('has-warnings') == 'true';
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Render status indicator
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
render() {
|
|
47
|
+
this.classList.add(this.name);
|
|
48
|
+
this.innerHTML = `
|
|
49
|
+
<style>
|
|
50
|
+
.${this.name} {
|
|
51
|
+
position: fixed;
|
|
52
|
+
width: 10px;
|
|
53
|
+
height: 10px;
|
|
54
|
+
left: 10px;
|
|
55
|
+
bottom: 10px;
|
|
56
|
+
z-index: 9998;
|
|
57
|
+
margin: 10px;
|
|
58
|
+
padding: 5px;
|
|
59
|
+
transition: opacity ease 1500ms;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
${(0, indicator_pulse_cjs_1.pulse)(`${this.name}__success`, this.colors.success)}
|
|
65
|
+
${(0, indicator_pulse_cjs_1.pulse)(`${this.name}__error`, this.colors.error)}
|
|
66
|
+
${(0, indicator_pulse_cjs_1.pulse)(`${this.name}__warning`, this.colors.warn)}
|
|
67
|
+
${(0, indicator_pulse_cjs_1.pulse)(`${this.name}__pending`, this.colors.pending)}
|
|
68
|
+
|
|
69
|
+
.${this.name}__visible {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.${this.name}__hidden {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Show status indicator
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
show() {
|
|
84
|
+
clearTimeout(this.hideTimeout);
|
|
85
|
+
this.classList.remove(`${this.name}__hidden`);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Hide status indicator
|
|
89
|
+
*/
|
|
90
|
+
hide() {
|
|
91
|
+
this.hideTimeout = setTimeout(() => {
|
|
92
|
+
this.classList.remove(`${this.name}__error`, `${this.name}__warning`, `${this.name}__success`, `${this.name}__pending`);
|
|
93
|
+
this.classList.add(`${this.name}__hidden`);
|
|
94
|
+
}, 2000);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Status is pending
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
onPending() {
|
|
101
|
+
this.show();
|
|
102
|
+
this.classList.remove(`${this.name}__error`, `${this.name}__warning`, `${this.name}__success`);
|
|
103
|
+
this.classList.add(`${this.name}__pending`);
|
|
104
|
+
this.hide();
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Status is success
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
onSuccess() {
|
|
111
|
+
this.show();
|
|
112
|
+
this.classList.remove(`${this.name}__error`, `${this.name}__warning`, `${this.name}__pending`);
|
|
113
|
+
this.classList.add(`${this.name}__success`);
|
|
114
|
+
this.hide();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Status is error
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
onError() {
|
|
121
|
+
this.show();
|
|
122
|
+
this.classList.remove(`${this.name}__warning`, `${this.name}__success`, `${this.name}__pending`);
|
|
123
|
+
this.classList.add(`${this.name}__error`);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Status is warning
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
onWarning() {
|
|
130
|
+
this.show();
|
|
131
|
+
this.classList.remove(`${this.name}__error`, `${this.name}__success`, `${this.name}__pending`);
|
|
132
|
+
this.classList.add(`${this.name}__warning`);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Update status
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
update() {
|
|
139
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
140
|
+
if ((_b = (_a = this.payload) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b.length)
|
|
141
|
+
return this.onError();
|
|
142
|
+
if ((_d = (_c = this.payload) === null || _c === void 0 ? void 0 : _c.warnings) === null || _d === void 0 ? void 0 : _d.length)
|
|
143
|
+
return this.onWarning();
|
|
144
|
+
if (!((_f = (_e = this.payload) === null || _e === void 0 ? void 0 : _e.errors) === null || _f === void 0 ? void 0 : _f.length) &&
|
|
145
|
+
!((_h = (_g = this.payload) === null || _g === void 0 ? void 0 : _g.warnings) === null || _h === void 0 ? void 0 : _h.length) &&
|
|
146
|
+
this.payload.action == 'built')
|
|
147
|
+
return this.onSuccess();
|
|
148
|
+
if (((_j = this.payload) === null || _j === void 0 ? void 0 : _j.action) == 'building' ||
|
|
149
|
+
((_k = this.payload) === null || _k === void 0 ? void 0 : _k.action) == 'sync')
|
|
150
|
+
return this.onPending();
|
|
151
|
+
}
|
|
152
|
+
static get observedAttributes() {
|
|
153
|
+
return ['has-errors', 'has-warnings', 'action'];
|
|
154
|
+
}
|
|
155
|
+
attributeChangedCallback() {
|
|
156
|
+
this.update();
|
|
157
|
+
}
|
|
158
|
+
connectedCallback() {
|
|
159
|
+
if (!this.rendered) {
|
|
160
|
+
this.render();
|
|
161
|
+
this.rendered = true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.Component = Component;
|
|
166
|
+
//# sourceMappingURL=indicator.component.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.component.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.component.cts"],"names":[],"mappings":";;;AAAA,+DAA2C;AAE3C;;;GAGG;AACH,MAAa,SAAU,SAAQ,WAAW;IAA1C;;QAOE;;;WAGG;QACI,SAAI,GAAW,wBAAwB,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OAAO,IAAI,CAAC,SAAS,EAAE,CAAA;IAC3B,CAAC;IACM,MAAM,KAAK,kBAAkB;QAClC,OAAO,CAAC,YAAY,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAA;IACjD,CAAC;IAEM,wBAAwB;QAC7B,IAAI,CAAC,MAAM,EAAE,CAAA;IACf,CAAC;IAEM,iBAAiB;QACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,MAAM,EAAE,CAAA;YACb,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;SACrB;IACH,CAAC;CACF;AAzND,8BAyNC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Indicator web component
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class Component extends HTMLElement {
|
|
7
|
+
/**
|
|
8
|
+
* Has component rendered
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
rendered: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Component name
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* Timer
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
hideTimeout: NodeJS.Timer;
|
|
22
|
+
/**
|
|
23
|
+
* hmr status payload
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
payload: any;
|
|
27
|
+
/**
|
|
28
|
+
* Get accessor: has errors
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
get hasErrors(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get accessor: has warnings
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
get hasWarnings(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Status indicator colors
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
colors: Record<string, [number, number, number]>;
|
|
42
|
+
/**
|
|
43
|
+
* Render status indicator
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
render(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Show status indicator
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
show(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Hide status indicator
|
|
54
|
+
*/
|
|
55
|
+
hide(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Status is pending
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
onPending(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Status is success
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
onSuccess(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Status is error
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
onError(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Status is warning
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
onWarning(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Update status
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
update(): void;
|
|
81
|
+
static get observedAttributes(): string[];
|
|
82
|
+
attributeChangedCallback(): void;
|
|
83
|
+
connectedCallback(): void;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=indicator.component.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.component.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.component.cts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;OAGG;IACI,QAAQ,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACI,IAAI,EAAE,MAAM,CAA2B;IAE9C;;;OAGG;IACI,WAAW,EAAE,MAAM,CAAC,KAAK,CAAA;IAEhC;;;OAGG;IACI,OAAO,EAAE,GAAG,CAAA;IAEnB;;;OAGG;IACH,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED;;;OAGG;IACH,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED;;;OAGG;IACI,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAKtD;IAED;;;OAGG;IACI,MAAM;IAmCb;;;OAGG;IACI,IAAI;IAMX;;OAEG;IACI,IAAI;IAYX;;;OAGG;IACI,SAAS;IAchB;;;OAGG;IACI,SAAS;IAchB;;;OAGG;IACI,OAAO;IAYd;;;OAGG;IACI,SAAS;IAYhB;;;OAGG;IACI,MAAM;IAeb,WAAkB,kBAAkB,aAEnC;IAEM,wBAAwB;IAIxB,iBAAiB;CAMzB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Controller = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Activity indicator controller
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
class Controller {
|
|
9
|
+
/**
|
|
10
|
+
* Initialization
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
constructor() {
|
|
14
|
+
/**
|
|
15
|
+
* DOM node
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
this.node = null;
|
|
19
|
+
/**
|
|
20
|
+
* Active WHM payload
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
this.payload = null;
|
|
24
|
+
this.node = document.createElement('bud-activity-indicator');
|
|
25
|
+
document.body && document.body.appendChild(this.node);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Update activity indicator
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
update(payload) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
this.node.payload = payload;
|
|
34
|
+
this.node.setAttribute('has-warnings', (_a = payload.errors) === null || _a === void 0 ? void 0 : _a.length);
|
|
35
|
+
this.node.setAttribute('has-errors', (_b = payload.warnings) === null || _b === void 0 ? void 0 : _b.length);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Controller = Controller;
|
|
39
|
+
//# sourceMappingURL=indicator.controller.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.controller.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.controller.cts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,UAAU;IAarB;;;OAGG;IACH;QAhBA;;;WAGG;QACI,SAAI,GAAG,IAAI,CAAA;QAElB;;;WAGG;QACI,YAAO,GAAG,IAAI,CAAA;QAOnB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAA;QAC5D,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACvD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,OAAO;;QACnB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,CAAC,CAAA;QAC9D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAA,OAAO,CAAC,QAAQ,0CAAE,MAAM,CAAC,CAAA;IAChE,CAAC;CACF;AA/BD,gCA+BC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Activity indicator controller
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare class Controller {
|
|
6
|
+
/**
|
|
7
|
+
* DOM node
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
node: any;
|
|
11
|
+
/**
|
|
12
|
+
* Active WHM payload
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
payload: any;
|
|
16
|
+
/**
|
|
17
|
+
* Initialization
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Update activity indicator
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
update(payload: any): void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=indicator.controller.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.controller.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.controller.cts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,UAAU;IACrB;;;OAGG;IACI,IAAI,MAAO;IAElB;;;OAGG;IACI,OAAO,MAAO;IAErB;;;OAGG;;IAMH;;;OAGG;IACI,MAAM,CAAC,OAAO,KAAA;CAKtB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pulse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* CSS animation for reload indicator
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
const pulse = (name, color) => `
|
|
9
|
+
.${name} {
|
|
10
|
+
transform: scale(1);
|
|
11
|
+
background: rgba(${color[0]}, ${color[1]}, ${color[2]}, 1);
|
|
12
|
+
box-shadow: 0 0 0 0 rgba(${color[0]}, ${color[1]}, ${color[2]}, 1);
|
|
13
|
+
animation: ${name}__pulse 2s infinite;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes ${name}__pulse {
|
|
17
|
+
0% {
|
|
18
|
+
transform: scale(0.95);
|
|
19
|
+
box-shadow: 0 0 0 0 rgba(${color[0]}, ${color[1]}, ${color[2]}, 0.7);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
70% {
|
|
23
|
+
transform: scale(1);
|
|
24
|
+
box-shadow: 0 0 0 10px rgba(${color[0]}, ${color[1]}, ${color[2]}, 0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
100% {
|
|
28
|
+
transform: scale(0.95);
|
|
29
|
+
box-shadow: 0 0 0 0 rgba(${color[0]}, ${color[1]}, ${color[2]}, 0);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
exports.pulse = pulse;
|
|
34
|
+
//# sourceMappingURL=indicator.pulse.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.pulse.cjs","sourceRoot":"","sources":["../../../src/components/indicator/indicator.pulse.cts"],"names":[],"mappings":";;;AAIA;;;GAGG;AACI,MAAM,KAAK,GAAG,CACnB,IAAY,EACZ,KAA+B,EACvB,EAAE,CAAC;KACR,IAAI;;uBAEc,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;+BAC1B,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;iBAChD,IAAI;;;eAGN,IAAI;;;iCAGc,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;;;oCAK/B,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;;;iCAKrC,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;;;CAGlE,CAAA;AA3BY,QAAA,KAAK,SA2BjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface pulse {
|
|
2
|
+
(name: string, color: [number, number, number]): string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* CSS animation for reload indicator
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const pulse: (name: string, color: [number, number, number]) => string;
|
|
9
|
+
//# sourceMappingURL=indicator.pulse.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator.pulse.d.cts","sourceRoot":"","sources":["../../../src/components/indicator/indicator.pulse.cts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;CACxD;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,SACV,MAAM,SACL,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAC9B,MAwBF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.make = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const overlay_component_cjs_1 = require("./overlay.component.cjs");
|
|
6
|
+
const overlay_controller_cjs_1 = require("./overlay.controller.cjs");
|
|
7
|
+
const make = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
if (customElements.get('bud-error'))
|
|
9
|
+
return;
|
|
10
|
+
customElements.define('bud-error', overlay_component_cjs_1.Component);
|
|
11
|
+
return new overlay_controller_cjs_1.Controller();
|
|
12
|
+
});
|
|
13
|
+
exports.make = make;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/overlay/index.cts"],"names":[],"mappings":";;;;AAAA,mEAAiD;AACjD,qEAAmD;AAE5C,MAAM,IAAI,GAAG,GAA4C,EAAE;IAChE,IAAI,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC;QAAE,OAAM;IAE3C,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,iCAAS,CAAC,CAAA;IAE7C,OAAO,IAAI,mCAAU,EAAE,CAAA;AACzB,CAAC,CAAA,CAAA;AANY,QAAA,IAAI,QAMhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/overlay/index.cts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;2BAAwC,IAAI;EAM5D,CAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Component = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Component container
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
class Component extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.name = `bud-overlay`;
|
|
13
|
+
}
|
|
14
|
+
get message() {
|
|
15
|
+
return this.getAttribute('message');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Render component
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
render() {
|
|
23
|
+
this.rendered = true;
|
|
24
|
+
this.classList.add(this.name);
|
|
25
|
+
}
|
|
26
|
+
setInnerHtml(content) {
|
|
27
|
+
this.innerHTML = `
|
|
28
|
+
<style>
|
|
29
|
+
.${this.name} {
|
|
30
|
+
display: none;
|
|
31
|
+
width: 100vw;
|
|
32
|
+
height: 100vh;
|
|
33
|
+
overflow-x: hidden;
|
|
34
|
+
overflow-y: scroll;
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
transition: all 0.2s ease-in-out;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
.${this.name}__visible {
|
|
44
|
+
backdrop-filter: blur(10px);
|
|
45
|
+
background: rgba(255, 255, 255, 0.75);
|
|
46
|
+
border-top: 3px solid red;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
align-content: center;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
transition: all 0.2s ease-in-out;
|
|
52
|
+
z-index: 9999;
|
|
53
|
+
}
|
|
54
|
+
.${this.name} > div {
|
|
55
|
+
align-items: center;
|
|
56
|
+
align-content: center;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
padding: 1rem;
|
|
59
|
+
}
|
|
60
|
+
.${this.name} > div > * {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
width: 100vw;
|
|
63
|
+
padding: 1rem;
|
|
64
|
+
}
|
|
65
|
+
.${this.name} > div > span {
|
|
66
|
+
font-size: 1.5rem;
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
.${this.name} > div > pre {
|
|
70
|
+
font-size: 0.8rem;
|
|
71
|
+
overflow-x: scroll;
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
74
|
+
${content !== null && content !== void 0 ? content : ''}
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
77
|
+
static get observedAttributes() {
|
|
78
|
+
return ['message'];
|
|
79
|
+
}
|
|
80
|
+
attributeChangedCallback() {
|
|
81
|
+
var _a, _b, _c;
|
|
82
|
+
if (!this.documentBodyStyle)
|
|
83
|
+
this.documentBodyStyle = (_a = document.body) === null || _a === void 0 ? void 0 : _a.style;
|
|
84
|
+
if (this.getAttribute('message')) {
|
|
85
|
+
document.body.style.overflow = 'hidden';
|
|
86
|
+
!this.classList.contains(`${this.name}__visible`) &&
|
|
87
|
+
this.classList.add(`${this.name}__visible`);
|
|
88
|
+
return this.setInnerHtml(this.getAttribute('message'));
|
|
89
|
+
}
|
|
90
|
+
if (((_b = this.documentBodyStyle) === null || _b === void 0 ? void 0 : _b.overflow) && ((_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.style)) {
|
|
91
|
+
document.body.style.overflow = this.documentBodyStyle.overflow;
|
|
92
|
+
}
|
|
93
|
+
this.classList.contains(`${this.name}__visible`) &&
|
|
94
|
+
this.classList.remove(`${this.name}__visible`);
|
|
95
|
+
}
|
|
96
|
+
connectedCallback() {
|
|
97
|
+
var _a;
|
|
98
|
+
if ((_a = document.body) === null || _a === void 0 ? void 0 : _a.style)
|
|
99
|
+
this.documentBodyStyle = document.body.style;
|
|
100
|
+
if (this.rendered)
|
|
101
|
+
return;
|
|
102
|
+
this.render();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.Component = Component;
|
|
106
|
+
//# sourceMappingURL=overlay.component.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.component.cjs","sourceRoot":"","sources":["../../../src/components/overlay/overlay.component.cts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,SAAU,SAAQ,WAAW;IAuBxC;QACE,KAAK,EAAE,CAAA;QAvBF,SAAI,GAAW,aAAa,CAAA;IAwBnC,CAAC;IAND,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC;IAMD;;;;OAIG;IACI,MAAM;QACX,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;QACpB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;IAEM,YAAY,CAAC,OAAe;QACjC,IAAI,CAAC,SAAS,GAAG;;SAEZ,IAAI,CAAC,IAAI;;;;;;;;;;;;;;SAcT,IAAI,CAAC,IAAI;;;;;;;;;;;SAWT,IAAI,CAAC,IAAI;;;;;;SAMT,IAAI,CAAC,IAAI;;;;;SAKT,IAAI,CAAC,IAAI;;;;SAIT,IAAI,CAAC,IAAI;;;;;MAKZ,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE;GAChB,CAAA;IACD,CAAC;IAEM,MAAM,KAAK,kBAAkB;QAClC,OAAO,CAAC,SAAS,CAAC,CAAA;IACpB,CAAC;IAEM,wBAAwB;;QAC7B,IAAI,CAAC,IAAI,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|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class Component extends HTMLElement {
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* `true` if component has been rendered
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
rendered: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* WHM payload
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
payload: any;
|
|
20
|
+
documentBodyStyle: any;
|
|
21
|
+
get message(): string;
|
|
22
|
+
constructor();
|
|
23
|
+
/**
|
|
24
|
+
* Render component
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
render(): void;
|
|
29
|
+
setInnerHtml(content: string): void;
|
|
30
|
+
static get observedAttributes(): string[];
|
|
31
|
+
attributeChangedCallback(): void;
|
|
32
|
+
connectedCallback(): void;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=overlay.component.d.cts.map
|