@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.
@@ -2596,7 +2596,7 @@ function requireEs_set_union_v2() {
2596
2596
  return es_set_union_v2;
2597
2597
  }
2598
2598
  requireEs_set_union_v2();
2599
- const _hoisted_1$e = {
2599
+ const _hoisted_1$f = {
2600
2600
  key: 0,
2601
2601
  class: "table-ng__cell table-ng__cell--expand"
2602
2602
  };
@@ -2607,7 +2607,7 @@ const _hoisted_3$4 = {
2607
2607
  tabindex: "-1",
2608
2608
  class: "table-ng__cell table-ng__cell--expand"
2609
2609
  };
2610
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2610
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
2611
2611
  __name: "ITableExpandButton",
2612
2612
  props: {
2613
2613
  isExpandable: {
@@ -2637,7 +2637,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2637
2637
  };
2638
2638
  __expose(expose);
2639
2639
  return (_ctx, _cache) => {
2640
- return __props.isExpandable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$e, [vue.createElementVNode("button", {
2640
+ return __props.isExpandable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$f, [vue.createElementVNode("button", {
2641
2641
  ref: "expandable",
2642
2642
  tabindex: "-1",
2643
2643
  "aria-label": expandLabel.value,
@@ -2651,8 +2651,8 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2651
2651
  };
2652
2652
  }
2653
2653
  });
2654
- const _hoisted_1$d = ["colspan"];
2655
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2654
+ const _hoisted_1$e = ["colspan"];
2655
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2656
2656
  __name: "ITableExpandable",
2657
2657
  props: {
2658
2658
  colspan: {}
@@ -2663,7 +2663,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2663
2663
  class: "table-ng__cell--custom",
2664
2664
  colspan: __props.colspan,
2665
2665
  tabindex: "-1"
2666
- }, [vue.renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$d);
2666
+ }, [vue.renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$e);
2667
2667
  };
2668
2668
  }
2669
2669
  });
@@ -2993,8 +2993,8 @@ const inputFieldConfig = {
2993
2993
  }
2994
2994
  }
2995
2995
  };
2996
- const _hoisted_1$c = ["aria-sort", "onKeydown"];
2997
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
2996
+ const _hoisted_1$d = ["aria-sort", "onKeydown"];
2997
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2998
2998
  __name: "ITableHeader",
2999
2999
  props: {
3000
3000
  column: {},
@@ -3100,16 +3100,16 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3100
3100
  _: 1
3101
3101
  })]),
3102
3102
  _: 1
3103
- }, 8, ["float"])) : vue.createCommentVNode("", true)], 42, _hoisted_1$c);
3103
+ }, 8, ["float"])) : vue.createCommentVNode("", true)], 42, _hoisted_1$d);
3104
3104
  };
3105
3105
  }
3106
3106
  });
3107
- const _hoisted_1$b = {
3107
+ const _hoisted_1$c = {
3108
3108
  scope: "col",
3109
3109
  class: "table-ng__column table-ng__column--selectable"
3110
3110
  };
3111
3111
  const _hoisted_2$8 = ["checked", "indeterminate", "aria-label"];
3112
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3112
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3113
3113
  __name: "ITableHeaderSelectable",
3114
3114
  props: {
3115
3115
  selectable: {},
@@ -3136,7 +3136,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3136
3136
  }
3137
3137
  __expose(expose);
3138
3138
  return (_ctx, _cache) => {
3139
- return vue.openBlock(), vue.createElementBlock("th", _hoisted_1$b, [__props.selectable === "multi" ? (vue.openBlock(), vue.createElementBlock("input", {
3139
+ return vue.openBlock(), vue.createElementBlock("th", _hoisted_1$c, [__props.selectable === "multi" ? (vue.openBlock(), vue.createElementBlock("input", {
3140
3140
  key: 0,
3141
3141
  ref: "input",
3142
3142
  checked: checked.value,
@@ -3149,11 +3149,11 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3149
3149
  };
3150
3150
  }
3151
3151
  });
3152
- const _hoisted_1$a = {
3152
+ const _hoisted_1$b = {
3153
3153
  class: "table-ng__cell table-ng__cell--checkbox"
3154
3154
  };
3155
3155
  const _hoisted_2$7 = ["checked", "aria-label"];
3156
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3156
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3157
3157
  __name: "ITableCheckbox",
3158
3158
  props: {
3159
3159
  column: {},
@@ -3176,7 +3176,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3176
3176
  };
3177
3177
  __expose(expose);
3178
3178
  return (_ctx, _cache) => {
3179
- return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$a, [vue.createElementVNode("input", {
3179
+ return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$b, [vue.createElementVNode("input", {
3180
3180
  ref: "target",
3181
3181
  checked: Boolean(__props.column.checked(__props.row)),
3182
3182
  type: "checkbox",
@@ -3187,11 +3187,11 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3187
3187
  };
3188
3188
  }
3189
3189
  });
3190
- const _hoisted_1$9 = {
3190
+ const _hoisted_1$a = {
3191
3191
  class: "table-ng__cell table-ng__cell--radio"
3192
3192
  };
3193
3193
  const _hoisted_2$6 = ["checked", "aria-label"];
3194
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3194
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3195
3195
  __name: "ITableRadio",
3196
3196
  props: {
3197
3197
  column: {},
@@ -3214,7 +3214,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3214
3214
  };
3215
3215
  __expose(expose);
3216
3216
  return (_ctx, _cache) => {
3217
- return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$9, [vue.createElementVNode("input", {
3217
+ return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$a, [vue.createElementVNode("input", {
3218
3218
  ref: "input",
3219
3219
  type: "radio",
3220
3220
  checked: Boolean(__props.column.checked(__props.row)),
@@ -3225,12 +3225,12 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3225
3225
  };
3226
3226
  }
3227
3227
  });
3228
- const _hoisted_1$8 = {
3228
+ const _hoisted_1$9 = {
3229
3229
  key: 0,
3230
3230
  tabindex: "-1",
3231
3231
  class: "table-ng__cell"
3232
3232
  };
3233
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3233
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
3234
3234
  __name: "ITableSelectable",
3235
3235
  props: {
3236
3236
  selectable: {},
@@ -3265,7 +3265,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3265
3265
  description: vue.ref(null),
3266
3266
  sortable: null,
3267
3267
  size: vue.ref(null),
3268
- component: _sfc_main$c,
3268
+ component: _sfc_main$d,
3269
3269
  label() {
3270
3270
  return $t("fkui.table.selectable.checkbox", "Välj rad");
3271
3271
  },
@@ -3284,7 +3284,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3284
3284
  description: vue.ref(null),
3285
3285
  sortable: null,
3286
3286
  size: vue.ref(null),
3287
- component: _sfc_main$b,
3287
+ component: _sfc_main$c,
3288
3288
  label() {
3289
3289
  return $t("fkui.table.selectable.radio", "Välj rad");
3290
3290
  },
@@ -3297,13 +3297,13 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3297
3297
  enabled: true
3298
3298
  };
3299
3299
  return (_ctx, _cache) => {
3300
- return __props.level > 1 ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$8)) : __props.selectable === "multi" ? (vue.openBlock(), vue.createBlock(_sfc_main$c, {
3300
+ return __props.level > 1 ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$9)) : __props.selectable === "multi" ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
3301
3301
  key: 1,
3302
3302
  ref: "child",
3303
3303
  row: __props.row,
3304
3304
  column: multiSelectColumn,
3305
3305
  class: "table-ng__cell--selectable"
3306
- }, null, 8, ["row"])) : __props.selectable === "single" ? (vue.openBlock(), vue.createBlock(_sfc_main$b, {
3306
+ }, null, 8, ["row"])) : __props.selectable === "single" ? (vue.openBlock(), vue.createBlock(_sfc_main$c, {
3307
3307
  key: 2,
3308
3308
  ref: "child",
3309
3309
  row: __props.row,
@@ -3757,14 +3757,14 @@ function requireEs_iterator_map() {
3757
3757
  return es_iterator_map;
3758
3758
  }
3759
3759
  requireEs_iterator_map();
3760
- const _hoisted_1$7 = ["href"];
3760
+ const _hoisted_1$8 = ["href"];
3761
3761
  const _hoisted_2$5 = {
3762
3762
  key: 1,
3763
3763
  ref: "target",
3764
3764
  tabindex: "-1",
3765
3765
  class: "table-ng__cell"
3766
3766
  };
3767
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3767
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
3768
3768
  __name: "ITableAnchor",
3769
3769
  props: {
3770
3770
  column: {},
@@ -3790,17 +3790,17 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3790
3790
  target: "_blank",
3791
3791
  href: __props.column.href,
3792
3792
  tabindex: "-1"
3793
- }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_1$7)], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_2$5, null, 512));
3793
+ }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_1$8)], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_2$5, null, 512));
3794
3794
  };
3795
3795
  }
3796
3796
  });
3797
- const _hoisted_1$6 = {
3797
+ const _hoisted_1$7 = {
3798
3798
  class: "table-ng__cell table-ng__cell--button"
3799
3799
  };
3800
3800
  const _hoisted_2$4 = {
3801
3801
  class: "sr-only"
3802
3802
  };
3803
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3803
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3804
3804
  __name: "ITableButton",
3805
3805
  props: {
3806
3806
  column: {},
@@ -3822,7 +3822,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3822
3822
  };
3823
3823
  __expose(expose);
3824
3824
  return (_ctx, _cache) => {
3825
- return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$6, [vue.createElementVNode("button", {
3825
+ return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$7, [vue.createElementVNode("button", {
3826
3826
  ref: "button",
3827
3827
  class: "icon-button",
3828
3828
  type: "button",
@@ -3877,10 +3877,10 @@ function requireEs_iterator_find() {
3877
3877
  return es_iterator_find;
3878
3878
  }
3879
3879
  requireEs_iterator_find();
3880
- const _hoisted_1$5 = {
3880
+ const _hoisted_1$6 = {
3881
3881
  class: "sr-only"
3882
3882
  };
3883
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3883
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3884
3884
  __name: "ITableMenu",
3885
3885
  props: {
3886
3886
  column: {},
@@ -3947,7 +3947,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3947
3947
  onClick: onOpen
3948
3948
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
3949
3949
  name: "bars"
3950
- }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FContextMenu), {
3950
+ }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$6, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FContextMenu), {
3951
3951
  "is-open": isOpen.value,
3952
3952
  items: menuitems.value,
3953
3953
  anchor: (_buttonRef$value = buttonRef.value) !== null && _buttonRef$value !== void 0 ? _buttonRef$value : void 0,
@@ -3958,7 +3958,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3958
3958
  };
3959
3959
  }
3960
3960
  });
3961
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
3961
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3962
3962
  __name: "ITableRowheader",
3963
3963
  props: {
3964
3964
  row: {},
@@ -3974,7 +3974,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
3974
3974
  };
3975
3975
  }
3976
3976
  });
3977
- const _hoisted_1$4 = {
3977
+ const _hoisted_1$5 = {
3978
3978
  class: "table-ng__editable"
3979
3979
  };
3980
3980
  const _hoisted_2$3 = {
@@ -3984,12 +3984,12 @@ const _hoisted_3$3 = ["aria-expanded", "aria-controls", "aria-activedescendant",
3984
3984
  const _hoisted_4$3 = {
3985
3985
  class: "table-ng__editable__text"
3986
3986
  };
3987
- const _hoisted_5$2 = {
3987
+ const _hoisted_5$3 = {
3988
3988
  key: 1,
3989
3989
  tabindex: "-1",
3990
3990
  class: "table-ng__cell table-ng__cell--static"
3991
3991
  };
3992
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3992
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
3993
3993
  __name: "ITableSelect",
3994
3994
  props: {
3995
3995
  row: {},
@@ -4137,7 +4137,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4137
4137
  tabindex: "-1",
4138
4138
  onKeydown: onCellKeyDown,
4139
4139
  onClick: vue.withModifiers(onCellClick, ["stop"])
4140
- }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$4, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1)], 512), [[vue.vShow, !editing.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
4140
+ }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$5, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1)], 512), [[vue.vShow, !editing.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
4141
4141
  ref: "edit",
4142
4142
  role: "combobox",
4143
4143
  tabindex: "-1",
@@ -4162,7 +4162,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4162
4162
  "input-node": editRef.value,
4163
4163
  onSelect: selectDropdownOption,
4164
4164
  onClose: onDropdownClose
4165
- }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$2, vue.toDisplayString(__props.column.selected(__props.row)), 1));
4165
+ }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$3, vue.toDisplayString(__props.column.selected(__props.row)), 1));
4166
4166
  };
4167
4167
  }
4168
4168
  });
@@ -4211,7 +4211,7 @@ function addInputValidators(inputElement, type) {
4211
4211
  function isAlphanumeric(e) {
4212
4212
  return e.key.length === 1 && !e.ctrlKey && !e.metaKey;
4213
4213
  }
4214
- const _hoisted_1$3 = ["id", "aria-invalid"];
4214
+ const _hoisted_1$4 = ["id", "aria-invalid"];
4215
4215
  const _hoisted_2$2 = {
4216
4216
  class: "table-ng__editable__text"
4217
4217
  };
@@ -4220,7 +4220,11 @@ const _hoisted_3$2 = {
4220
4220
  class: "sr-only"
4221
4221
  };
4222
4222
  const _hoisted_4$2 = ["id", "aria-label", "aria-hidden"];
4223
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4223
+ const _hoisted_5$2 = {
4224
+ ref: "arrowAnchor",
4225
+ "aria-hidden": "true"
4226
+ };
4227
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4224
4228
  __name: "ITableText",
4225
4229
  props: {
4226
4230
  row: {},
@@ -4312,6 +4316,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4312
4316
  });
4313
4317
  const tdElement = vue.useTemplateRef("td");
4314
4318
  const inputElement = vue.useTemplateRef("input");
4319
+ const arrowAnchorElement = vue.useTemplateRef("arrowAnchor");
4315
4320
  const {
4316
4321
  stopEdit: stopEdit2
4317
4322
  } = useStartStopEdit();
@@ -4389,20 +4394,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4389
4394
  });
4390
4395
  vue.watchEffect(() => {
4391
4396
  if (hasError.value) {
4392
- var _tdElement$value, _inputElement$value;
4397
+ var _tdElement$value, _arrowAnchorElement$v;
4393
4398
  emit("onError", {
4394
4399
  anchor: (_tdElement$value = tdElement.value) !== null && _tdElement$value !== void 0 ? _tdElement$value : void 0,
4395
- arrowAnchor: (_inputElement$value = inputElement.value) !== null && _inputElement$value !== void 0 ? _inputElement$value : void 0,
4400
+ arrowAnchor: (_arrowAnchorElement$v = arrowAnchorElement.value) !== null && _arrowAnchorElement$v !== void 0 ? _arrowAnchorElement$v : void 0,
4396
4401
  message: validity.value.validationMessage,
4397
4402
  hasFocus: focused.value,
4398
4403
  hasHover: isHovered.value,
4399
4404
  inEdit: inEdit.value
4400
4405
  });
4401
4406
  } else {
4402
- var _tdElement$value2, _inputElement$value2;
4407
+ var _tdElement$value2, _arrowAnchorElement$v2;
4403
4408
  emit("closeError", {
4404
4409
  anchor: (_tdElement$value2 = tdElement.value) !== null && _tdElement$value2 !== void 0 ? _tdElement$value2 : void 0,
4405
- arrowAnchor: (_inputElement$value2 = inputElement.value) !== null && _inputElement$value2 !== void 0 ? _inputElement$value2 : void 0,
4410
+ arrowAnchor: (_arrowAnchorElement$v2 = arrowAnchorElement.value) !== null && _arrowAnchorElement$v2 !== void 0 ? _arrowAnchorElement$v2 : void 0,
4406
4411
  message: validity.value.validationMessage,
4407
4412
  hasFocus: focused.value,
4408
4413
  hasHover: isHovered.value,
@@ -4595,13 +4600,13 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4595
4600
  "aria-hidden": !inEdit.value,
4596
4601
  onValidity,
4597
4602
  onPendingValidity
4598
- }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]])], 2), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
4603
+ }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]]), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_5$2, null, 512)], 2), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
4599
4604
  anchor: tdElement.value,
4600
4605
  "is-open": openPopupError.value,
4601
4606
  "error-message": validity.value.validationMessage,
4602
- "arrow-anchor": inputElement.value,
4607
+ "arrow-anchor": arrowAnchorElement.value,
4603
4608
  layout: "f-table"
4604
- }, null, 8, ["anchor", "is-open", "error-message", "arrow-anchor"])], 42, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock("td", {
4609
+ }, null, 8, ["anchor", "is-open", "error-message", "arrow-anchor"])], 42, _hoisted_1$4)) : (vue.openBlock(), vue.createElementBlock("td", {
4605
4610
  key: 1,
4606
4611
  ref: "td",
4607
4612
  tabindex: "-1",
@@ -4780,7 +4785,7 @@ function normalizeTableColumn(column) {
4780
4785
  return Object.freeze({
4781
4786
  ...normalizeCheckboxColumn(column),
4782
4787
  ...base,
4783
- component: _sfc_main$c
4788
+ component: _sfc_main$d
4784
4789
  });
4785
4790
  case "text:currency":
4786
4791
  case "text:number":
@@ -4788,7 +4793,7 @@ function normalizeTableColumn(column) {
4788
4793
  return Object.freeze({
4789
4794
  ...normalizeNumberColumn(column),
4790
4795
  ...base,
4791
- component: _sfc_main$4
4796
+ component: _sfc_main$5
4792
4797
  });
4793
4798
  case "text":
4794
4799
  case "text:bankAccountNumber":
@@ -4804,43 +4809,43 @@ function normalizeTableColumn(column) {
4804
4809
  return Object.freeze({
4805
4810
  ...normalizeTextColumn(column),
4806
4811
  ...base,
4807
- component: _sfc_main$4
4812
+ component: _sfc_main$5
4808
4813
  });
4809
4814
  case "rowheader":
4810
4815
  return Object.freeze({
4811
4816
  ...normalizeRowHeaderColumn(column),
4812
4817
  ...base,
4813
- component: _sfc_main$6
4818
+ component: _sfc_main$7
4814
4819
  });
4815
4820
  case "anchor":
4816
4821
  return Object.freeze({
4817
4822
  ...normalizeAnchorColumn(column),
4818
4823
  ...base,
4819
- component: _sfc_main$9
4824
+ component: _sfc_main$a
4820
4825
  });
4821
4826
  case "button":
4822
4827
  return Object.freeze({
4823
4828
  ...normalizeButtonColumn(column),
4824
4829
  ...base,
4825
- component: _sfc_main$8
4830
+ component: _sfc_main$9
4826
4831
  });
4827
4832
  case "select":
4828
4833
  return Object.freeze({
4829
4834
  ...normalizeSelectColumn(column),
4830
4835
  ...base,
4831
- component: _sfc_main$5
4836
+ component: _sfc_main$6
4832
4837
  });
4833
4838
  case "menu":
4834
4839
  return Object.freeze({
4835
4840
  ...normalizeMenuColumn(column),
4836
4841
  ...base,
4837
- component: _sfc_main$7
4842
+ component: _sfc_main$8
4838
4843
  });
4839
4844
  case void 0:
4840
4845
  return Object.freeze({
4841
4846
  ...normalizeSimpleColumn(column),
4842
4847
  ...base,
4843
- component: _sfc_main$4
4848
+ component: _sfc_main$5
4844
4849
  });
4845
4850
  }
4846
4851
  }
@@ -5213,7 +5218,7 @@ function useTabstop(tableRef, metaRows) {
5213
5218
  withTabstopBehaviour
5214
5219
  };
5215
5220
  }
5216
- const _hoisted_1$2 = ["role", "aria-rowcount"];
5221
+ const _hoisted_1$3 = ["role", "aria-rowcount"];
5217
5222
  const _hoisted_2$1 = {
5218
5223
  key: 0,
5219
5224
  "data-test": "caption"
@@ -5245,7 +5250,7 @@ const _hoisted_10 = {
5245
5250
  };
5246
5251
  const _hoisted_11 = ["aria-rowindex"];
5247
5252
  const _hoisted_12 = ["colspan"];
5248
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5253
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
5249
5254
  __name: "FTable",
5250
5255
  props: /* @__PURE__ */ vue.mergeModels({
5251
5256
  columns: {},
@@ -5253,9 +5258,6 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5253
5258
  keyAttribute: {
5254
5259
  default: () => void 0
5255
5260
  },
5256
- expandableAttribute: {
5257
- default: () => void 0
5258
- },
5259
5261
  rowClass: {
5260
5262
  type: Function,
5261
5263
  default: void 0
@@ -5286,9 +5288,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5286
5288
  } = vue$1.useSlotUtils();
5287
5289
  const tableRef = vue.useTemplateRef("table");
5288
5290
  const expandedKeys = vue.ref(/* @__PURE__ */ new Set());
5289
- const keyedRows = vue.computed(() => vue$1.setItemIdentifiers(__props.rows, __props.keyAttribute, __props.expandableAttribute));
5290
- const metaRows = vue.computed(() => getMetaRows(keyedRows.value, expandedKeys.value, __props.expandableAttribute));
5291
- const isTreegrid = vue.computed(() => Boolean(__props.expandableAttribute));
5291
+ const expandableAttribute = vue.computed(() => {
5292
+ return vue$1.getDatasetMetadata(__props.rows).nestedAttribute;
5293
+ });
5294
+ const keyedRows = vue.computed(() => vue$1.setItemIdentifiers(__props.rows, __props.keyAttribute, expandableAttribute.value));
5295
+ const metaRows = vue.computed(() => getMetaRows(keyedRows.value, expandedKeys.value, expandableAttribute.value));
5296
+ const isTreegrid = vue.computed(() => Boolean(expandableAttribute.value));
5292
5297
  const role = vue.computed(() => isTreegrid.value ? "treegrid" : "grid");
5293
5298
  const hasCaption = vue.computed(() => {
5294
5299
  return hasSlot("caption", {}, {
@@ -5304,7 +5309,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5304
5309
  return footerRow;
5305
5310
  }
5306
5311
  const headerRow = 1;
5307
- const bodyRows = getBodyRowCount(keyedRows.value, __props.expandableAttribute);
5312
+ const bodyRows = getBodyRowCount(keyedRows.value, expandableAttribute.value);
5308
5313
  return bodyRows + headerRow + footerRow;
5309
5314
  });
5310
5315
  const fullColspan = vue.computed(() => {
@@ -5494,14 +5499,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5494
5499
  onFocusout: onTableFocusout,
5495
5500
  onClick,
5496
5501
  onKeydown
5497
- }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), hasColumns.value ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_3$1, [vue.createElementVNode("tr", _hoisted_4$1, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$1)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$d, {
5502
+ }, [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$1, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), hasColumns.value ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_3$1, [vue.createElementVNode("tr", _hoisted_4$1, [isTreegrid.value ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$1)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$e, {
5498
5503
  key: 1,
5499
5504
  ref: bindCellApiRef,
5500
5505
  state: vue.unref(selectableHeaderState)(),
5501
5506
  selectable: __props.selectable,
5502
5507
  onToggle: vue.unref(toggleSelectableHeader)
5503
5508
  }, null, 8, ["state", "selectable", "onToggle"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
5504
- return vue.openBlock(), vue.createBlock(_sfc_main$e, {
5509
+ return vue.openBlock(), vue.createBlock(_sfc_main$f, {
5505
5510
  key: column.id,
5506
5511
  column,
5507
5512
  "sort-enabled": isSortEnabled(column),
@@ -5534,7 +5539,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5534
5539
  "aria-setsize": setsize,
5535
5540
  "aria-posinset": posinset,
5536
5541
  "aria-selected": isAriaSelected(level, row)
5537
- }, [isTreegrid.value ? (vue.openBlock(), vue.createBlock(_sfc_main$g, {
5542
+ }, [isTreegrid.value ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
5538
5543
  key: 0,
5539
5544
  ref_for: true,
5540
5545
  ref: bindCellApiRef,
@@ -5542,7 +5547,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5542
5547
  "is-expanded": isExpanded,
5543
5548
  "row-key": key,
5544
5549
  onToggle: onToggleExpanded
5545
- }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
5550
+ }, null, 8, ["is-expandable", "is-expanded", "row-key"])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), level > 1 && hasExpandableSlot.value ? (vue.openBlock(), vue.createBlock(_sfc_main$g, {
5546
5551
  key: 1,
5547
5552
  colspan: expandedColspan.value
5548
5553
  }, {
@@ -5554,7 +5559,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5554
5559
  _: 2
5555
5560
  }, 1032, ["colspan"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5556
5561
  key: 2
5557
- }, [__props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$a, {
5562
+ }, [__props.selectable ? (vue.openBlock(), vue.createBlock(_sfc_main$b, {
5558
5563
  key: 0,
5559
5564
  ref_for: true,
5560
5565
  ref: bindCellApiRef,
@@ -5588,7 +5593,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5588
5593
  class: "table-ng__cell--custom",
5589
5594
  onKeydown: _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(() => {
5590
5595
  }, ["prevent"]), ["space"]))
5591
- }, [vue.renderSlot(_ctx.$slots, "footer")], 40, _hoisted_12)], 8, _hoisted_11)])) : vue.createCommentVNode("", true)], 42, _hoisted_1$2);
5596
+ }, [vue.renderSlot(_ctx.$slots, "footer")], 40, _hoisted_12)], 8, _hoisted_11)])) : vue.createCommentVNode("", true)], 42, _hoisted_1$3);
5592
5597
  };
5593
5598
  }
5594
5599
  });
@@ -7015,7 +7020,7 @@ function requireWeb_domException_stack() {
7015
7020
  return web_domException_stack;
7016
7021
  }
7017
7022
  requireWeb_domException_stack();
7018
- const _hoisted_1$1 = {
7023
+ const _hoisted_1$2 = {
7019
7024
  key: 0,
7020
7025
  class: "error-style"
7021
7026
  };
@@ -7038,7 +7043,7 @@ const _hoisted_6 = {
7038
7043
  };
7039
7044
  const _hoisted_7 = ["aria-label"];
7040
7045
  const STATUS_HAR_INTE_VALT_FIL = 0, STATUS_HAR_VALT_FIL = 1, STATUS_MISSLYCKATS = 2;
7041
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7046
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
7042
7047
  __name: "XFileDragdrop",
7043
7048
  setup(__props) {
7044
7049
  const valdFil = vue.ref(File);
@@ -7217,7 +7222,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7217
7222
  onDragover: dragover,
7218
7223
  onDragleave: dragleave,
7219
7224
  onDrop: drop
7220
- }, [vue.renderSlot(_ctx.$slots, "image"), _cache[6] || (_cache[6] = vue.createTextVNode()), _cache[7] || (_cache[7] = vue.createElementVNode("h3", null, "Ladda upp ett dokument", -1)), _cache[8] || (_cache[8] = vue.createTextVNode("\n dra och släpp eller\n ", -1)), filValidering.value !== "" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [vue.createElementVNode("span", _hoisted_2, [vue.createVNode(vue.unref(vue$1.FIcon), {
7225
+ }, [vue.renderSlot(_ctx.$slots, "image"), _cache[6] || (_cache[6] = vue.createTextVNode()), _cache[7] || (_cache[7] = vue.createElementVNode("h3", null, "Ladda upp ett dokument", -1)), _cache[8] || (_cache[8] = vue.createTextVNode("\n dra och släpp eller\n ", -1)), filValidering.value !== "" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [vue.createElementVNode("span", _hoisted_2, [vue.createVNode(vue.unref(vue$1.FIcon), {
7221
7226
  name: "error"
7222
7227
  })]), vue.createTextVNode(" " + vue.toDisplayString(filValidering.value), 1)])) : vue.createCommentVNode("", true), _cache[9] || (_cache[9] = vue.createTextVNode()), vue.createElementVNode("div", null, [vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(vue$1.FFileSelector), {
7223
7228
  id: "valjFil",
@@ -7255,6 +7260,72 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7255
7260
  };
7256
7261
  }
7257
7262
  });
7263
+ function timeAgo(timestamp, reference, $t) {
7264
+ const seconds = Math.floor((reference - timestamp) / 1e3);
7265
+ if (seconds < 60) {
7266
+ return $t("fkui.time-ago.seconds", "{{ count }}s ago", {
7267
+ count: seconds
7268
+ });
7269
+ }
7270
+ const minutes = Math.floor(seconds / 60);
7271
+ if (minutes < 60) {
7272
+ return $t("fkui.time-ago.minutes", "{{ count }}m ago", {
7273
+ count: minutes
7274
+ });
7275
+ }
7276
+ const hours = Math.floor(minutes / 60);
7277
+ if (hours < 24) {
7278
+ return $t("fkui.time-ago.hours", "{{ count }}h ago", {
7279
+ count: hours
7280
+ });
7281
+ }
7282
+ const days = Math.floor(hours / 24);
7283
+ if (days < 30) {
7284
+ return $t("fkui.time-ago.days", "{{ count }}d ago", {
7285
+ count: days
7286
+ });
7287
+ }
7288
+ const months = Math.floor(days / 30);
7289
+ if (months < 12) {
7290
+ return $t("fkui.time-ago.months", "{{ count }}mo ago", {
7291
+ count: months
7292
+ });
7293
+ }
7294
+ const years = Math.floor(months / 12);
7295
+ return $t("fkui.time-ago.years", "{{ count }}y ago", {
7296
+ count: years
7297
+ });
7298
+ }
7299
+ const _hoisted_1$1 = ["datetime", "title"];
7300
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
7301
+ __name: "XRelativeTime",
7302
+ props: {
7303
+ timestamp: {},
7304
+ reference: {
7305
+ default: () => Date.now()
7306
+ }
7307
+ },
7308
+ setup(__props) {
7309
+ const $t = vue$1.useTranslate();
7310
+ const ago = vue.computed(() => timeAgo(__props.timestamp, __props.reference, $t));
7311
+ const datetime = vue.computed(() => new Date(__props.timestamp).toISOString());
7312
+ const title = vue.computed(() => new Date(__props.timestamp).toLocaleString());
7313
+ return (_ctx, _cache) => {
7314
+ return vue.openBlock(), vue.createElementBlock("time", {
7315
+ datetime: datetime.value,
7316
+ title: title.value
7317
+ }, vue.toDisplayString(ago.value), 9, _hoisted_1$1);
7318
+ };
7319
+ }
7320
+ });
7321
+ const _export_sfc = (sfc, props) => {
7322
+ const target = sfc.__vccOpts || sfc;
7323
+ for (const [key, val] of props) {
7324
+ target[key] = val;
7325
+ }
7326
+ return target;
7327
+ };
7328
+ const XRelativeTime = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-03b0dfe5"]]);
7258
7329
  function matchPropertyValue(property) {
7259
7330
  return (item, value) => {
7260
7331
  return value === null || item[property] === value;
@@ -7565,11 +7636,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7565
7636
  logic.ValidationService.validateElement(inputElement);
7566
7637
  }
7567
7638
  });
7568
- exports.FTable = _sfc_main$3;
7639
+ exports.FTable = _sfc_main$4;
7569
7640
  exports.HOURS_MINUTES_REGEXP = HOURS_MINUTES_REGEXP;
7570
7641
  exports.HOURS_MINUTES_WITHOUT_COLON_REGEXP = HOURS_MINUTES_WITHOUT_COLON_REGEXP;
7571
7642
  exports.HoursMinutesValidatorUtils = HoursMinutesValidatorUtils;
7572
- exports.XFileDragdrop = _sfc_main$2;
7643
+ exports.XFileDragdrop = _sfc_main$3;
7644
+ exports.XRelativeTime = XRelativeTime;
7573
7645
  exports.XSortFilterDatasetNg = _sfc_main$1;
7574
7646
  exports.XTimeTextField = _sfc_main;
7575
7647
  exports.baseTypes = baseTypes;