@domql/event
Advanced tools
Comparing version 2.0.8 to 2.2.0
50
on.js
'use strict' | ||
import { isFunction } from '@domql/utils' | ||
export const init = (param, element, state) => { | ||
@@ -11,24 +13,48 @@ param(element, state) | ||
export const initUpdate = (param, element, state) => { | ||
param(element, state) | ||
export const initUpdate = (element) => { | ||
console.log(element) | ||
const { ref, state, on } = element | ||
const { props } = ref | ||
if (on && isFunction(on.initUpdate)) { | ||
on.initUpdate(props, state, ref) | ||
} | ||
} | ||
export const attachNode = (param, element, state) => { | ||
param(element, state) | ||
// export const attachNode = (param, element, state) => { | ||
// param(element, state) | ||
// } | ||
export const createState = (state, element) => { | ||
const { on, ...el } = element | ||
if (on && isFunction(on.createState)) { | ||
on.createState(state, el) | ||
} | ||
} | ||
export const stateCreated = (param, element, state) => { | ||
param(element, state) | ||
export const updateStateInit = (changes, element) => { | ||
const { state, on, ...el } = element | ||
if (on && isFunction(on.updateStateInit)) { | ||
on.updateStateInit(changes, state, el) | ||
} | ||
} | ||
export const initStateUpdated = (param, element, state) => { | ||
param(element, state) | ||
export const updateState = (changes, element) => { | ||
const { state, on } = element | ||
if (on && isFunction(on.updateState)) { | ||
on.updateState(changes, state, element) | ||
} | ||
} | ||
export const stateUpdated = (param, element, state) => { | ||
param(element, state) | ||
export const propsUpdated = (element) => { | ||
const { props, state, on } = element | ||
if (on && isFunction(on.propsUpdated)) { | ||
on.propsUpdated(props, state, element) | ||
} | ||
} | ||
export const update = (param, element, state) => { | ||
param(element, state) | ||
export const update = (params, element, state) => { | ||
if (element.on && isFunction(element.on.update)) { | ||
element.on.update(element, state) | ||
} | ||
return params | ||
} |
{ | ||
"name": "@domql/event", | ||
"version": "2.0.8", | ||
"version": "2.2.0", | ||
"main": "index.js", | ||
@@ -9,4 +9,7 @@ "license": "MIT", | ||
}, | ||
"gitHead": "b60c46e45c462d00976902d6cdbea6fd5504542b", | ||
"dependencies": { | ||
"@domql/utils": "latest" | ||
}, | ||
"gitHead": "ec7e77cec088dafc6b4a5d2893f72e3590a6761e", | ||
"source": "index.js" | ||
} |
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
3897
96
1
+ Added@domql/utils@latest
+ Added@domql/utils@2.5.164(transitive)