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,45 @@
1
+ import { GridComponent, ColumnsDirective, ColumnDirective, Sort, Inject, Toolbar, Filter, Edit } from '@syncfusion/ej2-react-grids';
2
+
3
+ export default function Grid() {
4
+ const data = [
5
+ { 'OrderID': 10248, 'CustomerName': 'Maria ', 'OrderDate': new Date('1996-07-04'), 'ShippedDate': new Date('1996-07-16'), 'Freight': 32.38, 'ShipCountry': 'France' },
6
+ { 'OrderID': 10249, 'CustomerName': 'Ana Trujillo', 'OrderDate': new Date('1996-07-05'), 'ShippedDate': new Date('1996-07-10'), 'Freight': 11.61, 'ShipCountry': 'Germany' },
7
+ { 'OrderID': 10250, 'CustomerName': 'Antonio Moreno', 'OrderDate': new Date('1996-07-08'), 'ShippedDate': new Date('1996-07-12'), 'Freight': 65.83, 'ShipCountry': 'Brazil' },
8
+ { 'OrderID': 10251, 'CustomerName': 'Thomas Hardy', 'OrderDate': new Date('1996-07-08'), 'ShippedDate': new Date('1996-07-15'), 'Freight': 41.34, 'ShipCountry': 'France' },
9
+ { 'OrderID': 10252, 'CustomerName': 'Christina Berglund', 'OrderDate': new Date('1996-07-09'), 'ShippedDate': new Date('1996-07-11'), 'Freight': 51.3, 'ShipCountry': 'Belgium' },
10
+ { 'OrderID': 10253, 'CustomerName': 'Hanna Moos', 'OrderDate': new Date('1996-07-10'), 'ShippedDate': new Date('1996-07-16'), 'Freight': 58.17, 'ShipCountry': 'Brazil' },
11
+ { 'OrderID': 10254, 'CustomerName': 'Frédérique Citeaux', 'OrderDate': new Date('1996-07-11'), 'ShippedDate': new Date('1996-07-23'), 'Freight': 22.98, 'ShipCountry': 'Switzerland' },
12
+ { 'OrderID': 10255, 'CustomerName': 'Martín Sommer', 'OrderDate': new Date('1996-07-12'), 'ShippedDate': new Date('1996-07-15'), 'Freight': 148.33, 'ShipCountry': 'Switzerland' },
13
+ { 'OrderID': 10256, 'CustomerName': 'Laurence Lebihan', 'OrderDate': new Date('1996-07-15'), 'ShippedDate': new Date('1996-07-17'), 'Freight': 13.97, 'ShipCountry': 'Brazil' },
14
+ { 'OrderID': 10257, 'CustomerName': 'Elizabeth Lincoln', 'OrderDate': new Date('1996-07-16'), 'ShippedDate': new Date('1996-07-22'), 'Freight': 81.91, 'ShipCountry': 'Venezuela' },
15
+ { 'OrderID': 10258, 'CustomerName': 'Victoria Ashworth', 'OrderDate': new Date('1996-07-17'), 'ShippedDate': new Date('1996-07-23'), 'Freight': 140.51, 'ShipCountry': 'Austria' },
16
+ { 'OrderID': 10259, 'CustomerName': 'Patricio Simpson', 'OrderDate': new Date('1996-07-18'), 'ShippedDate': new Date('1996-07-25'), 'Freight': 3.25, 'ShipCountry': 'Mexico' },
17
+ { 'OrderID': 10260, 'CustomerName': 'Francisco Chang', 'OrderDate': new Date('1996-07-19'), 'ShippedDate': new Date('1996-07-29'), 'Freight': 55.09, 'ShipCountry': 'Germany' },
18
+ { 'OrderID': 10261, 'CustomerName': 'Yang Wang', 'OrderDate': new Date('1996-07-19'), 'ShippedDate': new Date('1996-07-30'), 'Freight': 3.05, 'ShipCountry': 'Brazil' },
19
+ { 'OrderID': 10262, 'CustomerName': 'Pedro Afonso', 'OrderDate': new Date('1996-07-22'), 'ShippedDate': new Date('1996-07-25'), 'Freight': 48.29, 'ShipCountry': 'USA' }
20
+ ];
21
+ const filterSettings = { type: 'Excel' };
22
+ const toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel'];
23
+ const editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true };
24
+ const customeridRule = { required: true, minLength: 5 };
25
+ const orderidRules = { required: true, number: true };
26
+ const freightRules = { required: true, min: 0 };
27
+
28
+ return (
29
+ <div className='control-pane' style={{ margin: '50px 90px' }}>
30
+ <div className='control-section'>
31
+ <GridComponent dataSource={data} height='350' allowSorting={true} editSettings={editSettings} allowFiltering={true} filterSettings={filterSettings} toolbar={toolbar}>
32
+ <ColumnsDirective>
33
+ <ColumnDirective field='OrderID' headerText='Order ID' width='180' textAlign='Right' validationRules={orderidRules} isPrimaryKey={true}></ColumnDirective>
34
+ <ColumnDirective field='CustomerName' headerText='Customer Name' width='150' validationRules={customeridRule}></ColumnDirective>
35
+ <ColumnDirective field='OrderDate' headerText='Order Date' width='130' format='yMd' textAlign='Right' editType='datepickeredit' />
36
+ <ColumnDirective field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right' validationRules={freightRules} editType='numericedit' />
37
+ <ColumnDirective field='ShippedDate' headerText='Shipped Date' width='130' format='yMd' textAlign='Right' editType='datepickeredit'></ColumnDirective>
38
+ <ColumnDirective field='ShipCountry' headerText='Ship Country' width='150' editType='dropdownedit'></ColumnDirective>
39
+ </ColumnsDirective>
40
+ <Inject services={[Sort, Toolbar, Filter, Edit]} />
41
+ </GridComponent>
42
+ </div>
43
+ </div>
44
+ )
45
+ }
@@ -0,0 +1,45 @@
1
+ import { GridComponent, ColumnsDirective, ColumnDirective, Sort, Inject, Toolbar, type ToolbarItems, type FilterSettingsModel, type EditSettingsModel, Filter, Edit } from '@syncfusion/ej2-react-grids';
2
+
3
+ export default function Grid() {
4
+ const data: Object[] = [
5
+ { 'OrderID': 10248, 'CustomerName': 'Maria ', 'OrderDate': new Date('1996-07-04'), 'ShippedDate': new Date('1996-07-16'), 'Freight': 32.38, 'ShipCountry': 'France' },
6
+ { 'OrderID': 10249, 'CustomerName': 'Ana Trujillo', 'OrderDate': new Date('1996-07-05'), 'ShippedDate': new Date('1996-07-10'), 'Freight': 11.61, 'ShipCountry': 'Germany' },
7
+ { 'OrderID': 10250, 'CustomerName': 'Antonio Moreno', 'OrderDate': new Date('1996-07-08'), 'ShippedDate': new Date('1996-07-12'), 'Freight': 65.83, 'ShipCountry': 'Brazil' },
8
+ { 'OrderID': 10251, 'CustomerName': 'Thomas Hardy', 'OrderDate': new Date('1996-07-08'), 'ShippedDate': new Date('1996-07-15'), 'Freight': 41.34, 'ShipCountry': 'France' },
9
+ { 'OrderID': 10252, 'CustomerName': 'Christina Berglund', 'OrderDate': new Date('1996-07-09'), 'ShippedDate': new Date('1996-07-11'), 'Freight': 51.3, 'ShipCountry': 'Belgium' },
10
+ { 'OrderID': 10253, 'CustomerName': 'Hanna Moos', 'OrderDate': new Date('1996-07-10'), 'ShippedDate': new Date('1996-07-16'), 'Freight': 58.17, 'ShipCountry': 'Brazil' },
11
+ { 'OrderID': 10254, 'CustomerName': 'Frédérique Citeaux', 'OrderDate': new Date('1996-07-11'), 'ShippedDate': new Date('1996-07-23'), 'Freight': 22.98, 'ShipCountry': 'Switzerland' },
12
+ { 'OrderID': 10255, 'CustomerName': 'Martín Sommer', 'OrderDate': new Date('1996-07-12'), 'ShippedDate': new Date('1996-07-15'), 'Freight': 148.33, 'ShipCountry': 'Switzerland' },
13
+ { 'OrderID': 10256, 'CustomerName': 'Laurence Lebihan', 'OrderDate': new Date('1996-07-15'), 'ShippedDate': new Date('1996-07-17'), 'Freight': 13.97, 'ShipCountry': 'Brazil' },
14
+ { 'OrderID': 10257, 'CustomerName': 'Elizabeth Lincoln', 'OrderDate': new Date('1996-07-16'), 'ShippedDate': new Date('1996-07-22'), 'Freight': 81.91, 'ShipCountry': 'Venezuela' },
15
+ { 'OrderID': 10258, 'CustomerName': 'Victoria Ashworth', 'OrderDate': new Date('1996-07-17'), 'ShippedDate': new Date('1996-07-23'), 'Freight': 140.51, 'ShipCountry': 'Austria' },
16
+ { 'OrderID': 10259, 'CustomerName': 'Patricio Simpson', 'OrderDate': new Date('1996-07-18'), 'ShippedDate': new Date('1996-07-25'), 'Freight': 3.25, 'ShipCountry': 'Mexico' },
17
+ { 'OrderID': 10260, 'CustomerName': 'Francisco Chang', 'OrderDate': new Date('1996-07-19'), 'ShippedDate': new Date('1996-07-29'), 'Freight': 55.09, 'ShipCountry': 'Germany' },
18
+ { 'OrderID': 10261, 'CustomerName': 'Yang Wang', 'OrderDate': new Date('1996-07-19'), 'ShippedDate': new Date('1996-07-30'), 'Freight': 3.05, 'ShipCountry': 'Brazil' },
19
+ { 'OrderID': 10262, 'CustomerName': 'Pedro Afonso', 'OrderDate': new Date('1996-07-22'), 'ShippedDate': new Date('1996-07-25'), 'Freight': 48.29, 'ShipCountry': 'USA' }
20
+ ];
21
+ const filterSettings: FilterSettingsModel = { type: 'Excel' };
22
+ const toolbar: ToolbarItems[] = ['Add', 'Edit', 'Delete', 'Update', 'Cancel'];
23
+ const editSettings: EditSettingsModel = { allowEditing: true, allowAdding: true, allowDeleting: true };
24
+ const customeridRule: Object = { required: true, minLength: 5 };
25
+ const orderidRules: Object = { required: true, number: true };
26
+ const freightRules: Object = { required: true, min: 0 };
27
+
28
+ return (
29
+ <div className='control-pane' style={{ margin: '50px 90px' }}>
30
+ <div className='control-section'>
31
+ <GridComponent dataSource={data} height='350' allowSorting={true} editSettings={editSettings} allowFiltering={true} filterSettings={filterSettings} toolbar={toolbar}>
32
+ <ColumnsDirective>
33
+ <ColumnDirective field='OrderID' headerText='Order ID' width='180' textAlign='Right' validationRules={orderidRules} isPrimaryKey={true}></ColumnDirective>
34
+ <ColumnDirective field='CustomerName' headerText='Customer Name' width='150' validationRules={customeridRule}></ColumnDirective>
35
+ <ColumnDirective field='OrderDate' headerText='Order Date' width='130' format='yMd' textAlign='Right' editType='datepickeredit' />
36
+ <ColumnDirective field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right' validationRules={freightRules} editType='numericedit' />
37
+ <ColumnDirective field='ShippedDate' headerText='Shipped Date' width='130' format='yMd' textAlign='Right' editType='datepickeredit'></ColumnDirective>
38
+ <ColumnDirective field='ShipCountry' headerText='Ship Country' width='150' editType='dropdownedit'></ColumnDirective>
39
+ </ColumnsDirective>
40
+ <Inject services={[Sort, Toolbar, Filter, Edit]} />
41
+ </GridComponent>
42
+ </div>
43
+ </div>
44
+ )
45
+ }
@@ -0,0 +1,16 @@
1
+ import {
2
+ PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView,
3
+ ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner, PageOrganizer,Inject
4
+ } from '@syncfusion/ej2-react-pdfviewer';
5
+
6
+ export default function PdfViewer () {
7
+ let viewer;
8
+ return (<div>
9
+ <div className='component-section' style={{ padding: '50px', margin: '0 auto'}}>
10
+ <PdfViewerComponent ref={(scope) => { viewer = scope; }} id="container" documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" resourceUrl = "https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib" style={{ 'height': '640px' }}>
11
+ <Inject services={[Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner,PageOrganizer]} />
12
+ </PdfViewerComponent>
13
+ </div>
14
+ </div>
15
+ );
16
+ }
@@ -0,0 +1,16 @@
1
+ import {
2
+ PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView,
3
+ ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner, PageOrganizer,Inject
4
+ } from '@syncfusion/ej2-react-pdfviewer';
5
+
6
+ export default function PdfViewer () {
7
+ let viewer: PdfViewerComponent;
8
+ return (<div>
9
+ <div className='component-section' style={{ padding: '50px', margin: '0 auto'}}>
10
+ <PdfViewerComponent ref={(scope: PdfViewerComponent) => { viewer = scope; }} id="container" documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" resourceUrl = "https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib" style={{ 'height': '640px' }}>
11
+ <Inject services={[Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner,PageOrganizer]} />
12
+ </PdfViewerComponent>
13
+ </div>
14
+ </div>
15
+ );
16
+ }
@@ -0,0 +1,14 @@
1
+ import { HtmlEditor, Image, Inject, Link, QuickToolbar, RichTextEditorComponent, Toolbar, Table, Video, Audio, PasteCleanup, ClipBoardCleanup, AutoFormat } from '@syncfusion/ej2-react-richtexteditor';
2
+
3
+ export default function RTE() {
4
+ let rteObj;
5
+
6
+ return (
7
+ <div className="control-section" style={{padding: "70px", margin: "0 auto" }}>
8
+ <RichTextEditorComponent id="defaultRTE" ref={(richtexteditor) => { rteObj = richtexteditor }} >
9
+ <h2>Welcome to the Rich Text Editor Demo!</h2><p>The Rich Text Editor control is a WYSIWYG ("what you see is what you get") editor that provides the best user experience to create and update the content. Users can format their content using standard toolbar commands.</p><h4>Flexible Editing!</h4><p>For a better editing experience, the Angular Rich Text Editor component offers a variety of tools and choices. So, you can quickly insert <strong>images</strong>, <strong>videos</strong>, <strong>hyperlinks</strong>, and <strong>tables</strong>; <strong>merge table cells</strong>; and configure.</p><p>You can easily format the text and paragraphs by setting the editor’s foreground and <strong>background colors</strong>, <strong>font type</strong>, <strong>italicization</strong>, <strong>adding ordered </strong>and <strong>unordered custom lists</strong>, <strong>underlining</strong>, <strong>strikethrough</strong>, and <strong>bolding</strong>.<br/><br/></p><p><img alt="Editor Features Overview" src="https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Overview.png" width="400" height="200" className="e-img-left"/></p>
10
+ <Inject services={[HtmlEditor, Toolbar, Image, Link, QuickToolbar, Table, Video, Audio, PasteCleanup, ClipBoardCleanup, AutoFormat]} />
11
+ </RichTextEditorComponent>
12
+ </div>
13
+ );
14
+ }
@@ -0,0 +1,14 @@
1
+ import { HtmlEditor, Image, Inject, Link, QuickToolbar, RichTextEditorComponent, Toolbar, Table, Video, Audio, PasteCleanup, ClipBoardCleanup, AutoFormat } from '@syncfusion/ej2-react-richtexteditor';
2
+
3
+ export default function RTE() {
4
+ let rteObj: RichTextEditorComponent;
5
+
6
+ return (
7
+ <div className="control-section" style={{padding: "70px", margin: "0 auto" }}>
8
+ <RichTextEditorComponent id="defaultRTE" ref={(richtexteditor: RichTextEditorComponent) => { rteObj = richtexteditor }} >
9
+ <h2>Welcome to the Rich Text Editor Demo!</h2><p>The Rich Text Editor control is a WYSIWYG ("what you see is what you get") editor that provides the best user experience to create and update the content. Users can format their content using standard toolbar commands.</p><h4>Flexible Editing!</h4><p>For a better editing experience, the Angular Rich Text Editor component offers a variety of tools and choices. So, you can quickly insert <strong>images</strong>, <strong>videos</strong>, <strong>hyperlinks</strong>, and <strong>tables</strong>; <strong>merge table cells</strong>; and configure.</p><p>You can easily format the text and paragraphs by setting the editor’s foreground and <strong>background colors</strong>, <strong>font type</strong>, <strong>italicization</strong>, <strong>adding ordered </strong>and <strong>unordered custom lists</strong>, <strong>underlining</strong>, <strong>strikethrough</strong>, and <strong>bolding</strong>.<br/><br/></p><p><img alt="Editor Features Overview" src="https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Overview.png" width="400" height="200" className="e-img-left"/></p>
10
+ <Inject services={[HtmlEditor, Toolbar, Image, Link, QuickToolbar, Table, Video, Audio, PasteCleanup, ClipBoardCleanup, AutoFormat]} />
11
+ </RichTextEditorComponent>
12
+ </div>
13
+ );
14
+ }
@@ -0,0 +1,55 @@
1
+ import { useRef } from 'react';
2
+ import { ScheduleComponent, ViewsDirective, ViewDirective, Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop } from '@syncfusion/ej2-react-schedule';
3
+ import { extend } from '@syncfusion/ej2-base';
4
+
5
+ export default function Scheduler() {
6
+ const scheduleObj = useRef(null);
7
+ const dataSource = [
8
+ { "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" },
9
+ { "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" },
10
+ { "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" },
11
+ { "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" },
12
+ { "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" },
13
+ { "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" },
14
+ { "Id": 7, "Subject": "Glaciers and Snowflakes", "Location": "Himalayas", "StartTime": "2021-01-15T05:30:00.000Z", "EndTime": "2021-01-15T07:00:00.000Z", "CategoryColor": "#1aaa55" },
15
+ { "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" },
16
+ { "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" },
17
+ { "Id": 10, "Subject": "Wildlife Galleries", "Location": "Africa", "StartTime": "2021-01-20T05:30:00.000Z", "EndTime": "2021-01-20T07:30:00.000Z", "CategoryColor": "#ea7a57" },
18
+ { "Id": 11, "Subject": "Best Photography 2021", "Location": "London", "StartTime": "2021-01-21T04:00:00.000Z", "EndTime": "2021-01-21T05:30:00.000Z", "CategoryColor": "#00bdae" },
19
+ { "Id": 12, "Subject": "Smarter Puppies", "Location": "Sweden", "StartTime": "2021-01-08T04:30:00.000Z", "EndTime": "2021-01-08T06:00:00.000Z", "CategoryColor": "#f57f17" },
20
+ { "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" },
21
+ { "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" },
22
+ { "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" },
23
+ { "Id": 16, "Subject": "Sky Gazers", "Location": "Alaska", "StartTime": "2021-01-22T05:30:00.000Z", "EndTime": "2021-01-22T07:30:00.000Z", "CategoryColor": "#ea7a57" },
24
+ { "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" },
25
+ { "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" },
26
+ { "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" },
27
+ { "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" },
28
+ { "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" },
29
+ { "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" },
30
+ { "Id": 23, "Subject": "Sky Gazers", "Location": "Greenland", "StartTime": "2021-01-15T09:00:00.000Z", "EndTime": "2021-01-15T10:30:00.000Z", "CategoryColor": "#ea7a57" },
31
+ { "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" }
32
+ ];
33
+ const data = extend([], dataSource, undefined, true);
34
+
35
+ const onDragStart = (args) => {
36
+ if (args.navigation) {
37
+ args.navigation.enable = true;
38
+ }
39
+ }
40
+
41
+ return (
42
+ <div className='schedulee-section' style={{ padding: '50px', margin: '0 auto'}}>
43
+ <ScheduleComponent height='650px' ref={scheduleObj} selectedDate={new Date(2021, 0, 10)} eventSettings={{ dataSource: data }} dragStart={(onDragStart)}>
44
+ <ViewsDirective>
45
+ <ViewDirective option='Day' />
46
+ <ViewDirective option='Week' />
47
+ <ViewDirective option='WorkWeek' />
48
+ <ViewDirective option='Month' />
49
+ <ViewDirective option='Agenda' />
50
+ </ViewsDirective>
51
+ <Inject services={[Day, Week, WorkWeek, Month, Agenda, Resize, DragAndDrop]} />
52
+ </ScheduleComponent>
53
+ </div>
54
+ );
55
+ }
@@ -0,0 +1,55 @@
1
+ import { useRef } from 'react';
2
+ import { ScheduleComponent, ViewsDirective, ViewDirective, Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop, type DragEventArgs } from '@syncfusion/ej2-react-schedule';
3
+ import { extend } from '@syncfusion/ej2-base';
4
+
5
+ export default function Scheduler() {
6
+ const scheduleObj = useRef<ScheduleComponent>(null);
7
+ const dataSource: Object[] = [
8
+ { "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" },
9
+ { "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" },
10
+ { "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" },
11
+ { "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" },
12
+ { "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" },
13
+ { "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" },
14
+ { "Id": 7, "Subject": "Glaciers and Snowflakes", "Location": "Himalayas", "StartTime": "2021-01-15T05:30:00.000Z", "EndTime": "2021-01-15T07:00:00.000Z", "CategoryColor": "#1aaa55" },
15
+ { "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" },
16
+ { "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" },
17
+ { "Id": 10, "Subject": "Wildlife Galleries", "Location": "Africa", "StartTime": "2021-01-20T05:30:00.000Z", "EndTime": "2021-01-20T07:30:00.000Z", "CategoryColor": "#ea7a57" },
18
+ { "Id": 11, "Subject": "Best Photography 2021", "Location": "London", "StartTime": "2021-01-21T04:00:00.000Z", "EndTime": "2021-01-21T05:30:00.000Z", "CategoryColor": "#00bdae" },
19
+ { "Id": 12, "Subject": "Smarter Puppies", "Location": "Sweden", "StartTime": "2021-01-08T04:30:00.000Z", "EndTime": "2021-01-08T06:00:00.000Z", "CategoryColor": "#f57f17" },
20
+ { "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" },
21
+ { "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" },
22
+ { "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" },
23
+ { "Id": 16, "Subject": "Sky Gazers", "Location": "Alaska", "StartTime": "2021-01-22T05:30:00.000Z", "EndTime": "2021-01-22T07:30:00.000Z", "CategoryColor": "#ea7a57" },
24
+ { "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" },
25
+ { "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" },
26
+ { "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" },
27
+ { "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" },
28
+ { "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" },
29
+ { "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" },
30
+ { "Id": 23, "Subject": "Sky Gazers", "Location": "Greenland", "StartTime": "2021-01-15T09:00:00.000Z", "EndTime": "2021-01-15T10:30:00.000Z", "CategoryColor": "#ea7a57" },
31
+ { "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" }
32
+ ];
33
+ const data: Record<string, any>[] = extend([], dataSource, undefined, true) as Record<string, any>[];
34
+
35
+ const onDragStart = (args: DragEventArgs): void => {
36
+ if (args.navigation) {
37
+ args.navigation.enable = true;
38
+ }
39
+ }
40
+
41
+ return (
42
+ <div className='schedulee-section' style={{ padding: '50px', margin: '0 auto'}}>
43
+ <ScheduleComponent height='650px' ref={scheduleObj} selectedDate={new Date(2021, 0, 10)} eventSettings={{ dataSource: data }} dragStart={(onDragStart)}>
44
+ <ViewsDirective>
45
+ <ViewDirective option='Day' />
46
+ <ViewDirective option='Week' />
47
+ <ViewDirective option='WorkWeek' />
48
+ <ViewDirective option='Month' />
49
+ <ViewDirective option='Agenda' />
50
+ </ViewsDirective>
51
+ <Inject services={[Day, Week, WorkWeek, Month, Agenda, Resize, DragAndDrop]} />
52
+ </ScheduleComponent>
53
+ </div>
54
+ );
55
+ }
@@ -0,0 +1,96 @@
1
+ import {
2
+ SpreadsheetComponent,
3
+ SheetsDirective,
4
+ SheetDirective,
5
+ RangesDirective,
6
+ RangeDirective,
7
+ RowsDirective,
8
+ RowDirective,
9
+ CellsDirective,
10
+ CellDirective,
11
+ ColumnsDirective,
12
+ ColumnDirective
13
+ } from '@syncfusion/ej2-react-spreadsheet';
14
+
15
+
16
+ export default function SpreadsheetEditor() {
17
+ const defaultData = [
18
+ { "Customer Name": "Romona Heaslip", "Model": "Taurus", "Color": "Aquamarine", "Payment Mode": "Debit Card", "Delivery Date": "07-11-2015", "Amount": "8529.22" },
19
+ { "Customer Name": "Clare Batterton", "Model": "Sparrow", "Color": "Pink", "Payment Mode": "Cash On Delivery", "Delivery Date": "07-13-2016", "Amount": "17866.19" },
20
+ { "Customer Name": "Eamon Traise", "Model": "Grand Cherokee", "Color": "Blue", "Payment Mode": "Net Banking", "Delivery Date": "09-04-2015", "Amount": "13853.09" },
21
+ { "Customer Name": "Julius Gorner", "Model": "GTO", "Color": "Aquamarine", "Payment Mode": "Credit Card", "Delivery Date": "12-15-2017", "Amount": "2338.74" },
22
+ { "Customer Name": "Jenna Schoolfield", "Model": "LX", "Color": "Yellow", "Payment Mode": "Credit Card", "Delivery Date": "10-08-2014", "Amount": "9578.45" },
23
+ { "Customer Name": "Marylynne Harring", "Model": "Catera", "Color": "Green", "Payment Mode": "Cash On Delivery", "Delivery Date": "07-01-2017", "Amount": "19141.62" },
24
+ { "Customer Name": "Vilhelmina Leipelt", "Model": "7 Series", "Color": "Goldenrod", "Payment Mode": "Credit Card", "Delivery Date": "12-20-2015", "Amount": "6543.30" },
25
+ { "Customer Name": "Barby Heisler", "Model": "Corvette", "Color": "Red", "Payment Mode": "Credit Card", "Delivery Date": "11-24-2014", "Amount": "13035.06" },
26
+ { "Customer Name": "Karyn Boik", "Model": "Regal", "Color": "Indigo", "Payment Mode": "Debit Card", "Delivery Date": "05-12-2014", "Amount": "18488.80" },
27
+ { "Customer Name": "Jeanette Pamplin", "Model": "S4", "Color": "Fuscia", "Payment Mode": "Net Banking", "Delivery Date": "12-30-2014", "Amount": "12317.04" },
28
+ { "Customer Name": "Cristi Espinos", "Model": "TL", "Color": "Aquamarine", "Payment Mode": "Credit Card", "Delivery Date": "12-18-2013", "Amount": "6230.13" }
29
+ ];
30
+ let spreadsheet = null;
31
+ const boldRight = {
32
+ fontWeight: 'bold',
33
+ textAlign: 'right'
34
+ };
35
+ const bold = {
36
+ fontWeight: 'bold'
37
+ };
38
+ const onCreated = () => {
39
+ if (spreadsheet) {
40
+ spreadsheet.cellFormat(
41
+ {
42
+ fontWeight: 'bold',
43
+ textAlign: 'center',
44
+ verticalAlign: 'middle'
45
+ },
46
+ 'A1:F1'
47
+ );
48
+ spreadsheet.numberFormat('$#,##0.00', 'F2:F31');
49
+ spreadsheet.numberFormat('m/d/yyyy', 'E2:E30');
50
+ }
51
+ };
52
+
53
+ return (
54
+ <div className="control-pane" style={{ padding: '50px', margin: '0 auto' }}>
55
+ <SpreadsheetComponent
56
+ openUrl="https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/open"
57
+ saveUrl="https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/save"
58
+ ref={(ssObj) => {
59
+ spreadsheet = ssObj;
60
+ }}
61
+ created={onCreated}
62
+ >
63
+ <SheetsDirective>
64
+ <SheetDirective name="Car Sales Report">
65
+ <RangesDirective>
66
+ <RangeDirective dataSource={defaultData} />
67
+ </RangesDirective>
68
+ <RowsDirective>
69
+ <RowDirective index={12}>
70
+ <CellsDirective>
71
+ <CellDirective
72
+ index={4}
73
+ value="Total Amount:"
74
+ style={boldRight}
75
+ />
76
+ <CellDirective
77
+ formula="=SUM(F2:F12)"
78
+ style={bold}
79
+ />
80
+ </CellsDirective>
81
+ </RowDirective>
82
+ </RowsDirective>
83
+ <ColumnsDirective>
84
+ <ColumnDirective width={180} />
85
+ <ColumnDirective width={130} />
86
+ <ColumnDirective width={130} />
87
+ <ColumnDirective width={180} />
88
+ <ColumnDirective width={130} />
89
+ <ColumnDirective width={120} />
90
+ </ColumnsDirective>
91
+ </SheetDirective>
92
+ </SheetsDirective>
93
+ </SpreadsheetComponent>
94
+ </div>
95
+ );
96
+ }
@@ -0,0 +1,98 @@
1
+ import {
2
+ SpreadsheetComponent,
3
+ SheetsDirective,
4
+ SheetDirective,
5
+ RangesDirective,
6
+ RangeDirective,
7
+ RowsDirective,
8
+ RowDirective,
9
+ CellsDirective,
10
+ CellDirective,
11
+ ColumnsDirective,
12
+ ColumnDirective,
13
+ type CellStyleModel
14
+ } from '@syncfusion/ej2-react-spreadsheet';
15
+
16
+
17
+ export default function SpreadsheetEditor() {
18
+ const defaultData = [
19
+ { "Customer Name": "Romona Heaslip", "Model": "Taurus", "Color": "Aquamarine", "Payment Mode": "Debit Card", "Delivery Date": "07-11-2015", "Amount": "8529.22" },
20
+ { "Customer Name": "Clare Batterton", "Model": "Sparrow", "Color": "Pink", "Payment Mode": "Cash On Delivery", "Delivery Date": "07-13-2016", "Amount": "17866.19" },
21
+ { "Customer Name": "Eamon Traise", "Model": "Grand Cherokee", "Color": "Blue", "Payment Mode": "Net Banking", "Delivery Date": "09-04-2015", "Amount": "13853.09" },
22
+ { "Customer Name": "Julius Gorner", "Model": "GTO", "Color": "Aquamarine", "Payment Mode": "Credit Card", "Delivery Date": "12-15-2017", "Amount": "2338.74" },
23
+ { "Customer Name": "Jenna Schoolfield", "Model": "LX", "Color": "Yellow", "Payment Mode": "Credit Card", "Delivery Date": "10-08-2014", "Amount": "9578.45" },
24
+ { "Customer Name": "Marylynne Harring", "Model": "Catera", "Color": "Green", "Payment Mode": "Cash On Delivery", "Delivery Date": "07-01-2017", "Amount": "19141.62" },
25
+ { "Customer Name": "Vilhelmina Leipelt", "Model": "7 Series", "Color": "Goldenrod", "Payment Mode": "Credit Card", "Delivery Date": "12-20-2015", "Amount": "6543.30" },
26
+ { "Customer Name": "Barby Heisler", "Model": "Corvette", "Color": "Red", "Payment Mode": "Credit Card", "Delivery Date": "11-24-2014", "Amount": "13035.06" },
27
+ { "Customer Name": "Karyn Boik", "Model": "Regal", "Color": "Indigo", "Payment Mode": "Debit Card", "Delivery Date": "05-12-2014", "Amount": "18488.80" },
28
+ { "Customer Name": "Jeanette Pamplin", "Model": "S4", "Color": "Fuscia", "Payment Mode": "Net Banking", "Delivery Date": "12-30-2014", "Amount": "12317.04" },
29
+ { "Customer Name": "Cristi Espinos", "Model": "TL", "Color": "Aquamarine", "Payment Mode": "Credit Card", "Delivery Date": "12-18-2013", "Amount": "6230.13" }
30
+ ];
31
+ let spreadsheet: SpreadsheetComponent | null = null;
32
+ const boldRight: CellStyleModel = {
33
+ fontWeight: 'bold',
34
+ textAlign: 'right'
35
+ };
36
+ const bold: CellStyleModel = {
37
+ fontWeight: 'bold'
38
+ };
39
+ const onCreated = (): void => {
40
+ if (spreadsheet) {
41
+ spreadsheet.cellFormat(
42
+ {
43
+ fontWeight: 'bold',
44
+ textAlign: 'center',
45
+ verticalAlign: 'middle'
46
+ },
47
+ 'A1:F1'
48
+ );
49
+ spreadsheet.numberFormat('$#,##0.00', 'F2:F31');
50
+ spreadsheet.numberFormat('m/d/yyyy', 'E2:E30');
51
+ }
52
+ };
53
+
54
+ return (
55
+ <div className="control-pane" style={{ padding: '50px', margin: '0 auto' }}>
56
+ <SpreadsheetComponent
57
+ openUrl="https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/open"
58
+ saveUrl="https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/save"
59
+ ref={(ssObj: SpreadsheetComponent) => {
60
+ spreadsheet = ssObj;
61
+ }}
62
+ created={onCreated}
63
+ >
64
+ <SheetsDirective>
65
+ <SheetDirective name="Car Sales Report">
66
+ <RangesDirective>
67
+ <RangeDirective dataSource={defaultData} />
68
+ </RangesDirective>
69
+
70
+ <RowsDirective>
71
+ <RowDirective index={12}>
72
+ <CellsDirective>
73
+ <CellDirective
74
+ index={4}
75
+ value="Total Amount:"
76
+ style={boldRight}
77
+ />
78
+ <CellDirective
79
+ formula="=SUM(F2:F12)"
80
+ style={bold}
81
+ />
82
+ </CellsDirective>
83
+ </RowDirective>
84
+ </RowsDirective>
85
+ <ColumnsDirective>
86
+ <ColumnDirective width={180} />
87
+ <ColumnDirective width={130} />
88
+ <ColumnDirective width={130} />
89
+ <ColumnDirective width={180} />
90
+ <ColumnDirective width={130} />
91
+ <ColumnDirective width={120} />
92
+ </ColumnsDirective>
93
+ </SheetDirective>
94
+ </SheetsDirective>
95
+ </SpreadsheetComponent>
96
+ </div>
97
+ );
98
+ }
@@ -0,0 +1,26 @@
1
+ import path from 'node:path';
2
+ import { copyTemplateFile, copyTemplateFiles } from '../utils/template-file.js';
3
+
4
+ export async function generateRteTemplate(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', `RTE${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const rteDir = path.join(componentsDir, 'rich-text-editor');
12
+ await copyTemplateFiles(
13
+ 'angular',
14
+ ['rte.component.ts', 'rte.component.html'],
15
+ '',
16
+ rteDir
17
+ );
18
+ } else if (framework === 'vue') {
19
+ await copyTemplateFile('vue', 'RTE.vue', componentsDir);
20
+
21
+ const viewsDir = path.join(componentsDir, '..', 'views');
22
+ await copyTemplateFile('vue', 'RTEView.vue', viewsDir);
23
+ } else if (framework === 'typescript') {
24
+ await copyTemplateFile('typescript', 'RTE.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 generateSchedulerTemplate(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', `Scheduler${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const schedulerDir = path.join(componentsDir, 'scheduler');
12
+ await copyTemplateFiles('angular', ['scheduler.component.ts', 'scheduler.component.html'], '', schedulerDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'Scheduler.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'SchedulerView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'Scheduler.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 generateSpreadsheetTemplate(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', `SpreadsheetEditor${ext}`, componentsDir);
10
+ } else if (framework === 'angular') {
11
+ const spreadsheetDir = path.join(componentsDir, 'spreadsheet-editor');
12
+ await copyTemplateFiles('angular', ['spreadsheet-editor.component.ts', 'spreadsheet-editor.component.html'], '', spreadsheetDir);
13
+ } else if (framework === 'vue') {
14
+ await copyTemplateFile('vue', 'SpreadsheetEditor.vue', componentsDir);
15
+ const viewsDir = path.join(componentsDir, '..', 'views');
16
+ await copyTemplateFile('vue', 'SpreadsheetEditorView.vue', viewsDir);
17
+ } else if (framework === 'typescript') {
18
+ await copyTemplateFile('typescript', 'SpreadsheetEditor.ts', componentsDir);
19
+ }
20
+ }
@@ -0,0 +1,33 @@
1
+ import { RichTextEditor, Toolbar, Link, Image, HtmlEditor, QuickToolbar, Count, Table, MarkdownEditor } from '@syncfusion/ej2-richtexteditor';
2
+
3
+ // Default content for the Rich Text Editor.
4
+ const defaultContent: string = `
5
+ <p>The Rich Text Editor component is a WYSIWYG editor that provides the best user experience to create and update content.
6
+ Users can use this component to format and display text, images, links, and more in a rich and visually appealing way.</p>
7
+ <p><b>Features:</b></p>
8
+ <ul>
9
+ <li>Provides &lt;IFRAME&gt; and &lt;DIV&gt; modes</li>
10
+ <li>Capable of handling markdown editing</li>
11
+ <li>Contains a modular library to load the necessary functionality on demand</li>
12
+ <li>Provides a fully customizable toolbar</li>
13
+ <li>Provides HTML view to edit the source directly for developers</li>
14
+ <li>Supports third-party library integration</li>
15
+ </ul>
16
+ `;
17
+
18
+ let rte: RichTextEditor = new RichTextEditor({
19
+ height: 400,
20
+ value: defaultContent,
21
+ toolbarSettings: {
22
+ items: ['Bold', 'Italic', 'Underline', 'StrikeThrough',
23
+ 'FontName', 'FontSize', 'FontColor', 'BackgroundColor',
24
+ 'LowerCase', 'UpperCase', '|',
25
+ 'Formats', 'Alignments', 'OrderedList', 'UnorderedList',
26
+ 'Outdent', 'Indent', '|',
27
+ 'CreateLink', 'Image', 'CreateTable', '|', 'ClearFormat', 'Print',
28
+ 'SourceCode', 'FullScreen', '|', 'Undo', 'Redo']
29
+ },
30
+ enableFloating: false
31
+ });
32
+
33
+ rte.appendTo('#RTE');