diff --git a/.vscode/cSpell.json b/.vscode/cSpell.json index 2ea37a581..d1b39e73a 100644 --- a/.vscode/cSpell.json +++ b/.vscode/cSpell.json @@ -1,13 +1,11 @@ -// cSpell Settings { - // Version of the setting file. Always 0.1 - "version": "0.1", // language - current active spelling language "language": "en", // words - list of words to be always considered correct "words": [ + "igniteui", "infragistics", - "igniteui" + "webcomponents" ], // flagWords - list of words to be always considered incorrect // This is useful for offensive words and common spelling errors. diff --git a/.vscode/launch.json b/.vscode/launch.json index 1e5e69d8c..e14a2aa9d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -109,21 +109,6 @@ "console": "externalTerminal", "preLaunchTask": "build", "outFiles": ["${workspaceFolder}/**/*.js"], - "args": [ - "new", - "reactproj", - "--framework=react" - ] - }, - { - "type": "node", - "request": "launch", - "name": "Launch New React TS ES6", - "cwd": "${workspaceRoot}/output", - "program": "${workspaceRoot}/packages/cli/bin/execute.js", - "console": "externalTerminal", - "preLaunchTask": "build", - "outFiles": ["${workspaceFolder}/**/*.js"], "args": [ "new", "reactproj", diff --git a/README.md b/README.md index d91cd07c4..bcd5e256d 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,9 @@ ig new "IG Project" --framework=angular --type=igx-ts --template=side-nav ``` #### Generate Ignite UI for React project -To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-es6` as project type: +To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-ts` as project type: ```bash -ig new "IG Project" --framework=react --type=igr-es6 +ig new "IG Project" --framework=react --type=igr-ts ``` #### Generate Ignite UI for Web Components project diff --git a/packages/cli/README.md b/packages/cli/README.md index 48072ae4d..0be1a3dbe 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -79,9 +79,9 @@ The `igniteui-cli` makes full use of the component definitions provided by [`ign #### Generate Ignite UI for React project -To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-es6` as project type: +To create a new project with Ignite UI for React use [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New#creating-ignite-ui-for-react-applications-v400) by specifying `react` as framework and `igr-ts` as project type: ```bash -ig new "IG Project" --framework=react --type=igr-es6 +ig new "IG Project" --framework=react --type=igr-ts ``` #### Adding components diff --git a/packages/cli/lib/commands/start.ts b/packages/cli/lib/commands/start.ts index 4dff22c1c..9607a4a45 100644 --- a/packages/cli/lib/commands/start.ts +++ b/packages/cli/lib/commands/start.ts @@ -65,7 +65,7 @@ const command: StartCommandType = { cd14: config.project.theme }); - let port = Number(argv.port) || defaultPort; + const port = Number(argv.port) || defaultPort; // TODO: consider piping the stdin so that we handle the cp's termination // this may require additional logic to be implemented if the cp asks for input const options: ExecSyncOptions = { stdio: "inherit", killSignal: "SIGINT" }; @@ -82,23 +82,11 @@ const command: StartCommandType = { browserSync.init(bsConfig); break; - case "react": - if (port) { - if (projectType === "igr-ts") { - execSyncNpmStart(port, options); - } else { - // https://facebook.github.io/create-react-app/docs/advanced-configuration - // react-scripts start "--port=dafaultPort" is not a valid command for all environments. - // .env file is included and used by both igr-es6 and es6 now, - // to specify the port for all environments (Windows, Mac, etc) - process.env.PORT = `${port}`; - port = null; - } - } - /* falls through */ case "angular": + case "react": case "webcomponents": execSyncNpmStart(port, options); + break; default: break; } diff --git a/packages/cli/lib/templates/IgniteUIForReactTemplate.ts b/packages/cli/lib/templates/IgniteUIForReactTemplate.ts index f0b36507e..1521bddd5 100644 --- a/packages/cli/lib/templates/IgniteUIForReactTemplate.ts +++ b/packages/cli/lib/templates/IgniteUIForReactTemplate.ts @@ -72,11 +72,6 @@ export class IgniteUIForReactTemplate implements Template { options.parentRoutingModulePath = "src/app/app-routes.tsx"; } - if (this.projectType === "igr-es6") { - this.registerJSONRoute(projectPath, name, options.parentRoutingModulePath); - return; - } - const routeModulePath: string = options.parentRoutingModulePath; if (!(options && options.skipRoute) @@ -148,27 +143,4 @@ export class IgniteUIForReactTemplate implements Template { const name = Util.nameFromPath(pathName); return Util.lowerDashed(name); } - - protected registerJSONRoute(projectPath: string, name: string, routingModulePath: string) { - const configFile = fs.readFileSync(path.join(projectPath, routingModulePath), "utf8"); - const viewsArr = JSON.parse(configFile); - viewsArr.push({ - componentPath: this.getViewLink(name), - path: "/" + this.folderName(Util.nameFromPath(name)), - text: this.getToolbarLink(name) - }); - - fs.writeFileSync(path.join(projectPath, routingModulePath), JSON.stringify(viewsArr, null, 4)); - } - - protected getViewLink(name: string): string { - const filePath = "./views/" + this.folderName(name); - return filePath; - } - - protected getToolbarLink(name: string): string { - name = Util.nameFromPath(name); - const toolbarLink = name.replace(/\w\S*/g, txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()); - return toolbarLink; - } } diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js deleted file mode 100644 index e7dcfcb97..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,62 +0,0 @@ -import React, { Component } from 'react'; -import { IgrBulletGraphModule } from 'igniteui-react-gauges'; -import { IgrBulletGraph } from 'igniteui-react-gauges'; -import style from './style.css'; - -IgrBulletGraphModule.register(); - - -export default class $(ClassName) extends Component { - title = 'Bullet Graph' - state = { - data: [] - }; - - render() { - return ( -
- ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css deleted file mode 100644 index 1040e7ad7..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,12 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: space-around; -} -:local(.title) { - color: rgb(0, 153, 255); -} -:local(.graph) { - width: 50%; -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts b/packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts deleted file mode 100644 index 2fc305c0d..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrBulletGraphTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Bullet Graph"]; - this.controlGroup = "Gauges"; - this.listInComponentTemplates = true; - this.id = "bullet-graph"; - this.projectType = "igr-es6"; - this.name = "Bullet Graph"; - this.description = `allows for a linear and concise view of measures compared against a scale.`; - this.packages = ["igniteui-react-gauges@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrBulletGraphTemplate(); diff --git a/packages/cli/templates/react/igr-es6/bullet-graph/index.ts b/packages/cli/templates/react/igr-es6/bullet-graph/index.ts deleted file mode 100644 index 45e52c0c9..000000000 --- a/packages/cli/templates/react/igr-es6/bullet-graph/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrBulletGraphComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Bullet Graph"; - this.group = "Gauges"; - this.description = `allows for a linear and concise view of measures compared against a scale.`; - } -} -module.exports = new IgrBulletGraphComponent(); diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index b83030006..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,45 +0,0 @@ -import React, { Component } from 'react'; -import { IgrCategoryChartModule } from 'igniteui-react-charts'; -import { IgrCategoryChart } from 'igniteui-react-charts'; -import style from './style.css'; - -IgrCategoryChartModule.register(); - -var data = [ - { 'CountryName': 'China', 'Pop1995': 1216, 'Pop2005': 1297, 'Pop2015': 1361, 'Pop2025': 1394 }, - { 'CountryName': 'India', 'Pop1995': 920, 'Pop2005': 1090, 'Pop2015': 1251, 'Pop2025': 1396 }, - { 'CountryName': 'United States', 'Pop1995': 266, 'Pop2005': 295, 'Pop2015': 322, 'Pop2025': 351 }, - { 'CountryName': 'Indonesia', 'Pop1995': 197, 'Pop2005': 229, 'Pop2015': 256, 'Pop2025': 277 }, - { 'CountryName': 'Brazil', 'Pop1995': 161, 'Pop2005': 186, 'Pop2015': 204, 'Pop2025': 218 } -]; - -export default class $(ClassName) extends Component { - title = 'Category Chart' - state = { - data: [] - } - - componentDidMount() { - this.setState({ data }); - } - - render() { - return ( - - ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index b8c09ee23..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,9 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: center; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/category-chart/default/index.ts b/packages/cli/templates/react/igr-es6/category-chart/default/index.ts deleted file mode 100644 index bcc4e17d8..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/default/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrCategoryChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Category Chart"]; - this.controlGroup = "Charts"; - this.listInComponentTemplates = true; - this.id = "category-chart"; - this.projectType = "igr-es6"; - this.name = "Category Chart"; - this.description = `makes visualizing category data easy. Simplifies the complexities - of the data visualization domain into manageable API`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrCategoryChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/category-chart/index.ts b/packages/cli/templates/react/igr-es6/category-chart/index.ts deleted file mode 100644 index df8ad9f83..000000000 --- a/packages/cli/templates/react/igr-es6/category-chart/index.ts +++ /dev/null @@ -1,16 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrCategoryChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Category Chart"; - this.group = "Charts"; - this.description = `makes visualizing category data easy. Simplifies the complexities - of the data visualization domain into manageable API`; - } -} -module.exports = new IgrCategoryChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index db7791099..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,85 +0,0 @@ -import React, { Component } from 'react'; -import { IgrDoughnutChartModule } from 'igniteui-react-charts'; -import { IgrDoughnutChart } from 'igniteui-react-charts'; -import { IgrRingSeriesModule } from 'igniteui-react-charts'; -import { IgrRingSeries } from 'igniteui-react-charts'; -import { IgrItemLegendModule } from 'igniteui-react-charts'; -import { IgrItemLegend } from 'igniteui-react-charts'; - -import style from './style.css'; - -IgrItemLegendModule.register(); - -IgrDoughnutChartModule.register(); -IgrRingSeriesModule.register(); - - -const data: any = [ - { MarketShare: 30, Company: "Google", }, - { MarketShare: 15, Company: "Microsoft", }, - { MarketShare: 30, Company: "Apple", }, - { MarketShare: 15, Company: "Samsung", }, - { MarketShare: 10, Company: "Other", }, -]; - -export default class $(ClassName) extends Component { - title = 'Doughnut Chart' - data = []; - - chart = null; - legend = null; - - onChartRef(chart) { - this.chart = chart; - if (this.legend) { - this.chart.actualSeries[0].legend = this.legend; - } - } - - onLegendRef(legend) { - this.legend = legend; - if (this.chart) { - this.chart.actualSeries[0].legend = this.legend; - } - } - - state = { - data: [] - }; - - componentWillMount() { - this.setState({ data }); - this.onChartRef = this.onChartRef.bind(this); - this.onLegendRef = this.onLegendRef.bind(this); - } - - render() { - return ( - - ) - } -} diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index bd4482f69..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,9 +0,0 @@ -:local(.container) { - display: flex; - flex-flow: row; - justify-content: center; - padding-top: 24px; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/default/index.ts b/packages/cli/templates/react/igr-es6/doughnut-chart/default/index.ts deleted file mode 100644 index fd0e47bac..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrDoughnutChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Doughnut Chart"]; - this.controlGroup = "Charts"; - this.listInComponentTemplates = true; - this.id = "doughnut-chart"; - this.projectType = "igr-es6"; - this.name = "Doughnut Chart"; - this.description = `proportionally illustrate the occurrences of variables.`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrDoughnutChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/doughnut-chart/index.ts b/packages/cli/templates/react/igr-es6/doughnut-chart/index.ts deleted file mode 100644 index 5dba66766..000000000 --- a/packages/cli/templates/react/igr-es6/doughnut-chart/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrDoughnutChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Doughnut Chart"; - this.group = "Charts"; - this.description = `proportionally illustrate the occurrences of variables.`; - } -} -module.exports = new IgrDoughnutChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index 933efca38..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,55 +0,0 @@ -import React, { Component } from 'react' -import { IgrFinancialChartModule } from 'igniteui-react-charts'; -import { IgrFinancialChart } from 'igniteui-react-charts'; -import style from './style.css'; - -IgrFinancialChartModule.register(); - -const data: any = [ - { time: new Date(2013, 1, 1), open: 268.93, high: 268.93, low: 262.80, close: 265.00, volume: 6118146 }, - { time: new Date(2013, 1, 4), open: 262.78, high: 264.68, low: 259.07, close: 259.98, volume: 3723793 }, - { time: new Date(2013, 1, 5), open: 262.00, high: 268.03, low: 261.46, close: 266.89, volume: 4013780 }, - { time: new Date(2013, 1, 6), open: 265.16, high: 266.89, low: 261.11, close: 262.22, volume: 2772204 }, - { time: new Date(2013, 1, 7), open: 264.10, high: 264.10, low: 255.11, close: 260.23, volume: 3977065 }, - { time: new Date(2013, 1, 8), open: 261.40, high: 265.25, low: 260.56, close: 261.95, volume: 3879628 }, - { time: new Date(2013, 1, 11), open: 263.20, high: 263.25, low: 256.60, close: 257.21, volume: 3407457 }, - { time: new Date(2013, 1, 12), open: 259.19, high: 260.16, low: 257.00, close: 258.70, volume: 2944730 }, - { time: new Date(2013, 1, 13), open: 261.53, high: 269.96, low: 260.30, close: 269.47, volume: 5295786 }, - { time: new Date(2013, 1, 14), open: 267.37, high: 270.65, low: 265.40, close: 269.24, volume: 3464080 }, - { time: new Date(2013, 1, 15), open: 267.63, high: 268.92, low: 263.11, close: 265.09, volume: 3981233 } -]; - - -export default class $(ClassName) extends Component { - title = 'Financial Chart'; - state = { - data: [] - } - - componentWillMount() { - this.setState({ - data - }); - } - - render() { - return ( - - ) - } -} diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index 9aaa77850..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,10 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: center; - text-align: left; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/financial-chart/default/index.ts b/packages/cli/templates/react/igr-es6/financial-chart/default/index.ts deleted file mode 100644 index 5e0500495..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/default/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrFinancialChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Financial Chart"]; - this.controlGroup = "Charts"; - // set to true once bug with chart destoy is fixed - this.listInComponentTemplates = false; - this.id = "financial-chart"; - this.projectType = "igr-es6"; - this.name = "Financial Chart"; - this.description = `charting component that makes it easy to visualize financial data by - using a simple and intuitive API.`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrFinancialChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/financial-chart/index.ts b/packages/cli/templates/react/igr-es6/financial-chart/index.ts deleted file mode 100644 index c29c42491..000000000 --- a/packages/cli/templates/react/igr-es6/financial-chart/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrFinancialChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Financial Chart"; - this.group = "Charts"; - this.description = `charting component that makes it easy to visualize financial data by - using a simple and intuitive API.`; - } -} -module.exports = new IgrFinancialChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/data.js b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/data.js deleted file mode 100644 index 06ba27b28..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/data.js +++ /dev/null @@ -1,46 +0,0 @@ -export default [{ - Discontinued: false, - OrderDate: new Date('2012-02-12'), - ProductID: 1, - ProductName: 'Chai', - QuantityPerUnit: '10 boxes x 20 bags', - ReorderLevel: 10, - UnitPrice: 18.0000, - UnitsInStock: 39 -}, { - Discontinued: false, - OrderDate: new Date('2003-03-17'), - ProductID: 2, - ProductName: 'Chang', - QuantityPerUnit: '24 - 12 oz bottles', - ReorderLevel: 25, - UnitPrice: 19.0000, - UnitsInStock: 17 -}, { - Discontinued: false, - OrderDate: new Date('2006-03-17'), - ProductID: 3, - ProductName: 'Aniseed Syrup', - QuantityPerUnit: '12 - 550 ml bottles', - ReorderLevel: 25, - UnitPrice: 10.0000, - UnitsInStock: 13 -}, { - Discontinued: false, - OrderDate: new Date('2016-03-17'), - ProductID: 4, - ProductName: 'Chef Antons Cajun Seasoning', - QuantityPerUnit: '48 - 6 oz jars', - ReorderLevel: 0, - UnitPrice: 22.0000, - UnitsInStock: 53 -}, { - Discontinued: true, - OrderDate: new Date('2011-11-11'), - ProductID: 5, - ProductName: 'Chef Antons Gumbo Mix', - QuantityPerUnit: '36 boxes', - ReorderLevel: 0, - UnitPrice: 21.3500, - UnitsInStock: 0 -}]; diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/index.js deleted file mode 100644 index 96d0c993a..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import React, { Component } from 'react'; -import style from './style.css'; -import { IgrDataGridModule } from 'igniteui-react-grids'; -import { IgrDataGrid } from 'igniteui-react-grids'; -import { IgrNumericColumn } from 'igniteui-react-grids'; -import { IgrTextColumn } from 'igniteui-react-grids'; -import { IgrDateTimeColumn } from 'igniteui-react-grids'; - -import data from './data'; - -IgrDataGridModule.register(); - -export default class $(ClassName) extends Component { - title = 'Grid'; - state = { - } - - render() { - this.data = data; - return ( - - ) - } -} diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/style.css deleted file mode 100644 index bb0a0030d..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/style.css +++ /dev/null @@ -1,17 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: column; - justify-content: center; - align-items: center; -} - -:local(.title) { - color: rgb(0, 153, 255); -} - -:local(.grid) { - width: 80%; - margin-bottom: 24px; - border: 1px solid rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/grid/basic/index.ts b/packages/cli/templates/react/igr-es6/grid/basic/index.ts deleted file mode 100644 index 105ce7a28..000000000 --- a/packages/cli/templates/react/igr-es6/grid/basic/index.ts +++ /dev/null @@ -1,24 +0,0 @@ - -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class GridTemplate extends IgniteUIForReactTemplate { - /** - * - */ - constructor() { - super(__dirname); - this.id = "grid"; - this.name = "Grid"; - this.widget = "igGrid"; - this.description = "IgrGrid template for React"; - this.projectType = "igr-es6"; - this.components = ["Grid"]; - this.controlGroup = "Data Grids"; - // TODO: read version from igniteui-react-core in package.json - this.packages = ["igniteui-react-grids@~19.2.3", "igniteui-react-inputs@~19.2.3", - "igniteui-react-layouts@~19.2.3"]; - - this.hasExtraConfiguration = false; - } -} -module.exports = new GridTemplate(); diff --git a/packages/cli/templates/react/igr-es6/grid/index.ts b/packages/cli/templates/react/igr-es6/grid/index.ts deleted file mode 100644 index c0005ef4a..000000000 --- a/packages/cli/templates/react/igr-es6/grid/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrDataGridComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Data Grid"; - this.group = "Grids"; - this.description = "pick from grids: basic, sorting, templating."; - } -} -module.exports = new IgrDataGridComponent(); diff --git a/packages/cli/templates/react/igr-es6/groups.json b/packages/cli/templates/react/igr-es6/groups.json deleted file mode 100644 index f55a8a30b..000000000 --- a/packages/cli/templates/react/igr-es6/groups.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Gauges": "scale measure Controls including Linear and Radial Gauge and Bullet Graph.", - "Charts": "high-performance data visualization for category and financial data.", - "Grids": "bind and display data sets with little coding or configuration." -} diff --git a/packages/cli/templates/react/igr-es6/index.ts b/packages/cli/templates/react/igr-es6/index.ts deleted file mode 100644 index a4c23d568..000000000 --- a/packages/cli/templates/react/igr-es6/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseProjectLibrary } from "@igniteui/cli-core"; - -class IgrReactProjectLibrary extends BaseProjectLibrary { - constructor() { - super(__dirname); - this.name = "Ignite UI for React (deprecated)"; - this.projectType = "igr-es6"; - this.themes = ["default"]; - - const groups = require("./groups.json"); - // tslint:disable-next-line:forin - for (const key in groups) { - this.groupDescriptions.set(key, groups[key]); - } - } -} -module.exports = new IgrReactProjectLibrary(); diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/index.js deleted file mode 100644 index 4af8aebbf..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,62 +0,0 @@ -import React, { Component } from 'react'; -import style from './style.css'; -import { IgrLinearGaugeModule } from 'igniteui-react-gauges'; -import { IgrLinearGauge } from 'igniteui-react-gauges'; - -IgrLinearGaugeModule.register(); - -export default class $(ClassName) extends Component { - title = 'Linear Gauge'; - render() { - return ( - - ) - } -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/style.css deleted file mode 100644 index 31590f1ec..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,12 +0,0 @@ -:local(.container) { - padding-top: 24px; - display: flex; - flex-flow: row; - justify-content: space-around; -} -:local(.title) { - color: rgb(0, 153, 255); -} -:local(.gauge) { - width: 50%; -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/default/index.ts b/packages/cli/templates/react/igr-es6/linear-gauge/default/index.ts deleted file mode 100644 index 92a00c735..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrLinearGaugeTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Linear Gauge"]; - this.controlGroup = "Gauges"; - this.listInComponentTemplates = true; - this.id = "linear-gauge"; - this.projectType = "igr-es6"; - this.name = "Linear Gauge"; - this.description = `value compared against a scale and one or more ranges.`; - this.packages = ["igniteui-react-gauges@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrLinearGaugeTemplate(); diff --git a/packages/cli/templates/react/igr-es6/linear-gauge/index.ts b/packages/cli/templates/react/igr-es6/linear-gauge/index.ts deleted file mode 100644 index ad67748de..000000000 --- a/packages/cli/templates/react/igr-es6/linear-gauge/index.ts +++ /dev/null @@ -1,15 +0,0 @@ - -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrLinearGaugeComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Linear Gauge"; - this.group = "Gauges"; - this.description = `value compared against a scale and one or more ranges.`; - } -} -module.exports = new IgrLinearGaugeComponent(); diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js b/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js deleted file mode 100644 index 38bc72df1..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/index.js +++ /dev/null @@ -1,83 +0,0 @@ -import React, { Component } from 'react'; -import { IgrPieChartModule } from 'igniteui-react-charts'; -import { IgrPieChart } from 'igniteui-react-charts'; -import { IgrItemLegend } from 'igniteui-react-charts'; -import { IgrItemLegendModule } from 'igniteui-react-charts'; - -import style from './style.css'; - -IgrPieChartModule.register(); -IgrItemLegendModule.register(); - -const data: any = [ - { MarketShare: 30, Company: "Google", }, - { MarketShare: 15, Company: "Microsoft", }, - { MarketShare: 30, Company: "Apple", }, - { MarketShare: 15, Company: "Samsung", }, - { MarketShare: 10, Company: "Other", }, -]; - -export default class $(ClassName) extends Component { - title = 'Pie Chart'; - state = { - data: [] - }; - - legend = null; - chart = null; - - onLegendRef(legend) { - this.legend = legend; - if (this.chart) { - this.chart.legend = this.legend; - } - } - - onChartRef(chart) { - this.chart = chart; - if (this.chart) { - this.chart.legend = this.legend; - } - } - - componentWillMount() { - this.setState({ - data - }); - this.onLegendRef = this.onLegendRef.bind(this); - this.onChartRef = this.onChartRef.bind(this); - } - - handleClick() { - debugger; - } - - render() { - return ( - - ) - } -} diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/style.css b/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/style.css deleted file mode 100644 index bd4482f69..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/style.css +++ /dev/null @@ -1,9 +0,0 @@ -:local(.container) { - display: flex; - flex-flow: row; - justify-content: center; - padding-top: 24px; -} -:local(.title) { - color: rgb(0, 153, 255); -} \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/test.js b/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/test.js deleted file mode 100644 index ea320de9e..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/files/src/views/__path__/test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import $(ClassName) from './index'; -import { shallow } from 'enzyme'; - -it('$(ClassName) renders without crashing', () => { - const wrapperComponent = shallow(<$(ClassName) />); - expect(wrapperComponent).toBeDefined(); - expect(wrapperComponent).toBeTruthy(); -}); \ No newline at end of file diff --git a/packages/cli/templates/react/igr-es6/pie-chart/default/index.ts b/packages/cli/templates/react/igr-es6/pie-chart/default/index.ts deleted file mode 100644 index 250b43d4a..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/default/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; - -class IgrPieChartTemplate extends IgniteUIForReactTemplate { - constructor() { - super(__dirname); - this.components = ["Pie Chart"]; - this.controlGroup = "Charts"; - this.listInComponentTemplates = true; - this.id = "pie-chart"; - this.projectType = "igr-es6"; - this.name = "Pie Chart"; - this.description = `easily illustate the proportions of data entries`; - this.packages = ["igniteui-react-charts@~19.2.3"]; // TODO: read version from igniteui-react-core in package.json - } -} -module.exports = new IgrPieChartTemplate(); diff --git a/packages/cli/templates/react/igr-es6/pie-chart/index.ts b/packages/cli/templates/react/igr-es6/pie-chart/index.ts deleted file mode 100644 index bc47669df..000000000 --- a/packages/cli/templates/react/igr-es6/pie-chart/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseComponent } from "@igniteui/cli-core"; - -class IgrPieChartComponent extends BaseComponent { - /** - * - */ - constructor() { - super(__dirname); - this.name = "Pie Chart"; - this.group = "Charts"; - this.description = `easily illustate the proportions of data entries`; - } -} -module.exports = new IgrPieChartComponent(); diff --git a/packages/cli/templates/react/igr-es6/projects/_base/__dot__eslintrc.json b/packages/cli/templates/react/igr-es6/projects/_base/__dot__eslintrc.json deleted file mode 100644 index e6aa150f1..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/__dot__eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "react-app" -} diff --git a/packages/cli/templates/react/igr-es6/projects/_base/files/README.md b/packages/cli/templates/react/igr-es6/projects/_base/files/README.md deleted file mode 100644 index 8dd09f816..000000000 --- a/packages/cli/templates/react/igr-es6/projects/_base/files/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# $(name) - -This project was generated with [Ignite UI CLI](https://github.com/IgniteUI/igniteui-cli) version $(cliVersion).- Welcome to Ignite UI for React! -
- - Learn More - -