@domql/element 2.5.14 → 2.5.16
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/extend.js +1 -3
- package/dist/cjs/set.js +1 -1
- package/extend.js +1 -3
- package/package.json +2 -2
- package/set.js +2 -1
- package/update.js +1 -0
package/dist/cjs/extend.js
CHANGED
|
@@ -35,9 +35,7 @@ const applyExtend = (element, parent, options = {}) => {
|
|
|
35
35
|
let childExtendStack = [];
|
|
36
36
|
if (parent) {
|
|
37
37
|
element.parent = parent;
|
|
38
|
-
if (!options.ignoreChildExtend) {
|
|
39
|
-
if (props && props.ignoreChildExtend)
|
|
40
|
-
return;
|
|
38
|
+
if (!options.ignoreChildExtend && !(props && props.ignoreChildExtend)) {
|
|
41
39
|
childExtendStack = (0, import_utils2.getExtendStack)(parent.childExtend);
|
|
42
40
|
const ignoreChildExtendRecursive = props && props.ignoreChildExtendRecursive;
|
|
43
41
|
if (parent.childExtendRecursive && !ignoreChildExtendRecursive) {
|
package/dist/cjs/set.js
CHANGED
|
@@ -41,7 +41,7 @@ const set = function(params, options = {}, el) {
|
|
|
41
41
|
const __contentRef = element.content && element.content.__ref;
|
|
42
42
|
if (__contentRef && __contentRef.__cached && (0, import_utils.deepContains)(params, element.content)) {
|
|
43
43
|
console.log("is content equal");
|
|
44
|
-
return element;
|
|
44
|
+
return element.content.update();
|
|
45
45
|
}
|
|
46
46
|
(0, import_content.removeContent)(element);
|
|
47
47
|
if (params) {
|
package/extend.js
CHANGED
|
@@ -31,9 +31,7 @@ export const applyExtend = (element, parent, options = {}) => {
|
|
|
31
31
|
if (parent) {
|
|
32
32
|
element.parent = parent
|
|
33
33
|
// Assign parent attr to the element
|
|
34
|
-
if (!options.ignoreChildExtend) {
|
|
35
|
-
if (props && props.ignoreChildExtend) return
|
|
36
|
-
|
|
34
|
+
if (!options.ignoreChildExtend && !(props && props.ignoreChildExtend)) {
|
|
37
35
|
childExtendStack = getExtendStack(parent.childExtend)
|
|
38
36
|
|
|
39
37
|
// if (parent.childExtendRecursive && (props && !props.ignoreChildExtendRecursive)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.16",
|
|
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": "2987c1965a4cab0258feb592d273d519260f5461",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|
package/set.js
CHANGED
|
@@ -13,8 +13,9 @@ const set = function (params, options = {}, el) {
|
|
|
13
13
|
|
|
14
14
|
if (__contentRef && __contentRef.__cached && deepContains(params, element.content)) {
|
|
15
15
|
console.log('is content equal')
|
|
16
|
-
return element
|
|
16
|
+
return element.content.update()
|
|
17
17
|
}
|
|
18
|
+
|
|
18
19
|
removeContent(element)
|
|
19
20
|
|
|
20
21
|
if (params) {
|
package/update.js
CHANGED
|
@@ -159,6 +159,7 @@ const checkIfOnUpdate = (element, parent, options) => {
|
|
|
159
159
|
element.state = ref.__state
|
|
160
160
|
}
|
|
161
161
|
const created = create(element, parent, element.key, OPTIONS.create)
|
|
162
|
+
// check preventUpdate for an array (Line: 87)
|
|
162
163
|
if (options.preventUpdate !== true && element.on && isFunction(element.on.update)) {
|
|
163
164
|
applyEvent(element.on.update, created, created.state)
|
|
164
165
|
}
|