@fkui/vue-labs 6.19.0 → 6.19.1
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/cjs/index.cjs.js +67 -144
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/index.esm.js +69 -146
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +12 -2
- package/package.json +6 -6
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2718,11 +2718,11 @@ function stopEdit(element, reason) {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
return newCellTarget;
|
|
2720
2720
|
}
|
|
2721
|
-
const _hoisted_1$
|
|
2721
|
+
const _hoisted_1$7 = {
|
|
2722
2722
|
key: 0,
|
|
2723
2723
|
class: "table-ng__row"
|
|
2724
2724
|
};
|
|
2725
|
-
const _hoisted_2$
|
|
2725
|
+
const _hoisted_2$3 = {
|
|
2726
2726
|
key: 0,
|
|
2727
2727
|
tabindex: "-1",
|
|
2728
2728
|
class: "table-ng__column"
|
|
@@ -2766,7 +2766,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2766
2766
|
vue.provide("renderHeader", __props.renderHeader);
|
|
2767
2767
|
const toggleIcon = vue.computed(() => __props.isExpanded ? "arrow-down" : "arrow-right");
|
|
2768
2768
|
return (_ctx, _cache) => {
|
|
2769
|
-
return _ctx.renderHeader ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$
|
|
2769
|
+
return _ctx.renderHeader ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$7, [_ctx.isTreegrid ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_2$3)) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default")])) : (vue.openBlock(), vue.createElementBlock("tr", {
|
|
2770
2770
|
key: 1,
|
|
2771
2771
|
class: "table-ng__row",
|
|
2772
2772
|
"aria-level": _ctx.ariaLevel
|
|
@@ -2787,8 +2787,8 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2787
2787
|
};
|
|
2788
2788
|
}
|
|
2789
2789
|
});
|
|
2790
|
-
const _hoisted_1$
|
|
2791
|
-
const _hoisted_2$
|
|
2790
|
+
const _hoisted_1$6 = ["checked", "aria-label"];
|
|
2791
|
+
const _hoisted_2$2 = ["checked", "aria-label"];
|
|
2792
2792
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
2793
2793
|
__name: "ITableCheckbox",
|
|
2794
2794
|
props: {
|
|
@@ -2820,7 +2820,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2820
2820
|
"aria-label": _ctx.column.header,
|
|
2821
2821
|
tabindex: "-1",
|
|
2822
2822
|
onChange
|
|
2823
|
-
}, null, 40, _hoisted_1$
|
|
2823
|
+
}, null, 40, _hoisted_1$6)], 32)) : (vue.openBlock(), vue.createElementBlock("td", {
|
|
2824
2824
|
key: 1,
|
|
2825
2825
|
ref: "target",
|
|
2826
2826
|
tabindex: "-1",
|
|
@@ -2829,13 +2829,12 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2829
2829
|
}, [vue.createElementVNode("input", {
|
|
2830
2830
|
checked: _ctx.column.value(_ctx.row),
|
|
2831
2831
|
type: "checkbox",
|
|
2832
|
-
"aria-label": _ctx.column.header
|
|
2833
|
-
|
|
2834
|
-
}, null, 8, _hoisted_2$3)], 544));
|
|
2832
|
+
"aria-label": _ctx.column.header
|
|
2833
|
+
}, null, 8, _hoisted_2$2)], 544));
|
|
2835
2834
|
};
|
|
2836
2835
|
}
|
|
2837
2836
|
});
|
|
2838
|
-
const _hoisted_1$
|
|
2837
|
+
const _hoisted_1$5 = ["checked", "aria-label"];
|
|
2839
2838
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
2840
2839
|
__name: "ITableRadio",
|
|
2841
2840
|
props: {
|
|
@@ -2866,11 +2865,11 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2866
2865
|
"aria-label": _ctx.column.header,
|
|
2867
2866
|
tabindex: "-1",
|
|
2868
2867
|
onChange
|
|
2869
|
-
}, null, 40, _hoisted_1$
|
|
2868
|
+
}, null, 40, _hoisted_1$5)], 32);
|
|
2870
2869
|
};
|
|
2871
2870
|
}
|
|
2872
2871
|
});
|
|
2873
|
-
const _hoisted_1$
|
|
2872
|
+
const _hoisted_1$4 = ["href"];
|
|
2874
2873
|
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
2875
2874
|
__name: "ITableAnchor",
|
|
2876
2875
|
props: {
|
|
@@ -2900,7 +2899,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2900
2899
|
target: "_blank",
|
|
2901
2900
|
href: _ctx.column.href,
|
|
2902
2901
|
tabindex: "-1"
|
|
2903
|
-
}, vue.toDisplayString(_ctx.column.value(_ctx.row)), 9, _hoisted_1$
|
|
2902
|
+
}, vue.toDisplayString(_ctx.column.value(_ctx.row)), 9, _hoisted_1$4)], 32)) : (vue.openBlock(), vue.createElementBlock("td", {
|
|
2904
2903
|
key: 1,
|
|
2905
2904
|
ref: "target",
|
|
2906
2905
|
tabindex: "-1",
|
|
@@ -2910,7 +2909,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2910
2909
|
};
|
|
2911
2910
|
}
|
|
2912
2911
|
});
|
|
2913
|
-
const _hoisted_1$
|
|
2912
|
+
const _hoisted_1$3 = {
|
|
2914
2913
|
class: "sr-only"
|
|
2915
2914
|
};
|
|
2916
2915
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -2954,7 +2953,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2954
2953
|
}, [_ctx.column.icon ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FIcon), {
|
|
2955
2954
|
key: 0,
|
|
2956
2955
|
name: _ctx.column.icon
|
|
2957
|
-
}, null, 8, ["name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$
|
|
2956
|
+
}, null, 8, ["name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$3, vue.toDisplayString(_ctx.column.value(_ctx.row)), 1)], 512)], 32)) : (vue.openBlock(), vue.createElementBlock("td", {
|
|
2958
2957
|
key: 1,
|
|
2959
2958
|
ref: "td",
|
|
2960
2959
|
tabindex: "-1",
|
|
@@ -2974,7 +2973,7 @@ function useStartStopEdit() {
|
|
|
2974
2973
|
function isAlphanumeric(e) {
|
|
2975
2974
|
return e.key.length === 1 && !e.ctrlKey && !e.metaKey;
|
|
2976
2975
|
}
|
|
2977
|
-
const _hoisted_1$
|
|
2976
|
+
const _hoisted_1$2 = {
|
|
2978
2977
|
class: "table-ng__editable"
|
|
2979
2978
|
};
|
|
2980
2979
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -3130,7 +3129,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3130
3129
|
onClick: vue.withModifiers(onClickCell, ["stop"]),
|
|
3131
3130
|
onKeydown,
|
|
3132
3131
|
onTableActivateCell: onActivateCell
|
|
3133
|
-
}, [vue.createElementVNode("div", _hoisted_1$
|
|
3132
|
+
}, [vue.createElementVNode("div", _hoisted_1$2, [vue.createElementVNode("span", {
|
|
3134
3133
|
ref: "view",
|
|
3135
3134
|
class: "table-ng__editable__text"
|
|
3136
3135
|
}, vue.toDisplayString(_ctx.column.value(_ctx.row)), 513), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("input", {
|
|
@@ -3160,10 +3159,10 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3160
3159
|
};
|
|
3161
3160
|
}
|
|
3162
3161
|
});
|
|
3163
|
-
const _hoisted_1$
|
|
3162
|
+
const _hoisted_1$1 = {
|
|
3164
3163
|
class: "table-ng__editable"
|
|
3165
3164
|
};
|
|
3166
|
-
const _hoisted_2$
|
|
3165
|
+
const _hoisted_2$1 = {
|
|
3167
3166
|
class: "table-ng__editable__text"
|
|
3168
3167
|
};
|
|
3169
3168
|
const _hoisted_3$1 = ["aria-controls"];
|
|
@@ -3347,7 +3346,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3347
3346
|
onKeydown: onCellKeyDown,
|
|
3348
3347
|
onClick: vue.withModifiers(onCellClick, ["stop"]),
|
|
3349
3348
|
onTableActivateCell: onActivateCell
|
|
3350
|
-
}, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$
|
|
3349
|
+
}, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$1, [vue.createElementVNode("span", _hoisted_2$1, vue.toDisplayString(viewValue.value), 1), _cache[2] || (_cache[2] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FIcon), {
|
|
3351
3350
|
name: "pen",
|
|
3352
3351
|
class: "table-ng__editable__icon"
|
|
3353
3352
|
})], 512), [[vue.vShow, !editing.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
|
|
@@ -3383,6 +3382,31 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3383
3382
|
};
|
|
3384
3383
|
}
|
|
3385
3384
|
});
|
|
3385
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
3386
|
+
__name: "ITableRowheader",
|
|
3387
|
+
props: {
|
|
3388
|
+
row: {},
|
|
3389
|
+
column: {}
|
|
3390
|
+
},
|
|
3391
|
+
setup(__props) {
|
|
3392
|
+
const thRef = vue.useTemplateRef("th");
|
|
3393
|
+
function onActivateCell(e) {
|
|
3394
|
+
logic.assertRef(thRef);
|
|
3395
|
+
thRef.value.tabIndex = 0;
|
|
3396
|
+
if (e.detail.focus) {
|
|
3397
|
+
thRef.value.focus();
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
return (_ctx, _cache) => {
|
|
3401
|
+
return vue.openBlock(), vue.createElementBlock("th", {
|
|
3402
|
+
ref: "th",
|
|
3403
|
+
class: "table-ng__cell table-ng__cell--rowheader",
|
|
3404
|
+
scope: "row",
|
|
3405
|
+
onTableActivateCell: onActivateCell
|
|
3406
|
+
}, vue.toDisplayString(_ctx.column.value(_ctx.row)), 545);
|
|
3407
|
+
};
|
|
3408
|
+
}
|
|
3409
|
+
});
|
|
3386
3410
|
function getValueFn(fn, key, coerce, defaultValue) {
|
|
3387
3411
|
if (fn) {
|
|
3388
3412
|
return fn;
|
|
@@ -3406,7 +3430,7 @@ function getUpdateFn(fn, key) {
|
|
|
3406
3430
|
return () => void 0;
|
|
3407
3431
|
}
|
|
3408
3432
|
function normalizeTableColumn(column) {
|
|
3409
|
-
var _column$key, _column$key2, _column$validation, _column$key3, _column$key4, _column$
|
|
3433
|
+
var _column$key, _column$key2, _column$validation, _column$key3, _column$key4, _column$key5, _column$icon, _column$key6, _column$key7, _column$key8;
|
|
3410
3434
|
if ("render" in column) {
|
|
3411
3435
|
return {
|
|
3412
3436
|
type: void 0,
|
|
@@ -3452,6 +3476,14 @@ function normalizeTableColumn(column) {
|
|
|
3452
3476
|
sortable: (_column$key3 = column.key) !== null && _column$key3 !== void 0 ? _column$key3 : null,
|
|
3453
3477
|
component: _sfc_main$4
|
|
3454
3478
|
};
|
|
3479
|
+
case "rowheader":
|
|
3480
|
+
return {
|
|
3481
|
+
type: "rowheader",
|
|
3482
|
+
header: column.header,
|
|
3483
|
+
value: getValueFn(column.value, column.key, String, ""),
|
|
3484
|
+
sortable: (_column$key4 = column.key) !== null && _column$key4 !== void 0 ? _column$key4 : null,
|
|
3485
|
+
component: _sfc_main$2
|
|
3486
|
+
};
|
|
3455
3487
|
case "anchor":
|
|
3456
3488
|
return {
|
|
3457
3489
|
type: "anchor",
|
|
@@ -3462,7 +3494,7 @@ function normalizeTableColumn(column) {
|
|
|
3462
3494
|
var _column$enabled;
|
|
3463
3495
|
return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
|
|
3464
3496
|
},
|
|
3465
|
-
sortable: (_column$
|
|
3497
|
+
sortable: (_column$key5 = column.key) !== null && _column$key5 !== void 0 ? _column$key5 : null,
|
|
3466
3498
|
component: _sfc_main$6
|
|
3467
3499
|
};
|
|
3468
3500
|
case "button":
|
|
@@ -3476,7 +3508,7 @@ function normalizeTableColumn(column) {
|
|
|
3476
3508
|
return Boolean((_column$enabled2 = column.enabled) !== null && _column$enabled2 !== void 0 ? _column$enabled2 : true);
|
|
3477
3509
|
},
|
|
3478
3510
|
icon: (_column$icon = column.icon) !== null && _column$icon !== void 0 ? _column$icon : null,
|
|
3479
|
-
sortable: (_column$
|
|
3511
|
+
sortable: (_column$key6 = column.key) !== null && _column$key6 !== void 0 ? _column$key6 : null,
|
|
3480
3512
|
component: _sfc_main$5
|
|
3481
3513
|
};
|
|
3482
3514
|
case "select":
|
|
@@ -3490,7 +3522,7 @@ function normalizeTableColumn(column) {
|
|
|
3490
3522
|
return Boolean((_column$editable3 = column.editable) !== null && _column$editable3 !== void 0 ? _column$editable3 : false);
|
|
3491
3523
|
},
|
|
3492
3524
|
options: column.options,
|
|
3493
|
-
sortable: (_column$
|
|
3525
|
+
sortable: (_column$key7 = column.key) !== null && _column$key7 !== void 0 ? _column$key7 : null,
|
|
3494
3526
|
component: _sfc_main$3
|
|
3495
3527
|
};
|
|
3496
3528
|
case void 0:
|
|
@@ -3501,7 +3533,7 @@ function normalizeTableColumn(column) {
|
|
|
3501
3533
|
update() {
|
|
3502
3534
|
},
|
|
3503
3535
|
editable: () => false,
|
|
3504
|
-
sortable: (_column$
|
|
3536
|
+
sortable: (_column$key8 = column.key) !== null && _column$key8 !== void 0 ? _column$key8 : null,
|
|
3505
3537
|
validation: {},
|
|
3506
3538
|
component: _sfc_main$4
|
|
3507
3539
|
};
|
|
@@ -3515,98 +3547,6 @@ function normalizeTableColumns(columns) {
|
|
|
3515
3547
|
return normalizeTableColumn(column);
|
|
3516
3548
|
});
|
|
3517
3549
|
}
|
|
3518
|
-
const _hoisted_1$1 = {
|
|
3519
|
-
key: 0,
|
|
3520
|
-
class: "pager"
|
|
3521
|
-
};
|
|
3522
|
-
const _hoisted_2$1 = {
|
|
3523
|
-
key: 1
|
|
3524
|
-
};
|
|
3525
|
-
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
3526
|
-
__name: "ITablePager",
|
|
3527
|
-
props: {
|
|
3528
|
-
items: {},
|
|
3529
|
-
itemsPerPage: {
|
|
3530
|
-
default: 10
|
|
3531
|
-
}
|
|
3532
|
-
},
|
|
3533
|
-
emits: ["itemRange"],
|
|
3534
|
-
setup(__props, {
|
|
3535
|
-
emit: __emit
|
|
3536
|
-
}) {
|
|
3537
|
-
const currentPage = vue.ref(1);
|
|
3538
|
-
const currentPageItemLength = vue.ref(0);
|
|
3539
|
-
const numberOfPages = vue.ref(0);
|
|
3540
|
-
const numberOfItems = vue.computed(() => {
|
|
3541
|
-
return __props.items.length;
|
|
3542
|
-
});
|
|
3543
|
-
const emit = __emit;
|
|
3544
|
-
function switchToNextPage() {
|
|
3545
|
-
currentPage.value++;
|
|
3546
|
-
defineCurrentPage();
|
|
3547
|
-
}
|
|
3548
|
-
function switchToPreviousPage() {
|
|
3549
|
-
currentPage.value--;
|
|
3550
|
-
defineCurrentPage();
|
|
3551
|
-
}
|
|
3552
|
-
function switchToSpecificPage(page) {
|
|
3553
|
-
currentPage.value = page;
|
|
3554
|
-
defineCurrentPage();
|
|
3555
|
-
}
|
|
3556
|
-
function defineNumberOfPages() {
|
|
3557
|
-
numberOfPages.value = Math.ceil(numberOfItems.value / __props.itemsPerPage);
|
|
3558
|
-
}
|
|
3559
|
-
function defineCurrentPage() {
|
|
3560
|
-
const currentPageFirstItemId = __props.itemsPerPage * (currentPage.value - 1) + 1;
|
|
3561
|
-
const currentPageLastItemId = Math.min(__props.itemsPerPage * currentPage.value, numberOfItems.value);
|
|
3562
|
-
const currentPageItems = __props.items.slice(currentPageFirstItemId - 1, currentPageLastItemId);
|
|
3563
|
-
emit("itemRange", currentPageItems);
|
|
3564
|
-
currentPageItemLength.value = currentPageItems.length;
|
|
3565
|
-
}
|
|
3566
|
-
function showPageButton(page) {
|
|
3567
|
-
const numberOfAdjacentPagesShown = 2;
|
|
3568
|
-
return page === 1 || Math.abs(currentPage.value - page) <= numberOfAdjacentPagesShown || page === numberOfPages.value;
|
|
3569
|
-
}
|
|
3570
|
-
vue.onMounted(() => {
|
|
3571
|
-
defineNumberOfPages();
|
|
3572
|
-
defineCurrentPage();
|
|
3573
|
-
});
|
|
3574
|
-
return (_ctx, _cache) => {
|
|
3575
|
-
return numberOfPages.value > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [currentPage.value !== 1 ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FButton), {
|
|
3576
|
-
key: 0,
|
|
3577
|
-
variant: "tertiary",
|
|
3578
|
-
size: "small",
|
|
3579
|
-
"icon-left": "chevrons-left",
|
|
3580
|
-
onClick: _cache[0] || (_cache[0] = ($event) => switchToPreviousPage())
|
|
3581
|
-
}, {
|
|
3582
|
-
default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [vue.createTextVNode("\n Föregående\n ", -1)])]),
|
|
3583
|
-
_: 1
|
|
3584
|
-
})) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(numberOfPages.value, (page) => {
|
|
3585
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
3586
|
-
key: page
|
|
3587
|
-
}, [showPageButton(page) ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FButton), {
|
|
3588
|
-
key: 0,
|
|
3589
|
-
size: "small",
|
|
3590
|
-
variant: "tertiary",
|
|
3591
|
-
disabled: page === currentPage.value,
|
|
3592
|
-
onClick: ($event) => switchToSpecificPage(page)
|
|
3593
|
-
}, {
|
|
3594
|
-
default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(page), 1)]),
|
|
3595
|
-
_: 2
|
|
3596
|
-
}, 1032, ["disabled", "onClick"])) : showPageButton(page + 1) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$1, "...")) : vue.createCommentVNode("", true)], 64);
|
|
3597
|
-
}), 128)), _cache[5] || (_cache[5] = vue.createTextVNode()), currentPage.value !== numberOfPages.value ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FButton), {
|
|
3598
|
-
key: 1,
|
|
3599
|
-
variant: "tertiary",
|
|
3600
|
-
size: "small",
|
|
3601
|
-
"icon-right": "arrow-right",
|
|
3602
|
-
onClick: _cache[1] || (_cache[1] = ($event) => switchToNextPage())
|
|
3603
|
-
}, {
|
|
3604
|
-
default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [vue.createTextVNode("\n Nästa\n ", -1)])]),
|
|
3605
|
-
_: 1
|
|
3606
|
-
})) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true);
|
|
3607
|
-
};
|
|
3608
|
-
}
|
|
3609
|
-
});
|
|
3610
3550
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
3611
3551
|
__name: "ITableHeader",
|
|
3612
3552
|
props: {
|
|
@@ -3698,17 +3638,17 @@ const _hoisted_2 = {
|
|
|
3698
3638
|
const _hoisted_3 = {
|
|
3699
3639
|
key: 0,
|
|
3700
3640
|
scope: "col",
|
|
3701
|
-
|
|
3641
|
+
tabindex: "-1",
|
|
3642
|
+
class: "table-ng__column"
|
|
3702
3643
|
};
|
|
3703
3644
|
const _hoisted_4 = {
|
|
3704
3645
|
key: 1,
|
|
3705
|
-
scope: "col"
|
|
3646
|
+
scope: "col",
|
|
3647
|
+
class: "table-ng__column table-ng__column--checkbox"
|
|
3706
3648
|
};
|
|
3707
3649
|
const _hoisted_5 = {
|
|
3708
3650
|
key: 2,
|
|
3709
|
-
scope: "col"
|
|
3710
|
-
tabindex: "-1",
|
|
3711
|
-
class: "table-ng__column"
|
|
3651
|
+
scope: "col"
|
|
3712
3652
|
};
|
|
3713
3653
|
const _hoisted_6 = {
|
|
3714
3654
|
key: 0,
|
|
@@ -3716,9 +3656,6 @@ const _hoisted_6 = {
|
|
|
3716
3656
|
};
|
|
3717
3657
|
const _hoisted_7 = ["colspan"];
|
|
3718
3658
|
const _hoisted_8 = ["colspan"];
|
|
3719
|
-
const _hoisted_9 = {
|
|
3720
|
-
key: 0
|
|
3721
|
-
};
|
|
3722
3659
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
3723
3660
|
__name: "FTable",
|
|
3724
3661
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
@@ -3736,10 +3673,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3736
3673
|
},
|
|
3737
3674
|
selectable: {
|
|
3738
3675
|
default: () => void 0
|
|
3739
|
-
},
|
|
3740
|
-
paginerated: {
|
|
3741
|
-
type: Boolean,
|
|
3742
|
-
default: false
|
|
3743
3676
|
}
|
|
3744
3677
|
}, {
|
|
3745
3678
|
"selectedRows": {
|
|
@@ -3757,12 +3690,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3757
3690
|
const metaRows = vue.computed(() => getMetaRows(keyedRows.value, expandedKeys.value, __props.expandableAttribute));
|
|
3758
3691
|
const isTreegrid = vue.computed(() => Boolean(__props.expandableAttribute));
|
|
3759
3692
|
const role = vue.computed(() => isTreegrid.value ? "treegrid" : "grid");
|
|
3760
|
-
const rowsFromPaginator = vue.ref(metaRows.value);
|
|
3761
|
-
const viewRows = vue.computed(() => {
|
|
3762
|
-
return __props.paginerated ? rowsFromPaginator.value : metaRows.value;
|
|
3763
|
-
});
|
|
3764
3693
|
const isEmpty = vue.computed(() => {
|
|
3765
|
-
return
|
|
3694
|
+
return metaRows.value.length === 0;
|
|
3766
3695
|
});
|
|
3767
3696
|
const columnCount = vue.computed(() => {
|
|
3768
3697
|
const selectableCol = __props.selectable ? 1 : 0;
|
|
@@ -3882,9 +3811,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3882
3811
|
e.target.tabIndex = -1;
|
|
3883
3812
|
}
|
|
3884
3813
|
}
|
|
3885
|
-
function onItemRangeUpdate(items) {
|
|
3886
|
-
rowsFromPaginator.value = items;
|
|
3887
|
-
}
|
|
3888
3814
|
const {
|
|
3889
3815
|
sort,
|
|
3890
3816
|
registerCallbackOnSort,
|
|
@@ -3938,14 +3864,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3938
3864
|
onFocusout: onTableFocusout,
|
|
3939
3865
|
onClick,
|
|
3940
3866
|
onKeydown
|
|
3941
|
-
}, [vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_2, [
|
|
3867
|
+
}, [vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_2, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_3)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), isMultiSelect.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4, [vue.createElementVNode("input", {
|
|
3942
3868
|
ref: "selectAll",
|
|
3943
3869
|
type: "checkbox",
|
|
3944
3870
|
"aria-label": "select all",
|
|
3945
3871
|
tabindex: "-1",
|
|
3946
3872
|
indeterminate: "",
|
|
3947
3873
|
onChange: onSelectAllChange
|
|
3948
|
-
}, null, 544)])) : vue.createCommentVNode("", true), _cache[
|
|
3874
|
+
}, null, 544)])) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), isSingleSelect.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5, vue.toDisplayString(singleSelectColumn.header), 1)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
|
|
3949
3875
|
return vue.openBlock(), vue.createBlock(_sfc_main$1, {
|
|
3950
3876
|
key: column.header,
|
|
3951
3877
|
column,
|
|
@@ -3960,7 +3886,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3960
3886
|
class: "table-ng__cell"
|
|
3961
3887
|
}, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [_cache[3] || (_cache[3] = vue.createTextVNode(" Tabellen är tom ", -1))])], 8, _hoisted_7)])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
3962
3888
|
key: 1
|
|
3963
|
-
}, vue.renderList(
|
|
3889
|
+
}, vue.renderList(metaRows.value, ({
|
|
3964
3890
|
key,
|
|
3965
3891
|
row,
|
|
3966
3892
|
rowIndex,
|
|
@@ -4013,10 +3939,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4013
3939
|
}), 128))], 64))]),
|
|
4014
3940
|
_: 2
|
|
4015
3941
|
}, 1032, ["row-key", "aria-rowindex", "aria-level", "aria-setsize", "aria-posinset", "is-treegrid", "is-expandable", "is-expanded"]);
|
|
4016
|
-
}), 128))])], 42, _hoisted_1), _cache[7] || (_cache[7] = vue.createTextVNode()),
|
|
4017
|
-
items: metaRows.value,
|
|
4018
|
-
onItemRange: onItemRangeUpdate
|
|
4019
|
-
}, null, 8, ["items"])])) : vue.createCommentVNode("", true), _cache[8] || (_cache[8] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "footer")], 64);
|
|
3942
|
+
}), 128))])], 42, _hoisted_1), _cache[7] || (_cache[7] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "footer")], 64);
|
|
4020
3943
|
};
|
|
4021
3944
|
}
|
|
4022
3945
|
});
|