Skip to content

Commit 3784710

Browse files
committed
first commit
0 parents  commit 3784710

25 files changed

+13846
-0
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# all files
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
max_line_length = 120
13+
14+
[*.{js,ts}]
15+
quote_type = single
16+
curly_bracket_next_line = false
17+
spaces_around_brackets = inside
18+
indent_brace_style = BSD KNF
19+
20+
# HTML
21+
[*.html]
22+
quote_type = double

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.log
2+
.idea
3+
.DS_Store
4+
node_modules
5+
6+
coverage
7+
lib
8+
lib-esm
9+
lib-fesm
10+
umd
11+
typings
12+
13+
## this is generated by `npm pack`
14+
*.tgz
15+
package

.npmignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.*
2+
*.log
3+
**/tsconfig.json
4+
jest.config.js
5+
tsconfig.*.json
6+
tslint.json
7+
**/webpack.config.js
8+
9+
__tests__
10+
coverage
11+
node_modules
12+
docs
13+
typedocs
14+
src
15+
tests
16+
17+
## this is generated by `npm pack`
18+
*.tgz
19+
package

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
access=public
2+
save-exact=true

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: node_js
2+
node_js: '6'
3+
cache: yarn
4+
notifications:
5+
email: false
6+
# allow this once https://github.com/travis-ci/travis-ci/issues/6933 is fixed
7+
# install:
8+
# - yarn
9+
script:
10+
- npm run build

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-prefix false

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2020 Simpli
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Vue-Adap-Table
2+
3+
A Vue adaptable table, many components to be used to render and control lists
4+
5+
# Install
6+
```
7+
npm i @simpli/vue-adap-table @simpli/resource-collection class-transformer simple-line-icons
8+
```
9+
10+
## Import
11+
```typescript
12+
import Vue from 'vue'
13+
import VueAdapTable from '@simpli/vue-adap-table'
14+
15+
Vue.use(VueAdapTable)
16+
```
17+
On your Scss:
18+
```scss
19+
@import "~@simpli/vue-modal/scss/adapOrderby";
20+
@import "~@simpli/vue-modal/scss/adapPagination";
21+
@import "~@simpli/vue-modal/scss/adapSearchfield";
22+
@import "~simple-line-icons/scss/simple-line-icons";
23+
```
24+
25+
## Basic Usage
26+
```html
27+
<adap-searchfield :collection="collection" />
28+
29+
<table>
30+
<tr>
31+
<th>
32+
<adap-orderby :collection="collection" name="title" label="Title" />
33+
</th>
34+
<th>
35+
<adap-orderby :collection="collection" name="description">
36+
Description
37+
</adap-orderby>
38+
</th>
39+
</tr>
40+
41+
<tr v-for="(item, i) in collection.all()" :key="item.$id">
42+
<td>
43+
{{ item.title }}
44+
</td>
45+
<td>
46+
{{ item.description }}
47+
</td>
48+
</tr>
49+
</table>
50+
51+
<adap-pagination :collection="collection" :gap="optionalNumberOfNumberedPages" />
52+
```
53+
On Code:
54+
```typescript
55+
import {MixinAdapRoute} from '@simpli/vue-adap-table'
56+
57+
@Component
58+
export default class MyComponent extends Mixins(MixinAdapRoute) {
59+
collection = new MyCollection()
60+
optionalNumberOfNumberedPages = 5 // default is 2
61+
62+
async created() {
63+
// optionally you can use the mixin and initialize it with this method
64+
// so the browser URL will match the search, orderby and pagination properties
65+
this.initAdapRoute(this.collection)
66+
67+
// load the collection content using the mixin
68+
await this.query()
69+
}
70+
}
71+
```

jest.config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
moduleFileExtensions: ['js', 'jsx', 'json', 'vue', 'ts', 'tsx'],
3+
coveragePathIgnorePatterns: [
4+
"<rootDir>/node_modules/",
5+
"<rootDir>/lib/",
6+
"<rootDir>/lib-esm/",
7+
"<rootDir>/umd/",
8+
"<rootDir>/src/.*(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$"
9+
],
10+
transform: {
11+
'^.+\\.vue$': 'vue-jest',
12+
'^.+\\.tsx?$': 'ts-jest',
13+
},
14+
transformIgnorePatterns: ['/node_modules/'],
15+
moduleNameMapper: {
16+
'^@/(.*)$': '<rootDir>/src/$1',
17+
},
18+
snapshotSerializers: ['jest-serializer-vue'],
19+
testMatch: [
20+
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
21+
],
22+
testURL: 'http://localhost/',
23+
globals: {
24+
'ts-jest': {
25+
babelConfig: true,
26+
tsConfig: {
27+
module: 'commonjs',
28+
},
29+
},
30+
},
31+
}

0 commit comments

Comments
 (0)