Comparing version 1.2.12 to 1.3.0
@@ -6,3 +6,3 @@ { | ||
"author": "rackai", | ||
"version": "1.2.12", | ||
"version": "1.3.0", | ||
"repository": "https://github.com/rackai/domql", | ||
@@ -9,0 +9,0 @@ "publishConfig": { |
@@ -49,8 +49,8 @@ 'use strict' | ||
// create PROTOtypal inheritance | ||
applyPrototype(element, parent, options) | ||
// enable STATE | ||
element.state = createState(element, parent) | ||
// create PROTOtypal inheritance | ||
applyPrototype(element, parent, options) | ||
// console.groupCollapsed('Create:', assignedKey) | ||
@@ -57,0 +57,0 @@ // console.log(element) |
@@ -37,3 +37,7 @@ 'use strict' | ||
let { state } = element | ||
if (!state) return (parent && parent.state) || {} | ||
// if (!state) return (parent && parent.state) || {} | ||
if (!state) { | ||
if (parent && parent.state) return parent.state | ||
return {} | ||
} | ||
if (isFunction(state)) state = exec(state, element) | ||
@@ -40,0 +44,0 @@ |
@@ -12,2 +12,3 @@ 'use strict' | ||
import { updateProps } from './createProps' | ||
import createState from './createState' | ||
@@ -24,13 +25,2 @@ const UPDATE_DEFAULT_OPTIONS = { | ||
// console.groupCollapsed('Update:', element.path) | ||
// console.log('params:') | ||
// console.log(params) | ||
// console.log('props:') | ||
// console.log(element.props) | ||
// console.log('element:') | ||
// console.log(element) | ||
// console.log('PARAMS.PROPS:') | ||
// console.log(params.props) | ||
// console.groupEnd('Update:') | ||
// if params is string | ||
if (isString(params) || isNumber(params)) { | ||
@@ -44,10 +34,6 @@ params = { text: params } | ||
// console.log(element, parent) | ||
updateProps(params.props, element, parent) | ||
// // console.log(element.path) | ||
// // console.log(element) | ||
// console.groupCollapsed('UPDATE:') | ||
// console.log(element) | ||
// console.groupEnd('UPDATE:') | ||
// const state = params.state || element.state | ||
// element.state = createState({ state }, parent) | ||
@@ -76,5 +62,2 @@ const overwriteChanges = overwrite(element, params, UPDATE_DEFAULT_OPTIONS) | ||
// console.log(node) | ||
// console.groupEnd('Update:') | ||
if (!node || options.preventRecursive) return | ||
@@ -81,0 +64,0 @@ |
@@ -80,3 +80,3 @@ 'use strict' | ||
// const cachedProps = cache.props | ||
if (e === 'parent' || e === 'props') continue | ||
if (e === 'parent' || e === 'props' || e === 'state') continue | ||
if (elementProp === undefined) { | ||
@@ -126,3 +126,3 @@ element[e] = protoProp | ||
for (const e in params) { | ||
if (e === 'props') continue | ||
if (e === 'props' || e === 'state') continue | ||
@@ -129,0 +129,0 @@ const elementProp = element[e] |
'use strict' | ||
import { isArray, isFunction, isObject } from './object' | ||
import { exec, isArray, isFunction, isObject } from './object' | ||
@@ -5,0 +5,0 @@ export const generateHash = () => Math.random().toString(36).substring(2) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
52602
1598