@operato/chart 2.0.0-beta.35 → 7.0.0-rc.10

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/src/chartjs/config-converter.js +6 -1
  3. package/dist/src/chartjs/config-converter.js.map +1 -1
  4. package/dist/src/chartjs/ox-chart-js.js +3 -1
  5. package/dist/src/chartjs/ox-chart-js.js.map +1 -1
  6. package/dist/src/editors/configurer.d.ts +2 -0
  7. package/dist/src/editors/configurer.js +7 -1
  8. package/dist/src/editors/configurer.js.map +1 -1
  9. package/dist/src/editors/input-chart-abstract.js +17 -0
  10. package/dist/src/editors/input-chart-abstract.js.map +1 -1
  11. package/dist/src/editors/input-chart-multi-series-abstract.js +11 -11
  12. package/dist/src/editors/input-chart-multi-series-abstract.js.map +1 -1
  13. package/dist/src/editors/ox-input-chart-timeseries.d.ts +7 -0
  14. package/dist/src/editors/ox-input-chart-timeseries.js +234 -0
  15. package/dist/src/editors/ox-input-chart-timeseries.js.map +1 -0
  16. package/dist/src/editors/ox-property-editor-chart.js +18 -29
  17. package/dist/src/editors/ox-property-editor-chart.js.map +1 -1
  18. package/dist/src/scichart/ox-scichart.d.ts +1 -1
  19. package/dist/src/scichart/ox-scichart.js +7 -15
  20. package/dist/src/scichart/ox-scichart.js.map +1 -1
  21. package/dist/src/utils/text-formatter.d.ts +1 -0
  22. package/dist/src/utils/text-formatter.js +78 -0
  23. package/dist/src/utils/text-formatter.js.map +1 -0
  24. package/dist/stories/ox-input-chart-bar.stories.js +9 -5
  25. package/dist/stories/ox-input-chart-bar.stories.js.map +1 -1
  26. package/dist/stories/ox-input-chart-timeseries.stories.d.ts +25 -0
  27. package/dist/stories/ox-input-chart-timeseries.stories.js +182 -0
  28. package/dist/stories/ox-input-chart-timeseries.stories.js.map +1 -0
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +5 -5
  31. package/src/chartjs/config-converter.ts +7 -1
  32. package/src/chartjs/ox-chart-js.ts +3 -1
  33. package/src/editors/configurer.ts +11 -3
  34. package/src/editors/input-chart-abstract.ts +17 -0
  35. package/src/editors/input-chart-multi-series-abstract.ts +11 -11
  36. package/src/editors/ox-input-chart-timeseries.ts +236 -0
  37. package/src/editors/ox-property-editor-chart.ts +20 -30
  38. package/src/scichart/ox-scichart.ts +4 -12
  39. package/src/types.d.ts +1 -0
  40. package/src/utils/text-formatter.ts +106 -0
  41. package/stories/ox-input-chart-bar.stories.ts +9 -5
  42. package/stories/ox-input-chart-timeseries.stories.ts +196 -0
  43. package/themes/grist-theme.css +1 -3
  44. package/translations/en.json +1 -0
  45. package/translations/ja.json +1 -0
  46. package/translations/ko.json +1 -0
  47. package/translations/ms.json +39 -2
  48. package/translations/zh.json +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"input-chart-multi-series-abstract.js","sourceRoot":"","sources":["../../../src/editors/input-chart-multi-series-abstract.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAIzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,MAAM,OAAO,6BAA8B,SAAQ,kBAAkB;aAC5D,WAAM,GAAG,CAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAM9C,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,YAAY;QACV,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;YAChD,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QACtB,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,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,CAAC,YAAY,CAAC,WAAW,CAAA;QAC7D,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,GAAG,MAAM,CAAA;IACjD,CAAC;;AA9Ze;IAAf,KAAK,CAAC,OAAO,CAAC;2DAAmB;AACH;IAA9B,KAAK,CAAC,sBAAsB,CAAC;uEAA0B;AACxB;IAA/B,KAAK,CAAC,uBAAuB,CAAC;wEAA2B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { query } from 'lit/decorators.js'\n\nimport { MdIcon } from '@material/web/icon/icon.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nexport class InputChartMultiSeriesAbstract extends InputChartAbstract {\n static styles = [...InputChartAbstract.styles]\n\n @query('#tabs') tabs!: HTMLElement\n @query('#tab-nav-left-button') tabNavLeftButton!: MdIcon\n @query('#tab-nav-right-button') tabNavRightButton!: MdIcon\n\n get tabContainer(): HTMLElement | null | undefined {\n return this.tabs\n }\n\n firstUpdated() {\n this.tabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e)\n })\n }\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n\n ${this.multiSeriesTabTemplate()}\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"label-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"label-data-key\" type=\"text\" value-key=\"labelDataKey\" .value=${configurer.labelDataKey || ''} />\n\n <label for=\"axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input id=\"axis-title\" type=\"text\" value-key=\"xAxes0.axisTitle\" .value=${configurer.xAxes0.axisTitle || ''} />\n\n <label for=\"x-axes0-thickness\"> <ox-i18n msgid=\"label.thickness\">Thickness</ox-i18n> </label>\n <input\n id=\"x-axes0-thickness\"\n type=\"number\"\n value-key=\"xAxes0.barPercentage\"\n .value=${configurer.xAxes0.barPercentage || 0}\n />\n\n <input\n for=\"grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label id=\"grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n for=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label id=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n .value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"y-axes0-ticks-automin\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"y-axes0-ticks-automin\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-automax\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"y-axes0-ticks-automax\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n .value=${configurer.yAxes0.ticks?.min}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n .value=${configurer.yAxes0.ticks?.max}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n .value=${configurer.yAxes0.ticks?.stepSize}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n .value=${configurer.yAxes1.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1.ticks?.autoMin\n ? html`\n <label for=\"y-axes1.ticks.min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1.ticks.min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n .value=${configurer.yAxes1.ticks?.min}\n />\n `\n : html``}\n ${!configurer.yAxes1.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n .value=${configurer.yAxes1.ticks?.max}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n .value=${configurer.yAxes1.ticks?.stepSize}\n />\n\n <input\n id=\"y2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options.y2ndGridLine}\n />\n <label for=\"y2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1.ticks.display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1.ticks?.display}\n />\n <label for=\"y-axes1.ticks.display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n multiSeriesTabTemplate() {\n const configurer = this.configurer\n\n return html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"tab-header\">\n <md-icon\n id=\"tab-nav-left-button\"\n @tap=${(e: Event) => {\n this._onTabScrollNavLeft(e)\n }}\n disabled\n >chevron_left</md-icon\n >\n <div\n id=\"tabs\"\n @change=${(e: Event) => {\n configurer.currentSeriesIndex = (e.target as any).activeTabIndex\n }}\n active-tab-index=${configurer.currentSeriesIndex}\n fit-container\n >\n ${configurer.datasets.map(\n (dataset: any, index: number) => html`\n <div\n data-series=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index == configurer.currentSeriesIndex}\n @click=${(e: Event) => {\n const target = e.target as HTMLDivElement\n this.configurer.setCurrentSeriesIndex(Number(target.getAttribute('data-tab-index')))\n this.value = { ...this.configurer.value }\n }}\n >\n ${index + 1}\n ${!configurer.datasets || (configurer.datasets.length != 1 && configurer.currentSeriesIndex == index)\n ? html` <md-icon @tap=\"${(e: Event) => this.onTapRemoveCurrentTab(e)}\"> close </md-icon> `\n : html``}\n </div>\n `\n )}\n </div>\n <md-icon\n id=\"tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e)\n }}\n disabled\n >chevron_right</md-icon\n >\n </div>\n <div id=\"add-series-button-container\">\n <md-icon id=\"add-series-button\" @tap=${(e: Event) => this.onTapAddTab(e)}>add</md-icon>\n </div>\n\n <div class=\"tab-content\">\n <label for=\"data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"data-key\" type=\"text\" value-key=\"dataKey\" .value=${configurer.dataKey || ''} />\n\n ${this.chartType == 'line' || this.chartType == 'bar'\n ? html`\n <label for=\"series-type\"> <ox-i18n msgid=\"label.series-type\">type</ox-i18n> </label>\n <select\n id=\"series-type\"\n class=\"select-content\"\n value-key=\"series.type\"\n .value=${configurer.series.type || ''}\n >\n <option value=\"bar\" selected>bar</option>\n <option value=\"line\">line</option>\n </select>\n `\n : html``}\n\n <label for=\"series-label\"> <ox-i18n msgid=\"label.label\">label</ox-i18n> </label>\n <input id=\"series-label\" type=\"text\" value-key=\"series.label\" .value=${configurer.series.label} />\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-line-tension\"> <ox-i18n msgid=\"label.line-tension\">line tension</ox-i18n> </label>\n <select\n id=\"series-line-tension\"\n class=\"select-content\"\n value-key=\"series.lineTension\"\n .value=${configurer.series.lineTension || 0}\n >\n <option value=\"0.4\">smooth</option>\n <option value=\"0\">angled</option>\n </select>\n `\n : html``}\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-border-width\"> <ox-i18n msgid=\"label.border-width\">border width</ox-i18n> </label>\n <input\n id=\"series-border-width\"\n type=\"number\"\n value-key=\"series.borderWidth\"\n .value=${configurer.series.borderWidth || 0}\n />\n `\n : html``}\n\n <label for=\"series-color\"> <ox-i18n msgid=\"label.color\">color</ox-i18n> </label>\n <ox-input-color id=\"series-color\" value-key=\"color\" .value=${configurer.color}></ox-input-color>\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-point-style\"> <ox-i18n msgid=\"label.point-shape\">point shape</ox-i18n> </label>\n <select\n id=\"series-point-style\"\n class=\"select-content\"\n value-key=\"series.pointStyle\"\n .value=${configurer.series.pointStyle || ''}\n >\n <option value=\"circle\">⚬</option>\n <option value=\"triangle\">▵</option>\n <option value=\"rect\">□</option>\n <option value=\"rectRot\">◇</option>\n <option value=\"cross\">+</option>\n <option value=\"crossRot\">⨉</option>\n <option value=\"star\">✱</option>\n <option value=\"line\">―</option>\n <option value=\"dash\">┄</option>\n </select>\n\n <label for=\"series-point-radius\"> <ox-i18n msgid=\"label.point-size\">point size</ox-i18n> </label>\n <input\n id=\"series-point-radius\"\n type=\"number\"\n value-key=\"series.pointRadius\"\n .value=${configurer.series.pointRadius || 0}\n />\n `\n : html``} <label for=\"series-stack\"> <ox-i18n msgid=\"label.stack-group\">Stack group</ox-i18n> </label>\n <input id=\"series-stack\" type=\"text\" value-key=\"series.stack\" .value=${configurer.series.stack || ''} />\n ${configurer.series.type == 'line'\n ? html`\n <input id=\"seires-fill\" type=\"checkbox\" value-key=\"series.fill\" ?checked=${configurer.series.fill} />\n <label for=\"seires-fill\"> <ox-i18n msgid=\"label.fill\">fill</ox-i18n> </label>\n `\n : html``}\n ${configurer.multiAxis\n ? html`\n <label for=\"series-y-axis-id\"> <ox-i18n msgid=\"label.target-axis\">target axis</ox-i18n> </label>\n <select\n id=\"series-y-axis-id\"\n class=\"select-content\"\n value-key=\"series.yAxisID\"\n .value=${configurer.series.yAxisID || ''}\n >\n <option value=\"left\">left</option>\n <option value=\"right\">right</option>\n </select>\n `\n : html``}\n ${this.displayValueTemplate()}\n </div>\n </div>\n `\n }\n\n _onTabScroll(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n if (this.tabContainer.clientWidth == this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.setAttribute('disabled', '')\n this.tabNavRightButton.setAttribute('disabled', '')\n }\n // left-end\n else if (this.tabContainer.scrollLeft == 0) {\n this.tabNavLeftButton.setAttribute('disabled', '')\n this.tabNavRightButton.removeAttribute('disabled')\n }\n // right-end\n else if (this.tabContainer.scrollLeft + this.tabContainer.clientWidth >= this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.removeAttribute('disabled')\n this.tabNavRightButton.setAttribute('disabled', '')\n } else {\n this.tabNavLeftButton.removeAttribute('disabled')\n this.tabNavRightButton.removeAttribute('disabled')\n }\n }\n\n _onTabScrollNavLeft(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft -= this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n\n _onTabScrollNavRight(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft += this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n}\n"]}
1
+ {"version":3,"file":"input-chart-multi-series-abstract.js","sourceRoot":"","sources":["../../../src/editors/input-chart-multi-series-abstract.ts"],"names":[],"m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CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;YACjD,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;QACrD,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;YACjD,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;QACpD,CAAC;IACH,CAAC;IAED,mBAAmB,CAAC,CAAQ;QAC1B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,OAAM;QACR,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAA;QACjD,IAAI,CAAC,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAA;QAC7D,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,GAAG,MAAM,CAAA;IACjD,CAAC;IAED,oBAAoB,CAAC,CAAQ;QAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,OAAM;QACR,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAA;QACjD,IAAI,CAAC,YAAY,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAA;QAC7D,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,GAAG,MAAM,CAAA;IACjD,CAAC;;AA9Ze;IAAf,KAAK,CAAC,OAAO,CAAC;2DAAmB;AACH;IAA9B,KAAK,CAAC,sBAAsB,CAAC;uEAA0B;AACxB;IAA/B,KAAK,CAAC,uBAAuB,CAAC;wEAA2B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { query } from 'lit/decorators.js'\n\nimport { MdIcon } from '@material/web/icon/icon.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nexport class InputChartMultiSeriesAbstract extends InputChartAbstract {\n static styles = [...InputChartAbstract.styles]\n\n @query('#tabs') tabs!: HTMLElement\n @query('#tab-nav-left-button') tabNavLeftButton!: MdIcon\n @query('#tab-nav-right-button') tabNavRightButton!: MdIcon\n\n get tabContainer(): HTMLElement | null | undefined {\n return this.tabs\n }\n\n firstUpdated() {\n this.tabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e)\n })\n }\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n\n ${this.multiSeriesTabTemplate()}\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"label-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"label-data-key\" type=\"text\" value-key=\"labelDataKey\" .value=${configurer.labelDataKey || ''} />\n\n <label for=\"axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input id=\"axis-title\" type=\"text\" value-key=\"xAxes0.axisTitle\" .value=${configurer.xAxes0.axisTitle || ''} />\n\n <label for=\"x-axes0-thickness\"> <ox-i18n msgid=\"label.thickness\">Thickness</ox-i18n> </label>\n <input\n id=\"x-axes0-thickness\"\n type=\"number\"\n value-key=\"xAxes0.barPercentage\"\n .value=${String(configurer.xAxes0.barPercentage || 0)}\n />\n\n <input\n for=\"grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label id=\"grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n for=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label id=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n .value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"y-axes0-ticks-automin\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"y-axes0-ticks-automin\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-automax\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"y-axes0-ticks-automax\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n .value=${String(configurer.yAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n .value=${String(configurer.yAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n .value=${String(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n .value=${configurer.yAxes1.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1.ticks?.autoMin\n ? html`\n <label for=\"y-axes1.ticks.min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1.ticks.min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n .value=${String(configurer.yAxes1.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes1.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n .value=${String(configurer.yAxes1.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n .value=${String(configurer.yAxes1.ticks?.stepSize)}\n />\n\n <input\n id=\"y2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options.y2ndGridLine}\n />\n <label for=\"y2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1.ticks.display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1.ticks?.display}\n />\n <label for=\"y-axes1.ticks.display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n multiSeriesTabTemplate() {\n const configurer = this.configurer\n\n return html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"tab-header\">\n <md-icon\n id=\"tab-nav-left-button\"\n @tap=${(e: Event) => {\n this._onTabScrollNavLeft(e)\n }}\n disabled\n >chevron_left</md-icon\n >\n <div\n id=\"tabs\"\n @change=${(e: Event) => {\n configurer.currentSeriesIndex = (e.target as any).activeTabIndex\n }}\n active-tab-index=${configurer.currentSeriesIndex}\n fit-container\n >\n ${configurer.datasets.map(\n (dataset: any, index: number) => html`\n <div\n data-series=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index == configurer.currentSeriesIndex}\n @click=${(e: Event) => {\n const target = e.target as HTMLDivElement\n this.configurer.setCurrentSeriesIndex(Number(target.getAttribute('data-tab-index')))\n this.value = { ...this.configurer.value }\n }}\n >\n ${index + 1}\n ${!configurer.datasets || (configurer.datasets.length != 1 && configurer.currentSeriesIndex == index)\n ? html` <md-icon @tap=\"${(e: Event) => this.onTapRemoveCurrentTab(e)}\"> close </md-icon> `\n : html``}\n </div>\n `\n )}\n </div>\n <md-icon\n id=\"tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e)\n }}\n disabled\n >chevron_right</md-icon\n >\n </div>\n <div id=\"add-series-button-container\">\n <md-icon id=\"add-series-button\" @tap=${(e: Event) => this.onTapAddTab(e)}>add</md-icon>\n </div>\n\n <div class=\"tab-content\">\n <label for=\"data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"data-key\" type=\"text\" value-key=\"dataKey\" .value=${configurer.dataKey || ''} />\n\n ${this.chartType == 'line' || this.chartType == 'bar'\n ? html`\n <label for=\"series-type\"> <ox-i18n msgid=\"label.series-type\">type</ox-i18n> </label>\n <select\n id=\"series-type\"\n class=\"select-content\"\n value-key=\"series.type\"\n .value=${configurer.series.type || ''}\n >\n <option value=\"bar\" selected>bar</option>\n <option value=\"line\">line</option>\n </select>\n `\n : html``}\n\n <label for=\"series-label\"> <ox-i18n msgid=\"label.label\">label</ox-i18n> </label>\n <input id=\"series-label\" type=\"text\" value-key=\"series.label\" .value=${configurer.series.label || ''} />\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-line-tension\"> <ox-i18n msgid=\"label.line-tension\">line tension</ox-i18n> </label>\n <select\n id=\"series-line-tension\"\n class=\"select-content\"\n value-key=\"series.lineTension\"\n .value=${String(configurer.series.lineTension || 0)}\n >\n <option value=\"0.4\">smooth</option>\n <option value=\"0\">angled</option>\n </select>\n `\n : html``}\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-border-width\"> <ox-i18n msgid=\"label.border-width\">border width</ox-i18n> </label>\n <input\n id=\"series-border-width\"\n type=\"number\"\n value-key=\"series.borderWidth\"\n .value=${String(configurer.series.borderWidth || 0)}\n />\n `\n : html``}\n\n <label for=\"series-color\"> <ox-i18n msgid=\"label.color\">color</ox-i18n> </label>\n <ox-input-color id=\"series-color\" value-key=\"color\" .value=${configurer.color}></ox-input-color>\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-point-style\"> <ox-i18n msgid=\"label.point-shape\">point shape</ox-i18n> </label>\n <select\n id=\"series-point-style\"\n class=\"select-content\"\n value-key=\"series.pointStyle\"\n .value=${configurer.series.pointStyle || ''}\n >\n <option value=\"circle\">⚬</option>\n <option value=\"triangle\">▵</option>\n <option value=\"rect\">□</option>\n <option value=\"rectRot\">◇</option>\n <option value=\"cross\">+</option>\n <option value=\"crossRot\">⨉</option>\n <option value=\"star\">✱</option>\n <option value=\"line\">―</option>\n <option value=\"dash\">┄</option>\n </select>\n\n <label for=\"series-point-radius\"> <ox-i18n msgid=\"label.point-size\">point size</ox-i18n> </label>\n <input\n id=\"series-point-radius\"\n type=\"number\"\n value-key=\"series.pointRadius\"\n .value=${String(configurer.series.pointRadius || 0)}\n />\n `\n : html``} <label for=\"series-stack\"> <ox-i18n msgid=\"label.stack-group\">Stack group</ox-i18n> </label>\n <input id=\"series-stack\" type=\"text\" value-key=\"series.stack\" .value=${configurer.series.stack || ''} />\n ${configurer.series.type == 'line'\n ? html`\n <input id=\"seires-fill\" type=\"checkbox\" value-key=\"series.fill\" ?checked=${configurer.series.fill} />\n <label for=\"seires-fill\"> <ox-i18n msgid=\"label.fill\">fill</ox-i18n> </label>\n `\n : html``}\n ${configurer.multiAxis\n ? html`\n <label for=\"series-y-axis-id\"> <ox-i18n msgid=\"label.target-axis\">target axis</ox-i18n> </label>\n <select\n id=\"series-y-axis-id\"\n class=\"select-content\"\n value-key=\"series.yAxisID\"\n .value=${configurer.series.yAxisID || ''}\n >\n <option value=\"left\">left</option>\n <option value=\"right\">right</option>\n </select>\n `\n : html``}\n ${this.displayValueTemplate()}\n </div>\n </div>\n `\n }\n\n _onTabScroll(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n if (this.tabContainer.clientWidth == this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.setAttribute('disabled', '')\n this.tabNavRightButton.setAttribute('disabled', '')\n }\n // left-end\n else if (this.tabContainer.scrollLeft == 0) {\n this.tabNavLeftButton.setAttribute('disabled', '')\n this.tabNavRightButton.removeAttribute('disabled')\n }\n // right-end\n else if (this.tabContainer.scrollLeft + this.tabContainer.clientWidth >= this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.removeAttribute('disabled')\n this.tabNavRightButton.setAttribute('disabled', '')\n } else {\n this.tabNavLeftButton.removeAttribute('disabled')\n this.tabNavRightButton.removeAttribute('disabled')\n }\n }\n\n _onTabScrollNavLeft(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft -= this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n\n _onTabScrollNavRight(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft += this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import '@operato/i18n/ox-i18n.js';
2
+ import { InputChartMultiSeriesAbstract } from './input-chart-multi-series-abstract';
3
+ export declare class OxInputChartTimeseries extends InputChartMultiSeriesAbstract {
4
+ static styles: import("lit").CSSResult[];
5
+ subTemplate(): import("lit-html").TemplateResult<1>;
6
+ _hasBarSeries(config: any): boolean;
7
+ }
@@ -0,0 +1,234 @@
1
+ import { __decorate } from "tslib";
2
+ import '@operato/i18n/ox-i18n.js';
3
+ import { html } from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { ifDefined } from 'lit/directives/if-defined.js';
6
+ import { InputChartMultiSeriesAbstract } from './input-chart-multi-series-abstract';
7
+ let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartMultiSeriesAbstract {
8
+ static { this.styles = InputChartMultiSeriesAbstract.styles; }
9
+ subTemplate() {
10
+ const configurer = this.configurer;
11
+ return html `
12
+ <input id="multi-axis" type="checkbox" value-key="multiAxis" ?checked=${configurer.multiAxis} />
13
+ <label for="multi-axis"> <ox-i18n msgid="label.multi-axis">Multi Axis</ox-i18n> </label>
14
+
15
+ <legend><ox-i18n msgid="label.series">Series</ox-i18n></legend>
16
+
17
+ <div fullwidth>${this.multiSeriesTabTemplate()}</div>
18
+
19
+ <legend><ox-i18n msgid="label.x-axes">X Axes</ox-i18n></legend>
20
+
21
+ <label for="series-data-key"> <ox-i18n msgid="label.data-key">Data Key</ox-i18n> </label>
22
+ <input id="series-data-key" type="text" value-key="labelDataKey" value=${ifDefined(configurer.labelDataKey)} />
23
+
24
+ <label for="x-axes0-axis-title"> <ox-i18n msgid="label.title">Title</ox-i18n> </label>
25
+ <input
26
+ id="x-axes0-axis-title"
27
+ type="text"
28
+ value-key="xAxes0.axisTitle"
29
+ value=${ifDefined(configurer.xAxes0.axisTitle)}
30
+ />
31
+
32
+ ${this._hasBarSeries(configurer.value)
33
+ ? html `
34
+ <label for="bar-spacing"><ox-i18n msgid="label.bar-spacing">Bar Spacing</ox-i18n></label>
35
+ <input
36
+ id="bar-spacing"
37
+ type="number"
38
+ min="0"
39
+ max="1"
40
+ step="0.1"
41
+ value-key="xAxes0.barSpacing"
42
+ value=${ifDefined(configurer.xAxes0.barSpacing)}
43
+ />
44
+ <label for="tick-spacing"><ox-i18n msgid="label.tick-spacing">Tick Spacing</ox-i18n></label>
45
+ <input
46
+ id="tick-spacing"
47
+ type="number"
48
+ min="0"
49
+ max="1"
50
+ step="0.1"
51
+ value-key="xAxes0.categorySpacing"
52
+ value=${ifDefined(configurer.xAxes0.categorySpacing)}
53
+ />
54
+ `
55
+ : html ``}
56
+
57
+ <input
58
+ id="x-grid-line"
59
+ type="checkbox"
60
+ value-key="value.options.xGridLine"
61
+ ?checked=${configurer.config.options?.xGridLine}
62
+ />
63
+ <label for="x-grid-line"> <ox-i18n msgid="label.grid-line">Grid Line</ox-i18n> </label>
64
+
65
+ <input
66
+ id="x-axes0-ticks-display"
67
+ type="checkbox"
68
+ value-key="xAxes0.ticks.display"
69
+ ?checked=${configurer.xAxes0.ticks?.display}
70
+ />
71
+ <label for="x-axes0-ticks-display"> <ox-i18n msgid="label.display-tick">Display Tick</ox-i18n> </label>
72
+
73
+ <legend><ox-i18n msgid="label.y-axes">Y Axes</ox-i18n></legend>
74
+
75
+ <label for="y-axes0-axis-title"> <ox-i18n msgid="label.title">Title</ox-i18n> </label>
76
+ <input
77
+ id="y-axes0-axis-title"
78
+ type="text"
79
+ value-key="yAxes0.axisTitle"
80
+ value=${configurer.yAxes0.axisTitle || ''}
81
+ />
82
+
83
+ <input
84
+ id="axis-min-auto"
85
+ type="checkbox"
86
+ value-key="yAxes0.ticks.autoMin"
87
+ ?checked=${configurer.yAxes0.ticks?.autoMin}
88
+ />
89
+ <label for="axis-min-auto"> <ox-i18n msgid="label.axis-min-auto">Min Auto</ox-i18n> </label>
90
+
91
+ <input
92
+ id="axis-max-auto"
93
+ type="checkbox"
94
+ value-key="yAxes0.ticks.autoMax"
95
+ ?checked=${configurer.yAxes0.ticks?.autoMax}
96
+ />
97
+ <label for="axis-max-auto"> <ox-i18n msgid="label.axis-max-auto">Max Auto</ox-i18n> </label>
98
+
99
+ ${!configurer.yAxes0.ticks?.autoMin
100
+ ? html `
101
+ <label for="y-axes0-ticks-min"> <ox-i18n msgid="label.axis-min">Min</ox-i18n> </label>
102
+ <input
103
+ id="y-axes0-ticks-min"
104
+ type="number"
105
+ value-key="yAxes0.ticks.min"
106
+ value=${ifDefined(configurer.yAxes0.ticks?.min)}
107
+ />
108
+ `
109
+ : html ``}
110
+ ${!configurer.yAxes0.ticks?.autoMax
111
+ ? html `
112
+ <label for="y-axes0-ticks-max"> <ox-i18n msgid="label.axis-max">Max</ox-i18n> </label>
113
+ <input
114
+ id="y-axes0-ticks-max"
115
+ type="number"
116
+ value-key="yAxes0.ticks.max"
117
+ value=${ifDefined(configurer.yAxes0.ticks?.max)}
118
+ />
119
+ `
120
+ : html ``}
121
+
122
+ <label for="y-axes0-ticks-step-size"> <ox-i18n msgid="label.axis-step-size">StepSize</ox-i18n> </label>
123
+ <input
124
+ id="y-axes0-ticks-step-size"
125
+ type="number"
126
+ value-key="yAxes0.ticks.stepSize"
127
+ value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}
128
+ />
129
+
130
+ <input
131
+ id="y-grid-line"
132
+ type="checkbox"
133
+ value-key="value.options.yGridLine"
134
+ ?checked=${configurer.config.options?.yGridLine}
135
+ />
136
+ <label for="y-grid-line"> <ox-i18n msgid="label.grid-line">Grid Line</ox-i18n> </label>
137
+
138
+ <input
139
+ id="y-axes0-ticks-display"
140
+ type="checkbox"
141
+ value-key="yAxes0.ticks.display"
142
+ ?checked=${configurer.yAxes0.ticks?.display}
143
+ />
144
+ <label for="y-axes0-ticks-display"> <ox-i18n msgid="label.display-tick">Display Tick</ox-i18n> </label>
145
+
146
+ ${configurer.config.options?.multiAxis
147
+ ? html `
148
+ <legend><ox-i18n msgid="label.y-2nd-axes">Y 2nd Axes</ox-i18n></legend>
149
+
150
+ <label for="y-axes1.axis-title"> <ox-i18n msgid="label.title">Title</ox-i18n> </label>
151
+ <input
152
+ id="y-axes1.axis-title"
153
+ type="text"
154
+ value-key="yAxes1.axisTitle"
155
+ value=${ifDefined(configurer.yAxes1?.axisTitle)}
156
+ />
157
+
158
+ <input
159
+ id="y-axes1-ticks-auto-min"
160
+ type="checkbox"
161
+ value-key="yAxes1.ticks.autoMin"
162
+ ?checked=${configurer.yAxes1?.ticks?.autoMin}
163
+ />
164
+ <label for="y-axes1-ticks-auto-min"> <ox-i18n msgid="label.axis-min-auto">Min Auto</ox-i18n> </label>
165
+
166
+ <input
167
+ id="y-axes1-ticks-auto-max"
168
+ type="checkbox"
169
+ value-key="yAxes1.ticks.autoMax"
170
+ ?checked=${configurer.yAxes1?.ticks?.autoMax}
171
+ />
172
+ <label for="y-axes1-ticks-auto-max"> <ox-i18n msgid="label.axis-max-auto">Max Auto</ox-i18n> </label>
173
+
174
+ ${!configurer.yAxes1?.ticks?.autoMin
175
+ ? html `
176
+ <label for="y-axes1-ticks-min"> <ox-i18n msgid="label.axis-min">Min</ox-i18n> </label>
177
+ <input
178
+ id="y-axes1-ticks-min"
179
+ type="number"
180
+ value-key="yAxes1.ticks.min"
181
+ value=${ifDefined(configurer.yAxes1?.ticks?.min)}
182
+ />
183
+ `
184
+ : html ``}
185
+ ${!configurer.yAxes1?.ticks?.autoMax
186
+ ? html `
187
+ <label for="y-axes1-ticks-max"> <ox-i18n msgid="label.axis-max">Max</ox-i18n> </label>
188
+ <input
189
+ id="y-axes1-ticks-max"
190
+ type="number"
191
+ value-key="yAxes1.ticks.max"
192
+ value=${ifDefined(configurer.yAxes1?.ticks?.max)}
193
+ />
194
+ `
195
+ : html ``}
196
+
197
+ <label for="y-axes1-ticks-step-size"> <ox-i18n msgid="label.axis-step-size">StepSize</ox-i18n> </label>
198
+ <input
199
+ id="y-axes1-ticks-step-size"
200
+ type="number"
201
+ value-key="yAxes1.ticks.stepSize"
202
+ value=${ifDefined(configurer.yAxes1?.ticks?.stepSize)}
203
+ />
204
+
205
+ <input
206
+ id="y-2nd-grid-line"
207
+ type="checkbox"
208
+ value-key="value.options.y2ndGridLine"
209
+ ?checked=${configurer.config.options?.y2ndGridLine}
210
+ />
211
+ <label for="y-2nd-grid-line"> <ox-i18n msgid="label.grid-line">Grid Line</ox-i18n> </label>
212
+
213
+ <input
214
+ id="y-axes1-ticks-display"
215
+ type="checkbox"
216
+ value-key="yAxes1.ticks.display"
217
+ ?checked=${configurer.yAxes1?.ticks?.display}
218
+ />
219
+ <label for="y-axes1-ticks-display"> <ox-i18n msgid="label.display-tick">Display Tick</ox-i18n> </label>
220
+ `
221
+ : html ``}
222
+ `;
223
+ }
224
+ _hasBarSeries(config) {
225
+ var hasBarSeries = false;
226
+ hasBarSeries = config.data.datasets?.some((s) => s.type == 'bar');
227
+ return hasBarSeries;
228
+ }
229
+ };
230
+ OxInputChartTimeseries = __decorate([
231
+ customElement('ox-input-chart-timeseries')
232
+ ], OxInputChartTimeseries);
233
+ export { OxInputChartTimeseries };
234
+ //# sourceMappingURL=ox-input-chart-timeseries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-input-chart-timeseries.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-timeseries.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAA;AAG5E,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,6BAA6B;aAChE,WAAM,GAAG,6BAA6B,CAAC,MAAM,AAAvC,CAAuC;IAEpD,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;8EAC+D,UAAU,CAAC,SAAS;;;;;uBAK3E,IAAI,CAAC,sBAAsB,EAAE;;;;;+EAK2B,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;;;;;;;gBAOjG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC;;;QAG9C,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC;YACpC,CAAC,CAAC,IAAI,CAAA;;;;;;;;;sBASQ,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;;;;;;;;;;sBAUvC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC;;WAEvD;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;;;;;;mBAMG,UAAU,CAAC,M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,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC;;iBAEnD;gBACH,CAAC,CAAC,IAAI,CAAA,EAAE;cACR,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO;gBAClC,CAAC,CAAC,IAAI,CAAA;;;;;;4BAMQ,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC;;iBAEnD;gBACH,CAAC,CAAC,IAAI,CAAA,EAAE;;;;;;;sBAOA,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;;;;;;;yBAO1C,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY;;;;;;;;yBAQvC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO;;;WAG/C;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;KACX,CAAA;IACH,CAAC;IAED,aAAa,CAAC,MAAW;QACvB,IAAI,YAAY,GAAG,KAAK,CAAA;QACxB,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAA;QAEtE,OAAO,YAAY,CAAA;IACrB,CAAC;;AAjOU,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAkOlC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartMultiSeriesAbstract } from './input-chart-multi-series-abstract'\n\n@customElement('ox-input-chart-timeseries')\nexport class OxInputChartTimeseries extends InputChartMultiSeriesAbstract {\n static styles = InputChartMultiSeriesAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n\n <div fullwidth>${this.multiSeriesTabTemplate()}</div>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n value=${ifDefined(configurer.xAxes0.axisTitle)}\n />\n\n ${this._hasBarSeries(configurer.value)\n ? html`\n <label for=\"bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.barSpacing\"\n value=${ifDefined(configurer.xAxes0.barSpacing)}\n />\n <label for=\"tick-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"tick-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.categorySpacing\"\n value=${ifDefined(configurer.xAxes0.categorySpacing)}\n />\n `\n : html``}\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n value=${ifDefined(configurer.yAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n value=${ifDefined(configurer.yAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n value=${ifDefined(configurer.yAxes1?.axisTitle)}\n />\n\n <input\n id=\"y-axes1-ticks-auto-min\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1?.ticks?.autoMin}\n />\n <label for=\"y-axes1-ticks-auto-min\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1?.ticks?.autoMax}\n />\n <label for=\"y-axes1-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1?.ticks?.autoMin\n ? html`\n <label for=\"y-axes1-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n value=${ifDefined(configurer.yAxes1?.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes1?.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n value=${ifDefined(configurer.yAxes1?.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes1?.ticks?.stepSize)}\n />\n\n <input\n id=\"y-2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options?.y2ndGridLine}\n />\n <label for=\"y-2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1?.ticks?.display}\n />\n <label for=\"y-axes1-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n _hasBarSeries(config: any) {\n var hasBarSeries = false\n hasBarSeries = config.data.datasets?.some((s: any) => s.type == 'bar')\n\n return hasBarSeries\n }\n}\n"]}
@@ -43,35 +43,24 @@ let ChartEditor = class ChartEditor extends OxPropertyEditor {
43
43
  `
44
44
  ]; }
45
45
  editorTemplate(value, spec) {
46
- return html `
47
- ${value
48
- ? html `
49
- <div id="chart-type">
50
- <label> <ox-i18n msgid="label.chart-type">Chart Type</ox-i18n> </label>
51
- <input type="text" .value=${value.type} readonly />
52
- </div>
53
- `
54
- : html ``}
55
- ${!value
56
- ? html ``
57
- : value.type == 'line'
58
- ? html ` <ox-input-chart-mixed .value=${value} chart-type="line" fullwidth></ox-input-chart-mixed> `
59
- : value.type == 'horizontalBar'
60
- ? html ` <ox-input-chart-hbar .value=${value} chart-type="horizontalBar" fullwidth></ox-input-chart-hbar> `
61
- : value.type == 'bar'
62
- ? html ` <ox-input-chart-mixed .value=${value} chart-type="bar" fullwidth></ox-input-chart-mixed> `
63
- : value.type == 'pie'
64
- ? html ` <ox-input-chart-pie .value=${value} chart-type="pie" fullwidth></ox-input-chart-pie> `
65
- : value.type == 'doughnut'
66
- ? html ` <ox-input-chart-pie .value=${value} chart-type="doughnut" fullwidth></ox-input-chart-pie> `
67
- : value.type == 'polarArea'
68
- ? html ` <ox-input-chart-pie .value=${value} chart-type="polarArea" fullwidth></ox-input-chart-pie> `
69
- : value.type == 'radar'
70
- ? html `
71
- <ox-input-chart-radar .value=${value} chart-type="radar" fullwidth></ox-input-chart-radar>
72
- `
73
- : html ``}
74
- `;
46
+ switch (value) {
47
+ case 'line':
48
+ case 'bar':
49
+ return html ` <ox-input-chart-mixed .value=${value} chart-type=${value} fullwidth></ox-input-chart-mixed> `;
50
+ case 'horizontalBar':
51
+ return html ` <ox-input-chart-hbar .value=${value} chart-type=${value} fullwidth></ox-input-chart-hbar> `;
52
+ case 'pie':
53
+ case 'doughnut':
54
+ case 'polarArea':
55
+ return html ` <ox-input-chart-pie .value=${value} chart-type=${value} fullwidth></ox-input-chart-pie> `;
56
+ case 'radar':
57
+ return html ` <ox-input-chart-radar .value=${value} chart-type=${value} fullwidth></ox-input-chart-radar> `;
58
+ case 'timeseries':
59
+ return html `
60
+ <ox-input-chart-timeseries .value=${value} chart-type=${value} fullwidth></ox-input-chart-timeseries>
61
+ `;
62
+ }
63
+ return html ``;
75
64
  }
76
65
  };
77
66
  ChartEditor = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-chart.js","sourceRoot":"","sources":["../../../src/editors/ox-property-editor-chart.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,uBAAuB,CAAA;AAC9B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAC7B,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OAAO;wCACrB,CAAC,CAAC,IAAI,CAAA;yDAC6B,KAAK;yBACrC;wCACH,CAAC,CAAC,IAAI,CAAA,EAAE;KACzB,CAAA;IACH,CAAC;;AAlEU,WAAW;IADvB,aAAa,CAAC,0BAA0B,CAAC;GAC7B,WAAW,CAmEvB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport './ox-input-chart-hbar'\nimport './ox-input-chart-mixed'\nimport './ox-input-chart-pie'\nimport './ox-input-chart-radar'\n\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor, PropertySpec } from '@operato/property-editor'\n\n@customElement('ox-property-editor-chart')\nexport class ChartEditor extends OxPropertyEditor {\n static styles = [\n css`\n :host {\n display: block;\n padding: 5px;\n\n --md-elevated-button-container-height: 20px;\n }\n\n #chart-type {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n }\n\n #chart-type > label {\n box-sizing: border-box;\n grid-column: span 3;\n\n text-align: right;\n\n color: var(--md-sys-color-on-secondary-container);\n font-size: 0.8em;\n line-height: 2;\n text-transform: capitalize;\n }\n\n #chart-type > input {\n box-sizing: border-box;\n grid-column: span 7;\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n `\n ]\n\n editorTemplate(value: any, spec: PropertySpec) {\n return html`\n ${value\n ? html`\n <div id=\"chart-type\">\n <label> <ox-i18n msgid=\"label.chart-type\">Chart Type</ox-i18n> </label>\n <input type=\"text\" .value=${value.type} readonly />\n </div>\n `\n : html``}\n ${!value\n ? html``\n : value.type == 'line'\n ? html` <ox-input-chart-mixed .value=${value} chart-type=\"line\" fullwidth></ox-input-chart-mixed> `\n : value.type == 'horizontalBar'\n ? html` <ox-input-chart-hbar .value=${value} chart-type=\"horizontalBar\" fullwidth></ox-input-chart-hbar> `\n : value.type == 'bar'\n ? html` <ox-input-chart-mixed .value=${value} chart-type=\"bar\" fullwidth></ox-input-chart-mixed> `\n : value.type == 'pie'\n ? html` <ox-input-chart-pie .value=${value} chart-type=\"pie\" fullwidth></ox-input-chart-pie> `\n : value.type == 'doughnut'\n ? html` <ox-input-chart-pie .value=${value} chart-type=\"doughnut\" fullwidth></ox-input-chart-pie> `\n : value.type == 'polarArea'\n ? html` <ox-input-chart-pie .value=${value} chart-type=\"polarArea\" fullwidth></ox-input-chart-pie> `\n : value.type == 'radar'\n ? html`\n <ox-input-chart-radar .value=${value} chart-type=\"radar\" fullwidth></ox-input-chart-radar>\n `\n : html``}\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-chart.js","sourceRoot":"","sources":["../../../src/editors/ox-property-editor-chart.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,uBAAuB,CAAA;AAC9B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAW,MAAM,KAAK,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,0BAA0B,CAAA;AAGlE,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,gBAAgB;aACxC,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BF;KACF,AAjCY,CAiCZ;IAED,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,MAAM,CAAC;YACZ,KAAK,KAAK;gBACR,OAAO,IAAI,CAAA,iCAAiC,KAAK,eAAe,KAAK,qCAAqC,CAAA;YAC5G,KAAK,eAAe;gBAClB,OAAO,IAAI,CAAA,gCAAgC,KAAK,eAAe,KAAK,oCAAoC,CAAA;YAC1G,KAAK,KAAK,CAAC;YACX,KAAK,UAAU,CAAC;YAChB,KAAK,WAAW;gBACd,OAAO,IAAI,CAAA,+BAA+B,KAAK,eAAe,KAAK,mCAAmC,CAAA;YACxG,KAAK,OAAO;gBACV,OAAO,IAAI,CAAA,iCAAiC,KAAK,eAAe,KAAK,qCAAqC,CAAA;YAC5G,KAAK,YAAY;gBACf,OAAO,IAAI,CAAA;8CAC2B,KAAK,eAAe,KAAK;SAC9D,CAAA;QACL,CAAC;QAED,OAAO,IAAI,CAAA,EAAE,CAAA;IACf,CAAC;;AAxDU,WAAW;IADvB,aAAa,CAAC,0BAA0B,CAAC;GAC7B,WAAW,CAyDvB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport './ox-input-chart-hbar'\nimport './ox-input-chart-mixed'\nimport './ox-input-chart-pie'\nimport './ox-input-chart-radar'\n\nimport { css, html, nothing } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor, PropertySpec } from '@operato/property-editor'\n\n@customElement('ox-property-editor-chart')\nexport class ChartEditor extends OxPropertyEditor {\n static styles = [\n css`\n :host {\n display: block;\n padding: 5px;\n\n --md-elevated-button-container-height: 20px;\n }\n\n #chart-type {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n }\n\n #chart-type > label {\n box-sizing: border-box;\n grid-column: span 3;\n\n text-align: right;\n\n color: var(--md-sys-color-on-secondary-container);\n font-size: 0.8em;\n line-height: 2;\n text-transform: capitalize;\n }\n\n #chart-type > input {\n box-sizing: border-box;\n grid-column: span 7;\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n `\n ]\n\n editorTemplate(value: any, spec: PropertySpec) {\n switch (value) {\n case 'line':\n case 'bar':\n return html` <ox-input-chart-mixed .value=${value} chart-type=${value} fullwidth></ox-input-chart-mixed> `\n case 'horizontalBar':\n return html` <ox-input-chart-hbar .value=${value} chart-type=${value} fullwidth></ox-input-chart-hbar> `\n case 'pie':\n case 'doughnut':\n case 'polarArea':\n return html` <ox-input-chart-pie .value=${value} chart-type=${value} fullwidth></ox-input-chart-pie> `\n case 'radar':\n return html` <ox-input-chart-radar .value=${value} chart-type=${value} fullwidth></ox-input-chart-radar> `\n case 'timeseries':\n return html`\n <ox-input-chart-timeseries .value=${value} chart-type=${value} fullwidth></ox-input-chart-timeseries>\n `\n }\n\n return html``\n }\n}\n"]}
@@ -6,12 +6,12 @@ declare global {
6
6
  }
7
7
  }
8
8
  declare class OxSciChart extends LitElement {
9
+ config: OperatoChart.ChartConfig | null;
9
10
  data: {
10
11
  [attr: string]: any;
11
12
  }[];
12
13
  attrX: string;
13
14
  attrY: string;
14
- config: any;
15
15
  private chart;
16
16
  dataSeries?: any;
17
17
  container: HTMLDivElement;
@@ -5,18 +5,10 @@ import { buildSciChart } from './scichart-builder';
5
5
  let OxSciChart = class OxSciChart extends LitElement {
6
6
  constructor() {
7
7
  super(...arguments);
8
- this.data = [
9
- { x: 1718612376646, y: 10 },
10
- { x: 1718612386646, y: 20 },
11
- { x: 1718612396646, y: 15 },
12
- { x: 1718612406646, y: 25 },
13
- { x: 1718612416646, y: 22 },
14
- { x: 1718612426646, y: 30 },
15
- { x: 1718612436646, y: 28 }
16
- ];
8
+ this.config = null;
9
+ this.data = [];
17
10
  this.attrX = 'x';
18
11
  this.attrY = 'y';
19
- this.config = null;
20
12
  this.chart = null;
21
13
  }
22
14
  static { this.styles = css `
@@ -101,18 +93,18 @@ let OxSciChart = class OxSciChart extends LitElement {
101
93
  return html `<div id="container"></div>`;
102
94
  }
103
95
  };
96
+ __decorate([
97
+ property({ type: Object })
98
+ ], OxSciChart.prototype, "config", void 0);
104
99
  __decorate([
105
100
  property({ type: Array })
106
101
  ], OxSciChart.prototype, "data", void 0);
107
102
  __decorate([
108
- property({ type: String })
103
+ property({ type: String, attribute: 'attr-x' })
109
104
  ], OxSciChart.prototype, "attrX", void 0);
110
105
  __decorate([
111
- property({ type: String })
106
+ property({ type: String, attribute: 'attr-y' })
112
107
  ], OxSciChart.prototype, "attrY", void 0);
113
- __decorate([
114
- property({ type: Object })
115
- ], OxSciChart.prototype, "config", void 0);
116
108
  __decorate([
117
109
  query('div#container')
118
110
  ], OxSciChart.prototype, "container", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"ox-scichart.js","sourceRoot":"","sources":["../../../src/scichart/ox-scichart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAWlD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAC6B,SAAI,GAA8B;YAC3D,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;YAC3B,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;YAC3B,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;YAC3B,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;YAC3B,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;YAC3B,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;YAC3B,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE;SAC5B,CAAA;QAC2B,UAAK,GAAW,GAAG,CAAA;QACnB,UAAK,GAAW,GAAG,CAAA;QACnB,WAAM,GAAQ,IAAI,CAAA;QAEtC,UAAK,GAAQ,IAAI,CAAA;IA6G3B,CAAC;aAxGQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;GASlB,AATY,CASZ;IAED,YAAY;QACV,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAA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AAC;aACpB,CAAA;QACH,CAAC,CAAC;aACD,MAAM,CAAC,OAAO,CAAyC,CAAA;IAC5D,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,4BAA4B,CAAA;IACzC,CAAC;;AAzH0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wCAQzB;AAC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAmB;AAKtB;IAAvB,KAAK,CAAC,eAAe,CAAC;6CAA2B;AAjB9C,UAAU;IADf,aAAa,CAAC,aAAa,CAAC;GACvB,UAAU,CA2Hf","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { property, query, customElement } from 'lit/decorators.js'\nimport { buildSciChart } from './scichart-builder'\n\n// 전역 변수로 SciChart 로딩 상태 관리\ndeclare global {\n interface Window {\n sciChartLoaded: boolean\n sciChartLoadingPromise: Promise<void>\n }\n}\n\n@customElement('ox-scichart')\nclass OxSciChart extends LitElement {\n @property({ type: Array }) data: { [attr: string]: any }[] = [\n { x: 1718612376646, y: 10 },\n { x: 1718612386646, y: 20 },\n { x: 1718612396646, y: 15 },\n { x: 1718612406646, y: 25 },\n { x: 1718612416646, y: 22 },\n { x: 1718612426646, y: 30 },\n { x: 1718612436646, y: 28 }\n ]\n @property({ type: String }) attrX: string = 'x'\n @property({ type: String }) attrY: string = 'y'\n @property({ type: Object }) config: any = null\n\n private chart: any = null\n dataSeries?: any\n\n @query('div#container') container!: HTMLDivElement\n\n static styles = css`\n :host {\n display: block;\n }\n\n div {\n width: 100%;\n height: 100%;\n }\n `\n\n firstUpdated() {\n this.loadSciChart()\n }\n\n async loadSciChart() {\n if (!window.sciChartLoaded) {\n if (!window.sciChartLoadingPromise) {\n window.sciChartLoadingPromise = new Promise<void>(resolve => {\n const script = document.createElement('script')\n script.src = 'https://cdn.jsdelivr.net/npm/scichart/index.min.js'\n script.crossOrigin = 'anonymous'\n script.onload = () => {\n window.sciChartLoaded = true\n\n SciChart.SciChartSurface.UseCommunityLicense()\n\n resolve()\n }\n document.head.appendChild(script)\n })\n }\n\n await window.sciChartLoadingPromise\n }\n\n this.initializeSciChart()\n }\n\n async initializeSciChart() {\n const { chart, dataSeries } = (await buildSciChart(this.config, this.container, {})) || {}\n\n this.chart = chart\n this.dataSeries = dataSeries\n\n this.updateDataSeries()\n }\n\n async updated(changedProperties: Map<string | number | symbol, unknown>) {\n if (changedProperties.has('config')) {\n await this.initializeSciChart()\n }\n\n if (changedProperties.has('data')) {\n this.updateDataSeries()\n this.chart?.sciChartSurface.zoomExtents()\n }\n }\n\n updateDataSeries() {\n if (!this.dataSeries) return\n\n this.dataSeries.clear()\n const newData = this.dataSet\n\n this.dataSeries.appendRange(\n newData.map(d => d.xValue),\n newData.map(d => d.yValue)\n )\n\n this.chart?.sciChartSurface.zoomExtents()\n this.chart?.sciChartSurface.invalidateElement()\n }\n\n get dataSet(): { xValue: number; yValue: number }[] {\n const { attrX, attrY, data } = this\n\n if (!(data instanceof Array)) {\n return []\n }\n\n return data\n .map(item => {\n if (!item || typeof item !== 'object') {\n return\n }\n\n const xValue = new Date(item[attrX])\n if (isNaN(xValue.getTime())) {\n console.error('Invalid date:', item[attrX])\n return\n }\n\n return {\n xValue: xValue.getTime() / 1000,\n yValue: item[attrY]\n }\n })\n .filter(Boolean) as { xValue: number; yValue: number }[]\n }\n\n render() {\n return html`<div id=\"container\"></div>`\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ox-scichart': OxSciChart\n }\n}\n"]}
1
+ {"version":3,"file":"ox-scichart.js","sourceRoot":"","sources":["../../../src/scichart/ox-scichart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,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it'\nimport { property, query, customElement } from 'lit/decorators.js'\nimport { buildSciChart } from './scichart-builder'\n\n// 전역 변수로 SciChart 로딩 상태 관리\ndeclare global {\n interface Window {\n sciChartLoaded: boolean\n sciChartLoadingPromise: Promise<void>\n }\n}\n\n@customElement('ox-scichart')\nclass OxSciChart extends LitElement {\n @property({ type: Object }) config: OperatoChart.ChartConfig | null = null\n @property({ type: Array }) data: { [attr: string]: any }[] = []\n @property({ type: String, attribute: 'attr-x' }) attrX: string = 'x'\n @property({ type: String, attribute: 'attr-y' }) attrY: string = 'y'\n\n private chart: any = null\n dataSeries?: any\n\n @query('div#container') container!: HTMLDivElement\n\n static styles = css`\n :host {\n display: block;\n }\n\n div {\n width: 100%;\n height: 100%;\n }\n `\n\n firstUpdated() {\n this.loadSciChart()\n }\n\n async loadSciChart() {\n if (!window.sciChartLoaded) {\n if (!window.sciChartLoadingPromise) {\n window.sciChartLoadingPromise = new Promise<void>(resolve => {\n const script = document.createElement('script')\n script.src = 'https://cdn.jsdelivr.net/npm/scichart/index.min.js'\n script.crossOrigin = 'anonymous'\n script.onload = () => {\n window.sciChartLoaded = true\n\n SciChart.SciChartSurface.UseCommunityLicense()\n\n resolve()\n }\n document.head.appendChild(script)\n })\n }\n\n await window.sciChartLoadingPromise\n }\n\n this.initializeSciChart()\n }\n\n async initializeSciChart() {\n const { chart, dataSeries } = (await buildSciChart(this.config, this.container, {})) || {}\n\n this.chart = chart\n this.dataSeries = dataSeries\n\n this.updateDataSeries()\n }\n\n async updated(changedProperties: Map<string | number | symbol, unknown>) {\n if (changedProperties.has('config')) {\n await this.initializeSciChart()\n }\n\n if (changedProperties.has('data')) {\n this.updateDataSeries()\n this.chart?.sciChartSurface.zoomExtents()\n }\n }\n\n updateDataSeries() {\n if (!this.dataSeries) return\n\n this.dataSeries.clear()\n const newData = this.dataSet\n\n this.dataSeries.appendRange(\n newData.map(d => d.xValue),\n newData.map(d => d.yValue)\n )\n\n this.chart?.sciChartSurface.zoomExtents()\n this.chart?.sciChartSurface.invalidateElement()\n }\n\n get dataSet(): { xValue: number; yValue: number }[] {\n const { attrX, attrY, data } = this\n\n if (!(data instanceof Array)) {\n return []\n }\n\n return data\n .map(item => {\n if (!item || typeof item !== 'object') {\n return\n }\n\n const xValue = new Date(item[attrX])\n if (isNaN(xValue.getTime())) {\n console.error('Invalid date:', item[attrX])\n return\n }\n\n return {\n xValue: xValue.getTime() / 1000,\n yValue: item[attrY]\n }\n })\n .filter(Boolean) as { xValue: number; yValue: number }[]\n }\n\n render() {\n return html`<div id=\"container\"></div>`\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ox-scichart': OxSciChart\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare function format(mask: string, value: number): string;