UNPKG

sparnatural

Version:

Visual client-side SPARQL query builder and knowledge graph exploration tool

26 lines 2.31 kB
import { HTMLComponent } from "../HtmlComponent"; import { Order } from "../../SparnaturalQueryIfc"; export class DescendBtn extends HTMLComponent { constructor(ParentComponent, callBack) { let widgetHtml = $("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28.535\" height=\"30\" viewBox=\"0 0 28.535 30\"><g id=\"Groupe_223\" data-name=\"Groupe 223\" transform=\"translate(-1505.465 -996)\"><text id=\"Z_A\" data-name=\"ZA\" transform=\"translate(1506 996)\" fill=\"#767676\" font-size=\"14\" font-family=\"Roboto-Regular, Roboto\"><tspan x=\"0\" y=\"13\">Z</tspan><tspan x=\"0\" y=\"27\">A</tspan></text><path id=\"Z_A_-_Contour\" data-name=\"ZA - Contour\" d=\"M.177,2.547H8.115v1.62l-5.022,7.26H8.334V13.5H.088V11.86l5-7.233H.177Zm6.938,1H1.177v.08H7L1.088,12.172V12.5H7.334v-.073H1.186L7.115,3.855Zm-3.467,13H5.485L9.675,27.5H7.252L6.3,24.9H2.833L1.9,27.5H-.535Zm.793,1h-.1L.918,26.5h.276l.937-2.6H7l.95,2.6h.271L4.8,17.547H4.691l2.285,6.275H2.165Zm1.107,5.275-.98-2.691-.976,2.691Z\" transform=\"translate(1506 996)\" fill=\"#707070\"/><g id=\"Groupe_220\" data-name=\"Groupe 220\" transform=\"translate(3077.165 2018.133) rotate(180)\"><path id=\"Ligne_126\" data-name=\"Ligne 126\" d=\"M0,23.189a1,1,0,0,1-1-1V0A1,1,0,0,1,0-1,1,1,0,0,1,1,0V22.189A1,1,0,0,1,0,23.189Z\" transform=\"translate(1555.23 996.323)\" fill=\"#707070\"/><path id=\"Trac\u00E9_306\" data-name=\"Trac\u00E9 306\" d=\"M2200.033-375.639a1,1,0,0,1-.925-.618l-1.982-4.793-2.031,4.8a1,1,0,0,1-1.311.531,1,1,0,0,1-.531-1.311l2.962-7a1,1,0,0,1,.921-.61h0a1,1,0,0,1,.92.618l2.9,7a1,1,0,0,1-.542,1.306A1,1,0,0,1,2200.033-375.639Z\" transform=\"translate(-641.939 1379.395)\" fill=\"#707070\"/></g></g></svg>" /* UiuxConfig.ICON_ZA */); super("asc", ParentComponent, widgetHtml); this.selected = false; this.setSelected = (selected) => { this.selected = selected; this.selected ? this.html.addClass("selected") : this.html.removeClass("selected"); }; // add clicklistener this.widgetHtml.on("click", (e) => { if (!this.selected) { callBack(Order.DESC); } }); } render() { super.render(); return this; } } //# sourceMappingURL=DescendBtn.js.map