classcard-ui 0.2.185 → 0.2.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classcard-ui.common.js +15 -39
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +15 -39
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CTable/CTable.vue +5 -16
- package/src/icons.js +2 -1
- package/src/stories/CTable.stories.js +3 -0
package/package.json
CHANGED
|
@@ -299,22 +299,11 @@ export default {
|
|
|
299
299
|
},
|
|
300
300
|
// array of rows after drag and drop
|
|
301
301
|
rearrange(oldIndex, newIndex) {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
const remainingItems = this.rows.filter((item, index) => index !== oldIndex);
|
|
308
|
-
|
|
309
|
-
const reorderedItems = [
|
|
310
|
-
...remainingItems.slice(0, newIndex),
|
|
311
|
-
movedItem,
|
|
312
|
-
...remainingItems.slice(newIndex),
|
|
313
|
-
];
|
|
314
|
-
reorderedItems.forEach(function (row, index) {
|
|
315
|
-
reorderedArray[index].newID = row.id;
|
|
316
|
-
});
|
|
317
|
-
return reorderedArray;
|
|
302
|
+
const data = [...this.rows];
|
|
303
|
+
data[oldIndex].sort_order = newIndex + 1;
|
|
304
|
+
data[newIndex].sort_order = oldIndex + 1;
|
|
305
|
+
data.sort((a, b) => (a.sort_order > b.sort_order) ? 1 : -1)
|
|
306
|
+
this.$emit('reordered', data);
|
|
318
307
|
},
|
|
319
308
|
// listing functions
|
|
320
309
|
sortChange(params) {
|
package/src/icons.js
CHANGED
|
@@ -99,6 +99,7 @@ export default {
|
|
|
99
99
|
'globe-alt-solid' : 'M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z',
|
|
100
100
|
'x-circle-solid': 'M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z',
|
|
101
101
|
'x-circle-outline': 'M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z',
|
|
102
|
-
'check-circle-outline':'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'
|
|
102
|
+
'check-circle-outline':'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
|
|
103
|
+
'play-solid':'M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z'
|
|
103
104
|
|
|
104
105
|
}
|
|
@@ -82,6 +82,7 @@ Default.args = {
|
|
|
82
82
|
},
|
|
83
83
|
crr: "0.00",
|
|
84
84
|
color: { name: "trash", type: "solid", class: "h-5 w-5" },
|
|
85
|
+
sort_order: 1,
|
|
85
86
|
},
|
|
86
87
|
{
|
|
87
88
|
type: "",
|
|
@@ -96,6 +97,7 @@ Default.args = {
|
|
|
96
97
|
},
|
|
97
98
|
crr: "9.56",
|
|
98
99
|
color: { name: "trash", type: "solid", class: "h-5 w-5" },
|
|
100
|
+
sort_order: 2,
|
|
99
101
|
},
|
|
100
102
|
{
|
|
101
103
|
type: "",
|
|
@@ -110,6 +112,7 @@ Default.args = {
|
|
|
110
112
|
},
|
|
111
113
|
crr: "3.28",
|
|
112
114
|
color: { name: "trash", type: "solid", class: "h-5 w-5" },
|
|
115
|
+
sort_order: 3,
|
|
113
116
|
},
|
|
114
117
|
],
|
|
115
118
|
pagination: true,
|