Skip to content

Commit

Permalink
0.0.32
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Sep 18, 2024
1 parent fcc06c8 commit 01b7adc
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 49 deletions.
83 changes: 43 additions & 40 deletions be-calculating.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {AggEvent, rguid} from 'be-hive/aggEvt.js';
/** @import {Actions, PAP, AP, BAP} from './ts-refs/be-calculating/types' */;
/** @import {CustomHandlers, EnhancementInfo, ScopedCustomHandlers} from './ts-refs/trans-render/be/types.d.ts' */
/** @import {AbsorbingObject, SharingObject} from './ts-refs/trans-render/asmr/types.d.ts' */
/** @import {AllProps as BeExportableAllProps} from './ts-refs/be-exportable/types.d.ts' */
/** @import {Handlers} from './ts-refs/be-hive/types.d.ts' */



Expand All @@ -17,10 +17,11 @@ let cnt = 0;
* @implements {Actions}
* @implements {EventListenerObject}
*
*
*/
class BeCalculating extends BE {
/**
* @type {BEConfig<AP & BEAllProps, Actions & IEnhancement, any>}
* @type {BEConfig<BAP, Actions & IEnhancement, any>}
*/
static config = {
propDefaults: {
Expand All @@ -43,6 +44,8 @@ class BeCalculating extends BE {
propToAO: {},
isOutputEl: {},
checkedRegistry: {},
customHandlers: {},
scopedCustomHandlers: {},
},
compacts: {
when_enhElLocalName_changes_invoke_categorizeEl: 0,
Expand All @@ -68,45 +71,45 @@ class BeCalculating extends BE {
}
}

/**
* @type {CustomHandlers}
*/
#customHandlers;
// /**
// * @type {CustomHandlers}
// */
// #customHandlers;

/**
* @type {ScopedCustomHandlers}
*/
#scopedHandlers;
// /**
// * @type {ScopedCustomHandlers}
// */
// #scopedHandlers;

/**
* @param {Element} enhancedElement
* @param {EnhancementInfo} enhancementInfo
* @override
*/
async attach(enhancedElement, enhancementInfo){
super.attach(enhancedElement, enhancementInfo);
const {synConfig, mountCnfg} = enhancementInfo;
const {handlerKey} = synConfig;
const {registeredHandlers, scopedHandlers} = await import('be-hive/be-hive.js');
const cluster = registeredHandlers.get(synConfig.top);
if(cluster === undefined) throw 404;
const {enhPropKey} = mountCnfg;
const handlers = cluster.get(enhPropKey);
if(handlers === undefined){
console.warn(404);
return
}
this.#customHandlers = handlers;
const scopedCluster = scopedHandlers.get(synConfig.top);
if(scopedCluster === undefined) throw 404;
const scopedCustomHandlers = scopedCluster.get(enhPropKey);
if(scopedCustomHandlers === undefined){
console.warn(404);
return;
}
this.#scopedHandlers = scopedCustomHandlers;
// /**
// * @param {Element} enhancedElement
// * @param {EnhancementInfo} enhancementInfo
// * @override
// */
// async attach(enhancedElement, enhancementInfo){
// super.attach(enhancedElement, enhancementInfo);
// const {synConfig, mountCnfg} = enhancementInfo;
// const {handlerKey} = synConfig;
// const {registeredHandlers, scopedHandlers} = await import('be-hive/be-hive.js');
// const cluster = registeredHandlers.get(synConfig.top);
// if(cluster === undefined) throw 404;
// const {enhPropKey} = mountCnfg;
// const handlers = cluster.get(enhPropKey);
// if(handlers === undefined){
// console.warn(404);
// return
// }
// this.#customHandlers = handlers;
// const scopedCluster = scopedHandlers.get(synConfig.top);
// if(scopedCluster === undefined) throw 404;
// const scopedCustomHandlers = scopedCluster.get(enhPropKey);
// if(scopedCustomHandlers === undefined){
// console.warn(404);
// return;
// }
// this.#scopedHandlers = scopedCustomHandlers;

}
// }

/**
*
Expand Down Expand Up @@ -185,7 +188,7 @@ class BeCalculating extends BE {
});
}
/** first check for local */
let scopedHandlerObj = this.#scopedHandlers.get(handler);
let scopedHandlerObj = self.scopedCustomHandlers?.get(handler);
if(scopedHandlerObj !== undefined){
for(const item of scopedHandlerObj){
if(enhancedElement.closest(item[0])){
Expand All @@ -196,7 +199,7 @@ class BeCalculating extends BE {
}
}
}
let handlerObj = this.#customHandlers.get(handler);
let handlerObj = self.customHandlers.get(handler);
if(handlerObj === undefined) return /** @type {BAP} */ ({
checkedRegistry
});
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"be-enhanced": "0.0.142",
"be-exportable": "0.0.130",
"be-hive": "0.0.218",
"be-hive": "0.0.219",
"trans-render": "0.0.838"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion ts-refs
Submodule ts-refs updated from bb7965 to 191bfb

0 comments on commit 01b7adc

Please sign in to comment.