Comparing version 1.4.3 to 1.4.4
@@ -6,3 +6,3 @@ { | ||
"author": "rackai", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"repository": "https://github.com/rackai/domql", | ||
@@ -9,0 +9,0 @@ "publishConfig": { |
@@ -30,7 +30,2 @@ 'use strict' | ||
if (Object.keys(options).length) { | ||
registry.defaultOptions = options | ||
if (options.ignoreChildProto) delete options.ignoreChildProto | ||
} | ||
// if element is proto | ||
@@ -43,15 +38,6 @@ if (element.__hash) { | ||
const { components } = options | ||
const { proto } = element | ||
const { proto, component } = element | ||
if (isString(proto)) | ||
if (components[proto]) element.proto = components[proto] | ||
else console.warn(proto, 'is not in library', components, element) | ||
// // if KEY is PROTO | ||
// const k = element.key || key | ||
// const keyIsProto = isString(k) && k.charAt(0) === k.charAt(0).toUpperCase() | ||
// if (keyIsProto) component = key | ||
// let { match, ...rest } = element | ||
// if proto comes from library as string | ||
// const fromLibrary = isString(match) ? components[match] : match | ||
// if (fromLibrary) element = { proto: fromLibrary, ...rest } | ||
} | ||
@@ -82,2 +68,7 @@ | ||
if (Object.keys(options).length) { | ||
registry.defaultOptions = options | ||
if (options.ignoreChildProto) delete options.ignoreChildProto | ||
} | ||
// enable STATE | ||
@@ -84,0 +75,0 @@ element.state = createState(element, parent) |
@@ -54,3 +54,4 @@ 'use strict' | ||
parseDeep: {}, | ||
on: {} | ||
on: {}, | ||
component: {} | ||
} |
@@ -65,4 +65,10 @@ 'use strict' | ||
element.__proto = stack | ||
const mergedProto = cloneAndMergeArrayProto(stack) | ||
let mergedProto = cloneAndMergeArrayProto(stack) | ||
const component = exec(element.component || mergedProto.component, element) | ||
if (component && options.components && options.components[component]) { | ||
const componentProto = cloneAndMergeArrayProto(getProtoStack(options.components[component])) | ||
mergedProto = deepMergeProto(mergedProto, componentProto) | ||
} | ||
// console.log(mergedProto) | ||
@@ -69,0 +75,0 @@ return deepMergeProto(element, mergedProto) |
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
53704
1636