@lynx-js/web-elements 0.7.6 → 0.7.7
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,16 @@
|
|
|
1
1
|
# @lynx-js/web-elements
|
|
2
2
|
|
|
3
|
+
## 0.7.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: the param `index` of list scrollToPosition function should be `position`. ([#1135](https://github.com/lynx-family/lynx-stack/pull/1135))
|
|
8
|
+
|
|
9
|
+
- fix: in lynx-view all-on-ui mode, the input event of input and textarea is triggered twice, and the first e.detail is a string, which does not conform to the expected data format. ([#1179](https://github.com/lynx-family/lynx-stack/pull/1179))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @lynx-js/web-elements-template@0.7.7
|
|
13
|
+
|
|
3
14
|
## 0.7.6
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ let XInputEvents = (() => {
|
|
|
19
19
|
return class XInputEvents {
|
|
20
20
|
static {
|
|
21
21
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
22
|
-
_private_handleEnableInputEvent_decorators = [registerAttributeHandler('input-filter', true), registerEventEnableStatusChangeHandler('
|
|
22
|
+
_private_handleEnableInputEvent_decorators = [registerAttributeHandler('input-filter', true), registerEventEnableStatusChangeHandler('lynxinput')];
|
|
23
23
|
_private_handleSendComposingInput_decorators = [registerAttributeHandler('send-composing-input', true)];
|
|
24
24
|
_private_handleEnableSelectionEvent_decorators = [registerEventEnableStatusChangeHandler('selection')];
|
|
25
25
|
__esDecorate(this, _private_handleEnableInputEvent_descriptor = { value: __setFunctionName(function (status) {
|
|
@@ -74,7 +74,7 @@ let XInputEvents = (() => {
|
|
|
74
74
|
input.value = filterValue;
|
|
75
75
|
if (isComposing && !this.#sendComposingInput)
|
|
76
76
|
return;
|
|
77
|
-
this.#dom.dispatchEvent(new CustomEvent('
|
|
77
|
+
this.#dom.dispatchEvent(new CustomEvent('lynxinput', {
|
|
78
78
|
...commonComponentEventSetting,
|
|
79
79
|
detail: {
|
|
80
80
|
value: filterValue,
|
|
@@ -97,7 +97,7 @@ let XInputEvents = (() => {
|
|
|
97
97
|
input.value = filterValue;
|
|
98
98
|
// if #sendComposingInput set true, #teleportInput will send detail
|
|
99
99
|
if (!this.#sendComposingInput) {
|
|
100
|
-
this.#dom.dispatchEvent(new CustomEvent('
|
|
100
|
+
this.#dom.dispatchEvent(new CustomEvent('lynxinput', {
|
|
101
101
|
...commonComponentEventSetting,
|
|
102
102
|
detail: {
|
|
103
103
|
value: filterValue,
|
package/dist/XList/XList.d.ts
CHANGED
package/dist/XList/XList.js
CHANGED
|
@@ -61,13 +61,13 @@ let XList = (() => {
|
|
|
61
61
|
else if (typeof params.offset === 'number') {
|
|
62
62
|
offset = { left: params.offset, top: params.offset };
|
|
63
63
|
}
|
|
64
|
-
if (typeof params.
|
|
65
|
-
if (params.
|
|
64
|
+
if (typeof params.position === 'number') {
|
|
65
|
+
if (params.position === 0) {
|
|
66
66
|
this.#getListContainer().scrollTop = 0;
|
|
67
67
|
this.#getListContainer().scrollLeft = 0;
|
|
68
68
|
}
|
|
69
|
-
else if (params.
|
|
70
|
-
const targetKid = this.children.item(params.
|
|
69
|
+
else if (params.position > 0 && params.position < this.childElementCount) {
|
|
70
|
+
const targetKid = this.children.item(params.position);
|
|
71
71
|
if (targetKid instanceof HTMLElement) {
|
|
72
72
|
if (offset) {
|
|
73
73
|
offset = {
|
|
@@ -37,7 +37,7 @@ let XListAttributes = (() => {
|
|
|
37
37
|
connectedCallback() {
|
|
38
38
|
const initialScrollIndex = this.#dom.getAttribute('initial-scroll-index');
|
|
39
39
|
if (initialScrollIndex !== null) {
|
|
40
|
-
const
|
|
40
|
+
const position = parseFloat(initialScrollIndex);
|
|
41
41
|
const scrollToInitialIndex = () => {
|
|
42
42
|
if (this.#dom.clientHeight === 0) {
|
|
43
43
|
// In Safari, there is the potential race condition between the browser's layout and clientWidth calculate.
|
|
@@ -45,7 +45,7 @@ let XListAttributes = (() => {
|
|
|
45
45
|
requestAnimationFrame(scrollToInitialIndex);
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
this.#dom.scrollToPosition({
|
|
48
|
+
this.#dom.scrollToPosition({ position });
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
// The reason for using microtasks is that the width and height of the child element may not be rendered at this time, so it will not be able to scroll.
|
|
@@ -19,7 +19,7 @@ let XTextareaEvents = (() => {
|
|
|
19
19
|
return class XTextareaEvents {
|
|
20
20
|
static {
|
|
21
21
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
22
|
-
_private_handleEnableConfirmEvent_decorators = [registerAttributeHandler('input-filter', true), registerEventEnableStatusChangeHandler('
|
|
22
|
+
_private_handleEnableConfirmEvent_decorators = [registerAttributeHandler('input-filter', true), registerEventEnableStatusChangeHandler('lynxinput')];
|
|
23
23
|
_private_handleSendComposingInput_decorators = [registerAttributeHandler('send-composing-input', true)];
|
|
24
24
|
_private_handleEnableSelectionEvent_decorators = [registerEventEnableStatusChangeHandler('selection')];
|
|
25
25
|
__esDecorate(this, _private_handleEnableConfirmEvent_descriptor = { value: __setFunctionName(function (status) {
|
|
@@ -74,7 +74,7 @@ let XTextareaEvents = (() => {
|
|
|
74
74
|
input.value = filterValue;
|
|
75
75
|
if (isComposing && !this.#sendComposingInput)
|
|
76
76
|
return;
|
|
77
|
-
this.#dom.dispatchEvent(new CustomEvent('
|
|
77
|
+
this.#dom.dispatchEvent(new CustomEvent('lynxinput', {
|
|
78
78
|
...commonComponentEventSetting,
|
|
79
79
|
detail: {
|
|
80
80
|
value: filterValue,
|
|
@@ -97,7 +97,7 @@ let XTextareaEvents = (() => {
|
|
|
97
97
|
input.value = filterValue;
|
|
98
98
|
// if #sendComposingInput set true, #teleportInput will send detail
|
|
99
99
|
if (!this.#sendComposingInput) {
|
|
100
|
-
this.#dom.dispatchEvent(new CustomEvent('
|
|
100
|
+
this.#dom.dispatchEvent(new CustomEvent('lynxinput', {
|
|
101
101
|
...commonComponentEventSetting,
|
|
102
102
|
detail: {
|
|
103
103
|
value: filterValue,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-elements",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
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.7.
|
|
104
|
+
"@lynx-js/web-elements-template": "0.7.7"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"tslib": "^2.8.1"
|