@fkui/vue-labs 6.37.0 → 6.38.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.
@@ -2618,7 +2618,7 @@ const _hoisted_1$e = {
2618
2618
  class: "table-ng__cell table-ng__cell--expand"
2619
2619
  };
2620
2620
  const _hoisted_2$a = ["aria-label", "aria-expanded"];
2621
- const _hoisted_3$8 = {
2621
+ const _hoisted_3$7 = {
2622
2622
  key: 1,
2623
2623
  ref: "expandable",
2624
2624
  tabindex: "-1",
@@ -2664,7 +2664,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2664
2664
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
2665
2665
  class: "button__icon",
2666
2666
  name: toggleIcon.value
2667
- }, null, 8, ["name"])], 8, _hoisted_2$a)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$8, null, 512));
2667
+ }, null, 8, ["name"])], 8, _hoisted_2$a)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$7, null, 512));
2668
2668
  };
2669
2669
  }
2670
2670
  });
@@ -3082,7 +3082,7 @@ const _hoisted_1$b = {
3082
3082
  scope: "col",
3083
3083
  class: "table-ng__column table-ng__column--selectable"
3084
3084
  };
3085
- const _hoisted_2$9 = ["checked", "indeterminate"];
3085
+ const _hoisted_2$9 = ["checked", "indeterminate", "aria-label"];
3086
3086
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3087
3087
  __name: "ITableHeaderSelectable",
3088
3088
  props: {
@@ -3097,9 +3097,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3097
3097
  emit: __emit
3098
3098
  }) {
3099
3099
  const emit = __emit;
3100
+ const $t = vue$1.useTranslate();
3100
3101
  const indeterminate = vue.computed(() => __props.state === "indeterminate");
3101
3102
  const checked = vue.computed(() => __props.state === "indeterminate" ? false : __props.state);
3102
3103
  const expose = {};
3104
+ const ariaLabel = vue.computed(() => {
3105
+ return !checked.value || indeterminate.value ? $t("fkui.ftable.select-all.aria-label", "Välj alla rader") : $t("fkui.ftable.unselect-all.aria-label", "Avmarkera alla rader");
3106
+ });
3103
3107
  if (__props.selectable === "multi") {
3104
3108
  const inputRef = vue.useTemplateRef("input");
3105
3109
  expose.tabstopEl = inputRef;
@@ -3112,7 +3116,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3112
3116
  checked: checked.value,
3113
3117
  indeterminate: indeterminate.value,
3114
3118
  type: "checkbox",
3115
- "aria-label": "select all",
3119
+ "aria-label": ariaLabel.value,
3116
3120
  tabindex: "-1",
3117
3121
  onChange: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
3118
3122
  }, null, 40, _hoisted_2$9)) : vue.createCommentVNode("", true)]);
@@ -3124,7 +3128,7 @@ const _hoisted_1$a = {
3124
3128
  class: "table-ng__cell table-ng__cell--checkbox"
3125
3129
  };
3126
3130
  const _hoisted_2$8 = ["checked", "aria-label"];
3127
- const _hoisted_3$7 = {
3131
+ const _hoisted_3$6 = {
3128
3132
  key: 1,
3129
3133
  ref: "target",
3130
3134
  tabindex: "-1",
@@ -3161,7 +3165,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3161
3165
  "aria-label": ariaLabel.value,
3162
3166
  tabindex: "-1",
3163
3167
  onChange
3164
- }, null, 40, _hoisted_2$8)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$7, [vue.createElementVNode("input", {
3168
+ }, null, 40, _hoisted_2$8)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$6, [vue.createElementVNode("input", {
3165
3169
  checked: Boolean(__props.column.checked(__props.row)),
3166
3170
  type: "checkbox",
3167
3171
  "aria-label": ariaLabel.value
@@ -3662,7 +3666,7 @@ const _hoisted_1$7 = {
3662
3666
  class: "table-ng__cell table-ng__cell--anchor"
3663
3667
  };
3664
3668
  const _hoisted_2$6 = ["href"];
3665
- const _hoisted_3$6 = {
3669
+ const _hoisted_3$5 = {
3666
3670
  key: 1,
3667
3671
  ref: "target",
3668
3672
  tabindex: "-1",
@@ -3692,7 +3696,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3692
3696
  target: "_blank",
3693
3697
  href: __props.column.href,
3694
3698
  tabindex: "-1"
3695
- }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_2$6)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$6, null, 512));
3699
+ }, vue.toDisplayString(__props.column.text(__props.row)), 9, _hoisted_2$6)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, null, 512));
3696
3700
  };
3697
3701
  }
3698
3702
  });
@@ -3703,7 +3707,7 @@ const _hoisted_1$6 = {
3703
3707
  const _hoisted_2$5 = {
3704
3708
  class: "sr-only"
3705
3709
  };
3706
- const _hoisted_3$5 = {
3710
+ const _hoisted_3$4 = {
3707
3711
  key: 1,
3708
3712
  ref: "td",
3709
3713
  tabindex: "-1",
@@ -3745,7 +3749,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3745
3749
  key: 0,
3746
3750
  library: __props.column.iconLibrary,
3747
3751
  name: __props.column.icon
3748
- }, null, 8, ["library", "name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$5, null, 512));
3752
+ }, null, 8, ["library", "name"])) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512)])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$4, null, 512));
3749
3753
  };
3750
3754
  }
3751
3755
  });
@@ -3791,13 +3795,9 @@ function requireEs_iterator_find() {
3791
3795
  }
3792
3796
  requireEs_iterator_find();
3793
3797
  const _hoisted_1$5 = {
3794
- key: 0,
3795
- class: "table-ng__cell table-ng__cell--button"
3796
- };
3797
- const _hoisted_2$4 = {
3798
3798
  class: "sr-only"
3799
3799
  };
3800
- const _hoisted_3$4 = {
3800
+ const _hoisted_2$4 = {
3801
3801
  key: 1,
3802
3802
  tabindex: "-1",
3803
3803
  class: "table-ng__cell"
@@ -3859,7 +3859,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3859
3859
  __expose(expose);
3860
3860
  return (_ctx, _cache) => {
3861
3861
  var _buttonRef$value;
3862
- return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_1$5, [vue.createElementVNode("button", {
3862
+ return renderButton.value ? (vue.openBlock(), vue.createElementBlock("td", {
3863
+ key: 0,
3864
+ class: vue.normalizeClass(["table-ng__cell table-ng__cell--button", {
3865
+ "table-ng__cell--menu-open": isOpen.value
3866
+ }])
3867
+ }, [vue.createElementVNode("button", {
3863
3868
  ref: "button",
3864
3869
  class: "icon-button",
3865
3870
  type: "button",
@@ -3868,14 +3873,14 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
3868
3873
  onClick: onOpen
3869
3874
  }, [vue.createVNode(vue.unref(vue$1.FIcon), {
3870
3875
  name: "bars"
3871
- }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$4, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FContextMenu), {
3876
+ }), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_1$5, vue.toDisplayString(__props.column.text(__props.row)), 1)], 512), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FContextMenu), {
3872
3877
  "is-open": isOpen.value,
3873
3878
  items: menuitems.value,
3874
3879
  anchor: (_buttonRef$value = buttonRef.value) !== null && _buttonRef$value !== void 0 ? _buttonRef$value : void 0,
3875
3880
  onClose,
3876
3881
  onSelect,
3877
3882
  onFocusout
3878
- }, null, 8, ["is-open", "items", "anchor"])])) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_3$4));
3883
+ }, null, 8, ["is-open", "items", "anchor"])], 2)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_2$4));
3879
3884
  };
3880
3885
  }
3881
3886
  });
@@ -3905,7 +3910,7 @@ const _hoisted_3$3 = ["aria-expanded", "aria-controls", "aria-activedescendant",
3905
3910
  const _hoisted_4$3 = {
3906
3911
  class: "table-ng__editable__text"
3907
3912
  };
3908
- const _hoisted_5$3 = {
3913
+ const _hoisted_5$2 = {
3909
3914
  key: 1,
3910
3915
  tabindex: "-1",
3911
3916
  class: "table-ng__cell table-ng__cell--static"
@@ -4058,10 +4063,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4058
4063
  tabindex: "-1",
4059
4064
  onKeydown: onCellKeyDown,
4060
4065
  onClick: vue.withModifiers(onCellClick, ["stop"])
4061
- }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$4, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FIcon), {
4062
- name: "arrow-down",
4063
- class: "table-ng__editable__icon"
4064
- })], 512), [[vue.vShow, !editing.value]]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
4066
+ }, [vue.withDirectives(vue.createElementVNode("div", _hoisted_1$4, [vue.createElementVNode("span", _hoisted_2$3, vue.toDisplayString(viewValue.value), 1)], 512), [[vue.vShow, !editing.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.withDirectives(vue.createElementVNode("div", {
4065
4067
  ref: "edit",
4066
4068
  role: "combobox",
4067
4069
  tabindex: "-1",
@@ -4077,10 +4079,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4077
4079
  }, ["prevent"])),
4078
4080
  onKeydown: vue.withModifiers(onEditKeyDown, ["stop"]),
4079
4081
  onFocusout: _cache[2] || (_cache[2] = (e) => onEditBlur(e))
4080
- }, [vue.createElementVNode("span", _hoisted_4$3, vue.toDisplayString(viewValue.value), 1), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.FIcon), {
4081
- name: "arrow-down",
4082
- class: "table-ng__editable__icon--active"
4083
- })], 40, _hoisted_3$3), [[vue.vShow, editing.value]]), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.withDirectives(vue.createVNode(vue.unref(vue$1.IComboboxDropdown), {
4082
+ }, [vue.createElementVNode("span", _hoisted_4$3, vue.toDisplayString(viewValue.value), 1)], 40, _hoisted_3$3), [[vue.vShow, editing.value]]), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.withDirectives(vue.createVNode(vue.unref(vue$1.IComboboxDropdown), {
4084
4083
  id: vue.unref(dropdownId),
4085
4084
  "is-open": dropdownIsOpen.value,
4086
4085
  options: __props.column.options,
@@ -4089,7 +4088,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
4089
4088
  "input-node": editRef.value,
4090
4089
  onSelect: selectDropdownOption,
4091
4090
  onClose: onDropdownClose
4092
- }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$3, vue.toDisplayString(__props.column.selected(__props.row)), 1));
4091
+ }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node"]), [[vue.vShow, editing.value]])], 32)) : (vue.openBlock(), vue.createElementBlock("td", _hoisted_5$2, vue.toDisplayString(__props.column.selected(__props.row)), 1));
4093
4092
  };
4094
4093
  }
4095
4094
  });
@@ -4145,9 +4144,6 @@ const _hoisted_3$2 = {
4145
4144
  class: "sr-only"
4146
4145
  };
4147
4146
  const _hoisted_4$2 = ["id", "aria-label"];
4148
- const _hoisted_5$2 = {
4149
- ref: "pen"
4150
- };
4151
4147
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4152
4148
  __name: "ITableText",
4153
4149
  props: {
@@ -4237,7 +4233,6 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4237
4233
  });
4238
4234
  const tdElement = vue.useTemplateRef("td");
4239
4235
  const inputElement = vue.useTemplateRef("input");
4240
- const penElement = vue.useTemplateRef("pen");
4241
4236
  const {
4242
4237
  stopEdit: stopEdit2
4243
4238
  } = useStartStopEdit();
@@ -4299,20 +4294,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4299
4294
  });
4300
4295
  vue.watchEffect(() => {
4301
4296
  if (hasError.value) {
4302
- var _tdElement$value, _penElement$value;
4297
+ var _tdElement$value, _inputElement$value;
4303
4298
  emit("onError", {
4304
4299
  anchor: (_tdElement$value = tdElement.value) !== null && _tdElement$value !== void 0 ? _tdElement$value : void 0,
4305
- arrowAnchor: (_penElement$value = penElement.value) !== null && _penElement$value !== void 0 ? _penElement$value : void 0,
4300
+ arrowAnchor: (_inputElement$value = inputElement.value) !== null && _inputElement$value !== void 0 ? _inputElement$value : void 0,
4306
4301
  message: validity.value.validationMessage,
4307
4302
  hasFocus: focused.value,
4308
4303
  hasHover: isHovered.value,
4309
4304
  inEdit: inEdit.value
4310
4305
  });
4311
4306
  } else {
4312
- var _tdElement$value2, _penElement$value2;
4307
+ var _tdElement$value2, _inputElement$value2;
4313
4308
  emit("closeError", {
4314
4309
  anchor: (_tdElement$value2 = tdElement.value) !== null && _tdElement$value2 !== void 0 ? _tdElement$value2 : void 0,
4315
- arrowAnchor: (_penElement$value2 = penElement.value) !== null && _penElement$value2 !== void 0 ? _penElement$value2 : void 0,
4310
+ arrowAnchor: (_inputElement$value2 = inputElement.value) !== null && _inputElement$value2 !== void 0 ? _inputElement$value2 : void 0,
4316
4311
  message: validity.value.validationMessage,
4317
4312
  hasFocus: focused.value,
4318
4313
  hasHover: isHovered.value,
@@ -4487,14 +4482,11 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4487
4482
  }, {
4488
4483
  onValidity,
4489
4484
  onPendingValidity
4490
- }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]]), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createElementVNode("div", _hoisted_5$2, [vue.createVNode(vue.unref(vue$1.FIcon), {
4491
- name: "pen",
4492
- class: "table-ng__editable__icon"
4493
- })], 512)], 2), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
4485
+ }), null, 16, _hoisted_4$2), [[vue.vModelText, viewValue.value]])], 2), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createVNode(vue.unref(vue$1.IPopupError), {
4494
4486
  anchor: tdElement.value,
4495
4487
  "is-open": openPopupError.value,
4496
4488
  "error-message": validity.value.validationMessage,
4497
- "arrow-anchor": penElement.value,
4489
+ "arrow-anchor": inputElement.value,
4498
4490
  layout: "f-table"
4499
4491
  }, null, 8, ["anchor", "is-open", "error-message", "arrow-anchor"])], 42, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock("td", {
4500
4492
  key: 1,
@@ -5131,6 +5123,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5131
5123
  striped: {
5132
5124
  type: Boolean
5133
5125
  },
5126
+ disableDividers: {
5127
+ type: Boolean
5128
+ },
5134
5129
  selectable: {
5135
5130
  default: () => void 0
5136
5131
  }
@@ -5178,7 +5173,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
5178
5173
  });
5179
5174
  const columns = vue.computed(() => normalizeTableColumns(__props.columns));
5180
5175
  const tableClasses = vue.computed(() => {
5181
- return __props.striped ? "table-ng table-ng--striped" : "table-ng";
5176
+ return ["table-ng", {
5177
+ "table-ng--striped": __props.striped,
5178
+ "table-ng--divided": !__props.disableDividers
5179
+ }];
5182
5180
  });
5183
5181
  const slots = vue.useSlots();
5184
5182
  const hasExpandableSlot = vue.computed(() => {