UNPKG

webwriter-chart

Version:

ww-chart is an interactive data visualization widget for the WebWriter tool that implements various charts and diagrams for static and exploratory data visualization.

73 lines (72 loc) 2.85 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { html } from "lit"; import { customElement } from "lit/decorators.js"; import "./LimitedNumberInput"; import { SharedTestStateMixin } from "../state"; import { LitElementWw } from "@webwriter/lit"; import { Switch } from "./Switch"; import { NumberInput } from "./LimitedNumberInput"; let TeacherOptions = class TeacherOptions extends SharedTestStateMixin(LitElementWw) { render() { return html ` <h2 style="grid-column: 1/span 4;">TEACHER OPTIONS</h2> <p>show options</p> <wwci-switch ?checked=${this.sharedState.teacherOptions.showOptions} @wwci-change=${(e) => { this.sharedState.teacherOptions.showOptions = e.detail.value; }} ></wwci-switch> <p>show data</p> <wwci-switch ?checked=${this.sharedState.teacherOptions.showData} @wwci-change=${(e) => { this.sharedState.teacherOptions.showData = e.detail.value; }} ></wwci-switch> <p>show locked options</p> <wwci-switch ?checked=${this.sharedState.teacherOptions.showLockedOptions} @wwci-change=${(e) => { this.sharedState.teacherOptions.showLockedOptions = e.detail.value; }} ></wwci-switch> <p>change data</p> <wwci-switch ?checked=${this.sharedState.teacherOptions.changeData} @wwci-change=${(e) => { this.sharedState.teacherOptions.changeData = e.detail.value; }} ></wwci-switch> <p>change options</p> <wwci-switch ?checked=${this.sharedState.teacherOptions.changeOptions} @wwci-change=${(e) => { this.sharedState.teacherOptions.changeOptions = e.detail.value; }} ></wwci-switch> <p>add/remove data</p> <wwci-switch ?checked=${this.sharedState.teacherOptions.addRemoveData} @wwci-change=${(e) => { this.sharedState.teacherOptions.addRemoveData = e.detail.value; }} ></wwci-switch> `; } static get scopedElements() { return { "wwci-switch": Switch, "wwci-limited-number-input": NumberInput, }; } }; TeacherOptions = __decorate([ customElement("wwci-teacher-options") ], TeacherOptions); export { TeacherOptions };