@domql/element 2.5.144 → 2.5.146
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/dist/cjs/methods/index.js +2 -1
- package/dist/cjs/props/create.js +5 -5
- package/methods/index.js +1 -1
- package/package.json +2 -2
- package/props/create.js +5 -5
|
@@ -175,6 +175,7 @@ const parse = function(excl = []) {
|
|
|
175
175
|
const obj = {};
|
|
176
176
|
const keyList = keys.call(element);
|
|
177
177
|
keyList.forEach((v) => {
|
|
178
|
+
var _a;
|
|
178
179
|
if (excl.includes(v))
|
|
179
180
|
return;
|
|
180
181
|
const val = element[v];
|
|
@@ -190,7 +191,7 @@ const parse = function(excl = []) {
|
|
|
190
191
|
} else if (v === "props") {
|
|
191
192
|
const { __element, update, ...props } = element[v];
|
|
192
193
|
obj[v] = props;
|
|
193
|
-
} else if ((0, import_utils.isDefined)(val))
|
|
194
|
+
} else if ((0, import_utils.isDefined)(val) && !((_a = element.context) == null ? void 0 : _a.methods[v]))
|
|
194
195
|
obj[v] = val;
|
|
195
196
|
});
|
|
196
197
|
return obj;
|
package/dist/cjs/props/create.js
CHANGED
|
@@ -26,21 +26,21 @@ var import_utils = require("@domql/utils");
|
|
|
26
26
|
var import_ignore = require("./ignore");
|
|
27
27
|
var import_inherit = require("./inherit");
|
|
28
28
|
const createPropsStack = (element, parent) => {
|
|
29
|
-
const { props, __ref } = element;
|
|
30
|
-
const propsStack =
|
|
29
|
+
const { props, __ref: ref } = element;
|
|
30
|
+
const propsStack = ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
|
|
31
31
|
if ((0, import_utils.isObject)(props))
|
|
32
32
|
propsStack.push(props);
|
|
33
33
|
else if (props === "inherit" && parent.props)
|
|
34
34
|
propsStack.push(parent.props);
|
|
35
35
|
else if (props)
|
|
36
36
|
propsStack.push(props);
|
|
37
|
-
if ((0, import_utils.isArray)(
|
|
38
|
-
|
|
37
|
+
if ((0, import_utils.isArray)(ref.__extend)) {
|
|
38
|
+
ref.__extend.forEach((extend) => {
|
|
39
39
|
if (extend.props && extend.props !== props)
|
|
40
40
|
propsStack.push(extend.props);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
ref.__props = propsStack;
|
|
44
44
|
return propsStack;
|
|
45
45
|
};
|
|
46
46
|
const syncProps = (props, element) => {
|
package/methods/index.js
CHANGED
|
@@ -160,7 +160,7 @@ export const parse = function (excl = []) {
|
|
|
160
160
|
} else if (v === 'props') {
|
|
161
161
|
const { __element, update, ...props } = element[v]
|
|
162
162
|
obj[v] = props
|
|
163
|
-
} else if (isDefined(val)) obj[v] = val
|
|
163
|
+
} else if (isDefined(val) && !element.context?.methods[v]) obj[v] = val
|
|
164
164
|
})
|
|
165
165
|
return obj
|
|
166
166
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.146",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@domql/state": "^2.5.144",
|
|
32
32
|
"@domql/utils": "^2.5.144"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "aa98091d5476746a259342ce38e5c7b507d12417",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|
package/props/create.js
CHANGED
|
@@ -6,20 +6,20 @@ import { IGNORE_PROPS_PARAMS } from './ignore'
|
|
|
6
6
|
import { inheritParentProps } from './inherit'
|
|
7
7
|
|
|
8
8
|
const createPropsStack = (element, parent) => {
|
|
9
|
-
const { props, __ref } = element
|
|
10
|
-
const propsStack =
|
|
9
|
+
const { props, __ref: ref } = element
|
|
10
|
+
const propsStack = ref.__props = inheritParentProps(element, parent)
|
|
11
11
|
|
|
12
12
|
if (isObject(props)) propsStack.push(props)
|
|
13
13
|
else if (props === 'inherit' && parent.props) propsStack.push(parent.props)
|
|
14
14
|
else if (props) propsStack.push(props)
|
|
15
15
|
|
|
16
|
-
if (isArray(
|
|
17
|
-
|
|
16
|
+
if (isArray(ref.__extend)) {
|
|
17
|
+
ref.__extend.forEach(extend => {
|
|
18
18
|
if (extend.props && extend.props !== props) propsStack.push(extend.props)
|
|
19
19
|
})
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
ref.__props = propsStack
|
|
23
23
|
|
|
24
24
|
return propsStack
|
|
25
25
|
}
|