@domql/element 2.5.147 → 2.5.148
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/create.js +5 -3
- package/dist/cjs/create.js +8 -4
- package/dist/cjs/methods/index.js +1 -2
- package/methods/index.js +1 -3
- package/package.json +6 -6
package/create.js
CHANGED
|
@@ -232,9 +232,11 @@ const renderElement = (element, parent, options, attachOptions) => {
|
|
|
232
232
|
if (path.includes('ComponentsGrid')) path.splice(0, path.indexOf('ComponentsGrid') + 2)
|
|
233
233
|
if (path.includes('demoComponent')) path.splice(0, path.indexOf('demoComponent') + 1)
|
|
234
234
|
const isDemoComponent = element.lookup(el => el.state.key)?.state?.key
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
element.warn('Error happened in:', isDemoComponent ? isDemoComponent + ' ' : '' + path.join('.'))
|
|
236
|
+
element.verbose()
|
|
237
|
+
element.error(e)
|
|
238
|
+
if (element.on?.error) element.on.error(e, element, element.state, element.context, options)
|
|
239
|
+
if (element.props?.onError) element.props.onError(e, element, element.state, element.context, options)
|
|
238
240
|
}
|
|
239
241
|
}
|
|
240
242
|
|
package/dist/cjs/create.js
CHANGED
|
@@ -169,7 +169,7 @@ const addElementIntoParentChildren = (element, parent) => {
|
|
|
169
169
|
};
|
|
170
170
|
const visitedElements = /* @__PURE__ */ new WeakMap();
|
|
171
171
|
const renderElement = (element, parent, options, attachOptions) => {
|
|
172
|
-
var _a, _b;
|
|
172
|
+
var _a, _b, _c, _d;
|
|
173
173
|
if (visitedElements.has(element)) {
|
|
174
174
|
if (ENV === "test" || ENV === "development")
|
|
175
175
|
console.warn("Cyclic rendering detected:", element.__ref.path);
|
|
@@ -190,9 +190,13 @@ const renderElement = (element, parent, options, attachOptions) => {
|
|
|
190
190
|
if (path.includes("demoComponent"))
|
|
191
191
|
path.splice(0, path.indexOf("demoComponent") + 1);
|
|
192
192
|
const isDemoComponent = (_b = (_a = element.lookup((el) => el.state.key)) == null ? void 0 : _a.state) == null ? void 0 : _b.key;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
element.warn("Error happened in:", isDemoComponent ? isDemoComponent + " " : "" + path.join("."));
|
|
194
|
+
element.verbose();
|
|
195
|
+
element.error(e);
|
|
196
|
+
if ((_c = element.on) == null ? void 0 : _c.error)
|
|
197
|
+
element.on.error(e, element, element.state, element.context, options);
|
|
198
|
+
if ((_d = element.props) == null ? void 0 : _d.onError)
|
|
199
|
+
element.props.onError(e, element, element.state, element.context, options);
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
if (!ref.__if) {
|
|
@@ -103,7 +103,6 @@ function lookdown(param) {
|
|
|
103
103
|
if (lookdown2)
|
|
104
104
|
return lookdown2;
|
|
105
105
|
}
|
|
106
|
-
return null;
|
|
107
106
|
}
|
|
108
107
|
function lookdownAll(param, results = []) {
|
|
109
108
|
var _a;
|
|
@@ -122,7 +121,7 @@ function lookdownAll(param, results = []) {
|
|
|
122
121
|
}
|
|
123
122
|
(_a = childElem == null ? void 0 : childElem.lookdownAll) == null ? void 0 : _a.call(childElem, param, results);
|
|
124
123
|
}
|
|
125
|
-
return results.length ? results :
|
|
124
|
+
return results.length ? results : void 0;
|
|
126
125
|
}
|
|
127
126
|
function setNodeStyles(params = {}) {
|
|
128
127
|
var _a;
|
package/methods/index.js
CHANGED
|
@@ -64,8 +64,6 @@ export function lookdown (param) {
|
|
|
64
64
|
const lookdown = childElem?.lookdown?.(param)
|
|
65
65
|
if (lookdown) return lookdown
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
return null
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
export function lookdownAll (param, results = []) {
|
|
@@ -85,7 +83,7 @@ export function lookdownAll (param, results = []) {
|
|
|
85
83
|
childElem?.lookdownAll?.(param, results)
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
return results.length ? results :
|
|
86
|
+
return results.length ? results : undefined
|
|
89
87
|
}
|
|
90
88
|
|
|
91
89
|
export function setNodeStyles (params = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.148",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@domql/event": "^2.5.
|
|
30
|
-
"@domql/render": "^2.5.
|
|
31
|
-
"@domql/state": "^2.5.
|
|
32
|
-
"@domql/utils": "^2.5.
|
|
29
|
+
"@domql/event": "^2.5.148",
|
|
30
|
+
"@domql/render": "^2.5.148",
|
|
31
|
+
"@domql/state": "^2.5.148",
|
|
32
|
+
"@domql/utils": "^2.5.148"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "6706914c73f3c9669ff443c0c890dea1f4e908ab",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|