@fkui/vue-labs 6.37.0 → 6.39.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.
@@ -1782,6 +1782,221 @@ function requireEs_iterator_constructor() {
1782
1782
  return es_iterator_constructor;
1783
1783
  }
1784
1784
  requireEs_iterator_constructor();
1785
+ var es_iterator_filter = {};
1786
+ var defineBuiltIns;
1787
+ var hasRequiredDefineBuiltIns;
1788
+ function requireDefineBuiltIns() {
1789
+ if (hasRequiredDefineBuiltIns) return defineBuiltIns;
1790
+ hasRequiredDefineBuiltIns = 1;
1791
+ var defineBuiltIn2 = requireDefineBuiltIn();
1792
+ defineBuiltIns = function(target, src, options) {
1793
+ for (var key in src) defineBuiltIn2(target, key, src[key], options);
1794
+ return target;
1795
+ };
1796
+ return defineBuiltIns;
1797
+ }
1798
+ var createIterResultObject;
1799
+ var hasRequiredCreateIterResultObject;
1800
+ function requireCreateIterResultObject() {
1801
+ if (hasRequiredCreateIterResultObject) return createIterResultObject;
1802
+ hasRequiredCreateIterResultObject = 1;
1803
+ createIterResultObject = function(value, done) {
1804
+ return {
1805
+ value,
1806
+ done
1807
+ };
1808
+ };
1809
+ return createIterResultObject;
1810
+ }
1811
+ var iteratorCloseAll;
1812
+ var hasRequiredIteratorCloseAll;
1813
+ function requireIteratorCloseAll() {
1814
+ if (hasRequiredIteratorCloseAll) return iteratorCloseAll;
1815
+ hasRequiredIteratorCloseAll = 1;
1816
+ var iteratorClose2 = requireIteratorClose();
1817
+ iteratorCloseAll = function(iters, kind, value) {
1818
+ for (var i = iters.length - 1; i >= 0; i--) {
1819
+ if (iters[i] === void 0) continue;
1820
+ try {
1821
+ value = iteratorClose2(iters[i].iterator, kind, value);
1822
+ } catch (error) {
1823
+ kind = "throw";
1824
+ value = error;
1825
+ }
1826
+ }
1827
+ if (kind === "throw") throw value;
1828
+ return value;
1829
+ };
1830
+ return iteratorCloseAll;
1831
+ }
1832
+ var iteratorCreateProxy;
1833
+ var hasRequiredIteratorCreateProxy;
1834
+ function requireIteratorCreateProxy() {
1835
+ if (hasRequiredIteratorCreateProxy) return iteratorCreateProxy;
1836
+ hasRequiredIteratorCreateProxy = 1;
1837
+ var call = requireFunctionCall();
1838
+ var create = requireObjectCreate();
1839
+ var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
1840
+ var defineBuiltIns2 = requireDefineBuiltIns();
1841
+ var wellKnownSymbol2 = requireWellKnownSymbol();
1842
+ var InternalStateModule = requireInternalState();
1843
+ var getMethod2 = requireGetMethod();
1844
+ var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
1845
+ var createIterResultObject2 = requireCreateIterResultObject();
1846
+ var iteratorClose2 = requireIteratorClose();
1847
+ var iteratorCloseAll2 = requireIteratorCloseAll();
1848
+ var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
1849
+ var ITERATOR_HELPER = "IteratorHelper";
1850
+ var WRAP_FOR_VALID_ITERATOR = "WrapForValidIterator";
1851
+ var NORMAL = "normal";
1852
+ var THROW = "throw";
1853
+ var setInternalState = InternalStateModule.set;
1854
+ var createIteratorProxyPrototype = function(IS_ITERATOR) {
1855
+ var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
1856
+ return defineBuiltIns2(create(IteratorPrototype), {
1857
+ next: function next() {
1858
+ var state = getInternalState(this);
1859
+ if (IS_ITERATOR) return state.nextHandler();
1860
+ if (state.done) return createIterResultObject2(void 0, true);
1861
+ try {
1862
+ var result = state.nextHandler();
1863
+ return state.returnHandlerResult ? result : createIterResultObject2(result, state.done);
1864
+ } catch (error) {
1865
+ state.done = true;
1866
+ throw error;
1867
+ }
1868
+ },
1869
+ "return": function() {
1870
+ var state = getInternalState(this);
1871
+ var iterator = state.iterator;
1872
+ state.done = true;
1873
+ if (IS_ITERATOR) {
1874
+ var returnMethod = getMethod2(iterator, "return");
1875
+ return returnMethod ? call(returnMethod, iterator) : createIterResultObject2(void 0, true);
1876
+ }
1877
+ if (state.inner) try {
1878
+ iteratorClose2(state.inner.iterator, NORMAL);
1879
+ } catch (error) {
1880
+ return iteratorClose2(iterator, THROW, error);
1881
+ }
1882
+ if (state.openIters) try {
1883
+ iteratorCloseAll2(state.openIters, NORMAL);
1884
+ } catch (error) {
1885
+ return iteratorClose2(iterator, THROW, error);
1886
+ }
1887
+ if (iterator) iteratorClose2(iterator, NORMAL);
1888
+ return createIterResultObject2(void 0, true);
1889
+ }
1890
+ });
1891
+ };
1892
+ var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
1893
+ var IteratorHelperPrototype = createIteratorProxyPrototype(false);
1894
+ createNonEnumerableProperty2(IteratorHelperPrototype, TO_STRING_TAG, "Iterator Helper");
1895
+ iteratorCreateProxy = function(nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
1896
+ var IteratorProxy = function Iterator2(record, state) {
1897
+ if (state) {
1898
+ state.iterator = record.iterator;
1899
+ state.next = record.next;
1900
+ } else state = record;
1901
+ state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
1902
+ state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
1903
+ state.nextHandler = nextHandler;
1904
+ state.counter = 0;
1905
+ state.done = false;
1906
+ setInternalState(this, state);
1907
+ };
1908
+ IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
1909
+ return IteratorProxy;
1910
+ };
1911
+ return iteratorCreateProxy;
1912
+ }
1913
+ var callWithSafeIterationClosing;
1914
+ var hasRequiredCallWithSafeIterationClosing;
1915
+ function requireCallWithSafeIterationClosing() {
1916
+ if (hasRequiredCallWithSafeIterationClosing) return callWithSafeIterationClosing;
1917
+ hasRequiredCallWithSafeIterationClosing = 1;
1918
+ var anObject2 = requireAnObject();
1919
+ var iteratorClose2 = requireIteratorClose();
1920
+ callWithSafeIterationClosing = function(iterator, fn, value, ENTRIES) {
1921
+ try {
1922
+ return ENTRIES ? fn(anObject2(value)[0], value[1]) : fn(value);
1923
+ } catch (error) {
1924
+ iteratorClose2(iterator, "throw", error);
1925
+ }
1926
+ };
1927
+ return callWithSafeIterationClosing;
1928
+ }
1929
+ var iteratorHelperThrowsOnInvalidIterator;
1930
+ var hasRequiredIteratorHelperThrowsOnInvalidIterator;
1931
+ function requireIteratorHelperThrowsOnInvalidIterator() {
1932
+ if (hasRequiredIteratorHelperThrowsOnInvalidIterator) return iteratorHelperThrowsOnInvalidIterator;
1933
+ hasRequiredIteratorHelperThrowsOnInvalidIterator = 1;
1934
+ iteratorHelperThrowsOnInvalidIterator = function(methodName, argument) {
1935
+ var method = typeof Iterator == "function" && Iterator.prototype[methodName];
1936
+ if (method) try {
1937
+ method.call({
1938
+ next: null
1939
+ }, argument).next();
1940
+ } catch (error) {
1941
+ return true;
1942
+ }
1943
+ };
1944
+ return iteratorHelperThrowsOnInvalidIterator;
1945
+ }
1946
+ var hasRequiredEs_iterator_filter;
1947
+ function requireEs_iterator_filter() {
1948
+ if (hasRequiredEs_iterator_filter) return es_iterator_filter;
1949
+ hasRequiredEs_iterator_filter = 1;
1950
+ var $ = require_export();
1951
+ var call = requireFunctionCall();
1952
+ var aCallable2 = requireACallable();
1953
+ var anObject2 = requireAnObject();
1954
+ var getIteratorDirect2 = requireGetIteratorDirect();
1955
+ var createIteratorProxy = requireIteratorCreateProxy();
1956
+ var callWithSafeIterationClosing2 = requireCallWithSafeIterationClosing();
1957
+ var IS_PURE = requireIsPure();
1958
+ var iteratorClose2 = requireIteratorClose();
1959
+ var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
1960
+ var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
1961
+ var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("filter", function() {
1962
+ });
1963
+ var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("filter", TypeError);
1964
+ var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;
1965
+ var IteratorProxy = createIteratorProxy(function() {
1966
+ var iterator = this.iterator;
1967
+ var predicate = this.predicate;
1968
+ var next = this.next;
1969
+ var result, done, value;
1970
+ while (true) {
1971
+ result = anObject2(call(next, iterator));
1972
+ done = this.done = !!result.done;
1973
+ if (done) return;
1974
+ value = result.value;
1975
+ if (callWithSafeIterationClosing2(iterator, predicate, [value, this.counter++], true)) return value;
1976
+ }
1977
+ });
1978
+ $({
1979
+ target: "Iterator",
1980
+ proto: true,
1981
+ real: true,
1982
+ forced: FORCED
1983
+ }, {
1984
+ filter: function filter(predicate) {
1985
+ anObject2(this);
1986
+ try {
1987
+ aCallable2(predicate);
1988
+ } catch (error) {
1989
+ iteratorClose2(this, "throw", error);
1990
+ }
1991
+ if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);
1992
+ return new IteratorProxy(getIteratorDirect2(this), {
1993
+ predicate
1994
+ });
1995
+ }
1996
+ });
1997
+ return es_iterator_filter;
1998
+ }
1999
+ requireEs_iterator_filter();
1785
2000
  var es_set_difference_v2 = {};
1786
2001
  var setHelpers;
1787
2002
  var hasRequiredSetHelpers;
@@ -2378,7 +2593,7 @@ function isFTableCellApi(value) {
2378
2593
  return value !== null && typeof value === "object" && Boolean(value.tabstopEl);
2379
2594
  }
2380
2595
  const tableCellApiSymbol = /* @__PURE__ */ Symbol("table:cell-api");
2381
- const navKeys = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"];
2596
+ const navKeys = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"]);
2382
2597
  let prevCellIndex = void 0;
2383
2598
  function getCellTarget(tableElement, rowIndex, cellIndex) {
2384
2599
  return tableElement.rows[rowIndex].cells[cellIndex];
@@ -2405,7 +2620,7 @@ function getVerticalNavIndex(table, from, to) {
2405
2620
  target.cell = prevCellIndex;
2406
2621
  prevCellIndex = void 0;
2407
2622
  } else {
2408
- target.cell = targetMax < from.cell ? targetMax : from.cell;
2623
+ target.cell = Math.min(targetMax, from.cell);
2409
2624
  }
2410
2625
  if (targetMax < from.cell) {
2411
2626
  prevCellIndex = from.cell;
@@ -2419,7 +2634,7 @@ function navigate(e, table, from, last) {
2419
2634
  if (!isDefined(from) || !isDefined(last)) {
2420
2635
  return;
2421
2636
  }
2422
- if (!navKeys.includes(e.code)) {
2637
+ if (!navKeys.has(e.code)) {
2423
2638
  return;
2424
2639
  }
2425
2640
  e.preventDefault();
@@ -2538,6 +2753,7 @@ function activateCell(element, options) {
2538
2753
  if (options?.focus) {
2539
2754
  targetEl.focus();
2540
2755
  }
2756
+ return targetEl;
2541
2757
  }
2542
2758
  function stopEdit(element, reason) {
2543
2759
  const td = getCell(element);
@@ -2617,8 +2833,8 @@ const _hoisted_1$e = {
2617
2833
  key: 0,
2618
2834
  class: "table-ng__cell table-ng__cell--expand"
2619
2835
  };
2620
- const _hoisted_2$a = ["aria-label", "aria-expanded"];
2621
- const _hoisted_3$8 = {
2836
+ const _hoisted_2$9 = ["aria-label", "aria-expanded"];
2837
+ const _hoisted_3$6 = {
2622
2838
  key: 1,
2623
2839
  ref: "expandable",
2624
2840
  tabindex: "-1",
@@ -2664,7 +2880,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2664
2880
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
2665
2881
  class: "button__icon",
2666
2882
  name: toggleIcon.value
2667
- }, null, 8, ["name"])], 8, _hoisted_2$a)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$8, null, 512));
2883
+ }, null, 8, ["name"])], 8, _hoisted_2$9)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$6, null, 512));
2668
2884
  };
2669
2885
  }
2670
2886
  });
@@ -3082,7 +3298,7 @@ const _hoisted_1$b = {
3082
3298
  scope: "col",
3083
3299
  class: "table-ng__column table-ng__column--selectable"
3084
3300
  };
3085
- const _hoisted_2$9 = ["checked", "indeterminate"];
3301
+ const _hoisted_2$8 = ["checked", "indeterminate", "aria-label"];
3086
3302
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3087
3303
  __name: "ITableHeaderSelectable",
3088
3304
  props: {
@@ -3097,9 +3313,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3097
3313
  emit: __emit
3098
3314
  }) {
3099
3315
  const emit = __emit;
3316
+ const $t = vue$1.useTranslate();
3100
3317
  const indeterminate = vue.computed(() => __props.state === "indeterminate");
3101
3318
  const checked = vue.computed(() => __props.state === "indeterminate" ? false : __props.state);
3102
3319
  const expose = {};
3320
+ const ariaLabel = vue.computed(() => {
3321
+ return !checked.value || indeterminate.value ? $t("fkui.ftable.select-all.aria-label", "Välj alla rader") : $t("fkui.ftable.unselect-all.aria-label", "Avmarkera alla rader");
3322
+ });
3103
3323
  if (__props.selectable === "multi") {
3104
3324
  const inputRef = vue.useTemplateRef("input");
3105
3325
  expose.tabstopEl = inputRef;
@@ -3112,10 +3332,10 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3112
3332
  checked: checked.value,
3113
3333
  indeterminate: indeterminate.value,
3114
3334
  type: "checkbox",
3115
- "aria-label": "select all",
3335
+ "aria-label": ariaLabel.value,
3116
3336
  tabindex: "-1",
3117
3337
  onChange: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
3118
- }, null, 40, _hoisted_2$9)) : vue.createCommentVNode("", true)]);
3338
+ }, null, 40, _hoisted_2$8)) : vue.createCommentVNode("", true)]);
3119
3339
  };
3120
3340
  }
3121
3341
  });
@@ -3123,8 +3343,8 @@ const _hoisted_1$a = {
3123
3343
  key: 0,
3124
3344
  class: "table-ng__cell table-ng__cell--checkbox"
3125
3345
  };
3126
- const _hoisted_2$8 = ["checked", "aria-label"];
3127
- const _hoisted_3$7 = {
3346
+ const _hoisted_2$7 = ["checked", "aria-label"];
3347
+ const _hoisted_3$5 = {
3128
3348
  key: 1,
3129
3349
  ref: "target",
3130
3350
  tabindex: "-1",
@@ -3161,7 +3381,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3161
3381
  "aria-label": ariaLabel.value,
3162
3382
  tabindex: "-1",
3163
3383
  onChange
3164
- }, null, 40, _hoisted_2$8)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$7, [vue.createElementVNode("input", {
3384
+ }, null, 40, _hoisted_2$7)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, [vue.createElementVNode("input", {
3165
3385
  checked: Boolean(__props.column.checked(__props.row)),
3166
3386
  type: "checkbox",
3167
3387
  "aria-label": ariaLabel.value
@@ -3172,7 +3392,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3172
3392
  const _hoisted_1$9 = {
3173
3393
  class: "table-ng__cell table-ng__cell--radio"
3174
3394
  };
3175
- const _hoisted_2$7 = ["checked", "aria-label"];
3395
+ const _hoisted_2$6 = ["checked", "aria-label"];
3176
3396
  const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3177
3397
  __name: "ITableRadio",
3178
3398
  props: {
@@ -3203,7 +3423,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3203
3423
  "aria-label": ariaLabel.value,
3204
3424
  tabindex: "-1",
3205
3425
  onChange
3206
- }, null, 40, _hoisted_2$7)]);
3426
+ }, null, 40, _hoisted_2$6)]);
3207
3427
  };
3208
3428
  }
3209
3429
  });
@@ -3259,7 +3479,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3259
3479
  },
3260
3480
  update() {
3261
3481
  emit("toggle", __props.row);
3262
- }
3482
+ },
3483
+ enabled: true
3263
3484
  };
3264
3485
  const singleSelectColumn = {
3265
3486
  type: "radio",
@@ -3277,7 +3498,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3277
3498
  },
3278
3499
  update() {
3279
3500
  emit("toggle", __props.row);
3280
- }
3501
+ },
3502
+ enabled: true
3281
3503
  };
3282
3504
  return (_ctx, _cache) => {
3283
3505
  return __props.level > 1 ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$8)) : __props.selectable === "multi" ? (vue.openBlock(), vue.createBlock(_sfc_main$c, {
@@ -3403,213 +3625,53 @@ function requireEs_array_push() {
3403
3625
  var len = lengthOfArrayLike2(O);
3404
3626
  var argCount = arguments.length;
3405
3627
  doesNotExceedSafeInteger2(len + argCount);
3406
- for (var i = 0; i < argCount; i++) {
3407
- O[len] = arguments[i];
3408
- len++;
3409
- }
3410
- setArrayLength(O, len);
3411
- return len;
3412
- }
3413
- });
3414
- return es_array_push;
3415
- }
3416
- requireEs_array_push();
3417
- function getRowIndexes(rows, expandableAttribute) {
3418
- const array = [];
3419
- walk(rows, expandableAttribute, (row) => {
3420
- array.push(vue$1.getItemIdentifier(row));
3421
- return true;
3422
- });
3423
- return array;
3424
- }
3425
- function getMetaRows(keyedRows, expandedKeys, expandableAttribute) {
3426
- const rowIndexes = getRowIndexes(keyedRows, expandableAttribute);
3427
- const array = [];
3428
- walk(keyedRows, expandableAttribute, (row, level) => {
3429
- const key = vue$1.getItemIdentifier(row);
3430
- const isExpandable = Boolean(expandableAttribute && row[expandableAttribute]);
3431
- const isExpanded = isExpandable && expandedKeys.has(key);
3432
- const rowIndex = rowIndexes.indexOf(key) + 2;
3433
- array.push({
3434
- key,
3435
- row,
3436
- rowIndex,
3437
- level: expandableAttribute ? level : void 0,
3438
- isExpandable,
3439
- isExpanded
3440
- });
3441
- return isExpanded;
3442
- });
3443
- return array;
3444
- }
3445
- const stopEditKey = /* @__PURE__ */ Symbol();
3446
- function useStartStopEdit() {
3447
- const stopEdit2 = vue.inject(stopEditKey, () => Promise.resolve());
3448
- return {
3449
- stopEdit: stopEdit2
3450
- };
3451
- }
3452
- var es_iterator_map = {};
3453
- var defineBuiltIns;
3454
- var hasRequiredDefineBuiltIns;
3455
- function requireDefineBuiltIns() {
3456
- if (hasRequiredDefineBuiltIns) return defineBuiltIns;
3457
- hasRequiredDefineBuiltIns = 1;
3458
- var defineBuiltIn2 = requireDefineBuiltIn();
3459
- defineBuiltIns = function(target, src, options) {
3460
- for (var key in src) defineBuiltIn2(target, key, src[key], options);
3461
- return target;
3462
- };
3463
- return defineBuiltIns;
3464
- }
3465
- var createIterResultObject;
3466
- var hasRequiredCreateIterResultObject;
3467
- function requireCreateIterResultObject() {
3468
- if (hasRequiredCreateIterResultObject) return createIterResultObject;
3469
- hasRequiredCreateIterResultObject = 1;
3470
- createIterResultObject = function(value, done) {
3471
- return {
3472
- value,
3473
- done
3474
- };
3475
- };
3476
- return createIterResultObject;
3477
- }
3478
- var iteratorCloseAll;
3479
- var hasRequiredIteratorCloseAll;
3480
- function requireIteratorCloseAll() {
3481
- if (hasRequiredIteratorCloseAll) return iteratorCloseAll;
3482
- hasRequiredIteratorCloseAll = 1;
3483
- var iteratorClose2 = requireIteratorClose();
3484
- iteratorCloseAll = function(iters, kind, value) {
3485
- for (var i = iters.length - 1; i >= 0; i--) {
3486
- if (iters[i] === void 0) continue;
3487
- try {
3488
- value = iteratorClose2(iters[i].iterator, kind, value);
3489
- } catch (error) {
3490
- kind = "throw";
3491
- value = error;
3492
- }
3493
- }
3494
- if (kind === "throw") throw value;
3495
- return value;
3496
- };
3497
- return iteratorCloseAll;
3498
- }
3499
- var iteratorCreateProxy;
3500
- var hasRequiredIteratorCreateProxy;
3501
- function requireIteratorCreateProxy() {
3502
- if (hasRequiredIteratorCreateProxy) return iteratorCreateProxy;
3503
- hasRequiredIteratorCreateProxy = 1;
3504
- var call = requireFunctionCall();
3505
- var create = requireObjectCreate();
3506
- var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
3507
- var defineBuiltIns2 = requireDefineBuiltIns();
3508
- var wellKnownSymbol2 = requireWellKnownSymbol();
3509
- var InternalStateModule = requireInternalState();
3510
- var getMethod2 = requireGetMethod();
3511
- var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
3512
- var createIterResultObject2 = requireCreateIterResultObject();
3513
- var iteratorClose2 = requireIteratorClose();
3514
- var iteratorCloseAll2 = requireIteratorCloseAll();
3515
- var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
3516
- var ITERATOR_HELPER = "IteratorHelper";
3517
- var WRAP_FOR_VALID_ITERATOR = "WrapForValidIterator";
3518
- var NORMAL = "normal";
3519
- var THROW = "throw";
3520
- var setInternalState = InternalStateModule.set;
3521
- var createIteratorProxyPrototype = function(IS_ITERATOR) {
3522
- var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
3523
- return defineBuiltIns2(create(IteratorPrototype), {
3524
- next: function next() {
3525
- var state = getInternalState(this);
3526
- if (IS_ITERATOR) return state.nextHandler();
3527
- if (state.done) return createIterResultObject2(void 0, true);
3528
- try {
3529
- var result = state.nextHandler();
3530
- return state.returnHandlerResult ? result : createIterResultObject2(result, state.done);
3531
- } catch (error) {
3532
- state.done = true;
3533
- throw error;
3534
- }
3535
- },
3536
- "return": function() {
3537
- var state = getInternalState(this);
3538
- var iterator = state.iterator;
3539
- state.done = true;
3540
- if (IS_ITERATOR) {
3541
- var returnMethod = getMethod2(iterator, "return");
3542
- return returnMethod ? call(returnMethod, iterator) : createIterResultObject2(void 0, true);
3543
- }
3544
- if (state.inner) try {
3545
- iteratorClose2(state.inner.iterator, NORMAL);
3546
- } catch (error) {
3547
- return iteratorClose2(iterator, THROW, error);
3548
- }
3549
- if (state.openIters) try {
3550
- iteratorCloseAll2(state.openIters, NORMAL);
3551
- } catch (error) {
3552
- return iteratorClose2(iterator, THROW, error);
3553
- }
3554
- if (iterator) iteratorClose2(iterator, NORMAL);
3555
- return createIterResultObject2(void 0, true);
3556
- }
3557
- });
3558
- };
3559
- var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
3560
- var IteratorHelperPrototype = createIteratorProxyPrototype(false);
3561
- createNonEnumerableProperty2(IteratorHelperPrototype, TO_STRING_TAG, "Iterator Helper");
3562
- iteratorCreateProxy = function(nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
3563
- var IteratorProxy = function Iterator2(record, state) {
3564
- if (state) {
3565
- state.iterator = record.iterator;
3566
- state.next = record.next;
3567
- } else state = record;
3568
- state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
3569
- state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
3570
- state.nextHandler = nextHandler;
3571
- state.counter = 0;
3572
- state.done = false;
3573
- setInternalState(this, state);
3574
- };
3575
- IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
3576
- return IteratorProxy;
3577
- };
3578
- return iteratorCreateProxy;
3579
- }
3580
- var callWithSafeIterationClosing;
3581
- var hasRequiredCallWithSafeIterationClosing;
3582
- function requireCallWithSafeIterationClosing() {
3583
- if (hasRequiredCallWithSafeIterationClosing) return callWithSafeIterationClosing;
3584
- hasRequiredCallWithSafeIterationClosing = 1;
3585
- var anObject2 = requireAnObject();
3586
- var iteratorClose2 = requireIteratorClose();
3587
- callWithSafeIterationClosing = function(iterator, fn, value, ENTRIES) {
3588
- try {
3589
- return ENTRIES ? fn(anObject2(value)[0], value[1]) : fn(value);
3590
- } catch (error) {
3591
- iteratorClose2(iterator, "throw", error);
3628
+ for (var i = 0; i < argCount; i++) {
3629
+ O[len] = arguments[i];
3630
+ len++;
3631
+ }
3632
+ setArrayLength(O, len);
3633
+ return len;
3592
3634
  }
3593
- };
3594
- return callWithSafeIterationClosing;
3635
+ });
3636
+ return es_array_push;
3595
3637
  }
3596
- var iteratorHelperThrowsOnInvalidIterator;
3597
- var hasRequiredIteratorHelperThrowsOnInvalidIterator;
3598
- function requireIteratorHelperThrowsOnInvalidIterator() {
3599
- if (hasRequiredIteratorHelperThrowsOnInvalidIterator) return iteratorHelperThrowsOnInvalidIterator;
3600
- hasRequiredIteratorHelperThrowsOnInvalidIterator = 1;
3601
- iteratorHelperThrowsOnInvalidIterator = function(methodName, argument) {
3602
- var method = typeof Iterator == "function" && Iterator.prototype[methodName];
3603
- if (method) try {
3604
- method.call({
3605
- next: null
3606
- }, argument).next();
3607
- } catch (error) {
3608
- return true;
3609
- }
3638
+ requireEs_array_push();
3639
+ function getRowIndexes(rows, expandableAttribute) {
3640
+ const array = [];
3641
+ walk(rows, expandableAttribute, (row) => {
3642
+ array.push(vue$1.getItemIdentifier(row));
3643
+ return true;
3644
+ });
3645
+ return array;
3646
+ }
3647
+ function getMetaRows(keyedRows, expandedKeys, expandableAttribute) {
3648
+ const rowIndexes = getRowIndexes(keyedRows, expandableAttribute);
3649
+ const array = [];
3650
+ walk(keyedRows, expandableAttribute, (row, level) => {
3651
+ const key = vue$1.getItemIdentifier(row);
3652
+ const isExpandable = Boolean(expandableAttribute && Array.isArray(row[expandableAttribute]) && row[expandableAttribute].length > 0);
3653
+ const isExpanded = isExpandable && expandedKeys.has(key);
3654
+ const rowIndex = rowIndexes.indexOf(key) + 2;
3655
+ array.push({
3656
+ key,
3657
+ row,
3658
+ rowIndex,
3659
+ level: expandableAttribute ? level : void 0,
3660
+ isExpandable,
3661
+ isExpanded
3662
+ });
3663
+ return isExpanded;
3664
+ });
3665
+ return array;
3666
+ }
3667
+ const stopEditKey = /* @__PURE__ */ Symbol();
3668
+ function useStartStopEdit() {
3669
+ const stopEdit2 = vue.inject(stopEditKey, () => Promise.resolve());
3670
+ return {
3671
+ stopEdit: stopEdit2
3610
3672
  };
3611
- return iteratorHelperThrowsOnInvalidIterator;
3612
3673
  }
3674
+ var es_iterator_map = {};
3613
3675
  var hasRequiredEs_iterator_map;
3614
3676
  function requireEs_iterator_map() {
3615
3677
  if (hasRequiredEs_iterator_map) return es_iterator_map;
@@ -3661,8 +3723,8 @@ const _hoisted_1$7 = {
3661
3723
  key: 0,
3662
3724
  class: "table-ng__cell table-ng__cell--anchor"
3663
3725
  };
3664
- const _hoisted_2$6 = ["href"];
3665
- const _hoisted_3$6 = {
3726
+ const _hoisted_2$5 = ["href"];
3727
+ const _hoisted_3$4 = {
3666
3728
  key: 1,
3667
3729
  ref: "target",
3668
3730
  tabindex: "-1",
@@ -3678,37 +3740,27 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3678
3740
  expose: __expose
3679
3741
  }) {
3680
3742
  const targetElement = vue.useTemplateRef("target");
3681
- const renderAnchor = vue.computed(() => {
3682
- return __props.column.enabled(__props.row) && __props.column.text(__props.row) !== null;
3683
- });
3684
3743
  const expose = {
3685
3744
  tabstopEl: targetElement
3686
3745
  };
3687
3746
  __expose(expose);
3688
3747
  return (_ctx, _cache) => {
3689
- return renderAnchor.value ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$7, [vue.createElementVNode("a", {
3748
+ return __props.column.text(__props.row) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$7, [vue.createElementVNode("a", {
3690
3749
  ref: "target",
3691
3750
  class: "anchor anchor--block",
3692
3751
  target: "_blank",
3693
3752
  href: __props.column.href,
3694
3753
  tabindex: "-1"
3695
- }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_2$6)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$6, null, 512));
3754
+ }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_2$5)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$4, null, 512));
3696
3755
  };
3697
3756
  }
3698
3757
  });
3699
3758
  const _hoisted_1$6 = {
3700
- key: 0,
3701
3759
  class: "table-ng__cell table-ng__cell--button"
3702
3760
  };
3703
- const _hoisted_2$5 = {
3761
+ const _hoisted_2$4 = {
3704
3762
  class: "sr-only"
3705
3763
  };
3706
- const _hoisted_3$5 = {
3707
- key: 1,
3708
- ref: "td",
3709
- tabindex: "-1",
3710
- class: "table-ng__cell"
3711
- };
3712
3764
  const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3713
3765
  __name: "ITableButton",
3714
3766
  props: {
@@ -3719,7 +3771,6 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3719
3771
  expose: __expose
3720
3772
  }) {
3721
3773
  const buttonElement = vue.useTemplateRef("button");
3722
- const tdElement = vue.useTemplateRef("td");
3723
3774
  function onClickButton() {
3724
3775
  logic.assertRef(buttonElement);
3725
3776
  buttonElement.value.tabIndex = 0;
@@ -3727,15 +3778,12 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3727
3778
  __props.column.onClick(__props.row);
3728
3779
  }
3729
3780
  }
3730
- const renderButton = vue.computed(() => {
3731
- return __props.column.enabled(__props.row) && __props.column.text(__props.row) !== null;
3732
- });
3733
3781
  const expose = {
3734
- tabstopEl: renderButton.value ? buttonElement : tdElement
3782
+ tabstopEl: buttonElement
3735
3783
  };
3736
3784
  __expose(expose);
3737
3785
  return (_ctx, _cache) => {
3738
- return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$6, [vue.createElementVNode("button", {
3786
+ return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$6, [vue.createElementVNode("button", {
3739
3787
  ref: "button",
3740
3788
  class: "icon-button",
3741
3789
  type: "button",
@@ -3745,7 +3793,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3745
3793
  key: 0,
3746
3794
  library: __props.column.iconLibrary,
3747
3795
  name: __props.column.icon
3748
- }, null, 8, ["library", "name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, null, 512));
3796
+ }, null, 8, ["library", "name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$4, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512)]);
3749
3797
  };
3750
3798
  }
3751
3799
  });
@@ -3791,17 +3839,8 @@ function requireEs_iterator_find() {
3791
3839
  }
3792
3840
  requireEs_iterator_find();
3793
3841
  const _hoisted_1$5 = {
3794
- key: 0,
3795
- class: "table-ng__cell table-ng__cell--button"
3796
- };
3797
- const _hoisted_2$4 = {
3798
3842
  class: "sr-only"
3799
3843
  };
3800
- const _hoisted_3$4 = {
3801
- key: 1,
3802
- tabindex: "-1",
3803
- class: "table-ng__cell"
3804
- };
3805
3844
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3806
3845
  __name: "ITableMenu",
3807
3846
  props: {
@@ -3834,9 +3873,6 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3834
3873
  };
3835
3874
  });
3836
3875
  });
3837
- const renderButton = vue.computed(() => {
3838
- return __props.column.enabled(__props.row);
3839
- });
3840
3876
  function onOpen(event) {
3841
3877
  event.stopPropagation();
3842
3878
  isOpen.value = true;
@@ -3859,7 +3895,11 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3859
3895
  __expose(expose);
3860
3896
  return (_ctx, _cache) => {
3861
3897
  var _buttonRef$value;
3862
- return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$5, [vue.createElementVNode("button", {
3898
+ return vue.openBlock(), vue.createElementBlock("td", {
3899
+ class: vue.normalizeClass(["table-ng__cell table-ng__cell--button", {
3900
+ "table-ng__cell--menu-open": isOpen.value
3901
+ }])
3902
+ }, [vue.createElementVNode("button", {
3863
3903
  ref: "button",
3864
3904
  class: "icon-button",
3865
3905
  type: "button",
@@ -3868,14 +3908,14 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3868
3908
  onClick: onOpen
3869
3909
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
3870
3910
  name: "bars"
3871
- }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$4, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FContextMenu), {
3911
+ }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FContextMenu), {
3872
3912
  "is-open": isOpen.value,
3873
3913
  items: menuitems.value,
3874
3914
  anchor: (_buttonRef$value = buttonRef.value) !== null && _buttonRef$value !== void 0 ? _buttonRef$value : void 0,
3875
3915
  onClose,
3876
3916
  onSelect,
3877
3917
  onFocusout
3878
- }, null, 8, ["is-open", "items", "anchor"])])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$4));
3918
+ }, null, 8, ["is-open", "items", "anchor"])], 2);
3879
3919
  };
3880
3920
  }
3881
3921
  });
@@ -3905,7 +3945,7 @@ const _hoisted_3$3 = ["aria-expanded", "aria-controls", "aria-activedescendant",
3905
3945
  const _hoisted_4$3 = {
3906
3946
  class: "table-ng__editable__text"
3907
3947
  };
3908
- const _hoisted_5$3 = {
3948
+ const _hoisted_5$2 = {
3909
3949
  key: 1,
3910
3950
  tabindex: "-1",
3911
3951
  class: "table-ng__cell table-ng__cell--static"
@@ -3998,12 +4038,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3998
4038
  if (activeOption.value) {
3999
4039
  const index = __props.column.options.indexOf(activeOption.value);
4000
4040
  if (index === 0) {
4001
- activeOption.value = __props.column.options[__props.column.options.length - 1];
4041
+ activeOption.value = __props.column.options.at(-1);
4002
4042
  } else {
4003
4043
  activeOption.value = __props.column.options[index - 1];
4004
4044
  }
4005
4045
  } else {
4006
- activeOption.value = __props.column.options[__props.column.options.length - 1];
4046
+ activeOption.value = __props.column.options.at(-1);
4007
4047
  }
4008
4048
  }
4009
4049
  async function onEditKeyDown(e) {
@@ -4058,10 +4098,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4058
4098
  tabindex: "-1",
4059
4099
  onKeydown: onCellKeyDown,
4060
4100
  onClick: vue.withModifiers(onCellClick, ["stop"])
4061
- }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$4, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FIcon), {
4062
- name: "arrow-down",
4063
- class: "table-ng__editable__icon"
4064
- })], 512), [[vue.vShow, !editing.value]]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
4101
+ }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$4, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1)], 512), [[vue.vShow, !editing.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
4065
4102
  ref: "edit",
4066
4103
  role: "combobox",
4067
4104
  tabindex: "-1",
@@ -4077,10 +4114,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4077
4114
  }, ["prevent"])),
4078
4115
  onKeydown: vue.withModifiers(onEditKeyDown, ["stop"]),
4079
4116
  onFocusout: _cache[2] || (_cache[2] = (e) => onEditBlur(e))
4080
- }, [vue.createElementVNode("span", _hoisted_4$3, vue.toDisplayString(viewValue.value), 1), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FIcon), {
4081
- name: "arrow-down",
4082
- class: "table-ng__editable__icon--active"
4083
- })], 40, _hoisted_3$3), [[vue.vShow, editing.value]]), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.withDirectives(vue.createVNode(vue.unref(vue$1.IComboboxDropdown), {
4117
+ }, [vue.createElementVNode("span", _hoisted_4$3, vue.toDisplayString(viewValue.value), 1)], 40, _hoisted_3$3), [[vue.vShow, editing.value]]), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.withDirectives(vue.createVNode(vue.unref(vue$1.IComboboxDropdown), {
4084
4118
  id: vue.unref(dropdownId),
4085
4119
  "is-open": dropdownIsOpen.value,
4086
4120
  options: __props.column.options,
@@ -4089,7 +4123,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4089
4123
  "input-node": editRef.value,
4090
4124
  onSelect: selectDropdownOption,
4091
4125
  onClose: onDropdownClose
4092
- }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$3, vue.toDisplayString(__props.column.selected(__props.row)), 1));
4126
+ }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$2, vue.toDisplayString(__props.column.selected(__props.row)), 1));
4093
4127
  };
4094
4128
  }
4095
4129
  });
@@ -4097,12 +4131,14 @@ function defaultTnumValue(type) {
4097
4131
  const tnumTypes = ["text:bankAccountNumber", "text:bankgiro", "text:clearingNumber", "text:currency", "text:number", "text:organisationsnummer", "text:percent", "text:personnummer", "text:phoneNumber", "text:plusgiro", "text:postalCode"];
4098
4132
  return tnumTypes.includes(type);
4099
4133
  }
4134
+ const defaultLabelFn = () => "";
4100
4135
  function getLabelFn(fn) {
4101
4136
  if (fn) {
4102
4137
  return fn;
4103
4138
  }
4104
- return () => "";
4139
+ return defaultLabelFn;
4105
4140
  }
4141
+ const defaultUpdateFn = () => void 0;
4106
4142
  function getUpdateFn(fn, key) {
4107
4143
  if (fn) {
4108
4144
  return fn;
@@ -4112,7 +4148,7 @@ function getUpdateFn(fn, key) {
4112
4148
  row[key] = value;
4113
4149
  };
4114
4150
  }
4115
- return () => void 0;
4151
+ return defaultUpdateFn;
4116
4152
  }
4117
4153
  function getValueFn(fn, key, coerce, defaultValue) {
4118
4154
  if (fn) {
@@ -4144,10 +4180,7 @@ const _hoisted_3$2 = {
4144
4180
  key: 0,
4145
4181
  class: "sr-only"
4146
4182
  };
4147
- const _hoisted_4$2 = ["id", "aria-label"];
4148
- const _hoisted_5$2 = {
4149
- ref: "pen"
4150
- };
4183
+ const _hoisted_4$2 = ["id", "aria-label", "aria-hidden"];
4151
4184
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4152
4185
  __name: "ITableText",
4153
4186
  props: {
@@ -4237,7 +4270,6 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4237
4270
  });
4238
4271
  const tdElement = vue.useTemplateRef("td");
4239
4272
  const inputElement = vue.useTemplateRef("input");
4240
- const penElement = vue.useTemplateRef("pen");
4241
4273
  const {
4242
4274
  stopEdit: stopEdit2
4243
4275
  } = useStartStopEdit();
@@ -4266,7 +4298,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4266
4298
  function setUpFakeValidation(el) {
4267
4299
  logic.assertRef(inputElement);
4268
4300
  const nativeEvents = ["change", "blur"];
4269
- nativeEvents.forEach((nativeEvent) => {
4301
+ for (const nativeEvent of nativeEvents) {
4270
4302
  core.useEventListener(el, nativeEvent, () => {
4271
4303
  const fakeEvent = new CustomEvent("validity", {
4272
4304
  detail: {
@@ -4280,7 +4312,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4280
4312
  });
4281
4313
  onValidity(fakeEvent);
4282
4314
  });
4283
- });
4315
+ }
4284
4316
  core.useEventListener(el, "input", onPendingValidity);
4285
4317
  core.useEventListener(el, "component-validity", (e) => {
4286
4318
  e.stopPropagation();
@@ -4299,20 +4331,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4299
4331
  });
4300
4332
  vue.watchEffect(() => {
4301
4333
  if (hasError.value) {
4302
- var _tdElement$value, _penElement$value;
4334
+ var _tdElement$value, _inputElement$value;
4303
4335
  emit("onError", {
4304
4336
  anchor: (_tdElement$value = tdElement.value) !== null && _tdElement$value !== void 0 ? _tdElement$value : void 0,
4305
- arrowAnchor: (_penElement$value = penElement.value) !== null && _penElement$value !== void 0 ? _penElement$value : void 0,
4337
+ arrowAnchor: (_inputElement$value = inputElement.value) !== null && _inputElement$value !== void 0 ? _inputElement$value : void 0,
4306
4338
  message: validity.value.validationMessage,
4307
4339
  hasFocus: focused.value,
4308
4340
  hasHover: isHovered.value,
4309
4341
  inEdit: inEdit.value
4310
4342
  });
4311
4343
  } else {
4312
- var _tdElement$value2, _penElement$value2;
4344
+ var _tdElement$value2, _inputElement$value2;
4313
4345
  emit("closeError", {
4314
4346
  anchor: (_tdElement$value2 = tdElement.value) !== null && _tdElement$value2 !== void 0 ? _tdElement$value2 : void 0,
4315
- arrowAnchor: (_penElement$value2 = penElement.value) !== null && _penElement$value2 !== void 0 ? _penElement$value2 : void 0,
4347
+ arrowAnchor: (_inputElement$value2 = inputElement.value) !== null && _inputElement$value2 !== void 0 ? _inputElement$value2 : void 0,
4316
4348
  message: validity.value.validationMessage,
4317
4349
  hasFocus: focused.value,
4318
4350
  hasHover: isHovered.value,
@@ -4390,23 +4422,30 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4390
4422
  function onEditingKeydown(event) {
4391
4423
  logic.assertRef(inputElement);
4392
4424
  event.stopPropagation();
4393
- if (event.key === "Enter") {
4394
- if (viewValue.value === initialViewValue) {
4425
+ switch (event.key) {
4426
+ case "Enter": {
4427
+ if (viewValue.value === initialViewValue) {
4428
+ onStopEdit({
4429
+ reason: "enter"
4430
+ });
4431
+ } else {
4432
+ pendingStopEditReason = "enter";
4433
+ }
4434
+ break;
4435
+ }
4436
+ case "Escape": {
4395
4437
  onStopEdit({
4396
- reason: "enter"
4438
+ reason: "escape"
4397
4439
  });
4398
- } else {
4399
- pendingStopEditReason = "enter";
4440
+ viewValue.value = initialViewValue;
4441
+ inputElement.value.value = initialViewValue;
4442
+ void validationFacade.validateElement(inputElement.value);
4443
+ break;
4444
+ }
4445
+ case "Tab": {
4446
+ pendingStopEditReason = event.shiftKey ? "shift-tab" : "tab";
4447
+ break;
4400
4448
  }
4401
- } else if (event.key === "Escape") {
4402
- onStopEdit({
4403
- reason: "escape"
4404
- });
4405
- viewValue.value = initialViewValue;
4406
- inputElement.value.value = initialViewValue;
4407
- void validationFacade.validateElement(inputElement.value);
4408
- } else if (event.key === "Tab") {
4409
- pendingStopEditReason = event.shiftKey ? "shift-tab" : "tab";
4410
4449
  }
4411
4450
  }
4412
4451
  function onKeydown(event) {
@@ -4485,16 +4524,14 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4485
4524
  ...configAttributes.value,
4486
4525
  ...columnAttributes.value
4487
4526
  }, {
4527
+ "aria-hidden": !inEdit.value,
4488
4528
  onValidity,
4489
4529
  onPendingValidity
4490
- }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createElementVNode("div", _hoisted_5$2, [vue.createVNode(vue.unref(vue$1.FIcon), {
4491
- name: "pen",
4492
- class: "table-ng__editable__icon"
4493
- })], 512)], 2), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
4530
+ }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]])], 2), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
4494
4531
  anchor: tdElement.value,
4495
4532
  "is-open": openPopupError.value,
4496
4533
  "error-message": validity.value.validationMessage,
4497
- "arrow-anchor": penElement.value,
4534
+ "arrow-anchor": inputElement.value,
4498
4535
  layout: "f-table"
4499
4536
  }, null, 8, ["anchor", "is-open", "error-message", "arrow-anchor"])], 42, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock("td", {
4500
4537
  key: 1,
@@ -4511,23 +4548,21 @@ function normalizeAnchorColumn(column) {
4511
4548
  type: "anchor",
4512
4549
  text: getValueFn(column.text, column.key, String, ""),
4513
4550
  href: column.href,
4514
- enabled: typeof column.enabled === "function" ? column.enabled : () => {
4515
- var _column$enabled;
4516
- return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
4517
- },
4518
4551
  sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
4519
4552
  };
4520
4553
  }
4521
4554
  function normalizeBaseColumn(column) {
4555
+ var _column$enabled;
4522
4556
  const id = /* @__PURE__ */ Symbol();
4523
4557
  const header = vue.toRef(column.header);
4524
- const description = typeof column.description !== "undefined" ? vue.toRef(column.description) : vue.ref("");
4525
- const size = typeof column.size !== "undefined" ? vue.toRef(column.size) : vue.ref("grow");
4558
+ const description = column.description !== void 0 ? vue.toRef(column.description) : vue.ref("");
4559
+ const size = column.size !== void 0 ? vue.toRef(column.size) : vue.ref("grow");
4526
4560
  return {
4527
4561
  id,
4528
4562
  header,
4529
4563
  description,
4530
- size
4564
+ size,
4565
+ enabled: (_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true
4531
4566
  };
4532
4567
  }
4533
4568
  function normalizeButtonColumn(column) {
@@ -4536,10 +4571,6 @@ function normalizeButtonColumn(column) {
4536
4571
  type: "button",
4537
4572
  text: getValueFn(column.text, column.key, String, ""),
4538
4573
  onClick: column.onClick,
4539
- enabled: typeof column.enabled === "function" ? column.enabled : () => {
4540
- var _column$enabled;
4541
- return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
4542
- },
4543
4574
  icon: (_column$icon = column.icon) !== null && _column$icon !== void 0 ? _column$icon : null,
4544
4575
  iconLibrary: column.iconLibrary,
4545
4576
  sortable: (_column$key = column.key) !== null && _column$key !== void 0 ? _column$key : null
@@ -4574,11 +4605,7 @@ function normalizeMenuColumn(column) {
4574
4605
  icon: (_it$icon = it.icon) !== null && _it$icon !== void 0 ? _it$icon : null,
4575
4606
  onClick: (_it$onClick = it.onClick) !== null && _it$onClick !== void 0 ? _it$onClick : noop
4576
4607
  };
4577
- }),
4578
- enabled: typeof column.enabled === "function" ? column.enabled : () => {
4579
- var _column$enabled;
4580
- return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
4581
- }
4608
+ })
4582
4609
  };
4583
4610
  }
4584
4611
  function normalizeNumberColumn(column) {
@@ -4845,6 +4872,84 @@ function usePopupError() {
4845
4872
  activeErrorAnchor
4846
4873
  };
4847
4874
  }
4875
+ var es_array_toSorted = {};
4876
+ var arrayFromConstructorAndList;
4877
+ var hasRequiredArrayFromConstructorAndList;
4878
+ function requireArrayFromConstructorAndList() {
4879
+ if (hasRequiredArrayFromConstructorAndList) return arrayFromConstructorAndList;
4880
+ hasRequiredArrayFromConstructorAndList = 1;
4881
+ var lengthOfArrayLike2 = requireLengthOfArrayLike();
4882
+ arrayFromConstructorAndList = function(Constructor, list, $length) {
4883
+ var index = 0;
4884
+ var length = arguments.length > 2 ? $length : lengthOfArrayLike2(list);
4885
+ var result = new Constructor(length);
4886
+ while (length > index) result[index] = list[index++];
4887
+ return result;
4888
+ };
4889
+ return arrayFromConstructorAndList;
4890
+ }
4891
+ var getBuiltInPrototypeMethod;
4892
+ var hasRequiredGetBuiltInPrototypeMethod;
4893
+ function requireGetBuiltInPrototypeMethod() {
4894
+ if (hasRequiredGetBuiltInPrototypeMethod) return getBuiltInPrototypeMethod;
4895
+ hasRequiredGetBuiltInPrototypeMethod = 1;
4896
+ var globalThis2 = requireGlobalThis();
4897
+ getBuiltInPrototypeMethod = function(CONSTRUCTOR, METHOD) {
4898
+ var Constructor = globalThis2[CONSTRUCTOR];
4899
+ var Prototype = Constructor && Constructor.prototype;
4900
+ return Prototype && Prototype[METHOD];
4901
+ };
4902
+ return getBuiltInPrototypeMethod;
4903
+ }
4904
+ var addToUnscopables;
4905
+ var hasRequiredAddToUnscopables;
4906
+ function requireAddToUnscopables() {
4907
+ if (hasRequiredAddToUnscopables) return addToUnscopables;
4908
+ hasRequiredAddToUnscopables = 1;
4909
+ var wellKnownSymbol2 = requireWellKnownSymbol();
4910
+ var create = requireObjectCreate();
4911
+ var defineProperty = requireObjectDefineProperty().f;
4912
+ var UNSCOPABLES = wellKnownSymbol2("unscopables");
4913
+ var ArrayPrototype = Array.prototype;
4914
+ if (ArrayPrototype[UNSCOPABLES] === void 0) {
4915
+ defineProperty(ArrayPrototype, UNSCOPABLES, {
4916
+ configurable: true,
4917
+ value: create(null)
4918
+ });
4919
+ }
4920
+ addToUnscopables = function(key) {
4921
+ ArrayPrototype[UNSCOPABLES][key] = true;
4922
+ };
4923
+ return addToUnscopables;
4924
+ }
4925
+ var hasRequiredEs_array_toSorted;
4926
+ function requireEs_array_toSorted() {
4927
+ if (hasRequiredEs_array_toSorted) return es_array_toSorted;
4928
+ hasRequiredEs_array_toSorted = 1;
4929
+ var $ = require_export();
4930
+ var uncurryThis = requireFunctionUncurryThis();
4931
+ var aCallable2 = requireACallable();
4932
+ var toIndexedObject2 = requireToIndexedObject();
4933
+ var arrayFromConstructorAndList2 = requireArrayFromConstructorAndList();
4934
+ var getBuiltInPrototypeMethod2 = requireGetBuiltInPrototypeMethod();
4935
+ var addToUnscopables2 = requireAddToUnscopables();
4936
+ var $Array = Array;
4937
+ var sort = uncurryThis(getBuiltInPrototypeMethod2("Array", "sort"));
4938
+ $({
4939
+ target: "Array",
4940
+ proto: true
4941
+ }, {
4942
+ toSorted: function toSorted(compareFn) {
4943
+ if (compareFn !== void 0) aCallable2(compareFn);
4944
+ var O = toIndexedObject2(this);
4945
+ var A = arrayFromConstructorAndList2($Array, O);
4946
+ return sort(A, compareFn);
4947
+ }
4948
+ });
4949
+ addToUnscopables2("toSorted");
4950
+ return es_array_toSorted;
4951
+ }
4952
+ requireEs_array_toSorted();
4848
4953
  var es_iterator_some = {};
4849
4954
  var hasRequiredEs_iterator_some;
4850
4955
  function requireEs_iterator_some() {
@@ -4926,7 +5031,7 @@ function useSelectable(options) {
4926
5031
  selectedRows.value = [row];
4927
5032
  } else {
4928
5033
  const index = selectedRows.value.indexOf(row);
4929
- if (index < 0) {
5034
+ if (index === -1) {
4930
5035
  selectedRows.value.push(row);
4931
5036
  } else {
4932
5037
  selectedRows.value.splice(index, 1);
@@ -4939,7 +5044,7 @@ function useSelectable(options) {
4939
5044
  }
4940
5045
  let oldKeys = void 0;
4941
5046
  vue.watch(() => vue.toValue(rows), (newValue) => {
4942
- const newKeys = newValue.map(rowKey).sort();
5047
+ const newKeys = newValue.map(rowKey).toSorted();
4943
5048
  if (!oldKeys) {
4944
5049
  oldKeys = newKeys;
4945
5050
  return;
@@ -4978,7 +5083,7 @@ function useTabstop(tableRef, metaRows) {
4978
5083
  logic.assertRef(tableRef);
4979
5084
  const needle = newRows[0];
4980
5085
  const newFirstRowOldIndex = oldRows.findIndex(matching(needle));
4981
- if (newFirstRowOldIndex > -1) {
5086
+ if (newFirstRowOldIndex !== -1) {
4982
5087
  const target = getCellTarget(tableRef.value, newFirstRowOldIndex + 1, 0);
4983
5088
  activateCell(target, {
4984
5089
  focus
@@ -4992,7 +5097,7 @@ function useTabstop(tableRef, metaRows) {
4992
5097
  const tabFallback = pendingRowRemoval ? "sticky" : "first-cell";
4993
5098
  pendingRowRemoval = false;
4994
5099
  logic.assertRef(tableRef);
4995
- const oldTabstopElement = tableRef.value.querySelector(`:not(tfoot)[tabindex="0"]`);
5100
+ const oldTabstopElement = tableRef.value.querySelector(`[tabindex="0"]`);
4996
5101
  logic.assertSet(oldTabstopElement);
4997
5102
  const oldTabstopFocused = oldTabstopElement === document.activeElement;
4998
5103
  if (oldTabstopElement.closest("th")) {
@@ -5131,6 +5236,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5131
5236
  striped: {
5132
5237
  type: Boolean
5133
5238
  },
5239
+ disableDividers: {
5240
+ type: Boolean
5241
+ },
5134
5242
  selectable: {
5135
5243
  default: () => void 0
5136
5244
  }
@@ -5145,6 +5253,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5145
5253
  expose: __expose
5146
5254
  }) {
5147
5255
  const selectedRows = vue.useModel(__props, "selectedRows");
5256
+ const $t = vue$1.useTranslate();
5148
5257
  const {
5149
5258
  hasSlot
5150
5259
  } = vue$1.useSlotUtils();
@@ -5176,9 +5285,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5176
5285
  const hasFooter = vue.computed(() => {
5177
5286
  return hasSlot("footer");
5178
5287
  });
5179
- const columns = vue.computed(() => normalizeTableColumns(__props.columns));
5288
+ const columns = vue.computed(() => normalizeTableColumns(__props.columns).filter((col) => vue.toValue(col.enabled)));
5180
5289
  const tableClasses = vue.computed(() => {
5181
- return __props.striped ? "table-ng table-ng--striped" : "table-ng";
5290
+ return ["table-ng", {
5291
+ "table-ng--striped": __props.striped,
5292
+ "table-ng--divided": !__props.disableDividers
5293
+ }];
5182
5294
  });
5183
5295
  const slots = vue.useSlots();
5184
5296
  const hasExpandableSlot = vue.computed(() => {
@@ -5201,18 +5313,21 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5201
5313
  function onClick(e) {
5202
5314
  const cell = e.target.closest("td, th");
5203
5315
  if (cell) {
5204
- activateCell(cell, {
5316
+ const targetEl = activateCell(cell, {
5205
5317
  focus: true
5206
5318
  });
5319
+ if (e.target instanceof Node && !targetEl.contains(e.target)) {
5320
+ targetEl.click();
5321
+ }
5207
5322
  }
5208
5323
  }
5209
5324
  function onTableFocusin(e) {
5210
5325
  logic.assertRef(tableRef);
5211
- tableRef.value.querySelectorAll(`:not(tfoot)[tabindex="0"]`).forEach((it) => {
5326
+ for (const it of tableRef.value.querySelectorAll(`[tabindex="0"]`)) {
5212
5327
  if (it !== e.target) {
5213
5328
  it.setAttribute("tabindex", "-1");
5214
5329
  }
5215
- });
5330
+ }
5216
5331
  }
5217
5332
  function isInExpandable(el) {
5218
5333
  if (!el.parentElement) {
@@ -5235,7 +5350,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5235
5350
  if (!tableRef.value) {
5236
5351
  return;
5237
5352
  }
5238
- const outsideTable = Boolean(tableRef.value.tFoot?.contains(relatedTarget)) || !tableRef.value.contains(relatedTarget);
5353
+ const outsideTable = !tableRef.value.contains(relatedTarget);
5239
5354
  if (outsideTable) {
5240
5355
  const cell = target.closest("td, th");
5241
5356
  if (cell) {
@@ -5329,13 +5444,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5329
5444
  ref: "table",
5330
5445
  role: role.value,
5331
5446
  class: vue.normalizeClass(tableClasses.value),
5332
- "aria-rowcount": ariaRowcount.value
5333
- }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("thead", {
5447
+ "aria-rowcount": ariaRowcount.value,
5334
5448
  onFocusin: onTableFocusin,
5335
5449
  onFocusout: onTableFocusout,
5336
5450
  onClick,
5337
5451
  onKeydown
5338
- }, [vue.createElementVNode("tr", _hoisted_3$1, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$1)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
5452
+ }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_3$1, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$1)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
5339
5453
  key: 1,
5340
5454
  ref: bindCellApiRef,
5341
5455
  state: vue.unref(selectableHeaderState)(),
@@ -5350,15 +5464,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5350
5464
  scope: "col",
5351
5465
  onToggleSortOrder
5352
5466
  }, null, 8, ["column", "sort-enabled", "sort-order"]);
5353
- }), 128))])], 32), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.createElementVNode("tbody", {
5354
- onFocusin: onTableFocusin,
5355
- onFocusout: onTableFocusout,
5356
- onClick,
5357
- onKeydown
5358
- }, [isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$1, [vue.createElementVNode("td", {
5467
+ }), 128))])]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$1, [vue.createElementVNode("td", {
5359
5468
  colspan: columnCount.value,
5360
5469
  class: "table-ng__cell"
5361
- }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [_cache[2] || (_cache[2] = vue.createTextVNode(" Tabellen är tom ", -1))])], 8, _hoisted_6$1)])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
5470
+ }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(vue.unref($t)("fkui.ftable.empty.text", "Tabellen är tom")), 1)])], 8, _hoisted_6$1)])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
5362
5471
  key: 1
5363
5472
  }, vue.renderList(metaRows.value, ({
5364
5473
  key,
@@ -5386,7 +5495,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5386
5495
  "is-expanded": isExpanded,
5387
5496
  "row-key": key,
5388
5497
  onToggle: onToggleExpanded
5389
- }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
5498
+ }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
5390
5499
  key: 1,
5391
5500
  colspan: columns.value.length
5392
5501
  }, {
@@ -5407,7 +5516,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5407
5516
  state: vue.unref(selectableRowState)(row),
5408
5517
  row,
5409
5518
  onToggle: vue.unref(toggleSelectableRow)
5410
- }, null, 8, ["level", "selectable", "state", "row", "onToggle"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
5519
+ }, null, 8, ["level", "selectable", "state", "row", "onToggle"])) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
5411
5520
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5412
5521
  key: column.id
5413
5522
  }, ["component" in column ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(column.component), {
@@ -5424,38 +5533,17 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5424
5533
  row
5425
5534
  }, null, 8, ["row"])) : vue.createCommentVNode("", true)], 64);
5426
5535
  }), 128))], 64))], 8, _hoisted_7$1);
5427
- }), 128))], 32), _cache[7] || (_cache[7] = vue.createTextVNode()), hasFooter.value ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_8, [vue.createElementVNode("tr", {
5536
+ }), 128))]), _cache[6] || (_cache[6] = vue.createTextVNode()), hasFooter.value ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_8, [vue.createElementVNode("tr", {
5428
5537
  class: "table-ng__row",
5429
5538
  "aria-rowindex": ariaRowcount.value
5430
5539
  }, [vue.createElementVNode("td", {
5431
5540
  colspan: columnCount.value,
5432
5541
  class: "table-ng__cell--custom"
5433
- }, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_10)], 8, _hoisted_9)])) : vue.createCommentVNode("", true)], 10, _hoisted_1$2);
5542
+ }, [vue.renderSlot(_ctx.$slots, "footer")], 8, _hoisted_10)], 8, _hoisted_9)])) : vue.createCommentVNode("", true)], 42, _hoisted_1$2);
5434
5543
  };
5435
5544
  }
5436
5545
  });
5437
5546
  var es_array_toSpliced = {};
5438
- var addToUnscopables;
5439
- var hasRequiredAddToUnscopables;
5440
- function requireAddToUnscopables() {
5441
- if (hasRequiredAddToUnscopables) return addToUnscopables;
5442
- hasRequiredAddToUnscopables = 1;
5443
- var wellKnownSymbol2 = requireWellKnownSymbol();
5444
- var create = requireObjectCreate();
5445
- var defineProperty = requireObjectDefineProperty().f;
5446
- var UNSCOPABLES = wellKnownSymbol2("unscopables");
5447
- var ArrayPrototype = Array.prototype;
5448
- if (ArrayPrototype[UNSCOPABLES] === void 0) {
5449
- defineProperty(ArrayPrototype, UNSCOPABLES, {
5450
- configurable: true,
5451
- value: create(null)
5452
- });
5453
- }
5454
- addToUnscopables = function(key) {
5455
- ArrayPrototype[UNSCOPABLES][key] = true;
5456
- };
5457
- return addToUnscopables;
5458
- }
5459
5547
  var hasRequiredEs_array_toSpliced;
5460
5548
  function requireEs_array_toSpliced() {
5461
5549
  if (hasRequiredEs_array_toSpliced) return es_array_toSpliced;
@@ -6148,21 +6236,6 @@ function requireEs_typedArray_toReversed() {
6148
6236
  }
6149
6237
  requireEs_typedArray_toReversed();
6150
6238
  var es_typedArray_toSorted = {};
6151
- var arrayFromConstructorAndList;
6152
- var hasRequiredArrayFromConstructorAndList;
6153
- function requireArrayFromConstructorAndList() {
6154
- if (hasRequiredArrayFromConstructorAndList) return arrayFromConstructorAndList;
6155
- hasRequiredArrayFromConstructorAndList = 1;
6156
- var lengthOfArrayLike2 = requireLengthOfArrayLike();
6157
- arrayFromConstructorAndList = function(Constructor, list, $length) {
6158
- var index = 0;
6159
- var length = arguments.length > 2 ? $length : lengthOfArrayLike2(list);
6160
- var result = new Constructor(length);
6161
- while (length > index) result[index] = list[index++];
6162
- return result;
6163
- };
6164
- return arrayFromConstructorAndList;
6165
- }
6166
6239
  var hasRequiredEs_typedArray_toSorted;
6167
6240
  function requireEs_typedArray_toSorted() {
6168
6241
  if (hasRequiredEs_typedArray_toSorted) return es_typedArray_toSorted;
@@ -6528,7 +6601,7 @@ function requireUint8FromHex() {
6528
6601
  var uncurryThis = requireFunctionUncurryThis();
6529
6602
  var Uint8Array2 = globalThis2.Uint8Array;
6530
6603
  var SyntaxError = globalThis2.SyntaxError;
6531
- var parseInt2 = globalThis2.parseInt;
6604
+ var parseInt = globalThis2.parseInt;
6532
6605
  var min = Math.min;
6533
6606
  var NOT_HEX = /[^\da-f]/i;
6534
6607
  var exec = uncurryThis(NOT_HEX.exec);
@@ -6543,7 +6616,7 @@ function requireUint8FromHex() {
6543
6616
  while (written < maxLength) {
6544
6617
  var hexits = stringSlice(string, read, read += 2);
6545
6618
  if (exec(NOT_HEX, hexits)) throw new SyntaxError("String should only contain hex characters");
6546
- bytes[written++] = parseInt2(hexits, 16);
6619
+ bytes[written++] = parseInt(hexits, 16);
6547
6620
  }
6548
6621
  return {
6549
6622
  bytes,
@@ -7054,7 +7127,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7054
7127
  Object.values(filer ? filer : valdFil.value).forEach(async (value) => {
7055
7128
  try {
7056
7129
  const buffer = await value.arrayBuffer();
7057
- const reduced = new Uint8Array(buffer).reduce((data, byte) => data + String.fromCharCode(byte), "");
7130
+ const reduced = new Uint8Array(buffer).reduce((data, byte) => data + String.fromCodePoint(byte), "");
7058
7131
  uppladdatDokument.value = {
7059
7132
  dokument: {
7060
7133
  filnamn: value.name,
@@ -7087,14 +7160,14 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7087
7160
  }
7088
7161
  function fokusElement(id) {
7089
7162
  setTimeout(() => {
7090
- const element = document.getElementById(id);
7163
+ const element = document.querySelector(`#${id}`);
7091
7164
  if (element instanceof HTMLElement) {
7092
7165
  element.focus();
7093
7166
  }
7094
7167
  }, 100);
7095
7168
  }
7096
7169
  function resetElement(id) {
7097
- const element = document.getElementById(id);
7170
+ const element = document.querySelector(`#${id}`);
7098
7171
  if (element instanceof HTMLInputElement) {
7099
7172
  element.value = "";
7100
7173
  }
@@ -7203,61 +7276,6 @@ function uniqueValues(items, property) {
7203
7276
  unique.sort();
7204
7277
  return unique;
7205
7278
  }
7206
- var es_iterator_filter = {};
7207
- var hasRequiredEs_iterator_filter;
7208
- function requireEs_iterator_filter() {
7209
- if (hasRequiredEs_iterator_filter) return es_iterator_filter;
7210
- hasRequiredEs_iterator_filter = 1;
7211
- var $ = require_export();
7212
- var call = requireFunctionCall();
7213
- var aCallable2 = requireACallable();
7214
- var anObject2 = requireAnObject();
7215
- var getIteratorDirect2 = requireGetIteratorDirect();
7216
- var createIteratorProxy = requireIteratorCreateProxy();
7217
- var callWithSafeIterationClosing2 = requireCallWithSafeIterationClosing();
7218
- var IS_PURE = requireIsPure();
7219
- var iteratorClose2 = requireIteratorClose();
7220
- var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
7221
- var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
7222
- var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("filter", function() {
7223
- });
7224
- var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("filter", TypeError);
7225
- var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;
7226
- var IteratorProxy = createIteratorProxy(function() {
7227
- var iterator = this.iterator;
7228
- var predicate = this.predicate;
7229
- var next = this.next;
7230
- var result, done, value;
7231
- while (true) {
7232
- result = anObject2(call(next, iterator));
7233
- done = this.done = !!result.done;
7234
- if (done) return;
7235
- value = result.value;
7236
- if (callWithSafeIterationClosing2(iterator, predicate, [value, this.counter++], true)) return value;
7237
- }
7238
- });
7239
- $({
7240
- target: "Iterator",
7241
- proto: true,
7242
- real: true,
7243
- forced: FORCED
7244
- }, {
7245
- filter: function filter(predicate) {
7246
- anObject2(this);
7247
- try {
7248
- aCallable2(predicate);
7249
- } catch (error) {
7250
- iteratorClose2(this, "throw", error);
7251
- }
7252
- if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);
7253
- return new IteratorProxy(getIteratorDirect2(this), {
7254
- predicate
7255
- });
7256
- }
7257
- });
7258
- return es_iterator_filter;
7259
- }
7260
- requireEs_iterator_filter();
7261
7279
  const _hoisted_1 = {
7262
7280
  class: "sort-filter-dataset-ng"
7263
7281
  };
@@ -7315,14 +7333,14 @@ function hoursMinutesStringToMinutes(valueString, extraForgiving = false) {
7315
7333
  if (logic.isEmpty(valueString.trim())) {
7316
7334
  return void 0;
7317
7335
  }
7318
- const [hours, minutes] = splitHoursMinutes(valueString, extraForgiving).map((value) => parseInt(value, 10));
7336
+ const [hours, minutes] = splitHoursMinutes(valueString, extraForgiving).map((value) => Number.parseInt(value, 10));
7319
7337
  const totalMinutes = hours * 60 + minutes;
7320
- return !isNaN(totalMinutes) ? totalMinutes : void 0;
7338
+ return !Number.isNaN(totalMinutes) ? totalMinutes : void 0;
7321
7339
  }
7322
7340
  function minutesToHoursMinutesString(value) {
7323
7341
  let valueString = "";
7324
- const safeValue = value !== null && value !== void 0 ? value : NaN;
7325
- if (!isNaN(safeValue)) {
7342
+ const safeValue = value !== null && value !== void 0 ? value : Number.NaN;
7343
+ if (!Number.isNaN(safeValue)) {
7326
7344
  const {
7327
7345
  hours,
7328
7346
  minutes
@@ -7349,18 +7367,18 @@ function minutesToUserFriendlyString(value) {
7349
7367
  });
7350
7368
  }
7351
7369
  function minutesToHoursFloat(...values) {
7352
- const minutes = values.filter((value) => logic.isSet(value) && !isNaN(value)).reduce((sum, value) => sum + value, 0);
7370
+ const minutes = values.filter((value) => logic.isSet(value) && !Number.isNaN(value)).reduce((sum, value) => sum + value, 0);
7353
7371
  return minutes / 60;
7354
7372
  }
7355
7373
  function minutesToObject(...values) {
7356
- const minutes = values.filter((value) => logic.isSet(value) && !isNaN(value)).reduce((sum, value) => sum + value, 0);
7374
+ const minutes = values.filter((value) => logic.isSet(value) && !Number.isNaN(value)).reduce((sum, value) => sum + value, 0);
7357
7375
  return {
7358
7376
  hours: Math.floor(minutes / 60),
7359
7377
  minutes: minutes % 60
7360
7378
  };
7361
7379
  }
7362
7380
  function formatNumberToTime(value) {
7363
- if (typeof value !== "number" || isNaN(value)) {
7381
+ if (typeof value !== "number" || Number.isNaN(value)) {
7364
7382
  return void 0;
7365
7383
  }
7366
7384
  return minutesToHoursMinutesString(value);
@@ -7370,8 +7388,8 @@ function parseTimeToNumberUsingConfig(value, extraForgiving) {
7370
7388
  if (typeof value !== "string") {
7371
7389
  return void 0;
7372
7390
  }
7373
- const parsedValue = (_hoursMinutesStringTo = hoursMinutesStringToMinutes(value, extraForgiving)) !== null && _hoursMinutesStringTo !== void 0 ? _hoursMinutesStringTo : NaN;
7374
- return !isNaN(parsedValue) ? parsedValue : void 0;
7391
+ const parsedValue = (_hoursMinutesStringTo = hoursMinutesStringToMinutes(value, extraForgiving)) !== null && _hoursMinutesStringTo !== void 0 ? _hoursMinutesStringTo : Number.NaN;
7392
+ return !Number.isNaN(parsedValue) ? parsedValue : void 0;
7375
7393
  }
7376
7394
  function parseTimeToNumber(value) {
7377
7395
  return parseTimeToNumberUsingConfig(value, false);