@operato/scene-scichart 2.0.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +13 -0
  3. package/assets/favicon.ico +0 -0
  4. package/assets/images/spinner.png +0 -0
  5. package/db.sqlite +0 -0
  6. package/dist/charts/sci-candle-stick-chart.d.ts +19 -0
  7. package/dist/charts/sci-candle-stick-chart.js +248 -0
  8. package/dist/charts/sci-candle-stick-chart.js.map +1 -0
  9. package/dist/charts/volume-pallette-provider.d.ts +12 -0
  10. package/dist/charts/volume-pallette-provider.js +21 -0
  11. package/dist/charts/volume-pallette-provider.js.map +1 -0
  12. package/dist/data/binance-rest-client.d.ts +14 -0
  13. package/dist/data/binance-rest-client.js +53 -0
  14. package/dist/data/binance-rest-client.js.map +1 -0
  15. package/dist/editors/index.d.ts +0 -0
  16. package/dist/editors/index.js +2 -0
  17. package/dist/editors/index.js.map +1 -0
  18. package/dist/groups/index.d.ts +0 -0
  19. package/dist/groups/index.js +2 -0
  20. package/dist/groups/index.js.map +1 -0
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.js +3 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/scichart-candle-stick.d.ts +10 -0
  25. package/dist/scichart-candle-stick.js +50 -0
  26. package/dist/scichart-candle-stick.js.map +1 -0
  27. package/dist/scichart-timeseries.d.ts +23 -0
  28. package/dist/scichart-timeseries.js +118 -0
  29. package/dist/scichart-timeseries.js.map +1 -0
  30. package/dist/scichart.d.ts +20 -0
  31. package/dist/scichart.js +70 -0
  32. package/dist/scichart.js.map +1 -0
  33. package/dist/templates/index.d.ts +14 -0
  34. package/dist/templates/index.js +4 -0
  35. package/dist/templates/index.js.map +1 -0
  36. package/dist/templates/scichart-candle-stick.d.ts +14 -0
  37. package/dist/templates/scichart-candle-stick.js +16 -0
  38. package/dist/templates/scichart-candle-stick.js.map +1 -0
  39. package/dist/templates/scichart.d.ts +14 -0
  40. package/dist/templates/scichart.js +16 -0
  41. package/dist/templates/scichart.js.map +1 -0
  42. package/dist/themes/app-theme.d.ts +56 -0
  43. package/dist/themes/app-theme.js +35 -0
  44. package/dist/themes/app-theme.js.map +1 -0
  45. package/icons/no-image.png +0 -0
  46. package/icons/scichart-candle-stick.png +0 -0
  47. package/icons/scichart.png +0 -0
  48. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +25 -0
  49. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +30 -0
  50. package/logs/application-2024-03-15-04.log +28 -0
  51. package/logs/application-2024-03-17-03.log +12 -0
  52. package/logs/application-2024-03-17-04.log +6 -0
  53. package/logs/connections-2024-03-15-03.log +82 -0
  54. package/logs/connections-2024-03-15-04.log +164 -0
  55. package/logs/connections-2024-03-17-03.log +88 -0
  56. package/logs/connections-2024-03-17-04.log +44 -0
  57. package/package.json +62 -0
  58. package/schema.graphql +3969 -0
  59. package/src/charts/sci-candle-stick-chart.ts +305 -0
  60. package/src/charts/volume-pallette-provider.ts +41 -0
  61. package/src/data/binance-rest-client.ts +74 -0
  62. package/src/editors/index.ts +0 -0
  63. package/src/groups/index.ts +0 -0
  64. package/src/index.ts +2 -0
  65. package/src/scichart-candle-stick.ts +60 -0
  66. package/src/scichart-timeseries.ts +156 -0
  67. package/src/scichart.ts +88 -0
  68. package/src/templates/index.ts +4 -0
  69. package/src/templates/scichart-candle-stick.ts +16 -0
  70. package/src/templates/scichart.ts +16 -0
  71. package/src/themes/app-theme.ts +72 -0
  72. package/things-scene.config.js +9 -0
  73. package/translations/en.json +3 -0
  74. package/translations/ja.json +3 -0
  75. package/translations/ko.json +3 -0
  76. package/translations/ms.json +3 -0
  77. package/translations/zh.json +3 -0
  78. package/tsconfig.json +22 -0
  79. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+
5
+ const NATURE = {
6
+ mutable: false,
7
+ resizable: true,
8
+ rotatable: true,
9
+ properties: [
10
+ {
11
+ type: 'textarea',
12
+ label: 'config',
13
+ name: 'config'
14
+ }
15
+ ]
16
+ }
17
+
18
+ import { Component, HTMLOverlayContainer, Properties, ComponentNature, error } from '@hatiolab/things-scene'
19
+
20
+ import { SciChartSurface } from 'scichart/Charting/Visuals/SciChartSurface'
21
+ import { NumericAxis } from 'scichart/Charting/Visuals/Axis/NumericAxis'
22
+
23
+ SciChartSurface.configure({
24
+ dataUrl: `/node_modules/scichart/_wasm/scichart2d.data`,
25
+ wasmUrl: `/node_modules/scichart/_wasm/scichart2d.wasm`
26
+ })
27
+
28
+ export default class Scichart extends HTMLOverlayContainer {
29
+ static get nature() {
30
+ return NATURE
31
+ }
32
+
33
+ _anchor?: HTMLDivElement
34
+
35
+ async oncreate_element(div: HTMLDivElement) {
36
+ const { sciChartSurface, wasmContext } = await SciChartSurface.create(div)
37
+
38
+ // SciChartSurface.setRuntimeLicenseKey('YOUR_RUNTIME_KEY')
39
+
40
+ const xAxis = new NumericAxis(wasmContext)
41
+ const yAxis = new NumericAxis(wasmContext)
42
+
43
+ sciChartSurface.xAxes.add(xAxis)
44
+ sciChartSurface.yAxes.add(yAxis)
45
+ }
46
+
47
+ dispose() {
48
+ super.dispose()
49
+
50
+ delete this._anchor
51
+ }
52
+
53
+ /*
54
+ * 컴포넌트의 생성 또는 속성 변화 시에 호출되며,
55
+ * 그에 따른 html element의 반영이 필요한 부분을 구현한다.
56
+ *
57
+ * ThingsComponent state => HTML element properties
58
+ */
59
+ setElementProperties(div: HTMLDivElement) {}
60
+
61
+ /*
62
+ * 컴포넌트가 ready 상태가 되거나, 컴포넌트의 속성이 변화될 시 setElementProperties 뒤에 호출된다.
63
+ * 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.
64
+ */
65
+ reposition() {
66
+ super.reposition()
67
+ }
68
+
69
+ get config() {
70
+ var { config, data } = this.state
71
+
72
+ if (typeof config !== 'object') {
73
+ try {
74
+ eval(`config = ${config}`)
75
+ } catch (e) {
76
+ error(e)
77
+ }
78
+ }
79
+
80
+ return config
81
+ }
82
+
83
+ get tagName() {
84
+ return 'div'
85
+ }
86
+ }
87
+
88
+ Component.register('scichart', Scichart)
@@ -0,0 +1,4 @@
1
+ import scichart from './scichart'
2
+ import scichartCandleStick from './scichart-candle-stick'
3
+
4
+ export default [scichart, scichartCandleStick]
@@ -0,0 +1,16 @@
1
+ const icon = new URL('../../icons/scichart-candle-stick.png', import.meta.url).href
2
+
3
+ export default {
4
+ type: 'scichart-candle-stick',
5
+ description: 'scichart-candle-stick',
6
+ /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
7
+ group: 'chartAndGauge',
8
+ icon,
9
+ model: {
10
+ type: 'scichart-candle-stick',
11
+ left: 10,
12
+ top: 10,
13
+ width: 400,
14
+ height: 300
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ const icon = new URL('../../icons/scichart.png', import.meta.url).href
2
+
3
+ export default {
4
+ type: 'scichart',
5
+ description: 'scichart',
6
+ /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
7
+ group: 'chartAndGauge',
8
+ icon,
9
+ model: {
10
+ type: 'scichart',
11
+ left: 10,
12
+ top: 10,
13
+ width: 400,
14
+ height: 300
15
+ }
16
+ }
@@ -0,0 +1,72 @@
1
+ import { IThemeProvider, SciChartJsNavyTheme } from 'scichart'
2
+
3
+ export interface AppThemeBase {
4
+ SciChartJsTheme: IThemeProvider
5
+
6
+ // general colors
7
+ ForegroundColor: string
8
+ Background: string
9
+
10
+ // Series colors
11
+ VividSkyBlue: string
12
+ VividPink: string
13
+ VividTeal: string
14
+ VividOrange: string
15
+ VividBlue: string
16
+ VividPurple: string
17
+ VividGreen: string
18
+ VividRed: string
19
+
20
+ MutedSkyBlue: string
21
+ MutedPink: string
22
+ MutedTeal: string
23
+ MutedOrange: string
24
+ MutedBlue: string
25
+ MutedPurple: string
26
+ MutedRed: string
27
+
28
+ PaleSkyBlue: string
29
+ PalePink: string
30
+ PaleTeal: string
31
+ PaleOrange: string
32
+ PaleBlue: string
33
+ PalePurple: string
34
+ }
35
+
36
+ export class SciChartAppTheme implements AppThemeBase {
37
+ SciChartJsTheme = new SciChartJsNavyTheme()
38
+
39
+ // General colors
40
+ ForegroundColor = '#FFFFFF'
41
+ Background = this.SciChartJsTheme.sciChartBackground
42
+
43
+ // Series colors
44
+ VividSkyBlue = '#50C7E0'
45
+ VividPink = '#EC0F6C'
46
+ VividTeal = '#30BC9A'
47
+ VividOrange = '#F48420'
48
+ VividBlue = '#364BA0'
49
+ VividPurple = '#882B91'
50
+ VividGreen = '#67BDAF'
51
+ VividRed = '#C52E60'
52
+
53
+ DarkIndigo = '#14233C'
54
+ Indigo = '#264B93'
55
+
56
+ MutedSkyBlue = '#83D2F5'
57
+ MutedPink = '#DF69A8'
58
+ MutedTeal = '#7BCAAB'
59
+ MutedOrange = '#E7C565'
60
+ MutedBlue = '#537ABD'
61
+ MutedPurple = '#A16DAE'
62
+ MutedRed = '#DC7969'
63
+
64
+ PaleSkyBlue = '#E4F5FC'
65
+ PalePink = '#EEB3D2'
66
+ PaleTeal = '#B9E0D4'
67
+ PaleOrange = '#F1CFB5'
68
+ PaleBlue = '#B5BEDF'
69
+ PalePurple = '#CFB4D5'
70
+ }
71
+
72
+ export const appTheme = new SciChartAppTheme()
@@ -0,0 +1,9 @@
1
+ // import editors from './dist/editors'
2
+ // import groups from './dist/groups'
3
+ import templates from "./dist/templates";
4
+
5
+ export default {
6
+ templates,
7
+ // editors,
8
+ // groups
9
+ };
@@ -0,0 +1,3 @@
1
+ {
2
+ "keyword": "keyword"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "keyword": "キーワード"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "keyword": "키워드"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "keyword": "[ms] keyword"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "keyword": "关键词"
3
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2018",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "noEmitOnError": true,
7
+ "lib": ["es2019", "dom"],
8
+ "strict": true,
9
+ "esModuleInterop": false,
10
+ "allowJs": true,
11
+ "allowSyntheticDefaultImports": true,
12
+ "experimentalDecorators": true,
13
+ "importHelpers": true,
14
+ "outDir": "dist",
15
+ "sourceMap": true,
16
+ "inlineSources": true,
17
+ "rootDir": "src",
18
+ "declaration": true,
19
+ "incremental": true
20
+ },
21
+ "include": ["**/*.ts", "*.d.ts"]
22
+ }