@fkui/vue 6.0.1 → 6.1.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.
- package/dist/cjs/cypress.js +1 -1
- package/dist/cjs/cypress.js.map +1 -1
- package/dist/cjs/index.cjs.js +1251 -1320
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/index.esm.js +1252 -1321
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +5096 -7605
- package/dist/types/tsdoc-metadata.json +1 -1
- package/htmlvalidate/rules/classdeprecated.rule.js +41 -18
- package/package.json +5 -5
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1973,7 +1973,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1973
1973
|
};
|
|
1974
1974
|
const _hoisted_1$U = ["aria-hidden"];
|
|
1975
1975
|
const _hoisted_2$F = ["xlink:href"];
|
|
1976
|
-
function _sfc_render$
|
|
1976
|
+
function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1977
1977
|
return vue.openBlock(), vue.createElementBlock("svg", vue.mergeProps(_ctx.$attrs, {
|
|
1978
1978
|
focusable: "false",
|
|
1979
1979
|
class: ["icon", [_ctx.spriteKey, ..._ctx.modifiers]],
|
|
@@ -1982,7 +1982,7 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1982
1982
|
"xlink:href": _ctx.spriteId
|
|
1983
1983
|
}, null, 8, _hoisted_2$F)], 16, _hoisted_1$U);
|
|
1984
1984
|
}
|
|
1985
|
-
const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$
|
|
1985
|
+
const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$R]]);
|
|
1986
1986
|
const DATA_TEST_ATTRIBUTE_NAME = "data-test";
|
|
1987
1987
|
function throwErrorIfEmpty(value) {
|
|
1988
1988
|
if (!value) {
|
|
@@ -4634,7 +4634,7 @@ const _hoisted_10$4 = {
|
|
|
4634
4634
|
class: "modal__shelf"
|
|
4635
4635
|
};
|
|
4636
4636
|
const _hoisted_11$3 = ["aria-label"];
|
|
4637
|
-
function _sfc_render$
|
|
4637
|
+
function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4638
4638
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
4639
4639
|
return _ctx.isOpen ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4640
4640
|
key: 0,
|
|
@@ -4664,7 +4664,7 @@ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4664
4664
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.onFocusLast && _ctx.onFocusLast(...args))
|
|
4665
4665
|
}, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$T)) : vue.createCommentVNode("", true);
|
|
4666
4666
|
}
|
|
4667
|
-
const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$
|
|
4667
|
+
const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$Q]]);
|
|
4668
4668
|
function prepareButtonList(src, buttonOrder = config.buttonOrder) {
|
|
4669
4669
|
const list = src.map((it) => {
|
|
4670
4670
|
var _it$event, _ref, _it$reason, _it$type;
|
|
@@ -4805,7 +4805,7 @@ const _hoisted_3$v = {
|
|
|
4805
4805
|
key: 0,
|
|
4806
4806
|
class: "sr-only"
|
|
4807
4807
|
};
|
|
4808
|
-
function _sfc_render$
|
|
4808
|
+
function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4809
4809
|
const _component_f_modal = vue.resolveComponent("f-modal");
|
|
4810
4810
|
return vue.openBlock(), vue.createBlock(_component_f_modal, {
|
|
4811
4811
|
fullscreen: _ctx.fullscreen,
|
|
@@ -4829,7 +4829,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4829
4829
|
_: 3
|
|
4830
4830
|
}, 8, ["fullscreen", "is-open", "aria-close-text", "size", "focus", "onClose"]);
|
|
4831
4831
|
}
|
|
4832
|
-
const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$
|
|
4832
|
+
const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$P]]);
|
|
4833
4833
|
const GAP = ["1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x"];
|
|
4834
4834
|
const ALIGNMENT = ["top", "center", "bottom"];
|
|
4835
4835
|
const FLOAT = ["left", "center", "right"];
|
|
@@ -4908,12 +4908,12 @@ const _sfc_main$17 = vue.defineComponent({
|
|
|
4908
4908
|
}
|
|
4909
4909
|
}
|
|
4910
4910
|
});
|
|
4911
|
-
function _sfc_render$
|
|
4911
|
+
function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4912
4912
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4913
4913
|
class: vue.normalizeClass(["iflex", _ctx.classList])
|
|
4914
4914
|
}, [vue.renderSlot(_ctx.$slots, "default")], 2);
|
|
4915
4915
|
}
|
|
4916
|
-
const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$
|
|
4916
|
+
const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$O]]);
|
|
4917
4917
|
const _sfc_main$16 = vue.defineComponent({
|
|
4918
4918
|
name: "IFlexItem",
|
|
4919
4919
|
inheritAttrs: true,
|
|
@@ -4961,12 +4961,12 @@ const _sfc_main$16 = vue.defineComponent({
|
|
|
4961
4961
|
}
|
|
4962
4962
|
}
|
|
4963
4963
|
});
|
|
4964
|
-
function _sfc_render$
|
|
4964
|
+
function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4965
4965
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4966
4966
|
class: vue.normalizeClass(["iflex__item", _ctx.classList])
|
|
4967
4967
|
}, [vue.renderSlot(_ctx.$slots, "default")], 2);
|
|
4968
4968
|
}
|
|
4969
|
-
const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$
|
|
4969
|
+
const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$N]]);
|
|
4970
4970
|
function focusError(item) {
|
|
4971
4971
|
const element = document.querySelector(`#${item.id}`);
|
|
4972
4972
|
if (!element) {
|
|
@@ -5045,7 +5045,7 @@ const _hoisted_4$p = ["onClick"];
|
|
|
5045
5045
|
const _hoisted_5$k = {
|
|
5046
5046
|
class: "error-list__link"
|
|
5047
5047
|
};
|
|
5048
|
-
function _sfc_render$
|
|
5048
|
+
function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5049
5049
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
5050
5050
|
const _component_i_flex_item = vue.resolveComponent("i-flex-item");
|
|
5051
5051
|
const _component_i_flex = vue.resolveComponent("i-flex");
|
|
@@ -5099,7 +5099,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5099
5099
|
_: 3
|
|
5100
5100
|
})]);
|
|
5101
5101
|
}
|
|
5102
|
-
const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$
|
|
5102
|
+
const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$M]]);
|
|
5103
5103
|
var es_iterator_every = {};
|
|
5104
5104
|
var hasRequiredEs_iterator_every;
|
|
5105
5105
|
function requireEs_iterator_every() {
|
|
@@ -5257,13 +5257,13 @@ const _sfc_main$14 = vue.defineComponent({
|
|
|
5257
5257
|
}
|
|
5258
5258
|
}
|
|
5259
5259
|
});
|
|
5260
|
-
function _sfc_render$
|
|
5260
|
+
function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5261
5261
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
5262
5262
|
onComponentValidity: _cache[0] || (_cache[0] = (...args) => _ctx.onComponentValidity && _ctx.onComponentValidity(...args)),
|
|
5263
5263
|
onComponentUnmount: _cache[1] || (_cache[1] = (...args) => _ctx.onComponentUnmount && _ctx.onComponentUnmount(...args))
|
|
5264
5264
|
}, [vue.renderSlot(_ctx.$slots, "default")], 32);
|
|
5265
5265
|
}
|
|
5266
|
-
const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$
|
|
5266
|
+
const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$L]]);
|
|
5267
5267
|
var FValidationFormAction = /* @__PURE__ */ ((FValidationFormAction2) => {
|
|
5268
5268
|
FValidationFormAction2[FValidationFormAction2["CONTINUE"] = 0] = "CONTINUE";
|
|
5269
5269
|
FValidationFormAction2[FValidationFormAction2["CANCEL"] = 1] = "CANCEL";
|
|
@@ -5415,7 +5415,7 @@ const _hoisted_2$B = {
|
|
|
5415
5415
|
tabindex: "-1",
|
|
5416
5416
|
role: "group"
|
|
5417
5417
|
};
|
|
5418
|
-
function _sfc_render$
|
|
5418
|
+
function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5419
5419
|
const _component_f_error_list = vue.resolveComponent("f-error-list");
|
|
5420
5420
|
const _component_f_validation_group = vue.resolveComponent("f-validation-group");
|
|
5421
5421
|
return vue.openBlock(), vue.createBlock(_component_f_validation_group, {
|
|
@@ -5441,7 +5441,7 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5441
5441
|
_: 3
|
|
5442
5442
|
}, 8, ["modelValue"]);
|
|
5443
5443
|
}
|
|
5444
|
-
const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$
|
|
5444
|
+
const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$K]]);
|
|
5445
5445
|
const _sfc_main$12 = vue.defineComponent({
|
|
5446
5446
|
name: "FFormModal",
|
|
5447
5447
|
components: {
|
|
@@ -5599,7 +5599,7 @@ const _hoisted_3$t = {
|
|
|
5599
5599
|
key: 0,
|
|
5600
5600
|
class: "sr-only"
|
|
5601
5601
|
};
|
|
5602
|
-
function _sfc_render$
|
|
5602
|
+
function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5603
5603
|
const _component_f_validation_form = vue.resolveComponent("f-validation-form");
|
|
5604
5604
|
const _component_f_modal = vue.resolveComponent("f-modal");
|
|
5605
5605
|
return vue.openBlock(), vue.createBlock(_component_f_modal, {
|
|
@@ -5635,7 +5635,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5635
5635
|
_: 3
|
|
5636
5636
|
}, 8, ["data-test", "fullscreen", "is-open", "size", "aria-close-text", "onClose"]);
|
|
5637
5637
|
}
|
|
5638
|
-
const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$
|
|
5638
|
+
const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$J]]);
|
|
5639
5639
|
async function confirmModal(callingInstance, texts) {
|
|
5640
5640
|
const buttons = [{
|
|
5641
5641
|
label: texts.confirm,
|
|
@@ -6008,12 +6008,12 @@ const _sfc_main$11 = vue.defineComponent({
|
|
|
6008
6008
|
const _hoisted_1$O = {
|
|
6009
6009
|
"data-test": "f-error-page"
|
|
6010
6010
|
};
|
|
6011
|
-
function _sfc_render$
|
|
6011
|
+
function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6012
6012
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, _cache[0] || (_cache[0] = [vue.createElementVNode("h1", null, "Fel", -1), vue.createTextVNode(), vue.createElementVNode("p", null, "Ett fel har uppstått.", -1), vue.createTextVNode(), vue.createElementVNode("a", {
|
|
6013
6013
|
href: "/"
|
|
6014
6014
|
}, "Gå till startsidan", -1)]));
|
|
6015
6015
|
}
|
|
6016
|
-
const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$
|
|
6016
|
+
const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$I]]);
|
|
6017
6017
|
const _sfc_main$10 = vue.defineComponent({
|
|
6018
6018
|
name: "FErrorHandlingApp",
|
|
6019
6019
|
props: {
|
|
@@ -6043,7 +6043,7 @@ const _sfc_main$10 = vue.defineComponent({
|
|
|
6043
6043
|
});
|
|
6044
6044
|
}
|
|
6045
6045
|
});
|
|
6046
|
-
function _sfc_render$
|
|
6046
|
+
function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6047
6047
|
return vue.openBlock(), vue.createElementBlock("div", null, [_ctx.hasError ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.errorComponent), {
|
|
6048
6048
|
key: 0,
|
|
6049
6049
|
payload: _ctx.payload
|
|
@@ -6053,7 +6053,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6053
6053
|
key: 2
|
|
6054
6054
|
})]);
|
|
6055
6055
|
}
|
|
6056
|
-
const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$
|
|
6056
|
+
const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$H]]);
|
|
6057
6057
|
function isMonthBefore(date2, minDate) {
|
|
6058
6058
|
return Boolean(minDate && date2.isBefore(minDate.startOfMonth()));
|
|
6059
6059
|
}
|
|
@@ -6222,7 +6222,7 @@ const _hoisted_5$j = ["aria-disabled", "aria-live"];
|
|
|
6222
6222
|
const _hoisted_6$f = {
|
|
6223
6223
|
class: "sr-only"
|
|
6224
6224
|
};
|
|
6225
|
-
function _sfc_render$
|
|
6225
|
+
function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6226
6226
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
6227
6227
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [vue.createElementVNode("div", _hoisted_2$z, vue.toDisplayString(_ctx.currentText), 1), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createElementVNode("button", {
|
|
6228
6228
|
ref: "previousButton",
|
|
@@ -6246,7 +6246,7 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6246
6246
|
name: "arrow-right"
|
|
6247
6247
|
}, null, 8, ["class"])], 8, _hoisted_5$j)]);
|
|
6248
6248
|
}
|
|
6249
|
-
const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$
|
|
6249
|
+
const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$G]]);
|
|
6250
6250
|
function getDayStartOffset(days) {
|
|
6251
6251
|
return days[0].weekDay - 1;
|
|
6252
6252
|
}
|
|
@@ -6340,23 +6340,26 @@ const _hoisted_3$r = {
|
|
|
6340
6340
|
};
|
|
6341
6341
|
const _hoisted_4$n = ["title"];
|
|
6342
6342
|
const _hoisted_5$i = {
|
|
6343
|
+
key: 1
|
|
6344
|
+
};
|
|
6345
|
+
const _hoisted_6$e = {
|
|
6343
6346
|
key: 0,
|
|
6344
6347
|
class: "calendar-month__cell calendar-month__cell--week-number",
|
|
6345
6348
|
"aria-hidden": "true"
|
|
6346
6349
|
};
|
|
6347
|
-
const _hoisted_6$e = ["colspan"];
|
|
6348
6350
|
const _hoisted_7$c = ["colspan"];
|
|
6349
|
-
const _hoisted_8$7 =
|
|
6351
|
+
const _hoisted_8$7 = ["colspan"];
|
|
6352
|
+
const _hoisted_9$5 = {
|
|
6350
6353
|
key: 0,
|
|
6351
6354
|
"aria-hidden": "true"
|
|
6352
6355
|
};
|
|
6353
|
-
const
|
|
6354
|
-
const
|
|
6356
|
+
const _hoisted_10$3 = ["colspan"];
|
|
6357
|
+
const _hoisted_11$2 = {
|
|
6355
6358
|
key: 1,
|
|
6356
6359
|
"aria-hidden": "true"
|
|
6357
6360
|
};
|
|
6358
|
-
const
|
|
6359
|
-
function _sfc_render$
|
|
6361
|
+
const _hoisted_12$2 = ["colspan"];
|
|
6362
|
+
function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6360
6363
|
return vue.openBlock(), vue.createElementBlock("table", {
|
|
6361
6364
|
class: "calendar-month__table",
|
|
6362
6365
|
role: "grid",
|
|
@@ -6381,19 +6384,20 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6381
6384
|
return vue.openBlock(), vue.createElementBlock("th", {
|
|
6382
6385
|
key: weekday.name,
|
|
6383
6386
|
scope: "col",
|
|
6387
|
+
"aria-hidden": "true",
|
|
6384
6388
|
class: "calendar-month__header-cell"
|
|
6385
|
-
}, [vue.
|
|
6389
|
+
}, [_ctx.showShortWeekdays ? (vue.openBlock(), vue.createElementBlock("abbr", {
|
|
6390
|
+
key: 0,
|
|
6386
6391
|
title: weekday.name
|
|
6387
|
-
}, vue.toDisplayString(
|
|
6392
|
+
}, vue.toDisplayString(weekday.shortName), 9, _hoisted_4$n)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$i, vue.toDisplayString(weekday.name), 1))]);
|
|
6388
6393
|
}), 128))])]), _cache[23] || (_cache[23] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.weeks, (week) => {
|
|
6389
6394
|
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
6390
6395
|
key: week.week
|
|
6391
|
-
}, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("td",
|
|
6396
|
+
}, [!_ctx.internalHideWeekNumbers ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_6$e, vue.toDisplayString(week.week), 1)) : vue.createCommentVNode("", true), _cache[17] || (_cache[17] = vue.createTextVNode()), _ctx.getDayStartOffset(week.days) ? (vue.openBlock(), vue.createElementBlock("td", {
|
|
6392
6397
|
key: 1,
|
|
6393
6398
|
class: "calendar-month__cell",
|
|
6394
|
-
colspan: _ctx.getDayStartOffset(week.days)
|
|
6395
|
-
|
|
6396
|
-
}, 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) => {
|
|
6399
|
+
colspan: _ctx.getDayStartOffset(week.days)
|
|
6400
|
+
}, null, 8, _hoisted_7$c)) : vue.createCommentVNode("", true), _cache[18] || (_cache[18] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(week.days, (day) => {
|
|
6397
6401
|
return vue.openBlock(), vue.createElementBlock("td", {
|
|
6398
6402
|
key: day.toString(),
|
|
6399
6403
|
class: "calendar-month__cell",
|
|
@@ -6407,18 +6411,18 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6407
6411
|
class: "calendar-month__cell",
|
|
6408
6412
|
colspan: _ctx.getDayEndOffset(week.days),
|
|
6409
6413
|
"aria-hidden": "true"
|
|
6410
|
-
}, null, 8,
|
|
6411
|
-
}), 128)), _cache[20] || (_cache[20] = vue.createTextVNode()), _ctx.weeks.length < 5 ? (vue.openBlock(), vue.createElementBlock("tr",
|
|
6414
|
+
}, null, 8, _hoisted_8$7)) : vue.createCommentVNode("", true)]);
|
|
6415
|
+
}), 128)), _cache[20] || (_cache[20] = vue.createTextVNode()), _ctx.weeks.length < 5 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_9$5, [vue.createElementVNode("td", {
|
|
6412
6416
|
class: "calendar-month__cell",
|
|
6413
6417
|
colspan: _ctx.totalCols,
|
|
6414
6418
|
"aria-hidden": "true"
|
|
6415
|
-
}, null, 8,
|
|
6419
|
+
}, null, 8, _hoisted_10$3)])) : vue.createCommentVNode("", true), _cache[21] || (_cache[21] = vue.createTextVNode()), _ctx.weeks.length < 6 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_11$2, [vue.createElementVNode("td", {
|
|
6416
6420
|
class: "calendar-month__cell",
|
|
6417
6421
|
colspan: _ctx.totalCols,
|
|
6418
6422
|
"aria-hidden": "true"
|
|
6419
|
-
}, null, 8,
|
|
6423
|
+
}, null, 8, _hoisted_12$2)])) : vue.createCommentVNode("", true)])], 40, _hoisted_1$M);
|
|
6420
6424
|
}
|
|
6421
|
-
const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$
|
|
6425
|
+
const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$F]]);
|
|
6422
6426
|
const DayStep = {
|
|
6423
6427
|
ArrowRight: 1,
|
|
6424
6428
|
ArrowLeft: -1,
|
|
@@ -6533,7 +6537,7 @@ const _sfc_main$Z = vue.defineComponent({
|
|
|
6533
6537
|
}
|
|
6534
6538
|
});
|
|
6535
6539
|
const _hoisted_1$L = ["data-date", "tabindex", "onClick", "onKeydown"];
|
|
6536
|
-
function _sfc_render$
|
|
6540
|
+
function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6537
6541
|
const _component_i_calendar_month_grid = vue.resolveComponent("i-calendar-month-grid");
|
|
6538
6542
|
return vue.openBlock(), vue.createBlock(_component_i_calendar_month_grid, {
|
|
6539
6543
|
value: _ctx.modelValue
|
|
@@ -6556,7 +6560,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6556
6560
|
_: 3
|
|
6557
6561
|
}, 8, ["value"]);
|
|
6558
6562
|
}
|
|
6559
|
-
const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$
|
|
6563
|
+
const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$E]]);
|
|
6560
6564
|
const _sfc_main$Y = vue.defineComponent({
|
|
6561
6565
|
name: "FCalendar",
|
|
6562
6566
|
components: {
|
|
@@ -6611,7 +6615,7 @@ const _sfc_main$Y = vue.defineComponent({
|
|
|
6611
6615
|
const _hoisted_1$K = {
|
|
6612
6616
|
class: "calendar__wrapper"
|
|
6613
6617
|
};
|
|
6614
|
-
function _sfc_render$
|
|
6618
|
+
function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6615
6619
|
const _component_i_calendar_navbar = vue.resolveComponent("i-calendar-navbar");
|
|
6616
6620
|
const _component_i_calendar_month = vue.resolveComponent("i-calendar-month");
|
|
6617
6621
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [vue.createVNode(_component_i_calendar_navbar, {
|
|
@@ -6637,7 +6641,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6637
6641
|
_: 3
|
|
6638
6642
|
}, 8, ["model-value", "min-date", "max-date", "tab-date", "onClick", "onUpdate:modelValue"])]);
|
|
6639
6643
|
}
|
|
6640
|
-
const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$
|
|
6644
|
+
const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$D]]);
|
|
6641
6645
|
function getCalendarDaySrText(day, enabled, selected, t) {
|
|
6642
6646
|
const parts = [];
|
|
6643
6647
|
if (!enabled) {
|
|
@@ -6727,12 +6731,12 @@ const _hoisted_1$J = {
|
|
|
6727
6731
|
const _hoisted_2$x = {
|
|
6728
6732
|
class: "sr-only"
|
|
6729
6733
|
};
|
|
6730
|
-
function _sfc_render$
|
|
6734
|
+
function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6731
6735
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
6732
6736
|
class: vue.normalizeClass(_ctx.dayClasses)
|
|
6733
6737
|
}, [vue.createElementVNode("span", _hoisted_1$J, vue.toDisplayString(_ctx.day.day), 1), _cache[0] || (_cache[0] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_2$x, vue.toDisplayString(_ctx.srText), 1)], 2);
|
|
6734
6738
|
}
|
|
6735
|
-
const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$
|
|
6739
|
+
const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$C]]);
|
|
6736
6740
|
function useEventListener(target, event, callback) {
|
|
6737
6741
|
vue.onMounted(() => {
|
|
6738
6742
|
var _a;
|
|
@@ -6746,10 +6750,10 @@ function useEventListener(target, event, callback) {
|
|
|
6746
6750
|
function useSlotUtils() {
|
|
6747
6751
|
const $slots = vue.useSlots();
|
|
6748
6752
|
return {
|
|
6749
|
-
hasSlot(
|
|
6753
|
+
hasSlot(...args) {
|
|
6750
6754
|
return hasSlot({
|
|
6751
6755
|
$slots
|
|
6752
|
-
},
|
|
6756
|
+
}, ...args);
|
|
6753
6757
|
}
|
|
6754
6758
|
};
|
|
6755
6759
|
}
|
|
@@ -6909,7 +6913,7 @@ const _sfc_main$V = vue.defineComponent({
|
|
|
6909
6913
|
}
|
|
6910
6914
|
}
|
|
6911
6915
|
});
|
|
6912
|
-
function _sfc_render$
|
|
6916
|
+
function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6913
6917
|
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
6914
6918
|
onEnter: _ctx.enter,
|
|
6915
6919
|
onAfterEnter: _ctx.afterEnter,
|
|
@@ -6921,7 +6925,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6921
6925
|
_: 3
|
|
6922
6926
|
}, 8, ["onEnter", "onAfterEnter", "onLeave"]);
|
|
6923
6927
|
}
|
|
6924
|
-
const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$
|
|
6928
|
+
const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$B]]);
|
|
6925
6929
|
function offset(page, el) {
|
|
6926
6930
|
const rect = el.getBoundingClientRect();
|
|
6927
6931
|
return {
|
|
@@ -7487,7 +7491,7 @@ const _sfc_main$U = vue.defineComponent({
|
|
|
7487
7491
|
}
|
|
7488
7492
|
}
|
|
7489
7493
|
});
|
|
7490
|
-
function _sfc_render$
|
|
7494
|
+
function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7491
7495
|
return _ctx.isOpen ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
7492
7496
|
key: 0,
|
|
7493
7497
|
to: _ctx.teleportTarget,
|
|
@@ -7508,7 +7512,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7508
7512
|
placement: _ctx.placement
|
|
7509
7513
|
})))], 544)], 16)], 8, ["to", "disabled"])) : vue.createCommentVNode("", true);
|
|
7510
7514
|
}
|
|
7511
|
-
const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$
|
|
7515
|
+
const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$A]]);
|
|
7512
7516
|
function computeArrowOffset(placement, inputIconRect, wrapperRect) {
|
|
7513
7517
|
switch (placement) {
|
|
7514
7518
|
case Placement.A: {
|
|
@@ -7623,6 +7627,9 @@ const _sfc_main$T = vue.defineComponent({
|
|
|
7623
7627
|
},
|
|
7624
7628
|
errorStyle() {
|
|
7625
7629
|
return `--i-popup-error-offset: ${this.arrowOffset}px`;
|
|
7630
|
+
},
|
|
7631
|
+
teleportTarget() {
|
|
7632
|
+
return config.teleportTarget;
|
|
7626
7633
|
}
|
|
7627
7634
|
},
|
|
7628
7635
|
watch: {
|
|
@@ -7711,11 +7718,11 @@ const _hoisted_1$H = {
|
|
|
7711
7718
|
ref: "wrapper",
|
|
7712
7719
|
class: "popup-error__wrapper"
|
|
7713
7720
|
};
|
|
7714
|
-
function _sfc_render$
|
|
7721
|
+
function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7715
7722
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
7716
7723
|
return _ctx.isOpen ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
7717
7724
|
key: 0,
|
|
7718
|
-
to:
|
|
7725
|
+
to: _ctx.teleportTarget,
|
|
7719
7726
|
disabled: _ctx.teleportDisabled
|
|
7720
7727
|
}, [vue.createElementVNode("div", {
|
|
7721
7728
|
ref: "popup",
|
|
@@ -7733,9 +7740,9 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7733
7740
|
}, [vue.createVNode(_component_f_icon, {
|
|
7734
7741
|
name: "close",
|
|
7735
7742
|
class: "button__icon"
|
|
7736
|
-
})])], 6)], 512)], 2)], 8, ["disabled"])) : vue.createCommentVNode("", true);
|
|
7743
|
+
})])], 6)], 512)], 2)], 8, ["to", "disabled"])) : vue.createCommentVNode("", true);
|
|
7737
7744
|
}
|
|
7738
|
-
const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$
|
|
7745
|
+
const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$z]]);
|
|
7739
7746
|
function numItems(itemHeight, availableHeight, verticalSpacing) {
|
|
7740
7747
|
const itemsFit = Math.floor((availableHeight - verticalSpacing) / itemHeight);
|
|
7741
7748
|
return Math.min(itemsFit, 7);
|
|
@@ -8266,7 +8273,7 @@ const _hoisted_5$h = {
|
|
|
8266
8273
|
key: 0,
|
|
8267
8274
|
class: "sr-only"
|
|
8268
8275
|
};
|
|
8269
|
-
function _sfc_render$
|
|
8276
|
+
function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8270
8277
|
const _component_i_popup = vue.resolveComponent("i-popup");
|
|
8271
8278
|
return vue.openBlock(), vue.createBlock(_component_i_popup, {
|
|
8272
8279
|
class: "ipopupmenu",
|
|
@@ -8302,7 +8309,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8302
8309
|
_: 1
|
|
8303
8310
|
}, 8, ["is-open", "anchor", "focus-element", "onKeyup", "onKeydown"]);
|
|
8304
8311
|
}
|
|
8305
|
-
const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$
|
|
8312
|
+
const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$y]]);
|
|
8306
8313
|
const ANIMATION_DURATION = 500;
|
|
8307
8314
|
const NO_CSS_CLASSES = "";
|
|
8308
8315
|
const CLOSED_CSS_CLASS_OPACITY = "animate-expand animate-expand--opacity";
|
|
@@ -8505,13 +8512,13 @@ const _hoisted_1$E = {
|
|
|
8505
8512
|
ref: "content",
|
|
8506
8513
|
"data-test": "animation-content"
|
|
8507
8514
|
};
|
|
8508
|
-
function _sfc_render$
|
|
8515
|
+
function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8509
8516
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8510
8517
|
class: vue.normalizeClass(_ctx.animationClasses),
|
|
8511
8518
|
style: vue.normalizeStyle(_ctx.heightStyle)
|
|
8512
8519
|
}, [_ctx.shouldVIf ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [vue.renderSlot(_ctx.$slots, "default")], 512)), [[vue.vShow, _ctx.shouldVShow]]) : vue.createCommentVNode("", true)], 6);
|
|
8513
8520
|
}
|
|
8514
|
-
const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$
|
|
8521
|
+
const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$x]]);
|
|
8515
8522
|
const _sfc_main$P = vue.defineComponent({
|
|
8516
8523
|
name: "ISkipLink",
|
|
8517
8524
|
mixins: [TranslationMixin],
|
|
@@ -8527,13 +8534,13 @@ const _sfc_main$P = vue.defineComponent({
|
|
|
8527
8534
|
}
|
|
8528
8535
|
});
|
|
8529
8536
|
const _hoisted_1$D = ["href"];
|
|
8530
|
-
function _sfc_render$
|
|
8537
|
+
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8531
8538
|
return vue.openBlock(), vue.createElementBlock("a", {
|
|
8532
8539
|
class: "iskiplink",
|
|
8533
8540
|
href: _ctx.href
|
|
8534
8541
|
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$D);
|
|
8535
8542
|
}
|
|
8536
|
-
const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$
|
|
8543
|
+
const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$w]]);
|
|
8537
8544
|
function filterOptions(options, filter2, selectMode) {
|
|
8538
8545
|
if (logic.isEmpty(filter2) || selectMode) {
|
|
8539
8546
|
return options;
|
|
@@ -9151,7 +9158,7 @@ const _hoisted_5$g = {
|
|
|
9151
9158
|
const _hoisted_6$d = {
|
|
9152
9159
|
class: "tooltip__footer"
|
|
9153
9160
|
};
|
|
9154
|
-
function _sfc_render$
|
|
9161
|
+
function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9155
9162
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
9156
9163
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
9157
9164
|
disabled: _ctx.iconTarget === null,
|
|
@@ -9184,7 +9191,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9184
9191
|
name: "close"
|
|
9185
9192
|
})])])])) : vue.createCommentVNode("", true)], 16)], 64);
|
|
9186
9193
|
}
|
|
9187
|
-
const FTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$
|
|
9194
|
+
const FTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$v]]);
|
|
9188
9195
|
function* labelClasses(options) {
|
|
9189
9196
|
const {
|
|
9190
9197
|
labelClass
|
|
@@ -9485,7 +9492,7 @@ const _hoisted_9$4 = {
|
|
|
9485
9492
|
key: 0,
|
|
9486
9493
|
class: "label__message label__message--error"
|
|
9487
9494
|
};
|
|
9488
|
-
function _sfc_render$
|
|
9495
|
+
function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9489
9496
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
9490
9497
|
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
9491
9498
|
id: _ctx.id,
|
|
@@ -9522,7 +9529,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9522
9529
|
class: vue.normalizeClass(_ctx.groupContentClass)
|
|
9523
9530
|
}, [vue.renderSlot(_ctx.$slots, "default")], 2)], 42, _hoisted_1$z);
|
|
9524
9531
|
}
|
|
9525
|
-
const FFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$
|
|
9532
|
+
const FFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$u]]);
|
|
9526
9533
|
const anyType$1 = [String, Object, Array, Number, Date, Boolean];
|
|
9527
9534
|
const _sfc_main$K = vue.defineComponent({
|
|
9528
9535
|
name: "FCheckboxField",
|
|
@@ -9720,7 +9727,7 @@ const _hoisted_4$i = {
|
|
|
9720
9727
|
key: 0,
|
|
9721
9728
|
class: "checkbox__details"
|
|
9722
9729
|
};
|
|
9723
|
-
function _sfc_render$
|
|
9730
|
+
function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9724
9731
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
9725
9732
|
class: vue.normalizeClass(["checkbox", _ctx.disabledClass]),
|
|
9726
9733
|
onValidity: _cache[2] || (_cache[2] = (...args) => _ctx.onValidity && _ctx.onValidity(...args))
|
|
@@ -9750,7 +9757,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9750
9757
|
_: 3
|
|
9751
9758
|
}, 8, ["onEnter", "onAfterEnter", "onLeave"])) : vue.createCommentVNode("", true)], 64)) : vue.createCommentVNode("", true)], 10, _hoisted_2$q)], 34);
|
|
9752
9759
|
}
|
|
9753
|
-
const FCheckboxField = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$
|
|
9760
|
+
const FCheckboxField = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$t]]);
|
|
9754
9761
|
var es_iterator_some = {};
|
|
9755
9762
|
var hasRequiredEs_iterator_some;
|
|
9756
9763
|
function requireEs_iterator_some() {
|
|
@@ -10006,7 +10013,7 @@ const _hoisted_5$e = {
|
|
|
10006
10013
|
key: 0,
|
|
10007
10014
|
class: "contextmenu__separator"
|
|
10008
10015
|
};
|
|
10009
|
-
function _sfc_render$
|
|
10016
|
+
function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10010
10017
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
10011
10018
|
const _component_i_popup = vue.resolveComponent("i-popup");
|
|
10012
10019
|
return vue.openBlock(), vue.createBlock(_component_i_popup, {
|
|
@@ -10046,7 +10053,7 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10046
10053
|
_: 1
|
|
10047
10054
|
}, 8, ["is-open", "anchor", "focus-element"]);
|
|
10048
10055
|
}
|
|
10049
|
-
const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$
|
|
10056
|
+
const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$s]]);
|
|
10050
10057
|
var Operation = /* @__PURE__ */ ((Operation2) => {
|
|
10051
10058
|
Operation2[Operation2["ADD"] = 0] = "ADD";
|
|
10052
10059
|
Operation2[Operation2["DELETE"] = 1] = "DELETE";
|
|
@@ -10054,30 +10061,14 @@ var Operation = /* @__PURE__ */ ((Operation2) => {
|
|
|
10054
10061
|
Operation2[Operation2["NONE"] = 3] = "NONE";
|
|
10055
10062
|
return Operation2;
|
|
10056
10063
|
})(Operation || {});
|
|
10057
|
-
const
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
provide() {
|
|
10066
|
-
return {
|
|
10067
|
-
delete: (item) => {
|
|
10068
|
-
this.deleteItem(item);
|
|
10069
|
-
},
|
|
10070
|
-
modify: (item) => {
|
|
10071
|
-
this.updateItem(item);
|
|
10072
|
-
},
|
|
10073
|
-
registerCallbackAfterItemAdd: (callback) => {
|
|
10074
|
-
this.callbackAfterItemAdd = callback;
|
|
10075
|
-
},
|
|
10076
|
-
registerCallbackBeforeItemDelete: (callback) => {
|
|
10077
|
-
this.callbackBeforeItemDelete = callback;
|
|
10078
|
-
}
|
|
10079
|
-
};
|
|
10080
|
-
},
|
|
10064
|
+
const _hoisted_1$w = {
|
|
10065
|
+
class: "crud-dataset"
|
|
10066
|
+
};
|
|
10067
|
+
const _hoisted_2$o = {
|
|
10068
|
+
key: 0
|
|
10069
|
+
};
|
|
10070
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
10071
|
+
__name: "FCrudDataset",
|
|
10081
10072
|
props: {
|
|
10082
10073
|
/**
|
|
10083
10074
|
* The list of items that should be deleted, modified or added to.
|
|
@@ -10161,25 +10152,24 @@ const _sfc_main$I = vue.defineComponent({
|
|
|
10161
10152
|
}
|
|
10162
10153
|
},
|
|
10163
10154
|
emits: ["created", "deleted", "updated", "update:modelValue"],
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
const
|
|
10182
|
-
const cancelButtonText = this.operation === Operation.ADD ? this.$t("fkui.crud-dataset.modal.cancel.add", "Avbryt") : this.$t("fkui.crud-dataset.modal.cancel.modify", "Avbryt");
|
|
10155
|
+
setup(__props, {
|
|
10156
|
+
emit: __emit
|
|
10157
|
+
}) {
|
|
10158
|
+
const $t2 = useTranslate();
|
|
10159
|
+
const slots = vue.useSlots();
|
|
10160
|
+
const result = vue.ref([]);
|
|
10161
|
+
const operation = vue.ref(Operation.NONE);
|
|
10162
|
+
const item = vue.ref(null);
|
|
10163
|
+
const originalItemToUpdate = vue.ref(null);
|
|
10164
|
+
const isFormModalOpen = vue.ref(false);
|
|
10165
|
+
const isConfirmModalOpen = vue.ref(false);
|
|
10166
|
+
const callbackAfterItemAdd = vue.ref(() => ({}));
|
|
10167
|
+
const callbackBeforeItemDelete = vue.ref(() => ({}));
|
|
10168
|
+
const props = __props;
|
|
10169
|
+
const emit = __emit;
|
|
10170
|
+
const formModalButtons = vue.computed(() => {
|
|
10171
|
+
const confirmButtonText = operation.value === Operation.ADD ? $t2("fkui.crud-dataset.modal.confirm.add", "Lägg till") : $t2("fkui.crud-dataset.modal.confirm.modify", "Spara");
|
|
10172
|
+
const cancelButtonText = operation.value === Operation.ADD ? $t2("fkui.crud-dataset.modal.cancel.add", "Avbryt") : $t2("fkui.crud-dataset.modal.cancel.modify", "Avbryt");
|
|
10183
10173
|
return [{
|
|
10184
10174
|
label: confirmButtonText,
|
|
10185
10175
|
event: "confirm",
|
|
@@ -10191,175 +10181,168 @@ const _sfc_main$I = vue.defineComponent({
|
|
|
10191
10181
|
type: "secondary",
|
|
10192
10182
|
submitButton: false
|
|
10193
10183
|
}];
|
|
10194
|
-
}
|
|
10195
|
-
confirmDeleteButtons() {
|
|
10184
|
+
});
|
|
10185
|
+
const confirmDeleteButtons = vue.computed(() => {
|
|
10196
10186
|
return [{
|
|
10197
|
-
label:
|
|
10187
|
+
label: $t2("fkui.crud-dataset.modal.confirm.delete", "Ja, ta bort"),
|
|
10198
10188
|
type: "primary",
|
|
10199
10189
|
event: "confirm"
|
|
10200
10190
|
}, {
|
|
10201
|
-
label:
|
|
10191
|
+
label: $t2("fkui.crud-dataset.modal.cancel.delete", "Nej, avbryt"),
|
|
10202
10192
|
type: "secondary"
|
|
10203
10193
|
}];
|
|
10204
|
-
}
|
|
10205
|
-
hasAddSlot() {
|
|
10206
|
-
return Boolean(
|
|
10207
|
-
}
|
|
10208
|
-
hasDeleteSlot() {
|
|
10209
|
-
return Boolean(
|
|
10210
|
-
}
|
|
10211
|
-
hasModifySlot() {
|
|
10212
|
-
return Boolean(
|
|
10213
|
-
}
|
|
10214
|
-
formModalHeader() {
|
|
10215
|
-
return
|
|
10216
|
-
}
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10194
|
+
});
|
|
10195
|
+
const hasAddSlot = vue.computed(() => {
|
|
10196
|
+
return Boolean(slots.add);
|
|
10197
|
+
});
|
|
10198
|
+
const hasDeleteSlot = vue.computed(() => {
|
|
10199
|
+
return Boolean(slots.delete);
|
|
10200
|
+
});
|
|
10201
|
+
const hasModifySlot = vue.computed(() => {
|
|
10202
|
+
return Boolean(slots.modify);
|
|
10203
|
+
});
|
|
10204
|
+
const formModalHeader = vue.computed(() => {
|
|
10205
|
+
return operation.value === Operation.ADD ? props.addNewModalHeader : props.modifyModalHeader;
|
|
10206
|
+
});
|
|
10207
|
+
vue.provide("delete", deleteItem);
|
|
10208
|
+
vue.provide("modify", updateItem);
|
|
10209
|
+
vue.provide("registerCallbackAfterItemAdd", (callback) => {
|
|
10210
|
+
callbackAfterItemAdd.value = callback;
|
|
10211
|
+
});
|
|
10212
|
+
vue.provide("registerCallbackBeforeItemDelete", (callback) => {
|
|
10213
|
+
callbackBeforeItemDelete.value = callback;
|
|
10214
|
+
});
|
|
10215
|
+
vue.onMounted(() => {
|
|
10216
|
+
if (!hasAddSlot.value && !hasDeleteSlot.value && !hasModifySlot.value) {
|
|
10217
|
+
throw Error("At least one template of the following must be defined. #add, #delete or #modify");
|
|
10224
10218
|
}
|
|
10225
|
-
}
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
if (!this.hasAddSlot) {
|
|
10219
|
+
});
|
|
10220
|
+
vue.watch(() => props.modelValue, (data) => {
|
|
10221
|
+
result.value = [...data];
|
|
10222
|
+
}, {
|
|
10223
|
+
immediate: true,
|
|
10224
|
+
deep: true
|
|
10225
|
+
});
|
|
10226
|
+
function createItem() {
|
|
10227
|
+
if (!hasAddSlot.value) {
|
|
10235
10228
|
throw Error("No template is defined for #add");
|
|
10236
10229
|
}
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
}
|
|
10241
|
-
deleteItem(
|
|
10242
|
-
if (!
|
|
10230
|
+
operation.value = Operation.ADD;
|
|
10231
|
+
item.value = props.beforeCreate ? props.beforeCreate() : {};
|
|
10232
|
+
isFormModalOpen.value = true;
|
|
10233
|
+
}
|
|
10234
|
+
function deleteItem(current) {
|
|
10235
|
+
if (!hasDeleteSlot.value) {
|
|
10243
10236
|
throw Error("No template is defined for #delete");
|
|
10244
10237
|
}
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
}
|
|
10249
|
-
onDeleteConfirm() {
|
|
10250
|
-
if (!
|
|
10238
|
+
operation.value = Operation.DELETE;
|
|
10239
|
+
item.value = current;
|
|
10240
|
+
isConfirmModalOpen.value = true;
|
|
10241
|
+
}
|
|
10242
|
+
function onDeleteConfirm() {
|
|
10243
|
+
if (!item.value) {
|
|
10251
10244
|
return;
|
|
10252
10245
|
}
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
logic.alertScreenReader(
|
|
10246
|
+
callbackBeforeItemDelete.value(item.value);
|
|
10247
|
+
result.value = result.value.filter((it) => it !== item.value);
|
|
10248
|
+
emit("deleted", item.value);
|
|
10249
|
+
emit("update:modelValue", result.value);
|
|
10250
|
+
logic.alertScreenReader($t2("fkui.crud-dataset.aria-live.delete", "Raden har tagits bort"), {
|
|
10258
10251
|
assertive: true
|
|
10259
10252
|
});
|
|
10260
|
-
}
|
|
10261
|
-
onDeleteClose(e) {
|
|
10262
|
-
|
|
10263
|
-
if (e.reason === "close" &&
|
|
10264
|
-
|
|
10253
|
+
}
|
|
10254
|
+
function onDeleteClose(e) {
|
|
10255
|
+
onModalClose();
|
|
10256
|
+
if (e.reason === "close" && props.onCancel) {
|
|
10257
|
+
props.onCancel();
|
|
10265
10258
|
}
|
|
10266
|
-
}
|
|
10267
|
-
onModalClose() {
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
}
|
|
10271
|
-
onFormModalSubmit() {
|
|
10272
|
-
if (!
|
|
10259
|
+
}
|
|
10260
|
+
function onModalClose() {
|
|
10261
|
+
isFormModalOpen.value = false;
|
|
10262
|
+
isConfirmModalOpen.value = false;
|
|
10263
|
+
}
|
|
10264
|
+
function onFormModalSubmit() {
|
|
10265
|
+
if (!item.value) {
|
|
10273
10266
|
return;
|
|
10274
10267
|
}
|
|
10275
|
-
if (
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
logic.alertScreenReader(
|
|
10268
|
+
if (operation.value === Operation.ADD) {
|
|
10269
|
+
result.value.push(item.value);
|
|
10270
|
+
emit("created", item.value);
|
|
10271
|
+
emit("update:modelValue", result.value);
|
|
10272
|
+
callbackAfterItemAdd.value(item.value);
|
|
10273
|
+
logic.alertScreenReader($t2("fkui.crud-dataset.aria-live.add", "En rad har lagts till"), {
|
|
10281
10274
|
assertive: true
|
|
10282
10275
|
});
|
|
10283
|
-
} else if (
|
|
10284
|
-
if (
|
|
10285
|
-
Object.assign(
|
|
10276
|
+
} else if (operation.value === Operation.MODIFY) {
|
|
10277
|
+
if (originalItemToUpdate.value) {
|
|
10278
|
+
Object.assign(originalItemToUpdate.value, item.value);
|
|
10286
10279
|
} else {
|
|
10287
|
-
|
|
10280
|
+
originalItemToUpdate.value = item.value;
|
|
10288
10281
|
}
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
logic.alertScreenReader(
|
|
10282
|
+
emit("updated", originalItemToUpdate.value);
|
|
10283
|
+
emit("update:modelValue", result.value);
|
|
10284
|
+
logic.alertScreenReader($t2("fkui.crud-dataset.aria-live.modify", "Raden har ändrats"), {
|
|
10292
10285
|
assertive: true
|
|
10293
10286
|
});
|
|
10294
10287
|
}
|
|
10295
|
-
|
|
10296
|
-
}
|
|
10297
|
-
updateItem(
|
|
10298
|
-
if (!
|
|
10288
|
+
isFormModalOpen.value = false;
|
|
10289
|
+
}
|
|
10290
|
+
function updateItem(current) {
|
|
10291
|
+
if (!hasModifySlot.value) {
|
|
10299
10292
|
throw Error("No template is defined for #modify");
|
|
10300
10293
|
}
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10294
|
+
operation.value = Operation.MODIFY;
|
|
10295
|
+
originalItemToUpdate.value = current;
|
|
10296
|
+
item.value = logic.deepClone(current);
|
|
10297
|
+
isFormModalOpen.value = true;
|
|
10305
10298
|
}
|
|
10299
|
+
return (_ctx, _cache) => {
|
|
10300
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [vue.renderSlot(_ctx.$slots, "default"), _cache[5] || (_cache[5] = vue.createTextVNode()), hasAddSlot.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$o, [vue.createElementVNode("button", {
|
|
10301
|
+
"data-test": "f-crud-dataset-add-button",
|
|
10302
|
+
type: "button",
|
|
10303
|
+
class: "button button--tertiary crud-dataset__add-button",
|
|
10304
|
+
onClick: _cache[0] || (_cache[0] = ($event) => createItem())
|
|
10305
|
+
}, [vue.createVNode(vue.unref(FIcon), {
|
|
10306
|
+
class: "button__icon",
|
|
10307
|
+
name: "plus"
|
|
10308
|
+
}), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "add-button", {}, () => [vue.createTextVNode(vue.toDisplayString(vue.unref($t2)("fkui.crud-dataset.button.add", "Lägg till ny")), 1)])])])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.createVNode(vue.unref(FFormModal), {
|
|
10309
|
+
"is-open": isFormModalOpen.value,
|
|
10310
|
+
"aria-close-text": vue.unref($t2)("fkui.crud-dataset.modal.close", "Stäng"),
|
|
10311
|
+
buttons: formModalButtons.value,
|
|
10312
|
+
"use-error-list": false,
|
|
10313
|
+
"before-submit": __props.beforeSubmit,
|
|
10314
|
+
"before-validation": __props.beforeValidation,
|
|
10315
|
+
"on-cancel": __props.onCancel,
|
|
10316
|
+
onClose: onModalClose,
|
|
10317
|
+
onCancel: __props.onCancel,
|
|
10318
|
+
onSubmit: onFormModalSubmit
|
|
10319
|
+
}, {
|
|
10320
|
+
header: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(formModalHeader.value), 1)]),
|
|
10321
|
+
"input-text-fields": vue.withCtx(() => [operation.value === vue.unref(Operation).ADD ? vue.renderSlot(_ctx.$slots, "add", vue.normalizeProps(vue.mergeProps({
|
|
10322
|
+
key: 0
|
|
10323
|
+
}, {
|
|
10324
|
+
item: item.value
|
|
10325
|
+
}))) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), operation.value === vue.unref(Operation).MODIFY ? vue.renderSlot(_ctx.$slots, "modify", vue.normalizeProps(vue.mergeProps({
|
|
10326
|
+
key: 1
|
|
10327
|
+
}, {
|
|
10328
|
+
item: item.value
|
|
10329
|
+
}))) : vue.createCommentVNode("", true)]),
|
|
10330
|
+
_: 3
|
|
10331
|
+
}, 8, ["is-open", "aria-close-text", "buttons", "before-submit", "before-validation", "on-cancel", "onCancel"]), _cache[7] || (_cache[7] = vue.createTextVNode()), vue.createVNode(vue.unref(FConfirmModal), {
|
|
10332
|
+
"is-open": isConfirmModalOpen.value,
|
|
10333
|
+
buttons: confirmDeleteButtons.value,
|
|
10334
|
+
onConfirm: onDeleteConfirm,
|
|
10335
|
+
onClose: onDeleteClose
|
|
10336
|
+
}, {
|
|
10337
|
+
heading: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(__props.deleteModalHeader), 1)]),
|
|
10338
|
+
content: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "delete", vue.normalizeProps(vue.guardReactiveProps({
|
|
10339
|
+
item: item.value
|
|
10340
|
+
})))]),
|
|
10341
|
+
_: 3
|
|
10342
|
+
}, 8, ["is-open", "buttons"])]);
|
|
10343
|
+
};
|
|
10306
10344
|
}
|
|
10307
10345
|
});
|
|
10308
|
-
const _hoisted_1$w = {
|
|
10309
|
-
class: "crud-dataset"
|
|
10310
|
-
};
|
|
10311
|
-
const _hoisted_2$o = {
|
|
10312
|
-
key: 0
|
|
10313
|
-
};
|
|
10314
|
-
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10315
|
-
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
10316
|
-
const _component_f_form_modal = vue.resolveComponent("f-form-modal");
|
|
10317
|
-
const _component_f_confirm_modal = vue.resolveComponent("f-confirm-modal");
|
|
10318
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [vue.renderSlot(_ctx.$slots, "default"), _cache[5] || (_cache[5] = vue.createTextVNode()), _ctx.hasAddSlot ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$o, [vue.createElementVNode("button", {
|
|
10319
|
-
"data-test": "f-crud-dataset-add-button",
|
|
10320
|
-
type: "button",
|
|
10321
|
-
class: "button button--tertiary crud-dataset__add-button",
|
|
10322
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.createItem())
|
|
10323
|
-
}, [vue.createVNode(_component_f_icon, {
|
|
10324
|
-
class: "button__icon",
|
|
10325
|
-
name: "plus"
|
|
10326
|
-
}), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "add-button", {}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.crud-dataset.button.add", "Lägg till ny")), 1)])])])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.createVNode(_component_f_form_modal, {
|
|
10327
|
-
"is-open": _ctx.isFormModalOpen,
|
|
10328
|
-
"aria-close-text": _ctx.$t("fkui.crud-dataset.modal.close", "Stäng"),
|
|
10329
|
-
buttons: _ctx.formModalButtons,
|
|
10330
|
-
"use-error-list": false,
|
|
10331
|
-
"before-submit": _ctx.beforeSubmit,
|
|
10332
|
-
"before-validation": _ctx.beforeValidation,
|
|
10333
|
-
"on-cancel": _ctx.onCancel,
|
|
10334
|
-
onClose: _ctx.onModalClose,
|
|
10335
|
-
onCancel: _ctx.onCancel,
|
|
10336
|
-
onSubmit: _ctx.onFormModalSubmit
|
|
10337
|
-
}, {
|
|
10338
|
-
header: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(_ctx.formModalHeader), 1)]),
|
|
10339
|
-
"input-text-fields": vue.withCtx(() => [_ctx.operation === _ctx.Operation.ADD ? vue.renderSlot(_ctx.$slots, "add", vue.normalizeProps(vue.mergeProps({
|
|
10340
|
-
key: 0
|
|
10341
|
-
}, {
|
|
10342
|
-
item: _ctx.item
|
|
10343
|
-
}))) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), _ctx.operation === _ctx.Operation.MODIFY ? vue.renderSlot(_ctx.$slots, "modify", vue.normalizeProps(vue.mergeProps({
|
|
10344
|
-
key: 1
|
|
10345
|
-
}, {
|
|
10346
|
-
item: _ctx.item
|
|
10347
|
-
}))) : vue.createCommentVNode("", true)]),
|
|
10348
|
-
_: 3
|
|
10349
|
-
}, 8, ["is-open", "aria-close-text", "buttons", "before-submit", "before-validation", "on-cancel", "onClose", "onCancel", "onSubmit"]), _cache[7] || (_cache[7] = vue.createTextVNode()), vue.createVNode(_component_f_confirm_modal, {
|
|
10350
|
-
"is-open": _ctx.isConfirmModalOpen,
|
|
10351
|
-
buttons: _ctx.confirmDeleteButtons,
|
|
10352
|
-
onConfirm: _ctx.onDeleteConfirm,
|
|
10353
|
-
onClose: _ctx.onDeleteClose
|
|
10354
|
-
}, {
|
|
10355
|
-
heading: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(_ctx.deleteModalHeader), 1)]),
|
|
10356
|
-
content: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "delete", vue.normalizeProps(vue.guardReactiveProps({
|
|
10357
|
-
item: _ctx.item
|
|
10358
|
-
})))]),
|
|
10359
|
-
_: 3
|
|
10360
|
-
}, 8, ["is-open", "buttons", "onConfirm", "onClose"])]);
|
|
10361
|
-
}
|
|
10362
|
-
const FCrudDataset = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$w]]);
|
|
10363
10346
|
function FCrudDatasetInjected() {
|
|
10364
10347
|
return {
|
|
10365
10348
|
delete: vue.inject("delete"),
|
|
@@ -10426,7 +10409,7 @@ const _hoisted_1$v = {
|
|
|
10426
10409
|
key: 1,
|
|
10427
10410
|
class: "sr-only"
|
|
10428
10411
|
};
|
|
10429
|
-
function _sfc_render$
|
|
10412
|
+
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10430
10413
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
10431
10414
|
return vue.openBlock(), vue.createElementBlock("button", {
|
|
10432
10415
|
type: "button",
|
|
@@ -10440,7 +10423,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10440
10423
|
key: 2
|
|
10441
10424
|
}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.buttonText), 1)]) : vue.createCommentVNode("", true)]);
|
|
10442
10425
|
}
|
|
10443
|
-
const FCrudButton = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$
|
|
10426
|
+
const FCrudButton = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$r]]);
|
|
10444
10427
|
function ActivateItemInjected() {
|
|
10445
10428
|
return {
|
|
10446
10429
|
registerCallbackAfterItemAdd: vue.inject("registerCallbackAfterItemAdd", () => void 0),
|
|
@@ -10665,7 +10648,7 @@ const _sfc_main$G = vue.defineComponent({
|
|
|
10665
10648
|
});
|
|
10666
10649
|
}
|
|
10667
10650
|
});
|
|
10668
|
-
function _sfc_render$
|
|
10651
|
+
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10669
10652
|
return _ctx.renderColumns && _ctx.visible ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tagName), vue.mergeProps({
|
|
10670
10653
|
key: 0,
|
|
10671
10654
|
class: _ctx.classes,
|
|
@@ -10677,7 +10660,7 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10677
10660
|
_: 3
|
|
10678
10661
|
}, 16, ["class", "scope"])) : vue.createCommentVNode("", true);
|
|
10679
10662
|
}
|
|
10680
|
-
const FTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$
|
|
10663
|
+
const FTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$q]]);
|
|
10681
10664
|
function FSortFilterDatasetInjected() {
|
|
10682
10665
|
return {
|
|
10683
10666
|
sort: vue.inject("sort", () => void 0),
|
|
@@ -10742,7 +10725,7 @@ const _hoisted_7$a = {
|
|
|
10742
10725
|
key: 0,
|
|
10743
10726
|
class: "label__message label__message--error"
|
|
10744
10727
|
};
|
|
10745
|
-
function _sfc_render$
|
|
10728
|
+
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10746
10729
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
10747
10730
|
return _ctx.$slots.tooltip ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [_ctx.hasDefaultSlot ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$n, [vue.createElementVNode("label", {
|
|
10748
10731
|
class: "label",
|
|
@@ -10769,7 +10752,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10769
10752
|
name: "error"
|
|
10770
10753
|
}), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "error-message")])) : vue.createCommentVNode("", true)], 8, _hoisted_6$b));
|
|
10771
10754
|
}
|
|
10772
|
-
const FLabel = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$
|
|
10755
|
+
const FLabel = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$p]]);
|
|
10773
10756
|
function resolveWidthClass$1(words, inline) {
|
|
10774
10757
|
return inline ? void 0 : words.split(" ").map((word) => `i-width-${word}`).join(" ");
|
|
10775
10758
|
}
|
|
@@ -10905,7 +10888,7 @@ const _sfc_main$E = vue.defineComponent({
|
|
|
10905
10888
|
}
|
|
10906
10889
|
});
|
|
10907
10890
|
const _hoisted_1$t = ["id"];
|
|
10908
|
-
function _sfc_render$
|
|
10891
|
+
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10909
10892
|
const _component_f_label = vue.resolveComponent("f-label");
|
|
10910
10893
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
10911
10894
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -10952,7 +10935,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10952
10935
|
name: "arrow-down"
|
|
10953
10936
|
})], 2)], 34);
|
|
10954
10937
|
}
|
|
10955
|
-
const FSelectField = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$
|
|
10938
|
+
const FSelectField = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$o]]);
|
|
10956
10939
|
function resolveWidthClass(words, inline) {
|
|
10957
10940
|
return inline ? void 0 : words.split(" ").map((word) => `i-width-${word}`).join(" ");
|
|
10958
10941
|
}
|
|
@@ -11357,7 +11340,7 @@ const _hoisted_7$9 = {
|
|
|
11357
11340
|
key: 3,
|
|
11358
11341
|
class: "text-field__append-inner"
|
|
11359
11342
|
};
|
|
11360
|
-
function _sfc_render$
|
|
11343
|
+
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11361
11344
|
const _component_f_label = vue.resolveComponent("f-label");
|
|
11362
11345
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
11363
11346
|
const _component_i_popup_error = vue.resolveComponent("i-popup-error");
|
|
@@ -11440,7 +11423,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11440
11423
|
onClose: _ctx.onDropdownClose
|
|
11441
11424
|
}, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node", "onSelect", "onClose"])) : vue.createCommentVNode("", true)], 2);
|
|
11442
11425
|
}
|
|
11443
|
-
const FTextField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$
|
|
11426
|
+
const FTextField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$n]]);
|
|
11444
11427
|
const _sfc_main$C = vue.defineComponent({
|
|
11445
11428
|
name: "FEmailTextField",
|
|
11446
11429
|
components: {
|
|
@@ -11560,7 +11543,7 @@ const _sfc_main$C = vue.defineComponent({
|
|
|
11560
11543
|
const _hoisted_1$r = {
|
|
11561
11544
|
key: 0
|
|
11562
11545
|
};
|
|
11563
|
-
function _sfc_render$
|
|
11546
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11564
11547
|
const _component_f_text_field = vue.resolveComponent("f-text-field");
|
|
11565
11548
|
return vue.openBlock(), vue.createElementBlock("div", null, [vue.createVNode(_component_f_text_field, vue.mergeProps({
|
|
11566
11549
|
id: _ctx.id,
|
|
@@ -11590,7 +11573,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11590
11573
|
_: 3
|
|
11591
11574
|
}, 8, ["modelValue", "maxlength", "onPaste"])) : vue.createCommentVNode("", true)]);
|
|
11592
11575
|
}
|
|
11593
|
-
const FEmailTextField = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$
|
|
11576
|
+
const FEmailTextField = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$m]]);
|
|
11594
11577
|
const _sfc_main$B = vue.defineComponent({
|
|
11595
11578
|
name: "FPhoneTextField",
|
|
11596
11579
|
components: {
|
|
@@ -11691,7 +11674,7 @@ const _sfc_main$B = vue.defineComponent({
|
|
|
11691
11674
|
}
|
|
11692
11675
|
}
|
|
11693
11676
|
});
|
|
11694
|
-
function _sfc_render$
|
|
11677
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11695
11678
|
const _component_f_text_field = vue.resolveComponent("f-text-field");
|
|
11696
11679
|
return vue.openBlock(), vue.createElementBlock("div", null, [vue.createVNode(_component_f_text_field, vue.mergeProps({
|
|
11697
11680
|
id: _ctx.id,
|
|
@@ -11718,7 +11701,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11718
11701
|
_: 3
|
|
11719
11702
|
}, 8, ["modelValue", "maxlength"])) : vue.createCommentVNode("", true)]);
|
|
11720
11703
|
}
|
|
11721
|
-
const FPhoneTextField = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$
|
|
11704
|
+
const FPhoneTextField = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$l]]);
|
|
11722
11705
|
const _sfc_main$A = vue.defineComponent({
|
|
11723
11706
|
name: "FCurrencyTextField",
|
|
11724
11707
|
extends: FTextField,
|
|
@@ -11817,7 +11800,7 @@ const _sfc_main$z = vue.defineComponent({
|
|
|
11817
11800
|
const _hoisted_1$q = {
|
|
11818
11801
|
class: "sr-only"
|
|
11819
11802
|
};
|
|
11820
|
-
function _sfc_render$
|
|
11803
|
+
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11821
11804
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
11822
11805
|
const _component_f_text_field = vue.resolveComponent("f-text-field");
|
|
11823
11806
|
return vue.openBlock(), vue.createElementBlock("div", null, [vue.createVNode(_component_f_text_field, vue.mergeProps({
|
|
@@ -11867,7 +11850,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11867
11850
|
key: "1"
|
|
11868
11851
|
} : void 0]), 1040, ["id", "maxlength", "model-value", "onChange", "onInput", "onBlur", "onUpdate"])]);
|
|
11869
11852
|
}
|
|
11870
|
-
const FSearchTextField = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$
|
|
11853
|
+
const FSearchTextField = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$k]]);
|
|
11871
11854
|
const _sfc_main$y = vue.defineComponent({
|
|
11872
11855
|
name: "FBankAccountNumberTextField",
|
|
11873
11856
|
extends: FTextField,
|
|
@@ -12263,39 +12246,28 @@ function filter(list, filterAttributes, searchString) {
|
|
|
12263
12246
|
const searchTerms = searchString.split(/\s+/).map((word) => word.toLocaleLowerCase());
|
|
12264
12247
|
return list.filter((item) => includesAllSearchTerms(item, filterAttributes, searchTerms));
|
|
12265
12248
|
}
|
|
12266
|
-
const
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
this.sortFilterData();
|
|
12289
|
-
this.$emit("usedSortAttributes", this.sortAttribute);
|
|
12290
|
-
},
|
|
12291
|
-
registerCallbackOnSort: (callback) => {
|
|
12292
|
-
this.tableCallbackOnSort = callback;
|
|
12293
|
-
},
|
|
12294
|
-
registerCallbackOnMount: (callback) => {
|
|
12295
|
-
this.tableCallbackSortableColumns = callback;
|
|
12296
|
-
}
|
|
12297
|
-
};
|
|
12298
|
-
},
|
|
12249
|
+
const _hoisted_1$p = {
|
|
12250
|
+
class: "sort-filter-dataset"
|
|
12251
|
+
};
|
|
12252
|
+
const _hoisted_2$l = {
|
|
12253
|
+
class: "sort-filter-dataset__search"
|
|
12254
|
+
};
|
|
12255
|
+
const _hoisted_3$h = {
|
|
12256
|
+
class: "sr-only"
|
|
12257
|
+
};
|
|
12258
|
+
const _hoisted_4$e = ["title"];
|
|
12259
|
+
const _hoisted_5$b = {
|
|
12260
|
+
class: "sr-only"
|
|
12261
|
+
};
|
|
12262
|
+
const _hoisted_6$9 = {
|
|
12263
|
+
value: {
|
|
12264
|
+
attribute: "",
|
|
12265
|
+
ascending: false
|
|
12266
|
+
}
|
|
12267
|
+
};
|
|
12268
|
+
const _hoisted_7$8 = ["value"];
|
|
12269
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
12270
|
+
__name: "FSortFilterDataset",
|
|
12299
12271
|
props: {
|
|
12300
12272
|
/**
|
|
12301
12273
|
* The data that you wish to sort or filter.
|
|
@@ -12344,7 +12316,7 @@ const _sfc_main$p = vue.defineComponent({
|
|
|
12344
12316
|
placeholderFilter: {
|
|
12345
12317
|
type: String,
|
|
12346
12318
|
required: false,
|
|
12347
|
-
default:
|
|
12319
|
+
default: logic.TranslationService.provider.translate("fkui.sort-filter-dataset.placeholder.filter", "Sök")
|
|
12348
12320
|
},
|
|
12349
12321
|
/**
|
|
12350
12322
|
* The order the data will be sorted by if defaultSortAttribute has been set.
|
|
@@ -12356,243 +12328,237 @@ const _sfc_main$p = vue.defineComponent({
|
|
|
12356
12328
|
}
|
|
12357
12329
|
},
|
|
12358
12330
|
emits: ["datasetSorted", "usedSortAttributes"],
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12331
|
+
setup(__props, {
|
|
12332
|
+
emit: __emit
|
|
12333
|
+
}) {
|
|
12334
|
+
const $t2 = useTranslate();
|
|
12335
|
+
const searchString = vue.ref("");
|
|
12336
|
+
const sortAttribute = vue.ref({
|
|
12337
|
+
attribute: "",
|
|
12338
|
+
name: "",
|
|
12339
|
+
ascendingName: "",
|
|
12340
|
+
ascending: false,
|
|
12341
|
+
id: 0
|
|
12342
|
+
});
|
|
12343
|
+
const sortFilterResult = vue.ref([]);
|
|
12344
|
+
const debouncedFilterResultset = logic.debounce(filterResultset, 250);
|
|
12345
|
+
let tableCallbackOnSort = () => {
|
|
12373
12346
|
};
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12347
|
+
let tableCallbackSortableColumns = () => {
|
|
12348
|
+
};
|
|
12349
|
+
const props = __props;
|
|
12350
|
+
const emit = __emit;
|
|
12351
|
+
const showClearButton = vue.computed(() => {
|
|
12352
|
+
return searchString.value.length > 0;
|
|
12353
|
+
});
|
|
12354
|
+
const sortOrders = vue.computed(() => {
|
|
12380
12355
|
const arr = [];
|
|
12381
12356
|
let id = 0;
|
|
12382
|
-
Object.keys(
|
|
12357
|
+
Object.keys(props.sortableAttributes).forEach((key) => {
|
|
12383
12358
|
arr.push({
|
|
12384
12359
|
attribute: key,
|
|
12385
|
-
name:
|
|
12386
|
-
ascendingName:
|
|
12360
|
+
name: props.sortableAttributes[key],
|
|
12361
|
+
ascendingName: $t2("fkui.sort-filter-dataset.label.ascending", "stigande"),
|
|
12387
12362
|
ascending: true,
|
|
12388
12363
|
id: id++
|
|
12389
12364
|
});
|
|
12390
12365
|
arr.push({
|
|
12391
12366
|
attribute: key,
|
|
12392
|
-
name:
|
|
12393
|
-
ascendingName:
|
|
12367
|
+
name: props.sortableAttributes[key],
|
|
12368
|
+
ascendingName: $t2("fkui.sort-filter-dataset.label.descending", "fallande"),
|
|
12394
12369
|
ascending: false,
|
|
12395
12370
|
id: id++
|
|
12396
12371
|
});
|
|
12397
12372
|
});
|
|
12398
12373
|
return arr;
|
|
12399
|
-
}
|
|
12400
|
-
filterAttributes() {
|
|
12401
|
-
return Object.keys(
|
|
12402
|
-
}
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
if (this.defaultSortAttribute !== "") {
|
|
12410
|
-
const foundAttribute = this.sortOrders.find((item) => item.attribute === this.defaultSortAttribute && item.ascending === this.defaultSortAscending);
|
|
12411
|
-
if (foundAttribute) {
|
|
12412
|
-
this.sortAttribute = foundAttribute;
|
|
12413
|
-
}
|
|
12414
|
-
}
|
|
12415
|
-
this.sortFilterData();
|
|
12416
|
-
}
|
|
12417
|
-
}
|
|
12418
|
-
},
|
|
12419
|
-
created() {
|
|
12420
|
-
this.debouncedFilterResultset = logic.debounce(this.filterResultset, 250).bind(this);
|
|
12421
|
-
},
|
|
12422
|
-
mounted() {
|
|
12423
|
-
this.tableCallbackSortableColumns(Object.keys(this.sortableAttributes));
|
|
12424
|
-
},
|
|
12425
|
-
methods: {
|
|
12426
|
-
sortFilterData() {
|
|
12427
|
-
const filteredData = filter(this.data, this.filterAttributes, this.searchString);
|
|
12428
|
-
if (this.sortAttribute.attribute === "") {
|
|
12429
|
-
this.sortFilterResult = filteredData;
|
|
12374
|
+
});
|
|
12375
|
+
const filterAttributes = vue.computed(() => {
|
|
12376
|
+
return Object.keys(props.sortableAttributes);
|
|
12377
|
+
});
|
|
12378
|
+
vue.provide("sort", (attribute, ascending) => {
|
|
12379
|
+
const foundAttribute = sortOrders.value.find((item) => {
|
|
12380
|
+
return item.attribute === attribute && item.ascending === ascending;
|
|
12381
|
+
});
|
|
12382
|
+
if (foundAttribute) {
|
|
12383
|
+
sortAttribute.value = foundAttribute;
|
|
12430
12384
|
} else {
|
|
12431
|
-
|
|
12385
|
+
sortAttribute.value = {
|
|
12386
|
+
attribute: "",
|
|
12387
|
+
ascending: false
|
|
12388
|
+
};
|
|
12432
12389
|
}
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
}
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12390
|
+
sortFilterData();
|
|
12391
|
+
emit("usedSortAttributes", sortAttribute.value);
|
|
12392
|
+
});
|
|
12393
|
+
vue.provide("registerCallbackOnSort", (callback) => {
|
|
12394
|
+
tableCallbackOnSort = callback;
|
|
12395
|
+
});
|
|
12396
|
+
vue.provide("registerCallbackOnMount", (callback) => {
|
|
12397
|
+
tableCallbackSortableColumns = callback;
|
|
12398
|
+
});
|
|
12399
|
+
vue.onMounted(() => {
|
|
12400
|
+
tableCallbackSortableColumns(Object.keys(props.sortableAttributes));
|
|
12401
|
+
});
|
|
12402
|
+
vue.watch(() => props.data, () => {
|
|
12403
|
+
if (props.defaultSortAttribute !== "") {
|
|
12404
|
+
const foundAttribute = sortOrders.value.find((item) => {
|
|
12405
|
+
return item.attribute === props.defaultSortAttribute && item.ascending === props.defaultSortAscending;
|
|
12406
|
+
});
|
|
12407
|
+
if (foundAttribute) {
|
|
12408
|
+
sortAttribute.value = foundAttribute;
|
|
12409
|
+
}
|
|
12410
|
+
}
|
|
12411
|
+
sortFilterData();
|
|
12412
|
+
}, {
|
|
12413
|
+
immediate: true,
|
|
12414
|
+
deep: true
|
|
12415
|
+
});
|
|
12416
|
+
function sortFilterData() {
|
|
12417
|
+
const filteredData = filter(props.data, filterAttributes.value, searchString.value);
|
|
12418
|
+
if (sortAttribute.value.attribute === "") {
|
|
12419
|
+
sortFilterResult.value = filteredData;
|
|
12420
|
+
} else {
|
|
12421
|
+
sortFilterResult.value = sort([...filteredData], sortAttribute.value.attribute, sortAttribute.value.ascending);
|
|
12422
|
+
}
|
|
12423
|
+
vue.nextTick(() => {
|
|
12424
|
+
tableCallbackOnSort(sortAttribute.value.attribute, sortAttribute.value.ascending);
|
|
12425
|
+
});
|
|
12426
|
+
emit("datasetSorted", sortFilterResult.value);
|
|
12427
|
+
}
|
|
12428
|
+
function onChangeSortAttribute() {
|
|
12429
|
+
sortFilterData();
|
|
12430
|
+
emit("usedSortAttributes", sortAttribute.value);
|
|
12431
|
+
}
|
|
12432
|
+
function onSearchInput(event) {
|
|
12433
|
+
searchString.value = event.target.value;
|
|
12434
|
+
debouncedFilterResultset();
|
|
12435
|
+
}
|
|
12436
|
+
function onClickClearSearch() {
|
|
12437
|
+
searchString.value = "";
|
|
12438
|
+
sortFilterData();
|
|
12439
|
+
const input = vue.useTemplateRef("search-field").value;
|
|
12450
12440
|
logic.focus(input);
|
|
12451
|
-
}
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
if (this.searchString === "") {
|
|
12457
|
-
logic.alertScreenReader(this.$t("fkui.sort-filter-dataset.aria-live.empty", "Sök redigera Sök tom"));
|
|
12441
|
+
}
|
|
12442
|
+
function filterResultset() {
|
|
12443
|
+
sortFilterData();
|
|
12444
|
+
if (searchString.value === "") {
|
|
12445
|
+
logic.alertScreenReader($t2("fkui.sort-filter-dataset.aria-live.empty", "Sök redigera Sök tom"));
|
|
12458
12446
|
} else {
|
|
12459
|
-
const searchAriaLive =
|
|
12460
|
-
result:
|
|
12461
|
-
search:
|
|
12447
|
+
const searchAriaLive = $t2("fkui.sort-filter-dataset.aria-live.search", `Din sökning på "{{ search }}" gav {{ result }} träffar.`, {
|
|
12448
|
+
result: sortFilterResult.value.length,
|
|
12449
|
+
search: searchString.value
|
|
12462
12450
|
});
|
|
12463
12451
|
logic.alertScreenReader(searchAriaLive);
|
|
12464
12452
|
}
|
|
12465
12453
|
}
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
const _hoisted_1$p = {
|
|
12469
|
-
class: "sort-filter-dataset"
|
|
12470
|
-
};
|
|
12471
|
-
const _hoisted_2$l = {
|
|
12472
|
-
class: "sort-filter-dataset__search"
|
|
12473
|
-
};
|
|
12474
|
-
const _hoisted_3$h = {
|
|
12475
|
-
class: "sr-only"
|
|
12476
|
-
};
|
|
12477
|
-
const _hoisted_4$e = ["title"];
|
|
12478
|
-
const _hoisted_5$b = {
|
|
12479
|
-
class: "sr-only"
|
|
12480
|
-
};
|
|
12481
|
-
const _hoisted_6$9 = {
|
|
12482
|
-
value: {
|
|
12483
|
-
attribute: "",
|
|
12484
|
-
ascending: false
|
|
12485
|
-
}
|
|
12486
|
-
};
|
|
12487
|
-
const _hoisted_7$8 = ["value"];
|
|
12488
|
-
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12489
|
-
const _component_i_flex_item = vue.resolveComponent("i-flex-item");
|
|
12490
|
-
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
12491
|
-
const _component_f_text_field = vue.resolveComponent("f-text-field");
|
|
12492
|
-
const _component_f_select_field = vue.resolveComponent("f-select-field");
|
|
12493
|
-
const _component_i_flex = vue.resolveComponent("i-flex");
|
|
12494
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [vue.createVNode(_component_i_flex, {
|
|
12495
|
-
collapse: "",
|
|
12496
|
-
gap: "3x",
|
|
12497
|
-
wrap: ""
|
|
12498
|
-
}, {
|
|
12499
|
-
default: vue.withCtx(() => [vue.createVNode(_component_i_flex_item, {
|
|
12500
|
-
shrink: "",
|
|
12501
|
-
align: "center"
|
|
12502
|
-
}, {
|
|
12503
|
-
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps({
|
|
12504
|
-
slotClass: "sort-filter-dataset__toolbar__header"
|
|
12505
|
-
})))]),
|
|
12506
|
-
_: 3
|
|
12507
|
-
}), _cache[9] || (_cache[9] = vue.createTextVNode()), vue.createVNode(_component_i_flex_item, {
|
|
12508
|
-
grow: ""
|
|
12509
|
-
}, {
|
|
12510
|
-
default: vue.withCtx(() => [vue.createVNode(_component_i_flex, {
|
|
12454
|
+
return (_ctx, _cache) => {
|
|
12455
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [vue.createVNode(vue.unref(IFlex), {
|
|
12511
12456
|
collapse: "",
|
|
12512
|
-
|
|
12457
|
+
gap: "3x",
|
|
12458
|
+
wrap: ""
|
|
12513
12459
|
}, {
|
|
12514
|
-
default: vue.withCtx(() => [
|
|
12515
|
-
key: 0,
|
|
12460
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(IFlexItem), {
|
|
12516
12461
|
shrink: "",
|
|
12517
12462
|
align: "center"
|
|
12518
12463
|
}, {
|
|
12519
|
-
default: vue.withCtx(() => [vue.
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
inline: "",
|
|
12526
|
-
placeholder: _ctx.placeholderFilter,
|
|
12527
|
-
maxlength: "64",
|
|
12528
|
-
onInput: _ctx.onSearchInput
|
|
12529
|
-
}, {
|
|
12530
|
-
default: vue.withCtx(() => [vue.createElementVNode("span", _hoisted_3$h, vue.toDisplayString(_ctx.placeholderFilter), 1)]),
|
|
12531
|
-
_: 1
|
|
12532
|
-
}, 8, ["modelValue", "placeholder", "onInput"]), _cache[5] || (_cache[5] = vue.createTextVNode()), _ctx.showClearButton ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
12533
|
-
key: 0,
|
|
12534
|
-
type: "button",
|
|
12535
|
-
class: "button button--discrete sort-filter-dataset__search__close-icon",
|
|
12536
|
-
title: _ctx.$t("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält"),
|
|
12537
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClickClearSearch && _ctx.onClickClearSearch(...args))
|
|
12538
|
-
}, [vue.createVNode(_component_f_icon, {
|
|
12539
|
-
name: "close"
|
|
12540
|
-
}), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_5$b, vue.toDisplayString(_ctx.$t("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält")), 1)], 8, _hoisted_4$e)) : vue.createCommentVNode("", true)])]),
|
|
12541
|
-
_: 1
|
|
12542
|
-
})) : vue.createCommentVNode("", true), _cache[8] || (_cache[8] = vue.createTextVNode()), _ctx.showSort ? (vue.openBlock(), vue.createBlock(_component_i_flex_item, {
|
|
12543
|
-
key: 1,
|
|
12544
|
-
shrink: "",
|
|
12545
|
-
align: "center"
|
|
12464
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps({
|
|
12465
|
+
slotClass: "sort-filter-dataset__toolbar__header"
|
|
12466
|
+
})))]),
|
|
12467
|
+
_: 3
|
|
12468
|
+
}), _cache[8] || (_cache[8] = vue.createTextVNode()), vue.createVNode(vue.unref(IFlexItem), {
|
|
12469
|
+
grow: ""
|
|
12546
12470
|
}, {
|
|
12547
|
-
default: vue.withCtx(() => [vue.createVNode(
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
class: "sort-filter-dataset__sort",
|
|
12551
|
-
inline: "",
|
|
12552
|
-
onChange: _ctx.onChangeSortAttribute
|
|
12471
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(IFlex), {
|
|
12472
|
+
collapse: "",
|
|
12473
|
+
float: "right"
|
|
12553
12474
|
}, {
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12475
|
+
default: vue.withCtx(() => [__props.showFilter ? (vue.openBlock(), vue.createBlock(vue.unref(IFlexItem), {
|
|
12476
|
+
key: 0,
|
|
12477
|
+
shrink: "",
|
|
12478
|
+
align: "center"
|
|
12479
|
+
}, {
|
|
12480
|
+
default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_2$l, [vue.createVNode(vue.unref(FIcon), {
|
|
12481
|
+
name: "search",
|
|
12482
|
+
class: "sort-filter-dataset__search__magnify-icon"
|
|
12483
|
+
}), _cache[3] || (_cache[3] = vue.createTextVNode()), vue.createVNode(vue.unref(FTextField), {
|
|
12484
|
+
ref: "search-field",
|
|
12485
|
+
modelValue: searchString.value,
|
|
12486
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchString.value = $event),
|
|
12487
|
+
inline: "",
|
|
12488
|
+
placeholder: __props.placeholderFilter,
|
|
12489
|
+
maxlength: "64",
|
|
12490
|
+
onInput: onSearchInput
|
|
12491
|
+
}, {
|
|
12492
|
+
default: vue.withCtx(() => [vue.createElementVNode("span", _hoisted_3$h, vue.toDisplayString(__props.placeholderFilter), 1)]),
|
|
12493
|
+
_: 1
|
|
12494
|
+
}, 8, ["modelValue", "placeholder"]), _cache[4] || (_cache[4] = vue.createTextVNode()), showClearButton.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
12495
|
+
key: 0,
|
|
12496
|
+
type: "button",
|
|
12497
|
+
class: "button button--discrete sort-filter-dataset__search__close-icon",
|
|
12498
|
+
title: vue.unref($t2)("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält"),
|
|
12499
|
+
onClick: onClickClearSearch
|
|
12500
|
+
}, [vue.createVNode(vue.unref(FIcon), {
|
|
12501
|
+
name: "close"
|
|
12502
|
+
}), _cache[2] || (_cache[2] = vue.createTextVNode()), vue.createElementVNode("span", _hoisted_5$b, vue.toDisplayString(vue.unref($t2)("fkui.sort-filter-dataset.clear.filter", "Rensa sökfält")), 1)], 8, _hoisted_4$e)) : vue.createCommentVNode("", true)])]),
|
|
12503
|
+
_: 1
|
|
12504
|
+
})) : vue.createCommentVNode("", true), _cache[7] || (_cache[7] = vue.createTextVNode()), __props.showSort ? (vue.openBlock(), vue.createBlock(vue.unref(IFlexItem), {
|
|
12505
|
+
key: 1,
|
|
12506
|
+
shrink: "",
|
|
12507
|
+
align: "center"
|
|
12508
|
+
}, {
|
|
12509
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(FSelectField), {
|
|
12510
|
+
modelValue: sortAttribute.value,
|
|
12511
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => sortAttribute.value = $event),
|
|
12512
|
+
class: "sort-filter-dataset__sort",
|
|
12513
|
+
inline: "",
|
|
12514
|
+
onChange: onChangeSortAttribute
|
|
12515
|
+
}, {
|
|
12516
|
+
label: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(vue.unref($t2)("fkui.sort-filter-dataset.label.sort", "Sortera på")), 1)]),
|
|
12517
|
+
default: vue.withCtx(() => [_cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("option", _hoisted_6$9, vue.toDisplayString(vue.unref($t2)("fkui.sort-filter-dataset.label.unsorted", "Välj")), 1), _cache[6] || (_cache[6] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sortOrders.value, (sortOrder) => {
|
|
12518
|
+
return vue.openBlock(), vue.createElementBlock("option", {
|
|
12519
|
+
key: sortOrder.id,
|
|
12520
|
+
value: sortOrder
|
|
12521
|
+
}, vue.toDisplayString(sortOrder.name) + " (" + vue.toDisplayString(sortOrder.ascendingName) + ")\n ", 9, _hoisted_7$8);
|
|
12522
|
+
}), 128))]),
|
|
12523
|
+
_: 1
|
|
12524
|
+
}, 8, ["modelValue"])]),
|
|
12525
|
+
_: 1
|
|
12526
|
+
})) : vue.createCommentVNode("", true)]),
|
|
12561
12527
|
_: 1
|
|
12562
|
-
}
|
|
12528
|
+
})]),
|
|
12563
12529
|
_: 1
|
|
12564
|
-
})
|
|
12565
|
-
_:
|
|
12566
|
-
})]),
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
_: 3
|
|
12570
|
-
}), _cache[10] || (_cache[10] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
|
|
12571
|
-
sortFilterResult: _ctx.sortFilterResult
|
|
12572
|
-
})))]);
|
|
12573
|
-
}
|
|
12574
|
-
const FSortFilterDataset = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$n]]);
|
|
12575
|
-
const _sfc_main$o = vue.defineComponent({
|
|
12576
|
-
name: "FDataTable",
|
|
12577
|
-
components: {
|
|
12578
|
-
FIcon
|
|
12579
|
-
},
|
|
12580
|
-
mixins: [TranslationMixin],
|
|
12581
|
-
provide() {
|
|
12582
|
-
return {
|
|
12583
|
-
addColumn: (column) => {
|
|
12584
|
-
if (column.type === FTableColumnType.ACTION) {
|
|
12585
|
-
throw new Error("Cannot use action column in FDataTable component");
|
|
12586
|
-
}
|
|
12587
|
-
this.columns = addColumn(this.columns, column);
|
|
12588
|
-
},
|
|
12589
|
-
setVisibilityColumn: (id, visible) => {
|
|
12590
|
-
setVisibilityColumn(this.columns, id, visible);
|
|
12591
|
-
},
|
|
12592
|
-
textFieldTableMode: true
|
|
12530
|
+
})]),
|
|
12531
|
+
_: 3
|
|
12532
|
+
}), _cache[9] || (_cache[9] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
|
|
12533
|
+
sortFilterResult: sortFilterResult.value
|
|
12534
|
+
})))]);
|
|
12593
12535
|
};
|
|
12536
|
+
}
|
|
12537
|
+
});
|
|
12538
|
+
const _hoisted_1$o = ["tabindex"];
|
|
12539
|
+
const _hoisted_2$k = {
|
|
12540
|
+
key: 0
|
|
12541
|
+
};
|
|
12542
|
+
const _hoisted_3$g = {
|
|
12543
|
+
class: "table__row"
|
|
12544
|
+
};
|
|
12545
|
+
const _hoisted_4$d = ["innerHTML"];
|
|
12546
|
+
const _hoisted_5$a = {
|
|
12547
|
+
key: 1,
|
|
12548
|
+
class: "table__column__description"
|
|
12549
|
+
};
|
|
12550
|
+
const _hoisted_6$8 = {
|
|
12551
|
+
key: 0
|
|
12552
|
+
};
|
|
12553
|
+
const _hoisted_7$7 = {
|
|
12554
|
+
key: 1
|
|
12555
|
+
};
|
|
12556
|
+
const _hoisted_8$5 = ["colspan"];
|
|
12557
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
12558
|
+
...{
|
|
12559
|
+
inheritAttrs: false
|
|
12594
12560
|
},
|
|
12595
|
-
|
|
12561
|
+
__name: "FDataTable",
|
|
12596
12562
|
props: {
|
|
12597
12563
|
/**
|
|
12598
12564
|
* The rows to be listed.
|
|
@@ -12635,67 +12601,80 @@ const _sfc_main$o = vue.defineComponent({
|
|
|
12635
12601
|
}
|
|
12636
12602
|
}
|
|
12637
12603
|
},
|
|
12638
|
-
setup(
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12604
|
+
setup(__props) {
|
|
12605
|
+
const $t2 = useTranslate();
|
|
12606
|
+
const {
|
|
12607
|
+
hasSlot: hasSlot2
|
|
12608
|
+
} = useSlotUtils();
|
|
12609
|
+
const {
|
|
12610
|
+
sort: sort2,
|
|
12611
|
+
registerCallbackOnSort,
|
|
12612
|
+
registerCallbackOnMount
|
|
12613
|
+
} = FSortFilterDatasetInjected();
|
|
12614
|
+
const columns = vue.ref([]);
|
|
12615
|
+
const props = __props;
|
|
12616
|
+
const hasCaption = vue.computed(() => {
|
|
12617
|
+
return hasSlot2("caption", {}, {
|
|
12650
12618
|
stripClasses: []
|
|
12651
12619
|
});
|
|
12652
|
-
}
|
|
12653
|
-
tableClasses() {
|
|
12620
|
+
});
|
|
12621
|
+
const tableClasses = vue.computed(() => {
|
|
12654
12622
|
const classes = [];
|
|
12655
|
-
if (
|
|
12623
|
+
if (props.striped) {
|
|
12656
12624
|
classes.push("table--striped");
|
|
12657
12625
|
}
|
|
12658
12626
|
return classes;
|
|
12659
|
-
}
|
|
12660
|
-
isEmpty() {
|
|
12661
|
-
return
|
|
12662
|
-
}
|
|
12663
|
-
visibleColumns() {
|
|
12664
|
-
return
|
|
12665
|
-
}
|
|
12666
|
-
wrapperClasses() {
|
|
12667
|
-
return tableScrollClasses(
|
|
12668
|
-
}
|
|
12669
|
-
tabindex() {
|
|
12670
|
-
return
|
|
12671
|
-
}
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12627
|
+
});
|
|
12628
|
+
const isEmpty = vue.computed(() => {
|
|
12629
|
+
return props.rows.length === 0;
|
|
12630
|
+
});
|
|
12631
|
+
const visibleColumns = vue.computed(() => {
|
|
12632
|
+
return columns.value.filter((col) => col.visible);
|
|
12633
|
+
});
|
|
12634
|
+
const wrapperClasses = vue.computed(() => {
|
|
12635
|
+
return tableScrollClasses(props.scroll);
|
|
12636
|
+
});
|
|
12637
|
+
const tabindex = vue.computed(() => {
|
|
12638
|
+
return props.scroll !== TableScroll.NONE ? 0 : void 0;
|
|
12639
|
+
});
|
|
12640
|
+
vue.provide("addColumn", (column) => {
|
|
12641
|
+
if (column.type === FTableColumnType.ACTION) {
|
|
12642
|
+
throw new Error("Cannot use action column in FDataTable component");
|
|
12643
|
+
}
|
|
12644
|
+
columns.value = addColumn(columns.value, column);
|
|
12645
|
+
});
|
|
12646
|
+
vue.provide("setVisibilityColumn", (id, visible) => {
|
|
12647
|
+
setVisibilityColumn(columns.value, id, visible);
|
|
12648
|
+
});
|
|
12649
|
+
vue.provide("textFieldTableMode", true);
|
|
12650
|
+
vue.provide("renderColumns", vue.computed(() => {
|
|
12651
|
+
return props.rows.length > 0;
|
|
12652
|
+
}));
|
|
12653
|
+
vue.onMounted(() => {
|
|
12654
|
+
registerCallbackOnSort(callbackOnSort);
|
|
12655
|
+
registerCallbackOnMount(callbackSortableColumns);
|
|
12656
|
+
});
|
|
12657
|
+
function rowKey(item) {
|
|
12658
|
+
const key = item[props.keyAttribute];
|
|
12680
12659
|
if (typeof key === "undefined") {
|
|
12681
|
-
throw new Error(`Key attribute [${
|
|
12660
|
+
throw new Error(`Key attribute [${props.keyAttribute}]' is missing in row`);
|
|
12682
12661
|
}
|
|
12683
12662
|
return String(key);
|
|
12684
|
-
}
|
|
12685
|
-
columnClasses(column) {
|
|
12663
|
+
}
|
|
12664
|
+
function columnClasses(column) {
|
|
12686
12665
|
const classes = ["table__column", `table__column--${column.type}`, column.size];
|
|
12687
12666
|
if (column.sortable) {
|
|
12688
12667
|
classes.push("table__column--sortable");
|
|
12689
12668
|
}
|
|
12690
12669
|
return classes;
|
|
12691
|
-
}
|
|
12692
|
-
|
|
12670
|
+
}
|
|
12671
|
+
function iconClasses2(column) {
|
|
12693
12672
|
return getSortableIconClasses(column);
|
|
12694
|
-
}
|
|
12695
|
-
iconName(column) {
|
|
12673
|
+
}
|
|
12674
|
+
function iconName(column) {
|
|
12696
12675
|
return getSortableIconName(column);
|
|
12697
|
-
}
|
|
12698
|
-
onClickColumnHeader(column) {
|
|
12676
|
+
}
|
|
12677
|
+
function onClickColumnHeader(column) {
|
|
12699
12678
|
if (!column.sortable) {
|
|
12700
12679
|
return;
|
|
12701
12680
|
}
|
|
@@ -12704,81 +12683,60 @@ const _sfc_main$o = vue.defineComponent({
|
|
|
12704
12683
|
columnName = "";
|
|
12705
12684
|
column.sort = FTableColumnSort.UNSORTED;
|
|
12706
12685
|
}
|
|
12707
|
-
|
|
12708
|
-
}
|
|
12709
|
-
callbackOnSort(columnName, ascending) {
|
|
12710
|
-
updateSortOrder(
|
|
12711
|
-
}
|
|
12712
|
-
callbackSortableColumns(columnNames) {
|
|
12713
|
-
setSortableColumns(
|
|
12714
|
-
}
|
|
12715
|
-
escapeNewlines(value) {
|
|
12686
|
+
sort2(columnName, column.sort !== FTableColumnSort.ASCENDING);
|
|
12687
|
+
}
|
|
12688
|
+
function callbackOnSort(columnName, ascending) {
|
|
12689
|
+
updateSortOrder(columns.value, columnName, ascending);
|
|
12690
|
+
}
|
|
12691
|
+
function callbackSortableColumns(columnNames) {
|
|
12692
|
+
setSortableColumns(columns.value, columnNames);
|
|
12693
|
+
}
|
|
12694
|
+
function escapeNewlines(value) {
|
|
12716
12695
|
return value.replace(/\n/g, "<br/>");
|
|
12717
12696
|
}
|
|
12697
|
+
return (_ctx, _cache) => {
|
|
12698
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
12699
|
+
class: vue.normalizeClass(wrapperClasses.value)
|
|
12700
|
+
}, [vue.createElementVNode("table", vue.mergeProps({
|
|
12701
|
+
class: ["table", tableClasses.value],
|
|
12702
|
+
tabindex: tabindex.value
|
|
12703
|
+
}, _ctx.$attrs), [hasCaption.value ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$k, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createElementVNode("colgroup", null, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(columns.value, (column) => {
|
|
12704
|
+
return vue.openBlock(), vue.createElementBlock("col", {
|
|
12705
|
+
key: column.id,
|
|
12706
|
+
class: vue.normalizeClass(column.size)
|
|
12707
|
+
}, null, 2);
|
|
12708
|
+
}), 128))]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_3$g, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visibleColumns.value, (column) => {
|
|
12709
|
+
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
|
|
12710
|
+
key: column.id,
|
|
12711
|
+
scope: "col",
|
|
12712
|
+
class: columnClasses(column)
|
|
12713
|
+
}, vue.toHandlers(column.sortable ? {
|
|
12714
|
+
click: () => onClickColumnHeader(column)
|
|
12715
|
+
} : {}, true)), [vue.createElementVNode("span", {
|
|
12716
|
+
innerHTML: escapeNewlines(column.title)
|
|
12717
|
+
}, null, 8, _hoisted_4$d), _cache[0] || (_cache[0] = vue.createTextVNode()), column.sortable ? (vue.openBlock(), vue.createBlock(vue.unref(FIcon), {
|
|
12718
|
+
key: 0,
|
|
12719
|
+
class: vue.normalizeClass(iconClasses2(column)),
|
|
12720
|
+
name: iconName(column)
|
|
12721
|
+
}, null, 8, ["class", "name"])) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), column.description ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$a, vue.toDisplayString(column.description), 1)) : vue.createCommentVNode("", true)], 16);
|
|
12722
|
+
}), 128))])]), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [isEmpty.value && columns.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_6$8, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
|
|
12723
|
+
row: {}
|
|
12724
|
+
})))])) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_7$7, [vue.createElementVNode("td", {
|
|
12725
|
+
class: "table__column table__column--action",
|
|
12726
|
+
colspan: columns.value.length
|
|
12727
|
+
}, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(vue.unref($t2)("fkui.data-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_8$5)])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.rows, (row) => {
|
|
12728
|
+
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
12729
|
+
key: rowKey(row),
|
|
12730
|
+
class: "table__row"
|
|
12731
|
+
}, [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
12732
|
+
ref_for: true
|
|
12733
|
+
}, {
|
|
12734
|
+
row
|
|
12735
|
+
}))]);
|
|
12736
|
+
}), 128))])], 16, _hoisted_1$o)], 2);
|
|
12737
|
+
};
|
|
12718
12738
|
}
|
|
12719
12739
|
});
|
|
12720
|
-
const _hoisted_1$o = ["tabindex"];
|
|
12721
|
-
const _hoisted_2$k = {
|
|
12722
|
-
key: 0
|
|
12723
|
-
};
|
|
12724
|
-
const _hoisted_3$g = {
|
|
12725
|
-
class: "table__row"
|
|
12726
|
-
};
|
|
12727
|
-
const _hoisted_4$d = ["innerHTML"];
|
|
12728
|
-
const _hoisted_5$a = {
|
|
12729
|
-
key: 1,
|
|
12730
|
-
class: "table__column__description"
|
|
12731
|
-
};
|
|
12732
|
-
const _hoisted_6$8 = {
|
|
12733
|
-
key: 0
|
|
12734
|
-
};
|
|
12735
|
-
const _hoisted_7$7 = {
|
|
12736
|
-
key: 1
|
|
12737
|
-
};
|
|
12738
|
-
const _hoisted_8$5 = ["colspan"];
|
|
12739
|
-
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12740
|
-
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
12741
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
12742
|
-
class: vue.normalizeClass(_ctx.wrapperClasses)
|
|
12743
|
-
}, [vue.createElementVNode("table", vue.mergeProps({
|
|
12744
|
-
class: ["table", _ctx.tableClasses],
|
|
12745
|
-
tabindex: _ctx.tabindex
|
|
12746
|
-
}, _ctx.$attrs), [_ctx.hasCaption ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_2$k, [vue.renderSlot(_ctx.$slots, "caption")])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), vue.createElementVNode("colgroup", null, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (column) => {
|
|
12747
|
-
return vue.openBlock(), vue.createElementBlock("col", {
|
|
12748
|
-
key: column.id,
|
|
12749
|
-
class: vue.normalizeClass(column.size)
|
|
12750
|
-
}, null, 2);
|
|
12751
|
-
}), 128))]), _cache[5] || (_cache[5] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_3$g, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.visibleColumns, (column) => {
|
|
12752
|
-
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
|
|
12753
|
-
key: column.id,
|
|
12754
|
-
scope: "col",
|
|
12755
|
-
class: _ctx.columnClasses(column)
|
|
12756
|
-
}, vue.toHandlers(column.sortable ? {
|
|
12757
|
-
click: () => _ctx.onClickColumnHeader(column)
|
|
12758
|
-
} : {}, true)), [vue.createElementVNode("span", {
|
|
12759
|
-
innerHTML: _ctx.escapeNewlines(column.title)
|
|
12760
|
-
}, null, 8, _hoisted_4$d), _cache[0] || (_cache[0] = vue.createTextVNode()), column.sortable ? (vue.openBlock(), vue.createBlock(_component_f_icon, {
|
|
12761
|
-
key: 0,
|
|
12762
|
-
class: vue.normalizeClass(_ctx.iconClasses(column)),
|
|
12763
|
-
name: _ctx.iconName(column)
|
|
12764
|
-
}, null, 8, ["class", "name"])) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), column.description ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$a, vue.toDisplayString(column.description), 1)) : vue.createCommentVNode("", true)], 16);
|
|
12765
|
-
}), 128))])]), _cache[6] || (_cache[6] = vue.createTextVNode()), vue.createElementVNode("tbody", null, [_ctx.isEmpty && _ctx.columns.length === 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_6$8, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
|
|
12766
|
-
row: {}
|
|
12767
|
-
})))])) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_7$7, [vue.createElementVNode("td", {
|
|
12768
|
-
class: "table__column table__column--action",
|
|
12769
|
-
colspan: _ctx.columns.length
|
|
12770
|
-
}, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(_ctx.$t("fkui.data-table.empty", "Tabellen är tom")), 1)])], 8, _hoisted_8$5)])) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.rows, (row) => {
|
|
12771
|
-
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
12772
|
-
key: _ctx.rowKey(row),
|
|
12773
|
-
class: "table__row"
|
|
12774
|
-
}, [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
12775
|
-
ref_for: true
|
|
12776
|
-
}, {
|
|
12777
|
-
row
|
|
12778
|
-
}))]);
|
|
12779
|
-
}), 128))])], 16, _hoisted_1$o)], 2);
|
|
12780
|
-
}
|
|
12781
|
-
const FDataTable = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$m]]);
|
|
12782
12740
|
function isDayEnabled(day, config2) {
|
|
12783
12741
|
return passesMinDate(day, config2.minDate) && passesMaxDate(day, config2.maxDate) && passesInvalidDates(day, config2.invalidDates) && passesInvalidWeekdays(day, config2.invalidWeekdays);
|
|
12784
12742
|
}
|
|
@@ -13123,7 +13081,7 @@ const _hoisted_3$f = {
|
|
|
13123
13081
|
const _hoisted_4$c = {
|
|
13124
13082
|
class: "datepicker-field__close"
|
|
13125
13083
|
};
|
|
13126
|
-
function _sfc_render$
|
|
13084
|
+
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13127
13085
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
13128
13086
|
const _component_f_text_field = vue.resolveComponent("f-text-field");
|
|
13129
13087
|
const _component_f_calendar_day = vue.resolveComponent("f-calendar-day");
|
|
@@ -13193,7 +13151,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13193
13151
|
"min-date": _ctx.minDate,
|
|
13194
13152
|
"max-date": _ctx.maxDate,
|
|
13195
13153
|
onClick: _ctx.onSelectCalendarDay,
|
|
13196
|
-
onKeyup: vue.withKeys(vue.withModifiers(_ctx.onKeyupEsc, ["stop"]), ["esc"
|
|
13154
|
+
onKeyup: vue.withKeys(vue.withModifiers(_ctx.onKeyupEsc, ["stop"]), ["esc"])
|
|
13197
13155
|
}, {
|
|
13198
13156
|
default: vue.withCtx(({
|
|
13199
13157
|
date: date2,
|
|
@@ -13219,7 +13177,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13219
13177
|
_: 1
|
|
13220
13178
|
}, 8, ["is-open", "anchor", "inline", "onOpen", "onClose"])], 512);
|
|
13221
13179
|
}
|
|
13222
|
-
const FDatepickerField = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$
|
|
13180
|
+
const FDatepickerField = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$j]]);
|
|
13223
13181
|
function isDialogueTreeEndQuestion(value) {
|
|
13224
13182
|
return Boolean(value.userData);
|
|
13225
13183
|
}
|
|
@@ -13309,7 +13267,7 @@ const _hoisted_2$i = {
|
|
|
13309
13267
|
class: "dialogue-tree__list"
|
|
13310
13268
|
};
|
|
13311
13269
|
const _hoisted_3$e = ["onClick"];
|
|
13312
|
-
function _sfc_render$
|
|
13270
|
+
function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13313
13271
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
13314
13272
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [_ctx.options.length > 0 ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_2$i, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option, index) => {
|
|
13315
13273
|
return vue.openBlock(), vue.createElementBlock("li", {
|
|
@@ -13329,7 +13287,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13329
13287
|
userData: _ctx.userData
|
|
13330
13288
|
})))]);
|
|
13331
13289
|
}
|
|
13332
|
-
const FDialogueTree = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$
|
|
13290
|
+
const FDialogueTree = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$i]]);
|
|
13333
13291
|
const _sfc_main$l = vue.defineComponent({
|
|
13334
13292
|
name: "FExpandablePanel",
|
|
13335
13293
|
components: {
|
|
@@ -13423,7 +13381,7 @@ const _hoisted_8$4 = {
|
|
|
13423
13381
|
key: 0,
|
|
13424
13382
|
class: "expandable-panel__outside"
|
|
13425
13383
|
};
|
|
13426
|
-
function _sfc_render$
|
|
13384
|
+
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13427
13385
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
13428
13386
|
const _component_f_expand = vue.resolveComponent("f-expand");
|
|
13429
13387
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -13460,7 +13418,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13460
13418
|
_: 3
|
|
13461
13419
|
})], 2);
|
|
13462
13420
|
}
|
|
13463
|
-
const FExpandablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$
|
|
13421
|
+
const FExpandablePanel = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$h]]);
|
|
13464
13422
|
const _sfc_main$k = vue.defineComponent({
|
|
13465
13423
|
name: "FExpandableParagraph",
|
|
13466
13424
|
components: {
|
|
@@ -13562,7 +13520,7 @@ const _hoisted_7$5 = {
|
|
|
13562
13520
|
key: 0,
|
|
13563
13521
|
class: "expandable-paragraph__separator"
|
|
13564
13522
|
};
|
|
13565
|
-
function _sfc_render$
|
|
13523
|
+
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13566
13524
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
13567
13525
|
const _component_f_expand = vue.resolveComponent("f-expand");
|
|
13568
13526
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -13593,7 +13551,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13593
13551
|
_: 3
|
|
13594
13552
|
})], 2);
|
|
13595
13553
|
}
|
|
13596
|
-
const FExpandableParagraph = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$
|
|
13554
|
+
const FExpandableParagraph = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$g]]);
|
|
13597
13555
|
const DEFAULT_ICON = "file";
|
|
13598
13556
|
const iconMap = {
|
|
13599
13557
|
"image/*": "pic",
|
|
@@ -13701,7 +13659,7 @@ const _hoisted_7$4 = {
|
|
|
13701
13659
|
key: 0,
|
|
13702
13660
|
class: "file-item__change-info"
|
|
13703
13661
|
};
|
|
13704
|
-
function _sfc_render$
|
|
13662
|
+
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13705
13663
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
13706
13664
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [vue.createElementVNode("div", _hoisted_2$f, [vue.createElementVNode("a", vue.mergeProps({
|
|
13707
13665
|
id: _ctx.id,
|
|
@@ -13714,7 +13672,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13714
13672
|
class: "file-item__separator"
|
|
13715
13673
|
}, null, -1))]);
|
|
13716
13674
|
}
|
|
13717
|
-
const FFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$
|
|
13675
|
+
const FFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$f]]);
|
|
13718
13676
|
const _sfc_main$i = vue.defineComponent({
|
|
13719
13677
|
name: "FFileSelector",
|
|
13720
13678
|
components: {
|
|
@@ -13781,7 +13739,7 @@ const _hoisted_1$i = {
|
|
|
13781
13739
|
};
|
|
13782
13740
|
const _hoisted_2$e = ["id", "aria-labelledby", "aria-disabled"];
|
|
13783
13741
|
const _hoisted_3$a = ["id", "for"];
|
|
13784
|
-
function _sfc_render$
|
|
13742
|
+
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13785
13743
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
13786
13744
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [vue.createElementVNode("input", vue.mergeProps({
|
|
13787
13745
|
id: _ctx.id,
|
|
@@ -13802,32 +13760,41 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13802
13760
|
name: "paper-clip"
|
|
13803
13761
|
}), _cache[1] || (_cache[1] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default")], 10, _hoisted_3$a)]);
|
|
13804
13762
|
}
|
|
13805
|
-
const FFileSelector = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$
|
|
13806
|
-
const keybindings =
|
|
13807
|
-
|
|
13763
|
+
const FFileSelector = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$e]]);
|
|
13764
|
+
const keybindings = {
|
|
13765
|
+
Up: focusTrAbove,
|
|
13766
|
+
Down: focusTrBelow,
|
|
13767
|
+
ArrowUp: focusTrAbove,
|
|
13768
|
+
ArrowDown: focusTrBelow,
|
|
13769
|
+
" ": activateRow,
|
|
13770
|
+
Spacebar: activateRow
|
|
13771
|
+
};
|
|
13772
|
+
function focusTrAbove(table, current) {
|
|
13773
|
+
const tr = table.tr.value;
|
|
13808
13774
|
if (current > 0) {
|
|
13809
|
-
|
|
13775
|
+
tr[current - 1].focus();
|
|
13810
13776
|
} else {
|
|
13811
|
-
|
|
13777
|
+
tr[tr.length - 1].focus();
|
|
13812
13778
|
}
|
|
13813
13779
|
}
|
|
13814
|
-
function focusTrBelow(current) {
|
|
13815
|
-
|
|
13816
|
-
|
|
13780
|
+
function focusTrBelow(table, current) {
|
|
13781
|
+
const tr = table.tr.value;
|
|
13782
|
+
if (current < tr.length - 1) {
|
|
13783
|
+
tr[current + 1].focus();
|
|
13817
13784
|
} else {
|
|
13818
|
-
|
|
13785
|
+
tr[0].focus();
|
|
13819
13786
|
}
|
|
13820
13787
|
}
|
|
13821
|
-
function activateRow(current) {
|
|
13822
|
-
const row =
|
|
13823
|
-
const element =
|
|
13824
|
-
|
|
13788
|
+
function activateRow(table, current) {
|
|
13789
|
+
const row = table.rows[current];
|
|
13790
|
+
const element = table.tr.value[current];
|
|
13791
|
+
table.activate(row, element);
|
|
13825
13792
|
}
|
|
13826
|
-
function onKeydown(event, current) {
|
|
13793
|
+
function onKeydown(table, event, current) {
|
|
13827
13794
|
const fn2 = keybindings[event.key];
|
|
13828
13795
|
if (fn2) {
|
|
13829
13796
|
event.preventDefault();
|
|
13830
|
-
fn2
|
|
13797
|
+
fn2(table, current);
|
|
13831
13798
|
}
|
|
13832
13799
|
}
|
|
13833
13800
|
function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit, slots) {
|
|
@@ -13891,7 +13858,6 @@ function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit
|
|
|
13891
13858
|
return Boolean(expandableRows(row));
|
|
13892
13859
|
}
|
|
13893
13860
|
return {
|
|
13894
|
-
expandedRows,
|
|
13895
13861
|
isExpandableTable,
|
|
13896
13862
|
hasExpandableSlot,
|
|
13897
13863
|
toggleExpanded,
|
|
@@ -13903,73 +13869,117 @@ function useExpandableTable(expandableAttribute, keyAttribute, describedby, emit
|
|
|
13903
13869
|
hasExpandableContent
|
|
13904
13870
|
};
|
|
13905
13871
|
}
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13919
|
-
|
|
13920
|
-
|
|
13921
|
-
|
|
13922
|
-
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
|
|
13944
|
-
|
|
13945
|
-
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
13949
|
-
|
|
13950
|
-
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
|
|
13954
|
-
|
|
13955
|
-
|
|
13956
|
-
|
|
13957
|
-
|
|
13958
|
-
|
|
13959
|
-
|
|
13960
|
-
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
|
|
13872
|
+
const _hoisted_1$h = ["role"];
|
|
13873
|
+
const _hoisted_2$d = {
|
|
13874
|
+
key: 0
|
|
13875
|
+
};
|
|
13876
|
+
const _hoisted_3$9 = {
|
|
13877
|
+
key: 0,
|
|
13878
|
+
class: "table__column--shrink"
|
|
13879
|
+
};
|
|
13880
|
+
const _hoisted_4$8 = {
|
|
13881
|
+
key: 1,
|
|
13882
|
+
class: "table__column--shrink"
|
|
13883
|
+
};
|
|
13884
|
+
const _hoisted_5$6 = {
|
|
13885
|
+
class: "table__row"
|
|
13886
|
+
};
|
|
13887
|
+
const _hoisted_6$4 = {
|
|
13888
|
+
key: 0,
|
|
13889
|
+
scope: "col"
|
|
13890
|
+
};
|
|
13891
|
+
const _hoisted_7$3 = {
|
|
13892
|
+
class: "sr-only"
|
|
13893
|
+
};
|
|
13894
|
+
const _hoisted_8$3 = {
|
|
13895
|
+
key: 1,
|
|
13896
|
+
scope: "col"
|
|
13897
|
+
};
|
|
13898
|
+
const _hoisted_9$3 = {
|
|
13899
|
+
class: "sr-only"
|
|
13900
|
+
};
|
|
13901
|
+
const _hoisted_10$2 = ["innerHTML"];
|
|
13902
|
+
const _hoisted_11$1 = {
|
|
13903
|
+
key: 1,
|
|
13904
|
+
class: "table__column__description"
|
|
13905
|
+
};
|
|
13906
|
+
const _hoisted_12$1 = ["aria-label", "aria-expanded", "aria-level", "aria-describedby", "onKeydown", "onClick"];
|
|
13907
|
+
const _hoisted_13 = {
|
|
13908
|
+
key: 0
|
|
13909
|
+
};
|
|
13910
|
+
const _hoisted_14 = {
|
|
13911
|
+
key: 0,
|
|
13912
|
+
class: "table__expand-icon"
|
|
13913
|
+
};
|
|
13914
|
+
const _hoisted_15 = {
|
|
13915
|
+
key: 1,
|
|
13916
|
+
class: "table__column--selectable"
|
|
13917
|
+
};
|
|
13918
|
+
const _hoisted_16 = {
|
|
13919
|
+
class: "table__input"
|
|
13920
|
+
};
|
|
13921
|
+
const _hoisted_17 = {
|
|
13922
|
+
key: 0,
|
|
13923
|
+
class: "sr-only"
|
|
13924
|
+
};
|
|
13925
|
+
const _hoisted_18 = {
|
|
13926
|
+
key: 0,
|
|
13927
|
+
class: "table__column--placeholder"
|
|
13928
|
+
};
|
|
13929
|
+
const _hoisted_19 = ["colspan"];
|
|
13930
|
+
const _hoisted_20 = {
|
|
13931
|
+
key: 0
|
|
13932
|
+
};
|
|
13933
|
+
const _hoisted_21 = {
|
|
13934
|
+
key: 1
|
|
13935
|
+
};
|
|
13936
|
+
const _hoisted_22 = ["colspan"];
|
|
13937
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
13938
|
+
...{
|
|
13939
|
+
inheritAttrs: false
|
|
13940
|
+
},
|
|
13941
|
+
__name: "FInteractiveTable",
|
|
13942
|
+
props: {
|
|
13943
|
+
/**
|
|
13944
|
+
* The rows to be listed.
|
|
13945
|
+
* The rows will be listed in the given array order.
|
|
13946
|
+
*/
|
|
13947
|
+
rows: {
|
|
13948
|
+
type: Array,
|
|
13949
|
+
required: true
|
|
13950
|
+
},
|
|
13951
|
+
/**
|
|
13952
|
+
* If `true` hovering over a row will be highlighted
|
|
13953
|
+
*/
|
|
13954
|
+
hover: {
|
|
13955
|
+
type: Boolean,
|
|
13956
|
+
default: false
|
|
13957
|
+
},
|
|
13958
|
+
/**
|
|
13959
|
+
* Unique attribute in rows.
|
|
13960
|
+
*/
|
|
13961
|
+
keyAttribute: {
|
|
13962
|
+
type: String,
|
|
13963
|
+
required: true
|
|
13964
|
+
},
|
|
13965
|
+
/**
|
|
13966
|
+
* Attribute of expandable content in rows.
|
|
13967
|
+
* If provided, the table can contain expandable rows.
|
|
13968
|
+
*/
|
|
13969
|
+
expandableAttribute: {
|
|
13970
|
+
type: String,
|
|
13971
|
+
default: ""
|
|
13972
|
+
},
|
|
13973
|
+
/**
|
|
13974
|
+
* Element id for aria-describedby on expandable rows to describe expanded content.
|
|
13975
|
+
*/
|
|
13976
|
+
expandableDescribedby: {
|
|
13977
|
+
type: String,
|
|
13978
|
+
default: ""
|
|
13979
|
+
},
|
|
13980
|
+
/**
|
|
13981
|
+
* If `true` the table rows will be selectable.
|
|
13982
|
+
* @see 'select' and 'unselect' events.
|
|
13973
13983
|
*/
|
|
13974
13984
|
selectable: {
|
|
13975
13985
|
type: Boolean,
|
|
@@ -14025,230 +14035,237 @@ const _sfc_main$h = vue.defineComponent({
|
|
|
14025
14035
|
default: () => void 0
|
|
14026
14036
|
}
|
|
14027
14037
|
},
|
|
14028
|
-
emits: [
|
|
14029
|
-
|
|
14030
|
-
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
|
|
14035
|
-
|
|
14036
|
-
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14042
|
-
|
|
14043
|
-
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
const
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
selectedRows: [],
|
|
14068
|
-
tr: [],
|
|
14069
|
-
tbodyKey: 0
|
|
14070
|
-
};
|
|
14071
|
-
},
|
|
14072
|
-
computed: {
|
|
14073
|
-
hasCaption() {
|
|
14074
|
-
return hasSlot(this, "caption", {}, {
|
|
14038
|
+
emits: ["change", "click", "unselect", "update:modelValue", "update:active", "select", "expand", "collapse"],
|
|
14039
|
+
setup(__props, {
|
|
14040
|
+
emit: __emit
|
|
14041
|
+
}) {
|
|
14042
|
+
const $t2 = useTranslate();
|
|
14043
|
+
const slots = vue.useSlots();
|
|
14044
|
+
const {
|
|
14045
|
+
hasSlot: hasSlot2
|
|
14046
|
+
} = useSlotUtils();
|
|
14047
|
+
const {
|
|
14048
|
+
sort: sort2,
|
|
14049
|
+
registerCallbackOnSort,
|
|
14050
|
+
registerCallbackOnMount
|
|
14051
|
+
} = FSortFilterDatasetInjected();
|
|
14052
|
+
const {
|
|
14053
|
+
registerCallbackAfterItemAdd,
|
|
14054
|
+
registerCallbackBeforeItemDelete
|
|
14055
|
+
} = ActivateItemInjected();
|
|
14056
|
+
const activeRow = vue.ref(void 0);
|
|
14057
|
+
const columns = vue.ref([]);
|
|
14058
|
+
const selectedRows = vue.ref([]);
|
|
14059
|
+
const tr = vue.shallowRef([]);
|
|
14060
|
+
const tbodyKey = vue.ref(0);
|
|
14061
|
+
const props = __props;
|
|
14062
|
+
const emit = __emit;
|
|
14063
|
+
const expandableTable = useExpandableTable(props.expandableAttribute, props.keyAttribute, props.expandableDescribedby, emit, slots);
|
|
14064
|
+
const {
|
|
14065
|
+
isExpandableTable,
|
|
14066
|
+
hasExpandableSlot,
|
|
14067
|
+
toggleExpanded,
|
|
14068
|
+
isExpanded,
|
|
14069
|
+
rowAriaExpanded,
|
|
14070
|
+
expandableRowClasses,
|
|
14071
|
+
getExpandableDescribedby,
|
|
14072
|
+
expandableRows,
|
|
14073
|
+
hasExpandableContent
|
|
14074
|
+
} = expandableTable;
|
|
14075
|
+
const hasCaption = vue.computed(() => {
|
|
14076
|
+
return hasSlot2("caption", {}, {
|
|
14075
14077
|
stripClasses: []
|
|
14076
14078
|
});
|
|
14077
|
-
}
|
|
14078
|
-
hasCheckboxDescription() {
|
|
14079
|
-
const firstRow =
|
|
14080
|
-
return
|
|
14079
|
+
});
|
|
14080
|
+
const hasCheckboxDescription = vue.computed(() => {
|
|
14081
|
+
const firstRow = props.rows[0];
|
|
14082
|
+
return hasSlot2("checkbox-description", {
|
|
14081
14083
|
row: firstRow
|
|
14082
14084
|
});
|
|
14083
|
-
}
|
|
14084
|
-
isEmpty() {
|
|
14085
|
-
return
|
|
14086
|
-
}
|
|
14087
|
-
visibleColumns() {
|
|
14088
|
-
return
|
|
14089
|
-
}
|
|
14090
|
-
tableClasses() {
|
|
14085
|
+
});
|
|
14086
|
+
const isEmpty = vue.computed(() => {
|
|
14087
|
+
return props.rows.length === 0;
|
|
14088
|
+
});
|
|
14089
|
+
const visibleColumns = vue.computed(() => {
|
|
14090
|
+
return columns.value.filter((col) => col.visible);
|
|
14091
|
+
});
|
|
14092
|
+
const tableClasses = vue.computed(() => {
|
|
14091
14093
|
const classes = [];
|
|
14092
|
-
if (
|
|
14094
|
+
if (props.selectable) {
|
|
14093
14095
|
classes.push("table--selectable");
|
|
14094
14096
|
}
|
|
14095
|
-
if (
|
|
14097
|
+
if (props.hover) {
|
|
14096
14098
|
classes.push("table--hover");
|
|
14097
14099
|
}
|
|
14098
14100
|
return classes;
|
|
14099
|
-
}
|
|
14100
|
-
tableRole() {
|
|
14101
|
-
return
|
|
14102
|
-
}
|
|
14103
|
-
wrapperClasses() {
|
|
14104
|
-
return tableScrollClasses(
|
|
14105
|
-
}
|
|
14106
|
-
nbOfColumns() {
|
|
14107
|
-
let columnCount =
|
|
14108
|
-
if (
|
|
14101
|
+
});
|
|
14102
|
+
const tableRole = vue.computed(() => {
|
|
14103
|
+
return isExpandableTable.value ? "treegrid" : "grid";
|
|
14104
|
+
});
|
|
14105
|
+
const wrapperClasses = vue.computed(() => {
|
|
14106
|
+
return tableScrollClasses(props.scroll);
|
|
14107
|
+
});
|
|
14108
|
+
const nbOfColumns = vue.computed(() => {
|
|
14109
|
+
let columnCount = visibleColumns.value.length;
|
|
14110
|
+
if (props.selectable) {
|
|
14109
14111
|
columnCount++;
|
|
14110
14112
|
}
|
|
14111
|
-
if (
|
|
14113
|
+
if (isExpandableTable.value) {
|
|
14112
14114
|
columnCount++;
|
|
14113
14115
|
}
|
|
14114
14116
|
return columnCount;
|
|
14115
|
-
}
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
active: {
|
|
14130
|
-
immediate: true,
|
|
14131
|
-
handler: function() {
|
|
14132
|
-
this.updateActiveRowFromVModel();
|
|
14117
|
+
});
|
|
14118
|
+
vue.provide("addColumn", (column) => {
|
|
14119
|
+
columns.value = addColumn(columns.value, column);
|
|
14120
|
+
});
|
|
14121
|
+
vue.provide("setVisibilityColumn", (id, visible) => {
|
|
14122
|
+
setVisibilityColumn(columns.value, id, visible);
|
|
14123
|
+
});
|
|
14124
|
+
vue.provide("textFieldTableMode", true);
|
|
14125
|
+
vue.provide("renderColumns", vue.computed(() => props.rows.length > 0));
|
|
14126
|
+
vue.watch(() => props.rows, () => {
|
|
14127
|
+
if (props.modelValue) {
|
|
14128
|
+
selectedRows.value = props.modelValue.filter((row) => {
|
|
14129
|
+
return includeItem(row, props.rows, props.keyAttribute);
|
|
14130
|
+
});
|
|
14133
14131
|
}
|
|
14134
|
-
},
|
|
14135
|
-
showActive: {
|
|
14132
|
+
}, {
|
|
14136
14133
|
immediate: true,
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14134
|
+
deep: true
|
|
14135
|
+
});
|
|
14136
|
+
vue.watch(() => props.active, () => {
|
|
14137
|
+
updateActiveRowFromVModel();
|
|
14138
|
+
}, {
|
|
14139
|
+
immediate: true
|
|
14140
|
+
});
|
|
14141
|
+
vue.watch(() => props.showActive, (val) => {
|
|
14142
|
+
if (!val) {
|
|
14143
|
+
tbodyKey.value ^= 1;
|
|
14141
14144
|
}
|
|
14145
|
+
}, {
|
|
14146
|
+
immediate: true
|
|
14147
|
+
});
|
|
14148
|
+
function updateTr(tbodyElement) {
|
|
14149
|
+
const trElements = [].slice.call(tbodyElement.children);
|
|
14150
|
+
const trInteractableElements = trElements.filter((tr2) => {
|
|
14151
|
+
return tr2.tabIndex === 0;
|
|
14152
|
+
});
|
|
14153
|
+
tr.value = trInteractableElements;
|
|
14142
14154
|
}
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
return tr.tabIndex === 0;
|
|
14155
|
+
vue.onUpdated(() => {
|
|
14156
|
+
const tbodyElement = vue.useTemplateRef("tbodyElement");
|
|
14157
|
+
if (tbodyElement.value) {
|
|
14158
|
+
updateTr(tbodyElement.value);
|
|
14159
|
+
}
|
|
14149
14160
|
});
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14161
|
+
vue.onMounted(() => {
|
|
14162
|
+
const tbodyElement = vue.useTemplateRef("tbodyElement");
|
|
14163
|
+
if (tbodyElement.value) {
|
|
14164
|
+
updateTr(tbodyElement.value);
|
|
14165
|
+
}
|
|
14166
|
+
registerCallbackOnSort(callbackOnSort);
|
|
14167
|
+
registerCallbackOnMount(callbackSortableColumns);
|
|
14168
|
+
registerCallbackAfterItemAdd(callbackAfterItemAdd);
|
|
14169
|
+
registerCallbackBeforeItemDelete(callbackBeforeItemDelete);
|
|
14170
|
+
});
|
|
14171
|
+
function forceRepaintIE11(target) {
|
|
14172
|
+
if (navigator.userAgent.includes("Trident")) {
|
|
14173
|
+
target.style.display = "none";
|
|
14174
|
+
target.offsetHeight;
|
|
14175
|
+
target.style.removeProperty("display");
|
|
14162
14176
|
}
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
},
|
|
14168
|
-
onKeydownExpandable(event, index) {
|
|
14169
|
-
if (event.key === " " || event.key === "Spacebar") {
|
|
14170
|
-
event.preventDefault();
|
|
14171
|
-
return;
|
|
14177
|
+
}
|
|
14178
|
+
function isActive(row) {
|
|
14179
|
+
if (!props.showActive) {
|
|
14180
|
+
return false;
|
|
14172
14181
|
}
|
|
14173
|
-
|
|
14174
|
-
}
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
}
|
|
14178
|
-
|
|
14182
|
+
return itemEquals(row, activeRow.value, props.keyAttribute);
|
|
14183
|
+
}
|
|
14184
|
+
function isSelected(row) {
|
|
14185
|
+
return includeItem(row, selectedRows.value, props.keyAttribute);
|
|
14186
|
+
}
|
|
14187
|
+
function onKeydown$1(event, index) {
|
|
14188
|
+
onKeydown({
|
|
14189
|
+
rows: props.rows,
|
|
14190
|
+
tr,
|
|
14191
|
+
activate
|
|
14192
|
+
}, event, index);
|
|
14193
|
+
}
|
|
14194
|
+
function onClick(event, row) {
|
|
14179
14195
|
const {
|
|
14180
14196
|
target
|
|
14181
14197
|
} = event;
|
|
14182
14198
|
const isRelevant = ["TD", "TH"].includes(target.nodeName);
|
|
14183
14199
|
if (isRelevant) {
|
|
14184
14200
|
const parent = target.parentElement;
|
|
14185
|
-
|
|
14201
|
+
activate(row, parent);
|
|
14186
14202
|
}
|
|
14187
|
-
}
|
|
14188
|
-
activate(row,
|
|
14189
|
-
|
|
14190
|
-
if (
|
|
14191
|
-
|
|
14203
|
+
}
|
|
14204
|
+
function activate(row, tr2) {
|
|
14205
|
+
emit("click", row);
|
|
14206
|
+
if (isExpandableTable.value && hasExpandableContent(row)) {
|
|
14207
|
+
toggleExpanded(row);
|
|
14192
14208
|
}
|
|
14193
|
-
if (!itemEquals(row,
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
if (
|
|
14197
|
-
|
|
14198
|
-
const td =
|
|
14209
|
+
if (!itemEquals(row, activeRow.value, props.keyAttribute)) {
|
|
14210
|
+
emit("change", row);
|
|
14211
|
+
setActiveRow(row);
|
|
14212
|
+
if (tr2) {
|
|
14213
|
+
tr2.focus();
|
|
14214
|
+
const td = tr2.children[0];
|
|
14199
14215
|
forceRepaintIE11(td);
|
|
14200
14216
|
}
|
|
14201
14217
|
}
|
|
14202
|
-
}
|
|
14203
|
-
rowDescription(row) {
|
|
14204
|
-
const slot =
|
|
14218
|
+
}
|
|
14219
|
+
function rowDescription(row) {
|
|
14220
|
+
const slot = slots["row-description"];
|
|
14205
14221
|
return renderSlotText(slot, {
|
|
14206
14222
|
row
|
|
14207
14223
|
});
|
|
14208
|
-
}
|
|
14209
|
-
onSelect(row) {
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14224
|
+
}
|
|
14225
|
+
function onSelect(row) {
|
|
14226
|
+
var _a, _b;
|
|
14227
|
+
if (includeItem(row, selectedRows.value, props.keyAttribute)) {
|
|
14228
|
+
selectedRows.value = selectedRows.value.filter((i) => !itemEquals(i, row, props.keyAttribute));
|
|
14229
|
+
emit("unselect", row);
|
|
14213
14230
|
} else {
|
|
14214
|
-
|
|
14215
|
-
|
|
14231
|
+
selectedRows.value.push(row);
|
|
14232
|
+
emit("select", row);
|
|
14216
14233
|
}
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
}
|
|
14220
|
-
updateVModelWithSelectedRows() {
|
|
14221
|
-
if (
|
|
14222
|
-
|
|
14234
|
+
updateVModelWithSelectedRows();
|
|
14235
|
+
(_b = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$forceUpdate();
|
|
14236
|
+
}
|
|
14237
|
+
function updateVModelWithSelectedRows() {
|
|
14238
|
+
if (props.modelValue) {
|
|
14239
|
+
emit("update:modelValue", selectedRows.value);
|
|
14223
14240
|
}
|
|
14224
|
-
}
|
|
14225
|
-
rowClasses(row, index) {
|
|
14226
|
-
const active =
|
|
14227
|
-
const selected =
|
|
14228
|
-
const isExpandableRow =
|
|
14241
|
+
}
|
|
14242
|
+
function rowClasses(row, index) {
|
|
14243
|
+
const active = isActive(row) ? ["table__row--active"] : [];
|
|
14244
|
+
const selected = isSelected(row) ? ["table__row--selected"] : [];
|
|
14245
|
+
const isExpandableRow = isExpandableTable.value && hasExpandableContent(row);
|
|
14229
14246
|
const expandable = isExpandableRow ? ["table__row--expandable"] : [];
|
|
14230
|
-
const expanded =
|
|
14231
|
-
const striped =
|
|
14247
|
+
const expanded = isExpanded(row) ? ["table__row--expanded-border"] : [];
|
|
14248
|
+
const striped = props.striped && index % 2 !== 0 ? ["table__row--striped"] : [];
|
|
14232
14249
|
return ["table__row", ...active, ...selected, ...striped, ...expandable, ...expanded];
|
|
14233
|
-
}
|
|
14234
|
-
rowKey(row) {
|
|
14235
|
-
const key = row[
|
|
14250
|
+
}
|
|
14251
|
+
function rowKey(row) {
|
|
14252
|
+
const key = row[props.keyAttribute];
|
|
14236
14253
|
if (typeof key === "undefined") {
|
|
14237
|
-
throw new Error(`Key attribute [${
|
|
14254
|
+
throw new Error(`Key attribute [${props.keyAttribute}]' is missing in row`);
|
|
14238
14255
|
}
|
|
14239
14256
|
return String(key);
|
|
14240
|
-
}
|
|
14241
|
-
columnClasses(column) {
|
|
14257
|
+
}
|
|
14258
|
+
function columnClasses(column) {
|
|
14242
14259
|
const sortable = column.sortable ? ["table__column--sortable"] : [];
|
|
14243
14260
|
return ["table__column", `table__column--${column.type}`, ...sortable, column.size];
|
|
14244
|
-
}
|
|
14245
|
-
|
|
14261
|
+
}
|
|
14262
|
+
function iconClasses2(column) {
|
|
14246
14263
|
return getSortableIconClasses(column);
|
|
14247
|
-
}
|
|
14248
|
-
iconName(column) {
|
|
14264
|
+
}
|
|
14265
|
+
function iconName(column) {
|
|
14249
14266
|
return getSortableIconName(column);
|
|
14250
|
-
}
|
|
14251
|
-
onClickColumnHeader(column) {
|
|
14267
|
+
}
|
|
14268
|
+
function onClickColumnHeader(column) {
|
|
14252
14269
|
if (!column.sortable) {
|
|
14253
14270
|
return;
|
|
14254
14271
|
}
|
|
@@ -14257,205 +14274,137 @@ const _sfc_main$h = vue.defineComponent({
|
|
|
14257
14274
|
columnName = "";
|
|
14258
14275
|
column.sort = FTableColumnSort.UNSORTED;
|
|
14259
14276
|
}
|
|
14260
|
-
|
|
14261
|
-
}
|
|
14262
|
-
callbackOnSort(columnName, ascending) {
|
|
14263
|
-
updateSortOrder(
|
|
14264
|
-
}
|
|
14265
|
-
callbackSortableColumns(columnNames) {
|
|
14266
|
-
setSortableColumns(
|
|
14267
|
-
}
|
|
14268
|
-
callbackAfterItemAdd(item) {
|
|
14269
|
-
|
|
14270
|
-
}
|
|
14271
|
-
callbackBeforeItemDelete(item) {
|
|
14272
|
-
if (
|
|
14277
|
+
sort2(columnName, column.sort !== FTableColumnSort.ASCENDING);
|
|
14278
|
+
}
|
|
14279
|
+
function callbackOnSort(columnName, ascending) {
|
|
14280
|
+
updateSortOrder(columns.value, columnName, ascending);
|
|
14281
|
+
}
|
|
14282
|
+
function callbackSortableColumns(columnNames) {
|
|
14283
|
+
setSortableColumns(columns.value, columnNames);
|
|
14284
|
+
}
|
|
14285
|
+
function callbackAfterItemAdd(item) {
|
|
14286
|
+
activate(item, null);
|
|
14287
|
+
}
|
|
14288
|
+
function callbackBeforeItemDelete(item) {
|
|
14289
|
+
if (props.rows.length === 0) {
|
|
14273
14290
|
return;
|
|
14274
14291
|
}
|
|
14275
|
-
let targetIndex =
|
|
14276
|
-
if (targetIndex < 0 &&
|
|
14292
|
+
let targetIndex = props.rows.indexOf(item) - 1;
|
|
14293
|
+
if (targetIndex < 0 && props.rows.length > 1) {
|
|
14277
14294
|
targetIndex = 1;
|
|
14278
14295
|
} else if (targetIndex < 0) {
|
|
14279
14296
|
targetIndex = 0;
|
|
14280
14297
|
}
|
|
14281
|
-
|
|
14282
|
-
}
|
|
14283
|
-
escapeNewlines(value) {
|
|
14298
|
+
activate(props.rows[targetIndex], tr.value[targetIndex]);
|
|
14299
|
+
}
|
|
14300
|
+
function escapeNewlines(value) {
|
|
14284
14301
|
return value.replace(/\n/g, "<br/>");
|
|
14285
|
-
}
|
|
14286
|
-
updateActiveRowFromVModel() {
|
|
14287
|
-
if (
|
|
14288
|
-
|
|
14289
|
-
} else if (!itemEquals(
|
|
14290
|
-
|
|
14302
|
+
}
|
|
14303
|
+
function updateActiveRowFromVModel() {
|
|
14304
|
+
if (props.active === void 0) {
|
|
14305
|
+
setActiveRow(void 0);
|
|
14306
|
+
} else if (!itemEquals(props.active, activeRow.value, props.keyAttribute)) {
|
|
14307
|
+
setActiveRow(props.active);
|
|
14291
14308
|
}
|
|
14292
|
-
},
|
|
14293
|
-
setActiveRow(row) {
|
|
14294
|
-
this.activeRow = row;
|
|
14295
|
-
this.$emit("update:active", this.activeRow);
|
|
14296
14309
|
}
|
|
14310
|
+
function setActiveRow(row) {
|
|
14311
|
+
activeRow.value = row;
|
|
14312
|
+
emit("update:active", activeRow.value);
|
|
14313
|
+
}
|
|
14314
|
+
return (_ctx, _cache) => {
|
|
14315
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
14316
|
+
class: vue.normalizeClass(wrapperClasses.value)
|
|
14317
|
+
}, [vue.createCommentVNode("", true), _cache[18] || (_cache[18] = vue.createTextVNode()), vue.createElementVNode("table", vue.mergeProps({
|
|
14318
|
+
class: ["table", tableClasses.value],
|
|
14319
|
+
role: tableRole.value
|
|
14320
|
+
}, _ctx.$attrs), [hasCaption.value ? (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, [vue.unref(isExpandableTable) ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_3$9)) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), __props.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(columns.value, (column) => {
|
|
14321
|
+
return vue.openBlock(), vue.createElementBlock("col", {
|
|
14322
|
+
key: column.id,
|
|
14323
|
+
class: vue.normalizeClass(column.size)
|
|
14324
|
+
}, null, 2);
|
|
14325
|
+
}), 128))]), _cache[16] || (_cache[16] = vue.createTextVNode()), vue.createElementVNode("thead", null, [vue.createElementVNode("tr", _hoisted_5$6, [vue.unref(isExpandableTable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$4, [vue.createElementVNode("span", _hoisted_7$3, vue.toDisplayString(vue.unref($t2)("fkui.interactive-table.select", "Expandera")), 1)])) : vue.createCommentVNode("", true), _cache[4] || (_cache[4] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_8$3, [vue.createElementVNode("span", _hoisted_9$3, vue.toDisplayString(vue.unref($t2)("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(visibleColumns.value, (column) => {
|
|
14326
|
+
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
|
|
14327
|
+
key: column.id,
|
|
14328
|
+
scope: "col",
|
|
14329
|
+
class: columnClasses(column)
|
|
14330
|
+
}, vue.toHandlers(column.sortable ? {
|
|
14331
|
+
click: () => onClickColumnHeader(column)
|
|
14332
|
+
} : {}, true)), [vue.createElementVNode("span", {
|
|
14333
|
+
innerHTML: escapeNewlines(column.title)
|
|
14334
|
+
}, null, 8, _hoisted_10$2), _cache[2] || (_cache[2] = vue.createTextVNode()), column.sortable ? (vue.openBlock(), vue.createBlock(vue.unref(FIcon), {
|
|
14335
|
+
key: 0,
|
|
14336
|
+
class: vue.normalizeClass(iconClasses2(column)),
|
|
14337
|
+
name: iconName(column)
|
|
14338
|
+
}, 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);
|
|
14339
|
+
}), 128))])]), _cache[17] || (_cache[17] = vue.createTextVNode()), (vue.openBlock(), vue.createElementBlock("tbody", {
|
|
14340
|
+
ref: "tbodyElement",
|
|
14341
|
+
key: tbodyKey.value
|
|
14342
|
+
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.rows, (row, index) => {
|
|
14343
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
14344
|
+
key: rowKey(row)
|
|
14345
|
+
}, [vue.createElementVNode("tr", {
|
|
14346
|
+
class: vue.normalizeClass(rowClasses(row, index)),
|
|
14347
|
+
"aria-label": rowDescription(row),
|
|
14348
|
+
"aria-expanded": vue.unref(rowAriaExpanded)(row),
|
|
14349
|
+
"aria-level": vue.unref(isExpandableTable) ? 1 : void 0,
|
|
14350
|
+
"aria-describedby": vue.unref(getExpandableDescribedby)(row),
|
|
14351
|
+
tabindex: "0",
|
|
14352
|
+
onKeydown: vue.withModifiers(($event) => onKeydown$1($event, index), ["self"]),
|
|
14353
|
+
onClick: ($event) => onClick($event, row)
|
|
14354
|
+
}, [vue.unref(isExpandableTable) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_13, [vue.unref(hasExpandableContent)(row) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [vue.createVNode(vue.unref(FIcon), {
|
|
14355
|
+
name: "arrow-right",
|
|
14356
|
+
rotate: vue.unref(isExpanded)(row) ? "270" : "90"
|
|
14357
|
+
}, null, 8, ["rotate"])])) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), _cache[6] || (_cache[6] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_15, [vue.createElementVNode("div", _hoisted_16, [vue.createVNode(vue.unref(FCheckboxField), {
|
|
14358
|
+
value: true,
|
|
14359
|
+
"model-value": isSelected(row),
|
|
14360
|
+
onClick: vue.withModifiers(($event) => onSelect(row), ["self"])
|
|
14361
|
+
}, {
|
|
14362
|
+
default: vue.withCtx(() => [hasCheckboxDescription.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, [vue.renderSlot(_ctx.$slots, "checkbox-description", vue.mergeProps({
|
|
14363
|
+
ref_for: true
|
|
14364
|
+
}, {
|
|
14365
|
+
row
|
|
14366
|
+
}))])) : vue.createCommentVNode("", true)]),
|
|
14367
|
+
_: 2
|
|
14368
|
+
}, 1032, ["model-value", "onClick"])])])) : vue.createCommentVNode("", true), _cache[7] || (_cache[7] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
14369
|
+
ref_for: true
|
|
14370
|
+
}, {
|
|
14371
|
+
row
|
|
14372
|
+
}))], 42, _hoisted_12$1), _cache[11] || (_cache[11] = vue.createTextVNode()), vue.unref(isExpandableTable) && vue.unref(hasExpandableContent)(row) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
14373
|
+
key: 0
|
|
14374
|
+
}, vue.renderList(vue.unref(expandableRows)(row), (expandableRow, expandableIndex) => {
|
|
14375
|
+
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
14376
|
+
key: rowKey(expandableRow),
|
|
14377
|
+
"aria-level": "2",
|
|
14378
|
+
class: vue.normalizeClass(vue.unref(expandableRowClasses)(row, expandableIndex))
|
|
14379
|
+
}, [_cache[8] || (_cache[8] = vue.createElementVNode("td", {
|
|
14380
|
+
class: "table__column--placeholder"
|
|
14381
|
+
}, null, -1)), _cache[9] || (_cache[9] = vue.createTextVNode()), __props.selectable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_18)) : vue.createCommentVNode("", true), _cache[10] || (_cache[10] = vue.createTextVNode()), !vue.unref(hasExpandableSlot) ? vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
14382
|
+
key: 1,
|
|
14383
|
+
ref_for: true
|
|
14384
|
+
}, {
|
|
14385
|
+
row: expandableRow
|
|
14386
|
+
})) : (vue.openBlock(), vue.createElementBlock("td", {
|
|
14387
|
+
key: 2,
|
|
14388
|
+
class: "table__column table__column--indented",
|
|
14389
|
+
colspan: columns.value.length
|
|
14390
|
+
}, [vue.renderSlot(_ctx.$slots, "expandable", vue.mergeProps({
|
|
14391
|
+
ref_for: true
|
|
14392
|
+
}, {
|
|
14393
|
+
expandableRow,
|
|
14394
|
+
parentRow: row
|
|
14395
|
+
}))], 8, _hoisted_19))], 2);
|
|
14396
|
+
}), 128)) : vue.createCommentVNode("", true)], 64);
|
|
14397
|
+
}), 128)), _cache[13] || (_cache[13] = vue.createTextVNode()), isEmpty.value && columns.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_20, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps({
|
|
14398
|
+
row: {}
|
|
14399
|
+
})))])) : vue.createCommentVNode("", true), _cache[14] || (_cache[14] = vue.createTextVNode()), isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_21, [vue.createElementVNode("td", {
|
|
14400
|
+
class: "table__column table__column--action",
|
|
14401
|
+
colspan: nbOfColumns.value
|
|
14402
|
+
}, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createTextVNode(vue.toDisplayString(vue.unref($t2)("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({
|
|
14403
|
+
row: {}
|
|
14404
|
+
})))])) : vue.createCommentVNode("", true)]))], 16, _hoisted_1$h)], 2);
|
|
14405
|
+
};
|
|
14297
14406
|
}
|
|
14298
14407
|
});
|
|
14299
|
-
const _hoisted_1$h = ["role"];
|
|
14300
|
-
const _hoisted_2$d = {
|
|
14301
|
-
key: 0
|
|
14302
|
-
};
|
|
14303
|
-
const _hoisted_3$9 = {
|
|
14304
|
-
key: 0,
|
|
14305
|
-
class: "table__column--shrink"
|
|
14306
|
-
};
|
|
14307
|
-
const _hoisted_4$8 = {
|
|
14308
|
-
key: 1,
|
|
14309
|
-
class: "table__column--shrink"
|
|
14310
|
-
};
|
|
14311
|
-
const _hoisted_5$6 = {
|
|
14312
|
-
class: "table__row"
|
|
14313
|
-
};
|
|
14314
|
-
const _hoisted_6$4 = {
|
|
14315
|
-
key: 0,
|
|
14316
|
-
scope: "col"
|
|
14317
|
-
};
|
|
14318
|
-
const _hoisted_7$3 = {
|
|
14319
|
-
class: "sr-only"
|
|
14320
|
-
};
|
|
14321
|
-
const _hoisted_8$3 = {
|
|
14322
|
-
key: 1,
|
|
14323
|
-
scope: "col"
|
|
14324
|
-
};
|
|
14325
|
-
const _hoisted_9$3 = {
|
|
14326
|
-
class: "sr-only"
|
|
14327
|
-
};
|
|
14328
|
-
const _hoisted_10$2 = ["innerHTML"];
|
|
14329
|
-
const _hoisted_11$1 = {
|
|
14330
|
-
key: 1,
|
|
14331
|
-
class: "table__column__description"
|
|
14332
|
-
};
|
|
14333
|
-
const _hoisted_12$1 = ["aria-label", "aria-expanded", "aria-level", "aria-describedby", "onKeydown", "onClick"];
|
|
14334
|
-
const _hoisted_13 = {
|
|
14335
|
-
key: 0
|
|
14336
|
-
};
|
|
14337
|
-
const _hoisted_14 = {
|
|
14338
|
-
key: 0,
|
|
14339
|
-
class: "table__expand-icon"
|
|
14340
|
-
};
|
|
14341
|
-
const _hoisted_15 = {
|
|
14342
|
-
key: 1,
|
|
14343
|
-
class: "table__column--selectable"
|
|
14344
|
-
};
|
|
14345
|
-
const _hoisted_16 = {
|
|
14346
|
-
class: "table__input"
|
|
14347
|
-
};
|
|
14348
|
-
const _hoisted_17 = {
|
|
14349
|
-
key: 0,
|
|
14350
|
-
class: "sr-only"
|
|
14351
|
-
};
|
|
14352
|
-
const _hoisted_18 = {
|
|
14353
|
-
key: 0,
|
|
14354
|
-
class: "table__column--placeholder"
|
|
14355
|
-
};
|
|
14356
|
-
const _hoisted_19 = ["colspan"];
|
|
14357
|
-
const _hoisted_20 = {
|
|
14358
|
-
key: 0
|
|
14359
|
-
};
|
|
14360
|
-
const _hoisted_21 = {
|
|
14361
|
-
key: 1
|
|
14362
|
-
};
|
|
14363
|
-
const _hoisted_22 = ["colspan"];
|
|
14364
|
-
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14365
|
-
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
14366
|
-
const _component_f_checkbox_field = vue.resolveComponent("f-checkbox-field");
|
|
14367
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
14368
|
-
class: vue.normalizeClass(_ctx.wrapperClasses)
|
|
14369
|
-
}, [vue.createElementVNode("table", vue.mergeProps({
|
|
14370
|
-
class: ["table", _ctx.tableClasses],
|
|
14371
|
-
role: _ctx.tableRole
|
|
14372
|
-
}, _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) => {
|
|
14373
|
-
return vue.openBlock(), vue.createElementBlock("col", {
|
|
14374
|
-
key: column.id,
|
|
14375
|
-
class: vue.normalizeClass(column.size)
|
|
14376
|
-
}, null, 2);
|
|
14377
|
-
}), 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$3, 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$3, [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) => {
|
|
14378
|
-
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({
|
|
14379
|
-
key: column.id,
|
|
14380
|
-
scope: "col",
|
|
14381
|
-
class: _ctx.columnClasses(column)
|
|
14382
|
-
}, vue.toHandlers(column.sortable ? {
|
|
14383
|
-
click: () => _ctx.onClickColumnHeader(column)
|
|
14384
|
-
} : {}, true)), [vue.createElementVNode("span", {
|
|
14385
|
-
innerHTML: _ctx.escapeNewlines(column.title)
|
|
14386
|
-
}, null, 8, _hoisted_10$2), _cache[2] || (_cache[2] = vue.createTextVNode()), column.sortable ? (vue.openBlock(), vue.createBlock(_component_f_icon, {
|
|
14387
|
-
key: 0,
|
|
14388
|
-
class: vue.normalizeClass(_ctx.iconClasses(column)),
|
|
14389
|
-
name: _ctx.iconName(column)
|
|
14390
|
-
}, 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);
|
|
14391
|
-
}), 128))])]), _cache[17] || (_cache[17] = vue.createTextVNode()), (vue.openBlock(), vue.createElementBlock("tbody", {
|
|
14392
|
-
ref: "tbodyElement",
|
|
14393
|
-
key: _ctx.tbodyKey
|
|
14394
|
-
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.rows, (row, index) => {
|
|
14395
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
14396
|
-
key: _ctx.rowKey(row)
|
|
14397
|
-
}, [vue.createElementVNode("tr", {
|
|
14398
|
-
class: vue.normalizeClass(_ctx.rowClasses(row, index)),
|
|
14399
|
-
"aria-label": _ctx.rowDescription(row),
|
|
14400
|
-
"aria-expanded": _ctx.rowAriaExpanded(row),
|
|
14401
|
-
"aria-level": _ctx.isExpandableTable ? 1 : void 0,
|
|
14402
|
-
"aria-describedby": _ctx.getExpandableDescribedby(row),
|
|
14403
|
-
tabindex: "0",
|
|
14404
|
-
onKeydown: vue.withModifiers(($event) => _ctx.onKeydown($event, index), ["self"]),
|
|
14405
|
-
onClick: ($event) => _ctx.onClick($event, row, index)
|
|
14406
|
-
}, [_ctx.isExpandableTable ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_13, [_ctx.hasExpandableContent(row) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [vue.createVNode(_component_f_icon, {
|
|
14407
|
-
name: "arrow-right",
|
|
14408
|
-
rotate: _ctx.isExpanded(row) ? "270" : "90"
|
|
14409
|
-
}, 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, {
|
|
14410
|
-
value: true,
|
|
14411
|
-
"model-value": _ctx.isSelected(row),
|
|
14412
|
-
onClick: vue.withModifiers(($event) => _ctx.onSelect(row), ["self"])
|
|
14413
|
-
}, {
|
|
14414
|
-
default: vue.withCtx(() => [_ctx.hasCheckboxDescription ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, [vue.renderSlot(_ctx.$slots, "checkbox-description", vue.mergeProps({
|
|
14415
|
-
ref_for: true
|
|
14416
|
-
}, {
|
|
14417
|
-
row
|
|
14418
|
-
}))])) : vue.createCommentVNode("", true)]),
|
|
14419
|
-
_: 2
|
|
14420
|
-
}, 1032, ["model-value", "onClick"])])])) : vue.createCommentVNode("", true), _cache[7] || (_cache[7] = vue.createTextVNode()), vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
14421
|
-
ref_for: true
|
|
14422
|
-
}, {
|
|
14423
|
-
row
|
|
14424
|
-
}))], 42, _hoisted_12$1), _cache[11] || (_cache[11] = vue.createTextVNode()), _ctx.isExpandableTable && _ctx.hasExpandableContent(row) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
14425
|
-
key: 0
|
|
14426
|
-
}, vue.renderList(_ctx.expandableRows(row), (expandableRow, expandableIndex) => {
|
|
14427
|
-
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
14428
|
-
key: _ctx.rowKey(expandableRow),
|
|
14429
|
-
"aria-level": "2",
|
|
14430
|
-
class: vue.normalizeClass(_ctx.expandableRowClasses(row, expandableIndex))
|
|
14431
|
-
}, [_cache[8] || (_cache[8] = vue.createElementVNode("td", {
|
|
14432
|
-
class: "table__column--placeholder"
|
|
14433
|
-
}, 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({
|
|
14434
|
-
key: 1,
|
|
14435
|
-
ref_for: true
|
|
14436
|
-
}, {
|
|
14437
|
-
row: expandableRow
|
|
14438
|
-
})) : (vue.openBlock(), vue.createElementBlock("td", {
|
|
14439
|
-
key: 2,
|
|
14440
|
-
class: "table__column table__column--indented",
|
|
14441
|
-
colspan: _ctx.columns.length
|
|
14442
|
-
}, [vue.renderSlot(_ctx.$slots, "expandable", vue.mergeProps({
|
|
14443
|
-
ref_for: true
|
|
14444
|
-
}, {
|
|
14445
|
-
expandableRow,
|
|
14446
|
-
parentRow: row
|
|
14447
|
-
}))], 8, _hoisted_19))], 2);
|
|
14448
|
-
}), 128)) : vue.createCommentVNode("", true)], 64);
|
|
14449
|
-
}), 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({
|
|
14450
|
-
row: {}
|
|
14451
|
-
})))])) : vue.createCommentVNode("", true), _cache[14] || (_cache[14] = vue.createTextVNode()), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_21, [vue.createElementVNode("td", {
|
|
14452
|
-
class: "table__column table__column--action",
|
|
14453
|
-
colspan: _ctx.nbOfColumns
|
|
14454
|
-
}, [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({
|
|
14455
|
-
row: {}
|
|
14456
|
-
})))])) : vue.createCommentVNode("", true)]))], 16, _hoisted_1$h)], 2);
|
|
14457
|
-
}
|
|
14458
|
-
const FInteractiveTable = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$f]]);
|
|
14459
14408
|
const _sfc_main$g = vue.defineComponent({
|
|
14460
14409
|
name: "FLayoutApplicationTemplate",
|
|
14461
14410
|
computed: {
|
|
@@ -14500,12 +14449,12 @@ const _hoisted_5$5 = {
|
|
|
14500
14449
|
key: 0,
|
|
14501
14450
|
class: "layout-application-template__footer"
|
|
14502
14451
|
};
|
|
14503
|
-
function _sfc_render$
|
|
14452
|
+
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14504
14453
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [_ctx.showHeader || _ctx.showTopNavigation ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2$c, [_ctx.showHeader ? vue.renderSlot(_ctx.$slots, "header", {
|
|
14505
14454
|
key: 0
|
|
14506
14455
|
}) : vue.createCommentVNode("", true), _cache[0] || (_cache[0] = vue.createTextVNode()), _ctx.showTopNavigation ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_3$8, [vue.renderSlot(_ctx.$slots, "top-navigation")])) : vue.createCommentVNode("", true)], 512)) : vue.createCommentVNode("", true), _cache[2] || (_cache[2] = vue.createTextVNode()), vue.createElementVNode("main", _hoisted_4$7, [vue.renderSlot(_ctx.$slots, "default"), _cache[1] || (_cache[1] = vue.createTextVNode()), _ctx.showFooter ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_5$5, [vue.renderSlot(_ctx.$slots, "footer")])) : vue.createCommentVNode("", true)], 512)]);
|
|
14507
14456
|
}
|
|
14508
|
-
const FLayoutApplicationTemplate = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$
|
|
14457
|
+
const FLayoutApplicationTemplate = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$d]]);
|
|
14509
14458
|
function getGridClasses(target) {
|
|
14510
14459
|
if (target === null) {
|
|
14511
14460
|
return {};
|
|
@@ -14702,7 +14651,7 @@ const _hoisted_4$6 = {
|
|
|
14702
14651
|
key: 1,
|
|
14703
14652
|
class: "layout-navigation__navigation__inner--minimized"
|
|
14704
14653
|
};
|
|
14705
|
-
function _sfc_render$
|
|
14654
|
+
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14706
14655
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
14707
14656
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [vue.createElementVNode("nav", {
|
|
14708
14657
|
id: "layout-navigation__navigation",
|
|
@@ -14753,7 +14702,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14753
14702
|
style: vue.normalizeStyle(_ctx.primaryStyle)
|
|
14754
14703
|
}, [vue.renderSlot(_ctx.$slots, "default")], 6)]);
|
|
14755
14704
|
}
|
|
14756
|
-
const FLayoutLeftPanel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$
|
|
14705
|
+
const FLayoutLeftPanel = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$c]]);
|
|
14757
14706
|
class FRightPanelServiceImpl {
|
|
14758
14707
|
constructor() {
|
|
14759
14708
|
_defineProperty(this, "focusedElementBeforeOpenining", null);
|
|
@@ -14906,7 +14855,7 @@ const _hoisted_1$e = {
|
|
|
14906
14855
|
const _hoisted_2$a = {
|
|
14907
14856
|
class: "layout-secondary__secondary__inner"
|
|
14908
14857
|
};
|
|
14909
|
-
function _sfc_render$
|
|
14858
|
+
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14910
14859
|
const _component_f_icon = vue.resolveComponent("f-icon");
|
|
14911
14860
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [vue.createElementVNode("div", {
|
|
14912
14861
|
id: "layout-secondary__primary",
|
|
@@ -14945,13 +14894,34 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
14945
14894
|
name: "close"
|
|
14946
14895
|
})])], 6)])], 4)) : vue.createCommentVNode("", true)]);
|
|
14947
14896
|
}
|
|
14948
|
-
const FLayoutRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$
|
|
14949
|
-
const
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14897
|
+
const FLayoutRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$b]]);
|
|
14898
|
+
const _hoisted_1$d = {
|
|
14899
|
+
key: 0,
|
|
14900
|
+
class: "list"
|
|
14901
|
+
};
|
|
14902
|
+
const _hoisted_2$9 = {
|
|
14903
|
+
key: 0,
|
|
14904
|
+
class: "list__item"
|
|
14905
|
+
};
|
|
14906
|
+
const _hoisted_3$6 = {
|
|
14907
|
+
class: "list__item__itempane"
|
|
14908
|
+
};
|
|
14909
|
+
const _hoisted_4$5 = ["tabindex"];
|
|
14910
|
+
const _hoisted_5$4 = ["id", "aria-labelledby", "tabindex", "onKeydown"];
|
|
14911
|
+
const _hoisted_6$3 = ["onClick"];
|
|
14912
|
+
const _hoisted_7$2 = {
|
|
14913
|
+
class: "list__item__selectpane__input"
|
|
14914
|
+
};
|
|
14915
|
+
const _hoisted_8$2 = ["id"];
|
|
14916
|
+
const _hoisted_9$2 = {
|
|
14917
|
+
key: 0,
|
|
14918
|
+
class: "list__item"
|
|
14919
|
+
};
|
|
14920
|
+
const _hoisted_10$1 = {
|
|
14921
|
+
class: "list__item__itempane"
|
|
14922
|
+
};
|
|
14923
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
14924
|
+
__name: "FList",
|
|
14955
14925
|
props: {
|
|
14956
14926
|
/**
|
|
14957
14927
|
* The items to be listed.
|
|
@@ -15011,273 +14981,234 @@ const _sfc_main$d = vue.defineComponent({
|
|
|
15011
14981
|
default: () => logic.ElementIdService.generateElementId()
|
|
15012
14982
|
}
|
|
15013
14983
|
},
|
|
15014
|
-
emits: ["change", "click", "
|
|
15015
|
-
setup(
|
|
15016
|
-
|
|
15017
|
-
}
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
|
|
14984
|
+
emits: ["change", "click", "select", "unselect", "update:active", "update:modelValue"],
|
|
14985
|
+
setup(__props, {
|
|
14986
|
+
emit: __emit
|
|
14987
|
+
}) {
|
|
14988
|
+
const $t2 = useTranslate();
|
|
14989
|
+
const slots = vue.useSlots();
|
|
14990
|
+
const {
|
|
14991
|
+
registerCallbackAfterItemAdd,
|
|
14992
|
+
registerCallbackBeforeItemDelete
|
|
14993
|
+
} = ActivateItemInjected();
|
|
14994
|
+
const selectedItems = vue.ref([]);
|
|
14995
|
+
const activeItem = vue.ref(void 0);
|
|
14996
|
+
const ulElement = vue.ref();
|
|
14997
|
+
const props = __props;
|
|
14998
|
+
const emit = __emit;
|
|
14999
|
+
const isEmpty = vue.computed(() => {
|
|
15000
|
+
return props.items.length === 0;
|
|
15001
|
+
});
|
|
15002
|
+
vue.watch(() => props.items, () => {
|
|
15003
|
+
updateSelectedItemsFromVModel();
|
|
15004
|
+
}, {
|
|
15034
15005
|
deep: true,
|
|
15035
|
-
immediate: true
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
},
|
|
15040
|
-
modelValue: {
|
|
15006
|
+
immediate: true
|
|
15007
|
+
});
|
|
15008
|
+
vue.watch(() => props.modelValue, () => {
|
|
15009
|
+
updateSelectedItemsFromVModel();
|
|
15010
|
+
}, {
|
|
15041
15011
|
deep: true,
|
|
15042
|
-
immediate: true
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
},
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
if (!this.$slots["screenreader"]) {
|
|
15057
|
-
throw Error('Slot "screenreader" is required when having "selectable" & "checkbox" option.');
|
|
15012
|
+
immediate: true
|
|
15013
|
+
});
|
|
15014
|
+
vue.watch(() => props.active, () => {
|
|
15015
|
+
updateActiveItemFromVModel();
|
|
15016
|
+
}, {
|
|
15017
|
+
immediate: true
|
|
15018
|
+
});
|
|
15019
|
+
vue.onMounted(() => {
|
|
15020
|
+
if (props.selectable && props.checkbox) {
|
|
15021
|
+
if (!slots["screenreader"]) {
|
|
15022
|
+
throw Error('Slot "screenreader" is required when having "selectable" & "checkbox" option.');
|
|
15023
|
+
}
|
|
15024
|
+
registerCallbackAfterItemAdd(callbackAfterItemAdd);
|
|
15025
|
+
registerCallbackBeforeItemDelete(callbackBeforeItemDelete);
|
|
15058
15026
|
}
|
|
15059
|
-
|
|
15060
|
-
|
|
15027
|
+
});
|
|
15028
|
+
function getLiElements() {
|
|
15029
|
+
const element = getElementFromVueRef(ulElement.value);
|
|
15030
|
+
return Array.from(element.children);
|
|
15061
15031
|
}
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
getLiElements() {
|
|
15065
|
-
const ulElement = getElementFromVueRef(this.$refs["ulElement"]);
|
|
15066
|
-
return Array.from(ulElement.children);
|
|
15067
|
-
},
|
|
15068
|
-
itemKey(item) {
|
|
15069
|
-
const key = item[this.keyAttribute];
|
|
15032
|
+
function itemKey(item) {
|
|
15033
|
+
const key = item[props.keyAttribute];
|
|
15070
15034
|
if (typeof key === "undefined") {
|
|
15071
|
-
throw new Error(`Key attribute [${
|
|
15035
|
+
throw new Error(`Key attribute [${props.keyAttribute}]' is missing in item`);
|
|
15072
15036
|
}
|
|
15073
15037
|
return String(key);
|
|
15074
|
-
}
|
|
15075
|
-
isSelected(item) {
|
|
15076
|
-
return includeItem(item,
|
|
15077
|
-
}
|
|
15078
|
-
itemClasses(item) {
|
|
15038
|
+
}
|
|
15039
|
+
function isSelected(item) {
|
|
15040
|
+
return includeItem(item, selectedItems.value, props.keyAttribute);
|
|
15041
|
+
}
|
|
15042
|
+
function itemClasses(item) {
|
|
15079
15043
|
return {
|
|
15080
|
-
"list__item--selected":
|
|
15081
|
-
"list__item--active":
|
|
15044
|
+
"list__item--selected": isSelected(item),
|
|
15045
|
+
"list__item--active": isActive(item)
|
|
15082
15046
|
};
|
|
15083
|
-
}
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
this.selectedItems = this.selectedItems.filter((i) => !itemEquals(i, item, this.keyAttribute));
|
|
15090
|
-
this.$emit("unselect", item);
|
|
15047
|
+
}
|
|
15048
|
+
function onSelect(item) {
|
|
15049
|
+
var _a, _b;
|
|
15050
|
+
if (includeItem(item, selectedItems.value, props.keyAttribute)) {
|
|
15051
|
+
selectedItems.value = selectedItems.value.filter((i) => !itemEquals(i, item, props.keyAttribute));
|
|
15052
|
+
emit("unselect", item);
|
|
15091
15053
|
} else {
|
|
15092
|
-
|
|
15093
|
-
|
|
15054
|
+
selectedItems.value.push(item);
|
|
15055
|
+
emit("select", item);
|
|
15094
15056
|
}
|
|
15095
|
-
|
|
15096
|
-
|
|
15097
|
-
}
|
|
15098
|
-
setActiveItem(item) {
|
|
15099
|
-
|
|
15100
|
-
if (!itemEquals(item,
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15057
|
+
updateVModelWithSelectedItems();
|
|
15058
|
+
(_b = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$forceUpdate();
|
|
15059
|
+
}
|
|
15060
|
+
function setActiveItem(item) {
|
|
15061
|
+
emit("click", item);
|
|
15062
|
+
if (!itemEquals(item, activeItem.value, props.keyAttribute)) {
|
|
15063
|
+
emit("change", item);
|
|
15064
|
+
activeItem.value = item;
|
|
15065
|
+
emit("update:active", activeItem.value);
|
|
15104
15066
|
}
|
|
15105
|
-
}
|
|
15106
|
-
onItemClick(event, index, item) {
|
|
15107
|
-
|
|
15108
|
-
}
|
|
15109
|
-
updateVModelWithSelectedItems() {
|
|
15110
|
-
if (
|
|
15111
|
-
|
|
15067
|
+
}
|
|
15068
|
+
function onItemClick(event, index, item) {
|
|
15069
|
+
setActiveItem(item);
|
|
15070
|
+
}
|
|
15071
|
+
function updateVModelWithSelectedItems() {
|
|
15072
|
+
if (props.modelValue) {
|
|
15073
|
+
emit("update:modelValue", selectedItems.value);
|
|
15112
15074
|
}
|
|
15113
|
-
}
|
|
15114
|
-
updateSelectedItemsFromVModel() {
|
|
15115
|
-
if (Array.isArray(
|
|
15116
|
-
|
|
15117
|
-
return includeItem(item,
|
|
15075
|
+
}
|
|
15076
|
+
function updateSelectedItemsFromVModel() {
|
|
15077
|
+
if (Array.isArray(props.modelValue)) {
|
|
15078
|
+
selectedItems.value = props.modelValue.filter((item) => {
|
|
15079
|
+
return includeItem(item, props.items, props.keyAttribute);
|
|
15118
15080
|
});
|
|
15119
15081
|
} else {
|
|
15120
|
-
|
|
15082
|
+
selectedItems.value = [];
|
|
15121
15083
|
}
|
|
15122
|
-
}
|
|
15123
|
-
updateActiveItemFromVModel() {
|
|
15124
|
-
if (
|
|
15125
|
-
|
|
15126
|
-
} else if (!itemEquals(
|
|
15127
|
-
|
|
15084
|
+
}
|
|
15085
|
+
function updateActiveItemFromVModel() {
|
|
15086
|
+
if (props.active === void 0) {
|
|
15087
|
+
activeItem.value = void 0;
|
|
15088
|
+
} else if (!itemEquals(props.active, activeItem.value, props.keyAttribute)) {
|
|
15089
|
+
activeItem.value = props.active;
|
|
15128
15090
|
}
|
|
15129
|
-
}
|
|
15130
|
-
onItemKeyDown(event, item) {
|
|
15091
|
+
}
|
|
15092
|
+
function onItemKeyDown(event, item) {
|
|
15131
15093
|
switch (event.key) {
|
|
15132
15094
|
case "Up":
|
|
15133
15095
|
case "Down":
|
|
15134
15096
|
case "ArrowUp":
|
|
15135
15097
|
case "ArrowDown":
|
|
15136
15098
|
event.preventDefault();
|
|
15137
|
-
handleKeyboardFocusNavigation(event.key, event.target,
|
|
15099
|
+
handleKeyboardFocusNavigation(event.key, event.target, getLiElements());
|
|
15138
15100
|
break;
|
|
15139
15101
|
case " ":
|
|
15140
15102
|
case "Spacebar":
|
|
15141
15103
|
event.preventDefault();
|
|
15142
|
-
|
|
15104
|
+
setActiveItem(item);
|
|
15143
15105
|
break;
|
|
15144
15106
|
}
|
|
15145
|
-
}
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
},
|
|
15154
|
-
// Focus effect is done with box-shadow.
|
|
15155
|
-
// By setting position to relative the
|
|
15156
|
-
// item and box-shadow is drawn with a higher z-index,
|
|
15157
|
-
// thus no focus border under other list items.
|
|
15158
|
-
onItemFocus(event) {
|
|
15107
|
+
}
|
|
15108
|
+
function getAriaLabelledbyId(item) {
|
|
15109
|
+
return `${props.elementId}_${itemKey(item)}`;
|
|
15110
|
+
}
|
|
15111
|
+
function getItemId(item) {
|
|
15112
|
+
return `${props.elementId}_item_${itemKey(item)}`;
|
|
15113
|
+
}
|
|
15114
|
+
function onItemFocus(event) {
|
|
15159
15115
|
if (event && event.target) {
|
|
15160
15116
|
event.target.style.position = "relative";
|
|
15161
15117
|
}
|
|
15162
|
-
}
|
|
15163
|
-
onItemBlur(event) {
|
|
15118
|
+
}
|
|
15119
|
+
function onItemBlur(event) {
|
|
15164
15120
|
if (event && event.target) {
|
|
15165
15121
|
event.target.style.position = "static";
|
|
15166
15122
|
}
|
|
15167
|
-
}
|
|
15168
|
-
callbackAfterItemAdd(item) {
|
|
15169
|
-
|
|
15170
|
-
}
|
|
15171
|
-
callbackBeforeItemDelete(item) {
|
|
15172
|
-
if (
|
|
15123
|
+
}
|
|
15124
|
+
function callbackAfterItemAdd(item) {
|
|
15125
|
+
setActiveItem(item);
|
|
15126
|
+
}
|
|
15127
|
+
function callbackBeforeItemDelete(item) {
|
|
15128
|
+
if (props.items.length === 0) {
|
|
15173
15129
|
return;
|
|
15174
15130
|
}
|
|
15175
|
-
let targetIndex =
|
|
15176
|
-
if (targetIndex < 0 &&
|
|
15131
|
+
let targetIndex = props.items.indexOf(item) - 1;
|
|
15132
|
+
if (targetIndex < 0 && props.items.length > 1) {
|
|
15177
15133
|
targetIndex = 1;
|
|
15178
15134
|
} else if (targetIndex < 0) {
|
|
15179
15135
|
targetIndex = 0;
|
|
15180
15136
|
}
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
|
|
15137
|
+
setActiveItem(props.items[targetIndex]);
|
|
15138
|
+
const targetElement = getLiElements()[targetIndex];
|
|
15139
|
+
if (targetElement) {
|
|
15140
|
+
targetElement.focus();
|
|
15184
15141
|
}
|
|
15185
|
-
},
|
|
15186
|
-
isActive(item) {
|
|
15187
|
-
return this.checkbox && itemEquals(this.activeItem, item, this.keyAttribute);
|
|
15188
15142
|
}
|
|
15143
|
+
function isActive(item) {
|
|
15144
|
+
return props.checkbox && itemEquals(activeItem.value, item, props.keyAttribute);
|
|
15145
|
+
}
|
|
15146
|
+
return (_ctx, _cache) => {
|
|
15147
|
+
return !__props.selectable ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_1$d, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item) => {
|
|
15148
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
15149
|
+
key: itemKey(item),
|
|
15150
|
+
class: "list__item"
|
|
15151
|
+
}, [vue.createElementVNode("div", {
|
|
15152
|
+
ref_for: true,
|
|
15153
|
+
ref: "listItemPanes",
|
|
15154
|
+
class: "list__item__itempane"
|
|
15155
|
+
}, [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
15156
|
+
ref_for: true
|
|
15157
|
+
}, {
|
|
15158
|
+
item
|
|
15159
|
+
}))], 512)]);
|
|
15160
|
+
}), 128)), _cache[0] || (_cache[0] = vue.createTextVNode()), isEmpty.value ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$9, [vue.createElementVNode("div", _hoisted_3$6, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createElementVNode("em", null, vue.toDisplayString(vue.unref($t2)("fkui.list.empty", "Listan är tom")), 1)])])])) : vue.createCommentVNode("", true)])) : (vue.openBlock(), vue.createElementBlock("ul", {
|
|
15161
|
+
key: 1,
|
|
15162
|
+
ref_key: "ulElement",
|
|
15163
|
+
ref: ulElement,
|
|
15164
|
+
class: "list list--hover",
|
|
15165
|
+
tabindex: __props.checkbox ? 0 : void 0
|
|
15166
|
+
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item, index) => {
|
|
15167
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
15168
|
+
id: getItemId(item),
|
|
15169
|
+
key: itemKey(item),
|
|
15170
|
+
"aria-labelledby": getItemId(item),
|
|
15171
|
+
class: vue.normalizeClass([itemClasses(item), "list__item"]),
|
|
15172
|
+
tabindex: __props.checkbox ? 0 : void 0,
|
|
15173
|
+
onKeydown: vue.withModifiers(($event) => onItemKeyDown($event, item), ["self"]),
|
|
15174
|
+
onFocus: vue.withModifiers(onItemFocus, ["self"]),
|
|
15175
|
+
onBlur: vue.withModifiers(onItemBlur, ["self"])
|
|
15176
|
+
}, [__props.checkbox ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
15177
|
+
key: 0,
|
|
15178
|
+
class: "list__item__selectpane",
|
|
15179
|
+
onClick: vue.withModifiers(($event) => onSelect(item), ["self"])
|
|
15180
|
+
}, [vue.createElementVNode("div", _hoisted_7$2, [vue.createVNode(vue.unref(FCheckboxField), {
|
|
15181
|
+
value: true,
|
|
15182
|
+
"model-value": isSelected(item),
|
|
15183
|
+
onClick: vue.withModifiers(($event) => onSelect(item), ["self"])
|
|
15184
|
+
}, {
|
|
15185
|
+
default: vue.withCtx(() => [vue.createElementVNode("span", {
|
|
15186
|
+
id: getAriaLabelledbyId(item),
|
|
15187
|
+
class: "sr-only"
|
|
15188
|
+
}, [vue.renderSlot(_ctx.$slots, "screenreader", vue.mergeProps({
|
|
15189
|
+
ref_for: true
|
|
15190
|
+
}, {
|
|
15191
|
+
item
|
|
15192
|
+
}))], 8, _hoisted_8$2)]),
|
|
15193
|
+
_: 2
|
|
15194
|
+
}, 1032, ["model-value", "onClick"])])], 8, _hoisted_6$3)) : vue.createCommentVNode("", true), _cache[1] || (_cache[1] = vue.createTextVNode()), (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.checkbox ? "div" : "a"), {
|
|
15195
|
+
ref_for: true,
|
|
15196
|
+
ref: "listItemPanes",
|
|
15197
|
+
href: !__props.checkbox ? "javascript:" : void 0,
|
|
15198
|
+
class: "list__item__itempane",
|
|
15199
|
+
onClick: ($event) => onItemClick($event, index, item)
|
|
15200
|
+
}, {
|
|
15201
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
15202
|
+
ref_for: true
|
|
15203
|
+
}, {
|
|
15204
|
+
item
|
|
15205
|
+
}))]),
|
|
15206
|
+
_: 2
|
|
15207
|
+
}, 1032, ["href", "onClick"]))], 42, _hoisted_5$4);
|
|
15208
|
+
}), 128)), _cache[2] || (_cache[2] = vue.createTextVNode()), isEmpty.value ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$2, [vue.createElementVNode("div", _hoisted_10$1, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createElementVNode("em", null, vue.toDisplayString(vue.unref($t2)("fkui.list.empty", "Listan är tom")), 1)])])])) : vue.createCommentVNode("", true)], 8, _hoisted_4$5));
|
|
15209
|
+
};
|
|
15189
15210
|
}
|
|
15190
15211
|
});
|
|
15191
|
-
const _hoisted_1$d = {
|
|
15192
|
-
key: 0,
|
|
15193
|
-
class: "list"
|
|
15194
|
-
};
|
|
15195
|
-
const _hoisted_2$9 = {
|
|
15196
|
-
key: 0,
|
|
15197
|
-
class: "list__item"
|
|
15198
|
-
};
|
|
15199
|
-
const _hoisted_3$6 = {
|
|
15200
|
-
class: "list__item__itempane"
|
|
15201
|
-
};
|
|
15202
|
-
const _hoisted_4$5 = ["tabindex"];
|
|
15203
|
-
const _hoisted_5$4 = ["id", "aria-labelledby", "tabindex", "onKeydown"];
|
|
15204
|
-
const _hoisted_6$3 = ["onClick"];
|
|
15205
|
-
const _hoisted_7$2 = {
|
|
15206
|
-
class: "list__item__selectpane__input"
|
|
15207
|
-
};
|
|
15208
|
-
const _hoisted_8$2 = ["id"];
|
|
15209
|
-
const _hoisted_9$2 = {
|
|
15210
|
-
key: 0,
|
|
15211
|
-
class: "list__item"
|
|
15212
|
-
};
|
|
15213
|
-
const _hoisted_10$1 = {
|
|
15214
|
-
class: "list__item__itempane"
|
|
15215
|
-
};
|
|
15216
|
-
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15217
|
-
const _component_f_checkbox_field = vue.resolveComponent("f-checkbox-field");
|
|
15218
|
-
return !_ctx.selectable ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_1$d, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item) => {
|
|
15219
|
-
return vue.openBlock(), vue.createElementBlock("li", {
|
|
15220
|
-
key: _ctx.itemKey(item),
|
|
15221
|
-
class: "list__item"
|
|
15222
|
-
}, [vue.createElementVNode("div", {
|
|
15223
|
-
ref_for: true,
|
|
15224
|
-
ref: "listItemPanes",
|
|
15225
|
-
class: "list__item__itempane"
|
|
15226
|
-
}, [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
15227
|
-
ref_for: true
|
|
15228
|
-
}, {
|
|
15229
|
-
item
|
|
15230
|
-
}))], 512)]);
|
|
15231
|
-
}), 128)), _cache[2] || (_cache[2] = vue.createTextVNode()), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$9, [vue.createElementVNode("div", _hoisted_3$6, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createElementVNode("em", null, vue.toDisplayString(_ctx.$t("fkui.list.empty", "Listan är tom")), 1)])])])) : vue.createCommentVNode("", true)])) : (vue.openBlock(), vue.createElementBlock("ul", {
|
|
15232
|
-
key: 1,
|
|
15233
|
-
ref: "ulElement",
|
|
15234
|
-
class: "list list--hover",
|
|
15235
|
-
tabindex: _ctx.checkbox ? 0 : void 0
|
|
15236
|
-
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item, index) => {
|
|
15237
|
-
return vue.openBlock(), vue.createElementBlock("li", {
|
|
15238
|
-
id: _ctx.getItemId(item),
|
|
15239
|
-
key: _ctx.itemKey(item),
|
|
15240
|
-
"aria-labelledby": _ctx.getItemId(item),
|
|
15241
|
-
class: vue.normalizeClass([_ctx.itemClasses(item), "list__item"]),
|
|
15242
|
-
tabindex: _ctx.checkbox ? 0 : void 0,
|
|
15243
|
-
onKeydown: vue.withModifiers(($event) => _ctx.onItemKeyDown($event, item), ["self"]),
|
|
15244
|
-
onFocus: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.onItemFocus && _ctx.onItemFocus(...args), ["self"])),
|
|
15245
|
-
onBlur: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.onItemBlur && _ctx.onItemBlur(...args), ["self"]))
|
|
15246
|
-
}, [_ctx.checkbox ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
15247
|
-
key: 0,
|
|
15248
|
-
class: "list__item__selectpane",
|
|
15249
|
-
onClick: vue.withModifiers(($event) => _ctx.onSelect(item), ["self"])
|
|
15250
|
-
}, [vue.createElementVNode("div", _hoisted_7$2, [vue.createVNode(_component_f_checkbox_field, {
|
|
15251
|
-
value: true,
|
|
15252
|
-
"model-value": _ctx.isSelected(item),
|
|
15253
|
-
onClick: vue.withModifiers(($event) => _ctx.onSelect(item), ["self"])
|
|
15254
|
-
}, {
|
|
15255
|
-
default: vue.withCtx(() => [vue.createElementVNode("span", {
|
|
15256
|
-
id: _ctx.getAriaLabelledbyId(item),
|
|
15257
|
-
class: "sr-only"
|
|
15258
|
-
}, [vue.renderSlot(_ctx.$slots, "screenreader", vue.mergeProps({
|
|
15259
|
-
ref_for: true
|
|
15260
|
-
}, {
|
|
15261
|
-
item
|
|
15262
|
-
}))], 8, _hoisted_8$2)]),
|
|
15263
|
-
_: 2
|
|
15264
|
-
}, 1032, ["model-value", "onClick"])])], 8, _hoisted_6$3)) : vue.createCommentVNode("", true), _cache[3] || (_cache[3] = vue.createTextVNode()), (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.checkbox ? "div" : "a"), {
|
|
15265
|
-
ref_for: true,
|
|
15266
|
-
ref: "listItemPanes",
|
|
15267
|
-
href: !_ctx.checkbox ? "javascript:" : void 0,
|
|
15268
|
-
class: "list__item__itempane",
|
|
15269
|
-
onClick: ($event) => _ctx.onItemClick($event, index, item)
|
|
15270
|
-
}, {
|
|
15271
|
-
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", vue.mergeProps({
|
|
15272
|
-
ref_for: true
|
|
15273
|
-
}, {
|
|
15274
|
-
item
|
|
15275
|
-
}))]),
|
|
15276
|
-
_: 2
|
|
15277
|
-
}, 1032, ["href", "onClick"]))], 42, _hoisted_5$4);
|
|
15278
|
-
}), 128)), _cache[4] || (_cache[4] = vue.createTextVNode()), _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$2, [vue.createElementVNode("div", _hoisted_10$1, [vue.renderSlot(_ctx.$slots, "empty", {}, () => [vue.createElementVNode("em", null, vue.toDisplayString(_ctx.$t("fkui.list.empty", "Listan är tom")), 1)])])])) : vue.createCommentVNode("", true)], 8, _hoisted_4$5));
|
|
15279
|
-
}
|
|
15280
|
-
const FList = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
|
|
15281
15212
|
const _sfc_main$c = vue.defineComponent({
|
|
15282
15213
|
name: "FLoader",
|
|
15283
15214
|
mixins: [TranslationMixin],
|
|
@@ -17398,9 +17329,9 @@ exports.FClearingnumberTextField = _sfc_main$w;
|
|
|
17398
17329
|
exports.FConfirmModal = FConfirmModal;
|
|
17399
17330
|
exports.FContextMenu = FContextMenu;
|
|
17400
17331
|
exports.FCrudButton = FCrudButton;
|
|
17401
|
-
exports.FCrudDataset =
|
|
17332
|
+
exports.FCrudDataset = _sfc_main$I;
|
|
17402
17333
|
exports.FCurrencyTextField = _sfc_main$A;
|
|
17403
|
-
exports.FDataTable =
|
|
17334
|
+
exports.FDataTable = _sfc_main$o;
|
|
17404
17335
|
exports.FDatepickerField = FDatepickerField;
|
|
17405
17336
|
exports.FDialogueTree = FDialogueTree;
|
|
17406
17337
|
exports.FEmailTextField = FEmailTextField;
|
|
@@ -17415,14 +17346,14 @@ exports.FFileSelector = FFileSelector;
|
|
|
17415
17346
|
exports.FFormModal = FFormModal;
|
|
17416
17347
|
exports.FFormModalAction = FValidationFormAction;
|
|
17417
17348
|
exports.FIcon = FIcon;
|
|
17418
|
-
exports.FInteractiveTable =
|
|
17349
|
+
exports.FInteractiveTable = _sfc_main$h;
|
|
17419
17350
|
exports.FKUIConfigButtonOrder = FKUIConfigButtonOrder;
|
|
17420
17351
|
exports.FLabel = FLabel;
|
|
17421
17352
|
exports.FLayoutApplicationTemplate = FLayoutApplicationTemplate;
|
|
17422
17353
|
exports.FLayoutLeftPanel = FLayoutLeftPanel;
|
|
17423
17354
|
exports.FLayoutRightPanel = FLayoutRightPanel;
|
|
17424
17355
|
exports.FLayoutRightPanelService = FLayoutRightPanelService;
|
|
17425
|
-
exports.FList =
|
|
17356
|
+
exports.FList = _sfc_main$d;
|
|
17426
17357
|
exports.FLoader = FLoader;
|
|
17427
17358
|
exports.FLogo = _sfc_main$b;
|
|
17428
17359
|
exports.FMessageBox = FMessageBox;
|
|
@@ -17442,7 +17373,7 @@ exports.FProgressbar = _sfc_main$5;
|
|
|
17442
17373
|
exports.FRadioField = FRadioField;
|
|
17443
17374
|
exports.FSearchTextField = FSearchTextField;
|
|
17444
17375
|
exports.FSelectField = FSelectField;
|
|
17445
|
-
exports.FSortFilterDataset =
|
|
17376
|
+
exports.FSortFilterDataset = _sfc_main$p;
|
|
17446
17377
|
exports.FSortFilterDatasetInjected = FSortFilterDatasetInjected;
|
|
17447
17378
|
exports.FStaticField = FStaticField;
|
|
17448
17379
|
exports.FTableColumn = FTableColumn;
|