@domql/state 2.3.137 → 2.3.140
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/inherit.js +1 -1
- package/dist/cjs/updateState.js +0 -2
- package/inherit.js +1 -1
- package/package.json +2 -2
- package/updateState.js +0 -2
package/dist/cjs/inherit.js
CHANGED
|
@@ -41,7 +41,7 @@ const getParentStateInKey = (stateKey, parentState) => {
|
|
|
41
41
|
}
|
|
42
42
|
return parentState;
|
|
43
43
|
};
|
|
44
|
-
const getChildStateInKey = (stateKey, parentState, options) => {
|
|
44
|
+
const getChildStateInKey = (stateKey, parentState, options = {}) => {
|
|
45
45
|
const arr = stateKey.split("/");
|
|
46
46
|
const arrLength = arr.length - 1;
|
|
47
47
|
for (let i = 0; i < arrLength; i++) {
|
package/dist/cjs/updateState.js
CHANGED
|
@@ -37,7 +37,6 @@ const STATE_UPDATE_OPTIONS = {
|
|
|
37
37
|
const updateState = function(obj, options = STATE_UPDATE_OPTIONS) {
|
|
38
38
|
const state = this;
|
|
39
39
|
const element = state.__element;
|
|
40
|
-
console.log(options);
|
|
41
40
|
if (!options.updateByState)
|
|
42
41
|
(0, import_utils.merge)(options, STATE_UPDATE_OPTIONS);
|
|
43
42
|
if (!state.__element)
|
|
@@ -118,7 +117,6 @@ const updateDependentState = (state, obj, options) => {
|
|
|
118
117
|
};
|
|
119
118
|
const applyElementUpdate = (state, obj, options) => {
|
|
120
119
|
const element = state.__element;
|
|
121
|
-
console.log("update", element.key);
|
|
122
120
|
if (options.preventUpdate !== true) {
|
|
123
121
|
element.update({}, {
|
|
124
122
|
...options,
|
package/inherit.js
CHANGED
|
@@ -14,7 +14,7 @@ export const getParentStateInKey = (stateKey, parentState) => {
|
|
|
14
14
|
return parentState
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export const getChildStateInKey = (stateKey, parentState, options) => {
|
|
17
|
+
export const getChildStateInKey = (stateKey, parentState, options = {}) => {
|
|
18
18
|
const arr = stateKey.split('/')
|
|
19
19
|
const arrLength = arr.length - 1
|
|
20
20
|
for (let i = 0; i < arrLength; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/state",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.140",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@domql/report": "latest",
|
|
27
27
|
"@domql/utils": "latest"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "0194cc2107dc429d3ac8da467eaf8aa73bac6fb3"
|
|
30
30
|
}
|
package/updateState.js
CHANGED
|
@@ -18,7 +18,6 @@ const STATE_UPDATE_OPTIONS = {
|
|
|
18
18
|
export const updateState = function (obj, options = STATE_UPDATE_OPTIONS) {
|
|
19
19
|
const state = this
|
|
20
20
|
const element = state.__element
|
|
21
|
-
console.log(options)
|
|
22
21
|
|
|
23
22
|
if (!options.updateByState) merge(options, STATE_UPDATE_OPTIONS)
|
|
24
23
|
|
|
@@ -107,7 +106,6 @@ const updateDependentState = (state, obj, options) => {
|
|
|
107
106
|
|
|
108
107
|
const applyElementUpdate = (state, obj, options) => {
|
|
109
108
|
const element = state.__element
|
|
110
|
-
console.log('update', element.key)
|
|
111
109
|
if (options.preventUpdate !== true) {
|
|
112
110
|
element.update({}, {
|
|
113
111
|
...options,
|