vk-typescript-cli 1.0.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.
- package/Jenkinsfile +48 -0
- package/README.md +300 -0
- package/bin/sf.js +438 -0
- package/eslint.config.js +90 -0
- package/gulpfile.js +157 -0
- package/lib/commander.js +3370 -0
- package/lib/inquirer-prompts.js +2038 -0
- package/license +13 -0
- package/package.json +43 -0
- package/smoke-test.mjs +38 -0
- package/src/commands/add.js +276 -0
- package/src/commands/info.js +82 -0
- package/src/commands/interactive.js +493 -0
- package/src/commands/mcp.js +135 -0
- package/src/commands/new.js +264 -0
- package/src/commands/skills.js +42 -0
- package/src/commands/theme.js +200 -0
- package/src/commands/upgrade.js +219 -0
- package/src/constants.js +161 -0
- package/src/generators/angular.js +878 -0
- package/src/generators/nextjs.js +817 -0
- package/src/generators/react.js +769 -0
- package/src/generators/typescript.js +258 -0
- package/src/generators/vue.js +800 -0
- package/src/templates/angular/chart.component.html +23 -0
- package/src/templates/angular/chart.component.ts +172 -0
- package/src/templates/angular/diagram.component.html +13 -0
- package/src/templates/angular/diagram.component.ts +224 -0
- package/src/templates/angular/docx-editor.component.html +18 -0
- package/src/templates/angular/docx-editor.component.ts +37 -0
- package/src/templates/angular/filemanager.component.html +4 -0
- package/src/templates/angular/filemanager.component.ts +47 -0
- package/src/templates/angular/gantt.component.html +32 -0
- package/src/templates/angular/gantt.component.ts +95 -0
- package/src/templates/angular/grid.component.html +12 -0
- package/src/templates/angular/grid.component.ts +58 -0
- package/src/templates/angular/pdf-viewer.component.html +9 -0
- package/src/templates/angular/pdf-viewer.component.ts +48 -0
- package/src/templates/angular/rte.component.html +7 -0
- package/src/templates/angular/rte.component.ts +13 -0
- package/src/templates/angular/scheduler.component.html +17 -0
- package/src/templates/angular/scheduler.component.ts +75 -0
- package/src/templates/angular/spreadsheet-editor.component.html +42 -0
- package/src/templates/angular/spreadsheet-editor.component.ts +61 -0
- package/src/templates/chart-template.js +20 -0
- package/src/templates/diagram-template.js +26 -0
- package/src/templates/docx-template.js +20 -0
- package/src/templates/filemanager-template.js +20 -0
- package/src/templates/gantt-template.js +20 -0
- package/src/templates/grid-template.js +20 -0
- package/src/templates/pdfviewer-template.js +20 -0
- package/src/templates/react/Chart.jsx +81 -0
- package/src/templates/react/Chart.tsx +81 -0
- package/src/templates/react/DOCXEditor.jsx +37 -0
- package/src/templates/react/DOCXEditor.tsx +37 -0
- package/src/templates/react/Diagram.jsx +192 -0
- package/src/templates/react/Diagram.tsx +195 -0
- package/src/templates/react/FileManager.jsx +13 -0
- package/src/templates/react/FileManager.tsx +13 -0
- package/src/templates/react/Gantt.jsx +89 -0
- package/src/templates/react/Gantt.tsx +89 -0
- package/src/templates/react/Grid.jsx +45 -0
- package/src/templates/react/Grid.tsx +45 -0
- package/src/templates/react/PDFViewer.jsx +16 -0
- package/src/templates/react/PDFViewer.tsx +16 -0
- package/src/templates/react/RTE.jsx +14 -0
- package/src/templates/react/RTE.tsx +14 -0
- package/src/templates/react/Scheduler.jsx +55 -0
- package/src/templates/react/Scheduler.tsx +55 -0
- package/src/templates/react/SpreadsheetEditor.jsx +96 -0
- package/src/templates/react/SpreadsheetEditor.tsx +98 -0
- package/src/templates/rte-template.js +26 -0
- package/src/templates/scheduler-template.js +20 -0
- package/src/templates/spreadheet-template.js +20 -0
- package/src/templates/typescript/RTE.ts +33 -0
- package/src/templates/typescript/SpreadsheetEditor.ts +39 -0
- package/src/templates/typescript/chart.ts +37 -0
- package/src/templates/typescript/diagram.ts +30 -0
- package/src/templates/typescript/docxeditor.ts +30 -0
- package/src/templates/typescript/filemanager.ts +41 -0
- package/src/templates/typescript/gantt.ts +88 -0
- package/src/templates/typescript/grid.ts +30 -0
- package/src/templates/typescript/pdfviewer.ts +8 -0
- package/src/templates/typescript/scheduler.ts +39 -0
- package/src/templates/vue/Chart.vue +257 -0
- package/src/templates/vue/ChartView.vue +7 -0
- package/src/templates/vue/DOCXEditor.vue +61 -0
- package/src/templates/vue/DOCXEditorView.vue +7 -0
- package/src/templates/vue/Diagram.vue +245 -0
- package/src/templates/vue/DiagramView.vue +7 -0
- package/src/templates/vue/FileManager.vue +58 -0
- package/src/templates/vue/FileManagerView.vue +7 -0
- package/src/templates/vue/Gantt.vue +129 -0
- package/src/templates/vue/GanttView.vue +7 -0
- package/src/templates/vue/Grid.vue +141 -0
- package/src/templates/vue/GridView.vue +7 -0
- package/src/templates/vue/PDFViewer.vue +58 -0
- package/src/templates/vue/PDFViewerView.vue +7 -0
- package/src/templates/vue/RTE.vue +27 -0
- package/src/templates/vue/RTEView.vue +7 -0
- package/src/templates/vue/Scheduler.vue +94 -0
- package/src/templates/vue/SchedulerView.vue +7 -0
- package/src/templates/vue/SpreadsheetEditor.vue +115 -0
- package/src/templates/vue/SpreadsheetEditorView.vue +7 -0
- package/src/utils/ansi-colors.js +38 -0
- package/src/utils/banner.js +179 -0
- package/src/utils/common.js +64 -0
- package/src/utils/config-generator.js +73 -0
- package/src/utils/folder-structure.js +26 -0
- package/src/utils/logger.js +19 -0
- package/src/utils/mcp-generator.js +122 -0
- package/src/utils/package-manager.js +128 -0
- package/src/utils/project-bootstrap.js +98 -0
- package/src/utils/project-detector.js +195 -0
- package/src/utils/prompt-utils.js +29 -0
- package/src/utils/run-command.js +110 -0
- package/src/utils/skills-installer.js +69 -0
- package/src/utils/template-file.js +35 -0
- package/src/utils/theme-loader.js +47 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DiagramComponent,
|
|
4
|
+
Inject,
|
|
5
|
+
DiagramConstraints,
|
|
6
|
+
UndoRedo,
|
|
7
|
+
Snapping,
|
|
8
|
+
ConnectorBridging
|
|
9
|
+
} from '@syncfusion/ej2-react-diagrams';
|
|
10
|
+
|
|
11
|
+
function createNode(
|
|
12
|
+
id,
|
|
13
|
+
offsetX,
|
|
14
|
+
offsetY,
|
|
15
|
+
height,
|
|
16
|
+
width,
|
|
17
|
+
content,
|
|
18
|
+
marginX = 0,
|
|
19
|
+
marginY = 0
|
|
20
|
+
) {
|
|
21
|
+
let ports = [];
|
|
22
|
+
|
|
23
|
+
if (id === 'node5' || id === 'node6') {
|
|
24
|
+
ports = [{ id: 'port1', offset: { x: 0.9, y: 0 } }];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (id === 'node13' || id === 'node15') {
|
|
28
|
+
ports = [{ id: 'port2', offset: { x: 1, y: 0.5 } }];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (id === 'node3') {
|
|
32
|
+
ports = [
|
|
33
|
+
{ id: 'port3', offset: { x: 0.25, y: 1 } },
|
|
34
|
+
{ id: 'port4', offset: { x: 0.5, y: 1 } },
|
|
35
|
+
{ id: 'port5', offset: { x: 0.75, y: 1 } }
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (id === 'node7') {
|
|
40
|
+
ports = [
|
|
41
|
+
{ id: 'port1', offset: { x: 0, y: 0.5 } },
|
|
42
|
+
{ id: 'port2', offset: { x: 1, y: 0.5 } }
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (id === 'node8') {
|
|
47
|
+
ports = [
|
|
48
|
+
{ id: 'port3', offset: { x: 0.25, y: 1 } },
|
|
49
|
+
{ id: 'port5', offset: { x: 0.75, y: 1 } }
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
id,
|
|
55
|
+
offsetX,
|
|
56
|
+
offsetY,
|
|
57
|
+
margin: { left: marginX, top: marginY },
|
|
58
|
+
width,
|
|
59
|
+
height,
|
|
60
|
+
style: { fill: 'white', strokeColor: '#2546BB', strokeWidth: 1 },
|
|
61
|
+
shape: { type: 'Basic', shape: 'Rectangle', cornerRadius: 4 },
|
|
62
|
+
annotations: [
|
|
63
|
+
{
|
|
64
|
+
content,
|
|
65
|
+
style: { color: '#343434' },
|
|
66
|
+
horizontalAlignment: 'Center'
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
ports
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function createNodes() {
|
|
74
|
+
return [
|
|
75
|
+
createNode('node1', 300, 300, 60, 100, 'HTTP Traffic'),
|
|
76
|
+
createNode('node2', 500, 300, 60, 100, 'Ingestion service', 50, 30),
|
|
77
|
+
createNode('node3', 650, 300, 60, 100, 'Workflow service', 200, 30),
|
|
78
|
+
createNode('node4', 500, 415, 60, 100, 'Package service', 50, 150),
|
|
79
|
+
createNode('node5', 650, 415, 60, 150, 'Drone Scheduler service', 175, 150),
|
|
80
|
+
createNode('node6', 800, 415, 60, 100, 'Delivery service', 350, 150),
|
|
81
|
+
createNode('node7', 580, 130, 60, 90, 'Azure Service Bus'),
|
|
82
|
+
createNode('node8', 815, 130, 60, 100, 'Managed Identities'),
|
|
83
|
+
createNode('node9', 1000, 130, 60, 100, 'Azure Key Vault'),
|
|
84
|
+
createNode('node10', 500, 550, 60, 100, 'Azure Cosmos DB for MongoDB API'),
|
|
85
|
+
createNode('node11', 650, 550, 60, 100, 'Azure Cosmos DB'),
|
|
86
|
+
createNode('node12', 800, 550, 60, 100, 'Azure Cache for Redis'),
|
|
87
|
+
createNode('node13', 1040, 255, 60, 100, 'Azure Application Insights'),
|
|
88
|
+
createNode('node14', 1140, 350, 60, 100, 'Azure Monitor'),
|
|
89
|
+
createNode('node15', 1040, 445, 60, 100, 'Azure Log Analytics workspace'),
|
|
90
|
+
{
|
|
91
|
+
id: 'container',
|
|
92
|
+
width: 520,
|
|
93
|
+
height: 300,
|
|
94
|
+
offsetX: 660,
|
|
95
|
+
offsetY: 350,
|
|
96
|
+
shape: {
|
|
97
|
+
type: 'Container',
|
|
98
|
+
header: {
|
|
99
|
+
annotation: {
|
|
100
|
+
content: 'Azure Container Apps Environment',
|
|
101
|
+
style: { fontSize: 18, bold: true, fill: 'transparent', strokeColor: 'transparent' }
|
|
102
|
+
},
|
|
103
|
+
height: 40,
|
|
104
|
+
style: { fontSize: 18, bold: true, fill: 'transparent', strokeColor: 'transparent' }
|
|
105
|
+
},
|
|
106
|
+
children: ['node2', 'node3', 'node4', 'node5', 'node6']
|
|
107
|
+
},
|
|
108
|
+
style: { fill: '#E9EEFF', strokeColor: '#2546BB', strokeWidth: 1 }
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function createConnector(
|
|
114
|
+
id,
|
|
115
|
+
sourceID,
|
|
116
|
+
targetID,
|
|
117
|
+
sourcePortID = '',
|
|
118
|
+
targetPortID = '',
|
|
119
|
+
sourceDecorator = undefined
|
|
120
|
+
) {
|
|
121
|
+
return {
|
|
122
|
+
id,
|
|
123
|
+
type: 'Orthogonal',
|
|
124
|
+
sourceID,
|
|
125
|
+
targetID,
|
|
126
|
+
sourcePortID,
|
|
127
|
+
targetPortID,
|
|
128
|
+
style: { strokeColor: '#5E5E5E', strokeWidth: 1 },
|
|
129
|
+
sourceDecorator,
|
|
130
|
+
targetDecorator: {
|
|
131
|
+
style: {
|
|
132
|
+
fill: '#5E5E5E',
|
|
133
|
+
strokeColor: '#5E5E5E',
|
|
134
|
+
strokeWidth: 1
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function createConnectors() {
|
|
141
|
+
const filledSourceDecorator = {
|
|
142
|
+
style: { fill: '#5E5E5E', strokeColor: '#5E5E5E', strokeWidth: 1 }
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
return [
|
|
146
|
+
createConnector('connector1', 'node1', 'node2'),
|
|
147
|
+
createConnector('connector2', 'node4', 'node10'),
|
|
148
|
+
createConnector('connector3', 'node5', 'node11'),
|
|
149
|
+
createConnector('connector4', 'node6', 'node12'),
|
|
150
|
+
createConnector('connector5', 'node8', 'node9'),
|
|
151
|
+
createConnector('connector6', 'container', 'node13'),
|
|
152
|
+
createConnector('connector7', 'container', 'node15'),
|
|
153
|
+
createConnector('connector8', 'node3', 'node4', 'port3'),
|
|
154
|
+
createConnector('connector9', 'node3', 'node5', 'port4'),
|
|
155
|
+
createConnector('connector10', 'node3', 'node6', 'port5'),
|
|
156
|
+
createConnector('connector11', 'node2', 'node7', '', 'port1'),
|
|
157
|
+
createConnector('connector12', 'node7', 'node3', 'port2'),
|
|
158
|
+
createConnector('connector13', 'node13', 'node14', 'port2'),
|
|
159
|
+
createConnector('connector14', 'node15', 'node14', 'port2'),
|
|
160
|
+
createConnector('connector16', 'node8', 'node5', 'port3', 'port1', filledSourceDecorator),
|
|
161
|
+
createConnector('connector17', 'node8', 'node6', 'port5', 'port1', filledSourceDecorator)
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export default function Diagram() {
|
|
166
|
+
let diagramInstance;
|
|
167
|
+
const nodes = React.useMemo(() => createNodes(), []);
|
|
168
|
+
const connectors = React.useMemo(() => createConnectors(), []);
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<div className="diagram-control-pane" style={{ padding: "30px", margin: "0 auto" }}>
|
|
173
|
+
<DiagramComponent
|
|
174
|
+
id="diagram"
|
|
175
|
+
ref={(diagram) => {
|
|
176
|
+
if (diagram) {
|
|
177
|
+
diagramInstance = diagram;
|
|
178
|
+
}
|
|
179
|
+
}}
|
|
180
|
+
width="100%"
|
|
181
|
+
height="700px"
|
|
182
|
+
nodes={nodes}
|
|
183
|
+
connectors={connectors}
|
|
184
|
+
constraints={DiagramConstraints.Default | DiagramConstraints.Bridging}
|
|
185
|
+
rulerSettings={{ showRulers: true, dynamicGrid: true }}
|
|
186
|
+
created={() => diagramInstance.fitToPage()}
|
|
187
|
+
>
|
|
188
|
+
<Inject services={[UndoRedo, Snapping, ConnectorBridging]} />
|
|
189
|
+
</DiagramComponent>
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DiagramComponent,
|
|
4
|
+
Inject,
|
|
5
|
+
DiagramConstraints,
|
|
6
|
+
UndoRedo,
|
|
7
|
+
Snapping,
|
|
8
|
+
ConnectorBridging,
|
|
9
|
+
type NodeModel,
|
|
10
|
+
type ConnectorModel,
|
|
11
|
+
type PointPortModel
|
|
12
|
+
} from '@syncfusion/ej2-react-diagrams';
|
|
13
|
+
|
|
14
|
+
function createNode(
|
|
15
|
+
id: string,
|
|
16
|
+
offsetX: number,
|
|
17
|
+
offsetY: number,
|
|
18
|
+
height: number,
|
|
19
|
+
width: number,
|
|
20
|
+
content: string,
|
|
21
|
+
marginX = 0,
|
|
22
|
+
marginY = 0
|
|
23
|
+
): NodeModel {
|
|
24
|
+
let ports: PointPortModel[] = [];
|
|
25
|
+
|
|
26
|
+
if (id === 'node5' || id === 'node6') {
|
|
27
|
+
ports = [{ id: 'port1', offset: { x: 0.9, y: 0 } }];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (id === 'node13' || id === 'node15') {
|
|
31
|
+
ports = [{ id: 'port2', offset: { x: 1, y: 0.5 } }];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (id === 'node3') {
|
|
35
|
+
ports = [
|
|
36
|
+
{ id: 'port3', offset: { x: 0.25, y: 1 } },
|
|
37
|
+
{ id: 'port4', offset: { x: 0.5, y: 1 } },
|
|
38
|
+
{ id: 'port5', offset: { x: 0.75, y: 1 } }
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (id === 'node7') {
|
|
43
|
+
ports = [
|
|
44
|
+
{ id: 'port1', offset: { x: 0, y: 0.5 } },
|
|
45
|
+
{ id: 'port2', offset: { x: 1, y: 0.5 } }
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (id === 'node8') {
|
|
50
|
+
ports = [
|
|
51
|
+
{ id: 'port3', offset: { x: 0.25, y: 1 } },
|
|
52
|
+
{ id: 'port5', offset: { x: 0.75, y: 1 } }
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
id,
|
|
58
|
+
offsetX,
|
|
59
|
+
offsetY,
|
|
60
|
+
margin: { left: marginX, top: marginY },
|
|
61
|
+
width,
|
|
62
|
+
height,
|
|
63
|
+
style: { fill: 'white', strokeColor: '#2546BB', strokeWidth: 1 },
|
|
64
|
+
shape: { type: 'Basic', shape: 'Rectangle', cornerRadius: 4 },
|
|
65
|
+
annotations: [
|
|
66
|
+
{
|
|
67
|
+
content,
|
|
68
|
+
style: { color: '#343434' },
|
|
69
|
+
horizontalAlignment: 'Center'
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
ports
|
|
73
|
+
} as NodeModel;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function createNodes(): NodeModel[] {
|
|
77
|
+
return [
|
|
78
|
+
createNode('node1', 300, 300, 60, 100, 'HTTP Traffic'),
|
|
79
|
+
createNode('node2', 500, 300, 60, 100, 'Ingestion service', 50, 30),
|
|
80
|
+
createNode('node3', 650, 300, 60, 100, 'Workflow service', 200, 30),
|
|
81
|
+
createNode('node4', 500, 415, 60, 100, 'Package service', 50, 150),
|
|
82
|
+
createNode('node5', 650, 415, 60, 150, 'Drone Scheduler service', 175, 150),
|
|
83
|
+
createNode('node6', 800, 415, 60, 100, 'Delivery service', 350, 150),
|
|
84
|
+
createNode('node7', 580, 130, 60, 90, 'Azure Service Bus'),
|
|
85
|
+
createNode('node8', 815, 130, 60, 100, 'Managed Identities'),
|
|
86
|
+
createNode('node9', 1000, 130, 60, 100, 'Azure Key Vault'),
|
|
87
|
+
createNode('node10', 500, 550, 60, 100, 'Azure Cosmos DB for MongoDB API'),
|
|
88
|
+
createNode('node11', 650, 550, 60, 100, 'Azure Cosmos DB'),
|
|
89
|
+
createNode('node12', 800, 550, 60, 100, 'Azure Cache for Redis'),
|
|
90
|
+
createNode('node13', 1040, 255, 60, 100, 'Azure Application Insights'),
|
|
91
|
+
createNode('node14', 1140, 350, 60, 100, 'Azure Monitor'),
|
|
92
|
+
createNode('node15', 1040, 445, 60, 100, 'Azure Log Analytics workspace'),
|
|
93
|
+
{
|
|
94
|
+
id: 'container',
|
|
95
|
+
width: 520,
|
|
96
|
+
height: 300,
|
|
97
|
+
offsetX: 660,
|
|
98
|
+
offsetY: 350,
|
|
99
|
+
shape: {
|
|
100
|
+
type: 'Container',
|
|
101
|
+
header: {
|
|
102
|
+
annotation: {
|
|
103
|
+
content: 'Azure Container Apps Environment',
|
|
104
|
+
style: { fontSize: 18, bold: true, fill: 'transparent', strokeColor: 'transparent' }
|
|
105
|
+
},
|
|
106
|
+
height: 40,
|
|
107
|
+
style: { fontSize: 18, bold: true, fill: 'transparent', strokeColor: 'transparent' }
|
|
108
|
+
},
|
|
109
|
+
children: ['node2', 'node3', 'node4', 'node5', 'node6']
|
|
110
|
+
},
|
|
111
|
+
style: { fill: '#E9EEFF', strokeColor: '#2546BB', strokeWidth: 1 }
|
|
112
|
+
} as NodeModel
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function createConnector(
|
|
117
|
+
id: string,
|
|
118
|
+
sourceID: string,
|
|
119
|
+
targetID: string,
|
|
120
|
+
sourcePortID = '',
|
|
121
|
+
targetPortID = '',
|
|
122
|
+
sourceDecorator: any = undefined
|
|
123
|
+
): ConnectorModel {
|
|
124
|
+
return {
|
|
125
|
+
id,
|
|
126
|
+
type: 'Orthogonal',
|
|
127
|
+
sourceID,
|
|
128
|
+
targetID,
|
|
129
|
+
sourcePortID,
|
|
130
|
+
targetPortID,
|
|
131
|
+
style: { strokeColor: '#5E5E5E', strokeWidth: 1 },
|
|
132
|
+
sourceDecorator,
|
|
133
|
+
targetDecorator: {
|
|
134
|
+
style: {
|
|
135
|
+
fill: '#5E5E5E',
|
|
136
|
+
strokeColor: '#5E5E5E',
|
|
137
|
+
strokeWidth: 1
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
} as ConnectorModel;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function createConnectors(): ConnectorModel[] {
|
|
144
|
+
const filledSourceDecorator = {
|
|
145
|
+
style: { fill: '#5E5E5E', strokeColor: '#5E5E5E', strokeWidth: 1 }
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
return [
|
|
149
|
+
createConnector('connector1', 'node1', 'node2'),
|
|
150
|
+
createConnector('connector2', 'node4', 'node10'),
|
|
151
|
+
createConnector('connector3', 'node5', 'node11'),
|
|
152
|
+
createConnector('connector4', 'node6', 'node12'),
|
|
153
|
+
createConnector('connector5', 'node8', 'node9'),
|
|
154
|
+
createConnector('connector6', 'container', 'node13'),
|
|
155
|
+
createConnector('connector7', 'container', 'node15'),
|
|
156
|
+
createConnector('connector8', 'node3', 'node4', 'port3'),
|
|
157
|
+
createConnector('connector9', 'node3', 'node5', 'port4'),
|
|
158
|
+
createConnector('connector10', 'node3', 'node6', 'port5'),
|
|
159
|
+
createConnector('connector11', 'node2', 'node7', '', 'port1'),
|
|
160
|
+
createConnector('connector12', 'node7', 'node3', 'port2'),
|
|
161
|
+
createConnector('connector13', 'node13', 'node14', 'port2'),
|
|
162
|
+
createConnector('connector14', 'node15', 'node14', 'port2'),
|
|
163
|
+
createConnector('connector16', 'node8', 'node5', 'port3', 'port1', filledSourceDecorator),
|
|
164
|
+
createConnector('connector17', 'node8', 'node6', 'port5', 'port1', filledSourceDecorator)
|
|
165
|
+
];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export default function Diagram() {
|
|
169
|
+
let diagramInstance: DiagramComponent;
|
|
170
|
+
const nodes = React.useMemo(() => createNodes(), []);
|
|
171
|
+
const connectors = React.useMemo(() => createConnectors(), []);
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<div className="diagram-control-pane" style={{ padding: "30px", margin: "0 auto" }}>
|
|
176
|
+
<DiagramComponent
|
|
177
|
+
id="diagram"
|
|
178
|
+
ref={(diagram: DiagramComponent) => {
|
|
179
|
+
if (diagram) {
|
|
180
|
+
diagramInstance = diagram;
|
|
181
|
+
}
|
|
182
|
+
}}
|
|
183
|
+
width="100%"
|
|
184
|
+
height="700px"
|
|
185
|
+
nodes={nodes}
|
|
186
|
+
connectors={connectors}
|
|
187
|
+
constraints={DiagramConstraints.Default | DiagramConstraints.Bridging}
|
|
188
|
+
rulerSettings={{ showRulers: true, dynamicGrid: true }}
|
|
189
|
+
created={() => diagramInstance.fitToPage()}
|
|
190
|
+
>
|
|
191
|
+
<Inject services={[UndoRedo, Snapping, ConnectorBridging]} />
|
|
192
|
+
</DiagramComponent>
|
|
193
|
+
</div>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FileManagerComponent, Inject, NavigationPane, DetailsView, Toolbar } from '@syncfusion/ej2-react-filemanager';
|
|
2
|
+
|
|
3
|
+
export default function FileManager () {
|
|
4
|
+
let hostUrl = "https://physical-service.syncfusion.com/";
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div className="control-section" style={{ padding: '80px', margin: '0 auto' }}>
|
|
8
|
+
<FileManagerComponent id="overview_file" ajaxSettings = {{url: hostUrl + "api/FileManager/FileOperations", getImageUrl: hostUrl + "api/FileManager/GetImage", uploadUrl: hostUrl + 'api/FileManager/Upload', downloadUrl: hostUrl + 'api/FileManager/Download'}} toolbarSettings={{items: ['NewFolder', 'SortBy', 'Cut', 'Copy', 'Paste', 'Delete', 'Refresh', 'Download', 'Rename', 'Selection', 'View', 'Details']}} contextMenuSettings={{file: [ 'Cut', 'Copy', '|', 'Delete', 'Download', 'Rename', '|', 'Details'], layout: ['SortBy', 'View', 'Refresh', '|', 'Paste', '|', 'NewFolder', '|', 'Details', '|', 'SelectAll'], visible: true }} view={"Details"}>
|
|
9
|
+
<Inject services={[ NavigationPane, DetailsView, Toolbar]} />
|
|
10
|
+
</FileManagerComponent>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FileManagerComponent, Inject, NavigationPane, DetailsView, Toolbar } from '@syncfusion/ej2-react-filemanager';
|
|
2
|
+
|
|
3
|
+
export default function FileManager () {
|
|
4
|
+
let hostUrl: string = "https://physical-service.syncfusion.com/";
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div className="control-section" style={{ padding: '80px', margin: '0 auto' }}>
|
|
8
|
+
<FileManagerComponent id="overview_file" ajaxSettings = {{url: hostUrl + "api/FileManager/FileOperations", getImageUrl: hostUrl + "api/FileManager/GetImage", uploadUrl: hostUrl + 'api/FileManager/Upload', downloadUrl: hostUrl + 'api/FileManager/Download'}} toolbarSettings={{items: ['NewFolder', 'SortBy', 'Cut', 'Copy', 'Paste', 'Delete', 'Refresh', 'Download', 'Rename', 'Selection', 'View', 'Details']}} contextMenuSettings={{file: [ 'Cut', 'Copy', '|', 'Delete', 'Download', 'Rename', '|', 'Details'], layout: ['SortBy', 'View', 'Refresh', '|', 'Paste', '|', 'NewFolder', '|', 'Details', '|', 'SelectAll'], visible: true }} view={"Details"}>
|
|
9
|
+
<Inject services={[ NavigationPane, DetailsView, Toolbar]} />
|
|
10
|
+
</FileManagerComponent>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { GanttComponent, Inject, Selection, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-gantt';
|
|
2
|
+
|
|
3
|
+
const taskData = [
|
|
4
|
+
{ TaskID: 1, TaskName: "Product concept", StartDate: new Date("04/02/2025"), EndDate: new Date("04/08/2025") },
|
|
5
|
+
{ TaskID: 2, TaskName: "Define the product usage", StartDate: new Date("04/02/2025"), EndDate: new Date("04/08/2025"), Duration: 1, Progress: 30, ParentId: 1, BaselineStartDate: new Date("04/02/2025"), BaselineEndDate: new Date("04/02/2025") },
|
|
6
|
+
{ TaskID: 3, TaskName: "Define the target audience", StartDate: new Date("04/02/2025"), EndDate: new Date("04/04/2025"), Duration: 2, Progress: 40, ParentId: 1 },
|
|
7
|
+
{ TaskID: 4, TaskName: "Prepare product sketch and notes", StartDate: new Date("04/05/2025"), Duration: 2, Progress: 30, ParentId: 1, Predecessor: "2" },
|
|
8
|
+
{ TaskID: 5, TaskName: "Concept approval", StartDate: new Date("04/08/2025"), EndDate: new Date("04/08/2025"), Duration: 0, ParentId: 1, Predecessor: "3,4", Indicators: [{ date: new Date("04/07/2025"), name: "Design Phase", tooltip: "Design phase completed", iconClass: "okIcon e-icons" }] },
|
|
9
|
+
{ TaskID: 6, TaskName: "Market research", StartDate: new Date("04/09/2025"), EndDate: new Date("04/18/2025"), Progress: 30, BaselineStartDate: new Date("04/09/2025"), BaselineEndDate: new Date("04/09/2025") },
|
|
10
|
+
{ TaskID: 7, TaskName: "Demand analysis", Progress: 40, ParentId: 6 },
|
|
11
|
+
{ TaskID: 8, TaskName: "Customer strength", StartDate: new Date("04/09/2025"), EndDate: new Date("04/12/2025"), Duration: 4, Progress: 30, ParentId: 7, Predecessor: "5", BaselineStartDate: new Date("04/12/2025"), BaselineEndDate: new Date("04/13/2025") },
|
|
12
|
+
{ TaskID: 9, TaskName: "Market opportunity analysis", StartDate: new Date("04/09/2025"), EndDate: new Date("04/12/2025"), Duration: 4, ParentId: 7, Predecessor: "5" },
|
|
13
|
+
{ TaskID: 10, TaskName: "Competitor analysis", StartDate: new Date("04/15/2025"), EndDate: new Date("04/18/2025"), Duration: 4, Progress: 30, ParentId: 6, Predecessor: "7,8" },
|
|
14
|
+
{ TaskID: 11, TaskName: "Product strength analysis", StartDate: new Date("04/15/2025"), EndDate: new Date("04/18/2025"), Duration: 4, Progress: 40, ParentId: 6, Predecessor: "9" },
|
|
15
|
+
{ TaskID: 12, TaskName: "Research completed", StartDate: new Date("04/18/2025"), EndDate: new Date("04/18/2025"), Duration: 0, Progress: 30, ParentId: 6, Predecessor: "10", Indicators: [{ date: new Date("04/20/2025"), name: "Research completed", tooltip: "Research completed", iconClass: "description e-icons" }] },
|
|
16
|
+
{ TaskID: 13, TaskName: "Product design and development", StartDate: new Date("04/19/2025"), EndDate: new Date("05/16/2025") },
|
|
17
|
+
{ TaskID: 14, TaskName: "Functionality design", StartDate: new Date("04/19/2025"), EndDate: new Date("04/23/2025"), Duration: 4, Progress: 30, ParentId: 13, Predecessor: "12" },
|
|
18
|
+
{ TaskID: 15, TaskName: "Quality design", StartDate: new Date("04/19/2025"), EndDate: new Date("04/23/2025"), Duration: 3, Progress: 40, ParentId: 13, Predecessor: "12" },
|
|
19
|
+
{ TaskID: 16, TaskName: "Define reliability", StartDate: new Date("04/24/2025"), EndDate: new Date("04/25/2025"), Duration: 4, Progress: 30, ParentId: 13, Predecessor: "15" },
|
|
20
|
+
{ TaskID: 17, TaskName: "Identifying raw materials", StartDate: new Date("04/24/2025"), EndDate: new Date("04/25/2025"), Duration: 2, ParentId: 13, Predecessor: "15" },
|
|
21
|
+
{ TaskID: 18, TaskName: "Define cost plan", StartDate: new Date("04/26/2025"), EndDate: new Date("04/29/2025"), Progress: 30, ParentId: 13, Predecessor: "17" },
|
|
22
|
+
{ TaskID: 19, TaskName: "Estimate manufacturing cost", StartDate: new Date("04/26/2025"), EndDate: new Date("04/29/2025"), Duration: 3, Progress: 40, ParentId: 18, Predecessor: "17" },
|
|
23
|
+
{ TaskID: 20, TaskName: "Estimate selling cost", StartDate: new Date("04/26/2025"), EndDate: new Date("04/29/2025"), Duration: 3, Progress: 30, ParentId: 18, Predecessor: "17" },
|
|
24
|
+
{ TaskID: 21, TaskName: "Development of final design", StartDate: new Date("04/30/2025"), EndDate: new Date("05/08/2025"), ParentId: 13 },
|
|
25
|
+
{ TaskID: 22, TaskName: "Develop dimensions and design", StartDate: new Date("04/30/2025"), EndDate: new Date("05/01/2025"), Duration: 4, Progress: 30, ParentId: 21, Predecessor: "19,20" },
|
|
26
|
+
{ TaskID: 23, TaskName: "Develop designs to meet industry", StartDate: new Date("05/02/2025"), EndDate: new Date("05/03/2025"), Duration: 3, Progress: 40, ParentId: 21, Predecessor: "22" },
|
|
27
|
+
{ TaskID: 24, TaskName: "Include all the details", StartDate: new Date("05/06/2025"), EndDate: new Date("05/08/2025"), Duration: 4, Progress: 30, ParentId: 21, Predecessor: "23" },
|
|
28
|
+
{ TaskID: 25, TaskName: "CAD - Computer Aided Design", StartDate: new Date("05/09/2025"), EndDate: new Date("05/13/2025"), Duration: 3, Predecessor: "24" },
|
|
29
|
+
{ TaskID: 26, TaskName: "CAM - Computer Aided Manufacturing", StartDate: new Date("05/14/2025"), EndDate: new Date("05/16/2025"), Duration: 4, Progress: 30, Predecessor: "25" },
|
|
30
|
+
{ TaskID: 27, TaskName: "Finalize the design", StartDate: new Date("04/16/2025"), EndDate: new Date("04/16/2025"), Duration: 0, Progress: 40, Predecessor: "26" },
|
|
31
|
+
{ TaskID: 28, TaskName: "Prototype testing", StartDate: new Date("05/17/2025"), EndDate: new Date("05/22/2025"), Duration: 4, Progress: 30, Predecessor: "27" },
|
|
32
|
+
{ TaskID: 29, TaskName: "Include feedback", StartDate: new Date("05/17/2025"), EndDate: new Date("05/22/2025"), Duration: 4, Predecessor: "28ss", Indicators: [{ date: new Date("05/30/2025"), name: "Production phase", tooltip: "Production phase completed", iconClass: "okIcon e-icons" }] },
|
|
33
|
+
{ TaskID: 30, TaskName: "Manufacturing", StartDate: new Date("05/23/2025"), EndDate: new Date("05/29/2025"), Duration: 5, Progress: 30, Predecessor: "28,29" },
|
|
34
|
+
{ TaskID: 31, TaskName: "Assembling material into finished goods", StartDate: new Date("05/30/2025"), EndDate: new Date("06/05/2025"), Duration: 5, Progress: 40, Predecessor: "30" },
|
|
35
|
+
{ TaskID: 32, TaskName: "Final product development", StartDate: new Date("06/06/2025"), EndDate: new Date("06/13/2025"), Progress: 30 },
|
|
36
|
+
{ TaskID: 33, TaskName: "Important improvement", StartDate: new Date("06/06/2025"), EndDate: new Date("06/10/2025"), Duration: 3, ParentId: 32, Predecessor: "31" },
|
|
37
|
+
{ TaskID: 34, TaskName: "Customer testing and feedback", StartDate: new Date("06/11/2025"), EndDate: new Date("06/13/2025"), Duration: 4, Progress: 30, ParentId: 32, Predecessor: "33" },
|
|
38
|
+
{ TaskID: 35, TaskName: "Final product development", StartDate: new Date("06/14/2025"), EndDate: new Date("06/19/2025"), Progress: 40 },
|
|
39
|
+
{ TaskID: 36, TaskName: "Important improvement", StartDate: new Date("06/14/2025"), EndDate: new Date("06/19/2025"), Duration: 4, Progress: 30, ParentId: 35, Predecessor: "34" },
|
|
40
|
+
{ TaskID: 37, TaskName: "Address any unforeseen issues", StartDate: new Date("06/14/2025"), EndDate: new Date("06/19/2025"), Duration: 4, Progress: 30, Predecessor: "36ss", ParentId: 35, Indicators: [{ date: new Date("06/30/2025"), name: "Sales and marketing", tooltip: "Sales and marketing", iconClass: "description e-icons" }] },
|
|
41
|
+
{ TaskID: 38, TaskName: "Finalize the product", StartDate: new Date("06/20/2025"), EndDate: new Date("07/01/2025"), Progress: 40 },
|
|
42
|
+
{ TaskID: 39, TaskName: "Branding the product", StartDate: new Date("06/20/2025"), EndDate: new Date("06/25/2025"), Duration: 4, Progress: 30, ParentId: 38, Predecessor: "37" },
|
|
43
|
+
{ TaskID: 40, TaskName: "Marketing and presales", StartDate: new Date("06/26/2025"), EndDate: new Date("07/01/2025"), Duration: 4, ParentId: 38, Predecessor: "39" }
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
export default function Gantt() {
|
|
47
|
+
let ganttInstance;
|
|
48
|
+
const taskFields = {
|
|
49
|
+
id: 'TaskID',
|
|
50
|
+
name: 'TaskName',
|
|
51
|
+
startDate: 'StartDate',
|
|
52
|
+
endDate: 'EndDate',
|
|
53
|
+
duration: 'Duration',
|
|
54
|
+
progress: 'Progress',
|
|
55
|
+
dependency: 'Predecessor',
|
|
56
|
+
parentID: 'ParentId'
|
|
57
|
+
};
|
|
58
|
+
const labelSettings = {
|
|
59
|
+
leftLabel: 'TaskName'
|
|
60
|
+
};
|
|
61
|
+
const splitterSettings = {
|
|
62
|
+
columnIndex: 2
|
|
63
|
+
};
|
|
64
|
+
const projectStartDate = new Date('03/26/2025');
|
|
65
|
+
const projectEndDate = new Date('07/20/2025');
|
|
66
|
+
const onCreated = () => {
|
|
67
|
+
if (document.querySelector('.e-bigger')) {
|
|
68
|
+
ganttInstance.rowHeight = 48;
|
|
69
|
+
ganttInstance.taskbarHeight = 28;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return (
|
|
73
|
+
<div className='control-pane' style={{ padding: '50px', margin: '0 auto'}}>
|
|
74
|
+
<GanttComponent id='Default' ref={(gantt) => { ganttInstance = gantt} } dataSource={taskData} treeColumnIndex={1}
|
|
75
|
+
taskFields={taskFields} splitterSettings={splitterSettings} labelSettings={labelSettings} height='650px' taskbarHeight={25} rowHeight={46}
|
|
76
|
+
projectStartDate={projectStartDate} projectEndDate={projectEndDate} created={onCreated}>
|
|
77
|
+
<ColumnsDirective>
|
|
78
|
+
<ColumnDirective field='TaskID' width='80' ></ColumnDirective>
|
|
79
|
+
<ColumnDirective field='TaskName' headerText='Job Name' width='250' clipMode='EllipsisWithTooltip'></ColumnDirective>
|
|
80
|
+
<ColumnDirective field='StartDate'></ColumnDirective>
|
|
81
|
+
<ColumnDirective field='Duration'></ColumnDirective>
|
|
82
|
+
<ColumnDirective field='Progress'></ColumnDirective>
|
|
83
|
+
<ColumnDirective field='Predecessor'></ColumnDirective>
|
|
84
|
+
</ColumnsDirective>
|
|
85
|
+
<Inject services={[Selection]} />
|
|
86
|
+
</GanttComponent>
|
|
87
|
+
</div>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { GanttComponent, Inject, Selection, ColumnsDirective, ColumnDirective, type TaskFieldsModel, type LabelSettingsModel, type SplitterSettingsModel } from '@syncfusion/ej2-react-gantt';
|
|
2
|
+
|
|
3
|
+
const taskData = [
|
|
4
|
+
{ TaskID: 1, TaskName: "Product concept", StartDate: new Date("04/02/2025"), EndDate: new Date("04/08/2025") },
|
|
5
|
+
{ TaskID: 2, TaskName: "Define the product usage", StartDate: new Date("04/02/2025"), EndDate: new Date("04/08/2025"), Duration: 1, Progress: 30, ParentId: 1, BaselineStartDate: new Date("04/02/2025"), BaselineEndDate: new Date("04/02/2025") },
|
|
6
|
+
{ TaskID: 3, TaskName: "Define the target audience", StartDate: new Date("04/02/2025"), EndDate: new Date("04/04/2025"), Duration: 2, Progress: 40, ParentId: 1 },
|
|
7
|
+
{ TaskID: 4, TaskName: "Prepare product sketch and notes", StartDate: new Date("04/05/2025"), Duration: 2, Progress: 30, ParentId: 1, Predecessor: "2" },
|
|
8
|
+
{ TaskID: 5, TaskName: "Concept approval", StartDate: new Date("04/08/2025"), EndDate: new Date("04/08/2025"), Duration: 0, ParentId: 1, Predecessor: "3,4", Indicators: [{ date: new Date("04/07/2025"), name: "Design Phase", tooltip: "Design phase completed", iconClass: "okIcon e-icons" }] },
|
|
9
|
+
{ TaskID: 6, TaskName: "Market research", StartDate: new Date("04/09/2025"), EndDate: new Date("04/18/2025"), Progress: 30, BaselineStartDate: new Date("04/09/2025"), BaselineEndDate: new Date("04/09/2025") },
|
|
10
|
+
{ TaskID: 7, TaskName: "Demand analysis", Progress: 40, ParentId: 6 },
|
|
11
|
+
{ TaskID: 8, TaskName: "Customer strength", StartDate: new Date("04/09/2025"), EndDate: new Date("04/12/2025"), Duration: 4, Progress: 30, ParentId: 7, Predecessor: "5", BaselineStartDate: new Date("04/12/2025"), BaselineEndDate: new Date("04/13/2025") },
|
|
12
|
+
{ TaskID: 9, TaskName: "Market opportunity analysis", StartDate: new Date("04/09/2025"), EndDate: new Date("04/12/2025"), Duration: 4, ParentId: 7, Predecessor: "5" },
|
|
13
|
+
{ TaskID: 10, TaskName: "Competitor analysis", StartDate: new Date("04/15/2025"), EndDate: new Date("04/18/2025"), Duration: 4, Progress: 30, ParentId: 6, Predecessor: "7,8" },
|
|
14
|
+
{ TaskID: 11, TaskName: "Product strength analysis", StartDate: new Date("04/15/2025"), EndDate: new Date("04/18/2025"), Duration: 4, Progress: 40, ParentId: 6, Predecessor: "9" },
|
|
15
|
+
{ TaskID: 12, TaskName: "Research completed", StartDate: new Date("04/18/2025"), EndDate: new Date("04/18/2025"), Duration: 0, Progress: 30, ParentId: 6, Predecessor: "10", Indicators: [{ date: new Date("04/20/2025"), name: "Research completed", tooltip: "Research completed", iconClass: "description e-icons" }] },
|
|
16
|
+
{ TaskID: 13, TaskName: "Product design and development", StartDate: new Date("04/19/2025"), EndDate: new Date("05/16/2025") },
|
|
17
|
+
{ TaskID: 14, TaskName: "Functionality design", StartDate: new Date("04/19/2025"), EndDate: new Date("04/23/2025"), Duration: 4, Progress: 30, ParentId: 13, Predecessor: "12" },
|
|
18
|
+
{ TaskID: 15, TaskName: "Quality design", StartDate: new Date("04/19/2025"), EndDate: new Date("04/23/2025"), Duration: 3, Progress: 40, ParentId: 13, Predecessor: "12" },
|
|
19
|
+
{ TaskID: 16, TaskName: "Define reliability", StartDate: new Date("04/24/2025"), EndDate: new Date("04/25/2025"), Duration: 4, Progress: 30, ParentId: 13, Predecessor: "15" },
|
|
20
|
+
{ TaskID: 17, TaskName: "Identifying raw materials", StartDate: new Date("04/24/2025"), EndDate: new Date("04/25/2025"), Duration: 2, ParentId: 13, Predecessor: "15" },
|
|
21
|
+
{ TaskID: 18, TaskName: "Define cost plan", StartDate: new Date("04/26/2025"), EndDate: new Date("04/29/2025"), Progress: 30, ParentId: 13, Predecessor: "17" },
|
|
22
|
+
{ TaskID: 19, TaskName: "Estimate manufacturing cost", StartDate: new Date("04/26/2025"), EndDate: new Date("04/29/2025"), Duration: 3, Progress: 40, ParentId: 18, Predecessor: "17" },
|
|
23
|
+
{ TaskID: 20, TaskName: "Estimate selling cost", StartDate: new Date("04/26/2025"), EndDate: new Date("04/29/2025"), Duration: 3, Progress: 30, ParentId: 18, Predecessor: "17" },
|
|
24
|
+
{ TaskID: 21, TaskName: "Development of final design", StartDate: new Date("04/30/2025"), EndDate: new Date("05/08/2025"), ParentId: 13 },
|
|
25
|
+
{ TaskID: 22, TaskName: "Develop dimensions and design", StartDate: new Date("04/30/2025"), EndDate: new Date("05/01/2025"), Duration: 4, Progress: 30, ParentId: 21, Predecessor: "19,20" },
|
|
26
|
+
{ TaskID: 23, TaskName: "Develop designs to meet industry", StartDate: new Date("05/02/2025"), EndDate: new Date("05/03/2025"), Duration: 3, Progress: 40, ParentId: 21, Predecessor: "22" },
|
|
27
|
+
{ TaskID: 24, TaskName: "Include all the details", StartDate: new Date("05/06/2025"), EndDate: new Date("05/08/2025"), Duration: 4, Progress: 30, ParentId: 21, Predecessor: "23" },
|
|
28
|
+
{ TaskID: 25, TaskName: "CAD - Computer Aided Design", StartDate: new Date("05/09/2025"), EndDate: new Date("05/13/2025"), Duration: 3, Predecessor: "24" },
|
|
29
|
+
{ TaskID: 26, TaskName: "CAM - Computer Aided Manufacturing", StartDate: new Date("05/14/2025"), EndDate: new Date("05/16/2025"), Duration: 4, Progress: 30, Predecessor: "25" },
|
|
30
|
+
{ TaskID: 27, TaskName: "Finalize the design", StartDate: new Date("04/16/2025"), EndDate: new Date("04/16/2025"), Duration: 0, Progress: 40, Predecessor: "26" },
|
|
31
|
+
{ TaskID: 28, TaskName: "Prototype testing", StartDate: new Date("05/17/2025"), EndDate: new Date("05/22/2025"), Duration: 4, Progress: 30, Predecessor: "27" },
|
|
32
|
+
{ TaskID: 29, TaskName: "Include feedback", StartDate: new Date("05/17/2025"), EndDate: new Date("05/22/2025"), Duration: 4, Predecessor: "28ss", Indicators: [{ date: new Date("05/30/2025"), name: "Production phase", tooltip: "Production phase completed", iconClass: "okIcon e-icons" }] },
|
|
33
|
+
{ TaskID: 30, TaskName: "Manufacturing", StartDate: new Date("05/23/2025"), EndDate: new Date("05/29/2025"), Duration: 5, Progress: 30, Predecessor: "28,29" },
|
|
34
|
+
{ TaskID: 31, TaskName: "Assembling material into finished goods", StartDate: new Date("05/30/2025"), EndDate: new Date("06/05/2025"), Duration: 5, Progress: 40, Predecessor: "30" },
|
|
35
|
+
{ TaskID: 32, TaskName: "Final product development", StartDate: new Date("06/06/2025"), EndDate: new Date("06/13/2025"), Progress: 30 },
|
|
36
|
+
{ TaskID: 33, TaskName: "Important improvement", StartDate: new Date("06/06/2025"), EndDate: new Date("06/10/2025"), Duration: 3, ParentId: 32, Predecessor: "31" },
|
|
37
|
+
{ TaskID: 34, TaskName: "Customer testing and feedback", StartDate: new Date("06/11/2025"), EndDate: new Date("06/13/2025"), Duration: 4, Progress: 30, ParentId: 32, Predecessor: "33" },
|
|
38
|
+
{ TaskID: 35, TaskName: "Final product development", StartDate: new Date("06/14/2025"), EndDate: new Date("06/19/2025"), Progress: 40 },
|
|
39
|
+
{ TaskID: 36, TaskName: "Important improvement", StartDate: new Date("06/14/2025"), EndDate: new Date("06/19/2025"), Duration: 4, Progress: 30, ParentId: 35, Predecessor: "34" },
|
|
40
|
+
{ TaskID: 37, TaskName: "Address any unforeseen issues", StartDate: new Date("06/14/2025"), EndDate: new Date("06/19/2025"), Duration: 4, Progress: 30, Predecessor: "36ss", ParentId: 35, Indicators: [{ date: new Date("06/30/2025"), name: "Sales and marketing", tooltip: "Sales and marketing", iconClass: "description e-icons" }] },
|
|
41
|
+
{ TaskID: 38, TaskName: "Finalize the product", StartDate: new Date("06/20/2025"), EndDate: new Date("07/01/2025"), Progress: 40 },
|
|
42
|
+
{ TaskID: 39, TaskName: "Branding the product", StartDate: new Date("06/20/2025"), EndDate: new Date("06/25/2025"), Duration: 4, Progress: 30, ParentId: 38, Predecessor: "37" },
|
|
43
|
+
{ TaskID: 40, TaskName: "Marketing and presales", StartDate: new Date("06/26/2025"), EndDate: new Date("07/01/2025"), Duration: 4, ParentId: 38, Predecessor: "39" }
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
export default function Gantt() {
|
|
47
|
+
let ganttInstance: GanttComponent;
|
|
48
|
+
const taskFields: TaskFieldsModel = {
|
|
49
|
+
id: 'TaskID',
|
|
50
|
+
name: 'TaskName',
|
|
51
|
+
startDate: 'StartDate',
|
|
52
|
+
endDate: 'EndDate',
|
|
53
|
+
duration: 'Duration',
|
|
54
|
+
progress: 'Progress',
|
|
55
|
+
dependency: 'Predecessor',
|
|
56
|
+
parentID: 'ParentId'
|
|
57
|
+
};
|
|
58
|
+
const labelSettings: LabelSettingsModel = {
|
|
59
|
+
leftLabel: 'TaskName'
|
|
60
|
+
};
|
|
61
|
+
const splitterSettings: SplitterSettingsModel = {
|
|
62
|
+
columnIndex: 2
|
|
63
|
+
};
|
|
64
|
+
const projectStartDate: Date = new Date('03/26/2025');
|
|
65
|
+
const projectEndDate: Date = new Date('07/20/2025');
|
|
66
|
+
const onCreated = (): void => {
|
|
67
|
+
if (document.querySelector('.e-bigger')) {
|
|
68
|
+
ganttInstance.rowHeight = 48;
|
|
69
|
+
ganttInstance.taskbarHeight = 28;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return (
|
|
73
|
+
<div className='control-pane' style={{ padding: '50px', margin: '0 auto'}}>
|
|
74
|
+
<GanttComponent id='Default' ref={(gantt: GanttComponent) => { ganttInstance = gantt} } dataSource={taskData} treeColumnIndex={1}
|
|
75
|
+
taskFields={taskFields} splitterSettings={splitterSettings} labelSettings={labelSettings} height='650px' taskbarHeight={25} rowHeight={46}
|
|
76
|
+
projectStartDate={projectStartDate} projectEndDate={projectEndDate} created={onCreated}>
|
|
77
|
+
<ColumnsDirective>
|
|
78
|
+
<ColumnDirective field='TaskID' width='80' ></ColumnDirective>
|
|
79
|
+
<ColumnDirective field='TaskName' headerText='Job Name' width='250' clipMode='EllipsisWithTooltip'></ColumnDirective>
|
|
80
|
+
<ColumnDirective field='StartDate'></ColumnDirective>
|
|
81
|
+
<ColumnDirective field='Duration'></ColumnDirective>
|
|
82
|
+
<ColumnDirective field='Progress'></ColumnDirective>
|
|
83
|
+
<ColumnDirective field='Predecessor'></ColumnDirective>
|
|
84
|
+
</ColumnsDirective>
|
|
85
|
+
<Inject services={[Selection]} />
|
|
86
|
+
</GanttComponent>
|
|
87
|
+
</div>
|
|
88
|
+
)
|
|
89
|
+
}
|