Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(public store: StoreInterface) {
this.el = el("div",
this.dropdown = new Dropdown(),
this.elPlot = el("div", {style: "width: 600px;height:400px;"})
)
this.chart = echarts.init(this.elPlot as HTMLDivElement);
this.fetchData();
this.dropdown.update(["A", "B", "C"])
}
const loadSVG = (path) => {
const placeholder = el('.svg-placeholder');
req(path)
.then((r) => r.text())
.then((svg) => {
placeholder.parentNode.insertAdjacentHTML('afterbegin', svg);
placeholder.parentNode.removeChild(placeholder);
})
.catch((err) => {
console.error(err);
});
return placeholder;
};
content.map((tab, i) =>
this.headerChildren[i] = el("li",
el("a",
{onclick: (event: Event) => this.setActive(i)},
el("span", tab.name)
)
)
)
function createPrompt(prompt) {
let title = el(
"span",
{
style: {
fontSize: "16px",
fontFamily: "Buttercup-OpenSans",
color: "#FFF",
lineHeight: "normal",
fontWeight: "normal",
"-webkit-font-smoothing": "auto",
fontSmooth: "auto"
}
},
"Save new credentials?"
);
prompt._yesButton = el(
"button",
{
style: {
cursor: "pointer",
backgroundImage: `url(${ICON_KEY})`,
backgroundSize: "20px",
backgroundPosition: "5px 2px",
backgroundRepeat: "no-repeat",
backgroundColor: "rgba(0, 0, 0, 0.0)",
height: `${LIST_ITEM_HEIGHT}px`,
margin: "0",
overflow: "hidden",
position: "relative",
width: "100%"
}
},
el(
"span",
{
style: {
color: "#FFF",
fontFamily: "Buttercup-OpenSans",
position: "absolute",
left: "30px",
top: "2px",
lineHeight: "19px",
fontSize: "18px",
fontStyle: "normal"
}
},
item.title
),
createPathElement(item.archiveName, item.entryPath, {
style: {
backgroundImage: `url(${ICON_SEARCHBAR})`,
backgroundSize: `${ICON_SEARCH_IMAGE_SIZE}px`,
backgroundPosition: "5px 3px",
backgroundRepeat: "no-repeat",
width: "100%",
height: `${BUTTON_SIZE}px`,
position: "absolute",
left: "0px",
top: `${BUTTON_SIZE}px`,
borderBottom: "1px solid rgba(0, 0, 0, 0.2)"
}
},
searchInput
);
const title = el(
"div",
{
"data-buttercup-role": "title",
style: {
fontFamily: "Buttercup-OpenSans",
color: config.BUTTERCUP_GREEN,
fontSize: "19px",
position: "absolute",
left: "5px",
top: "2px"
}
},
"Buttercup"
);
const container = el(
"div",
content.map((tab, i) =>
this.headerChildren[i] = el("li",
el("a",
{onclick: (event: Event) => this.setActive(i)},
el("span", tab.name)
)
)
)
constructor () {
this.el = el('th',
this.node = text(""),
this.sortButton = el("a"),
);
}
constructor(name: string, onclick: () => void) {
this.el = el("li",
el("a",
el("span", name)
)
)
}
update(isActive: boolean) {
constructor ({ app, store }) {
this.app = app;
this.store = store;
this.el = el('tr',
this.id = el('td.col-md-1'),
el('td.col-md-4',
this.label = el('a', { onclick: e => app.select(this.data.id) })
),
el('td.col-md-1',
this.remove = el('a', { onclick: e => app.remove(this.data.id) },
el('span.glyphicon.glyphicon-remove', { 'aria-hidden': true })
)
),
el('td.col-md-6')
);
}
update (data) {