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