@amsom-habitat/amsom-table 3.0.2 → 3.0.3
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/amsom-table.js +64 -54
- package/dist/amsom-table.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/amsom-table.js
CHANGED
|
@@ -11028,7 +11028,8 @@ const md = {
|
|
|
11028
11028
|
"changeSubject",
|
|
11029
11029
|
"lineEditModeAddNewLine",
|
|
11030
11030
|
"update:ckSelectedItems",
|
|
11031
|
-
"update:dynamicColumns"
|
|
11031
|
+
"update:dynamicColumns",
|
|
11032
|
+
"update:deepSortsListPreset"
|
|
11032
11033
|
],
|
|
11033
11034
|
data() {
|
|
11034
11035
|
return {
|
|
@@ -11133,8 +11134,17 @@ const md = {
|
|
|
11133
11134
|
showeditems: function() {
|
|
11134
11135
|
this.checkAllCheckBox = this.showeditems.every((M) => this.selectedItems.includes(M.id)), this.totalPages = this.newTotalPage(this.filtereditems.length);
|
|
11135
11136
|
},
|
|
11136
|
-
|
|
11137
|
-
|
|
11137
|
+
deepSortsList: {
|
|
11138
|
+
handler(M) {
|
|
11139
|
+
M && M.length > 0 && this.$emit("update:deepSortsListPreset", M);
|
|
11140
|
+
},
|
|
11141
|
+
deep: !0
|
|
11142
|
+
},
|
|
11143
|
+
deepSortsListPreset: {
|
|
11144
|
+
handler(M) {
|
|
11145
|
+
M && M.length > 0 && (this.deepSortsList = M);
|
|
11146
|
+
},
|
|
11147
|
+
deep: !0
|
|
11138
11148
|
}
|
|
11139
11149
|
},
|
|
11140
11150
|
mounted() {
|
|
@@ -11278,39 +11288,39 @@ const md = {
|
|
|
11278
11288
|
key: 0,
|
|
11279
11289
|
class: "btn btn-sm btn-outline-secondary cursor-default align-self-center bg-transparent text-secondary border-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1",
|
|
11280
11290
|
style: { height: "20px" }
|
|
11281
|
-
}, gd = { class: "d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none" },
|
|
11291
|
+
}, gd = { class: "text-nowrap" }, yd = { class: "d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none" }, Td = {
|
|
11282
11292
|
key: 0,
|
|
11283
11293
|
class: "text-nowrap",
|
|
11284
11294
|
style: { height: "20px" }
|
|
11285
|
-
},
|
|
11295
|
+
}, vd = ["value"], _d = {
|
|
11286
11296
|
key: 1,
|
|
11287
11297
|
class: "d-flex align-items-center text-nowrap"
|
|
11288
|
-
},
|
|
11298
|
+
}, Sd = {
|
|
11289
11299
|
key: 0,
|
|
11290
11300
|
class: "d-flex ms-2"
|
|
11291
|
-
},
|
|
11301
|
+
}, wd = { class: "row mx-auto mb-3 rounded-0" }, kd = {
|
|
11292
11302
|
class: "col-12 p-0 overflow-x-auto",
|
|
11293
11303
|
style: { "border-radius": "10px !important" }
|
|
11294
|
-
},
|
|
11304
|
+
}, Dd = ["id"], Ed = ["id", "onDragstart", "onDragend"], Cd = { class: "d-flex flex-column align-items-center" }, Pd = {
|
|
11295
11305
|
key: 0,
|
|
11296
11306
|
class: "mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"
|
|
11297
|
-
},
|
|
11307
|
+
}, xd = { class: "d-inline-flex text-nowrap" }, Id = {
|
|
11298
11308
|
key: 0,
|
|
11299
11309
|
class: "ms-2 float-end"
|
|
11300
|
-
},
|
|
11310
|
+
}, Yd = {
|
|
11301
11311
|
key: 1,
|
|
11302
11312
|
class: "ms-2"
|
|
11303
|
-
},
|
|
11313
|
+
}, Fd = { key: 1 }, Ud = ["id"], Hd = ["id"], jd = { class: "d-inline-flex text-nowrap" }, Gd = {
|
|
11304
11314
|
key: 0,
|
|
11305
11315
|
class: "ms-2 float-end hoverable"
|
|
11306
|
-
},
|
|
11316
|
+
}, Vd = {
|
|
11307
11317
|
key: 1,
|
|
11308
11318
|
class: "ms-2 hoverable"
|
|
11309
|
-
},
|
|
11319
|
+
}, Kd = { key: 0 }, Qd = ["colspan"], Jd = ["onClick"], Zd = ["data-column-id", "onClick"], $d = ["id", "value"], MW = ["data-column-id"], bW = { class: "row ms-auto mb-2" }, zW = {
|
|
11310
11320
|
key: 0,
|
|
11311
11321
|
class: "col p-0"
|
|
11312
|
-
},
|
|
11313
|
-
function
|
|
11322
|
+
}, pW = { class: "m-0 pagination pagination-sm" }, OW = { class: "page-item hoverable" }, oW = { class: "page-item hoverable" }, cW = ["onClick"], eW = { class: "page-item hoverable" }, tW = { class: "page-item hoverable" };
|
|
11323
|
+
function AW(M, b, z, p, o, e) {
|
|
11314
11324
|
var q;
|
|
11315
11325
|
const n = sp("font-awesome-icon"), r = sp("vue-draggable-next");
|
|
11316
11326
|
return H(), V(d1, null, [
|
|
@@ -11335,7 +11345,7 @@ function tW(M, b, z, p, o, e) {
|
|
|
11335
11345
|
])
|
|
11336
11346
|
}, [
|
|
11337
11347
|
z.showLineNumber ? (H(), V("div", Xd, [
|
|
11338
|
-
p0("b",
|
|
11348
|
+
p0("b", gd, Lb(e.showItemsLinesNumber + " / " + e.filtereditems.length), 1),
|
|
11339
11349
|
b[19] || (b[19] = p0("span", { class: "ms-1" }, "lignes", -1))
|
|
11340
11350
|
])) : F0("", !0),
|
|
11341
11351
|
z.deepSorts && o.deepSortsList.length > 0 ? (H(), V("div", {
|
|
@@ -11362,7 +11372,7 @@ function tW(M, b, z, p, o, e) {
|
|
|
11362
11372
|
icon: "fa-solid fa-xmark",
|
|
11363
11373
|
onClick: (f) => o.deepSortsList.splice(W, 1)
|
|
11364
11374
|
}, null, 8, ["onClick"]),
|
|
11365
|
-
p0("div",
|
|
11375
|
+
p0("div", yd, [
|
|
11366
11376
|
p0("span", null, Lb(i.libelle), 1)
|
|
11367
11377
|
]),
|
|
11368
11378
|
q2(n, {
|
|
@@ -11379,11 +11389,11 @@ function tW(M, b, z, p, o, e) {
|
|
|
11379
11389
|
z.showMaxItemPerPageBtn || z.showModifyColumnsBtn ? (H(), V("div", {
|
|
11380
11390
|
key: 0,
|
|
11381
11391
|
class: P0([
|
|
11382
|
-
"d-flex justify-content-end p-0",
|
|
11392
|
+
"d-flex align-items-center justify-content-end p-0",
|
|
11383
11393
|
z.deepSorts && o.deepSortsList.length > 0 ? "col-12 col-sm-4 col-lg-2 mt-1 mt-sm-0" : "col"
|
|
11384
11394
|
])
|
|
11385
11395
|
}, [
|
|
11386
|
-
z.showMaxItemPerPageBtn && !o.headerEditMode ? (H(), V("div",
|
|
11396
|
+
z.showMaxItemPerPageBtn && !o.headerEditMode ? (H(), V("div", Td, [
|
|
11387
11397
|
z.maxItemPerPageList.length > 0 ? mb((H(), V("select", {
|
|
11388
11398
|
key: 0,
|
|
11389
11399
|
"onUpdate:modelValue": b[2] || (b[2] = (i) => o.maxItemsPerPage = i),
|
|
@@ -11392,13 +11402,13 @@ function tW(M, b, z, p, o, e) {
|
|
|
11392
11402
|
(H(!0), V(d1, null, y2(z.maxItemPerPageList, (i) => (H(), V("option", {
|
|
11393
11403
|
key: i.value,
|
|
11394
11404
|
value: i.value
|
|
11395
|
-
}, Lb(i.text), 9,
|
|
11405
|
+
}, Lb(i.text), 9, vd))), 128))
|
|
11396
11406
|
], 512)), [
|
|
11397
11407
|
[Hn, o.maxItemsPerPage]
|
|
11398
11408
|
]) : F0("", !0)
|
|
11399
11409
|
])) : F0("", !0),
|
|
11400
|
-
z.showModifyColumnsBtn ? (H(), V("div",
|
|
11401
|
-
o.headerEditMode ? (H(), V("div",
|
|
11410
|
+
z.showModifyColumnsBtn ? (H(), V("div", _d, [
|
|
11411
|
+
o.headerEditMode ? (H(), V("div", Sd, [
|
|
11402
11412
|
p0("button", {
|
|
11403
11413
|
id: "btn-save-table",
|
|
11404
11414
|
class: "btn btn-sm btn-success d-flex justify-content-center align-items-center ms-auto me-2 px-2 py-0 rounded-3",
|
|
@@ -11422,8 +11432,8 @@ function tW(M, b, z, p, o, e) {
|
|
|
11422
11432
|
])) : F0("", !0)
|
|
11423
11433
|
], 2)) : F0("", !0)
|
|
11424
11434
|
])) : F0("", !0),
|
|
11425
|
-
p0("div",
|
|
11426
|
-
p0("div",
|
|
11435
|
+
p0("div", wd, [
|
|
11436
|
+
p0("div", kd, [
|
|
11427
11437
|
(H(), V("table", {
|
|
11428
11438
|
id: "table-draggable",
|
|
11429
11439
|
ref: "table",
|
|
@@ -11469,7 +11479,7 @@ function tW(M, b, z, p, o, e) {
|
|
|
11469
11479
|
}, null, 512), [
|
|
11470
11480
|
[jz, o.checkAllCheckBox]
|
|
11471
11481
|
])
|
|
11472
|
-
], 10,
|
|
11482
|
+
], 10, Dd)) : (i.show || o.headerEditMode) && (!i.onlyOnEditMode || z.lineEditMode) ? (H(), V("th", {
|
|
11473
11483
|
key: 1,
|
|
11474
11484
|
id: i.id + "-th-" + W,
|
|
11475
11485
|
scope: "col",
|
|
@@ -11485,8 +11495,8 @@ function tW(M, b, z, p, o, e) {
|
|
|
11485
11495
|
onDragstart: (f) => i.isDragging = !0,
|
|
11486
11496
|
onDragend: (f) => i.isDragging = !1
|
|
11487
11497
|
}, [
|
|
11488
|
-
p0("div",
|
|
11489
|
-
o.headerEditMode && !i.keepShow ? (H(), V("div",
|
|
11498
|
+
p0("div", Cd, [
|
|
11499
|
+
o.headerEditMode && !i.keepShow ? (H(), V("div", Pd, [
|
|
11490
11500
|
i.show ? (H(), Hz(n, {
|
|
11491
11501
|
key: 0,
|
|
11492
11502
|
icon: "fa-solid fa-eye",
|
|
@@ -11499,15 +11509,15 @@ function tW(M, b, z, p, o, e) {
|
|
|
11499
11509
|
onClick: (f) => i.show = !0
|
|
11500
11510
|
}, null, 8, ["onClick"]))
|
|
11501
11511
|
])) : F0("", !0),
|
|
11502
|
-
p0("div",
|
|
11512
|
+
p0("div", xd, [
|
|
11503
11513
|
Gz(M.$slots, "tableHeaderTh", { headers: i }, void 0, !0),
|
|
11504
|
-
i.isSortable && !z.deepSorts ? (H(), V("div",
|
|
11514
|
+
i.isSortable && !z.deepSorts ? (H(), V("div", Id, [
|
|
11505
11515
|
q2(n, {
|
|
11506
11516
|
icon: o.sortKey !== i.id || o.sortKey === i.id && !o.sortAsc ? "fa-solid fa-arrow-down-wide-short" : "fa-solid fa-arrow-up-short-wide",
|
|
11507
11517
|
class: "hoverable",
|
|
11508
11518
|
onClick: (f) => e.updateCurrentSort(i)
|
|
11509
11519
|
}, null, 8, ["icon", "onClick"])
|
|
11510
|
-
])) : z.deepSorts && !o.deepSortsList.some((f) => f.id === i.id) && i.isSortable ? (H(), V("div",
|
|
11520
|
+
])) : z.deepSorts && !o.deepSortsList.some((f) => f.id === i.id) && i.isSortable ? (H(), V("div", Yd, [
|
|
11511
11521
|
q2(n, {
|
|
11512
11522
|
icon: "fa-solid fa-filter",
|
|
11513
11523
|
onClick: (f) => e.addDeepSort(i)
|
|
@@ -11515,11 +11525,11 @@ function tW(M, b, z, p, o, e) {
|
|
|
11515
11525
|
])) : F0("", !0)
|
|
11516
11526
|
])
|
|
11517
11527
|
])
|
|
11518
|
-
], 42,
|
|
11528
|
+
], 42, Ed)) : F0("", !0)
|
|
11519
11529
|
], 64))), 128))
|
|
11520
11530
|
]),
|
|
11521
11531
|
_: 3
|
|
11522
|
-
}, 8, ["modelValue", "ghost-class", "drag-class", "move"])) : (H(), V("tr",
|
|
11532
|
+
}, 8, ["modelValue", "ghost-class", "drag-class", "move"])) : (H(), V("tr", Fd, [
|
|
11523
11533
|
(H(!0), V(d1, null, y2(o.columns, (i, W) => (H(), V(d1, {
|
|
11524
11534
|
key: i.id
|
|
11525
11535
|
}, [
|
|
@@ -11543,7 +11553,7 @@ function tW(M, b, z, p, o, e) {
|
|
|
11543
11553
|
}, null, 512), [
|
|
11544
11554
|
[jz, o.checkAllCheckBox]
|
|
11545
11555
|
])
|
|
11546
|
-
], 10,
|
|
11556
|
+
], 10, Ud)) : i.show && (!i.onlyOnEditMode || z.lineEditMode) ? (H(), V("th", {
|
|
11547
11557
|
key: 1,
|
|
11548
11558
|
id: i.id + "-th-" + W,
|
|
11549
11559
|
scope: "col",
|
|
@@ -11554,32 +11564,32 @@ function tW(M, b, z, p, o, e) {
|
|
|
11554
11564
|
z.headerTextColor
|
|
11555
11565
|
]])
|
|
11556
11566
|
}, [
|
|
11557
|
-
p0("div",
|
|
11567
|
+
p0("div", jd, [
|
|
11558
11568
|
Gz(M.$slots, "tableHeaderTh", { headers: i }, void 0, !0),
|
|
11559
|
-
i.isSortable && !z.deepSorts ? (H(), V("div",
|
|
11569
|
+
i.isSortable && !z.deepSorts ? (H(), V("div", Gd, [
|
|
11560
11570
|
q2(n, {
|
|
11561
11571
|
icon: o.sortKey !== i.id || o.sortKey === i.id && !o.sortAsc ? "fa-solid fa-arrow-down-wide-short" : "fa-solid fa-arrow-up-short-wide",
|
|
11562
11572
|
onClick: (f) => e.updateCurrentSort(i)
|
|
11563
11573
|
}, null, 8, ["icon", "onClick"])
|
|
11564
|
-
])) : z.deepSorts && !o.deepSortsList.some((f) => f.id === i.id) && i.isSortable ? (H(), V("div",
|
|
11574
|
+
])) : z.deepSorts && !o.deepSortsList.some((f) => f.id === i.id) && i.isSortable ? (H(), V("div", Vd, [
|
|
11565
11575
|
q2(n, {
|
|
11566
11576
|
icon: "fa-solid fa-filter",
|
|
11567
11577
|
onClick: (f) => e.addDeepSort(i)
|
|
11568
11578
|
}, null, 8, ["onClick"])
|
|
11569
11579
|
])) : F0("", !0)
|
|
11570
11580
|
])
|
|
11571
|
-
], 10,
|
|
11581
|
+
], 10, Hd)) : F0("", !0)
|
|
11572
11582
|
], 64))), 128))
|
|
11573
11583
|
]))
|
|
11574
11584
|
]),
|
|
11575
11585
|
p0("tbody", null, [
|
|
11576
|
-
((q = e.showeditems) == null ? void 0 : q.length) === 0 ? (H(), V("tr",
|
|
11586
|
+
((q = e.showeditems) == null ? void 0 : q.length) === 0 ? (H(), V("tr", Kd, [
|
|
11577
11587
|
p0("th", {
|
|
11578
11588
|
colspan: o.columns.length,
|
|
11579
11589
|
class: "text-center"
|
|
11580
11590
|
}, b[21] || (b[21] = [
|
|
11581
11591
|
p0("span", { class: "text-danger fs-5" }, "Aucune valeur", -1)
|
|
11582
|
-
]), 8,
|
|
11592
|
+
]), 8, Qd)
|
|
11583
11593
|
])) : (H(!0), V(d1, { key: 1 }, y2(e.showeditems, (i, W) => (H(), V("tr", {
|
|
11584
11594
|
key: i.id,
|
|
11585
11595
|
class: P0({
|
|
@@ -11609,10 +11619,10 @@ function tW(M, b, z, p, o, e) {
|
|
|
11609
11619
|
value: i.id,
|
|
11610
11620
|
onClick: b[14] || (b[14] = Q2(() => {
|
|
11611
11621
|
}, ["stop"]))
|
|
11612
|
-
}, null, 8,
|
|
11622
|
+
}, null, 8, $d), [
|
|
11613
11623
|
[jz, o.selectedItems]
|
|
11614
11624
|
])
|
|
11615
|
-
], 10,
|
|
11625
|
+
], 10, Zd)) : (f.show || o.headerEditMode) && (!f.onlyOnEditMode || z.lineEditMode) ? (H(), V("td", {
|
|
11616
11626
|
key: 1,
|
|
11617
11627
|
"data-column-id": f.id,
|
|
11618
11628
|
class: P0([[
|
|
@@ -11627,23 +11637,23 @@ function tW(M, b, z, p, o, e) {
|
|
|
11627
11637
|
headers: f,
|
|
11628
11638
|
items: i
|
|
11629
11639
|
}, void 0, !0)
|
|
11630
|
-
], 10,
|
|
11640
|
+
], 10, MW)) : F0("", !0)
|
|
11631
11641
|
], 64))), 128))
|
|
11632
|
-
], 10,
|
|
11642
|
+
], 10, Jd))), 128))
|
|
11633
11643
|
])
|
|
11634
11644
|
], 6))
|
|
11635
11645
|
])
|
|
11636
11646
|
]),
|
|
11637
|
-
p0("div",
|
|
11638
|
-
o.totalPages && o.totalPages > 1 ? (H(), V("div",
|
|
11639
|
-
p0("ul",
|
|
11640
|
-
p0("li",
|
|
11647
|
+
p0("div", bW, [
|
|
11648
|
+
o.totalPages && o.totalPages > 1 ? (H(), V("div", zW, [
|
|
11649
|
+
p0("ul", pW, [
|
|
11650
|
+
p0("li", OW, [
|
|
11641
11651
|
p0("a", {
|
|
11642
11652
|
class: P0(["page-link", { disabled: o.currentPage === 1 }]),
|
|
11643
11653
|
onClick: b[15] || (b[15] = (i) => o.currentPage = 1)
|
|
11644
11654
|
}, " « ", 2)
|
|
11645
11655
|
]),
|
|
11646
|
-
p0("li",
|
|
11656
|
+
p0("li", oW, [
|
|
11647
11657
|
p0("a", {
|
|
11648
11658
|
class: P0(["page-link", { disabled: o.currentPage === 1 }]),
|
|
11649
11659
|
onClick: b[16] || (b[16] = (i) => o.currentPage -= 1)
|
|
@@ -11656,15 +11666,15 @@ function tW(M, b, z, p, o, e) {
|
|
|
11656
11666
|
p0("a", {
|
|
11657
11667
|
class: "page-link",
|
|
11658
11668
|
onClick: (W) => o.currentPage = i
|
|
11659
|
-
}, Lb(i), 9,
|
|
11669
|
+
}, Lb(i), 9, cW)
|
|
11660
11670
|
], 2))), 128)),
|
|
11661
|
-
p0("li",
|
|
11671
|
+
p0("li", eW, [
|
|
11662
11672
|
p0("a", {
|
|
11663
11673
|
class: P0(["page-link", { disabled: o.currentPage === o.totalPages }]),
|
|
11664
11674
|
onClick: b[17] || (b[17] = (i) => o.currentPage += 1)
|
|
11665
11675
|
}, " > ", 2)
|
|
11666
11676
|
]),
|
|
11667
|
-
p0("li",
|
|
11677
|
+
p0("li", tW, [
|
|
11668
11678
|
p0("a", {
|
|
11669
11679
|
class: P0(["page-link", { disabled: o.currentPage === o.totalPages }]),
|
|
11670
11680
|
onClick: b[18] || (b[18] = (i) => o.currentPage = o.totalPages)
|
|
@@ -11681,8 +11691,8 @@ function tW(M, b, z, p, o, e) {
|
|
|
11681
11691
|
])
|
|
11682
11692
|
], 64);
|
|
11683
11693
|
}
|
|
11684
|
-
const
|
|
11694
|
+
const aW = /* @__PURE__ */ Ld(md, [["render", AW], ["__scopeId", "data-v-cbb9c9fb"]]);
|
|
11685
11695
|
export {
|
|
11686
|
-
|
|
11687
|
-
|
|
11696
|
+
aW as AmsomTableDraggable,
|
|
11697
|
+
aW as default
|
|
11688
11698
|
};
|