sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
34 lines • 1.74 kB
JavaScript
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _NotExistsComponent_instances, _NotExistsComponent_addEventListeners;
import BaseOptionComponent from "./BaseOptionComponent";
import { OptionTypes } from "../OptionsGroup";
import { I18n } from "../../../../../../settings/I18n";
/*
Not Exists Component. Get's rendered by OptionsGroup if this is enabled.
When Clicked changes the SPARQL of the query to a NOTEXISTS form
*/
class NotExistsComponent extends BaseOptionComponent {
// If you would like to change the shape of the Arrow. Do it here
constructor(ParentComponent) {
super("NotExists", OptionTypes.NOTEXISTS, ParentComponent, "notExists");
_NotExistsComponent_instances.add(this);
}
render() {
this.label = I18n.labels.labelOptionNotExists;
super.render();
__classPrivateFieldGet(this, _NotExistsComponent_instances, "m", _NotExistsComponent_addEventListeners).call(this);
return this;
}
}
_NotExistsComponent_instances = new WeakSet(), _NotExistsComponent_addEventListeners = function _NotExistsComponent_addEventListeners() {
this.html.on("click", (e) => {
e.stopPropagation();
this.onChange();
});
};
export default NotExistsComponent;
//# sourceMappingURL=NotExistsComponent.js.map