@operato/scene-gantt 2.0.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +13 -0
  3. package/assets/favicon.ico +0 -0
  4. package/assets/images/spinner.png +0 -0
  5. package/cache/translations/system/en.json +1 -0
  6. package/cache/translations/system/ko.json +1 -0
  7. package/db.sqlite +0 -0
  8. package/dist/data.d.ts +149 -0
  9. package/dist/data.js +1899 -0
  10. package/dist/data.js.map +1 -0
  11. package/dist/groups/index.d.ts +0 -0
  12. package/dist/groups/index.js +2 -0
  13. package/dist/groups/index.js.map +1 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.js +2 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/templates/index.d.ts +14 -0
  18. package/dist/templates/index.js +3 -0
  19. package/dist/templates/index.js.map +1 -0
  20. package/dist/templates/wellstek-gantt.d.ts +14 -0
  21. package/dist/templates/wellstek-gantt.js +16 -0
  22. package/dist/templates/wellstek-gantt.js.map +1 -0
  23. package/dist/wellstek-gantt.d.ts +31 -0
  24. package/dist/wellstek-gantt.js +168 -0
  25. package/dist/wellstek-gantt.js.map +1 -0
  26. package/icons/wellstek-gantt.png +0 -0
  27. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +20 -0
  28. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +35 -0
  29. package/logs/application-2024-05-27-14.log +6 -0
  30. package/logs/application-2024-05-27-17.log +6 -0
  31. package/logs/connections-2024-05-20-22.log +50 -0
  32. package/logs/connections-2024-05-21-00.log +100 -0
  33. package/logs/connections-2024-05-21-01.log +50 -0
  34. package/logs/connections-2024-05-27-14.log +50 -0
  35. package/logs/connections-2024-05-27-17.log +50 -0
  36. package/package.json +62 -0
  37. package/schema.graphql +3988 -0
  38. package/src/data.ts +1898 -0
  39. package/src/groups/index.ts +0 -0
  40. package/src/index.ts +1 -0
  41. package/src/templates/index.ts +3 -0
  42. package/src/templates/wellstek-gantt.ts +16 -0
  43. package/src/wellstek-gantt.ts +190 -0
  44. package/things-scene.config.js +5 -0
  45. package/translations/en.json +12 -0
  46. package/translations/ja.json +12 -0
  47. package/translations/ko.json +13 -0
  48. package/translations/ms.json +12 -0
  49. package/translations/zh.json +13 -0
  50. package/tsconfig.json +23 -0
  51. package/tsconfig.tsbuildinfo +1 -0
  52. package/wellstek-gantt-1.0.2.tgz +0 -0
File without changes
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as WellstekGanttScene } from './wellstek-gantt'
@@ -0,0 +1,3 @@
1
+ import WellstekGantt from './wellstek-gantt'
2
+
3
+ export default [WellstekGantt]
@@ -0,0 +1,16 @@
1
+ const icon = new URL('../../icons/wellstek-gantt.png', import.meta.url).href
2
+
3
+ export default {
4
+ type: 'wellstek-gantt',
5
+ description: 'wellstek-gantt',
6
+ group: 'etc',
7
+ /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
+ icon,
9
+ model: {
10
+ type: 'wellstek-gantt',
11
+ left: 150,
12
+ top: 150,
13
+ width: 300,
14
+ height: 200
15
+ }
16
+ }
@@ -0,0 +1,190 @@
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: 'number',
12
+ label: 'row-height',
13
+ name: 'rowHeight',
14
+ defaultValue: 35
15
+ },
16
+ {
17
+ type: 'number',
18
+ label: 'row-padding',
19
+ name: 'rowPadding',
20
+ defaultValue: 5
21
+ },
22
+ {
23
+ type: 'number',
24
+ label: 'column-offset',
25
+ name: 'columnOffset',
26
+ defaultValue: 15
27
+ },
28
+ {
29
+ type: 'number',
30
+ label: 'magnet-offset',
31
+ name: 'magnetOffset',
32
+ defaultValue: 15
33
+ },
34
+ {
35
+ type: 'number',
36
+ label: 'table-width',
37
+ name: 'tableWidth',
38
+ defaultValue: 140
39
+ },
40
+ {
41
+ type: 'number',
42
+ label: 'min-width',
43
+ name: 'minWidth',
44
+ defaultValue: 1500
45
+ },
46
+ {
47
+ type: 'string',
48
+ label: 'column-unit',
49
+ name: 'columnUnit',
50
+ defaultValue: 'hour'
51
+ },
52
+ {
53
+ type: 'boolean',
54
+ label: 'fit-width',
55
+ name: 'fitWidth',
56
+ defaultValue: false
57
+ },
58
+ {
59
+ type: 'date',
60
+ label: 'from',
61
+ name: 'from',
62
+ defaultValue: '09/25/2023'
63
+ },
64
+ {
65
+ type: 'date',
66
+ label: 'to',
67
+ name: 'to',
68
+ defaultValue: '10/11/2023'
69
+ }
70
+ ]
71
+ }
72
+
73
+ import moment from 'moment'
74
+ import 'wellstek-gantt'
75
+ import { MomentWellstekGanttDateAdapter, WellstekGanttDependencies, WellstekGanttTable } from 'wellstek-gantt'
76
+
77
+ import { data } from './data'
78
+
79
+ import { Component, HTMLOverlayContainer, Properties, error } from '@hatiolab/things-scene'
80
+
81
+ export default class WellstekGanttScene extends HTMLOverlayContainer {
82
+ static get nature() {
83
+ return NATURE
84
+ }
85
+
86
+ oncreate_element(element: HTMLElement) {
87
+ element.style.width = '100%'
88
+ element.style.height = '100%'
89
+ }
90
+
91
+ dispose() {
92
+ super.dispose()
93
+ }
94
+
95
+ /*
96
+ * 컴포넌트의 생성 또는 속성 변화 시에 호출되며,
97
+ * 그에 따른 html element의 반영이 필요한 부분을 구현한다.
98
+ *
99
+ * ThingsComponent state => HTML element properties
100
+ */
101
+ setElementProperties() {
102
+ const element = this.element
103
+
104
+ const {
105
+ rowHeight = 35,
106
+ rowPadding = 5,
107
+ columnOffset = 15,
108
+ magnetOffset = 15,
109
+ tableWidth = 140,
110
+ minWidth = 1500,
111
+ columnUnit = 'hour',
112
+ fitWidth = false,
113
+ from,
114
+ to
115
+ } = this.state
116
+
117
+ const options = {
118
+ rows: data.rows,
119
+ tasks: data.tasks
120
+ }
121
+
122
+ ;(element as any).dateAdapter = new MomentWellstekGanttDateAdapter(moment)
123
+ ;(element as any).rows = options.rows
124
+ ;(element as any).tasks = options.tasks
125
+ ;(element as any).columnOffset = columnOffset
126
+ ;(element as any).magnetOffset = magnetOffset
127
+ ;(element as any).rowHeight = rowHeight
128
+ ;(element as any).rowPadding = rowPadding
129
+ ;(element as any).headers = [
130
+ { unit: 'day', format: 'MM-DD' },
131
+ { unit: 'hour', format: 'HH:mm', offset: 12 }
132
+ ]
133
+ ;(element as any).fitWidth = fitWidth
134
+ ;(element as any).minWidth = minWidth
135
+ ;(element as any).from = new Date(from).getTime()
136
+ ;(element as any).to = new Date(to).getTime()
137
+ ;(element as any).tableHeader = {
138
+ // title: '테스트 라벨',
139
+ // property: 'label',
140
+ // isFilter: true
141
+ // }
142
+ // {
143
+ title: 'Label9',
144
+ property: 'label',
145
+ width: 140,
146
+ type: 'tree',
147
+ isFilter: true
148
+ }
149
+ ;(element as any).tableWidth = tableWidth
150
+ ;(element as any).ganttTableModules = [WellstekGanttTable]
151
+ ;(element as any).ganttBodyModules = [WellstekGanttDependencies]
152
+ ;(element as any).columnUnit = columnUnit
153
+ }
154
+
155
+ /*
156
+ * 컴포넌트가 ready 상태가 되거나, 컴포넌트의 속성이 변화될 시 setElementProperties 뒤에 호출된다.
157
+ * 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.
158
+ */
159
+ reposition() {
160
+ super.reposition()
161
+ }
162
+
163
+ get tagName() {
164
+ return 'wellstek-gantt'
165
+ }
166
+
167
+ onchange(props: Properties) {
168
+ ;[
169
+ 'rowHeight',
170
+ 'rowPadding',
171
+ 'columnOffset',
172
+ 'magnetOffset',
173
+ 'tableWidth',
174
+ 'minWidth',
175
+ 'columnUnit',
176
+ 'fitWidth'
177
+ ].forEach(prop => {
178
+ if (prop in props) {
179
+ ;(this.element as any)[prop] = this.state[prop]
180
+ }
181
+ })
182
+ ;['from', 'to'].forEach(prop => {
183
+ if (prop in props) {
184
+ ;(this.element as any)[prop] = new Date(this.state[prop]).getTime()
185
+ }
186
+ })
187
+ }
188
+ }
189
+
190
+ Component.register('wellstek-gantt', WellstekGanttScene)
@@ -0,0 +1,5 @@
1
+ import templates from './dist/templates'
2
+
3
+ export default {
4
+ templates
5
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "label.row-height": "row height",
3
+ "label.row-padding": "row padding",
4
+ "label.column-offset": "column offset",
5
+ "label.magnet-offset": "magnet offset",
6
+ "label.table-width": "table width",
7
+ "label.min-width": "min width",
8
+ "label.column-unit": "column unit",
9
+ "label.fit-width": "fit width",
10
+ "label.from": "from",
11
+ "label.to": "to"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "label.row-height": "row height",
3
+ "label.row-padding": "row padding",
4
+ "label.column-offset": "column offset",
5
+ "label.magnet-offset": "magnet offset",
6
+ "label.table-width": "table width",
7
+ "label.min-width": "min width",
8
+ "label.column-unit": "column unit",
9
+ "label.fit-width": "fit width",
10
+ "label.from": "from",
11
+ "label.to": "to"
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "component.wellstek-gantt": "Wellstek Gantt",
3
+ "label.row-height": "row height",
4
+ "label.row-padding": "row padding",
5
+ "label.column-offset": "column offset",
6
+ "label.magnet-offset": "magnet offset",
7
+ "label.table-width": "table width",
8
+ "label.min-width": "min width",
9
+ "label.column-unit": "column unit",
10
+ "label.fit-width": "fit width",
11
+ "label.from": "from",
12
+ "label.to": "to"
13
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "label.row-height": "row height",
3
+ "label.row-padding": "row padding",
4
+ "label.column-offset": "column offset",
5
+ "label.magnet-offset": "magnet offset",
6
+ "label.table-width": "table width",
7
+ "label.min-width": "min width",
8
+ "label.column-unit": "column unit",
9
+ "label.fit-width": "fit width",
10
+ "label.from": "from",
11
+ "label.to": "to"
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "component.wellstek-gantt": "Wellstek Gantt",
3
+ "label.row-height": "row height",
4
+ "label.row-padding": "row padding",
5
+ "label.column-offset": "column offset",
6
+ "label.magnet-offset": "magnet offset",
7
+ "label.table-width": "table width",
8
+ "label.min-width": "min width",
9
+ "label.column-unit": "column unit",
10
+ "label.fit-width": "fit width",
11
+ "label.from": "from",
12
+ "label.to": "to"
13
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
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
+ "skipLibCheck": true,
17
+ "inlineSources": true,
18
+ "rootDir": "src",
19
+ "declaration": true,
20
+ "incremental": true
21
+ },
22
+ "include": ["**/*.ts", "*.d.ts"]
23
+ }