@domql/element 2.5.106 → 2.5.107

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.
@@ -77,6 +77,7 @@ const lookup = function(param) {
77
77
  return parent;
78
78
  };
79
79
  const lookdown = function(param) {
80
+ var _a;
80
81
  const el = this;
81
82
  const { __ref: ref } = el;
82
83
  const children = ref.__children;
@@ -91,13 +92,14 @@ const lookdown = function(param) {
91
92
  return childElem;
92
93
  }
93
94
  }
94
- const lookdown2 = childElem == null ? void 0 : childElem.lookdown(param);
95
+ const lookdown2 = (_a = childElem == null ? void 0 : childElem.lookdown) == null ? void 0 : _a.call(childElem, param);
95
96
  if (lookdown2)
96
97
  return lookdown2;
97
98
  }
98
99
  return null;
99
100
  };
100
101
  const lookdownAll = function(param, results = []) {
102
+ var _a;
101
103
  const el = this;
102
104
  const { __ref: ref } = el;
103
105
  const children = ref.__children;
@@ -111,7 +113,7 @@ const lookdownAll = function(param, results = []) {
111
113
  if (childElem.state && exec)
112
114
  results.push(childElem);
113
115
  }
114
- childElem == null ? void 0 : childElem.lookdownAll(param, results);
116
+ (_a = childElem == null ? void 0 : childElem.lookdownAll) == null ? void 0 : _a.call(childElem, param, results);
115
117
  }
116
118
  return results.length ? results : null;
117
119
  };
package/dist/cjs/set.js CHANGED
@@ -48,11 +48,9 @@ const resetElement = (params, element, options) => {
48
48
  ...options
49
49
  });
50
50
  };
51
- const reset = (params = {}, options) => {
51
+ const reset = (options) => {
52
52
  const element = void 0;
53
- if (!options.preventRemove)
54
- (0, import_content.removeContent)(element, options);
55
- (0, import_create.default)(params, element, options.contentElementKey || "content", {
53
+ (0, import_create.default)(element, element.parent, void 0, {
56
54
  ignoreChildExtend: true,
57
55
  ...import_mixins.registry.defaultOptions,
58
56
  ...import_options.default.create,
package/methods/index.js CHANGED
@@ -58,7 +58,7 @@ export const lookdown = function (param) {
58
58
  return childElem
59
59
  }
60
60
  }
61
- const lookdown = childElem?.lookdown(param)
61
+ const lookdown = childElem?.lookdown?.(param)
62
62
  if (lookdown) return lookdown
63
63
  }
64
64
 
@@ -79,7 +79,7 @@ export const lookdownAll = function (param, results = []) {
79
79
  const exec = param(childElem, childElem.state, childElem.context)
80
80
  if (childElem.state && exec) results.push(childElem)
81
81
  }
82
- childElem?.lookdownAll(param, results)
82
+ childElem?.lookdownAll?.(param, results)
83
83
  }
84
84
 
85
85
  return results.length ? results : null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.106",
3
+ "version": "2.5.107",
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": "55e7427a41deeb89997d0dae240180fee7eefbe2",
34
+ "gitHead": "a313ce03e61603c66db67f1264c172805edb273e",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }
package/set.js CHANGED
@@ -17,10 +17,9 @@ export const resetElement = (params, element, options) => {
17
17
  })
18
18
  }
19
19
 
20
- export const reset = (params = {}, options) => {
20
+ export const reset = (options) => {
21
21
  const element = this
22
- if (!options.preventRemove) removeContent(element, options)
23
- create(params, element, options.contentElementKey || 'content', {
22
+ create(element, element.parent, undefined, {
24
23
  ignoreChildExtend: true,
25
24
  ...registry.defaultOptions,
26
25
  ...OPTIONS.create,