@domql/element 2.5.41 → 2.5.42

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.
@@ -32,7 +32,6 @@ const state = (params, element, node) => {
32
32
  continue;
33
33
  if (!Object.hasOwnProperty.call(state2, param))
34
34
  continue;
35
- element.state[param] = (0, import_utils.exec)(state2[param], element);
36
35
  }
37
36
  }
38
37
  return element;
package/dist/cjs/set.js CHANGED
@@ -41,11 +41,11 @@ const set = function(params, options = {}, el) {
41
41
  const { __ref: ref, content } = element;
42
42
  const __contentRef = content && content.__ref;
43
43
  const lazyLoad = element.props && element.props.lazyLoad;
44
+ if (options.preventContentUpdate === true)
45
+ return;
44
46
  if (ref.__noCollectionDifference || __contentRef && __contentRef.__cached && (0, import_utils.deepContains)(params, content)) {
45
47
  return content.update();
46
48
  }
47
- if (options.preventContentUpdate === true)
48
- return;
49
49
  const setAsync = () => {
50
50
  (0, import_content.removeContent)(element);
51
51
  (0, import_create.default)(params, element, "content", {
@@ -129,7 +129,7 @@ const fallbackStringExtend = (extend, context, options = {}) => {
129
129
  if (COMPONENTS && componentExists) {
130
130
  return componentExists;
131
131
  } else {
132
- if (ENV !== "test" || ENV !== "development") {
132
+ if (options.verbose && (ENV === "test" || ENV === "development")) {
133
133
  console.warn("Extend is string but component was not found:", extend);
134
134
  }
135
135
  return {};
package/mixins/state.js CHANGED
@@ -10,7 +10,7 @@ export const state = (params, element, node) => {
10
10
  for (const param in state) {
11
11
  if (IGNORE_STATE_PARAMS.includes(param)) continue
12
12
  if (!Object.hasOwnProperty.call(state, param)) continue
13
- element.state[param] = exec(state[param], element)
13
+ // element.state[param] = exec(state[param], element)
14
14
  }
15
15
  }
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.41",
3
+ "version": "2.5.42",
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": "b3af9473e4f66f480e7e06fef09e191c2a140f7a",
34
+ "gitHead": "76fbbf8ab997ee90fc3a791b21e49677d1b53993",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }
package/set.js CHANGED
@@ -13,12 +13,12 @@ const set = function (params, options = {}, el) {
13
13
  const __contentRef = content && content.__ref
14
14
  const lazyLoad = element.props && element.props.lazyLoad
15
15
 
16
+ if (options.preventContentUpdate === true) return
17
+
16
18
  if (ref.__noCollectionDifference || (__contentRef && __contentRef.__cached && deepContains(params, content))) {
17
19
  return content.update()
18
20
  }
19
21
 
20
- if (options.preventContentUpdate === true) return
21
-
22
22
  const setAsync = () => {
23
23
  removeContent(element)
24
24
  create(params, element, 'content', {
@@ -97,7 +97,7 @@ export const fallbackStringExtend = (extend, context, options = {}) => {
97
97
  if (COMPONENTS && componentExists) {
98
98
  return componentExists
99
99
  } else {
100
- if (ENV !== 'test' || ENV !== 'development') {
100
+ if (options.verbose && (ENV === 'test' || ENV === 'development')) {
101
101
  console.warn('Extend is string but component was not found:', extend)
102
102
  }
103
103
  return {}