@fkui/vue-labs 6.39.0 → 6.40.0

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.
@@ -418,10 +418,10 @@ function requireSharedStore() {
418
418
  var SHARED = "__core-js_shared__";
419
419
  var store = sharedStore.exports = globalThis2[SHARED] || defineGlobalProperty2(SHARED, {});
420
420
  (store.versions || (store.versions = [])).push({
421
- version: "3.48.0",
421
+ version: "3.49.0",
422
422
  mode: IS_PURE ? "pure" : "global",
423
423
  copyright: "© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",
424
- license: "https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",
424
+ license: "https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",
425
425
  source: "https://github.com/zloirock/core-js"
426
426
  });
427
427
  return sharedStore.exports;
@@ -1364,15 +1364,17 @@ function requireIterate() {
1364
1364
  var fn = bind(unboundFunction, that);
1365
1365
  var iterator, iterFn, index, length, result, next, step;
1366
1366
  var stop = function(condition) {
1367
- if (iterator) iteratorClose2(iterator, "normal");
1367
+ var $iterator = iterator;
1368
+ iterator = void 0;
1369
+ if ($iterator) iteratorClose2($iterator, "normal");
1368
1370
  return new Result(true, condition);
1369
1371
  };
1370
- var callFn = function(value) {
1372
+ var callFn = function(value2) {
1371
1373
  if (AS_ENTRIES) {
1372
- anObject2(value);
1373
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1374
+ anObject2(value2);
1375
+ return INTERRUPTED ? fn(value2[0], value2[1], stop) : fn(value2[0], value2[1]);
1374
1376
  }
1375
- return INTERRUPTED ? fn(value, stop) : fn(value);
1377
+ return INTERRUPTED ? fn(value2, stop) : fn(value2);
1376
1378
  };
1377
1379
  if (IS_RECORD) {
1378
1380
  iterator = iterable.iterator;
@@ -1392,10 +1394,12 @@ function requireIterate() {
1392
1394
  }
1393
1395
  next = IS_RECORD ? iterable.next : iterator.next;
1394
1396
  while (!(step = call(next, iterator)).done) {
1397
+ var value = step.value;
1395
1398
  try {
1396
- result = callFn(step.value);
1399
+ result = callFn(value);
1397
1400
  } catch (error) {
1398
- iteratorClose2(iterator, "throw", error);
1401
+ if (iterator) iteratorClose2(iterator, "throw", error);
1402
+ else throw error;
1399
1403
  }
1400
1404
  if (typeof result == "object" && result && isPrototypeOf(ResultPrototype, result)) return result;
1401
1405
  }
@@ -1869,11 +1873,13 @@ function requireIteratorCreateProxy() {
1869
1873
  "return": function() {
1870
1874
  var state = getInternalState(this);
1871
1875
  var iterator = state.iterator;
1876
+ var done = state.done;
1872
1877
  state.done = true;
1873
1878
  if (IS_ITERATOR) {
1874
1879
  var returnMethod = getMethod2(iterator, "return");
1875
1880
  return returnMethod ? call(returnMethod, iterator) : createIterResultObject2(void 0, true);
1876
1881
  }
1882
+ if (done) return createIterResultObject2(void 0, true);
1877
1883
  if (state.inner) try {
1878
1884
  iteratorClose2(state.inner.iterator, NORMAL);
1879
1885
  } catch (error) {
@@ -1882,7 +1888,8 @@ function requireIteratorCreateProxy() {
1882
1888
  if (state.openIters) try {
1883
1889
  iteratorCloseAll2(state.openIters, NORMAL);
1884
1890
  } catch (error) {
1885
- return iteratorClose2(iterator, THROW, error);
1891
+ if (iterator) return iteratorClose2(iterator, THROW, error);
1892
+ throw error;
1886
1893
  }
1887
1894
  if (iterator) iteratorClose2(iterator, NORMAL);
1888
1895
  return createIterResultObject2(void 0, true);
@@ -2166,7 +2173,7 @@ function requireSetDifference() {
2166
2173
  var O = aSet2(this);
2167
2174
  var otherRec = getSetRecord2(other);
2168
2175
  var result = clone(O);
2169
- if (size(O) <= otherRec.size) iterateSet(O, function(e) {
2176
+ if (size(result) <= otherRec.size) iterateSet(result, function(e) {
2170
2177
  if (otherRec.includes(e)) remove(result, e);
2171
2178
  });
2172
2179
  else iterateSimple2(otherRec.getIterator(), function(e) {
@@ -2355,7 +2362,7 @@ function requireSetIsDisjointFrom() {
2355
2362
  }, true) !== false;
2356
2363
  var iterator = otherRec.getIterator();
2357
2364
  return iterateSimple2(iterator, function(e) {
2358
- if (has(O, e)) return iteratorClose2(iterator, "normal", false);
2365
+ if (has(O, e)) return iteratorClose2(iterator.iterator, "normal", false);
2359
2366
  }) !== false;
2360
2367
  };
2361
2368
  return setIsDisjointFrom;
@@ -2440,7 +2447,7 @@ function requireSetIsSupersetOf() {
2440
2447
  if (size(O) < otherRec.size) return false;
2441
2448
  var iterator = otherRec.getIterator();
2442
2449
  return iterateSimple2(iterator, function(e) {
2443
- if (!has(O, e)) return iteratorClose2(iterator, "normal", false);
2450
+ if (!has(O, e)) return iteratorClose2(iterator.iterator, "normal", false);
2444
2451
  }) !== false;
2445
2452
  };
2446
2453
  return setIsSupersetOf;
@@ -2589,252 +2596,12 @@ function requireEs_set_union_v2() {
2589
2596
  return es_set_union_v2;
2590
2597
  }
2591
2598
  requireEs_set_union_v2();
2592
- function isFTableCellApi(value) {
2593
- return value !== null && typeof value === "object" && Boolean(value.tabstopEl);
2594
- }
2595
- const tableCellApiSymbol = /* @__PURE__ */ Symbol("table:cell-api");
2596
- const navKeys = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"]);
2597
- let prevCellIndex = void 0;
2598
- function getCellTarget(tableElement, rowIndex, cellIndex) {
2599
- return tableElement.rows[rowIndex].cells[cellIndex];
2600
- }
2601
- function getTr(td) {
2602
- return td.parentElement;
2603
- }
2604
- function getTable(tr) {
2605
- return tr.closest("table");
2606
- }
2607
- function getLastRowIndex(tableElement) {
2608
- return tableElement.rows.length - 1;
2609
- }
2610
- function getLastCellIndex(tableElement) {
2611
- return tableElement.rows[0].cells.length - 1;
2612
- }
2613
- function getVerticalNavIndex(table, from, to) {
2614
- const target = {
2615
- ...to
2616
- };
2617
- const currentMax = table.rows[from.row].cells.length - 1;
2618
- const targetMax = table.rows[to.row].cells.length - 1;
2619
- if (prevCellIndex && currentMax < targetMax) {
2620
- target.cell = prevCellIndex;
2621
- prevCellIndex = void 0;
2622
- } else {
2623
- target.cell = Math.min(targetMax, from.cell);
2624
- }
2625
- if (targetMax < from.cell) {
2626
- prevCellIndex = from.cell;
2627
- }
2628
- return target;
2629
- }
2630
- function isDefined(value) {
2631
- return value.row !== void 0 && value.cell !== void 0;
2632
- }
2633
- function navigate(e, table, from, last) {
2634
- if (!isDefined(from) || !isDefined(last)) {
2635
- return;
2636
- }
2637
- if (!navKeys.has(e.code)) {
2638
- return;
2639
- }
2640
- e.preventDefault();
2641
- if (e.code === "ArrowLeft") {
2642
- if (from.cell === 0) {
2643
- return;
2644
- }
2645
- prevCellIndex = void 0;
2646
- return {
2647
- row: from.row,
2648
- cell: from.cell - 1
2649
- };
2650
- }
2651
- if (e.code === "ArrowRight") {
2652
- if (from.cell === last.cell) {
2653
- return;
2654
- }
2655
- const lastCellIndex = table.rows[from.row].cells.length - 1;
2656
- if (lastCellIndex <= from.cell) {
2657
- return;
2658
- }
2659
- prevCellIndex = void 0;
2660
- return {
2661
- row: from.row,
2662
- cell: from.cell + 1
2663
- };
2664
- }
2665
- if (e.code === "ArrowUp") {
2666
- if (from.row === 0) {
2667
- return;
2668
- }
2669
- const to = {
2670
- row: from.row - 1,
2671
- cell: from.cell
2672
- };
2673
- return getVerticalNavIndex(table, from, to);
2674
- }
2675
- if (e.code === "ArrowDown") {
2676
- if (from.row === last.row) {
2677
- return;
2678
- }
2679
- const to = {
2680
- row: from.row + 1,
2681
- cell: from.cell
2682
- };
2683
- return getVerticalNavIndex(table, from, to);
2684
- }
2685
- if (e.code === "Home") {
2686
- if (e.ctrlKey) {
2687
- return {
2688
- row: 1,
2689
- cell: 0
2690
- };
2691
- } else {
2692
- return {
2693
- row: from.row,
2694
- cell: 0
2695
- };
2696
- }
2697
- }
2698
- if (e.code === "End") {
2699
- if (e.ctrlKey) {
2700
- return {
2701
- row: last.row,
2702
- cell: table.rows[last.row].cells.length - 1
2703
- };
2704
- } else {
2705
- return {
2706
- row: from.row,
2707
- cell: table.rows[from.row].cells.length - 1
2708
- };
2709
- }
2710
- }
2711
- }
2712
- function getCell(element) {
2713
- const closest = element.closest("td, th");
2714
- if (!closest) {
2715
- throw new Error("expected th or td parent");
2716
- }
2717
- return closest;
2718
- }
2719
- async function setDefaultCellTarget(table) {
2720
- await vue.nextTick();
2721
- const target = getCellTarget(table, 1, 0);
2722
- activateCell(target, {
2723
- focus: false
2724
- });
2725
- return target;
2726
- }
2727
- function maybeNavigateToCell(e) {
2728
- let newCellTarget = e.target;
2729
- const cell = getCell(e.target);
2730
- const tr = getTr(cell);
2731
- const table = getTable(tr);
2732
- const fromIndex = {
2733
- row: tr.rowIndex,
2734
- cell: cell.cellIndex
2735
- };
2736
- const lastIndex = {
2737
- row: getLastRowIndex(table),
2738
- cell: getLastCellIndex(table)
2739
- };
2740
- const navigateTo = navigate(e, table, fromIndex, lastIndex);
2741
- if (navigateTo) {
2742
- newCellTarget = getCellTarget(table, navigateTo.row, navigateTo.cell);
2743
- activateCell(newCellTarget, {
2744
- focus: true
2745
- });
2746
- }
2747
- }
2748
- function activateCell(element, options) {
2749
- var _toValue;
2750
- const api = element[tableCellApiSymbol];
2751
- const targetEl = (_toValue = vue.toValue(api?.tabstopEl)) !== null && _toValue !== void 0 ? _toValue : element;
2752
- targetEl.tabIndex = 0;
2753
- if (options?.focus) {
2754
- targetEl.focus();
2755
- }
2756
- return targetEl;
2757
- }
2758
- function stopEdit(element, reason) {
2759
- const td = getCell(element);
2760
- const tr = getTr(td);
2761
- const table = getTable(tr);
2762
- const rowIndex = tr.rowIndex;
2763
- const cellIndex = td.cellIndex;
2764
- const lastRowIndex = getLastRowIndex(table);
2765
- const lastCellIndex = getLastCellIndex(table);
2766
- let newCellTarget = td;
2767
- switch (reason) {
2768
- case "enter": {
2769
- const nextRowIndex = rowIndex + 1;
2770
- const hasFooter = Boolean(table.tFoot);
2771
- const isLastRow = rowIndex === lastRowIndex;
2772
- const footerNext = hasFooter && nextRowIndex === lastRowIndex;
2773
- if (!isLastRow && !footerNext) {
2774
- newCellTarget = getCellTarget(table, nextRowIndex, cellIndex);
2775
- activateCell(newCellTarget, {
2776
- focus: true
2777
- });
2778
- } else {
2779
- activateCell(newCellTarget, {
2780
- focus: true
2781
- });
2782
- }
2783
- return newCellTarget;
2784
- }
2785
- case "escape": {
2786
- activateCell(newCellTarget, {
2787
- focus: true
2788
- });
2789
- return newCellTarget;
2790
- }
2791
- case "tab": {
2792
- if (cellIndex === lastCellIndex && rowIndex === lastRowIndex) {
2793
- activateCell(newCellTarget, {
2794
- focus: true
2795
- });
2796
- } else if (cellIndex === lastCellIndex) {
2797
- newCellTarget = getCellTarget(table, rowIndex + 1, 0);
2798
- activateCell(newCellTarget, {
2799
- focus: true
2800
- });
2801
- } else {
2802
- newCellTarget = getCellTarget(table, rowIndex, cellIndex + 1);
2803
- activateCell(newCellTarget, {
2804
- focus: true
2805
- });
2806
- }
2807
- return newCellTarget;
2808
- }
2809
- case "shift-tab": {
2810
- if (cellIndex === 0 && rowIndex === 1) {
2811
- activateCell(newCellTarget, {
2812
- focus: true
2813
- });
2814
- } else if (cellIndex === 0) {
2815
- newCellTarget = getCellTarget(table, rowIndex - 1, 0);
2816
- activateCell(newCellTarget, {
2817
- focus: true
2818
- });
2819
- } else {
2820
- newCellTarget = getCellTarget(table, rowIndex, cellIndex - 1);
2821
- activateCell(newCellTarget, {
2822
- focus: true
2823
- });
2824
- }
2825
- return newCellTarget;
2826
- }
2827
- case "blur": {
2828
- return newCellTarget;
2829
- }
2830
- }
2831
- }
2832
2599
  const _hoisted_1$e = {
2833
2600
  key: 0,
2834
2601
  class: "table-ng__cell table-ng__cell--expand"
2835
2602
  };
2836
2603
  const _hoisted_2$9 = ["aria-label", "aria-expanded"];
2837
- const _hoisted_3$6 = {
2604
+ const _hoisted_3$5 = {
2838
2605
  key: 1,
2839
2606
  ref: "expandable",
2840
2607
  tabindex: "-1",
@@ -2880,7 +2647,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2880
2647
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
2881
2648
  class: "button__icon",
2882
2649
  name: toggleIcon.value
2883
- }, null, 8, ["name"])], 8, _hoisted_2$9)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$6, null, 512));
2650
+ }, null, 8, ["name"])], 8, _hoisted_2$9)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, null, 512));
2884
2651
  };
2885
2652
  }
2886
2653
  });
@@ -2900,20 +2667,69 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2900
2667
  };
2901
2668
  }
2902
2669
  });
2903
- const baseTypes = ["anchor", "button", "checkbox", "radio", "render", "rowheader", "select"];
2904
- const textTypes = ["text:bankAccountNumber", "text:bankgiro", "text:clearingNumber", "text:date", "text:email", "text:organisationsnummer", "text:personnummer", "text:phoneNumber", "text:plusgiro", "text:postalCode", "text"];
2905
- const numberTypes = ["text:currency", "text:number", "text:percent"];
2906
- function isInputTypeNumber(value) {
2907
- return numberTypes.includes(value);
2908
- }
2909
- function isInputTypeText(value) {
2910
- return textTypes.includes(value);
2911
- }
2912
- const inputFieldConfig = {
2913
- "text:personnummer": {
2914
- formatter(value) {
2915
- return logic.formatPersonnummer(logic.parsePersonnummer(value));
2916
- },
2670
+ var es_array_includes = {};
2671
+ var addToUnscopables;
2672
+ var hasRequiredAddToUnscopables;
2673
+ function requireAddToUnscopables() {
2674
+ if (hasRequiredAddToUnscopables) return addToUnscopables;
2675
+ hasRequiredAddToUnscopables = 1;
2676
+ var wellKnownSymbol2 = requireWellKnownSymbol();
2677
+ var create = requireObjectCreate();
2678
+ var defineProperty = requireObjectDefineProperty().f;
2679
+ var UNSCOPABLES = wellKnownSymbol2("unscopables");
2680
+ var ArrayPrototype = Array.prototype;
2681
+ if (ArrayPrototype[UNSCOPABLES] === void 0) {
2682
+ defineProperty(ArrayPrototype, UNSCOPABLES, {
2683
+ configurable: true,
2684
+ value: create(null)
2685
+ });
2686
+ }
2687
+ addToUnscopables = function(key) {
2688
+ ArrayPrototype[UNSCOPABLES][key] = true;
2689
+ };
2690
+ return addToUnscopables;
2691
+ }
2692
+ var hasRequiredEs_array_includes;
2693
+ function requireEs_array_includes() {
2694
+ if (hasRequiredEs_array_includes) return es_array_includes;
2695
+ hasRequiredEs_array_includes = 1;
2696
+ var $ = require_export();
2697
+ var $includes = requireArrayIncludes().includes;
2698
+ var fails2 = requireFails();
2699
+ var addToUnscopables2 = requireAddToUnscopables();
2700
+ var BROKEN_ON_SPARSE = fails2(function() {
2701
+ return !Array(1).includes();
2702
+ });
2703
+ var BROKEN_ON_SPARSE_WITH_FROM_INDEX = fails2(function() {
2704
+ return [, 1].includes(void 0, 1);
2705
+ });
2706
+ $({
2707
+ target: "Array",
2708
+ proto: true,
2709
+ forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE_WITH_FROM_INDEX
2710
+ }, {
2711
+ includes: function includes(el) {
2712
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
2713
+ }
2714
+ });
2715
+ addToUnscopables2("includes");
2716
+ return es_array_includes;
2717
+ }
2718
+ requireEs_array_includes();
2719
+ const baseTypes = ["anchor", "button", "checkbox", "render", "rowheader", "select"];
2720
+ const textTypes = ["text:bankAccountNumber", "text:bankgiro", "text:clearingNumber", "text:date", "text:email", "text:organisationsnummer", "text:personnummer", "text:phoneNumber", "text:plusgiro", "text:postalCode", "text"];
2721
+ const numberTypes = ["text:currency", "text:number", "text:percent"];
2722
+ function isInputTypeNumber(value) {
2723
+ return numberTypes.includes(value);
2724
+ }
2725
+ function isInputTypeText(value) {
2726
+ return textTypes.includes(value);
2727
+ }
2728
+ const inputFieldConfig = {
2729
+ "text:personnummer": {
2730
+ formatter(value) {
2731
+ return logic.formatPersonnummer(logic.parsePersonnummer(value));
2732
+ },
2917
2733
  parser(value) {
2918
2734
  return logic.parsePersonnummer(value);
2919
2735
  },
@@ -3340,17 +3156,9 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3340
3156
  }
3341
3157
  });
3342
3158
  const _hoisted_1$a = {
3343
- key: 0,
3344
3159
  class: "table-ng__cell table-ng__cell--checkbox"
3345
3160
  };
3346
3161
  const _hoisted_2$7 = ["checked", "aria-label"];
3347
- const _hoisted_3$5 = {
3348
- key: 1,
3349
- ref: "target",
3350
- tabindex: "-1",
3351
- class: "table-ng__cell table-ng__cell--checkbox"
3352
- };
3353
- const _hoisted_4$4 = ["checked", "aria-label"];
3354
3162
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3355
3163
  __name: "ITableCheckbox",
3356
3164
  props: {
@@ -3374,18 +3182,14 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3374
3182
  };
3375
3183
  __expose(expose);
3376
3184
  return (_ctx, _cache) => {
3377
- return __props.column.editable(__props.row) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$a, [vue.createElementVNode("input", {
3185
+ return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$a, [vue.createElementVNode("input", {
3378
3186
  ref: "target",
3379
3187
  checked: Boolean(__props.column.checked(__props.row)),
3380
3188
  type: "checkbox",
3381
3189
  "aria-label": ariaLabel.value,
3382
3190
  tabindex: "-1",
3383
3191
  onChange
3384
- }, null, 40, _hoisted_2$7)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, [vue.createElementVNode("input", {
3385
- checked: Boolean(__props.column.checked(__props.row)),
3386
- type: "checkbox",
3387
- "aria-label": ariaLabel.value
3388
- }, null, 8, _hoisted_4$4)], 512));
3192
+ }, null, 40, _hoisted_2$7)]);
3389
3193
  };
3390
3194
  }
3391
3195
  });
@@ -3474,9 +3278,6 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3474
3278
  checked() {
3475
3279
  return __props.state;
3476
3280
  },
3477
- editable() {
3478
- return true;
3479
- },
3480
3281
  update() {
3481
3282
  emit("toggle", __props.row);
3482
3283
  },
@@ -3517,7 +3318,250 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3517
3318
  }, null, 8, ["row"])) : vue.createCommentVNode("", true);
3518
3319
  };
3519
3320
  }
3520
- });
3321
+ });
3322
+ function isFTableCellApi(value) {
3323
+ return value !== null && typeof value === "object" && Boolean(value.tabstopEl);
3324
+ }
3325
+ const tableCellApiSymbol = /* @__PURE__ */ Symbol("table:cell-api");
3326
+ const navKeys = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"]);
3327
+ let prevCellIndex = void 0;
3328
+ function getCellTarget(tableElement, rowIndex, cellIndex) {
3329
+ return tableElement.rows[rowIndex].cells[cellIndex];
3330
+ }
3331
+ function getTr(td) {
3332
+ return td.parentElement;
3333
+ }
3334
+ function getTable(tr) {
3335
+ return tr.closest("table");
3336
+ }
3337
+ function getLastRowIndex(tableElement) {
3338
+ return tableElement.rows.length - 1;
3339
+ }
3340
+ function getLastCellIndex(tableElement) {
3341
+ return tableElement.rows[0].cells.length - 1;
3342
+ }
3343
+ function getVerticalNavIndex(table, from, to) {
3344
+ const target = {
3345
+ ...to
3346
+ };
3347
+ const currentMax = table.rows[from.row].cells.length - 1;
3348
+ const targetMax = table.rows[to.row].cells.length - 1;
3349
+ if (prevCellIndex && currentMax < targetMax) {
3350
+ target.cell = prevCellIndex;
3351
+ prevCellIndex = void 0;
3352
+ } else {
3353
+ target.cell = Math.min(targetMax, from.cell);
3354
+ }
3355
+ if (targetMax < from.cell) {
3356
+ prevCellIndex = from.cell;
3357
+ }
3358
+ return target;
3359
+ }
3360
+ function isDefined(value) {
3361
+ return value.row !== void 0 && value.cell !== void 0;
3362
+ }
3363
+ function navigate(e, table, from, last) {
3364
+ if (!isDefined(from) || !isDefined(last)) {
3365
+ return;
3366
+ }
3367
+ if (!navKeys.has(e.code)) {
3368
+ return;
3369
+ }
3370
+ e.preventDefault();
3371
+ if (e.code === "ArrowLeft") {
3372
+ if (from.cell === 0) {
3373
+ return;
3374
+ }
3375
+ prevCellIndex = void 0;
3376
+ return {
3377
+ row: from.row,
3378
+ cell: from.cell - 1
3379
+ };
3380
+ }
3381
+ if (e.code === "ArrowRight") {
3382
+ if (from.cell === last.cell) {
3383
+ return;
3384
+ }
3385
+ const lastCellIndex = table.rows[from.row].cells.length - 1;
3386
+ if (lastCellIndex <= from.cell) {
3387
+ return;
3388
+ }
3389
+ prevCellIndex = void 0;
3390
+ return {
3391
+ row: from.row,
3392
+ cell: from.cell + 1
3393
+ };
3394
+ }
3395
+ if (e.code === "ArrowUp") {
3396
+ if (from.row === 0) {
3397
+ return;
3398
+ }
3399
+ const to = {
3400
+ row: from.row - 1,
3401
+ cell: from.cell
3402
+ };
3403
+ return getVerticalNavIndex(table, from, to);
3404
+ }
3405
+ if (e.code === "ArrowDown") {
3406
+ if (from.row === last.row) {
3407
+ return;
3408
+ }
3409
+ const to = {
3410
+ row: from.row + 1,
3411
+ cell: from.cell
3412
+ };
3413
+ return getVerticalNavIndex(table, from, to);
3414
+ }
3415
+ if (e.code === "Home") {
3416
+ if (e.ctrlKey) {
3417
+ return {
3418
+ row: 1,
3419
+ cell: 0
3420
+ };
3421
+ } else {
3422
+ return {
3423
+ row: from.row,
3424
+ cell: 0
3425
+ };
3426
+ }
3427
+ }
3428
+ if (e.code === "End") {
3429
+ if (e.ctrlKey) {
3430
+ return {
3431
+ row: last.row,
3432
+ cell: table.rows[last.row].cells.length - 1
3433
+ };
3434
+ } else {
3435
+ return {
3436
+ row: from.row,
3437
+ cell: table.rows[from.row].cells.length - 1
3438
+ };
3439
+ }
3440
+ }
3441
+ }
3442
+ function getCell(element) {
3443
+ const closest = element.closest("td, th");
3444
+ if (!closest) {
3445
+ throw new Error("expected th or td parent");
3446
+ }
3447
+ return closest;
3448
+ }
3449
+ async function setDefaultCellTarget(table) {
3450
+ await vue.nextTick();
3451
+ if (!table.tHead) {
3452
+ return null;
3453
+ }
3454
+ const target = getCellTarget(table, 1, 0);
3455
+ activateCell(target, {
3456
+ focus: false
3457
+ });
3458
+ return target;
3459
+ }
3460
+ function maybeNavigateToCell(e) {
3461
+ let newCellTarget = e.target;
3462
+ const cell = getCell(e.target);
3463
+ const tr = getTr(cell);
3464
+ const table = getTable(tr);
3465
+ const fromIndex = {
3466
+ row: tr.rowIndex,
3467
+ cell: cell.cellIndex
3468
+ };
3469
+ const lastIndex = {
3470
+ row: getLastRowIndex(table),
3471
+ cell: getLastCellIndex(table)
3472
+ };
3473
+ const navigateTo = navigate(e, table, fromIndex, lastIndex);
3474
+ if (navigateTo) {
3475
+ newCellTarget = getCellTarget(table, navigateTo.row, navigateTo.cell);
3476
+ activateCell(newCellTarget, {
3477
+ focus: true
3478
+ });
3479
+ }
3480
+ }
3481
+ function activateCell(element, options) {
3482
+ var _toValue;
3483
+ const api = element[tableCellApiSymbol];
3484
+ const targetEl = (_toValue = vue.toValue(api?.tabstopEl)) !== null && _toValue !== void 0 ? _toValue : element;
3485
+ targetEl.tabIndex = 0;
3486
+ if (options?.focus) {
3487
+ targetEl.focus();
3488
+ }
3489
+ return targetEl;
3490
+ }
3491
+ function stopEdit(element, reason) {
3492
+ const td = getCell(element);
3493
+ const tr = getTr(td);
3494
+ const table = getTable(tr);
3495
+ const rowIndex = tr.rowIndex;
3496
+ const cellIndex = td.cellIndex;
3497
+ const lastRowIndex = getLastRowIndex(table);
3498
+ const lastCellIndex = getLastCellIndex(table);
3499
+ let newCellTarget = td;
3500
+ switch (reason) {
3501
+ case "enter": {
3502
+ const nextRowIndex = rowIndex + 1;
3503
+ const hasFooter = Boolean(table.tFoot);
3504
+ const isLastRow = rowIndex === lastRowIndex;
3505
+ const footerNext = hasFooter && nextRowIndex === lastRowIndex;
3506
+ if (!isLastRow && !footerNext) {
3507
+ newCellTarget = getCellTarget(table, nextRowIndex, cellIndex);
3508
+ activateCell(newCellTarget, {
3509
+ focus: true
3510
+ });
3511
+ } else {
3512
+ activateCell(newCellTarget, {
3513
+ focus: true
3514
+ });
3515
+ }
3516
+ return newCellTarget;
3517
+ }
3518
+ case "escape": {
3519
+ activateCell(newCellTarget, {
3520
+ focus: true
3521
+ });
3522
+ return newCellTarget;
3523
+ }
3524
+ case "tab": {
3525
+ if (cellIndex === lastCellIndex && rowIndex === lastRowIndex) {
3526
+ activateCell(newCellTarget, {
3527
+ focus: true
3528
+ });
3529
+ } else if (cellIndex === lastCellIndex) {
3530
+ newCellTarget = getCellTarget(table, rowIndex + 1, 0);
3531
+ activateCell(newCellTarget, {
3532
+ focus: true
3533
+ });
3534
+ } else {
3535
+ newCellTarget = getCellTarget(table, rowIndex, cellIndex + 1);
3536
+ activateCell(newCellTarget, {
3537
+ focus: true
3538
+ });
3539
+ }
3540
+ return newCellTarget;
3541
+ }
3542
+ case "shift-tab": {
3543
+ if (cellIndex === 0 && rowIndex === 1) {
3544
+ activateCell(newCellTarget, {
3545
+ focus: true
3546
+ });
3547
+ } else if (cellIndex === 0) {
3548
+ newCellTarget = getCellTarget(table, rowIndex - 1, 0);
3549
+ activateCell(newCellTarget, {
3550
+ focus: true
3551
+ });
3552
+ } else {
3553
+ newCellTarget = getCellTarget(table, rowIndex, cellIndex - 1);
3554
+ activateCell(newCellTarget, {
3555
+ focus: true
3556
+ });
3557
+ }
3558
+ return newCellTarget;
3559
+ }
3560
+ case "blur": {
3561
+ return newCellTarget;
3562
+ }
3563
+ }
3564
+ }
3521
3565
  function walk(array, childKey, visit, level = 1) {
3522
3566
  for (const item of array) {
3523
3567
  const visitChildren = visit(item, level);
@@ -3583,7 +3627,7 @@ function requireDoesNotExceedSafeInteger() {
3583
3627
  var $TypeError = TypeError;
3584
3628
  var MAX_SAFE_INTEGER = 9007199254740991;
3585
3629
  doesNotExceedSafeInteger = function(it) {
3586
- if (it > MAX_SAFE_INTEGER) throw $TypeError("Maximum allowed index exceeded");
3630
+ if (it > MAX_SAFE_INTEGER) throw new $TypeError("Maximum allowed index exceeded");
3587
3631
  return it;
3588
3632
  };
3589
3633
  return doesNotExceedSafeInteger;
@@ -4216,6 +4260,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4216
4260
  const hasError = vue.computed(() => validity.value.validityMode === "ERROR");
4217
4261
  const viewModeAriaInvalid = vue.computed(() => !inEdit.value && hasError.value ? true : void 0);
4218
4262
  const viewModeErrorMessage = vue.computed(() => !inEdit.value && hasError.value ? validity.value.validationMessage : void 0);
4263
+ let initialValidity = {
4264
+ ...validity.value
4265
+ };
4219
4266
  const divClasses = vue.computed(() => {
4220
4267
  return {
4221
4268
  "table-ng__editable": true,
@@ -4363,6 +4410,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4363
4410
  width
4364
4411
  } = tdElement.value.getBoundingClientRect();
4365
4412
  initialViewValue = viewValue.value;
4413
+ initialValidity = {
4414
+ ...validity.value
4415
+ };
4366
4416
  viewValue.value = value;
4367
4417
  tdElement.value.style.setProperty("width", `${String(width)}px`);
4368
4418
  inputElement.value.tabIndex = 0;
@@ -4425,6 +4475,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4425
4475
  switch (event.key) {
4426
4476
  case "Enter": {
4427
4477
  if (viewValue.value === initialViewValue) {
4478
+ validity.value = {
4479
+ ...initialValidity
4480
+ };
4428
4481
  onStopEdit({
4429
4482
  reason: "enter"
4430
4483
  });
@@ -4543,51 +4596,49 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4543
4596
  }
4544
4597
  });
4545
4598
  function normalizeAnchorColumn(column) {
4546
- var _column$key;
4547
4599
  return {
4548
4600
  type: "anchor",
4549
4601
  text: getValueFn(column.text, column.key, String, ""),
4550
- href: column.href,
4551
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4602
+ href: column.href
4552
4603
  };
4553
4604
  }
4605
+ function getSortable(column) {
4606
+ var _column$sort, _column$key;
4607
+ const shouldSort = (_column$sort = column.sort) !== null && _column$sort !== void 0 ? _column$sort : !!column.key;
4608
+ return shouldSort ? (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null : null;
4609
+ }
4554
4610
  function normalizeBaseColumn(column) {
4555
4611
  var _column$enabled;
4556
4612
  const id = /* @__PURE__ */ Symbol();
4557
4613
  const header = vue.toRef(column.header);
4558
4614
  const description = column.description !== void 0 ? vue.toRef(column.description) : vue.ref("");
4559
4615
  const size = column.size !== void 0 ? vue.toRef(column.size) : vue.ref("grow");
4616
+ const sortable = getSortable(column);
4560
4617
  return {
4561
4618
  id,
4562
4619
  header,
4563
4620
  description,
4621
+ sortable,
4564
4622
  size,
4565
4623
  enabled: (_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true
4566
4624
  };
4567
4625
  }
4568
4626
  function normalizeButtonColumn(column) {
4569
- var _column$icon, _column$key;
4627
+ var _column$icon;
4570
4628
  return {
4571
4629
  type: "button",
4572
4630
  text: getValueFn(column.text, column.key, String, ""),
4573
4631
  onClick: column.onClick,
4574
4632
  icon: (_column$icon = column.icon) !== null && _column$icon !== void 0 ? _column$icon : null,
4575
- iconLibrary: column.iconLibrary,
4576
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4633
+ iconLibrary: column.iconLibrary
4577
4634
  };
4578
4635
  }
4579
4636
  function normalizeCheckboxColumn(column) {
4580
- var _column$key;
4581
4637
  return {
4582
4638
  type: "checkbox",
4583
4639
  label: getLabelFn(column.label),
4584
4640
  checked: getValueFn(column.checked, column.key, Boolean, false),
4585
- update: getUpdateFn(column.update, column.key),
4586
- editable: typeof column.editable === "function" ? column.editable : () => {
4587
- var _column$editable;
4588
- return Boolean((_column$editable = column.editable) !== null && _column$editable !== void 0 ? _column$editable : false);
4589
- },
4590
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4641
+ update: getUpdateFn(column.update, column.key)
4591
4642
  };
4592
4643
  }
4593
4644
  function noop() {
@@ -4597,7 +4648,6 @@ function normalizeMenuColumn(column) {
4597
4648
  return {
4598
4649
  type: "menu",
4599
4650
  text: getValueFn(column.text, void 0, String, ""),
4600
- sortable: null,
4601
4651
  actions: ((_column$actions = column.actions) !== null && _column$actions !== void 0 ? _column$actions : []).map((it) => {
4602
4652
  var _it$icon, _it$onClick;
4603
4653
  return {
@@ -4609,7 +4659,7 @@ function normalizeMenuColumn(column) {
4609
4659
  };
4610
4660
  }
4611
4661
  function normalizeNumberColumn(column) {
4612
- var _column$parser, _column$formatter, _column$tnum, _column$align, _column$validation, _column$key;
4662
+ var _column$parser, _column$formatter, _column$tnum, _column$align, _column$validation;
4613
4663
  const type = column.type;
4614
4664
  const config = inputFieldConfig[type];
4615
4665
  const parser = (_column$parser = column.parser) !== null && _column$parser !== void 0 ? _column$parser : config.parser.bind(column);
@@ -4630,21 +4680,10 @@ function normalizeNumberColumn(column) {
4630
4680
  },
4631
4681
  validation: (_column$validation = column.validation) !== null && _column$validation !== void 0 ? _column$validation : {},
4632
4682
  hasValidation: column.type.startsWith("text:") || Boolean(column.validation),
4633
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null,
4634
4683
  formatter,
4635
4684
  parser
4636
4685
  };
4637
4686
  }
4638
- function normalizeRadioColumn(column) {
4639
- var _column$key;
4640
- return {
4641
- type: "radio",
4642
- label: getLabelFn(column.label),
4643
- checked: getValueFn(column.checked, column.key, Boolean, false),
4644
- update: getUpdateFn(column.update, column.key),
4645
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4646
- };
4647
- }
4648
4687
  function normalizeRenderColumn(column) {
4649
4688
  return {
4650
4689
  type: void 0,
@@ -4653,15 +4692,12 @@ function normalizeRenderColumn(column) {
4653
4692
  };
4654
4693
  }
4655
4694
  function normalizeRowHeaderColumn(column) {
4656
- var _column$key;
4657
4695
  return {
4658
4696
  type: "rowheader",
4659
- text: getValueFn(column.text, column.key, String, ""),
4660
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4697
+ text: getValueFn(column.text, column.key, String, "")
4661
4698
  };
4662
4699
  }
4663
4700
  function normalizeSelectColumn(column) {
4664
- var _column$key;
4665
4701
  return {
4666
4702
  type: "select",
4667
4703
  label: getLabelFn(column.label),
@@ -4671,12 +4707,10 @@ function normalizeSelectColumn(column) {
4671
4707
  var _column$editable;
4672
4708
  return Boolean((_column$editable = column.editable) !== null && _column$editable !== void 0 ? _column$editable : false);
4673
4709
  },
4674
- options: column.options,
4675
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4710
+ options: column.options
4676
4711
  };
4677
4712
  }
4678
4713
  function normalizeSimpleColumn(column) {
4679
- var _column$key;
4680
4714
  return {
4681
4715
  type: "text",
4682
4716
  label: () => "",
@@ -4686,7 +4720,6 @@ function normalizeSimpleColumn(column) {
4686
4720
  update() {
4687
4721
  },
4688
4722
  editable: () => false,
4689
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null,
4690
4723
  validation: {},
4691
4724
  hasValidation: false,
4692
4725
  formatter: (value) => value,
@@ -4694,7 +4727,7 @@ function normalizeSimpleColumn(column) {
4694
4727
  };
4695
4728
  }
4696
4729
  function normalizeTextColumn(column) {
4697
- var _column$parser, _column$formatter, _column$tnum, _column$align, _column$validation, _column$key;
4730
+ var _column$parser, _column$formatter, _column$tnum, _column$align, _column$validation;
4698
4731
  const type = column.type;
4699
4732
  const config = inputFieldConfig[type];
4700
4733
  const parser = (_column$parser = column.parser) !== null && _column$parser !== void 0 ? _column$parser : config.parser;
@@ -4713,7 +4746,6 @@ function normalizeTextColumn(column) {
4713
4746
  },
4714
4747
  validation: (_column$validation = column.validation) !== null && _column$validation !== void 0 ? _column$validation : {},
4715
4748
  hasValidation: column.type.startsWith("text:") || Boolean(column.validation),
4716
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null,
4717
4749
  formatter,
4718
4750
  parser
4719
4751
  };
@@ -4721,32 +4753,26 @@ function normalizeTextColumn(column) {
4721
4753
  function normalizeTableColumn(column) {
4722
4754
  const base = normalizeBaseColumn(column);
4723
4755
  if ("render" in column) {
4724
- return {
4756
+ return Object.freeze({
4725
4757
  ...normalizeRenderColumn(column),
4726
4758
  ...base
4727
- };
4759
+ });
4728
4760
  }
4729
4761
  switch (column.type) {
4730
4762
  case "checkbox":
4731
- return {
4763
+ return Object.freeze({
4732
4764
  ...normalizeCheckboxColumn(column),
4733
4765
  ...base,
4734
4766
  component: _sfc_main$c
4735
- };
4736
- case "radio":
4737
- return {
4738
- ...normalizeRadioColumn(column),
4739
- ...base,
4740
- component: _sfc_main$b
4741
- };
4767
+ });
4742
4768
  case "text:currency":
4743
4769
  case "text:number":
4744
4770
  case "text:percent":
4745
- return {
4771
+ return Object.freeze({
4746
4772
  ...normalizeNumberColumn(column),
4747
4773
  ...base,
4748
4774
  component: _sfc_main$4
4749
- };
4775
+ });
4750
4776
  case "text":
4751
4777
  case "text:bankAccountNumber":
4752
4778
  case "text:bankgiro":
@@ -4758,47 +4784,47 @@ function normalizeTableColumn(column) {
4758
4784
  case "text:phoneNumber":
4759
4785
  case "text:plusgiro":
4760
4786
  case "text:postalCode":
4761
- return {
4787
+ return Object.freeze({
4762
4788
  ...normalizeTextColumn(column),
4763
4789
  ...base,
4764
4790
  component: _sfc_main$4
4765
- };
4791
+ });
4766
4792
  case "rowheader":
4767
- return {
4793
+ return Object.freeze({
4768
4794
  ...normalizeRowHeaderColumn(column),
4769
4795
  ...base,
4770
4796
  component: _sfc_main$6
4771
- };
4797
+ });
4772
4798
  case "anchor":
4773
- return {
4799
+ return Object.freeze({
4774
4800
  ...normalizeAnchorColumn(column),
4775
4801
  ...base,
4776
4802
  component: _sfc_main$9
4777
- };
4803
+ });
4778
4804
  case "button":
4779
- return {
4805
+ return Object.freeze({
4780
4806
  ...normalizeButtonColumn(column),
4781
4807
  ...base,
4782
4808
  component: _sfc_main$8
4783
- };
4809
+ });
4784
4810
  case "select":
4785
- return {
4811
+ return Object.freeze({
4786
4812
  ...normalizeSelectColumn(column),
4787
4813
  ...base,
4788
4814
  component: _sfc_main$5
4789
- };
4815
+ });
4790
4816
  case "menu":
4791
- return {
4817
+ return Object.freeze({
4792
4818
  ...normalizeMenuColumn(column),
4793
4819
  ...base,
4794
4820
  component: _sfc_main$7
4795
- };
4821
+ });
4796
4822
  case void 0:
4797
- return {
4823
+ return Object.freeze({
4798
4824
  ...normalizeSimpleColumn(column),
4799
4825
  ...base,
4800
4826
  component: _sfc_main$4
4801
- };
4827
+ });
4802
4828
  }
4803
4829
  }
4804
4830
  function defineTableColumns(columns) {
@@ -4819,16 +4845,11 @@ function usePopupError() {
4819
4845
  anchor,
4820
4846
  arrowAnchor,
4821
4847
  hasFocus,
4822
- hasHover,
4823
- inEdit
4848
+ hasHover
4824
4849
  } = popupError;
4825
4850
  if (!anchor || !arrowAnchor) {
4826
4851
  return;
4827
4852
  }
4828
- if (inEdit) {
4829
- onClosePopupError(popupError);
4830
- return;
4831
- }
4832
4853
  if (hasFocus || hasHover) {
4833
4854
  await open(popupError);
4834
4855
  } else {
@@ -4901,27 +4922,6 @@ function requireGetBuiltInPrototypeMethod() {
4901
4922
  };
4902
4923
  return getBuiltInPrototypeMethod;
4903
4924
  }
4904
- var addToUnscopables;
4905
- var hasRequiredAddToUnscopables;
4906
- function requireAddToUnscopables() {
4907
- if (hasRequiredAddToUnscopables) return addToUnscopables;
4908
- hasRequiredAddToUnscopables = 1;
4909
- var wellKnownSymbol2 = requireWellKnownSymbol();
4910
- var create = requireObjectCreate();
4911
- var defineProperty = requireObjectDefineProperty().f;
4912
- var UNSCOPABLES = wellKnownSymbol2("unscopables");
4913
- var ArrayPrototype = Array.prototype;
4914
- if (ArrayPrototype[UNSCOPABLES] === void 0) {
4915
- defineProperty(ArrayPrototype, UNSCOPABLES, {
4916
- configurable: true,
4917
- value: create(null)
4918
- });
4919
- }
4920
- addToUnscopables = function(key) {
4921
- ArrayPrototype[UNSCOPABLES][key] = true;
4922
- };
4923
- return addToUnscopables;
4924
- }
4925
4925
  var hasRequiredEs_array_toSorted;
4926
4926
  function requireEs_array_toSorted() {
4927
4927
  if (hasRequiredEs_array_toSorted) return es_array_toSorted;
@@ -5202,26 +5202,32 @@ const _hoisted_2$1 = {
5202
5202
  "data-test": "caption"
5203
5203
  };
5204
5204
  const _hoisted_3$1 = {
5205
+ key: 1
5206
+ };
5207
+ const _hoisted_4$1 = {
5205
5208
  class: "table-ng__row",
5206
5209
  "aria-rowindex": "1"
5207
5210
  };
5208
- const _hoisted_4$1 = {
5211
+ const _hoisted_5$1 = {
5209
5212
  key: 0,
5210
5213
  scope: "col",
5211
5214
  tabindex: "-1",
5212
5215
  class: "table-ng__column"
5213
5216
  };
5214
- const _hoisted_5$1 = {
5217
+ const _hoisted_6$1 = {
5218
+ key: 2
5219
+ };
5220
+ const _hoisted_7$1 = {
5215
5221
  key: 0,
5216
5222
  class: "table-ng__row--empty"
5217
5223
  };
5218
- const _hoisted_6$1 = ["colspan"];
5219
- const _hoisted_7$1 = ["aria-level", "aria-rowindex", "aria-setsize", "aria-posinset", "aria-selected"];
5220
- const _hoisted_8 = {
5221
- key: 1
5224
+ const _hoisted_8 = ["colspan"];
5225
+ const _hoisted_9 = ["aria-level", "aria-rowindex", "aria-setsize", "aria-posinset", "aria-selected"];
5226
+ const _hoisted_10 = {
5227
+ key: 3
5222
5228
  };
5223
- const _hoisted_9 = ["aria-rowindex"];
5224
- const _hoisted_10 = ["colspan"];
5229
+ const _hoisted_11 = ["aria-rowindex"];
5230
+ const _hoisted_12 = ["colspan"];
5225
5231
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5226
5232
  __name: "FTable",
5227
5233
  props: /* @__PURE__ */ vue.mergeModels({
@@ -5233,6 +5239,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5233
5239
  expandableAttribute: {
5234
5240
  default: () => void 0
5235
5241
  },
5242
+ rowClass: {
5243
+ type: Function,
5244
+ default: void 0
5245
+ },
5236
5246
  striped: {
5237
5247
  type: Boolean
5238
5248
  },
@@ -5272,20 +5282,35 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5272
5282
  return metaRows.value.length === 0;
5273
5283
  });
5274
5284
  const ariaRowcount = vue.computed(() => {
5275
- const headerRow = 1;
5276
5285
  const footerRow = hasFooter.value ? 1 : 0;
5277
- return getBodyRowCount(keyedRows.value, __props.expandableAttribute) + headerRow + footerRow;
5286
+ if (!hasColumns.value) {
5287
+ return footerRow;
5288
+ }
5289
+ const headerRow = 1;
5290
+ const bodyRows = getBodyRowCount(keyedRows.value, __props.expandableAttribute);
5291
+ return bodyRows + headerRow + footerRow;
5292
+ });
5293
+ const fullColspan = vue.computed(() => {
5294
+ if (!hasColumns.value) {
5295
+ return 0;
5296
+ }
5297
+ let count = columns.value.length;
5298
+ if (isTreegrid.value) {
5299
+ count += 1;
5300
+ }
5301
+ if (__props.selectable) {
5302
+ count += 1;
5303
+ }
5304
+ return count;
5278
5305
  });
5279
- const columnCount = vue.computed(() => {
5280
- const expandCol = isTreegrid.value ? 1 : 0;
5281
- const selectCol = __props.selectable ? 1 : 0;
5282
- const count = columns.value.length + expandCol + selectCol;
5283
- return Math.max(1, count);
5306
+ const expandedColspan = vue.computed(() => {
5307
+ return fullColspan.value - 1;
5284
5308
  });
5285
5309
  const hasFooter = vue.computed(() => {
5286
5310
  return hasSlot("footer");
5287
5311
  });
5288
5312
  const columns = vue.computed(() => normalizeTableColumns(__props.columns).filter((col) => vue.toValue(col.enabled)));
5313
+ const hasColumns = vue.computed(() => columns.value.length > 0);
5289
5314
  const tableClasses = vue.computed(() => {
5290
5315
  return ["table-ng", {
5291
5316
  "table-ng--striped": __props.striped,
@@ -5300,6 +5325,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5300
5325
  stopEdit(element, reason);
5301
5326
  }
5302
5327
  vue.provide(stopEditKey, stopEditHandler);
5328
+ function getRowClass(row) {
5329
+ return typeof __props.rowClass === "function" ? __props.rowClass(row) : void 0;
5330
+ }
5303
5331
  function onToggleExpanded(key) {
5304
5332
  if (expandedKeys.value.has(key)) {
5305
5333
  expandedKeys.value.delete(key);
@@ -5449,7 +5477,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5449
5477
  onFocusout: onTableFocusout,
5450
5478
  onClick,
5451
5479
  onKeydown
5452
- }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_3$1, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$1)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
5480
+ }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), hasColumns.value ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_3$1, [vue.createElementVNode("tr", _hoisted_4$1, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$1)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
5453
5481
  key: 1,
5454
5482
  ref: bindCellApiRef,
5455
5483
  state: vue.unref(selectableHeaderState)(),
@@ -5464,10 +5492,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5464
5492
  scope: "col",
5465
5493
  onToggleSortOrder
5466
5494
  }, null, 8, ["column", "sort-enabled", "sort-order"]);
5467
- }), 128))])]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$1, [vue.createElementVNode("td", {
5468
- colspan: columnCount.value,
5495
+ }), 128))])])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), hasColumns.value ? (vue.openBlock(), vue.createElementBlock("tbody", _hoisted_6$1, [isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_7$1, [vue.createElementVNode("td", {
5496
+ colspan: fullColspan.value,
5469
5497
  class: "table-ng__cell"
5470
- }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(vue.unref($t)("fkui.ftable.empty.text", "Tabellen är tom")), 1)])], 8, _hoisted_6$1)])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
5498
+ }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(vue.unref($t)("fkui.ftable.empty.text", "Tabellen är tom")), 1)])], 8, _hoisted_8)])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
5471
5499
  key: 1
5472
5500
  }, vue.renderList(metaRows.value, ({
5473
5501
  key,
@@ -5481,7 +5509,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5481
5509
  }) => {
5482
5510
  return vue.openBlock(), vue.createElementBlock("tr", {
5483
5511
  key,
5484
- class: "table-ng__row",
5512
+ class: vue.normalizeClass(["table-ng__row", getRowClass(row)]),
5485
5513
  "aria-level": level,
5486
5514
  "aria-rowindex": rowIndex,
5487
5515
  "aria-setsize": setsize,
@@ -5497,7 +5525,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5497
5525
  onToggle: onToggleExpanded
5498
5526
  }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
5499
5527
  key: 1,
5500
- colspan: columns.value.length
5528
+ colspan: expandedColspan.value
5501
5529
  }, {
5502
5530
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "expandable", vue.mergeProps({
5503
5531
  ref_for: true
@@ -5532,14 +5560,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5532
5560
  key: 1,
5533
5561
  row
5534
5562
  }, null, 8, ["row"])) : vue.createCommentVNode("", true)], 64);
5535
- }), 128))], 64))], 8, _hoisted_7$1);
5536
- }), 128))]), _cache[6] || (_cache[6] = vue.createTextVNode()), hasFooter.value ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_8, [vue.createElementVNode("tr", {
5563
+ }), 128))], 64))], 10, _hoisted_9);
5564
+ }), 128))])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), hasFooter.value ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_10, [vue.createElementVNode("tr", {
5537
5565
  class: "table-ng__row",
5538
5566
  "aria-rowindex": ariaRowcount.value
5539
5567
  }, [vue.createElementVNode("td", {
5540
- colspan: columnCount.value,
5568
+ colspan: fullColspan.value,
5541
5569
  class: "table-ng__cell--custom"
5542
- }, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_10)], 8, _hoisted_9)])) : vue.createCommentVNode("", true)], 42, _hoisted_1$2);
5570
+ }, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_12)], 8, _hoisted_11)])) : vue.createCommentVNode("", true)], 42, _hoisted_1$2);
5543
5571
  };
5544
5572
  }
5545
5573
  });
@@ -5841,6 +5869,7 @@ function requireArrayBufferTransfer() {
5841
5869
  var structuredClone = globalThis2.structuredClone;
5842
5870
  var ArrayBuffer2 = globalThis2.ArrayBuffer;
5843
5871
  var DataView2 = globalThis2.DataView;
5872
+ var max = Math.max;
5844
5873
  var min = Math.min;
5845
5874
  var ArrayBufferPrototype = ArrayBuffer2.prototype;
5846
5875
  var DataViewPrototype = DataView2.prototype;
@@ -5865,7 +5894,7 @@ function requireArrayBufferTransfer() {
5865
5894
  newBuffer = slice(arrayBuffer, 0, newByteLength);
5866
5895
  } else {
5867
5896
  var options = preserveResizability && !fixedLength && maxByteLength ? {
5868
- maxByteLength: maxByteLength(arrayBuffer)
5897
+ maxByteLength: max(newByteLength, maxByteLength(arrayBuffer))
5869
5898
  } : void 0;
5870
5899
  newBuffer = new ArrayBuffer2(newByteLength, options);
5871
5900
  var a = new DataView2(arrayBuffer);
@@ -5913,78 +5942,6 @@ function requireEs_arrayBuffer_transferToFixedLength() {
5913
5942
  return es_arrayBuffer_transferToFixedLength;
5914
5943
  }
5915
5944
  requireEs_arrayBuffer_transferToFixedLength();
5916
- var es_iterator_reduce = {};
5917
- var functionApply;
5918
- var hasRequiredFunctionApply;
5919
- function requireFunctionApply() {
5920
- if (hasRequiredFunctionApply) return functionApply;
5921
- hasRequiredFunctionApply = 1;
5922
- var NATIVE_BIND = requireFunctionBindNative();
5923
- var FunctionPrototype = Function.prototype;
5924
- var apply = FunctionPrototype.apply;
5925
- var call = FunctionPrototype.call;
5926
- functionApply = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
5927
- return call.apply(apply, arguments);
5928
- });
5929
- return functionApply;
5930
- }
5931
- var hasRequiredEs_iterator_reduce;
5932
- function requireEs_iterator_reduce() {
5933
- if (hasRequiredEs_iterator_reduce) return es_iterator_reduce;
5934
- hasRequiredEs_iterator_reduce = 1;
5935
- var $ = require_export();
5936
- var iterate2 = requireIterate();
5937
- var aCallable2 = requireACallable();
5938
- var anObject2 = requireAnObject();
5939
- var getIteratorDirect2 = requireGetIteratorDirect();
5940
- var iteratorClose2 = requireIteratorClose();
5941
- var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
5942
- var apply = requireFunctionApply();
5943
- var fails2 = requireFails();
5944
- var $TypeError = TypeError;
5945
- var FAILS_ON_INITIAL_UNDEFINED = fails2(function() {
5946
- [].keys().reduce(function() {
5947
- }, void 0);
5948
- });
5949
- var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError2("reduce", $TypeError);
5950
- $({
5951
- target: "Iterator",
5952
- proto: true,
5953
- real: true,
5954
- forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError
5955
- }, {
5956
- reduce: function reduce(reducer) {
5957
- anObject2(this);
5958
- try {
5959
- aCallable2(reducer);
5960
- } catch (error) {
5961
- iteratorClose2(this, "throw", error);
5962
- }
5963
- var noInitial = arguments.length < 2;
5964
- var accumulator = noInitial ? void 0 : arguments[1];
5965
- if (reduceWithoutClosingOnEarlyError) {
5966
- return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
5967
- }
5968
- var record = getIteratorDirect2(this);
5969
- var counter = 0;
5970
- iterate2(record, function(value) {
5971
- if (noInitial) {
5972
- noInitial = false;
5973
- accumulator = value;
5974
- } else {
5975
- accumulator = reducer(accumulator, value, counter);
5976
- }
5977
- counter++;
5978
- }, {
5979
- IS_RECORD: true
5980
- });
5981
- if (noInitial) throw new $TypeError("Reduce of empty iterator with no initial value");
5982
- return accumulator;
5983
- }
5984
- });
5985
- return es_iterator_reduce;
5986
- }
5987
- requireEs_iterator_reduce();
5988
5945
  var es_typedArray_toReversed = {};
5989
5946
  var isPossiblePrototype;
5990
5947
  var hasRequiredIsPossiblePrototype;
@@ -6197,7 +6154,7 @@ function requireArrayBufferViewCore() {
6197
6154
  }
6198
6155
  });
6199
6156
  for (NAME in TypedArrayConstructorsList) if (globalThis2[NAME]) {
6200
- createNonEnumerableProperty2(globalThis2[NAME], TYPED_ARRAY_TAG, NAME);
6157
+ createNonEnumerableProperty2(globalThis2[NAME].prototype, TYPED_ARRAY_TAG, NAME);
6201
6158
  }
6202
6159
  }
6203
6160
  arrayBufferViewCore = {
@@ -6601,26 +6558,25 @@ function requireUint8FromHex() {
6601
6558
  var uncurryThis = requireFunctionUncurryThis();
6602
6559
  var Uint8Array2 = globalThis2.Uint8Array;
6603
6560
  var SyntaxError = globalThis2.SyntaxError;
6604
- var parseInt = globalThis2.parseInt;
6605
6561
  var min = Math.min;
6606
- var NOT_HEX = /[^\da-f]/i;
6607
- var exec = uncurryThis(NOT_HEX.exec);
6608
- var stringSlice = uncurryThis("".slice);
6562
+ var stringMatch = uncurryThis("".match);
6609
6563
  uint8FromHex = function(string, into) {
6610
6564
  var stringLength = string.length;
6611
6565
  if (stringLength % 2 !== 0) throw new SyntaxError("String should be an even number of characters");
6612
6566
  var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2;
6613
6567
  var bytes = into || new Uint8Array2(maxLength);
6614
- var read = 0;
6568
+ var segments = stringMatch(string, /.{2}/g);
6615
6569
  var written = 0;
6616
- while (written < maxLength) {
6617
- var hexits = stringSlice(string, read, read += 2);
6618
- if (exec(NOT_HEX, hexits)) throw new SyntaxError("String should only contain hex characters");
6619
- bytes[written++] = parseInt(hexits, 16);
6570
+ for (; written < maxLength; written++) {
6571
+ var result = +("0x" + segments[written] + "0");
6572
+ if (result !== result) {
6573
+ throw new SyntaxError("String should only contain hex characters");
6574
+ }
6575
+ bytes[written] = result >> 4;
6620
6576
  }
6621
6577
  return {
6622
6578
  bytes,
6623
- read
6579
+ read: written << 1
6624
6580
  };
6625
6581
  };
6626
6582
  return uint8FromHex;
@@ -6735,6 +6691,8 @@ function requireEs_uint8Array_toHex() {
6735
6691
  var anUint8Array2 = requireAnUint8Array();
6736
6692
  var notDetached = requireArrayBufferNotDetached();
6737
6693
  var numberToString = uncurryThis(1.1.toString);
6694
+ var join = uncurryThis([].join);
6695
+ var $Array = Array;
6738
6696
  var Uint8Array2 = globalThis2.Uint8Array;
6739
6697
  var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array2 || !Uint8Array2.prototype.toHex || !(function() {
6740
6698
  try {
@@ -6752,12 +6710,12 @@ function requireEs_uint8Array_toHex() {
6752
6710
  toHex: function toHex() {
6753
6711
  anUint8Array2(this);
6754
6712
  notDetached(this.buffer);
6755
- var result = "";
6713
+ var result = $Array(this.length);
6756
6714
  for (var i = 0, length = this.length; i < length; i++) {
6757
6715
  var hex = numberToString(this[i], 16);
6758
- result += hex.length === 1 ? "0" + hex : hex;
6716
+ result[i] = hex.length === 1 ? "0" + hex : hex;
6759
6717
  }
6760
- return result;
6718
+ return join(result, "");
6761
6719
  }
6762
6720
  });
6763
6721
  return es_uint8Array_toHex;
@@ -7316,6 +7274,78 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
7316
7274
  });
7317
7275
  const HOURS_MINUTES_REGEXP = /^(?<hours>\d+)?(:(?<minutes>[0-5]\d))?$/;
7318
7276
  const HOURS_MINUTES_WITHOUT_COLON_REGEXP = /^(?<hours>\d{2})(?<minutes>[0-5]\d)$/;
7277
+ var es_iterator_reduce = {};
7278
+ var functionApply;
7279
+ var hasRequiredFunctionApply;
7280
+ function requireFunctionApply() {
7281
+ if (hasRequiredFunctionApply) return functionApply;
7282
+ hasRequiredFunctionApply = 1;
7283
+ var NATIVE_BIND = requireFunctionBindNative();
7284
+ var FunctionPrototype = Function.prototype;
7285
+ var apply = FunctionPrototype.apply;
7286
+ var call = FunctionPrototype.call;
7287
+ functionApply = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
7288
+ return call.apply(apply, arguments);
7289
+ });
7290
+ return functionApply;
7291
+ }
7292
+ var hasRequiredEs_iterator_reduce;
7293
+ function requireEs_iterator_reduce() {
7294
+ if (hasRequiredEs_iterator_reduce) return es_iterator_reduce;
7295
+ hasRequiredEs_iterator_reduce = 1;
7296
+ var $ = require_export();
7297
+ var iterate2 = requireIterate();
7298
+ var aCallable2 = requireACallable();
7299
+ var anObject2 = requireAnObject();
7300
+ var getIteratorDirect2 = requireGetIteratorDirect();
7301
+ var iteratorClose2 = requireIteratorClose();
7302
+ var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
7303
+ var apply = requireFunctionApply();
7304
+ var fails2 = requireFails();
7305
+ var $TypeError = TypeError;
7306
+ var FAILS_ON_INITIAL_UNDEFINED = fails2(function() {
7307
+ [].keys().reduce(function() {
7308
+ }, void 0);
7309
+ });
7310
+ var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError2("reduce", $TypeError);
7311
+ $({
7312
+ target: "Iterator",
7313
+ proto: true,
7314
+ real: true,
7315
+ forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError
7316
+ }, {
7317
+ reduce: function reduce(reducer) {
7318
+ anObject2(this);
7319
+ try {
7320
+ aCallable2(reducer);
7321
+ } catch (error) {
7322
+ iteratorClose2(this, "throw", error);
7323
+ }
7324
+ var noInitial = arguments.length < 2;
7325
+ var accumulator = noInitial ? void 0 : arguments[1];
7326
+ if (reduceWithoutClosingOnEarlyError) {
7327
+ return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
7328
+ }
7329
+ var record = getIteratorDirect2(this);
7330
+ var counter = 0;
7331
+ iterate2(record, function(value) {
7332
+ if (noInitial) {
7333
+ noInitial = false;
7334
+ accumulator = value;
7335
+ } else {
7336
+ accumulator = reducer(accumulator, value, counter);
7337
+ }
7338
+ counter++;
7339
+ }, {
7340
+ IS_RECORD: true
7341
+ });
7342
+ if (noInitial) throw new $TypeError("Reduce of empty iterator with no initial value");
7343
+ return accumulator;
7344
+ }
7345
+ });
7346
+ return es_iterator_reduce;
7347
+ }
7348
+ requireEs_iterator_reduce();
7319
7349
  function findMatch(regexps, value) {
7320
7350
  for (const regexp of regexps) {
7321
7351
  const match = value.match(regexp);