domql 1.6.53 → 1.6.56

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/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "domql",
3
3
  "description": "DOM rendering Javascript framework at early stage.",
4
- "version": "1.6.53",
4
+ "version": "1.6.56",
5
5
  "repository": "https://github.com/domql/domql",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org"
8
8
  },
9
9
  "type": "module",
10
10
  "module": "dist/esm/index.js",
11
- "main": "dist/cjs/index.js",
12
11
  "exports": "./dist/cjs/index.js",
12
+ "main": "src/index.js",
13
13
  "source": "src/index.js",
14
14
  "files": [
15
15
  "dist",
@@ -1,7 +1,13 @@
1
1
  'use strict'
2
2
 
3
3
  import { isFunction, exec, isString } from '@domql/utils'
4
- import { getExtendStack, jointStacks, cloneAndMergeArrayExtend, deepMergeExtend, replaceStringsWithComponents } from './utils'
4
+ import {
5
+ getExtendStack,
6
+ jointStacks,
7
+ cloneAndMergeArrayExtend,
8
+ deepMergeExtend,
9
+ replaceStringsWithComponents
10
+ } from './utils'
5
11
 
6
12
  const ENV = process.env.NODE_ENV
7
13
 
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { isObject, exec, isFunction, isNumber, isString } from '@domql/utils'
4
- import { METHODS_EXL, isVariant, overwrite } from './utils'
4
+ import { METHODS_EXL, checkIfKeyIsComponent, extendizeByKey, isVariant, overwrite } from './utils'
5
5
  import { isMethod } from '@domql/methods'
6
6
 
7
7
  export const throughInitialExec = (element, exclude = {}) => {
@@ -12,6 +12,7 @@ export const throughInitialExec = (element, exclude = {}) => {
12
12
  if (isFunction(prop) && !isMethod(param) && !isVariant(param)) {
13
13
  ref.__exec[param] = prop
14
14
  element[param] = prop(element, element.state)
15
+ // if (isComponent)
15
16
  }
16
17
  }
17
18
  }
@@ -28,9 +29,14 @@ export const throughUpdatedExec = (element, options = { excludes: METHODS_EXL })
28
29
 
29
30
  const newExec = ref.__exec[param](element, element.state, element.context)
30
31
  const execReturnsString = isString(newExec) || isNumber(newExec)
31
- if (prop && prop.node && execReturnsString) {
32
- overwrite(prop, { text: newExec }, options)
33
- } else if (newExec !== prop) {
32
+ if (prop && prop.node) {
33
+ if (execReturnsString) {
34
+ overwrite(prop, { text: newExec }, options)
35
+ } else if (checkIfKeyIsComponent(param)) {
36
+ const { extend, ...newElem } = extendizeByKey(newExec)
37
+ overwrite(prop, newElem, options)
38
+ }
39
+ } else if (!execReturnsString && newExec !== prop) {
34
40
  ref.__cached[param] = changes[param] = prop
35
41
  element[param] = newExec
36
42
  }