@lynx-js/web-elements 0.8.3 → 0.8.5
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
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @lynx-js/web-elements
|
|
2
2
|
|
|
3
|
+
## 0.8.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: register attr of width is set to height incorrectly ([#1649](https://github.com/lynx-family/lynx-stack/pull/1649))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @lynx-js/web-elements-template@0.8.5
|
|
11
|
+
|
|
12
|
+
## 0.8.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- feat: add autocomplete attribute support for x-input component ([#1444](https://github.com/lynx-family/lynx-stack/pull/1444))
|
|
17
|
+
|
|
18
|
+
Implements autocomplete attribute forwarding from the x-input custom element to the internal HTML input element in the shadow DOM. This enables standard browser autocomplete functionality for x-input elements.
|
|
19
|
+
|
|
20
|
+
- Add referrerpolicy attribute support to x-image web component ([#1420](https://github.com/lynx-family/lynx-stack/pull/1420))
|
|
21
|
+
|
|
22
|
+
- Updated dependencies []:
|
|
23
|
+
- @lynx-js/web-elements-template@0.8.4
|
|
24
|
+
|
|
3
25
|
## 0.8.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -21,7 +21,7 @@ let CanvasAttributes = (() => {
|
|
|
21
21
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
22
22
|
_handleName_decorators = [registerAttributeHandler('name', true)];
|
|
23
23
|
_handleHeight_decorators = [registerAttributeHandler('height', true)];
|
|
24
|
-
_handleWidth_decorators = [registerAttributeHandler('
|
|
24
|
+
_handleWidth_decorators = [registerAttributeHandler('width', true)];
|
|
25
25
|
__esDecorate(null, null, _handleName_decorators, { kind: "field", name: "handleName", static: false, private: false, access: { has: obj => "handleName" in obj, get: obj => obj.handleName, set: (obj, value) => { obj.handleName = value; } }, metadata: _metadata }, _handleName_initializers, _handleName_extraInitializers);
|
|
26
26
|
__esDecorate(null, null, _handleHeight_decorators, { kind: "field", name: "handleHeight", static: false, private: false, access: { has: obj => "handleHeight" in obj, get: obj => obj.handleHeight, set: (obj, value) => { obj.handleHeight = value; } }, metadata: _metadata }, _handleHeight_initializers, _handleHeight_extraInitializers);
|
|
27
27
|
__esDecorate(null, null, _handleWidth_decorators, { kind: "field", name: "handleWidth", static: false, private: false, access: { has: obj => "handleWidth" in obj, get: obj => obj.handleWidth, set: (obj, value) => { obj.handleWidth = value; } }, metadata: _metadata }, _handleWidth_initializers, _handleWidth_extraInitializers);
|
package/dist/XImage/ImageSrc.js
CHANGED
|
@@ -18,6 +18,9 @@ let ImageSrc = (() => {
|
|
|
18
18
|
let _private_handleCrossorigin_decorators;
|
|
19
19
|
let _private_handleCrossorigin_initializers = [];
|
|
20
20
|
let _private_handleCrossorigin_extraInitializers = [];
|
|
21
|
+
let _private_handleReferrerpolicy_decorators;
|
|
22
|
+
let _private_handleReferrerpolicy_initializers = [];
|
|
23
|
+
let _private_handleReferrerpolicy_extraInitializers = [];
|
|
21
24
|
return class ImageSrc {
|
|
22
25
|
static {
|
|
23
26
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
@@ -25,6 +28,7 @@ let ImageSrc = (() => {
|
|
|
25
28
|
_private_preloadPlaceholder_decorators = [registerAttributeHandler('placeholder', true)];
|
|
26
29
|
_private_handleBlurRadius_decorators = [registerAttributeHandler('blur-radius', true)];
|
|
27
30
|
_private_handleCrossorigin_decorators = [registerAttributeHandler('crossorigin', true)];
|
|
31
|
+
_private_handleReferrerpolicy_decorators = [registerAttributeHandler('referrerpolicy', true)];
|
|
28
32
|
__esDecorate(this, _private_preloadPlaceholder_descriptor = { value: __setFunctionName(function (newVal) {
|
|
29
33
|
if (newVal) {
|
|
30
34
|
new Image().src = newVal;
|
|
@@ -33,6 +37,7 @@ let ImageSrc = (() => {
|
|
|
33
37
|
__esDecorate(null, null, _private_handleSrc_decorators, { kind: "field", name: "#handleSrc", static: false, private: true, access: { has: obj => #handleSrc in obj, get: obj => obj.#handleSrc, set: (obj, value) => { obj.#handleSrc = value; } }, metadata: _metadata }, _private_handleSrc_initializers, _private_handleSrc_extraInitializers);
|
|
34
38
|
__esDecorate(null, null, _private_handleBlurRadius_decorators, { kind: "field", name: "#handleBlurRadius", static: false, private: true, access: { has: obj => #handleBlurRadius in obj, get: obj => obj.#handleBlurRadius, set: (obj, value) => { obj.#handleBlurRadius = value; } }, metadata: _metadata }, _private_handleBlurRadius_initializers, _private_handleBlurRadius_extraInitializers);
|
|
35
39
|
__esDecorate(null, null, _private_handleCrossorigin_decorators, { kind: "field", name: "#handleCrossorigin", static: false, private: true, access: { has: obj => #handleCrossorigin in obj, get: obj => obj.#handleCrossorigin, set: (obj, value) => { obj.#handleCrossorigin = value; } }, metadata: _metadata }, _private_handleCrossorigin_initializers, _private_handleCrossorigin_extraInitializers);
|
|
40
|
+
__esDecorate(null, null, _private_handleReferrerpolicy_decorators, { kind: "field", name: "#handleReferrerpolicy", static: false, private: true, access: { has: obj => #handleReferrerpolicy in obj, get: obj => obj.#handleReferrerpolicy, set: (obj, value) => { obj.#handleReferrerpolicy = value; } }, metadata: _metadata }, _private_handleReferrerpolicy_initializers, _private_handleReferrerpolicy_extraInitializers);
|
|
36
41
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
37
42
|
}
|
|
38
43
|
static observedAttributes = [
|
|
@@ -40,6 +45,7 @@ let ImageSrc = (() => {
|
|
|
40
45
|
'placeholder',
|
|
41
46
|
'blur-radius',
|
|
42
47
|
'crossorigin',
|
|
48
|
+
'referrerpolicy',
|
|
43
49
|
];
|
|
44
50
|
#dom = __runInitializers(this, _instanceExtraInitializers);
|
|
45
51
|
#getImg = genDomGetter(() => this.#dom.shadowRoot, '#img');
|
|
@@ -49,7 +55,8 @@ let ImageSrc = (() => {
|
|
|
49
55
|
get #preloadPlaceholder() { return _private_preloadPlaceholder_descriptor.value; }
|
|
50
56
|
#handleBlurRadius = (__runInitializers(this, _private_handleSrc_extraInitializers), __runInitializers(this, _private_handleBlurRadius_initializers, bindToStyle(this.#getImg, '--blur-radius', undefined, true)));
|
|
51
57
|
#handleCrossorigin = (__runInitializers(this, _private_handleBlurRadius_extraInitializers), __runInitializers(this, _private_handleCrossorigin_initializers, bindToAttribute(this.#getImg, 'crossorigin')));
|
|
52
|
-
#
|
|
58
|
+
#handleReferrerpolicy = (__runInitializers(this, _private_handleCrossorigin_extraInitializers), __runInitializers(this, _private_handleReferrerpolicy_initializers, bindToAttribute(this.#getImg, 'referrerpolicy')));
|
|
59
|
+
#onImageError = (__runInitializers(this, _private_handleReferrerpolicy_extraInitializers), () => {
|
|
53
60
|
const currentSrc = this.#getImg().src;
|
|
54
61
|
const placeholder = this.#dom.getAttribute('placeholder');
|
|
55
62
|
if (placeholder && currentSrc !== placeholder) {
|
|
@@ -15,11 +15,15 @@ let XInputAttribute = (() => {
|
|
|
15
15
|
let _private_handleDisabled_decorators;
|
|
16
16
|
let _private_handleDisabled_initializers = [];
|
|
17
17
|
let _private_handleDisabled_extraInitializers = [];
|
|
18
|
+
let _private_handleAutocomplete_decorators;
|
|
19
|
+
let _private_handleAutocomplete_initializers = [];
|
|
20
|
+
let _private_handleAutocomplete_extraInitializers = [];
|
|
18
21
|
return class XInputAttribute {
|
|
19
22
|
static {
|
|
20
23
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
21
24
|
_private_handleValue_decorators = [registerAttributeHandler('value', false)];
|
|
22
25
|
_private_handleDisabled_decorators = [registerAttributeHandler('disabled', true)];
|
|
26
|
+
_private_handleAutocomplete_decorators = [registerAttributeHandler('autocomplete', true)];
|
|
23
27
|
__esDecorate(this, _private_handleValue_descriptor = { value: __setFunctionName(function (newValue) {
|
|
24
28
|
if (newValue) {
|
|
25
29
|
const maxlength = parseFloat(this.#dom.getAttribute('maxlength') ?? '');
|
|
@@ -35,15 +39,17 @@ let XInputAttribute = (() => {
|
|
|
35
39
|
}
|
|
36
40
|
}, "#handleValue") }, _private_handleValue_decorators, { kind: "method", name: "#handleValue", static: false, private: true, access: { has: obj => #handleValue in obj, get: obj => obj.#handleValue }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
37
41
|
__esDecorate(null, null, _private_handleDisabled_decorators, { kind: "field", name: "#handleDisabled", static: false, private: true, access: { has: obj => #handleDisabled in obj, get: obj => obj.#handleDisabled, set: (obj, value) => { obj.#handleDisabled = value; } }, metadata: _metadata }, _private_handleDisabled_initializers, _private_handleDisabled_extraInitializers);
|
|
42
|
+
__esDecorate(null, null, _private_handleAutocomplete_decorators, { kind: "field", name: "#handleAutocomplete", static: false, private: true, access: { has: obj => #handleAutocomplete in obj, get: obj => obj.#handleAutocomplete, set: (obj, value) => { obj.#handleAutocomplete = value; } }, metadata: _metadata }, _private_handleAutocomplete_initializers, _private_handleAutocomplete_extraInitializers);
|
|
38
43
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
39
44
|
}
|
|
40
|
-
static observedAttributes = ['value', 'disabled'];
|
|
45
|
+
static observedAttributes = ['value', 'disabled', 'autocomplete'];
|
|
41
46
|
#dom = __runInitializers(this, _instanceExtraInitializers);
|
|
42
47
|
#getInputElement = genDomGetter(() => this.#dom.shadowRoot, '#input');
|
|
43
48
|
get #handleValue() { return _private_handleValue_descriptor.value; }
|
|
44
49
|
#handleDisabled = __runInitializers(this, _private_handleDisabled_initializers, bindToAttribute(this.#getInputElement, 'disabled', (value) => (value !== null ? '' : null)));
|
|
50
|
+
#handleAutocomplete = (__runInitializers(this, _private_handleDisabled_extraInitializers), __runInitializers(this, _private_handleAutocomplete_initializers, bindToAttribute(this.#getInputElement, 'autocomplete')));
|
|
45
51
|
constructor(dom) {
|
|
46
|
-
__runInitializers(this,
|
|
52
|
+
__runInitializers(this, _private_handleAutocomplete_extraInitializers);
|
|
47
53
|
this.#dom = dom;
|
|
48
54
|
}
|
|
49
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-elements",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
],
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"@lynx-js/web-elements-reactive": "0.2.2",
|
|
104
|
-
"@lynx-js/web-elements-template": "0.8.
|
|
104
|
+
"@lynx-js/web-elements-template": "0.8.5"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"tslib": "^2.8.1"
|