ember-native 3.0.0 → 3.0.1
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.
|
@@ -8,8 +8,6 @@ export default class ViewNode {
|
|
|
8
8
|
_tagName: any;
|
|
9
9
|
parentNode: ViewNode | null;
|
|
10
10
|
childNodes: ViewNode[];
|
|
11
|
-
prevSibling: ViewNode | null;
|
|
12
|
-
nextSibling: ViewNode | null;
|
|
13
11
|
_ownerDocument: any;
|
|
14
12
|
_meta: any;
|
|
15
13
|
get textContent(): string;
|
|
@@ -26,6 +24,8 @@ export default class ViewNode {
|
|
|
26
24
|
get tagName(): any;
|
|
27
25
|
get firstChild(): ViewNode | null | undefined;
|
|
28
26
|
get lastChild(): ViewNode | null | undefined;
|
|
27
|
+
get nextSibling(): ViewNode | null;
|
|
28
|
+
get prevSibling(): ViewNode | null;
|
|
29
29
|
get meta(): any;
|
|
30
30
|
get isConnected(): boolean;
|
|
31
31
|
get ownerDocument(): DocumentNode | null;
|
|
@@ -74,12 +74,6 @@ class FrameElement extends NativeElementNode {
|
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
childNode.parentNode = null;
|
|
77
|
-
|
|
78
|
-
// reset the prevSibling and nextSibling. If not, a keep-alived component will
|
|
79
|
-
// still have a filled nextSibling attribute so vue will not
|
|
80
|
-
// insert the node again to the parent. See #220
|
|
81
|
-
childNode.prevSibling = null;
|
|
82
|
-
childNode.nextSibling = null;
|
|
83
77
|
this.childNodes = this.childNodes.filter(node => node !== childNode);
|
|
84
78
|
childNode.removeChildren();
|
|
85
79
|
this.onRemovedChild(childNode);
|
|
@@ -50,16 +50,12 @@ class ViewNode {
|
|
|
50
50
|
_defineProperty(this, "nodeType", void 0);
|
|
51
51
|
_defineProperty(this, "_tagName", void 0);
|
|
52
52
|
_defineProperty(this, "childNodes", void 0);
|
|
53
|
-
_defineProperty(this, "prevSibling", void 0);
|
|
54
|
-
_defineProperty(this, "nextSibling", void 0);
|
|
55
53
|
_defineProperty(this, "_ownerDocument", void 0);
|
|
56
54
|
_defineProperty(this, "_meta", void 0);
|
|
57
55
|
this.nodeType = null;
|
|
58
56
|
this._tagName = null;
|
|
59
57
|
this.parentNode = null;
|
|
60
58
|
this.childNodes = [];
|
|
61
|
-
this.prevSibling = null;
|
|
62
|
-
this.nextSibling = null;
|
|
63
59
|
this._ownerDocument = null;
|
|
64
60
|
this._meta = null;
|
|
65
61
|
this.attributes = [];
|
|
@@ -87,6 +83,26 @@ class ViewNode {
|
|
|
87
83
|
get lastChild() {
|
|
88
84
|
return this.childNodes.length ? this.childNodes[this.childNodes.length - 1] : null;
|
|
89
85
|
}
|
|
86
|
+
get nextSibling() {
|
|
87
|
+
if (!this.parentNode) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const index = this.parentNode.childNodes.indexOf(this);
|
|
91
|
+
if (index === -1 || index === this.parentNode.childNodes.length - 1) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
return this.parentNode.childNodes[index + 1];
|
|
95
|
+
}
|
|
96
|
+
get prevSibling() {
|
|
97
|
+
if (!this.parentNode) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const index = this.parentNode.childNodes.indexOf(this);
|
|
101
|
+
if (index <= 0) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
return this.parentNode.childNodes[index - 1];
|
|
105
|
+
}
|
|
90
106
|
get meta() {
|
|
91
107
|
if (this._meta) {
|
|
92
108
|
return this._meta;
|
|
@@ -138,12 +154,15 @@ class ViewNode {
|
|
|
138
154
|
if (childNode.parentNode && childNode.parentNode !== this) {
|
|
139
155
|
throw new Error(`Can't insert child, because it already has a different parent.`);
|
|
140
156
|
}
|
|
141
|
-
if (childNode.parentNode === this)
|
|
157
|
+
if (childNode.parentNode === this) {
|
|
158
|
+
// we don't need to throw an error here, because it is a valid case
|
|
159
|
+
// for example when switching the order of elements in the tree
|
|
160
|
+
// fixes #127 - see for more details
|
|
161
|
+
// fixes #240
|
|
162
|
+
// throw new Error(`Can't insert child, because it is already a child.`)
|
|
163
|
+
this.removeChild(childNode);
|
|
164
|
+
}
|
|
142
165
|
const index = this.childNodes.indexOf(referenceNode);
|
|
143
|
-
childNode.nextSibling = referenceNode;
|
|
144
|
-
childNode.prevSibling = this.childNodes[index - 1];
|
|
145
|
-
this.childNodes[index - 1].nextSibling = childNode;
|
|
146
|
-
referenceNode.prevSibling = childNode;
|
|
147
166
|
this.childNodes.splice(index, 0, childNode);
|
|
148
167
|
childNode.parentNode = this;
|
|
149
168
|
this.onInsertedChild(childNode, index);
|
|
@@ -155,10 +174,13 @@ class ViewNode {
|
|
|
155
174
|
if (childNode.parentNode && childNode.parentNode !== this) {
|
|
156
175
|
throw new Error(`Can't append child, because it already has a different parent.`);
|
|
157
176
|
}
|
|
158
|
-
if (childNode.parentNode === this)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
177
|
+
if (childNode.parentNode === this) {
|
|
178
|
+
// we don't need to throw an error here, because it is a valid case
|
|
179
|
+
// for example when switching the order of elements in the tree
|
|
180
|
+
// fixes #127 - see for more details
|
|
181
|
+
// fixes #240
|
|
182
|
+
// throw new Error(`Can't append child, because it is already a child.`)
|
|
183
|
+
this.removeChild(childNode);
|
|
162
184
|
}
|
|
163
185
|
this.childNodes.push(childNode);
|
|
164
186
|
childNode.parentNode = this;
|
|
@@ -175,12 +197,6 @@ class ViewNode {
|
|
|
175
197
|
throw new Error(`Can't remove child, because it has a different parent.`);
|
|
176
198
|
}
|
|
177
199
|
childNode.parentNode = null;
|
|
178
|
-
if (childNode.prevSibling) {
|
|
179
|
-
childNode.prevSibling.nextSibling = childNode.nextSibling;
|
|
180
|
-
}
|
|
181
|
-
if (childNode.nextSibling) {
|
|
182
|
-
childNode.nextSibling.prevSibling = childNode.prevSibling;
|
|
183
|
-
}
|
|
184
200
|
|
|
185
201
|
// reset the prevSibling and nextSibling. If not, a keep-alived component will
|
|
186
202
|
// still have a filled nextSibling attribute so vue will not
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-native",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "the Ember framework with Nativescript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@ember/optional-features": "^2.0.0",
|
|
58
58
|
"@embroider/addon-dev": "^8.1.0",
|
|
59
59
|
"@embroider/compat": "^4.1.0",
|
|
60
|
-
"@embroider/core": "^4.
|
|
61
|
-
"@embroider/macros": "^1.
|
|
62
|
-
"@embroider/shared-internals": "^3.0.
|
|
60
|
+
"@embroider/core": "^4.4.0",
|
|
61
|
+
"@embroider/macros": "^1.19.5",
|
|
62
|
+
"@embroider/shared-internals": "^3.0.1",
|
|
63
63
|
"@embroider/vite": "^1.4.2",
|
|
64
64
|
"@embroider/util": "^1.13.3",
|
|
65
65
|
"@embroider/webpack": "^4.1.1",
|
|
@@ -67,28 +67,28 @@
|
|
|
67
67
|
"@glint/core": "^1.5.0",
|
|
68
68
|
"@glint/environment-ember-loose": "^1.5.0",
|
|
69
69
|
"@glint/environment-ember-template-imports": "^1.5.0",
|
|
70
|
-
"@glint/template": "^1.
|
|
70
|
+
"@glint/template": "^1.7.3",
|
|
71
71
|
"@nativescript/core": "^8.9.7",
|
|
72
72
|
"@release-it-plugins/lerna-changelog": "^8.0.1",
|
|
73
|
-
"@rollup/plugin-babel": "^6.0
|
|
74
|
-
"@tsconfig/ember": "^3.0.
|
|
73
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
74
|
+
"@tsconfig/ember": "^3.0.12",
|
|
75
75
|
"@types/babel__core": "^7.20.5",
|
|
76
76
|
"@types/jquery": "^3.5.16",
|
|
77
|
-
"@types/qunit": "^2.19.
|
|
77
|
+
"@types/qunit": "^2.19.13",
|
|
78
78
|
"@types/qunit-dom": "^0.7.0",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
80
|
-
"@typescript-eslint/parser": "^8.
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.48.0",
|
|
81
81
|
"typescript-eslint": "^8.38.0",
|
|
82
82
|
"babel-import-util": "^3.0.0",
|
|
83
|
-
"babel-plugin-ember-template-compilation": "^3.0.
|
|
83
|
+
"babel-plugin-ember-template-compilation": "^3.0.1",
|
|
84
84
|
"bower": "^1.8.8",
|
|
85
85
|
"globals": "^16.5.0",
|
|
86
|
-
"broccoli": "^
|
|
86
|
+
"broccoli": "^4.0.0",
|
|
87
87
|
"broccoli-asset-rev": "^3.0.0",
|
|
88
|
-
"concurrently": "^9.2.
|
|
88
|
+
"concurrently": "^9.2.1",
|
|
89
89
|
"content-tag": "^4.0.0",
|
|
90
90
|
"css-loader": "^7.1.2",
|
|
91
|
-
"ember-eslint-parser": "^0.5.
|
|
91
|
+
"ember-eslint-parser": "^0.5.13",
|
|
92
92
|
"ember-modifier": "^4.2.0",
|
|
93
93
|
"ember-source": "^6.6.0",
|
|
94
94
|
"ember-template-lint": "^7.9.1",
|
|
@@ -100,19 +100,19 @@
|
|
|
100
100
|
"eslint-plugin-n": "^17.21.3",
|
|
101
101
|
"eslint-plugin-node": "^11.1.0",
|
|
102
102
|
"eslint-plugin-prettier": "^5.5.4",
|
|
103
|
-
"eslint-plugin-qunit": "^8.
|
|
103
|
+
"eslint-plugin-qunit": "^8.2.5",
|
|
104
104
|
"fix-bad-declaration-output": "^1.1.4",
|
|
105
105
|
"loader.js": "^4.7.0",
|
|
106
106
|
"nativescript-ui-listview": "^15.2.3",
|
|
107
107
|
"prettier": "^3.6.2",
|
|
108
108
|
"prettier-plugin-ember-template-tag": "^2.1.0",
|
|
109
|
-
"qunit": "^2.
|
|
109
|
+
"qunit": "^2.24.3",
|
|
110
110
|
"qunit-dom": "^3.4.0",
|
|
111
111
|
"release-it": "^15.10.3",
|
|
112
112
|
"rollup": "^4.46.3",
|
|
113
113
|
"rollup-plugin-copy": "^3.5.0",
|
|
114
114
|
"router_js": "^8.0.6",
|
|
115
|
-
"sass": "^1.
|
|
115
|
+
"sass": "^1.94.2",
|
|
116
116
|
"sass-embedded": "^1.90.0",
|
|
117
117
|
"sass-loader": "^16.0.4",
|
|
118
118
|
"typescript": "^5.9.2",
|