@hpcc-js/form 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/__package__.ts","../src/Button.ts","../src/CheckBox.ts","../src/ColorInput.ts","../src/Form.ts","../src/Input.ts","../src/FieldForm.ts","../src/InputRange.ts","../src/OnOff.ts","../src/Radio.ts","../src/Range.ts","../src/Select.ts","../src/Slider.ts","../src/TextArea.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/form\";\nexport const PKG_VERSION = \"3.6.0\";\nexport const BUILD_VERSION = \"3.34.1\";\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Button extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n this._inputElement[0] = element.append(\"button\")\n .attr(\"name\", this.name())\n .on(\"click\", function (w) {\n w.click(w);\n })\n .on(\"blur\", function (w) {\n w.blur(w);\n })\n .on(\"change\", function (w) {\n context.value([context._inputElement[0].property(\"value\")]);\n w.change(w, true);\n })\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._inputElement[0].text(this.value());\n }\n}\nButton.prototype._class += \" form_Button\";\nButton.prototype.implements(IInput.prototype);\n\nexport interface Button {\n name(): string;\n name(_: string): Button;\n label(): string;\n label(_: string): Button;\n value(): any;\n value(_: any): Button;\n validate(): string;\n validate(_: string): Button;\n}\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class CheckBox extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n\n const checkboxContainer = element.append(\"ul\");\n if (!this.selectOptions().length) {\n this.selectOptions().push(\"\"); // create an empty radio if we using .value and not selectOptions array\n }\n this.selectOptions().forEach(function (val, idx) {\n context._inputElement[idx] = checkboxContainer.append(\"li\").append(\"input\").attr(\"type\", \"checkbox\");\n context._inputElement[idx].node().insertAdjacentHTML(\"afterend\", \"<text>\" + val + \"</text>\");\n });\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n const vals = [];\n context._inputElement.forEach(function (d) {\n if (d.property(\"checked\")) {\n vals.push(d.property(\"value\"));\n }\n });\n context.value(vals);\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n\n this._inputElement.forEach(function (e, idx) {\n e.property(\"value\", context.selectOptions()[idx]);\n if (context.value().indexOf(context.selectOptions()[idx]) !== -1 && context.value() !== \"false\") {\n e.property(\"checked\", true);\n } else {\n e.property(\"checked\", false);\n }\n });\n }\n\n insertSelectOptions(optionsArr) {\n let optionHTML = \"\";\n if (optionsArr.length > 0) {\n optionsArr.forEach(function (opt) {\n const val = (opt instanceof Array ? opt[0] : opt);\n const text = (opt instanceof Array ? (opt[1] ? opt[1] : opt[0]) : opt);\n optionHTML += \"<option value='\" + val + \"'>\" + text + \"</option>\";\n });\n } else {\n optionHTML += \"<option>selectOptions not set</option>\";\n }\n this._inputElement[0].html(optionHTML);\n }\n}\nCheckBox.prototype._class += \" form_CheckBox\";\nCheckBox.prototype.implements(IInput.prototype);\n\nexport interface CheckBox {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n}\n\nCheckBox.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\nimport { rgb as d3Rgb } from \"d3-color\";\n\nimport \"../src/Input.css\";\n\nexport class ColorInput extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n this._inputElement[0] = element.append(\"input\").attr(\"type\", \"text\");\n this._inputElement[0].classed(\"color-text\", true);\n this._inputElement[1] = element.append(\"input\").attr(\"type\", \"color\");\n\n this._inputElement.forEach(function (e, idx) {\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n if (idx === 0) {\n context._inputElement[1].property(\"value\", d3Rgb(context._inputElement[0].property(\"value\")).toString());\n context.value(context._inputElement[0].property(\"value\"));\n } else {\n context._inputElement[0].property(\"value\", context._inputElement[1].property(\"value\"));\n context.value(d3Rgb(context._inputElement[1].property(\"value\")).toString());\n }\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n this._inputElement.forEach(function (e) {\n e.attr(\"name\", context.name());\n });\n\n this._inputElement[0].attr(\"type\", \"text\");\n this._inputElement[1].attr(\"type\", \"color\");\n this._inputElement[0].property(\"value\", this.value());\n this._inputElement[1].property(\"value\", d3Rgb(this.value()).toString());\n\n const bbox = this._inputElement[0].node().getBoundingClientRect();\n this._inputElement[1].style(\"height\", (bbox.height - 2) + \"px\");\n\n }\n}\nColorInput.prototype._class += \" form_ColorInput\";\nColorInput.prototype.implements(IInput.prototype);\n\nexport interface ColorInput {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n}\n","import { d3Event, HTMLWidget, select as d3Select, SVGWidget, Widget, WidgetArray } from \"@hpcc-js/common\";\nimport { Button } from \"./Button.ts\";\n\nimport \"../src/Form.css\";\n\nexport class Form extends HTMLWidget {\n tbody;\n tfoot;\n btntd;\n _controls;\n _maxCols;\n\n constructor() {\n super();\n\n this._tag = \"form\";\n }\n\n data(): any;\n data(_: any): this;\n data(_?: any): any | this {\n if (!arguments.length) {\n const retVal = [];\n this.inputsForEach(function (input) {\n retVal.push(input.value());\n });\n return retVal;\n } else {\n this.inputsForEach(function (input, idx) {\n if (_ && _.length > idx) {\n input.value(_[idx]).render();\n }\n });\n }\n return this;\n }\n\n inputsForEach(callback, scope?) {\n let idx = 0;\n this.inputs().forEach(function (inp) {\n const inpArray = inp instanceof WidgetArray ? inp.content() : [inp];\n inpArray.forEach(function (inp2) {\n if (scope) {\n callback.call(scope, inp2, idx++);\n } else {\n callback(inp2, idx++);\n }\n });\n });\n }\n\n inputsMap(): { [name: string]: Widget } {\n const retVal: { [name: string]: Widget } = {};\n this.inputs().forEach(function (inp) {\n retVal[inp.name()] = inp;\n });\n return retVal;\n }\n\n calcMaxColumns() {\n let retVal = 0;\n this.inputs().forEach(function (inputWidget) {\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n if (inputWidgetArray.length > retVal) {\n retVal = inputWidgetArray.length;\n }\n });\n return retVal;\n }\n\n values(): any;\n values(_: any): this;\n values(_?: any): any | this {\n if (!arguments.length) {\n const dataArr = {};\n this.inputsForEach(function (inp) {\n const type = inp.type ? inp.type() : \"text\";\n const value = inp.value();\n if (value || !this.omitBlank()) {\n switch (type) {\n case \"checkbox\":\n dataArr[inp.name()] = inp.value_exists() ? !!inp.value() : undefined;\n break;\n case \"number\":\n const v = inp.value();\n dataArr[inp.name()] = v === \"\" ? undefined : +v;\n break;\n case \"text\":\n default:\n dataArr[inp.name()] = inp.value_exists() ? inp.value() : undefined;\n break;\n }\n }\n }, this);\n return dataArr;\n } else {\n this.inputsForEach(function (inp) {\n if (_[inp.name()]) {\n inp.value(_[inp.name()]);\n } else if (this.omitBlank()) {\n inp.value(\"\");\n }\n }, this);\n }\n return this;\n }\n\n submit() {\n let isValid = true;\n if (this.validate()) {\n isValid = this.checkValidation();\n }\n if (!this.allowEmptyRequest() && !this.inputs().some(function (w) {\n if (w._class.indexOf(\"WidgetArray\") !== -1) {\n return w.content().some(function (wa) {\n return wa.hasValue();\n });\n }\n return w.hasValue();\n })) {\n return;\n }\n this.click(isValid ? this.values() : null, null, isValid);\n }\n\n clear() {\n this.inputsForEach(function (inp) {\n switch (inp.classID()) {\n case \"form_Slider\":\n if (inp.allowRange()) {\n inp.value([inp.low(), inp.low()]).render();\n } else {\n inp.value(inp.low()).render();\n }\n break;\n case \"form_CheckBox\":\n inp.value(false).render();\n break;\n case \"form_Button\":\n /* skip */\n break;\n default:\n inp.value(undefined).render();\n break;\n }\n });\n }\n\n checkValidation() {\n let ret = true;\n const msgArr = [];\n this.inputsForEach(function (inp) {\n if (!inp.isValid()) {\n msgArr.push(\"'\" + inp.label() + \"'\" + \" value is invalid.\");\n }\n });\n if (msgArr.length > 0) {\n alert(msgArr.join(\"\\n\"));\n ret = false;\n }\n return ret;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element.on(\"submit\", function () {\n d3Event().preventDefault();\n });\n\n this._placeholderElement.style(\"overflow\", \"auto\");\n const table = element\n .append(\"table\")\n ;\n this.tbody = table.append(\"tbody\");\n this.tfoot = table.append(\"tfoot\");\n this.btntd = this.tfoot.append(\"tr\").append(\"td\")\n .attr(\"colspan\", 2)\n ;\n\n const context = this;\n this._controls = [\n new Button()\n .classed({ default: true })\n .value(\"Submit\")\n .on(\"click\", function () {\n context.submit();\n }, true),\n new Button()\n .value(\"Clear\")\n .on(\"click\", function () {\n context.clear();\n }, true)\n ];\n const rightJust = context.btntd\n .append(\"div\")\n .style(\"float\", \"right\")\n ;\n this._controls.forEach(function (w) {\n const leftJust = rightJust\n .append(\"span\")\n .style(\"float\", \"left\")\n ;\n w.target(leftJust.node()).render();\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._maxCols = this.calcMaxColumns();\n\n const context = this;\n const rows = this.tbody.selectAll(\"tr\").data(this.inputs());\n rows.enter().append(\"tr\")\n .each(function (inputWidget, i) {\n const element2 = d3Select(this);\n\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n inputWidgetArray.forEach(function (inputWidget2, idx) {\n element2.append(\"td\")\n .attr(\"class\", \"prompt\")\n ;\n const input = element2.append(\"td\")\n .attr(\"class\", \"input\")\n ;\n if (idx === inputWidgetArray.length - 1 && inputWidgetArray.length < context._maxCols) {\n input.attr(\"colspan\", (context._maxCols - inputWidgetArray.length + 1) * 2);\n }\n inputWidget2.target(input.node()).render();\n if (inputWidget2 instanceof SVGWidget) {\n const bbox = inputWidget2.element().node().getBBox();\n input.style(\"height\", bbox.height + \"px\");\n inputWidget2.resize().render();\n }\n\n if (inputWidget2._inputElement instanceof Array) {\n inputWidget2._inputElement.forEach(function (e) {\n e.on(\"keyup.form\", function (w) {\n setTimeout(function () {\n\n context._controls[0].disable(!context.allowEmptyRequest() && !context.inputs().some(function (w2) {\n if (w2._class.indexOf(\"WidgetArray\") !== -1) {\n return w2.content().some(function (wa) {\n return wa.hasValue();\n });\n }\n return w2.hasValue();\n }));\n }, 100);\n });\n });\n }\n });\n })\n .merge(rows)\n .each(function (inputWidget, i) {\n const element2 = d3Select(this);\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n inputWidgetArray.forEach(function (inputWidget2, idx) {\n element2.select(\"td.prompt\")\n .text(inputWidget2.label() + \":\")\n ;\n });\n })\n ;\n rows.each(function (inputWidget, i) {\n if (i === 0 && inputWidget.setFocus) {\n inputWidget.setFocus();\n }\n });\n rows.exit()\n .each(function (inputWidget, i) {\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n inputWidgetArray.forEach(function (inputWidget2, idx) {\n inputWidget2.target(null);\n });\n })\n .remove()\n ;\n\n this.tfoot\n .style(\"display\", this.showSubmit() ? \"table-footer-group\" : \"none\")\n ;\n this.btntd\n .attr(\"colspan\", this._maxCols * 2)\n ;\n\n // Disable Submit unless there is data\n if (!this.allowEmptyRequest()) {\n setTimeout(function () {\n context._controls[0].disable(!context.allowEmptyRequest() && !context.inputs().some(function (w) {\n if (w._class.indexOf(\"WidgetArray\") !== -1) {\n return w.content().some(function (wa) {\n return wa.hasValue();\n });\n }\n return w.hasValue();\n }));\n }, 100);\n }\n\n }\n\n exit(domNode, element) {\n this.inputsForEach(input => input.target(null));\n super.exit(domNode, element);\n }\n\n click(row, col, sel) {\n }\n}\nForm.prototype._class += \" form_Form\";\n\nexport interface Form {\n validate(): boolean;\n validate(_: boolean): this;\n validate_exists(): boolean;\n inputs(): any[];\n inputs(_: any[]): this;\n inputs_exists(): boolean;\n inputs_reset(): void;\n showSubmit(): boolean;\n showSubmit(_: boolean): this;\n showSubmit_exists(): boolean;\n omitBlank(): boolean;\n omitBlank(_: boolean): this;\n omitBlank_exists(): boolean;\n allowEmptyRequest(): boolean;\n allowEmptyRequest(_: boolean): this;\n allowEmptyRequest_exists(): boolean;\n}\n\nForm.prototype.publish(\"validate\", true, \"boolean\", \"Enable/Disable input validation\");\nForm.prototype.publish(\"inputs\", [], \"widgetArray\", \"Array of input widgets\", null, { render: false });\nForm.prototype.publish(\"showSubmit\", true, \"boolean\", \"Show Submit/Cancel Controls\");\nForm.prototype.publish(\"omitBlank\", false, \"boolean\", \"Drop Blank Fields From Submit\");\nForm.prototype.publish(\"allowEmptyRequest\", false, \"boolean\", \"Allow Blank Form to be Submitted\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { Database, HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Input extends HTMLWidget {\n _inputElement = [];\n _labelElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n checked(_) {\n if (!arguments.length) return this._inputElement[0] ? this._inputElement[0].property(\"checked\") : false;\n if (this._inputElement[0]) {\n this._inputElement[0].property(\"checked\", _);\n }\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._labelElement[0] = element.append(\"label\")\n .attr(\"for\", this.id() + \"_input\")\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n ;\n\n const context = this;\n switch (this.type()) {\n case \"button\":\n this._inputElement[0] = element.append(\"button\")\n .attr(\"id\", this.id() + \"_input\")\n ;\n break;\n case \"textarea\":\n this._inputElement[0] = element.append(\"textarea\")\n .attr(\"id\", this.id() + \"_input\")\n ;\n break;\n default:\n this._inputElement[0] = element.append(\"input\")\n .attr(\"id\", this.id() + \"_input\")\n .attr(\"type\", this.type())\n ;\n break;\n }\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w: Input) {\n w.click(w);\n });\n e.on(\"blur\", function (w: Input) {\n w.blur(w);\n });\n e.on(\"change\", function (w: Input) {\n context.value([e.property(\"value\")]);\n w.change(w, true);\n });\n e.on(\"keyup\", function (w: Input) {\n context.value([e.property(\"value\")]);\n w.change(w, false);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._labelElement[0]\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n .text(this.inlineLabel())\n ;\n switch (this.type()) {\n case \"button\":\n this._inputElement[0].text(this.value());\n break;\n case \"textarea\":\n this._inputElement[0].property(\"value\", this.value());\n break;\n default:\n this._inputElement[0].attr(\"type\", this.type());\n this._inputElement[0].property(\"value\", this.value());\n break;\n }\n }\n\n // IInput Events ---\n blur(w: Input) {\n }\n keyup(w: Input) {\n }\n focus(w: Input) {\n }\n click(w: Input) {\n }\n dblclick(w: Input) {\n }\n change(w: Input, complete: boolean) {\n }\n}\nInput.prototype._class += \" form_Input\";\nInput.prototype.implements(IInput.prototype);\n\nexport interface Input {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n type(): Database.FieldType | \"button\" | \"checkbox\" | \"text\" | \"textarea\" | \"search\" | \"email\" | \"datetime\";\n type(_: Database.FieldType | \"button\" | \"checkbox\" | \"text\" | \"textarea\" | \"search\" | \"email\" | \"datetime\"): this;\n type_exists(): boolean;\n type_default(): string;\n inlineLabel(): string;\n inlineLabel(_: string): this;\n inlineLabel_exists(): boolean;\n}\n\nInput.prototype.publish(\"type\", \"text\", \"set\", \"Input type\", [\"string\", \"number\", \"boolean\", \"date\", \"time\", \"hidden\", \"nested\", \"button\", \"checkbox\", \"text\", \"textarea\", \"search\", \"email\", \"datetime\"]);\nInput.prototype.publish(\"inlineLabel\", null, \"string\", \"Input Label\", null, { optional: true });\n","import { Database } from \"@hpcc-js/common\";\nimport { Form } from \"./Form.ts\";\nimport { Input } from \"./Input.ts\";\n\nimport \"../src/Form.css\";\n\nexport class FieldForm extends Form {\n\n constructor() {\n super();\n\n this._tag = \"form\";\n }\n\n fields(): Database.Field[];\n fields(_: Database.Field[]): this;\n fields(_?: Database.Field[]): Database.Field[] | this {\n const retVal = super.fields.apply(this, arguments);\n if (arguments.length) {\n const inpMap = this.inputsMap();\n this.inputs(_.map(f => inpMap[f.id()] || new Input()\n .name(f.id())\n .label(f.label())\n .type(f.type())\n ));\n }\n return retVal;\n }\n\n data(): any;\n data(_: any): this;\n data(_?: any): any | this {\n if (!arguments.length) return super.data();\n super.data(_[0]);\n if (_[0]) {\n // Update input \"name\" with the __lparam ids ---\n const inputs = this.inputs();\n const __lparam = _[0][this.columns().length];\n let i = 0;\n for (const key in __lparam) {\n inputs[i].name(key);\n ++i;\n }\n }\n return this;\n }\n\n}\nFieldForm.prototype._class += \" form_FieldForm\";\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class InputRange extends HTMLWidget {\n _inputElement = [];\n _labelElement = [];\n _rangeData = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._labelElement[0] = element.append(\"label\")\n .attr(\"for\", this.id() + \"_input\")\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n ;\n\n this._inputElement.push(element.append(\"input\")\n .attr(\"id\", this.id() + \"_input_min\")\n .attr(\"type\", this.type()));\n this._inputElement.push(element.append(\"input\")\n .attr(\"id\", this.id() + \"_input_max\")\n .attr(\"type\", this.type()));\n\n const context = this;\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n context._rangeData[idx] = e.property(\"value\");\n context.value(context._rangeData);\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._labelElement[0]\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n .text(this.inlineLabel())\n ;\n\n this._rangeData = this.value();\n this._inputElement.forEach(function (e, idx) {\n e\n .attr(\"type\", this.type())\n .property(\"value\", this._rangeData.length > idx ? this._rangeData[idx] : \"\");\n }, this);\n }\n}\nInputRange.prototype._class += \" form_InputRange\";\nInputRange.prototype.implements(IInput.prototype);\n\nexport interface InputRange {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any[];\n value(_: any[]): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n type(): string;\n type(_: string): this;\n type_exists(): boolean;\n inlineLabel(): string;\n inlineLabel(_: string): this;\n inlineLabel_exists(): boolean;\n}\n\nInputRange.prototype.publish(\"type\", \"text\", \"set\", \"InputRange type\", [\"number\", \"date\", \"text\", \"time\", \"datetime\", \"hidden\"]);\nInputRange.prototype.publish(\"inlineLabel\", null, \"string\", \"InputRange Label\", null, { optional: true });\nInputRange.prototype.publish(\"value\", [\"\", \"\"], \"array\", \"Input Current Value\", null, { override: true });\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/OnOff.css\";\n\nexport class OnOff extends HTMLWidget {\n _inputElement = [];\n _input;\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element.classed(\"onoffswitch\", true);\n const context = this;\n this._input = element.append(\"input\")\n .attr(\"class\", \"onoffswitch-checkbox\")\n .attr(\"type\", \"checkbox\")\n .attr(\"id\", this.id() + \"_onOff\")\n .on(\"click\", function (w) {\n w.click(w);\n })\n .on(\"blur\", function (w) {\n w.blur(w);\n })\n .on(\"change\", function (w) {\n const vals = [];\n context._inputElement.forEach(function (d, idx) {\n if (d.property(\"checked\")) {\n vals.push(d.property(\"value\"));\n }\n });\n context.value(vals);\n w.change(w, true);\n })\n ;\n const label = element.append(\"label\")\n .attr(\"class\", \"onoffswitch-label\")\n .attr(\"for\", this.id() + \"_onOff\")\n ;\n const inner = label.append(\"div\")\n .attr(\"class\", \"onoffswitch-inner\")\n ;\n inner.append(\"div\")\n .attr(\"class\", \"onoffswitch-offText\")\n .style(\"padding-right\", (this.containerRadius() / 2) + \"px\")\n .text(this.offText())\n ;\n inner.append(\"div\")\n .attr(\"class\", \"onoffswitch-onText\")\n .style(\"padding-left\", (this.containerRadius() / 2) + \"px\")\n .style(\"width\", `calc(100% - ${(this.containerRadius() / 2)}px)`)\n .text(this.onText())\n ;\n label.append(\"div\")\n .attr(\"class\", \"onoffswitch-switch\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._input\n .attr(\"name\", this.name())\n ;\n element\n .style(\"margin-left\", this.marginLeft() + \"px\")\n .style(\"margin-bottom\", this.marginBottom() + \"px\")\n .style(\"width\", this.minWidth() + \"px\")\n ;\n\n const _switch_size = this.minHeight() - (this.gutter() * 4);\n\n element.select(\".onoffswitch-switch\")\n .style(\"height\", _switch_size + \"px\")\n .style(\"width\", _switch_size + \"px\")\n .style(\"top\", (this.gutter() * 2) + 1 + \"px\")\n .style(\"border-radius\", this.switchRadius() + \"px\")\n ;\n element.select(\".onoffswitch-inner\")\n .style(\"min-height\", this.minHeight() + \"px\")\n ;\n element.select(\".onoffswitch-label\")\n .style(\"border-radius\", this.containerRadius() + \"px\")\n ;\n element.select(\".onoffswitch-offText\")\n .style(\"color\", this.offFontColor())\n .style(\"background-color\", this.offColor())\n ;\n element.select(\".onoffswitch-onText\")\n .style(\"color\", this.onFontColor())\n .style(\"background-color\", this.onColor())\n ;\n }\n}\nOnOff.prototype._class += \" form_OnOff\";\nexport interface OnOff {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n marginLeft(): number;\n marginLeft(_: number): this;\n marginBottom(): number;\n marginBottom(_: number): this;\n minWidth(): number;\n minWidth(_: number): this;\n minHeight(): number;\n minHeight(_: number): this;\n gutter(): number;\n gutter(_: number): this;\n offText(): string;\n offText(_: string): this;\n onText(): string;\n onText(_: string): this;\n switchRadius(): number;\n switchRadius(_: number): this;\n containerRadius(): number;\n containerRadius(_: number): this;\n offColor(): string;\n offColor(_: string): this;\n onColor(): string;\n onColor(_: string): this;\n offFontColor(): string;\n offFontColor(_: string): this;\n onFontColor(): string;\n onFontColor(_: string): this;\n\n}\nOnOff.prototype.implements(IInput.prototype);\n\nOnOff.prototype.publish(\"marginLeft\", 0, \"number\", \"Margin left of OnOff\");\nOnOff.prototype.publish(\"marginBottom\", 0, \"number\", \"Margin bottom of OnOff\");\nOnOff.prototype.publish(\"minWidth\", 100, \"number\", \"Minimum width of OnOff (pixels)\");\nOnOff.prototype.publish(\"minHeight\", 20, \"number\", \"Minimum height of OnOff (pixels)\");\nOnOff.prototype.publish(\"gutter\", 1, \"number\", \"Space between switch and border of OnOff (pixels)\");\nOnOff.prototype.publish(\"onText\", \"Save\", \"string\", \"Text to display when 'ON'\");\nOnOff.prototype.publish(\"offText\", \"Properties\", \"string\", \"Text to display when 'OFF'\");\nOnOff.prototype.publish(\"switchRadius\", 10, \"number\", \"Border radius of switch (pixels)\");\nOnOff.prototype.publish(\"containerRadius\", 10, \"number\", \"Border radius of OnOff (pixels)\");\nOnOff.prototype.publish(\"onColor\", \"#2ecc71\", \"html-color\", \"Background color when 'ON'\");\nOnOff.prototype.publish(\"offColor\", \"#ecf0f1\", \"html-color\", \"Background color when 'OFF'\");\nOnOff.prototype.publish(\"onFontColor\", \"#2c3e50\", \"html-color\", \"Font color when 'ON'\");\nOnOff.prototype.publish(\"offFontColor\", \"#7f8c8d\", \"html-color\", \"Font color when 'OFF'\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Radio extends HTMLWidget {\n _inputElement = [];\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n const radioContainer = element.append(\"ul\");\n if (!this.selectOptions().length) {\n this.selectOptions().push(\"\"); // create an empty radio if we using .value and not selectOptions array\n }\n this.selectOptions().forEach(function (val, idx) {\n context._inputElement[idx] = radioContainer.append(\"li\").append(\"input\").attr(\"type\", \"radio\");\n context._inputElement[idx].node().insertAdjacentHTML(\"afterend\", \"<text>\" + val + \"</text>\");\n });\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n context.value([e.property(\"value\")]);\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n\n this._inputElement.forEach(function (e, idx) {\n e.property(\"value\", context.selectOptions()[idx]);\n if (context.value().indexOf(context.selectOptions()[idx]) !== -1 && context.value() !== \"false\") {\n e.property(\"checked\", true);\n } else {\n e.property(\"checked\", false);\n }\n });\n }\n}\nRadio.prototype._class += \" form_Radio\";\nRadio.prototype.implements(IInput.prototype);\n\nexport interface Radio {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n}\n\nRadio.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\nimport { rgb as d3Rgb } from \"d3-color\";\n\nimport \"../src/Input.css\";\n\nexport class Range extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n this._inputElement[0] = element.append(\"input\").attr(\"type\", \"range\");\n this._inputElement[1] = element.append(\"input\").attr(\"type\", \"number\");\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n if (idx === 0) {\n context._inputElement[1].property(\"value\", d3Rgb(context._inputElement[0].property(\"value\")).toString());\n context.value(context._inputElement[0].property(\"value\"));\n } else {\n context._inputElement[0].property(\"value\", context._inputElement[1].property(\"value\"));\n context.value(d3Rgb(context._inputElement[1].property(\"value\")).toString());\n }\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._inputElement[0].attr(\"type\", \"range\");\n this._inputElement[0].property(\"value\", this.value());\n this._inputElement[0].attr(\"min\", this.low());\n this._inputElement[0].attr(\"max\", this.high());\n this._inputElement[0].attr(\"step\", this.step());\n this._inputElement[1].attr(\"type\", \"number\");\n this._inputElement[1].property(\"value\", this.value());\n this._inputElement[1].attr(\"min\", this.low());\n this._inputElement[1].attr(\"max\", this.high());\n this._inputElement[1].attr(\"step\", this.step());\n }\n\n insertSelectOptions(optionsArr) {\n let optionHTML = \"\";\n if (optionsArr.length > 0) {\n optionsArr.forEach(function (opt) {\n const val = (opt instanceof Array ? opt[0] : opt);\n const text = (opt instanceof Array ? (opt[1] ? opt[1] : opt[0]) : opt);\n optionHTML += \"<option value='\" + val + \"'>\" + text + \"</option>\";\n });\n } else {\n optionHTML += \"<option>selectOptions not set</option>\";\n }\n this._inputElement[0].html(optionHTML);\n }\n}\nRange.prototype._class += \" form_Range\";\nRange.prototype.implements(IInput.prototype);\n\nexport interface Range {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n type(): string;\n type(_: string): this;\n type_exists(): boolean;\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n low(): number;\n low(_: number): this;\n low_exists(): boolean;\n high(): number;\n high(_: number): this;\n high_exists(): boolean;\n step(): number;\n step(_: number): this;\n step_exists(): boolean;\n}\n\nRange.prototype.publish(\"type\", \"text\", \"set\", \"Input type\", [\"html-color\", \"number\", \"checkbox\", \"button\", \"select\", \"textarea\", \"date\", \"text\", \"range\", \"search\", \"email\", \"time\", \"datetime\"]);\nRange.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\nRange.prototype.publish(\"low\", null, \"number\", \"Minimum value for Range input\");\nRange.prototype.publish(\"high\", null, \"number\", \"Maximum value for Range input\");\nRange.prototype.publish(\"step\", null, \"number\", \"Step value for Range input\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Select extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n this._inputElement[0] = element.append(\"select\")\n .attr(\"name\", this.name())\n .on(\"click\", function (w) {\n w.click(w);\n })\n .on(\"blur\", function (w) {\n w.blur(w);\n })\n .on(\"change\", function (w) {\n context.value([context._inputElement[0].property(\"value\")]);\n w.change(w, true);\n })\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this.insertSelectOptions(this.selectOptions());\n this._inputElement[0]\n .property(\"value\", this.value())\n .style(\"max-width\", this.maxWidth_exists() ? this.maxWidth() + \"px\" : null)\n ;\n }\n\n insertSelectOptions(optionsArr) {\n let optionHTML = \"\";\n if (optionsArr.length > 0) {\n optionsArr.forEach(function (opt) {\n const val = (opt instanceof Array ? opt[0] : opt);\n const text = (opt instanceof Array ? (opt[1] ? opt[1] : opt[0]) : opt);\n optionHTML += \"<option value='\" + val + \"'>\" + text + \"</option>\";\n });\n } else {\n optionHTML += \"<option>selectOptions not set</option>\";\n }\n this._inputElement[0].html(optionHTML);\n }\n}\nSelect.prototype._class += \" form_Select\";\nSelect.prototype.implements(IInput.prototype);\n\nexport interface Select {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n maxWidth(): number;\n maxWidth(_: number): this;\n maxWidth_exists(): boolean;\n}\n\nSelect.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\nSelect.prototype.publish(\"maxWidth\", 120, \"number\", \"Width\", null, { optional: true });\n","import { IInput } from \"@hpcc-js/api\";\nimport { d3Event, select as d3Select, SVGWidget } from \"@hpcc-js/common\";\nimport { drag as d3Drag } from \"d3-drag\";\nimport { format as d3Format } from \"d3-format\";\nimport { scaleLinear as d3ScaleLinear } from \"d3-scale\";\nimport { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\n\nimport \"../src/Slider.css\";\n\nexport class Slider extends SVGWidget {\n xScale;\n\n moveMode: \"both\" | \"left\" | \"right\";\n moveStartPos: number;\n\n prevValue;\n\n slider;\n\n handleLeft;\n handleLeftPos: number = 0;\n handleLeftStartPos: number;\n\n handleRight;\n handleRightPos: number = 0;\n handleRightStartPos: number;\n\n constructor() {\n super();\n IInput.call(this);\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this.resize({ width: this.width(), height: 50 });\n\n this.xScale = d3ScaleLinear()\n .clamp(true);\n\n this.slider = element.append(\"g\")\n .attr(\"class\", \"slider\")\n ;\n if (this.low() === null && this.high() === null) {\n if (this.lowDatetime() !== null && this.highDatetime() !== null) {\n const time_parser = d3TimeParse(this.timePattern() ? this.timePattern() : \"%Q\");\n this.low(time_parser(this.lowDatetime()).getTime());\n this.high(time_parser(this.highDatetime()).getTime());\n }\n }\n this.slider.append(\"line\")\n .attr(\"class\", \"track\")\n .select(function () { return this.parentNode.appendChild(this.cloneNode(true)); })\n .attr(\"class\", \"track-inset\")\n .select(function () { return this.parentNode.appendChild(this.cloneNode(true)); })\n .attr(\"class\", \"track-overlay\")\n .call(d3Drag()\n .on(\"start\", () => {\n const event = d3Event();\n this.moveStartPos = event.x;\n this.handleLeftStartPos = this.handleLeftPos;\n this.handleRightStartPos = this.handleRightPos;\n if (this.allowRange() && this.handleLeftPos <= event.x && event.x <= this.handleRightPos) {\n this.moveMode = \"both\";\n } else if (Math.abs(event.x - this.handleLeftPos) < Math.abs(event.x - this.handleRightPos)) {\n this.moveMode = \"left\";\n } else {\n this.moveMode = \"right\";\n }\n this.moveHandleTo(event.x);\n })\n .on(\"drag\", () => {\n this.moveHandleTo(d3Event().x);\n })\n .on(\"end\", () => {\n this.moveHandleTo(d3Event().x);\n this.data([[this.xScale.invert(this.handleLeftPos), this.xScale.invert(this.handleRightPos)]]);\n this.checkChangedValue();\n }));\n\n this.slider.insert(\"g\", \".track-overlay\")\n .attr(\"class\", \"ticks\")\n .attr(\"transform\", `translate(0, ${this.fontSize() + (this.tickHeight() / 2)})`)\n ;\n\n this.handleRight = this.slider.insert(\"path\", \".track-overlay\")\n .attr(\"class\", \"handle\")\n ;\n\n this.handleLeft = this.slider.insert(\"path\", \".track-overlay\")\n .attr(\"class\", \"handle\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n this.xScale\n .domain([this.low(), this.high()])\n .range([0, this.width() - this.padding() * 2])\n ;\n\n this.slider\n .attr(\"transform\", \"translate(\" + (-this.width() / 2 + this.padding()) + \",\" + 0 + \")\");\n\n this.slider.selectAll(\"line.track,line.track-inset,line.track-overlay\")\n .attr(\"x1\", this.xScale.range()[0])\n .attr(\"x2\", this.xScale.range()[1])\n ;\n\n const x_distance = (this.width() - (this.padding() * 2)) / (this.tickCount() - 1);\n\n const tick_text_arr = [];\n if (this.tickDateFormat() !== null && this.timePattern() !== null) {\n const Q_parser = d3TimeParse(\"%Q\");\n const time_formatter = d3TimeFormat(this.tickDateFormat());\n const time_segment = (this.high() - this.low()) / (this.tickCount() - 1);\n for (let i = 0; i < this.tickCount(); i++) {\n const date_to_parse = \"\" + (this.low() + (time_segment * i));\n const parsed_date = Q_parser(date_to_parse);\n tick_text_arr.push(time_formatter(parsed_date));\n }\n } else {\n const value_formatter = d3Format(this.tickValueFormat());\n const value_segment = (this.high() - this.low()) / (this.tickCount() - 1);\n for (let i = 0; i < this.tickCount(); i++) {\n const tick_value = this.low() + (value_segment * i);\n tick_text_arr.push(value_formatter(tick_value));\n }\n }\n const tickText = this.slider.selectAll(\"g.tick\").data(tick_text_arr);\n const tickTextEnter = tickText.enter().append(\"g\").attr(\"class\", \"tick\");\n\n tickTextEnter.append(\"text\").attr(\"class\", \"tick-text\");\n tickTextEnter.append(\"line\").attr(\"class\", \"tick-line\");\n tickTextEnter\n .merge(tickText)\n .each(function (d, i) {\n const x = x_distance * i;\n\n d3Select(this).select(\"text.tick-text\")\n .style(\"font-size\", context.fontSize())\n .attr(\"x\", function () {\n if (i === 0) return x - 2;\n return i === context.tickCount() - 1 ? x + 2 : x;\n })\n .attr(\"y\", context.tickHeight() + (context.tickOffset() / 2) + context.fontSize())\n .attr(\"text-basline\", \"text-before-edge\")\n .attr(\"text-anchor\", function () {\n if (i === 0) return \"start\";\n return i === context.tickCount() - 1 ? \"end\" : \"middle\";\n })\n .text(() => d)\n ;\n\n d3Select(this).select(\"line.tick-line\")\n .attr(\"x1\", x)\n .attr(\"x2\", x)\n .attr(\"y1\", context.tickOffset() - 1)\n .attr(\"y2\", context.tickOffset() + context.tickHeight())\n .style(\"stroke\", \"#000\")\n .style(\"stroke-width\", 1)\n ;\n });\n this.slider.node().appendChild(this.handleRight.node());\n this.slider.node().appendChild(this.handleLeft.node());\n this.handleLeftPos = this.lowPos();\n this.handleRightPos = this.highPos();\n this.updateHandles();\n this.checkChangedValue();\n }\n\n checkChangedValue() {\n if (this.prevValue !== this.value() && typeof this.prevValue !== \"undefined\") {\n this.change(this);\n }\n this.prevValue = this.value();\n }\n\n updateHandles() {\n this.handleLeft\n .attr(\"transform\", `translate(${this.handleLeftPos}, -28)`)\n .attr(\"d\", (d) => this.handlePath(\"l\"))\n ;\n this.handleRight\n .attr(\"transform\", `translate(${this.handleRightPos}, -28)`)\n .attr(\"d\", (d) => this.handlePath(\"r\"))\n ;\n }\n\n lowPos(): number {\n let data = [[this.low(), this.high()]];\n if (this.data().length > 0 && typeof this.data()[0][0] === \"number\" && typeof this.data()[0][1] === \"number\") {\n data = this.data();\n }\n return this.xScale(data[0][0]);\n }\n\n highPos(): number {\n let data = [[this.low(), this.high()]];\n if (this.data().length > 0 && typeof this.data()[0][0] === \"number\" && typeof this.data()[0][1] === \"number\") {\n data = this.data();\n }\n return this.xScale(data[0][this.allowRange() ? 1 : 0]);\n }\n\n moveHandleTo(pos) {\n if (this.allowRange()) {\n switch (this.moveMode) {\n case \"both\":\n this.handleLeftPos = this.handleLeftStartPos + pos - this.moveStartPos;\n this.handleRightPos = this.handleRightStartPos + pos - this.moveStartPos;\n break;\n case \"left\":\n this.handleLeftPos = pos;\n if (this.handleLeftPos > this.handleRightPos) {\n this.handleRightPos = this.handleLeftPos;\n }\n break;\n case \"right\":\n this.handleRightPos = pos;\n if (this.handleRightPos < this.handleLeftPos) {\n this.handleLeftPos = this.handleRightPos;\n }\n break;\n }\n } else {\n this.handleLeftPos = this.handleRightPos = pos;\n }\n\n this.handleLeftPos = this.constrain(this.handleLeftPos);\n this.handleRightPos = this.constrain(this.handleRightPos);\n this.value(this.allowRange() ? [this.xScale.invert(this.handleLeftPos), this.xScale.invert(this.handleRightPos)] : this.xScale.invert(this.handleLeftPos));\n this.updateHandles();\n }\n\n constrain(pos: number): number {\n const range = this.xScale.range();\n if (pos < range[0]) pos = range[0];\n if (pos > range[1]) pos = range[1];\n return this.nearestStep(pos);\n }\n\n nearestStep(pos) {\n const value = this.xScale.invert(pos);\n return this.xScale(this.low() + Math.round((value - this.low()) / this.step()) * this.step());\n }\n\n handlePath = function (d) {\n const e = +(d === \"r\");\n const x = e ? 1 : -1;\n const xOffset = this.allowRange() ? 0.5 : 0.0;\n const y = 18;\n let retVal = \"M\" + (xOffset * x) + \",\" + y +\n \"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +\n \"V\" + (2 * y - 6) +\n \"A6,6 0 0 \" + e + \" \" + (xOffset * x) + \",\" + (2 * y)\n ;\n if (this.allowRange()) {\n retVal += \"Z\" +\n \"M\" + (2.5 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8) +\n \"M\" + (4.5 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8)\n ;\n } else {\n retVal += \"M\" + (1 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8)\n ;\n }\n return retVal;\n };\n\n}\nSlider.prototype._class += \" form_Slider\";\nSlider.prototype.implements(IInput.prototype);\n\nexport interface Slider {\n // IInput ---\n name(): string;\n name(_: string): this;\n change(_: Slider): void;\n\n // Properties ---\n padding(): number;\n padding(_: number): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n allowRange(): boolean;\n allowRange(_: boolean): this;\n low(): number;\n low(_: number): this;\n high(): number;\n high(_: number): this;\n step(): number;\n step(_: number): this;\n lowDatetime(): string;\n lowDatetime(_: string): this;\n highDatetime(): string;\n highDatetime(_: string): this;\n stepDatetime(): number;\n stepDatetime(_: number): this;\n selectionLabel(): string;\n selectionLabel(_: string): this;\n label(): string;\n label(_: string): this;\n value(): any;\n value(_: any): this;\n validate(): string;\n validate(_: string): this;\n tickCount(): number;\n tickCount(_: number): this;\n tickOffset(): number;\n tickOffset(_: number): this;\n tickHeight(): number;\n tickHeight(_: number): this;\n tickDateFormat(): string;\n tickDateFormat(_: string): this;\n tickValueFormat(): string;\n tickValueFormat(_: string): this;\n timePattern(): string;\n timePattern(_: string): this;\n\n padding_exists(): boolean;\n fontSize_exists(): boolean;\n fontFamily_exists(): boolean;\n fontColor_exists(): boolean;\n allowRange_exists(): boolean;\n low_exists(): boolean;\n step_exists(): boolean;\n high_exists(): boolean;\n selectionLabel_exists(): boolean;\n name_exists(): boolean;\n label_exists(): boolean;\n value_exists(): boolean;\n validate_exists(): boolean;\n}\n\nSlider.prototype.publish(\"padding\", 16, \"number\", \"Outer Padding\", null, { tags: [\"Basic\"] });\nSlider.prototype.publish(\"fontSize\", 12, \"number\", \"Font Size\", null, { tags: [\"Basic\"] });\nSlider.prototype.publish(\"fontFamily\", null, \"string\", \"Font Name\", null, { tags: [\"Basic\"] });\nSlider.prototype.publish(\"fontColor\", null, \"html-color\", \"Font Color\", null, { tags: [\"Basic\"] });\n\nSlider.prototype.publish(\"allowRange\", false, \"boolean\", \"Allow Range Selection\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"low\", null, \"number\", \"Low\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"high\", null, \"number\", \"High\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"step\", 10, \"number\", \"Step\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"lowDatetime\", null, \"string\", \"Low\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"highDatetime\", null, \"string\", \"High\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"selectionLabel\", \"\", \"string\", \"Selection Label\", null, { tags: [\"Intermediate\"] });\n\nSlider.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\");\n\nSlider.prototype.publish(\"tickCount\", 10, \"number\");\nSlider.prototype.publish(\"tickOffset\", 5, \"number\");\nSlider.prototype.publish(\"tickHeight\", 8, \"number\");\nSlider.prototype.publish(\"tickDateFormat\", null, \"string\");\nSlider.prototype.publish(\"tickValueFormat\", \",.0f\", \"string\");\n\nconst name = Slider.prototype.name;\nSlider.prototype.name = function (_?: any): any {\n const retVal = name.apply(this, arguments);\n if (arguments.length) {\n const val = _ instanceof Array ? _ : [_];\n SVGWidget.prototype.columns.call(this, val);\n }\n return retVal;\n};\n\nconst value = Slider.prototype.value;\nSlider.prototype.value = function (_?: any): any {\n const retVal = value.apply(this, arguments);\n if (!arguments.length) {\n if (!this.allowRange()) {\n return SVGWidget.prototype.data.call(this)[0][0];\n }\n return SVGWidget.prototype.data.call(this)[0];\n } else {\n SVGWidget.prototype.data.call(this, [this.allowRange() ? _ : [_, _]]);\n }\n return retVal;\n};\n","import { Input } from \"./Input.ts\";\n\nexport class TextArea extends Input {\n constructor() {\n super();\n\n this._tag = \"div\";\n this.type(\"textarea\");\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n\n calcHeight() {\n return Math.max(this.minHeight_exists() ? this.minHeight() : 0, this.height());\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._inputElement[0]\n .attr(\"rows\", this.rows())\n .attr(\"cols\", this.cols())\n .attr(\"wrap\", this.wrap())\n .attr(\"spellcheck\", this.spellcheck())\n .style(\"height\", this.calcHeight() + \"px\")\n ;\n }\n\n}\nTextArea.prototype._class += \" form_TextArea\";\n\nexport interface TextArea {\n rows(): number;\n rows(_: number): this;\n rows_exists(): boolean;\n cols(): number;\n cols(_: number): this;\n cols_exists(): boolean;\n wrap(): string;\n wrap(_: string): this;\n wrap_exists(): boolean;\n minHeight(): number;\n minHeight(_: number): this;\n minHeight_exists(): boolean;\n spellcheck(): boolean;\n spellcheck(_: boolean): this;\n spellcheck_exists(): boolean;\n}\n\nTextArea.prototype.publish(\"rows\", null, \"number\", \"Rows\", null, { optional: true });\nTextArea.prototype.publish(\"cols\", null, \"number\", \"Columns\", null, { optional: true });\nTextArea.prototype.publish(\"wrap\", \"off\", \"set\", \"Wrap\", [\"off\", \"on\"]);\nTextArea.prototype.publish(\"minHeight\", null, \"number\", \"Minimum Height\", null, { optional: true });\nTextArea.prototype.publish(\"spellcheck\", null, \"boolean\", \"Input spell checking\", { optional: true });\n"],"mappings":";;;IAAa,IAAW,iBACX,IAAc,SACd,IAAgB,UCGhB,SAAb,cAA4B,EAAW;CACnC,gBAAgB,CAAC;CAEjB,cAAc;EAIV,AAHA,MAAM,GACN,EAAO,KAAK,IAAI,GAEhB,KAAK,OAA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file":"index.js","names":[],"sources":["../src/__package__.ts","../src/Button.ts","../src/CheckBox.ts","../src/ColorInput.ts","../src/Form.ts","../src/Input.ts","../src/FieldForm.ts","../src/InputRange.ts","../src/OnOff.ts","../src/Radio.ts","../src/Range.ts","../src/Select.ts","../src/Slider.ts","../src/TextArea.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/form\";\nexport const PKG_VERSION = \"3.7.0\";\nexport const BUILD_VERSION = \"3.35.0\";\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Button extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n this._inputElement[0] = element.append(\"button\")\n .attr(\"name\", this.name())\n .on(\"click\", function (w) {\n w.click(w);\n })\n .on(\"blur\", function (w) {\n w.blur(w);\n })\n .on(\"change\", function (w) {\n context.value([context._inputElement[0].property(\"value\")]);\n w.change(w, true);\n })\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._inputElement[0].text(this.value());\n }\n}\nButton.prototype._class += \" form_Button\";\nButton.prototype.implements(IInput.prototype);\n\nexport interface Button {\n name(): string;\n name(_: string): Button;\n label(): string;\n label(_: string): Button;\n value(): any;\n value(_: any): Button;\n validate(): string;\n validate(_: string): Button;\n}\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class CheckBox extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n\n const checkboxContainer = element.append(\"ul\");\n if (!this.selectOptions().length) {\n this.selectOptions().push(\"\"); // create an empty radio if we using .value and not selectOptions array\n }\n this.selectOptions().forEach(function (val, idx) {\n context._inputElement[idx] = checkboxContainer.append(\"li\").append(\"input\").attr(\"type\", \"checkbox\");\n context._inputElement[idx].node().insertAdjacentHTML(\"afterend\", \"<text>\" + val + \"</text>\");\n });\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n const vals = [];\n context._inputElement.forEach(function (d) {\n if (d.property(\"checked\")) {\n vals.push(d.property(\"value\"));\n }\n });\n context.value(vals);\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n\n this._inputElement.forEach(function (e, idx) {\n e.property(\"value\", context.selectOptions()[idx]);\n if (context.value().indexOf(context.selectOptions()[idx]) !== -1 && context.value() !== \"false\") {\n e.property(\"checked\", true);\n } else {\n e.property(\"checked\", false);\n }\n });\n }\n\n insertSelectOptions(optionsArr) {\n let optionHTML = \"\";\n if (optionsArr.length > 0) {\n optionsArr.forEach(function (opt) {\n const val = (opt instanceof Array ? opt[0] : opt);\n const text = (opt instanceof Array ? (opt[1] ? opt[1] : opt[0]) : opt);\n optionHTML += \"<option value='\" + val + \"'>\" + text + \"</option>\";\n });\n } else {\n optionHTML += \"<option>selectOptions not set</option>\";\n }\n this._inputElement[0].html(optionHTML);\n }\n}\nCheckBox.prototype._class += \" form_CheckBox\";\nCheckBox.prototype.implements(IInput.prototype);\n\nexport interface CheckBox {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n}\n\nCheckBox.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\nimport { rgb as d3Rgb } from \"d3-color\";\n\nimport \"../src/Input.css\";\n\nexport class ColorInput extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n this._inputElement[0] = element.append(\"input\").attr(\"type\", \"text\");\n this._inputElement[0].classed(\"color-text\", true);\n this._inputElement[1] = element.append(\"input\").attr(\"type\", \"color\");\n\n this._inputElement.forEach(function (e, idx) {\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n if (idx === 0) {\n context._inputElement[1].property(\"value\", d3Rgb(context._inputElement[0].property(\"value\")).toString());\n context.value(context._inputElement[0].property(\"value\"));\n } else {\n context._inputElement[0].property(\"value\", context._inputElement[1].property(\"value\"));\n context.value(d3Rgb(context._inputElement[1].property(\"value\")).toString());\n }\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n this._inputElement.forEach(function (e) {\n e.attr(\"name\", context.name());\n });\n\n this._inputElement[0].attr(\"type\", \"text\");\n this._inputElement[1].attr(\"type\", \"color\");\n this._inputElement[0].property(\"value\", this.value());\n this._inputElement[1].property(\"value\", d3Rgb(this.value()).toString());\n\n const bbox = this._inputElement[0].node().getBoundingClientRect();\n this._inputElement[1].style(\"height\", (bbox.height - 2) + \"px\");\n\n }\n}\nColorInput.prototype._class += \" form_ColorInput\";\nColorInput.prototype.implements(IInput.prototype);\n\nexport interface ColorInput {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n}\n","import { HTMLWidget, select as d3Select, SVGWidget, Widget, WidgetArray } from \"@hpcc-js/common\";\nimport { Button } from \"./Button.ts\";\n\nimport \"../src/Form.css\";\n\nexport class Form extends HTMLWidget {\n tbody;\n tfoot;\n btntd;\n _controls;\n _maxCols;\n\n constructor() {\n super();\n\n this._tag = \"form\";\n }\n\n data(): any;\n data(_: any): this;\n data(_?: any): any | this {\n if (!arguments.length) {\n const retVal = [];\n this.inputsForEach(function (input) {\n retVal.push(input.value());\n });\n return retVal;\n } else {\n this.inputsForEach(function (input, idx) {\n if (_ && _.length > idx) {\n input.value(_[idx]).render();\n }\n });\n }\n return this;\n }\n\n inputsForEach(callback, scope?) {\n let idx = 0;\n this.inputs().forEach(function (inp) {\n const inpArray = inp instanceof WidgetArray ? inp.content() : [inp];\n inpArray.forEach(function (inp2) {\n if (scope) {\n callback.call(scope, inp2, idx++);\n } else {\n callback(inp2, idx++);\n }\n });\n });\n }\n\n inputsMap(): { [name: string]: Widget } {\n const retVal: { [name: string]: Widget } = {};\n this.inputs().forEach(function (inp) {\n retVal[inp.name()] = inp;\n });\n return retVal;\n }\n\n calcMaxColumns() {\n let retVal = 0;\n this.inputs().forEach(function (inputWidget) {\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n if (inputWidgetArray.length > retVal) {\n retVal = inputWidgetArray.length;\n }\n });\n return retVal;\n }\n\n values(): any;\n values(_: any): this;\n values(_?: any): any | this {\n if (!arguments.length) {\n const dataArr = {};\n this.inputsForEach(function (inp) {\n const type = inp.type ? inp.type() : \"text\";\n const value = inp.value();\n if (value || !this.omitBlank()) {\n switch (type) {\n case \"checkbox\":\n dataArr[inp.name()] = inp.value_exists() ? !!inp.value() : undefined;\n break;\n case \"number\":\n const v = inp.value();\n dataArr[inp.name()] = v === \"\" ? undefined : +v;\n break;\n case \"text\":\n default:\n dataArr[inp.name()] = inp.value_exists() ? inp.value() : undefined;\n break;\n }\n }\n }, this);\n return dataArr;\n } else {\n this.inputsForEach(function (inp) {\n if (_[inp.name()]) {\n inp.value(_[inp.name()]);\n } else if (this.omitBlank()) {\n inp.value(\"\");\n }\n }, this);\n }\n return this;\n }\n\n submit() {\n let isValid = true;\n if (this.validate()) {\n isValid = this.checkValidation();\n }\n if (!this.allowEmptyRequest() && !this.inputs().some(function (w) {\n if (w._class.indexOf(\"WidgetArray\") !== -1) {\n return w.content().some(function (wa) {\n return wa.hasValue();\n });\n }\n return w.hasValue();\n })) {\n return;\n }\n this.click(isValid ? this.values() : null, null, isValid);\n }\n\n clear() {\n this.inputsForEach(function (inp) {\n switch (inp.classID()) {\n case \"form_Slider\":\n if (inp.allowRange()) {\n inp.value([inp.low(), inp.low()]).render();\n } else {\n inp.value(inp.low()).render();\n }\n break;\n case \"form_CheckBox\":\n inp.value(false).render();\n break;\n case \"form_Button\":\n /* skip */\n break;\n default:\n inp.value(undefined).render();\n break;\n }\n });\n }\n\n checkValidation() {\n let ret = true;\n const msgArr = [];\n this.inputsForEach(function (inp) {\n if (!inp.isValid()) {\n msgArr.push(\"'\" + inp.label() + \"'\" + \" value is invalid.\");\n }\n });\n if (msgArr.length > 0) {\n alert(msgArr.join(\"\\n\"));\n ret = false;\n }\n return ret;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element.on(\"submit\", function (event) {\n event.preventDefault();\n });\n\n this._placeholderElement.style(\"overflow\", \"auto\");\n const table = element\n .append(\"table\")\n ;\n this.tbody = table.append(\"tbody\");\n this.tfoot = table.append(\"tfoot\");\n this.btntd = this.tfoot.append(\"tr\").append(\"td\")\n .attr(\"colspan\", 2)\n ;\n\n const context = this;\n this._controls = [\n new Button()\n .classed({ default: true })\n .value(\"Submit\")\n .on(\"click\", function () {\n context.submit();\n }, true),\n new Button()\n .value(\"Clear\")\n .on(\"click\", function () {\n context.clear();\n }, true)\n ];\n const rightJust = context.btntd\n .append(\"div\")\n .style(\"float\", \"right\")\n ;\n this._controls.forEach(function (w) {\n const leftJust = rightJust\n .append(\"span\")\n .style(\"float\", \"left\")\n ;\n w.target(leftJust.node()).render();\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._maxCols = this.calcMaxColumns();\n\n const context = this;\n const rows = this.tbody.selectAll(\"tr\").data(this.inputs());\n rows.enter().append(\"tr\")\n .each(function (inputWidget, i) {\n const element2 = d3Select(this);\n\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n inputWidgetArray.forEach(function (inputWidget2, idx) {\n element2.append(\"td\")\n .attr(\"class\", \"prompt\")\n ;\n const input = element2.append(\"td\")\n .attr(\"class\", \"input\")\n ;\n if (idx === inputWidgetArray.length - 1 && inputWidgetArray.length < context._maxCols) {\n input.attr(\"colspan\", (context._maxCols - inputWidgetArray.length + 1) * 2);\n }\n inputWidget2.target(input.node()).render();\n if (inputWidget2 instanceof SVGWidget) {\n const bbox = inputWidget2.element().node().getBBox();\n input.style(\"height\", bbox.height + \"px\");\n inputWidget2.resize().render();\n }\n\n if (inputWidget2._inputElement instanceof Array) {\n inputWidget2._inputElement.forEach(function (e) {\n e.on(\"keyup.form\", function (w) {\n setTimeout(function () {\n\n context._controls[0].disable(!context.allowEmptyRequest() && !context.inputs().some(function (w2) {\n if (w2._class.indexOf(\"WidgetArray\") !== -1) {\n return w2.content().some(function (wa) {\n return wa.hasValue();\n });\n }\n return w2.hasValue();\n }));\n }, 100);\n });\n });\n }\n });\n })\n .merge(rows)\n .each(function (inputWidget, i) {\n const element2 = d3Select(this);\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n inputWidgetArray.forEach(function (inputWidget2, idx) {\n element2.select(\"td.prompt\")\n .text(inputWidget2.label() + \":\")\n ;\n });\n })\n ;\n rows.each(function (inputWidget, i) {\n if (i === 0 && inputWidget.setFocus) {\n inputWidget.setFocus();\n }\n });\n rows.exit()\n .each(function (inputWidget, i) {\n const inputWidgetArray = inputWidget instanceof WidgetArray ? inputWidget.content() : [inputWidget];\n inputWidgetArray.forEach(function (inputWidget2, idx) {\n inputWidget2.target(null);\n });\n })\n .remove()\n ;\n\n this.tfoot\n .style(\"display\", this.showSubmit() ? \"table-footer-group\" : \"none\")\n ;\n this.btntd\n .attr(\"colspan\", this._maxCols * 2)\n ;\n\n // Disable Submit unless there is data\n if (!this.allowEmptyRequest()) {\n setTimeout(function () {\n context._controls[0].disable(!context.allowEmptyRequest() && !context.inputs().some(function (w) {\n if (w._class.indexOf(\"WidgetArray\") !== -1) {\n return w.content().some(function (wa) {\n return wa.hasValue();\n });\n }\n return w.hasValue();\n }));\n }, 100);\n }\n\n }\n\n exit(domNode, element) {\n this.inputsForEach(input => input.target(null));\n super.exit(domNode, element);\n }\n\n click(row, col, sel) {\n }\n}\nForm.prototype._class += \" form_Form\";\n\nexport interface Form {\n validate(): boolean;\n validate(_: boolean): this;\n validate_exists(): boolean;\n inputs(): any[];\n inputs(_: any[]): this;\n inputs_exists(): boolean;\n inputs_reset(): void;\n showSubmit(): boolean;\n showSubmit(_: boolean): this;\n showSubmit_exists(): boolean;\n omitBlank(): boolean;\n omitBlank(_: boolean): this;\n omitBlank_exists(): boolean;\n allowEmptyRequest(): boolean;\n allowEmptyRequest(_: boolean): this;\n allowEmptyRequest_exists(): boolean;\n}\n\nForm.prototype.publish(\"validate\", true, \"boolean\", \"Enable/Disable input validation\");\nForm.prototype.publish(\"inputs\", [], \"widgetArray\", \"Array of input widgets\", null, { render: false });\nForm.prototype.publish(\"showSubmit\", true, \"boolean\", \"Show Submit/Cancel Controls\");\nForm.prototype.publish(\"omitBlank\", false, \"boolean\", \"Drop Blank Fields From Submit\");\nForm.prototype.publish(\"allowEmptyRequest\", false, \"boolean\", \"Allow Blank Form to be Submitted\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { Database, HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Input extends HTMLWidget {\n _inputElement = [];\n _labelElement = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n checked(_) {\n if (!arguments.length) return this._inputElement[0] ? this._inputElement[0].property(\"checked\") : false;\n if (this._inputElement[0]) {\n this._inputElement[0].property(\"checked\", _);\n }\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._labelElement[0] = element.append(\"label\")\n .attr(\"for\", this.id() + \"_input\")\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n ;\n\n const context = this;\n switch (this.type()) {\n case \"button\":\n this._inputElement[0] = element.append(\"button\")\n .attr(\"id\", this.id() + \"_input\")\n ;\n break;\n case \"textarea\":\n this._inputElement[0] = element.append(\"textarea\")\n .attr(\"id\", this.id() + \"_input\")\n ;\n break;\n default:\n this._inputElement[0] = element.append(\"input\")\n .attr(\"id\", this.id() + \"_input\")\n .attr(\"type\", this.type())\n ;\n break;\n }\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w: Input) {\n w.click(w);\n });\n e.on(\"blur\", function (w: Input) {\n w.blur(w);\n });\n e.on(\"change\", function (w: Input) {\n context.value([e.property(\"value\")]);\n w.change(w, true);\n });\n e.on(\"keyup\", function (w: Input) {\n context.value([e.property(\"value\")]);\n w.change(w, false);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._labelElement[0]\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n .text(this.inlineLabel())\n ;\n switch (this.type()) {\n case \"button\":\n this._inputElement[0].text(this.value());\n break;\n case \"textarea\":\n this._inputElement[0].property(\"value\", this.value());\n break;\n default:\n this._inputElement[0].attr(\"type\", this.type());\n this._inputElement[0].property(\"value\", this.value());\n break;\n }\n }\n\n // IInput Events ---\n blur(w: Input) {\n }\n keyup(w: Input) {\n }\n focus(w: Input) {\n }\n click(w: Input) {\n }\n dblclick(w: Input) {\n }\n change(w: Input, complete: boolean) {\n }\n}\nInput.prototype._class += \" form_Input\";\nInput.prototype.implements(IInput.prototype);\n\nexport interface Input {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n type(): Database.FieldType | \"button\" | \"checkbox\" | \"text\" | \"textarea\" | \"search\" | \"email\" | \"datetime\";\n type(_: Database.FieldType | \"button\" | \"checkbox\" | \"text\" | \"textarea\" | \"search\" | \"email\" | \"datetime\"): this;\n type_exists(): boolean;\n type_default(): string;\n inlineLabel(): string;\n inlineLabel(_: string): this;\n inlineLabel_exists(): boolean;\n}\n\nInput.prototype.publish(\"type\", \"text\", \"set\", \"Input type\", [\"string\", \"number\", \"boolean\", \"date\", \"time\", \"hidden\", \"nested\", \"button\", \"checkbox\", \"text\", \"textarea\", \"search\", \"email\", \"datetime\"]);\nInput.prototype.publish(\"inlineLabel\", null, \"string\", \"Input Label\", null, { optional: true });\n","import { Database } from \"@hpcc-js/common\";\nimport { Form } from \"./Form.ts\";\nimport { Input } from \"./Input.ts\";\n\nimport \"../src/Form.css\";\n\nexport class FieldForm extends Form {\n\n constructor() {\n super();\n\n this._tag = \"form\";\n }\n\n fields(): Database.Field[];\n fields(_: Database.Field[]): this;\n fields(_?: Database.Field[]): Database.Field[] | this {\n const retVal = super.fields.apply(this, arguments);\n if (arguments.length) {\n const inpMap = this.inputsMap();\n this.inputs(_.map(f => inpMap[f.id()] || new Input()\n .name(f.id())\n .label(f.label())\n .type(f.type())\n ));\n }\n return retVal;\n }\n\n data(): any;\n data(_: any): this;\n data(_?: any): any | this {\n if (!arguments.length) return super.data();\n super.data(_[0]);\n if (_[0]) {\n // Update input \"name\" with the __lparam ids ---\n const inputs = this.inputs();\n const __lparam = _[0][this.columns().length];\n let i = 0;\n for (const key in __lparam) {\n inputs[i].name(key);\n ++i;\n }\n }\n return this;\n }\n\n}\nFieldForm.prototype._class += \" form_FieldForm\";\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class InputRange extends HTMLWidget {\n _inputElement = [];\n _labelElement = [];\n _rangeData = [];\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._labelElement[0] = element.append(\"label\")\n .attr(\"for\", this.id() + \"_input\")\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n ;\n\n this._inputElement.push(element.append(\"input\")\n .attr(\"id\", this.id() + \"_input_min\")\n .attr(\"type\", this.type()));\n this._inputElement.push(element.append(\"input\")\n .attr(\"id\", this.id() + \"_input_max\")\n .attr(\"type\", this.type()));\n\n const context = this;\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n context._rangeData[idx] = e.property(\"value\");\n context.value(context._rangeData);\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._labelElement[0]\n .style(\"visibility\", this.inlineLabel_exists() ? \"visible\" : \"hidden\")\n .text(this.inlineLabel())\n ;\n\n this._rangeData = this.value();\n this._inputElement.forEach(function (e, idx) {\n e\n .attr(\"type\", this.type())\n .property(\"value\", this._rangeData.length > idx ? this._rangeData[idx] : \"\");\n }, this);\n }\n}\nInputRange.prototype._class += \" form_InputRange\";\nInputRange.prototype.implements(IInput.prototype);\n\nexport interface InputRange {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any[];\n value(_: any[]): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n type(): string;\n type(_: string): this;\n type_exists(): boolean;\n inlineLabel(): string;\n inlineLabel(_: string): this;\n inlineLabel_exists(): boolean;\n}\n\nInputRange.prototype.publish(\"type\", \"text\", \"set\", \"InputRange type\", [\"number\", \"date\", \"text\", \"time\", \"datetime\", \"hidden\"]);\nInputRange.prototype.publish(\"inlineLabel\", null, \"string\", \"InputRange Label\", null, { optional: true });\nInputRange.prototype.publish(\"value\", [\"\", \"\"], \"array\", \"Input Current Value\", null, { override: true });\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/OnOff.css\";\n\nexport class OnOff extends HTMLWidget {\n _inputElement = [];\n _input;\n\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element.classed(\"onoffswitch\", true);\n const context = this;\n this._input = element.append(\"input\")\n .attr(\"class\", \"onoffswitch-checkbox\")\n .attr(\"type\", \"checkbox\")\n .attr(\"id\", this.id() + \"_onOff\")\n .on(\"click\", function (w) {\n w.click(w);\n })\n .on(\"blur\", function (w) {\n w.blur(w);\n })\n .on(\"change\", function (w) {\n const vals = [];\n context._inputElement.forEach(function (d, idx) {\n if (d.property(\"checked\")) {\n vals.push(d.property(\"value\"));\n }\n });\n context.value(vals);\n w.change(w, true);\n })\n ;\n const label = element.append(\"label\")\n .attr(\"class\", \"onoffswitch-label\")\n .attr(\"for\", this.id() + \"_onOff\")\n ;\n const inner = label.append(\"div\")\n .attr(\"class\", \"onoffswitch-inner\")\n ;\n inner.append(\"div\")\n .attr(\"class\", \"onoffswitch-offText\")\n .style(\"padding-right\", (this.containerRadius() / 2) + \"px\")\n .text(this.offText())\n ;\n inner.append(\"div\")\n .attr(\"class\", \"onoffswitch-onText\")\n .style(\"padding-left\", (this.containerRadius() / 2) + \"px\")\n .style(\"width\", `calc(100% - ${(this.containerRadius() / 2)}px)`)\n .text(this.onText())\n ;\n label.append(\"div\")\n .attr(\"class\", \"onoffswitch-switch\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._input\n .attr(\"name\", this.name())\n ;\n element\n .style(\"margin-left\", this.marginLeft() + \"px\")\n .style(\"margin-bottom\", this.marginBottom() + \"px\")\n .style(\"width\", this.minWidth() + \"px\")\n ;\n\n const _switch_size = this.minHeight() - (this.gutter() * 4);\n\n element.select(\".onoffswitch-switch\")\n .style(\"height\", _switch_size + \"px\")\n .style(\"width\", _switch_size + \"px\")\n .style(\"top\", (this.gutter() * 2) + 1 + \"px\")\n .style(\"border-radius\", this.switchRadius() + \"px\")\n ;\n element.select(\".onoffswitch-inner\")\n .style(\"min-height\", this.minHeight() + \"px\")\n ;\n element.select(\".onoffswitch-label\")\n .style(\"border-radius\", this.containerRadius() + \"px\")\n ;\n element.select(\".onoffswitch-offText\")\n .style(\"color\", this.offFontColor())\n .style(\"background-color\", this.offColor())\n ;\n element.select(\".onoffswitch-onText\")\n .style(\"color\", this.onFontColor())\n .style(\"background-color\", this.onColor())\n ;\n }\n}\nOnOff.prototype._class += \" form_OnOff\";\nexport interface OnOff {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n marginLeft(): number;\n marginLeft(_: number): this;\n marginBottom(): number;\n marginBottom(_: number): this;\n minWidth(): number;\n minWidth(_: number): this;\n minHeight(): number;\n minHeight(_: number): this;\n gutter(): number;\n gutter(_: number): this;\n offText(): string;\n offText(_: string): this;\n onText(): string;\n onText(_: string): this;\n switchRadius(): number;\n switchRadius(_: number): this;\n containerRadius(): number;\n containerRadius(_: number): this;\n offColor(): string;\n offColor(_: string): this;\n onColor(): string;\n onColor(_: string): this;\n offFontColor(): string;\n offFontColor(_: string): this;\n onFontColor(): string;\n onFontColor(_: string): this;\n\n}\nOnOff.prototype.implements(IInput.prototype);\n\nOnOff.prototype.publish(\"marginLeft\", 0, \"number\", \"Margin left of OnOff\");\nOnOff.prototype.publish(\"marginBottom\", 0, \"number\", \"Margin bottom of OnOff\");\nOnOff.prototype.publish(\"minWidth\", 100, \"number\", \"Minimum width of OnOff (pixels)\");\nOnOff.prototype.publish(\"minHeight\", 20, \"number\", \"Minimum height of OnOff (pixels)\");\nOnOff.prototype.publish(\"gutter\", 1, \"number\", \"Space between switch and border of OnOff (pixels)\");\nOnOff.prototype.publish(\"onText\", \"Save\", \"string\", \"Text to display when 'ON'\");\nOnOff.prototype.publish(\"offText\", \"Properties\", \"string\", \"Text to display when 'OFF'\");\nOnOff.prototype.publish(\"switchRadius\", 10, \"number\", \"Border radius of switch (pixels)\");\nOnOff.prototype.publish(\"containerRadius\", 10, \"number\", \"Border radius of OnOff (pixels)\");\nOnOff.prototype.publish(\"onColor\", \"#2ecc71\", \"html-color\", \"Background color when 'ON'\");\nOnOff.prototype.publish(\"offColor\", \"#ecf0f1\", \"html-color\", \"Background color when 'OFF'\");\nOnOff.prototype.publish(\"onFontColor\", \"#2c3e50\", \"html-color\", \"Font color when 'ON'\");\nOnOff.prototype.publish(\"offFontColor\", \"#7f8c8d\", \"html-color\", \"Font color when 'OFF'\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Radio extends HTMLWidget {\n _inputElement = [];\n constructor() {\n super();\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n const radioContainer = element.append(\"ul\");\n if (!this.selectOptions().length) {\n this.selectOptions().push(\"\"); // create an empty radio if we using .value and not selectOptions array\n }\n this.selectOptions().forEach(function (val, idx) {\n context._inputElement[idx] = radioContainer.append(\"li\").append(\"input\").attr(\"type\", \"radio\");\n context._inputElement[idx].node().insertAdjacentHTML(\"afterend\", \"<text>\" + val + \"</text>\");\n });\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n context.value([e.property(\"value\")]);\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n const context = this;\n\n this._inputElement.forEach(function (e, idx) {\n e.property(\"value\", context.selectOptions()[idx]);\n if (context.value().indexOf(context.selectOptions()[idx]) !== -1 && context.value() !== \"false\") {\n e.property(\"checked\", true);\n } else {\n e.property(\"checked\", false);\n }\n });\n }\n}\nRadio.prototype._class += \" form_Radio\";\nRadio.prototype.implements(IInput.prototype);\n\nexport interface Radio {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n}\n\nRadio.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\nimport { rgb as d3Rgb } from \"d3-color\";\n\nimport \"../src/Input.css\";\n\nexport class Range extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n this._inputElement[0] = element.append(\"input\").attr(\"type\", \"range\");\n this._inputElement[1] = element.append(\"input\").attr(\"type\", \"number\");\n\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"name\", context.name());\n e.on(\"click\", function (w) {\n w.click(w);\n });\n e.on(\"blur\", function (w) {\n w.blur(w);\n });\n e.on(\"change\", function (w) {\n if (idx === 0) {\n context._inputElement[1].property(\"value\", d3Rgb(context._inputElement[0].property(\"value\")).toString());\n context.value(context._inputElement[0].property(\"value\"));\n } else {\n context._inputElement[0].property(\"value\", context._inputElement[1].property(\"value\"));\n context.value(d3Rgb(context._inputElement[1].property(\"value\")).toString());\n }\n w.change(w, true);\n });\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._inputElement[0].attr(\"type\", \"range\");\n this._inputElement[0].property(\"value\", this.value());\n this._inputElement[0].attr(\"min\", this.low());\n this._inputElement[0].attr(\"max\", this.high());\n this._inputElement[0].attr(\"step\", this.step());\n this._inputElement[1].attr(\"type\", \"number\");\n this._inputElement[1].property(\"value\", this.value());\n this._inputElement[1].attr(\"min\", this.low());\n this._inputElement[1].attr(\"max\", this.high());\n this._inputElement[1].attr(\"step\", this.step());\n }\n\n insertSelectOptions(optionsArr) {\n let optionHTML = \"\";\n if (optionsArr.length > 0) {\n optionsArr.forEach(function (opt) {\n const val = (opt instanceof Array ? opt[0] : opt);\n const text = (opt instanceof Array ? (opt[1] ? opt[1] : opt[0]) : opt);\n optionHTML += \"<option value='\" + val + \"'>\" + text + \"</option>\";\n });\n } else {\n optionHTML += \"<option>selectOptions not set</option>\";\n }\n this._inputElement[0].html(optionHTML);\n }\n}\nRange.prototype._class += \" form_Range\";\nRange.prototype.implements(IInput.prototype);\n\nexport interface Range {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n type(): string;\n type(_: string): this;\n type_exists(): boolean;\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n low(): number;\n low(_: number): this;\n low_exists(): boolean;\n high(): number;\n high(_: number): this;\n high_exists(): boolean;\n step(): number;\n step(_: number): this;\n step_exists(): boolean;\n}\n\nRange.prototype.publish(\"type\", \"text\", \"set\", \"Input type\", [\"html-color\", \"number\", \"checkbox\", \"button\", \"select\", \"textarea\", \"date\", \"text\", \"range\", \"search\", \"email\", \"time\", \"datetime\"]);\nRange.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\nRange.prototype.publish(\"low\", null, \"number\", \"Minimum value for Range input\");\nRange.prototype.publish(\"high\", null, \"number\", \"Maximum value for Range input\");\nRange.prototype.publish(\"step\", null, \"number\", \"Step value for Range input\");\n","import { IInput } from \"@hpcc-js/api\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\n\nimport \"../src/Input.css\";\n\nexport class Select extends HTMLWidget {\n _inputElement = [];\n\n constructor() {\n super();\n\n IInput.call(this);\n\n this._tag = \"div\";\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n\n this._inputElement[0] = element.append(\"select\")\n .attr(\"name\", this.name())\n .on(\"click\", function (w) {\n w.click(w);\n })\n .on(\"blur\", function (w) {\n w.blur(w);\n })\n .on(\"change\", function (w) {\n context.value([context._inputElement[0].property(\"value\")]);\n w.change(w, true);\n })\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this.insertSelectOptions(this.selectOptions());\n this._inputElement[0]\n .property(\"value\", this.value())\n .style(\"max-width\", this.maxWidth_exists() ? this.maxWidth() + \"px\" : null)\n ;\n }\n\n insertSelectOptions(optionsArr) {\n let optionHTML = \"\";\n if (optionsArr.length > 0) {\n optionsArr.forEach(function (opt) {\n const val = (opt instanceof Array ? opt[0] : opt);\n const text = (opt instanceof Array ? (opt[1] ? opt[1] : opt[0]) : opt);\n optionHTML += \"<option value='\" + val + \"'>\" + text + \"</option>\";\n });\n } else {\n optionHTML += \"<option>selectOptions not set</option>\";\n }\n this._inputElement[0].html(optionHTML);\n }\n}\nSelect.prototype._class += \" form_Select\";\nSelect.prototype.implements(IInput.prototype);\n\nexport interface Select {\n // IInput ---\n name(): string;\n name(_: string): this;\n name_exists(): boolean;\n label(): string;\n label(_: string): this;\n label_exists(): boolean;\n value(): any;\n value(_: any): this;\n value_exists(): boolean;\n validate(): string;\n validate(_: string): this;\n validate_exists(): boolean;\n\n // Properties ---\n selectOptions(): any[];\n selectOptions(_: any[]): this;\n selectOptions_exists(): boolean;\n maxWidth(): number;\n maxWidth(_: number): this;\n maxWidth_exists(): boolean;\n}\n\nSelect.prototype.publish(\"selectOptions\", [], \"array\", \"Array of options used to fill a dropdown list\");\nSelect.prototype.publish(\"maxWidth\", 120, \"number\", \"Width\", null, { optional: true });\n","import { IInput } from \"@hpcc-js/api\";\nimport { select as d3Select, SVGWidget } from \"@hpcc-js/common\";\nimport { drag as d3Drag } from \"d3-drag\";\nimport { format as d3Format } from \"d3-format\";\nimport { scaleLinear as d3ScaleLinear } from \"d3-scale\";\nimport { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\n\nimport \"../src/Slider.css\";\n\nexport class Slider extends SVGWidget {\n xScale;\n\n moveMode: \"both\" | \"left\" | \"right\";\n moveStartPos: number;\n\n prevValue;\n\n slider;\n\n handleLeft;\n handleLeftPos: number = 0;\n handleLeftStartPos: number;\n\n handleRight;\n handleRightPos: number = 0;\n handleRightStartPos: number;\n\n constructor() {\n super();\n IInput.call(this);\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this.resize({ width: this.width(), height: 50 });\n\n this.xScale = d3ScaleLinear()\n .clamp(true);\n\n this.slider = element.append(\"g\")\n .attr(\"class\", \"slider\")\n ;\n if (this.low() === null && this.high() === null) {\n if (this.lowDatetime() !== null && this.highDatetime() !== null) {\n const time_parser = d3TimeParse(this.timePattern() ? this.timePattern() : \"%Q\");\n this.low(time_parser(this.lowDatetime()).getTime());\n this.high(time_parser(this.highDatetime()).getTime());\n }\n }\n this.slider.append(\"line\")\n .attr(\"class\", \"track\")\n .select(function () { return this.parentNode.appendChild(this.cloneNode(true)); })\n .attr(\"class\", \"track-inset\")\n .select(function () { return this.parentNode.appendChild(this.cloneNode(true)); })\n .attr(\"class\", \"track-overlay\")\n .call(d3Drag()\n .on(\"start\", (event) => {\n this.moveStartPos = event.x;\n this.handleLeftStartPos = this.handleLeftPos;\n this.handleRightStartPos = this.handleRightPos;\n if (this.allowRange() && this.handleLeftPos <= event.x && event.x <= this.handleRightPos) {\n this.moveMode = \"both\";\n } else if (Math.abs(event.x - this.handleLeftPos) < Math.abs(event.x - this.handleRightPos)) {\n this.moveMode = \"left\";\n } else {\n this.moveMode = \"right\";\n }\n this.moveHandleTo(event.x);\n })\n .on(\"drag\", (event) => {\n this.moveHandleTo(event.x);\n })\n .on(\"end\", (event) => {\n this.moveHandleTo(event.x);\n this.data([[this.xScale.invert(this.handleLeftPos), this.xScale.invert(this.handleRightPos)]]);\n this.checkChangedValue();\n }));\n\n this.slider.insert(\"g\", \".track-overlay\")\n .attr(\"class\", \"ticks\")\n .attr(\"transform\", `translate(0, ${this.fontSize() + (this.tickHeight() / 2)})`)\n ;\n\n this.handleRight = this.slider.insert(\"path\", \".track-overlay\")\n .attr(\"class\", \"handle\")\n ;\n\n this.handleLeft = this.slider.insert(\"path\", \".track-overlay\")\n .attr(\"class\", \"handle\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n this.xScale\n .domain([this.low(), this.high()])\n .range([0, this.width() - this.padding() * 2])\n ;\n\n this.slider\n .attr(\"transform\", \"translate(\" + (-this.width() / 2 + this.padding()) + \",\" + 0 + \")\");\n\n this.slider.selectAll(\"line.track,line.track-inset,line.track-overlay\")\n .attr(\"x1\", this.xScale.range()[0])\n .attr(\"x2\", this.xScale.range()[1])\n ;\n\n const x_distance = (this.width() - (this.padding() * 2)) / (this.tickCount() - 1);\n\n const tick_text_arr = [];\n if (this.tickDateFormat() !== null && this.timePattern() !== null) {\n const Q_parser = d3TimeParse(\"%Q\");\n const time_formatter = d3TimeFormat(this.tickDateFormat());\n const time_segment = (this.high() - this.low()) / (this.tickCount() - 1);\n for (let i = 0; i < this.tickCount(); i++) {\n const date_to_parse = \"\" + (this.low() + (time_segment * i));\n const parsed_date = Q_parser(date_to_parse);\n tick_text_arr.push(time_formatter(parsed_date));\n }\n } else {\n const value_formatter = d3Format(this.tickValueFormat());\n const value_segment = (this.high() - this.low()) / (this.tickCount() - 1);\n for (let i = 0; i < this.tickCount(); i++) {\n const tick_value = this.low() + (value_segment * i);\n tick_text_arr.push(value_formatter(tick_value));\n }\n }\n const tickText = this.slider.selectAll(\"g.tick\").data(tick_text_arr);\n const tickTextEnter = tickText.enter().append(\"g\").attr(\"class\", \"tick\");\n\n tickTextEnter.append(\"text\").attr(\"class\", \"tick-text\");\n tickTextEnter.append(\"line\").attr(\"class\", \"tick-line\");\n tickTextEnter\n .merge(tickText)\n .each(function (d, i) {\n const x = x_distance * i;\n\n d3Select(this).select(\"text.tick-text\")\n .style(\"font-size\", context.fontSize())\n .attr(\"x\", function () {\n if (i === 0) return x - 2;\n return i === context.tickCount() - 1 ? x + 2 : x;\n })\n .attr(\"y\", context.tickHeight() + (context.tickOffset() / 2) + context.fontSize())\n .attr(\"text-basline\", \"text-before-edge\")\n .attr(\"text-anchor\", function () {\n if (i === 0) return \"start\";\n return i === context.tickCount() - 1 ? \"end\" : \"middle\";\n })\n .text(() => d)\n ;\n\n d3Select(this).select(\"line.tick-line\")\n .attr(\"x1\", x)\n .attr(\"x2\", x)\n .attr(\"y1\", context.tickOffset() - 1)\n .attr(\"y2\", context.tickOffset() + context.tickHeight())\n .style(\"stroke\", \"#000\")\n .style(\"stroke-width\", 1)\n ;\n });\n this.slider.node().appendChild(this.handleRight.node());\n this.slider.node().appendChild(this.handleLeft.node());\n this.handleLeftPos = this.lowPos();\n this.handleRightPos = this.highPos();\n this.updateHandles();\n this.checkChangedValue();\n }\n\n checkChangedValue() {\n if (this.prevValue !== this.value() && typeof this.prevValue !== \"undefined\") {\n this.change(this);\n }\n this.prevValue = this.value();\n }\n\n updateHandles() {\n this.handleLeft\n .attr(\"transform\", `translate(${this.handleLeftPos}, -28)`)\n .attr(\"d\", (d) => this.handlePath(\"l\"))\n ;\n this.handleRight\n .attr(\"transform\", `translate(${this.handleRightPos}, -28)`)\n .attr(\"d\", (d) => this.handlePath(\"r\"))\n ;\n }\n\n lowPos(): number {\n let data = [[this.low(), this.high()]];\n if (this.data().length > 0 && typeof this.data()[0][0] === \"number\" && typeof this.data()[0][1] === \"number\") {\n data = this.data();\n }\n return this.xScale(data[0][0]);\n }\n\n highPos(): number {\n let data = [[this.low(), this.high()]];\n if (this.data().length > 0 && typeof this.data()[0][0] === \"number\" && typeof this.data()[0][1] === \"number\") {\n data = this.data();\n }\n return this.xScale(data[0][this.allowRange() ? 1 : 0]);\n }\n\n moveHandleTo(pos) {\n if (this.allowRange()) {\n switch (this.moveMode) {\n case \"both\":\n this.handleLeftPos = this.handleLeftStartPos + pos - this.moveStartPos;\n this.handleRightPos = this.handleRightStartPos + pos - this.moveStartPos;\n break;\n case \"left\":\n this.handleLeftPos = pos;\n if (this.handleLeftPos > this.handleRightPos) {\n this.handleRightPos = this.handleLeftPos;\n }\n break;\n case \"right\":\n this.handleRightPos = pos;\n if (this.handleRightPos < this.handleLeftPos) {\n this.handleLeftPos = this.handleRightPos;\n }\n break;\n }\n } else {\n this.handleLeftPos = this.handleRightPos = pos;\n }\n\n this.handleLeftPos = this.constrain(this.handleLeftPos);\n this.handleRightPos = this.constrain(this.handleRightPos);\n this.value(this.allowRange() ? [this.xScale.invert(this.handleLeftPos), this.xScale.invert(this.handleRightPos)] : this.xScale.invert(this.handleLeftPos));\n this.updateHandles();\n }\n\n constrain(pos: number): number {\n const range = this.xScale.range();\n if (pos < range[0]) pos = range[0];\n if (pos > range[1]) pos = range[1];\n return this.nearestStep(pos);\n }\n\n nearestStep(pos) {\n const value = this.xScale.invert(pos);\n return this.xScale(this.low() + Math.round((value - this.low()) / this.step()) * this.step());\n }\n\n handlePath = function (d) {\n const e = +(d === \"r\");\n const x = e ? 1 : -1;\n const xOffset = this.allowRange() ? 0.5 : 0.0;\n const y = 18;\n let retVal = \"M\" + (xOffset * x) + \",\" + y +\n \"A6,6 0 0 \" + e + \" \" + (6.5 * x) + \",\" + (y + 6) +\n \"V\" + (2 * y - 6) +\n \"A6,6 0 0 \" + e + \" \" + (xOffset * x) + \",\" + (2 * y)\n ;\n if (this.allowRange()) {\n retVal += \"Z\" +\n \"M\" + (2.5 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8) +\n \"M\" + (4.5 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8)\n ;\n } else {\n retVal += \"M\" + (1 * x) + \",\" + (y + 8) +\n \"V\" + (2 * y - 8)\n ;\n }\n return retVal;\n };\n\n}\nSlider.prototype._class += \" form_Slider\";\nSlider.prototype.implements(IInput.prototype);\n\nexport interface Slider {\n // IInput ---\n name(): string;\n name(_: string): this;\n change(_: Slider): void;\n\n // Properties ---\n padding(): number;\n padding(_: number): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n allowRange(): boolean;\n allowRange(_: boolean): this;\n low(): number;\n low(_: number): this;\n high(): number;\n high(_: number): this;\n step(): number;\n step(_: number): this;\n lowDatetime(): string;\n lowDatetime(_: string): this;\n highDatetime(): string;\n highDatetime(_: string): this;\n stepDatetime(): number;\n stepDatetime(_: number): this;\n selectionLabel(): string;\n selectionLabel(_: string): this;\n label(): string;\n label(_: string): this;\n value(): any;\n value(_: any): this;\n validate(): string;\n validate(_: string): this;\n tickCount(): number;\n tickCount(_: number): this;\n tickOffset(): number;\n tickOffset(_: number): this;\n tickHeight(): number;\n tickHeight(_: number): this;\n tickDateFormat(): string;\n tickDateFormat(_: string): this;\n tickValueFormat(): string;\n tickValueFormat(_: string): this;\n timePattern(): string;\n timePattern(_: string): this;\n\n padding_exists(): boolean;\n fontSize_exists(): boolean;\n fontFamily_exists(): boolean;\n fontColor_exists(): boolean;\n allowRange_exists(): boolean;\n low_exists(): boolean;\n step_exists(): boolean;\n high_exists(): boolean;\n selectionLabel_exists(): boolean;\n name_exists(): boolean;\n label_exists(): boolean;\n value_exists(): boolean;\n validate_exists(): boolean;\n}\n\nSlider.prototype.publish(\"padding\", 16, \"number\", \"Outer Padding\", null, { tags: [\"Basic\"] });\nSlider.prototype.publish(\"fontSize\", 12, \"number\", \"Font Size\", null, { tags: [\"Basic\"] });\nSlider.prototype.publish(\"fontFamily\", null, \"string\", \"Font Name\", null, { tags: [\"Basic\"] });\nSlider.prototype.publish(\"fontColor\", null, \"html-color\", \"Font Color\", null, { tags: [\"Basic\"] });\n\nSlider.prototype.publish(\"allowRange\", false, \"boolean\", \"Allow Range Selection\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"low\", null, \"number\", \"Low\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"high\", null, \"number\", \"High\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"step\", 10, \"number\", \"Step\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"lowDatetime\", null, \"string\", \"Low\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"highDatetime\", null, \"string\", \"High\", null, { tags: [\"Intermediate\"] });\nSlider.prototype.publish(\"selectionLabel\", \"\", \"string\", \"Selection Label\", null, { tags: [\"Intermediate\"] });\n\nSlider.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\");\n\nSlider.prototype.publish(\"tickCount\", 10, \"number\");\nSlider.prototype.publish(\"tickOffset\", 5, \"number\");\nSlider.prototype.publish(\"tickHeight\", 8, \"number\");\nSlider.prototype.publish(\"tickDateFormat\", null, \"string\");\nSlider.prototype.publish(\"tickValueFormat\", \",.0f\", \"string\");\n\nconst name = Slider.prototype.name;\nSlider.prototype.name = function (_?: any): any {\n const retVal = name.apply(this, arguments);\n if (arguments.length) {\n const val = _ instanceof Array ? _ : [_];\n SVGWidget.prototype.columns.call(this, val);\n }\n return retVal;\n};\n\nconst value = Slider.prototype.value;\nSlider.prototype.value = function (_?: any): any {\n const retVal = value.apply(this, arguments);\n if (!arguments.length) {\n if (!this.allowRange()) {\n return SVGWidget.prototype.data.call(this)[0][0];\n }\n return SVGWidget.prototype.data.call(this)[0];\n } else {\n SVGWidget.prototype.data.call(this, [this.allowRange() ? _ : [_, _]]);\n }\n return retVal;\n};\n","import { Input } from \"./Input.ts\";\n\nexport class TextArea extends Input {\n constructor() {\n super();\n\n this._tag = \"div\";\n this.type(\"textarea\");\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n\n calcHeight() {\n return Math.max(this.minHeight_exists() ? this.minHeight() : 0, this.height());\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._inputElement[0]\n .attr(\"rows\", this.rows())\n .attr(\"cols\", this.cols())\n .attr(\"wrap\", this.wrap())\n .attr(\"spellcheck\", this.spellcheck())\n .style(\"height\", this.calcHeight() + \"px\")\n ;\n }\n\n}\nTextArea.prototype._class += \" form_TextArea\";\n\nexport interface TextArea {\n rows(): number;\n rows(_: number): this;\n rows_exists(): boolean;\n cols(): number;\n cols(_: number): this;\n cols_exists(): boolean;\n wrap(): string;\n wrap(_: string): this;\n wrap_exists(): boolean;\n minHeight(): number;\n minHeight(_: number): this;\n minHeight_exists(): boolean;\n spellcheck(): boolean;\n spellcheck(_: boolean): this;\n spellcheck_exists(): boolean;\n}\n\nTextArea.prototype.publish(\"rows\", null, \"number\", \"Rows\", null, { optional: true });\nTextArea.prototype.publish(\"cols\", null, \"number\", \"Columns\", null, { optional: true });\nTextArea.prototype.publish(\"wrap\", \"off\", \"set\", \"Wrap\", [\"off\", \"on\"]);\nTextArea.prototype.publish(\"minHeight\", null, \"number\", \"Minimum Height\", null, { optional: true });\nTextArea.prototype.publish(\"spellcheck\", null, \"boolean\", \"Input spell checking\", { optional: true });\n"],"mappings":";;;IAAa,IAAW,iBACX,IAAc,SACd,IAAgB,UCGhB,SAAb,cAA4B,EAAW;CACnC,gBAAgB,CAAC;CAEjB,cAAc;EAIV,AAHA,MAAM,GACN,EAAO,KAAK,IAAI,GAEhB,KAAK,OAAO;CAChB;CAEA,MAAM,GAAS,GAAS;EACpB,MAAM,MAAM,GAAS,CAAO;EAC5B,IAAM,IAAU;EAChB,KAAK,cAAc,KAAK,EAAQ,OAAO,QAAQ,CAAC,CAC3C,KAAK,QAAQ,KAAK,KAAK,CAAC,CAAC,CACzB,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