@domql/element 2.5.77 → 2.5.79
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/set.js +0 -1
- package/dist/cjs/update.js +4 -1
- package/dist/cjs/utils/object.js +1 -1
- package/package.json +2 -2
- package/set.js +0 -1
- package/update.js +5 -2
- package/utils/object.js +1 -1
package/dist/cjs/set.js
CHANGED
|
@@ -38,7 +38,6 @@ var import_options = __toESM(require("./cache/options"), 1);
|
|
|
38
38
|
var import_mixins = require("./mixins");
|
|
39
39
|
var import_content = require("./mixins/content");
|
|
40
40
|
const resetElement = (params, element, options) => {
|
|
41
|
-
const perf = performance.now();
|
|
42
41
|
if (!options.preventRemove)
|
|
43
42
|
(0, import_content.removeContent)(element, options);
|
|
44
43
|
(0, import_create.default)(params, element, options.contentElementKey || "content", {
|
package/dist/cjs/update.js
CHANGED
|
@@ -53,7 +53,10 @@ const UPDATE_DEFAULT_OPTIONS = {
|
|
|
53
53
|
calleeElement: false,
|
|
54
54
|
excludes: import_utils2.METHODS_EXL
|
|
55
55
|
};
|
|
56
|
-
const update = function(params = {},
|
|
56
|
+
const update = function(params = {}, opts = UPDATE_DEFAULT_OPTIONS) {
|
|
57
|
+
const calleeElementCache = opts.calleeElement;
|
|
58
|
+
const options = (0, import_utils2.deepClone)((0, import_utils2.deepMerge)(opts, UPDATE_DEFAULT_OPTIONS), ["calleeElement"]);
|
|
59
|
+
options.calleeElement = calleeElementCache;
|
|
57
60
|
const element = this;
|
|
58
61
|
const { parent, node, key } = element;
|
|
59
62
|
const { excludes, preventInheritAtCurrentState } = options;
|
package/dist/cjs/utils/object.js
CHANGED
|
@@ -36,7 +36,7 @@ var import_state = require("@domql/state");
|
|
|
36
36
|
var import_props = require("../props");
|
|
37
37
|
var import_methods = require("../methods");
|
|
38
38
|
const METHODS_EXL = (0, import_utils.joinArrays)(
|
|
39
|
-
["node", "state", "context", "extend"],
|
|
39
|
+
["node", "state", "context", "extend", "__element"],
|
|
40
40
|
import_methods.METHODS,
|
|
41
41
|
import_state.IGNORE_STATE_PARAMS,
|
|
42
42
|
import_props.IGNORE_PROPS_PARAMS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.79",
|
|
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": "f8d79497e401e72f952090edb53f372bd6f109df",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|
package/set.js
CHANGED
|
@@ -8,7 +8,6 @@ import { registry } from './mixins'
|
|
|
8
8
|
import { removeContent } from './mixins/content'
|
|
9
9
|
|
|
10
10
|
export const resetElement = (params, element, options) => {
|
|
11
|
-
const perf = performance.now()
|
|
12
11
|
if (!options.preventRemove) removeContent(element, options)
|
|
13
12
|
create(params, element, options.contentElementKey || 'content', {
|
|
14
13
|
ignoreChildExtend: true,
|
package/update.js
CHANGED
|
@@ -19,7 +19,7 @@ import { isMethod } from './methods'
|
|
|
19
19
|
import { updateProps } from './props'
|
|
20
20
|
import { createState, findInheritedState } from '@domql/state'
|
|
21
21
|
|
|
22
|
-
import { METHODS_EXL, isVariant } from './utils'
|
|
22
|
+
import { METHODS_EXL, deepClone, isVariant, deepMerge } from './utils'
|
|
23
23
|
import create from './create'
|
|
24
24
|
import { throughUpdatedDefine, throughUpdatedExec } from './iterate'
|
|
25
25
|
import { registry } from './mixins'
|
|
@@ -39,7 +39,10 @@ const UPDATE_DEFAULT_OPTIONS = {
|
|
|
39
39
|
excludes: METHODS_EXL
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
const update = function (params = {},
|
|
42
|
+
const update = function (params = {}, opts = UPDATE_DEFAULT_OPTIONS) {
|
|
43
|
+
const calleeElementCache = opts.calleeElement
|
|
44
|
+
const options = deepClone(deepMerge(opts, UPDATE_DEFAULT_OPTIONS), ['calleeElement'])
|
|
45
|
+
options.calleeElement = calleeElementCache
|
|
43
46
|
const element = this
|
|
44
47
|
const { parent, node, key } = element
|
|
45
48
|
const { excludes, preventInheritAtCurrentState } = options
|
package/utils/object.js
CHANGED
|
@@ -6,7 +6,7 @@ import { IGNORE_PROPS_PARAMS } from '../props'
|
|
|
6
6
|
import { METHODS } from '../methods'
|
|
7
7
|
|
|
8
8
|
export const METHODS_EXL = joinArrays(
|
|
9
|
-
['node', 'state', 'context', 'extend'],
|
|
9
|
+
['node', 'state', 'context', 'extend', '__element'],
|
|
10
10
|
METHODS,
|
|
11
11
|
IGNORE_STATE_PARAMS,
|
|
12
12
|
IGNORE_PROPS_PARAMS
|