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