@fkui/vue-labs 6.38.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
  }
@@ -1782,6 +1786,224 @@ function requireEs_iterator_constructor() {
1782
1786
  return es_iterator_constructor;
1783
1787
  }
1784
1788
  requireEs_iterator_constructor();
1789
+ var es_iterator_filter = {};
1790
+ var defineBuiltIns;
1791
+ var hasRequiredDefineBuiltIns;
1792
+ function requireDefineBuiltIns() {
1793
+ if (hasRequiredDefineBuiltIns) return defineBuiltIns;
1794
+ hasRequiredDefineBuiltIns = 1;
1795
+ var defineBuiltIn2 = requireDefineBuiltIn();
1796
+ defineBuiltIns = function(target, src, options) {
1797
+ for (var key in src) defineBuiltIn2(target, key, src[key], options);
1798
+ return target;
1799
+ };
1800
+ return defineBuiltIns;
1801
+ }
1802
+ var createIterResultObject;
1803
+ var hasRequiredCreateIterResultObject;
1804
+ function requireCreateIterResultObject() {
1805
+ if (hasRequiredCreateIterResultObject) return createIterResultObject;
1806
+ hasRequiredCreateIterResultObject = 1;
1807
+ createIterResultObject = function(value, done) {
1808
+ return {
1809
+ value,
1810
+ done
1811
+ };
1812
+ };
1813
+ return createIterResultObject;
1814
+ }
1815
+ var iteratorCloseAll;
1816
+ var hasRequiredIteratorCloseAll;
1817
+ function requireIteratorCloseAll() {
1818
+ if (hasRequiredIteratorCloseAll) return iteratorCloseAll;
1819
+ hasRequiredIteratorCloseAll = 1;
1820
+ var iteratorClose2 = requireIteratorClose();
1821
+ iteratorCloseAll = function(iters, kind, value) {
1822
+ for (var i = iters.length - 1; i >= 0; i--) {
1823
+ if (iters[i] === void 0) continue;
1824
+ try {
1825
+ value = iteratorClose2(iters[i].iterator, kind, value);
1826
+ } catch (error) {
1827
+ kind = "throw";
1828
+ value = error;
1829
+ }
1830
+ }
1831
+ if (kind === "throw") throw value;
1832
+ return value;
1833
+ };
1834
+ return iteratorCloseAll;
1835
+ }
1836
+ var iteratorCreateProxy;
1837
+ var hasRequiredIteratorCreateProxy;
1838
+ function requireIteratorCreateProxy() {
1839
+ if (hasRequiredIteratorCreateProxy) return iteratorCreateProxy;
1840
+ hasRequiredIteratorCreateProxy = 1;
1841
+ var call = requireFunctionCall();
1842
+ var create = requireObjectCreate();
1843
+ var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
1844
+ var defineBuiltIns2 = requireDefineBuiltIns();
1845
+ var wellKnownSymbol2 = requireWellKnownSymbol();
1846
+ var InternalStateModule = requireInternalState();
1847
+ var getMethod2 = requireGetMethod();
1848
+ var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
1849
+ var createIterResultObject2 = requireCreateIterResultObject();
1850
+ var iteratorClose2 = requireIteratorClose();
1851
+ var iteratorCloseAll2 = requireIteratorCloseAll();
1852
+ var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
1853
+ var ITERATOR_HELPER = "IteratorHelper";
1854
+ var WRAP_FOR_VALID_ITERATOR = "WrapForValidIterator";
1855
+ var NORMAL = "normal";
1856
+ var THROW = "throw";
1857
+ var setInternalState = InternalStateModule.set;
1858
+ var createIteratorProxyPrototype = function(IS_ITERATOR) {
1859
+ var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
1860
+ return defineBuiltIns2(create(IteratorPrototype), {
1861
+ next: function next() {
1862
+ var state = getInternalState(this);
1863
+ if (IS_ITERATOR) return state.nextHandler();
1864
+ if (state.done) return createIterResultObject2(void 0, true);
1865
+ try {
1866
+ var result = state.nextHandler();
1867
+ return state.returnHandlerResult ? result : createIterResultObject2(result, state.done);
1868
+ } catch (error) {
1869
+ state.done = true;
1870
+ throw error;
1871
+ }
1872
+ },
1873
+ "return": function() {
1874
+ var state = getInternalState(this);
1875
+ var iterator = state.iterator;
1876
+ var done = state.done;
1877
+ state.done = true;
1878
+ if (IS_ITERATOR) {
1879
+ var returnMethod = getMethod2(iterator, "return");
1880
+ return returnMethod ? call(returnMethod, iterator) : createIterResultObject2(void 0, true);
1881
+ }
1882
+ if (done) return createIterResultObject2(void 0, true);
1883
+ if (state.inner) try {
1884
+ iteratorClose2(state.inner.iterator, NORMAL);
1885
+ } catch (error) {
1886
+ return iteratorClose2(iterator, THROW, error);
1887
+ }
1888
+ if (state.openIters) try {
1889
+ iteratorCloseAll2(state.openIters, NORMAL);
1890
+ } catch (error) {
1891
+ if (iterator) return iteratorClose2(iterator, THROW, error);
1892
+ throw error;
1893
+ }
1894
+ if (iterator) iteratorClose2(iterator, NORMAL);
1895
+ return createIterResultObject2(void 0, true);
1896
+ }
1897
+ });
1898
+ };
1899
+ var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
1900
+ var IteratorHelperPrototype = createIteratorProxyPrototype(false);
1901
+ createNonEnumerableProperty2(IteratorHelperPrototype, TO_STRING_TAG, "Iterator Helper");
1902
+ iteratorCreateProxy = function(nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
1903
+ var IteratorProxy = function Iterator2(record, state) {
1904
+ if (state) {
1905
+ state.iterator = record.iterator;
1906
+ state.next = record.next;
1907
+ } else state = record;
1908
+ state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
1909
+ state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
1910
+ state.nextHandler = nextHandler;
1911
+ state.counter = 0;
1912
+ state.done = false;
1913
+ setInternalState(this, state);
1914
+ };
1915
+ IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
1916
+ return IteratorProxy;
1917
+ };
1918
+ return iteratorCreateProxy;
1919
+ }
1920
+ var callWithSafeIterationClosing;
1921
+ var hasRequiredCallWithSafeIterationClosing;
1922
+ function requireCallWithSafeIterationClosing() {
1923
+ if (hasRequiredCallWithSafeIterationClosing) return callWithSafeIterationClosing;
1924
+ hasRequiredCallWithSafeIterationClosing = 1;
1925
+ var anObject2 = requireAnObject();
1926
+ var iteratorClose2 = requireIteratorClose();
1927
+ callWithSafeIterationClosing = function(iterator, fn, value, ENTRIES) {
1928
+ try {
1929
+ return ENTRIES ? fn(anObject2(value)[0], value[1]) : fn(value);
1930
+ } catch (error) {
1931
+ iteratorClose2(iterator, "throw", error);
1932
+ }
1933
+ };
1934
+ return callWithSafeIterationClosing;
1935
+ }
1936
+ var iteratorHelperThrowsOnInvalidIterator;
1937
+ var hasRequiredIteratorHelperThrowsOnInvalidIterator;
1938
+ function requireIteratorHelperThrowsOnInvalidIterator() {
1939
+ if (hasRequiredIteratorHelperThrowsOnInvalidIterator) return iteratorHelperThrowsOnInvalidIterator;
1940
+ hasRequiredIteratorHelperThrowsOnInvalidIterator = 1;
1941
+ iteratorHelperThrowsOnInvalidIterator = function(methodName, argument) {
1942
+ var method = typeof Iterator == "function" && Iterator.prototype[methodName];
1943
+ if (method) try {
1944
+ method.call({
1945
+ next: null
1946
+ }, argument).next();
1947
+ } catch (error) {
1948
+ return true;
1949
+ }
1950
+ };
1951
+ return iteratorHelperThrowsOnInvalidIterator;
1952
+ }
1953
+ var hasRequiredEs_iterator_filter;
1954
+ function requireEs_iterator_filter() {
1955
+ if (hasRequiredEs_iterator_filter) return es_iterator_filter;
1956
+ hasRequiredEs_iterator_filter = 1;
1957
+ var $ = require_export();
1958
+ var call = requireFunctionCall();
1959
+ var aCallable2 = requireACallable();
1960
+ var anObject2 = requireAnObject();
1961
+ var getIteratorDirect2 = requireGetIteratorDirect();
1962
+ var createIteratorProxy = requireIteratorCreateProxy();
1963
+ var callWithSafeIterationClosing2 = requireCallWithSafeIterationClosing();
1964
+ var IS_PURE = requireIsPure();
1965
+ var iteratorClose2 = requireIteratorClose();
1966
+ var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
1967
+ var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
1968
+ var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("filter", function() {
1969
+ });
1970
+ var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("filter", TypeError);
1971
+ var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;
1972
+ var IteratorProxy = createIteratorProxy(function() {
1973
+ var iterator = this.iterator;
1974
+ var predicate = this.predicate;
1975
+ var next = this.next;
1976
+ var result, done, value;
1977
+ while (true) {
1978
+ result = anObject2(call(next, iterator));
1979
+ done = this.done = !!result.done;
1980
+ if (done) return;
1981
+ value = result.value;
1982
+ if (callWithSafeIterationClosing2(iterator, predicate, [value, this.counter++], true)) return value;
1983
+ }
1984
+ });
1985
+ $({
1986
+ target: "Iterator",
1987
+ proto: true,
1988
+ real: true,
1989
+ forced: FORCED
1990
+ }, {
1991
+ filter: function filter(predicate) {
1992
+ anObject2(this);
1993
+ try {
1994
+ aCallable2(predicate);
1995
+ } catch (error) {
1996
+ iteratorClose2(this, "throw", error);
1997
+ }
1998
+ if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);
1999
+ return new IteratorProxy(getIteratorDirect2(this), {
2000
+ predicate
2001
+ });
2002
+ }
2003
+ });
2004
+ return es_iterator_filter;
2005
+ }
2006
+ requireEs_iterator_filter();
1785
2007
  var es_set_difference_v2 = {};
1786
2008
  var setHelpers;
1787
2009
  var hasRequiredSetHelpers;
@@ -1951,7 +2173,7 @@ function requireSetDifference() {
1951
2173
  var O = aSet2(this);
1952
2174
  var otherRec = getSetRecord2(other);
1953
2175
  var result = clone(O);
1954
- if (size(O) <= otherRec.size) iterateSet(O, function(e) {
2176
+ if (size(result) <= otherRec.size) iterateSet(result, function(e) {
1955
2177
  if (otherRec.includes(e)) remove(result, e);
1956
2178
  });
1957
2179
  else iterateSimple2(otherRec.getIterator(), function(e) {
@@ -2140,7 +2362,7 @@ function requireSetIsDisjointFrom() {
2140
2362
  }, true) !== false;
2141
2363
  var iterator = otherRec.getIterator();
2142
2364
  return iterateSimple2(iterator, function(e) {
2143
- if (has(O, e)) return iteratorClose2(iterator, "normal", false);
2365
+ if (has(O, e)) return iteratorClose2(iterator.iterator, "normal", false);
2144
2366
  }) !== false;
2145
2367
  };
2146
2368
  return setIsDisjointFrom;
@@ -2225,7 +2447,7 @@ function requireSetIsSupersetOf() {
2225
2447
  if (size(O) < otherRec.size) return false;
2226
2448
  var iterator = otherRec.getIterator();
2227
2449
  return iterateSimple2(iterator, function(e) {
2228
- if (!has(O, e)) return iteratorClose2(iterator, "normal", false);
2450
+ if (!has(O, e)) return iteratorClose2(iterator.iterator, "normal", false);
2229
2451
  }) !== false;
2230
2452
  };
2231
2453
  return setIsSupersetOf;
@@ -2374,251 +2596,12 @@ function requireEs_set_union_v2() {
2374
2596
  return es_set_union_v2;
2375
2597
  }
2376
2598
  requireEs_set_union_v2();
2377
- function isFTableCellApi(value) {
2378
- return value !== null && typeof value === "object" && Boolean(value.tabstopEl);
2379
- }
2380
- const tableCellApiSymbol = /* @__PURE__ */ Symbol("table:cell-api");
2381
- const navKeys = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"];
2382
- let prevCellIndex = void 0;
2383
- function getCellTarget(tableElement, rowIndex, cellIndex) {
2384
- return tableElement.rows[rowIndex].cells[cellIndex];
2385
- }
2386
- function getTr(td) {
2387
- return td.parentElement;
2388
- }
2389
- function getTable(tr) {
2390
- return tr.closest("table");
2391
- }
2392
- function getLastRowIndex(tableElement) {
2393
- return tableElement.rows.length - 1;
2394
- }
2395
- function getLastCellIndex(tableElement) {
2396
- return tableElement.rows[0].cells.length - 1;
2397
- }
2398
- function getVerticalNavIndex(table, from, to) {
2399
- const target = {
2400
- ...to
2401
- };
2402
- const currentMax = table.rows[from.row].cells.length - 1;
2403
- const targetMax = table.rows[to.row].cells.length - 1;
2404
- if (prevCellIndex && currentMax < targetMax) {
2405
- target.cell = prevCellIndex;
2406
- prevCellIndex = void 0;
2407
- } else {
2408
- target.cell = targetMax < from.cell ? targetMax : from.cell;
2409
- }
2410
- if (targetMax < from.cell) {
2411
- prevCellIndex = from.cell;
2412
- }
2413
- return target;
2414
- }
2415
- function isDefined(value) {
2416
- return value.row !== void 0 && value.cell !== void 0;
2417
- }
2418
- function navigate(e, table, from, last) {
2419
- if (!isDefined(from) || !isDefined(last)) {
2420
- return;
2421
- }
2422
- if (!navKeys.includes(e.code)) {
2423
- return;
2424
- }
2425
- e.preventDefault();
2426
- if (e.code === "ArrowLeft") {
2427
- if (from.cell === 0) {
2428
- return;
2429
- }
2430
- prevCellIndex = void 0;
2431
- return {
2432
- row: from.row,
2433
- cell: from.cell - 1
2434
- };
2435
- }
2436
- if (e.code === "ArrowRight") {
2437
- if (from.cell === last.cell) {
2438
- return;
2439
- }
2440
- const lastCellIndex = table.rows[from.row].cells.length - 1;
2441
- if (lastCellIndex <= from.cell) {
2442
- return;
2443
- }
2444
- prevCellIndex = void 0;
2445
- return {
2446
- row: from.row,
2447
- cell: from.cell + 1
2448
- };
2449
- }
2450
- if (e.code === "ArrowUp") {
2451
- if (from.row === 0) {
2452
- return;
2453
- }
2454
- const to = {
2455
- row: from.row - 1,
2456
- cell: from.cell
2457
- };
2458
- return getVerticalNavIndex(table, from, to);
2459
- }
2460
- if (e.code === "ArrowDown") {
2461
- if (from.row === last.row) {
2462
- return;
2463
- }
2464
- const to = {
2465
- row: from.row + 1,
2466
- cell: from.cell
2467
- };
2468
- return getVerticalNavIndex(table, from, to);
2469
- }
2470
- if (e.code === "Home") {
2471
- if (e.ctrlKey) {
2472
- return {
2473
- row: 1,
2474
- cell: 0
2475
- };
2476
- } else {
2477
- return {
2478
- row: from.row,
2479
- cell: 0
2480
- };
2481
- }
2482
- }
2483
- if (e.code === "End") {
2484
- if (e.ctrlKey) {
2485
- return {
2486
- row: last.row,
2487
- cell: table.rows[last.row].cells.length - 1
2488
- };
2489
- } else {
2490
- return {
2491
- row: from.row,
2492
- cell: table.rows[from.row].cells.length - 1
2493
- };
2494
- }
2495
- }
2496
- }
2497
- function getCell(element) {
2498
- const closest = element.closest("td, th");
2499
- if (!closest) {
2500
- throw new Error("expected th or td parent");
2501
- }
2502
- return closest;
2503
- }
2504
- async function setDefaultCellTarget(table) {
2505
- await vue.nextTick();
2506
- const target = getCellTarget(table, 1, 0);
2507
- activateCell(target, {
2508
- focus: false
2509
- });
2510
- return target;
2511
- }
2512
- function maybeNavigateToCell(e) {
2513
- let newCellTarget = e.target;
2514
- const cell = getCell(e.target);
2515
- const tr = getTr(cell);
2516
- const table = getTable(tr);
2517
- const fromIndex = {
2518
- row: tr.rowIndex,
2519
- cell: cell.cellIndex
2520
- };
2521
- const lastIndex = {
2522
- row: getLastRowIndex(table),
2523
- cell: getLastCellIndex(table)
2524
- };
2525
- const navigateTo = navigate(e, table, fromIndex, lastIndex);
2526
- if (navigateTo) {
2527
- newCellTarget = getCellTarget(table, navigateTo.row, navigateTo.cell);
2528
- activateCell(newCellTarget, {
2529
- focus: true
2530
- });
2531
- }
2532
- }
2533
- function activateCell(element, options) {
2534
- var _toValue;
2535
- const api = element[tableCellApiSymbol];
2536
- const targetEl = (_toValue = vue.toValue(api?.tabstopEl)) !== null && _toValue !== void 0 ? _toValue : element;
2537
- targetEl.tabIndex = 0;
2538
- if (options?.focus) {
2539
- targetEl.focus();
2540
- }
2541
- }
2542
- function stopEdit(element, reason) {
2543
- const td = getCell(element);
2544
- const tr = getTr(td);
2545
- const table = getTable(tr);
2546
- const rowIndex = tr.rowIndex;
2547
- const cellIndex = td.cellIndex;
2548
- const lastRowIndex = getLastRowIndex(table);
2549
- const lastCellIndex = getLastCellIndex(table);
2550
- let newCellTarget = td;
2551
- switch (reason) {
2552
- case "enter": {
2553
- const nextRowIndex = rowIndex + 1;
2554
- const hasFooter = Boolean(table.tFoot);
2555
- const isLastRow = rowIndex === lastRowIndex;
2556
- const footerNext = hasFooter && nextRowIndex === lastRowIndex;
2557
- if (!isLastRow && !footerNext) {
2558
- newCellTarget = getCellTarget(table, nextRowIndex, cellIndex);
2559
- activateCell(newCellTarget, {
2560
- focus: true
2561
- });
2562
- } else {
2563
- activateCell(newCellTarget, {
2564
- focus: true
2565
- });
2566
- }
2567
- return newCellTarget;
2568
- }
2569
- case "escape": {
2570
- activateCell(newCellTarget, {
2571
- focus: true
2572
- });
2573
- return newCellTarget;
2574
- }
2575
- case "tab": {
2576
- if (cellIndex === lastCellIndex && rowIndex === lastRowIndex) {
2577
- activateCell(newCellTarget, {
2578
- focus: true
2579
- });
2580
- } else if (cellIndex === lastCellIndex) {
2581
- newCellTarget = getCellTarget(table, rowIndex + 1, 0);
2582
- activateCell(newCellTarget, {
2583
- focus: true
2584
- });
2585
- } else {
2586
- newCellTarget = getCellTarget(table, rowIndex, cellIndex + 1);
2587
- activateCell(newCellTarget, {
2588
- focus: true
2589
- });
2590
- }
2591
- return newCellTarget;
2592
- }
2593
- case "shift-tab": {
2594
- if (cellIndex === 0 && rowIndex === 1) {
2595
- activateCell(newCellTarget, {
2596
- focus: true
2597
- });
2598
- } else if (cellIndex === 0) {
2599
- newCellTarget = getCellTarget(table, rowIndex - 1, 0);
2600
- activateCell(newCellTarget, {
2601
- focus: true
2602
- });
2603
- } else {
2604
- newCellTarget = getCellTarget(table, rowIndex, cellIndex - 1);
2605
- activateCell(newCellTarget, {
2606
- focus: true
2607
- });
2608
- }
2609
- return newCellTarget;
2610
- }
2611
- case "blur": {
2612
- return newCellTarget;
2613
- }
2614
- }
2615
- }
2616
2599
  const _hoisted_1$e = {
2617
2600
  key: 0,
2618
2601
  class: "table-ng__cell table-ng__cell--expand"
2619
2602
  };
2620
- const _hoisted_2$a = ["aria-label", "aria-expanded"];
2621
- const _hoisted_3$7 = {
2603
+ const _hoisted_2$9 = ["aria-label", "aria-expanded"];
2604
+ const _hoisted_3$5 = {
2622
2605
  key: 1,
2623
2606
  ref: "expandable",
2624
2607
  tabindex: "-1",
@@ -2664,7 +2647,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2664
2647
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
2665
2648
  class: "button__icon",
2666
2649
  name: toggleIcon.value
2667
- }, null, 8, ["name"])], 8, _hoisted_2$a)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$7, null, 512));
2650
+ }, null, 8, ["name"])], 8, _hoisted_2$9)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, null, 512));
2668
2651
  };
2669
2652
  }
2670
2653
  });
@@ -2684,7 +2667,56 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2684
2667
  };
2685
2668
  }
2686
2669
  });
2687
- const baseTypes = ["anchor", "button", "checkbox", "radio", "render", "rowheader", "select"];
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"];
2688
2720
  const textTypes = ["text:bankAccountNumber", "text:bankgiro", "text:clearingNumber", "text:date", "text:email", "text:organisationsnummer", "text:personnummer", "text:phoneNumber", "text:plusgiro", "text:postalCode", "text"];
2689
2721
  const numberTypes = ["text:currency", "text:number", "text:percent"];
2690
2722
  function isInputTypeNumber(value) {
@@ -3082,7 +3114,7 @@ const _hoisted_1$b = {
3082
3114
  scope: "col",
3083
3115
  class: "table-ng__column table-ng__column--selectable"
3084
3116
  };
3085
- const _hoisted_2$9 = ["checked", "indeterminate", "aria-label"];
3117
+ const _hoisted_2$8 = ["checked", "indeterminate", "aria-label"];
3086
3118
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3087
3119
  __name: "ITableHeaderSelectable",
3088
3120
  props: {
@@ -3119,22 +3151,14 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3119
3151
  "aria-label": ariaLabel.value,
3120
3152
  tabindex: "-1",
3121
3153
  onChange: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
3122
- }, null, 40, _hoisted_2$9)) : vue.createCommentVNode("", true)]);
3154
+ }, null, 40, _hoisted_2$8)) : vue.createCommentVNode("", true)]);
3123
3155
  };
3124
3156
  }
3125
3157
  });
3126
3158
  const _hoisted_1$a = {
3127
- key: 0,
3128
- class: "table-ng__cell table-ng__cell--checkbox"
3129
- };
3130
- const _hoisted_2$8 = ["checked", "aria-label"];
3131
- const _hoisted_3$6 = {
3132
- key: 1,
3133
- ref: "target",
3134
- tabindex: "-1",
3135
3159
  class: "table-ng__cell table-ng__cell--checkbox"
3136
3160
  };
3137
- const _hoisted_4$4 = ["checked", "aria-label"];
3161
+ const _hoisted_2$7 = ["checked", "aria-label"];
3138
3162
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3139
3163
  __name: "ITableCheckbox",
3140
3164
  props: {
@@ -3158,25 +3182,21 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3158
3182
  };
3159
3183
  __expose(expose);
3160
3184
  return (_ctx, _cache) => {
3161
- 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", {
3162
3186
  ref: "target",
3163
3187
  checked: Boolean(__props.column.checked(__props.row)),
3164
3188
  type: "checkbox",
3165
3189
  "aria-label": ariaLabel.value,
3166
3190
  tabindex: "-1",
3167
3191
  onChange
3168
- }, null, 40, _hoisted_2$8)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$6, [vue.createElementVNode("input", {
3169
- checked: Boolean(__props.column.checked(__props.row)),
3170
- type: "checkbox",
3171
- "aria-label": ariaLabel.value
3172
- }, null, 8, _hoisted_4$4)], 512));
3192
+ }, null, 40, _hoisted_2$7)]);
3173
3193
  };
3174
3194
  }
3175
3195
  });
3176
3196
  const _hoisted_1$9 = {
3177
3197
  class: "table-ng__cell table-ng__cell--radio"
3178
3198
  };
3179
- const _hoisted_2$7 = ["checked", "aria-label"];
3199
+ const _hoisted_2$6 = ["checked", "aria-label"];
3180
3200
  const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3181
3201
  __name: "ITableRadio",
3182
3202
  props: {
@@ -3207,7 +3227,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3207
3227
  "aria-label": ariaLabel.value,
3208
3228
  tabindex: "-1",
3209
3229
  onChange
3210
- }, null, 40, _hoisted_2$7)]);
3230
+ }, null, 40, _hoisted_2$6)]);
3211
3231
  };
3212
3232
  }
3213
3233
  });
@@ -3258,12 +3278,10 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3258
3278
  checked() {
3259
3279
  return __props.state;
3260
3280
  },
3261
- editable() {
3262
- return true;
3263
- },
3264
3281
  update() {
3265
3282
  emit("toggle", __props.row);
3266
- }
3283
+ },
3284
+ enabled: true
3267
3285
  };
3268
3286
  const singleSelectColumn = {
3269
3287
  type: "radio",
@@ -3281,7 +3299,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3281
3299
  },
3282
3300
  update() {
3283
3301
  emit("toggle", __props.row);
3284
- }
3302
+ },
3303
+ enabled: true
3285
3304
  };
3286
3305
  return (_ctx, _cache) => {
3287
3306
  return __props.level > 1 ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$8)) : __props.selectable === "multi" ? (vue.openBlock(), vue.createBlock(_sfc_main$c, {
@@ -3300,14 +3319,257 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3300
3319
  };
3301
3320
  }
3302
3321
  });
3303
- function walk(array, childKey, visit, level = 1) {
3304
- for (const item of array) {
3305
- const visitChildren = visit(item, level);
3306
- if (visitChildren && childKey && item[childKey]) {
3307
- walk(item[childKey], childKey, visit, level + 1);
3308
- }
3309
- }
3310
- }
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
+ }
3565
+ function walk(array, childKey, visit, level = 1) {
3566
+ for (const item of array) {
3567
+ const visitChildren = visit(item, level);
3568
+ if (visitChildren && childKey && item[childKey]) {
3569
+ walk(item[childKey], childKey, visit, level + 1);
3570
+ }
3571
+ }
3572
+ }
3311
3573
  function getBodyRowCount(rows, childKey) {
3312
3574
  let count = 0;
3313
3575
  walk(rows, childKey, () => {
@@ -3337,283 +3599,123 @@ function requireArraySetLength() {
3337
3599
  var isArray2 = requireIsArray();
3338
3600
  var $TypeError = TypeError;
3339
3601
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
3340
- var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !(function() {
3341
- if (this !== void 0) return true;
3342
- try {
3343
- Object.defineProperty([], "length", {
3344
- writable: false
3345
- }).length = 1;
3346
- } catch (error) {
3347
- return error instanceof TypeError;
3348
- }
3349
- })();
3350
- arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function(O, length) {
3351
- if (isArray2(O) && !getOwnPropertyDescriptor(O, "length").writable) {
3352
- throw new $TypeError("Cannot set read only .length");
3353
- }
3354
- return O.length = length;
3355
- } : function(O, length) {
3356
- return O.length = length;
3357
- };
3358
- return arraySetLength;
3359
- }
3360
- var doesNotExceedSafeInteger;
3361
- var hasRequiredDoesNotExceedSafeInteger;
3362
- function requireDoesNotExceedSafeInteger() {
3363
- if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
3364
- hasRequiredDoesNotExceedSafeInteger = 1;
3365
- var $TypeError = TypeError;
3366
- var MAX_SAFE_INTEGER = 9007199254740991;
3367
- doesNotExceedSafeInteger = function(it) {
3368
- if (it > MAX_SAFE_INTEGER) throw $TypeError("Maximum allowed index exceeded");
3369
- return it;
3370
- };
3371
- return doesNotExceedSafeInteger;
3372
- }
3373
- var hasRequiredEs_array_push;
3374
- function requireEs_array_push() {
3375
- if (hasRequiredEs_array_push) return es_array_push;
3376
- hasRequiredEs_array_push = 1;
3377
- var $ = require_export();
3378
- var toObject2 = requireToObject();
3379
- var lengthOfArrayLike2 = requireLengthOfArrayLike();
3380
- var setArrayLength = requireArraySetLength();
3381
- var doesNotExceedSafeInteger2 = requireDoesNotExceedSafeInteger();
3382
- var fails2 = requireFails();
3383
- var INCORRECT_TO_LENGTH = fails2(function() {
3384
- return [].push.call({
3385
- length: 4294967296
3386
- }, 1) !== 4294967297;
3387
- });
3388
- var properErrorOnNonWritableLength = function() {
3389
- try {
3390
- Object.defineProperty([], "length", {
3391
- writable: false
3392
- }).push();
3393
- } catch (error) {
3394
- return error instanceof TypeError;
3395
- }
3396
- };
3397
- var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
3398
- $({
3399
- target: "Array",
3400
- proto: true,
3401
- arity: 1,
3402
- forced: FORCED
3403
- }, {
3404
- // eslint-disable-next-line no-unused-vars -- required for `.length`
3405
- push: function push(item) {
3406
- var O = toObject2(this);
3407
- var len = lengthOfArrayLike2(O);
3408
- var argCount = arguments.length;
3409
- doesNotExceedSafeInteger2(len + argCount);
3410
- for (var i = 0; i < argCount; i++) {
3411
- O[len] = arguments[i];
3412
- len++;
3413
- }
3414
- setArrayLength(O, len);
3415
- return len;
3416
- }
3417
- });
3418
- return es_array_push;
3419
- }
3420
- requireEs_array_push();
3421
- function getRowIndexes(rows, expandableAttribute) {
3422
- const array = [];
3423
- walk(rows, expandableAttribute, (row) => {
3424
- array.push(vue$1.getItemIdentifier(row));
3425
- return true;
3426
- });
3427
- return array;
3428
- }
3429
- function getMetaRows(keyedRows, expandedKeys, expandableAttribute) {
3430
- const rowIndexes = getRowIndexes(keyedRows, expandableAttribute);
3431
- const array = [];
3432
- walk(keyedRows, expandableAttribute, (row, level) => {
3433
- const key = vue$1.getItemIdentifier(row);
3434
- const isExpandable = Boolean(expandableAttribute && row[expandableAttribute]);
3435
- const isExpanded = isExpandable && expandedKeys.has(key);
3436
- const rowIndex = rowIndexes.indexOf(key) + 2;
3437
- array.push({
3438
- key,
3439
- row,
3440
- rowIndex,
3441
- level: expandableAttribute ? level : void 0,
3442
- isExpandable,
3443
- isExpanded
3444
- });
3445
- return isExpanded;
3446
- });
3447
- return array;
3448
- }
3449
- const stopEditKey = /* @__PURE__ */ Symbol();
3450
- function useStartStopEdit() {
3451
- const stopEdit2 = vue.inject(stopEditKey, () => Promise.resolve());
3452
- return {
3453
- stopEdit: stopEdit2
3454
- };
3455
- }
3456
- var es_iterator_map = {};
3457
- var defineBuiltIns;
3458
- var hasRequiredDefineBuiltIns;
3459
- function requireDefineBuiltIns() {
3460
- if (hasRequiredDefineBuiltIns) return defineBuiltIns;
3461
- hasRequiredDefineBuiltIns = 1;
3462
- var defineBuiltIn2 = requireDefineBuiltIn();
3463
- defineBuiltIns = function(target, src, options) {
3464
- for (var key in src) defineBuiltIn2(target, key, src[key], options);
3465
- return target;
3466
- };
3467
- return defineBuiltIns;
3468
- }
3469
- var createIterResultObject;
3470
- var hasRequiredCreateIterResultObject;
3471
- function requireCreateIterResultObject() {
3472
- if (hasRequiredCreateIterResultObject) return createIterResultObject;
3473
- hasRequiredCreateIterResultObject = 1;
3474
- createIterResultObject = function(value, done) {
3475
- return {
3476
- value,
3477
- done
3478
- };
3479
- };
3480
- return createIterResultObject;
3481
- }
3482
- var iteratorCloseAll;
3483
- var hasRequiredIteratorCloseAll;
3484
- function requireIteratorCloseAll() {
3485
- if (hasRequiredIteratorCloseAll) return iteratorCloseAll;
3486
- hasRequiredIteratorCloseAll = 1;
3487
- var iteratorClose2 = requireIteratorClose();
3488
- iteratorCloseAll = function(iters, kind, value) {
3489
- for (var i = iters.length - 1; i >= 0; i--) {
3490
- if (iters[i] === void 0) continue;
3491
- try {
3492
- value = iteratorClose2(iters[i].iterator, kind, value);
3493
- } catch (error) {
3494
- kind = "throw";
3495
- value = error;
3496
- }
3497
- }
3498
- if (kind === "throw") throw value;
3499
- return value;
3500
- };
3501
- return iteratorCloseAll;
3502
- }
3503
- var iteratorCreateProxy;
3504
- var hasRequiredIteratorCreateProxy;
3505
- function requireIteratorCreateProxy() {
3506
- if (hasRequiredIteratorCreateProxy) return iteratorCreateProxy;
3507
- hasRequiredIteratorCreateProxy = 1;
3508
- var call = requireFunctionCall();
3509
- var create = requireObjectCreate();
3510
- var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
3511
- var defineBuiltIns2 = requireDefineBuiltIns();
3512
- var wellKnownSymbol2 = requireWellKnownSymbol();
3513
- var InternalStateModule = requireInternalState();
3514
- var getMethod2 = requireGetMethod();
3515
- var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
3516
- var createIterResultObject2 = requireCreateIterResultObject();
3517
- var iteratorClose2 = requireIteratorClose();
3518
- var iteratorCloseAll2 = requireIteratorCloseAll();
3519
- var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
3520
- var ITERATOR_HELPER = "IteratorHelper";
3521
- var WRAP_FOR_VALID_ITERATOR = "WrapForValidIterator";
3522
- var NORMAL = "normal";
3523
- var THROW = "throw";
3524
- var setInternalState = InternalStateModule.set;
3525
- var createIteratorProxyPrototype = function(IS_ITERATOR) {
3526
- var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
3527
- return defineBuiltIns2(create(IteratorPrototype), {
3528
- next: function next() {
3529
- var state = getInternalState(this);
3530
- if (IS_ITERATOR) return state.nextHandler();
3531
- if (state.done) return createIterResultObject2(void 0, true);
3532
- try {
3533
- var result = state.nextHandler();
3534
- return state.returnHandlerResult ? result : createIterResultObject2(result, state.done);
3535
- } catch (error) {
3536
- state.done = true;
3537
- throw error;
3538
- }
3539
- },
3540
- "return": function() {
3541
- var state = getInternalState(this);
3542
- var iterator = state.iterator;
3543
- state.done = true;
3544
- if (IS_ITERATOR) {
3545
- var returnMethod = getMethod2(iterator, "return");
3546
- return returnMethod ? call(returnMethod, iterator) : createIterResultObject2(void 0, true);
3547
- }
3548
- if (state.inner) try {
3549
- iteratorClose2(state.inner.iterator, NORMAL);
3550
- } catch (error) {
3551
- return iteratorClose2(iterator, THROW, error);
3552
- }
3553
- if (state.openIters) try {
3554
- iteratorCloseAll2(state.openIters, NORMAL);
3555
- } catch (error) {
3556
- return iteratorClose2(iterator, THROW, error);
3557
- }
3558
- if (iterator) iteratorClose2(iterator, NORMAL);
3559
- return createIterResultObject2(void 0, true);
3560
- }
3561
- });
3562
- };
3563
- var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
3564
- var IteratorHelperPrototype = createIteratorProxyPrototype(false);
3565
- createNonEnumerableProperty2(IteratorHelperPrototype, TO_STRING_TAG, "Iterator Helper");
3566
- iteratorCreateProxy = function(nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
3567
- var IteratorProxy = function Iterator2(record, state) {
3568
- if (state) {
3569
- state.iterator = record.iterator;
3570
- state.next = record.next;
3571
- } else state = record;
3572
- state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
3573
- state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
3574
- state.nextHandler = nextHandler;
3575
- state.counter = 0;
3576
- state.done = false;
3577
- setInternalState(this, state);
3578
- };
3579
- IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
3580
- return IteratorProxy;
3581
- };
3582
- return iteratorCreateProxy;
3583
- }
3584
- var callWithSafeIterationClosing;
3585
- var hasRequiredCallWithSafeIterationClosing;
3586
- function requireCallWithSafeIterationClosing() {
3587
- if (hasRequiredCallWithSafeIterationClosing) return callWithSafeIterationClosing;
3588
- hasRequiredCallWithSafeIterationClosing = 1;
3589
- var anObject2 = requireAnObject();
3590
- var iteratorClose2 = requireIteratorClose();
3591
- callWithSafeIterationClosing = function(iterator, fn, value, ENTRIES) {
3602
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !(function() {
3603
+ if (this !== void 0) return true;
3592
3604
  try {
3593
- return ENTRIES ? fn(anObject2(value)[0], value[1]) : fn(value);
3605
+ Object.defineProperty([], "length", {
3606
+ writable: false
3607
+ }).length = 1;
3594
3608
  } catch (error) {
3595
- iteratorClose2(iterator, "throw", error);
3609
+ return error instanceof TypeError;
3596
3610
  }
3611
+ })();
3612
+ arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function(O, length) {
3613
+ if (isArray2(O) && !getOwnPropertyDescriptor(O, "length").writable) {
3614
+ throw new $TypeError("Cannot set read only .length");
3615
+ }
3616
+ return O.length = length;
3617
+ } : function(O, length) {
3618
+ return O.length = length;
3597
3619
  };
3598
- return callWithSafeIterationClosing;
3620
+ return arraySetLength;
3599
3621
  }
3600
- var iteratorHelperThrowsOnInvalidIterator;
3601
- var hasRequiredIteratorHelperThrowsOnInvalidIterator;
3602
- function requireIteratorHelperThrowsOnInvalidIterator() {
3603
- if (hasRequiredIteratorHelperThrowsOnInvalidIterator) return iteratorHelperThrowsOnInvalidIterator;
3604
- hasRequiredIteratorHelperThrowsOnInvalidIterator = 1;
3605
- iteratorHelperThrowsOnInvalidIterator = function(methodName, argument) {
3606
- var method = typeof Iterator == "function" && Iterator.prototype[methodName];
3607
- if (method) try {
3608
- method.call({
3609
- next: null
3610
- }, argument).next();
3622
+ var doesNotExceedSafeInteger;
3623
+ var hasRequiredDoesNotExceedSafeInteger;
3624
+ function requireDoesNotExceedSafeInteger() {
3625
+ if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
3626
+ hasRequiredDoesNotExceedSafeInteger = 1;
3627
+ var $TypeError = TypeError;
3628
+ var MAX_SAFE_INTEGER = 9007199254740991;
3629
+ doesNotExceedSafeInteger = function(it) {
3630
+ if (it > MAX_SAFE_INTEGER) throw new $TypeError("Maximum allowed index exceeded");
3631
+ return it;
3632
+ };
3633
+ return doesNotExceedSafeInteger;
3634
+ }
3635
+ var hasRequiredEs_array_push;
3636
+ function requireEs_array_push() {
3637
+ if (hasRequiredEs_array_push) return es_array_push;
3638
+ hasRequiredEs_array_push = 1;
3639
+ var $ = require_export();
3640
+ var toObject2 = requireToObject();
3641
+ var lengthOfArrayLike2 = requireLengthOfArrayLike();
3642
+ var setArrayLength = requireArraySetLength();
3643
+ var doesNotExceedSafeInteger2 = requireDoesNotExceedSafeInteger();
3644
+ var fails2 = requireFails();
3645
+ var INCORRECT_TO_LENGTH = fails2(function() {
3646
+ return [].push.call({
3647
+ length: 4294967296
3648
+ }, 1) !== 4294967297;
3649
+ });
3650
+ var properErrorOnNonWritableLength = function() {
3651
+ try {
3652
+ Object.defineProperty([], "length", {
3653
+ writable: false
3654
+ }).push();
3611
3655
  } catch (error) {
3612
- return true;
3656
+ return error instanceof TypeError;
3613
3657
  }
3614
3658
  };
3615
- return iteratorHelperThrowsOnInvalidIterator;
3659
+ var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
3660
+ $({
3661
+ target: "Array",
3662
+ proto: true,
3663
+ arity: 1,
3664
+ forced: FORCED
3665
+ }, {
3666
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
3667
+ push: function push(item) {
3668
+ var O = toObject2(this);
3669
+ var len = lengthOfArrayLike2(O);
3670
+ var argCount = arguments.length;
3671
+ doesNotExceedSafeInteger2(len + argCount);
3672
+ for (var i = 0; i < argCount; i++) {
3673
+ O[len] = arguments[i];
3674
+ len++;
3675
+ }
3676
+ setArrayLength(O, len);
3677
+ return len;
3678
+ }
3679
+ });
3680
+ return es_array_push;
3681
+ }
3682
+ requireEs_array_push();
3683
+ function getRowIndexes(rows, expandableAttribute) {
3684
+ const array = [];
3685
+ walk(rows, expandableAttribute, (row) => {
3686
+ array.push(vue$1.getItemIdentifier(row));
3687
+ return true;
3688
+ });
3689
+ return array;
3690
+ }
3691
+ function getMetaRows(keyedRows, expandedKeys, expandableAttribute) {
3692
+ const rowIndexes = getRowIndexes(keyedRows, expandableAttribute);
3693
+ const array = [];
3694
+ walk(keyedRows, expandableAttribute, (row, level) => {
3695
+ const key = vue$1.getItemIdentifier(row);
3696
+ const isExpandable = Boolean(expandableAttribute && Array.isArray(row[expandableAttribute]) && row[expandableAttribute].length > 0);
3697
+ const isExpanded = isExpandable && expandedKeys.has(key);
3698
+ const rowIndex = rowIndexes.indexOf(key) + 2;
3699
+ array.push({
3700
+ key,
3701
+ row,
3702
+ rowIndex,
3703
+ level: expandableAttribute ? level : void 0,
3704
+ isExpandable,
3705
+ isExpanded
3706
+ });
3707
+ return isExpanded;
3708
+ });
3709
+ return array;
3710
+ }
3711
+ const stopEditKey = /* @__PURE__ */ Symbol();
3712
+ function useStartStopEdit() {
3713
+ const stopEdit2 = vue.inject(stopEditKey, () => Promise.resolve());
3714
+ return {
3715
+ stopEdit: stopEdit2
3716
+ };
3616
3717
  }
3718
+ var es_iterator_map = {};
3617
3719
  var hasRequiredEs_iterator_map;
3618
3720
  function requireEs_iterator_map() {
3619
3721
  if (hasRequiredEs_iterator_map) return es_iterator_map;
@@ -3665,8 +3767,8 @@ const _hoisted_1$7 = {
3665
3767
  key: 0,
3666
3768
  class: "table-ng__cell table-ng__cell--anchor"
3667
3769
  };
3668
- const _hoisted_2$6 = ["href"];
3669
- const _hoisted_3$5 = {
3770
+ const _hoisted_2$5 = ["href"];
3771
+ const _hoisted_3$4 = {
3670
3772
  key: 1,
3671
3773
  ref: "target",
3672
3774
  tabindex: "-1",
@@ -3682,37 +3784,27 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3682
3784
  expose: __expose
3683
3785
  }) {
3684
3786
  const targetElement = vue.useTemplateRef("target");
3685
- const renderAnchor = vue.computed(() => {
3686
- return __props.column.enabled(__props.row) && __props.column.text(__props.row) !== null;
3687
- });
3688
3787
  const expose = {
3689
3788
  tabstopEl: targetElement
3690
3789
  };
3691
3790
  __expose(expose);
3692
3791
  return (_ctx, _cache) => {
3693
- return renderAnchor.value ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$7, [vue.createElementVNode("a", {
3792
+ return __props.column.text(__props.row) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$7, [vue.createElementVNode("a", {
3694
3793
  ref: "target",
3695
3794
  class: "anchor anchor--block",
3696
3795
  target: "_blank",
3697
3796
  href: __props.column.href,
3698
3797
  tabindex: "-1"
3699
- }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_2$6)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, null, 512));
3798
+ }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_2$5)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$4, null, 512));
3700
3799
  };
3701
3800
  }
3702
3801
  });
3703
3802
  const _hoisted_1$6 = {
3704
- key: 0,
3705
3803
  class: "table-ng__cell table-ng__cell--button"
3706
3804
  };
3707
- const _hoisted_2$5 = {
3805
+ const _hoisted_2$4 = {
3708
3806
  class: "sr-only"
3709
3807
  };
3710
- const _hoisted_3$4 = {
3711
- key: 1,
3712
- ref: "td",
3713
- tabindex: "-1",
3714
- class: "table-ng__cell"
3715
- };
3716
3808
  const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3717
3809
  __name: "ITableButton",
3718
3810
  props: {
@@ -3723,7 +3815,6 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3723
3815
  expose: __expose
3724
3816
  }) {
3725
3817
  const buttonElement = vue.useTemplateRef("button");
3726
- const tdElement = vue.useTemplateRef("td");
3727
3818
  function onClickButton() {
3728
3819
  logic.assertRef(buttonElement);
3729
3820
  buttonElement.value.tabIndex = 0;
@@ -3731,15 +3822,12 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3731
3822
  __props.column.onClick(__props.row);
3732
3823
  }
3733
3824
  }
3734
- const renderButton = vue.computed(() => {
3735
- return __props.column.enabled(__props.row) && __props.column.text(__props.row) !== null;
3736
- });
3737
3825
  const expose = {
3738
- tabstopEl: renderButton.value ? buttonElement : tdElement
3826
+ tabstopEl: buttonElement
3739
3827
  };
3740
3828
  __expose(expose);
3741
3829
  return (_ctx, _cache) => {
3742
- return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$6, [vue.createElementVNode("button", {
3830
+ return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$6, [vue.createElementVNode("button", {
3743
3831
  ref: "button",
3744
3832
  class: "icon-button",
3745
3833
  type: "button",
@@ -3749,7 +3837,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3749
3837
  key: 0,
3750
3838
  library: __props.column.iconLibrary,
3751
3839
  name: __props.column.icon
3752
- }, null, 8, ["library", "name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$4, null, 512));
3840
+ }, null, 8, ["library", "name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$4, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512)]);
3753
3841
  };
3754
3842
  }
3755
3843
  });
@@ -3797,11 +3885,6 @@ requireEs_iterator_find();
3797
3885
  const _hoisted_1$5 = {
3798
3886
  class: "sr-only"
3799
3887
  };
3800
- const _hoisted_2$4 = {
3801
- key: 1,
3802
- tabindex: "-1",
3803
- class: "table-ng__cell"
3804
- };
3805
3888
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3806
3889
  __name: "ITableMenu",
3807
3890
  props: {
@@ -3834,9 +3917,6 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3834
3917
  };
3835
3918
  });
3836
3919
  });
3837
- const renderButton = vue.computed(() => {
3838
- return __props.column.enabled(__props.row);
3839
- });
3840
3920
  function onOpen(event) {
3841
3921
  event.stopPropagation();
3842
3922
  isOpen.value = true;
@@ -3859,8 +3939,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3859
3939
  __expose(expose);
3860
3940
  return (_ctx, _cache) => {
3861
3941
  var _buttonRef$value;
3862
- return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", {
3863
- key: 0,
3942
+ return vue.openBlock(), vue.createElementBlock("td", {
3864
3943
  class: vue.normalizeClass(["table-ng__cell table-ng__cell--button", {
3865
3944
  "table-ng__cell--menu-open": isOpen.value
3866
3945
  }])
@@ -3880,7 +3959,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3880
3959
  onClose,
3881
3960
  onSelect,
3882
3961
  onFocusout
3883
- }, null, 8, ["is-open", "items", "anchor"])], 2)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_2$4));
3962
+ }, null, 8, ["is-open", "items", "anchor"])], 2);
3884
3963
  };
3885
3964
  }
3886
3965
  });
@@ -4003,12 +4082,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4003
4082
  if (activeOption.value) {
4004
4083
  const index = __props.column.options.indexOf(activeOption.value);
4005
4084
  if (index === 0) {
4006
- activeOption.value = __props.column.options[__props.column.options.length - 1];
4085
+ activeOption.value = __props.column.options.at(-1);
4007
4086
  } else {
4008
4087
  activeOption.value = __props.column.options[index - 1];
4009
4088
  }
4010
4089
  } else {
4011
- activeOption.value = __props.column.options[__props.column.options.length - 1];
4090
+ activeOption.value = __props.column.options.at(-1);
4012
4091
  }
4013
4092
  }
4014
4093
  async function onEditKeyDown(e) {
@@ -4096,12 +4175,14 @@ function defaultTnumValue(type) {
4096
4175
  const tnumTypes = ["text:bankAccountNumber", "text:bankgiro", "text:clearingNumber", "text:currency", "text:number", "text:organisationsnummer", "text:percent", "text:personnummer", "text:phoneNumber", "text:plusgiro", "text:postalCode"];
4097
4176
  return tnumTypes.includes(type);
4098
4177
  }
4178
+ const defaultLabelFn = () => "";
4099
4179
  function getLabelFn(fn) {
4100
4180
  if (fn) {
4101
4181
  return fn;
4102
4182
  }
4103
- return () => "";
4183
+ return defaultLabelFn;
4104
4184
  }
4185
+ const defaultUpdateFn = () => void 0;
4105
4186
  function getUpdateFn(fn, key) {
4106
4187
  if (fn) {
4107
4188
  return fn;
@@ -4111,7 +4192,7 @@ function getUpdateFn(fn, key) {
4111
4192
  row[key] = value;
4112
4193
  };
4113
4194
  }
4114
- return () => void 0;
4195
+ return defaultUpdateFn;
4115
4196
  }
4116
4197
  function getValueFn(fn, key, coerce, defaultValue) {
4117
4198
  if (fn) {
@@ -4143,7 +4224,7 @@ const _hoisted_3$2 = {
4143
4224
  key: 0,
4144
4225
  class: "sr-only"
4145
4226
  };
4146
- const _hoisted_4$2 = ["id", "aria-label"];
4227
+ const _hoisted_4$2 = ["id", "aria-label", "aria-hidden"];
4147
4228
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4148
4229
  __name: "ITableText",
4149
4230
  props: {
@@ -4179,6 +4260,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4179
4260
  const hasError = vue.computed(() => validity.value.validityMode === "ERROR");
4180
4261
  const viewModeAriaInvalid = vue.computed(() => !inEdit.value && hasError.value ? true : void 0);
4181
4262
  const viewModeErrorMessage = vue.computed(() => !inEdit.value && hasError.value ? validity.value.validationMessage : void 0);
4263
+ let initialValidity = {
4264
+ ...validity.value
4265
+ };
4182
4266
  const divClasses = vue.computed(() => {
4183
4267
  return {
4184
4268
  "table-ng__editable": true,
@@ -4261,7 +4345,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4261
4345
  function setUpFakeValidation(el) {
4262
4346
  logic.assertRef(inputElement);
4263
4347
  const nativeEvents = ["change", "blur"];
4264
- nativeEvents.forEach((nativeEvent) => {
4348
+ for (const nativeEvent of nativeEvents) {
4265
4349
  core.useEventListener(el, nativeEvent, () => {
4266
4350
  const fakeEvent = new CustomEvent("validity", {
4267
4351
  detail: {
@@ -4275,7 +4359,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4275
4359
  });
4276
4360
  onValidity(fakeEvent);
4277
4361
  });
4278
- });
4362
+ }
4279
4363
  core.useEventListener(el, "input", onPendingValidity);
4280
4364
  core.useEventListener(el, "component-validity", (e) => {
4281
4365
  e.stopPropagation();
@@ -4326,6 +4410,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4326
4410
  width
4327
4411
  } = tdElement.value.getBoundingClientRect();
4328
4412
  initialViewValue = viewValue.value;
4413
+ initialValidity = {
4414
+ ...validity.value
4415
+ };
4329
4416
  viewValue.value = value;
4330
4417
  tdElement.value.style.setProperty("width", `${String(width)}px`);
4331
4418
  inputElement.value.tabIndex = 0;
@@ -4385,23 +4472,33 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4385
4472
  function onEditingKeydown(event) {
4386
4473
  logic.assertRef(inputElement);
4387
4474
  event.stopPropagation();
4388
- if (event.key === "Enter") {
4389
- if (viewValue.value === initialViewValue) {
4475
+ switch (event.key) {
4476
+ case "Enter": {
4477
+ if (viewValue.value === initialViewValue) {
4478
+ validity.value = {
4479
+ ...initialValidity
4480
+ };
4481
+ onStopEdit({
4482
+ reason: "enter"
4483
+ });
4484
+ } else {
4485
+ pendingStopEditReason = "enter";
4486
+ }
4487
+ break;
4488
+ }
4489
+ case "Escape": {
4390
4490
  onStopEdit({
4391
- reason: "enter"
4491
+ reason: "escape"
4392
4492
  });
4393
- } else {
4394
- pendingStopEditReason = "enter";
4493
+ viewValue.value = initialViewValue;
4494
+ inputElement.value.value = initialViewValue;
4495
+ void validationFacade.validateElement(inputElement.value);
4496
+ break;
4497
+ }
4498
+ case "Tab": {
4499
+ pendingStopEditReason = event.shiftKey ? "shift-tab" : "tab";
4500
+ break;
4395
4501
  }
4396
- } else if (event.key === "Escape") {
4397
- onStopEdit({
4398
- reason: "escape"
4399
- });
4400
- viewValue.value = initialViewValue;
4401
- inputElement.value.value = initialViewValue;
4402
- void validationFacade.validateElement(inputElement.value);
4403
- } else if (event.key === "Tab") {
4404
- pendingStopEditReason = event.shiftKey ? "shift-tab" : "tab";
4405
4502
  }
4406
4503
  }
4407
4504
  function onKeydown(event) {
@@ -4480,6 +4577,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4480
4577
  ...configAttributes.value,
4481
4578
  ...columnAttributes.value
4482
4579
  }, {
4580
+ "aria-hidden": !inEdit.value,
4483
4581
  onValidity,
4484
4582
  onPendingValidity
4485
4583
  }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]])], 2), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
@@ -4498,57 +4596,49 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4498
4596
  }
4499
4597
  });
4500
4598
  function normalizeAnchorColumn(column) {
4501
- var _column$key;
4502
4599
  return {
4503
4600
  type: "anchor",
4504
4601
  text: getValueFn(column.text, column.key, String, ""),
4505
- href: column.href,
4506
- enabled: typeof column.enabled === "function" ? column.enabled : () => {
4507
- var _column$enabled;
4508
- return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
4509
- },
4510
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4602
+ href: column.href
4511
4603
  };
4512
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
+ }
4513
4610
  function normalizeBaseColumn(column) {
4611
+ var _column$enabled;
4514
4612
  const id = /* @__PURE__ */ Symbol();
4515
4613
  const header = vue.toRef(column.header);
4516
- const description = typeof column.description !== "undefined" ? vue.toRef(column.description) : vue.ref("");
4517
- const size = typeof column.size !== "undefined" ? vue.toRef(column.size) : vue.ref("grow");
4614
+ const description = column.description !== void 0 ? vue.toRef(column.description) : vue.ref("");
4615
+ const size = column.size !== void 0 ? vue.toRef(column.size) : vue.ref("grow");
4616
+ const sortable = getSortable(column);
4518
4617
  return {
4519
4618
  id,
4520
4619
  header,
4521
4620
  description,
4522
- size
4621
+ sortable,
4622
+ size,
4623
+ enabled: (_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true
4523
4624
  };
4524
4625
  }
4525
4626
  function normalizeButtonColumn(column) {
4526
- var _column$icon, _column$key;
4627
+ var _column$icon;
4527
4628
  return {
4528
4629
  type: "button",
4529
4630
  text: getValueFn(column.text, column.key, String, ""),
4530
4631
  onClick: column.onClick,
4531
- enabled: typeof column.enabled === "function" ? column.enabled : () => {
4532
- var _column$enabled;
4533
- return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
4534
- },
4535
4632
  icon: (_column$icon = column.icon) !== null && _column$icon !== void 0 ? _column$icon : null,
4536
- iconLibrary: column.iconLibrary,
4537
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4633
+ iconLibrary: column.iconLibrary
4538
4634
  };
4539
4635
  }
4540
4636
  function normalizeCheckboxColumn(column) {
4541
- var _column$key;
4542
4637
  return {
4543
4638
  type: "checkbox",
4544
4639
  label: getLabelFn(column.label),
4545
4640
  checked: getValueFn(column.checked, column.key, Boolean, false),
4546
- update: getUpdateFn(column.update, column.key),
4547
- editable: typeof column.editable === "function" ? column.editable : () => {
4548
- var _column$editable;
4549
- return Boolean((_column$editable = column.editable) !== null && _column$editable !== void 0 ? _column$editable : false);
4550
- },
4551
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4641
+ update: getUpdateFn(column.update, column.key)
4552
4642
  };
4553
4643
  }
4554
4644
  function noop() {
@@ -4558,7 +4648,6 @@ function normalizeMenuColumn(column) {
4558
4648
  return {
4559
4649
  type: "menu",
4560
4650
  text: getValueFn(column.text, void 0, String, ""),
4561
- sortable: null,
4562
4651
  actions: ((_column$actions = column.actions) !== null && _column$actions !== void 0 ? _column$actions : []).map((it) => {
4563
4652
  var _it$icon, _it$onClick;
4564
4653
  return {
@@ -4566,15 +4655,11 @@ function normalizeMenuColumn(column) {
4566
4655
  icon: (_it$icon = it.icon) !== null && _it$icon !== void 0 ? _it$icon : null,
4567
4656
  onClick: (_it$onClick = it.onClick) !== null && _it$onClick !== void 0 ? _it$onClick : noop
4568
4657
  };
4569
- }),
4570
- enabled: typeof column.enabled === "function" ? column.enabled : () => {
4571
- var _column$enabled;
4572
- return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
4573
- }
4658
+ })
4574
4659
  };
4575
4660
  }
4576
4661
  function normalizeNumberColumn(column) {
4577
- 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;
4578
4663
  const type = column.type;
4579
4664
  const config = inputFieldConfig[type];
4580
4665
  const parser = (_column$parser = column.parser) !== null && _column$parser !== void 0 ? _column$parser : config.parser.bind(column);
@@ -4595,21 +4680,10 @@ function normalizeNumberColumn(column) {
4595
4680
  },
4596
4681
  validation: (_column$validation = column.validation) !== null && _column$validation !== void 0 ? _column$validation : {},
4597
4682
  hasValidation: column.type.startsWith("text:") || Boolean(column.validation),
4598
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null,
4599
4683
  formatter,
4600
4684
  parser
4601
4685
  };
4602
4686
  }
4603
- function normalizeRadioColumn(column) {
4604
- var _column$key;
4605
- return {
4606
- type: "radio",
4607
- label: getLabelFn(column.label),
4608
- checked: getValueFn(column.checked, column.key, Boolean, false),
4609
- update: getUpdateFn(column.update, column.key),
4610
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4611
- };
4612
- }
4613
4687
  function normalizeRenderColumn(column) {
4614
4688
  return {
4615
4689
  type: void 0,
@@ -4618,15 +4692,12 @@ function normalizeRenderColumn(column) {
4618
4692
  };
4619
4693
  }
4620
4694
  function normalizeRowHeaderColumn(column) {
4621
- var _column$key;
4622
4695
  return {
4623
4696
  type: "rowheader",
4624
- text: getValueFn(column.text, column.key, String, ""),
4625
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4697
+ text: getValueFn(column.text, column.key, String, "")
4626
4698
  };
4627
4699
  }
4628
4700
  function normalizeSelectColumn(column) {
4629
- var _column$key;
4630
4701
  return {
4631
4702
  type: "select",
4632
4703
  label: getLabelFn(column.label),
@@ -4636,12 +4707,10 @@ function normalizeSelectColumn(column) {
4636
4707
  var _column$editable;
4637
4708
  return Boolean((_column$editable = column.editable) !== null && _column$editable !== void 0 ? _column$editable : false);
4638
4709
  },
4639
- options: column.options,
4640
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4710
+ options: column.options
4641
4711
  };
4642
4712
  }
4643
4713
  function normalizeSimpleColumn(column) {
4644
- var _column$key;
4645
4714
  return {
4646
4715
  type: "text",
4647
4716
  label: () => "",
@@ -4651,7 +4720,6 @@ function normalizeSimpleColumn(column) {
4651
4720
  update() {
4652
4721
  },
4653
4722
  editable: () => false,
4654
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null,
4655
4723
  validation: {},
4656
4724
  hasValidation: false,
4657
4725
  formatter: (value) => value,
@@ -4659,7 +4727,7 @@ function normalizeSimpleColumn(column) {
4659
4727
  };
4660
4728
  }
4661
4729
  function normalizeTextColumn(column) {
4662
- 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;
4663
4731
  const type = column.type;
4664
4732
  const config = inputFieldConfig[type];
4665
4733
  const parser = (_column$parser = column.parser) !== null && _column$parser !== void 0 ? _column$parser : config.parser;
@@ -4678,7 +4746,6 @@ function normalizeTextColumn(column) {
4678
4746
  },
4679
4747
  validation: (_column$validation = column.validation) !== null && _column$validation !== void 0 ? _column$validation : {},
4680
4748
  hasValidation: column.type.startsWith("text:") || Boolean(column.validation),
4681
- sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null,
4682
4749
  formatter,
4683
4750
  parser
4684
4751
  };
@@ -4686,32 +4753,26 @@ function normalizeTextColumn(column) {
4686
4753
  function normalizeTableColumn(column) {
4687
4754
  const base = normalizeBaseColumn(column);
4688
4755
  if ("render" in column) {
4689
- return {
4756
+ return Object.freeze({
4690
4757
  ...normalizeRenderColumn(column),
4691
4758
  ...base
4692
- };
4759
+ });
4693
4760
  }
4694
4761
  switch (column.type) {
4695
4762
  case "checkbox":
4696
- return {
4763
+ return Object.freeze({
4697
4764
  ...normalizeCheckboxColumn(column),
4698
4765
  ...base,
4699
4766
  component: _sfc_main$c
4700
- };
4701
- case "radio":
4702
- return {
4703
- ...normalizeRadioColumn(column),
4704
- ...base,
4705
- component: _sfc_main$b
4706
- };
4767
+ });
4707
4768
  case "text:currency":
4708
4769
  case "text:number":
4709
4770
  case "text:percent":
4710
- return {
4771
+ return Object.freeze({
4711
4772
  ...normalizeNumberColumn(column),
4712
4773
  ...base,
4713
4774
  component: _sfc_main$4
4714
- };
4775
+ });
4715
4776
  case "text":
4716
4777
  case "text:bankAccountNumber":
4717
4778
  case "text:bankgiro":
@@ -4723,47 +4784,47 @@ function normalizeTableColumn(column) {
4723
4784
  case "text:phoneNumber":
4724
4785
  case "text:plusgiro":
4725
4786
  case "text:postalCode":
4726
- return {
4787
+ return Object.freeze({
4727
4788
  ...normalizeTextColumn(column),
4728
4789
  ...base,
4729
4790
  component: _sfc_main$4
4730
- };
4791
+ });
4731
4792
  case "rowheader":
4732
- return {
4793
+ return Object.freeze({
4733
4794
  ...normalizeRowHeaderColumn(column),
4734
4795
  ...base,
4735
4796
  component: _sfc_main$6
4736
- };
4797
+ });
4737
4798
  case "anchor":
4738
- return {
4799
+ return Object.freeze({
4739
4800
  ...normalizeAnchorColumn(column),
4740
4801
  ...base,
4741
4802
  component: _sfc_main$9
4742
- };
4803
+ });
4743
4804
  case "button":
4744
- return {
4805
+ return Object.freeze({
4745
4806
  ...normalizeButtonColumn(column),
4746
4807
  ...base,
4747
4808
  component: _sfc_main$8
4748
- };
4809
+ });
4749
4810
  case "select":
4750
- return {
4811
+ return Object.freeze({
4751
4812
  ...normalizeSelectColumn(column),
4752
4813
  ...base,
4753
4814
  component: _sfc_main$5
4754
- };
4815
+ });
4755
4816
  case "menu":
4756
- return {
4817
+ return Object.freeze({
4757
4818
  ...normalizeMenuColumn(column),
4758
4819
  ...base,
4759
4820
  component: _sfc_main$7
4760
- };
4821
+ });
4761
4822
  case void 0:
4762
- return {
4823
+ return Object.freeze({
4763
4824
  ...normalizeSimpleColumn(column),
4764
4825
  ...base,
4765
4826
  component: _sfc_main$4
4766
- };
4827
+ });
4767
4828
  }
4768
4829
  }
4769
4830
  function defineTableColumns(columns) {
@@ -4784,16 +4845,11 @@ function usePopupError() {
4784
4845
  anchor,
4785
4846
  arrowAnchor,
4786
4847
  hasFocus,
4787
- hasHover,
4788
- inEdit
4848
+ hasHover
4789
4849
  } = popupError;
4790
4850
  if (!anchor || !arrowAnchor) {
4791
4851
  return;
4792
4852
  }
4793
- if (inEdit) {
4794
- onClosePopupError(popupError);
4795
- return;
4796
- }
4797
4853
  if (hasFocus || hasHover) {
4798
4854
  await open(popupError);
4799
4855
  } else {
@@ -4837,6 +4893,63 @@ function usePopupError() {
4837
4893
  activeErrorAnchor
4838
4894
  };
4839
4895
  }
4896
+ var es_array_toSorted = {};
4897
+ var arrayFromConstructorAndList;
4898
+ var hasRequiredArrayFromConstructorAndList;
4899
+ function requireArrayFromConstructorAndList() {
4900
+ if (hasRequiredArrayFromConstructorAndList) return arrayFromConstructorAndList;
4901
+ hasRequiredArrayFromConstructorAndList = 1;
4902
+ var lengthOfArrayLike2 = requireLengthOfArrayLike();
4903
+ arrayFromConstructorAndList = function(Constructor, list, $length) {
4904
+ var index = 0;
4905
+ var length = arguments.length > 2 ? $length : lengthOfArrayLike2(list);
4906
+ var result = new Constructor(length);
4907
+ while (length > index) result[index] = list[index++];
4908
+ return result;
4909
+ };
4910
+ return arrayFromConstructorAndList;
4911
+ }
4912
+ var getBuiltInPrototypeMethod;
4913
+ var hasRequiredGetBuiltInPrototypeMethod;
4914
+ function requireGetBuiltInPrototypeMethod() {
4915
+ if (hasRequiredGetBuiltInPrototypeMethod) return getBuiltInPrototypeMethod;
4916
+ hasRequiredGetBuiltInPrototypeMethod = 1;
4917
+ var globalThis2 = requireGlobalThis();
4918
+ getBuiltInPrototypeMethod = function(CONSTRUCTOR, METHOD) {
4919
+ var Constructor = globalThis2[CONSTRUCTOR];
4920
+ var Prototype = Constructor && Constructor.prototype;
4921
+ return Prototype && Prototype[METHOD];
4922
+ };
4923
+ return getBuiltInPrototypeMethod;
4924
+ }
4925
+ var hasRequiredEs_array_toSorted;
4926
+ function requireEs_array_toSorted() {
4927
+ if (hasRequiredEs_array_toSorted) return es_array_toSorted;
4928
+ hasRequiredEs_array_toSorted = 1;
4929
+ var $ = require_export();
4930
+ var uncurryThis = requireFunctionUncurryThis();
4931
+ var aCallable2 = requireACallable();
4932
+ var toIndexedObject2 = requireToIndexedObject();
4933
+ var arrayFromConstructorAndList2 = requireArrayFromConstructorAndList();
4934
+ var getBuiltInPrototypeMethod2 = requireGetBuiltInPrototypeMethod();
4935
+ var addToUnscopables2 = requireAddToUnscopables();
4936
+ var $Array = Array;
4937
+ var sort = uncurryThis(getBuiltInPrototypeMethod2("Array", "sort"));
4938
+ $({
4939
+ target: "Array",
4940
+ proto: true
4941
+ }, {
4942
+ toSorted: function toSorted(compareFn) {
4943
+ if (compareFn !== void 0) aCallable2(compareFn);
4944
+ var O = toIndexedObject2(this);
4945
+ var A = arrayFromConstructorAndList2($Array, O);
4946
+ return sort(A, compareFn);
4947
+ }
4948
+ });
4949
+ addToUnscopables2("toSorted");
4950
+ return es_array_toSorted;
4951
+ }
4952
+ requireEs_array_toSorted();
4840
4953
  var es_iterator_some = {};
4841
4954
  var hasRequiredEs_iterator_some;
4842
4955
  function requireEs_iterator_some() {
@@ -4918,7 +5031,7 @@ function useSelectable(options) {
4918
5031
  selectedRows.value = [row];
4919
5032
  } else {
4920
5033
  const index = selectedRows.value.indexOf(row);
4921
- if (index < 0) {
5034
+ if (index === -1) {
4922
5035
  selectedRows.value.push(row);
4923
5036
  } else {
4924
5037
  selectedRows.value.splice(index, 1);
@@ -4931,7 +5044,7 @@ function useSelectable(options) {
4931
5044
  }
4932
5045
  let oldKeys = void 0;
4933
5046
  vue.watch(() => vue.toValue(rows), (newValue) => {
4934
- const newKeys = newValue.map(rowKey).sort();
5047
+ const newKeys = newValue.map(rowKey).toSorted();
4935
5048
  if (!oldKeys) {
4936
5049
  oldKeys = newKeys;
4937
5050
  return;
@@ -4970,7 +5083,7 @@ function useTabstop(tableRef, metaRows) {
4970
5083
  logic.assertRef(tableRef);
4971
5084
  const needle = newRows[0];
4972
5085
  const newFirstRowOldIndex = oldRows.findIndex(matching(needle));
4973
- if (newFirstRowOldIndex > -1) {
5086
+ if (newFirstRowOldIndex !== -1) {
4974
5087
  const target = getCellTarget(tableRef.value, newFirstRowOldIndex + 1, 0);
4975
5088
  activateCell(target, {
4976
5089
  focus
@@ -4984,7 +5097,7 @@ function useTabstop(tableRef, metaRows) {
4984
5097
  const tabFallback = pendingRowRemoval ? "sticky" : "first-cell";
4985
5098
  pendingRowRemoval = false;
4986
5099
  logic.assertRef(tableRef);
4987
- const oldTabstopElement = tableRef.value.querySelector(`:not(tfoot)[tabindex="0"]`);
5100
+ const oldTabstopElement = tableRef.value.querySelector(`[tabindex="0"]`);
4988
5101
  logic.assertSet(oldTabstopElement);
4989
5102
  const oldTabstopFocused = oldTabstopElement === document.activeElement;
4990
5103
  if (oldTabstopElement.closest("th")) {
@@ -5089,26 +5202,32 @@ const _hoisted_2$1 = {
5089
5202
  "data-test": "caption"
5090
5203
  };
5091
5204
  const _hoisted_3$1 = {
5205
+ key: 1
5206
+ };
5207
+ const _hoisted_4$1 = {
5092
5208
  class: "table-ng__row",
5093
5209
  "aria-rowindex": "1"
5094
5210
  };
5095
- const _hoisted_4$1 = {
5211
+ const _hoisted_5$1 = {
5096
5212
  key: 0,
5097
5213
  scope: "col",
5098
5214
  tabindex: "-1",
5099
5215
  class: "table-ng__column"
5100
5216
  };
5101
- const _hoisted_5$1 = {
5217
+ const _hoisted_6$1 = {
5218
+ key: 2
5219
+ };
5220
+ const _hoisted_7$1 = {
5102
5221
  key: 0,
5103
5222
  class: "table-ng__row--empty"
5104
5223
  };
5105
- const _hoisted_6$1 = ["colspan"];
5106
- const _hoisted_7$1 = ["aria-level", "aria-rowindex", "aria-setsize", "aria-posinset", "aria-selected"];
5107
- const _hoisted_8 = {
5108
- 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
5109
5228
  };
5110
- const _hoisted_9 = ["aria-rowindex"];
5111
- const _hoisted_10 = ["colspan"];
5229
+ const _hoisted_11 = ["aria-rowindex"];
5230
+ const _hoisted_12 = ["colspan"];
5112
5231
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5113
5232
  __name: "FTable",
5114
5233
  props: /* @__PURE__ */ vue.mergeModels({
@@ -5120,6 +5239,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5120
5239
  expandableAttribute: {
5121
5240
  default: () => void 0
5122
5241
  },
5242
+ rowClass: {
5243
+ type: Function,
5244
+ default: void 0
5245
+ },
5123
5246
  striped: {
5124
5247
  type: Boolean
5125
5248
  },
@@ -5140,6 +5263,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5140
5263
  expose: __expose
5141
5264
  }) {
5142
5265
  const selectedRows = vue.useModel(__props, "selectedRows");
5266
+ const $t = vue$1.useTranslate();
5143
5267
  const {
5144
5268
  hasSlot
5145
5269
  } = vue$1.useSlotUtils();
@@ -5158,20 +5282,35 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5158
5282
  return metaRows.value.length === 0;
5159
5283
  });
5160
5284
  const ariaRowcount = vue.computed(() => {
5285
+ const footerRow = hasFooter.value ? 1 : 0;
5286
+ if (!hasColumns.value) {
5287
+ return footerRow;
5288
+ }
5161
5289
  const headerRow = 1;
5162
- const footerRow = hasFooter.value ? 1 : 0;
5163
- return getBodyRowCount(keyedRows.value, __props.expandableAttribute) + headerRow + footerRow;
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;
5164
5305
  });
5165
- const columnCount = vue.computed(() => {
5166
- const expandCol = isTreegrid.value ? 1 : 0;
5167
- const selectCol = __props.selectable ? 1 : 0;
5168
- const count = columns.value.length + expandCol + selectCol;
5169
- return Math.max(1, count);
5306
+ const expandedColspan = vue.computed(() => {
5307
+ return fullColspan.value - 1;
5170
5308
  });
5171
5309
  const hasFooter = vue.computed(() => {
5172
5310
  return hasSlot("footer");
5173
5311
  });
5174
- const columns = vue.computed(() => normalizeTableColumns(__props.columns));
5312
+ const columns = vue.computed(() => normalizeTableColumns(__props.columns).filter((col) => vue.toValue(col.enabled)));
5313
+ const hasColumns = vue.computed(() => columns.value.length > 0);
5175
5314
  const tableClasses = vue.computed(() => {
5176
5315
  return ["table-ng", {
5177
5316
  "table-ng--striped": __props.striped,
@@ -5186,6 +5325,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5186
5325
  stopEdit(element, reason);
5187
5326
  }
5188
5327
  vue.provide(stopEditKey, stopEditHandler);
5328
+ function getRowClass(row) {
5329
+ return typeof __props.rowClass === "function" ? __props.rowClass(row) : void 0;
5330
+ }
5189
5331
  function onToggleExpanded(key) {
5190
5332
  if (expandedKeys.value.has(key)) {
5191
5333
  expandedKeys.value.delete(key);
@@ -5199,18 +5341,21 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5199
5341
  function onClick(e) {
5200
5342
  const cell = e.target.closest("td, th");
5201
5343
  if (cell) {
5202
- activateCell(cell, {
5344
+ const targetEl = activateCell(cell, {
5203
5345
  focus: true
5204
5346
  });
5347
+ if (e.target instanceof Node && !targetEl.contains(e.target)) {
5348
+ targetEl.click();
5349
+ }
5205
5350
  }
5206
5351
  }
5207
5352
  function onTableFocusin(e) {
5208
5353
  logic.assertRef(tableRef);
5209
- tableRef.value.querySelectorAll(`:not(tfoot)[tabindex="0"]`).forEach((it) => {
5354
+ for (const it of tableRef.value.querySelectorAll(`[tabindex="0"]`)) {
5210
5355
  if (it !== e.target) {
5211
5356
  it.setAttribute("tabindex", "-1");
5212
5357
  }
5213
- });
5358
+ }
5214
5359
  }
5215
5360
  function isInExpandable(el) {
5216
5361
  if (!el.parentElement) {
@@ -5233,7 +5378,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5233
5378
  if (!tableRef.value) {
5234
5379
  return;
5235
5380
  }
5236
- const outsideTable = Boolean(tableRef.value.tFoot?.contains(relatedTarget)) || !tableRef.value.contains(relatedTarget);
5381
+ const outsideTable = !tableRef.value.contains(relatedTarget);
5237
5382
  if (outsideTable) {
5238
5383
  const cell = target.closest("td, th");
5239
5384
  if (cell) {
@@ -5327,13 +5472,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5327
5472
  ref: "table",
5328
5473
  role: role.value,
5329
5474
  class: vue.normalizeClass(tableClasses.value),
5330
- "aria-rowcount": ariaRowcount.value
5331
- }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("thead", {
5475
+ "aria-rowcount": ariaRowcount.value,
5332
5476
  onFocusin: onTableFocusin,
5333
5477
  onFocusout: onTableFocusout,
5334
5478
  onClick,
5335
5479
  onKeydown
5336
- }, [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, {
5337
5481
  key: 1,
5338
5482
  ref: bindCellApiRef,
5339
5483
  state: vue.unref(selectableHeaderState)(),
@@ -5348,15 +5492,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5348
5492
  scope: "col",
5349
5493
  onToggleSortOrder
5350
5494
  }, null, 8, ["column", "sort-enabled", "sort-order"]);
5351
- }), 128))])], 32), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.createElementVNode("tbody", {
5352
- onFocusin: onTableFocusin,
5353
- onFocusout: onTableFocusout,
5354
- onClick,
5355
- onKeydown
5356
- }, [isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$1, [vue.createElementVNode("td", {
5357
- 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,
5358
5497
  class: "table-ng__cell"
5359
- }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [_cache[2] || (_cache[2] = vue.createTextVNode(" 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, {
5360
5499
  key: 1
5361
5500
  }, vue.renderList(metaRows.value, ({
5362
5501
  key,
@@ -5370,7 +5509,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5370
5509
  }) => {
5371
5510
  return vue.openBlock(), vue.createElementBlock("tr", {
5372
5511
  key,
5373
- class: "table-ng__row",
5512
+ class: vue.normalizeClass(["table-ng__row", getRowClass(row)]),
5374
5513
  "aria-level": level,
5375
5514
  "aria-rowindex": rowIndex,
5376
5515
  "aria-setsize": setsize,
@@ -5384,9 +5523,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5384
5523
  "is-expanded": isExpanded,
5385
5524
  "row-key": key,
5386
5525
  onToggle: onToggleExpanded
5387
- }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
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, {
5388
5527
  key: 1,
5389
- colspan: columns.value.length
5528
+ colspan: expandedColspan.value
5390
5529
  }, {
5391
5530
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "expandable", vue.mergeProps({
5392
5531
  ref_for: true
@@ -5405,7 +5544,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5405
5544
  state: vue.unref(selectableRowState)(row),
5406
5545
  row,
5407
5546
  onToggle: vue.unref(toggleSelectableRow)
5408
- }, null, 8, ["level", "selectable", "state", "row", "onToggle"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
5547
+ }, null, 8, ["level", "selectable", "state", "row", "onToggle"])) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
5409
5548
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5410
5549
  key: column.id
5411
5550
  }, ["component" in column ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(column.component), {
@@ -5421,39 +5560,18 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5421
5560
  key: 1,
5422
5561
  row
5423
5562
  }, null, 8, ["row"])) : vue.createCommentVNode("", true)], 64);
5424
- }), 128))], 64))], 8, _hoisted_7$1);
5425
- }), 128))], 32), _cache[7] || (_cache[7] = 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", {
5426
5565
  class: "table-ng__row",
5427
5566
  "aria-rowindex": ariaRowcount.value
5428
5567
  }, [vue.createElementVNode("td", {
5429
- colspan: columnCount.value,
5568
+ colspan: fullColspan.value,
5430
5569
  class: "table-ng__cell--custom"
5431
- }, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_10)], 8, _hoisted_9)])) : vue.createCommentVNode("", true)], 10, _hoisted_1$2);
5570
+ }, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_12)], 8, _hoisted_11)])) : vue.createCommentVNode("", true)], 42, _hoisted_1$2);
5432
5571
  };
5433
5572
  }
5434
5573
  });
5435
5574
  var es_array_toSpliced = {};
5436
- var addToUnscopables;
5437
- var hasRequiredAddToUnscopables;
5438
- function requireAddToUnscopables() {
5439
- if (hasRequiredAddToUnscopables) return addToUnscopables;
5440
- hasRequiredAddToUnscopables = 1;
5441
- var wellKnownSymbol2 = requireWellKnownSymbol();
5442
- var create = requireObjectCreate();
5443
- var defineProperty = requireObjectDefineProperty().f;
5444
- var UNSCOPABLES = wellKnownSymbol2("unscopables");
5445
- var ArrayPrototype = Array.prototype;
5446
- if (ArrayPrototype[UNSCOPABLES] === void 0) {
5447
- defineProperty(ArrayPrototype, UNSCOPABLES, {
5448
- configurable: true,
5449
- value: create(null)
5450
- });
5451
- }
5452
- addToUnscopables = function(key) {
5453
- ArrayPrototype[UNSCOPABLES][key] = true;
5454
- };
5455
- return addToUnscopables;
5456
- }
5457
5575
  var hasRequiredEs_array_toSpliced;
5458
5576
  function requireEs_array_toSpliced() {
5459
5577
  if (hasRequiredEs_array_toSpliced) return es_array_toSpliced;
@@ -5751,6 +5869,7 @@ function requireArrayBufferTransfer() {
5751
5869
  var structuredClone = globalThis2.structuredClone;
5752
5870
  var ArrayBuffer2 = globalThis2.ArrayBuffer;
5753
5871
  var DataView2 = globalThis2.DataView;
5872
+ var max = Math.max;
5754
5873
  var min = Math.min;
5755
5874
  var ArrayBufferPrototype = ArrayBuffer2.prototype;
5756
5875
  var DataViewPrototype = DataView2.prototype;
@@ -5775,7 +5894,7 @@ function requireArrayBufferTransfer() {
5775
5894
  newBuffer = slice(arrayBuffer, 0, newByteLength);
5776
5895
  } else {
5777
5896
  var options = preserveResizability && !fixedLength && maxByteLength ? {
5778
- maxByteLength: maxByteLength(arrayBuffer)
5897
+ maxByteLength: max(newByteLength, maxByteLength(arrayBuffer))
5779
5898
  } : void 0;
5780
5899
  newBuffer = new ArrayBuffer2(newByteLength, options);
5781
5900
  var a = new DataView2(arrayBuffer);
@@ -5823,78 +5942,6 @@ function requireEs_arrayBuffer_transferToFixedLength() {
5823
5942
  return es_arrayBuffer_transferToFixedLength;
5824
5943
  }
5825
5944
  requireEs_arrayBuffer_transferToFixedLength();
5826
- var es_iterator_reduce = {};
5827
- var functionApply;
5828
- var hasRequiredFunctionApply;
5829
- function requireFunctionApply() {
5830
- if (hasRequiredFunctionApply) return functionApply;
5831
- hasRequiredFunctionApply = 1;
5832
- var NATIVE_BIND = requireFunctionBindNative();
5833
- var FunctionPrototype = Function.prototype;
5834
- var apply = FunctionPrototype.apply;
5835
- var call = FunctionPrototype.call;
5836
- functionApply = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
5837
- return call.apply(apply, arguments);
5838
- });
5839
- return functionApply;
5840
- }
5841
- var hasRequiredEs_iterator_reduce;
5842
- function requireEs_iterator_reduce() {
5843
- if (hasRequiredEs_iterator_reduce) return es_iterator_reduce;
5844
- hasRequiredEs_iterator_reduce = 1;
5845
- var $ = require_export();
5846
- var iterate2 = requireIterate();
5847
- var aCallable2 = requireACallable();
5848
- var anObject2 = requireAnObject();
5849
- var getIteratorDirect2 = requireGetIteratorDirect();
5850
- var iteratorClose2 = requireIteratorClose();
5851
- var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
5852
- var apply = requireFunctionApply();
5853
- var fails2 = requireFails();
5854
- var $TypeError = TypeError;
5855
- var FAILS_ON_INITIAL_UNDEFINED = fails2(function() {
5856
- [].keys().reduce(function() {
5857
- }, void 0);
5858
- });
5859
- var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError2("reduce", $TypeError);
5860
- $({
5861
- target: "Iterator",
5862
- proto: true,
5863
- real: true,
5864
- forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError
5865
- }, {
5866
- reduce: function reduce(reducer) {
5867
- anObject2(this);
5868
- try {
5869
- aCallable2(reducer);
5870
- } catch (error) {
5871
- iteratorClose2(this, "throw", error);
5872
- }
5873
- var noInitial = arguments.length < 2;
5874
- var accumulator = noInitial ? void 0 : arguments[1];
5875
- if (reduceWithoutClosingOnEarlyError) {
5876
- return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
5877
- }
5878
- var record = getIteratorDirect2(this);
5879
- var counter = 0;
5880
- iterate2(record, function(value) {
5881
- if (noInitial) {
5882
- noInitial = false;
5883
- accumulator = value;
5884
- } else {
5885
- accumulator = reducer(accumulator, value, counter);
5886
- }
5887
- counter++;
5888
- }, {
5889
- IS_RECORD: true
5890
- });
5891
- if (noInitial) throw new $TypeError("Reduce of empty iterator with no initial value");
5892
- return accumulator;
5893
- }
5894
- });
5895
- return es_iterator_reduce;
5896
- }
5897
- requireEs_iterator_reduce();
5898
5945
  var es_typedArray_toReversed = {};
5899
5946
  var isPossiblePrototype;
5900
5947
  var hasRequiredIsPossiblePrototype;
@@ -6107,7 +6154,7 @@ function requireArrayBufferViewCore() {
6107
6154
  }
6108
6155
  });
6109
6156
  for (NAME in TypedArrayConstructorsList) if (globalThis2[NAME]) {
6110
- createNonEnumerableProperty2(globalThis2[NAME], TYPED_ARRAY_TAG, NAME);
6157
+ createNonEnumerableProperty2(globalThis2[NAME].prototype, TYPED_ARRAY_TAG, NAME);
6111
6158
  }
6112
6159
  }
6113
6160
  arrayBufferViewCore = {
@@ -6146,21 +6193,6 @@ function requireEs_typedArray_toReversed() {
6146
6193
  }
6147
6194
  requireEs_typedArray_toReversed();
6148
6195
  var es_typedArray_toSorted = {};
6149
- var arrayFromConstructorAndList;
6150
- var hasRequiredArrayFromConstructorAndList;
6151
- function requireArrayFromConstructorAndList() {
6152
- if (hasRequiredArrayFromConstructorAndList) return arrayFromConstructorAndList;
6153
- hasRequiredArrayFromConstructorAndList = 1;
6154
- var lengthOfArrayLike2 = requireLengthOfArrayLike();
6155
- arrayFromConstructorAndList = function(Constructor, list, $length) {
6156
- var index = 0;
6157
- var length = arguments.length > 2 ? $length : lengthOfArrayLike2(list);
6158
- var result = new Constructor(length);
6159
- while (length > index) result[index] = list[index++];
6160
- return result;
6161
- };
6162
- return arrayFromConstructorAndList;
6163
- }
6164
6196
  var hasRequiredEs_typedArray_toSorted;
6165
6197
  function requireEs_typedArray_toSorted() {
6166
6198
  if (hasRequiredEs_typedArray_toSorted) return es_typedArray_toSorted;
@@ -6526,26 +6558,25 @@ function requireUint8FromHex() {
6526
6558
  var uncurryThis = requireFunctionUncurryThis();
6527
6559
  var Uint8Array2 = globalThis2.Uint8Array;
6528
6560
  var SyntaxError = globalThis2.SyntaxError;
6529
- var parseInt2 = globalThis2.parseInt;
6530
6561
  var min = Math.min;
6531
- var NOT_HEX = /[^\da-f]/i;
6532
- var exec = uncurryThis(NOT_HEX.exec);
6533
- var stringSlice = uncurryThis("".slice);
6562
+ var stringMatch = uncurryThis("".match);
6534
6563
  uint8FromHex = function(string, into) {
6535
6564
  var stringLength = string.length;
6536
6565
  if (stringLength % 2 !== 0) throw new SyntaxError("String should be an even number of characters");
6537
6566
  var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2;
6538
6567
  var bytes = into || new Uint8Array2(maxLength);
6539
- var read = 0;
6568
+ var segments = stringMatch(string, /.{2}/g);
6540
6569
  var written = 0;
6541
- while (written < maxLength) {
6542
- var hexits = stringSlice(string, read, read += 2);
6543
- if (exec(NOT_HEX, hexits)) throw new SyntaxError("String should only contain hex characters");
6544
- bytes[written++] = parseInt2(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;
6545
6576
  }
6546
6577
  return {
6547
6578
  bytes,
6548
- read
6579
+ read: written << 1
6549
6580
  };
6550
6581
  };
6551
6582
  return uint8FromHex;
@@ -6660,6 +6691,8 @@ function requireEs_uint8Array_toHex() {
6660
6691
  var anUint8Array2 = requireAnUint8Array();
6661
6692
  var notDetached = requireArrayBufferNotDetached();
6662
6693
  var numberToString = uncurryThis(1.1.toString);
6694
+ var join = uncurryThis([].join);
6695
+ var $Array = Array;
6663
6696
  var Uint8Array2 = globalThis2.Uint8Array;
6664
6697
  var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array2 || !Uint8Array2.prototype.toHex || !(function() {
6665
6698
  try {
@@ -6677,12 +6710,12 @@ function requireEs_uint8Array_toHex() {
6677
6710
  toHex: function toHex() {
6678
6711
  anUint8Array2(this);
6679
6712
  notDetached(this.buffer);
6680
- var result = "";
6713
+ var result = $Array(this.length);
6681
6714
  for (var i = 0, length = this.length; i < length; i++) {
6682
6715
  var hex = numberToString(this[i], 16);
6683
- result += hex.length === 1 ? "0" + hex : hex;
6716
+ result[i] = hex.length === 1 ? "0" + hex : hex;
6684
6717
  }
6685
- return result;
6718
+ return join(result, "");
6686
6719
  }
6687
6720
  });
6688
6721
  return es_uint8Array_toHex;
@@ -7052,7 +7085,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7052
7085
  Object.values(filer ? filer : valdFil.value).forEach(async (value) => {
7053
7086
  try {
7054
7087
  const buffer = await value.arrayBuffer();
7055
- const reduced = new Uint8Array(buffer).reduce((data, byte) => data + String.fromCharCode(byte), "");
7088
+ const reduced = new Uint8Array(buffer).reduce((data, byte) => data + String.fromCodePoint(byte), "");
7056
7089
  uppladdatDokument.value = {
7057
7090
  dokument: {
7058
7091
  filnamn: value.name,
@@ -7085,14 +7118,14 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7085
7118
  }
7086
7119
  function fokusElement(id) {
7087
7120
  setTimeout(() => {
7088
- const element = document.getElementById(id);
7121
+ const element = document.querySelector(`#${id}`);
7089
7122
  if (element instanceof HTMLElement) {
7090
7123
  element.focus();
7091
7124
  }
7092
7125
  }, 100);
7093
7126
  }
7094
7127
  function resetElement(id) {
7095
- const element = document.getElementById(id);
7128
+ const element = document.querySelector(`#${id}`);
7096
7129
  if (element instanceof HTMLInputElement) {
7097
7130
  element.value = "";
7098
7131
  }
@@ -7201,61 +7234,6 @@ function uniqueValues(items, property) {
7201
7234
  unique.sort();
7202
7235
  return unique;
7203
7236
  }
7204
- var es_iterator_filter = {};
7205
- var hasRequiredEs_iterator_filter;
7206
- function requireEs_iterator_filter() {
7207
- if (hasRequiredEs_iterator_filter) return es_iterator_filter;
7208
- hasRequiredEs_iterator_filter = 1;
7209
- var $ = require_export();
7210
- var call = requireFunctionCall();
7211
- var aCallable2 = requireACallable();
7212
- var anObject2 = requireAnObject();
7213
- var getIteratorDirect2 = requireGetIteratorDirect();
7214
- var createIteratorProxy = requireIteratorCreateProxy();
7215
- var callWithSafeIterationClosing2 = requireCallWithSafeIterationClosing();
7216
- var IS_PURE = requireIsPure();
7217
- var iteratorClose2 = requireIteratorClose();
7218
- var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
7219
- var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
7220
- var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("filter", function() {
7221
- });
7222
- var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("filter", TypeError);
7223
- var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;
7224
- var IteratorProxy = createIteratorProxy(function() {
7225
- var iterator = this.iterator;
7226
- var predicate = this.predicate;
7227
- var next = this.next;
7228
- var result, done, value;
7229
- while (true) {
7230
- result = anObject2(call(next, iterator));
7231
- done = this.done = !!result.done;
7232
- if (done) return;
7233
- value = result.value;
7234
- if (callWithSafeIterationClosing2(iterator, predicate, [value, this.counter++], true)) return value;
7235
- }
7236
- });
7237
- $({
7238
- target: "Iterator",
7239
- proto: true,
7240
- real: true,
7241
- forced: FORCED
7242
- }, {
7243
- filter: function filter(predicate) {
7244
- anObject2(this);
7245
- try {
7246
- aCallable2(predicate);
7247
- } catch (error) {
7248
- iteratorClose2(this, "throw", error);
7249
- }
7250
- if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);
7251
- return new IteratorProxy(getIteratorDirect2(this), {
7252
- predicate
7253
- });
7254
- }
7255
- });
7256
- return es_iterator_filter;
7257
- }
7258
- requireEs_iterator_filter();
7259
7237
  const _hoisted_1 = {
7260
7238
  class: "sort-filter-dataset-ng"
7261
7239
  };
@@ -7296,6 +7274,78 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
7296
7274
  });
7297
7275
  const HOURS_MINUTES_REGEXP = /^(?<hours>\d+)?(:(?<minutes>[0-5]\d))?$/;
7298
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();
7299
7349
  function findMatch(regexps, value) {
7300
7350
  for (const regexp of regexps) {
7301
7351
  const match = value.match(regexp);
@@ -7313,14 +7363,14 @@ function hoursMinutesStringToMinutes(valueString, extraForgiving = false) {
7313
7363
  if (logic.isEmpty(valueString.trim())) {
7314
7364
  return void 0;
7315
7365
  }
7316
- const [hours, minutes] = splitHoursMinutes(valueString, extraForgiving).map((value) => parseInt(value, 10));
7366
+ const [hours, minutes] = splitHoursMinutes(valueString, extraForgiving).map((value) => Number.parseInt(value, 10));
7317
7367
  const totalMinutes = hours * 60 + minutes;
7318
- return !isNaN(totalMinutes) ? totalMinutes : void 0;
7368
+ return !Number.isNaN(totalMinutes) ? totalMinutes : void 0;
7319
7369
  }
7320
7370
  function minutesToHoursMinutesString(value) {
7321
7371
  let valueString = "";
7322
- const safeValue = value !== null && value !== void 0 ? value : NaN;
7323
- if (!isNaN(safeValue)) {
7372
+ const safeValue = value !== null && value !== void 0 ? value : Number.NaN;
7373
+ if (!Number.isNaN(safeValue)) {
7324
7374
  const {
7325
7375
  hours,
7326
7376
  minutes
@@ -7347,18 +7397,18 @@ function minutesToUserFriendlyString(value) {
7347
7397
  });
7348
7398
  }
7349
7399
  function minutesToHoursFloat(...values) {
7350
- const minutes = values.filter((value) => logic.isSet(value) && !isNaN(value)).reduce((sum, value) => sum + value, 0);
7400
+ const minutes = values.filter((value) => logic.isSet(value) && !Number.isNaN(value)).reduce((sum, value) => sum + value, 0);
7351
7401
  return minutes / 60;
7352
7402
  }
7353
7403
  function minutesToObject(...values) {
7354
- const minutes = values.filter((value) => logic.isSet(value) && !isNaN(value)).reduce((sum, value) => sum + value, 0);
7404
+ const minutes = values.filter((value) => logic.isSet(value) && !Number.isNaN(value)).reduce((sum, value) => sum + value, 0);
7355
7405
  return {
7356
7406
  hours: Math.floor(minutes / 60),
7357
7407
  minutes: minutes % 60
7358
7408
  };
7359
7409
  }
7360
7410
  function formatNumberToTime(value) {
7361
- if (typeof value !== "number" || isNaN(value)) {
7411
+ if (typeof value !== "number" || Number.isNaN(value)) {
7362
7412
  return void 0;
7363
7413
  }
7364
7414
  return minutesToHoursMinutesString(value);
@@ -7368,8 +7418,8 @@ function parseTimeToNumberUsingConfig(value, extraForgiving) {
7368
7418
  if (typeof value !== "string") {
7369
7419
  return void 0;
7370
7420
  }
7371
- const parsedValue = (_hoursMinutesStringTo = hoursMinutesStringToMinutes(value, extraForgiving)) !== null && _hoursMinutesStringTo !== void 0 ? _hoursMinutesStringTo : NaN;
7372
- return !isNaN(parsedValue) ? parsedValue : void 0;
7421
+ const parsedValue = (_hoursMinutesStringTo = hoursMinutesStringToMinutes(value, extraForgiving)) !== null && _hoursMinutesStringTo !== void 0 ? _hoursMinutesStringTo : Number.NaN;
7422
+ return !Number.isNaN(parsedValue) ? parsedValue : void 0;
7373
7423
  }
7374
7424
  function parseTimeToNumber(value) {
7375
7425
  return parseTimeToNumberUsingConfig(value, false);