Skip to content

Commit

Permalink
Version 2.3.29
Browse files Browse the repository at this point in the history
  • Loading branch information
krusche-sensetence committed Jun 25, 2024
1 parent ab0fc12 commit 458b397
Show file tree
Hide file tree
Showing 10 changed files with 393 additions and 360 deletions.
2 changes: 1 addition & 1 deletion dist/vue-quintable.css

Large diffs are not rendered by default.

626 changes: 316 additions & 310 deletions dist/vue-quintable.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-quintable.es.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/vue-quintable.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-quintable.umd.js.map

Large diffs are not rendered by default.

28 changes: 12 additions & 16 deletions pack.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
const { spawn, execSync } = require('child_process');
const exec = commands => {
execSync(commands, { stdio: 'inherit', shell: true });
const { execSync } = require("child_process");
const exec = (commands) => {
execSync(commands, { stdio: "inherit", shell: true });
};
const spawnProcess = commands => {
spawn(commands, { stdio: 'inherit', shell: true });
};

const readline = require('readline');
const readline = require("readline");

const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
output: process.stdout,
});

const defaultDest = "dist"
const defaultDest = "dist";

rl.question(`DESTINATION (${defaultDest}):`, (dir) => {

if(!dir){
dir=defaultDest;
if (!dir) {
dir = defaultDest;
}

exec(`set BUILD_DEST_DIRECTORY=${dir} && vite build --config vite.pack.config.js`);
exec(
`cross-env BUILD_DEST_DIRECTORY="${dir}" vite build --config vite.pack.config.js`
);
rl.close();
});
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@sensetence/vue-quintable",
"version": "2.3.26",
"version": "2.3.29",
"private": false,
"scripts": {
"dev": "vite --config vite.build.config.js",
"build": "vite build --config vite.build.config.js",
"prod-local": "vite build --config vite.pack.config.js",
"prod": "node pack.js",
"prod": "node ./pack.js",
"preview": "vite preview"
},
"main": "./dist/vue-quintable.umd.js",
Expand Down
55 changes: 43 additions & 12 deletions src/components/VueQuintable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,17 @@
"
:class="{ 'disabled-select': rowsFinal[rIndex].disableSelect }"
>
<template v-if="!rowsFinal[rIndex].disableSelect">
<template
v-if="
!rowsFinal[rIndex].disableSelect ||
rowsFinal[rIndex].showDisabledSelect
"
>
<p-check
v-if="configFinal.prettySelect"
name="check"
class="p-icon"
:disabled="rowsFinal[rIndex].disableSelect"
v-model="selected[rIndex]"
@change="checkListener($event, rIndex)"
>
Expand All @@ -454,6 +460,7 @@
<input
type="checkbox"
v-model="selected[rIndex]"
:disabled="rowsFinal[rIndex].disableSelect"
@change="checkListener($event, rIndex)"
/>
</label>
Expand Down Expand Up @@ -2648,7 +2655,10 @@ export default {
for (let j = 0; j < indexes.length; j++) {
const index = indexes[j];
if (this.rowsFinal[index][key] === value) {
if (
!this.rowsFinal[index].disableSelect &&
this.rowsFinal[index][key] === value
) {
this.$set(this.selected, index, true);
counter++;
}
Expand All @@ -2657,9 +2667,17 @@ export default {
if (!this.configFinal.selectAllRows) {
this.allSelectedCustom =
counter && counter === this.visibleRows.filter((x) => x).length;
counter &&
counter ===
this.rowsFinal.filter(
(x, index) =>
!x.disableSelect &&
this.visibleRows[this.sortedIndexes[index]]
).length;
} else {
this.allSelectedCustom = counter && counter === this.rowsFinal.length;
this.allSelectedCustom =
counter &&
counter === this.rowsFinal.filter((x) => !x.disableSelect).length;
}
} else {
this.allSelectedCustom = false;
Expand Down Expand Up @@ -3428,10 +3446,11 @@ export default {
if (Object.prototype.hasOwnProperty.call(this.sortedIndexes, index)) {
index = parseInt(index);
if (
(!this.configFinal.selectAllRows &&
!this.rowsFinal[this.sortedIndexes[index]].disableSelect &&
((!this.configFinal.selectAllRows &&
this.visibleRows[this.sortedIndexes[index]]) ||
(this.configFinal.selectAllRows &&
this.filteredRows[this.sortedIndexes[index]])
(this.configFinal.selectAllRows &&
this.filteredRows[this.sortedIndexes[index]]))
) {
this.$set(this.selected, this.sortedIndexes[index], value);
counter++;
Expand All @@ -3444,9 +3463,17 @@ export default {
if (value) {
if (!this.configFinal.selectAllRows) {
this.allSelectedCustom =
counter && counter === this.visibleRows.filter((x) => x).length;
counter &&
counter ===
this.rowsFinal.filter(
(x, index) =>
!x.disableSelect &&
this.visibleRows[this.sortedIndexes[index]]
).length;
} else {
this.allSelectedCustom = counter && counter === this.rowsFinal.length;
this.allSelectedCustom =
counter &&
counter === this.rowsFinal.filter((x) => !x.disableSelect).length;
}
}
},
Expand Down Expand Up @@ -4407,21 +4434,25 @@ export default {
if (row.selected) {
this.$set(this.selected, i, true);
}
if (row.selected || row.disableSelect) {
if (row.selected) {
counter++;
}
}
if (
!this.configFinal.selectAllRows &&
counter &&
counter === this.visibleRows.filter((x) => x).length
counter ===
this.rowsFinal.filter(
(x, index) =>
!x.disableSelect && this.visibleRows[this.sortedIndexes[index]]
).length
) {
this.allSelectedCustom = true;
} else if (
this.configFinal.selectAllRows &&
counter &&
counter === this.rowsFinal.length
counter === this.rowsFinal.filter((x) => !x.disableSelect).length
) {
this.allSelectedCustom = true;
}
Expand Down
1 change: 0 additions & 1 deletion src/examples/AddRemoveExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ export default {
},
componentListener(data) {
console.log(data);
if (data.type === "delete-row") {
this.rows.splice(data.index, 1);
this.rowCount--;
Expand Down
19 changes: 10 additions & 9 deletions vite.pack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ import sanitize from "sanitize-filename";

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


if(process.env.BUILD_DEST_DIRECTORY){
if (process.env.BUILD_DEST_DIRECTORY) {
const absolute = isAbsolute(process.env.BUILD_DEST_DIRECTORY);
const arr = process.env.BUILD_DEST_DIRECTORY.split(sep);
outDir = arr.map((s, index)=>{
if(absolute && index === 0 || s === '.'|| s === '..'){
return s;
}
return sanitize(s)
}).join(sep);
outDir = arr
.map((s, index) => {
if ((absolute && index === 0) || s === "." || s === "..") {
return s;
}
return sanitize(s);
})
.join(sep);

if(!absolute){
if (!absolute) {
outDir = resolve(__dirname, outDir);
}
}
Expand Down

0 comments on commit 458b397

Please sign in to comment.