Skip to content

Commit 8913049

Browse files
Version 2.3.20
1 parent 8cfe493 commit 8913049

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+378
-249
lines changed

Diff for: .browserslistrc

100644100755
File mode changed.

Diff for: .eslintrc.js

100644100755
File mode changed.

Diff for: .gitignore

100644100755
File mode changed.

Diff for: CHANGELOG.md

100644100755
File mode changed.

Diff for: LICENSE

100644100755
File mode changed.

Diff for: LICENSES/MIT.txt

100644100755
File mode changed.

Diff for: Makefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# All commands in the is Makefile can be executed OUTSIDE of any docker container.
2+
# Commands for INSIDE of docker containers are in Makefile in api/web directory.
3+
# Get a shell for the respective container with `make docker-exec-web` or `make docker-exec-php`
4+
# Next goal: Bitbucket pipeline should call make commands instead of having the commands encoded in pipeline so that it's easy to run the locally.
5+
####> Hacks ####
6+
7+
.PHONY: hack
8+
hack: hack-chown hack-chmod
9+
10+
.PHONY: hack-chmod
11+
hack-chmod:
12+
sudo chmod 0777 ./.[^.]* -R
13+
sudo chmod 0777 * -R
14+
15+
.PHONY: hack-chown
16+
hack-chown:
17+
sudo chown $(USER):$(USER) ./.[^.]* -R
18+
sudo chown $(USER):$(USER) * -R
19+
20+
####< Hacks ####
21+
22+
# https://stackoverflow.com/questions/10032461/git-keeps-asking-me-for-my-ssh-key-passphrase
23+
.PHONY: ssh-login
24+
ssh-login:
25+
@echo "Please run: eval \`ssh-agent\` && ssh-add"

Diff for: README.md

100644100755
+46-41

Diff for: certs/example.com+5-key.pem

100644100755
File mode changed.

Diff for: certs/example.com+5.pem

100644100755
File mode changed.

Diff for: dist/vue-quintable.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-quintable.es.js

+196-175
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-quintable.es.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-quintable.umd.js

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-quintable.umd.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: index.html

100644100755
File mode changed.

Diff for: pack.js

100644100755
File mode changed.

Diff for: package.json

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sensetence/vue-quintable",
3-
"version": "2.3.17",
3+
"version": "2.3.20",
44
"private": false,
55
"scripts": {
66
"dev": "vite --config vite.build.config.js",
@@ -52,6 +52,7 @@
5252
"node-gyp": "^6.1.0",
5353
"prettier": "2.3.1",
5454
"pretty-checkbox-vue": "^1.1.9",
55+
"sanitize-filename": "^1.6.3",
5556
"sass": "^1.49.9",
5657
"sass-loader": "^8.0.2",
5758
"vite": "^4.0.4",

Diff for: postcss.config.js

100644100755
File mode changed.

Diff for: public/favicon.ico

100644100755
File mode changed.

Diff for: public/vue-table.png

100644100755
File mode changed.

Diff for: public/vue.pdn

100644100755
File mode changed.

Diff for: run-build.sh

100644100755
File mode changed.

Diff for: run-eslint.sh

100644100755
File mode changed.

Diff for: run-pack.sh

100644100755
File mode changed.

Diff for: run-start.sh

100644100755
File mode changed.

Diff for: src/App.vue

100644100755
File mode changed.

Diff for: src/assets/banner.png

100644100755
File mode changed.

Diff for: src/components/VueQuintable.vue

100644100755
+98-17
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
offset: 5,
250250
}"
251251
:style="hiddenColumns[rIndex] > 0 ? 'cursor:pointer;' : ''"
252-
:ref="'row-highlighted-on-hover-' + rIndex"
252+
:ref="'row-highlighted-' + rIndex"
253253
:key="
254254
'vue-quintable-' +
255255
uuid +
@@ -462,7 +462,7 @@
462462
<tr
463463
@mouseenter="onMouseenterRow(rIndex)"
464464
@click="onRowClick($event, rIndex)"
465-
:ref="'generated-row-highlighted-on-hover-' + rIndex"
465+
:ref="'generated-row-highlighted-' + rIndex"
466466
:key="
467467
'generated-row-' +
468468
rIndex +
@@ -489,7 +489,10 @@
489489
>
490490
<td :colspan="configFinal.number + 1" class="ps-0 pe-0 pt-0">
491491
<div
492-
:class="hoveredRow === rIndex ? configFinal.hoverClass : ''"
492+
:class="{
493+
[configFinal.hoverClass]: hoveredRow === rIndex,
494+
[configFinal.activeClass]: activeRow === rIndex,
495+
}"
493496
>
494497
<table
495498
class="
@@ -653,8 +656,10 @@
653656
:name="'generated-cell-content'"
654657
>
655658
<div
656-
class="cell-inner"
657-
:class="'quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--formatted-html'"
659+
class="
660+
cell-inner
661+
quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--formatted-html
662+
"
658663
v-if="
659664
configFinal.columns[cIndex]
660665
.cellFormatter &&
@@ -664,23 +669,29 @@
664669
v-html="cellFormatters(cIndex, cell).value"
665670
></div>
666671
<div
667-
class="cell-inner"
668-
:class="'quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--formatted-value'"
672+
class="
673+
cell-inner
674+
quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--formatted-value
675+
"
669676
v-else-if="
670677
configFinal.columns[cIndex].cellFormatter
671678
"
672679
>
673680
{{ cellFormatters(cIndex, cell).value }}
674681
</div>
675682
<div
676-
class="cell-inner"
677-
:class="'quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--html'"
683+
class="
684+
cell-inner
685+
quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--html
686+
"
678687
v-else-if="valueToString(cell.html)"
679688
v-html="cell.html"
680689
></div>
681690
<div
682-
class="cell-inner"
683-
:class="'quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--component'"
691+
class="
692+
cell-inner
693+
quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--component
694+
"
684695
v-else-if="cell.component"
685696
>
686697
<component
@@ -690,8 +701,10 @@
690701
></component>
691702
</div>
692703
<div
693-
class="cell-inner"
694-
:class="'quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--text'"
704+
class="
705+
cell-inner
706+
quintable--table-container--table--tbody--generated-row--generated-table--generated-row-cell--generated-cell--cell-inner--text
707+
"
695708
v-else-if="valueToString(cell.text)"
696709
>
697710
{{ cell.text }}
@@ -1324,6 +1337,7 @@ export default {
13241337
},
13251338
},
13261339
storedState: {},
1340+
activeRow: null,
13271341
};
13281342
},
13291343
@@ -1394,6 +1408,13 @@ export default {
13941408
hoverClass = this.config.hoverClass;
13951409
}
13961410
1411+
let activeClass = "bg-muted";
1412+
if (this.config.activeClass === false) {
1413+
activeClass = "";
1414+
} else if (this.config.activeClass && this.config.activeClass !== true) {
1415+
activeClass = this.config.activeClass;
1416+
}
1417+
13971418
let multiSort = false;
13981419
if (this.config.multiSort) {
13991420
multiSort = true;
@@ -1443,6 +1464,11 @@ export default {
14431464
rowsSelect = true;
14441465
}
14451466
1467+
let keepSelect = false;
1468+
if (this.config.keepSelect) {
1469+
keepSelect = true;
1470+
}
1471+
14461472
let disallowAllOption = false;
14471473
if (this.config.disallowAllOption) {
14481474
disallowAllOption = true;
@@ -1555,6 +1581,11 @@ export default {
15551581
hideRowToggle = true;
15561582
}
15571583
1584+
let enableRowTabIndex = false;
1585+
if (this.config.enableRowTabIndex) {
1586+
enableRowTabIndex = true;
1587+
}
1588+
15581589
let expandedRowIcon = "chevron-up";
15591590
if (
15601591
this.config.expandedRowIcon &&
@@ -1695,6 +1726,7 @@ export default {
16951726
filterGroupRelation: filterGroupRelation,
16961727
filterRelation: filterRelation,
16971728
rowsSelect: rowsSelect,
1729+
keepSelect: keepSelect,
16981730
disallowAllOption: disallowAllOption,
16991731
defaultSelected: defaultSelected,
17001732
searchLength: searchLength,
@@ -1719,12 +1751,14 @@ export default {
17191751
selectAll: selectAll,
17201752
selectAllRows: selectAllRows,
17211753
hoverClass: hoverClass,
1754+
activeClass: activeClass,
17221755
expandedAll: expandedAll,
17231756
pageRange: pageRange,
17241757
prettySelect: prettySelect,
17251758
number: number,
17261759
columns: columns,
17271760
hideRowToggle: hideRowToggle,
1761+
enableRowTabIndex: enableRowTabIndex,
17281762
expandedRowIcon: expandedRowIcon,
17291763
collapsedRowIcon: collapsedRowIcon,
17301764
selectPosition: selectPosition,
@@ -2536,6 +2570,10 @@ export default {
25362570
rowClasses.push(this.configFinal.hoverClass);
25372571
}
25382572
2573+
if (this.activeRow === rIndex) {
2574+
rowClasses.push(this.configFinal.activeClass);
2575+
}
2576+
25392577
if (this.openRows[rIndex]) {
25402578
rowClasses.push("row-expanded");
25412579
}
@@ -2691,7 +2729,7 @@ export default {
26912729
26922730
if (this.currentPage !== 1) {
26932731
this.currentPage = 1;
2694-
} else {
2732+
} else if (!this.configFinal.keepSelect) {
26952733
this.resetSelect("filteredRows watcher");
26962734
}
26972735
@@ -2977,6 +3015,9 @@ export default {
29773015
}
29783016
},
29793017
},
3018+
activeRow(val) {
3019+
this.$emit("click:row", this.rowsFinal[val], "active:row");
3020+
},
29803021
},
29813022
methods: {
29823023
/**
@@ -3240,10 +3281,16 @@ export default {
32403281
"collapse:row"
32413282
);
32423283
}
3243-
32443284
this.generatedUpdatedKey = Date.now();
32453285
}
32463286
3287+
if (this.configFinal.enableRowTabIndex) {
3288+
if (this.activeRow === i) {
3289+
this.activeRow = null;
3290+
} else {
3291+
this.activeRow = i;
3292+
}
3293+
}
32473294
this.$emit("click:row", this.rowsFinal[i], "click:row", e.target, e);
32483295
},
32493296
@@ -3925,7 +3972,12 @@ export default {
39253972
this.currentPage = 1;
39263973
}
39273974
3928-
if (!this.configFinal.selectAllRows && !this.pageSort && !preventReset) {
3975+
if (
3976+
!this.configFinal.selectAllRows &&
3977+
!this.pageSort &&
3978+
!preventReset &&
3979+
!this.configFinal.keepSelect
3980+
) {
39293981
this.resetSelect("sort method");
39303982
}
39313983
@@ -4009,7 +4061,8 @@ export default {
40094061
/**
40104062
* Load new rows via ajax including filters, search query and pagination
40114063
*
4012-
* @param clear
4064+
* @param clearSortAndPage
4065+
* @param clearSelected
40134066
* @param accessor
40144067
*/
40154068
loadViaAjax(
@@ -4070,6 +4123,7 @@ export default {
40704123
filters: this.filtersFinal,
40714124
perPage: this.currentRowsPerPage,
40724125
page: this.currentPage,
4126+
hiddenColumns: this.configFinal.hiddenCols,
40734127
sort:
40744128
this.numberOfSorts > 0
40754129
? {
@@ -4227,6 +4281,26 @@ export default {
42274281
}
42284282
}
42294283
},
4284+
checkKey(event) {
4285+
if (this.activeRow === null) {
4286+
return;
4287+
}
4288+
event.preventDefault();
4289+
if (event.keyCode === 40) {
4290+
if (this.activeRow === this.rowsFinal.length - 1) {
4291+
this.activeRow = 0;
4292+
} else {
4293+
this.activeRow++;
4294+
}
4295+
}
4296+
if (event.keyCode === 38) {
4297+
if (this.activeRow === 0) {
4298+
this.activeRow = this.rowsFinal.length - 1;
4299+
} else {
4300+
this.activeRow--;
4301+
}
4302+
}
4303+
},
42304304
},
42314305
created() {
42324306
if (this.configFinal.storeState) {
@@ -4340,6 +4414,10 @@ export default {
43404414
});
43414415
}
43424416
this.$nextTick(this.checkStoredSelectedRows);
4417+
4418+
if (this.configFinal.enableRowTabIndex) {
4419+
document.addEventListener("keydown", this.checkKey);
4420+
}
43434421
},
43444422
mounted() {
43454423
if (this.configFinal.ajaxUrl) {
@@ -4358,6 +4436,9 @@ export default {
43584436
beforeDestroy() {
43594437
//release listener from window resize
43604438
window.removeEventListener("resize", this.breakpointListener);
4439+
if (this.configFinal.enableRowTabIndex) {
4440+
document.removeEventListener("keydown", this.checkKey);
4441+
}
43614442
},
43624443
};
43634444
</script>

Diff for: src/examples/AddRemoveExample.vue

100644100755
File mode changed.

Diff for: src/examples/AjaxExample.vue

100644100755
File mode changed.

Diff for: src/examples/AjaxLoadedExample.vue

100644100755
File mode changed.

Diff for: src/examples/AjaxSelectExample.vue

100644100755
File mode changed.

Diff for: src/examples/AjaxStoreStateExample.vue

100644100755
File mode changed.

Diff for: src/examples/BasicExample.vue

100644100755
+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export default {
143143
headline: "Job",
144144
},
145145
],
146+
enableRowTabIndex: true,
146147
},
147148
148149
rows: [

Diff for: src/examples/BindedExample.vue

100644100755
File mode changed.

Diff for: src/examples/BreakpointsAdvancedExample.vue

100644100755
File mode changed.

Diff for: src/examples/BreakpointsExample.vue

100644100755
File mode changed.

Diff for: src/examples/ComponentsExample.vue

100644100755
File mode changed.

Diff for: src/examples/ComputedRowsExample.vue

100644100755
File mode changed.

Diff for: src/examples/EventsExample.vue

100644100755
File mode changed.

Diff for: src/examples/FiltersExample.vue

100644100755
File mode changed.

Diff for: src/examples/FormatterExample.vue

100644100755
File mode changed.

Diff for: src/examples/HiddenExample.vue

100644100755
File mode changed.

Diff for: src/examples/NestedExample.vue

100644100755
File mode changed.

Diff for: src/examples/PaginationExample.vue

100644100755
File mode changed.

Diff for: src/examples/SelectExample.vue

100644100755
File mode changed.

Diff for: src/examples/SlotsExample.vue

100644100755
File mode changed.

Diff for: src/examples/SortExample.vue

100644100755
File mode changed.

Diff for: src/examples/StoreStateExample.vue

100644100755
File mode changed.

Diff for: src/examples/TooltipsExample.vue

100644100755
File mode changed.

Diff for: src/examples/components/ActionsComponent.vue

100644100755
File mode changed.

Diff for: src/examples/components/CheckboxComponent.vue

100644100755
File mode changed.

Diff for: src/examples/components/DragComponent.vue

100644100755
File mode changed.

Diff for: src/index.js

100644100755
File mode changed.

Diff for: src/main.js

100644100755
File mode changed.

Diff for: src/plugins/bootstrap-vue.js

100644100755
File mode changed.

Diff for: vite.build.config.js

100644100755
File mode changed.

Diff for: vite.pack.config.js

100644100755
File mode changed.

Diff for: yarn.lock

100644100755
-5
Original file line numberDiff line numberDiff line change
@@ -1890,11 +1890,6 @@ popper.js@^1.16.1:
18901890
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
18911891
integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==
18921892

1893-
1894-
version "2.1.7"
1895-
resolved "https://registry.yarnpkg.com/portal-vue/-/portal-vue-2.1.7.tgz#ea08069b25b640ca08a5b86f67c612f15f4e4ad4"
1896-
integrity sha512-+yCno2oB3xA7irTt0EU5Ezw22L2J51uKAacE/6hMPMoO/mx3h4rXFkkBkT4GFsMDv/vEe8TNKC3ujJJ0PTwb6g==
1897-
18981893
postcss-selector-parser@^6.0.9:
18991894
version "6.0.11"
19001895
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc"

0 commit comments

Comments
 (0)