igniteui-cli 8.2.0 → 8.2.3

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 (133) hide show
  1. package/lib/commands/build.js +3 -0
  2. package/lib/commands/start.js +4 -1
  3. package/lib/templates/ReactTemplate.d.ts +4 -4
  4. package/lib/templates/ReactTemplate.js +42 -29
  5. package/package.json +4 -4
  6. package/templates/react/es6/bar-chart/default/files/{client → src}/components/__path__/index.js +2 -4
  7. package/templates/react/es6/{column-chart/default/files/client → bar-chart/default/files/src}/data/world-energy-production.js +2 -2
  8. package/templates/react/es6/column-chart/default/files/{client → src}/components/__path__/index.js +2 -6
  9. package/templates/react/es6/{bar-chart/default/files/client → column-chart/default/files/src}/data/world-energy-production.js +0 -0
  10. package/templates/react/es6/combo/combo/files/{client → src}/components/__path__/index.js +2 -4
  11. package/templates/react/es6/doughnut-chart/doughnut-chart/files/{client → src}/components/__path__/index.js +1 -4
  12. package/templates/react/es6/editors/editors/files/{client → src}/components/__path__/index.js +1 -4
  13. package/templates/react/es6/financial-chart/financial-chart/files/{client → src}/components/__path__/index.js +1 -5
  14. package/templates/react/es6/financial-chart/financial-chart/files/{client → src}/data/financial-data.js +1 -1
  15. package/templates/react/es6/funnel-chart/funnel-chart/files/{client → src}/components/__path__/index.js +1 -4
  16. package/templates/react/es6/generate/files/{client → src}/components/__path__/index.js +1 -1
  17. package/templates/react/es6/grid/basic/files/{client → src}/components/__path__/index.js +10 -12
  18. package/templates/react/es6/grid/grid-custom/files/{client → src}/components/__path__/index.js +10 -13
  19. package/templates/react/es6/grid/grid-editing/files/{client → src}/components/__path__/index.js +10 -13
  20. package/templates/react/es6/grid/grid-export/files/src/components/__path__/index.js +124 -0
  21. package/templates/react/es6/grid/grid-export/files/{client/components/__path__/styles.scss → src/components/__path__/styles.css} +0 -0
  22. package/templates/react/es6/grid/grid-export/index.js +2 -1
  23. package/templates/react/es6/grid/grid-templating/files/{client → src}/components/__path__/index.js +1 -5
  24. package/templates/react/es6/grid/grid-templating/files/{client → src}/components/__path__/northwind.js +0 -0
  25. package/templates/react/es6/hierarchical-grid/hierarchical-grid/files/{client → src}/components/__path__/index.js +1 -5
  26. package/templates/react/es6/hierarchical-grid/{hierarchical-grid-export/files/client → hierarchical-grid/files/src}/components/__path__/northwind.js +0 -0
  27. package/templates/react/es6/hierarchical-grid/hierarchical-grid-custom/files/src/components/__path__/index.js +82 -0
  28. package/templates/react/es6/hierarchical-grid/hierarchical-grid-custom/files/{client → src}/components/__path__/northwind.js +0 -0
  29. package/templates/react/es6/hierarchical-grid/hierarchical-grid-editing/files/src/components/__path__/index.js +81 -0
  30. package/templates/react/es6/hierarchical-grid/{hierarchical-grid/files/client → hierarchical-grid-editing/files/src}/components/__path__/northwind.js +5587 -5587
  31. package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/files/src/components/__path__/index.js +112 -0
  32. package/templates/react/es6/hierarchical-grid/{hierarchical-grid-editing/files/client → hierarchical-grid-export/files/src}/components/__path__/northwind.js +0 -0
  33. package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/files/src/components/__path__/styles.css +13 -0
  34. package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/index.js +2 -1
  35. package/templates/react/es6/index.js +1 -1
  36. package/templates/react/es6/line-chart/default/files/src/components/__path__/index.js +76 -0
  37. package/templates/react/es6/pie-chart/pie-chart/files/src/components/__path__/index.js +38 -0
  38. package/templates/react/es6/projects/empty/files/README.md +2 -5
  39. package/templates/react/es6/projects/empty/files/__dot__editorconfig +2 -2
  40. package/templates/react/es6/projects/empty/files/__dot__env +1 -0
  41. package/templates/react/es6/projects/empty/files/__dot__gitignore +18 -8
  42. package/templates/react/es6/projects/empty/files/ignite-ui-cli.json +20 -21
  43. package/templates/react/es6/projects/empty/files/package.json +33 -43
  44. package/templates/react/es6/projects/empty/files/public/favicon.ico +0 -0
  45. package/templates/react/es6/projects/empty/files/public/index.html +42 -0
  46. package/templates/react/es6/projects/empty/files/public/manifest.json +15 -0
  47. package/templates/react/es6/projects/empty/files/public/robots.txt +3 -0
  48. package/templates/react/es6/projects/empty/files/src/App.css +52 -0
  49. package/templates/react/es6/projects/empty/files/src/App.js +39 -0
  50. package/templates/react/es6/projects/empty/files/src/components/home/index.js +25 -0
  51. package/templates/react/es6/projects/empty/files/src/components/navigation-header/index.js +47 -0
  52. package/templates/react/es6/projects/empty/files/src/hoc/asyncComponent.js +50 -0
  53. package/templates/react/es6/projects/empty/files/src/igniteuiResources.js +7 -0
  54. package/templates/react/es6/projects/empty/files/src/index.css +13 -0
  55. package/templates/react/es6/projects/empty/files/src/index.js +23 -0
  56. package/templates/react/es6/projects/empty/files/src/reportWebVitals.js +13 -0
  57. package/templates/react/es6/projects/empty/files/src/routes.json +7 -0
  58. package/templates/react/es6/projects/empty/index.js +1 -8
  59. package/templates/react/es6/radial-chart/radial-chart/files/src/components/__path__/index.js +68 -0
  60. package/templates/react/es6/radial-chart/radial-chart/files/{client → src}/data/temperature.js +2 -2
  61. package/templates/react/es6/scatter-chart/scatter-chart/files/src/components/__path__/index.js +59 -0
  62. package/templates/react/es6/scatter-chart/scatter-chart/files/src/data/temperature.js +58 -0
  63. package/templates/react/es6/tree-grid/tree-grid/files/src/components/__path__/index.js +61 -0
  64. package/templates/react/es6/tree-grid/tree-grid-custom/files/src/components/__path__/index.js +62 -0
  65. package/templates/react/es6/tree-grid/tree-grid-editing/files/src/components/__path__/index.js +62 -0
  66. package/templates/react/es6/tree-grid/tree-grid-export/files/{client → src}/components/__path__/index.js +101 -103
  67. package/templates/react/es6/tree-grid/tree-grid-export/index.js +2 -1
  68. package/templates/react/igr-es6/projects/_base/files/README.md +1 -1
  69. package/templates/react/igr-es6/projects/_base/files/__dot__editorconfig +2 -2
  70. package/templates/react/igr-es6/projects/_base/files/__dot__env +1 -0
  71. package/templates/react/igr-es6/projects/top-nav/files/src/App.js +24 -21
  72. package/templates/react/es6/bar-chart/default/files/client/pages/__path__/index.js +0 -10
  73. package/templates/react/es6/column-chart/default/files/client/pages/__path__/index.js +0 -10
  74. package/templates/react/es6/combo/combo/files/client/pages/__path__/index.js +0 -10
  75. package/templates/react/es6/doughnut-chart/doughnut-chart/files/client/pages/__path__/index.js +0 -10
  76. package/templates/react/es6/editors/editors/files/client/pages/__path__/index.js +0 -10
  77. package/templates/react/es6/financial-chart/financial-chart/files/client/pages/__path__/index.js +0 -10
  78. package/templates/react/es6/funnel-chart/funnel-chart/files/client/pages/__path__/index.js +0 -10
  79. package/templates/react/es6/generate/files/client/pages/__path__/index.js +0 -11
  80. package/templates/react/es6/grid/basic/files/client/pages/__path__/index.js +0 -10
  81. package/templates/react/es6/grid/grid-custom/files/client/pages/__path__/index.js +0 -10
  82. package/templates/react/es6/grid/grid-editing/files/client/pages/__path__/index.js +0 -10
  83. package/templates/react/es6/grid/grid-export/files/client/components/__path__/index.js +0 -124
  84. package/templates/react/es6/grid/grid-export/files/client/pages/__path__/index.js +0 -10
  85. package/templates/react/es6/grid/grid-templating/files/client/pages/__path__/index.js +0 -10
  86. package/templates/react/es6/hierarchical-grid/hierarchical-grid/files/client/pages/__path__/index.js +0 -10
  87. package/templates/react/es6/hierarchical-grid/hierarchical-grid-custom/files/client/components/__path__/index.js +0 -85
  88. package/templates/react/es6/hierarchical-grid/hierarchical-grid-custom/files/client/pages/__path__/index.js +0 -10
  89. package/templates/react/es6/hierarchical-grid/hierarchical-grid-editing/files/client/components/__path__/index.js +0 -85
  90. package/templates/react/es6/hierarchical-grid/hierarchical-grid-editing/files/client/pages/__path__/index.js +0 -10
  91. package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/files/client/components/__path__/index.js +0 -112
  92. package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/files/client/components/__path__/styles.scss +0 -13
  93. package/templates/react/es6/hierarchical-grid/hierarchical-grid-export/files/client/pages/__path__/index.js +0 -10
  94. package/templates/react/es6/line-chart/default/files/client/components/__path__/index.js +0 -79
  95. package/templates/react/es6/line-chart/default/files/client/pages/__path__/index.js +0 -10
  96. package/templates/react/es6/pie-chart/pie-chart/files/client/components/__path__/index.js +0 -41
  97. package/templates/react/es6/pie-chart/pie-chart/files/client/pages/__path__/index.js +0 -10
  98. package/templates/react/es6/projects/empty/files/__dot__babelrc +0 -10
  99. package/templates/react/es6/projects/empty/files/__dot__eslintrc +0 -28
  100. package/templates/react/es6/projects/empty/files/__tests__/App.js +0 -19
  101. package/templates/react/es6/projects/empty/files/__tests__/App.spec.js +0 -11
  102. package/templates/react/es6/projects/empty/files/__tests__/CheckboxWithLabel.js +0 -31
  103. package/templates/react/es6/projects/empty/files/__tests__/CheckboxWithLabel.spec.js +0 -19
  104. package/templates/react/es6/projects/empty/files/__tests__/Sum.js +0 -6
  105. package/templates/react/es6/projects/empty/files/__tests__/Sum.spec.js +0 -6
  106. package/templates/react/es6/projects/empty/files/build.js +0 -25
  107. package/templates/react/es6/projects/empty/files/client/_variables.scss +0 -7
  108. package/templates/react/es6/projects/empty/files/client/components/Header/header.scss +0 -21
  109. package/templates/react/es6/projects/empty/files/client/components/Header/index.js +0 -21
  110. package/templates/react/es6/projects/empty/files/client/components/Toolbar/index.js +0 -20
  111. package/templates/react/es6/projects/empty/files/client/components/Toolbar/toolbar.scss +0 -49
  112. package/templates/react/es6/projects/empty/files/client/containers/App/index.js +0 -16
  113. package/templates/react/es6/projects/empty/files/client/containers/App/style.scss +0 -4
  114. package/templates/react/es6/projects/empty/files/client/general.scss +0 -24
  115. package/templates/react/es6/projects/empty/files/client/index.ejs +0 -13
  116. package/templates/react/es6/projects/empty/files/client/index.js +0 -20
  117. package/templates/react/es6/projects/empty/files/client/lines-bottom-right.svg +0 -56
  118. package/templates/react/es6/projects/empty/files/client/pages/Home/index.js +0 -9
  119. package/templates/react/es6/projects/empty/files/client/pages/routes.js +0 -49
  120. package/templates/react/es6/projects/empty/files/client/pages/routesTemplate.js +0 -9
  121. package/templates/react/es6/projects/empty/files/webpack.config.js +0 -163
  122. package/templates/react/es6/radial-chart/radial-chart/files/client/components/__path__/index.js +0 -71
  123. package/templates/react/es6/radial-chart/radial-chart/files/client/pages/__path__/index.js +0 -10
  124. package/templates/react/es6/scatter-chart/scatter-chart/files/client/components/__path__/index.js +0 -63
  125. package/templates/react/es6/scatter-chart/scatter-chart/files/client/data/temperature.js +0 -58
  126. package/templates/react/es6/scatter-chart/scatter-chart/files/client/pages/__path__/index.js +0 -10
  127. package/templates/react/es6/tree-grid/tree-grid/files/client/components/__path__/index.js +0 -64
  128. package/templates/react/es6/tree-grid/tree-grid/files/client/pages/__path__/index.js +0 -10
  129. package/templates/react/es6/tree-grid/tree-grid-custom/files/client/components/__path__/index.js +0 -65
  130. package/templates/react/es6/tree-grid/tree-grid-custom/files/client/pages/__path__/index.js +0 -10
  131. package/templates/react/es6/tree-grid/tree-grid-editing/files/client/components/__path__/index.js +0 -65
  132. package/templates/react/es6/tree-grid/tree-grid-editing/files/client/pages/__path__/index.js +0 -10
  133. package/templates/react/es6/tree-grid/tree-grid-export/files/client/pages/__path__/index.js +0 -10
@@ -1,31 +1,29 @@
1
- import React, { Component } from 'react';
1
+ import { Component } from 'react';
2
2
  import * as $ from 'jquery';
3
- import 'jquery-ui';
4
- $(igniteImports)
5
- import "ignite-ui/js/modules/infragistics.ext_core.js";
6
- import "ignite-ui/js/modules/infragistics.ext_collections.js";
7
- import "ignite-ui/js/modules/infragistics.ext_text.js";
8
- import "ignite-ui/js/modules/infragistics.ext_io.js";
9
- import "ignite-ui/js/modules/infragistics.ext_ui.js";
10
- import "ignite-ui/js/modules/infragistics.documents.core_core.js";
11
- import "ignite-ui/js/modules/infragistics.ext_collectionsextended.js";
12
- import "ignite-ui/js/modules/infragistics.excel_core.js";
13
- import "ignite-ui/js/modules/infragistics.ext_threading.js";
14
- import "ignite-ui/js/modules/infragistics.ext_web.js";
15
- import "ignite-ui/js/modules/infragistics.xml.js";
16
- import "ignite-ui/js/modules/infragistics.documents.core_openxml.js";
17
- import "ignite-ui/js/modules/infragistics.excel_serialization_openxml.js";
18
- import "ignite-ui/js/modules/infragistics.gridexcelexporter.js";
19
-
3
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_core.js";
4
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_collections.js";
5
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_text.js";
6
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_io.js";
7
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_ui.js";
8
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.documents.core_core.js";
9
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_collectionsextended.js";
10
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.excel_core.js";
11
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_threading.js";
12
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.ext_web.js";
13
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.xml.js";
14
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.documents.core_openxml.js";
15
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.excel_serialization_openxml.js";
16
+ import "@infragistics/ignite-ui-full/en/js/modules/infragistics.gridexcelexporter.js";
17
+ import "file-saver";
20
18
  import $(Control) from "igniteui-react/ui/$(widget).js";
21
19
  import IgButton from "igniteui-react/ui/igButton.js"
22
20
 
23
21
  export default class $(ClassName) extends Component {
24
- constructor(props) {
25
- super(props);
26
- this.state = {
27
- flatDS : [
28
- { "employeeID": 0, "PID": -1, "firstName": "Andrew", "lastName": "Fuller", "reportsTo": null },
22
+ constructor(props) {
23
+ super(props);
24
+ this.state = {
25
+ flatDS : [
26
+ { "employeeID": 0, "PID": -1, "firstName": "Andrew", "lastName": "Fuller", "reportsTo": null },
29
27
  { "employeeID": 1, "PID": -1, "firstName": "Jonathan", "lastName": "Smith", "reportsTo": null },
30
28
  { "employeeID": 2, "PID": -1, "firstName": "Nancy", "lastName": "Davolio", "reportsTo": null },
31
29
  { "employeeID": 3, "PID": -1, "firstName": "Steven", "lastName": "Buchanan", "reportsTo": null },
@@ -54,9 +52,9 @@ export default class $(ClassName) extends Component {
54
52
  { "employeeID": 20, "PID": 18, "firstName": "Bernard", "lastName": "Jarvis", "reportsTo": 19 },
55
53
  // sub of ID 20
56
54
  { "employeeID": 21, "PID": 20, "firstName": "Jeremy", "lastName": "Donaldson", "reportsTo": 2 }
57
- ],
58
- hierarchicalDS : [
59
- {
55
+ ],
56
+ hierarchicalDS : [
57
+ {
60
58
  "id": 0, "tasks": "Project Plan", "start": "6/2/2014", "finish": "8/22/2014", "duration": "60d", "progress": "32%", "products": [
61
59
  { "id": 1, "tasks": "Planning", "start": "6/2/2014", "finish": "6/4/2014", "duration": "3d", "progress": "100%" },
62
60
  { "id": 2, "tasks": "Write a specification", "start": "6/5/2014", "finish": "6/6/2014", "duration": "2d", "progress": "100%" },
@@ -80,84 +78,84 @@ export default class $(ClassName) extends Component {
80
78
  { "id": 7, "tasks": "Project Complete", "start": "8/21/2014", "finish": "8/22/2014", "duration": "2d", "progress": "0%" }
81
79
  ]
82
80
  }
83
- ]
84
- };
81
+ ]
82
+ };
83
+
84
+ this.exportFlatDS = () => {
85
+ $.ig.GridExcelExporter.exportGrid($("#treegrid1"), {
86
+ fileName: "igTreeGrid1",
87
+ worksheetName: 'Sheet1',
88
+ gridStyling: "none"
89
+ });
90
+ }
91
+
92
+ this.exportHierarchicalDS = () => {
93
+ $.ig.GridExcelExporter.exportGrid($("#treegrid2"), {
94
+ fileName: "igTreeGrid2",
95
+ worksheetName: 'Sheet1',
96
+ gridStyling: "none"
97
+ });
98
+ }
99
+ }
85
100
 
86
- this.exportFlatDS = () => {
87
- $.ig.GridExcelExporter.exportGrid($("#treegrid1"), {
88
- fileName: "igTreeGrid1",
89
- worksheetName: 'Sheet1',
90
- gridStyling: "none"
91
- });
92
- }
101
+ render() {
102
+ return (
103
+ <div className="App">
104
+ <div className="App-header">
105
+ <h2 style={{textAlign: "center"}}>$(description)</h2>
106
+ </div>
107
+ <div style={{display: "flex", flexFlow: "column", alignItems: "center", marginBottom: "1vw"}}>
108
+ <$(Control)
109
+ id="treegrid1"
110
+ width="100%"
111
+ dataSource={this.state.flatDS}
112
+ autoGenerateColumns={false}
113
+ primaryKey="employeeID"
114
+ foreignKey="PID"
115
+ initialExpandDepth="1"
116
+ columns={[
117
+ { headerText: "Employee ID", key: "employeeID", width: "200px", dataType: "number" },
118
+ { headerText: "First Name", key: "firstName", width: "220px", dataType: "string" },
119
+ { headerText: "Last Name", key: "lastName", width: "220px", dataType: "string" },
120
+ { headerText: "Reports To", key: "reportsTo", width: "130px", dataType: "number" }
121
+ ]}
122
+ features={$(treeGridFeatures)}
123
+ />
93
124
 
94
- this.exportHierarchicalDS = () => {
95
- $.ig.GridExcelExporter.exportGrid($("#treegrid2"), {
96
- fileName: "igTreeGrid2",
97
- worksheetName: 'Sheet1',
98
- gridStyling: "none"
99
- });
100
- }
101
- }
125
+ <IgButton
126
+ click={this.exportFlatDS}
127
+ onClick={this.exportFlatDS}
128
+ labelText="Export Flat Data"
129
+ />
130
+ </div>
131
+ <div style={{display: "flex", flexFlow: "column", alignItems: "center"}}>
132
+ <$(Control)
133
+ id="treegrid2"
134
+ width="100%"
135
+ dataSource={this.state.hierarchicalDS}
136
+ autoGenerateColumns={false}
137
+ primaryKey="id"
138
+ columns={[
139
+ { headerText: "ID", key: "id", width: "120px", dataType: "number" },
140
+ { headerText: "Tasks", key: "tasks", width: "250px", dataType: "string" },
141
+ { headerText: "Start", key: "start", width: "130px", dataType: "string" },
142
+ { headerText: "Finish", key: "finish", width: "130px", dataType: "string" },
143
+ { headerText: "Duration", key: "duration", width: "100px", dataType: "string" },
144
+ { headerText: "Progress", key: "progress", width: "130px", dataType: "string" }
145
+ ]}
146
+ childDataKey="products"
147
+ initialExpandDepth="1"
148
+ renderExpansionIndicatorColumn={true}
149
+ features={$(treeGridFeatures)}
150
+ />
102
151
 
103
- render() {
104
- return (
105
- <div className="App">
106
- <div className="App-header">
107
- <h2 style={{textAlign: "center"}}>$(description)</h2>
108
- </div>
109
- <div style={{display: "flex", flexFlow: "column", alignItems: "center", marginBottom: "1vw"}}>
110
- <$(Control)
111
- id="treegrid1"
112
- width="100%"
113
- dataSource={this.state.flatDS}
114
- autoGenerateColumns={false}
115
- primaryKey="employeeID"
116
- foreignKey="PID"
117
- initialExpandDepth="1"
118
- columns={[
119
- { headerText: "Employee ID", key: "employeeID", width: "200px", dataType: "number" },
120
- { headerText: "First Name", key: "firstName", width: "220px", dataType: "string" },
121
- { headerText: "Last Name", key: "lastName", width: "220px", dataType: "string" },
122
- { headerText: "Reports To", key: "reportsTo", width: "130px", dataType: "number" }
123
- ]}
124
- features={$(treeGridFeatures)}
125
- />
126
-
127
- <IgButton
128
- click={this.exportFlatDS}
129
- onClick={this.exportFlatDS}
130
- labelText="Export Flat Data"
131
- />
132
- </div>
133
- <div style={{display: "flex", flexFlow: "column", alignItems: "center"}}>
134
- <$(Control)
135
- id="treegrid2"
136
- width="100%"
137
- dataSource={this.state.hierarchicalDS}
138
- autoGenerateColumns={false}
139
- primaryKey="id"
140
- columns={[
141
- { headerText: "ID", key: "id", width: "120px", dataType: "number" },
142
- { headerText: "Tasks", key: "tasks", width: "250px", dataType: "string" },
143
- { headerText: "Start", key: "start", width: "130px", dataType: "string" },
144
- { headerText: "Finish", key: "finish", width: "130px", dataType: "string" },
145
- { headerText: "Duration", key: "duration", width: "100px", dataType: "string" },
146
- { headerText: "Progress", key: "progress", width: "130px", dataType: "string" }
147
- ]}
148
- childDataKey="products"
149
- initialExpandDepth="1"
150
- renderExpansionIndicatorColumn={true}
151
- features={$(treeGridFeatures)}
152
- />
153
-
154
- <IgButton
155
- click={this.exportHierarchicalDS}
156
- onClick={this.exportHierarchicalDS}
157
- labelText="Export Hierarchical Data"
158
- />
159
- </div>
160
- </div>
161
- );
162
- }
152
+ <IgButton
153
+ click={this.exportHierarchicalDS}
154
+ onClick={this.exportHierarchicalDS}
155
+ labelText="Export Hierarchical Data"
156
+ />
157
+ </div>
158
+ </div>
159
+ );
160
+ }
163
161
  }
@@ -15,11 +15,12 @@ class TreeGridExportTemplate extends ReactTemplate_1.ReactTemplate {
15
15
  this.widget = "igTreeGrid";
16
16
  this.controlGroup = "Data Grids";
17
17
  this.dependencies = ["igTreeGrid"];
18
+ this.packages = ["file-saver@^2.0.5"];
18
19
  this.gridHelper = new GridHelper_1.GridHelper();
19
20
  this.gridHelper.tree = true;
20
21
  this.hasExtraConfiguration = true;
21
22
  this.extraConfigurations.push({
22
- choices: ["Filtering", "Hiding"],
23
+ choices: ["Paging", "Hiding"],
23
24
  default: "",
24
25
  key: "features",
25
26
  message: "Select features for the igTreeGrid",
@@ -6,7 +6,7 @@ The template builds upon a project bootstrapped with [Create React App](https://
6
6
  ## Development server
7
7
 
8
8
  Run `ig start` to build the application, start a web server and open the application in the default browser. <br>
9
- The default serving port is `http://localhost:3003/`, configured in `ignite-ui-cli.json` via `defaultPort` property. We've made it easy to change it on the fly as well by passing a `--port` parameter.
9
+ The default serving port is `http://localhost:3003/`. Default serving port can be configured in `.env` via `PORT` property.
10
10
 
11
11
  ## Build
12
12
 
@@ -1,3 +1,3 @@
1
1
  [*.js]
2
- indent_style=space
3
- indent_size=2
2
+ indent_style = space
3
+ indent_size = 2
@@ -1,30 +1,33 @@
1
- import React, { Component } from 'react';
2
- import { Route, BrowserRouter as Router, Switch } from 'react-router-dom';
3
- import asyncComponent from './hoc/asyncComponent';
4
- import NavigationHeader from './components/navigation-header/index';
5
- import routes from './routes.json';
6
- import './App.css';
7
-
1
+ import React, { Component } from "react";
2
+ import { Route, BrowserRouter as Router, Switch } from "react-router-dom";
3
+ import asyncComponent from "./hoc/asyncComponent";
4
+ import NavigationHeader from "./components/navigation-header/index";
5
+ import routes from "./routes.json";
6
+ import "./App.css";
8
7
 
9
8
  class App extends Component {
10
-
11
- name = "$(name)";
9
+ name = "$(name)";
12
10
  render() {
13
11
  return (
14
12
  <Router>
15
- <div className="app">
16
- <div className="app__name">
17
- {this.name}
18
- </div>
19
- <NavigationHeader
20
- routes={routes}>
21
- </NavigationHeader>
22
- <div className="content">
23
- <Switch>
24
- {routes.map((route, i) => <Route exact key={i} path={route.path} component={asyncComponent(() => import("" + route.componentPath))} />)}
25
- </Switch>
13
+ <div className="app">
14
+ <div className="app__name">{this.name}</div>
15
+ <NavigationHeader routes={routes}></NavigationHeader>
16
+ <div className="content">
17
+ <Switch>
18
+ {routes.map((route, i) => (
19
+ <Route
20
+ exact
21
+ key={i}
22
+ path={route.path}
23
+ component={asyncComponent(() =>
24
+ import("" + route.componentPath)
25
+ )}
26
+ />
27
+ ))}
28
+ </Switch>
29
+ </div>
26
30
  </div>
27
- </div>
28
31
  </Router>
29
32
  );
30
33
  }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(ClassName) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(ClassName) />
9
- </article>
10
- );
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
-
4
- export default () => (
5
- <div className="App">
6
- <div className="App-header">
7
- <h1>Name: $(name)</h1>
8
- <h4>$(description)</h4>
9
- </div>
10
- </div>
11
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(Control) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(Control) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(Control) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(Control) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(Control) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(Control) />
9
- </article>
10
- );
@@ -1,124 +0,0 @@
1
- import React, { Component } from 'react';
2
- import * as $ from 'jquery';
3
- import 'jquery-ui';
4
- $(igniteImports)
5
- import "ignite-ui/js/modules/infragistics.ext_core.js";
6
- import "ignite-ui/js/modules/infragistics.ext_collections.js";
7
- import "ignite-ui/js/modules/infragistics.ext_text.js";
8
- import "ignite-ui/js/modules/infragistics.ext_io.js";
9
- import "ignite-ui/js/modules/infragistics.ext_ui.js";
10
- import "ignite-ui/js/modules/infragistics.documents.core_core.js";
11
- import "ignite-ui/js/modules/infragistics.ext_collectionsextended.js";
12
- import "ignite-ui/js/modules/infragistics.excel_core.js";
13
- import "ignite-ui/js/modules/infragistics.ext_threading.js";
14
- import "ignite-ui/js/modules/infragistics.ext_web.js";
15
- import "ignite-ui/js/modules/infragistics.xml.js";
16
- import "ignite-ui/js/modules/infragistics.documents.core_openxml.js";
17
- import "ignite-ui/js/modules/infragistics.excel_serialization_openxml.js";
18
- import "ignite-ui/js/modules/infragistics.gridexcelexporter.js";
19
-
20
- import $(Control) from "igniteui-react/ui/$(widget).js";
21
- import "./styles.scss";
22
-
23
- export default class $(ClassName) extends Component {
24
- constructor(props) {
25
- super(props);
26
- this.state = {
27
- options: {
28
- summaries: false
29
- },
30
- employees : [
31
- { "EmployeeID": "56250fa57ab1535722e564a6", "FirstName": "Downs", "LastName": "Holcomb", "Country": "Italy", "Age": 35, "RegistererDate": "07/25/2015", "IsActive": false },
32
- { "EmployeeID": "56250fa5c0fd04f12555d44d", "FirstName": "Mckenzie", "LastName": "Calderon", "Country": "USA", "Age": 26, "RegistererDate": "09/22/2014", "IsActive": false },
33
- { "EmployeeID": "56250fa565a7bcc21f6bd15e", "FirstName": "Howell", "LastName": "Hawkins", "Country": "Canada", "Age": 25, "RegistererDate": "08/08/2015", "IsActive": false },
34
- { "EmployeeID": "56250fa5d71a83c33f3f6479", "FirstName": "Sheppard", "LastName": "Nicholson", "Country": "Italy", "Age": 49, "RegistererDate": "06/28/2014", "IsActive": false },
35
- { "EmployeeID": "56250fa546abbe8c616d37eb", "FirstName": "Bettye", "LastName": "Trujillo", "Country": "Canada", "Age": 37, "RegistererDate": "04/19/2015", "IsActive": false },
36
- { "EmployeeID": "56250fa535809820f2c44291", "FirstName": "Joyce", "LastName": "Vaughan", "Country": "USA", "Age": 48, "RegistererDate": "04/24/2014", "IsActive": false },
37
- { "EmployeeID": "56250fa5732f6adc0b52ace0", "FirstName": "Janine", "LastName": "Munoz", "Country": "USA", "Age": 59, "RegistererDate": "02/09/2014", "IsActive": true },
38
- { "EmployeeID": "56250fa540b15dfd507cffb9", "FirstName": "Betsy", "LastName": "Short", "Country": "USA", "Age": 26, "RegistererDate": "06/04/2015", "IsActive": false },
39
- { "EmployeeID": "56250fa5a33146a85fdeda66", "FirstName": "Tanisha", "LastName": "Harrington", "Country": "USA", "Age": 31, "RegistererDate": "11/25/2014", "IsActive": false },
40
- { "EmployeeID": "56250fa572bea435113bb3be", "FirstName": "French", "LastName": "Sullivan", "Country": "Italy", "Age": 37, "RegistererDate": "08/16/2015", "IsActive": true },
41
- { "EmployeeID": "56250fa55f17965b7b19e3cf", "FirstName": "Gomez", "LastName": "Sandoval", "Country": "Italy", "Age": 24, "RegistererDate": "06/19/2014", "IsActive": true },
42
- { "EmployeeID": "56250fa5f630e559e163de06", "FirstName": "Estes", "LastName": "Soto", "Country": "Canada", "Age": 24, "RegistererDate": "03/28/2015", "IsActive": false }
43
- ],
44
- keys:["EmployeeID", "LastName", "Country", "Age", "IsActive", "Company", "RegistererDate"],
45
- columnsToSkip: []
46
- };
47
-
48
- this.export = () => {
49
- // export
50
- $.ig.GridExcelExporter.exportGrid($("#grid-export"), {
51
- fileName: "igGrid",
52
- worksheetName: 'Sheet1',
53
- gridStyling: "none",
54
- columnsToSkip: this.state.columnsToSkip
55
- });
56
- }
57
- this.selectionChanged = (ev, ui) => {
58
- this.setState({columnsToSkip: ui.items});
59
- }
60
- }
61
-
62
- showOverlay(grid) {
63
- var $gridContainer = $('#' + grid.attr('id') + '_container');
64
- var exportingOverlay = $('<div>');
65
- exportingOverlay.css({
66
- "width": $gridContainer.outerWidth(),
67
- "height": $gridContainer.outerHeight()
68
- }).html('<span class="exporting-text">Exporting...</span>');
69
- exportingOverlay.addClass("exporting-overlay");
70
-
71
- $gridContainer.append(exportingOverlay);
72
- }
73
-
74
- hideOverlay(exportingOverlay) {
75
- exportingOverlay.remove();
76
- }
77
-
78
- render() {
79
- return (
80
- <div className="App">
81
- <div className="App-header">
82
- <h2 style={{textAlign: "center"}}>$(description)</h2>
83
- </div>
84
- <div style={{textAlign: "center"}}>
85
- <IgCombo
86
- id="combo"
87
- width="200px"
88
- mode="dropdown"
89
- dataSource={this.state.keys}
90
- multiSelection={{
91
- enabled: true,
92
- showCheckboxes: true
93
- }}
94
- selectionChanged={this.selectionChanged}
95
- />
96
-
97
- <IgButton
98
- click={this.export}
99
- onClick={this.export}
100
- labelText="Export"
101
- />
102
- </div>
103
- <$(Control)
104
- id="grid-export"
105
- autoGenerateColumns={false}
106
- primaryKey="EmployeeID"
107
- width="100%"
108
- autofitLastColumn={true}
109
- columns={[
110
- { headerText: "Employee ID", key: "EmployeeID", dataType: "string", hidden: true },
111
- { headerText: "Last Name", key: "LastName", width: "15%", dataType: "string" },
112
- { headerText: "Country", key: "Country", width: "15%", dataType: "string" },
113
- { headerText: "Age", key: "Age", width: "15%", dataType: "number" },
114
- { headerText: "Is Active", key: "IsActive", width: "15%", dataType: "bool", format: "checkbox" },
115
- { headerText: "Company", key: "Company", width: "20%", dataType: "string", unbound: true, formula: function () { return "http://infragistics.com/"; } },
116
- { headerText: "Register Date", key: "RegistererDate", width: "20%", dataType: "date" }
117
- ]}
118
- dataSource={this.state.employees}
119
- features={$(gridfeatures)}
120
- />
121
- </div>
122
- );
123
- }
124
- }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(Control) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(Control) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(Control) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(Control) />
9
- </article>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import Header from 'components/Header';
3
- import $(Control) from 'components/$(path)';
4
-
5
- export default () => (
6
- <article className="$(ClassName)">
7
- <Header title="$(name)" className="header-main" />
8
- <$(Control) />
9
- </article>
10
- );