@domql/element 2.5.60 → 2.5.62
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 +7 -2
- package/dist/cjs/create.js +9 -2
- package/package.json +2 -2
package/create.js
CHANGED
|
@@ -152,7 +152,8 @@ const createBasedOnType = (element, parent, key, options) => {
|
|
|
152
152
|
const redefineElement = (element, parent, key, options) => {
|
|
153
153
|
const elementWrapper = createBasedOnType(element, parent, key, options)
|
|
154
154
|
|
|
155
|
-
if (options.syntaxv3 ||
|
|
155
|
+
if (options.syntaxv3 || element.props?.syntaxv3 || parent?.props?.syntaxv3) {
|
|
156
|
+
element.props.syntaxv3 = true
|
|
156
157
|
return createValidDomqlObjectFromSugar(element, parent, key, options)
|
|
157
158
|
} else if (checkIfKeyIsComponent(key)) {
|
|
158
159
|
return applyKeyComponentAsExtend(elementWrapper, parent, key)
|
|
@@ -214,7 +215,11 @@ const renderElement = (element, parent, options, attachOptions) => {
|
|
|
214
215
|
const { __ref: ref, key } = element
|
|
215
216
|
|
|
216
217
|
// CREATE a real NODE
|
|
217
|
-
|
|
218
|
+
try {
|
|
219
|
+
createNode(element, options)
|
|
220
|
+
} catch (e) {
|
|
221
|
+
if (ENV === 'test' || ENV === 'development') console.warn(e)
|
|
222
|
+
}
|
|
218
223
|
|
|
219
224
|
if (!ref.__if) {
|
|
220
225
|
parent[key || element.key] = element
|
package/dist/cjs/create.js
CHANGED
|
@@ -115,8 +115,10 @@ const createBasedOnType = (element, parent, key, options) => {
|
|
|
115
115
|
return element;
|
|
116
116
|
};
|
|
117
117
|
const redefineElement = (element, parent, key, options) => {
|
|
118
|
+
var _a, _b;
|
|
118
119
|
const elementWrapper = createBasedOnType(element, parent, key, options);
|
|
119
|
-
if (options.syntaxv3 || element.props
|
|
120
|
+
if (options.syntaxv3 || ((_a = element.props) == null ? void 0 : _a.syntaxv3) || ((_b = parent == null ? void 0 : parent.props) == null ? void 0 : _b.syntaxv3)) {
|
|
121
|
+
element.props.syntaxv3 = true;
|
|
120
122
|
return (0, import_component.createValidDomqlObjectFromSugar)(element, parent, key, options);
|
|
121
123
|
} else if ((0, import_component.checkIfKeyIsComponent)(key)) {
|
|
122
124
|
return (0, import_component.applyKeyComponentAsExtend)(elementWrapper, parent, key);
|
|
@@ -165,7 +167,12 @@ const addElementIntoParentChildren = (element, parent) => {
|
|
|
165
167
|
};
|
|
166
168
|
const renderElement = (element, parent, options, attachOptions) => {
|
|
167
169
|
const { __ref: ref, key } = element;
|
|
168
|
-
|
|
170
|
+
try {
|
|
171
|
+
(0, import_node.default)(element, options);
|
|
172
|
+
} catch (e) {
|
|
173
|
+
if (ENV === "test" || ENV === "development")
|
|
174
|
+
console.warn(e);
|
|
175
|
+
}
|
|
169
176
|
if (!ref.__if) {
|
|
170
177
|
parent[key || element.key] = element;
|
|
171
178
|
return element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.62",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@domql/state": "latest",
|
|
32
32
|
"@domql/utils": "latest"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "005657169525f7aaa256f4e62d6a4688d6e2046a",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|