components/dashboards-web-component/src/utils/WidgetClassRegistry.js
function patchWidgetClass(widgetClass) {
    const superWidgetClassPrototype = Object.getPrototypeOf(widgetClass.prototype);
    // Patch subscribe method.
    superWidgetClassPrototype.subscribe = Widget.prototype.subscribe;
    // Patch publish method.
    superWidgetClassPrototype.publish = Widget.prototype.publish;
}
function patchWidgetClass(widgetClass) {
    const superWidgetClassPrototype = Object.getPrototypeOf(widgetClass.prototype);
    // Patch subscribe method.
    superWidgetClassPrototype.subscribe = Widget.prototype.subscribe;
    // Patch publish method.
    superWidgetClassPrototype.publish = Widget.prototype.publish;
}
function patchWidgetClass ( widgetClass ) { const superWidgetClassPrototype = Object . getPrototypeOf ( widgetClass . prototype ) ; // Patch subscribe method. superWidgetClassPrototype . subscribe = Widget . prototype . subscribe ; // Patch publish method. superWidgetClassPrototype . publish = Widget . prototype . publish ; }
Patches given widget class which extends from a deprecated version of @wso2-dashboards/widget class, to be
compatible with newer versions.
@param {class} widgetClass widget class to be patched
@private
Patches given widget class which extends from a deprecated version of