diff --git a/README.md b/README.md index 190e957..ad78f60 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ -# deep-dive-into-aggregates-in-vue-treegrid +# Deep Dive into Aggregates in Vue TreeGrid + A quick-start project that helps you display aggregate values for columns in the Syncfusion Vue Tree Grid component. This project contains code to enable aggregate with their types. It also has code to display the custom aggregate function. + +Refer to the following documentation on aggregates in the Syncfusion Vue Tree Grid component: +https://ej2.syncfusion.com/vue/documentation/treegrid/aggregates/aggregates/ + +Check out this online aggregates example of the Syncfusion Vue Tree Grid component: +https://ej2.syncfusion.com/vue/demos/#/bootstrap5/tree-grid/aggregate.html + +Refer to the following Syncfusion Vue Tree Grid getting started video: +https://www.youtube.com/watch?v=FEMyOHKjjao + +Check the following documentation to know more about template rendering in Syncfusion Vue components, +https://ej2.syncfusion.com/vue/documentation/common/template/ + +## Project prerequisites + +Make sure that you have the latest versions of Vue, Node, Vue Class Component, and Visual Studio Code in your machine before starting to work on this project. + +### How to run this application? + +To run this application, you need to clone the `deep-dive-into-aggregates-in-vue-treegrid` repository and then open it in Visual Studio Code. Now, simply install all the necessary react packages into your current project using the `npm install` command and run your project using the `npm run serve` command. \ No newline at end of file diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..e955840 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@vue/cli-plugin-babel/preset' + ] +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..4aafc5f --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "esnext", + "baseUrl": "./", + "moduleResolution": "node", + "paths": { + "@/*": [ + "src/*" + ] + }, + "lib": [ + "esnext", + "dom", + "dom.iterable", + "scripthost" + ] + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..411eaca --- /dev/null +++ b/package.json @@ -0,0 +1,46 @@ +{ + "name": "myvueproject", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "@syncfusion/ej2-vue-grids": "^20.2.45", + "@syncfusion/ej2-vue-treegrid": "^20.2.45", + "core-js": "^3.8.3", + "vue": "^3.2.13", + "vue-class-component": "^8.0.0-rc.1" + }, + "devDependencies": { + "@babel/core": "^7.12.16", + "@babel/eslint-parser": "^7.12.16", + "@vue/cli-plugin-babel": "~5.0.0", + "@vue/cli-plugin-eslint": "~5.0.0", + "@vue/cli-service": "~5.0.0", + "eslint": "^7.32.0", + "eslint-plugin-vue": "^8.0.3" + }, + "eslintConfig": { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/vue3-essential", + "eslint:recommended" + ], + "parserOptions": { + "parser": "@babel/eslint-parser" + }, + "rules": {} + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead", + "not ie 11" + ] +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..3e5a139 --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
+ + + diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..fe8808b --- /dev/null +++ b/src/App.vue @@ -0,0 +1,116 @@ + + + + diff --git a/src/__VLS_template.js b/src/__VLS_template.js new file mode 100644 index 0000000..057795d --- /dev/null +++ b/src/__VLS_template.js @@ -0,0 +1,9 @@ +import { TreeGridComponent } from '@syncfusion/ej2-vue-treegrid'; + +export default (await import('vue')).defineComponent({ +name: 'App', +components: { +'ejs-treegrid': TreeGridComponent +} +}); +const __VLS_template = () => ({}); diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue new file mode 100644 index 0000000..879051a --- /dev/null +++ b/src/components/HelloWorld.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/data.js b/src/data.js new file mode 100644 index 0000000..b68a9f7 --- /dev/null +++ b/src/data.js @@ -0,0 +1,44 @@ +Object.defineProperty(exports, "__esModule", { value: true }); +export let summaryData = [{ + ID: '1', + Name: 'Order 1', + units: 1395, + unitPrice: 47.00, + price: 65565, + category: 'Seafoods', + subtasks: [ + { ID: '1.1', Name: 'Mackerel', category: 'Frozen seafood', units: 235, unitPrice: 12.26, price: 2881.1 }, + { ID: '1.2', Name: 'Yellowfin Tuna', category: 'Frozen seafood', units: 324, unitPrice: 18.45, price: 5977.8 }, + { ID: '1.3', Name: 'Herrings', category: 'Frozen seafood', units: 488, unitPrice: 11.45, price: 5587.6 }, + { ID: '1.4', Name: 'Preserved Olives', category: 'Edible', units: 125, unitPrice: 19.56, price: 2445 }, + { ID: '1.5', Name: 'Sweet corn Frozen', category: 'Edible', units: 223, unitPrice: 12.34, price: 2751.82 } + ] +}, +{ + ID: '2', + Name: 'Order 2', + units: 1944, + unitPrice: 58.45, + price: 1245.73, + category: 'Products', + subtasks: [ + { ID: '2.1', Name: 'Tilapias', category: 'Frozen seafood', units: 278, unitPrice: 15.45, price: 4295.1 }, + { ID: '2.2', Name: 'White Shrimp', category: 'Frozen seafood', units: 560, unitPrice: 17.66, price: 9889.6 }, + { ID: '2.3', Name: 'Fresh Cheese', category: 'Dairy', units: 323, unitPrice: 12.35, price: 3989 }, + { ID: '2.4', Name: 'Blue Veined Cheese', category: 'Dairy', units: 370, unitPrice: 15.77, price: 5834.9 }, + { ID: '2.5', Name: 'Butter', category: 'Dairy', units: 413, unitPrice: 19.45, price: 8032.85 } + ] +}, +{ + ID: '3', + Name: 'Order 3', + units: 1120, + unitPrice: 33.45, + price: 37464, + category: 'Crystals', + subtasks: [ + { ID: '3.1', Name: 'Lead glassware', category: 'Solid crystals', units: 542, unitPrice: 19.56, price: 10601.52 }, + { ID: '3.2', Name: 'Pharmaceutical Glassware', category: 'Solid crystals', units: 324, unitPrice: 11.36, price: 3680.64 }, + { ID: '3.3', Name: 'Glass beads', category: 'Solid crystals', units: 254, unitPrice: 16.11, price: 4091.94 } + ] +}]; \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..c451555 --- /dev/null +++ b/src/main.js @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import {registerLicense} from '@syncfusion/ej2-base'; +registerLicense("ORg4AjUWIQA/Gnt2VVhiQlFaclxJVHxIe0x0RWFbb1x6cVZMYFVBNQtUQF1hS35bd0NjX31XcX1QR2FY") +createApp(App).mount('#app') diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..910e297 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,4 @@ +const { defineConfig } = require('@vue/cli-service') +module.exports = defineConfig({ + transpileDependencies: true +})