Skip to content

Now with Typescript! #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
995c66b
Change attribute names to match GridJS API
selfagency Jun 8, 2021
ea93940
Update table on window resize
selfagency Jun 8, 2021
a5d40d7
To the moon and back
selfagency Jun 9, 2021
f88802d
Add ready event
selfagency Jun 9, 2021
f2cf99b
Rework new helper function
selfagency Jun 9, 2021
17626e7
update devdeps
selfagency Jun 9, 2021
40da820
Update README.md
selfagency Jun 9, 2021
af3db2b
All new documentation
selfagency Jun 9, 2021
69b9dc5
v5.0.2-0
selfagency Jun 9, 2021
e738d53
Add global event bus example
selfagency Jun 9, 2021
5c6cbb4
merge
selfagency Jun 9, 2021
8693880
Merge branch 'master' of github.com:grid-js/gridjs-vue
selfagency Jun 9, 2021
e258ce7
switch from window resize to element resize
selfagency Jun 17, 2021
2b5815c
v5.0.3-0
selfagency Jun 17, 2021
0a6d052
Revert "v5.0.3-0"
selfagency Jun 17, 2021
0145953
v5.0.2-1
selfagency Jun 17, 2021
133f008
create bundled versions, move browser versions
selfagency Jun 17, 2021
7177e6a
v5.0.2-2
selfagency Jun 17, 2021
8af0232
add exports to package.json
selfagency Jun 17, 2021
a00b318
v5.0.2-3
selfagency Jun 17, 2021
2204838
5.0.2-4
selfagency Aug 9, 2021
e5e0971
put back ready event
selfagency Aug 9, 2021
c3fac13
To the moon and back
selfagency Aug 9, 2021
a2917c6
Rework new helper function
selfagency Aug 9, 2021
b3d4c05
All new documentation
selfagency Aug 9, 2021
929ae69
create bundled versions, move browser versions
selfagency Jun 17, 2021
f1a1e01
5.0.2-4
selfagency Aug 9, 2021
33ad9a5
put back ready event
selfagency Aug 9, 2021
7657c33
Merge branch 'master' of https://github.com/selfagency/gridjs-vue int…
selfagency Aug 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .browserslistrc

This file was deleted.

4 changes: 0 additions & 4 deletions .dcignore

This file was deleted.

3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2

[*.cs]
indent_size = 4
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ module.exports = {
root: true,
env: {
browser: true,
node: true
node: false
},
extends: ['plugin:vue/recommended', 'eslint:recommended', 'plugin:import/errors', 'plugin:import/warnings'],
parserOptions: {
parser: 'babel-eslint'
},
plugins: ['html'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'import/no-unresolved': 'warn'
},
overrides: [
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,4 @@ yarn-error.log
# End of https://www.toptal.com/developers/gitignore/api/linux,macos,node,dotenv,visualstudiocode,vuejs

.dccache
build
29 changes: 9 additions & 20 deletions bili.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
module.exports = {
jsCompiler: 'babel',
input: ['src/index.browser.mjs', 'src/index.mjs'],
const config = {
input: 'build/main.js',
bundleNodeModules: true,
externals: ['vue'],
output: {
format: ['cjs', 'esm', 'umd'],
minify: true,
moduleName: 'Grid',
extractCSS: false
extractCSS: false,
dir: 'dist/'
},
plugins: {
string: {
include: 'node_modules/**/*.css'
},
babel: false,
vue: {
target: 'browser'
},
babel: {
presets: ['vue', ['@babel/preset-env', { useBuiltIns: 'usage', corejs: 3 }]],
plugins: ['@babel/plugin-transform-runtime'],
babelHelpers: 'runtime',
configFile: false
},
'node-resolve': true
},
resolvePlugins: {
string: require('rollup-plugin-string').string
},
external: 'crypto'
}
}
}
export default config
6 changes: 3 additions & 3 deletions docs/using_with_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ directly into a table cell or row.

<script>
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'
import TestComponent from '../test-component.mjs'

export default {
Expand Down Expand Up @@ -57,7 +57,7 @@ passing `methods` to `$gridjs.helper()` containing your event handler, just as y

<script>
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'
import TestComponent from '../test-component.mjs'

export default {
Expand Down Expand Up @@ -106,7 +106,7 @@ communicate back with the main Vue application unless using a separate global ev
```js
import Emittery from 'https://cdn.skypack.dev/emittery'
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

window.emitter = new Emittery()

Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/custom-sort.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'CustomSort',
Expand Down
16 changes: 9 additions & 7 deletions examples/advanced/events.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Events',
Expand All @@ -20,13 +20,15 @@ export default {
},
mounted() {
this.$nextTick(() => {
this.$refs.myGrid.grid.on('rowClick', (...args) => {
console.log(`row: ${JSON.stringify(args)}`)
})
if (this.$refs.myGrid && this.$refs.myGrid.grid) {
this.$refs.myGrid.grid.on('rowClick', (...args) => {
console.log(`row: ${JSON.stringify(args)}`)
})

this.$refs.myGrid.grid.on('cellClick', (...args) => {
console.log(`cell: ${JSON.stringify(args)}`)
})
this.$refs.myGrid.grid.on('cellClick', (...args) => {
console.log(`cell: ${JSON.stringify(args)}`)
})
}
})
},
template: `
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/force-render.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'ForceRender',
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/global-event-bus.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Emittery from 'https://cdn.skypack.dev/emittery'
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

window.emitter = new Emittery()

Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/multi-column-sort.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'MultiColumnSort',
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/nested-header.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'NestedHeader',
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/stock-market.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VueChartist from 'https://cdn.skypack.dev/v-chartist'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'StockMarket',
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/virtual-dom.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'VirtualDom',
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/vue-events.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'
import TestComponent from '../test-component.mjs'

export default {
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/auto-update.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'AutoUpdate',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/fixed-header.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'FixedHeader',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/from-html-table.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'FromHtmlTable',
Expand Down
9 changes: 2 additions & 7 deletions examples/basic/hello-world.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'HelloWorld',
Expand Down Expand Up @@ -31,12 +31,7 @@ export default {
]
}
},
methods: {
log(text) {
console.log(text)
}
},
template: `
<div><grid :columns="columns" :rows="rows" ref="helloWorld" @ready="log('Hi to you too!')"></grid></div>
<div><grid :columns="columns" :rows="rows" ref="helloWorld"></grid></div>
`
}
2 changes: 1 addition & 1 deletion examples/basic/hidden-columns.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'HiddenColumns',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/loading-state.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'LoadingState',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/pagination.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Pagination',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/resizable.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Resizable',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/search.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Search',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/sorting.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Sorting',
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/wide-table.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'WideTable',
Expand Down
2 changes: 1 addition & 1 deletion examples/customizing/cell-attributes.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'CellAttributes',
Expand Down
2 changes: 1 addition & 1 deletion examples/customizing/cell-formatting.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'CellFormatting',
Expand Down
2 changes: 1 addition & 1 deletion examples/customizing/html-in-cells.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'HtmlInCells',
Expand Down
2 changes: 1 addition & 1 deletion examples/customizing/html-in-header-cells.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'HtmlInCells',
Expand Down
2 changes: 1 addition & 1 deletion examples/customizing/row-buttons.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'RowButtons',
Expand Down
2 changes: 1 addition & 1 deletion examples/customizing/vue-component-in-cells.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import faker from 'https://cdn.skypack.dev/faker'
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'
import TestComponent from '../test-component.mjs'

export default {
Expand Down
2 changes: 1 addition & 1 deletion examples/data-source/async-data-import.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'AsyncDataImport',
Expand Down
2 changes: 1 addition & 1 deletion examples/data-source/dynamic-data-import.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'DynamicDataImport',
Expand Down
2 changes: 1 addition & 1 deletion examples/data-source/from-html-table.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'FromHtmlTable',
Expand Down
2 changes: 1 addition & 1 deletion examples/data-source/import-server-side-data.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'ImportServerSideData',
Expand Down
2 changes: 1 addition & 1 deletion examples/data-source/json.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Json',
Expand Down
2 changes: 1 addition & 1 deletion examples/data-source/xml.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'Json',
Expand Down
2 changes: 1 addition & 1 deletion examples/server-side/custom-http-client.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'CustomHttpClient',
Expand Down
2 changes: 1 addition & 1 deletion examples/server-side/import-server-side-data.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'ImportServerSideData',
Expand Down
2 changes: 1 addition & 1 deletion examples/server-side/server-side-pagination.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'ServerSidePagination',
Expand Down
2 changes: 1 addition & 1 deletion examples/server-side/server-side-search.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'ServerSideSearch',
Expand Down
2 changes: 1 addition & 1 deletion examples/server-side/server-side-sorting.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid } from '../../dist/index.esm.js'
import { Grid } from '../../dist/main.esm.js'

export default {
name: 'ServerSideSorting',
Expand Down
7 changes: 7 additions & 0 deletions examples/styling.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,12 @@ <h2>CSS-in-JS</h2>
`
})
</script>

<style>
.gridjs-td.my-custom-td-class {
background-color: blue !important;
color: white !important;
}
</style>
</body>
</html>
Loading