@domql/element 2.5.151 → 2.5.152
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 +1 -1
- package/dist/cjs/set.js +7 -7
- package/methods/index.js +1 -1
- package/package.json +6 -6
- package/set.js +5 -7
|
@@ -166,7 +166,7 @@ function keys() {
|
|
|
166
166
|
const element = this;
|
|
167
167
|
const keys2 = [];
|
|
168
168
|
for (const param in element) {
|
|
169
|
-
if (import_mixins.registry[param] && !import_mixins.parseFilters.elementKeys.includes(param) || Object.hasOwnProperty.call(element, param)) {
|
|
169
|
+
if (import_mixins.registry[param] && !import_mixins.parseFilters.elementKeys.includes(param) || !Object.hasOwnProperty.call(element, param)) {
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
172
172
|
keys2.push(param);
|
package/dist/cjs/set.js
CHANGED
|
@@ -66,17 +66,19 @@ const set = function(params, options = {}, el) {
|
|
|
66
66
|
const content = (0, import_utils.setContentKey)(element, options);
|
|
67
67
|
const __contentRef = content && content.__ref;
|
|
68
68
|
const lazyLoad = element.props && element.props.lazyLoad;
|
|
69
|
-
if (!options.preventBeforeUpdateListener && !options.preventListeners) {
|
|
70
|
-
const beforeUpdateReturns = (0, import_event.triggerEventOnUpdate)("beforeUpdate", params, element, options);
|
|
71
|
-
if (beforeUpdateReturns === false)
|
|
72
|
-
return element;
|
|
73
|
-
}
|
|
74
69
|
const hasCollection = element.$collection || element.$stateCollection || element.$propsCollection;
|
|
75
70
|
if (options.preventContentUpdate === true && !hasCollection)
|
|
76
71
|
return;
|
|
77
72
|
if (ref.__noCollectionDifference || __contentRef && __contentRef.__cached && (0, import_utils.deepContains)(params, content)) {
|
|
73
|
+
if (!options.preventBeforeUpdateListener && !options.preventListeners) {
|
|
74
|
+
const beforeUpdateReturns = (0, import_event.triggerEventOnUpdate)("beforeUpdate", params, element, options);
|
|
75
|
+
if (beforeUpdateReturns === false)
|
|
76
|
+
return element;
|
|
77
|
+
}
|
|
78
78
|
if (content == null ? void 0 : content.update)
|
|
79
79
|
content.update();
|
|
80
|
+
if (!options.preventUpdateListener)
|
|
81
|
+
(0, import_event.triggerEventOn)("update", element, options);
|
|
80
82
|
return;
|
|
81
83
|
}
|
|
82
84
|
if (params) {
|
|
@@ -93,8 +95,6 @@ const set = function(params, options = {}, el) {
|
|
|
93
95
|
} else
|
|
94
96
|
resetElement(params, element, options);
|
|
95
97
|
}
|
|
96
|
-
if (!options.preventUpdateListener)
|
|
97
|
-
(0, import_event.triggerEventOn)("update", element, options);
|
|
98
98
|
return element;
|
|
99
99
|
};
|
|
100
100
|
var set_default = set;
|
package/methods/index.js
CHANGED
|
@@ -136,7 +136,7 @@ export function keys () {
|
|
|
136
136
|
const element = this
|
|
137
137
|
const keys = []
|
|
138
138
|
for (const param in element) {
|
|
139
|
-
if ((registry[param] && !parseFilters.elementKeys.includes(param)) || Object.hasOwnProperty.call(element, param)) { continue }
|
|
139
|
+
if ((registry[param] && !parseFilters.elementKeys.includes(param)) || !Object.hasOwnProperty.call(element, param)) { continue }
|
|
140
140
|
keys.push(param)
|
|
141
141
|
}
|
|
142
142
|
return keys
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.152",
|
|
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.152",
|
|
30
|
+
"@domql/render": "^2.5.152",
|
|
31
|
+
"@domql/state": "^2.5.152",
|
|
32
|
+
"@domql/utils": "^2.5.152"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "249d2545f3ee35b450ca90d399fc7c3e54a4a7bc",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|
package/set.js
CHANGED
|
@@ -37,16 +37,16 @@ const set = function (params, options = {}, el) {
|
|
|
37
37
|
const __contentRef = content && content.__ref
|
|
38
38
|
const lazyLoad = element.props && element.props.lazyLoad
|
|
39
39
|
|
|
40
|
-
if (!options.preventBeforeUpdateListener && !options.preventListeners) {
|
|
41
|
-
const beforeUpdateReturns = triggerEventOnUpdate('beforeUpdate', params, element, options)
|
|
42
|
-
if (beforeUpdateReturns === false) return element
|
|
43
|
-
}
|
|
44
|
-
|
|
45
40
|
const hasCollection = element.$collection || element.$stateCollection || element.$propsCollection
|
|
46
41
|
if (options.preventContentUpdate === true && !hasCollection) return
|
|
47
42
|
|
|
48
43
|
if (ref.__noCollectionDifference || (__contentRef && __contentRef.__cached && deepContains(params, content))) {
|
|
44
|
+
if (!options.preventBeforeUpdateListener && !options.preventListeners) {
|
|
45
|
+
const beforeUpdateReturns = triggerEventOnUpdate('beforeUpdate', params, element, options)
|
|
46
|
+
if (beforeUpdateReturns === false) return element
|
|
47
|
+
}
|
|
49
48
|
if (content?.update) content.update()
|
|
49
|
+
if (!options.preventUpdateListener) triggerEventOn('update', element, options)
|
|
50
50
|
return
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -63,8 +63,6 @@ const set = function (params, options = {}, el) {
|
|
|
63
63
|
} else resetElement(params, element, options)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
if (!options.preventUpdateListener) triggerEventOn('update', element, options)
|
|
67
|
-
|
|
68
66
|
return element
|
|
69
67
|
}
|
|
70
68
|
|