@fkui/vue-labs 6.17.0 → 6.18.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.
@@ -2268,7 +2268,7 @@ const validators = [hoursMinutesValidator, greaterThanTimeValidator, lessThanTim
2268
2268
  for (const validator of validators) {
2269
2269
  logic.ValidationService.registerValidator(validator);
2270
2270
  }
2271
- const _sfc_main = vue.defineComponent({
2271
+ const _sfc_main$a = vue.defineComponent({
2272
2272
  name: "XTimeTextField",
2273
2273
  extends: vue$1.FTextField,
2274
2274
  mixins: [vue$1.TranslationMixin],
@@ -2302,10 +2302,1711 @@ const _sfc_main = vue.defineComponent({
2302
2302
  logic.ValidationService.validateElement(inputElement);
2303
2303
  }
2304
2304
  });
2305
+ var es_array_push = {};
2306
+ var isArray;
2307
+ var hasRequiredIsArray;
2308
+ function requireIsArray() {
2309
+ if (hasRequiredIsArray) return isArray;
2310
+ hasRequiredIsArray = 1;
2311
+ var classof2 = requireClassofRaw();
2312
+ isArray = Array.isArray || function isArray2(argument) {
2313
+ return classof2(argument) === "Array";
2314
+ };
2315
+ return isArray;
2316
+ }
2317
+ var arraySetLength;
2318
+ var hasRequiredArraySetLength;
2319
+ function requireArraySetLength() {
2320
+ if (hasRequiredArraySetLength) return arraySetLength;
2321
+ hasRequiredArraySetLength = 1;
2322
+ var DESCRIPTORS = requireDescriptors();
2323
+ var isArray2 = requireIsArray();
2324
+ var $TypeError = TypeError;
2325
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2326
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !(function() {
2327
+ if (this !== void 0) return true;
2328
+ try {
2329
+ Object.defineProperty([], "length", {
2330
+ writable: false
2331
+ }).length = 1;
2332
+ } catch (error) {
2333
+ return error instanceof TypeError;
2334
+ }
2335
+ })();
2336
+ arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function(O, length) {
2337
+ if (isArray2(O) && !getOwnPropertyDescriptor(O, "length").writable) {
2338
+ throw new $TypeError("Cannot set read only .length");
2339
+ }
2340
+ return O.length = length;
2341
+ } : function(O, length) {
2342
+ return O.length = length;
2343
+ };
2344
+ return arraySetLength;
2345
+ }
2346
+ var doesNotExceedSafeInteger;
2347
+ var hasRequiredDoesNotExceedSafeInteger;
2348
+ function requireDoesNotExceedSafeInteger() {
2349
+ if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
2350
+ hasRequiredDoesNotExceedSafeInteger = 1;
2351
+ var $TypeError = TypeError;
2352
+ var MAX_SAFE_INTEGER = 9007199254740991;
2353
+ doesNotExceedSafeInteger = function(it) {
2354
+ if (it > MAX_SAFE_INTEGER) throw $TypeError("Maximum allowed index exceeded");
2355
+ return it;
2356
+ };
2357
+ return doesNotExceedSafeInteger;
2358
+ }
2359
+ var hasRequiredEs_array_push;
2360
+ function requireEs_array_push() {
2361
+ if (hasRequiredEs_array_push) return es_array_push;
2362
+ hasRequiredEs_array_push = 1;
2363
+ var $ = require_export();
2364
+ var toObject2 = requireToObject();
2365
+ var lengthOfArrayLike2 = requireLengthOfArrayLike();
2366
+ var setArrayLength = requireArraySetLength();
2367
+ var doesNotExceedSafeInteger2 = requireDoesNotExceedSafeInteger();
2368
+ var fails2 = requireFails();
2369
+ var INCORRECT_TO_LENGTH = fails2(function() {
2370
+ return [].push.call({
2371
+ length: 4294967296
2372
+ }, 1) !== 4294967297;
2373
+ });
2374
+ var properErrorOnNonWritableLength = function() {
2375
+ try {
2376
+ Object.defineProperty([], "length", {
2377
+ writable: false
2378
+ }).push();
2379
+ } catch (error) {
2380
+ return error instanceof TypeError;
2381
+ }
2382
+ };
2383
+ var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2384
+ $({
2385
+ target: "Array",
2386
+ proto: true,
2387
+ arity: 1,
2388
+ forced: FORCED
2389
+ }, {
2390
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
2391
+ push: function push(item) {
2392
+ var O = toObject2(this);
2393
+ var len = lengthOfArrayLike2(O);
2394
+ var argCount = arguments.length;
2395
+ doesNotExceedSafeInteger2(len + argCount);
2396
+ for (var i = 0; i < argCount; i++) {
2397
+ O[len] = arguments[i];
2398
+ len++;
2399
+ }
2400
+ setArrayLength(O, len);
2401
+ return len;
2402
+ }
2403
+ });
2404
+ return es_array_push;
2405
+ }
2406
+ requireEs_array_push();
2407
+ var es_iterator_some = {};
2408
+ var hasRequiredEs_iterator_some;
2409
+ function requireEs_iterator_some() {
2410
+ if (hasRequiredEs_iterator_some) return es_iterator_some;
2411
+ hasRequiredEs_iterator_some = 1;
2412
+ var $ = require_export();
2413
+ var call = requireFunctionCall();
2414
+ var iterate2 = requireIterate();
2415
+ var aCallable2 = requireACallable();
2416
+ var anObject2 = requireAnObject();
2417
+ var getIteratorDirect2 = requireGetIteratorDirect();
2418
+ var iteratorClose2 = requireIteratorClose();
2419
+ var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
2420
+ var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError2("some", TypeError);
2421
+ $({
2422
+ target: "Iterator",
2423
+ proto: true,
2424
+ real: true,
2425
+ forced: someWithoutClosingOnEarlyError
2426
+ }, {
2427
+ some: function some(predicate) {
2428
+ anObject2(this);
2429
+ try {
2430
+ aCallable2(predicate);
2431
+ } catch (error) {
2432
+ iteratorClose2(this, "throw", error);
2433
+ }
2434
+ if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate);
2435
+ var record = getIteratorDirect2(this);
2436
+ var counter = 0;
2437
+ return iterate2(record, function(value, stop) {
2438
+ if (predicate(value, counter++)) return stop();
2439
+ }, {
2440
+ IS_RECORD: true,
2441
+ INTERRUPTED: true
2442
+ }).stopped;
2443
+ }
2444
+ });
2445
+ return es_iterator_some;
2446
+ }
2447
+ requireEs_iterator_some();
2448
+ const internalKey = vue$1.getInternalKey();
2449
+ const navKeys = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"];
2450
+ let prevCellIndex = void 0;
2451
+ function rowKey(row) {
2452
+ return String(row[internalKey]);
2453
+ }
2454
+ function walk(array, visit, childKey, level = 1) {
2455
+ for (const item of array) {
2456
+ const visitChildren = visit(item, level);
2457
+ if (visitChildren && childKey && item[childKey]) {
2458
+ walk(item[childKey], visit, childKey, level + 1);
2459
+ }
2460
+ }
2461
+ }
2462
+ function getRowIndexes(rows, expandableAttribute) {
2463
+ const array = [];
2464
+ walk(rows, (row) => {
2465
+ array.push(String(row[internalKey]));
2466
+ return true;
2467
+ }, expandableAttribute);
2468
+ return array;
2469
+ }
2470
+ function getCellTarget(tableElement, rowIndex, cellIndex) {
2471
+ return tableElement.rows[rowIndex].cells[cellIndex];
2472
+ }
2473
+ function isTd(element) {
2474
+ return element !== null && element.cellIndex !== void 0;
2475
+ }
2476
+ function getTr(td) {
2477
+ return td.parentElement;
2478
+ }
2479
+ function getTable(tr) {
2480
+ return tr.closest("table");
2481
+ }
2482
+ function getLastRowIndex(tableElement) {
2483
+ return tableElement.rows.length - 1;
2484
+ }
2485
+ function getLastCellIndex(tableElement) {
2486
+ return tableElement.rows[0].cells.length - 1;
2487
+ }
2488
+ function getVerticalNavIndex(table, from, to) {
2489
+ const target = {
2490
+ ...to
2491
+ };
2492
+ const currentMax = table.rows[from.row].cells.length - 1;
2493
+ const targetMax = table.rows[to.row].cells.length - 1;
2494
+ if (prevCellIndex && currentMax < targetMax) {
2495
+ target.cell = prevCellIndex;
2496
+ prevCellIndex = void 0;
2497
+ } else {
2498
+ target.cell = targetMax < from.cell ? targetMax : from.cell;
2499
+ }
2500
+ if (targetMax < from.cell) {
2501
+ prevCellIndex = from.cell;
2502
+ }
2503
+ return target;
2504
+ }
2505
+ function navigate(e, table, from, last) {
2506
+ if (from.row === void 0 || from.cell === void 0 || last.row === void 0 || last.cell === void 0) {
2507
+ return;
2508
+ }
2509
+ if (!navKeys.includes(e.code)) {
2510
+ return;
2511
+ }
2512
+ e.preventDefault();
2513
+ if (e.code === "ArrowLeft") {
2514
+ if (from.cell === 0) {
2515
+ return;
2516
+ }
2517
+ prevCellIndex = void 0;
2518
+ return {
2519
+ row: from.row,
2520
+ cell: from.cell - 1
2521
+ };
2522
+ }
2523
+ if (e.code === "ArrowRight") {
2524
+ if (from.cell === last.cell) {
2525
+ return;
2526
+ }
2527
+ const lastCellIndex = table.rows[from.row].cells.length - 1;
2528
+ if (lastCellIndex <= from.cell) {
2529
+ return;
2530
+ }
2531
+ prevCellIndex = void 0;
2532
+ return {
2533
+ row: from.row,
2534
+ cell: from.cell + 1
2535
+ };
2536
+ }
2537
+ if (e.code === "ArrowUp") {
2538
+ if (from.row === 0) {
2539
+ return;
2540
+ }
2541
+ const to = {
2542
+ row: from.row - 1,
2543
+ cell: from.cell
2544
+ };
2545
+ return getVerticalNavIndex(table, from, to);
2546
+ }
2547
+ if (e.code === "ArrowDown") {
2548
+ if (from.row === last.row) {
2549
+ return;
2550
+ }
2551
+ const to = {
2552
+ row: from.row + 1,
2553
+ cell: from.cell
2554
+ };
2555
+ return getVerticalNavIndex(table, from, to);
2556
+ }
2557
+ if (e.code === "Home") {
2558
+ if (e.ctrlKey) {
2559
+ return {
2560
+ row: 1,
2561
+ cell: 0
2562
+ };
2563
+ } else {
2564
+ return {
2565
+ row: from.row,
2566
+ cell: 0
2567
+ };
2568
+ }
2569
+ }
2570
+ if (e.code === "End") {
2571
+ if (e.ctrlKey) {
2572
+ return {
2573
+ row: last.row,
2574
+ cell: table.rows[last.row].cells.length - 1
2575
+ };
2576
+ } else {
2577
+ return {
2578
+ row: from.row,
2579
+ cell: table.rows[from.row].cells.length - 1
2580
+ };
2581
+ }
2582
+ }
2583
+ }
2584
+ function getMetaRows(keyedRows, expandedKeys, expandableAttribute) {
2585
+ const rowIndexes = getRowIndexes(keyedRows);
2586
+ const array = [];
2587
+ walk(keyedRows, (row, level) => {
2588
+ const isExpandable = Boolean(expandableAttribute && row[expandableAttribute]);
2589
+ const isExpanded = isExpandable && expandedKeys.includes(rowKey(row));
2590
+ array.push({
2591
+ key: rowKey(row),
2592
+ row,
2593
+ rowIndex: rowIndexes.indexOf(rowKey(row)) + 1,
2594
+ level: expandableAttribute ? level : void 0,
2595
+ isExpandable,
2596
+ isExpanded
2597
+ });
2598
+ return isExpanded;
2599
+ }, expandableAttribute);
2600
+ return array;
2601
+ }
2602
+ function getTd(element) {
2603
+ if (isTd(element)) {
2604
+ return element;
2605
+ } else {
2606
+ const closest = element.closest("td");
2607
+ if (!closest) {
2608
+ throw new Error("expected td parent");
2609
+ }
2610
+ return closest;
2611
+ }
2612
+ }
2613
+ function setDefaultCellTarget(table) {
2614
+ const target = getCellTarget(table, 1, 0);
2615
+ dispatchActivateCellEvent(target, {
2616
+ focus: false
2617
+ });
2618
+ return target;
2619
+ }
2620
+ function maybeNavigateToCell(e) {
2621
+ let newCellTarget = e.target;
2622
+ const td = getTd(e.target);
2623
+ const tr = getTr(td);
2624
+ const table = getTable(tr);
2625
+ const fromIndex = {
2626
+ row: tr.rowIndex,
2627
+ cell: td.cellIndex
2628
+ };
2629
+ const lastIndex = {
2630
+ row: getLastRowIndex(table),
2631
+ cell: getLastCellIndex(table)
2632
+ };
2633
+ const navigateTo = navigate(e, table, fromIndex, lastIndex);
2634
+ if (navigateTo) {
2635
+ newCellTarget = getCellTarget(table, navigateTo.row, navigateTo.cell);
2636
+ dispatchActivateCellEvent(newCellTarget, {
2637
+ focus: true
2638
+ });
2639
+ }
2640
+ }
2641
+ function dispatchActivateCellEvent(element, detail) {
2642
+ element.dispatchEvent(new CustomEvent("table-activate-cell", {
2643
+ detail
2644
+ }));
2645
+ }
2646
+ function stopEdit(element, reason) {
2647
+ const td = getTd(element);
2648
+ const tr = getTr(td);
2649
+ const table = getTable(tr);
2650
+ const rowIndex = tr.rowIndex;
2651
+ const cellIndex = td.cellIndex;
2652
+ const lastRowIndex = getLastRowIndex(table);
2653
+ const lastCellIndex = getLastCellIndex(table);
2654
+ let newCellTarget = td;
2655
+ switch (reason) {
2656
+ case "enter": {
2657
+ if (rowIndex !== lastRowIndex) {
2658
+ newCellTarget = getCellTarget(table, rowIndex + 1, cellIndex);
2659
+ dispatchActivateCellEvent(newCellTarget, {
2660
+ focus: true
2661
+ });
2662
+ } else {
2663
+ dispatchActivateCellEvent(newCellTarget, {
2664
+ focus: true
2665
+ });
2666
+ }
2667
+ break;
2668
+ }
2669
+ case "escape": {
2670
+ dispatchActivateCellEvent(newCellTarget, {
2671
+ focus: true
2672
+ });
2673
+ break;
2674
+ }
2675
+ case "tab": {
2676
+ if (cellIndex === lastCellIndex && rowIndex === lastRowIndex) {
2677
+ dispatchActivateCellEvent(newCellTarget, {
2678
+ focus: true
2679
+ });
2680
+ } else if (cellIndex === lastCellIndex) {
2681
+ newCellTarget = getCellTarget(table, rowIndex + 1, 0);
2682
+ dispatchActivateCellEvent(newCellTarget, {
2683
+ focus: true
2684
+ });
2685
+ } else {
2686
+ newCellTarget = getCellTarget(table, rowIndex, cellIndex + 1);
2687
+ dispatchActivateCellEvent(newCellTarget, {
2688
+ focus: true
2689
+ });
2690
+ }
2691
+ break;
2692
+ }
2693
+ case "shift-tab": {
2694
+ if (cellIndex === 0 && rowIndex === 1) {
2695
+ dispatchActivateCellEvent(newCellTarget, {
2696
+ focus: true
2697
+ });
2698
+ } else if (cellIndex === 0) {
2699
+ newCellTarget = getCellTarget(table, rowIndex - 1, 0);
2700
+ dispatchActivateCellEvent(newCellTarget, {
2701
+ focus: true
2702
+ });
2703
+ } else {
2704
+ newCellTarget = getCellTarget(table, rowIndex, cellIndex - 1);
2705
+ dispatchActivateCellEvent(newCellTarget, {
2706
+ focus: true
2707
+ });
2708
+ }
2709
+ break;
2710
+ }
2711
+ case "blur": {
2712
+ console.log("stopEdit", "blur");
2713
+ break;
2714
+ }
2715
+ default: {
2716
+ throw new Error(`invalid stop edit reason: ${reason}`);
2717
+ }
2718
+ }
2719
+ return newCellTarget;
2720
+ }
2721
+ const _hoisted_1$8 = {
2722
+ key: 0,
2723
+ class: "table-ng__row"
2724
+ };
2725
+ const _hoisted_2$4 = {
2726
+ key: 0,
2727
+ tabindex: "-1",
2728
+ class: "table-ng__column"
2729
+ };
2730
+ const _hoisted_3$2 = ["aria-level"];
2731
+ const _hoisted_4$1 = {
2732
+ key: 0,
2733
+ tabindex: "-1"
2734
+ };
2735
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
2736
+ __name: "ITableRow",
2737
+ props: {
2738
+ renderHeader: {
2739
+ type: Boolean,
2740
+ default: false
2741
+ },
2742
+ rowKey: {
2743
+ default: ""
2744
+ },
2745
+ ariaLevel: {
2746
+ default: () => void 0
2747
+ },
2748
+ isTreegrid: {
2749
+ type: Boolean,
2750
+ default: false
2751
+ },
2752
+ isExpandable: {
2753
+ type: Boolean,
2754
+ default: false
2755
+ },
2756
+ isExpanded: {
2757
+ type: Boolean,
2758
+ default: false
2759
+ }
2760
+ },
2761
+ emits: ["toggle"],
2762
+ setup(__props, {
2763
+ emit: __emit
2764
+ }) {
2765
+ const emit = __emit;
2766
+ vue.provide("renderHeader", __props.renderHeader);
2767
+ const toggleIcon = vue.computed(() => __props.isExpanded ? "arrow-down" : "arrow-right");
2768
+ return (_ctx, _cache) => {
2769
+ return _ctx.renderHeader ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$8, [_ctx.isTreegrid ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_2$4)) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default")])) : (vue.openBlock(), vue.createElementBlock("tr", {
2770
+ key: 1,
2771
+ class: "table-ng__row",
2772
+ "aria-level": _ctx.ariaLevel
2773
+ }, [_ctx.isTreegrid ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
2774
+ key: 0
2775
+ }, [_ctx.isExpandable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_4$1, [vue.createElementVNode("button", {
2776
+ "aria-label": "toggle",
2777
+ type: "button",
2778
+ class: vue.normalizeClass(["expander", `level-${_ctx.ariaLevel}`]),
2779
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("toggle", _ctx.rowKey))
2780
+ }, [vue.createVNode(vue.unref(vue$1.FIcon), {
2781
+ class: "button__icon",
2782
+ name: toggleIcon.value
2783
+ }, null, 8, ["name"])], 2)])) : (vue.openBlock(), vue.createElementBlock("td", {
2784
+ key: 1,
2785
+ class: vue.normalizeClass(`level-${_ctx.ariaLevel}`)
2786
+ }, null, 2))], 64)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default")], 8, _hoisted_3$2));
2787
+ };
2788
+ }
2789
+ });
2790
+ function getValueFn(fn, key, coerce, defaultValue) {
2791
+ if (fn) {
2792
+ return fn;
2793
+ }
2794
+ if (key) {
2795
+ return (row) => {
2796
+ return coerce(row[key]);
2797
+ };
2798
+ }
2799
+ return () => defaultValue;
2800
+ }
2801
+ function getUpdateFn(fn, key) {
2802
+ if (fn) {
2803
+ return fn;
2804
+ }
2805
+ if (key) {
2806
+ return (row, value) => {
2807
+ row[key] = value;
2808
+ };
2809
+ }
2810
+ return () => void 0;
2811
+ }
2812
+ function normalizeTableColumn(column) {
2813
+ var _column$validation;
2814
+ if ("render" in column) {
2815
+ return {
2816
+ type: void 0,
2817
+ header: column.header,
2818
+ render: column.render
2819
+ };
2820
+ }
2821
+ switch (column.type) {
2822
+ case "checkbox":
2823
+ return {
2824
+ type: "checkbox",
2825
+ header: column.header,
2826
+ value: getValueFn(column.value, column.key, Boolean, false),
2827
+ update: getUpdateFn(column.update, column.key),
2828
+ editable: typeof column.editable === "function" ? column.editable : () => {
2829
+ var _column$editable;
2830
+ return Boolean((_column$editable = column.editable) !== null && _column$editable !== void 0 ? _column$editable : false);
2831
+ },
2832
+ sortable: column.key
2833
+ };
2834
+ case "radio":
2835
+ return {
2836
+ type: "radio",
2837
+ header: column.header,
2838
+ value: getValueFn(column.value, column.key, Boolean, false),
2839
+ update: getUpdateFn(column.update, column.key),
2840
+ sortable: column.key
2841
+ };
2842
+ case "text":
2843
+ return {
2844
+ type: "text",
2845
+ header: column.header,
2846
+ value: getValueFn(column.value, column.key, String, ""),
2847
+ update: getUpdateFn(column.update, column.key),
2848
+ editable: typeof column.editable === "function" ? column.editable : () => {
2849
+ var _column$editable2;
2850
+ return Boolean((_column$editable2 = column.editable) !== null && _column$editable2 !== void 0 ? _column$editable2 : false);
2851
+ },
2852
+ validation: (_column$validation = column.validation) !== null && _column$validation !== void 0 ? _column$validation : {},
2853
+ sortable: column.key
2854
+ };
2855
+ case "anchor":
2856
+ return {
2857
+ type: "anchor",
2858
+ header: column.header,
2859
+ value: column.value,
2860
+ href: column.href,
2861
+ enabled: typeof column.enabled === "function" ? column.enabled : () => {
2862
+ var _column$enabled;
2863
+ return Boolean((_column$enabled = column.enabled) !== null && _column$enabled !== void 0 ? _column$enabled : true);
2864
+ },
2865
+ sortable: column.key
2866
+ };
2867
+ case "button":
2868
+ return {
2869
+ type: "button",
2870
+ header: column.header,
2871
+ value: column.value,
2872
+ onClick: column.onClick,
2873
+ enabled: typeof column.enabled === "function" ? column.enabled : () => {
2874
+ var _column$enabled2;
2875
+ return Boolean((_column$enabled2 = column.enabled) !== null && _column$enabled2 !== void 0 ? _column$enabled2 : true);
2876
+ },
2877
+ icon: column.icon,
2878
+ sortable: column.key
2879
+ };
2880
+ case "select":
2881
+ return {
2882
+ type: "select",
2883
+ header: column.header,
2884
+ value: getValueFn(column.value, column.key, String, ""),
2885
+ update: getUpdateFn(column.update, column.key),
2886
+ editable: typeof column.editable === "function" ? column.editable : () => {
2887
+ var _column$editable3;
2888
+ return Boolean((_column$editable3 = column.editable) !== null && _column$editable3 !== void 0 ? _column$editable3 : false);
2889
+ },
2890
+ options: column.options,
2891
+ sortable: column.key
2892
+ };
2893
+ case void 0:
2894
+ return {
2895
+ type: void 0,
2896
+ header: column.header,
2897
+ value: getValueFn(column.value, column.key, String, ""),
2898
+ sortable: column.key
2899
+ };
2900
+ }
2901
+ }
2902
+ function defineTableColumns(columns) {
2903
+ return columns;
2904
+ }
2905
+ function normalizeTableColumns(columns) {
2906
+ return columns.map(normalizeTableColumn);
2907
+ }
2908
+ const stopEditKey = Symbol();
2909
+ function useStartStopEdit() {
2910
+ const stopEdit2 = vue.inject(stopEditKey, () => Promise.resolve());
2911
+ return {
2912
+ stopEdit: stopEdit2
2913
+ };
2914
+ }
2915
+ const _hoisted_1$7 = {
2916
+ class: "table-ng__editable"
2917
+ };
2918
+ const _hoisted_2$3 = {
2919
+ class: "table-ng__editable__text"
2920
+ };
2921
+ const _hoisted_3$1 = ["aria-controls"];
2922
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
2923
+ __name: "ITableSelect",
2924
+ props: {
2925
+ row: {},
2926
+ column: {}
2927
+ },
2928
+ setup(__props) {
2929
+ const editing = vue.ref(false);
2930
+ const editRef = vue.useTemplateRef("edit");
2931
+ const {
2932
+ stopEdit: stopEdit2
2933
+ } = useStartStopEdit();
2934
+ const viewValue = vue.ref(__props.column.value(__props.row));
2935
+ const tdRef = vue.useTemplateRef("td");
2936
+ function onActivateCell(e) {
2937
+ logic.assertRef(tdRef);
2938
+ tdRef.value.tabIndex = 0;
2939
+ if (e.detail.focus) {
2940
+ tdRef.value.focus();
2941
+ }
2942
+ }
2943
+ async function onCellKeyDown(e) {
2944
+ if (e.code === "Enter" || e.code === "NumpadEnter") {
2945
+ startEditing(e);
2946
+ }
2947
+ }
2948
+ async function onCellClick(e) {
2949
+ if (editing.value) {
2950
+ return;
2951
+ }
2952
+ startEditing(e);
2953
+ }
2954
+ async function startEditing(e) {
2955
+ logic.assertRef(editRef);
2956
+ e.preventDefault();
2957
+ editing.value = true;
2958
+ await vue.nextTick();
2959
+ editRef.value.tabIndex = 0;
2960
+ editRef.value.focus();
2961
+ openSelected("first");
2962
+ }
2963
+ async function onDropdownSelect(value) {
2964
+ logic.assertRef(editRef);
2965
+ logic.assertSet(stopEdit2);
2966
+ close();
2967
+ submit();
2968
+ viewValue.value = value;
2969
+ stopEdit2(editRef.value, "enter");
2970
+ }
2971
+ function onDropdownClose() {
2972
+ logic.assertRef(editRef);
2973
+ logic.assertSet(stopEdit2);
2974
+ stopEdit2(editRef.value, "escape");
2975
+ }
2976
+ const dropdownId = logic.ElementIdService.generateElementId();
2977
+ const dropdownIsOpen = vue.ref(false);
2978
+ const activeOptionId = logic.ElementIdService.generateElementId();
2979
+ const activeOption = vue.ref(null);
2980
+ vue.watchEffect(async () => {
2981
+ if (!editRef.value) {
2982
+ return;
2983
+ }
2984
+ if (activeOption.value) {
2985
+ editRef.value.setAttribute("aria-activedescendant", activeOptionId);
2986
+ } else {
2987
+ editRef.value.removeAttribute("aria-activedescendant");
2988
+ }
2989
+ });
2990
+ async function openSelected(fallback = null) {
2991
+ dropdownIsOpen.value = true;
2992
+ await vue.nextTick();
2993
+ if (viewValue.value) {
2994
+ activeOption.value = viewValue.value;
2995
+ } else if (fallback === "first") {
2996
+ activeOption.value = __props.column.options[0];
2997
+ } else if (fallback === "last") {
2998
+ activeOption.value = __props.column.options[__props.column.options.length - 1];
2999
+ } else {
3000
+ activeOption.value = null;
3001
+ }
3002
+ editRef.value?.focus();
3003
+ }
3004
+ function close() {
3005
+ dropdownIsOpen.value = false;
3006
+ activeOption.value = null;
3007
+ }
3008
+ function setNextOption() {
3009
+ if (activeOption.value) {
3010
+ const index = __props.column.options.indexOf(activeOption.value);
3011
+ if (index === __props.column.options.length - 1) {
3012
+ activeOption.value = __props.column.options[0];
3013
+ } else {
3014
+ activeOption.value = __props.column.options[index + 1];
3015
+ }
3016
+ } else {
3017
+ activeOption.value = __props.column.options[0];
3018
+ }
3019
+ }
3020
+ function setPreviousOption() {
3021
+ if (activeOption.value) {
3022
+ const index = __props.column.options.indexOf(activeOption.value);
3023
+ if (index === 0) {
3024
+ activeOption.value = __props.column.options[__props.column.options.length - 1];
3025
+ } else {
3026
+ activeOption.value = __props.column.options[index - 1];
3027
+ }
3028
+ } else {
3029
+ activeOption.value = __props.column.options[__props.column.options.length - 1];
3030
+ }
3031
+ }
3032
+ async function onEditKeyDown(e) {
3033
+ logic.assertRef(editRef);
3034
+ logic.assertSet(stopEdit2);
3035
+ switch (e.code) {
3036
+ case "Escape":
3037
+ e.preventDefault();
3038
+ cancel();
3039
+ stopEdit2(editRef.value, "escape");
3040
+ break;
3041
+ case "Enter":
3042
+ case "NumpadEnter":
3043
+ e.preventDefault();
3044
+ submit();
3045
+ if (activeOption.value) {
3046
+ viewValue.value = activeOption.value;
3047
+ }
3048
+ close();
3049
+ stopEdit2(editRef.value, "enter");
3050
+ break;
3051
+ case "Tab":
3052
+ e.preventDefault();
3053
+ cancel();
3054
+ stopEdit2(editRef.value, e.shiftKey ? "shift-tab" : "tab");
3055
+ break;
3056
+ case "ArrowDown":
3057
+ e.preventDefault();
3058
+ if (dropdownIsOpen.value) {
3059
+ setNextOption();
3060
+ } else {
3061
+ openSelected("first");
3062
+ }
3063
+ break;
3064
+ case "ArrowUp":
3065
+ e.preventDefault();
3066
+ if (dropdownIsOpen.value) {
3067
+ setPreviousOption();
3068
+ } else {
3069
+ openSelected("last");
3070
+ }
3071
+ break;
3072
+ }
3073
+ }
3074
+ async function onEditBlur() {
3075
+ if (editing.value) {
3076
+ logic.assertSet(stopEdit2);
3077
+ logic.assertRef(editRef);
3078
+ dropdownIsOpen.value = false;
3079
+ editing.value = false;
3080
+ await vue.nextTick();
3081
+ stopEdit2(editRef.value, "blur");
3082
+ }
3083
+ }
3084
+ async function submit() {
3085
+ editing.value = false;
3086
+ await vue.nextTick();
3087
+ }
3088
+ function cancel() {
3089
+ logic.assertSet(stopEdit2);
3090
+ logic.assertRef(editRef);
3091
+ stopEdit2(editRef.value, "escape");
3092
+ }
3093
+ return (_ctx, _cache) => {
3094
+ return _ctx.column.editable(_ctx.row) ? (vue.openBlock(), vue.createElementBlock("td", {
3095
+ key: 0,
3096
+ ref: "td",
3097
+ class: "table-ng__cell table-ng__cell--select",
3098
+ tabindex: "-1",
3099
+ onKeydown: onCellKeyDown,
3100
+ onClick: vue.withModifiers(onCellClick, ["stop"]),
3101
+ onTableActivateCell: onActivateCell
3102
+ }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$7, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1), _cache[2] || (_cache[2] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FIcon), {
3103
+ name: "pen",
3104
+ class: "table-ng__editable__icon"
3105
+ })], 512), [[vue.vShow, !editing.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
3106
+ ref: "edit",
3107
+ role: "combobox",
3108
+ tabindex: "-1",
3109
+ "aria-expanded": "",
3110
+ "aria-controls": vue.unref(dropdownId),
3111
+ "aria-autocomplete": "list",
3112
+ class: "table-ng__editable",
3113
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
3114
+ }, ["stop"])),
3115
+ onDblclick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
3116
+ }, ["prevent"])),
3117
+ onKeydown: vue.withModifiers(onEditKeyDown, ["stop"]),
3118
+ onFocusout: onEditBlur
3119
+ }, vue.toDisplayString(viewValue.value), 41, _hoisted_3$1), [[vue.vShow, editing.value]]), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.withDirectives(vue.createVNode(vue.unref(vue$1.IComboboxDropdown), {
3120
+ id: "dropdownId",
3121
+ "is-open": dropdownIsOpen.value,
3122
+ options: _ctx.column.options,
3123
+ "active-option": activeOption.value,
3124
+ "active-option-id": vue.unref(activeOptionId),
3125
+ "input-node": editRef.value,
3126
+ onSelect: onDropdownSelect,
3127
+ onClose: onDropdownClose
3128
+ }, null, 8, ["is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 544)) : (vue.openBlock(), vue.createElementBlock("td", {
3129
+ key: 1,
3130
+ ref: "td",
3131
+ tabindex: "-1",
3132
+ class: "table-ng__cell table-ng__cell--static",
3133
+ onTableActivateCell: onActivateCell
3134
+ }, vue.toDisplayString(_ctx.column.value(_ctx.row)), 545));
3135
+ };
3136
+ }
3137
+ });
3138
+ const _hoisted_1$6 = ["checked", "aria-label"];
3139
+ const _hoisted_2$2 = ["checked", "aria-label"];
3140
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3141
+ __name: "ITableCheckbox",
3142
+ props: {
3143
+ column: {},
3144
+ row: {}
3145
+ },
3146
+ setup(__props) {
3147
+ const targetElement = vue.useTemplateRef("target");
3148
+ function onActivateCell(e) {
3149
+ logic.assertRef(targetElement);
3150
+ targetElement.value.tabIndex = 0;
3151
+ if (e.detail.focus) {
3152
+ targetElement.value.focus();
3153
+ }
3154
+ }
3155
+ function onChange(e) {
3156
+ const checked = e.target.checked;
3157
+ __props.column.update(__props.row, checked, !checked);
3158
+ }
3159
+ return (_ctx, _cache) => {
3160
+ return _ctx.column.editable(_ctx.row) ? (vue.openBlock(), vue.createElementBlock("td", {
3161
+ key: 0,
3162
+ class: "table-ng__cell table-ng__cell--checkbox",
3163
+ onTableActivateCell: onActivateCell
3164
+ }, [vue.createElementVNode("input", {
3165
+ ref: "target",
3166
+ checked: _ctx.column.value(_ctx.row),
3167
+ type: "checkbox",
3168
+ "aria-label": _ctx.column.header,
3169
+ tabindex: "-1",
3170
+ onChange
3171
+ }, null, 40, _hoisted_1$6)], 32)) : (vue.openBlock(), vue.createElementBlock("td", {
3172
+ key: 1,
3173
+ ref: "target",
3174
+ tabindex: "-1",
3175
+ class: "table-ng__cell table-ng__cell--checkbox",
3176
+ onTableActivateCell: onActivateCell
3177
+ }, [vue.createElementVNode("input", {
3178
+ checked: _ctx.column.value(_ctx.row),
3179
+ type: "checkbox",
3180
+ "aria-label": _ctx.column.header,
3181
+ disabled: ""
3182
+ }, null, 8, _hoisted_2$2)], 544));
3183
+ };
3184
+ }
3185
+ });
3186
+ const _hoisted_1$5 = ["checked", "aria-label"];
3187
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
3188
+ __name: "ITableRadio",
3189
+ props: {
3190
+ column: {},
3191
+ row: {}
3192
+ },
3193
+ setup(__props) {
3194
+ const inputElement = vue.useTemplateRef("input");
3195
+ function onActivateCell(e) {
3196
+ logic.assertRef(inputElement);
3197
+ inputElement.value.tabIndex = 0;
3198
+ if (e.detail.focus) {
3199
+ inputElement.value.focus();
3200
+ }
3201
+ }
3202
+ function onChange(_e) {
3203
+ logic.assertRef(inputElement);
3204
+ __props.column.update(__props.row, inputElement.value.checked, !inputElement.value.checked);
3205
+ }
3206
+ return (_ctx, _cache) => {
3207
+ return vue.openBlock(), vue.createElementBlock("td", {
3208
+ class: "table-ng__cell table-ng__cell--radio",
3209
+ onTableActivateCell: onActivateCell
3210
+ }, [vue.createElementVNode("input", {
3211
+ ref: "input",
3212
+ type: "radio",
3213
+ checked: _ctx.column.value(_ctx.row),
3214
+ "aria-label": _ctx.column.header,
3215
+ tabindex: "-1",
3216
+ onChange
3217
+ }, null, 40, _hoisted_1$5)], 32);
3218
+ };
3219
+ }
3220
+ });
3221
+ const _hoisted_1$4 = ["href"];
3222
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3223
+ __name: "ITableAnchor",
3224
+ props: {
3225
+ column: {},
3226
+ row: {}
3227
+ },
3228
+ setup(__props) {
3229
+ const targetElement = vue.useTemplateRef("target");
3230
+ function onActivateCell(e) {
3231
+ logic.assertRef(targetElement);
3232
+ targetElement.value.tabIndex = 0;
3233
+ if (e.detail.focus) {
3234
+ targetElement.value.focus();
3235
+ }
3236
+ }
3237
+ const renderAnchor = vue.computed(() => {
3238
+ return __props.column.enabled(__props.row) && __props.column.value(__props.row) !== null;
3239
+ });
3240
+ return (_ctx, _cache) => {
3241
+ return renderAnchor.value ? (vue.openBlock(), vue.createElementBlock("td", {
3242
+ key: 0,
3243
+ class: "table-ng__cell table-ng__cell--anchor",
3244
+ onTableActivateCell: onActivateCell
3245
+ }, [vue.createElementVNode("a", {
3246
+ ref: "target",
3247
+ class: "anchor anchor--block",
3248
+ target: "_blank",
3249
+ href: _ctx.column.href,
3250
+ tabindex: "-1"
3251
+ }, vue.toDisplayString(_ctx.column.value(_ctx.row)), 9, _hoisted_1$4)], 32)) : (vue.openBlock(), vue.createElementBlock("td", {
3252
+ key: 1,
3253
+ ref: "target",
3254
+ tabindex: "-1",
3255
+ class: "table-ng__cell",
3256
+ onTableActivateCell: onActivateCell
3257
+ }, null, 544));
3258
+ };
3259
+ }
3260
+ });
3261
+ const _hoisted_1$3 = {
3262
+ class: "sr-only"
3263
+ };
3264
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
3265
+ __name: "ITableButton",
3266
+ props: {
3267
+ column: {},
3268
+ row: {}
3269
+ },
3270
+ setup(__props) {
3271
+ const buttonElement = vue.useTemplateRef("button");
3272
+ const tdElement = vue.useTemplateRef("td");
3273
+ async function onActivateCell(e) {
3274
+ var _buttonElement$value;
3275
+ await vue.nextTick();
3276
+ const element = (_buttonElement$value = buttonElement.value) !== null && _buttonElement$value !== void 0 ? _buttonElement$value : tdElement.value;
3277
+ logic.assertSet(element);
3278
+ element.tabIndex = 0;
3279
+ if (e.detail.focus) {
3280
+ element.focus();
3281
+ }
3282
+ }
3283
+ function onClickButton() {
3284
+ if (__props.column.onClick) {
3285
+ __props.column.onClick(__props.row);
3286
+ }
3287
+ }
3288
+ const renderButton = vue.computed(() => {
3289
+ return __props.column.enabled(__props.row) && __props.column.value(__props.row) !== null;
3290
+ });
3291
+ return (_ctx, _cache) => {
3292
+ return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", {
3293
+ key: 0,
3294
+ class: "table-ng__cell table-ng__cell--button",
3295
+ onTableActivateCell: onActivateCell
3296
+ }, [vue.createElementVNode("button", {
3297
+ ref: "button",
3298
+ class: "icon-button",
3299
+ type: "button",
3300
+ tabindex: "-1",
3301
+ onClick: onClickButton
3302
+ }, [_ctx.column.icon ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FIcon), {
3303
+ key: 0,
3304
+ name: _ctx.column.icon
3305
+ }, null, 8, ["name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$3, vue.toDisplayString(_ctx.column.value(_ctx.row)), 1)], 512)], 32)) : (vue.openBlock(), vue.createElementBlock("td", {
3306
+ key: 1,
3307
+ ref: "td",
3308
+ tabindex: "-1",
3309
+ class: "table-ng__cell",
3310
+ onTableActivateCell: onActivateCell
3311
+ }, null, 544));
3312
+ };
3313
+ }
3314
+ });
3315
+ function isAlphanumeric(e) {
3316
+ return e.key.length === 1 && !e.ctrlKey && !e.metaKey;
3317
+ }
3318
+ const _hoisted_1$2 = {
3319
+ class: "table-ng__editable"
3320
+ };
3321
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
3322
+ __name: "ITableText",
3323
+ props: {
3324
+ row: {},
3325
+ column: {}
3326
+ },
3327
+ setup(__props) {
3328
+ const model = vue.ref("");
3329
+ const validity = vue.ref({
3330
+ isValid: true,
3331
+ validationMessage: "",
3332
+ validityMode: "INITIAL"
3333
+ });
3334
+ const hasError = vue.computed(() => validity.value.validityMode === "ERROR");
3335
+ const wrapperClasses = vue.computed(() => {
3336
+ return {
3337
+ "table-ng__cell": true,
3338
+ "table-ng__cell--text": true,
3339
+ "table-ng__cell--valid": !hasError.value,
3340
+ "table-ng__cell--error": hasError.value
3341
+ };
3342
+ });
3343
+ const inputClasses = vue.computed(() => {
3344
+ return {
3345
+ foobar: true,
3346
+ "table-ng__textedit": true
3347
+ };
3348
+ });
3349
+ const tdElement = vue.useTemplateRef("td");
3350
+ const viewElement = vue.useTemplateRef("view");
3351
+ const inputElement = vue.useTemplateRef("input");
3352
+ const {
3353
+ stopEdit: stopEdit2
3354
+ } = useStartStopEdit();
3355
+ vue.onMounted(() => {
3356
+ if (inputElement.value) {
3357
+ logic.ValidationService.addValidatorsToElement(inputElement.value, __props.column.validation);
3358
+ }
3359
+ });
3360
+ function onActivateCell(e) {
3361
+ logic.assertRef(tdElement);
3362
+ tdElement.value.tabIndex = 0;
3363
+ if (e.detail.focus) {
3364
+ tdElement.value.focus();
3365
+ }
3366
+ }
3367
+ function onStartEdit(modelValue) {
3368
+ logic.assertRef(tdElement);
3369
+ logic.assertRef(inputElement);
3370
+ const {
3371
+ width
3372
+ } = tdElement.value.getBoundingClientRect();
3373
+ model.value = modelValue;
3374
+ tdElement.value.style.setProperty("width", `${width}px`);
3375
+ inputElement.value.focus();
3376
+ }
3377
+ function onStopEdit(options) {
3378
+ const {
3379
+ reason
3380
+ } = options;
3381
+ logic.assertRef(inputElement);
3382
+ inputElement.value.tabIndex = -1;
3383
+ stopEdit2(inputElement.value, reason);
3384
+ }
3385
+ function onClickCell(event) {
3386
+ logic.assertRef(tdElement);
3387
+ if (tdElement.value.contains(event.target)) {
3388
+ const value = __props.column.value(__props.row);
3389
+ onStartEdit(value);
3390
+ }
3391
+ }
3392
+ function onViewingKeydown(event) {
3393
+ if (isAlphanumeric(event)) {
3394
+ event.stopPropagation();
3395
+ onStartEdit("");
3396
+ }
3397
+ if (event.key === "Enter") {
3398
+ event.stopPropagation();
3399
+ const value = __props.column.value(__props.row);
3400
+ onStartEdit(value);
3401
+ }
3402
+ }
3403
+ function onEditingKeydown(event) {
3404
+ logic.assertRef(viewElement);
3405
+ logic.assertRef(inputElement);
3406
+ event.stopPropagation();
3407
+ if (event.key === "Enter") {
3408
+ event.preventDefault();
3409
+ const oldValue = __props.column.value(__props.row);
3410
+ const newValue = model.value;
3411
+ __props.column.update(__props.row, newValue, oldValue);
3412
+ model.value = "";
3413
+ onStopEdit({
3414
+ reason: "enter"
3415
+ });
3416
+ }
3417
+ if (event.key === "Escape") {
3418
+ event.preventDefault();
3419
+ model.value = "";
3420
+ onStopEdit({
3421
+ reason: "escape"
3422
+ });
3423
+ }
3424
+ if (event.key === "Tab") {
3425
+ event.preventDefault();
3426
+ const oldValue = __props.column.value(__props.row);
3427
+ const newValue = model.value;
3428
+ __props.column.update(__props.row, newValue, oldValue);
3429
+ model.value = "";
3430
+ onStopEdit({
3431
+ reason: event.shiftKey ? "shift-tab" : "tab"
3432
+ });
3433
+ }
3434
+ }
3435
+ function onKeydown(event) {
3436
+ const editing = document.activeElement === inputElement.value;
3437
+ if (editing) {
3438
+ onEditingKeydown(event);
3439
+ } else {
3440
+ onViewingKeydown(event);
3441
+ }
3442
+ }
3443
+ function onBlur() {
3444
+ logic.assertRef(tdElement);
3445
+ tdElement.value.style.removeProperty("width");
3446
+ const isDirty = model.value !== "";
3447
+ if (isDirty) {
3448
+ const oldValue = __props.column.value(__props.row);
3449
+ const newValue = model.value;
3450
+ __props.column.update(__props.row, newValue, oldValue);
3451
+ }
3452
+ }
3453
+ function onValidity(event) {
3454
+ const {
3455
+ isValid,
3456
+ validationMessage,
3457
+ validityMode
3458
+ } = event.detail;
3459
+ validity.value = {
3460
+ isValid,
3461
+ validationMessage,
3462
+ validityMode
3463
+ };
3464
+ }
3465
+ return (_ctx, _cache) => {
3466
+ return _ctx.column.editable(_ctx.row) ? (vue.openBlock(), vue.createElementBlock("td", {
3467
+ key: 0,
3468
+ ref: "td",
3469
+ tabindex: "-1",
3470
+ class: vue.normalizeClass(wrapperClasses.value),
3471
+ onClick: vue.withModifiers(onClickCell, ["stop"]),
3472
+ onKeydown,
3473
+ onTableActivateCell: onActivateCell
3474
+ }, [vue.createElementVNode("div", _hoisted_1$2, [vue.createElementVNode("span", {
3475
+ ref: "view",
3476
+ class: "table-ng__editable__text"
3477
+ }, vue.toDisplayString(_ctx.column.value(_ctx.row)), 513), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("input", {
3478
+ ref: "input",
3479
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
3480
+ class: vue.normalizeClass(inputClasses.value),
3481
+ type: "text",
3482
+ maxlength: "40",
3483
+ tabindex: "-1",
3484
+ onBlur,
3485
+ onValidity
3486
+ }, null, 34), [[vue.vModelText, model.value]]), _cache[2] || (_cache[2] = vue.createTextVNode()), hasError.value ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FIcon), {
3487
+ key: 0,
3488
+ name: "error",
3489
+ class: "table-ng__editable__icon"
3490
+ })) : (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FIcon), {
3491
+ key: 1,
3492
+ name: "pen",
3493
+ class: "table-ng__editable__icon"
3494
+ }))])], 34)) : (vue.openBlock(), vue.createElementBlock("td", {
3495
+ key: 1,
3496
+ ref: "td",
3497
+ tabindex: "-1",
3498
+ class: "table-ng__cell table-ng__cell--static",
3499
+ onTableActivateCell: onActivateCell
3500
+ }, vue.toDisplayString(_ctx.column.value(_ctx.row)), 545));
3501
+ };
3502
+ }
3503
+ });
3504
+ const _hoisted_1$1 = {
3505
+ key: 0,
3506
+ class: "pager"
3507
+ };
3508
+ const _hoisted_2$1 = {
3509
+ key: 1
3510
+ };
3511
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3512
+ __name: "ITablePager",
3513
+ props: {
3514
+ items: {},
3515
+ itemsPerPage: {
3516
+ default: 10
3517
+ }
3518
+ },
3519
+ emits: ["itemRange"],
3520
+ setup(__props, {
3521
+ emit: __emit
3522
+ }) {
3523
+ const currentPage = vue.ref(1);
3524
+ const currentPageItemLength = vue.ref(0);
3525
+ const numberOfPages = vue.ref(0);
3526
+ const numberOfItems = vue.computed(() => {
3527
+ return __props.items.length;
3528
+ });
3529
+ const emit = __emit;
3530
+ function switchToNextPage() {
3531
+ currentPage.value++;
3532
+ defineCurrentPage();
3533
+ }
3534
+ function switchToPreviousPage() {
3535
+ currentPage.value--;
3536
+ defineCurrentPage();
3537
+ }
3538
+ function switchToSpecificPage(page) {
3539
+ currentPage.value = page;
3540
+ defineCurrentPage();
3541
+ }
3542
+ function defineNumberOfPages() {
3543
+ numberOfPages.value = Math.ceil(numberOfItems.value / __props.itemsPerPage);
3544
+ }
3545
+ function defineCurrentPage() {
3546
+ const currentPageFirstItemId = __props.itemsPerPage * (currentPage.value - 1) + 1;
3547
+ const currentPageLastItemId = Math.min(__props.itemsPerPage * currentPage.value, numberOfItems.value);
3548
+ const currentPageItems = __props.items.slice(currentPageFirstItemId - 1, currentPageLastItemId);
3549
+ emit("itemRange", currentPageItems);
3550
+ currentPageItemLength.value = currentPageItems.length;
3551
+ }
3552
+ function showPageButton(page) {
3553
+ const numberOfAdjacentPagesShown = 2;
3554
+ return page === 1 || Math.abs(currentPage.value - page) <= numberOfAdjacentPagesShown || page === numberOfPages.value;
3555
+ }
3556
+ vue.onMounted(() => {
3557
+ defineNumberOfPages();
3558
+ defineCurrentPage();
3559
+ });
3560
+ return (_ctx, _cache) => {
3561
+ return numberOfPages.value > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [currentPage.value !== 1 ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FButton), {
3562
+ key: 0,
3563
+ variant: "tertiary",
3564
+ size: "small",
3565
+ "icon-left": "chevrons-left",
3566
+ onClick: _cache[0] || (_cache[0] = ($event) => switchToPreviousPage())
3567
+ }, {
3568
+ default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [vue.createTextVNode("\n Föregående\n ", -1)])]),
3569
+ _: 1
3570
+ })) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(numberOfPages.value, (page) => {
3571
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3572
+ key: page
3573
+ }, [showPageButton(page) ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FButton), {
3574
+ key: 0,
3575
+ size: "small",
3576
+ variant: "tertiary",
3577
+ disabled: page === currentPage.value,
3578
+ onClick: ($event) => switchToSpecificPage(page)
3579
+ }, {
3580
+ default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(page), 1)]),
3581
+ _: 2
3582
+ }, 1032, ["disabled", "onClick"])) : showPageButton(page + 1) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$1, "...")) : vue.createCommentVNode("", true)], 64);
3583
+ }), 128)), _cache[5] || (_cache[5] = vue.createTextVNode()), currentPage.value !== numberOfPages.value ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.FButton), {
3584
+ key: 1,
3585
+ variant: "tertiary",
3586
+ size: "small",
3587
+ "icon-right": "arrow-right",
3588
+ onClick: _cache[1] || (_cache[1] = ($event) => switchToNextPage())
3589
+ }, {
3590
+ default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [vue.createTextVNode("\n Nästa\n ", -1)])]),
3591
+ _: 1
3592
+ })) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true);
3593
+ };
3594
+ }
3595
+ });
3596
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3597
+ __name: "ITableHeader",
3598
+ props: {
3599
+ column: {},
3600
+ sortEnabled: {
3601
+ type: Boolean
3602
+ },
3603
+ sortOrder: {}
3604
+ },
3605
+ emits: ["toggleSortOrder"],
3606
+ setup(__props, {
3607
+ emit: __emit
3608
+ }) {
3609
+ const emit = __emit;
3610
+ const thElement = vue.useTemplateRef("th");
3611
+ const sortIconClass = vue.computed(() => {
3612
+ return {
3613
+ "table-ng__column__sort-icon": true,
3614
+ "table-ng__column__sort-icon--discrete": __props.sortOrder === "unsorted"
3615
+ };
3616
+ });
3617
+ const sortIcon = vue.computed(() => {
3618
+ switch (__props.sortOrder) {
3619
+ case "unsorted":
3620
+ return "sort";
3621
+ case "ascending":
3622
+ return "caret-up";
3623
+ case "descending":
3624
+ return "caret-down";
3625
+ default:
3626
+ return "";
3627
+ }
3628
+ });
3629
+ function onActivateCell(e) {
3630
+ logic.assertRef(thElement);
3631
+ thElement.value.tabIndex = 0;
3632
+ if (e.detail.focus) {
3633
+ thElement.value.focus();
3634
+ }
3635
+ }
3636
+ function onClickCell() {
3637
+ if (!__props.column.sortable || !__props.sortEnabled) {
3638
+ return;
3639
+ }
3640
+ emit("toggleSortOrder", String(__props.column.sortable));
3641
+ }
3642
+ function onKeydownCell(e) {
3643
+ if (e.key === "Enter") {
3644
+ e.preventDefault();
3645
+ onClickCell();
3646
+ }
3647
+ }
3648
+ return (_ctx, _cache) => {
3649
+ return vue.openBlock(), vue.createElementBlock("th", {
3650
+ ref: "th",
3651
+ class: "table-ng__column",
3652
+ tabindex: "-1",
3653
+ onKeydown: onKeydownCell,
3654
+ onClick: vue.withModifiers(onClickCell, ["stop"]),
3655
+ onTableActivateCell: onActivateCell
3656
+ }, [vue.createVNode(vue.unref(vue$1.IFlex), {
3657
+ gap: "1x"
3658
+ }, {
3659
+ default: vue.withCtx(() => [vue.createVNode(vue.unref(vue$1.IFlexItem), {
3660
+ shrink: ""
3661
+ }, {
3662
+ default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(_ctx.column.header), 1)]),
3663
+ _: 1
3664
+ }), _cache[0] || (_cache[0] = vue.createTextVNode()), _ctx.sortEnabled ? (vue.openBlock(), vue.createBlock(vue.unref(vue$1.IFlexItem), {
3665
+ key: 0,
3666
+ shrink: "",
3667
+ align: "center"
3668
+ }, {
3669
+ default: vue.withCtx(() => [vue.createVNode(vue.unref(vue$1.FIcon), {
3670
+ name: sortIcon.value,
3671
+ class: vue.normalizeClass(sortIconClass.value)
3672
+ }, null, 8, ["name", "class"])]),
3673
+ _: 1
3674
+ })) : vue.createCommentVNode("", true)]),
3675
+ _: 1
3676
+ })], 544);
3677
+ };
3678
+ }
3679
+ });
3680
+ const _hoisted_1 = ["role"];
3681
+ const _hoisted_2 = {
3682
+ class: "table-ng__row"
3683
+ };
3684
+ const _hoisted_3 = {
3685
+ key: 0,
3686
+ scope: "col",
3687
+ class: "table-ng__column table-ng__column--checkbox"
3688
+ };
3689
+ const _hoisted_4 = {
3690
+ key: 1,
3691
+ scope: "col"
3692
+ };
3693
+ const _hoisted_5 = {
3694
+ key: 2,
3695
+ scope: "col",
3696
+ tabindex: "-1",
3697
+ class: "table-ng__column"
3698
+ };
3699
+ const _hoisted_6 = ["colspan"];
3700
+ const _hoisted_7 = {
3701
+ key: 0
3702
+ };
3703
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
3704
+ __name: "FTable",
3705
+ props: /* @__PURE__ */ vue.mergeModels({
3706
+ columns: {},
3707
+ rows: {},
3708
+ keyAttribute: {
3709
+ default: () => void 0
3710
+ },
3711
+ expandableAttribute: {
3712
+ default: () => void 0
3713
+ },
3714
+ striped: {
3715
+ type: Boolean,
3716
+ default: false
3717
+ },
3718
+ selectable: {
3719
+ default: () => void 0
3720
+ },
3721
+ paginerated: {
3722
+ type: Boolean,
3723
+ default: false
3724
+ }
3725
+ }, {
3726
+ "modelValue": {
3727
+ default: []
3728
+ },
3729
+ "modelModifiers": {}
3730
+ }),
3731
+ emits: ["update:modelValue"],
3732
+ setup(__props) {
3733
+ const model = vue.useModel(__props, "modelValue");
3734
+ const tableRef = vue.useTemplateRef("table");
3735
+ const selectAllRef = vue.useTemplateRef("selectAll");
3736
+ const expandedKeys = vue.ref([]);
3737
+ const keyedRows = vue.computed(() => vue$1.setInternalKeys(__props.rows, __props.keyAttribute, __props.expandableAttribute));
3738
+ const metaRows = vue.computed(() => getMetaRows(keyedRows.value, expandedKeys.value, __props.expandableAttribute));
3739
+ const isTreegrid = vue.computed(() => Boolean(__props.expandableAttribute));
3740
+ const role = vue.computed(() => isTreegrid.value ? "treegrid" : "grid");
3741
+ const rowsFromPaginator = vue.ref(metaRows.value);
3742
+ const viewRows = vue.computed(() => {
3743
+ return __props.paginerated ? rowsFromPaginator.value : metaRows.value;
3744
+ });
3745
+ const multiSelectColumn = {
3746
+ type: "checkbox",
3747
+ header: "selectable",
3748
+ value(row) {
3749
+ if (!__props.keyAttribute) {
3750
+ return false;
3751
+ }
3752
+ return model.value.some((it) => {
3753
+ return row[__props.keyAttribute] === it[__props.keyAttribute];
3754
+ });
3755
+ },
3756
+ editable() {
3757
+ return true;
3758
+ },
3759
+ update(row, _newValue, _oldValue) {
3760
+ logic.assertRef(model);
3761
+ const index = model.value.indexOf(row);
3762
+ if (index < 0) {
3763
+ model.value.push(row);
3764
+ } else {
3765
+ model.value.splice(index, 1);
3766
+ }
3767
+ }
3768
+ };
3769
+ const singleSelectColumn = {
3770
+ type: "radio",
3771
+ header: "Välj en rad",
3772
+ value(row) {
3773
+ if (!__props.keyAttribute) {
3774
+ return false;
3775
+ }
3776
+ return model.value.some((it) => {
3777
+ return row[__props.keyAttribute] === it[__props.keyAttribute];
3778
+ });
3779
+ },
3780
+ update(row, _newValue, _oldValue) {
3781
+ logic.assertRef(model);
3782
+ model.value = [row];
3783
+ }
3784
+ };
3785
+ const isIndeterminate = vue.computed(() => {
3786
+ return model.value.length > 0 && model.value.length < __props.rows.length;
3787
+ });
3788
+ const isAllRowsSelected = vue.computed(() => {
3789
+ return model.value.length > 0 && model.value.length === __props.rows.length;
3790
+ });
3791
+ const isSingleSelect = vue.computed(() => {
3792
+ return __props.selectable === "single";
3793
+ });
3794
+ const isMultiSelect = vue.computed(() => {
3795
+ return __props.selectable === "multi";
3796
+ });
3797
+ vue.watchEffect(() => {
3798
+ if (selectAllRef.value) {
3799
+ selectAllRef.value.indeterminate = isIndeterminate.value;
3800
+ selectAllRef.value.checked = isAllRowsSelected.value;
3801
+ }
3802
+ });
3803
+ function onSelectAllChange() {
3804
+ if (selectAllRef.value?.checked) {
3805
+ model.value = [...__props.rows];
3806
+ } else {
3807
+ model.value = [];
3808
+ }
3809
+ }
3810
+ const columns = vue.computed(() => normalizeTableColumns(__props.columns));
3811
+ const tableClasses = vue.computed(() => {
3812
+ return __props.striped ? "table-ng table-ng--striped" : "table-ng";
3813
+ });
3814
+ const slots = vue.useSlots();
3815
+ const hasExpandableSlot = vue.computed(() => {
3816
+ return Boolean(slots["expandable"]);
3817
+ });
3818
+ async function stopEditHandler(element, reason) {
3819
+ stopEdit(element, reason);
3820
+ }
3821
+ vue.provide(stopEditKey, stopEditHandler);
3822
+ function onToggleExpanded(key) {
3823
+ const index = expandedKeys.value.indexOf(key);
3824
+ if (index < 0) {
3825
+ expandedKeys.value.push(key);
3826
+ } else {
3827
+ expandedKeys.value.splice(index, 1);
3828
+ }
3829
+ }
3830
+ function onKeydown(e) {
3831
+ maybeNavigateToCell(e);
3832
+ }
3833
+ function onClick(e) {
3834
+ const td = e.target.closest("td");
3835
+ if (td) {
3836
+ dispatchActivateCellEvent(td, {
3837
+ focus: true
3838
+ });
3839
+ }
3840
+ }
3841
+ function onTableFocusout(e) {
3842
+ logic.assertRef(tableRef);
3843
+ const outsideTable = !e.relatedTarget || !tableRef.value.contains(e.relatedTarget);
3844
+ if (outsideTable) {
3845
+ const td = e.target.closest("td");
3846
+ if (td) {
3847
+ dispatchActivateCellEvent(td, {
3848
+ focus: false
3849
+ });
3850
+ }
3851
+ } else {
3852
+ e.target.tabIndex = -1;
3853
+ }
3854
+ }
3855
+ function onItemRangeUpdate(items) {
3856
+ rowsFromPaginator.value = items;
3857
+ }
3858
+ const {
3859
+ sort,
3860
+ registerCallbackOnSort,
3861
+ registerCallbackOnMount
3862
+ } = vue$1.FSortFilterDatasetInjected();
3863
+ const sortableColumns = vue.ref([]);
3864
+ const sortedColumn = vue.ref("");
3865
+ const sortedAscending = vue.ref(false);
3866
+ function callbackSortableColumns(columnNames) {
3867
+ sortableColumns.value = columnNames;
3868
+ }
3869
+ function callbackOnSort(columnName, ascending) {
3870
+ sortedColumn.value = columnName;
3871
+ sortedAscending.value = ascending;
3872
+ }
3873
+ function isSortEnabled(column) {
3874
+ if (!column.sortable) {
3875
+ return false;
3876
+ }
3877
+ return sortableColumns.value.indexOf(String(column.sortable)) > -1;
3878
+ }
3879
+ function getSortOrder(column) {
3880
+ if (sortedColumn.value !== column.sortable) {
3881
+ return "unsorted";
3882
+ } else {
3883
+ return sortedAscending.value ? "ascending" : "descending";
3884
+ }
3885
+ }
3886
+ function onToggleSortOrder(sortable) {
3887
+ if (sortable === sortedColumn.value) {
3888
+ if (sortedAscending.value) {
3889
+ sort(sortable, false);
3890
+ } else {
3891
+ sort("", true);
3892
+ }
3893
+ } else {
3894
+ sort(sortable, true);
3895
+ }
3896
+ }
3897
+ vue.onMounted(() => {
3898
+ logic.assertRef(tableRef);
3899
+ setDefaultCellTarget(tableRef.value);
3900
+ registerCallbackOnMount(callbackSortableColumns);
3901
+ registerCallbackOnSort(callbackOnSort);
3902
+ });
3903
+ return (_ctx, _cache) => {
3904
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [vue.createElementVNode("table", {
3905
+ ref: "table",
3906
+ role: role.value,
3907
+ class: vue.normalizeClass(tableClasses.value),
3908
+ onFocusout: onTableFocusout,
3909
+ onClick,
3910
+ onKeydown
3911
+ }, [vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_2, [isMultiSelect.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_3, [vue.createElementVNode("input", {
3912
+ ref: "selectAll",
3913
+ type: "checkbox",
3914
+ "aria-label": "select all",
3915
+ tabindex: "-1",
3916
+ indeterminate: "",
3917
+ onChange: onSelectAllChange
3918
+ }, null, 544)])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), isSingleSelect.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4, vue.toDisplayString(singleSelectColumn.header), 1)) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
3919
+ return vue.openBlock(), vue.createBlock(_sfc_main$1, {
3920
+ key: column.header,
3921
+ column,
3922
+ "sort-enabled": isSortEnabled(column),
3923
+ "sort-order": getSortOrder(column),
3924
+ scope: "col",
3925
+ class: "table-ng__column",
3926
+ onToggleSortOrder
3927
+ }, null, 8, ["column", "sort-enabled", "sort-order"]);
3928
+ }), 128))])]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(viewRows.value, ({
3929
+ key,
3930
+ row,
3931
+ rowIndex,
3932
+ level,
3933
+ setsize,
3934
+ posinset,
3935
+ isExpandable,
3936
+ isExpanded
3937
+ }) => {
3938
+ return vue.openBlock(), vue.createBlock(_sfc_main$9, {
3939
+ key,
3940
+ "row-key": key,
3941
+ "aria-rowindex": rowIndex,
3942
+ "aria-level": level,
3943
+ "aria-setsize": setsize,
3944
+ "aria-posinset": posinset,
3945
+ "is-treegrid": isTreegrid.value,
3946
+ "is-expandable": isExpandable,
3947
+ "is-expanded": isExpanded,
3948
+ onToggle: onToggleExpanded
3949
+ }, {
3950
+ default: vue.withCtx(() => [level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createElementBlock("td", {
3951
+ key: 0,
3952
+ colspan: columns.value.length
3953
+ }, [vue.renderSlot(_ctx.$slots, "expandable", vue.mergeProps({
3954
+ ref_for: true
3955
+ }, {
3956
+ row
3957
+ }))], 8, _hoisted_6)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3958
+ key: 1
3959
+ }, [isMultiSelect.value ? (vue.openBlock(), vue.createBlock(_sfc_main$7, {
3960
+ key: 0,
3961
+ row,
3962
+ column: multiSelectColumn
3963
+ }, null, 8, ["row"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), isSingleSelect.value ? (vue.openBlock(), vue.createBlock(_sfc_main$6, {
3964
+ key: 1,
3965
+ row,
3966
+ column: singleSelectColumn
3967
+ }, null, 8, ["row"])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
3968
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3969
+ key: column.header
3970
+ }, [column.type === "checkbox" ? (vue.openBlock(), vue.createBlock(_sfc_main$7, {
3971
+ key: 0,
3972
+ row,
3973
+ column
3974
+ }, null, 8, ["row", "column"])) : column.type === "text" ? (vue.openBlock(), vue.createBlock(_sfc_main$3, {
3975
+ key: 1,
3976
+ row,
3977
+ column
3978
+ }, null, 8, ["row", "column"])) : column.type === "anchor" ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
3979
+ key: 2,
3980
+ row,
3981
+ column
3982
+ }, null, 8, ["row", "column"])) : column.type === "button" ? (vue.openBlock(), vue.createBlock(_sfc_main$4, {
3983
+ key: 3,
3984
+ row,
3985
+ column
3986
+ }, null, 8, ["row", "column"])) : column.type === "select" ? (vue.openBlock(), vue.createBlock(_sfc_main$8, {
3987
+ key: 4,
3988
+ row,
3989
+ column
3990
+ }, null, 8, ["row", "column"])) : "render" in column ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(column.render(row)), {
3991
+ key: 5,
3992
+ row
3993
+ }, null, 8, ["row"])) : vue.createCommentVNode("", true)], 64);
3994
+ }), 128))], 64))]),
3995
+ _: 2
3996
+ }, 1032, ["row-key", "aria-rowindex", "aria-level", "aria-setsize", "aria-posinset", "is-treegrid", "is-expandable", "is-expanded"]);
3997
+ }), 128))])], 42, _hoisted_1), _cache[6] || (_cache[6] = vue.createTextVNode()), _ctx.paginerated ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [vue.createVNode(_sfc_main$2, {
3998
+ items: metaRows.value,
3999
+ onItemRange: onItemRangeUpdate
4000
+ }, null, 8, ["items"])])) : vue.createCommentVNode("", true), _cache[7] || (_cache[7] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "footer")], 64);
4001
+ };
4002
+ }
4003
+ });
4004
+ exports.FTable = _sfc_main;
2305
4005
  exports.HOURS_MINUTES_REGEXP = HOURS_MINUTES_REGEXP;
2306
4006
  exports.HOURS_MINUTES_WITHOUT_COLON_REGEXP = HOURS_MINUTES_WITHOUT_COLON_REGEXP;
2307
4007
  exports.HoursMinutesValidatorUtils = HoursMinutesValidatorUtils;
2308
- exports.XTimeTextField = _sfc_main;
4008
+ exports.XTimeTextField = _sfc_main$a;
4009
+ exports.defineTableColumns = defineTableColumns;
2309
4010
  exports.forgivingParseTimeToNumber = forgivingParseTimeToNumber;
2310
4011
  exports.formatNumberToTime = formatNumberToTime;
2311
4012
  exports.hoursMinutesStringToMinutes = hoursMinutesStringToMinutes;