@domql/utils 2.29.84 → 2.29.86

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/component.js CHANGED
@@ -72,10 +72,10 @@ export const extractComponentKeyFromKey = (key) => {
72
72
  return key.includes('+')
73
73
  ? key.split('+') // get array of componentKeys
74
74
  : key.includes('_')
75
- ? [key.split('_')[0]] // get component key split _
76
- : key.includes('.') && !checkIfKeyIsComponent(key.split('.')[1])
77
- ? [key.split('.')[0]] // get component key split .
78
- : [key]
75
+ ? [key.split('_')[0]] // get component key split _
76
+ : key.includes('.') && !checkIfKeyIsComponent(key.split('.')[1])
77
+ ? [key.split('.')[0]] // get component key split .
78
+ : [key]
79
79
  }
80
80
 
81
81
  export const extendizeByKey = (element, parent, key) => {
@@ -233,7 +233,12 @@ export const getExtendsInElement = (obj) => {
233
233
  }
234
234
 
235
235
  // Check if the key is "extend" and it's either a string or an array
236
- if (key === 'extend' || key === 'extends') {
236
+ if (
237
+ key === 'extend' ||
238
+ key === 'extends' ||
239
+ key === 'childExtend' ||
240
+ key === 'childExtends'
241
+ ) {
237
242
  // Add the value of the extend key to the result array
238
243
  if (typeof o[key] === 'string') {
239
244
  result.push(o[key])
@@ -218,7 +218,7 @@ const getExtendsInElement = (obj) => {
218
218
  if (checkIfKeyIsComponent(key)) {
219
219
  result.push(key);
220
220
  }
221
- if (key === "extend" || key === "extends") {
221
+ if (key === "extend" || key === "extends" || key === "childExtend" || key === "childExtends") {
222
222
  if (typeof o[key] === "string") {
223
223
  result.push(o[key]);
224
224
  } else if (Array.isArray(o[key])) {
@@ -429,7 +429,7 @@ const stringToObject = (str, opts = { verbose: true }) => {
429
429
  return str ? import_globals.window.eval("(" + str + ")") : {};
430
430
  } catch (e) {
431
431
  if (opts.verbose) console.warn(e);
432
- if (opts.errorCallback) opts.errorCallback(e);
432
+ if (opts.errorCallback) return opts.errorCallback(e);
433
433
  }
434
434
  };
435
435
  const diffObjects = (original, objToDiff, cache, opts) => {
@@ -199,7 +199,7 @@ const getExtendsInElement = (obj) => {
199
199
  if (checkIfKeyIsComponent(key)) {
200
200
  result.push(key);
201
201
  }
202
- if (key === "extend" || key === "extends") {
202
+ if (key === "extend" || key === "extends" || key === "childExtend" || key === "childExtends") {
203
203
  if (typeof o[key] === "string") {
204
204
  result.push(o[key]);
205
205
  } else if (Array.isArray(o[key])) {
@@ -398,7 +398,7 @@ const stringToObject = (str, opts = { verbose: true }) => {
398
398
  return str ? window.eval("(" + str + ")") : {};
399
399
  } catch (e) {
400
400
  if (opts.verbose) console.warn(e);
401
- if (opts.errorCallback) opts.errorCallback(e);
401
+ if (opts.errorCallback) return opts.errorCallback(e);
402
402
  }
403
403
  };
404
404
  const diffObjects = (original, objToDiff, cache, opts) => {
package/object.js CHANGED
@@ -151,8 +151,8 @@ export const deepClone = (obj, options = {}) => {
151
151
  ? new contentWindow.Array()
152
152
  : new contentWindow.Object()
153
153
  : isArray(obj)
154
- ? []
155
- : {}
154
+ ? []
155
+ : {}
156
156
 
157
157
  // Store the clone to handle circular references
158
158
  visited.set(obj, clone)
@@ -490,7 +490,7 @@ export const stringToObject = (str, opts = { verbose: true }) => {
490
490
  return str ? window.eval('(' + str + ')') : {} // eslint-disable-line
491
491
  } catch (e) {
492
492
  if (opts.verbose) console.warn(e)
493
- if (opts.errorCallback) opts.errorCallback(e)
493
+ if (opts.errorCallback) return opts.errorCallback(e)
494
494
  }
495
495
  }
496
496
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.29.84",
3
+ "version": "2.29.86",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -24,7 +24,7 @@
24
24
  "build": "npx rimraf -I dist; npm run build:cjs; npm run build:esm",
25
25
  "prepublish": "npm run build; npm run copy:package:cjs"
26
26
  },
27
- "gitHead": "c5fa9ccd6a9d90be40c3f530e512dea970e7bb68",
27
+ "gitHead": "9078ce58b33455ca7f3b1554ed1e1620a26d2fb0",
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.27.1"
30
30
  }