Skip to content

Commit 458b397

Browse files
Version 2.3.29
1 parent ab0fc12 commit 458b397

10 files changed

+393
-360
lines changed

dist/vue-quintable.css

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

dist/vue-quintable.es.js

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

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.

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.

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.

pack.js

+12-16
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
const { spawn, execSync } = require('child_process');
2-
const exec = commands => {
3-
execSync(commands, { stdio: 'inherit', shell: true });
1+
const { execSync } = require("child_process");
2+
const exec = (commands) => {
3+
execSync(commands, { stdio: "inherit", shell: true });
44
};
5-
const spawnProcess = commands => {
6-
spawn(commands, { stdio: 'inherit', shell: true });
7-
};
8-
9-
const readline = require('readline');
5+
const readline = require("readline");
106

117
const rl = readline.createInterface({
128
input: process.stdin,
13-
output: process.stdout
9+
output: process.stdout,
1410
});
1511

16-
const defaultDest = "dist"
12+
const defaultDest = "dist";
1713

1814
rl.question(`DESTINATION (${defaultDest}):`, (dir) => {
19-
20-
if(!dir){
21-
dir=defaultDest;
15+
if (!dir) {
16+
dir = defaultDest;
2217
}
23-
24-
exec(`set BUILD_DEST_DIRECTORY=${dir} && vite build --config vite.pack.config.js`);
18+
exec(
19+
`cross-env BUILD_DEST_DIRECTORY="${dir}" vite build --config vite.pack.config.js`
20+
);
2521
rl.close();
26-
});
22+
});

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@sensetence/vue-quintable",
3-
"version": "2.3.26",
3+
"version": "2.3.29",
44
"private": false,
55
"scripts": {
66
"dev": "vite --config vite.build.config.js",
77
"build": "vite build --config vite.build.config.js",
88
"prod-local": "vite build --config vite.pack.config.js",
9-
"prod": "node pack.js",
9+
"prod": "node ./pack.js",
1010
"preview": "vite preview"
1111
},
1212
"main": "./dist/vue-quintable.umd.js",

src/components/VueQuintable.vue

+43-12
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,17 @@
433433
"
434434
:class="{ 'disabled-select': rowsFinal[rIndex].disableSelect }"
435435
>
436-
<template v-if="!rowsFinal[rIndex].disableSelect">
436+
<template
437+
v-if="
438+
!rowsFinal[rIndex].disableSelect ||
439+
rowsFinal[rIndex].showDisabledSelect
440+
"
441+
>
437442
<p-check
438443
v-if="configFinal.prettySelect"
439444
name="check"
440445
class="p-icon"
446+
:disabled="rowsFinal[rIndex].disableSelect"
441447
v-model="selected[rIndex]"
442448
@change="checkListener($event, rIndex)"
443449
>
@@ -454,6 +460,7 @@
454460
<input
455461
type="checkbox"
456462
v-model="selected[rIndex]"
463+
:disabled="rowsFinal[rIndex].disableSelect"
457464
@change="checkListener($event, rIndex)"
458465
/>
459466
</label>
@@ -2648,7 +2655,10 @@ export default {
26482655
26492656
for (let j = 0; j < indexes.length; j++) {
26502657
const index = indexes[j];
2651-
if (this.rowsFinal[index][key] === value) {
2658+
if (
2659+
!this.rowsFinal[index].disableSelect &&
2660+
this.rowsFinal[index][key] === value
2661+
) {
26522662
this.$set(this.selected, index, true);
26532663
counter++;
26542664
}
@@ -2657,9 +2667,17 @@ export default {
26572667
26582668
if (!this.configFinal.selectAllRows) {
26592669
this.allSelectedCustom =
2660-
counter && counter === this.visibleRows.filter((x) => x).length;
2670+
counter &&
2671+
counter ===
2672+
this.rowsFinal.filter(
2673+
(x, index) =>
2674+
!x.disableSelect &&
2675+
this.visibleRows[this.sortedIndexes[index]]
2676+
).length;
26612677
} else {
2662-
this.allSelectedCustom = counter && counter === this.rowsFinal.length;
2678+
this.allSelectedCustom =
2679+
counter &&
2680+
counter === this.rowsFinal.filter((x) => !x.disableSelect).length;
26632681
}
26642682
} else {
26652683
this.allSelectedCustom = false;
@@ -3428,10 +3446,11 @@ export default {
34283446
if (Object.prototype.hasOwnProperty.call(this.sortedIndexes, index)) {
34293447
index = parseInt(index);
34303448
if (
3431-
(!this.configFinal.selectAllRows &&
3449+
!this.rowsFinal[this.sortedIndexes[index]].disableSelect &&
3450+
((!this.configFinal.selectAllRows &&
34323451
this.visibleRows[this.sortedIndexes[index]]) ||
3433-
(this.configFinal.selectAllRows &&
3434-
this.filteredRows[this.sortedIndexes[index]])
3452+
(this.configFinal.selectAllRows &&
3453+
this.filteredRows[this.sortedIndexes[index]]))
34353454
) {
34363455
this.$set(this.selected, this.sortedIndexes[index], value);
34373456
counter++;
@@ -3444,9 +3463,17 @@ export default {
34443463
if (value) {
34453464
if (!this.configFinal.selectAllRows) {
34463465
this.allSelectedCustom =
3447-
counter && counter === this.visibleRows.filter((x) => x).length;
3466+
counter &&
3467+
counter ===
3468+
this.rowsFinal.filter(
3469+
(x, index) =>
3470+
!x.disableSelect &&
3471+
this.visibleRows[this.sortedIndexes[index]]
3472+
).length;
34483473
} else {
3449-
this.allSelectedCustom = counter && counter === this.rowsFinal.length;
3474+
this.allSelectedCustom =
3475+
counter &&
3476+
counter === this.rowsFinal.filter((x) => !x.disableSelect).length;
34503477
}
34513478
}
34523479
},
@@ -4407,21 +4434,25 @@ export default {
44074434
if (row.selected) {
44084435
this.$set(this.selected, i, true);
44094436
}
4410-
if (row.selected || row.disableSelect) {
4437+
if (row.selected) {
44114438
counter++;
44124439
}
44134440
}
44144441
44154442
if (
44164443
!this.configFinal.selectAllRows &&
44174444
counter &&
4418-
counter === this.visibleRows.filter((x) => x).length
4445+
counter ===
4446+
this.rowsFinal.filter(
4447+
(x, index) =>
4448+
!x.disableSelect && this.visibleRows[this.sortedIndexes[index]]
4449+
).length
44194450
) {
44204451
this.allSelectedCustom = true;
44214452
} else if (
44224453
this.configFinal.selectAllRows &&
44234454
counter &&
4424-
counter === this.rowsFinal.length
4455+
counter === this.rowsFinal.filter((x) => !x.disableSelect).length
44254456
) {
44264457
this.allSelectedCustom = true;
44274458
}

src/examples/AddRemoveExample.vue

-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ export default {
684684
},
685685
686686
componentListener(data) {
687-
console.log(data);
688687
if (data.type === "delete-row") {
689688
this.rows.splice(data.index, 1);
690689
this.rowCount--;

vite.pack.config.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ import sanitize from "sanitize-filename";
1010

1111
let outDir = resolve(__dirname, "dist");
1212

13-
14-
if(process.env.BUILD_DEST_DIRECTORY){
13+
if (process.env.BUILD_DEST_DIRECTORY) {
1514
const absolute = isAbsolute(process.env.BUILD_DEST_DIRECTORY);
1615
const arr = process.env.BUILD_DEST_DIRECTORY.split(sep);
17-
outDir = arr.map((s, index)=>{
18-
if(absolute && index === 0 || s === '.'|| s === '..'){
19-
return s;
20-
}
21-
return sanitize(s)
22-
}).join(sep);
16+
outDir = arr
17+
.map((s, index) => {
18+
if ((absolute && index === 0) || s === "." || s === "..") {
19+
return s;
20+
}
21+
return sanitize(s);
22+
})
23+
.join(sep);
2324

24-
if(!absolute){
25+
if (!absolute) {
2526
outDir = resolve(__dirname, outDir);
2627
}
2728
}

0 commit comments

Comments
 (0)