@fkui/vue 6.0.1 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, renderSlot, mergeProps, createTextVNode, createElementVNode, createApp, resolveComponent, createCommentVNode, withKeys, createVNode, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, isVNode, Comment, getCurrentInstance, resolveDynamicComponent, onMounted, toValue, onUnmounted, useSlots, ref, normalizeProps, guardReactiveProps, unref, Transition, Teleport, normalizeStyle, useTemplateRef, watchEffect, watch, nextTick, withDirectives, vShow, readonly, inject, toRef, provide, createSlots, vModelSelect, vModelDynamic, toHandlers, shallowRef, toRefs } from "vue";
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, renderSlot, mergeProps, createTextVNode, createElementVNode, createApp, resolveComponent, createCommentVNode, withKeys, createVNode, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, isVNode, Comment, getCurrentInstance, resolveDynamicComponent, onMounted, toValue, onUnmounted, useSlots, ref, normalizeProps, guardReactiveProps, unref, Transition, Teleport, normalizeStyle, useTemplateRef, watchEffect, watch, nextTick, withDirectives, vShow, readonly, inject, toRef, provide, createSlots, vModelSelect, vModelDynamic, toHandlers, shallowRef, onUpdated, toRefs } from "vue";
2
2
  import { TranslationService, isSet, configLogic, focus as focus$1, ElementIdService, findTabbableElements, popFocus, pushFocus, scrollTo, documentOrderComparator, ValidationService, isValidatableHTMLElement, alertScreenReader, debounce, handleTab, isEmpty, deepClone, parseNumber, formatNumber, parseBankAccountNumber, parseBankgiro, parseClearingNumber, parsePersonnummer, formatPersonnummer, parsePlusgiro, formatPostalCode, parsePercent, formatPercent, parseOrganisationsnummer, isInvalidDatesConfig, isInvalidWeekdaysConfig, parseDate, waitForScreenReader, focusFirst, removeFocusListener, restoreFocus, saveFocus, addFocusListener, DomUtils } from "@fkui/logic";
3
3
  import { groupByWeek, getWeekdayNamings, FDate, DateFormat } from "@fkui/date";
4
4
  const statuses = ["default", "warning", "error", "success", "info"];
5
- const _sfc_main$1b = /* @__PURE__ */ defineComponent({
5
+ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
6
6
  __name: "FBadge",
7
7
  props: {
8
8
  /**
@@ -764,8 +764,8 @@ function requireWeakMapBasicDetection() {
764
764
  hasRequiredWeakMapBasicDetection = 1;
765
765
  var globalThis2 = requireGlobalThis();
766
766
  var isCallable2 = requireIsCallable();
767
- var WeakMap = globalThis2.WeakMap;
768
- weakMapBasicDetection = isCallable2(WeakMap) && /native code/.test(String(WeakMap));
767
+ var WeakMap2 = globalThis2.WeakMap;
768
+ weakMapBasicDetection = isCallable2(WeakMap2) && /native code/.test(String(WeakMap2));
769
769
  return weakMapBasicDetection;
770
770
  }
771
771
  var sharedKey;
@@ -804,7 +804,7 @@ function requireInternalState() {
804
804
  var hiddenKeys2 = requireHiddenKeys();
805
805
  var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
806
806
  var TypeError2 = globalThis2.TypeError;
807
- var WeakMap = globalThis2.WeakMap;
807
+ var WeakMap2 = globalThis2.WeakMap;
808
808
  var set, get, has;
809
809
  var enforce = function(it) {
810
810
  return has(it) ? get(it) : set(it, {});
@@ -819,7 +819,7 @@ function requireInternalState() {
819
819
  };
820
820
  };
821
821
  if (NATIVE_WEAK_MAP || shared2.state) {
822
- var store = shared2.state || (shared2.state = new WeakMap());
822
+ var store = shared2.state || (shared2.state = new WeakMap2());
823
823
  store.get = store.get;
824
824
  store.has = store.has;
825
825
  store.set = store.set;
@@ -1881,7 +1881,7 @@ function requireEs_array_push() {
1881
1881
  requireEs_array_push();
1882
1882
  const Flip = ["horizontal", "vertical"];
1883
1883
  const Rotate = ["90", "180", "270"];
1884
- const _sfc_main$1a = defineComponent({
1884
+ const _sfc_main$1b = defineComponent({
1885
1885
  name: "FIcon",
1886
1886
  inheritAttrs: false,
1887
1887
  props: {
@@ -1969,18 +1969,18 @@ const _export_sfc = (sfc, props) => {
1969
1969
  }
1970
1970
  return target;
1971
1971
  };
1972
- const _hoisted_1$U = ["aria-hidden"];
1972
+ const _hoisted_1$V = ["aria-hidden"];
1973
1973
  const _hoisted_2$F = ["xlink:href"];
1974
- function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
1974
+ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
1975
1975
  return openBlock(), createElementBlock("svg", mergeProps(_ctx.$attrs, {
1976
1976
  focusable: "false",
1977
1977
  class: ["icon", [_ctx.spriteKey, ..._ctx.modifiers]],
1978
1978
  "aria-hidden": _ctx.ariaHidden
1979
1979
  }), [renderSlot(_ctx.$slots, "default"), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("use", {
1980
1980
  "xlink:href": _ctx.spriteId
1981
- }, null, 8, _hoisted_2$F)], 16, _hoisted_1$U);
1981
+ }, null, 8, _hoisted_2$F)], 16, _hoisted_1$V);
1982
1982
  }
1983
- const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$W]]);
1983
+ const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$R]]);
1984
1984
  const DATA_TEST_ATTRIBUTE_NAME = "data-test";
1985
1985
  function throwErrorIfEmpty(value) {
1986
1986
  if (!value) {
@@ -3871,8 +3871,8 @@ function require_WeakMap() {
3871
3871
  if (hasRequired_WeakMap) return _WeakMap;
3872
3872
  hasRequired_WeakMap = 1;
3873
3873
  var getNative = require_getNative(), root = require_root();
3874
- var WeakMap = getNative(root, "WeakMap");
3875
- _WeakMap = WeakMap;
3874
+ var WeakMap2 = getNative(root, "WeakMap");
3875
+ _WeakMap = WeakMap2;
3876
3876
  return _WeakMap;
3877
3877
  }
3878
3878
  var _getTag;
@@ -3880,12 +3880,12 @@ var hasRequired_getTag;
3880
3880
  function require_getTag() {
3881
3881
  if (hasRequired_getTag) return _getTag;
3882
3882
  hasRequired_getTag = 1;
3883
- var DataView2 = require_DataView(), Map2 = require_Map(), Promise2 = require_Promise(), Set = require_Set(), WeakMap = require_WeakMap(), baseGetTag = require_baseGetTag(), toSource = require_toSource();
3883
+ var DataView2 = require_DataView(), Map2 = require_Map(), Promise2 = require_Promise(), Set = require_Set(), WeakMap2 = require_WeakMap(), baseGetTag = require_baseGetTag(), toSource = require_toSource();
3884
3884
  var mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]";
3885
3885
  var dataViewTag = "[object DataView]";
3886
- var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
3886
+ var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
3887
3887
  var getTag = baseGetTag;
3888
- if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3888
+ if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
3889
3889
  getTag = function(value) {
3890
3890
  var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
3891
3891
  if (ctorString) {
@@ -4418,7 +4418,7 @@ function elementIsRadioButton(element) {
4418
4418
  function isHTMLInputElement(element) {
4419
4419
  return element instanceof HTMLInputElement;
4420
4420
  }
4421
- const _sfc_main$19 = defineComponent({
4421
+ const _sfc_main$1a = defineComponent({
4422
4422
  name: "FModal",
4423
4423
  components: {
4424
4424
  FIcon
@@ -4598,7 +4598,7 @@ const _sfc_main$19 = defineComponent({
4598
4598
  }
4599
4599
  }
4600
4600
  });
4601
- const _hoisted_1$T = ["id"];
4601
+ const _hoisted_1$U = ["id"];
4602
4602
  const _hoisted_2$E = {
4603
4603
  class: "modal__backdrop"
4604
4604
  };
@@ -4632,7 +4632,7 @@ const _hoisted_10$4 = {
4632
4632
  class: "modal__shelf"
4633
4633
  };
4634
4634
  const _hoisted_11$3 = ["aria-label"];
4635
- function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
4635
+ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
4636
4636
  const _component_f_icon = resolveComponent("f-icon");
4637
4637
  return _ctx.isOpen ? (openBlock(), createElementBlock("div", {
4638
4638
  key: 0,
@@ -4660,9 +4660,9 @@ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
4660
4660
  })], 8, _hoisted_11$3), _cache[8] || (_cache[8] = createTextVNode()), createElementVNode("div", {
4661
4661
  tabindex: "0",
4662
4662
  onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.onFocusLast && _ctx.onFocusLast(...args))
4663
- }, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$T)) : createCommentVNode("", true);
4663
+ }, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$U)) : createCommentVNode("", true);
4664
4664
  }
4665
- const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$V]]);
4665
+ const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$Q]]);
4666
4666
  function prepareButtonList(src, buttonOrder = config.buttonOrder) {
4667
4667
  const list = src.map((it) => {
4668
4668
  var _it$event, _ref, _it$reason, _it$type;
@@ -4691,7 +4691,7 @@ const defaultButtons = [{
4691
4691
  event: "dismiss",
4692
4692
  type: "secondary"
4693
4693
  }];
4694
- const _sfc_main$18 = defineComponent({
4694
+ const _sfc_main$19 = defineComponent({
4695
4695
  name: "FConfirmModal",
4696
4696
  components: {
4697
4697
  FModal
@@ -4795,7 +4795,7 @@ const _sfc_main$18 = defineComponent({
4795
4795
  }
4796
4796
  }
4797
4797
  });
4798
- const _hoisted_1$S = {
4798
+ const _hoisted_1$T = {
4799
4799
  class: "button-group"
4800
4800
  };
4801
4801
  const _hoisted_2$D = ["onClick"];
@@ -4803,7 +4803,7 @@ const _hoisted_3$v = {
4803
4803
  key: 0,
4804
4804
  class: "sr-only"
4805
4805
  };
4806
- function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4806
+ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
4807
4807
  const _component_f_modal = resolveComponent("f-modal");
4808
4808
  return openBlock(), createBlock(_component_f_modal, {
4809
4809
  fullscreen: _ctx.fullscreen,
@@ -4816,7 +4816,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4816
4816
  }, {
4817
4817
  header: withCtx(() => [renderSlot(_ctx.$slots, "heading", {}, () => [createTextVNode(toDisplayString(_ctx.heading), 1)])]),
4818
4818
  content: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(_ctx.content), 1)])]),
4819
- footer: withCtx(() => [createElementVNode("div", _hoisted_1$S, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
4819
+ footer: withCtx(() => [createElementVNode("div", _hoisted_1$T, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
4820
4820
  return openBlock(), createElementBlock("button", {
4821
4821
  key: button.label,
4822
4822
  type: "button",
@@ -4827,11 +4827,11 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4827
4827
  _: 3
4828
4828
  }, 8, ["fullscreen", "is-open", "aria-close-text", "size", "focus", "onClose"]);
4829
4829
  }
4830
- const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$U]]);
4830
+ const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$P]]);
4831
4831
  const GAP = ["1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x"];
4832
4832
  const ALIGNMENT = ["top", "center", "bottom"];
4833
4833
  const FLOAT = ["left", "center", "right"];
4834
- const _sfc_main$17 = defineComponent({
4834
+ const _sfc_main$18 = defineComponent({
4835
4835
  name: "IFlex",
4836
4836
  inheritAttrs: true,
4837
4837
  props: {
@@ -4906,13 +4906,13 @@ const _sfc_main$17 = defineComponent({
4906
4906
  }
4907
4907
  }
4908
4908
  });
4909
- function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
4909
+ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
4910
4910
  return openBlock(), createElementBlock("div", {
4911
4911
  class: normalizeClass(["iflex", _ctx.classList])
4912
4912
  }, [renderSlot(_ctx.$slots, "default")], 2);
4913
4913
  }
4914
- const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$T]]);
4915
- const _sfc_main$16 = defineComponent({
4914
+ const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$O]]);
4915
+ const _sfc_main$17 = defineComponent({
4916
4916
  name: "IFlexItem",
4917
4917
  inheritAttrs: true,
4918
4918
  props: {
@@ -4959,12 +4959,12 @@ const _sfc_main$16 = defineComponent({
4959
4959
  }
4960
4960
  }
4961
4961
  });
4962
- function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
4962
+ function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
4963
4963
  return openBlock(), createElementBlock("div", {
4964
4964
  class: normalizeClass(["iflex__item", _ctx.classList])
4965
4965
  }, [renderSlot(_ctx.$slots, "default")], 2);
4966
4966
  }
4967
- const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$S]]);
4967
+ const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$N]]);
4968
4968
  function focusError(item) {
4969
4969
  const element = document.querySelector(`#${item.id}`);
4970
4970
  if (!element) {
@@ -4974,7 +4974,7 @@ function focusError(item) {
4974
4974
  scrollTo(element, window.innerHeight * 0.25);
4975
4975
  focus$1(focusElement2 ? focusElement2 : element);
4976
4976
  }
4977
- const _sfc_main$15 = defineComponent({
4977
+ const _sfc_main$16 = defineComponent({
4978
4978
  name: "FErrorList",
4979
4979
  components: {
4980
4980
  FIcon,
@@ -5030,7 +5030,7 @@ const _sfc_main$15 = defineComponent({
5030
5030
  }
5031
5031
  }
5032
5032
  });
5033
- const _hoisted_1$R = {
5033
+ const _hoisted_1$S = {
5034
5034
  class: "error-list"
5035
5035
  };
5036
5036
  const _hoisted_2$C = {
@@ -5043,11 +5043,11 @@ const _hoisted_4$p = ["onClick"];
5043
5043
  const _hoisted_5$k = {
5044
5044
  class: "error-list__link"
5045
5045
  };
5046
- function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5046
+ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
5047
5047
  const _component_f_icon = resolveComponent("f-icon");
5048
5048
  const _component_i_flex_item = resolveComponent("i-flex-item");
5049
5049
  const _component_i_flex = resolveComponent("i-flex");
5050
- return openBlock(), createElementBlock("div", _hoisted_1$R, [createVNode(_component_i_flex, null, {
5050
+ return openBlock(), createElementBlock("div", _hoisted_1$S, [createVNode(_component_i_flex, null, {
5051
5051
  default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createBlock(_component_i_flex_item, {
5052
5052
  key: 0,
5053
5053
  shrink: ""
@@ -5097,7 +5097,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5097
5097
  _: 3
5098
5098
  })]);
5099
5099
  }
5100
- const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$R]]);
5100
+ const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$M]]);
5101
5101
  var es_iterator_every = {};
5102
5102
  var hasRequiredEs_iterator_every;
5103
5103
  function requireEs_iterator_every() {
@@ -5185,7 +5185,7 @@ function cleanUpElements(vm) {
5185
5185
  }, 0);
5186
5186
  });
5187
5187
  }
5188
- const _sfc_main$14 = defineComponent({
5188
+ const _sfc_main$15 = defineComponent({
5189
5189
  name: "FValidationGroup",
5190
5190
  props: {
5191
5191
  /**
@@ -5255,19 +5255,19 @@ const _sfc_main$14 = defineComponent({
5255
5255
  }
5256
5256
  }
5257
5257
  });
5258
- function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5258
+ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
5259
5259
  return openBlock(), createElementBlock("div", {
5260
5260
  onComponentValidity: _cache[0] || (_cache[0] = (...args) => _ctx.onComponentValidity && _ctx.onComponentValidity(...args)),
5261
5261
  onComponentUnmount: _cache[1] || (_cache[1] = (...args) => _ctx.onComponentUnmount && _ctx.onComponentUnmount(...args))
5262
5262
  }, [renderSlot(_ctx.$slots, "default")], 32);
5263
5263
  }
5264
- const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$Q]]);
5264
+ const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$L]]);
5265
5265
  var FValidationFormAction = /* @__PURE__ */ ((FValidationFormAction2) => {
5266
5266
  FValidationFormAction2[FValidationFormAction2["CONTINUE"] = 0] = "CONTINUE";
5267
5267
  FValidationFormAction2[FValidationFormAction2["CANCEL"] = 1] = "CANCEL";
5268
5268
  return FValidationFormAction2;
5269
5269
  })(FValidationFormAction || {});
5270
- const _sfc_main$13 = defineComponent({
5270
+ const _sfc_main$14 = defineComponent({
5271
5271
  name: "FValidationForm",
5272
5272
  components: {
5273
5273
  FValidationGroup,
@@ -5406,14 +5406,14 @@ const _sfc_main$13 = defineComponent({
5406
5406
  }
5407
5407
  }
5408
5408
  });
5409
- const _hoisted_1$Q = ["id"];
5409
+ const _hoisted_1$R = ["id"];
5410
5410
  const _hoisted_2$B = {
5411
5411
  key: 0,
5412
5412
  ref: "errors",
5413
5413
  tabindex: "-1",
5414
5414
  role: "group"
5415
5415
  };
5416
- function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
5416
+ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
5417
5417
  const _component_f_error_list = resolveComponent("f-error-list");
5418
5418
  const _component_f_validation_group = resolveComponent("f-validation-group");
5419
5419
  return openBlock(), createBlock(_component_f_validation_group, {
@@ -5435,12 +5435,12 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
5435
5435
  }, {
5436
5436
  title: withCtx(() => [renderSlot(_ctx.$slots, "error-message")]),
5437
5437
  _: 3
5438
- }, 8, ["items", "bullets", "before-navigate"])], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$Q)]),
5438
+ }, 8, ["items", "bullets", "before-navigate"])], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$R)]),
5439
5439
  _: 3
5440
5440
  }, 8, ["modelValue"]);
5441
5441
  }
5442
- const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$P]]);
5443
- const _sfc_main$12 = defineComponent({
5442
+ const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$K]]);
5443
+ const _sfc_main$13 = defineComponent({
5444
5444
  name: "FFormModal",
5445
5445
  components: {
5446
5446
  FModal,
@@ -5589,7 +5589,7 @@ const _sfc_main$12 = defineComponent({
5589
5589
  }
5590
5590
  }
5591
5591
  });
5592
- const _hoisted_1$P = {
5592
+ const _hoisted_1$Q = {
5593
5593
  class: "button-group"
5594
5594
  };
5595
5595
  const _hoisted_2$A = ["type", "form", "onClick"];
@@ -5597,7 +5597,7 @@ const _hoisted_3$t = {
5597
5597
  key: 0,
5598
5598
  class: "sr-only"
5599
5599
  };
5600
- function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
5600
+ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
5601
5601
  const _component_f_validation_form = resolveComponent("f-validation-form");
5602
5602
  const _component_f_modal = resolveComponent("f-modal");
5603
5603
  return openBlock(), createBlock(_component_f_modal, {
@@ -5621,7 +5621,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
5621
5621
  default: withCtx(() => [_cache[0] || (_cache[0] = createTextVNode()), renderSlot(_ctx.$slots, "input-text-fields")]),
5622
5622
  _: 3
5623
5623
  }, 8, ["id", "before-submit", "before-validation", "use-error-list", "onSubmit", "onCancel"])]),
5624
- footer: withCtx(() => [createElementVNode("div", _hoisted_1$P, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
5624
+ footer: withCtx(() => [createElementVNode("div", _hoisted_1$Q, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
5625
5625
  return openBlock(), createElementBlock("button", {
5626
5626
  key: button.label,
5627
5627
  type: button.buttonType,
@@ -5633,7 +5633,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
5633
5633
  _: 3
5634
5634
  }, 8, ["data-test", "fullscreen", "is-open", "size", "aria-close-text", "onClose"]);
5635
5635
  }
5636
- const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$O]]);
5636
+ const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$J]]);
5637
5637
  async function confirmModal(callingInstance, texts) {
5638
5638
  const buttons = [{
5639
5639
  label: texts.confirm,
@@ -5993,7 +5993,7 @@ const ErrorPlugin = {
5993
5993
  }
5994
5994
  }
5995
5995
  };
5996
- const _sfc_main$11 = defineComponent({
5996
+ const _sfc_main$12 = defineComponent({
5997
5997
  name: "FErrorPage",
5998
5998
  props: {
5999
5999
  payload: {
@@ -6003,16 +6003,16 @@ const _sfc_main$11 = defineComponent({
6003
6003
  }
6004
6004
  }
6005
6005
  });
6006
- const _hoisted_1$O = {
6006
+ const _hoisted_1$P = {
6007
6007
  "data-test": "f-error-page"
6008
6008
  };
6009
- function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
6010
- return openBlock(), createElementBlock("div", _hoisted_1$O, _cache[0] || (_cache[0] = [createElementVNode("h1", null, "Fel", -1), createTextVNode(), createElementVNode("p", null, "Ett fel har uppstått.", -1), createTextVNode(), createElementVNode("a", {
6009
+ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
6010
+ return openBlock(), createElementBlock("div", _hoisted_1$P, _cache[0] || (_cache[0] = [createElementVNode("h1", null, "Fel", -1), createTextVNode(), createElementVNode("p", null, "Ett fel har uppstått.", -1), createTextVNode(), createElementVNode("a", {
6011
6011
  href: "/"
6012
6012
  }, "Gå till startsidan", -1)]));
6013
6013
  }
6014
- const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$N]]);
6015
- const _sfc_main$10 = defineComponent({
6014
+ const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$I]]);
6015
+ const _sfc_main$11 = defineComponent({
6016
6016
  name: "FErrorHandlingApp",
6017
6017
  props: {
6018
6018
  defaultComponent: {
@@ -6041,7 +6041,7 @@ const _sfc_main$10 = defineComponent({
6041
6041
  });
6042
6042
  }
6043
6043
  });
6044
- function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
6044
+ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
6045
6045
  return openBlock(), createElementBlock("div", null, [_ctx.hasError ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.errorComponent), {
6046
6046
  key: 0,
6047
6047
  payload: _ctx.payload
@@ -6051,7 +6051,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
6051
6051
  key: 2
6052
6052
  })]);
6053
6053
  }
6054
- const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$M]]);
6054
+ const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$H]]);
6055
6055
  function isMonthBefore(date, minDate) {
6056
6056
  return Boolean(minDate && date.isBefore(minDate.startOfMonth()));
6057
6057
  }
@@ -6092,7 +6092,7 @@ function getMessage($t2, date, minDate, maxDate) {
6092
6092
  });
6093
6093
  }
6094
6094
  }
6095
- const _sfc_main$$ = defineComponent({
6095
+ const _sfc_main$10 = defineComponent({
6096
6096
  name: "ICalendarNavbar",
6097
6097
  components: {
6098
6098
  FIcon
@@ -6205,7 +6205,7 @@ const _sfc_main$$ = defineComponent({
6205
6205
  }
6206
6206
  }
6207
6207
  });
6208
- const _hoisted_1$N = {
6208
+ const _hoisted_1$O = {
6209
6209
  class: "calendar-navbar"
6210
6210
  };
6211
6211
  const _hoisted_2$z = {
@@ -6220,9 +6220,9 @@ const _hoisted_5$j = ["aria-disabled", "aria-live"];
6220
6220
  const _hoisted_6$f = {
6221
6221
  class: "sr-only"
6222
6222
  };
6223
- function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
6223
+ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
6224
6224
  const _component_f_icon = resolveComponent("f-icon");
6225
- return openBlock(), createElementBlock("div", _hoisted_1$N, [createElementVNode("div", _hoisted_2$z, toDisplayString(_ctx.currentText), 1), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("button", {
6225
+ return openBlock(), createElementBlock("div", _hoisted_1$O, [createElementVNode("div", _hoisted_2$z, toDisplayString(_ctx.currentText), 1), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("button", {
6226
6226
  ref: "previousButton",
6227
6227
  class: "calendar-navbar__arrow calendar-navbar__arrow--previous",
6228
6228
  type: "button",
@@ -6244,14 +6244,14 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
6244
6244
  name: "arrow-right"
6245
6245
  }, null, 8, ["class"])], 8, _hoisted_5$j)]);
6246
6246
  }
6247
- const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$L]]);
6247
+ const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$G]]);
6248
6248
  function getDayStartOffset(days) {
6249
6249
  return days[0].weekDay - 1;
6250
6250
  }
6251
6251
  function getDayEndOffset(days) {
6252
6252
  return 7 - days[days.length - 1].weekDay;
6253
6253
  }
6254
- const _sfc_main$_ = defineComponent({
6254
+ const _sfc_main$$ = defineComponent({
6255
6255
  name: "ICalendarMonthGrid",
6256
6256
  props: {
6257
6257
  /**
@@ -6325,7 +6325,7 @@ const _sfc_main$_ = defineComponent({
6325
6325
  }
6326
6326
  }
6327
6327
  });
6328
- const _hoisted_1$M = ["aria-label"];
6328
+ const _hoisted_1$N = ["aria-label"];
6329
6329
  const _hoisted_2$y = {
6330
6330
  key: 0,
6331
6331
  class: "calendar-month__col--week"
@@ -6338,23 +6338,26 @@ const _hoisted_3$r = {
6338
6338
  };
6339
6339
  const _hoisted_4$n = ["title"];
6340
6340
  const _hoisted_5$i = {
6341
+ key: 1
6342
+ };
6343
+ const _hoisted_6$e = {
6341
6344
  key: 0,
6342
6345
  class: "calendar-month__cell calendar-month__cell--week-number",
6343
6346
  "aria-hidden": "true"
6344
6347
  };
6345
- const _hoisted_6$e = ["colspan"];
6346
6348
  const _hoisted_7$c = ["colspan"];
6347
- const _hoisted_8$7 = {
6349
+ const _hoisted_8$7 = ["colspan"];
6350
+ const _hoisted_9$5 = {
6348
6351
  key: 0,
6349
6352
  "aria-hidden": "true"
6350
6353
  };
6351
- const _hoisted_9$5 = ["colspan"];
6352
- const _hoisted_10$3 = {
6354
+ const _hoisted_10$3 = ["colspan"];
6355
+ const _hoisted_11$2 = {
6353
6356
  key: 1,
6354
6357
  "aria-hidden": "true"
6355
6358
  };
6356
- const _hoisted_11$2 = ["colspan"];
6357
- function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
6359
+ const _hoisted_12$2 = ["colspan"];
6360
+ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
6358
6361
  return openBlock(), createElementBlock("table", {
6359
6362
  class: "calendar-month__table",
6360
6363
  role: "grid",
@@ -6379,19 +6382,20 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
6379
6382
  return openBlock(), createElementBlock("th", {
6380
6383
  key: weekday.name,
6381
6384
  scope: "col",
6385
+ "aria-hidden": "true",
6382
6386
  class: "calendar-month__header-cell"
6383
- }, [createElementVNode("abbr", {
6387
+ }, [_ctx.showShortWeekdays ? (openBlock(), createElementBlock("abbr", {
6388
+ key: 0,
6384
6389
  title: weekday.name
6385
- }, toDisplayString(_ctx.showShortWeekdays ? weekday.shortName : weekday.name), 9, _hoisted_4$n)]);
6390
+ }, toDisplayString(weekday.shortName), 9, _hoisted_4$n)) : (openBlock(), createElementBlock("span", _hoisted_5$i, toDisplayString(weekday.name), 1))]);
6386
6391
  }), 128))])]), _cache[23] || (_cache[23] = createTextVNode()), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weeks, (week) => {
6387
6392
  return openBlock(), createElementBlock("tr", {
6388
6393
  key: week.week
6389
- }, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("td", _hoisted_5$i, toDisplayString(week.week), 1)) : createCommentVNode("", true), _cache[17] || (_cache[17] = createTextVNode()), _ctx.getDayStartOffset(week.days) ? (openBlock(), createElementBlock("td", {
6394
+ }, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("td", _hoisted_6$e, toDisplayString(week.week), 1)) : createCommentVNode("", true), _cache[17] || (_cache[17] = createTextVNode()), _ctx.getDayStartOffset(week.days) ? (openBlock(), createElementBlock("td", {
6390
6395
  key: 1,
6391
6396
  class: "calendar-month__cell",
6392
- colspan: _ctx.getDayStartOffset(week.days),
6393
- "aria-hidden": "true"
6394
- }, null, 8, _hoisted_6$e)) : createCommentVNode("", true), _cache[18] || (_cache[18] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(week.days, (day) => {
6397
+ colspan: _ctx.getDayStartOffset(week.days)
6398
+ }, null, 8, _hoisted_7$c)) : createCommentVNode("", true), _cache[18] || (_cache[18] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(week.days, (day) => {
6395
6399
  return openBlock(), createElementBlock("td", {
6396
6400
  key: day.toString(),
6397
6401
  class: "calendar-month__cell",
@@ -6405,18 +6409,18 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
6405
6409
  class: "calendar-month__cell",
6406
6410
  colspan: _ctx.getDayEndOffset(week.days),
6407
6411
  "aria-hidden": "true"
6408
- }, null, 8, _hoisted_7$c)) : createCommentVNode("", true)]);
6409
- }), 128)), _cache[20] || (_cache[20] = createTextVNode()), _ctx.weeks.length < 5 ? (openBlock(), createElementBlock("tr", _hoisted_8$7, [createElementVNode("td", {
6412
+ }, null, 8, _hoisted_8$7)) : createCommentVNode("", true)]);
6413
+ }), 128)), _cache[20] || (_cache[20] = createTextVNode()), _ctx.weeks.length < 5 ? (openBlock(), createElementBlock("tr", _hoisted_9$5, [createElementVNode("td", {
6410
6414
  class: "calendar-month__cell",
6411
6415
  colspan: _ctx.totalCols,
6412
6416
  "aria-hidden": "true"
6413
- }, null, 8, _hoisted_9$5)])) : createCommentVNode("", true), _cache[21] || (_cache[21] = createTextVNode()), _ctx.weeks.length < 6 ? (openBlock(), createElementBlock("tr", _hoisted_10$3, [createElementVNode("td", {
6417
+ }, null, 8, _hoisted_10$3)])) : createCommentVNode("", true), _cache[21] || (_cache[21] = createTextVNode()), _ctx.weeks.length < 6 ? (openBlock(), createElementBlock("tr", _hoisted_11$2, [createElementVNode("td", {
6414
6418
  class: "calendar-month__cell",
6415
6419
  colspan: _ctx.totalCols,
6416
6420
  "aria-hidden": "true"
6417
- }, null, 8, _hoisted_11$2)])) : createCommentVNode("", true)])], 40, _hoisted_1$M);
6421
+ }, null, 8, _hoisted_12$2)])) : createCommentVNode("", true)])], 40, _hoisted_1$N);
6418
6422
  }
6419
- const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$K]]);
6423
+ const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$F]]);
6420
6424
  const DayStep = {
6421
6425
  ArrowRight: 1,
6422
6426
  ArrowLeft: -1,
@@ -6440,7 +6444,7 @@ function getDayTabindex(date, active, entry) {
6440
6444
  return date.day === 1 ? 0 : -1;
6441
6445
  }
6442
6446
  }
6443
- const _sfc_main$Z = defineComponent({
6447
+ const _sfc_main$_ = defineComponent({
6444
6448
  name: "ICalendarMonth",
6445
6449
  components: {
6446
6450
  ICalendarMonthGrid
@@ -6530,8 +6534,8 @@ const _sfc_main$Z = defineComponent({
6530
6534
  }
6531
6535
  }
6532
6536
  });
6533
- const _hoisted_1$L = ["data-date", "tabindex", "onClick", "onKeydown"];
6534
- function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
6537
+ const _hoisted_1$M = ["data-date", "tabindex", "onClick", "onKeydown"];
6538
+ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
6535
6539
  const _component_i_calendar_month_grid = resolveComponent("i-calendar-month-grid");
6536
6540
  return openBlock(), createBlock(_component_i_calendar_month_grid, {
6537
6541
  value: _ctx.modelValue
@@ -6550,12 +6554,12 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
6550
6554
  }, [renderSlot(_ctx.$slots, "default", {
6551
6555
  date,
6552
6556
  isFocused: _ctx.isDayFocused(date)
6553
- })], 40, _hoisted_1$L)]),
6557
+ })], 40, _hoisted_1$M)]),
6554
6558
  _: 3
6555
6559
  }, 8, ["value"]);
6556
6560
  }
6557
- const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$J]]);
6558
- const _sfc_main$Y = defineComponent({
6561
+ const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$E]]);
6562
+ const _sfc_main$Z = defineComponent({
6559
6563
  name: "FCalendar",
6560
6564
  components: {
6561
6565
  ICalendarNavbar,
@@ -6606,13 +6610,13 @@ const _sfc_main$Y = defineComponent({
6606
6610
  }
6607
6611
  }
6608
6612
  });
6609
- const _hoisted_1$K = {
6613
+ const _hoisted_1$L = {
6610
6614
  class: "calendar__wrapper"
6611
6615
  };
6612
- function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
6616
+ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
6613
6617
  const _component_i_calendar_navbar = resolveComponent("i-calendar-navbar");
6614
6618
  const _component_i_calendar_month = resolveComponent("i-calendar-month");
6615
- return openBlock(), createElementBlock("div", _hoisted_1$K, [createVNode(_component_i_calendar_navbar, {
6619
+ return openBlock(), createElementBlock("div", _hoisted_1$L, [createVNode(_component_i_calendar_navbar, {
6616
6620
  "model-value": _ctx.modelValue,
6617
6621
  "min-date": _ctx.minDate,
6618
6622
  "max-date": _ctx.maxDate,
@@ -6635,7 +6639,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
6635
6639
  _: 3
6636
6640
  }, 8, ["model-value", "min-date", "max-date", "tab-date", "onClick", "onUpdate:modelValue"])]);
6637
6641
  }
6638
- const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$I]]);
6642
+ const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$D]]);
6639
6643
  function getCalendarDaySrText(day, enabled, selected, t) {
6640
6644
  const parts = [];
6641
6645
  if (!enabled) {
@@ -6654,7 +6658,7 @@ function getCalendarDaySrText(day, enabled, selected, t) {
6654
6658
  parts.push(day.toString(DateFormat.FULL));
6655
6659
  return parts.join(" ");
6656
6660
  }
6657
- const _sfc_main$X = defineComponent({
6661
+ const _sfc_main$Y = defineComponent({
6658
6662
  name: "FCalendarDay",
6659
6663
  mixins: [TranslationMixin],
6660
6664
  props: {
@@ -6719,18 +6723,18 @@ const _sfc_main$X = defineComponent({
6719
6723
  }
6720
6724
  }
6721
6725
  });
6722
- const _hoisted_1$J = {
6726
+ const _hoisted_1$K = {
6723
6727
  "aria-hidden": "true"
6724
6728
  };
6725
6729
  const _hoisted_2$x = {
6726
6730
  class: "sr-only"
6727
6731
  };
6728
- function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
6732
+ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
6729
6733
  return openBlock(), createElementBlock("span", {
6730
6734
  class: normalizeClass(_ctx.dayClasses)
6731
- }, [createElementVNode("span", _hoisted_1$J, toDisplayString(_ctx.day.day), 1), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_2$x, toDisplayString(_ctx.srText), 1)], 2);
6735
+ }, [createElementVNode("span", _hoisted_1$K, toDisplayString(_ctx.day.day), 1), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_2$x, toDisplayString(_ctx.srText), 1)], 2);
6732
6736
  }
6733
- const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$H]]);
6737
+ const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$C]]);
6734
6738
  function useEventListener(target, event, callback) {
6735
6739
  onMounted(() => {
6736
6740
  var _a;
@@ -6744,14 +6748,14 @@ function useEventListener(target, event, callback) {
6744
6748
  function useSlotUtils() {
6745
6749
  const $slots = useSlots();
6746
6750
  return {
6747
- hasSlot(name) {
6751
+ hasSlot(...args) {
6748
6752
  return hasSlot({
6749
6753
  $slots
6750
- }, name);
6754
+ }, ...args);
6751
6755
  }
6752
6756
  };
6753
6757
  }
6754
- const _hoisted_1$I = ["id"];
6758
+ const _hoisted_1$J = ["id"];
6755
6759
  const _hoisted_2$w = {
6756
6760
  key: 0,
6757
6761
  class: "card__header"
@@ -6763,7 +6767,7 @@ const _hoisted_4$m = {
6763
6767
  key: 1,
6764
6768
  class: "card__footer"
6765
6769
  };
6766
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
6770
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
6767
6771
  __name: "FCard",
6768
6772
  props: {
6769
6773
  /**
@@ -6849,11 +6853,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
6849
6853
  })) : createCommentVNode("", true)]), _cache[2] || (_cache[2] = createTextVNode()), createElementVNode("div", _hoisted_3$q, [renderSlot(_ctx.$slots, "default")]), _cache[3] || (_cache[3] = createTextVNode()), hasFooterSlot.value ? (openBlock(), createElementBlock("div", _hoisted_4$m, [renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps({
6850
6854
  hasError: hasError.value,
6851
6855
  validationMessage: validationMessage.value
6852
- })))])) : createCommentVNode("", true)], 42, _hoisted_1$I);
6856
+ })))])) : createCommentVNode("", true)], 42, _hoisted_1$J);
6853
6857
  };
6854
6858
  }
6855
6859
  });
6856
- const _sfc_main$V = defineComponent({
6860
+ const _sfc_main$W = defineComponent({
6857
6861
  name: "FExpand",
6858
6862
  data() {
6859
6863
  return {
@@ -6907,7 +6911,7 @@ const _sfc_main$V = defineComponent({
6907
6911
  }
6908
6912
  }
6909
6913
  });
6910
- function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
6914
+ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
6911
6915
  return openBlock(), createBlock(Transition, {
6912
6916
  onEnter: _ctx.enter,
6913
6917
  onAfterEnter: _ctx.afterEnter,
@@ -6919,7 +6923,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
6919
6923
  _: 3
6920
6924
  }, 8, ["onEnter", "onAfterEnter", "onLeave"]);
6921
6925
  }
6922
- const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$G]]);
6926
+ const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$B]]);
6923
6927
  function offset(page, el) {
6924
6928
  const rect = el.getBoundingClientRect();
6925
6929
  return {
@@ -7204,7 +7208,7 @@ function isTeleportDisabled(options) {
7204
7208
  }
7205
7209
  return disableTeleport;
7206
7210
  }
7207
- const _sfc_main$U = defineComponent({
7211
+ const _sfc_main$V = defineComponent({
7208
7212
  name: "IPopup",
7209
7213
  inheritAttrs: false,
7210
7214
  props: {
@@ -7485,7 +7489,7 @@ const _sfc_main$U = defineComponent({
7485
7489
  }
7486
7490
  }
7487
7491
  });
7488
- function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
7492
+ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
7489
7493
  return _ctx.isOpen ? (openBlock(), createBlock(Teleport, {
7490
7494
  key: 0,
7491
7495
  to: _ctx.teleportTarget,
@@ -7506,7 +7510,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
7506
7510
  placement: _ctx.placement
7507
7511
  })))], 544)], 16)], 8, ["to", "disabled"])) : createCommentVNode("", true);
7508
7512
  }
7509
- const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$F]]);
7513
+ const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$A]]);
7510
7514
  function computeArrowOffset(placement, inputIconRect, wrapperRect) {
7511
7515
  switch (placement) {
7512
7516
  case Placement.A: {
@@ -7570,7 +7574,7 @@ function computeArrowOffset(placement, inputIconRect, wrapperRect) {
7570
7574
  }
7571
7575
  }
7572
7576
  const POPUP_SPACING = 10;
7573
- const _sfc_main$T = defineComponent({
7577
+ const _sfc_main$U = defineComponent({
7574
7578
  name: "IPopupError",
7575
7579
  components: {
7576
7580
  FIcon
@@ -7621,6 +7625,9 @@ const _sfc_main$T = defineComponent({
7621
7625
  },
7622
7626
  errorStyle() {
7623
7627
  return `--i-popup-error-offset: ${this.arrowOffset}px`;
7628
+ },
7629
+ teleportTarget() {
7630
+ return config.teleportTarget;
7624
7631
  }
7625
7632
  },
7626
7633
  watch: {
@@ -7705,21 +7712,21 @@ const _sfc_main$T = defineComponent({
7705
7712
  }
7706
7713
  }
7707
7714
  });
7708
- const _hoisted_1$H = {
7715
+ const _hoisted_1$I = {
7709
7716
  ref: "wrapper",
7710
7717
  class: "popup-error__wrapper"
7711
7718
  };
7712
- function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
7719
+ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
7713
7720
  const _component_f_icon = resolveComponent("f-icon");
7714
7721
  return _ctx.isOpen ? (openBlock(), createBlock(Teleport, {
7715
7722
  key: 0,
7716
- to: "body",
7723
+ to: _ctx.teleportTarget,
7717
7724
  disabled: _ctx.teleportDisabled
7718
7725
  }, [createElementVNode("div", {
7719
7726
  ref: "popup",
7720
7727
  class: normalizeClass(_ctx.popupClasses),
7721
7728
  "aria-hidden": "true"
7722
- }, [createElementVNode("div", _hoisted_1$H, [createElementVNode("div", {
7729
+ }, [createElementVNode("div", _hoisted_1$I, [createElementVNode("div", {
7723
7730
  class: normalizeClass(_ctx.arrowClass),
7724
7731
  style: normalizeStyle(_ctx.errorStyle)
7725
7732
  }, [createElementVNode("span", null, toDisplayString(_ctx.errorMessage), 1), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("button", {
@@ -7731,9 +7738,9 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
7731
7738
  }, [createVNode(_component_f_icon, {
7732
7739
  name: "close",
7733
7740
  class: "button__icon"
7734
- })])], 6)], 512)], 2)], 8, ["disabled"])) : createCommentVNode("", true);
7741
+ })])], 6)], 512)], 2)], 8, ["to", "disabled"])) : createCommentVNode("", true);
7735
7742
  }
7736
- const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$E]]);
7743
+ const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$z]]);
7737
7744
  function numItems(itemHeight, availableHeight, verticalSpacing) {
7738
7745
  const itemsFit = Math.floor((availableHeight - verticalSpacing) / itemHeight);
7739
7746
  return Math.min(itemsFit, 7);
@@ -7800,12 +7807,12 @@ function computeListboxRect(anchor, options, root = document.documentElement, {
7800
7807
  }
7801
7808
  return void 0;
7802
7809
  }
7803
- const _hoisted_1$G = ["onKeyup"];
7810
+ const _hoisted_1$H = ["onKeyup"];
7804
7811
  const _hoisted_2$v = {
7805
7812
  ref: "content"
7806
7813
  };
7807
7814
  const teleportDisabled = false;
7808
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
7815
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
7809
7816
  __name: "IPopupListbox",
7810
7817
  props: {
7811
7818
  isOpen: {
@@ -7910,7 +7917,11 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
7910
7917
  }
7911
7918
  if (verticalSpacing === void 0) {
7912
7919
  const absWrapper = getAbsolutePosition(wrapperElement);
7913
- const marginTotal = absWrapper.y * 2;
7920
+ const {
7921
+ marginTop,
7922
+ marginBottom
7923
+ } = getComputedStyle(wrapperElement);
7924
+ const marginTotal = parseInt(marginTop, 10) + parseInt(marginBottom, 10);
7914
7925
  verticalSpacing = Math.ceil(absWrapper.height - contentItemHeigth * __props.numOfItems) + marginTotal;
7915
7926
  }
7916
7927
  wrapperElement.style.overflowY = "auto";
@@ -7922,7 +7933,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
7922
7933
  verticalSpacing
7923
7934
  });
7924
7935
  if (rect) {
7925
- var _offsetRect$x;
7936
+ var _offsetRect$x, _offsetRect$top;
7926
7937
  const {
7927
7938
  top,
7928
7939
  left,
@@ -7931,7 +7942,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
7931
7942
  } = rect;
7932
7943
  const offsetRect = (_a = wrapperElement == null ? void 0 : wrapperElement.offsetParent) == null ? void 0 : _a.getBoundingClientRect();
7933
7944
  const offsetLeft = (_offsetRect$x = offsetRect == null ? void 0 : offsetRect.x) !== null && _offsetRect$x !== void 0 ? _offsetRect$x : 0;
7934
- wrapperElement.style.top = `${top}px`;
7945
+ const offSetTop = Math.floor(((_offsetRect$top = offsetRect == null ? void 0 : offsetRect.top) !== null && _offsetRect$top !== void 0 ? _offsetRect$top : 0) + window.scrollY);
7946
+ wrapperElement.style.top = `${top - offSetTop}px`;
7935
7947
  wrapperElement.style.left = `${left - offsetLeft}px`;
7936
7948
  wrapperElement.style.width = `${width}px`;
7937
7949
  contentWrapper.style.maxHeight = `${height}px`;
@@ -7954,7 +7966,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
7954
7966
  onKeyup: withKeys(withModifiers(onKeyEsc, ["stop"]), ["esc"]),
7955
7967
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
7956
7968
  }, ["stop"]))
7957
- }), [createElementVNode("div", _hoisted_2$v, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$G)], 512)], 8, ["to"])) : createCommentVNode("", true);
7969
+ }), [createElementVNode("div", _hoisted_2$v, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$H)], 512)], 8, ["to"])) : createCommentVNode("", true);
7958
7970
  };
7959
7971
  }
7960
7972
  });
@@ -7998,7 +8010,7 @@ async function doMenuAction$2(action, target) {
7998
8010
  }
7999
8011
  }
8000
8012
  const preventKeys$2 = ["Tab", "Up", "Down", "ArrowUp", "ArrowDown", "Home", "End", " ", "Spacebar", "Enter"];
8001
- const _sfc_main$R = defineComponent({
8013
+ const _sfc_main$S = defineComponent({
8002
8014
  name: "IPopupMenu",
8003
8015
  components: {
8004
8016
  IPopup
@@ -8253,7 +8265,7 @@ const _sfc_main$R = defineComponent({
8253
8265
  }
8254
8266
  }
8255
8267
  });
8256
- const _hoisted_1$F = ["aria-label"];
8268
+ const _hoisted_1$G = ["aria-label"];
8257
8269
  const _hoisted_2$u = {
8258
8270
  role: "menu",
8259
8271
  class: "ipopupmenu__list"
@@ -8264,7 +8276,7 @@ const _hoisted_5$h = {
8264
8276
  key: 0,
8265
8277
  class: "sr-only"
8266
8278
  };
8267
- function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
8279
+ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
8268
8280
  const _component_i_popup = resolveComponent("i-popup");
8269
8281
  return openBlock(), createBlock(_component_i_popup, {
8270
8282
  class: "ipopupmenu",
@@ -8296,17 +8308,17 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
8296
8308
  target: item.target,
8297
8309
  tabindex: "0"
8298
8310
  }, [_ctx.isSelected(index) ? (openBlock(), createElementBlock("span", _hoisted_5$h, [createElementVNode("span", null, toDisplayString(_ctx.selectedMenuItemScreenReaderText) + " ", 1)])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)], 8, _hoisted_4$l)], 10, _hoisted_3$p);
8299
- }), 128))])], 8, _hoisted_1$F)]),
8311
+ }), 128))])], 8, _hoisted_1$G)]),
8300
8312
  _: 1
8301
8313
  }, 8, ["is-open", "anchor", "focus-element", "onKeyup", "onKeydown"]);
8302
8314
  }
8303
- const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$D]]);
8315
+ const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$y]]);
8304
8316
  const ANIMATION_DURATION = 500;
8305
8317
  const NO_CSS_CLASSES = "";
8306
8318
  const CLOSED_CSS_CLASS_OPACITY = "animate-expand animate-expand--opacity";
8307
8319
  const CLOSED_CSS_CLASS = "animate-expand";
8308
8320
  const ANIMATION_CSS_CLASSES = "animate-expand animate-expand--expanded";
8309
- const _sfc_main$Q = defineComponent({
8321
+ const _sfc_main$R = defineComponent({
8310
8322
  name: "IAnimateExpand",
8311
8323
  props: {
8312
8324
  /**
@@ -8498,19 +8510,19 @@ const _sfc_main$Q = defineComponent({
8498
8510
  }
8499
8511
  }
8500
8512
  });
8501
- const _hoisted_1$E = {
8513
+ const _hoisted_1$F = {
8502
8514
  key: 0,
8503
8515
  ref: "content",
8504
8516
  "data-test": "animation-content"
8505
8517
  };
8506
- function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
8518
+ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
8507
8519
  return openBlock(), createElementBlock("div", {
8508
8520
  class: normalizeClass(_ctx.animationClasses),
8509
8521
  style: normalizeStyle(_ctx.heightStyle)
8510
- }, [_ctx.shouldVIf ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$E, [renderSlot(_ctx.$slots, "default")], 512)), [[vShow, _ctx.shouldVShow]]) : createCommentVNode("", true)], 6);
8522
+ }, [_ctx.shouldVIf ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$F, [renderSlot(_ctx.$slots, "default")], 512)), [[vShow, _ctx.shouldVShow]]) : createCommentVNode("", true)], 6);
8511
8523
  }
8512
- const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$C]]);
8513
- const _sfc_main$P = defineComponent({
8524
+ const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$x]]);
8525
+ const _sfc_main$Q = defineComponent({
8514
8526
  name: "ISkipLink",
8515
8527
  mixins: [TranslationMixin],
8516
8528
  props: {
@@ -8524,14 +8536,14 @@ const _sfc_main$P = defineComponent({
8524
8536
  }
8525
8537
  }
8526
8538
  });
8527
- const _hoisted_1$D = ["href"];
8528
- function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
8539
+ const _hoisted_1$E = ["href"];
8540
+ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
8529
8541
  return openBlock(), createElementBlock("a", {
8530
8542
  class: "iskiplink",
8531
8543
  href: _ctx.href
8532
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$D);
8544
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$E);
8533
8545
  }
8534
- const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$B]]);
8546
+ const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$w]]);
8535
8547
  function filterOptions(options, filter2, selectMode) {
8536
8548
  if (isEmpty(filter2) || selectMode) {
8537
8549
  return options;
@@ -8777,12 +8789,12 @@ function useCombobox(inputRef, options, onOptionSelected) {
8777
8789
  }
8778
8790
  }
8779
8791
  }
8780
- const _hoisted_1$C = {
8792
+ const _hoisted_1$D = {
8781
8793
  class: "combobox"
8782
8794
  };
8783
8795
  const _hoisted_2$t = ["id"];
8784
8796
  const _hoisted_3$o = ["id", "aria-selected", "onClick"];
8785
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
8797
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
8786
8798
  __name: "IComboboxDropdown",
8787
8799
  props: {
8788
8800
  id: {},
@@ -8819,7 +8831,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
8819
8831
  }
8820
8832
  });
8821
8833
  return (_ctx, _cache) => {
8822
- return openBlock(), createElementBlock("div", _hoisted_1$C, [createVNode(unref(_sfc_main$S), {
8834
+ return openBlock(), createElementBlock("div", _hoisted_1$D, [createVNode(unref(_sfc_main$T), {
8823
8835
  "is-open": _ctx.isOpen,
8824
8836
  anchor: _ctx.inputNode,
8825
8837
  "num-of-items": _ctx.options.length,
@@ -8850,8 +8862,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
8850
8862
  };
8851
8863
  }
8852
8864
  });
8853
- const _hoisted_1$B = ["aria-label"];
8854
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
8865
+ const _hoisted_1$C = ["aria-label"];
8866
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
8855
8867
  __name: "IComboboxToggleButton",
8856
8868
  emits: ["toggle"],
8857
8869
  setup(__props, {
@@ -8870,7 +8882,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
8870
8882
  }, [createVNode(unref(FIcon), {
8871
8883
  name: "arrow-down",
8872
8884
  class: "text-field__icon"
8873
- })], 8, _hoisted_1$B);
8885
+ })], 8, _hoisted_1$C);
8874
8886
  };
8875
8887
  }
8876
8888
  });
@@ -8972,7 +8984,7 @@ function useHorizontalOffset(options) {
8972
8984
  }, 0);
8973
8985
  }
8974
8986
  }
8975
- const _sfc_main$M = defineComponent({
8987
+ const _sfc_main$N = defineComponent({
8976
8988
  name: "FTooltip",
8977
8989
  components: {
8978
8990
  FExpand,
@@ -9131,7 +9143,7 @@ const _sfc_main$M = defineComponent({
9131
9143
  }
9132
9144
  }
9133
9145
  });
9134
- const _hoisted_1$A = ["aria-expanded"];
9146
+ const _hoisted_1$B = ["aria-expanded"];
9135
9147
  const _hoisted_2$s = {
9136
9148
  class: "icon-stack icon-stack--tooltip"
9137
9149
  };
@@ -9149,7 +9161,7 @@ const _hoisted_5$g = {
9149
9161
  const _hoisted_6$d = {
9150
9162
  class: "tooltip__footer"
9151
9163
  };
9152
- function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
9164
+ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
9153
9165
  const _component_f_icon = resolveComponent("f-icon");
9154
9166
  return openBlock(), createElementBlock(Fragment, null, [(openBlock(), createBlock(Teleport, {
9155
9167
  disabled: _ctx.iconTarget === null,
@@ -9164,7 +9176,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
9164
9176
  name: "circle"
9165
9177
  }), _cache[2] || (_cache[2] = createTextVNode()), createVNode(_component_f_icon, {
9166
9178
  name: "i"
9167
- }), _cache[3] || (_cache[3] = createTextVNode()), createElementVNode("span", _hoisted_3$n, toDisplayString(_ctx.screenReaderText), 1)])], 8, _hoisted_1$A)], 8, ["disabled", "to"])), _cache[7] || (_cache[7] = createTextVNode()), createElementVNode("div", mergeProps({
9179
+ }), _cache[3] || (_cache[3] = createTextVNode()), createElementVNode("span", _hoisted_3$n, toDisplayString(_ctx.screenReaderText), 1)])], 8, _hoisted_1$B)], 8, ["disabled", "to"])), _cache[7] || (_cache[7] = createTextVNode()), createElementVNode("div", mergeProps({
9168
9180
  ref: "wrapper",
9169
9181
  class: "tooltip"
9170
9182
  }, _ctx.$attrs), [_ctx.ready ? (openBlock(), createElementBlock("div", _hoisted_4$k, [_ctx.hasHeader ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.headerTag), {
@@ -9182,7 +9194,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
9182
9194
  name: "close"
9183
9195
  })])])])) : createCommentVNode("", true)], 16)], 64);
9184
9196
  }
9185
- const FTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$A]]);
9197
+ const FTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$v]]);
9186
9198
  function* labelClasses(options) {
9187
9199
  const {
9188
9200
  labelClass
@@ -9223,7 +9235,7 @@ function isEqual(a, b) {
9223
9235
  }
9224
9236
  return a.every((_, i) => a[i] === b[i]);
9225
9237
  }
9226
- const _sfc_main$L = defineComponent({
9238
+ const _sfc_main$M = defineComponent({
9227
9239
  name: "FFieldset",
9228
9240
  components: {
9229
9241
  FIcon
@@ -9451,7 +9463,7 @@ const _sfc_main$L = defineComponent({
9451
9463
  }
9452
9464
  }
9453
9465
  });
9454
- const _hoisted_1$z = ["id"];
9466
+ const _hoisted_1$A = ["id"];
9455
9467
  const _hoisted_2$r = {
9456
9468
  key: 0,
9457
9469
  class: "sr-only"
@@ -9483,7 +9495,7 @@ const _hoisted_9$4 = {
9483
9495
  key: 0,
9484
9496
  class: "label__message label__message--error"
9485
9497
  };
9486
- function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
9498
+ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
9487
9499
  const _component_f_icon = resolveComponent("f-icon");
9488
9500
  return openBlock(), createElementBlock("fieldset", {
9489
9501
  id: _ctx.id,
@@ -9518,11 +9530,11 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
9518
9530
  name: "error"
9519
9531
  }), createTextVNode(" " + toDisplayString(_ctx.validity.validationMessage), 1)])) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("div", {
9520
9532
  class: normalizeClass(_ctx.groupContentClass)
9521
- }, [renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_1$z);
9533
+ }, [renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_1$A);
9522
9534
  }
9523
- const FFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$z]]);
9535
+ const FFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$u]]);
9524
9536
  const anyType$1 = [String, Object, Array, Number, Date, Boolean];
9525
- const _sfc_main$K = defineComponent({
9537
+ const _sfc_main$L = defineComponent({
9526
9538
  name: "FCheckboxField",
9527
9539
  inheritAttrs: false,
9528
9540
  props: {
@@ -9708,7 +9720,7 @@ const _sfc_main$K = defineComponent({
9708
9720
  }
9709
9721
  }
9710
9722
  });
9711
- const _hoisted_1$y = ["id", "disabled"];
9723
+ const _hoisted_1$z = ["id", "disabled"];
9712
9724
  const _hoisted_2$q = ["for"];
9713
9725
  const _hoisted_3$l = {
9714
9726
  key: 0,
@@ -9718,7 +9730,7 @@ const _hoisted_4$i = {
9718
9730
  key: 0,
9719
9731
  class: "checkbox__details"
9720
9732
  };
9721
- function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
9733
+ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
9722
9734
  return openBlock(), createElementBlock("div", {
9723
9735
  class: normalizeClass(["checkbox", _ctx.disabledClass]),
9724
9736
  onValidity: _cache[2] || (_cache[2] = (...args) => _ctx.onValidity && _ctx.onValidity(...args))
@@ -9731,7 +9743,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
9731
9743
  disabled: _ctx.disabled,
9732
9744
  onKeydown: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.onKeydown && _ctx.onKeydown(...args), ["space"])),
9733
9745
  onChange: _cache[1] || (_cache[1] = ($event) => _ctx.updateExpandedFlag())
9734
- }), null, 16, _hoisted_1$y), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("label", {
9746
+ }), null, 16, _hoisted_1$z), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("label", {
9735
9747
  class: normalizeClass(_ctx.$slots.details ? "checkbox__label checkbox__width" : "checkbox__label"),
9736
9748
  for: _ctx.id
9737
9749
  }, [renderSlot(_ctx.$slots, "default"), _cache[8] || (_cache[8] = createTextVNode()), _ctx.$slots.details ? (openBlock(), createElementBlock(Fragment, {
@@ -9748,7 +9760,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
9748
9760
  _: 3
9749
9761
  }, 8, ["onEnter", "onAfterEnter", "onLeave"])) : createCommentVNode("", true)], 64)) : createCommentVNode("", true)], 10, _hoisted_2$q)], 34);
9750
9762
  }
9751
- const FCheckboxField = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$y]]);
9763
+ const FCheckboxField = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$t]]);
9752
9764
  var es_iterator_some = {};
9753
9765
  var hasRequiredEs_iterator_some;
9754
9766
  function requireEs_iterator_some() {
@@ -9827,7 +9839,7 @@ async function doMenuAction$1(action, target) {
9827
9839
  }
9828
9840
  const preventKeys$1 = ["Tab", "Up", "Down", "ArrowUp", "ArrowDown", "Home", "End", " ", "Spacebar", "Enter", "Escape"];
9829
9841
  const keyUp = ["ArrowUp", "Up"];
9830
- const _sfc_main$J = defineComponent({
9842
+ const _sfc_main$K = defineComponent({
9831
9843
  name: "FContextMenu",
9832
9844
  components: {
9833
9845
  IPopup,
@@ -9991,7 +10003,7 @@ const _sfc_main$J = defineComponent({
9991
10003
  }
9992
10004
  }
9993
10005
  });
9994
- const _hoisted_1$x = ["aria-label"];
10006
+ const _hoisted_1$y = ["aria-label"];
9995
10007
  const _hoisted_2$p = {
9996
10008
  ref: "contextmenu",
9997
10009
  role: "menu",
@@ -10004,7 +10016,7 @@ const _hoisted_5$e = {
10004
10016
  key: 0,
10005
10017
  class: "contextmenu__separator"
10006
10018
  };
10007
- function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
10019
+ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
10008
10020
  const _component_f_icon = resolveComponent("f-icon");
10009
10021
  const _component_i_popup = resolveComponent("i-popup");
10010
10022
  return openBlock(), createBlock(_component_i_popup, {
@@ -10040,11 +10052,11 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
10040
10052
  ref_for: true,
10041
10053
  ref: "anchors"
10042
10054
  }, toDisplayString(item.label), 513)], 8, _hoisted_4$h), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasSeparatorAfterItemAt(index) ? (openBlock(), createElementBlock("hr", _hoisted_5$e)) : createCommentVNode("", true)], 8, _hoisted_3$k);
10043
- }), 128))], 512)], 40, _hoisted_1$x)]),
10055
+ }), 128))], 512)], 40, _hoisted_1$y)]),
10044
10056
  _: 1
10045
10057
  }, 8, ["is-open", "anchor", "focus-element"]);
10046
10058
  }
10047
- const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$x]]);
10059
+ const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$s]]);
10048
10060
  var Operation = /* @__PURE__ */ ((Operation2) => {
10049
10061
  Operation2[Operation2["ADD"] = 0] = "ADD";
10050
10062
  Operation2[Operation2["DELETE"] = 1] = "DELETE";
@@ -10052,30 +10064,14 @@ var Operation = /* @__PURE__ */ ((Operation2) => {
10052
10064
  Operation2[Operation2["NONE"] = 3] = "NONE";
10053
10065
  return Operation2;
10054
10066
  })(Operation || {});
10055
- const _sfc_main$I = defineComponent({
10056
- name: "FCrudDataset",
10057
- components: {
10058
- FFormModal,
10059
- FConfirmModal,
10060
- FIcon
10061
- },
10062
- mixins: [TranslationMixin],
10063
- provide() {
10064
- return {
10065
- delete: (item) => {
10066
- this.deleteItem(item);
10067
- },
10068
- modify: (item) => {
10069
- this.updateItem(item);
10070
- },
10071
- registerCallbackAfterItemAdd: (callback) => {
10072
- this.callbackAfterItemAdd = callback;
10073
- },
10074
- registerCallbackBeforeItemDelete: (callback) => {
10075
- this.callbackBeforeItemDelete = callback;
10076
- }
10077
- };
10078
- },
10067
+ const _hoisted_1$x = {
10068
+ class: "crud-dataset"
10069
+ };
10070
+ const _hoisted_2$o = {
10071
+ key: 0
10072
+ };
10073
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
10074
+ __name: "FCrudDataset",
10079
10075
  props: {
10080
10076
  /**
10081
10077
  * The list of items that should be deleted, modified or added to.
@@ -10159,25 +10155,24 @@ const _sfc_main$I = defineComponent({
10159
10155
  }
10160
10156
  },
10161
10157
  emits: ["created", "deleted", "updated", "update:modelValue"],
10162
- data() {
10163
- return {
10164
- result: [],
10165
- Operation,
10166
- operation: Operation.NONE,
10167
- item: null,
10168
- originalItemToUpdate: null,
10169
- isFormModalOpen: false,
10170
- isConfirmModalOpen: false,
10171
- callbackAfterItemAdd() {
10172
- },
10173
- callbackBeforeItemDelete() {
10174
- }
10175
- };
10176
- },
10177
- computed: {
10178
- formModalButtons() {
10179
- const confirmButtonText = this.operation === Operation.ADD ? this.$t("fkui.crud-dataset.modal.confirm.add", "Lägg till") : this.$t("fkui.crud-dataset.modal.confirm.modify", "Spara");
10180
- const cancelButtonText = this.operation === Operation.ADD ? this.$t("fkui.crud-dataset.modal.cancel.add", "Avbryt") : this.$t("fkui.crud-dataset.modal.cancel.modify", "Avbryt");
10158
+ setup(__props, {
10159
+ emit: __emit
10160
+ }) {
10161
+ const $t2 = useTranslate();
10162
+ const slots = useSlots();
10163
+ const result = ref([]);
10164
+ const operation = ref(Operation.NONE);
10165
+ const item = ref(null);
10166
+ const originalItemToUpdate = ref(null);
10167
+ const isFormModalOpen = ref(false);
10168
+ const isConfirmModalOpen = ref(false);
10169
+ const callbackAfterItemAdd = ref(() => ({}));
10170
+ const callbackBeforeItemDelete = ref(() => ({}));
10171
+ const props = __props;
10172
+ const emit = __emit;
10173
+ const formModalButtons = computed(() => {
10174
+ const confirmButtonText = operation.value === Operation.ADD ? $t2("fkui.crud-dataset.modal.confirm.add", "Lägg till") : $t2("fkui.crud-dataset.modal.confirm.modify", "Spara");
10175
+ const cancelButtonText = operation.value === Operation.ADD ? $t2("fkui.crud-dataset.modal.cancel.add", "Avbryt") : $t2("fkui.crud-dataset.modal.cancel.modify", "Avbryt");
10181
10176
  return [{
10182
10177
  label: confirmButtonText,
10183
10178
  event: "confirm",
@@ -10189,182 +10184,175 @@ const _sfc_main$I = defineComponent({
10189
10184
  type: "secondary",
10190
10185
  submitButton: false
10191
10186
  }];
10192
- },
10193
- confirmDeleteButtons() {
10187
+ });
10188
+ const confirmDeleteButtons = computed(() => {
10194
10189
  return [{
10195
- label: this.$t("fkui.crud-dataset.modal.confirm.delete", "Ja, ta bort"),
10190
+ label: $t2("fkui.crud-dataset.modal.confirm.delete", "Ja, ta bort"),
10196
10191
  type: "primary",
10197
10192
  event: "confirm"
10198
10193
  }, {
10199
- label: this.$t("fkui.crud-dataset.modal.cancel.delete", "Nej, avbryt"),
10194
+ label: $t2("fkui.crud-dataset.modal.cancel.delete", "Nej, avbryt"),
10200
10195
  type: "secondary"
10201
10196
  }];
10202
- },
10203
- hasAddSlot() {
10204
- return Boolean(this.$slots.add);
10205
- },
10206
- hasDeleteSlot() {
10207
- return Boolean(this.$slots.delete);
10208
- },
10209
- hasModifySlot() {
10210
- return Boolean(this.$slots.modify);
10211
- },
10212
- formModalHeader() {
10213
- return this.operation === Operation.ADD ? this.addNewModalHeader : this.modifyModalHeader;
10214
- }
10215
- },
10216
- watch: {
10217
- modelValue: {
10218
- immediate: true,
10219
- deep: true,
10220
- handler(data) {
10221
- this.result = [...data];
10197
+ });
10198
+ const hasAddSlot = computed(() => {
10199
+ return Boolean(slots.add);
10200
+ });
10201
+ const hasDeleteSlot = computed(() => {
10202
+ return Boolean(slots.delete);
10203
+ });
10204
+ const hasModifySlot = computed(() => {
10205
+ return Boolean(slots.modify);
10206
+ });
10207
+ const formModalHeader = computed(() => {
10208
+ return operation.value === Operation.ADD ? props.addNewModalHeader : props.modifyModalHeader;
10209
+ });
10210
+ provide("delete", deleteItem);
10211
+ provide("modify", updateItem);
10212
+ provide("registerCallbackAfterItemAdd", (callback) => {
10213
+ callbackAfterItemAdd.value = callback;
10214
+ });
10215
+ provide("registerCallbackBeforeItemDelete", (callback) => {
10216
+ callbackBeforeItemDelete.value = callback;
10217
+ });
10218
+ onMounted(() => {
10219
+ if (!hasAddSlot.value && !hasDeleteSlot.value && !hasModifySlot.value) {
10220
+ throw Error("At least one template of the following must be defined. #add, #delete or #modify");
10222
10221
  }
10223
- }
10224
- },
10225
- mounted() {
10226
- if (!this.hasAddSlot && !this.hasDeleteSlot && !this.hasModifySlot) {
10227
- throw Error("Atleast one template of the following must be defined. #add, #delete or #modify");
10228
- }
10229
- },
10230
- methods: {
10231
- createItem() {
10232
- if (!this.hasAddSlot) {
10222
+ });
10223
+ watch(() => props.modelValue, (data) => {
10224
+ result.value = [...data];
10225
+ }, {
10226
+ immediate: true,
10227
+ deep: true
10228
+ });
10229
+ function createItem() {
10230
+ if (!hasAddSlot.value) {
10233
10231
  throw Error("No template is defined for #add");
10234
10232
  }
10235
- this.operation = Operation.ADD;
10236
- this.item = this.beforeCreate ? this.beforeCreate() : {};
10237
- this.isFormModalOpen = true;
10238
- },
10239
- deleteItem(item) {
10240
- if (!this.hasDeleteSlot) {
10233
+ operation.value = Operation.ADD;
10234
+ item.value = props.beforeCreate ? props.beforeCreate() : {};
10235
+ isFormModalOpen.value = true;
10236
+ }
10237
+ function deleteItem(current) {
10238
+ if (!hasDeleteSlot.value) {
10241
10239
  throw Error("No template is defined for #delete");
10242
10240
  }
10243
- this.operation = Operation.DELETE;
10244
- this.item = item;
10245
- this.isConfirmModalOpen = true;
10246
- },
10247
- onDeleteConfirm() {
10248
- if (!this.item) {
10241
+ operation.value = Operation.DELETE;
10242
+ item.value = current;
10243
+ isConfirmModalOpen.value = true;
10244
+ }
10245
+ function onDeleteConfirm() {
10246
+ if (!item.value) {
10249
10247
  return;
10250
10248
  }
10251
- this.callbackBeforeItemDelete(this.item);
10252
- this.result = this.result.filter((item) => item !== this.item);
10253
- this.$emit("deleted", this.item);
10254
- this.$emit("update:modelValue", this.result);
10255
- alertScreenReader(this.$t("fkui.crud-dataset.aria-live.delete", "Raden har tagits bort"), {
10249
+ callbackBeforeItemDelete.value(item.value);
10250
+ result.value = result.value.filter((it) => it !== item.value);
10251
+ emit("deleted", item.value);
10252
+ emit("update:modelValue", result.value);
10253
+ alertScreenReader($t2("fkui.crud-dataset.aria-live.delete", "Raden har tagits bort"), {
10256
10254
  assertive: true
10257
10255
  });
10258
- },
10259
- onDeleteClose(e) {
10260
- this.onModalClose();
10261
- if (e.reason === "close" && this.onCancel) {
10262
- this.onCancel();
10256
+ }
10257
+ function onDeleteClose(e) {
10258
+ onModalClose();
10259
+ if (e.reason === "close" && props.onCancel) {
10260
+ props.onCancel();
10263
10261
  }
10264
- },
10265
- onModalClose() {
10266
- this.isFormModalOpen = false;
10267
- this.isConfirmModalOpen = false;
10268
- },
10269
- onFormModalSubmit() {
10270
- if (!this.item) {
10262
+ }
10263
+ function onModalClose() {
10264
+ isFormModalOpen.value = false;
10265
+ isConfirmModalOpen.value = false;
10266
+ }
10267
+ function onFormModalSubmit() {
10268
+ if (!item.value) {
10271
10269
  return;
10272
10270
  }
10273
- if (this.operation === Operation.ADD) {
10274
- this.result.push(this.item);
10275
- this.$emit("created", this.item);
10276
- this.$emit("update:modelValue", this.result);
10277
- this.callbackAfterItemAdd(this.item);
10278
- alertScreenReader(this.$t("fkui.crud-dataset.aria-live.add", "En rad har lagts till"), {
10271
+ if (operation.value === Operation.ADD) {
10272
+ result.value.push(item.value);
10273
+ emit("created", item.value);
10274
+ emit("update:modelValue", result.value);
10275
+ callbackAfterItemAdd.value(item.value);
10276
+ alertScreenReader($t2("fkui.crud-dataset.aria-live.add", "En rad har lagts till"), {
10279
10277
  assertive: true
10280
10278
  });
10281
- } else if (this.operation === Operation.MODIFY) {
10282
- if (this.originalItemToUpdate) {
10283
- Object.assign(this.originalItemToUpdate, this.item);
10279
+ } else if (operation.value === Operation.MODIFY) {
10280
+ if (originalItemToUpdate.value) {
10281
+ Object.assign(originalItemToUpdate.value, item.value);
10284
10282
  } else {
10285
- this.originalItemToUpdate = this.item;
10283
+ originalItemToUpdate.value = item.value;
10286
10284
  }
10287
- this.$emit("updated", this.originalItemToUpdate);
10288
- this.$emit("update:modelValue", this.result);
10289
- alertScreenReader(this.$t("fkui.crud-dataset.aria-live.modify", "Raden har ändrats"), {
10285
+ emit("updated", originalItemToUpdate.value);
10286
+ emit("update:modelValue", result.value);
10287
+ alertScreenReader($t2("fkui.crud-dataset.aria-live.modify", "Raden har ändrats"), {
10290
10288
  assertive: true
10291
10289
  });
10292
10290
  }
10293
- this.isFormModalOpen = false;
10294
- },
10295
- updateItem(item) {
10296
- if (!this.hasModifySlot) {
10291
+ isFormModalOpen.value = false;
10292
+ }
10293
+ function updateItem(current) {
10294
+ if (!hasModifySlot.value) {
10297
10295
  throw Error("No template is defined for #modify");
10298
10296
  }
10299
- this.operation = Operation.MODIFY;
10300
- this.originalItemToUpdate = item;
10301
- this.item = deepClone(item);
10302
- this.isFormModalOpen = true;
10297
+ operation.value = Operation.MODIFY;
10298
+ originalItemToUpdate.value = current;
10299
+ item.value = deepClone(current);
10300
+ isFormModalOpen.value = true;
10303
10301
  }
10302
+ return (_ctx, _cache) => {
10303
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [renderSlot(_ctx.$slots, "default"), _cache[5] || (_cache[5] = createTextVNode()), hasAddSlot.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, [createElementVNode("button", {
10304
+ "data-test": "f-crud-dataset-add-button",
10305
+ type: "button",
10306
+ class: "button button--tertiary crud-dataset__add-button",
10307
+ onClick: _cache[0] || (_cache[0] = ($event) => createItem())
10308
+ }, [createVNode(unref(FIcon), {
10309
+ class: "button__icon",
10310
+ name: "plus"
10311
+ }), _cache[1] || (_cache[1] = createTextVNode()), renderSlot(_ctx.$slots, "add-button", {}, () => [createTextVNode(toDisplayString(unref($t2)("fkui.crud-dataset.button.add", "Lägg till ny")), 1)])])])) : createCommentVNode("", true), _cache[6] || (_cache[6] = createTextVNode()), createVNode(unref(FFormModal), {
10312
+ "is-open": isFormModalOpen.value,
10313
+ "aria-close-text": unref($t2)("fkui.crud-dataset.modal.close", "Stäng"),
10314
+ buttons: formModalButtons.value,
10315
+ "use-error-list": false,
10316
+ "before-submit": __props.beforeSubmit,
10317
+ "before-validation": __props.beforeValidation,
10318
+ "on-cancel": __props.onCancel,
10319
+ onClose: onModalClose,
10320
+ onCancel: __props.onCancel,
10321
+ onSubmit: onFormModalSubmit
10322
+ }, {
10323
+ header: withCtx(() => [createTextVNode(toDisplayString(formModalHeader.value), 1)]),
10324
+ "input-text-fields": withCtx(() => [operation.value === unref(Operation).ADD ? renderSlot(_ctx.$slots, "add", normalizeProps(mergeProps({
10325
+ key: 0
10326
+ }, {
10327
+ item: item.value
10328
+ }))) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), operation.value === unref(Operation).MODIFY ? renderSlot(_ctx.$slots, "modify", normalizeProps(mergeProps({
10329
+ key: 1
10330
+ }, {
10331
+ item: item.value
10332
+ }))) : createCommentVNode("", true)]),
10333
+ _: 3
10334
+ }, 8, ["is-open", "aria-close-text", "buttons", "before-submit", "before-validation", "on-cancel", "onCancel"]), _cache[7] || (_cache[7] = createTextVNode()), createVNode(unref(FConfirmModal), {
10335
+ "is-open": isConfirmModalOpen.value,
10336
+ buttons: confirmDeleteButtons.value,
10337
+ onConfirm: onDeleteConfirm,
10338
+ onClose: onDeleteClose
10339
+ }, {
10340
+ heading: withCtx(() => [createTextVNode(toDisplayString(__props.deleteModalHeader), 1)]),
10341
+ content: withCtx(() => [renderSlot(_ctx.$slots, "delete", normalizeProps(guardReactiveProps({
10342
+ item: item.value
10343
+ })))]),
10344
+ _: 3
10345
+ }, 8, ["is-open", "buttons"])]);
10346
+ };
10304
10347
  }
10305
10348
  });
10306
- const _hoisted_1$w = {
10307
- class: "crud-dataset"
10308
- };
10309
- const _hoisted_2$o = {
10310
- key: 0
10311
- };
10312
- function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
10313
- const _component_f_icon = resolveComponent("f-icon");
10314
- const _component_f_form_modal = resolveComponent("f-form-modal");
10315
- const _component_f_confirm_modal = resolveComponent("f-confirm-modal");
10316
- return openBlock(), createElementBlock("div", _hoisted_1$w, [renderSlot(_ctx.$slots, "default"), _cache[5] || (_cache[5] = createTextVNode()), _ctx.hasAddSlot ? (openBlock(), createElementBlock("div", _hoisted_2$o, [createElementVNode("button", {
10317
- "data-test": "f-crud-dataset-add-button",
10318
- type: "button",
10319
- class: "button button--tertiary crud-dataset__add-button",
10320
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.createItem())
10321
- }, [createVNode(_component_f_icon, {
10322
- class: "button__icon",
10323
- name: "plus"
10324
- }), _cache[1] || (_cache[1] = createTextVNode()), renderSlot(_ctx.$slots, "add-button", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.crud-dataset.button.add", "Lägg till ny")), 1)])])])) : createCommentVNode("", true), _cache[6] || (_cache[6] = createTextVNode()), createVNode(_component_f_form_modal, {
10325
- "is-open": _ctx.isFormModalOpen,
10326
- "aria-close-text": _ctx.$t("fkui.crud-dataset.modal.close", "Stäng"),
10327
- buttons: _ctx.formModalButtons,
10328
- "use-error-list": false,
10329
- "before-submit": _ctx.beforeSubmit,
10330
- "before-validation": _ctx.beforeValidation,
10331
- "on-cancel": _ctx.onCancel,
10332
- onClose: _ctx.onModalClose,
10333
- onCancel: _ctx.onCancel,
10334
- onSubmit: _ctx.onFormModalSubmit
10335
- }, {
10336
- header: withCtx(() => [createTextVNode(toDisplayString(_ctx.formModalHeader), 1)]),
10337
- "input-text-fields": withCtx(() => [_ctx.operation === _ctx.Operation.ADD ? renderSlot(_ctx.$slots, "add", normalizeProps(mergeProps({
10338
- key: 0
10339
- }, {
10340
- item: _ctx.item
10341
- }))) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _ctx.operation === _ctx.Operation.MODIFY ? renderSlot(_ctx.$slots, "modify", normalizeProps(mergeProps({
10342
- key: 1
10343
- }, {
10344
- item: _ctx.item
10345
- }))) : createCommentVNode("", true)]),
10346
- _: 3
10347
- }, 8, ["is-open", "aria-close-text", "buttons", "before-submit", "before-validation", "on-cancel", "onClose", "onCancel", "onSubmit"]), _cache[7] || (_cache[7] = createTextVNode()), createVNode(_component_f_confirm_modal, {
10348
- "is-open": _ctx.isConfirmModalOpen,
10349
- buttons: _ctx.confirmDeleteButtons,
10350
- onConfirm: _ctx.onDeleteConfirm,
10351
- onClose: _ctx.onDeleteClose
10352
- }, {
10353
- heading: withCtx(() => [createTextVNode(toDisplayString(_ctx.deleteModalHeader), 1)]),
10354
- content: withCtx(() => [renderSlot(_ctx.$slots, "delete", normalizeProps(guardReactiveProps({
10355
- item: _ctx.item
10356
- })))]),
10357
- _: 3
10358
- }, 8, ["is-open", "buttons", "onConfirm", "onClose"])]);
10359
- }
10360
- const FCrudDataset = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$w]]);
10361
10349
  function FCrudDatasetInjected() {
10362
10350
  return {
10363
10351
  delete: inject("delete"),
10364
10352
  modify: inject("modify")
10365
10353
  };
10366
10354
  }
10367
- const _sfc_main$H = defineComponent({
10355
+ const _sfc_main$I = defineComponent({
10368
10356
  name: "FCrudButton",
10369
10357
  components: {
10370
10358
  FIcon
@@ -10420,11 +10408,11 @@ const _sfc_main$H = defineComponent({
10420
10408
  }
10421
10409
  }
10422
10410
  });
10423
- const _hoisted_1$v = {
10411
+ const _hoisted_1$w = {
10424
10412
  key: 1,
10425
10413
  class: "sr-only"
10426
10414
  };
10427
- function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
10415
+ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
10428
10416
  const _component_f_icon = resolveComponent("f-icon");
10429
10417
  return openBlock(), createElementBlock("button", {
10430
10418
  type: "button",
@@ -10434,11 +10422,11 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
10434
10422
  key: 0,
10435
10423
  class: "button__icon",
10436
10424
  name: _ctx.iconName
10437
- }, null, 8, ["name"])) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), !_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$v, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.buttonText), 1)])])) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _ctx.label ? renderSlot(_ctx.$slots, "default", {
10425
+ }, null, 8, ["name"])) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), !_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$w, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.buttonText), 1)])])) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _ctx.label ? renderSlot(_ctx.$slots, "default", {
10438
10426
  key: 2
10439
10427
  }, () => [createTextVNode(toDisplayString(_ctx.buttonText), 1)]) : createCommentVNode("", true)]);
10440
10428
  }
10441
- const FCrudButton = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$v]]);
10429
+ const FCrudButton = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$r]]);
10442
10430
  function ActivateItemInjected() {
10443
10431
  return {
10444
10432
  registerCallbackAfterItemAdd: inject("registerCallbackAfterItemAdd", () => void 0),
@@ -10522,7 +10510,7 @@ function FTableInjected() {
10522
10510
  renderColumns: inject("renderColumns", false)
10523
10511
  };
10524
10512
  }
10525
- const _sfc_main$G = defineComponent({
10513
+ const _sfc_main$H = defineComponent({
10526
10514
  name: "FTableColumn",
10527
10515
  inheritAttrs: false,
10528
10516
  props: {
@@ -10663,7 +10651,7 @@ const _sfc_main$G = defineComponent({
10663
10651
  });
10664
10652
  }
10665
10653
  });
10666
- function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
10654
+ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
10667
10655
  return _ctx.renderColumns && _ctx.visible ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), mergeProps({
10668
10656
  key: 0,
10669
10657
  class: _ctx.classes,
@@ -10675,7 +10663,7 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
10675
10663
  _: 3
10676
10664
  }, 16, ["class", "scope"])) : createCommentVNode("", true);
10677
10665
  }
10678
- const FTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$u]]);
10666
+ const FTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$q]]);
10679
10667
  function FSortFilterDatasetInjected() {
10680
10668
  return {
10681
10669
  sort: inject("sort", () => void 0),
@@ -10683,7 +10671,7 @@ function FSortFilterDatasetInjected() {
10683
10671
  registerCallbackOnMount: inject("registerCallbackOnMount", () => void 0)
10684
10672
  };
10685
10673
  }
10686
- const _sfc_main$F = defineComponent({
10674
+ const _sfc_main$G = defineComponent({
10687
10675
  name: "FLabel",
10688
10676
  components: {
10689
10677
  FIcon
@@ -10722,7 +10710,7 @@ const _sfc_main$F = defineComponent({
10722
10710
  }
10723
10711
  }
10724
10712
  });
10725
- const _hoisted_1$u = {
10713
+ const _hoisted_1$v = {
10726
10714
  key: 0
10727
10715
  };
10728
10716
  const _hoisted_2$n = {
@@ -10740,9 +10728,9 @@ const _hoisted_7$a = {
10740
10728
  key: 0,
10741
10729
  class: "label__message label__message--error"
10742
10730
  };
10743
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
10731
+ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
10744
10732
  const _component_f_icon = resolveComponent("f-icon");
10745
- return _ctx.$slots.tooltip ? (openBlock(), createElementBlock("div", _hoisted_1$u, [_ctx.hasDefaultSlot ? (openBlock(), createElementBlock("div", _hoisted_2$n, [createElementVNode("label", {
10733
+ return _ctx.$slots.tooltip ? (openBlock(), createElementBlock("div", _hoisted_1$v, [_ctx.hasDefaultSlot ? (openBlock(), createElementBlock("div", _hoisted_2$n, [createElementVNode("label", {
10746
10734
  class: "label",
10747
10735
  for: _ctx.forProperty
10748
10736
  }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_3$j)], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "tooltip"), _cache[3] || (_cache[3] = createTextVNode()), _ctx.hasDescriptionSlot || _ctx.hasErrorMessageSlot ? (openBlock(), createElementBlock("label", {
@@ -10767,11 +10755,11 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
10767
10755
  name: "error"
10768
10756
  }), _cache[4] || (_cache[4] = createTextVNode()), renderSlot(_ctx.$slots, "error-message")])) : createCommentVNode("", true)], 8, _hoisted_6$b));
10769
10757
  }
10770
- const FLabel = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$t]]);
10758
+ const FLabel = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$p]]);
10771
10759
  function resolveWidthClass$1(words, inline) {
10772
10760
  return inline ? void 0 : words.split(" ").map((word) => `i-width-${word}`).join(" ");
10773
10761
  }
10774
- const _sfc_main$E = defineComponent({
10762
+ const _sfc_main$F = defineComponent({
10775
10763
  name: "FSelectField",
10776
10764
  components: {
10777
10765
  FIcon,
@@ -10902,8 +10890,8 @@ const _sfc_main$E = defineComponent({
10902
10890
  }
10903
10891
  }
10904
10892
  });
10905
- const _hoisted_1$t = ["id"];
10906
- function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
10893
+ const _hoisted_1$u = ["id"];
10894
+ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
10907
10895
  const _component_f_label = resolveComponent("f-label");
10908
10896
  const _component_f_icon = resolveComponent("f-icon");
10909
10897
  return openBlock(), createElementBlock("div", {
@@ -10940,7 +10928,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
10940
10928
  id: _ctx.id,
10941
10929
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vModel = $event),
10942
10930
  class: "select-field__select"
10943
- }, _ctx.attrs), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$t), [[vModelSelect, _ctx.vModel]]), _cache[5] || (_cache[5] = createTextVNode()), _ctx.hasError && _ctx.textFieldTableMode ? (openBlock(), createBlock(_component_f_icon, {
10931
+ }, _ctx.attrs), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$u), [[vModelSelect, _ctx.vModel]]), _cache[5] || (_cache[5] = createTextVNode()), _ctx.hasError && _ctx.textFieldTableMode ? (openBlock(), createBlock(_component_f_icon, {
10944
10932
  key: 0,
10945
10933
  ref: "icon",
10946
10934
  class: "text-field__icon input-icon select-field__error-popup-icon",
@@ -10950,7 +10938,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
10950
10938
  name: "arrow-down"
10951
10939
  })], 2)], 34);
10952
10940
  }
10953
- const FSelectField = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$s]]);
10941
+ const FSelectField = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$o]]);
10954
10942
  function resolveWidthClass(words, inline) {
10955
10943
  return inline ? void 0 : words.split(" ").map((word) => `i-width-${word}`).join(" ");
10956
10944
  }
@@ -10994,14 +10982,14 @@ function useTextFieldSetup(props) {
10994
10982
  closeDropdown
10995
10983
  };
10996
10984
  }
10997
- const _sfc_main$D = defineComponent({
10985
+ const _sfc_main$E = defineComponent({
10998
10986
  name: "FTextField",
10999
10987
  components: {
11000
10988
  FLabel,
11001
10989
  FIcon,
11002
10990
  IPopupError,
11003
- IComboboxDropdown: _sfc_main$O,
11004
- IComboboxToggleButton: _sfc_main$N
10991
+ IComboboxDropdown: _sfc_main$P,
10992
+ IComboboxToggleButton: _sfc_main$O
11005
10993
  },
11006
10994
  inheritAttrs: false,
11007
10995
  props: {
@@ -11332,7 +11320,7 @@ const _sfc_main$D = defineComponent({
11332
11320
  }
11333
11321
  }
11334
11322
  });
11335
- const _hoisted_1$s = {
11323
+ const _hoisted_1$t = {
11336
11324
  key: 0
11337
11325
  };
11338
11326
  const _hoisted_2$m = {
@@ -11355,7 +11343,7 @@ const _hoisted_7$9 = {
11355
11343
  key: 3,
11356
11344
  class: "text-field__append-inner"
11357
11345
  };
11358
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
11346
+ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
11359
11347
  const _component_f_label = resolveComponent("f-label");
11360
11348
  const _component_f_icon = resolveComponent("f-icon");
11361
11349
  const _component_i_popup_error = resolveComponent("i-popup-error");
@@ -11369,7 +11357,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
11369
11357
  for: _ctx.id,
11370
11358
  class: normalizeClass(_ctx.labelClass)
11371
11359
  }, createSlots({
11372
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.defaultText !== "" ? (openBlock(), createElementBlock("span", _hoisted_1$s, toDisplayString(_ctx.defaultText), 1)) : createCommentVNode("", true)])]),
11360
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.defaultText !== "" ? (openBlock(), createElementBlock("span", _hoisted_1$t, toDisplayString(_ctx.defaultText), 1)) : createCommentVNode("", true)])]),
11373
11361
  description: withCtx(({
11374
11362
  descriptionClass,
11375
11363
  formatDescriptionClass
@@ -11438,8 +11426,8 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
11438
11426
  onClose: _ctx.onDropdownClose
11439
11427
  }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node", "onSelect", "onClose"])) : createCommentVNode("", true)], 2);
11440
11428
  }
11441
- const FTextField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$r]]);
11442
- const _sfc_main$C = defineComponent({
11429
+ const FTextField = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$n]]);
11430
+ const _sfc_main$D = defineComponent({
11443
11431
  name: "FEmailTextField",
11444
11432
  components: {
11445
11433
  FTextField
@@ -11555,10 +11543,10 @@ const _sfc_main$C = defineComponent({
11555
11543
  }
11556
11544
  }
11557
11545
  });
11558
- const _hoisted_1$r = {
11546
+ const _hoisted_1$s = {
11559
11547
  key: 0
11560
11548
  };
11561
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
11549
+ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
11562
11550
  const _component_f_text_field = resolveComponent("f-text-field");
11563
11551
  return openBlock(), createElementBlock("div", null, [createVNode(_component_f_text_field, mergeProps({
11564
11552
  id: _ctx.id,
@@ -11572,7 +11560,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
11572
11560
  onValidity: _ctx.onValidity,
11573
11561
  onPendingValidity: _ctx.onPendingValidity
11574
11562
  }), {
11575
- "error-message": withCtx(() => [_ctx.showPasteErrorMessage ? (openBlock(), createElementBlock("span", _hoisted_1$r, toDisplayString(_ctx.pasteErrorText), 1)) : createCommentVNode("", true)]),
11563
+ "error-message": withCtx(() => [_ctx.showPasteErrorMessage ? (openBlock(), createElementBlock("span", _hoisted_1$s, toDisplayString(_ctx.pasteErrorText), 1)) : createCommentVNode("", true)]),
11576
11564
  default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.defaultText), 1)]), _cache[2] || (_cache[2] = createTextVNode())]),
11577
11565
  _: 3
11578
11566
  }, 16, ["id", "maxlength", "model-value", "onChange", "onBlur", "onUpdate:modelValue", "onValidity", "onPendingValidity"]), _cache[3] || (_cache[3] = createTextVNode()), _ctx.extendedValidation ? (openBlock(), createBlock(_component_f_text_field, {
@@ -11588,8 +11576,8 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
11588
11576
  _: 3
11589
11577
  }, 8, ["modelValue", "maxlength", "onPaste"])) : createCommentVNode("", true)]);
11590
11578
  }
11591
- const FEmailTextField = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$q]]);
11592
- const _sfc_main$B = defineComponent({
11579
+ const FEmailTextField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$m]]);
11580
+ const _sfc_main$C = defineComponent({
11593
11581
  name: "FPhoneTextField",
11594
11582
  components: {
11595
11583
  FTextField
@@ -11689,7 +11677,7 @@ const _sfc_main$B = defineComponent({
11689
11677
  }
11690
11678
  }
11691
11679
  });
11692
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
11680
+ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
11693
11681
  const _component_f_text_field = resolveComponent("f-text-field");
11694
11682
  return openBlock(), createElementBlock("div", null, [createVNode(_component_f_text_field, mergeProps({
11695
11683
  id: _ctx.id,
@@ -11716,8 +11704,8 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
11716
11704
  _: 3
11717
11705
  }, 8, ["modelValue", "maxlength"])) : createCommentVNode("", true)]);
11718
11706
  }
11719
- const FPhoneTextField = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$p]]);
11720
- const _sfc_main$A = defineComponent({
11707
+ const FPhoneTextField = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$l]]);
11708
+ const _sfc_main$B = defineComponent({
11721
11709
  name: "FCurrencyTextField",
11722
11710
  extends: FTextField,
11723
11711
  mixins: [TranslationMixin],
@@ -11752,7 +11740,7 @@ const _sfc_main$A = defineComponent({
11752
11740
  ValidationService.validateElement(inputElement);
11753
11741
  }
11754
11742
  });
11755
- const _sfc_main$z = defineComponent({
11743
+ const _sfc_main$A = defineComponent({
11756
11744
  name: "FSearchTextField",
11757
11745
  components: {
11758
11746
  FTextField,
@@ -11812,10 +11800,10 @@ const _sfc_main$z = defineComponent({
11812
11800
  }
11813
11801
  }
11814
11802
  });
11815
- const _hoisted_1$q = {
11803
+ const _hoisted_1$r = {
11816
11804
  class: "sr-only"
11817
11805
  };
11818
- function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
11806
+ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
11819
11807
  const _component_f_icon = resolveComponent("f-icon");
11820
11808
  const _component_f_text_field = resolveComponent("f-text-field");
11821
11809
  return openBlock(), createElementBlock("div", null, [createVNode(_component_f_text_field, mergeProps({
@@ -11861,12 +11849,12 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
11861
11849
  }, [createVNode(_component_f_icon, {
11862
11850
  name: "cross",
11863
11851
  class: "clear-button__icon"
11864
- }), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("span", _hoisted_1$q, toDisplayString(_ctx.clearableScreenReaderText), 1)])]),
11852
+ }), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("span", _hoisted_1$r, toDisplayString(_ctx.clearableScreenReaderText), 1)])]),
11865
11853
  key: "1"
11866
11854
  } : void 0]), 1040, ["id", "maxlength", "model-value", "onChange", "onInput", "onBlur", "onUpdate"])]);
11867
11855
  }
11868
- const FSearchTextField = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$o]]);
11869
- const _sfc_main$y = defineComponent({
11856
+ const FSearchTextField = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$k]]);
11857
+ const _sfc_main$z = defineComponent({
11870
11858
  name: "FBankAccountNumberTextField",
11871
11859
  extends: FTextField,
11872
11860
  mixins: [TranslationMixin],
@@ -11895,7 +11883,7 @@ const _sfc_main$y = defineComponent({
11895
11883
  ValidationService.validateElement(inputElement);
11896
11884
  }
11897
11885
  });
11898
- const _sfc_main$x = defineComponent({
11886
+ const _sfc_main$y = defineComponent({
11899
11887
  name: "FBankgiroTextField",
11900
11888
  extends: FTextField,
11901
11889
  mixins: [TranslationMixin],
@@ -11927,7 +11915,7 @@ const _sfc_main$x = defineComponent({
11927
11915
  ValidationService.validateElement(inputElement);
11928
11916
  }
11929
11917
  });
11930
- const _sfc_main$w = defineComponent({
11918
+ const _sfc_main$x = defineComponent({
11931
11919
  name: "FClearingnumberTextField",
11932
11920
  extends: FTextField,
11933
11921
  mixins: [TranslationMixin],
@@ -11959,7 +11947,7 @@ const _sfc_main$w = defineComponent({
11959
11947
  function defaultFormatter$1(modelValue) {
11960
11948
  return formatNumber(modelValue, this.decimals);
11961
11949
  }
11962
- const _sfc_main$v = defineComponent({
11950
+ const _sfc_main$w = defineComponent({
11963
11951
  name: "FNumericTextField",
11964
11952
  extends: FTextField,
11965
11953
  props: {
@@ -11996,7 +11984,7 @@ const _sfc_main$v = defineComponent({
11996
11984
  ValidationService.validateElement(inputElement);
11997
11985
  }
11998
11986
  });
11999
- const _sfc_main$u = defineComponent({
11987
+ const _sfc_main$v = defineComponent({
12000
11988
  name: "FPersonnummerTextField",
12001
11989
  extends: FTextField,
12002
11990
  mixins: [TranslationMixin],
@@ -12036,7 +12024,7 @@ const _sfc_main$u = defineComponent({
12036
12024
  ValidationService.validateElement(inputElement);
12037
12025
  }
12038
12026
  });
12039
- const _sfc_main$t = defineComponent({
12027
+ const _sfc_main$u = defineComponent({
12040
12028
  name: "FPlusgiroTextField",
12041
12029
  extends: FTextField,
12042
12030
  mixins: [TranslationMixin],
@@ -12068,7 +12056,7 @@ const _sfc_main$t = defineComponent({
12068
12056
  ValidationService.validateElement(inputElement);
12069
12057
  }
12070
12058
  });
12071
- const _sfc_main$s = defineComponent({
12059
+ const _sfc_main$t = defineComponent({
12072
12060
  name: "FPostalCodeTextField",
12073
12061
  extends: FTextField,
12074
12062
  mixins: [TranslationMixin],
@@ -12105,7 +12093,7 @@ const _sfc_main$s = defineComponent({
12105
12093
  function defaultFormatter(modelValue) {
12106
12094
  return formatPercent(modelValue, this.decimals);
12107
12095
  }
12108
- const _sfc_main$r = defineComponent({
12096
+ const _sfc_main$s = defineComponent({
12109
12097
  name: "FPercentTextField",
12110
12098
  extends: FTextField,
12111
12099
  mixins: [TranslationMixin],
@@ -12153,7 +12141,7 @@ const _sfc_main$r = defineComponent({
12153
12141
  ValidationService.validateElement(inputElement);
12154
12142
  }
12155
12143
  });
12156
- const _sfc_main$q = defineComponent({
12144
+ const _sfc_main$r = defineComponent({
12157
12145
  name: "FOrganisationsnummerTextField",
12158
12146
  extends: FTextField,
12159
12147
  mixins: [TranslationMixin],
@@ -12261,39 +12249,28 @@ function filter(list, filterAttributes, searchString) {
12261
12249
  const searchTerms = searchString.split(/\s+/).map((word) => word.toLocaleLowerCase());
12262
12250
  return list.filter((item) => includesAllSearchTerms(item, filterAttributes, searchTerms));
12263
12251
  }
12264
- const _sfc_main$p = defineComponent({
12265
- name: "FSortFilterDataset",
12266
- components: {
12267
- FSelectField,
12268
- FTextField,
12269
- FIcon,
12270
- IFlex,
12271
- IFlexItem
12272
- },
12273
- mixins: [TranslationMixin],
12274
- provide() {
12275
- return {
12276
- sort: (attribute, ascending) => {
12277
- const foundAttribute = this.sortOrders.find((item) => item.attribute === attribute && item.ascending === ascending);
12278
- if (foundAttribute) {
12279
- this.sortAttribute = foundAttribute;
12280
- } else {
12281
- this.sortAttribute = {
12282
- attribute: "",
12283
- ascending: false
12284
- };
12285
- }
12286
- this.sortFilterData();
12287
- this.$emit("usedSortAttributes", this.sortAttribute);
12288
- },
12289
- registerCallbackOnSort: (callback) => {
12290
- this.tableCallbackOnSort = callback;
12291
- },
12292
- registerCallbackOnMount: (callback) => {
12293
- this.tableCallbackSortableColumns = callback;
12294
- }
12295
- };
12296
- },
12252
+ const _hoisted_1$q = {
12253
+ class: "sort-filter-dataset"
12254
+ };
12255
+ const _hoisted_2$l = {
12256
+ class: "sort-filter-dataset__search"
12257
+ };
12258
+ const _hoisted_3$h = {
12259
+ class: "sr-only"
12260
+ };
12261
+ const _hoisted_4$e = ["title"];
12262
+ const _hoisted_5$b = {
12263
+ class: "sr-only"
12264
+ };
12265
+ const _hoisted_6$9 = {
12266
+ value: {
12267
+ attribute: "",
12268
+ ascending: false
12269
+ }
12270
+ };
12271
+ const _hoisted_7$8 = ["value"];
12272
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
12273
+ __name: "FSortFilterDataset",
12297
12274
  props: {
12298
12275
  /**
12299
12276
  * The data that you wish to sort or filter.
@@ -12342,7 +12319,7 @@ const _sfc_main$p = defineComponent({
12342
12319
  placeholderFilter: {
12343
12320
  type: String,
12344
12321
  required: false,
12345
- default: TranslationMixin.methods.$t("fkui.sort-filter-dataset.placeholder.filter", "Sök")
12322
+ default: TranslationService.provider.translate("fkui.sort-filter-dataset.placeholder.filter", "Sök")
12346
12323
  },
12347
12324
  /**
12348
12325
  * The order the data will be sorted by if defaultSortAttribute has been set.
@@ -12354,243 +12331,237 @@ const _sfc_main$p = defineComponent({
12354
12331
  }
12355
12332
  },
12356
12333
  emits: ["datasetSorted", "usedSortAttributes"],
12357
- data() {
12358
- return {
12359
- searchString: "",
12360
- sortAttribute: {
12361
- attribute: "",
12362
- ascending: false
12363
- },
12364
- sortFilterResult: [],
12365
- tableCallbackOnSort: () => {
12366
- return;
12367
- },
12368
- tableCallbackSortableColumns: () => {
12369
- return;
12370
- }
12334
+ setup(__props, {
12335
+ emit: __emit
12336
+ }) {
12337
+ const $t2 = useTranslate();
12338
+ const searchString = ref("");
12339
+ const sortAttribute = ref({
12340
+ attribute: "",
12341
+ name: "",
12342
+ ascendingName: "",
12343
+ ascending: false,
12344
+ id: 0
12345
+ });
12346
+ const sortFilterResult = ref([]);
12347
+ const debouncedFilterResultset = debounce(filterResultset, 250);
12348
+ let tableCallbackOnSort = () => {
12371
12349
  };
12372
- },
12373
- computed: {
12374
- showClearButton() {
12375
- return this.searchString.length > 0;
12376
- },
12377
- sortOrders() {
12350
+ let tableCallbackSortableColumns = () => {
12351
+ };
12352
+ const props = __props;
12353
+ const emit = __emit;
12354
+ const showClearButton = computed(() => {
12355
+ return searchString.value.length > 0;
12356
+ });
12357
+ const sortOrders = computed(() => {
12378
12358
  const arr = [];
12379
12359
  let id = 0;
12380
- Object.keys(this.sortableAttributes).forEach((key) => {
12360
+ Object.keys(props.sortableAttributes).forEach((key) => {
12381
12361
  arr.push({
12382
12362
  attribute: key,
12383
- name: this.sortableAttributes[key],
12384
- ascendingName: this.$t("fkui.sort-filter-dataset.label.ascending", "stigande"),
12363
+ name: props.sortableAttributes[key],
12364
+ ascendingName: $t2("fkui.sort-filter-dataset.label.ascending", "stigande"),
12385
12365
  ascending: true,
12386
12366
  id: id++
12387
12367
  });
12388
12368
  arr.push({
12389
12369
  attribute: key,
12390
- name: this.sortableAttributes[key],
12391
- ascendingName: this.$t("fkui.sort-filter-dataset.label.descending", "fallande"),
12370
+ name: props.sortableAttributes[key],
12371
+ ascendingName: $t2("fkui.sort-filter-dataset.label.descending", "fallande"),
12392
12372
  ascending: false,
12393
12373
  id: id++
12394
12374
  });
12395
12375
  });
12396
12376
  return arr;
12397
- },
12398
- filterAttributes() {
12399
- return Object.keys(this.sortableAttributes);
12400
- }
12401
- },
12402
- watch: {
12403
- data: {
12404
- immediate: true,
12405
- deep: true,
12406
- handler: function() {
12407
- if (this.defaultSortAttribute !== "") {
12408
- const foundAttribute = this.sortOrders.find((item) => item.attribute === this.defaultSortAttribute && item.ascending === this.defaultSortAscending);
12409
- if (foundAttribute) {
12410
- this.sortAttribute = foundAttribute;
12411
- }
12377
+ });
12378
+ const filterAttributes = computed(() => {
12379
+ return Object.keys(props.sortableAttributes);
12380
+ });
12381
+ provide("sort", (attribute, ascending) => {
12382
+ const foundAttribute = sortOrders.value.find((item) => {
12383
+ return item.attribute === attribute && item.ascending === ascending;
12384
+ });
12385
+ if (foundAttribute) {
12386
+ sortAttribute.value = foundAttribute;
12387
+ } else {
12388
+ sortAttribute.value = {
12389
+ attribute: "",
12390
+ ascending: false
12391
+ };
12392
+ }
12393
+ sortFilterData();
12394
+ emit("usedSortAttributes", sortAttribute.value);
12395
+ });
12396
+ provide("registerCallbackOnSort", (callback) => {
12397
+ tableCallbackOnSort = callback;
12398
+ });
12399
+ provide("registerCallbackOnMount", (callback) => {
12400
+ tableCallbackSortableColumns = callback;
12401
+ });
12402
+ onMounted(() => {
12403
+ tableCallbackSortableColumns(Object.keys(props.sortableAttributes));
12404
+ });
12405
+ watch(() => props.data, () => {
12406
+ if (props.defaultSortAttribute !== "") {
12407
+ const foundAttribute = sortOrders.value.find((item) => {
12408
+ return item.attribute === props.defaultSortAttribute && item.ascending === props.defaultSortAscending;
12409
+ });
12410
+ if (foundAttribute) {
12411
+ sortAttribute.value = foundAttribute;
12412
12412
  }
12413
- this.sortFilterData();
12414
12413
  }
12415
- }
12416
- },
12417
- created() {
12418
- this.debouncedFilterResultset = debounce(this.filterResultset, 250).bind(this);
12419
- },
12420
- mounted() {
12421
- this.tableCallbackSortableColumns(Object.keys(this.sortableAttributes));
12422
- },
12423
- methods: {
12424
- sortFilterData() {
12425
- const filteredData = filter(this.data, this.filterAttributes, this.searchString);
12426
- if (this.sortAttribute.attribute === "") {
12427
- this.sortFilterResult = filteredData;
12414
+ sortFilterData();
12415
+ }, {
12416
+ immediate: true,
12417
+ deep: true
12418
+ });
12419
+ function sortFilterData() {
12420
+ const filteredData = filter(props.data, filterAttributes.value, searchString.value);
12421
+ if (sortAttribute.value.attribute === "") {
12422
+ sortFilterResult.value = filteredData;
12428
12423
  } else {
12429
- this.sortFilterResult = sort([...filteredData], this.sortAttribute.attribute, this.sortAttribute.ascending);
12424
+ sortFilterResult.value = sort([...filteredData], sortAttribute.value.attribute, sortAttribute.value.ascending);
12430
12425
  }
12431
- this.$nextTick(() => {
12432
- this.tableCallbackOnSort(this.sortAttribute.attribute, this.sortAttribute.ascending);
12426
+ nextTick(() => {
12427
+ tableCallbackOnSort(sortAttribute.value.attribute, sortAttribute.value.ascending);
12433
12428
  });
12434
- this.$emit("datasetSorted", this.sortFilterResult);
12435
- },
12436
- onChangeSortAttribute() {
12437
- this.sortFilterData();
12438
- this.$emit("usedSortAttributes", this.sortAttribute);
12439
- },
12440
- onSearchInput(event) {
12441
- this.searchString = event.target.value;
12442
- this.debouncedFilterResultset();
12443
- },
12444
- onClickClearSearch() {
12445
- this.searchString = "";
12446
- this.sortFilterData();
12447
- const input = this.$el.querySelector(".text-field--inline input");
12429
+ emit("datasetSorted", sortFilterResult.value);
12430
+ }
12431
+ function onChangeSortAttribute() {
12432
+ sortFilterData();
12433
+ emit("usedSortAttributes", sortAttribute.value);
12434
+ }
12435
+ function onSearchInput(event) {
12436
+ searchString.value = event.target.value;
12437
+ debouncedFilterResultset();
12438
+ }
12439
+ function onClickClearSearch() {
12440
+ searchString.value = "";
12441
+ sortFilterData();
12442
+ const input = useTemplateRef("search-field").value;
12448
12443
  focus$1(input);
12449
- },
12450
- debouncedFilterResultset() {
12451
- },
12452
- filterResultset() {
12453
- this.sortFilterData();
12454
- if (this.searchString === "") {
12455
- alertScreenReader(this.$t("fkui.sort-filter-dataset.aria-live.empty", "Sök redigera Sök tom"));
12444
+ }
12445
+ function filterResultset() {
12446
+ sortFilterData();
12447
+ if (searchString.value === "") {
12448
+ alertScreenReader($t2("fkui.sort-filter-dataset.aria-live.empty", "Sök redigera Sök tom"));
12456
12449
  } else {
12457
- const searchAriaLive = this.$t("fkui.sort-filter-dataset.aria-live.search", `Din sökning på "{{ search }}" gav {{ result }} träffar.`, {
12458
- result: this.sortFilterResult.length,
12459
- search: this.searchString
12450
+ const searchAriaLive = $t2("fkui.sort-filter-dataset.aria-live.search", `Din sökning på "{{ search }}" gav {{ result }} träffar.`, {
12451
+ result: sortFilterResult.value.length,
12452
+ search: searchString.value
12460
12453
  });
12461
12454
  alertScreenReader(searchAriaLive);
12462
12455
  }
12463
12456
  }
12464
- }
12465
- });
12466
- const _hoisted_1$p = {
12467
- class: "sort-filter-dataset"
12468
- };
12469
- const _hoisted_2$l = {
12470
- class: "sort-filter-dataset__search"
12471
- };
12472
- const _hoisted_3$h = {
12473
- class: "sr-only"
12474
- };
12475
- const _hoisted_4$e = ["title"];
12476
- const _hoisted_5$b = {
12477
- class: "sr-only"
12478
- };
12479
- const _hoisted_6$9 = {
12480
- value: {
12481
- attribute: "",
12482
- ascending: false
12483
- }
12484
- };
12485
- const _hoisted_7$8 = ["value"];
12486
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
12487
- const _component_i_flex_item = resolveComponent("i-flex-item");
12488
- const _component_f_icon = resolveComponent("f-icon");
12489
- const _component_f_text_field = resolveComponent("f-text-field");
12490
- const _component_f_select_field = resolveComponent("f-select-field");
12491
- const _component_i_flex = resolveComponent("i-flex");
12492
- return openBlock(), createElementBlock("div", _hoisted_1$p, [createVNode(_component_i_flex, {
12493
- collapse: "",
12494
- gap: "3x",
12495
- wrap: ""
12496
- }, {
12497
- default: withCtx(() => [createVNode(_component_i_flex_item, {
12498
- shrink: "",
12499
- align: "center"
12500
- }, {
12501
- default: withCtx(() => [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({
12502
- slotClass: "sort-filter-dataset__toolbar__header"
12503
- })))]),
12504
- _: 3
12505
- }), _cache[9] || (_cache[9] = createTextVNode()), createVNode(_component_i_flex_item, {
12506
- grow: ""
12507
- }, {
12508
- default: withCtx(() => [createVNode(_component_i_flex, {
12457
+ return (_ctx, _cache) => {
12458
+ return openBlock(), createElementBlock("div", _hoisted_1$q, [createVNode(unref(IFlex), {
12509
12459
  collapse: "",
12510
- float: "right"
12460
+ gap: "3x",
12461
+ wrap: ""
12511
12462
  }, {
12512
- default: withCtx(() => [_ctx.showFilter ? (openBlock(), createBlock(_component_i_flex_item, {
12513
- key: 0,
12463
+ default: withCtx(() => [createVNode(unref(IFlexItem), {
12514
12464
  shrink: "",
12515
12465
  align: "center"
12516
12466
  }, {
12517
- default: withCtx(() => [createElementVNode("div", _hoisted_2$l, [createVNode(_component_f_icon, {
12518
- name: "search",
12519
- class: "sort-filter-dataset__search__magnify-icon"
12520
- }), _cache[4] || (_cache[4] = createTextVNode()), createVNode(_component_f_text_field, {
12521
- modelValue: _ctx.searchString,
12522
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchString = $event),
12523
- inline: "",
12524
- placeholder: _ctx.placeholderFilter,
12525
- maxlength: "64",
12526
- onInput: _ctx.onSearchInput
12527
- }, {
12528
- default: withCtx(() => [createElementVNode("span", _hoisted_3$h, toDisplayString(_ctx.placeholderFilter), 1)]),
12529
- _: 1
12530
- }, 8, ["modelValue", "placeholder", "onInput"]), _cache[5] || (_cache[5] = createTextVNode()), _ctx.showClearButton ? (openBlock(), createElementBlock("button", {
12531
- key: 0,
12532
- type: "button",
12533
- class: "button button--discrete sort-filter-dataset__search__close-icon",
12534
- title: _ctx.$t("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält"),
12535
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClickClearSearch && _ctx.onClickClearSearch(...args))
12536
- }, [createVNode(_component_f_icon, {
12537
- name: "close"
12538
- }), _cache[3] || (_cache[3] = createTextVNode()), createElementVNode("span", _hoisted_5$b, toDisplayString(_ctx.$t("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält")), 1)], 8, _hoisted_4$e)) : createCommentVNode("", true)])]),
12539
- _: 1
12540
- })) : createCommentVNode("", true), _cache[8] || (_cache[8] = createTextVNode()), _ctx.showSort ? (openBlock(), createBlock(_component_i_flex_item, {
12541
- key: 1,
12542
- shrink: "",
12543
- align: "center"
12467
+ default: withCtx(() => [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({
12468
+ slotClass: "sort-filter-dataset__toolbar__header"
12469
+ })))]),
12470
+ _: 3
12471
+ }), _cache[8] || (_cache[8] = createTextVNode()), createVNode(unref(IFlexItem), {
12472
+ grow: ""
12544
12473
  }, {
12545
- default: withCtx(() => [createVNode(_component_f_select_field, {
12546
- modelValue: _ctx.sortAttribute,
12547
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.sortAttribute = $event),
12548
- class: "sort-filter-dataset__sort",
12549
- inline: "",
12550
- onChange: _ctx.onChangeSortAttribute
12474
+ default: withCtx(() => [createVNode(unref(IFlex), {
12475
+ collapse: "",
12476
+ float: "right"
12551
12477
  }, {
12552
- label: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("fkui.sort-filter-dataset.label.sort", "Sortera på")), 1)]),
12553
- default: withCtx(() => [_cache[6] || (_cache[6] = createTextVNode()), createElementVNode("option", _hoisted_6$9, toDisplayString(_ctx.$t("fkui.sort-filter-dataset.label.unsorted", "Välj")), 1), _cache[7] || (_cache[7] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortOrders, (sortOrder) => {
12554
- return openBlock(), createElementBlock("option", {
12555
- key: sortOrder.id,
12556
- value: sortOrder
12557
- }, toDisplayString(sortOrder.name) + " (" + toDisplayString(sortOrder.ascendingName) + ")\n ", 9, _hoisted_7$8);
12558
- }), 128))]),
12478
+ default: withCtx(() => [__props.showFilter ? (openBlock(), createBlock(unref(IFlexItem), {
12479
+ key: 0,
12480
+ shrink: "",
12481
+ align: "center"
12482
+ }, {
12483
+ default: withCtx(() => [createElementVNode("div", _hoisted_2$l, [createVNode(unref(FIcon), {
12484
+ name: "search",
12485
+ class: "sort-filter-dataset__search__magnify-icon"
12486
+ }), _cache[3] || (_cache[3] = createTextVNode()), createVNode(unref(FTextField), {
12487
+ ref: "search-field",
12488
+ modelValue: searchString.value,
12489
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchString.value = $event),
12490
+ inline: "",
12491
+ placeholder: __props.placeholderFilter,
12492
+ maxlength: "64",
12493
+ onInput: onSearchInput
12494
+ }, {
12495
+ default: withCtx(() => [createElementVNode("span", _hoisted_3$h, toDisplayString(__props.placeholderFilter), 1)]),
12496
+ _: 1
12497
+ }, 8, ["modelValue", "placeholder"]), _cache[4] || (_cache[4] = createTextVNode()), showClearButton.value ? (openBlock(), createElementBlock("button", {
12498
+ key: 0,
12499
+ type: "button",
12500
+ class: "button button--discrete sort-filter-dataset__search__close-icon",
12501
+ title: unref($t2)("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält"),
12502
+ onClick: onClickClearSearch
12503
+ }, [createVNode(unref(FIcon), {
12504
+ name: "close"
12505
+ }), _cache[2] || (_cache[2] = createTextVNode()), createElementVNode("span", _hoisted_5$b, toDisplayString(unref($t2)("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält")), 1)], 8, _hoisted_4$e)) : createCommentVNode("", true)])]),
12506
+ _: 1
12507
+ })) : createCommentVNode("", true), _cache[7] || (_cache[7] = createTextVNode()), __props.showSort ? (openBlock(), createBlock(unref(IFlexItem), {
12508
+ key: 1,
12509
+ shrink: "",
12510
+ align: "center"
12511
+ }, {
12512
+ default: withCtx(() => [createVNode(unref(FSelectField), {
12513
+ modelValue: sortAttribute.value,
12514
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => sortAttribute.value = $event),
12515
+ class: "sort-filter-dataset__sort",
12516
+ inline: "",
12517
+ onChange: onChangeSortAttribute
12518
+ }, {
12519
+ label: withCtx(() => [createTextVNode(toDisplayString(unref($t2)("fkui.sort-filter-dataset.label.sort", "Sortera på")), 1)]),
12520
+ default: withCtx(() => [_cache[5] || (_cache[5] = createTextVNode()), createElementVNode("option", _hoisted_6$9, toDisplayString(unref($t2)("fkui.sort-filter-dataset.label.unsorted", "Välj")), 1), _cache[6] || (_cache[6] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(sortOrders.value, (sortOrder) => {
12521
+ return openBlock(), createElementBlock("option", {
12522
+ key: sortOrder.id,
12523
+ value: sortOrder
12524
+ }, toDisplayString(sortOrder.name) + " (" + toDisplayString(sortOrder.ascendingName) + ")\n ", 9, _hoisted_7$8);
12525
+ }), 128))]),
12526
+ _: 1
12527
+ }, 8, ["modelValue"])]),
12528
+ _: 1
12529
+ })) : createCommentVNode("", true)]),
12559
12530
  _: 1
12560
- }, 8, ["modelValue", "onChange"])]),
12531
+ })]),
12561
12532
  _: 1
12562
- })) : createCommentVNode("", true)]),
12563
- _: 1
12564
- })]),
12565
- _: 1
12566
- })]),
12567
- _: 3
12568
- }), _cache[10] || (_cache[10] = createTextVNode()), renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
12569
- sortFilterResult: _ctx.sortFilterResult
12570
- })))]);
12571
- }
12572
- const FSortFilterDataset = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]]);
12573
- const _sfc_main$o = defineComponent({
12574
- name: "FDataTable",
12575
- components: {
12576
- FIcon
12577
- },
12578
- mixins: [TranslationMixin],
12579
- provide() {
12580
- return {
12581
- addColumn: (column) => {
12582
- if (column.type === FTableColumnType.ACTION) {
12583
- throw new Error("Cannot use action column in FDataTable component");
12584
- }
12585
- this.columns = addColumn(this.columns, column);
12586
- },
12587
- setVisibilityColumn: (id, visible) => {
12588
- setVisibilityColumn(this.columns, id, visible);
12589
- },
12590
- textFieldTableMode: true
12533
+ })]),
12534
+ _: 3
12535
+ }), _cache[9] || (_cache[9] = createTextVNode()), renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
12536
+ sortFilterResult: sortFilterResult.value
12537
+ })))]);
12591
12538
  };
12539
+ }
12540
+ });
12541
+ const _hoisted_1$p = ["tabindex"];
12542
+ const _hoisted_2$k = {
12543
+ key: 0
12544
+ };
12545
+ const _hoisted_3$g = {
12546
+ class: "table__row"
12547
+ };
12548
+ const _hoisted_4$d = ["innerHTML"];
12549
+ const _hoisted_5$a = {
12550
+ key: 1,
12551
+ class: "table__column__description"
12552
+ };
12553
+ const _hoisted_6$8 = {
12554
+ key: 0
12555
+ };
12556
+ const _hoisted_7$7 = {
12557
+ key: 1
12558
+ };
12559
+ const _hoisted_8$5 = ["colspan"];
12560
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
12561
+ ...{
12562
+ inheritAttrs: false
12592
12563
  },
12593
- inheritAttrs: false,
12564
+ __name: "FDataTable",
12594
12565
  props: {
12595
12566
  /**
12596
12567
  * The rows to be listed.
@@ -12633,67 +12604,80 @@ const _sfc_main$o = defineComponent({
12633
12604
  }
12634
12605
  }
12635
12606
  },
12636
- setup(props) {
12637
- provide("renderColumns", computed(() => props.rows.length > 0));
12638
- return FSortFilterDatasetInjected();
12639
- },
12640
- data() {
12641
- return {
12642
- columns: []
12643
- };
12644
- },
12645
- computed: {
12646
- hasCaption() {
12647
- return hasSlot(this, "caption", {}, {
12607
+ setup(__props) {
12608
+ const $t2 = useTranslate();
12609
+ const {
12610
+ hasSlot: hasSlot2
12611
+ } = useSlotUtils();
12612
+ const {
12613
+ sort: sort2,
12614
+ registerCallbackOnSort,
12615
+ registerCallbackOnMount
12616
+ } = FSortFilterDatasetInjected();
12617
+ const columns = ref([]);
12618
+ const props = __props;
12619
+ const hasCaption = computed(() => {
12620
+ return hasSlot2("caption", {}, {
12648
12621
  stripClasses: []
12649
12622
  });
12650
- },
12651
- tableClasses() {
12623
+ });
12624
+ const tableClasses = computed(() => {
12652
12625
  const classes = [];
12653
- if (this.striped) {
12626
+ if (props.striped) {
12654
12627
  classes.push("table--striped");
12655
12628
  }
12656
12629
  return classes;
12657
- },
12658
- isEmpty() {
12659
- return this.rows.length === 0;
12660
- },
12661
- visibleColumns() {
12662
- return this.columns.filter((col) => col.visible);
12663
- },
12664
- wrapperClasses() {
12665
- return tableScrollClasses(this.scroll);
12666
- },
12667
- tabindex() {
12668
- return this.scroll !== TableScroll.NONE ? 0 : void 0;
12669
- }
12670
- },
12671
- mounted() {
12672
- this.registerCallbackOnSort(this.callbackOnSort);
12673
- this.registerCallbackOnMount(this.callbackSortableColumns);
12674
- },
12675
- methods: {
12676
- rowKey(item) {
12677
- const key = item[this.keyAttribute];
12630
+ });
12631
+ const isEmpty2 = computed(() => {
12632
+ return props.rows.length === 0;
12633
+ });
12634
+ const visibleColumns = computed(() => {
12635
+ return columns.value.filter((col) => col.visible);
12636
+ });
12637
+ const wrapperClasses = computed(() => {
12638
+ return tableScrollClasses(props.scroll);
12639
+ });
12640
+ const tabindex = computed(() => {
12641
+ return props.scroll !== TableScroll.NONE ? 0 : void 0;
12642
+ });
12643
+ provide("addColumn", (column) => {
12644
+ if (column.type === FTableColumnType.ACTION) {
12645
+ throw new Error("Cannot use action column in FDataTable component");
12646
+ }
12647
+ columns.value = addColumn(columns.value, column);
12648
+ });
12649
+ provide("setVisibilityColumn", (id, visible) => {
12650
+ setVisibilityColumn(columns.value, id, visible);
12651
+ });
12652
+ provide("textFieldTableMode", true);
12653
+ provide("renderColumns", computed(() => {
12654
+ return props.rows.length > 0;
12655
+ }));
12656
+ onMounted(() => {
12657
+ registerCallbackOnSort(callbackOnSort);
12658
+ registerCallbackOnMount(callbackSortableColumns);
12659
+ });
12660
+ function rowKey(item) {
12661
+ const key = item[props.keyAttribute];
12678
12662
  if (typeof key === "undefined") {
12679
- throw new Error(`Key attribute [${this.keyAttribute}]' is missing in row`);
12663
+ throw new Error(`Key attribute [${props.keyAttribute}]' is missing in row`);
12680
12664
  }
12681
12665
  return String(key);
12682
- },
12683
- columnClasses(column) {
12666
+ }
12667
+ function columnClasses(column) {
12684
12668
  const classes = ["table__column", `table__column--${column.type}`, column.size];
12685
12669
  if (column.sortable) {
12686
12670
  classes.push("table__column--sortable");
12687
12671
  }
12688
12672
  return classes;
12689
- },
12690
- iconClasses(column) {
12673
+ }
12674
+ function iconClasses2(column) {
12691
12675
  return getSortableIconClasses(column);
12692
- },
12693
- iconName(column) {
12676
+ }
12677
+ function iconName(column) {
12694
12678
  return getSortableIconName(column);
12695
- },
12696
- onClickColumnHeader(column) {
12679
+ }
12680
+ function onClickColumnHeader(column) {
12697
12681
  if (!column.sortable) {
12698
12682
  return;
12699
12683
  }
@@ -12702,81 +12686,60 @@ const _sfc_main$o = defineComponent({
12702
12686
  columnName = "";
12703
12687
  column.sort = FTableColumnSort.UNSORTED;
12704
12688
  }
12705
- this.sort(columnName, column.sort !== FTableColumnSort.ASCENDING);
12706
- },
12707
- callbackOnSort(columnName, ascending) {
12708
- updateSortOrder(this.columns, columnName, ascending);
12709
- },
12710
- callbackSortableColumns(columnNames) {
12711
- setSortableColumns(this.columns, columnNames);
12712
- },
12713
- escapeNewlines(value) {
12689
+ sort2(columnName, column.sort !== FTableColumnSort.ASCENDING);
12690
+ }
12691
+ function callbackOnSort(columnName, ascending) {
12692
+ updateSortOrder(columns.value, columnName, ascending);
12693
+ }
12694
+ function callbackSortableColumns(columnNames) {
12695
+ setSortableColumns(columns.value, columnNames);
12696
+ }
12697
+ function escapeNewlines(value) {
12714
12698
  return value.replace(/\n/g, "<br/>");
12715
12699
  }
12700
+ return (_ctx, _cache) => {
12701
+ return openBlock(), createElementBlock("div", {
12702
+ class: normalizeClass(wrapperClasses.value)
12703
+ }, [createElementVNode("table", mergeProps({
12704
+ class: ["table", tableClasses.value],
12705
+ tabindex: tabindex.value
12706
+ }, _ctx.$attrs), [hasCaption.value ? (openBlock(), createElementBlock("caption", _hoisted_2$k, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("colgroup", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(columns.value, (column) => {
12707
+ return openBlock(), createElementBlock("col", {
12708
+ key: column.id,
12709
+ class: normalizeClass(column.size)
12710
+ }, null, 2);
12711
+ }), 128))]), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("thead", null, [createElementVNode("tr", _hoisted_3$g, [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleColumns.value, (column) => {
12712
+ return openBlock(), createElementBlock("th", mergeProps({
12713
+ key: column.id,
12714
+ scope: "col",
12715
+ class: columnClasses(column)
12716
+ }, toHandlers(column.sortable ? {
12717
+ click: () => onClickColumnHeader(column)
12718
+ } : {}, true)), [createElementVNode("span", {
12719
+ innerHTML: escapeNewlines(column.title)
12720
+ }, null, 8, _hoisted_4$d), _cache[0] || (_cache[0] = createTextVNode()), column.sortable ? (openBlock(), createBlock(unref(FIcon), {
12721
+ key: 0,
12722
+ class: normalizeClass(iconClasses2(column)),
12723
+ name: iconName(column)
12724
+ }, null, 8, ["class", "name"])) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), column.description ? (openBlock(), createElementBlock("span", _hoisted_5$a, toDisplayString(column.description), 1)) : createCommentVNode("", true)], 16);
12725
+ }), 128))])]), _cache[6] || (_cache[6] = createTextVNode()), createElementVNode("tbody", null, [isEmpty2.value && columns.value.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_6$8, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
12726
+ row: {}
12727
+ })))])) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), isEmpty2.value ? (openBlock(), createElementBlock("tr", _hoisted_7$7, [createElementVNode("td", {
12728
+ class: "table__column table__column--action",
12729
+ colspan: columns.value.length
12730
+ }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref($t2)("fkui.data-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_8$5)])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row) => {
12731
+ return openBlock(), createElementBlock("tr", {
12732
+ key: rowKey(row),
12733
+ class: "table__row"
12734
+ }, [renderSlot(_ctx.$slots, "default", mergeProps({
12735
+ ref_for: true
12736
+ }, {
12737
+ row
12738
+ }))]);
12739
+ }), 128))])], 16, _hoisted_1$p)], 2);
12740
+ };
12716
12741
  }
12717
12742
  });
12718
- const _hoisted_1$o = ["tabindex"];
12719
- const _hoisted_2$k = {
12720
- key: 0
12721
- };
12722
- const _hoisted_3$g = {
12723
- class: "table__row"
12724
- };
12725
- const _hoisted_4$d = ["innerHTML"];
12726
- const _hoisted_5$a = {
12727
- key: 1,
12728
- class: "table__column__description"
12729
- };
12730
- const _hoisted_6$8 = {
12731
- key: 0
12732
- };
12733
- const _hoisted_7$7 = {
12734
- key: 1
12735
- };
12736
- const _hoisted_8$5 = ["colspan"];
12737
- function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
12738
- const _component_f_icon = resolveComponent("f-icon");
12739
- return openBlock(), createElementBlock("div", {
12740
- class: normalizeClass(_ctx.wrapperClasses)
12741
- }, [createElementVNode("table", mergeProps({
12742
- class: ["table", _ctx.tableClasses],
12743
- tabindex: _ctx.tabindex
12744
- }, _ctx.$attrs), [_ctx.hasCaption ? (openBlock(), createElementBlock("caption", _hoisted_2$k, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("colgroup", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column) => {
12745
- return openBlock(), createElementBlock("col", {
12746
- key: column.id,
12747
- class: normalizeClass(column.size)
12748
- }, null, 2);
12749
- }), 128))]), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("thead", null, [createElementVNode("tr", _hoisted_3$g, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleColumns, (column) => {
12750
- return openBlock(), createElementBlock("th", mergeProps({
12751
- key: column.id,
12752
- scope: "col",
12753
- class: _ctx.columnClasses(column)
12754
- }, toHandlers(column.sortable ? {
12755
- click: () => _ctx.onClickColumnHeader(column)
12756
- } : {}, true)), [createElementVNode("span", {
12757
- innerHTML: _ctx.escapeNewlines(column.title)
12758
- }, null, 8, _hoisted_4$d), _cache[0] || (_cache[0] = createTextVNode()), column.sortable ? (openBlock(), createBlock(_component_f_icon, {
12759
- key: 0,
12760
- class: normalizeClass(_ctx.iconClasses(column)),
12761
- name: _ctx.iconName(column)
12762
- }, null, 8, ["class", "name"])) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), column.description ? (openBlock(), createElementBlock("span", _hoisted_5$a, toDisplayString(column.description), 1)) : createCommentVNode("", true)], 16);
12763
- }), 128))])]), _cache[6] || (_cache[6] = createTextVNode()), createElementVNode("tbody", null, [_ctx.isEmpty && _ctx.columns.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_6$8, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
12764
- row: {}
12765
- })))])) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _ctx.isEmpty ? (openBlock(), createElementBlock("tr", _hoisted_7$7, [createElementVNode("td", {
12766
- class: "table__column table__column--action",
12767
- colspan: _ctx.columns.length
12768
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.data-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_8$5)])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row) => {
12769
- return openBlock(), createElementBlock("tr", {
12770
- key: _ctx.rowKey(row),
12771
- class: "table__row"
12772
- }, [renderSlot(_ctx.$slots, "default", mergeProps({
12773
- ref_for: true
12774
- }, {
12775
- row
12776
- }))]);
12777
- }), 128))])], 16, _hoisted_1$o)], 2);
12778
- }
12779
- const FDataTable = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m]]);
12780
12743
  function isDayEnabled(day, config2) {
12781
12744
  return passesMinDate(day, config2.minDate) && passesMaxDate(day, config2.maxDate) && passesInvalidDates(day, config2.invalidDates) && passesInvalidWeekdays(day, config2.invalidWeekdays);
12782
12745
  }
@@ -12852,7 +12815,7 @@ function getDisplayMonth(minDate, maxDate, selectedDate, initialMonth) {
12852
12815
  }
12853
12816
  return month || FDate.now().startOfMonth();
12854
12817
  }
12855
- const _sfc_main$n = defineComponent({
12818
+ const _sfc_main$o = defineComponent({
12856
12819
  name: "FDatepickerField",
12857
12820
  components: {
12858
12821
  FCalendar,
@@ -13110,7 +13073,7 @@ const _sfc_main$n = defineComponent({
13110
13073
  }
13111
13074
  }
13112
13075
  });
13113
- const _hoisted_1$n = {
13076
+ const _hoisted_1$o = {
13114
13077
  ref: "component",
13115
13078
  class: "datepicker-field"
13116
13079
  };
@@ -13121,13 +13084,13 @@ const _hoisted_3$f = {
13121
13084
  const _hoisted_4$c = {
13122
13085
  class: "datepicker-field__close"
13123
13086
  };
13124
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
13087
+ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
13125
13088
  const _component_f_icon = resolveComponent("f-icon");
13126
13089
  const _component_f_text_field = resolveComponent("f-text-field");
13127
13090
  const _component_f_calendar_day = resolveComponent("f-calendar-day");
13128
13091
  const _component_f_calendar = resolveComponent("f-calendar");
13129
13092
  const _component_i_popup = resolveComponent("i-popup");
13130
- return openBlock(), createElementBlock("div", _hoisted_1$n, [createElementVNode("div", {
13093
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [createElementVNode("div", {
13131
13094
  ref: "calendarInputs",
13132
13095
  onFocusout: _cache[2] || (_cache[2] = (...args) => _ctx.onFocusoutTextFieldButton && _ctx.onFocusoutTextFieldButton(...args))
13133
13096
  }, [createVNode(_component_f_text_field, mergeProps(_ctx.$attrs, {
@@ -13191,7 +13154,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
13191
13154
  "min-date": _ctx.minDate,
13192
13155
  "max-date": _ctx.maxDate,
13193
13156
  onClick: _ctx.onSelectCalendarDay,
13194
- onKeyup: withKeys(withModifiers(_ctx.onKeyupEsc, ["stop"]), ["esc", "native"])
13157
+ onKeyup: withKeys(withModifiers(_ctx.onKeyupEsc, ["stop"]), ["esc"])
13195
13158
  }, {
13196
13159
  default: withCtx(({
13197
13160
  date,
@@ -13217,11 +13180,11 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
13217
13180
  _: 1
13218
13181
  }, 8, ["is-open", "anchor", "inline", "onOpen", "onClose"])], 512);
13219
13182
  }
13220
- const FDatepickerField = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]);
13183
+ const FDatepickerField = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$j]]);
13221
13184
  function isDialogueTreeEndQuestion(value) {
13222
13185
  return Boolean(value.userData);
13223
13186
  }
13224
- const _sfc_main$m = defineComponent({
13187
+ const _sfc_main$n = defineComponent({
13225
13188
  name: "FDialogueTree",
13226
13189
  components: {
13227
13190
  FIcon
@@ -13299,7 +13262,7 @@ const _sfc_main$m = defineComponent({
13299
13262
  }
13300
13263
  }
13301
13264
  });
13302
- const _hoisted_1$m = {
13265
+ const _hoisted_1$n = {
13303
13266
  class: "dialogue-tree"
13304
13267
  };
13305
13268
  const _hoisted_2$i = {
@@ -13307,9 +13270,9 @@ const _hoisted_2$i = {
13307
13270
  class: "dialogue-tree__list"
13308
13271
  };
13309
13272
  const _hoisted_3$e = ["onClick"];
13310
- function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
13273
+ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
13311
13274
  const _component_f_icon = resolveComponent("f-icon");
13312
- return openBlock(), createElementBlock("div", _hoisted_1$m, [_ctx.options.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_2$i, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
13275
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [_ctx.options.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_2$i, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
13313
13276
  return openBlock(), createElementBlock("li", {
13314
13277
  key: option.label,
13315
13278
  class: "dialogue-tree__list-item"
@@ -13327,8 +13290,8 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
13327
13290
  userData: _ctx.userData
13328
13291
  })))]);
13329
13292
  }
13330
- const FDialogueTree = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k]]);
13331
- const _sfc_main$l = defineComponent({
13293
+ const FDialogueTree = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$i]]);
13294
+ const _sfc_main$m = defineComponent({
13332
13295
  name: "FExpandablePanel",
13333
13296
  components: {
13334
13297
  FIcon,
@@ -13402,7 +13365,7 @@ const _sfc_main$l = defineComponent({
13402
13365
  }
13403
13366
  }
13404
13367
  });
13405
- const _hoisted_1$l = ["aria-expanded", "aria-controls"];
13368
+ const _hoisted_1$m = ["aria-expanded", "aria-controls"];
13406
13369
  const _hoisted_2$h = {
13407
13370
  class: "expandable-panel__icon"
13408
13371
  };
@@ -13421,7 +13384,7 @@ const _hoisted_8$4 = {
13421
13384
  key: 0,
13422
13385
  class: "expandable-panel__outside"
13423
13386
  };
13424
- function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
13387
+ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
13425
13388
  const _component_f_icon = resolveComponent("f-icon");
13426
13389
  const _component_f_expand = resolveComponent("f-expand");
13427
13390
  return openBlock(), createElementBlock("div", {
@@ -13448,7 +13411,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
13448
13411
  })
13449
13412
  }, [createElementVNode("span", _hoisted_5$9, toDisplayString(_ctx.screenReaderNotificationText), 1), _cache[2] || (_cache[2] = createTextVNode()), createVNode(_component_f_icon, {
13450
13413
  name: "bell"
13451
- })], 8, _hoisted_4$b)) : createCommentVNode("", true)], 16, _hoisted_1$l)]),
13414
+ })], 8, _hoisted_4$b)) : createCommentVNode("", true)], 16, _hoisted_1$m)]),
13452
13415
  _: 3
13453
13416
  })), _cache[6] || (_cache[6] = createTextVNode()), createVNode(_component_f_expand, null, {
13454
13417
  default: withCtx(() => [withDirectives(createElementVNode("div", {
@@ -13458,8 +13421,8 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
13458
13421
  _: 3
13459
13422
  })], 2);
13460
13423
  }
13461
- const FExpandablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$j]]);
13462
- const _sfc_main$k = defineComponent({
13424
+ const FExpandablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$h]]);
13425
+ const _sfc_main$l = defineComponent({
13463
13426
  name: "FExpandableParagraph",
13464
13427
  components: {
13465
13428
  FIcon,
@@ -13541,7 +13504,7 @@ const _sfc_main$k = defineComponent({
13541
13504
  }
13542
13505
  }
13543
13506
  });
13544
- const _hoisted_1$k = ["aria-expanded", "aria-controls"];
13507
+ const _hoisted_1$l = ["aria-expanded", "aria-controls"];
13545
13508
  const _hoisted_2$g = {
13546
13509
  class: "expandable-paragraph__icon"
13547
13510
  };
@@ -13560,7 +13523,7 @@ const _hoisted_7$5 = {
13560
13523
  key: 0,
13561
13524
  class: "expandable-paragraph__separator"
13562
13525
  };
13563
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
13526
+ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
13564
13527
  const _component_f_icon = resolveComponent("f-icon");
13565
13528
  const _component_f_expand = resolveComponent("f-expand");
13566
13529
  return openBlock(), createElementBlock("div", {
@@ -13581,7 +13544,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
13581
13544
  name: "dash"
13582
13545
  }), _cache[1] || (_cache[1] = createTextVNode()), createVNode(_component_f_icon, {
13583
13546
  name: "dash"
13584
- })])]), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "title")], 16, _hoisted_1$k)]),
13547
+ })])]), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "title")], 16, _hoisted_1$l)]),
13585
13548
  _: 3
13586
13549
  }, 8, ["class"])), _cache[3] || (_cache[3] = createTextVNode()), _ctx.hasRelatedSlot ? (openBlock(), createElementBlock("div", _hoisted_4$a, [renderSlot(_ctx.$slots, "related")])) : createCommentVNode("", true)], 2), _cache[5] || (_cache[5] = createTextVNode()), createVNode(_component_f_expand, null, {
13587
13550
  default: withCtx(() => [withDirectives(createElementVNode("div", {
@@ -13591,7 +13554,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
13591
13554
  _: 3
13592
13555
  })], 2);
13593
13556
  }
13594
- const FExpandableParagraph = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$i]]);
13557
+ const FExpandableParagraph = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$g]]);
13595
13558
  const DEFAULT_ICON = "file";
13596
13559
  const iconMap = {
13597
13560
  "image/*": "pic",
@@ -13600,7 +13563,7 @@ const iconMap = {
13600
13563
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "doc",
13601
13564
  "application/vnd.openxmlformats-officedocument.wordprocessingml.template": "doc"
13602
13565
  };
13603
- const _sfc_main$j = defineComponent({
13566
+ const _sfc_main$k = defineComponent({
13604
13567
  name: "FFileItem",
13605
13568
  components: {
13606
13569
  FIcon
@@ -13679,7 +13642,7 @@ const _sfc_main$j = defineComponent({
13679
13642
  }
13680
13643
  }
13681
13644
  });
13682
- const _hoisted_1$j = {
13645
+ const _hoisted_1$k = {
13683
13646
  class: "file-item"
13684
13647
  };
13685
13648
  const _hoisted_2$f = {
@@ -13699,9 +13662,9 @@ const _hoisted_7$4 = {
13699
13662
  key: 0,
13700
13663
  class: "file-item__change-info"
13701
13664
  };
13702
- function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
13665
+ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
13703
13666
  const _component_f_icon = resolveComponent("f-icon");
13704
- return openBlock(), createElementBlock("div", _hoisted_1$j, [createElementVNode("div", _hoisted_2$f, [createElementVNode("a", mergeProps({
13667
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [createElementVNode("div", _hoisted_2$f, [createElementVNode("a", mergeProps({
13705
13668
  id: _ctx.id,
13706
13669
  class: "file-item__file-open"
13707
13670
  }, _ctx.$attrs), [createElementVNode("div", _hoisted_4$9, [createVNode(_component_f_icon, {
@@ -13712,8 +13675,8 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
13712
13675
  class: "file-item__separator"
13713
13676
  }, null, -1))]);
13714
13677
  }
13715
- const FFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h]]);
13716
- const _sfc_main$i = defineComponent({
13678
+ const FFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$f]]);
13679
+ const _sfc_main$j = defineComponent({
13717
13680
  name: "FFileSelector",
13718
13681
  components: {
13719
13682
  FIcon
@@ -13774,14 +13737,14 @@ const _sfc_main$i = defineComponent({
13774
13737
  }
13775
13738
  }
13776
13739
  });
13777
- const _hoisted_1$i = {
13740
+ const _hoisted_1$j = {
13778
13741
  class: "file-selector"
13779
13742
  };
13780
13743
  const _hoisted_2$e = ["id", "aria-labelledby", "aria-disabled"];
13781
13744
  const _hoisted_3$a = ["id", "for"];
13782
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
13745
+ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
13783
13746
  const _component_f_icon = resolveComponent("f-icon");
13784
- return openBlock(), createElementBlock("div", _hoisted_1$i, [createElementVNode("input", mergeProps({
13747
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [createElementVNode("input", mergeProps({
13785
13748
  id: _ctx.id,
13786
13749
  ref: "file-selector",
13787
13750
  type: "file",
@@ -13800,32 +13763,41 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
13800
13763
  name: "paper-clip"
13801
13764
  }), _cache[1] || (_cache[1] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 10, _hoisted_3$a)]);
13802
13765
  }
13803
- const FFileSelector = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$g]]);
13804
- const keybindings = Object.fromEntries([["Up", focusTrAbove], ["Down", focusTrBelow], ["ArrowUp", focusTrAbove], ["ArrowDown", focusTrBelow], [" ", activateRow], ["Spacebar", activateRow]]);
13805
- function focusTrAbove(current) {
13766
+ const FFileSelector = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$e]]);
13767
+ const keybindings = {
13768
+ Up: focusTrAbove,
13769
+ Down: focusTrBelow,
13770
+ ArrowUp: focusTrAbove,
13771
+ ArrowDown: focusTrBelow,
13772
+ " ": activateRow,
13773
+ Spacebar: activateRow
13774
+ };
13775
+ function focusTrAbove(table, current) {
13776
+ const tr = table.tr.value;
13806
13777
  if (current > 0) {
13807
- this.tr[current - 1].focus();
13778
+ tr[current - 1].focus();
13808
13779
  } else {
13809
- this.tr[this.tr.length - 1].focus();
13780
+ tr[tr.length - 1].focus();
13810
13781
  }
13811
13782
  }
13812
- function focusTrBelow(current) {
13813
- if (current < this.tr.length - 1) {
13814
- this.tr[current + 1].focus();
13783
+ function focusTrBelow(table, current) {
13784
+ const tr = table.tr.value;
13785
+ if (current < tr.length - 1) {
13786
+ tr[current + 1].focus();
13815
13787
  } else {
13816
- this.tr[0].focus();
13788
+ tr[0].focus();
13817
13789
  }
13818
13790
  }
13819
- function activateRow(current) {
13820
- const row = this.rows[current];
13821
- const element = this.tr[current];
13822
- this.activate(row, element);
13791
+ function activateRow(table, current) {
13792
+ const row = table.rows[current];
13793
+ const element = table.tr.value[current];
13794
+ table.activate(row, element);
13823
13795
  }
13824
- function onKeydown(event, current) {
13796
+ function onKeydown(table, event, current) {
13825
13797
  const fn2 = keybindings[event.key];
13826
13798
  if (fn2) {
13827
13799
  event.preventDefault();
13828
- fn2.call(this, current);
13800
+ fn2(table, current);
13829
13801
  }
13830
13802
  }
13831
13803
  function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit, slots) {
@@ -13889,7 +13861,6 @@ function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit
13889
13861
  return Boolean(expandableRows(row));
13890
13862
  }
13891
13863
  return {
13892
- expandedRows,
13893
13864
  isExpandableTable,
13894
13865
  hasExpandableSlot,
13895
13866
  toggleExpanded,
@@ -13901,32 +13872,76 @@ function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit
13901
13872
  hasExpandableContent
13902
13873
  };
13903
13874
  }
13904
- function forceRepaintIE11(target) {
13905
- if (navigator.userAgent.includes("Trident")) {
13906
- target.style.display = "none";
13907
- target.offsetHeight;
13908
- target.style.removeProperty("display");
13909
- }
13910
- }
13911
- const _sfc_main$h = defineComponent({
13912
- name: "FInteractiveTable",
13913
- components: {
13914
- FCheckboxField,
13915
- FIcon
13916
- },
13917
- mixins: [TranslationMixin],
13918
- provide() {
13919
- return {
13920
- addColumn: (column) => {
13921
- this.columns = addColumn(this.columns, column);
13922
- },
13923
- setVisibilityColumn: (id, visible) => {
13924
- setVisibilityColumn(this.columns, id, visible);
13925
- },
13926
- textFieldTableMode: true
13927
- };
13875
+ const _hoisted_1$i = ["role"];
13876
+ const _hoisted_2$d = {
13877
+ key: 0
13878
+ };
13879
+ const _hoisted_3$9 = {
13880
+ key: 0,
13881
+ class: "table__column--shrink"
13882
+ };
13883
+ const _hoisted_4$8 = {
13884
+ key: 1,
13885
+ class: "table__column--shrink"
13886
+ };
13887
+ const _hoisted_5$6 = {
13888
+ class: "table__row"
13889
+ };
13890
+ const _hoisted_6$4 = {
13891
+ key: 0,
13892
+ scope: "col"
13893
+ };
13894
+ const _hoisted_7$3 = {
13895
+ class: "sr-only"
13896
+ };
13897
+ const _hoisted_8$3 = {
13898
+ key: 1,
13899
+ scope: "col"
13900
+ };
13901
+ const _hoisted_9$3 = {
13902
+ class: "sr-only"
13903
+ };
13904
+ const _hoisted_10$2 = ["innerHTML"];
13905
+ const _hoisted_11$1 = {
13906
+ key: 1,
13907
+ class: "table__column__description"
13908
+ };
13909
+ const _hoisted_12$1 = ["aria-label", "aria-expanded", "aria-level", "aria-describedby", "onKeydown", "onClick"];
13910
+ const _hoisted_13 = {
13911
+ key: 0
13912
+ };
13913
+ const _hoisted_14 = {
13914
+ key: 0,
13915
+ class: "table__expand-icon"
13916
+ };
13917
+ const _hoisted_15 = {
13918
+ key: 1,
13919
+ class: "table__column--selectable"
13920
+ };
13921
+ const _hoisted_16 = {
13922
+ class: "table__input"
13923
+ };
13924
+ const _hoisted_17 = {
13925
+ key: 0,
13926
+ class: "sr-only"
13927
+ };
13928
+ const _hoisted_18 = {
13929
+ key: 0,
13930
+ class: "table__column--placeholder"
13931
+ };
13932
+ const _hoisted_19 = ["colspan"];
13933
+ const _hoisted_20 = {
13934
+ key: 0
13935
+ };
13936
+ const _hoisted_21 = {
13937
+ key: 1
13938
+ };
13939
+ const _hoisted_22 = ["colspan"];
13940
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
13941
+ ...{
13942
+ inheritAttrs: false
13928
13943
  },
13929
- inheritAttrs: false,
13944
+ __name: "FInteractiveTable",
13930
13945
  props: {
13931
13946
  /**
13932
13947
  * The rows to be listed.
@@ -14023,230 +14038,237 @@ const _sfc_main$h = defineComponent({
14023
14038
  default: () => void 0
14024
14039
  }
14025
14040
  },
14026
- emits: [
14027
- "change",
14028
- "click",
14029
- "unselect",
14030
- "update:modelValue",
14031
- "update:active",
14032
- "select",
14033
- /**
14034
- * Emitted when row is expanded.
14035
- *
14036
- * @event expand
14037
- * @param row
14038
- * @type {ListItem}
14039
- */
14040
- "expand",
14041
- /**
14042
- * Emitted when row is collapsed.
14043
- *
14044
- * @event collapse
14045
- * @param row
14046
- * @type {ListItem}
14047
- */
14048
- "collapse"
14049
- ],
14050
- setup(props, context) {
14051
- provide("renderColumns", computed(() => props.rows.length > 0));
14052
- const sortFilterDatasetInjected = FSortFilterDatasetInjected();
14053
- const activateItemInjected = ActivateItemInjected();
14054
- const expandableTable = useExpandableTable(props.expandableAttribute, props.keyAttribute, props.expandableDescribedby, context.emit, context.slots);
14055
- return {
14056
- ...sortFilterDatasetInjected,
14057
- ...activateItemInjected,
14058
- ...expandableTable
14059
- };
14060
- },
14061
- data() {
14062
- return {
14063
- activeRow: void 0,
14064
- columns: [],
14065
- selectedRows: [],
14066
- tr: [],
14067
- tbodyKey: 0
14068
- };
14069
- },
14070
- computed: {
14071
- hasCaption() {
14072
- return hasSlot(this, "caption", {}, {
14041
+ emits: ["change", "click", "unselect", "update:modelValue", "update:active", "select", "expand", "collapse"],
14042
+ setup(__props, {
14043
+ emit: __emit
14044
+ }) {
14045
+ const $t2 = useTranslate();
14046
+ const slots = useSlots();
14047
+ const {
14048
+ hasSlot: hasSlot2
14049
+ } = useSlotUtils();
14050
+ const {
14051
+ sort: sort2,
14052
+ registerCallbackOnSort,
14053
+ registerCallbackOnMount
14054
+ } = FSortFilterDatasetInjected();
14055
+ const {
14056
+ registerCallbackAfterItemAdd,
14057
+ registerCallbackBeforeItemDelete
14058
+ } = ActivateItemInjected();
14059
+ const activeRow = ref(void 0);
14060
+ const columns = ref([]);
14061
+ const selectedRows = ref([]);
14062
+ const tr = shallowRef([]);
14063
+ const tbodyKey = ref(0);
14064
+ const props = __props;
14065
+ const emit = __emit;
14066
+ const expandableTable = useExpandableTable(props.expandableAttribute, props.keyAttribute, props.expandableDescribedby, emit, slots);
14067
+ const {
14068
+ isExpandableTable,
14069
+ hasExpandableSlot,
14070
+ toggleExpanded,
14071
+ isExpanded,
14072
+ rowAriaExpanded,
14073
+ expandableRowClasses,
14074
+ getExpandableDescribedby,
14075
+ expandableRows,
14076
+ hasExpandableContent
14077
+ } = expandableTable;
14078
+ const hasCaption = computed(() => {
14079
+ return hasSlot2("caption", {}, {
14073
14080
  stripClasses: []
14074
14081
  });
14075
- },
14076
- hasCheckboxDescription() {
14077
- const firstRow = this.rows[0];
14078
- return hasSlot(this, "checkbox-description", {
14082
+ });
14083
+ const hasCheckboxDescription = computed(() => {
14084
+ const firstRow = props.rows[0];
14085
+ return hasSlot2("checkbox-description", {
14079
14086
  row: firstRow
14080
14087
  });
14081
- },
14082
- isEmpty() {
14083
- return this.rows.length === 0;
14084
- },
14085
- visibleColumns() {
14086
- return this.columns.filter((col) => col.visible);
14087
- },
14088
- tableClasses() {
14088
+ });
14089
+ const isEmpty2 = computed(() => {
14090
+ return props.rows.length === 0;
14091
+ });
14092
+ const visibleColumns = computed(() => {
14093
+ return columns.value.filter((col) => col.visible);
14094
+ });
14095
+ const tableClasses = computed(() => {
14089
14096
  const classes = [];
14090
- if (this.selectable) {
14097
+ if (props.selectable) {
14091
14098
  classes.push("table--selectable");
14092
14099
  }
14093
- if (this.hover) {
14100
+ if (props.hover) {
14094
14101
  classes.push("table--hover");
14095
14102
  }
14096
14103
  return classes;
14097
- },
14098
- tableRole() {
14099
- return this.isExpandableTable ? "treegrid" : "grid";
14100
- },
14101
- wrapperClasses() {
14102
- return tableScrollClasses(this.scroll);
14103
- },
14104
- nbOfColumns() {
14105
- let columnCount = this.visibleColumns.length;
14106
- if (this.selectable) {
14104
+ });
14105
+ const tableRole = computed(() => {
14106
+ return isExpandableTable.value ? "treegrid" : "grid";
14107
+ });
14108
+ const wrapperClasses = computed(() => {
14109
+ return tableScrollClasses(props.scroll);
14110
+ });
14111
+ const nbOfColumns = computed(() => {
14112
+ let columnCount = visibleColumns.value.length;
14113
+ if (props.selectable) {
14107
14114
  columnCount++;
14108
14115
  }
14109
- if (this.isExpandableTable) {
14116
+ if (isExpandableTable.value) {
14110
14117
  columnCount++;
14111
14118
  }
14112
14119
  return columnCount;
14113
- }
14114
- },
14115
- watch: {
14116
- rows: {
14117
- immediate: true,
14118
- deep: true,
14119
- handler: function() {
14120
- if (this.modelValue) {
14121
- this.selectedRows = this.modelValue.filter((row) => {
14122
- return includeItem(row, this.rows, this.keyAttribute);
14123
- });
14124
- }
14125
- }
14126
- },
14127
- active: {
14128
- immediate: true,
14129
- handler: function() {
14130
- this.updateActiveRowFromVModel();
14120
+ });
14121
+ provide("addColumn", (column) => {
14122
+ columns.value = addColumn(columns.value, column);
14123
+ });
14124
+ provide("setVisibilityColumn", (id, visible) => {
14125
+ setVisibilityColumn(columns.value, id, visible);
14126
+ });
14127
+ provide("textFieldTableMode", true);
14128
+ provide("renderColumns", computed(() => props.rows.length > 0));
14129
+ watch(() => props.rows, () => {
14130
+ if (props.modelValue) {
14131
+ selectedRows.value = props.modelValue.filter((row) => {
14132
+ return includeItem(row, props.rows, props.keyAttribute);
14133
+ });
14131
14134
  }
14132
- },
14133
- showActive: {
14135
+ }, {
14134
14136
  immediate: true,
14135
- handler: function(val) {
14136
- if (!val) {
14137
- this.tbodyKey ^= 1;
14138
- }
14137
+ deep: true
14138
+ });
14139
+ watch(() => props.active, () => {
14140
+ updateActiveRowFromVModel();
14141
+ }, {
14142
+ immediate: true
14143
+ });
14144
+ watch(() => props.showActive, (val) => {
14145
+ if (!val) {
14146
+ tbodyKey.value ^= 1;
14139
14147
  }
14148
+ }, {
14149
+ immediate: true
14150
+ });
14151
+ function updateTr(tbodyElement) {
14152
+ const trElements = [].slice.call(tbodyElement.children);
14153
+ const trInteractableElements = trElements.filter((tr2) => {
14154
+ return tr2.tabIndex === 0;
14155
+ });
14156
+ tr.value = trInteractableElements;
14140
14157
  }
14141
- },
14142
- updated() {
14143
- const tbodyElement = this.$refs["tbodyElement"];
14144
- const trElements = [].slice.call(tbodyElement.children);
14145
- const trInteractableElements = trElements.filter((tr) => {
14146
- return tr.tabIndex === 0;
14158
+ onUpdated(() => {
14159
+ const tbodyElement = useTemplateRef("tbodyElement");
14160
+ if (tbodyElement.value) {
14161
+ updateTr(tbodyElement.value);
14162
+ }
14147
14163
  });
14148
- this.tr = trInteractableElements;
14149
- },
14150
- mounted() {
14151
- this.registerCallbackOnSort(this.callbackOnSort);
14152
- this.registerCallbackOnMount(this.callbackSortableColumns);
14153
- this.registerCallbackAfterItemAdd(this.callbackAfterItemAdd);
14154
- this.registerCallbackBeforeItemDelete(this.callbackBeforeItemDelete);
14155
- },
14156
- methods: {
14157
- isActive(row) {
14158
- if (!this.showActive) {
14159
- return false;
14164
+ onMounted(() => {
14165
+ const tbodyElement = useTemplateRef("tbodyElement");
14166
+ if (tbodyElement.value) {
14167
+ updateTr(tbodyElement.value);
14168
+ }
14169
+ registerCallbackOnSort(callbackOnSort);
14170
+ registerCallbackOnMount(callbackSortableColumns);
14171
+ registerCallbackAfterItemAdd(callbackAfterItemAdd);
14172
+ registerCallbackBeforeItemDelete(callbackBeforeItemDelete);
14173
+ });
14174
+ function forceRepaintIE11(target) {
14175
+ if (navigator.userAgent.includes("Trident")) {
14176
+ target.style.display = "none";
14177
+ target.offsetHeight;
14178
+ target.style.removeProperty("display");
14160
14179
  }
14161
- return itemEquals(row, this.activeRow, this.keyAttribute);
14162
- },
14163
- isSelected(row) {
14164
- return includeItem(row, this.selectedRows, this.keyAttribute);
14165
- },
14166
- onKeydownExpandable(event, index) {
14167
- if (event.key === " " || event.key === "Spacebar") {
14168
- event.preventDefault();
14169
- return;
14180
+ }
14181
+ function isActive(row) {
14182
+ if (!props.showActive) {
14183
+ return false;
14170
14184
  }
14171
- onKeydown.call(this, event, index);
14172
- },
14173
- onKeydown(event, index) {
14174
- onKeydown.call(this, event, index);
14175
- },
14176
- onClick(event, row) {
14185
+ return itemEquals(row, activeRow.value, props.keyAttribute);
14186
+ }
14187
+ function isSelected(row) {
14188
+ return includeItem(row, selectedRows.value, props.keyAttribute);
14189
+ }
14190
+ function onKeydown$1(event, index) {
14191
+ onKeydown({
14192
+ rows: props.rows,
14193
+ tr,
14194
+ activate
14195
+ }, event, index);
14196
+ }
14197
+ function onClick(event, row) {
14177
14198
  const {
14178
14199
  target
14179
14200
  } = event;
14180
14201
  const isRelevant = ["TD", "TH"].includes(target.nodeName);
14181
14202
  if (isRelevant) {
14182
14203
  const parent = target.parentElement;
14183
- this.activate(row, parent);
14204
+ activate(row, parent);
14184
14205
  }
14185
- },
14186
- activate(row, tr) {
14187
- this.$emit("click", row);
14188
- if (this.isExpandableTable && this.hasExpandableContent(row)) {
14189
- this.toggleExpanded(row);
14206
+ }
14207
+ function activate(row, tr2) {
14208
+ emit("click", row);
14209
+ if (isExpandableTable.value && hasExpandableContent(row)) {
14210
+ toggleExpanded(row);
14190
14211
  }
14191
- if (!itemEquals(row, this.activeRow, this.keyAttribute)) {
14192
- this.$emit("change", row);
14193
- this.setActiveRow(row);
14194
- if (tr) {
14195
- tr.focus();
14196
- const td = tr.children[0];
14212
+ if (!itemEquals(row, activeRow.value, props.keyAttribute)) {
14213
+ emit("change", row);
14214
+ setActiveRow(row);
14215
+ if (tr2) {
14216
+ tr2.focus();
14217
+ const td = tr2.children[0];
14197
14218
  forceRepaintIE11(td);
14198
14219
  }
14199
14220
  }
14200
- },
14201
- rowDescription(row) {
14202
- const slot = this.$slots["row-description"];
14221
+ }
14222
+ function rowDescription(row) {
14223
+ const slot = slots["row-description"];
14203
14224
  return renderSlotText(slot, {
14204
14225
  row
14205
14226
  });
14206
- },
14207
- onSelect(row) {
14208
- if (includeItem(row, this.selectedRows, this.keyAttribute)) {
14209
- this.selectedRows = this.selectedRows.filter((i) => !itemEquals(i, row, this.keyAttribute));
14210
- this.$emit("unselect", row);
14227
+ }
14228
+ function onSelect(row) {
14229
+ var _a, _b;
14230
+ if (includeItem(row, selectedRows.value, props.keyAttribute)) {
14231
+ selectedRows.value = selectedRows.value.filter((i) => !itemEquals(i, row, props.keyAttribute));
14232
+ emit("unselect", row);
14211
14233
  } else {
14212
- this.selectedRows.push(row);
14213
- this.$emit("select", row);
14234
+ selectedRows.value.push(row);
14235
+ emit("select", row);
14214
14236
  }
14215
- this.updateVModelWithSelectedRows();
14216
- this.$forceUpdate();
14217
- },
14218
- updateVModelWithSelectedRows() {
14219
- if (this.modelValue) {
14220
- this.$emit("update:modelValue", this.selectedRows);
14237
+ updateVModelWithSelectedRows();
14238
+ (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$forceUpdate();
14239
+ }
14240
+ function updateVModelWithSelectedRows() {
14241
+ if (props.modelValue) {
14242
+ emit("update:modelValue", selectedRows.value);
14221
14243
  }
14222
- },
14223
- rowClasses(row, index) {
14224
- const active = this.isActive(row) ? ["table__row--active"] : [];
14225
- const selected = this.isSelected(row) ? ["table__row--selected"] : [];
14226
- const isExpandableRow = this.isExpandableTable && this.hasExpandableContent(row);
14244
+ }
14245
+ function rowClasses(row, index) {
14246
+ const active = isActive(row) ? ["table__row--active"] : [];
14247
+ const selected = isSelected(row) ? ["table__row--selected"] : [];
14248
+ const isExpandableRow = isExpandableTable.value && hasExpandableContent(row);
14227
14249
  const expandable = isExpandableRow ? ["table__row--expandable"] : [];
14228
- const expanded = this.isExpanded(row) ? ["table__row--expanded-border"] : [];
14229
- const striped = this.striped && index % 2 !== 0 ? ["table__row--striped"] : [];
14250
+ const expanded = isExpanded(row) ? ["table__row--expanded-border"] : [];
14251
+ const striped = props.striped && index % 2 !== 0 ? ["table__row--striped"] : [];
14230
14252
  return ["table__row", ...active, ...selected, ...striped, ...expandable, ...expanded];
14231
- },
14232
- rowKey(row) {
14233
- const key = row[this.keyAttribute];
14253
+ }
14254
+ function rowKey(row) {
14255
+ const key = row[props.keyAttribute];
14234
14256
  if (typeof key === "undefined") {
14235
- throw new Error(`Key attribute [${this.keyAttribute}]' is missing in row`);
14257
+ throw new Error(`Key attribute [${props.keyAttribute}]' is missing in row`);
14236
14258
  }
14237
14259
  return String(key);
14238
- },
14239
- columnClasses(column) {
14260
+ }
14261
+ function columnClasses(column) {
14240
14262
  const sortable = column.sortable ? ["table__column--sortable"] : [];
14241
14263
  return ["table__column", `table__column--${column.type}`, ...sortable, column.size];
14242
- },
14243
- iconClasses(column) {
14264
+ }
14265
+ function iconClasses2(column) {
14244
14266
  return getSortableIconClasses(column);
14245
- },
14246
- iconName(column) {
14267
+ }
14268
+ function iconName(column) {
14247
14269
  return getSortableIconName(column);
14248
- },
14249
- onClickColumnHeader(column) {
14270
+ }
14271
+ function onClickColumnHeader(column) {
14250
14272
  if (!column.sortable) {
14251
14273
  return;
14252
14274
  }
@@ -14255,206 +14277,138 @@ const _sfc_main$h = defineComponent({
14255
14277
  columnName = "";
14256
14278
  column.sort = FTableColumnSort.UNSORTED;
14257
14279
  }
14258
- this.sort(columnName, column.sort !== FTableColumnSort.ASCENDING);
14259
- },
14260
- callbackOnSort(columnName, ascending) {
14261
- updateSortOrder(this.columns, columnName, ascending);
14262
- },
14263
- callbackSortableColumns(columnNames) {
14264
- setSortableColumns(this.columns, columnNames);
14265
- },
14266
- callbackAfterItemAdd(item) {
14267
- this.activate(item, null);
14268
- },
14269
- callbackBeforeItemDelete(item) {
14270
- if (this.rows.length === 0) {
14280
+ sort2(columnName, column.sort !== FTableColumnSort.ASCENDING);
14281
+ }
14282
+ function callbackOnSort(columnName, ascending) {
14283
+ updateSortOrder(columns.value, columnName, ascending);
14284
+ }
14285
+ function callbackSortableColumns(columnNames) {
14286
+ setSortableColumns(columns.value, columnNames);
14287
+ }
14288
+ function callbackAfterItemAdd(item) {
14289
+ activate(item, null);
14290
+ }
14291
+ function callbackBeforeItemDelete(item) {
14292
+ if (props.rows.length === 0) {
14271
14293
  return;
14272
14294
  }
14273
- let targetIndex = this.rows.indexOf(item) - 1;
14274
- if (targetIndex < 0 && this.rows.length > 1) {
14295
+ let targetIndex = props.rows.indexOf(item) - 1;
14296
+ if (targetIndex < 0 && props.rows.length > 1) {
14275
14297
  targetIndex = 1;
14276
14298
  } else if (targetIndex < 0) {
14277
14299
  targetIndex = 0;
14278
14300
  }
14279
- this.activate(this.rows[targetIndex], this.tr[targetIndex]);
14280
- },
14281
- escapeNewlines(value) {
14301
+ activate(props.rows[targetIndex], tr.value[targetIndex]);
14302
+ }
14303
+ function escapeNewlines(value) {
14282
14304
  return value.replace(/\n/g, "<br/>");
14283
- },
14284
- updateActiveRowFromVModel() {
14285
- if (this.active === void 0) {
14286
- this.setActiveRow(void 0);
14287
- } else if (!itemEquals(this.active, this.activeRow, this.keyAttribute)) {
14288
- this.setActiveRow(this.active);
14305
+ }
14306
+ function updateActiveRowFromVModel() {
14307
+ if (props.active === void 0) {
14308
+ setActiveRow(void 0);
14309
+ } else if (!itemEquals(props.active, activeRow.value, props.keyAttribute)) {
14310
+ setActiveRow(props.active);
14289
14311
  }
14290
- },
14291
- setActiveRow(row) {
14292
- this.activeRow = row;
14293
- this.$emit("update:active", this.activeRow);
14294
14312
  }
14313
+ function setActiveRow(row) {
14314
+ activeRow.value = row;
14315
+ emit("update:active", activeRow.value);
14316
+ }
14317
+ return (_ctx, _cache) => {
14318
+ return openBlock(), createElementBlock("div", {
14319
+ class: normalizeClass(wrapperClasses.value)
14320
+ }, [createCommentVNode("", true), _cache[18] || (_cache[18] = createTextVNode()), createElementVNode("table", mergeProps({
14321
+ class: ["table", tableClasses.value],
14322
+ role: tableRole.value
14323
+ }, _ctx.$attrs), [hasCaption.value ? (openBlock(), createElementBlock("caption", _hoisted_2$d, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), _cache[15] || (_cache[15] = createTextVNode()), createElementVNode("colgroup", null, [unref(isExpandableTable) ? (openBlock(), createElementBlock("col", _hoisted_3$9)) : createCommentVNode("", true), _cache[0] || (_cache[0] = createTextVNode()), __props.selectable ? (openBlock(), createElementBlock("col", _hoisted_4$8)) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(columns.value, (column) => {
14324
+ return openBlock(), createElementBlock("col", {
14325
+ key: column.id,
14326
+ class: normalizeClass(column.size)
14327
+ }, null, 2);
14328
+ }), 128))]), _cache[16] || (_cache[16] = createTextVNode()), createElementVNode("thead", null, [createElementVNode("tr", _hoisted_5$6, [unref(isExpandableTable) ? (openBlock(), createElementBlock("th", _hoisted_6$4, [createElementVNode("span", _hoisted_7$3, toDisplayString(unref($t2)("fkui.interactive-table.select", "Expandera")), 1)])) : createCommentVNode("", true), _cache[4] || (_cache[4] = createTextVNode()), __props.selectable ? (openBlock(), createElementBlock("th", _hoisted_8$3, [createElementVNode("span", _hoisted_9$3, toDisplayString(unref($t2)("fkui.interactive-table.select", "Markera")), 1)])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(visibleColumns.value, (column) => {
14329
+ return openBlock(), createElementBlock("th", mergeProps({
14330
+ key: column.id,
14331
+ scope: "col",
14332
+ class: columnClasses(column)
14333
+ }, toHandlers(column.sortable ? {
14334
+ click: () => onClickColumnHeader(column)
14335
+ } : {}, true)), [createElementVNode("span", {
14336
+ innerHTML: escapeNewlines(column.title)
14337
+ }, null, 8, _hoisted_10$2), _cache[2] || (_cache[2] = createTextVNode()), column.sortable ? (openBlock(), createBlock(unref(FIcon), {
14338
+ key: 0,
14339
+ class: normalizeClass(iconClasses2(column)),
14340
+ name: iconName(column)
14341
+ }, null, 8, ["class", "name"])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), column.description ? (openBlock(), createElementBlock("span", _hoisted_11$1, toDisplayString(column.description), 1)) : createCommentVNode("", true)], 16);
14342
+ }), 128))])]), _cache[17] || (_cache[17] = createTextVNode()), (openBlock(), createElementBlock("tbody", {
14343
+ ref: "tbodyElement",
14344
+ key: tbodyKey.value
14345
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, index) => {
14346
+ return openBlock(), createElementBlock(Fragment, {
14347
+ key: rowKey(row)
14348
+ }, [createElementVNode("tr", {
14349
+ class: normalizeClass(rowClasses(row, index)),
14350
+ "aria-label": rowDescription(row),
14351
+ "aria-expanded": unref(rowAriaExpanded)(row),
14352
+ "aria-level": unref(isExpandableTable) ? 1 : void 0,
14353
+ "aria-describedby": unref(getExpandableDescribedby)(row),
14354
+ tabindex: "0",
14355
+ onKeydown: withModifiers(($event) => onKeydown$1($event, index), ["self"]),
14356
+ onClick: ($event) => onClick($event, row)
14357
+ }, [unref(isExpandableTable) ? (openBlock(), createElementBlock("td", _hoisted_13, [unref(hasExpandableContent)(row) ? (openBlock(), createElementBlock("div", _hoisted_14, [createVNode(unref(FIcon), {
14358
+ name: "arrow-right",
14359
+ rotate: unref(isExpanded)(row) ? "270" : "90"
14360
+ }, null, 8, ["rotate"])])) : createCommentVNode("", true)])) : createCommentVNode("", true), _cache[6] || (_cache[6] = createTextVNode()), __props.selectable ? (openBlock(), createElementBlock("td", _hoisted_15, [createElementVNode("div", _hoisted_16, [createVNode(unref(FCheckboxField), {
14361
+ value: true,
14362
+ "model-value": isSelected(row),
14363
+ onClick: withModifiers(($event) => onSelect(row), ["self"])
14364
+ }, {
14365
+ default: withCtx(() => [hasCheckboxDescription.value ? (openBlock(), createElementBlock("span", _hoisted_17, [renderSlot(_ctx.$slots, "checkbox-description", mergeProps({
14366
+ ref_for: true
14367
+ }, {
14368
+ row
14369
+ }))])) : createCommentVNode("", true)]),
14370
+ _: 2
14371
+ }, 1032, ["model-value", "onClick"])])])) : createCommentVNode("", true), _cache[7] || (_cache[7] = createTextVNode()), renderSlot(_ctx.$slots, "default", mergeProps({
14372
+ ref_for: true
14373
+ }, {
14374
+ row
14375
+ }))], 42, _hoisted_12$1), _cache[11] || (_cache[11] = createTextVNode()), unref(isExpandableTable) && unref(hasExpandableContent)(row) ? (openBlock(true), createElementBlock(Fragment, {
14376
+ key: 0
14377
+ }, renderList(unref(expandableRows)(row), (expandableRow, expandableIndex) => {
14378
+ return openBlock(), createElementBlock("tr", {
14379
+ key: rowKey(expandableRow),
14380
+ "aria-level": "2",
14381
+ class: normalizeClass(unref(expandableRowClasses)(row, expandableIndex))
14382
+ }, [_cache[8] || (_cache[8] = createElementVNode("td", {
14383
+ class: "table__column--placeholder"
14384
+ }, null, -1)), _cache[9] || (_cache[9] = createTextVNode()), __props.selectable ? (openBlock(), createElementBlock("td", _hoisted_18)) : createCommentVNode("", true), _cache[10] || (_cache[10] = createTextVNode()), !unref(hasExpandableSlot) ? renderSlot(_ctx.$slots, "default", mergeProps({
14385
+ key: 1,
14386
+ ref_for: true
14387
+ }, {
14388
+ row: expandableRow
14389
+ })) : (openBlock(), createElementBlock("td", {
14390
+ key: 2,
14391
+ class: "table__column table__column--indented",
14392
+ colspan: columns.value.length
14393
+ }, [renderSlot(_ctx.$slots, "expandable", mergeProps({
14394
+ ref_for: true
14395
+ }, {
14396
+ expandableRow,
14397
+ parentRow: row
14398
+ }))], 8, _hoisted_19))], 2);
14399
+ }), 128)) : createCommentVNode("", true)], 64);
14400
+ }), 128)), _cache[13] || (_cache[13] = createTextVNode()), isEmpty2.value && columns.value.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_20, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
14401
+ row: {}
14402
+ })))])) : createCommentVNode("", true), _cache[14] || (_cache[14] = createTextVNode()), isEmpty2.value ? (openBlock(), createElementBlock("tr", _hoisted_21, [createElementVNode("td", {
14403
+ class: "table__column table__column--action",
14404
+ colspan: nbOfColumns.value
14405
+ }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref($t2)("fkui.interactive-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_22), _cache[12] || (_cache[12] = createTextVNode()), renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
14406
+ row: {}
14407
+ })))])) : createCommentVNode("", true)]))], 16, _hoisted_1$i)], 2);
14408
+ };
14295
14409
  }
14296
14410
  });
14297
- const _hoisted_1$h = ["role"];
14298
- const _hoisted_2$d = {
14299
- key: 0
14300
- };
14301
- const _hoisted_3$9 = {
14302
- key: 0,
14303
- class: "table__column--shrink"
14304
- };
14305
- const _hoisted_4$8 = {
14306
- key: 1,
14307
- class: "table__column--shrink"
14308
- };
14309
- const _hoisted_5$6 = {
14310
- class: "table__row"
14311
- };
14312
- const _hoisted_6$4 = {
14313
- key: 0,
14314
- scope: "col"
14315
- };
14316
- const _hoisted_7$3 = {
14317
- class: "sr-only"
14318
- };
14319
- const _hoisted_8$3 = {
14320
- key: 1,
14321
- scope: "col"
14322
- };
14323
- const _hoisted_9$3 = {
14324
- class: "sr-only"
14325
- };
14326
- const _hoisted_10$2 = ["innerHTML"];
14327
- const _hoisted_11$1 = {
14328
- key: 1,
14329
- class: "table__column__description"
14330
- };
14331
- const _hoisted_12$1 = ["aria-label", "aria-expanded", "aria-level", "aria-describedby", "onKeydown", "onClick"];
14332
- const _hoisted_13 = {
14333
- key: 0
14334
- };
14335
- const _hoisted_14 = {
14336
- key: 0,
14337
- class: "table__expand-icon"
14338
- };
14339
- const _hoisted_15 = {
14340
- key: 1,
14341
- class: "table__column--selectable"
14342
- };
14343
- const _hoisted_16 = {
14344
- class: "table__input"
14345
- };
14346
- const _hoisted_17 = {
14347
- key: 0,
14348
- class: "sr-only"
14349
- };
14350
- const _hoisted_18 = {
14351
- key: 0,
14352
- class: "table__column--placeholder"
14353
- };
14354
- const _hoisted_19 = ["colspan"];
14355
- const _hoisted_20 = {
14356
- key: 0
14357
- };
14358
- const _hoisted_21 = {
14359
- key: 1
14360
- };
14361
- const _hoisted_22 = ["colspan"];
14362
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
14363
- const _component_f_icon = resolveComponent("f-icon");
14364
- const _component_f_checkbox_field = resolveComponent("f-checkbox-field");
14365
- return openBlock(), createElementBlock("div", {
14366
- class: normalizeClass(_ctx.wrapperClasses)
14367
- }, [createElementVNode("table", mergeProps({
14368
- class: ["table", _ctx.tableClasses],
14369
- role: _ctx.tableRole
14370
- }, _ctx.$attrs), [_ctx.hasCaption ? (openBlock(), createElementBlock("caption", _hoisted_2$d, [renderSlot(_ctx.$slots, "caption")])) : createCommentVNode("", true), _cache[15] || (_cache[15] = createTextVNode()), createElementVNode("colgroup", null, [_ctx.isExpandableTable ? (openBlock(), createElementBlock("col", _hoisted_3$9)) : createCommentVNode("", true), _cache[0] || (_cache[0] = createTextVNode()), _ctx.selectable ? (openBlock(), createElementBlock("col", _hoisted_4$8)) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column) => {
14371
- return openBlock(), createElementBlock("col", {
14372
- key: column.id,
14373
- class: normalizeClass(column.size)
14374
- }, null, 2);
14375
- }), 128))]), _cache[16] || (_cache[16] = createTextVNode()), createElementVNode("thead", null, [createElementVNode("tr", _hoisted_5$6, [_ctx.isExpandableTable ? (openBlock(), createElementBlock("th", _hoisted_6$4, [createElementVNode("span", _hoisted_7$3, toDisplayString(_ctx.$t("fkui.interactive-table.select", "Expandera")), 1)])) : createCommentVNode("", true), _cache[4] || (_cache[4] = createTextVNode()), _ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_8$3, [createElementVNode("span", _hoisted_9$3, toDisplayString(_ctx.$t("fkui.interactive-table.select", "Markera")), 1)])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleColumns, (column) => {
14376
- return openBlock(), createElementBlock("th", mergeProps({
14377
- key: column.id,
14378
- scope: "col",
14379
- class: _ctx.columnClasses(column)
14380
- }, toHandlers(column.sortable ? {
14381
- click: () => _ctx.onClickColumnHeader(column)
14382
- } : {}, true)), [createElementVNode("span", {
14383
- innerHTML: _ctx.escapeNewlines(column.title)
14384
- }, null, 8, _hoisted_10$2), _cache[2] || (_cache[2] = createTextVNode()), column.sortable ? (openBlock(), createBlock(_component_f_icon, {
14385
- key: 0,
14386
- class: normalizeClass(_ctx.iconClasses(column)),
14387
- name: _ctx.iconName(column)
14388
- }, null, 8, ["class", "name"])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), column.description ? (openBlock(), createElementBlock("span", _hoisted_11$1, toDisplayString(column.description), 1)) : createCommentVNode("", true)], 16);
14389
- }), 128))])]), _cache[17] || (_cache[17] = createTextVNode()), (openBlock(), createElementBlock("tbody", {
14390
- ref: "tbodyElement",
14391
- key: _ctx.tbodyKey
14392
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row, index) => {
14393
- return openBlock(), createElementBlock(Fragment, {
14394
- key: _ctx.rowKey(row)
14395
- }, [createElementVNode("tr", {
14396
- class: normalizeClass(_ctx.rowClasses(row, index)),
14397
- "aria-label": _ctx.rowDescription(row),
14398
- "aria-expanded": _ctx.rowAriaExpanded(row),
14399
- "aria-level": _ctx.isExpandableTable ? 1 : void 0,
14400
- "aria-describedby": _ctx.getExpandableDescribedby(row),
14401
- tabindex: "0",
14402
- onKeydown: withModifiers(($event) => _ctx.onKeydown($event, index), ["self"]),
14403
- onClick: ($event) => _ctx.onClick($event, row, index)
14404
- }, [_ctx.isExpandableTable ? (openBlock(), createElementBlock("td", _hoisted_13, [_ctx.hasExpandableContent(row) ? (openBlock(), createElementBlock("div", _hoisted_14, [createVNode(_component_f_icon, {
14405
- name: "arrow-right",
14406
- rotate: _ctx.isExpanded(row) ? "270" : "90"
14407
- }, null, 8, ["rotate"])])) : createCommentVNode("", true)])) : createCommentVNode("", true), _cache[6] || (_cache[6] = createTextVNode()), _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_15, [createElementVNode("div", _hoisted_16, [createVNode(_component_f_checkbox_field, {
14408
- value: true,
14409
- "model-value": _ctx.isSelected(row),
14410
- onClick: withModifiers(($event) => _ctx.onSelect(row), ["self"])
14411
- }, {
14412
- default: withCtx(() => [_ctx.hasCheckboxDescription ? (openBlock(), createElementBlock("span", _hoisted_17, [renderSlot(_ctx.$slots, "checkbox-description", mergeProps({
14413
- ref_for: true
14414
- }, {
14415
- row
14416
- }))])) : createCommentVNode("", true)]),
14417
- _: 2
14418
- }, 1032, ["model-value", "onClick"])])])) : createCommentVNode("", true), _cache[7] || (_cache[7] = createTextVNode()), renderSlot(_ctx.$slots, "default", mergeProps({
14419
- ref_for: true
14420
- }, {
14421
- row
14422
- }))], 42, _hoisted_12$1), _cache[11] || (_cache[11] = createTextVNode()), _ctx.isExpandableTable && _ctx.hasExpandableContent(row) ? (openBlock(true), createElementBlock(Fragment, {
14423
- key: 0
14424
- }, renderList(_ctx.expandableRows(row), (expandableRow, expandableIndex) => {
14425
- return openBlock(), createElementBlock("tr", {
14426
- key: _ctx.rowKey(expandableRow),
14427
- "aria-level": "2",
14428
- class: normalizeClass(_ctx.expandableRowClasses(row, expandableIndex))
14429
- }, [_cache[8] || (_cache[8] = createElementVNode("td", {
14430
- class: "table__column--placeholder"
14431
- }, null, -1)), _cache[9] || (_cache[9] = createTextVNode()), _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_18)) : createCommentVNode("", true), _cache[10] || (_cache[10] = createTextVNode()), !_ctx.hasExpandableSlot ? renderSlot(_ctx.$slots, "default", mergeProps({
14432
- key: 1,
14433
- ref_for: true
14434
- }, {
14435
- row: expandableRow
14436
- })) : (openBlock(), createElementBlock("td", {
14437
- key: 2,
14438
- class: "table__column table__column--indented",
14439
- colspan: _ctx.columns.length
14440
- }, [renderSlot(_ctx.$slots, "expandable", mergeProps({
14441
- ref_for: true
14442
- }, {
14443
- expandableRow,
14444
- parentRow: row
14445
- }))], 8, _hoisted_19))], 2);
14446
- }), 128)) : createCommentVNode("", true)], 64);
14447
- }), 128)), _cache[13] || (_cache[13] = createTextVNode()), _ctx.isEmpty && _ctx.columns.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_20, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
14448
- row: {}
14449
- })))])) : createCommentVNode("", true), _cache[14] || (_cache[14] = createTextVNode()), _ctx.isEmpty ? (openBlock(), createElementBlock("tr", _hoisted_21, [createElementVNode("td", {
14450
- class: "table__column table__column--action",
14451
- colspan: _ctx.nbOfColumns
14452
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.interactive-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_22), _cache[12] || (_cache[12] = createTextVNode()), renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
14453
- row: {}
14454
- })))])) : createCommentVNode("", true)]))], 16, _hoisted_1$h)], 2);
14455
- }
14456
- const FInteractiveTable = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$f]]);
14457
- const _sfc_main$g = defineComponent({
14411
+ const _sfc_main$h = defineComponent({
14458
14412
  name: "FLayoutApplicationTemplate",
14459
14413
  computed: {
14460
14414
  showHeader() {
@@ -14479,7 +14433,7 @@ const _sfc_main$g = defineComponent({
14479
14433
  }
14480
14434
  }
14481
14435
  });
14482
- const _hoisted_1$g = {
14436
+ const _hoisted_1$h = {
14483
14437
  class: "layout-application-template"
14484
14438
  };
14485
14439
  const _hoisted_2$c = {
@@ -14498,12 +14452,12 @@ const _hoisted_5$5 = {
14498
14452
  key: 0,
14499
14453
  class: "layout-application-template__footer"
14500
14454
  };
14501
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
14502
- return openBlock(), createElementBlock("div", _hoisted_1$g, [_ctx.showHeader || _ctx.showTopNavigation ? (openBlock(), createElementBlock("header", _hoisted_2$c, [_ctx.showHeader ? renderSlot(_ctx.$slots, "header", {
14455
+ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
14456
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [_ctx.showHeader || _ctx.showTopNavigation ? (openBlock(), createElementBlock("header", _hoisted_2$c, [_ctx.showHeader ? renderSlot(_ctx.$slots, "header", {
14503
14457
  key: 0
14504
14458
  }) : createCommentVNode("", true), _cache[0] || (_cache[0] = createTextVNode()), _ctx.showTopNavigation ? (openBlock(), createElementBlock("nav", _hoisted_3$8, [renderSlot(_ctx.$slots, "top-navigation")])) : createCommentVNode("", true)], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), createElementVNode("main", _hoisted_4$7, [renderSlot(_ctx.$slots, "default"), _cache[1] || (_cache[1] = createTextVNode()), _ctx.showFooter ? (openBlock(), createElementBlock("footer", _hoisted_5$5, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("", true)], 512)]);
14505
14459
  }
14506
- const FLayoutApplicationTemplate = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$e]]);
14460
+ const FLayoutApplicationTemplate = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$d]]);
14507
14461
  function getGridClasses(target) {
14508
14462
  if (target === null) {
14509
14463
  return {};
@@ -14604,7 +14558,7 @@ function useLayoutPanel(options) {
14604
14558
  rightPrimaryClasses
14605
14559
  };
14606
14560
  }
14607
- const _sfc_main$f = defineComponent({
14561
+ const _sfc_main$g = defineComponent({
14608
14562
  name: "FLayoutLeftPanel",
14609
14563
  components: {
14610
14564
  FIcon
@@ -14689,7 +14643,7 @@ const _sfc_main$f = defineComponent({
14689
14643
  }
14690
14644
  }
14691
14645
  });
14692
- const _hoisted_1$f = {
14646
+ const _hoisted_1$g = {
14693
14647
  class: "layout-navigation"
14694
14648
  };
14695
14649
  const _hoisted_2$b = ["aria-expanded"];
@@ -14700,9 +14654,9 @@ const _hoisted_4$6 = {
14700
14654
  key: 1,
14701
14655
  class: "layout-navigation__navigation__inner--minimized"
14702
14656
  };
14703
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
14657
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
14704
14658
  const _component_f_icon = resolveComponent("f-icon");
14705
- return openBlock(), createElementBlock("div", _hoisted_1$f, [createElementVNode("nav", {
14659
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [createElementVNode("nav", {
14706
14660
  id: "layout-navigation__navigation",
14707
14661
  class: "layout-navigation__navigation",
14708
14662
  style: normalizeStyle(_ctx.navigationStyle),
@@ -14751,7 +14705,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
14751
14705
  style: normalizeStyle(_ctx.primaryStyle)
14752
14706
  }, [renderSlot(_ctx.$slots, "default")], 6)]);
14753
14707
  }
14754
- const FLayoutLeftPanel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$d]]);
14708
+ const FLayoutLeftPanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$c]]);
14755
14709
  class FRightPanelServiceImpl {
14756
14710
  constructor() {
14757
14711
  _defineProperty(this, "focusedElementBeforeOpenining", null);
@@ -14781,7 +14735,7 @@ class FRightPanelServiceImpl {
14781
14735
  }
14782
14736
  }
14783
14737
  const FLayoutRightPanelService = new FRightPanelServiceImpl();
14784
- const _sfc_main$e = defineComponent({
14738
+ const _sfc_main$f = defineComponent({
14785
14739
  name: "FLayoutRightPanel",
14786
14740
  components: {
14787
14741
  FIcon
@@ -14898,15 +14852,15 @@ const _sfc_main$e = defineComponent({
14898
14852
  }
14899
14853
  }
14900
14854
  });
14901
- const _hoisted_1$e = {
14855
+ const _hoisted_1$f = {
14902
14856
  class: "layout-secondary"
14903
14857
  };
14904
14858
  const _hoisted_2$a = {
14905
14859
  class: "layout-secondary__secondary__inner"
14906
14860
  };
14907
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
14861
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
14908
14862
  const _component_f_icon = resolveComponent("f-icon");
14909
- return openBlock(), createElementBlock("div", _hoisted_1$e, [createElementVNode("div", {
14863
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [createElementVNode("div", {
14910
14864
  id: "layout-secondary__primary",
14911
14865
  class: normalizeClass(["layout-secondary__primary", _ctx.rightPrimaryClasses]),
14912
14866
  style: normalizeStyle(_ctx.primaryStyle)
@@ -14943,13 +14897,34 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
14943
14897
  name: "close"
14944
14898
  })])], 6)])], 4)) : createCommentVNode("", true)]);
14945
14899
  }
14946
- const FLayoutRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$c]]);
14947
- const _sfc_main$d = defineComponent({
14948
- name: "FList",
14949
- components: {
14950
- FCheckboxField
14951
- },
14952
- mixins: [TranslationMixin],
14900
+ const FLayoutRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$b]]);
14901
+ const _hoisted_1$e = {
14902
+ key: 0,
14903
+ class: "list"
14904
+ };
14905
+ const _hoisted_2$9 = {
14906
+ key: 0,
14907
+ class: "list__item"
14908
+ };
14909
+ const _hoisted_3$6 = {
14910
+ class: "list__item__itempane"
14911
+ };
14912
+ const _hoisted_4$5 = ["tabindex"];
14913
+ const _hoisted_5$4 = ["id", "aria-labelledby", "tabindex", "onKeydown"];
14914
+ const _hoisted_6$3 = ["onClick"];
14915
+ const _hoisted_7$2 = {
14916
+ class: "list__item__selectpane__input"
14917
+ };
14918
+ const _hoisted_8$2 = ["id"];
14919
+ const _hoisted_9$2 = {
14920
+ key: 0,
14921
+ class: "list__item"
14922
+ };
14923
+ const _hoisted_10$1 = {
14924
+ class: "list__item__itempane"
14925
+ };
14926
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14927
+ __name: "FList",
14953
14928
  props: {
14954
14929
  /**
14955
14930
  * The items to be listed.
@@ -15009,274 +14984,235 @@ const _sfc_main$d = defineComponent({
15009
14984
  default: () => ElementIdService.generateElementId()
15010
14985
  }
15011
14986
  },
15012
- emits: ["change", "click", "unselect", "update:modelValue", "select", "update:active"],
15013
- setup() {
15014
- return ActivateItemInjected();
15015
- },
15016
- data() {
15017
- return {
15018
- selectedItems: [],
15019
- activeItem: void 0
15020
- };
15021
- },
15022
- computed: {
15023
- isEmpty() {
15024
- return this.items.length === 0;
15025
- },
15026
- ariaActiveDescendant() {
15027
- return this.activeItem ? this.getItemId(this.activeItem) : void 0;
15028
- }
15029
- },
15030
- watch: {
15031
- items: {
14987
+ emits: ["change", "click", "select", "unselect", "update:active", "update:modelValue"],
14988
+ setup(__props, {
14989
+ emit: __emit
14990
+ }) {
14991
+ const $t2 = useTranslate();
14992
+ const slots = useSlots();
14993
+ const {
14994
+ registerCallbackAfterItemAdd,
14995
+ registerCallbackBeforeItemDelete
14996
+ } = ActivateItemInjected();
14997
+ const selectedItems = ref([]);
14998
+ const activeItem = ref(void 0);
14999
+ const ulElement = ref();
15000
+ const props = __props;
15001
+ const emit = __emit;
15002
+ const isEmpty2 = computed(() => {
15003
+ return props.items.length === 0;
15004
+ });
15005
+ watch(() => props.items, () => {
15006
+ updateSelectedItemsFromVModel();
15007
+ }, {
15032
15008
  deep: true,
15033
- immediate: true,
15034
- handler: function() {
15035
- this.updateSelectedItemsFromVModel();
15036
- }
15037
- },
15038
- modelValue: {
15009
+ immediate: true
15010
+ });
15011
+ watch(() => props.modelValue, () => {
15012
+ updateSelectedItemsFromVModel();
15013
+ }, {
15039
15014
  deep: true,
15040
- immediate: true,
15041
- handler: function() {
15042
- this.updateSelectedItemsFromVModel();
15043
- }
15044
- },
15045
- active: {
15046
- immediate: true,
15047
- handler: function() {
15048
- this.updateActiveItemFromVModel();
15049
- }
15050
- }
15051
- },
15052
- mounted() {
15053
- if (this.selectable && this.checkbox) {
15054
- if (!this.$slots["screenreader"]) {
15055
- throw Error('Slot "screenreader" is required when having "selectable" & "checkbox" option.');
15015
+ immediate: true
15016
+ });
15017
+ watch(() => props.active, () => {
15018
+ updateActiveItemFromVModel();
15019
+ }, {
15020
+ immediate: true
15021
+ });
15022
+ onMounted(() => {
15023
+ if (props.selectable && props.checkbox) {
15024
+ if (!slots["screenreader"]) {
15025
+ throw Error('Slot "screenreader" is required when having "selectable" & "checkbox" option.');
15026
+ }
15027
+ registerCallbackAfterItemAdd(callbackAfterItemAdd);
15028
+ registerCallbackBeforeItemDelete(callbackBeforeItemDelete);
15056
15029
  }
15057
- this.registerCallbackAfterItemAdd(this.callbackAfterItemAdd);
15058
- this.registerCallbackBeforeItemDelete(this.callbackBeforeItemDelete);
15030
+ });
15031
+ function getLiElements() {
15032
+ const element = getElementFromVueRef(ulElement.value);
15033
+ return Array.from(element.children);
15059
15034
  }
15060
- },
15061
- methods: {
15062
- getLiElements() {
15063
- const ulElement = getElementFromVueRef(this.$refs["ulElement"]);
15064
- return Array.from(ulElement.children);
15065
- },
15066
- itemKey(item) {
15067
- const key = item[this.keyAttribute];
15035
+ function itemKey(item) {
15036
+ const key = item[props.keyAttribute];
15068
15037
  if (typeof key === "undefined") {
15069
- throw new Error(`Key attribute [${this.keyAttribute}]' is missing in item`);
15038
+ throw new Error(`Key attribute [${props.keyAttribute}]' is missing in item`);
15070
15039
  }
15071
15040
  return String(key);
15072
- },
15073
- isSelected(item) {
15074
- return includeItem(item, this.selectedItems, this.keyAttribute);
15075
- },
15076
- itemClasses(item) {
15041
+ }
15042
+ function isSelected(item) {
15043
+ return includeItem(item, selectedItems.value, props.keyAttribute);
15044
+ }
15045
+ function itemClasses(item) {
15077
15046
  return {
15078
- "list__item--selected": this.isSelected(item),
15079
- "list__item--active": this.isActive(item)
15047
+ "list__item--selected": isSelected(item),
15048
+ "list__item--active": isActive(item)
15080
15049
  };
15081
- },
15082
- getAriaSelected(item) {
15083
- return String(itemEquals(this.activeItem, item, this.keyAttribute));
15084
- },
15085
- onSelect(item) {
15086
- if (includeItem(item, this.selectedItems, this.keyAttribute)) {
15087
- this.selectedItems = this.selectedItems.filter((i) => !itemEquals(i, item, this.keyAttribute));
15088
- this.$emit("unselect", item);
15050
+ }
15051
+ function onSelect(item) {
15052
+ var _a, _b;
15053
+ if (includeItem(item, selectedItems.value, props.keyAttribute)) {
15054
+ selectedItems.value = selectedItems.value.filter((i) => !itemEquals(i, item, props.keyAttribute));
15055
+ emit("unselect", item);
15089
15056
  } else {
15090
- this.selectedItems.push(item);
15091
- this.$emit("select", item);
15057
+ selectedItems.value.push(item);
15058
+ emit("select", item);
15092
15059
  }
15093
- this.updateVModelWithSelectedItems();
15094
- this.$forceUpdate();
15095
- },
15096
- setActiveItem(item) {
15097
- this.$emit("click", item);
15098
- if (!itemEquals(item, this.activeItem, this.keyAttribute)) {
15099
- this.$emit("change", item);
15100
- this.activeItem = item;
15101
- this.$emit("update:active", this.activeItem);
15060
+ updateVModelWithSelectedItems();
15061
+ (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$forceUpdate();
15062
+ }
15063
+ function setActiveItem(item) {
15064
+ emit("click", item);
15065
+ if (!itemEquals(item, activeItem.value, props.keyAttribute)) {
15066
+ emit("change", item);
15067
+ activeItem.value = item;
15068
+ emit("update:active", activeItem.value);
15102
15069
  }
15103
- },
15104
- onItemClick(event, index, item) {
15105
- this.setActiveItem(item);
15106
- },
15107
- updateVModelWithSelectedItems() {
15108
- if (this.modelValue) {
15109
- this.$emit("update:modelValue", this.selectedItems);
15070
+ }
15071
+ function onItemClick(event, index, item) {
15072
+ setActiveItem(item);
15073
+ }
15074
+ function updateVModelWithSelectedItems() {
15075
+ if (props.modelValue) {
15076
+ emit("update:modelValue", selectedItems.value);
15110
15077
  }
15111
- },
15112
- updateSelectedItemsFromVModel() {
15113
- if (Array.isArray(this.modelValue)) {
15114
- this.selectedItems = this.modelValue.filter((item) => {
15115
- return includeItem(item, this.items, this.keyAttribute);
15078
+ }
15079
+ function updateSelectedItemsFromVModel() {
15080
+ if (Array.isArray(props.modelValue)) {
15081
+ selectedItems.value = props.modelValue.filter((item) => {
15082
+ return includeItem(item, props.items, props.keyAttribute);
15116
15083
  });
15117
15084
  } else {
15118
- this.selectedItems = [];
15085
+ selectedItems.value = [];
15119
15086
  }
15120
- },
15121
- updateActiveItemFromVModel() {
15122
- if (this.active === void 0) {
15123
- this.activeItem = void 0;
15124
- } else if (!itemEquals(this.active, this.activeItem, this.keyAttribute)) {
15125
- this.activeItem = this.active;
15087
+ }
15088
+ function updateActiveItemFromVModel() {
15089
+ if (props.active === void 0) {
15090
+ activeItem.value = void 0;
15091
+ } else if (!itemEquals(props.active, activeItem.value, props.keyAttribute)) {
15092
+ activeItem.value = props.active;
15126
15093
  }
15127
- },
15128
- onItemKeyDown(event, item) {
15094
+ }
15095
+ function onItemKeyDown(event, item) {
15129
15096
  switch (event.key) {
15130
15097
  case "Up":
15131
15098
  case "Down":
15132
15099
  case "ArrowUp":
15133
15100
  case "ArrowDown":
15134
15101
  event.preventDefault();
15135
- handleKeyboardFocusNavigation(event.key, event.target, this.getLiElements());
15102
+ handleKeyboardFocusNavigation(event.key, event.target, getLiElements());
15136
15103
  break;
15137
15104
  case " ":
15138
15105
  case "Spacebar":
15139
15106
  event.preventDefault();
15140
- this.setActiveItem(item);
15107
+ setActiveItem(item);
15141
15108
  break;
15142
15109
  }
15143
- },
15144
- // Unique id to connect aria-labelledby with readonly label
15145
- getAriaLabelledbyId(item) {
15146
- return `${this.elementId}_${this.itemKey(item)}`;
15147
- },
15148
- // Unique id to connect aria-labelledby with readonly label
15149
- getItemId(item) {
15150
- return `${this.elementId}_item_${this.itemKey(item)}`;
15151
- },
15152
- // Focus effect is done with box-shadow.
15153
- // By setting position to relative the
15154
- // item and box-shadow is drawn with a higher z-index,
15155
- // thus no focus border under other list items.
15156
- onItemFocus(event) {
15110
+ }
15111
+ function getAriaLabelledbyId(item) {
15112
+ return `${props.elementId}_${itemKey(item)}`;
15113
+ }
15114
+ function getItemId(item) {
15115
+ return `${props.elementId}_item_${itemKey(item)}`;
15116
+ }
15117
+ function onItemFocus(event) {
15157
15118
  if (event && event.target) {
15158
15119
  event.target.style.position = "relative";
15159
15120
  }
15160
- },
15161
- onItemBlur(event) {
15121
+ }
15122
+ function onItemBlur(event) {
15162
15123
  if (event && event.target) {
15163
15124
  event.target.style.position = "static";
15164
15125
  }
15165
- },
15166
- callbackAfterItemAdd(item) {
15167
- this.setActiveItem(item);
15168
- },
15169
- callbackBeforeItemDelete(item) {
15170
- if (this.items.length === 0) {
15126
+ }
15127
+ function callbackAfterItemAdd(item) {
15128
+ setActiveItem(item);
15129
+ }
15130
+ function callbackBeforeItemDelete(item) {
15131
+ if (props.items.length === 0) {
15171
15132
  return;
15172
15133
  }
15173
- let targetIndex = this.items.indexOf(item) - 1;
15174
- if (targetIndex < 0 && this.items.length > 1) {
15134
+ let targetIndex = props.items.indexOf(item) - 1;
15135
+ if (targetIndex < 0 && props.items.length > 1) {
15175
15136
  targetIndex = 1;
15176
15137
  } else if (targetIndex < 0) {
15177
15138
  targetIndex = 0;
15178
15139
  }
15179
- this.setActiveItem(this.items[targetIndex]);
15180
- if (this.getLiElements()[targetIndex]) {
15181
- this.getLiElements()[targetIndex].focus();
15140
+ setActiveItem(props.items[targetIndex]);
15141
+ const targetElement = getLiElements()[targetIndex];
15142
+ if (targetElement) {
15143
+ targetElement.focus();
15182
15144
  }
15183
- },
15184
- isActive(item) {
15185
- return this.checkbox && itemEquals(this.activeItem, item, this.keyAttribute);
15186
15145
  }
15146
+ function isActive(item) {
15147
+ return props.checkbox && itemEquals(activeItem.value, item, props.keyAttribute);
15148
+ }
15149
+ return (_ctx, _cache) => {
15150
+ return !__props.selectable ? (openBlock(), createElementBlock("ul", _hoisted_1$e, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
15151
+ return openBlock(), createElementBlock("li", {
15152
+ key: itemKey(item),
15153
+ class: "list__item"
15154
+ }, [createElementVNode("div", {
15155
+ ref_for: true,
15156
+ ref: "listItemPanes",
15157
+ class: "list__item__itempane"
15158
+ }, [renderSlot(_ctx.$slots, "default", mergeProps({
15159
+ ref_for: true
15160
+ }, {
15161
+ item
15162
+ }))], 512)]);
15163
+ }), 128)), _cache[0] || (_cache[0] = createTextVNode()), isEmpty2.value ? (openBlock(), createElementBlock("li", _hoisted_2$9, [createElementVNode("div", _hoisted_3$6, [renderSlot(_ctx.$slots, "empty", {}, () => [createElementVNode("em", null, toDisplayString(unref($t2)("fkui.list.empty", "Listan är tom")), 1)])])])) : createCommentVNode("", true)])) : (openBlock(), createElementBlock("ul", {
15164
+ key: 1,
15165
+ ref_key: "ulElement",
15166
+ ref: ulElement,
15167
+ class: "list list--hover",
15168
+ tabindex: __props.checkbox ? 0 : void 0
15169
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
15170
+ return openBlock(), createElementBlock("li", {
15171
+ id: getItemId(item),
15172
+ key: itemKey(item),
15173
+ "aria-labelledby": getItemId(item),
15174
+ class: normalizeClass([itemClasses(item), "list__item"]),
15175
+ tabindex: __props.checkbox ? 0 : void 0,
15176
+ onKeydown: withModifiers(($event) => onItemKeyDown($event, item), ["self"]),
15177
+ onFocus: withModifiers(onItemFocus, ["self"]),
15178
+ onBlur: withModifiers(onItemBlur, ["self"])
15179
+ }, [__props.checkbox ? (openBlock(), createElementBlock("div", {
15180
+ key: 0,
15181
+ class: "list__item__selectpane",
15182
+ onClick: withModifiers(($event) => onSelect(item), ["self"])
15183
+ }, [createElementVNode("div", _hoisted_7$2, [createVNode(unref(FCheckboxField), {
15184
+ value: true,
15185
+ "model-value": isSelected(item),
15186
+ onClick: withModifiers(($event) => onSelect(item), ["self"])
15187
+ }, {
15188
+ default: withCtx(() => [createElementVNode("span", {
15189
+ id: getAriaLabelledbyId(item),
15190
+ class: "sr-only"
15191
+ }, [renderSlot(_ctx.$slots, "screenreader", mergeProps({
15192
+ ref_for: true
15193
+ }, {
15194
+ item
15195
+ }))], 8, _hoisted_8$2)]),
15196
+ _: 2
15197
+ }, 1032, ["model-value", "onClick"])])], 8, _hoisted_6$3)) : createCommentVNode("", true), _cache[1] || (_cache[1] = createTextVNode()), (openBlock(), createBlock(resolveDynamicComponent(__props.checkbox ? "div" : "a"), {
15198
+ ref_for: true,
15199
+ ref: "listItemPanes",
15200
+ href: !__props.checkbox ? "javascript:" : void 0,
15201
+ class: "list__item__itempane",
15202
+ onClick: ($event) => onItemClick($event, index, item)
15203
+ }, {
15204
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", mergeProps({
15205
+ ref_for: true
15206
+ }, {
15207
+ item
15208
+ }))]),
15209
+ _: 2
15210
+ }, 1032, ["href", "onClick"]))], 42, _hoisted_5$4);
15211
+ }), 128)), _cache[2] || (_cache[2] = createTextVNode()), isEmpty2.value ? (openBlock(), createElementBlock("li", _hoisted_9$2, [createElementVNode("div", _hoisted_10$1, [renderSlot(_ctx.$slots, "empty", {}, () => [createElementVNode("em", null, toDisplayString(unref($t2)("fkui.list.empty", "Listan är tom")), 1)])])])) : createCommentVNode("", true)], 8, _hoisted_4$5));
15212
+ };
15187
15213
  }
15188
15214
  });
15189
- const _hoisted_1$d = {
15190
- key: 0,
15191
- class: "list"
15192
- };
15193
- const _hoisted_2$9 = {
15194
- key: 0,
15195
- class: "list__item"
15196
- };
15197
- const _hoisted_3$6 = {
15198
- class: "list__item__itempane"
15199
- };
15200
- const _hoisted_4$5 = ["tabindex"];
15201
- const _hoisted_5$4 = ["id", "aria-labelledby", "tabindex", "onKeydown"];
15202
- const _hoisted_6$3 = ["onClick"];
15203
- const _hoisted_7$2 = {
15204
- class: "list__item__selectpane__input"
15205
- };
15206
- const _hoisted_8$2 = ["id"];
15207
- const _hoisted_9$2 = {
15208
- key: 0,
15209
- class: "list__item"
15210
- };
15211
- const _hoisted_10$1 = {
15212
- class: "list__item__itempane"
15213
- };
15214
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
15215
- const _component_f_checkbox_field = resolveComponent("f-checkbox-field");
15216
- return !_ctx.selectable ? (openBlock(), createElementBlock("ul", _hoisted_1$d, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
15217
- return openBlock(), createElementBlock("li", {
15218
- key: _ctx.itemKey(item),
15219
- class: "list__item"
15220
- }, [createElementVNode("div", {
15221
- ref_for: true,
15222
- ref: "listItemPanes",
15223
- class: "list__item__itempane"
15224
- }, [renderSlot(_ctx.$slots, "default", mergeProps({
15225
- ref_for: true
15226
- }, {
15227
- item
15228
- }))], 512)]);
15229
- }), 128)), _cache[2] || (_cache[2] = createTextVNode()), _ctx.isEmpty ? (openBlock(), createElementBlock("li", _hoisted_2$9, [createElementVNode("div", _hoisted_3$6, [renderSlot(_ctx.$slots, "empty", {}, () => [createElementVNode("em", null, toDisplayString(_ctx.$t("fkui.list.empty", "Listan är tom")), 1)])])])) : createCommentVNode("", true)])) : (openBlock(), createElementBlock("ul", {
15230
- key: 1,
15231
- ref: "ulElement",
15232
- class: "list list--hover",
15233
- tabindex: _ctx.checkbox ? 0 : void 0
15234
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
15235
- return openBlock(), createElementBlock("li", {
15236
- id: _ctx.getItemId(item),
15237
- key: _ctx.itemKey(item),
15238
- "aria-labelledby": _ctx.getItemId(item),
15239
- class: normalizeClass([_ctx.itemClasses(item), "list__item"]),
15240
- tabindex: _ctx.checkbox ? 0 : void 0,
15241
- onKeydown: withModifiers(($event) => _ctx.onItemKeyDown($event, item), ["self"]),
15242
- onFocus: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onItemFocus && _ctx.onItemFocus(...args), ["self"])),
15243
- onBlur: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.onItemBlur && _ctx.onItemBlur(...args), ["self"]))
15244
- }, [_ctx.checkbox ? (openBlock(), createElementBlock("div", {
15245
- key: 0,
15246
- class: "list__item__selectpane",
15247
- onClick: withModifiers(($event) => _ctx.onSelect(item), ["self"])
15248
- }, [createElementVNode("div", _hoisted_7$2, [createVNode(_component_f_checkbox_field, {
15249
- value: true,
15250
- "model-value": _ctx.isSelected(item),
15251
- onClick: withModifiers(($event) => _ctx.onSelect(item), ["self"])
15252
- }, {
15253
- default: withCtx(() => [createElementVNode("span", {
15254
- id: _ctx.getAriaLabelledbyId(item),
15255
- class: "sr-only"
15256
- }, [renderSlot(_ctx.$slots, "screenreader", mergeProps({
15257
- ref_for: true
15258
- }, {
15259
- item
15260
- }))], 8, _hoisted_8$2)]),
15261
- _: 2
15262
- }, 1032, ["model-value", "onClick"])])], 8, _hoisted_6$3)) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), (openBlock(), createBlock(resolveDynamicComponent(_ctx.checkbox ? "div" : "a"), {
15263
- ref_for: true,
15264
- ref: "listItemPanes",
15265
- href: !_ctx.checkbox ? "javascript:" : void 0,
15266
- class: "list__item__itempane",
15267
- onClick: ($event) => _ctx.onItemClick($event, index, item)
15268
- }, {
15269
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", mergeProps({
15270
- ref_for: true
15271
- }, {
15272
- item
15273
- }))]),
15274
- _: 2
15275
- }, 1032, ["href", "onClick"]))], 42, _hoisted_5$4);
15276
- }), 128)), _cache[4] || (_cache[4] = createTextVNode()), _ctx.isEmpty ? (openBlock(), createElementBlock("li", _hoisted_9$2, [createElementVNode("div", _hoisted_10$1, [renderSlot(_ctx.$slots, "empty", {}, () => [createElementVNode("em", null, toDisplayString(_ctx.$t("fkui.list.empty", "Listan är tom")), 1)])])])) : createCommentVNode("", true)], 8, _hoisted_4$5));
15277
- }
15278
- const FList = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
15279
- const _sfc_main$c = defineComponent({
15215
+ const _sfc_main$d = defineComponent({
15280
15216
  name: "FLoader",
15281
15217
  mixins: [TranslationMixin],
15282
15218
  inheritAttrs: false,
@@ -15388,7 +15324,7 @@ const _sfc_main$c = defineComponent({
15388
15324
  }
15389
15325
  }
15390
15326
  });
15391
- const _hoisted_1$c = {
15327
+ const _hoisted_1$d = {
15392
15328
  class: "loader__backdrop"
15393
15329
  };
15394
15330
  const _hoisted_2$8 = {
@@ -15400,7 +15336,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
15400
15336
  disabled: _ctx.teleportDisabled
15401
15337
  }, [withDirectives(createElementVNode("div", mergeProps(_ctx.$attrs, {
15402
15338
  class: ["loader", _ctx.classes]
15403
- }), [createElementVNode("div", _hoisted_1$c, [_cache[0] || (_cache[0] = createElementVNode("div", {
15339
+ }), [createElementVNode("div", _hoisted_1$d, [_cache[0] || (_cache[0] = createElementVNode("div", {
15404
15340
  class: "loader__wrapper"
15405
15341
  }, [createElementVNode("div", {
15406
15342
  class: "loader__spinner-1 loader__spinner"
@@ -15440,8 +15376,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
15440
15376
  tabindex: "-1"
15441
15377
  }, [createElementVNode("span", _hoisted_2$8, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.loader.wait.text", _ctx.defaultLoadingText)), 1)])])], 2)])], 16), [[vShow, _ctx.show]])], 8, ["to", "disabled"]);
15442
15378
  }
15443
- const FLoader = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$a]]);
15444
- const _hoisted_1$b = ["aria-label"];
15379
+ const FLoader = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$a]]);
15380
+ const _hoisted_1$c = ["aria-label"];
15445
15381
  const __default__ = defineComponent({
15446
15382
  computed: {
15447
15383
  ariaLabel() {
@@ -15453,7 +15389,7 @@ const __default__ = defineComponent({
15453
15389
  }
15454
15390
  }
15455
15391
  });
15456
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
15392
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
15457
15393
  ...__default__,
15458
15394
  __name: "FLogo",
15459
15395
  props: {
@@ -15477,7 +15413,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
15477
15413
  class: normalizeClass(`logo logo--${props.size}`),
15478
15414
  "aria-label": _ctx.ariaLabel,
15479
15415
  role: "img"
15480
- }, null, 10, _hoisted_1$b);
15416
+ }, null, 10, _hoisted_1$c);
15481
15417
  };
15482
15418
  }
15483
15419
  });
@@ -15507,7 +15443,7 @@ const iconClasses = {
15507
15443
  screenReaderContextDefault: "Informationsmeddelande"
15508
15444
  }
15509
15445
  };
15510
- const _sfc_main$a = defineComponent({
15446
+ const _sfc_main$b = defineComponent({
15511
15447
  name: "FMessageBox",
15512
15448
  components: {
15513
15449
  FIcon,
@@ -15597,7 +15533,7 @@ const _sfc_main$a = defineComponent({
15597
15533
  }
15598
15534
  }
15599
15535
  });
15600
- const _hoisted_1$a = {
15536
+ const _hoisted_1$b = {
15601
15537
  key: 0,
15602
15538
  class: "sr-only"
15603
15539
  };
@@ -15607,7 +15543,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
15607
15543
  const _component_i_flex = resolveComponent("i-flex");
15608
15544
  return openBlock(), createElementBlock("div", {
15609
15545
  class: normalizeClass(["message-box", [_ctx.messageBoxType, _ctx.bannerType]])
15610
- }, [_ctx.provideScreenReaderContext ? (openBlock(), createElementBlock("span", _hoisted_1$a, toDisplayString(_ctx.screenReaderContext()), 1)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), createVNode(_component_i_flex, {
15546
+ }, [_ctx.provideScreenReaderContext ? (openBlock(), createElementBlock("span", _hoisted_1$b, toDisplayString(_ctx.screenReaderContext()), 1)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), createVNode(_component_i_flex, {
15611
15547
  gap: "2x"
15612
15548
  }, {
15613
15549
  default: withCtx(() => [_ctx.layout === "short" ? (openBlock(), createBlock(_component_i_flex_item, {
@@ -15639,7 +15575,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
15639
15575
  _: 3
15640
15576
  })], 2);
15641
15577
  }
15642
- const FMessageBox = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]);
15578
+ const FMessageBox = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$9]]);
15643
15579
  function findOverflowIndex(totalWidth, elements) {
15644
15580
  let sum = 0;
15645
15581
  const index = elements.findIndex((element) => {
@@ -15689,7 +15625,7 @@ const upKeys = ["Up", "ArrowUp"];
15689
15625
  const downKeys = ["Down", "ArrowDown"];
15690
15626
  const verticalKeys = [...upKeys, ...downKeys];
15691
15627
  const preventKeys = ["Tab", "Left", "Right", "ArrowLeft", "ArrowRight", "Home", "End", " ", "Spacebar", "Enter", ...verticalKeys];
15692
- const _sfc_main$9 = defineComponent({
15628
+ const _sfc_main$a = defineComponent({
15693
15629
  name: "FNavigationMenu",
15694
15630
  components: {
15695
15631
  FIcon,
@@ -16022,7 +15958,7 @@ const _sfc_main$9 = defineComponent({
16022
15958
  }
16023
15959
  }
16024
15960
  });
16025
- const _hoisted_1$9 = ["aria-label"];
15961
+ const _hoisted_1$a = ["aria-label"];
16026
15962
  const _hoisted_2$7 = ["data-ref-index", "onClick"];
16027
15963
  const _hoisted_3$5 = {
16028
15964
  class: "imenu__list__anchor-container"
@@ -16103,11 +16039,11 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
16103
16039
  "enable-keyboard-navigation": "",
16104
16040
  onSelect: _ctx.onPopupMenuItemSelected,
16105
16041
  onClose: _cache[5] || (_cache[5] = ($event) => _ctx.togglePopup(false))
16106
- }, null, 8, ["modelValue", "focused-item", "items", "is-open", "anchor", "selected-menu-item-screen-reader-text", "aria-label", "onSelect"])], 10, _hoisted_1$9);
16042
+ }, null, 8, ["modelValue", "focused-item", "items", "is-open", "anchor", "selected-menu-item-screen-reader-text", "aria-label", "onSelect"])], 10, _hoisted_1$a);
16107
16043
  }
16108
- const FNavigationMenu = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]);
16044
+ const FNavigationMenu = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
16109
16045
  const EVENTS = ["online", "offline"];
16110
- const _sfc_main$8 = defineComponent({
16046
+ const _sfc_main$9 = defineComponent({
16111
16047
  name: "FOffline",
16112
16048
  components: {
16113
16049
  FIcon,
@@ -16155,7 +16091,7 @@ const _sfc_main$8 = defineComponent({
16155
16091
  }
16156
16092
  }
16157
16093
  });
16158
- const _hoisted_1$8 = ["role"];
16094
+ const _hoisted_1$9 = ["role"];
16159
16095
  const _hoisted_2$6 = {
16160
16096
  key: 0,
16161
16097
  class: "offline"
@@ -16201,10 +16137,10 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
16201
16137
  })])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), withDirectives(createElementVNode("span", {
16202
16138
  class: "sr-only",
16203
16139
  "aria-hidden": _ctx.shouldNotRead ? "true" : void 0
16204
- }, "\n Din internetuppkoppling fungerar igen\n ", 8, _hoisted_5$2), [[vShow, _ctx.isOnline]])], 8, _hoisted_1$8);
16140
+ }, "\n Din internetuppkoppling fungerar igen\n ", 8, _hoisted_5$2), [[vShow, _ctx.isOnline]])], 8, _hoisted_1$9);
16205
16141
  }
16206
- const FOffline = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]);
16207
- const _sfc_main$7 = defineComponent({
16142
+ const FOffline = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$7]]);
16143
+ const _sfc_main$8 = defineComponent({
16208
16144
  name: "FOutputField",
16209
16145
  components: {
16210
16146
  FLabel
@@ -16237,13 +16173,13 @@ const _sfc_main$7 = defineComponent({
16237
16173
  }
16238
16174
  }
16239
16175
  });
16240
- const _hoisted_1$7 = {
16176
+ const _hoisted_1$8 = {
16241
16177
  class: "output-field"
16242
16178
  };
16243
16179
  const _hoisted_2$5 = ["id", "for"];
16244
16180
  function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
16245
16181
  const _component_f_label = resolveComponent("f-label");
16246
- return openBlock(), createElementBlock("div", _hoisted_1$7, [createVNode(_component_f_label, {
16182
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [createVNode(_component_f_label, {
16247
16183
  for: _ctx.id
16248
16184
  }, createSlots({
16249
16185
  default: withCtx(() => [renderSlot(_ctx.$slots, "label")]),
@@ -16258,8 +16194,8 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
16258
16194
  class: "output-field__output"
16259
16195
  }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_2$5)]);
16260
16196
  }
16261
- const FOutputField = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]);
16262
- const _sfc_main$6 = defineComponent({
16197
+ const FOutputField = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$6]]);
16198
+ const _sfc_main$7 = defineComponent({
16263
16199
  name: "FPageHeader",
16264
16200
  components: {
16265
16201
  ISkipLink
@@ -16306,7 +16242,7 @@ const _sfc_main$6 = defineComponent({
16306
16242
  }
16307
16243
  }
16308
16244
  });
16309
- const _hoisted_1$6 = {
16245
+ const _hoisted_1$7 = {
16310
16246
  class: "page-header__root"
16311
16247
  };
16312
16248
  const _hoisted_2$4 = {
@@ -16328,7 +16264,7 @@ const _hoisted_6$1 = {
16328
16264
  };
16329
16265
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
16330
16266
  const _component_i_skip_link = resolveComponent("i-skip-link");
16331
- return openBlock(), createElementBlock("div", _hoisted_1$6, [_ctx.skipLinkAnchor ? (openBlock(), createElementBlock("nav", _hoisted_2$4, [createVNode(_component_i_skip_link, {
16267
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [_ctx.skipLinkAnchor ? (openBlock(), createElementBlock("nav", _hoisted_2$4, [createVNode(_component_i_skip_link, {
16332
16268
  href: _ctx.skipLinkAnchor
16333
16269
  }, {
16334
16270
  default: withCtx(() => [renderSlot(_ctx.$slots, "skip-link-text")]),
@@ -16340,7 +16276,306 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
16340
16276
  _: 3
16341
16277
  })), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("div", _hoisted_5$1, [createElementVNode("div", _hoisted_6$1, [renderSlot(_ctx.$slots, "right")])])], 512)]);
16342
16278
  }
16343
- const FPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
16279
+ const FPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$5]]);
16280
+ const layoutRegister = {};
16281
+ function getLayout(name) {
16282
+ var _layoutRegister$name;
16283
+ return (_layoutRegister$name = layoutRegister[name]) !== null && _layoutRegister$name !== void 0 ? _layoutRegister$name : null;
16284
+ }
16285
+ function setLayout(name, layout) {
16286
+ layoutRegister[name] = layout;
16287
+ }
16288
+ function defineLayout(definition) {
16289
+ return normalizeDefinition(definition);
16290
+ }
16291
+ function registerLayout(definition) {
16292
+ setLayout(definition.name, normalizeDefinition(definition));
16293
+ }
16294
+ function normalizeDefinition(definition) {
16295
+ return {
16296
+ name: definition.name,
16297
+ areas: normalizeAreasDefinition(definition.areas)
16298
+ };
16299
+ }
16300
+ function normalizeAreasDefinition(areas) {
16301
+ return Object.fromEntries(Object.entries(areas).map(([key, area]) => {
16302
+ var _area$scroll;
16303
+ return [key, {
16304
+ attachPanel: area.attachPanel,
16305
+ direction: area.direction,
16306
+ scroll: (_area$scroll = area.scroll) !== null && _area$scroll !== void 0 ? _area$scroll : false
16307
+ }];
16308
+ }));
16309
+ }
16310
+ function _checkPrivateRedeclaration(e, t) {
16311
+ if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
16312
+ }
16313
+ function _classPrivateFieldInitSpec(e, t, a) {
16314
+ _checkPrivateRedeclaration(e, t), t.set(e, a);
16315
+ }
16316
+ function _assertClassBrand(e, t, n) {
16317
+ if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
16318
+ throw new TypeError("Private element is not present on this object");
16319
+ }
16320
+ function _classPrivateFieldGet2(s, a) {
16321
+ return s.get(_assertClassBrand(s, a));
16322
+ }
16323
+ function _classPrivateFieldSet2(s, a, r) {
16324
+ return s.set(_assertClassBrand(s, a), r), r;
16325
+ }
16326
+ const VAR_NAME_AREA = "--f-layout-area";
16327
+ const VAR_NAME_ATTACH_PANEL = "--f-layout-panel";
16328
+ const VAR_NAME_DIRECTION = "--f-layout-direction";
16329
+ registerLayout({
16330
+ name: "simple",
16331
+ areas: {
16332
+ header: {
16333
+ attachPanel: "none",
16334
+ direction: "column"
16335
+ },
16336
+ content: {
16337
+ attachPanel: "none",
16338
+ direction: "column",
16339
+ scroll: true
16340
+ },
16341
+ footer: {
16342
+ attachPanel: "none",
16343
+ direction: "column"
16344
+ }
16345
+ }
16346
+ });
16347
+ registerLayout({
16348
+ name: "left-panel",
16349
+ areas: {
16350
+ header: {
16351
+ attachPanel: "none",
16352
+ direction: "column"
16353
+ },
16354
+ left: {
16355
+ attachPanel: "left",
16356
+ direction: "column"
16357
+ },
16358
+ content: {
16359
+ attachPanel: "none",
16360
+ direction: "column",
16361
+ scroll: true
16362
+ },
16363
+ footer: {
16364
+ attachPanel: "none",
16365
+ direction: "column"
16366
+ }
16367
+ }
16368
+ });
16369
+ registerLayout({
16370
+ name: "right-panel",
16371
+ areas: {
16372
+ header: {
16373
+ attachPanel: "none",
16374
+ direction: "column"
16375
+ },
16376
+ right: {
16377
+ attachPanel: "right",
16378
+ direction: "column"
16379
+ },
16380
+ content: {
16381
+ attachPanel: "none",
16382
+ direction: "column",
16383
+ scroll: true
16384
+ },
16385
+ footer: {
16386
+ attachPanel: "none",
16387
+ direction: "column"
16388
+ }
16389
+ }
16390
+ });
16391
+ registerLayout({
16392
+ name: "three-column",
16393
+ areas: {
16394
+ header: {
16395
+ attachPanel: "top",
16396
+ direction: "column"
16397
+ },
16398
+ left: {
16399
+ attachPanel: "left",
16400
+ direction: "column"
16401
+ },
16402
+ right: {
16403
+ attachPanel: "right",
16404
+ direction: "column"
16405
+ },
16406
+ content: {
16407
+ attachPanel: "none",
16408
+ direction: "column",
16409
+ scroll: true
16410
+ },
16411
+ footer: {
16412
+ attachPanel: "bottom",
16413
+ direction: "column"
16414
+ }
16415
+ }
16416
+ });
16417
+ const styleContent = '.page-layout {\n display: grid;\n height: 100cqh;\n width: min(100%, 100cqw);\n\n &[part~="simple"] {\n grid-template:\n "header" min-content\n "content" 1fr\n "footer" min-content\n / 1fr;\n }\n\n &[part~="left-panel"] {\n grid-template:\n "header header" min-content\n "left content" 1fr\n "footer footer" min-content\n / min-content 1fr;\n }\n\n &[part~="right-panel"] {\n grid-template:\n "header header" min-content\n "content right" 1fr\n "footer footer" min-content\n / 1fr min-content;\n }\n\n &[part~="three-column"] {\n grid-template:\n "header header header" min-content\n "left content right" 1fr\n "footer footer footer" min-content\n / min-content 1fr min-content;\n }\n}\n\n.page-layout__area {\n display: flex;\n position: relative;\n\n &[data-direction="column"] {\n flex-direction: column;\n }\n\n &[data-direction="row"] {\n flex-direction: row;\n }\n\n &[data-scroll] {\n overflow-y: auto;\n }\n\n &:empty {\n display: none;\n }\n}\n\n:host ::slotted(*) {\n display: contents;\n}\n';
16418
+ const stubLayout = defineLayout({
16419
+ name: "",
16420
+ areas: {}
16421
+ });
16422
+ function getSlotNames(element) {
16423
+ return Array.from(element.querySelectorAll(":scope > [slot]"), (it) => it.slot);
16424
+ }
16425
+ var _wrapper = /* @__PURE__ */ new WeakMap();
16426
+ var _elements = /* @__PURE__ */ new WeakMap();
16427
+ var _layout = /* @__PURE__ */ new WeakMap();
16428
+ var _observer = /* @__PURE__ */ new WeakMap();
16429
+ var _slotNames = /* @__PURE__ */ new WeakMap();
16430
+ class PageLayout extends HTMLElement {
16431
+ constructor() {
16432
+ super();
16433
+ _classPrivateFieldInitSpec(this, _wrapper, void 0);
16434
+ _classPrivateFieldInitSpec(this, _elements, {});
16435
+ _classPrivateFieldInitSpec(this, _layout, stubLayout);
16436
+ _classPrivateFieldInitSpec(this, _observer, void 0);
16437
+ _classPrivateFieldInitSpec(this, _slotNames, []);
16438
+ _classPrivateFieldSet2(_wrapper, this, document.createElement("div"));
16439
+ _classPrivateFieldSet2(_observer, this, new MutationObserver(() => {
16440
+ this.slotNames = getSlotNames(this);
16441
+ }));
16442
+ }
16443
+ /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- this one is better to infer or each attribute would have to be duplicated */
16444
+ static get observedAttributes() {
16445
+ return ["layout"];
16446
+ }
16447
+ connectedCallback() {
16448
+ this.slotNames = getSlotNames(this);
16449
+ _classPrivateFieldGet2(_observer, this).observe(this, {
16450
+ childList: true
16451
+ });
16452
+ const shadow = this.attachShadow({
16453
+ mode: "open"
16454
+ });
16455
+ const style = document.createElement("style");
16456
+ style.textContent = styleContent;
16457
+ shadow.append(style);
16458
+ shadow.append(_classPrivateFieldGet2(_wrapper, this));
16459
+ }
16460
+ disconnectedCallback() {
16461
+ _classPrivateFieldGet2(_observer, this).disconnect();
16462
+ }
16463
+ attributeChangedCallback(name, _oldValue, value) {
16464
+ switch (name) {
16465
+ case "layout": {
16466
+ var _getLayout;
16467
+ const part = ["grid", value].filter(Boolean).join(" ");
16468
+ _classPrivateFieldGet2(_wrapper, this).className = "page-layout";
16469
+ _classPrivateFieldGet2(_wrapper, this).setAttribute("part", part);
16470
+ _classPrivateFieldSet2(_layout, this, (_getLayout = getLayout(value)) !== null && _getLayout !== void 0 ? _getLayout : stubLayout);
16471
+ this.updateSlotElements();
16472
+ break;
16473
+ }
16474
+ }
16475
+ }
16476
+ get slotNames() {
16477
+ return _classPrivateFieldGet2(_slotNames, this);
16478
+ }
16479
+ set slotNames(slots) {
16480
+ _classPrivateFieldSet2(_slotNames, this, slots);
16481
+ this.updateSlotElements();
16482
+ }
16483
+ updateSlotElements() {
16484
+ const wrapper = _classPrivateFieldGet2(_wrapper, this);
16485
+ const layout = _classPrivateFieldGet2(_layout, this);
16486
+ for (const slot of _classPrivateFieldGet2(_slotNames, this)) {
16487
+ const existing = _classPrivateFieldGet2(_elements, this)[slot];
16488
+ const element = existing !== null && existing !== void 0 ? existing : document.createElement("div");
16489
+ const area = layout.areas[slot];
16490
+ if (!area) {
16491
+ continue;
16492
+ }
16493
+ const {
16494
+ attachPanel: attach,
16495
+ direction,
16496
+ scroll
16497
+ } = area;
16498
+ element.className = "";
16499
+ element.classList.add("page-layout__area");
16500
+ element.setAttribute("part", ["area", slot].join(" "));
16501
+ element.setAttribute("data-direction", direction);
16502
+ if (scroll) {
16503
+ element.setAttribute("data-scroll", "true");
16504
+ } else {
16505
+ element.removeAttribute("data-scroll");
16506
+ }
16507
+ element.style.setProperty("grid-area", slot);
16508
+ element.style.setProperty(VAR_NAME_AREA, `"${slot}"`);
16509
+ element.style.setProperty(VAR_NAME_ATTACH_PANEL, `"${attach}"`);
16510
+ element.style.setProperty(VAR_NAME_DIRECTION, `"${direction}"`);
16511
+ if (!existing) {
16512
+ const slotElement = document.createElement("slot");
16513
+ slotElement.name = slot;
16514
+ element.append(slotElement);
16515
+ wrapper.append(element);
16516
+ _classPrivateFieldGet2(_elements, this)[slot] = element;
16517
+ }
16518
+ }
16519
+ }
16520
+ }
16521
+ const _hoisted_1$6 = ["slot"];
16522
+ const tagName = `ce-page-layout`;
16523
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
16524
+ __name: "FPageLayout",
16525
+ props: {
16526
+ layout: {}
16527
+ },
16528
+ setup(__props) {
16529
+ const slots = useSlots();
16530
+ const slotNames = computed(() => {
16531
+ return Object.keys(slots);
16532
+ });
16533
+ onMounted(() => {
16534
+ if (!customElements.get(tagName)) {
16535
+ customElements.define(tagName, PageLayout);
16536
+ }
16537
+ });
16538
+ return (_ctx, _cache) => {
16539
+ return openBlock(), createBlock(resolveDynamicComponent(tagName), {
16540
+ layout: _ctx.layout
16541
+ }, {
16542
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(slotNames.value, (slot) => {
16543
+ return openBlock(), createElementBlock("div", {
16544
+ key: slot,
16545
+ slot
16546
+ }, [renderSlot(_ctx.$slots, slot)], 8, _hoisted_1$6);
16547
+ }), 128))]),
16548
+ _: 3
16549
+ }, 8, ["layout"]);
16550
+ };
16551
+ }
16552
+ });
16553
+ function getProperty(style, key) {
16554
+ const value = style.getPropertyValue(key);
16555
+ if (value === "") {
16556
+ return null;
16557
+ } else {
16558
+ return JSON.parse(value);
16559
+ }
16560
+ }
16561
+ function useAreaData(element) {
16562
+ const area = ref(null);
16563
+ const attachPanel = ref(null);
16564
+ const direction = ref(null);
16565
+ watchEffect(() => {
16566
+ if (element.value) {
16567
+ const style = getComputedStyle(element.value);
16568
+ area.value = getProperty(style, VAR_NAME_AREA);
16569
+ attachPanel.value = getProperty(style, VAR_NAME_ATTACH_PANEL);
16570
+ direction.value = getProperty(style, VAR_NAME_DIRECTION);
16571
+ }
16572
+ });
16573
+ return {
16574
+ area,
16575
+ attachPanel,
16576
+ direction
16577
+ };
16578
+ }
16344
16579
  const _hoisted_1$5 = {
16345
16580
  class: "progress"
16346
16581
  };
@@ -17386,20 +17621,20 @@ export {
17386
17621
  ErrorPlugin,
17387
17622
  ErrorViewData,
17388
17623
  EventBus,
17389
- _sfc_main$1b as FBadge,
17390
- _sfc_main$y as FBankAccountNumberTextField,
17391
- _sfc_main$x as FBankgiroTextField,
17624
+ _sfc_main$1c as FBadge,
17625
+ _sfc_main$z as FBankAccountNumberTextField,
17626
+ _sfc_main$y as FBankgiroTextField,
17392
17627
  FCalendar,
17393
17628
  FCalendarDay,
17394
- _sfc_main$W as FCard,
17629
+ _sfc_main$X as FCard,
17395
17630
  FCheckboxField,
17396
- _sfc_main$w as FClearingnumberTextField,
17631
+ _sfc_main$x as FClearingnumberTextField,
17397
17632
  FConfirmModal,
17398
17633
  FContextMenu,
17399
17634
  FCrudButton,
17400
- FCrudDataset,
17401
- _sfc_main$A as FCurrencyTextField,
17402
- FDataTable,
17635
+ _sfc_main$J as FCrudDataset,
17636
+ _sfc_main$B as FCurrencyTextField,
17637
+ _sfc_main$p as FDataTable,
17403
17638
  FDatepickerField,
17404
17639
  FDialogueTree,
17405
17640
  FEmailTextField,
@@ -17414,34 +17649,35 @@ export {
17414
17649
  FFormModal,
17415
17650
  FValidationFormAction as FFormModalAction,
17416
17651
  FIcon,
17417
- FInteractiveTable,
17652
+ _sfc_main$i as FInteractiveTable,
17418
17653
  FKUIConfigButtonOrder,
17419
17654
  FLabel,
17420
17655
  FLayoutApplicationTemplate,
17421
17656
  FLayoutLeftPanel,
17422
17657
  FLayoutRightPanel,
17423
17658
  FLayoutRightPanelService,
17424
- FList,
17659
+ _sfc_main$e as FList,
17425
17660
  FLoader,
17426
- _sfc_main$b as FLogo,
17661
+ _sfc_main$c as FLogo,
17427
17662
  FMessageBox,
17428
17663
  FModal,
17429
17664
  FNavigationMenu,
17430
- _sfc_main$v as FNumericTextField,
17665
+ _sfc_main$w as FNumericTextField,
17431
17666
  FOffline,
17432
- _sfc_main$q as FOrganisationsnummerTextField,
17667
+ _sfc_main$r as FOrganisationsnummerTextField,
17433
17668
  FOutputField,
17434
17669
  FPageHeader,
17435
- _sfc_main$r as FPercentTextField,
17436
- _sfc_main$u as FPersonnummerTextField,
17670
+ _sfc_main$6 as FPageLayout,
17671
+ _sfc_main$s as FPercentTextField,
17672
+ _sfc_main$v as FPersonnummerTextField,
17437
17673
  FPhoneTextField,
17438
- _sfc_main$t as FPlusgiroTextField,
17439
- _sfc_main$s as FPostalCodeTextField,
17674
+ _sfc_main$u as FPlusgiroTextField,
17675
+ _sfc_main$t as FPostalCodeTextField,
17440
17676
  _sfc_main$5 as FProgressbar,
17441
17677
  FRadioField,
17442
17678
  FSearchTextField,
17443
17679
  FSelectField,
17444
- FSortFilterDataset,
17680
+ _sfc_main$q as FSortFilterDataset,
17445
17681
  FSortFilterDatasetInjected,
17446
17682
  FStaticField,
17447
17683
  FTableColumn,
@@ -17462,13 +17698,13 @@ export {
17462
17698
  ICalendarMonth,
17463
17699
  ICalendarMonthGrid,
17464
17700
  ICalendarNavbar,
17465
- _sfc_main$O as IComboboxDropdown,
17466
- _sfc_main$N as IComboboxToggleButton,
17701
+ _sfc_main$P as IComboboxDropdown,
17702
+ _sfc_main$O as IComboboxToggleButton,
17467
17703
  IFlex,
17468
17704
  IFlexItem,
17469
17705
  IPopup,
17470
17706
  IPopupError,
17471
- _sfc_main$S as IPopupListbox,
17707
+ _sfc_main$T as IPopupListbox,
17472
17708
  IPopupMenu,
17473
17709
  ISkipLink,
17474
17710
  FValidationForm as IValidationForm,
@@ -17517,10 +17753,12 @@ export {
17517
17753
  refIsHTMLElementArray,
17518
17754
  refIsVue,
17519
17755
  refIsVueArray,
17756
+ registerLayout,
17520
17757
  renderSlotText,
17521
17758
  setRunningContext,
17522
17759
  tableScrollClasses,
17523
17760
  tooltipAttachTo,
17761
+ useAreaData,
17524
17762
  useCombobox,
17525
17763
  useModal,
17526
17764
  useSlotUtils,