-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
466 additions
and
645 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
|
||
/cypress/videos/ | ||
/cypress/screenshots/ | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&family=Source+Sans+Pro:wght@400;700&display=swap" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "playground", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"ag-grid-vue3": "^32.2.2", | ||
"vue": "^3.2.47", | ||
"vuestic-ui": "^1.9.0" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"vite": "^4.1.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<template> | ||
<div> | ||
<VaButton @click="toggleTheme">Toggle theme</VaButton> | ||
</div> | ||
<!-- The AG Grid component --> | ||
<ag-grid-vue | ||
:rowData="rowData" | ||
:columnDefs="colDefs" | ||
style="height: 500px" | ||
:default-col-def="defaultColDef" | ||
:pagination-auto-page-size="true" | ||
:pagination="true" | ||
:pinned-bottom-row-data="[rowData.at(-1)]" | ||
:rowSelection="{ mode: 'multiRow' }" | ||
class="ag-theme-vuestic" | ||
> | ||
</ag-grid-vue> | ||
</template> | ||
|
||
<script> | ||
import { ref } from 'vue'; | ||
import "ag-grid-community/styles/ag-grid.css"; // Mandatory CSS required by the Data Grid | ||
import "../../src/styles/index.scss" | ||
// import "ag-grid-community/styles/ag-theme-alpine.css"; // Optional: Theme | ||
import { AgGridVue } from "ag-grid-vue3"; // Vue Data Grid Component | ||
import { useColors, VaButton } from 'vuestic-ui' | ||
export default { | ||
name: "App", | ||
components: { | ||
VaButton, | ||
AgGridVue, // Add Vue Data Grid component | ||
}, | ||
setup() { | ||
const defaultColDef = { | ||
filter: true, | ||
floatingFilter: true, | ||
sortable: true, | ||
} | ||
// Row Data: The data to be displayed. | ||
const rowData = ref([]); | ||
// Column Definitions: Defines the columns to be displayed. | ||
const colDefs = ref([ | ||
{ | ||
headerName: 'Athlete (With Tooltip)', | ||
field: 'athlete', | ||
tooltipField: "country", | ||
headerTooltip: "Tooltip for Athlete Column Header", | ||
}, | ||
{ headerName: 'Age (Editable)', field: 'age', editable: true }, | ||
{ field: 'country' }, | ||
{ field: 'year' }, | ||
{ field: 'date' }, | ||
{ field: 'sport' }, | ||
{ field: 'gold' }, | ||
{ field: 'silver' }, | ||
{ field: 'bronze' }, | ||
{ field: 'total' }, | ||
]); | ||
fetch('https://www.ag-grid.com/example-assets/olympic-winners.json') | ||
.then(response => response.json()) | ||
.then(data => { | ||
rowData.value = data; | ||
}); | ||
const { applyPreset, currentPresetName } = useColors() | ||
const toggleTheme = () => { | ||
applyPreset(currentPresetName.value === 'light' ? 'dark' : 'light') | ||
} | ||
return { | ||
defaultColDef, | ||
rowData, | ||
colDefs, | ||
toggleTheme, | ||
}; | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createVuestic } from 'vuestic-ui' | ||
import 'vuestic-ui/css' | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).use(createVuestic()).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { fileURLToPath, URL } from 'node:url' | ||
|
||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
resolve: { | ||
alias: { | ||
'@': fileURLToPath(new URL('./src', import.meta.url)) | ||
} | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.