ui-framework-jps
Version:
A simple UI framework for state management and UI components
25 lines • 932 B
JavaScript
import { CollectionViewEventHandlerDelegate } from "./CollectionViewEventHandlerDelegate";
import { ContextualInformationHelper } from "../../context/ContextualInformationHelper";
export class CollectionViewEventHandlerDelegateUsingContext extends CollectionViewEventHandlerDelegate {
constructor(view, forwarder) {
super(view, forwarder);
}
getItemContext(event) {
const contextDetail = ContextualInformationHelper.getInstance().findContextFromEvent(event);
let context;
if (contextDetail) {
context = {
itemId: contextDetail.identifier,
dataSource: contextDetail.source
};
}
else {
context = {
itemId: '',
dataSource: this.view.getName(),
};
}
return context;
}
}
//# sourceMappingURL=CollectionViewEventHandlerDelegateUsingContext.js.map