@golemui/gui-lit 1.5.0-rc.0 → 1.5.0-rc.2
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/CHANGELOG.md +27 -0
- package/{file-upload.element-BYsufDWc.js → file-upload.element-l_l_ubxJ.js} +17 -10
- package/index.js +14 -2311
- package/index.umd.cjs +136 -132
- package/lib/components/file-upload.element.d.ts +1 -0
- package/lib/components/multi-file-upload.element.d.ts +1 -0
- package/{multi-file-upload.element-BLHDoyzh.js → multi-file-upload.element-DzAZAfc1.js} +23 -16
- package/package.json +6 -6
|
@@ -13,5 +13,6 @@ export declare class FileUploadElement extends LitElement implements WithWidget
|
|
|
13
13
|
connectedCallback(): void;
|
|
14
14
|
render(): import('lit-html').TemplateResult<1>;
|
|
15
15
|
valueChanged(event: CustomEvent): void;
|
|
16
|
+
onInputError(event: CustomEvent): void;
|
|
16
17
|
disconnectedCallback(): void;
|
|
17
18
|
}
|
|
@@ -13,5 +13,6 @@ export declare class MultiFileUploadElement extends LitElement implements WithWi
|
|
|
13
13
|
connectedCallback(): void;
|
|
14
14
|
render(): import('lit-html').TemplateResult<1>;
|
|
15
15
|
valueChanged(event: CustomEvent): void;
|
|
16
|
+
onInputError(event: CustomEvent): void;
|
|
16
17
|
disconnectedCallback(): void;
|
|
17
18
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { InputWidgetAdapter as
|
|
1
|
+
import { InputWidgetAdapter as n, formContext as d, inputContext as p } from "@golemui/lit";
|
|
2
2
|
import "@golemui/gui-components/multi-file-upload";
|
|
3
3
|
import { consume as u, provide as c } from "@lit/context";
|
|
4
4
|
import { LitElement as m, html as h } from "lit";
|
|
5
5
|
import { property as g } from "lit/decorators.js";
|
|
6
|
-
import { unsubscribeAll as
|
|
6
|
+
import { unsubscribeAll as $, safeDefine as b } from "@golemui/lit/internals";
|
|
7
7
|
import "rxjs";
|
|
8
|
-
var f = Object.defineProperty,
|
|
9
|
-
for (var a = void 0,
|
|
10
|
-
(
|
|
8
|
+
var f = Object.defineProperty, l = (r, e, t, v) => {
|
|
9
|
+
for (var a = void 0, i = r.length - 1, o; i >= 0; i--)
|
|
10
|
+
(o = r[i]) && (a = o(e, t, a) || a);
|
|
11
11
|
return a && f(e, t, a), a;
|
|
12
12
|
};
|
|
13
|
-
class
|
|
13
|
+
class s extends m {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.adapter = new
|
|
15
|
+
super(...arguments), this.adapter = new n(), this.subscriptions = [];
|
|
16
16
|
}
|
|
17
17
|
createRenderRoot() {
|
|
18
18
|
return this;
|
|
@@ -49,16 +49,19 @@ class r extends m {
|
|
|
49
49
|
.buttonLabel=${e.buttonLabel}
|
|
50
50
|
.removeAriaLabel=${e.removeAriaLabel}
|
|
51
51
|
.cancelAriaLabel=${e.cancelAriaLabel}
|
|
52
|
-
.
|
|
52
|
+
.retryAriaLabel=${e.retryAriaLabel}
|
|
53
53
|
.removeIcon=${e.removeIcon}
|
|
54
|
+
.retryIcon=${e.retryIcon}
|
|
54
55
|
.maxSizeMessage=${e.maxSizeMessage}
|
|
55
56
|
.acceptMessage=${e.acceptMessage}
|
|
57
|
+
.interruptedMessage=${e.interruptedMessage}
|
|
56
58
|
.missingServiceMessage=${e.missingServiceMessage}
|
|
57
59
|
.uploadedMessage=${e.uploadedMessage}
|
|
58
60
|
.removedMessage=${e.removedMessage}
|
|
59
61
|
.failedMessage=${e.failedMessage}
|
|
60
62
|
@change=${this.valueChanged}
|
|
61
63
|
@blur=${() => this.adapter.onBlur()}
|
|
64
|
+
@inputError=${this.onInputError}
|
|
62
65
|
></gui-multi-file-upload>
|
|
63
66
|
`;
|
|
64
67
|
}
|
|
@@ -66,18 +69,22 @@ class r extends m {
|
|
|
66
69
|
const t = e.detail.value;
|
|
67
70
|
this.adapter.valueChanged(t);
|
|
68
71
|
}
|
|
72
|
+
onInputError(e) {
|
|
73
|
+
const t = e.detail.message;
|
|
74
|
+
this.adapter.injectValidationIssues(t ? [t] : null);
|
|
75
|
+
}
|
|
69
76
|
disconnectedCallback() {
|
|
70
|
-
super.disconnectedCallback(), this.adapter.destroy(),
|
|
77
|
+
super.disconnectedCallback(), this.adapter.destroy(), $(this.subscriptions);
|
|
71
78
|
}
|
|
72
79
|
}
|
|
73
|
-
|
|
74
|
-
u({ context:
|
|
80
|
+
l([
|
|
81
|
+
u({ context: d }),
|
|
75
82
|
g({ attribute: !1 })
|
|
76
|
-
],
|
|
77
|
-
|
|
83
|
+
], s.prototype, "formContext");
|
|
84
|
+
l([
|
|
78
85
|
c({ context: p })
|
|
79
|
-
],
|
|
80
|
-
|
|
86
|
+
], s.prototype, "adapter");
|
|
87
|
+
b("gui-multi-file-upload-input", s);
|
|
81
88
|
export {
|
|
82
|
-
|
|
89
|
+
s as MultiFileUploadElement
|
|
83
90
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemui/gui-lit",
|
|
3
|
-
"version": "1.5.0-rc.
|
|
3
|
+
"version": "1.5.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"*.md"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@golemui/lit": "1.5.0-rc.
|
|
29
|
-
"@golemui/core": "1.5.0-rc.
|
|
30
|
-
"@golemui/gui-components": "1.5.0-rc.
|
|
31
|
-
"@golemui/gui-shared": "1.5.0-rc.
|
|
32
|
-
"@golemui/gui-validators": "1.5.0-rc.
|
|
28
|
+
"@golemui/lit": "1.5.0-rc.2",
|
|
29
|
+
"@golemui/core": "1.5.0-rc.2",
|
|
30
|
+
"@golemui/gui-components": "1.5.0-rc.2",
|
|
31
|
+
"@golemui/gui-shared": "1.5.0-rc.2",
|
|
32
|
+
"@golemui/gui-validators": "1.5.0-rc.2",
|
|
33
33
|
"@lit/context": "^1.1.6",
|
|
34
34
|
"lit-html": "^3.3.1",
|
|
35
35
|
"lit": "^3.3.1",
|