@operato/scene-scichart 7.2.5 → 7.2.6

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.2.6](https://github.com/things-scene/operato-scene/compare/v7.2.5...v7.2.6) (2024-08-03)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * grouped multiple-timeseries ([747c7eb](https://github.com/things-scene/operato-scene/commit/747c7ebb46691ba7f7cebd3246dd520405aa036b))
12
+
13
+
14
+
6
15
  ## [7.2.5](https://github.com/things-scene/operato-scene/compare/v7.2.4...v7.2.5) (2024-08-03)
7
16
 
8
17
 
package/db.sqlite CHANGED
Binary file
@@ -30,8 +30,14 @@ let OxSciChartMultiple = OxSciChartMultiple_1 = class OxSciChartMultiple extends
30
30
  this.containerId = 'ox-scichart-multiple' + ++OxSciChartMultiple_1.idx;
31
31
  }
32
32
  async initializeSciChart() {
33
+ var _a;
33
34
  this.cleanup();
34
- const { chart, dataSeries } = (await buildSciChartOverview(this.config, this.overviewContainer, {}, this.synchronizer)) || {};
35
+ // Overview 차트는 정확히 일치하는 시리즈 이름만 포함
36
+ const overviewDatasets = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.data.datasets.filter(dataset => this.visibleSeries.includes(dataset.dataKey))) || [];
37
+ const { chart, dataSeries } = (await buildSciChartOverview({
38
+ ...this.config,
39
+ data: { datasets: overviewDatasets }
40
+ }, this.overviewContainer, {}, this.synchronizer)) || {};
35
41
  this.verticalGroup.addSurfaceToGroup(chart.sciChartSurface);
36
42
  this.overviewChart = chart;
37
43
  this.overviewDataSeries = dataSeries;
@@ -88,26 +94,33 @@ let OxSciChartMultiple = OxSciChartMultiple_1 = class OxSciChartMultiple extends
88
94
  return [];
89
95
  }
90
96
  const newData = this.dataSet;
91
- (this.groupCharts || []).forEach(({ dataKey, sciChartSurface, dataSeries }) => {
97
+ this.groupCharts.forEach(({ dataKey, sciChartSurface, dataSeries }) => {
92
98
  try {
93
- dataSeries.forEach(ds => ds.clear());
94
- const dataSet = newData.filter((data, index) => dataKey == datasets[index].dataKey);
95
- dataSet.forEach((data, index) => {
96
- const filteredData = data.filter(d => typeof d.yValue === 'number');
97
- if (filteredData.length > 0) {
98
- dataSeries[index].appendRange(filteredData.map(d => d.xValue), filteredData.map(d => d.yValue));
99
+ // dataKey로 시작하는 모든 시리즈를 업데이트
100
+ const relatedDatasets = datasets.filter(dataset => { var _a; return (_a = dataset.dataKey) === null || _a === void 0 ? void 0 : _a.startsWith(dataKey); });
101
+ // relatedDatasets에 대해 해당하는 dataSeries를 업데이트
102
+ dataSeries.forEach((ds, index) => {
103
+ ds.clear();
104
+ const relatedDataset = relatedDatasets[index];
105
+ if (relatedDataset) {
106
+ const filteredData = newData[datasets.findIndex(ds => ds.dataKey === relatedDataset.dataKey)].filter(d => typeof d.yValue === 'number');
107
+ if (filteredData.length > 0) {
108
+ ds.appendRange(filteredData.map(d => d.xValue), filteredData.map(d => d.yValue));
109
+ }
99
110
  }
100
111
  });
112
+ // Zoom 및 리렌더링
113
+ setTimeout(() => {
114
+ sciChartSurface.zoomExtents();
115
+ sciChartSurface.invalidateElement();
116
+ }, 200);
101
117
  }
102
118
  catch (error) {
103
- console.log(error);
119
+ console.error('Error updating data series:', error);
104
120
  }
105
- setTimeout(() => {
106
- sciChartSurface.zoomExtents();
107
- sciChartSurface.invalidateElement();
108
- }, 200);
109
121
  });
110
122
  try {
123
+ // Overview 차트 데이터 업데이트
111
124
  this.overviewDataSeries.forEach(ds => ds.clear());
112
125
  newData.forEach((data, index) => {
113
126
  if (this.visibleSeries.includes(datasets[index].dataKey)) {
@@ -119,7 +132,7 @@ let OxSciChartMultiple = OxSciChartMultiple_1 = class OxSciChartMultiple extends
119
132
  });
120
133
  }
121
134
  catch (error) {
122
- console.log(error);
135
+ console.error('Error updating overview data series:', error);
123
136
  }
124
137
  }
125
138
  get dataSet() {
@@ -153,7 +166,7 @@ let OxSciChartMultiple = OxSciChartMultiple_1 = class OxSciChartMultiple extends
153
166
  return html `
154
167
  <div id=${this.containerId + '-overview'} class="overview" ?hidden=${!this.showOverview}></div>
155
168
  <div id="chart-group">
156
- ${datasets.map(({ dataKey }) => keyed(dataKey, html `
169
+ ${this.visibleSeries.map(dataKey => keyed(dataKey, html `
157
170
  <div
158
171
  id=${this.containerId + '-' + dataKey}
159
172
  class="grouped-chart"
@@ -189,6 +202,7 @@ let OxSciChartMultiple = OxSciChartMultiple_1 = class OxSciChartMultiple extends
189
202
  }
190
203
  }
191
204
  async addChart(dataKey) {
205
+ var _a, _b;
192
206
  const groupedChart = {
193
207
  dataKey: '',
194
208
  sciChartSurface: undefined,
@@ -196,35 +210,37 @@ let OxSciChartMultiple = OxSciChartMultiple_1 = class OxSciChartMultiple extends
196
210
  };
197
211
  const { data = {}, options = {} } = this.config || {};
198
212
  const { datasets = [] } = data;
199
- const dataset = datasets.find(dataset => dataset.dataKey == dataKey);
200
- if (!dataset) {
213
+ const primaryDataset = datasets.find(dataset => dataset.dataKey == dataKey);
214
+ if (!primaryDataset) {
201
215
  return;
202
216
  }
203
- const { scales } = options;
204
- const { yAxes = [] } = scales || {};
205
- const { valueFormat } = dataset;
217
+ // 해당 dataKey로 시작하는 모든 시리즈를 함께 그룹화하여 차트를 구성
218
+ const relatedDatasets = datasets.filter(dataset => { var _a; return (_a = dataset.dataKey) === null || _a === void 0 ? void 0 : _a.startsWith(dataKey); });
206
219
  const yAxis = {
207
- ...yAxes[0],
208
- axisTitle: dataset === null || dataset === void 0 ? void 0 : dataset.label
220
+ ...(_b = (_a = options.scales) === null || _a === void 0 ? void 0 : _a.yAxes) === null || _b === void 0 ? void 0 : _b[0],
221
+ axisTitle: primaryDataset === null || primaryDataset === void 0 ? void 0 : primaryDataset.label
209
222
  };
210
223
  const config = {
211
224
  ...this.config,
212
225
  data: {
213
- datasets: [dataset]
226
+ datasets: relatedDatasets // 이 차트에 포함될 모든 관련 시리즈들
214
227
  },
215
228
  options: {
216
229
  ...options,
217
230
  scales: {
218
- ...scales,
231
+ ...options.scales,
219
232
  yAxes: [yAxis]
220
233
  }
221
234
  }
222
235
  };
223
236
  const container = this.renderRoot.querySelector(`#${this.containerId + '-' + dataKey}`);
224
- var { chart, dataSeries } = (await buildSciChart(config, container, { fontSize: 14, fontFamily: 'Roboto', fontColor: undefined }, { precision: valueFormat ? calculatePrecision(valueFormat) : undefined, grouped: this.containerId }));
237
+ var { chart, dataSeries } = (await buildSciChart(config, container, { fontSize: 14, fontFamily: 'Roboto', fontColor: undefined }, {
238
+ precision: primaryDataset.valueFormat ? calculatePrecision(primaryDataset.valueFormat) : undefined,
239
+ grouped: this.containerId
240
+ }));
225
241
  this.verticalGroup.addSurfaceToGroup(chart.sciChartSurface);
226
242
  this.synchronizer.addAxis(chart.sciChartSurface.xAxes.get(0));
227
- groupedChart.dataKey = config.data.datasets[0].dataKey;
243
+ groupedChart.dataKey = primaryDataset.dataKey;
228
244
  groupedChart.sciChartSurface = chart.sciChartSurface;
229
245
  groupedChart.dataSeries = dataSeries;
230
246
  this.groupCharts = this.groupSorter([...this.groupCharts, groupedChart]);
@@ -1 +1 @@
1
- {"version":3,"file":"ox-scichart-multiple.js","sourceRoot":"","sources":["../../src/charts/ox-scichart-multiple.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,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAa,qBAAqB,EAAE,MAAM,UAAU,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AAC;kDAA+C;AAC/C;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAAqC;AACpC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yDAA6B;AACE;IAAxD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;wDAA6B;AAuBjE;IAAnB,KAAK,CAAC,WAAW,CAAC;6DAAmC;AA3B3C,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAgW9B","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { property, query, customElement } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { calculatePrecision, buildSciChart, buildSciChartOverview } from './scichart-builder'\nimport { AxisSynchroniser } from './axis-synchronizer'\nimport { NumberRange, scaleAxes, SciChartVerticalGroup } from 'scichart'\n\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-scichart-multiple')\nexport class OxSciChartMultiple extends LitElement {\n @property({ type: Object }) config: OperatoChart.ChartConfig | null = null\n @property({ type: Array }) data: { [attr: string]: any }[] = []\n @property({ type: Array }) visibleSeries: string[] = []\n @property({ type: Boolean, attribute: 'show-overview' }) showOverview: boolean = true\n\n private synchronizer: AxisSynchroniser = new AxisSynchroniser(new NumberRange(200, 500))\n private verticalGroup: SciChartVerticalGroup = new SciChartVerticalGroup()\n\n private isInitializing: boolean = false\n private overviewChart: any = null\n private overviewDataSeries: any[] = []\n private groupCharts: {\n dataKey: string\n sciChartSurface: any\n dataSeries: any[]\n }[] = []\n\n /*\n [주의]\n ox-scichart container의 id를 글로벌 유니크하게 해야한다. \n SciChart가 특별히 container의 id를 기반으로 하위 컴포넌트를 구성하고 있기 때문이다.\n shadowDom 안에 있는 container 이더라도, 글로벌 유니크한 id를 제공해야 한다.\n 그렇지 않으면, 단 하나의 차트만 제대로 렌더링된다.\n */\n private containerId: string = 'ox-scichart-multiple' + ++OxSciChartMultiple.idx\n\n @query('.overview') overviewContainer!: HTMLDivElement\n\n static idx: number = 0\n\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n width: 100%;\n height: 100%;\n }\n\n .overview {\n height: 80px;\n }\n\n #chart-group {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n }\n\n .grouped-chart {\n flex: 1;\n\n min-height: 25%;\n }\n\n [hidden] {\n display: none;\n }\n `\n ]\n\n async initializeSciChart() {\n this.cleanup()\n\n const { chart, dataSeries } =\n (await buildSciChartOverview(this.config, this.overviewContainer, {}, this.synchronizer)) || {}\n\n this.verticalGroup.addSurfaceToGroup(chart.sciChartSurface)\n\n this.overviewChart = chart\n this.overviewDataSeries = dataSeries!\n }\n\n async updated(changedProperties: Map<string | number | symbol, unknown>) {\n var needDataUpdate = false\n\n if (changedProperties.has('config') && this.config) {\n this.isInitializing = true\n await this.initializeSciChart()\n this.isInitializing = false\n needDataUpdate = true\n }\n\n if (changedProperties.has('visibleSeries')) {\n if (this.isInitializing) {\n await this.ensureInitialization()\n }\n await this.updateSeries(this.visibleSeries, changedProperties.get('visibleSeries') as string[])\n needDataUpdate = true\n }\n\n if (changedProperties.has('data')) {\n needDataUpdate = true\n }\n\n if (needDataUpdate) {\n await this.updateDataSeries()\n }\n }\n\n private async ensureInitialization() {\n while (this.isInitializing) {\n await new Promise(resolve => setTimeout(resolve, 100)) // Check every 100ms\n }\n }\n\n cleanup() {\n this.cleanupGroup()\n\n if (this.overviewChart) {\n this.overviewChart.sciChartSurface?.delete()\n this.overviewChart = null\n }\n }\n\n cleanupGroup() {\n this.groupCharts.forEach(chart => {\n if (chart.sciChartSurface) {\n this.synchronizer.removeAxis(chart.sciChartSurface.xAxes.get(0))\n this.verticalGroup.removeSurface(chart.sciChartSurface)\n chart.sciChartSurface.delete()\n }\n })\n\n this.groupCharts.length = 0\n }\n\n async updateDataSeries() {\n const { config, data } = this\n const { datasets = [], labelDataKey: attrX } = config?.data || {}\n\n if (!(data instanceof Array) || !attrX) {\n return []\n }\n\n const newData = this.dataSet\n\n ;(this.groupCharts || []).forEach(({ dataKey, sciChartSurface, dataSeries }) => {\n try {\n dataSeries.forEach(ds => ds.clear())\n const dataSet = newData.filter((data, index) => dataKey == datasets[index].dataKey!)\n\n dataSet.forEach((data, index) => {\n const filteredData = data.filter(d => typeof d.yValue === 'number')\n\n if (filteredData.length > 0) {\n dataSeries[index].appendRange(\n filteredData.map(d => d.xValue),\n filteredData.map(d => d.yValue)\n )\n }\n })\n } catch (error) {\n console.log(error)\n }\n\n setTimeout(() => {\n sciChartSurface.zoomExtents()\n sciChartSurface.invalidateElement()\n }, 200)\n })\n\n try {\n this.overviewDataSeries.forEach(ds => ds.clear())\n\n newData.forEach((data, index) => {\n if (this.visibleSeries.includes(datasets[index].dataKey!)) {\n const filteredData = data.filter(d => typeof d.yValue === 'number')\n if (filteredData.length > 0) {\n this.overviewDataSeries[index].appendRange(\n filteredData.map(d => d.xValue),\n filteredData.map(d => d.yValue)\n )\n }\n }\n })\n } catch (error) {\n console.log(error)\n }\n }\n\n get dataSet(): { xValue: number; yValue: number }[][] {\n const { config, data } = this\n const { datasets = [], labelDataKey: attrX } = config?.data || {}\n\n if (!(data instanceof Array) || !attrX) {\n return []\n }\n\n return datasets.map(dataset => {\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[dataset.dataKey!]\n }\n })\n .filter(Boolean) as { xValue: number; yValue: number }[]\n })\n }\n\n render() {\n const { datasets = [] } = this.config?.data || {}\n\n return html`\n <div id=${this.containerId + '-overview'} class=\"overview\" ?hidden=${!this.showOverview}></div>\n <div id=\"chart-group\">\n ${datasets.map(({ dataKey }) =>\n keyed(\n dataKey,\n html`\n <div\n id=${this.containerId + '-' + dataKey}\n class=\"grouped-chart\"\n ?hidden=${!this.visibleSeries.includes(dataKey!)}\n ></div>\n `\n )\n )}\n </div>\n `\n }\n\n async buildChartGroup() {\n this.cleanupGroup()\n\n const { config } = this\n const { datasets = [] } = config?.data || {}\n\n await Promise.all(\n datasets\n .filter(dataset => this.visibleSeries.includes(dataset.dataKey!))\n .map(async dataset => {\n await this.addChart(dataset.dataKey!)\n })\n )\n }\n\n async updateSeries(after: string[], before: string[]) {\n /* 기존 시리즈와 새로운 시리즈의 차이를 비교해서, before에는 있는데, after에는 없으면 await removeChart(string)를 호출하고, after에는 있는데, before에는 없으면, addChart(string) 한다. */\n // before에는 있는데 after에는 없는 시리즈를 제거합니다.\n for (const series of before || []) {\n if (!after.includes(series)) {\n await this.removeChart(series)\n }\n }\n\n // after에는 있는데 before에는 없는 시리즈를 추가합니다.\n for (const series of after || []) {\n if (!before || !before.includes(series)) {\n await this.addChart(series)\n }\n }\n }\n\n async addChart(dataKey: string) {\n const groupedChart = {\n dataKey: '',\n sciChartSurface: undefined,\n dataSeries: [] as any[]\n }\n\n const { data = {}, options = {} } = this.config || {}\n const { datasets = [] } = data as OperatoChart.ChartData\n const dataset = datasets.find(dataset => dataset.dataKey == dataKey)\n\n if (!dataset) {\n return\n }\n\n const { scales } = options\n const { yAxes = [] } = scales || {}\n const { valueFormat } = dataset\n\n const yAxis = {\n ...yAxes[0],\n axisTitle: dataset?.label\n }\n\n const config = {\n ...this.config,\n data: {\n datasets: [dataset]\n },\n options: {\n ...options,\n scales: {\n ...scales,\n yAxes: [yAxis]\n }\n }\n }\n\n const container = this.renderRoot.querySelector(`#${this.containerId + '-' + dataKey}`)\n var { chart, dataSeries } = (await buildSciChart(\n config,\n container,\n { fontSize: 14, fontFamily: 'Roboto', fontColor: undefined },\n { precision: valueFormat ? calculatePrecision(valueFormat) : undefined, grouped: this.containerId }\n ))!\n\n this.verticalGroup.addSurfaceToGroup(chart.sciChartSurface)\n this.synchronizer.addAxis(chart.sciChartSurface.xAxes.get(0))\n\n groupedChart.dataKey = config.data.datasets[0]!.dataKey!\n groupedChart.sciChartSurface = chart.sciChartSurface\n groupedChart.dataSeries = dataSeries\n\n this.groupCharts = this.groupSorter([...this.groupCharts, groupedChart])\n }\n\n removeChart(dataKey: string) {\n const index = this.groupCharts.findIndex((chart: any) => chart.dataKey == dataKey)\n const [groupedChart] = this.groupCharts.splice(index, 1)\n\n if (!groupedChart) {\n return\n }\n\n this.verticalGroup.removeSurface(groupedChart.sciChartSurface)\n this.synchronizer.removeAxis(groupedChart.sciChartSurface.xAxes.get(0))\n\n groupedChart.sciChartSurface.delete()\n groupedChart.sciChartSurface = undefined\n\n this.groupCharts = this.groupSorter(this.groupCharts)\n }\n\n groupSorter(group: any[]) {\n return group.sort(\n (a, b) =>\n this.visibleSeries.findIndex((s: any) => s.dataKey == a.dataKey) -\n this.visibleSeries.findIndex((s: any) => s.dataKey == b.dataKey)\n )\n }\n\n async appendData(appendum: { [attr: string]: any }[]) {}\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ox-scichart-multiple': OxSciChartMultiple\n }\n}\n"]}
1
+ {"version":3,"file":"ox-scichart-multiple.js","sourceRoot":"","sources":["../../src/charts/ox-scichart-multiple.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,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAa,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,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,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC;YAChE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,CACnE,CAAA;IACH,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAAmC,IAAG,CAAC;;AA1VjD,sBAAG,GAAW,CAAC,AAAZ,CAAY;AAEf,yBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,AAjCY,CAiCZ;AA/D2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAA+C;AAC/C;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAAqC;AACpC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yDAA6B;AACE;IAAxD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;wDAA6B;AAuBjE;IAAnB,KAAK,CAAC,WAAW,CAAC;6DAAmC;AA3B3C,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAwX9B","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { property, query, customElement } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { calculatePrecision, buildSciChart, buildSciChartOverview } from './scichart-builder'\nimport { AxisSynchroniser } from './axis-synchronizer'\nimport { NumberRange, scaleAxes, SciChartVerticalGroup } from 'scichart'\n\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-scichart-multiple')\nexport class OxSciChartMultiple extends LitElement {\n @property({ type: Object }) config: OperatoChart.ChartConfig | null = null\n @property({ type: Array }) data: { [attr: string]: any }[] = []\n @property({ type: Array }) visibleSeries: string[] = []\n @property({ type: Boolean, attribute: 'show-overview' }) showOverview: boolean = true\n\n private synchronizer: AxisSynchroniser = new AxisSynchroniser(new NumberRange(200, 500))\n private verticalGroup: SciChartVerticalGroup = new SciChartVerticalGroup()\n\n private isInitializing: boolean = false\n private overviewChart: any = null\n private overviewDataSeries: any[] = []\n private groupCharts: {\n dataKey: string\n sciChartSurface: any\n dataSeries: any[]\n }[] = []\n\n /*\n [주의]\n ox-scichart container의 id를 글로벌 유니크하게 해야한다. \n SciChart가 특별히 container의 id를 기반으로 하위 컴포넌트를 구성하고 있기 때문이다.\n shadowDom 안에 있는 container 이더라도, 글로벌 유니크한 id를 제공해야 한다.\n 그렇지 않으면, 단 하나의 차트만 제대로 렌더링된다.\n */\n private containerId: string = 'ox-scichart-multiple' + ++OxSciChartMultiple.idx\n\n @query('.overview') overviewContainer!: HTMLDivElement\n\n static idx: number = 0\n\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n width: 100%;\n height: 100%;\n }\n\n .overview {\n height: 80px;\n }\n\n #chart-group {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n }\n\n .grouped-chart {\n flex: 1;\n\n min-height: 25%;\n }\n\n [hidden] {\n display: none;\n }\n `\n ]\n\n async initializeSciChart() {\n this.cleanup()\n\n // Overview 차트는 정확히 일치하는 시리즈 이름만 포함\n const overviewDatasets =\n this.config?.data.datasets.filter(dataset => this.visibleSeries.includes(dataset.dataKey!)) || []\n\n const { chart, dataSeries } =\n (await buildSciChartOverview(\n {\n ...this.config,\n data: { datasets: overviewDatasets }\n },\n this.overviewContainer,\n {},\n this.synchronizer\n )) || {}\n\n this.verticalGroup.addSurfaceToGroup(chart.sciChartSurface)\n\n this.overviewChart = chart\n this.overviewDataSeries = dataSeries!\n }\n\n async updated(changedProperties: Map<string | number | symbol, unknown>) {\n var needDataUpdate = false\n\n if (changedProperties.has('config') && this.config) {\n this.isInitializing = true\n await this.initializeSciChart()\n this.isInitializing = false\n needDataUpdate = true\n }\n\n if (changedProperties.has('visibleSeries')) {\n if (this.isInitializing) {\n await this.ensureInitialization()\n }\n await this.updateSeries(this.visibleSeries, changedProperties.get('visibleSeries') as string[])\n needDataUpdate = true\n }\n\n if (changedProperties.has('data')) {\n needDataUpdate = true\n }\n\n if (needDataUpdate) {\n await this.updateDataSeries()\n }\n }\n\n private async ensureInitialization() {\n while (this.isInitializing) {\n await new Promise(resolve => setTimeout(resolve, 100)) // Check every 100ms\n }\n }\n\n cleanup() {\n this.cleanupGroup()\n\n if (this.overviewChart) {\n this.overviewChart.sciChartSurface?.delete()\n this.overviewChart = null\n }\n }\n\n cleanupGroup() {\n this.groupCharts.forEach(chart => {\n if (chart.sciChartSurface) {\n this.synchronizer.removeAxis(chart.sciChartSurface.xAxes.get(0))\n this.verticalGroup.removeSurface(chart.sciChartSurface)\n chart.sciChartSurface.delete()\n }\n })\n\n this.groupCharts.length = 0\n }\n\n async updateDataSeries() {\n const { config, data } = this\n const { datasets = [], labelDataKey: attrX } = config?.data || {}\n\n if (!(data instanceof Array) || !attrX) {\n return []\n }\n\n const newData = this.dataSet\n\n this.groupCharts.forEach(({ dataKey, sciChartSurface, dataSeries }) => {\n try {\n // dataKey로 시작하는 모든 시리즈를 업데이트\n const relatedDatasets = datasets.filter(dataset => dataset.dataKey?.startsWith(dataKey))\n\n // 각 relatedDatasets에 대해 해당하는 dataSeries를 업데이트\n dataSeries.forEach((ds, index) => {\n ds.clear()\n\n const relatedDataset = relatedDatasets[index]\n if (relatedDataset) {\n const filteredData = newData[datasets.findIndex(ds => ds.dataKey === relatedDataset.dataKey)].filter(\n d => typeof d.yValue === 'number'\n )\n\n if (filteredData.length > 0) {\n ds.appendRange(\n filteredData.map(d => d.xValue),\n filteredData.map(d => d.yValue)\n )\n }\n }\n })\n\n // Zoom 및 리렌더링\n setTimeout(() => {\n sciChartSurface.zoomExtents()\n sciChartSurface.invalidateElement()\n }, 200)\n } catch (error) {\n console.error('Error updating data series:', error)\n }\n })\n\n try {\n // Overview 차트 데이터 업데이트\n this.overviewDataSeries.forEach(ds => ds.clear())\n\n newData.forEach((data, index) => {\n if (this.visibleSeries.includes(datasets[index].dataKey!)) {\n const filteredData = data.filter(d => typeof d.yValue === 'number')\n if (filteredData.length > 0) {\n this.overviewDataSeries[index].appendRange(\n filteredData.map(d => d.xValue),\n filteredData.map(d => d.yValue)\n )\n }\n }\n })\n } catch (error) {\n console.error('Error updating overview data series:', error)\n }\n }\n\n get dataSet(): { xValue: number; yValue: number }[][] {\n const { config, data } = this\n const { datasets = [], labelDataKey: attrX } = config?.data || {}\n\n if (!(data instanceof Array) || !attrX) {\n return []\n }\n\n return datasets.map(dataset => {\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[dataset.dataKey!]\n }\n })\n .filter(Boolean) as { xValue: number; yValue: number }[]\n })\n }\n\n render() {\n const { datasets = [] } = this.config?.data || {}\n\n return html`\n <div id=${this.containerId + '-overview'} class=\"overview\" ?hidden=${!this.showOverview}></div>\n <div id=\"chart-group\">\n ${this.visibleSeries.map(dataKey =>\n keyed(\n dataKey,\n html`\n <div\n id=${this.containerId + '-' + dataKey}\n class=\"grouped-chart\"\n ?hidden=${!this.visibleSeries.includes(dataKey!)}\n ></div>\n `\n )\n )}\n </div>\n `\n }\n\n async buildChartGroup() {\n this.cleanupGroup()\n\n const { config } = this\n const { datasets = [] } = config?.data || {}\n\n await Promise.all(\n datasets\n .filter(dataset => this.visibleSeries.includes(dataset.dataKey!))\n .map(async dataset => {\n await this.addChart(dataset.dataKey!)\n })\n )\n }\n\n async updateSeries(after: string[], before: string[]) {\n /* 기존 시리즈와 새로운 시리즈의 차이를 비교해서, before에는 있는데, after에는 없으면 await removeChart(string)를 호출하고, after에는 있는데, before에는 없으면, addChart(string) 한다. */\n // before에는 있는데 after에는 없는 시리즈를 제거합니다.\n for (const series of before || []) {\n if (!after.includes(series)) {\n await this.removeChart(series)\n }\n }\n\n // after에는 있는데 before에는 없는 시리즈를 추가합니다.\n for (const series of after || []) {\n if (!before || !before.includes(series)) {\n await this.addChart(series)\n }\n }\n }\n\n async addChart(dataKey: string) {\n const groupedChart = {\n dataKey: '',\n sciChartSurface: undefined,\n dataSeries: [] as any[]\n }\n\n const { data = {}, options = {} } = this.config || {}\n const { datasets = [] } = data as OperatoChart.ChartData\n const primaryDataset = datasets.find(dataset => dataset.dataKey == dataKey)\n\n if (!primaryDataset) {\n return\n }\n\n // 해당 dataKey로 시작하는 모든 시리즈를 함께 그룹화하여 차트를 구성\n const relatedDatasets = datasets.filter(dataset => dataset.dataKey?.startsWith(dataKey))\n\n const yAxis = {\n ...options.scales?.yAxes?.[0],\n axisTitle: primaryDataset?.label\n }\n\n const config = {\n ...this.config,\n data: {\n datasets: relatedDatasets // 이 차트에 포함될 모든 관련 시리즈들\n },\n options: {\n ...options,\n scales: {\n ...options.scales,\n yAxes: [yAxis]\n }\n }\n }\n\n const container = this.renderRoot.querySelector(`#${this.containerId + '-' + dataKey}`)\n var { chart, dataSeries } = (await buildSciChart(\n config,\n container,\n { fontSize: 14, fontFamily: 'Roboto', fontColor: undefined },\n {\n precision: primaryDataset.valueFormat ? calculatePrecision(primaryDataset.valueFormat) : undefined,\n grouped: this.containerId\n }\n ))!\n\n this.verticalGroup.addSurfaceToGroup(chart.sciChartSurface)\n this.synchronizer.addAxis(chart.sciChartSurface.xAxes.get(0))\n\n groupedChart.dataKey = primaryDataset.dataKey!\n groupedChart.sciChartSurface = chart.sciChartSurface\n groupedChart.dataSeries = dataSeries\n\n this.groupCharts = this.groupSorter([...this.groupCharts, groupedChart])\n }\n\n removeChart(dataKey: string) {\n const index = this.groupCharts.findIndex((chart: any) => chart.dataKey == dataKey)\n const [groupedChart] = this.groupCharts.splice(index, 1)\n\n if (!groupedChart) {\n return\n }\n\n this.verticalGroup.removeSurface(groupedChart.sciChartSurface)\n this.synchronizer.removeAxis(groupedChart.sciChartSurface.xAxes.get(0))\n\n groupedChart.sciChartSurface.delete()\n groupedChart.sciChartSurface = undefined\n\n this.groupCharts = this.groupSorter(this.groupCharts)\n }\n\n groupSorter(group: any[]) {\n return group.sort(\n (a, b) =>\n this.visibleSeries.findIndex((s: any) => s.dataKey == a.dataKey) -\n this.visibleSeries.findIndex((s: any) => s.dataKey == b.dataKey)\n )\n }\n\n async appendData(appendum: { [attr: string]: any }[]) {}\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ox-scichart-multiple': OxSciChartMultiple\n }\n}\n"]}
@@ -29,6 +29,21 @@
29
29
  "date": 1722651589101,
30
30
  "name": "logs/application-2024-08-03-11.log",
31
31
  "hash": "6f7f89cca26433ba6ef7c8e145aee345186d7990cb0c50d4b8d9a4d794b8c38f"
32
+ },
33
+ {
34
+ "date": 1722657709918,
35
+ "name": "logs/application-2024-08-03-13.log",
36
+ "hash": "4bd4af7d674f4412876d94193c32be4c08f20092acfde2f90150ceeb7c726c95"
37
+ },
38
+ {
39
+ "date": 1722662928607,
40
+ "name": "logs/application-2024-08-03-14.log",
41
+ "hash": "3799f3a4d7c26622ec2b9f11ee675de8396fd9980cc9827f61db8f2c4bc04ab9"
42
+ },
43
+ {
44
+ "date": 1722665632788,
45
+ "name": "logs/application-2024-08-03-15.log",
46
+ "hash": "c025196e6f7631697f4c18aef8a48f595e64f83cabd6c60a5fe73159787fdad4"
32
47
  }
33
48
  ],
34
49
  "hashType": "sha256"
@@ -79,6 +79,21 @@
79
79
  "date": 1722651590967,
80
80
  "name": "logs/connections-2024-08-03-11.log",
81
81
  "hash": "1b245d72805938e57c83fec9b5033321a5e153c8ecc65041e5b700129c49f331"
82
+ },
83
+ {
84
+ "date": 1722657711823,
85
+ "name": "logs/connections-2024-08-03-13.log",
86
+ "hash": "aeccf4a8073437efcaec98dc88b278940ed758abe2dc021d5ab8c69cdbf1d0f2"
87
+ },
88
+ {
89
+ "date": 1722662930339,
90
+ "name": "logs/connections-2024-08-03-14.log",
91
+ "hash": "3207847a51f1cbb0edb2e73d19864c48486e00deb49734ec0fb790ac857c123b"
92
+ },
93
+ {
94
+ "date": 1722665634654,
95
+ "name": "logs/connections-2024-08-03-15.log",
96
+ "hash": "246a803a4839acc83ce50eb2d9559f6d60a8117917ba924a99f405c290e2eb25"
82
97
  }
83
98
  ],
84
99
  "hashType": "sha256"
@@ -0,0 +1,105 @@
1
+ 2024-08-03T13:01:51+09:00 info: File Storage is Ready.
2
+ 2024-08-03T13:01:52+09:00 error: Error: Cannot find module 'oracledb'
3
+ Require stack:
4
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
5
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
6
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
7
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
8
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
9
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
10
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
11
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
12
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
13
+ at Module._load (node:internal/modules/cjs/loader:986:27)
14
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
15
+ at require (node:internal/modules/helpers:179:18)
16
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js:7:20)
17
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
18
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
19
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
20
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
21
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
22
+ at require (node:internal/modules/helpers:179:18)
23
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js:11:1)
24
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
25
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
26
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
27
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
28
+ 2024-08-03T13:01:52+09:00 error: Error: Cannot find module 'oracledb'
29
+ Require stack:
30
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
31
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
32
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
33
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
34
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
35
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
36
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
37
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
38
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
39
+ at Module._load (node:internal/modules/cjs/loader:986:27)
40
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
41
+ at require (node:internal/modules/helpers:179:18)
42
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js:9:20)
43
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
44
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
45
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
46
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
47
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
48
+ at require (node:internal/modules/helpers:179:18)
49
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js:43:1)
50
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
51
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
52
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
53
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
54
+ 2024-08-03T13:01:52+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
55
+ Require stack:
56
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
57
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
58
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/index.js
59
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
60
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
61
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
62
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
63
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
64
+ at Module._load (node:internal/modules/cjs/loader:986:27)
65
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
66
+ at require (node:internal/modules/helpers:179:18)
67
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js:10:17)
68
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
69
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
70
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
71
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
72
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
73
+ at require (node:internal/modules/helpers:179:18)
74
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js:4:17)
75
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
76
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
77
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
78
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
79
+ 2024-08-03T13:01:52+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
80
+ Require stack:
81
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
82
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
83
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
84
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
85
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
86
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
87
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
88
+ at Module._load (node:internal/modules/cjs/loader:986:27)
89
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
90
+ at require (node:internal/modules/helpers:179:18)
91
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js:8:19)
92
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
93
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
94
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
95
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
96
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
97
+ at require (node:internal/modules/helpers:179:18)
98
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js:4:22)
99
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
100
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
101
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
102
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
103
+ 2024-08-03T13:01:53+09:00 info: Default DataSource established
104
+ 2024-08-03T13:01:54+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
+ 2024-08-03T13:01:54+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -0,0 +1,105 @@
1
+ 2024-08-03T14:28:49+09:00 info: File Storage is Ready.
2
+ 2024-08-03T14:28:50+09:00 error: Error: Cannot find module 'oracledb'
3
+ Require stack:
4
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
5
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
6
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
7
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
8
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
9
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
10
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
11
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
12
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
13
+ at Module._load (node:internal/modules/cjs/loader:986:27)
14
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
15
+ at require (node:internal/modules/helpers:179:18)
16
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js:7:20)
17
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
18
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
19
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
20
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
21
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
22
+ at require (node:internal/modules/helpers:179:18)
23
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js:11:1)
24
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
25
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
26
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
27
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
28
+ 2024-08-03T14:28:50+09:00 error: Error: Cannot find module 'oracledb'
29
+ Require stack:
30
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
31
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
32
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
33
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
34
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
35
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
36
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
37
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
38
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
39
+ at Module._load (node:internal/modules/cjs/loader:986:27)
40
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
41
+ at require (node:internal/modules/helpers:179:18)
42
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js:9:20)
43
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
44
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
45
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
46
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
47
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
48
+ at require (node:internal/modules/helpers:179:18)
49
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js:43:1)
50
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
51
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
52
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
53
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
54
+ 2024-08-03T14:28:50+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
55
+ Require stack:
56
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
57
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
58
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/index.js
59
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
60
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
61
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
62
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
63
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
64
+ at Module._load (node:internal/modules/cjs/loader:986:27)
65
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
66
+ at require (node:internal/modules/helpers:179:18)
67
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js:10:17)
68
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
69
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
70
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
71
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
72
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
73
+ at require (node:internal/modules/helpers:179:18)
74
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js:4:17)
75
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
76
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
77
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
78
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
79
+ 2024-08-03T14:28:51+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
80
+ Require stack:
81
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
82
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
83
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
84
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
85
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
86
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
87
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
88
+ at Module._load (node:internal/modules/cjs/loader:986:27)
89
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
90
+ at require (node:internal/modules/helpers:179:18)
91
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js:8:19)
92
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
93
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
94
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
95
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
96
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
97
+ at require (node:internal/modules/helpers:179:18)
98
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js:4:22)
99
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
100
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
101
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
102
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
103
+ 2024-08-03T14:28:51+09:00 info: Default DataSource established
104
+ 2024-08-03T14:28:52+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
+ 2024-08-03T14:28:52+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql