@fkui/vue-labs 6.41.0 → 6.43.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.
@@ -34,4 +34,7 @@
34
34
  #fillista:hover {
35
35
  cursor: default;
36
36
  background-color: transparent;
37
- }
37
+ }
38
+ time[data-v-03b0dfe5] {
39
+ color: var(--fkds-color-text-primary);
40
+ }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, useTemplateRef, computed, openBlock, createElementBlock, createElementVNode, createVNode, unref, renderSlot, withModifiers, withKeys, normalizeClass, withCtx, createTextVNode, toDisplayString, createBlock, createCommentVNode, ref, nextTick, toValue, inject, withDirectives, vShow, onMounted, watchEffect, mergeProps, vModelText, toRef, watch, onUpdated, useModel, useSlots, provide, Fragment, renderList, resolveDynamicComponent, mergeModels, resolveDirective, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { assertRef, formatPostalCode, parsePlusgiro, parseNumber, formatNumber, parseOrganisationsnummer, parseDate, parseClearingNumber, parseBankgiro, parseBankAccountNumber, parsePersonnummer, formatPersonnummer, ElementIdService, assertSet, ValidationService, alertScreenReader, debounce, isEmpty, stripWhitespace, isSet, TranslationService } from "@fkui/logic";
3
- import { FIcon, IFlex, IFlexItem, useTranslate, getItemIdentifier, FContextMenu, IComboboxDropdown, IPopupError, dispatchComponentValidityEvent, findItemIdentifier, useSlotUtils, setItemIdentifiers, FSortFilterDatasetInjected, EventBus, FFileSelector, FFileItem, TranslationMixin, FTextField, useTextFieldSetup } from "@fkui/vue";
3
+ import { FIcon, IFlex, IFlexItem, useTranslate, getItemIdentifier, FContextMenu, IComboboxDropdown, IPopupError, dispatchComponentValidityEvent, findItemIdentifier, useSlotUtils, getDatasetMetadata, setItemIdentifiers, FSortFilterDatasetInjected, EventBus, FFileSelector, FFileItem, TranslationMixin, FTextField, useTextFieldSetup } from "@fkui/vue";
4
4
  import { useElementHover, useFocusWithin, useEventListener } from "@vueuse/core";
5
5
  var es_iterator_forEach = {};
6
6
  var globalThis_1;
@@ -2594,7 +2594,7 @@ function requireEs_set_union_v2() {
2594
2594
  return es_set_union_v2;
2595
2595
  }
2596
2596
  requireEs_set_union_v2();
2597
- const _hoisted_1$e = {
2597
+ const _hoisted_1$f = {
2598
2598
  key: 0,
2599
2599
  class: "table-ng__cell table-ng__cell--expand"
2600
2600
  };
@@ -2605,7 +2605,7 @@ const _hoisted_3$4 = {
2605
2605
  tabindex: "-1",
2606
2606
  class: "table-ng__cell table-ng__cell--expand"
2607
2607
  };
2608
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2608
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2609
2609
  __name: "ITableExpandButton",
2610
2610
  props: {
2611
2611
  isExpandable: {
@@ -2635,7 +2635,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2635
2635
  };
2636
2636
  __expose(expose);
2637
2637
  return (_ctx, _cache) => {
2638
- return __props.isExpandable ? (openBlock(), createElementBlock("td", _hoisted_1$e, [createElementVNode("button", {
2638
+ return __props.isExpandable ? (openBlock(), createElementBlock("td", _hoisted_1$f, [createElementVNode("button", {
2639
2639
  ref: "expandable",
2640
2640
  tabindex: "-1",
2641
2641
  "aria-label": expandLabel.value,
@@ -2649,8 +2649,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2649
2649
  };
2650
2650
  }
2651
2651
  });
2652
- const _hoisted_1$d = ["colspan"];
2653
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2652
+ const _hoisted_1$e = ["colspan"];
2653
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2654
2654
  __name: "ITableExpandable",
2655
2655
  props: {
2656
2656
  colspan: {}
@@ -2661,7 +2661,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2661
2661
  class: "table-ng__cell--custom",
2662
2662
  colspan: __props.colspan,
2663
2663
  tabindex: "-1"
2664
- }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$d);
2664
+ }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$e);
2665
2665
  };
2666
2666
  }
2667
2667
  });
@@ -2991,8 +2991,8 @@ const inputFieldConfig = {
2991
2991
  }
2992
2992
  }
2993
2993
  };
2994
- const _hoisted_1$c = ["aria-sort", "onKeydown"];
2995
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2994
+ const _hoisted_1$d = ["aria-sort", "onKeydown"];
2995
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2996
2996
  __name: "ITableHeader",
2997
2997
  props: {
2998
2998
  column: {},
@@ -3098,16 +3098,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3098
3098
  _: 1
3099
3099
  })]),
3100
3100
  _: 1
3101
- }, 8, ["float"])) : createCommentVNode("", true)], 42, _hoisted_1$c);
3101
+ }, 8, ["float"])) : createCommentVNode("", true)], 42, _hoisted_1$d);
3102
3102
  };
3103
3103
  }
3104
3104
  });
3105
- const _hoisted_1$b = {
3105
+ const _hoisted_1$c = {
3106
3106
  scope: "col",
3107
3107
  class: "table-ng__column table-ng__column--selectable"
3108
3108
  };
3109
3109
  const _hoisted_2$8 = ["checked", "indeterminate", "aria-label"];
3110
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
3110
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3111
3111
  __name: "ITableHeaderSelectable",
3112
3112
  props: {
3113
3113
  selectable: {},
@@ -3134,7 +3134,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3134
3134
  }
3135
3135
  __expose(expose);
3136
3136
  return (_ctx, _cache) => {
3137
- return openBlock(), createElementBlock("th", _hoisted_1$b, [__props.selectable === "multi" ? (openBlock(), createElementBlock("input", {
3137
+ return openBlock(), createElementBlock("th", _hoisted_1$c, [__props.selectable === "multi" ? (openBlock(), createElementBlock("input", {
3138
3138
  key: 0,
3139
3139
  ref: "input",
3140
3140
  checked: checked.value,
@@ -3147,11 +3147,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3147
3147
  };
3148
3148
  }
3149
3149
  });
3150
- const _hoisted_1$a = {
3150
+ const _hoisted_1$b = {
3151
3151
  class: "table-ng__cell table-ng__cell--checkbox"
3152
3152
  };
3153
3153
  const _hoisted_2$7 = ["checked", "aria-label"];
3154
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
3154
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3155
3155
  __name: "ITableCheckbox",
3156
3156
  props: {
3157
3157
  column: {},
@@ -3174,7 +3174,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3174
3174
  };
3175
3175
  __expose(expose);
3176
3176
  return (_ctx, _cache) => {
3177
- return openBlock(), createElementBlock("td", _hoisted_1$a, [createElementVNode("input", {
3177
+ return openBlock(), createElementBlock("td", _hoisted_1$b, [createElementVNode("input", {
3178
3178
  ref: "target",
3179
3179
  checked: Boolean(__props.column.checked(__props.row)),
3180
3180
  type: "checkbox",
@@ -3185,11 +3185,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3185
3185
  };
3186
3186
  }
3187
3187
  });
3188
- const _hoisted_1$9 = {
3188
+ const _hoisted_1$a = {
3189
3189
  class: "table-ng__cell table-ng__cell--radio"
3190
3190
  };
3191
3191
  const _hoisted_2$6 = ["checked", "aria-label"];
3192
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
3192
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3193
3193
  __name: "ITableRadio",
3194
3194
  props: {
3195
3195
  column: {},
@@ -3212,7 +3212,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3212
3212
  };
3213
3213
  __expose(expose);
3214
3214
  return (_ctx, _cache) => {
3215
- return openBlock(), createElementBlock("td", _hoisted_1$9, [createElementVNode("input", {
3215
+ return openBlock(), createElementBlock("td", _hoisted_1$a, [createElementVNode("input", {
3216
3216
  ref: "input",
3217
3217
  type: "radio",
3218
3218
  checked: Boolean(__props.column.checked(__props.row)),
@@ -3223,12 +3223,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3223
3223
  };
3224
3224
  }
3225
3225
  });
3226
- const _hoisted_1$8 = {
3226
+ const _hoisted_1$9 = {
3227
3227
  key: 0,
3228
3228
  tabindex: "-1",
3229
3229
  class: "table-ng__cell"
3230
3230
  };
3231
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3231
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3232
3232
  __name: "ITableSelectable",
3233
3233
  props: {
3234
3234
  selectable: {},
@@ -3263,7 +3263,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3263
3263
  description: ref(null),
3264
3264
  sortable: null,
3265
3265
  size: ref(null),
3266
- component: _sfc_main$c,
3266
+ component: _sfc_main$d,
3267
3267
  label() {
3268
3268
  return $t("fkui.table.selectable.checkbox", "Välj rad");
3269
3269
  },
@@ -3282,7 +3282,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3282
3282
  description: ref(null),
3283
3283
  sortable: null,
3284
3284
  size: ref(null),
3285
- component: _sfc_main$b,
3285
+ component: _sfc_main$c,
3286
3286
  label() {
3287
3287
  return $t("fkui.table.selectable.radio", "Välj rad");
3288
3288
  },
@@ -3295,13 +3295,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3295
3295
  enabled: true
3296
3296
  };
3297
3297
  return (_ctx, _cache) => {
3298
- return __props.level > 1 ? (openBlock(), createElementBlock("td", _hoisted_1$8)) : __props.selectable === "multi" ? (openBlock(), createBlock(_sfc_main$c, {
3298
+ return __props.level > 1 ? (openBlock(), createElementBlock("td", _hoisted_1$9)) : __props.selectable === "multi" ? (openBlock(), createBlock(_sfc_main$d, {
3299
3299
  key: 1,
3300
3300
  ref: "child",
3301
3301
  row: __props.row,
3302
3302
  column: multiSelectColumn,
3303
3303
  class: "table-ng__cell--selectable"
3304
- }, null, 8, ["row"])) : __props.selectable === "single" ? (openBlock(), createBlock(_sfc_main$b, {
3304
+ }, null, 8, ["row"])) : __props.selectable === "single" ? (openBlock(), createBlock(_sfc_main$c, {
3305
3305
  key: 2,
3306
3306
  ref: "child",
3307
3307
  row: __props.row,
@@ -3755,14 +3755,14 @@ function requireEs_iterator_map() {
3755
3755
  return es_iterator_map;
3756
3756
  }
3757
3757
  requireEs_iterator_map();
3758
- const _hoisted_1$7 = ["href"];
3758
+ const _hoisted_1$8 = ["href"];
3759
3759
  const _hoisted_2$5 = {
3760
3760
  key: 1,
3761
3761
  ref: "target",
3762
3762
  tabindex: "-1",
3763
3763
  class: "table-ng__cell"
3764
3764
  };
3765
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3765
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3766
3766
  __name: "ITableAnchor",
3767
3767
  props: {
3768
3768
  column: {},
@@ -3788,17 +3788,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3788
3788
  target: "_blank",
3789
3789
  href: __props.column.href,
3790
3790
  tabindex: "-1"
3791
- }, toDisplayString(__props.column.text(__props.row)), 9, _hoisted_1$7)], 32)) : (openBlock(), createElementBlock("td", _hoisted_2$5, null, 512));
3791
+ }, toDisplayString(__props.column.text(__props.row)), 9, _hoisted_1$8)], 32)) : (openBlock(), createElementBlock("td", _hoisted_2$5, null, 512));
3792
3792
  };
3793
3793
  }
3794
3794
  });
3795
- const _hoisted_1$6 = {
3795
+ const _hoisted_1$7 = {
3796
3796
  class: "table-ng__cell table-ng__cell--button"
3797
3797
  };
3798
3798
  const _hoisted_2$4 = {
3799
3799
  class: "sr-only"
3800
3800
  };
3801
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3801
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3802
3802
  __name: "ITableButton",
3803
3803
  props: {
3804
3804
  column: {},
@@ -3820,7 +3820,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3820
3820
  };
3821
3821
  __expose(expose);
3822
3822
  return (_ctx, _cache) => {
3823
- return openBlock(), createElementBlock("td", _hoisted_1$6, [createElementVNode("button", {
3823
+ return openBlock(), createElementBlock("td", _hoisted_1$7, [createElementVNode("button", {
3824
3824
  ref: "button",
3825
3825
  class: "icon-button",
3826
3826
  type: "button",
@@ -3875,10 +3875,10 @@ function requireEs_iterator_find() {
3875
3875
  return es_iterator_find;
3876
3876
  }
3877
3877
  requireEs_iterator_find();
3878
- const _hoisted_1$5 = {
3878
+ const _hoisted_1$6 = {
3879
3879
  class: "sr-only"
3880
3880
  };
3881
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3881
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3882
3882
  __name: "ITableMenu",
3883
3883
  props: {
3884
3884
  column: {},
@@ -3945,7 +3945,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3945
3945
  onClick: onOpen
3946
3946
  }, [createVNode(unref(FIcon), {
3947
3947
  name: "bars"
3948
- }), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_1$5, toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = createTextVNode()), createVNode(unref(FContextMenu), {
3948
+ }), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_1$6, toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = createTextVNode()), createVNode(unref(FContextMenu), {
3949
3949
  "is-open": isOpen.value,
3950
3950
  items: menuitems.value,
3951
3951
  anchor: (_buttonRef$value = buttonRef.value) !== null && _buttonRef$value !== void 0 ? _buttonRef$value : void 0,
@@ -3956,7 +3956,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3956
3956
  };
3957
3957
  }
3958
3958
  });
3959
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3959
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3960
3960
  __name: "ITableRowheader",
3961
3961
  props: {
3962
3962
  row: {},
@@ -3972,7 +3972,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3972
3972
  };
3973
3973
  }
3974
3974
  });
3975
- const _hoisted_1$4 = {
3975
+ const _hoisted_1$5 = {
3976
3976
  class: "table-ng__editable"
3977
3977
  };
3978
3978
  const _hoisted_2$3 = {
@@ -3982,12 +3982,12 @@ const _hoisted_3$3 = ["aria-expanded", "aria-controls", "aria-activedescendant",
3982
3982
  const _hoisted_4$3 = {
3983
3983
  class: "table-ng__editable__text"
3984
3984
  };
3985
- const _hoisted_5$2 = {
3985
+ const _hoisted_5$3 = {
3986
3986
  key: 1,
3987
3987
  tabindex: "-1",
3988
3988
  class: "table-ng__cell table-ng__cell--static"
3989
3989
  };
3990
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3990
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3991
3991
  __name: "ITableSelect",
3992
3992
  props: {
3993
3993
  row: {},
@@ -4135,7 +4135,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4135
4135
  tabindex: "-1",
4136
4136
  onKeydown: onCellKeyDown,
4137
4137
  onClick: withModifiers(onCellClick, ["stop"])
4138
- }, [withDirectives(createElementVNode("div", _hoisted_1$4, [createElementVNode("span", _hoisted_2$3, toDisplayString(viewValue.value), 1)], 512), [[vShow, !editing.value]]), _cache[3] || (_cache[3] = createTextVNode()), withDirectives(createElementVNode("div", {
4138
+ }, [withDirectives(createElementVNode("div", _hoisted_1$5, [createElementVNode("span", _hoisted_2$3, toDisplayString(viewValue.value), 1)], 512), [[vShow, !editing.value]]), _cache[3] || (_cache[3] = createTextVNode()), withDirectives(createElementVNode("div", {
4139
4139
  ref: "edit",
4140
4140
  role: "combobox",
4141
4141
  tabindex: "-1",
@@ -4160,7 +4160,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4160
4160
  "input-node": editRef.value,
4161
4161
  onSelect: selectDropdownOption,
4162
4162
  onClose: onDropdownClose
4163
- }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vShow, editing.value]])], 32)) : (openBlock(), createElementBlock("td", _hoisted_5$2, toDisplayString(__props.column.selected(__props.row)), 1));
4163
+ }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vShow, editing.value]])], 32)) : (openBlock(), createElementBlock("td", _hoisted_5$3, toDisplayString(__props.column.selected(__props.row)), 1));
4164
4164
  };
4165
4165
  }
4166
4166
  });
@@ -4209,7 +4209,7 @@ function addInputValidators(inputElement, type) {
4209
4209
  function isAlphanumeric(e) {
4210
4210
  return e.key.length === 1 && !e.ctrlKey && !e.metaKey;
4211
4211
  }
4212
- const _hoisted_1$3 = ["id", "aria-invalid"];
4212
+ const _hoisted_1$4 = ["id", "aria-invalid"];
4213
4213
  const _hoisted_2$2 = {
4214
4214
  class: "table-ng__editable__text"
4215
4215
  };
@@ -4218,7 +4218,11 @@ const _hoisted_3$2 = {
4218
4218
  class: "sr-only"
4219
4219
  };
4220
4220
  const _hoisted_4$2 = ["id", "aria-label", "aria-hidden"];
4221
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4221
+ const _hoisted_5$2 = {
4222
+ ref: "arrowAnchor",
4223
+ "aria-hidden": "true"
4224
+ };
4225
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4222
4226
  __name: "ITableText",
4223
4227
  props: {
4224
4228
  row: {},
@@ -4310,6 +4314,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4310
4314
  });
4311
4315
  const tdElement = useTemplateRef("td");
4312
4316
  const inputElement = useTemplateRef("input");
4317
+ const arrowAnchorElement = useTemplateRef("arrowAnchor");
4313
4318
  const {
4314
4319
  stopEdit: stopEdit2
4315
4320
  } = useStartStopEdit();
@@ -4387,20 +4392,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4387
4392
  });
4388
4393
  watchEffect(() => {
4389
4394
  if (hasError.value) {
4390
- var _tdElement$value, _inputElement$value;
4395
+ var _tdElement$value, _arrowAnchorElement$v;
4391
4396
  emit("onError", {
4392
4397
  anchor: (_tdElement$value = tdElement.value) !== null && _tdElement$value !== void 0 ? _tdElement$value : void 0,
4393
- arrowAnchor: (_inputElement$value = inputElement.value) !== null && _inputElement$value !== void 0 ? _inputElement$value : void 0,
4398
+ arrowAnchor: (_arrowAnchorElement$v = arrowAnchorElement.value) !== null && _arrowAnchorElement$v !== void 0 ? _arrowAnchorElement$v : void 0,
4394
4399
  message: validity.value.validationMessage,
4395
4400
  hasFocus: focused.value,
4396
4401
  hasHover: isHovered.value,
4397
4402
  inEdit: inEdit.value
4398
4403
  });
4399
4404
  } else {
4400
- var _tdElement$value2, _inputElement$value2;
4405
+ var _tdElement$value2, _arrowAnchorElement$v2;
4401
4406
  emit("closeError", {
4402
4407
  anchor: (_tdElement$value2 = tdElement.value) !== null && _tdElement$value2 !== void 0 ? _tdElement$value2 : void 0,
4403
- arrowAnchor: (_inputElement$value2 = inputElement.value) !== null && _inputElement$value2 !== void 0 ? _inputElement$value2 : void 0,
4408
+ arrowAnchor: (_arrowAnchorElement$v2 = arrowAnchorElement.value) !== null && _arrowAnchorElement$v2 !== void 0 ? _arrowAnchorElement$v2 : void 0,
4404
4409
  message: validity.value.validationMessage,
4405
4410
  hasFocus: focused.value,
4406
4411
  hasHover: isHovered.value,
@@ -4593,13 +4598,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4593
4598
  "aria-hidden": !inEdit.value,
4594
4599
  onValidity,
4595
4600
  onPendingValidity
4596
- }), null, 16, _hoisted_4$2), [[vModelText, viewValue.value]])], 2), _cache[4] || (_cache[4] = createTextVNode()), createVNode(unref(IPopupError), {
4601
+ }), null, 16, _hoisted_4$2), [[vModelText, viewValue.value]]), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("span", _hoisted_5$2, null, 512)], 2), _cache[5] || (_cache[5] = createTextVNode()), createVNode(unref(IPopupError), {
4597
4602
  anchor: tdElement.value,
4598
4603
  "is-open": openPopupError.value,
4599
4604
  "error-message": validity.value.validationMessage,
4600
- "arrow-anchor": inputElement.value,
4605
+ "arrow-anchor": arrowAnchorElement.value,
4601
4606
  layout: "f-table"
4602
- }, null, 8, ["anchor", "is-open", "error-message", "arrow-anchor"])], 42, _hoisted_1$3)) : (openBlock(), createElementBlock("td", {
4607
+ }, null, 8, ["anchor", "is-open", "error-message", "arrow-anchor"])], 42, _hoisted_1$4)) : (openBlock(), createElementBlock("td", {
4603
4608
  key: 1,
4604
4609
  ref: "td",
4605
4610
  tabindex: "-1",
@@ -4778,7 +4783,7 @@ function normalizeTableColumn(column) {
4778
4783
  return Object.freeze({
4779
4784
  ...normalizeCheckboxColumn(column),
4780
4785
  ...base,
4781
- component: _sfc_main$c
4786
+ component: _sfc_main$d
4782
4787
  });
4783
4788
  case "text:currency":
4784
4789
  case "text:number":
@@ -4786,7 +4791,7 @@ function normalizeTableColumn(column) {
4786
4791
  return Object.freeze({
4787
4792
  ...normalizeNumberColumn(column),
4788
4793
  ...base,
4789
- component: _sfc_main$4
4794
+ component: _sfc_main$5
4790
4795
  });
4791
4796
  case "text":
4792
4797
  case "text:bankAccountNumber":
@@ -4802,43 +4807,43 @@ function normalizeTableColumn(column) {
4802
4807
  return Object.freeze({
4803
4808
  ...normalizeTextColumn(column),
4804
4809
  ...base,
4805
- component: _sfc_main$4
4810
+ component: _sfc_main$5
4806
4811
  });
4807
4812
  case "rowheader":
4808
4813
  return Object.freeze({
4809
4814
  ...normalizeRowHeaderColumn(column),
4810
4815
  ...base,
4811
- component: _sfc_main$6
4816
+ component: _sfc_main$7
4812
4817
  });
4813
4818
  case "anchor":
4814
4819
  return Object.freeze({
4815
4820
  ...normalizeAnchorColumn(column),
4816
4821
  ...base,
4817
- component: _sfc_main$9
4822
+ component: _sfc_main$a
4818
4823
  });
4819
4824
  case "button":
4820
4825
  return Object.freeze({
4821
4826
  ...normalizeButtonColumn(column),
4822
4827
  ...base,
4823
- component: _sfc_main$8
4828
+ component: _sfc_main$9
4824
4829
  });
4825
4830
  case "select":
4826
4831
  return Object.freeze({
4827
4832
  ...normalizeSelectColumn(column),
4828
4833
  ...base,
4829
- component: _sfc_main$5
4834
+ component: _sfc_main$6
4830
4835
  });
4831
4836
  case "menu":
4832
4837
  return Object.freeze({
4833
4838
  ...normalizeMenuColumn(column),
4834
4839
  ...base,
4835
- component: _sfc_main$7
4840
+ component: _sfc_main$8
4836
4841
  });
4837
4842
  case void 0:
4838
4843
  return Object.freeze({
4839
4844
  ...normalizeSimpleColumn(column),
4840
4845
  ...base,
4841
- component: _sfc_main$4
4846
+ component: _sfc_main$5
4842
4847
  });
4843
4848
  }
4844
4849
  }
@@ -5211,7 +5216,7 @@ function useTabstop(tableRef, metaRows) {
5211
5216
  withTabstopBehaviour
5212
5217
  };
5213
5218
  }
5214
- const _hoisted_1$2 = ["role", "aria-rowcount"];
5219
+ const _hoisted_1$3 = ["role", "aria-rowcount"];
5215
5220
  const _hoisted_2$1 = {
5216
5221
  key: 0,
5217
5222
  "data-test": "caption"
@@ -5243,7 +5248,7 @@ const _hoisted_10 = {
5243
5248
  };
5244
5249
  const _hoisted_11 = ["aria-rowindex"];
5245
5250
  const _hoisted_12 = ["colspan"];
5246
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5251
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5247
5252
  __name: "FTable",
5248
5253
  props: /* @__PURE__ */ mergeModels({
5249
5254
  columns: {},
@@ -5251,9 +5256,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5251
5256
  keyAttribute: {
5252
5257
  default: () => void 0
5253
5258
  },
5254
- expandableAttribute: {
5255
- default: () => void 0
5256
- },
5257
5259
  rowClass: {
5258
5260
  type: Function,
5259
5261
  default: void 0
@@ -5284,9 +5286,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5284
5286
  } = useSlotUtils();
5285
5287
  const tableRef = useTemplateRef("table");
5286
5288
  const expandedKeys = ref(/* @__PURE__ */ new Set());
5287
- const keyedRows = computed(() => setItemIdentifiers(__props.rows, __props.keyAttribute, __props.expandableAttribute));
5288
- const metaRows = computed(() => getMetaRows(keyedRows.value, expandedKeys.value, __props.expandableAttribute));
5289
- const isTreegrid = computed(() => Boolean(__props.expandableAttribute));
5289
+ const expandableAttribute = computed(() => {
5290
+ return getDatasetMetadata(__props.rows).nestedAttribute;
5291
+ });
5292
+ const keyedRows = computed(() => setItemIdentifiers(__props.rows, __props.keyAttribute, expandableAttribute.value));
5293
+ const metaRows = computed(() => getMetaRows(keyedRows.value, expandedKeys.value, expandableAttribute.value));
5294
+ const isTreegrid = computed(() => Boolean(expandableAttribute.value));
5290
5295
  const role = computed(() => isTreegrid.value ? "treegrid" : "grid");
5291
5296
  const hasCaption = computed(() => {
5292
5297
  return hasSlot("caption", {}, {
@@ -5302,7 +5307,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5302
5307
  return footerRow;
5303
5308
  }
5304
5309
  const headerRow = 1;
5305
- const bodyRows = getBodyRowCount(keyedRows.value, __props.expandableAttribute);
5310
+ const bodyRows = getBodyRowCount(keyedRows.value, expandableAttribute.value);
5306
5311
  return bodyRows + headerRow + footerRow;
5307
5312
  });
5308
5313
  const fullColspan = computed(() => {
@@ -5492,14 +5497,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5492
5497
  onFocusout: onTableFocusout,
5493
5498
  onClick,
5494
5499
  onKeydown
5495
- }, [hasCaption.value ? (openBlock(), createElementBlock("caption", _hoisted_2$1, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), _cache[6] || (_cache[6] = createTextVNode()), hasColumns.value ? (openBlock(), createElementBlock("thead", _hoisted_3$1, [createElementVNode("tr", _hoisted_4$1, [isTreegrid.value ? (openBlock(), createElementBlock("th", _hoisted_5$1)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), __props.selectable ? (openBlock(), createBlock(_sfc_main$d, {
5500
+ }, [hasCaption.value ? (openBlock(), createElementBlock("caption", _hoisted_2$1, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), _cache[6] || (_cache[6] = createTextVNode()), hasColumns.value ? (openBlock(), createElementBlock("thead", _hoisted_3$1, [createElementVNode("tr", _hoisted_4$1, [isTreegrid.value ? (openBlock(), createElementBlock("th", _hoisted_5$1)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), __props.selectable ? (openBlock(), createBlock(_sfc_main$e, {
5496
5501
  key: 1,
5497
5502
  ref: bindCellApiRef,
5498
5503
  state: unref(selectableHeaderState)(),
5499
5504
  selectable: __props.selectable,
5500
5505
  onToggle: unref(toggleSelectableHeader)
5501
5506
  }, null, 8, ["state", "selectable", "onToggle"])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(columns.value, (column) => {
5502
- return openBlock(), createBlock(_sfc_main$e, {
5507
+ return openBlock(), createBlock(_sfc_main$f, {
5503
5508
  key: column.id,
5504
5509
  column,
5505
5510
  "sort-enabled": isSortEnabled(column),
@@ -5532,7 +5537,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5532
5537
  "aria-setsize": setsize,
5533
5538
  "aria-posinset": posinset,
5534
5539
  "aria-selected": isAriaSelected(level, row)
5535
- }, [isTreegrid.value ? (openBlock(), createBlock(_sfc_main$g, {
5540
+ }, [isTreegrid.value ? (openBlock(), createBlock(_sfc_main$h, {
5536
5541
  key: 0,
5537
5542
  ref_for: true,
5538
5543
  ref: bindCellApiRef,
@@ -5540,7 +5545,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5540
5545
  "is-expanded": isExpanded,
5541
5546
  "row-key": key,
5542
5547
  onToggle: onToggleExpanded
5543
- }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), level > 1 && hasExpandableSlot.value ? (openBlock(), createBlock(_sfc_main$f, {
5548
+ }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), level > 1 && hasExpandableSlot.value ? (openBlock(), createBlock(_sfc_main$g, {
5544
5549
  key: 1,
5545
5550
  colspan: expandedColspan.value
5546
5551
  }, {
@@ -5552,7 +5557,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5552
5557
  _: 2
5553
5558
  }, 1032, ["colspan"])) : (openBlock(), createElementBlock(Fragment, {
5554
5559
  key: 2
5555
- }, [__props.selectable ? (openBlock(), createBlock(_sfc_main$a, {
5560
+ }, [__props.selectable ? (openBlock(), createBlock(_sfc_main$b, {
5556
5561
  key: 0,
5557
5562
  ref_for: true,
5558
5563
  ref: bindCellApiRef,
@@ -5586,7 +5591,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5586
5591
  class: "table-ng__cell--custom",
5587
5592
  onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
5588
5593
  }, ["prevent"]), ["space"]))
5589
- }, [renderSlot(_ctx.$slots, "footer")], 40, _hoisted_12)], 8, _hoisted_11)])) : createCommentVNode("", true)], 42, _hoisted_1$2);
5594
+ }, [renderSlot(_ctx.$slots, "footer")], 40, _hoisted_12)], 8, _hoisted_11)])) : createCommentVNode("", true)], 42, _hoisted_1$3);
5590
5595
  };
5591
5596
  }
5592
5597
  });
@@ -7013,7 +7018,7 @@ function requireWeb_domException_stack() {
7013
7018
  return web_domException_stack;
7014
7019
  }
7015
7020
  requireWeb_domException_stack();
7016
- const _hoisted_1$1 = {
7021
+ const _hoisted_1$2 = {
7017
7022
  key: 0,
7018
7023
  class: "error-style"
7019
7024
  };
@@ -7036,7 +7041,7 @@ const _hoisted_6 = {
7036
7041
  };
7037
7042
  const _hoisted_7 = ["aria-label"];
7038
7043
  const STATUS_HAR_INTE_VALT_FIL = 0, STATUS_HAR_VALT_FIL = 1, STATUS_MISSLYCKATS = 2;
7039
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7044
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
7040
7045
  __name: "XFileDragdrop",
7041
7046
  setup(__props) {
7042
7047
  const valdFil = ref(File);
@@ -7215,7 +7220,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7215
7220
  onDragover: dragover,
7216
7221
  onDragleave: dragleave,
7217
7222
  onDrop: drop
7218
- }, [renderSlot(_ctx.$slots, "image"), _cache[6] || (_cache[6] = createTextVNode()), _cache[7] || (_cache[7] = createElementVNode("h3", null, "Ladda upp ett dokument", -1)), _cache[8] || (_cache[8] = createTextVNode("\n dra och släpp eller\n ", -1)), filValidering.value !== "" ? (openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("span", _hoisted_2, [createVNode(unref(FIcon), {
7223
+ }, [renderSlot(_ctx.$slots, "image"), _cache[6] || (_cache[6] = createTextVNode()), _cache[7] || (_cache[7] = createElementVNode("h3", null, "Ladda upp ett dokument", -1)), _cache[8] || (_cache[8] = createTextVNode("\n dra och släpp eller\n ", -1)), filValidering.value !== "" ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", _hoisted_2, [createVNode(unref(FIcon), {
7219
7224
  name: "error"
7220
7225
  })]), createTextVNode(" " + toDisplayString(filValidering.value), 1)])) : createCommentVNode("", true), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("div", null, [withDirectives((openBlock(), createBlock(unref(FFileSelector), {
7221
7226
  id: "valjFil",
@@ -7253,6 +7258,72 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7253
7258
  };
7254
7259
  }
7255
7260
  });
7261
+ function timeAgo(timestamp, reference, $t) {
7262
+ const seconds = Math.floor((reference - timestamp) / 1e3);
7263
+ if (seconds < 60) {
7264
+ return $t("fkui.time-ago.seconds", "{{ count }}s ago", {
7265
+ count: seconds
7266
+ });
7267
+ }
7268
+ const minutes = Math.floor(seconds / 60);
7269
+ if (minutes < 60) {
7270
+ return $t("fkui.time-ago.minutes", "{{ count }}m ago", {
7271
+ count: minutes
7272
+ });
7273
+ }
7274
+ const hours = Math.floor(minutes / 60);
7275
+ if (hours < 24) {
7276
+ return $t("fkui.time-ago.hours", "{{ count }}h ago", {
7277
+ count: hours
7278
+ });
7279
+ }
7280
+ const days = Math.floor(hours / 24);
7281
+ if (days < 30) {
7282
+ return $t("fkui.time-ago.days", "{{ count }}d ago", {
7283
+ count: days
7284
+ });
7285
+ }
7286
+ const months = Math.floor(days / 30);
7287
+ if (months < 12) {
7288
+ return $t("fkui.time-ago.months", "{{ count }}mo ago", {
7289
+ count: months
7290
+ });
7291
+ }
7292
+ const years = Math.floor(months / 12);
7293
+ return $t("fkui.time-ago.years", "{{ count }}y ago", {
7294
+ count: years
7295
+ });
7296
+ }
7297
+ const _hoisted_1$1 = ["datetime", "title"];
7298
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7299
+ __name: "XRelativeTime",
7300
+ props: {
7301
+ timestamp: {},
7302
+ reference: {
7303
+ default: () => Date.now()
7304
+ }
7305
+ },
7306
+ setup(__props) {
7307
+ const $t = useTranslate();
7308
+ const ago = computed(() => timeAgo(__props.timestamp, __props.reference, $t));
7309
+ const datetime = computed(() => new Date(__props.timestamp).toISOString());
7310
+ const title = computed(() => new Date(__props.timestamp).toLocaleString());
7311
+ return (_ctx, _cache) => {
7312
+ return openBlock(), createElementBlock("time", {
7313
+ datetime: datetime.value,
7314
+ title: title.value
7315
+ }, toDisplayString(ago.value), 9, _hoisted_1$1);
7316
+ };
7317
+ }
7318
+ });
7319
+ const _export_sfc = (sfc, props) => {
7320
+ const target = sfc.__vccOpts || sfc;
7321
+ for (const [key, val] of props) {
7322
+ target[key] = val;
7323
+ }
7324
+ return target;
7325
+ };
7326
+ const XRelativeTime = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-03b0dfe5"]]);
7256
7327
  function matchPropertyValue(property) {
7257
7328
  return (item, value) => {
7258
7329
  return value === null || item[property] === value;
@@ -7564,11 +7635,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7564
7635
  }
7565
7636
  });
7566
7637
  export {
7567
- _sfc_main$3 as FTable,
7638
+ _sfc_main$4 as FTable,
7568
7639
  HOURS_MINUTES_REGEXP,
7569
7640
  HOURS_MINUTES_WITHOUT_COLON_REGEXP,
7570
7641
  HoursMinutesValidatorUtils,
7571
- _sfc_main$2 as XFileDragdrop,
7642
+ _sfc_main$3 as XFileDragdrop,
7643
+ XRelativeTime,
7572
7644
  _sfc_main$1 as XSortFilterDatasetNg,
7573
7645
  _sfc_main as XTimeTextField,
7574
7646
  baseTypes,