@fkui/vue 5.45.0 → 5.46.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.
@@ -5532,6 +5532,9 @@ const _sfc_main$12 = vue.defineComponent({
5532
5532
  };
5533
5533
  },
5534
5534
  computed: {
5535
+ ariaLabel() {
5536
+ return `${this.value.monthName} ${this.value.year}`;
5537
+ },
5535
5538
  totalCols() {
5536
5539
  return this.hideWeekNumbers ? 7 : 8;
5537
5540
  },
@@ -5573,50 +5576,43 @@ const _sfc_main$12 = vue.defineComponent({
5573
5576
  }
5574
5577
  }
5575
5578
  });
5576
- const _hoisted_1$O = {
5579
+ const _hoisted_1$O = ["aria-label"];
5580
+ const _hoisted_2$A = {
5577
5581
  key: 0,
5578
5582
  class: "calendar-month__col--week"
5579
5583
  };
5580
- const _hoisted_2$A = {
5581
- role: "presentation"
5582
- };
5583
5584
  const _hoisted_3$s = {
5584
- role: "presentation"
5585
- };
5586
- const _hoisted_4$n = {
5587
5585
  key: 0,
5588
5586
  scope: "col",
5589
5587
  "aria-hidden": "true",
5590
5588
  class: "calendar-month__header-cell"
5591
5589
  };
5592
- const _hoisted_5$i = ["title"];
5593
- const _hoisted_6$e = {
5594
- role: "presentation"
5595
- };
5596
- const _hoisted_7$d = {
5590
+ const _hoisted_4$n = ["title"];
5591
+ const _hoisted_5$i = {
5597
5592
  key: 0,
5598
5593
  class: "calendar-month__cell calendar-month__cell--week-number",
5599
5594
  "aria-hidden": "true"
5600
5595
  };
5601
- const _hoisted_8$8 = ["colspan"];
5602
- const _hoisted_9$5 = ["colspan"];
5603
- const _hoisted_10$3 = {
5596
+ const _hoisted_6$e = ["colspan"];
5597
+ const _hoisted_7$d = ["colspan"];
5598
+ const _hoisted_8$8 = {
5604
5599
  key: 0,
5605
5600
  "aria-hidden": "true"
5606
5601
  };
5607
- const _hoisted_11$2 = ["colspan"];
5608
- const _hoisted_12$2 = {
5602
+ const _hoisted_9$5 = ["colspan"];
5603
+ const _hoisted_10$3 = {
5609
5604
  key: 1,
5610
5605
  "aria-hidden": "true"
5611
5606
  };
5612
- const _hoisted_13$1 = ["colspan"];
5607
+ const _hoisted_11$2 = ["colspan"];
5613
5608
  function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5614
5609
  return vue.openBlock(), vue.createElementBlock("table", {
5615
5610
  class: "calendar-month__table",
5616
- role: "application",
5611
+ role: "grid",
5612
+ "aria-label": _ctx.ariaLabel,
5617
5613
  onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.onFocusin && _ctx.onFocusin(...args)),
5618
5614
  onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onFocusout && _ctx.onFocusout(...args))
5619
- }, [vue.createElementVNode("colgroup", null, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_1$O)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), _cache[3] || (_cache[3] = vue.createElementVNode("col", {
5615
+ }, [vue.createElementVNode("colgroup", null, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_2$A)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), _cache[3] || (_cache[3] = vue.createElementVNode("col", {
5620
5616
  class: "calendar-month__col--day"
5621
5617
  }, null, -1)), _cache[4] || (_cache[4] = vue.createTextVNode()), _cache[5] || (_cache[5] = vue.createElementVNode("col", {
5622
5618
  class: "calendar-month__col--day"
@@ -5630,26 +5626,23 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5630
5626
  class: "calendar-month__col--day"
5631
5627
  }, null, -1)), _cache[14] || (_cache[14] = vue.createTextVNode()), _cache[15] || (_cache[15] = vue.createElementVNode("col", {
5632
5628
  class: "calendar-month__col--day"
5633
- }, null, -1))]), _cache[22] || (_cache[22] = vue.createTextVNode()), vue.createElementVNode("thead", _hoisted_2$A, [vue.createElementVNode("tr", _hoisted_3$s, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$n)) : vue.createCommentVNode("", true), _cache[16] || (_cache[16] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.weekdays, (weekday) => {
5629
+ }, null, -1))]), _cache[22] || (_cache[22] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", null, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_3$s)) : vue.createCommentVNode("", true), _cache[16] || (_cache[16] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.weekdays, (weekday) => {
5634
5630
  return vue.openBlock(), vue.createElementBlock("th", {
5635
5631
  key: weekday.name,
5636
5632
  scope: "col",
5637
- role: "presentation",
5638
5633
  class: "calendar-month__header-cell"
5639
5634
  }, [vue.createElementVNode("abbr", {
5640
- "aria-hidden": "true",
5641
5635
  title: weekday.name
5642
- }, vue.toDisplayString(_ctx.showShortWeekdays ? weekday.shortName : weekday.name), 9, _hoisted_5$i)]);
5643
- }), 128))])]), _cache[23] || (_cache[23] = vue.createTextVNode()), vue.createElementVNode("tbody", _hoisted_6$e, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.weeks, (week) => {
5636
+ }, vue.toDisplayString(_ctx.showShortWeekdays ? weekday.shortName : weekday.name), 9, _hoisted_4$n)]);
5637
+ }), 128))])]), _cache[23] || (_cache[23] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.weeks, (week) => {
5644
5638
  return vue.openBlock(), vue.createElementBlock("tr", {
5645
- key: week.week,
5646
- role: "presentation"
5647
- }, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_7$d, vue.toDisplayString(week.week), 1)) : vue.createCommentVNode("", true), _cache[17] || (_cache[17] = vue.createTextVNode()), _ctx.getDayStartOffset(week.days) ? (vue.openBlock(), vue.createElementBlock("td", {
5639
+ key: week.week
5640
+ }, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$i, vue.toDisplayString(week.week), 1)) : vue.createCommentVNode("", true), _cache[17] || (_cache[17] = vue.createTextVNode()), _ctx.getDayStartOffset(week.days) ? (vue.openBlock(), vue.createElementBlock("td", {
5648
5641
  key: 1,
5649
5642
  class: "calendar-month__cell",
5650
5643
  colspan: _ctx.getDayStartOffset(week.days),
5651
5644
  "aria-hidden": "true"
5652
- }, null, 8, _hoisted_8$8)) : vue.createCommentVNode("", true), _cache[18] || (_cache[18] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(week.days, (day) => {
5645
+ }, null, 8, _hoisted_6$e)) : vue.createCommentVNode("", true), _cache[18] || (_cache[18] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(week.days, (day) => {
5653
5646
  return vue.openBlock(), vue.createElementBlock("td", {
5654
5647
  key: day.toString(),
5655
5648
  class: "calendar-month__cell",
@@ -5663,16 +5656,16 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5663
5656
  class: "calendar-month__cell",
5664
5657
  colspan: _ctx.getDayEndOffset(week.days),
5665
5658
  "aria-hidden": "true"
5666
- }, null, 8, _hoisted_9$5)) : vue.createCommentVNode("", true)]);
5667
- }), 128)), _cache[20] || (_cache[20] = vue.createTextVNode()), _ctx.weeks.length < 5 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_10$3, [vue.createElementVNode("td", {
5659
+ }, null, 8, _hoisted_7$d)) : vue.createCommentVNode("", true)]);
5660
+ }), 128)), _cache[20] || (_cache[20] = vue.createTextVNode()), _ctx.weeks.length < 5 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_8$8, [vue.createElementVNode("td", {
5668
5661
  class: "calendar-month__cell",
5669
5662
  colspan: _ctx.totalCols,
5670
5663
  "aria-hidden": "true"
5671
- }, null, 8, _hoisted_11$2)])) : vue.createCommentVNode("", true), _cache[21] || (_cache[21] = vue.createTextVNode()), _ctx.weeks.length < 6 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_12$2, [vue.createElementVNode("td", {
5664
+ }, null, 8, _hoisted_9$5)])) : vue.createCommentVNode("", true), _cache[21] || (_cache[21] = vue.createTextVNode()), _ctx.weeks.length < 6 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_10$3, [vue.createElementVNode("td", {
5672
5665
  class: "calendar-month__cell",
5673
5666
  colspan: _ctx.totalCols,
5674
5667
  "aria-hidden": "true"
5675
- }, null, 8, _hoisted_13$1)])) : vue.createCommentVNode("", true)])], 32);
5668
+ }, null, 8, _hoisted_11$2)])) : vue.createCommentVNode("", true)])], 40, _hoisted_1$O);
5676
5669
  }
5677
5670
  const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$Q]]);
5678
5671
  const DayStep = {
@@ -5745,6 +5738,11 @@ const _sfc_main$11 = vue.defineComponent({
5745
5738
  this.$emit("click", date2);
5746
5739
  },
5747
5740
  async onKeydownDay(date2, event) {
5741
+ if (event.code === "Enter" || event.code === "Space") {
5742
+ event.preventDefault();
5743
+ this.$emit("click", date2);
5744
+ return;
5745
+ }
5748
5746
  if (!isDayStepKey(event)) {
5749
5747
  return;
5750
5748
  }
@@ -5792,13 +5790,13 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
5792
5790
  }, {
5793
5791
  default: vue.withCtx(({
5794
5792
  date: date2
5795
- }) => [vue.createElementVNode("button", {
5793
+ }) => [vue.createElementVNode("div", {
5796
5794
  ref: date2.toString(),
5795
+ role: "gridcell",
5797
5796
  class: "calendar-month__button",
5798
5797
  "data-test": "select-day-button",
5799
5798
  "data-date": date2.toString(),
5800
5799
  tabindex: _ctx.getTabindex(date2),
5801
- type: "button",
5802
5800
  onClick: vue.withModifiers(($event) => _ctx.onClickDay(date2), ["stop", "prevent"]),
5803
5801
  onKeydown: ($event) => _ctx.onKeydownDay(date2, $event)
5804
5802
  }, [vue.renderSlot(_ctx.$slots, "default", {
@@ -6006,9 +6004,7 @@ function useSlotUtils() {
6006
6004
  }
6007
6005
  };
6008
6006
  }
6009
- const _hoisted_1$K = {
6010
- class: "card card--default"
6011
- };
6007
+ const _hoisted_1$K = ["id"];
6012
6008
  const _hoisted_2$y = {
6013
6009
  key: 0,
6014
6010
  class: "card__header"
@@ -6022,16 +6018,91 @@ const _hoisted_4$m = {
6022
6018
  };
6023
6019
  const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
6024
6020
  __name: "FCard",
6021
+ props: {
6022
+ /**
6023
+ * Element to focus on when card is invalid. Set when using validation.
6024
+ */
6025
+ focusRef: {
6026
+ type: Object,
6027
+ required: false,
6028
+ default: null
6029
+ },
6030
+ /**
6031
+ * Optional id (generated by default).
6032
+ */
6033
+ id: {
6034
+ type: String,
6035
+ required: false,
6036
+ default: () => logic.ElementIdService.generateElementId()
6037
+ }
6038
+ },
6025
6039
  setup(__props) {
6026
6040
  const {
6027
6041
  hasSlot: hasSlot2
6028
6042
  } = useSlotUtils();
6043
+ const validationMessage = vue.ref("");
6044
+ const hasError = vue.ref(false);
6045
+ const isMounted = vue.ref(false);
6029
6046
  const hasHeaderSlot = vue.computed(() => hasSlot2("header"));
6030
6047
  const hasFooterSlot = vue.computed(() => hasSlot2("footer"));
6048
+ const cardClass = vue.computed(() => `card card--${hasError.value ? "error" : "default"}`);
6049
+ const props = __props;
6050
+ vue.onMounted(() => isMounted.value = true);
6051
+ async function onValidity({
6052
+ detail
6053
+ }) {
6054
+ if (!isMounted.value) {
6055
+ return;
6056
+ }
6057
+ if (!props.focusRef) {
6058
+ throw new Error("Element to focus on when card is invalid (`focusRef`) is required when using card validation.");
6059
+ }
6060
+ const focusElementId = props.focusRef.id;
6061
+ if (!focusElementId) {
6062
+ throw new Error("An id must be set on the card's focus element.");
6063
+ }
6064
+ hasError.value = !detail.isValid;
6065
+ validationMessage.value = detail.validationMessage;
6066
+ dispatchComponentValidityEvent(props.focusRef, {
6067
+ ...detail,
6068
+ errorMessage: validationMessage.value,
6069
+ focusElementId
6070
+ });
6071
+ }
6031
6072
  return (_ctx, _cache) => {
6032
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [hasHeaderSlot.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, [vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps({
6073
+ return vue.openBlock(), vue.createElementBlock("div", {
6074
+ id: __props.id,
6075
+ class: vue.normalizeClass(cardClass.value),
6076
+ onValidity
6077
+ }, [hasHeaderSlot.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, [vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps({
6033
6078
  headingSlotClass: "card__header-label"
6034
- })))])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("div", _hoisted_3$r, [vue.renderSlot(_ctx.$slots, "default")]), _cache[1] || (_cache[1] = vue.createTextVNode()), hasFooterSlot.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$m, [vue.renderSlot(_ctx.$slots, "footer")])) : vue.createCommentVNode("", true)]);
6079
+ })))])) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "error-message", vue.normalizeProps(vue.guardReactiveProps({
6080
+ hasError: hasError.value,
6081
+ validationMessage: validationMessage.value
6082
+ })), () => [hasError.value ? (vue.openBlock(), vue.createBlock(vue.unref(IFlex), {
6083
+ key: 0,
6084
+ gap: "1x",
6085
+ class: "card__error-message"
6086
+ }, {
6087
+ default: vue.withCtx(() => [vue.createVNode(vue.unref(IFlexItem), {
6088
+ shrink: "",
6089
+ align: "center"
6090
+ }, {
6091
+ default: vue.withCtx(() => [vue.createVNode(vue.unref(FIcon), {
6092
+ name: "error"
6093
+ })]),
6094
+ _: 1
6095
+ }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createVNode(vue.unref(IFlexItem), {
6096
+ grow: ""
6097
+ }, {
6098
+ default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(validationMessage.value), 1)]),
6099
+ _: 1
6100
+ })]),
6101
+ _: 1
6102
+ })) : vue.createCommentVNode("", true)]), _cache[2] || (_cache[2] = vue.createTextVNode()), vue.createElementVNode("div", _hoisted_3$r, [vue.renderSlot(_ctx.$slots, "default")]), _cache[3] || (_cache[3] = vue.createTextVNode()), hasFooterSlot.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$m, [vue.renderSlot(_ctx.$slots, "footer", vue.normalizeProps(vue.guardReactiveProps({
6103
+ hasError: hasError.value,
6104
+ validationMessage: validationMessage.value
6105
+ })))])) : vue.createCommentVNode("", true)], 42, _hoisted_1$K);
6035
6106
  };
6036
6107
  }
6037
6108
  });
@@ -9817,7 +9888,16 @@ const _sfc_main$J = vue.defineComponent({
9817
9888
  }
9818
9889
  },
9819
9890
  setup() {
9820
- return FTableInjected();
9891
+ const {
9892
+ renderColumns,
9893
+ setVisibilityColumn: setVisibilityColumn2,
9894
+ addColumn: addColumn2
9895
+ } = FTableInjected();
9896
+ return {
9897
+ renderColumns,
9898
+ setVisibilityColumn: setVisibilityColumn2,
9899
+ addColumn: addColumn2
9900
+ };
9821
9901
  },
9822
9902
  computed: {
9823
9903
  classes() {
@@ -13721,10 +13801,6 @@ function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit
13721
13801
  const expanded = isExpanded(row) ? [] : ["table__expandable-row--collapsed"];
13722
13802
  return ["table__expandable-row", ...border, ...expanded];
13723
13803
  }
13724
- function expandableColumnClasses(column, index) {
13725
- const indented = index === 0 ? ["table__column--indented"] : [];
13726
- return ["table__column", `table__column--${column.type}`, column.size, ...indented];
13727
- }
13728
13804
  function getExpandableDescribedby(row) {
13729
13805
  if (!isExpandableTable) {
13730
13806
  return void 0;
@@ -13758,7 +13834,6 @@ function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit
13758
13834
  isExpanded,
13759
13835
  rowAriaExpanded,
13760
13836
  expandableRowClasses,
13761
- expandableColumnClasses,
13762
13837
  getExpandableDescribedby,
13763
13838
  expandableRows,
13764
13839
  hasExpandableContent
@@ -13868,6 +13943,22 @@ const _sfc_main$g = vue.defineComponent({
13868
13943
  type: Array,
13869
13944
  required: false,
13870
13945
  default: void 0
13946
+ },
13947
+ /**
13948
+ * Enable showing the active row.
13949
+ */
13950
+ showActive: {
13951
+ type: Boolean,
13952
+ required: false,
13953
+ default: true
13954
+ },
13955
+ /**
13956
+ * V-model will bind to value containing the current active row.
13957
+ */
13958
+ active: {
13959
+ type: Object,
13960
+ required: false,
13961
+ default: () => void 0
13871
13962
  }
13872
13963
  },
13873
13964
  emits: [
@@ -13876,6 +13967,7 @@ const _sfc_main$g = vue.defineComponent({
13876
13967
  "update",
13877
13968
  "unselect",
13878
13969
  "update:modelValue",
13970
+ "update:active",
13879
13971
  "select",
13880
13972
  /**
13881
13973
  * Emitted when row is expanded.
@@ -13910,7 +14002,8 @@ const _sfc_main$g = vue.defineComponent({
13910
14002
  activeRow: void 0,
13911
14003
  columns: [],
13912
14004
  selectedRows: [],
13913
- tr: []
14005
+ tr: [],
14006
+ tbodyKey: 0
13914
14007
  };
13915
14008
  },
13916
14009
  computed: {
@@ -13948,7 +14041,7 @@ const _sfc_main$g = vue.defineComponent({
13948
14041
  return tableScrollClasses(this.scroll);
13949
14042
  },
13950
14043
  nbOfColumns() {
13951
- let columnCount = this.columns.length;
14044
+ let columnCount = this.visibleColumns.length;
13952
14045
  if (this.selectable) {
13953
14046
  columnCount++;
13954
14047
  }
@@ -13969,6 +14062,20 @@ const _sfc_main$g = vue.defineComponent({
13969
14062
  });
13970
14063
  }
13971
14064
  }
14065
+ },
14066
+ active: {
14067
+ immediate: true,
14068
+ handler: function() {
14069
+ this.updateActiveRowFromVModel();
14070
+ }
14071
+ },
14072
+ showActive: {
14073
+ immediate: true,
14074
+ handler: function(val) {
14075
+ if (!val) {
14076
+ this.tbodyKey ^= 1;
14077
+ }
14078
+ }
13972
14079
  }
13973
14080
  },
13974
14081
  updated() {
@@ -13987,6 +14094,9 @@ const _sfc_main$g = vue.defineComponent({
13987
14094
  },
13988
14095
  methods: {
13989
14096
  isActive(row) {
14097
+ if (!this.showActive) {
14098
+ return false;
14099
+ }
13990
14100
  return itemEquals(row, this.activeRow, this.keyAttribute);
13991
14101
  },
13992
14102
  isSelected(row) {
@@ -14019,7 +14129,7 @@ const _sfc_main$g = vue.defineComponent({
14019
14129
  }
14020
14130
  if (!itemEquals(row, this.activeRow, this.keyAttribute)) {
14021
14131
  this.$emit("change", row);
14022
- this.activeRow = row;
14132
+ this.setActiveRow(row);
14023
14133
  if (tr) {
14024
14134
  tr.focus();
14025
14135
  const td = tr.children[0];
@@ -14110,6 +14220,17 @@ const _sfc_main$g = vue.defineComponent({
14110
14220
  },
14111
14221
  escapeNewlines(value) {
14112
14222
  return value.replace(/\n/g, "<br/>");
14223
+ },
14224
+ updateActiveRowFromVModel() {
14225
+ if (this.active === void 0) {
14226
+ this.setActiveRow(void 0);
14227
+ } else if (!itemEquals(this.active, this.activeRow, this.keyAttribute)) {
14228
+ this.setActiveRow(this.active);
14229
+ }
14230
+ },
14231
+ setActiveRow(row) {
14232
+ this.activeRow = row;
14233
+ this.$emit("update:active", this.activeRow);
14113
14234
  }
14114
14235
  }
14115
14236
  });
@@ -14147,40 +14268,37 @@ const _hoisted_11$1 = {
14147
14268
  key: 1,
14148
14269
  class: "table__column__description"
14149
14270
  };
14150
- const _hoisted_12$1 = {
14151
- ref: "tbodyElement"
14152
- };
14153
- const _hoisted_13 = ["aria-label", "aria-expanded", "aria-level", "aria-describedby", "onKeydown", "onClick"];
14154
- const _hoisted_14 = {
14271
+ const _hoisted_12$1 = ["aria-label", "aria-expanded", "aria-level", "aria-describedby", "onKeydown", "onClick"];
14272
+ const _hoisted_13 = {
14155
14273
  key: 0
14156
14274
  };
14157
- const _hoisted_15 = {
14275
+ const _hoisted_14 = {
14158
14276
  key: 0,
14159
14277
  class: "table__expand-icon"
14160
14278
  };
14161
- const _hoisted_16 = {
14279
+ const _hoisted_15 = {
14162
14280
  key: 1,
14163
14281
  class: "table__column--selectable"
14164
14282
  };
14165
- const _hoisted_17 = {
14283
+ const _hoisted_16 = {
14166
14284
  class: "table__input"
14167
14285
  };
14168
- const _hoisted_18 = {
14286
+ const _hoisted_17 = {
14169
14287
  key: 0,
14170
14288
  class: "sr-only"
14171
14289
  };
14172
- const _hoisted_19 = {
14290
+ const _hoisted_18 = {
14173
14291
  key: 0,
14174
- class: "table__column--selectable"
14292
+ class: "table__column--placeholder"
14175
14293
  };
14176
- const _hoisted_20 = ["colspan"];
14177
- const _hoisted_21 = {
14294
+ const _hoisted_19 = ["colspan"];
14295
+ const _hoisted_20 = {
14178
14296
  key: 0
14179
14297
  };
14180
- const _hoisted_22 = {
14298
+ const _hoisted_21 = {
14181
14299
  key: 1
14182
14300
  };
14183
- const _hoisted_23 = ["colspan"];
14301
+ const _hoisted_22 = ["colspan"];
14184
14302
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14185
14303
  const _component_f_icon = vue.resolveComponent("f-icon");
14186
14304
  const _component_f_checkbox_field = vue.resolveComponent("f-checkbox-field");
@@ -14189,12 +14307,12 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14189
14307
  }, [vue.createElementVNode("table", vue.mergeProps({
14190
14308
  class: ["table", _ctx.tableClasses],
14191
14309
  role: _ctx.tableRole
14192
- }, _ctx.$attrs), [_ctx.hasCaption ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$d, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[14] || (_cache[14] = vue.createTextVNode()), vue.createElementVNode("colgroup", null, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_3$9)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_4$8)) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (column) => {
14310
+ }, _ctx.$attrs), [_ctx.hasCaption ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$d, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[15] || (_cache[15] = vue.createTextVNode()), vue.createElementVNode("colgroup", null, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_3$9)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_4$8)) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (column) => {
14193
14311
  return vue.openBlock(), vue.createElementBlock("col", {
14194
14312
  key: column.id,
14195
14313
  class: vue.normalizeClass(column.size)
14196
14314
  }, null, 2);
14197
- }), 128))]), _cache[15] || (_cache[15] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_5$6, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$4, [vue.createElementVNode("span", _hoisted_7$4, vue.toDisplayString(_ctx.$t("fkui.interactive-table.select", "Expandera")), 1)])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_8$4, [vue.createElementVNode("span", _hoisted_9$3, vue.toDisplayString(_ctx.$t("fkui.interactive-table.select", "Markera")), 1)])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.visibleColumns, (column) => {
14315
+ }), 128))]), _cache[16] || (_cache[16] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_5$6, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$4, [vue.createElementVNode("span", _hoisted_7$4, vue.toDisplayString(_ctx.$t("fkui.interactive-table.select", "Expandera")), 1)])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_8$4, [vue.createElementVNode("span", _hoisted_9$3, vue.toDisplayString(_ctx.$t("fkui.interactive-table.select", "Markera")), 1)])) : vue.createCommentVNode("", true), _cache[5] || (_cache[5] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.visibleColumns, (column) => {
14198
14316
  return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
14199
14317
  key: column.id,
14200
14318
  scope: "col",
@@ -14208,7 +14326,10 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14208
14326
  class: vue.normalizeClass(_ctx.iconClasses(column)),
14209
14327
  name: _ctx.iconName(column)
14210
14328
  }, null, 8, ["class", "name"])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), column.description ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11$1, vue.toDisplayString(column.description), 1)) : vue.createCommentVNode("", true)], 16);
14211
- }), 128))])]), _cache[16] || (_cache[16] = vue.createTextVNode()), vue.createElementVNode("tbody", _hoisted_12$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.rows, (row, index) => {
14329
+ }), 128))])]), _cache[17] || (_cache[17] = vue.createTextVNode()), (vue.openBlock(), vue.createElementBlock("tbody", {
14330
+ ref: "tbodyElement",
14331
+ key: _ctx.tbodyKey
14332
+ }, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.rows, (row, index) => {
14212
14333
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
14213
14334
  key: _ctx.rowKey(row)
14214
14335
  }, [vue.createElementVNode("tr", {
@@ -14220,15 +14341,15 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14220
14341
  tabindex: "0",
14221
14342
  onKeydown: vue.withModifiers(($event) => _ctx.onKeydown($event, index), ["self"]),
14222
14343
  onClick: ($event) => _ctx.onClick($event, row, index)
14223
- }, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_14, [_ctx.hasExpandableContent(row) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [vue.createVNode(_component_f_icon, {
14344
+ }, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_13, [_ctx.hasExpandableContent(row) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [vue.createVNode(_component_f_icon, {
14224
14345
  name: "arrow-right",
14225
14346
  rotate: _ctx.isExpanded(row) ? "270" : "90"
14226
- }, null, 8, ["rotate"])])) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_16, [vue.createElementVNode("div", _hoisted_17, [vue.createVNode(_component_f_checkbox_field, {
14347
+ }, null, 8, ["rotate"])])) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_15, [vue.createElementVNode("div", _hoisted_16, [vue.createVNode(_component_f_checkbox_field, {
14227
14348
  value: true,
14228
14349
  "model-value": _ctx.isSelected(row),
14229
14350
  onClick: vue.withModifiers(($event) => _ctx.onSelect(row), ["self"])
14230
14351
  }, {
14231
- default: vue.withCtx(() => [_ctx.hasCheckboxDescription ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_18, [vue.renderSlot(_ctx.$slots, "checkbox-description", vue.mergeProps({
14352
+ default: vue.withCtx(() => [_ctx.hasCheckboxDescription ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, [vue.renderSlot(_ctx.$slots, "checkbox-description", vue.mergeProps({
14232
14353
  ref_for: true
14233
14354
  }, {
14234
14355
  row
@@ -14238,21 +14359,21 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14238
14359
  ref_for: true
14239
14360
  }, {
14240
14361
  row
14241
- }))], 42, _hoisted_13), _cache[11] || (_cache[11] = vue.createTextVNode()), _ctx.isExpandableTable && _ctx.hasExpandableContent(row) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
14362
+ }))], 42, _hoisted_12$1), _cache[11] || (_cache[11] = vue.createTextVNode()), _ctx.isExpandableTable && _ctx.hasExpandableContent(row) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
14242
14363
  key: 0
14243
14364
  }, vue.renderList(_ctx.expandableRows(row), (expandableRow, expandableIndex) => {
14244
14365
  return vue.openBlock(), vue.createElementBlock("tr", {
14245
14366
  key: _ctx.rowKey(expandableRow),
14246
14367
  "aria-level": "2",
14247
14368
  class: vue.normalizeClass(_ctx.expandableRowClasses(row, expandableIndex))
14248
- }, [_cache[8] || (_cache[8] = vue.createElementVNode("td", null, null, -1)), _cache[9] || (_cache[9] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_19)) : vue.createCommentVNode("", true), _cache[10] || (_cache[10] = vue.createTextVNode()), !_ctx.hasExpandableSlot ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
14249
- key: 1
14250
- }, vue.renderList(_ctx.columns, (column, columnIndex) => {
14251
- return vue.openBlock(), vue.createElementBlock("td", {
14252
- key: `${_ctx.rowKey(expandableRow)}${column.name}`,
14253
- class: vue.normalizeClass(_ctx.expandableColumnClasses(column, columnIndex))
14254
- }, vue.toDisplayString(expandableRow[column.name]), 3);
14255
- }), 128)) : (vue.openBlock(), vue.createElementBlock("td", {
14369
+ }, [_cache[8] || (_cache[8] = vue.createElementVNode("td", {
14370
+ class: "table__column--placeholder"
14371
+ }, null, -1)), _cache[9] || (_cache[9] = vue.createTextVNode()), _ctx.selectable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_18)) : vue.createCommentVNode("", true), _cache[10] || (_cache[10] = vue.createTextVNode()), !_ctx.hasExpandableSlot ? vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
14372
+ key: 1,
14373
+ ref_for: true
14374
+ }, {
14375
+ row: expandableRow
14376
+ })) : (vue.openBlock(), vue.createElementBlock("td", {
14256
14377
  key: 2,
14257
14378
  class: "table__column table__column--indented",
14258
14379
  colspan: _ctx.columns.length
@@ -14261,14 +14382,16 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14261
14382
  }, {
14262
14383
  expandableRow,
14263
14384
  parentRow: row
14264
- }))], 8, _hoisted_20))], 2);
14385
+ }))], 8, _hoisted_19))], 2);
14265
14386
  }), 128)) : vue.createCommentVNode("", true)], 64);
14266
- }), 128)), _cache[12] || (_cache[12] = vue.createTextVNode()), _ctx.isEmpty && _ctx.columns.length === 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_21, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
14387
+ }), 128)), _cache[13] || (_cache[13] = vue.createTextVNode()), _ctx.isEmpty && _ctx.columns.length === 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_20, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
14267
14388
  row: {}
14268
- })))])) : vue.createCommentVNode("", true), _cache[13] || (_cache[13] = vue.createTextVNode()), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_22, [vue.createElementVNode("td", {
14389
+ })))])) : vue.createCommentVNode("", true), _cache[14] || (_cache[14] = vue.createTextVNode()), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_21, [vue.createElementVNode("td", {
14269
14390
  class: "table__column table__column--action",
14270
14391
  colspan: _ctx.nbOfColumns
14271
- }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.interactive-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_23)])) : vue.createCommentVNode("", true)], 512)], 16, _hoisted_1$f)], 2);
14392
+ }, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.interactive-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_22), _cache[12] || (_cache[12] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
14393
+ row: {}
14394
+ })))])) : vue.createCommentVNode("", true)]))], 16, _hoisted_1$f)], 2);
14272
14395
  }
14273
14396
  const FInteractiveTable = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g]]);
14274
14397
  const _sfc_main$f = vue.defineComponent({
@@ -17002,6 +17125,20 @@ const _sfc_main = vue.defineComponent({
17002
17125
  });
17003
17126
  }
17004
17127
  logic.DomUtils.focus(headerElement);
17128
+ },
17129
+ beforeNextWrapper() {
17130
+ return this.beforeNext({
17131
+ key: this.step.key,
17132
+ stepNumber: this.stepNumber,
17133
+ totalSteps: this.totalSteps
17134
+ });
17135
+ },
17136
+ beforeValidationWrapper() {
17137
+ return this.beforeValidation({
17138
+ key: this.step.key,
17139
+ stepNumber: this.stepNumber,
17140
+ totalSteps: this.totalSteps
17141
+ });
17005
17142
  }
17006
17143
  }
17007
17144
  });
@@ -17117,19 +17254,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17117
17254
  }, {
17118
17255
  default: vue.withCtx(() => [vue.createVNode(_component_f_validation_form, {
17119
17256
  id: _ctx.formId,
17120
- "before-submit": _ctx.beforeNext,
17121
- "before-validation": _ctx.beforeValidation,
17257
+ "before-submit": _ctx.beforeNextWrapper,
17258
+ "before-validation": _ctx.beforeValidationWrapper,
17122
17259
  "use-error-list": _ctx.useErrorList,
17123
17260
  class: "wizard-step-body",
17124
17261
  onSubmit: _ctx.onSubmit
17125
17262
  }, {
17126
- "error-message": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "error-message", {}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.wizard-step.errorlist.title", "Oj, du har glömt att fylla i något. Gå till:")), 1)])]),
17263
+ "error-message": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "error-message", vue.normalizeProps(vue.guardReactiveProps({
17264
+ stepNumber: _ctx.stepNumber,
17265
+ totalSteps: _ctx.totalSteps
17266
+ })), () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.wizard-step.errorlist.title", "Oj, du har glömt att fylla i något. Gå till:")), 1)])]),
17127
17267
  default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default"), _cache[14] || (_cache[14] = vue.createTextVNode()), vue.createElementVNode("div", _hoisted_10, [vue.createElementVNode("button", {
17128
17268
  "data-test": "submit-button",
17129
17269
  "data-disabled": _ctx.ignoreClick ? "true" : "false",
17130
17270
  type: "submit",
17131
17271
  class: "button button--primary button-group__item button--large"
17132
- }, [vue.renderSlot(_ctx.$slots, "next-button-text", {}, () => [_ctx.isFinalStep ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
17272
+ }, [vue.renderSlot(_ctx.$slots, "next-button-text", vue.normalizeProps(vue.guardReactiveProps({
17273
+ stepNumber: _ctx.stepNumber,
17274
+ totalSteps: _ctx.totalSteps
17275
+ })), () => [_ctx.isFinalStep ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
17133
17276
  key: 0
17134
17277
  }, [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.wizard-step.button.next.text-final", "Gå vidare och granska")), 1)], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
17135
17278
  key: 1