@operato/scene-wellstek-gantt 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +13 -0
  3. package/assets/favicon.ico +0 -0
  4. package/assets/images/spinner.png +0 -0
  5. package/assets/javascript/wellstek-gantt.js +19740 -0
  6. package/db.sqlite +0 -0
  7. package/dist/data.d.ts +149 -0
  8. package/dist/data.js +1899 -0
  9. package/dist/data.js.map +1 -0
  10. package/dist/editors/index.d.ts +6 -0
  11. package/dist/editors/index.js +8 -0
  12. package/dist/editors/index.js.map +1 -0
  13. package/dist/gantt.d.ts +20 -0
  14. package/dist/gantt.js +227 -0
  15. package/dist/gantt.js.map +1 -0
  16. package/dist/groups/index.d.ts +0 -0
  17. package/dist/groups/index.js +2 -0
  18. package/dist/groups/index.js.map +1 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +2 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/templates/gantt.d.ts +14 -0
  23. package/dist/templates/gantt.js +16 -0
  24. package/dist/templates/gantt.js.map +1 -0
  25. package/dist/templates/index.d.ts +14 -0
  26. package/dist/templates/index.js +3 -0
  27. package/dist/templates/index.js.map +1 -0
  28. package/dist/templates/wellstek-gantt.d.ts +14 -0
  29. package/dist/templates/wellstek-gantt.js +16 -0
  30. package/dist/templates/wellstek-gantt.js.map +1 -0
  31. package/dist/wellstek-gantt.d.ts +11 -0
  32. package/dist/wellstek-gantt.js +134 -0
  33. package/dist/wellstek-gantt.js.map +1 -0
  34. package/icons/wellstek-gantt.png +0 -0
  35. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +15 -0
  36. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +15 -0
  37. package/logs/application-2024-08-10-13.log +306 -0
  38. package/logs/connections-2024-08-10-13.log +50 -0
  39. package/package.json +61 -0
  40. package/schema.graphql +4213 -0
  41. package/src/index.ts +1 -0
  42. package/src/templates/index.ts +3 -0
  43. package/src/templates/wellstek-gantt.ts +16 -0
  44. package/src/wellstek-gantt.ts +151 -0
  45. package/things-scene.config.js +5 -0
  46. package/translations/en.json +4 -0
  47. package/translations/ja.json +4 -0
  48. package/translations/ko.json +4 -0
  49. package/translations/ms.json +4 -0
  50. package/translations/zh.json +4 -0
  51. package/tsconfig.json +23 -0
  52. package/tsconfig.tsbuildinfo +1 -0
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: 800,
14
+ height: 600
15
+ }
16
+ }
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+
5
+ const NATURE: ComponentNature = {
6
+ mutable: false,
7
+ resizable: true,
8
+ rotatable: true,
9
+ properties: [
10
+ {
11
+ type: 'string',
12
+ label: 'factory',
13
+ name: 'factory'
14
+ }
15
+ ],
16
+ 'value-property': 'factory'
17
+ }
18
+
19
+ const wellstekGantt = new URL('/assets/javascript/wellstek-gantt.js', import.meta.url).href
20
+
21
+ import { Component, ComponentNature, HTMLOverlayContainer, Properties, error } from '@hatiolab/things-scene'
22
+ const HTML_CONTENT = `
23
+ <head>
24
+ <meta charset="utf-8">
25
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
26
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
27
+ <title>Gantt</title>
28
+ <style>
29
+ html, body {
30
+ width: 100%;
31
+ height: 100%;
32
+ overflow: hidden;
33
+ padding: 0;
34
+ margin: 0;
35
+ }
36
+
37
+ #gantt {
38
+ border: 1px solid #eee;
39
+ height: 100%;
40
+ }
41
+ </style>
42
+ </head>
43
+
44
+ <body>
45
+ <div id="gantt"></div>
46
+
47
+ <script src="${wellstekGantt}"></script>
48
+ <script>
49
+ window.addEventListener('message', function(event) {
50
+ var { factory, data = []} = event.data;
51
+
52
+ if(factory && data) {
53
+ update(factory, data)
54
+ }
55
+ }, false);
56
+ </script>
57
+ <script>
58
+ var gantt
59
+
60
+ function update(factory, ganttData) {
61
+ const data = { factory, ganttData }
62
+
63
+ if(!gantt) {
64
+ const options = {
65
+ data,
66
+ columnOffset: 15,
67
+ magnetOffset: 15,
68
+ rowHeight: 35,
69
+ rowPadding: 5,
70
+ headers: [
71
+ { unit: 'day', format: 'MM-DD' },
72
+ { unit: 'hour', format: 'HH:mm', offset: 12 }
73
+ ],
74
+ fitWidth: true,
75
+ //minWidth: 1500,
76
+ tableHeader: {
77
+ title: '필터',
78
+ property: 'label',
79
+ type: 'tree',
80
+ isFilter: true,
81
+ },
82
+ tableWidth: 140,
83
+ columnUnit: 'hour',
84
+ columnOffset: 12,
85
+ }
86
+
87
+ gantt = new WellstekGantt({
88
+ target: document.getElementById('gantt'),
89
+ props: options
90
+ });
91
+ } else {
92
+ gantt.data = data
93
+ }
94
+ }
95
+ </script>
96
+
97
+ </body>
98
+ `
99
+
100
+ export default class WellstekGanttScene extends HTMLOverlayContainer {
101
+ static get nature() {
102
+ return NATURE
103
+ }
104
+
105
+ get factory() {
106
+ return this.getState('factory')
107
+ }
108
+
109
+ set factory(factory) {
110
+ this.setState('factory', factory)
111
+ this.updateGantt()
112
+ }
113
+
114
+ createElement() {
115
+ super.createElement()
116
+
117
+ const iframe = this.element as HTMLIFrameElement
118
+ iframe.srcdoc = HTML_CONTENT
119
+
120
+ iframe.onload = () => {
121
+ this.updateGantt()
122
+ }
123
+ }
124
+
125
+ setElementProperties(div: HTMLDivElement) {}
126
+
127
+ get tagName() {
128
+ return 'iframe'
129
+ }
130
+
131
+ onchangeData(props: Properties) {
132
+ this.updateGantt()
133
+ }
134
+
135
+ updateGantt() {
136
+ const iframe = this.element as HTMLIFrameElement
137
+ const { factory, data } = this.state
138
+
139
+ if (factory && data) {
140
+ iframe.contentWindow!.postMessage(
141
+ {
142
+ factory,
143
+ data
144
+ },
145
+ '*'
146
+ )
147
+ }
148
+ }
149
+ }
150
+
151
+ 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,4 @@
1
+ {
2
+ "component.wellstek-gantt": "resource gantt",
3
+ "label.factory": "factory"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "component.wellstek-gantt": "resource gantt",
3
+ "label.factory": "factory"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "component.wellstek-gantt": "리소스 간트",
3
+ "label.factory": "공장"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "component.wellstek-gantt": "resource gantt",
3
+ "label.factory": "factory"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "component.wellstek-gantt": "resource gantt",
3
+ "label.factory": "factory"
4
+ }
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
+ }