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.
Files changed (119) hide show
  1. package/Jenkinsfile +48 -0
  2. package/README.md +300 -0
  3. package/bin/sf.js +438 -0
  4. package/eslint.config.js +90 -0
  5. package/gulpfile.js +157 -0
  6. package/lib/commander.js +3370 -0
  7. package/lib/inquirer-prompts.js +2038 -0
  8. package/license +13 -0
  9. package/package.json +43 -0
  10. package/smoke-test.mjs +38 -0
  11. package/src/commands/add.js +276 -0
  12. package/src/commands/info.js +82 -0
  13. package/src/commands/interactive.js +493 -0
  14. package/src/commands/mcp.js +135 -0
  15. package/src/commands/new.js +264 -0
  16. package/src/commands/skills.js +42 -0
  17. package/src/commands/theme.js +200 -0
  18. package/src/commands/upgrade.js +219 -0
  19. package/src/constants.js +161 -0
  20. package/src/generators/angular.js +878 -0
  21. package/src/generators/nextjs.js +817 -0
  22. package/src/generators/react.js +769 -0
  23. package/src/generators/typescript.js +258 -0
  24. package/src/generators/vue.js +800 -0
  25. package/src/templates/angular/chart.component.html +23 -0
  26. package/src/templates/angular/chart.component.ts +172 -0
  27. package/src/templates/angular/diagram.component.html +13 -0
  28. package/src/templates/angular/diagram.component.ts +224 -0
  29. package/src/templates/angular/docx-editor.component.html +18 -0
  30. package/src/templates/angular/docx-editor.component.ts +37 -0
  31. package/src/templates/angular/filemanager.component.html +4 -0
  32. package/src/templates/angular/filemanager.component.ts +47 -0
  33. package/src/templates/angular/gantt.component.html +32 -0
  34. package/src/templates/angular/gantt.component.ts +95 -0
  35. package/src/templates/angular/grid.component.html +12 -0
  36. package/src/templates/angular/grid.component.ts +58 -0
  37. package/src/templates/angular/pdf-viewer.component.html +9 -0
  38. package/src/templates/angular/pdf-viewer.component.ts +48 -0
  39. package/src/templates/angular/rte.component.html +7 -0
  40. package/src/templates/angular/rte.component.ts +13 -0
  41. package/src/templates/angular/scheduler.component.html +17 -0
  42. package/src/templates/angular/scheduler.component.ts +75 -0
  43. package/src/templates/angular/spreadsheet-editor.component.html +42 -0
  44. package/src/templates/angular/spreadsheet-editor.component.ts +61 -0
  45. package/src/templates/chart-template.js +20 -0
  46. package/src/templates/diagram-template.js +26 -0
  47. package/src/templates/docx-template.js +20 -0
  48. package/src/templates/filemanager-template.js +20 -0
  49. package/src/templates/gantt-template.js +20 -0
  50. package/src/templates/grid-template.js +20 -0
  51. package/src/templates/pdfviewer-template.js +20 -0
  52. package/src/templates/react/Chart.jsx +81 -0
  53. package/src/templates/react/Chart.tsx +81 -0
  54. package/src/templates/react/DOCXEditor.jsx +37 -0
  55. package/src/templates/react/DOCXEditor.tsx +37 -0
  56. package/src/templates/react/Diagram.jsx +192 -0
  57. package/src/templates/react/Diagram.tsx +195 -0
  58. package/src/templates/react/FileManager.jsx +13 -0
  59. package/src/templates/react/FileManager.tsx +13 -0
  60. package/src/templates/react/Gantt.jsx +89 -0
  61. package/src/templates/react/Gantt.tsx +89 -0
  62. package/src/templates/react/Grid.jsx +45 -0
  63. package/src/templates/react/Grid.tsx +45 -0
  64. package/src/templates/react/PDFViewer.jsx +16 -0
  65. package/src/templates/react/PDFViewer.tsx +16 -0
  66. package/src/templates/react/RTE.jsx +14 -0
  67. package/src/templates/react/RTE.tsx +14 -0
  68. package/src/templates/react/Scheduler.jsx +55 -0
  69. package/src/templates/react/Scheduler.tsx +55 -0
  70. package/src/templates/react/SpreadsheetEditor.jsx +96 -0
  71. package/src/templates/react/SpreadsheetEditor.tsx +98 -0
  72. package/src/templates/rte-template.js +26 -0
  73. package/src/templates/scheduler-template.js +20 -0
  74. package/src/templates/spreadheet-template.js +20 -0
  75. package/src/templates/typescript/RTE.ts +33 -0
  76. package/src/templates/typescript/SpreadsheetEditor.ts +39 -0
  77. package/src/templates/typescript/chart.ts +37 -0
  78. package/src/templates/typescript/diagram.ts +30 -0
  79. package/src/templates/typescript/docxeditor.ts +30 -0
  80. package/src/templates/typescript/filemanager.ts +41 -0
  81. package/src/templates/typescript/gantt.ts +88 -0
  82. package/src/templates/typescript/grid.ts +30 -0
  83. package/src/templates/typescript/pdfviewer.ts +8 -0
  84. package/src/templates/typescript/scheduler.ts +39 -0
  85. package/src/templates/vue/Chart.vue +257 -0
  86. package/src/templates/vue/ChartView.vue +7 -0
  87. package/src/templates/vue/DOCXEditor.vue +61 -0
  88. package/src/templates/vue/DOCXEditorView.vue +7 -0
  89. package/src/templates/vue/Diagram.vue +245 -0
  90. package/src/templates/vue/DiagramView.vue +7 -0
  91. package/src/templates/vue/FileManager.vue +58 -0
  92. package/src/templates/vue/FileManagerView.vue +7 -0
  93. package/src/templates/vue/Gantt.vue +129 -0
  94. package/src/templates/vue/GanttView.vue +7 -0
  95. package/src/templates/vue/Grid.vue +141 -0
  96. package/src/templates/vue/GridView.vue +7 -0
  97. package/src/templates/vue/PDFViewer.vue +58 -0
  98. package/src/templates/vue/PDFViewerView.vue +7 -0
  99. package/src/templates/vue/RTE.vue +27 -0
  100. package/src/templates/vue/RTEView.vue +7 -0
  101. package/src/templates/vue/Scheduler.vue +94 -0
  102. package/src/templates/vue/SchedulerView.vue +7 -0
  103. package/src/templates/vue/SpreadsheetEditor.vue +115 -0
  104. package/src/templates/vue/SpreadsheetEditorView.vue +7 -0
  105. package/src/utils/ansi-colors.js +38 -0
  106. package/src/utils/banner.js +179 -0
  107. package/src/utils/common.js +64 -0
  108. package/src/utils/config-generator.js +73 -0
  109. package/src/utils/folder-structure.js +26 -0
  110. package/src/utils/logger.js +19 -0
  111. package/src/utils/mcp-generator.js +122 -0
  112. package/src/utils/package-manager.js +128 -0
  113. package/src/utils/project-bootstrap.js +98 -0
  114. package/src/utils/project-detector.js +195 -0
  115. package/src/utils/prompt-utils.js +29 -0
  116. package/src/utils/run-command.js +110 -0
  117. package/src/utils/skills-installer.js +69 -0
  118. package/src/utils/template-file.js +35 -0
  119. package/src/utils/theme-loader.js +47 -0
@@ -0,0 +1,75 @@
1
+ import { Component, ViewChild } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+
4
+ import {
5
+ ScheduleComponent,
6
+ ScheduleModule,
7
+ DayService,
8
+ WeekService,
9
+ WorkWeekService,
10
+ MonthService,
11
+ AgendaService,
12
+ ResizeService,
13
+ DragAndDropService,
14
+ DragEventArgs,
15
+ EventSettingsModel
16
+ } from '@syncfusion/ej2-angular-schedule';
17
+
18
+ @Component({
19
+ selector: 'app-scheduler',
20
+ standalone: true,
21
+ imports: [CommonModule, ScheduleModule],
22
+ providers: [
23
+ DayService,
24
+ WeekService,
25
+ WorkWeekService,
26
+ MonthService,
27
+ AgendaService,
28
+ ResizeService,
29
+ DragAndDropService
30
+ ],
31
+ templateUrl: './scheduler.component.html'
32
+ })
33
+ export class SchedulerComponent {
34
+ @ViewChild('scheduleObj')
35
+ public scheduleObj?: ScheduleComponent;
36
+
37
+ public selectedDate: Date = new Date(2021, 0, 10);
38
+
39
+ public dataSource: Object[] = [
40
+ { "Id": 1, "Subject": "Explosion of Betelgeuse Star", "Location": "Space Center USA", "StartTime": "2021-01-10T04:00:00.000Z", "EndTime": "2021-01-10T05:30:00.000Z", "CategoryColor": "#1aaa55" },
41
+ { "Id": 2, "Subject": "Thule Air Crash Report", "Location": "Newyork City", "StartTime": "2021-01-11T06:30:00.000Z", "EndTime": "2021-01-11T08:30:00.000Z", "CategoryColor": "#357cd2" },
42
+ { "Id": 3, "Subject": "Blue Moon Eclipse", "Location": "Space Center USA", "StartTime": "2021-01-12T04:00:00.000Z", "EndTime": "2021-01-12T05:30:00.000Z", "CategoryColor": "#7fa900" },
43
+ { "Id": 4, "Subject": "Meteor Showers in 2021", "Location": "Space Center USA", "StartTime": "2021-01-13T07:30:00.000Z", "EndTime": "2021-01-13T09:00:00.000Z", "CategoryColor": "#ea7a57" },
44
+ { "Id": 5, "Subject": "Milky Way as Melting pot", "Location": "Space Center USA", "StartTime": "2021-01-14T06:30:00.000Z", "EndTime": "2021-01-14T08:30:00.000Z", "CategoryColor": "#00bdae" },
45
+ { "Id": 6, "Subject": "Mysteries of Bermuda Triangle", "Location": "Bermuda", "StartTime": "2021-01-14T04:00:00.000Z", "EndTime": "2021-01-14T05:30:00.000Z", "CategoryColor": "#f57f17" },
46
+ { "Id": 7, "Subject": "Glaciers and Snowflakes", "Location": "Himalayas", "StartTime": "2021-01-15T05:30:00.000Z", "EndTime": "2021-01-15T07:00:00.000Z", "CategoryColor": "#1aaa55" },
47
+ { "Id": 8, "Subject": "Life on Mars", "Location": "Space Center USA", "StartTime": "2021-01-16T03:30:00.000Z", "EndTime": "2021-01-16T04:30:00.000Z", "CategoryColor": "#357cd2" },
48
+ { "Id": 9, "Subject": "Alien Civilization", "Location": "Space Center USA", "StartTime": "2021-01-18T05:30:00.000Z", "EndTime": "2021-01-18T07:30:00.000Z", "CategoryColor": "#7fa900" },
49
+ { "Id": 10, "Subject": "Wildlife Galleries", "Location": "Africa", "StartTime": "2021-01-20T05:30:00.000Z", "EndTime": "2021-01-20T07:30:00.000Z", "CategoryColor": "#ea7a57" },
50
+ { "Id": 11, "Subject": "Best Photography 2021", "Location": "London", "StartTime": "2021-01-21T04:00:00.000Z", "EndTime": "2021-01-21T05:30:00.000Z", "CategoryColor": "#00bdae" },
51
+ { "Id": 12, "Subject": "Smarter Puppies", "Location": "Sweden", "StartTime": "2021-01-08T04:30:00.000Z", "EndTime": "2021-01-08T06:00:00.000Z", "CategoryColor": "#f57f17" },
52
+ { "Id": 13, "Subject": "Myths of Andromeda Galaxy", "Location": "Space Center USA", "StartTime": "2021-01-06T05:00:00.000Z", "EndTime": "2021-01-06T07:00:00.000Z", "CategoryColor": "#1aaa55" },
53
+ { "Id": 14, "Subject": "Aliens vs Humans", "Location": "Research Center of USA", "StartTime": "2021-01-05T04:30:00.000Z", "EndTime": "2021-01-05T06:00:00.000Z", "CategoryColor": "#357cd2" },
54
+ { "Id": 15, "Subject": "Facts of Humming Birds", "Location": "California", "StartTime": "2021-01-19T04:00:00.000Z", "EndTime": "2021-01-19T05:30:00.000Z", "CategoryColor": "#7fa900" },
55
+ { "Id": 16, "Subject": "Sky Gazers", "Location": "Alaska", "StartTime": "2021-01-22T05:30:00.000Z", "EndTime": "2021-01-22T07:30:00.000Z", "CategoryColor": "#ea7a57" },
56
+ { "Id": 17, "Subject": "The Cycle of Seasons", "Location": "Research Center of USA", "StartTime": "2021-01-11T00:00:00.000Z", "EndTime": "2021-01-11T02:00:00.000Z", "CategoryColor": "#00bdae" },
57
+ { "Id": 18, "Subject": "Space Galaxies and Planets", "Location": "Space Center USA", "StartTime": "2021-01-11T11:30:00.000Z", "EndTime": "2021-01-11T13:00:00.000Z", "CategoryColor": "#f57f17" },
58
+ { "Id": 19, "Subject": "Lifecycle of Bumblebee", "Location": "San Fransisco", "StartTime": "2021-01-14T00:30:00.000Z", "EndTime": "2021-01-14T02:00:00.000Z", "CategoryColor": "#7fa900" },
59
+ { "Id": 20, "Subject": "Alien Civilization", "Location": "Space Center USA", "StartTime": "2021-01-14T10:30:00.000Z", "EndTime": "2021-01-14T12:30:00.000Z", "CategoryColor": "#ea7a57" },
60
+ { "Id": 21, "Subject": "Alien Civilization", "Location": "Space Center USA", "StartTime": "2021-01-10T08:30:00.000Z", "EndTime": "2021-01-10T10:30:00.000Z", "CategoryColor": "#ea7a57" },
61
+ { "Id": 22, "Subject": "The Cycle of Seasons", "Location": "Research Center of USA", "StartTime": "2021-01-12T09:00:00.000Z", "EndTime": "2021-01-12T10:30:00.000Z", "CategoryColor": "#00bdae" },
62
+ { "Id": 23, "Subject": "Sky Gazers", "Location": "Greenland", "StartTime": "2021-01-15T09:00:00.000Z", "EndTime": "2021-01-15T10:30:00.000Z", "CategoryColor": "#ea7a57" },
63
+ { "Id": 24, "Subject": "Facts of Humming Birds", "Location": "California", "StartTime": "2021-01-16T07:00:00.000Z", "EndTime": "2021-01-16T09:00:00.000Z", "CategoryColor": "#7fa900" }
64
+ ];
65
+
66
+ public eventSettings: EventSettingsModel = {
67
+ dataSource: this.dataSource
68
+ };
69
+
70
+ public onDragStart(args: DragEventArgs): void {
71
+ if (args.navigation) {
72
+ args.navigation.enable = true;
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,42 @@
1
+ <div class="control-pane" style="padding: 50px; margin: 0 auto">
2
+ <ejs-spreadsheet
3
+ #spreadsheet
4
+ [openUrl]="openUrl"
5
+ [saveUrl]="saveUrl"
6
+ (created)="onCreated()"
7
+ >
8
+ <e-sheets>
9
+ <e-sheet name="Car Sales Report">
10
+ <e-ranges>
11
+ <e-range [dataSource]="defaultData"></e-range>
12
+ </e-ranges>
13
+
14
+ <e-rows>
15
+ <e-row [index]="12">
16
+ <e-cells>
17
+ <e-cell
18
+ [index]="4"
19
+ value="Total Amount:"
20
+ [style]="boldRight"
21
+ ></e-cell>
22
+
23
+ <e-cell
24
+ formula="=SUM(F2:F12)"
25
+ [style]="bold"
26
+ ></e-cell>
27
+ </e-cells>
28
+ </e-row>
29
+ </e-rows>
30
+
31
+ <e-columns>
32
+ <e-column [width]="180"></e-column>
33
+ <e-column [width]="130"></e-column>
34
+ <e-column [width]="130"></e-column>
35
+ <e-column [width]="180"></e-column>
36
+ <e-column [width]="130"></e-column>
37
+ <e-column [width]="120"></e-column>
38
+ </e-columns>
39
+ </e-sheet>
40
+ </e-sheets>
41
+ </ejs-spreadsheet>
42
+ </div>
@@ -0,0 +1,61 @@
1
+ import { Component, ViewChild } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import {
4
+ SpreadsheetModule,
5
+ SpreadsheetComponent,
6
+ CellStyleModel
7
+ } from '@syncfusion/ej2-angular-spreadsheet';
8
+
9
+ @Component({
10
+ selector: 'app-spreadsheet-editor',
11
+ standalone: true,
12
+ imports: [CommonModule, SpreadsheetModule],
13
+ templateUrl: './spreadsheet-editor.component.html'
14
+ })
15
+ export class SpreadsheetEditorComponent {
16
+ @ViewChild('spreadsheet')
17
+ public spreadsheetObj!: SpreadsheetComponent;
18
+
19
+ public openUrl: string = 'https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/open';
20
+
21
+ public saveUrl: string = 'https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/save';
22
+
23
+ public defaultData: Object[] = [
24
+ { "Customer Name": "Romona Heaslip", "Model": "Taurus", "Color": "Aquamarine", "Payment Mode": "Debit Card", "Delivery Date": "07-11-2015", "Amount": "8529.22" },
25
+ { "Customer Name": "Clare Batterton", "Model": "Sparrow", "Color": "Pink", "Payment Mode": "Cash On Delivery", "Delivery Date": "07-13-2016", "Amount": "17866.19" },
26
+ { "Customer Name": "Eamon Traise", "Model": "Grand Cherokee", "Color": "Blue", "Payment Mode": "Net Banking", "Delivery Date": "09-04-2015", "Amount": "13853.09" },
27
+ { "Customer Name": "Julius Gorner", "Model": "GTO", "Color": "Aquamarine", "Payment Mode": "Credit Card", "Delivery Date": "12-15-2017", "Amount": "2338.74" },
28
+ { "Customer Name": "Jenna Schoolfield", "Model": "LX", "Color": "Yellow", "Payment Mode": "Credit Card", "Delivery Date": "10-08-2014", "Amount": "9578.45" },
29
+ { "Customer Name": "Marylynne Harring", "Model": "Catera", "Color": "Green", "Payment Mode": "Cash On Delivery", "Delivery Date": "07-01-2017", "Amount": "19141.62" },
30
+ { "Customer Name": "Vilhelmina Leipelt", "Model": "7 Series", "Color": "Goldenrod", "Payment Mode": "Credit Card", "Delivery Date": "12-20-2015", "Amount": "6543.30" },
31
+ { "Customer Name": "Barby Heisler", "Model": "Corvette", "Color": "Red", "Payment Mode": "Credit Card", "Delivery Date": "11-24-2014", "Amount": "13035.06" },
32
+ { "Customer Name": "Karyn Boik", "Model": "Regal", "Color": "Indigo", "Payment Mode": "Debit Card", "Delivery Date": "05-12-2014", "Amount": "18488.80" },
33
+ { "Customer Name": "Jeanette Pamplin", "Model": "S4", "Color": "Fuscia", "Payment Mode": "Net Banking", "Delivery Date": "12-30-2014", "Amount": "12317.04" },
34
+ { "Customer Name": "Cristi Espinos", "Model": "TL", "Color": "Aquamarine", "Payment Mode": "Credit Card", "Delivery Date": "12-18-2013", "Amount": "6230.13" }
35
+ ];
36
+
37
+ public boldRight: CellStyleModel = {
38
+ fontWeight: 'bold',
39
+ textAlign: 'right'
40
+ };
41
+
42
+ public bold: CellStyleModel = {
43
+ fontWeight: 'bold'
44
+ };
45
+
46
+ public onCreated(): void {
47
+ if (this.spreadsheetObj) {
48
+ this.spreadsheetObj.cellFormat(
49
+ {
50
+ fontWeight: 'bold',
51
+ textAlign: 'center',
52
+ verticalAlign: 'middle'
53
+ },
54
+ 'A1:F1'
55
+ );
56
+
57
+ this.spreadsheetObj.numberFormat('$#,##0.00', 'F2:F12');
58
+ this.spreadsheetObj.numberFormat('m/d/yyyy', 'E2:E12');
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,20 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateChartTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `Chart${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const chartDir = path.join(componentsDir, 'chart');
12
+ await copyTemplateFiles('angular', ['chart.component.ts', 'chart.component.html'], '', chartDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'Chart.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'ChartView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'Chart.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,26 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateDiagramTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `Diagram${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const diagramDir = path.join(componentsDir, 'diagram');
12
+ await copyTemplateFiles(
13
+ 'angular',
14
+ ['diagram.component.ts', 'diagram.component.html'],
15
+ '',
16
+ diagramDir
17
+ );
18
+ } else if (framework === 'vue') {
19
+ await copyTemplateFile('vue', 'Diagram.vue', componentsDir);
20
+
21
+ const viewsDir = path.join(componentsDir, '..', 'views');
22
+ await copyTemplateFile('vue', 'DiagramView.vue', viewsDir);
23
+ } else if (framework === 'typescript') {
24
+ await copyTemplateFile('typescript', 'Diagram.ts', componentsDir);
25
+ }
26
+ }
@@ -0,0 +1,20 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateDOCXTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `DOCXEditor${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const docxEditorDir = path.join(componentsDir, 'docx-editor');
12
+ await copyTemplateFiles('angular', ['docx-editor.component.ts', 'docx-editor.component.html'], '', docxEditorDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'DOCXEditor.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'DOCXEditorView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'DOCXEditor.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateFileManagerTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `FileManager${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const fmDir = path.join(componentsDir, 'file-manager');
12
+ await copyTemplateFiles('angular', ['filemanager.component.ts', 'filemanager.component.html'], '', fmDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'FileManager.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'FileManagerView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'FileManager.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateGanttTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `Gantt${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const ganttDir = path.join(componentsDir, 'gantt');
12
+ await copyTemplateFiles('angular', ['gantt.component.ts', 'gantt.component.html'], '', ganttDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'Gantt.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'GanttView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'Gantt.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateGridTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `Grid${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const gridDir = path.join(componentsDir, 'grid');
12
+ await copyTemplateFiles('angular', ['grid.component.ts', 'grid.component.html'], '', gridDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'Grid.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'GridView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'Grid.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generatePDFTemplate(appPath, framework, isTypeScript = false) {
5
+ const componentsDir = path.join(appPath, 'src', 'components');
6
+
7
+ if (framework === 'react') {
8
+ const ext = isTypeScript ? '.tsx' : '.jsx';
9
+ await copyTemplateFile('react', `PDFViewer${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const pdfViewerDir = path.join(componentsDir, 'pdf-viewer');
12
+ await copyTemplateFiles('angular', ['pdf-viewer.component.ts', 'pdf-viewer.component.html'], '', pdfViewerDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'PDFViewer.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'PDFViewerView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'PDFViewer.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,81 @@
1
+ import { ChartComponent, SeriesCollectionDirective, SeriesDirective, Inject, LineSeries, Legend, Double, Tooltip, Highlight, SeriesLabel } from '@syncfusion/ej2-react-charts';
2
+ import { Browser } from '@syncfusion/ej2-base';
3
+
4
+ export let vietnamData = [
5
+ { x: 2016, y: 7.8 },
6
+ { x: 2017, y: 10.3 },
7
+ { x: 2018, y: 15.5 },
8
+ { x: 2019, y: 17.5 },
9
+ { x: 2020, y: 19.5 },
10
+ { x: 2021, y: 23.0 },
11
+ { x: 2022, y: 20.0 },
12
+ { x: 2023, y: 19.0 },
13
+ { x: 2024, y: 22.1 }
14
+ ];
15
+
16
+ export let indonesiaData = [
17
+ { x: 2016, y: 4.8 },
18
+ { x: 2017, y: 5.2 },
19
+ { x: 2018, y: 6.2 },
20
+ { x: 2019, y: 7.8 },
21
+ { x: 2020, y: 9.3 },
22
+ { x: 2021, y: 14.3 },
23
+ { x: 2022, y: 15.6 },
24
+ { x: 2023, y: 16.0 },
25
+ { x: 2024, y: 17.0 }
26
+ ];
27
+
28
+ export let franceData = [
29
+ { x: 2016, y: 14.6 },
30
+ { x: 2017, y: 15.5 },
31
+ { x: 2018, y: 15.4 },
32
+ { x: 2019, y: 14.4 },
33
+ { x: 2020, y: 11.6 },
34
+ { x: 2021, y: 13.9 },
35
+ { x: 2022, y: 12.1 },
36
+ { x: 2023, y: 10.0 },
37
+ { x: 2024, y: 10.8 }
38
+ ];
39
+
40
+ export let polandData = [
41
+ { x: 2016, y: 8.9 },
42
+ { x: 2017, y: 10.3 },
43
+ { x: 2018, y: 10.8 },
44
+ { x: 2019, y: 9.0 },
45
+ { x: 2020, y: 7.9 },
46
+ { x: 2021, y: 8.5 },
47
+ { x: 2022, y: 7.4 },
48
+ { x: 2023, y: 6.4 },
49
+ { x: 2024, y: 7.1 }
50
+ ];
51
+
52
+ export let mexicoData = [
53
+ { x: 2016, y: 19.0 },
54
+ { x: 2017, y: 20.0 },
55
+ { x: 2018, y: 20.2 },
56
+ { x: 2019, y: 18.4 },
57
+ { x: 2020, y: 16.8 },
58
+ { x: 2021, y: 18.5 },
59
+ { x: 2022, y: 18.4 },
60
+ { x: 2023, y: 16.3 },
61
+ { x: 2024, y: 13.7 }
62
+ ];
63
+
64
+ export default function Chart () {
65
+ return (
66
+ <div className="control-pane" style={{ margin: "50px 0px" }}>
67
+ <div className="control-section">
68
+ <ChartComponent id="charts" style={{ textAlign: 'center' }} primaryXAxis={{ valueType: 'Double', interval: 1, edgeLabelPlacement: 'Shift', majorGridLines: { width: 0 } }} primaryYAxis={{ title: 'Volume in million metric tons', labelFormat: '{value}', rangePadding: 'None', minimum: 0, maximum: 25, interval: 5, lineStyle: { width: 0 }, majorTickLines: { width: 0 }, minorTickLines: { width: 0 } }} chartArea={{ border: { width: 0 }, margin: { bottom: 12 } }} tooltip={{ enable: true, enableHighlight: true, showNearestTooltip: true, header: '<b>${series.name}</b>', format: '${point.x} : <b>${point.y}M</b>' }} legendSettings={{ enableHighlight: true }} width={Browser.isDevice ? '100%' : '75%'} title="Annual Crude Steel Production by Country (2016–2024)" subTitle="Source: wikipedia.org">
69
+ <Inject services={[LineSeries, Double, Legend, Tooltip, Highlight, SeriesLabel]} />
70
+ <SeriesCollectionDirective>
71
+ <SeriesDirective dataSource={vietnamData} xName="x" yName="y" name="Vietnam" width={2} marker={{ visible: true, width: 7, height: 7, shape: 'Circle', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
72
+ <SeriesDirective dataSource={indonesiaData} xName="x" yName="y" name="Indonesia" width={2} marker={{ visible: true, width: 6, height: 6, shape: 'Triangle', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
73
+ <SeriesDirective dataSource={franceData} xName="x" yName="y" name="France" width={2} marker={{ visible: true, width: 7, height: 7, shape: 'Diamond', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
74
+ <SeriesDirective dataSource={polandData} xName="x" yName="y" name="Poland" width={2} marker={{ visible: true, width: 5, height: 5, shape: 'Rectangle', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
75
+ <SeriesDirective dataSource={mexicoData} xName="x" yName="y" name="Mexico" width={2} marker={{ visible: true, width: 7, height: 7, shape: 'Pentagon', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
76
+ </SeriesCollectionDirective>
77
+ </ChartComponent>
78
+ </div>
79
+ </div>
80
+ )
81
+ }
@@ -0,0 +1,81 @@
1
+ import { ChartComponent, SeriesCollectionDirective, SeriesDirective, Inject, LineSeries, Legend, Double, Tooltip, Highlight, SeriesLabel } from '@syncfusion/ej2-react-charts';
2
+ import { Browser } from '@syncfusion/ej2-base';
3
+
4
+ export let vietnamData: Object[] = [
5
+ { x: 2016, y: 7.8 },
6
+ { x: 2017, y: 10.3 },
7
+ { x: 2018, y: 15.5 },
8
+ { x: 2019, y: 17.5 },
9
+ { x: 2020, y: 19.5 },
10
+ { x: 2021, y: 23.0 },
11
+ { x: 2022, y: 20.0 },
12
+ { x: 2023, y: 19.0 },
13
+ { x: 2024, y: 22.1 }
14
+ ];
15
+
16
+ export let indonesiaData: Object[] = [
17
+ { x: 2016, y: 4.8 },
18
+ { x: 2017, y: 5.2 },
19
+ { x: 2018, y: 6.2 },
20
+ { x: 2019, y: 7.8 },
21
+ { x: 2020, y: 9.3 },
22
+ { x: 2021, y: 14.3 },
23
+ { x: 2022, y: 15.6 },
24
+ { x: 2023, y: 16.0 },
25
+ { x: 2024, y: 17.0 }
26
+ ];
27
+
28
+ export let franceData: Object[] = [
29
+ { x: 2016, y: 14.6 },
30
+ { x: 2017, y: 15.5 },
31
+ { x: 2018, y: 15.4 },
32
+ { x: 2019, y: 14.4 },
33
+ { x: 2020, y: 11.6 },
34
+ { x: 2021, y: 13.9 },
35
+ { x: 2022, y: 12.1 },
36
+ { x: 2023, y: 10.0 },
37
+ { x: 2024, y: 10.8 }
38
+ ];
39
+
40
+ export let polandData: Object[] = [
41
+ { x: 2016, y: 8.9 },
42
+ { x: 2017, y: 10.3 },
43
+ { x: 2018, y: 10.8 },
44
+ { x: 2019, y: 9.0 },
45
+ { x: 2020, y: 7.9 },
46
+ { x: 2021, y: 8.5 },
47
+ { x: 2022, y: 7.4 },
48
+ { x: 2023, y: 6.4 },
49
+ { x: 2024, y: 7.1 }
50
+ ];
51
+
52
+ export let mexicoData: Object[] = [
53
+ { x: 2016, y: 19.0 },
54
+ { x: 2017, y: 20.0 },
55
+ { x: 2018, y: 20.2 },
56
+ { x: 2019, y: 18.4 },
57
+ { x: 2020, y: 16.8 },
58
+ { x: 2021, y: 18.5 },
59
+ { x: 2022, y: 18.4 },
60
+ { x: 2023, y: 16.3 },
61
+ { x: 2024, y: 13.7 }
62
+ ];
63
+
64
+ export default function Chart () {
65
+ return (
66
+ <div className="control-pane" style={{ margin: "50px 0px" }}>
67
+ <div className="control-section">
68
+ <ChartComponent id="charts" style={{ textAlign: 'center' }} primaryXAxis={{ valueType: 'Double', interval: 1, edgeLabelPlacement: 'Shift', majorGridLines: { width: 0 } }} primaryYAxis={{ title: 'Volume in million metric tons', labelFormat: '{value}', rangePadding: 'None', minimum: 0, maximum: 25, interval: 5, lineStyle: { width: 0 }, majorTickLines: { width: 0 }, minorTickLines: { width: 0 } }} chartArea={{ border: { width: 0 }, margin: { bottom: 12 } }} tooltip={{ enable: true, enableHighlight: true, showNearestTooltip: true, header: '<b>${series.name}</b>', format: '${point.x} : <b>${point.y}M</b>' }} legendSettings={{ enableHighlight: true }} width={Browser.isDevice ? '100%' : '75%'} title="Annual Crude Steel Production by Country (2016–2024)" subTitle="Source: wikipedia.org">
69
+ <Inject services={[LineSeries, Double, Legend, Tooltip, Highlight, SeriesLabel]} />
70
+ <SeriesCollectionDirective>
71
+ <SeriesDirective dataSource={vietnamData} xName="x" yName="y" name="Vietnam" width={2} marker={{ visible: true, width: 7, height: 7, shape: 'Circle', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
72
+ <SeriesDirective dataSource={indonesiaData} xName="x" yName="y" name="Indonesia" width={2} marker={{ visible: true, width: 6, height: 6, shape: 'Triangle', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
73
+ <SeriesDirective dataSource={franceData} xName="x" yName="y" name="France" width={2} marker={{ visible: true, width: 7, height: 7, shape: 'Diamond', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
74
+ <SeriesDirective dataSource={polandData} xName="x" yName="y" name="Poland" width={2} marker={{ visible: true, width: 5, height: 5, shape: 'Rectangle', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
75
+ <SeriesDirective dataSource={mexicoData} xName="x" yName="y" name="Mexico" width={2} marker={{ visible: true, width: 7, height: 7, shape: 'Pentagon', isFilled: true }} type="Line" labelSettings={{ visible: true }}></SeriesDirective>
76
+ </SeriesCollectionDirective>
77
+ </ChartComponent>
78
+ </div>
79
+ </div>
80
+ )
81
+ }