@fkui/vue 5.42.0 → 5.44.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/index.cjs.js +721 -218
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/index.esm.js +723 -220
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1107 -17
- package/htmlvalidate/elements/internal-components.js +30 -2
- package/package.json +2 -2
package/dist/esm/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, mergeProps, createTextVNode, createElementVNode, isVNode, Comment, createApp, resolveComponent, withKeys, createCommentVNode, toDisplayString, createVNode, createBlock, withCtx, Fragment, renderList, withModifiers, getCurrentInstance, resolveDynamicComponent, Teleport, normalizeProps, guardReactiveProps, ref, Transition, normalizeStyle, onMounted, toValue, onUnmounted, useSlots, useTemplateRef, watchEffect, nextTick, withDirectives, vShow,
|
|
2
|
-
import { TranslationService, isSet, configLogic, focus as focus$1, ElementIdService, pushFocus, findTabbableElements, popFocus, scrollTo, Reference, documentOrderComparator, ValidationService, isValidatableHTMLElement, alertScreenReader, debounce, handleTab, deepClone, formatNumber, parseNumber, parseBankAccountNumber, parseBankgiro, parseClearingNumber, formatPersonnummer, parsePersonnummer, parsePlusgiro, formatPostalCode, parsePercent, formatPercent, parseOrganisationsnummer, isInvalidDatesConfig, isInvalidWeekdaysConfig, parseDate, waitForScreenReader, saveFocus, addFocusListener, removeFocusListener, restoreFocus, DomUtils, focusFirst } from "@fkui/logic";
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, mergeProps, createTextVNode, createElementVNode, isVNode, Comment, createApp, resolveComponent, withKeys, createCommentVNode, toDisplayString, createVNode, createBlock, withCtx, Fragment, renderList, withModifiers, getCurrentInstance, resolveDynamicComponent, Teleport, normalizeProps, guardReactiveProps, ref, Transition, normalizeStyle, onMounted, toValue, onUnmounted, useSlots, useTemplateRef, watchEffect, watch, nextTick, withDirectives, vShow, unref, readonly, inject, toRef, provide, createSlots, vModelSelect, vModelDynamic, toHandlers, shallowRef, toRefs } from "vue";
|
|
2
|
+
import { TranslationService, isSet, configLogic, focus as focus$1, ElementIdService, pushFocus, findTabbableElements, popFocus, scrollTo, Reference, documentOrderComparator, ValidationService, isValidatableHTMLElement, alertScreenReader, debounce, handleTab, isEmpty, deepClone, formatNumber, parseNumber, parseBankAccountNumber, parseBankgiro, parseClearingNumber, formatPersonnummer, parsePersonnummer, parsePlusgiro, formatPostalCode, parsePercent, formatPercent, parseOrganisationsnummer, isInvalidDatesConfig, isInvalidWeekdaysConfig, parseDate, waitForScreenReader, saveFocus, addFocusListener, removeFocusListener, restoreFocus, DomUtils, focusFirst } from "@fkui/logic";
|
|
3
3
|
import { getWeekdayNamings, groupByWeek, FDate, DateFormat } from "@fkui/date";
|
|
4
4
|
const statuses = ["default", "warning", "error", "success", "info"];
|
|
5
|
-
const _sfc_main$
|
|
5
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "FBadge",
|
|
7
7
|
props: {
|
|
8
8
|
/**
|
|
@@ -1320,7 +1320,7 @@ function requireEs_array_push() {
|
|
|
1320
1320
|
requireEs_array_push();
|
|
1321
1321
|
const Flip = ["horizontal", "vertical"];
|
|
1322
1322
|
const Rotate = ["90", "180", "270"];
|
|
1323
|
-
const _sfc_main$
|
|
1323
|
+
const _sfc_main$1e = defineComponent({
|
|
1324
1324
|
name: "FIcon",
|
|
1325
1325
|
inheritAttrs: false,
|
|
1326
1326
|
props: {
|
|
@@ -1408,8 +1408,8 @@ const _export_sfc = (sfc, props) => {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
return target;
|
|
1410
1410
|
};
|
|
1411
|
-
const _hoisted_1$
|
|
1412
|
-
const _hoisted_2$
|
|
1411
|
+
const _hoisted_1$W = ["aria-hidden"];
|
|
1412
|
+
const _hoisted_2$H = ["xlink:href"];
|
|
1413
1413
|
function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1414
1414
|
return openBlock(), createElementBlock("svg", mergeProps(_ctx.$attrs, {
|
|
1415
1415
|
focusable: "false",
|
|
@@ -1417,9 +1417,9 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1417
1417
|
"aria-hidden": _ctx.ariaHidden
|
|
1418
1418
|
}), [renderSlot(_ctx.$slots, "default"), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("use", {
|
|
1419
1419
|
"xlink:href": _ctx.spriteId
|
|
1420
|
-
}, null, 8, _hoisted_2$
|
|
1420
|
+
}, null, 8, _hoisted_2$H)], 16, _hoisted_1$W);
|
|
1421
1421
|
}
|
|
1422
|
-
const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1422
|
+
const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$10]]);
|
|
1423
1423
|
const DATA_TEST_ATTRIBUTE_NAME = "data-test";
|
|
1424
1424
|
function throwErrorIfEmpty(value) {
|
|
1425
1425
|
if (!value) {
|
|
@@ -3749,7 +3749,7 @@ function elementIsRadioButton(element) {
|
|
|
3749
3749
|
function isHTMLInputElement(element) {
|
|
3750
3750
|
return element instanceof HTMLInputElement;
|
|
3751
3751
|
}
|
|
3752
|
-
const _sfc_main$
|
|
3752
|
+
const _sfc_main$1d = defineComponent({
|
|
3753
3753
|
name: "FModal",
|
|
3754
3754
|
components: {
|
|
3755
3755
|
FIcon
|
|
@@ -3810,6 +3810,19 @@ const _sfc_main$1b = defineComponent({
|
|
|
3810
3810
|
validator(value) {
|
|
3811
3811
|
return sizes.includes(value);
|
|
3812
3812
|
}
|
|
3813
|
+
},
|
|
3814
|
+
/**
|
|
3815
|
+
* Default behavior is that the modal will restore focus to previous element once closed.
|
|
3816
|
+
* - "on" (default) - component will set focus both when opened and closed
|
|
3817
|
+
* - "off" - focus strategy disabled
|
|
3818
|
+
* - "open" - focus will only be applied once modal is opened
|
|
3819
|
+
*/
|
|
3820
|
+
focus: {
|
|
3821
|
+
type: String,
|
|
3822
|
+
default: "on",
|
|
3823
|
+
validator(value) {
|
|
3824
|
+
return ["on", "off", "open"].includes(value);
|
|
3825
|
+
}
|
|
3813
3826
|
}
|
|
3814
3827
|
},
|
|
3815
3828
|
emits: ["close"],
|
|
@@ -3862,8 +3875,12 @@ const _sfc_main$1b = defineComponent({
|
|
|
3862
3875
|
root.style.top = `-${scroll}px`;
|
|
3863
3876
|
root.classList.add("modal__open");
|
|
3864
3877
|
const focusElement2 = this.resolveFocusElement();
|
|
3865
|
-
this.
|
|
3866
|
-
|
|
3878
|
+
if (this.focus === "on") {
|
|
3879
|
+
this.savedFocus = pushFocus(focusElement2);
|
|
3880
|
+
this.savedScroll = scroll;
|
|
3881
|
+
} else if (this.focus === "open") {
|
|
3882
|
+
focus$1(focusElement2);
|
|
3883
|
+
}
|
|
3867
3884
|
},
|
|
3868
3885
|
/**
|
|
3869
3886
|
* Prioritises what element to initially focus on in the following order:
|
|
@@ -3883,15 +3900,15 @@ const _sfc_main$1b = defineComponent({
|
|
|
3883
3900
|
return firstTabbableChildElement !== null && firstTabbableChildElement !== void 0 ? firstTabbableChildElement : contentElement;
|
|
3884
3901
|
},
|
|
3885
3902
|
restoreState() {
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3903
|
+
var _this$savedScroll;
|
|
3904
|
+
const root = document.documentElement;
|
|
3905
|
+
root.classList.remove("modal__open");
|
|
3906
|
+
root.style.removeProperty("top");
|
|
3907
|
+
root.scrollTop = (_this$savedScroll = this.savedScroll) !== null && _this$savedScroll !== void 0 ? _this$savedScroll : 0;
|
|
3908
|
+
this.savedScroll = null;
|
|
3909
|
+
if (this.focus === "on" && this.savedFocus) {
|
|
3892
3910
|
popFocus(this.savedFocus);
|
|
3893
3911
|
this.savedFocus = null;
|
|
3894
|
-
this.savedScroll = null;
|
|
3895
3912
|
}
|
|
3896
3913
|
},
|
|
3897
3914
|
onFocusFirst() {
|
|
@@ -3906,11 +3923,11 @@ const _sfc_main$1b = defineComponent({
|
|
|
3906
3923
|
}
|
|
3907
3924
|
}
|
|
3908
3925
|
});
|
|
3909
|
-
const _hoisted_1$
|
|
3910
|
-
const _hoisted_2$
|
|
3926
|
+
const _hoisted_1$V = ["id"];
|
|
3927
|
+
const _hoisted_2$G = {
|
|
3911
3928
|
class: "modal__backdrop"
|
|
3912
3929
|
};
|
|
3913
|
-
const _hoisted_3$
|
|
3930
|
+
const _hoisted_3$x = {
|
|
3914
3931
|
class: "modal__inner-container"
|
|
3915
3932
|
};
|
|
3916
3933
|
const _hoisted_4$r = {
|
|
@@ -3922,7 +3939,7 @@ const _hoisted_5$l = {
|
|
|
3922
3939
|
const _hoisted_6$g = {
|
|
3923
3940
|
class: "modal__header"
|
|
3924
3941
|
};
|
|
3925
|
-
const _hoisted_7$
|
|
3942
|
+
const _hoisted_7$e = {
|
|
3926
3943
|
key: 0,
|
|
3927
3944
|
ref: "modalTitle",
|
|
3928
3945
|
class: "modal__title",
|
|
@@ -3946,19 +3963,19 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3946
3963
|
key: 0,
|
|
3947
3964
|
id: _ctx.id,
|
|
3948
3965
|
class: normalizeClass(["modal", _ctx.modalClass])
|
|
3949
|
-
}, [createElementVNode("div", _hoisted_2$
|
|
3966
|
+
}, [createElementVNode("div", _hoisted_2$G, [createElementVNode("div", {
|
|
3950
3967
|
class: "modal__outer-container scroll-target",
|
|
3951
3968
|
tabindex: "-1",
|
|
3952
3969
|
role: "dialog",
|
|
3953
3970
|
"aria-modal": "true",
|
|
3954
3971
|
onKeyup: _cache[3] || (_cache[3] = withKeys((...args) => _ctx.onClose && _ctx.onClose(...args), ["esc"]))
|
|
3955
|
-
}, [createElementVNode("div", _hoisted_3$
|
|
3972
|
+
}, [createElementVNode("div", _hoisted_3$x, [createElementVNode("div", {
|
|
3956
3973
|
ref: "modalDialogContainer",
|
|
3957
3974
|
class: normalizeClass(["modal__dialog-container", _ctx.containerClasses])
|
|
3958
3975
|
}, [createElementVNode("div", _hoisted_4$r, [createElementVNode("div", _hoisted_5$l, [createElementVNode("div", _hoisted_6$g, [createElementVNode("div", {
|
|
3959
3976
|
tabindex: "0",
|
|
3960
3977
|
onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.onFocusFirst && _ctx.onFocusFirst(...args))
|
|
3961
|
-
}, null, 32), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasHeaderSlot ? (openBlock(), createElementBlock("h1", _hoisted_7$
|
|
3978
|
+
}, null, 32), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasHeaderSlot ? (openBlock(), createElementBlock("h1", _hoisted_7$e, [renderSlot(_ctx.$slots, "header")], 512)) : createCommentVNode("", true)]), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("div", _hoisted_8$9, [renderSlot(_ctx.$slots, "content")], 512), _cache[6] || (_cache[6] = createTextVNode()), createElementVNode("div", _hoisted_9$6, [renderSlot(_ctx.$slots, "footer")])]), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("div", _hoisted_10$4, [createElementVNode("button", {
|
|
3962
3979
|
type: "button",
|
|
3963
3980
|
class: "close-button",
|
|
3964
3981
|
"aria-label": _ctx.ariaCloseText,
|
|
@@ -3968,9 +3985,9 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3968
3985
|
})], 8, _hoisted_11$3), _cache[8] || (_cache[8] = createTextVNode()), createElementVNode("div", {
|
|
3969
3986
|
tabindex: "0",
|
|
3970
3987
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.onFocusLast && _ctx.onFocusLast(...args))
|
|
3971
|
-
}, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$
|
|
3988
|
+
}, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$V)) : createCommentVNode("", true);
|
|
3972
3989
|
}
|
|
3973
|
-
const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3990
|
+
const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$$]]);
|
|
3974
3991
|
function prepareButtonList(src, buttonOrder = config.buttonOrder) {
|
|
3975
3992
|
const list = src.map((it) => {
|
|
3976
3993
|
var _it$event, _ref, _it$reason, _it$type;
|
|
@@ -3999,7 +4016,7 @@ const defaultButtons = [{
|
|
|
3999
4016
|
event: "dismiss",
|
|
4000
4017
|
type: "secondary"
|
|
4001
4018
|
}];
|
|
4002
|
-
const _sfc_main$
|
|
4019
|
+
const _sfc_main$1c = defineComponent({
|
|
4003
4020
|
name: "FConfirmModal",
|
|
4004
4021
|
components: {
|
|
4005
4022
|
FModal
|
|
@@ -4065,6 +4082,19 @@ const _sfc_main$1a = defineComponent({
|
|
|
4065
4082
|
default: () => {
|
|
4066
4083
|
return defaultButtons;
|
|
4067
4084
|
}
|
|
4085
|
+
},
|
|
4086
|
+
/**
|
|
4087
|
+
* Default behavior is that the modal will restore focus to previous element once closed.
|
|
4088
|
+
* - "on" (default) - component will set focus both when opened and closed
|
|
4089
|
+
* - "off" - focus strategy disabled
|
|
4090
|
+
* - "open" - focus will only be applied once modal is opened
|
|
4091
|
+
*/
|
|
4092
|
+
focus: {
|
|
4093
|
+
type: String,
|
|
4094
|
+
default: "on",
|
|
4095
|
+
validator(value) {
|
|
4096
|
+
return ["on", "off", "open"].includes(value);
|
|
4097
|
+
}
|
|
4068
4098
|
}
|
|
4069
4099
|
},
|
|
4070
4100
|
emits: ["close", ...defaultButtons.map((it) => {
|
|
@@ -4090,11 +4120,11 @@ const _sfc_main$1a = defineComponent({
|
|
|
4090
4120
|
}
|
|
4091
4121
|
}
|
|
4092
4122
|
});
|
|
4093
|
-
const _hoisted_1$
|
|
4123
|
+
const _hoisted_1$U = {
|
|
4094
4124
|
class: "button-group"
|
|
4095
4125
|
};
|
|
4096
|
-
const _hoisted_2$
|
|
4097
|
-
const _hoisted_3$
|
|
4126
|
+
const _hoisted_2$F = ["onClick"];
|
|
4127
|
+
const _hoisted_3$w = {
|
|
4098
4128
|
key: 0,
|
|
4099
4129
|
class: "sr-only"
|
|
4100
4130
|
};
|
|
@@ -4106,26 +4136,27 @@ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4106
4136
|
"aria-close-text": _ctx.ariaCloseText,
|
|
4107
4137
|
type: "warning",
|
|
4108
4138
|
size: _ctx.size,
|
|
4139
|
+
focus: _ctx.focus,
|
|
4109
4140
|
onClose: _ctx.onClose
|
|
4110
4141
|
}, {
|
|
4111
4142
|
header: withCtx(() => [renderSlot(_ctx.$slots, "heading", {}, () => [createTextVNode(toDisplayString(_ctx.heading), 1)])]),
|
|
4112
4143
|
content: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(_ctx.content), 1)])]),
|
|
4113
|
-
footer: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
4144
|
+
footer: withCtx(() => [createElementVNode("div", _hoisted_1$U, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
|
|
4114
4145
|
return openBlock(), createElementBlock("button", {
|
|
4115
4146
|
key: button.label,
|
|
4116
4147
|
type: "button",
|
|
4117
4148
|
class: normalizeClass([button.classlist, "button-group__item"]),
|
|
4118
4149
|
onClick: ($event) => _ctx.onClick(button)
|
|
4119
|
-
}, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[0] || (_cache[0] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
4150
|
+
}, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[0] || (_cache[0] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$w, " " + toDisplayString(button.screenreader), 1)) : createCommentVNode("", true)], 10, _hoisted_2$F);
|
|
4120
4151
|
}), 128))])]),
|
|
4121
4152
|
_: 3
|
|
4122
|
-
}, 8, ["fullscreen", "is-open", "aria-close-text", "size", "onClose"]);
|
|
4153
|
+
}, 8, ["fullscreen", "is-open", "aria-close-text", "size", "focus", "onClose"]);
|
|
4123
4154
|
}
|
|
4124
|
-
const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4155
|
+
const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$_]]);
|
|
4125
4156
|
const GAP = ["1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x"];
|
|
4126
4157
|
const ALIGNMENT = ["top", "center", "bottom"];
|
|
4127
4158
|
const FLOAT = ["left", "center", "right"];
|
|
4128
|
-
const _sfc_main$
|
|
4159
|
+
const _sfc_main$1b = defineComponent({
|
|
4129
4160
|
name: "IFlex",
|
|
4130
4161
|
inheritAttrs: true,
|
|
4131
4162
|
props: {
|
|
@@ -4205,8 +4236,8 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4205
4236
|
class: normalizeClass(["iflex", _ctx.classList])
|
|
4206
4237
|
}, [renderSlot(_ctx.$slots, "default")], 2);
|
|
4207
4238
|
}
|
|
4208
|
-
const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4209
|
-
const _sfc_main$
|
|
4239
|
+
const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$Z]]);
|
|
4240
|
+
const _sfc_main$1a = defineComponent({
|
|
4210
4241
|
name: "IFlexItem",
|
|
4211
4242
|
inheritAttrs: true,
|
|
4212
4243
|
props: {
|
|
@@ -4258,7 +4289,7 @@ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4258
4289
|
class: normalizeClass(["iflex__item", _ctx.classList])
|
|
4259
4290
|
}, [renderSlot(_ctx.$slots, "default")], 2);
|
|
4260
4291
|
}
|
|
4261
|
-
const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4292
|
+
const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$Y]]);
|
|
4262
4293
|
function focusError(item) {
|
|
4263
4294
|
const element = document.querySelector(`#${item.id}`);
|
|
4264
4295
|
if (!element) {
|
|
@@ -4268,7 +4299,7 @@ function focusError(item) {
|
|
|
4268
4299
|
scrollTo(element, window.innerHeight * 0.25);
|
|
4269
4300
|
focus$1(focusElement2 ? focusElement2 : element);
|
|
4270
4301
|
}
|
|
4271
|
-
const _sfc_main$
|
|
4302
|
+
const _sfc_main$19 = defineComponent({
|
|
4272
4303
|
name: "FErrorList",
|
|
4273
4304
|
components: {
|
|
4274
4305
|
FIcon,
|
|
@@ -4324,13 +4355,13 @@ const _sfc_main$17 = defineComponent({
|
|
|
4324
4355
|
}
|
|
4325
4356
|
}
|
|
4326
4357
|
});
|
|
4327
|
-
const _hoisted_1$
|
|
4358
|
+
const _hoisted_1$T = {
|
|
4328
4359
|
class: "error-list"
|
|
4329
4360
|
};
|
|
4330
|
-
const _hoisted_2$
|
|
4361
|
+
const _hoisted_2$E = {
|
|
4331
4362
|
key: 0
|
|
4332
4363
|
};
|
|
4333
|
-
const _hoisted_3$
|
|
4364
|
+
const _hoisted_3$v = {
|
|
4334
4365
|
class: "error-list__list error-list--list-style-none"
|
|
4335
4366
|
};
|
|
4336
4367
|
const _hoisted_4$q = ["onClick"];
|
|
@@ -4341,7 +4372,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4341
4372
|
const _component_f_icon = resolveComponent("f-icon");
|
|
4342
4373
|
const _component_i_flex_item = resolveComponent("i-flex-item");
|
|
4343
4374
|
const _component_i_flex = resolveComponent("i-flex");
|
|
4344
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4375
|
+
return openBlock(), createElementBlock("div", _hoisted_1$T, [createVNode(_component_i_flex, null, {
|
|
4345
4376
|
default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createBlock(_component_i_flex_item, {
|
|
4346
4377
|
key: 0,
|
|
4347
4378
|
shrink: ""
|
|
@@ -4360,7 +4391,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4360
4391
|
})) : createCommentVNode("", true), _cache[7] || (_cache[7] = createTextVNode()), createVNode(_component_i_flex_item, {
|
|
4361
4392
|
grow: ""
|
|
4362
4393
|
}, {
|
|
4363
|
-
default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
4394
|
+
default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createElementBlock("div", _hoisted_2$E, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("ul", _hoisted_3$v, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
|
|
4364
4395
|
return openBlock(), createElementBlock("li", {
|
|
4365
4396
|
key: item.id,
|
|
4366
4397
|
class: normalizeClass(_ctx.liClasses(item))
|
|
@@ -4391,7 +4422,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4391
4422
|
_: 3
|
|
4392
4423
|
})]);
|
|
4393
4424
|
}
|
|
4394
|
-
const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4425
|
+
const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$X]]);
|
|
4395
4426
|
function cleanUpElements(vm) {
|
|
4396
4427
|
return new Promise((resolve) => {
|
|
4397
4428
|
window.setTimeout(() => {
|
|
@@ -4420,7 +4451,7 @@ function sortComponentsWithErrorsOnDOMOrder(componentList) {
|
|
|
4420
4451
|
function isFormStepReference(reference) {
|
|
4421
4452
|
return "isOpen" in reference.ref;
|
|
4422
4453
|
}
|
|
4423
|
-
const _sfc_main$
|
|
4454
|
+
const _sfc_main$18 = defineComponent({
|
|
4424
4455
|
name: "FValidationGroup",
|
|
4425
4456
|
props: {
|
|
4426
4457
|
/**
|
|
@@ -4496,13 +4527,13 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4496
4527
|
onComponentUnmount: _cache[1] || (_cache[1] = (...args) => _ctx.onComponentUnmount && _ctx.onComponentUnmount(...args))
|
|
4497
4528
|
}, [renderSlot(_ctx.$slots, "default")], 32);
|
|
4498
4529
|
}
|
|
4499
|
-
const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4530
|
+
const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$W]]);
|
|
4500
4531
|
var FValidationFormAction = /* @__PURE__ */ ((FValidationFormAction2) => {
|
|
4501
4532
|
FValidationFormAction2[FValidationFormAction2["CONTINUE"] = 0] = "CONTINUE";
|
|
4502
4533
|
FValidationFormAction2[FValidationFormAction2["CANCEL"] = 1] = "CANCEL";
|
|
4503
4534
|
return FValidationFormAction2;
|
|
4504
4535
|
})(FValidationFormAction || {});
|
|
4505
|
-
const _sfc_main$
|
|
4536
|
+
const _sfc_main$17 = defineComponent({
|
|
4506
4537
|
name: "FValidationForm",
|
|
4507
4538
|
components: {
|
|
4508
4539
|
FValidationGroup,
|
|
@@ -4641,8 +4672,8 @@ const _sfc_main$15 = defineComponent({
|
|
|
4641
4672
|
}
|
|
4642
4673
|
}
|
|
4643
4674
|
});
|
|
4644
|
-
const _hoisted_1$
|
|
4645
|
-
const _hoisted_2$
|
|
4675
|
+
const _hoisted_1$S = ["id"];
|
|
4676
|
+
const _hoisted_2$D = {
|
|
4646
4677
|
key: 0,
|
|
4647
4678
|
ref: "errors",
|
|
4648
4679
|
tabindex: "-1",
|
|
@@ -4663,19 +4694,19 @@ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4663
4694
|
novalidate: "",
|
|
4664
4695
|
autocomplete: "off",
|
|
4665
4696
|
onSubmit: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onSubmit && _ctx.onSubmit(...args), ["prevent"]))
|
|
4666
|
-
}), [_ctx.displayErrors ? (openBlock(), createElementBlock("nav", _hoisted_2$
|
|
4697
|
+
}), [_ctx.displayErrors ? (openBlock(), createElementBlock("nav", _hoisted_2$D, [createVNode(_component_f_error_list, {
|
|
4667
4698
|
items: _ctx.errors,
|
|
4668
4699
|
bullets: _ctx.errorListBullets,
|
|
4669
4700
|
"before-navigate": _ctx.errorListBeforeNavigate
|
|
4670
4701
|
}, {
|
|
4671
4702
|
title: withCtx(() => [renderSlot(_ctx.$slots, "error-message")]),
|
|
4672
4703
|
_: 3
|
|
4673
|
-
}, 8, ["items", "bullets", "before-navigate"])], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$
|
|
4704
|
+
}, 8, ["items", "bullets", "before-navigate"])], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$S)]),
|
|
4674
4705
|
_: 3
|
|
4675
4706
|
}, 8, ["modelValue"]);
|
|
4676
4707
|
}
|
|
4677
|
-
const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4678
|
-
const _sfc_main$
|
|
4708
|
+
const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$V]]);
|
|
4709
|
+
const _sfc_main$16 = defineComponent({
|
|
4679
4710
|
name: "FFormModal",
|
|
4680
4711
|
components: {
|
|
4681
4712
|
FModal,
|
|
@@ -4827,11 +4858,11 @@ const _sfc_main$14 = defineComponent({
|
|
|
4827
4858
|
}
|
|
4828
4859
|
}
|
|
4829
4860
|
});
|
|
4830
|
-
const _hoisted_1$
|
|
4861
|
+
const _hoisted_1$R = {
|
|
4831
4862
|
class: "button-group"
|
|
4832
4863
|
};
|
|
4833
|
-
const _hoisted_2$
|
|
4834
|
-
const _hoisted_3$
|
|
4864
|
+
const _hoisted_2$C = ["type", "form", "onClick"];
|
|
4865
|
+
const _hoisted_3$u = {
|
|
4835
4866
|
key: 0,
|
|
4836
4867
|
class: "sr-only"
|
|
4837
4868
|
};
|
|
@@ -4860,7 +4891,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4860
4891
|
default: withCtx(() => [_cache[1] || (_cache[1] = createTextVNode()), renderSlot(_ctx.$slots, "input-text-fields")]),
|
|
4861
4892
|
_: 3
|
|
4862
4893
|
}, 8, ["id", "before-submit", "before-validation", "use-error-list", "onSubmit", "onCancel"])]),
|
|
4863
|
-
footer: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
4894
|
+
footer: withCtx(() => [createElementVNode("div", _hoisted_1$R, [!_ctx.hasDeprecatedSlots ? (openBlock(true), createElementBlock(Fragment, {
|
|
4864
4895
|
key: 0
|
|
4865
4896
|
}, renderList(_ctx.preparedButtons, (button) => {
|
|
4866
4897
|
return openBlock(), createElementBlock("button", {
|
|
@@ -4869,7 +4900,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4869
4900
|
class: normalizeClass([button.classlist, "button-group__item"]),
|
|
4870
4901
|
form: button.buttonType === "submit" ? _ctx.formId : void 0,
|
|
4871
4902
|
onClick: ($event) => button.buttonType === "button" ? _ctx.onCancel() : false
|
|
4872
|
-
}, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[3] || (_cache[3] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
4903
|
+
}, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[3] || (_cache[3] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$u, " " + toDisplayString(button.screenreader), 1)) : createCommentVNode("", true)], 10, _hoisted_2$C);
|
|
4873
4904
|
}), 128)) : (openBlock(), createElementBlock(Fragment, {
|
|
4874
4905
|
key: 1
|
|
4875
4906
|
}, [createElementVNode("button", {
|
|
@@ -4886,7 +4917,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4886
4917
|
_: 3
|
|
4887
4918
|
}, 8, ["data-test", "fullscreen", "is-open", "size", "aria-close-text", "onClose"]);
|
|
4888
4919
|
}
|
|
4889
|
-
const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4920
|
+
const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$U]]);
|
|
4890
4921
|
async function confirmModal(callingInstance, texts) {
|
|
4891
4922
|
const buttons = [{
|
|
4892
4923
|
label: texts.confirm,
|
|
@@ -5212,7 +5243,7 @@ const ErrorPlugin = {
|
|
|
5212
5243
|
}
|
|
5213
5244
|
}
|
|
5214
5245
|
};
|
|
5215
|
-
const _sfc_main$
|
|
5246
|
+
const _sfc_main$15 = defineComponent({
|
|
5216
5247
|
name: "FErrorPage",
|
|
5217
5248
|
props: {
|
|
5218
5249
|
payload: {
|
|
@@ -5222,16 +5253,16 @@ const _sfc_main$13 = defineComponent({
|
|
|
5222
5253
|
}
|
|
5223
5254
|
}
|
|
5224
5255
|
});
|
|
5225
|
-
const _hoisted_1$
|
|
5256
|
+
const _hoisted_1$Q = {
|
|
5226
5257
|
"data-test": "f-error-page"
|
|
5227
5258
|
};
|
|
5228
5259
|
function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5229
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5260
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Q, _cache[0] || (_cache[0] = [createElementVNode("h1", null, "Fel", -1), createTextVNode(), createElementVNode("p", null, "Ett fel har uppstått.", -1), createTextVNode(), createElementVNode("a", {
|
|
5230
5261
|
href: "/"
|
|
5231
5262
|
}, "Gå till startsidan", -1)]));
|
|
5232
5263
|
}
|
|
5233
|
-
const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5234
|
-
const _sfc_main$
|
|
5264
|
+
const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$T]]);
|
|
5265
|
+
const _sfc_main$14 = defineComponent({
|
|
5235
5266
|
name: "FErrorHandlingApp",
|
|
5236
5267
|
props: {
|
|
5237
5268
|
defaultComponent: {
|
|
@@ -5270,7 +5301,7 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5270
5301
|
key: 2
|
|
5271
5302
|
})]);
|
|
5272
5303
|
}
|
|
5273
|
-
const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5304
|
+
const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$S]]);
|
|
5274
5305
|
function isMonthBefore(date, minDate) {
|
|
5275
5306
|
return Boolean(minDate && date.isBefore(minDate.startOfMonth()));
|
|
5276
5307
|
}
|
|
@@ -5281,7 +5312,7 @@ function isInvalidMonth(date, minDate, maxDate) {
|
|
|
5281
5312
|
const startOfMonth = date.startOfMonth();
|
|
5282
5313
|
return isMonthBefore(startOfMonth, minDate) || isMonthAfter(startOfMonth, maxDate);
|
|
5283
5314
|
}
|
|
5284
|
-
function getMessage($
|
|
5315
|
+
function getMessage($t2, date, minDate, maxDate) {
|
|
5285
5316
|
const invalidMonth = isInvalidMonth(date, minDate, maxDate);
|
|
5286
5317
|
if (!invalidMonth) {
|
|
5287
5318
|
return void 0;
|
|
@@ -5292,7 +5323,7 @@ function getMessage($t, date, minDate, maxDate) {
|
|
|
5292
5323
|
monthName,
|
|
5293
5324
|
year
|
|
5294
5325
|
} = minDate;
|
|
5295
|
-
return $
|
|
5326
|
+
return $t2("fkui.calendar.error.below-min-date", "Du kan inte välja en dag före {{day}} {{month}} {{year}}", {
|
|
5296
5327
|
day,
|
|
5297
5328
|
month: monthName,
|
|
5298
5329
|
year
|
|
@@ -5304,14 +5335,14 @@ function getMessage($t, date, minDate, maxDate) {
|
|
|
5304
5335
|
monthName,
|
|
5305
5336
|
year
|
|
5306
5337
|
} = maxDate;
|
|
5307
|
-
return $
|
|
5338
|
+
return $t2("fkui.calendar.error.above-max-date", "Du kan inte välja en dag efter {{day}} {{month}} {{year}}", {
|
|
5308
5339
|
day,
|
|
5309
5340
|
month: monthName,
|
|
5310
5341
|
year
|
|
5311
5342
|
});
|
|
5312
5343
|
}
|
|
5313
5344
|
}
|
|
5314
|
-
const _sfc_main$
|
|
5345
|
+
const _sfc_main$13 = defineComponent({
|
|
5315
5346
|
name: "ICalendarNavbar",
|
|
5316
5347
|
components: {
|
|
5317
5348
|
FIcon
|
|
@@ -5425,14 +5456,14 @@ const _sfc_main$11 = defineComponent({
|
|
|
5425
5456
|
}
|
|
5426
5457
|
}
|
|
5427
5458
|
});
|
|
5428
|
-
const _hoisted_1$
|
|
5459
|
+
const _hoisted_1$P = {
|
|
5429
5460
|
class: "calendar-navbar"
|
|
5430
5461
|
};
|
|
5431
|
-
const _hoisted_2$
|
|
5462
|
+
const _hoisted_2$B = {
|
|
5432
5463
|
class: "calendar-navbar__month",
|
|
5433
5464
|
tabindex: "-1"
|
|
5434
5465
|
};
|
|
5435
|
-
const _hoisted_3$
|
|
5466
|
+
const _hoisted_3$t = ["aria-disabled", "aria-live"];
|
|
5436
5467
|
const _hoisted_4$o = {
|
|
5437
5468
|
class: "sr-only"
|
|
5438
5469
|
};
|
|
@@ -5442,7 +5473,7 @@ const _hoisted_6$f = {
|
|
|
5442
5473
|
};
|
|
5443
5474
|
function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5444
5475
|
const _component_f_icon = resolveComponent("f-icon");
|
|
5445
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5476
|
+
return openBlock(), createElementBlock("div", _hoisted_1$P, [createElementVNode("div", _hoisted_2$B, toDisplayString(_ctx.currentText), 1), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("button", {
|
|
5446
5477
|
ref: "previousButton",
|
|
5447
5478
|
class: "calendar-navbar__arrow calendar-navbar__arrow--previous",
|
|
5448
5479
|
type: "button",
|
|
@@ -5452,7 +5483,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5452
5483
|
}, [createElementVNode("span", _hoisted_4$o, toDisplayString(_ctx.previousSrText), 1), _cache[2] || (_cache[2] = createTextVNode()), createVNode(_component_f_icon, {
|
|
5453
5484
|
class: normalizeClass(_ctx.previousIconClasses),
|
|
5454
5485
|
name: "arrow-right"
|
|
5455
|
-
}, null, 8, ["class"])], 8, _hoisted_3$
|
|
5486
|
+
}, null, 8, ["class"])], 8, _hoisted_3$t), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("button", {
|
|
5456
5487
|
ref: "nextButton",
|
|
5457
5488
|
class: "calendar-navbar__arrow calendar-navbar__arrow--next",
|
|
5458
5489
|
type: "button",
|
|
@@ -5464,14 +5495,14 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5464
5495
|
name: "arrow-right"
|
|
5465
5496
|
}, null, 8, ["class"])], 8, _hoisted_5$j)]);
|
|
5466
5497
|
}
|
|
5467
|
-
const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5498
|
+
const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$R]]);
|
|
5468
5499
|
function getDayStartOffset(days) {
|
|
5469
5500
|
return days[0].weekDay - 1;
|
|
5470
5501
|
}
|
|
5471
5502
|
function getDayEndOffset(days) {
|
|
5472
5503
|
return 7 - days[days.length - 1].weekDay;
|
|
5473
5504
|
}
|
|
5474
|
-
const _sfc_main$
|
|
5505
|
+
const _sfc_main$12 = defineComponent({
|
|
5475
5506
|
name: "ICalendarMonthGrid",
|
|
5476
5507
|
props: {
|
|
5477
5508
|
/**
|
|
@@ -5542,14 +5573,14 @@ const _sfc_main$10 = defineComponent({
|
|
|
5542
5573
|
}
|
|
5543
5574
|
}
|
|
5544
5575
|
});
|
|
5545
|
-
const _hoisted_1$
|
|
5576
|
+
const _hoisted_1$O = {
|
|
5546
5577
|
key: 0,
|
|
5547
5578
|
class: "calendar-month__col--week"
|
|
5548
5579
|
};
|
|
5549
|
-
const _hoisted_2$
|
|
5580
|
+
const _hoisted_2$A = {
|
|
5550
5581
|
role: "presentation"
|
|
5551
5582
|
};
|
|
5552
|
-
const _hoisted_3$
|
|
5583
|
+
const _hoisted_3$s = {
|
|
5553
5584
|
role: "presentation"
|
|
5554
5585
|
};
|
|
5555
5586
|
const _hoisted_4$n = {
|
|
@@ -5562,7 +5593,7 @@ const _hoisted_5$i = ["title"];
|
|
|
5562
5593
|
const _hoisted_6$e = {
|
|
5563
5594
|
role: "presentation"
|
|
5564
5595
|
};
|
|
5565
|
-
const _hoisted_7$
|
|
5596
|
+
const _hoisted_7$d = {
|
|
5566
5597
|
key: 0,
|
|
5567
5598
|
class: "calendar-month__cell calendar-month__cell--week-number",
|
|
5568
5599
|
"aria-hidden": "true"
|
|
@@ -5585,7 +5616,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5585
5616
|
role: "application",
|
|
5586
5617
|
onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.onFocusin && _ctx.onFocusin(...args)),
|
|
5587
5618
|
onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onFocusout && _ctx.onFocusout(...args))
|
|
5588
|
-
}, [createElementVNode("colgroup", null, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("col", _hoisted_1$
|
|
5619
|
+
}, [createElementVNode("colgroup", null, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("col", _hoisted_1$O)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _cache[3] || (_cache[3] = createElementVNode("col", {
|
|
5589
5620
|
class: "calendar-month__col--day"
|
|
5590
5621
|
}, null, -1)), _cache[4] || (_cache[4] = createTextVNode()), _cache[5] || (_cache[5] = createElementVNode("col", {
|
|
5591
5622
|
class: "calendar-month__col--day"
|
|
@@ -5599,7 +5630,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5599
5630
|
class: "calendar-month__col--day"
|
|
5600
5631
|
}, null, -1)), _cache[14] || (_cache[14] = createTextVNode()), _cache[15] || (_cache[15] = createElementVNode("col", {
|
|
5601
5632
|
class: "calendar-month__col--day"
|
|
5602
|
-
}, null, -1))]), _cache[22] || (_cache[22] = createTextVNode()), createElementVNode("thead", _hoisted_2$
|
|
5633
|
+
}, null, -1))]), _cache[22] || (_cache[22] = createTextVNode()), createElementVNode("thead", _hoisted_2$A, [createElementVNode("tr", _hoisted_3$s, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("th", _hoisted_4$n)) : createCommentVNode("", true), _cache[16] || (_cache[16] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weekdays, (weekday) => {
|
|
5603
5634
|
return openBlock(), createElementBlock("th", {
|
|
5604
5635
|
key: weekday.name,
|
|
5605
5636
|
scope: "col",
|
|
@@ -5613,7 +5644,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5613
5644
|
return openBlock(), createElementBlock("tr", {
|
|
5614
5645
|
key: week.week,
|
|
5615
5646
|
role: "presentation"
|
|
5616
|
-
}, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("td", _hoisted_7$
|
|
5647
|
+
}, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("td", _hoisted_7$d, toDisplayString(week.week), 1)) : createCommentVNode("", true), _cache[17] || (_cache[17] = createTextVNode()), _ctx.getDayStartOffset(week.days) ? (openBlock(), createElementBlock("td", {
|
|
5617
5648
|
key: 1,
|
|
5618
5649
|
class: "calendar-month__cell",
|
|
5619
5650
|
colspan: _ctx.getDayStartOffset(week.days),
|
|
@@ -5643,7 +5674,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5643
5674
|
"aria-hidden": "true"
|
|
5644
5675
|
}, null, 8, _hoisted_13$1)])) : createCommentVNode("", true)])], 32);
|
|
5645
5676
|
}
|
|
5646
|
-
const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5677
|
+
const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$Q]]);
|
|
5647
5678
|
const DayStep = {
|
|
5648
5679
|
ArrowRight: 1,
|
|
5649
5680
|
ArrowLeft: -1,
|
|
@@ -5667,7 +5698,7 @@ function getDayTabindex(date, active, entry) {
|
|
|
5667
5698
|
return date.day === 1 ? 0 : -1;
|
|
5668
5699
|
}
|
|
5669
5700
|
}
|
|
5670
|
-
const _sfc_main
|
|
5701
|
+
const _sfc_main$11 = defineComponent({
|
|
5671
5702
|
name: "ICalendarMonth",
|
|
5672
5703
|
components: {
|
|
5673
5704
|
ICalendarMonthGrid
|
|
@@ -5753,7 +5784,7 @@ const _sfc_main$$ = defineComponent({
|
|
|
5753
5784
|
}
|
|
5754
5785
|
}
|
|
5755
5786
|
});
|
|
5756
|
-
const _hoisted_1$
|
|
5787
|
+
const _hoisted_1$N = ["data-date", "tabindex", "onClick", "onKeydown"];
|
|
5757
5788
|
function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5758
5789
|
const _component_i_calendar_month_grid = resolveComponent("i-calendar-month-grid");
|
|
5759
5790
|
return openBlock(), createBlock(_component_i_calendar_month_grid, {
|
|
@@ -5773,12 +5804,12 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5773
5804
|
}, [renderSlot(_ctx.$slots, "default", {
|
|
5774
5805
|
date,
|
|
5775
5806
|
isFocused: _ctx.isDayFocused(date)
|
|
5776
|
-
})], 40, _hoisted_1$
|
|
5807
|
+
})], 40, _hoisted_1$N)]),
|
|
5777
5808
|
_: 3
|
|
5778
5809
|
}, 8, ["value"]);
|
|
5779
5810
|
}
|
|
5780
|
-
const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
5781
|
-
const _sfc_main$
|
|
5811
|
+
const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$P]]);
|
|
5812
|
+
const _sfc_main$10 = defineComponent({
|
|
5782
5813
|
name: "FCalendar",
|
|
5783
5814
|
components: {
|
|
5784
5815
|
ICalendarNavbar,
|
|
@@ -5830,13 +5861,13 @@ const _sfc_main$_ = defineComponent({
|
|
|
5830
5861
|
}
|
|
5831
5862
|
}
|
|
5832
5863
|
});
|
|
5833
|
-
const _hoisted_1$
|
|
5864
|
+
const _hoisted_1$M = {
|
|
5834
5865
|
class: "calendar__wrapper"
|
|
5835
5866
|
};
|
|
5836
5867
|
function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5837
5868
|
const _component_i_calendar_navbar = resolveComponent("i-calendar-navbar");
|
|
5838
5869
|
const _component_i_calendar_month = resolveComponent("i-calendar-month");
|
|
5839
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5870
|
+
return openBlock(), createElementBlock("div", _hoisted_1$M, [createVNode(_component_i_calendar_navbar, {
|
|
5840
5871
|
"model-value": _ctx.modelValue,
|
|
5841
5872
|
"min-date": _ctx.minDate,
|
|
5842
5873
|
"max-date": _ctx.maxDate,
|
|
@@ -5859,7 +5890,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5859
5890
|
_: 3
|
|
5860
5891
|
}, 8, ["model-value", "min-date", "max-date", "tab-date", "onClick", "onUpdate:modelValue"])]);
|
|
5861
5892
|
}
|
|
5862
|
-
const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5893
|
+
const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$O]]);
|
|
5863
5894
|
function getCalendarDaySrText(day, enabled, selected, t) {
|
|
5864
5895
|
const parts = [];
|
|
5865
5896
|
if (!enabled) {
|
|
@@ -5878,7 +5909,7 @@ function getCalendarDaySrText(day, enabled, selected, t) {
|
|
|
5878
5909
|
parts.push(day.toString(DateFormat.FULL));
|
|
5879
5910
|
return parts.join(" ");
|
|
5880
5911
|
}
|
|
5881
|
-
const _sfc_main
|
|
5912
|
+
const _sfc_main$$ = defineComponent({
|
|
5882
5913
|
name: "FCalendarDay",
|
|
5883
5914
|
mixins: [TranslationMixin],
|
|
5884
5915
|
props: {
|
|
@@ -5943,18 +5974,18 @@ const _sfc_main$Z = defineComponent({
|
|
|
5943
5974
|
}
|
|
5944
5975
|
}
|
|
5945
5976
|
});
|
|
5946
|
-
const _hoisted_1$
|
|
5977
|
+
const _hoisted_1$L = {
|
|
5947
5978
|
"aria-hidden": "true"
|
|
5948
5979
|
};
|
|
5949
|
-
const _hoisted_2$
|
|
5980
|
+
const _hoisted_2$z = {
|
|
5950
5981
|
class: "sr-only"
|
|
5951
5982
|
};
|
|
5952
5983
|
function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5953
5984
|
return openBlock(), createElementBlock("span", {
|
|
5954
5985
|
class: normalizeClass(_ctx.dayClasses)
|
|
5955
|
-
}, [createElementVNode("span", _hoisted_1$
|
|
5986
|
+
}, [createElementVNode("span", _hoisted_1$L, toDisplayString(_ctx.day.day), 1), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_2$z, toDisplayString(_ctx.srText), 1)], 2);
|
|
5956
5987
|
}
|
|
5957
|
-
const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
5988
|
+
const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$N]]);
|
|
5958
5989
|
function offset(page, el) {
|
|
5959
5990
|
const rect = el.getBoundingClientRect();
|
|
5960
5991
|
return {
|
|
@@ -6239,7 +6270,7 @@ function isTeleportDisabled(options) {
|
|
|
6239
6270
|
}
|
|
6240
6271
|
return disableTeleport;
|
|
6241
6272
|
}
|
|
6242
|
-
const _sfc_main$
|
|
6273
|
+
const _sfc_main$_ = defineComponent({
|
|
6243
6274
|
name: "IPopup",
|
|
6244
6275
|
inheritAttrs: false,
|
|
6245
6276
|
props: {
|
|
@@ -6551,7 +6582,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6551
6582
|
placement: _ctx.placement
|
|
6552
6583
|
})))], 544)], 16)], 8, ["to", "disabled"])) : createCommentVNode("", true);
|
|
6553
6584
|
}
|
|
6554
|
-
const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6585
|
+
const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$M]]);
|
|
6555
6586
|
function isContextMenuTextItem(value) {
|
|
6556
6587
|
return typeof value.key === "string";
|
|
6557
6588
|
}
|
|
@@ -6599,7 +6630,7 @@ async function doMenuAction$2(action, target) {
|
|
|
6599
6630
|
}
|
|
6600
6631
|
const preventKeys$2 = ["Tab", "Up", "Down", "ArrowUp", "ArrowDown", "Home", "End", " ", "Spacebar", "Enter", "Escape"];
|
|
6601
6632
|
const keyUp = ["ArrowUp", "Up"];
|
|
6602
|
-
const _sfc_main$
|
|
6633
|
+
const _sfc_main$Z = defineComponent({
|
|
6603
6634
|
name: "FContextMenu",
|
|
6604
6635
|
components: {
|
|
6605
6636
|
IPopup,
|
|
@@ -6763,14 +6794,14 @@ const _sfc_main$X = defineComponent({
|
|
|
6763
6794
|
}
|
|
6764
6795
|
}
|
|
6765
6796
|
});
|
|
6766
|
-
const _hoisted_1$
|
|
6767
|
-
const _hoisted_2$
|
|
6797
|
+
const _hoisted_1$K = ["aria-label"];
|
|
6798
|
+
const _hoisted_2$y = {
|
|
6768
6799
|
ref: "contextmenu",
|
|
6769
6800
|
role: "menu",
|
|
6770
6801
|
tabindex: "-1",
|
|
6771
6802
|
class: "contextmenu__list"
|
|
6772
6803
|
};
|
|
6773
|
-
const _hoisted_3$
|
|
6804
|
+
const _hoisted_3$r = ["onClick"];
|
|
6774
6805
|
const _hoisted_4$m = ["tabindex"];
|
|
6775
6806
|
const _hoisted_5$h = {
|
|
6776
6807
|
key: 0,
|
|
@@ -6793,7 +6824,7 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6793
6824
|
"aria-label": _ctx.ariaLabel,
|
|
6794
6825
|
onKeyup: _cache[0] || (_cache[0] = (...args) => _ctx.onKeyUp && _ctx.onKeyUp(...args)),
|
|
6795
6826
|
onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.onKeyDown && _ctx.onKeyDown(...args))
|
|
6796
|
-
}, [createElementVNode("ul", _hoisted_2$
|
|
6827
|
+
}, [createElementVNode("ul", _hoisted_2$y, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.popupItems, (item, index) => {
|
|
6797
6828
|
return openBlock(), createElementBlock("li", {
|
|
6798
6829
|
key: item.key,
|
|
6799
6830
|
role: "menuitem",
|
|
@@ -6811,13 +6842,13 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6811
6842
|
}, null, 8, ["name", "library"])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), createElementVNode("a", {
|
|
6812
6843
|
ref_for: true,
|
|
6813
6844
|
ref: "anchors"
|
|
6814
|
-
}, toDisplayString(item.label), 513)], 8, _hoisted_4$m), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasSeparatorAfterItemAt(index) ? (openBlock(), createElementBlock("hr", _hoisted_5$h)) : createCommentVNode("", true)], 8, _hoisted_3$
|
|
6815
|
-
}), 128))], 512)], 40, _hoisted_1$
|
|
6845
|
+
}, toDisplayString(item.label), 513)], 8, _hoisted_4$m), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasSeparatorAfterItemAt(index) ? (openBlock(), createElementBlock("hr", _hoisted_5$h)) : createCommentVNode("", true)], 8, _hoisted_3$r);
|
|
6846
|
+
}), 128))], 512)], 40, _hoisted_1$K)]),
|
|
6816
6847
|
_: 1
|
|
6817
6848
|
}, 8, ["is-open", "anchor", "focus-element"]);
|
|
6818
6849
|
}
|
|
6819
|
-
const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6820
|
-
const _sfc_main$
|
|
6850
|
+
const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$L]]);
|
|
6851
|
+
const _sfc_main$Y = defineComponent({
|
|
6821
6852
|
name: "FExpand",
|
|
6822
6853
|
data() {
|
|
6823
6854
|
return {
|
|
@@ -6883,7 +6914,7 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6883
6914
|
_: 3
|
|
6884
6915
|
}, 8, ["onEnter", "onAfterEnter", "onLeave"]);
|
|
6885
6916
|
}
|
|
6886
|
-
const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6917
|
+
const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$K]]);
|
|
6887
6918
|
function computeArrowOffset(placement, inputIconRect, wrapperRect) {
|
|
6888
6919
|
switch (placement) {
|
|
6889
6920
|
case Placement.A: {
|
|
@@ -6947,7 +6978,7 @@ function computeArrowOffset(placement, inputIconRect, wrapperRect) {
|
|
|
6947
6978
|
}
|
|
6948
6979
|
}
|
|
6949
6980
|
const POPUP_SPACING = 10;
|
|
6950
|
-
const _sfc_main$
|
|
6981
|
+
const _sfc_main$X = defineComponent({
|
|
6951
6982
|
name: "IPopupError",
|
|
6952
6983
|
components: {
|
|
6953
6984
|
FIcon
|
|
@@ -7082,7 +7113,7 @@ const _sfc_main$V = defineComponent({
|
|
|
7082
7113
|
}
|
|
7083
7114
|
}
|
|
7084
7115
|
});
|
|
7085
|
-
const _hoisted_1$
|
|
7116
|
+
const _hoisted_1$J = {
|
|
7086
7117
|
ref: "wrapper",
|
|
7087
7118
|
class: "popup-error__wrapper"
|
|
7088
7119
|
};
|
|
@@ -7096,7 +7127,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7096
7127
|
ref: "popup",
|
|
7097
7128
|
class: normalizeClass(_ctx.popupClasses),
|
|
7098
7129
|
"aria-hidden": "true"
|
|
7099
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
7130
|
+
}, [createElementVNode("div", _hoisted_1$J, [createElementVNode("div", {
|
|
7100
7131
|
class: normalizeClass(_ctx.arrowClass),
|
|
7101
7132
|
style: normalizeStyle(_ctx.errorStyle)
|
|
7102
7133
|
}, [createElementVNode("span", null, toDisplayString(_ctx.errorMessage), 1), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("button", {
|
|
@@ -7110,7 +7141,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7110
7141
|
class: "button__icon"
|
|
7111
7142
|
})])], 6)], 512)], 2)], 8, ["disabled"])) : createCommentVNode("", true);
|
|
7112
7143
|
}
|
|
7113
|
-
const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7144
|
+
const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$J]]);
|
|
7114
7145
|
function useEventListener(target, event, callback) {
|
|
7115
7146
|
onMounted(() => {
|
|
7116
7147
|
var _a;
|
|
@@ -7131,15 +7162,16 @@ function useSlotUtils() {
|
|
|
7131
7162
|
}
|
|
7132
7163
|
};
|
|
7133
7164
|
}
|
|
7134
|
-
function numItems(itemHeight, availableHeight) {
|
|
7135
|
-
|
|
7165
|
+
function numItems(itemHeight, availableHeight, verticalSpacing) {
|
|
7166
|
+
const itemsFit = Math.floor((availableHeight - verticalSpacing) / itemHeight);
|
|
7167
|
+
return Math.min(itemsFit, 7);
|
|
7136
7168
|
}
|
|
7137
|
-
function tryBelow(itemHeight, numOfItems, anchor, viewport) {
|
|
7169
|
+
function tryBelow(itemHeight, numOfItems, anchor, viewport, verticalSpacing) {
|
|
7138
7170
|
const p1 = viewport.y + viewport.height;
|
|
7139
7171
|
const p2 = anchor.y + anchor.height;
|
|
7140
7172
|
const availableHeight = p1 - p2;
|
|
7141
|
-
const itemsFit = numItems(itemHeight, availableHeight);
|
|
7142
|
-
if (itemsFit <
|
|
7173
|
+
const itemsFit = numItems(itemHeight, availableHeight, verticalSpacing);
|
|
7174
|
+
if (itemsFit < 3) {
|
|
7143
7175
|
return void 0;
|
|
7144
7176
|
}
|
|
7145
7177
|
const fittedHeight = itemHeight * Math.min(numOfItems, itemsFit);
|
|
@@ -7150,18 +7182,18 @@ function tryBelow(itemHeight, numOfItems, anchor, viewport) {
|
|
|
7150
7182
|
height: fittedHeight
|
|
7151
7183
|
};
|
|
7152
7184
|
}
|
|
7153
|
-
function tryAbove(itemHeight, numOfItems, anchor, viewport) {
|
|
7185
|
+
function tryAbove(itemHeight, numOfItems, anchor, viewport, verticalSpacing) {
|
|
7154
7186
|
const p1 = viewport.y;
|
|
7155
7187
|
const p2 = anchor.y;
|
|
7156
7188
|
const availableHeight = p2 - p1;
|
|
7157
|
-
const itemsFit = numItems(itemHeight, availableHeight);
|
|
7158
|
-
if (itemsFit <
|
|
7189
|
+
const itemsFit = numItems(itemHeight, availableHeight, verticalSpacing);
|
|
7190
|
+
if (itemsFit < 3) {
|
|
7159
7191
|
return void 0;
|
|
7160
7192
|
}
|
|
7161
7193
|
const fittedHeight = itemHeight * Math.min(numOfItems, itemsFit);
|
|
7162
7194
|
return {
|
|
7163
7195
|
left: anchor.x,
|
|
7164
|
-
top: anchor.y - fittedHeight,
|
|
7196
|
+
top: anchor.y - fittedHeight - verticalSpacing,
|
|
7165
7197
|
width: anchor.width,
|
|
7166
7198
|
height: fittedHeight
|
|
7167
7199
|
};
|
|
@@ -7172,7 +7204,8 @@ function computeListboxRect(anchor, options, root = document.documentElement, {
|
|
|
7172
7204
|
} = window) {
|
|
7173
7205
|
const {
|
|
7174
7206
|
itemHeight,
|
|
7175
|
-
numOfItems
|
|
7207
|
+
numOfItems,
|
|
7208
|
+
verticalSpacing
|
|
7176
7209
|
} = options;
|
|
7177
7210
|
const rect = anchor.getBoundingClientRect();
|
|
7178
7211
|
const anchorRect = {
|
|
@@ -7185,19 +7218,22 @@ function computeListboxRect(anchor, options, root = document.documentElement, {
|
|
|
7185
7218
|
y: scrollY,
|
|
7186
7219
|
height: root.clientHeight
|
|
7187
7220
|
};
|
|
7188
|
-
const
|
|
7189
|
-
if (
|
|
7190
|
-
return
|
|
7221
|
+
const below = tryBelow(itemHeight, numOfItems, anchorRect, viewportRect, verticalSpacing);
|
|
7222
|
+
if (below) {
|
|
7223
|
+
return below;
|
|
7191
7224
|
}
|
|
7192
|
-
const
|
|
7193
|
-
if (
|
|
7194
|
-
return
|
|
7225
|
+
const above = tryAbove(itemHeight, numOfItems, anchorRect, viewportRect, verticalSpacing);
|
|
7226
|
+
if (above) {
|
|
7227
|
+
return above;
|
|
7195
7228
|
}
|
|
7196
7229
|
return void 0;
|
|
7197
7230
|
}
|
|
7198
|
-
const _hoisted_1$
|
|
7231
|
+
const _hoisted_1$I = ["onKeyup"];
|
|
7232
|
+
const _hoisted_2$x = {
|
|
7233
|
+
ref: "content"
|
|
7234
|
+
};
|
|
7199
7235
|
const teleportDisabled = false;
|
|
7200
|
-
const _sfc_main$
|
|
7236
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
7201
7237
|
__name: "IPopupListbox",
|
|
7202
7238
|
props: {
|
|
7203
7239
|
isOpen: {
|
|
@@ -7205,21 +7241,39 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7205
7241
|
},
|
|
7206
7242
|
anchor: {},
|
|
7207
7243
|
numOfItems: {},
|
|
7208
|
-
itemHeight: {}
|
|
7244
|
+
itemHeight: {},
|
|
7245
|
+
activeElement: {}
|
|
7209
7246
|
},
|
|
7210
7247
|
emits: ["close"],
|
|
7211
7248
|
setup(__props, {
|
|
7212
7249
|
emit: __emit
|
|
7213
7250
|
}) {
|
|
7214
7251
|
const emit = __emit;
|
|
7215
|
-
const
|
|
7216
|
-
const
|
|
7252
|
+
const wrapperRef = useTemplateRef("wrapper");
|
|
7253
|
+
const contentRef = useTemplateRef("content");
|
|
7217
7254
|
const popupClasses = ["popup", "popup--overlay"];
|
|
7218
7255
|
const teleportTarget = computed(() => {
|
|
7219
7256
|
var _config$popupTarget;
|
|
7220
7257
|
return (_config$popupTarget = config.popupTarget) !== null && _config$popupTarget !== void 0 ? _config$popupTarget : config.teleportTarget;
|
|
7221
7258
|
});
|
|
7259
|
+
let guessedItemHeight = void 0;
|
|
7260
|
+
let verticalSpacing = void 0;
|
|
7222
7261
|
useEventListener(__props.anchor, "keyup", onKeyEsc);
|
|
7262
|
+
watchEffect(() => {
|
|
7263
|
+
if (wrapperRef.value && __props.activeElement !== void 0) {
|
|
7264
|
+
const centerPosition = __props.activeElement.offsetTop - (wrapperRef.value.getBoundingClientRect().height - __props.activeElement.getBoundingClientRect().height) / 2;
|
|
7265
|
+
if (!isElementInsideViewport(wrapperRef.value)) {
|
|
7266
|
+
wrapperRef.value.scrollIntoView({
|
|
7267
|
+
behavior: "instant",
|
|
7268
|
+
block: "nearest"
|
|
7269
|
+
});
|
|
7270
|
+
}
|
|
7271
|
+
wrapperRef.value.scrollTo({
|
|
7272
|
+
top: centerPosition,
|
|
7273
|
+
behavior: "instant"
|
|
7274
|
+
});
|
|
7275
|
+
}
|
|
7276
|
+
});
|
|
7223
7277
|
function addListeners() {
|
|
7224
7278
|
document.addEventListener("click", onDocumentClickHandler);
|
|
7225
7279
|
window.addEventListener("resize", debounce(onResize, 100));
|
|
@@ -7228,6 +7282,14 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7228
7282
|
document.removeEventListener("click", onDocumentClickHandler);
|
|
7229
7283
|
window.removeEventListener("resize", debounce(onResize, 100));
|
|
7230
7284
|
}
|
|
7285
|
+
function isElementInsideViewport(element) {
|
|
7286
|
+
const rect = element.getBoundingClientRect();
|
|
7287
|
+
const windowHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
7288
|
+
const windowWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
7289
|
+
const insideX = rect.left >= 0 && rect.left + rect.width <= windowWidth;
|
|
7290
|
+
const insideY = rect.top >= 0 && rect.top + rect.height <= windowHeight;
|
|
7291
|
+
return insideX && insideY;
|
|
7292
|
+
}
|
|
7231
7293
|
watchEffect(() => {
|
|
7232
7294
|
if (__props.isOpen) {
|
|
7233
7295
|
calculatePosition();
|
|
@@ -7240,6 +7302,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7240
7302
|
removeListeners();
|
|
7241
7303
|
}
|
|
7242
7304
|
});
|
|
7305
|
+
watch(() => __props.numOfItems, (oldValue, newValue) => {
|
|
7306
|
+
if (oldValue !== newValue && __props.isOpen) {
|
|
7307
|
+
calculatePosition();
|
|
7308
|
+
}
|
|
7309
|
+
});
|
|
7243
7310
|
onUnmounted(removeListeners);
|
|
7244
7311
|
function onDocumentClickHandler() {
|
|
7245
7312
|
emit("close");
|
|
@@ -7260,21 +7327,30 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7260
7327
|
async function calculatePosition() {
|
|
7261
7328
|
var _a;
|
|
7262
7329
|
await nextTick();
|
|
7263
|
-
const wrapperElement =
|
|
7264
|
-
const contentWrapper =
|
|
7330
|
+
const wrapperElement = wrapperRef.value;
|
|
7331
|
+
const contentWrapper = contentRef.value;
|
|
7265
7332
|
if (!__props.anchor || !wrapperElement || !contentWrapper) {
|
|
7266
7333
|
return;
|
|
7267
7334
|
}
|
|
7268
7335
|
let contentItemHeigth = __props.itemHeight;
|
|
7269
7336
|
if (!contentItemHeigth) {
|
|
7270
|
-
|
|
7337
|
+
if (!guessedItemHeight) {
|
|
7338
|
+
guessedItemHeight = guessItemHeight(__props.numOfItems, contentWrapper);
|
|
7339
|
+
}
|
|
7340
|
+
contentItemHeigth = guessedItemHeight;
|
|
7341
|
+
}
|
|
7342
|
+
if (verticalSpacing === void 0) {
|
|
7343
|
+
const absWrapper = getAbsolutePosition(wrapperElement);
|
|
7344
|
+
const marginTotal = absWrapper.y * 2;
|
|
7345
|
+
verticalSpacing = Math.ceil(absWrapper.height - contentItemHeigth * __props.numOfItems) + marginTotal;
|
|
7271
7346
|
}
|
|
7272
7347
|
wrapperElement.style.overflowY = "auto";
|
|
7273
|
-
wrapperElement.style.
|
|
7274
|
-
wrapperElement.style.
|
|
7348
|
+
wrapperElement.style.overflowX = "hidden";
|
|
7349
|
+
wrapperElement.style.left = "0px";
|
|
7275
7350
|
const rect = computeListboxRect(__props.anchor, {
|
|
7276
7351
|
itemHeight: contentItemHeigth,
|
|
7277
|
-
numOfItems: __props.numOfItems
|
|
7352
|
+
numOfItems: __props.numOfItems,
|
|
7353
|
+
verticalSpacing
|
|
7278
7354
|
});
|
|
7279
7355
|
if (rect) {
|
|
7280
7356
|
var _offsetRect$x;
|
|
@@ -7288,8 +7364,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7288
7364
|
const offsetLeft = (_offsetRect$x = offsetRect == null ? void 0 : offsetRect.x) !== null && _offsetRect$x !== void 0 ? _offsetRect$x : 0;
|
|
7289
7365
|
wrapperElement.style.top = `${top}px`;
|
|
7290
7366
|
wrapperElement.style.left = `${left - offsetLeft}px`;
|
|
7291
|
-
wrapperElement.style.
|
|
7292
|
-
|
|
7367
|
+
wrapperElement.style.width = `${width}px`;
|
|
7368
|
+
contentWrapper.style.maxHeight = `${height}px`;
|
|
7369
|
+
contentWrapper.style.width = `${width}px`;
|
|
7293
7370
|
}
|
|
7294
7371
|
}
|
|
7295
7372
|
return (_ctx, _cache) => {
|
|
@@ -7301,17 +7378,14 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
7301
7378
|
ref: "popup",
|
|
7302
7379
|
class: normalizeClass(popupClasses)
|
|
7303
7380
|
}, [createElementVNode("div", mergeProps({
|
|
7304
|
-
|
|
7305
|
-
ref: wrapper
|
|
7381
|
+
ref: "wrapper"
|
|
7306
7382
|
}, _ctx.$attrs, {
|
|
7307
7383
|
class: "popup__wrapper",
|
|
7384
|
+
tabindex: "0",
|
|
7308
7385
|
onKeyup: withKeys(withModifiers(onKeyEsc, ["stop"]), ["esc"]),
|
|
7309
7386
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
7310
7387
|
}, ["stop"]))
|
|
7311
|
-
}), [createElementVNode("div",
|
|
7312
|
-
ref_key: "content",
|
|
7313
|
-
ref: content
|
|
7314
|
-
}, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$G)], 512)], 8, ["to"])) : createCommentVNode("", true);
|
|
7388
|
+
}), [createElementVNode("div", _hoisted_2$x, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$I)], 512)], 8, ["to"])) : createCommentVNode("", true);
|
|
7315
7389
|
};
|
|
7316
7390
|
}
|
|
7317
7391
|
});
|
|
@@ -7355,7 +7429,7 @@ async function doMenuAction$1(action, target) {
|
|
|
7355
7429
|
}
|
|
7356
7430
|
}
|
|
7357
7431
|
const preventKeys$1 = ["Tab", "Up", "Down", "ArrowUp", "ArrowDown", "Home", "End", " ", "Spacebar", "Enter"];
|
|
7358
|
-
const _sfc_main$
|
|
7432
|
+
const _sfc_main$V = defineComponent({
|
|
7359
7433
|
name: "IPopupMenu",
|
|
7360
7434
|
components: {
|
|
7361
7435
|
IPopup
|
|
@@ -7611,12 +7685,12 @@ const _sfc_main$T = defineComponent({
|
|
|
7611
7685
|
}
|
|
7612
7686
|
}
|
|
7613
7687
|
});
|
|
7614
|
-
const _hoisted_1$
|
|
7615
|
-
const _hoisted_2$
|
|
7688
|
+
const _hoisted_1$H = ["aria-label"];
|
|
7689
|
+
const _hoisted_2$w = {
|
|
7616
7690
|
role: "menu",
|
|
7617
7691
|
class: "ipopupmenu__list"
|
|
7618
7692
|
};
|
|
7619
|
-
const _hoisted_3$
|
|
7693
|
+
const _hoisted_3$q = ["onClick"];
|
|
7620
7694
|
const _hoisted_4$l = ["data-ref-index", "href", "target"];
|
|
7621
7695
|
const _hoisted_5$g = {
|
|
7622
7696
|
key: 0,
|
|
@@ -7637,7 +7711,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7637
7711
|
default: withCtx(() => [createElementVNode("nav", {
|
|
7638
7712
|
class: "ipopupmenu ipopupmenu--vertical",
|
|
7639
7713
|
"aria-label": _ctx.ariaLabel
|
|
7640
|
-
}, [createElementVNode("ul", _hoisted_2$
|
|
7714
|
+
}, [createElementVNode("ul", _hoisted_2$w, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
|
|
7641
7715
|
return openBlock(), createElementBlock("li", {
|
|
7642
7716
|
ref_for: true,
|
|
7643
7717
|
ref: "items",
|
|
@@ -7653,18 +7727,18 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7653
7727
|
role: "menuitem",
|
|
7654
7728
|
target: item.target,
|
|
7655
7729
|
tabindex: "0"
|
|
7656
|
-
}, [_ctx.isSelected(index) ? (openBlock(), createElementBlock("span", _hoisted_5$g, [createElementVNode("span", null, toDisplayString(_ctx.selectedMenuItemScreenReaderText) + " ", 1)])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)], 8, _hoisted_4$l)], 10, _hoisted_3$
|
|
7657
|
-
}), 128))])], 8, _hoisted_1$
|
|
7730
|
+
}, [_ctx.isSelected(index) ? (openBlock(), createElementBlock("span", _hoisted_5$g, [createElementVNode("span", null, toDisplayString(_ctx.selectedMenuItemScreenReaderText) + " ", 1)])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)], 8, _hoisted_4$l)], 10, _hoisted_3$q);
|
|
7731
|
+
}), 128))])], 8, _hoisted_1$H)]),
|
|
7658
7732
|
_: 1
|
|
7659
7733
|
}, 8, ["is-open", "anchor", "focus-element", "onKeyup", "onKeydown"]);
|
|
7660
7734
|
}
|
|
7661
|
-
const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7735
|
+
const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$I]]);
|
|
7662
7736
|
const ANIMATION_DURATION = 500;
|
|
7663
7737
|
const NO_CSS_CLASSES = "";
|
|
7664
7738
|
const CLOSED_CSS_CLASS_OPACITY = "animate-expand animate-expand--opacity";
|
|
7665
7739
|
const CLOSED_CSS_CLASS = "animate-expand";
|
|
7666
7740
|
const ANIMATION_CSS_CLASSES = "animate-expand animate-expand--expanded";
|
|
7667
|
-
const _sfc_main$
|
|
7741
|
+
const _sfc_main$U = defineComponent({
|
|
7668
7742
|
name: "IAnimateExpand",
|
|
7669
7743
|
props: {
|
|
7670
7744
|
/**
|
|
@@ -7856,7 +7930,7 @@ const _sfc_main$S = defineComponent({
|
|
|
7856
7930
|
}
|
|
7857
7931
|
}
|
|
7858
7932
|
});
|
|
7859
|
-
const _hoisted_1$
|
|
7933
|
+
const _hoisted_1$G = {
|
|
7860
7934
|
key: 0,
|
|
7861
7935
|
ref: "content",
|
|
7862
7936
|
"data-test": "animation-content"
|
|
@@ -7865,10 +7939,10 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7865
7939
|
return openBlock(), createElementBlock("div", {
|
|
7866
7940
|
class: normalizeClass(_ctx.animationClasses),
|
|
7867
7941
|
style: normalizeStyle(_ctx.heightStyle)
|
|
7868
|
-
}, [_ctx.shouldVIf ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
7942
|
+
}, [_ctx.shouldVIf ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$G, [renderSlot(_ctx.$slots, "default")], 512)), [[vShow, _ctx.shouldVShow]]) : createCommentVNode("", true)], 6);
|
|
7869
7943
|
}
|
|
7870
|
-
const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7871
|
-
const _sfc_main$
|
|
7944
|
+
const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$H]]);
|
|
7945
|
+
const _sfc_main$T = defineComponent({
|
|
7872
7946
|
name: "ISkipLink",
|
|
7873
7947
|
mixins: [TranslationMixin],
|
|
7874
7948
|
props: {
|
|
@@ -7882,14 +7956,355 @@ const _sfc_main$R = defineComponent({
|
|
|
7882
7956
|
}
|
|
7883
7957
|
}
|
|
7884
7958
|
});
|
|
7885
|
-
const _hoisted_1$
|
|
7959
|
+
const _hoisted_1$F = ["href"];
|
|
7886
7960
|
function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7887
7961
|
return openBlock(), createElementBlock("a", {
|
|
7888
7962
|
class: "iskiplink",
|
|
7889
7963
|
href: _ctx.href
|
|
7890
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$
|
|
7964
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$F);
|
|
7965
|
+
}
|
|
7966
|
+
const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$G]]);
|
|
7967
|
+
function filterOptions(options, filter2, selectMode) {
|
|
7968
|
+
if (isEmpty(filter2) || selectMode) {
|
|
7969
|
+
return options;
|
|
7970
|
+
}
|
|
7971
|
+
const filterLowerCased = filter2.toLowerCase();
|
|
7972
|
+
return options.filter((it) => it.toLowerCase().indexOf(filterLowerCased) > -1);
|
|
7973
|
+
}
|
|
7974
|
+
const $t = useTranslate();
|
|
7975
|
+
function useCombobox(inputRef, options, onOptionSelected) {
|
|
7976
|
+
if (!options) {
|
|
7977
|
+
return {
|
|
7978
|
+
dropdownId: "",
|
|
7979
|
+
dropdownIsOpen: ref(false),
|
|
7980
|
+
dropdownOptions: ref([]),
|
|
7981
|
+
activeOptionId: "",
|
|
7982
|
+
activeOption: ref(null),
|
|
7983
|
+
toggleDropdown() {
|
|
7984
|
+
},
|
|
7985
|
+
selectOption() {
|
|
7986
|
+
},
|
|
7987
|
+
closeDropdown() {
|
|
7988
|
+
}
|
|
7989
|
+
};
|
|
7990
|
+
}
|
|
7991
|
+
useEventListener(inputRef, "click", onInputClick);
|
|
7992
|
+
useEventListener(inputRef, "focus", onInputFocus);
|
|
7993
|
+
useEventListener(inputRef, "keydown", onInputKeyDown);
|
|
7994
|
+
useEventListener(inputRef, "keyup", onInputKeyUp);
|
|
7995
|
+
const dropdownId = ElementIdService.generateElementId();
|
|
7996
|
+
const dropdownIsOpen = ref(false);
|
|
7997
|
+
const activeOptionId = ElementIdService.generateElementId();
|
|
7998
|
+
const activeOption = ref(null);
|
|
7999
|
+
const filter2 = ref("");
|
|
8000
|
+
const selectMode = ref(false);
|
|
8001
|
+
const selectedOption = ref(null);
|
|
8002
|
+
const dropdownOptions = computed(() => {
|
|
8003
|
+
return filterOptions(options, filter2.value, selectMode.value);
|
|
8004
|
+
});
|
|
8005
|
+
const hasOptions = computed(() => {
|
|
8006
|
+
return dropdownOptions.value.length > 0;
|
|
8007
|
+
});
|
|
8008
|
+
const hasMultipleOptions = computed(() => {
|
|
8009
|
+
return dropdownOptions.value.length > 1;
|
|
8010
|
+
});
|
|
8011
|
+
watchEffect(() => {
|
|
8012
|
+
if (!inputRef.value) {
|
|
8013
|
+
return;
|
|
8014
|
+
}
|
|
8015
|
+
inputRef.value.setAttribute("aria-expanded", `${dropdownIsOpen.value}`);
|
|
8016
|
+
if (dropdownIsOpen.value) {
|
|
8017
|
+
inputRef.value.setAttribute("aria-controls", dropdownId);
|
|
8018
|
+
} else {
|
|
8019
|
+
inputRef.value.removeAttribute("aria-controls");
|
|
8020
|
+
}
|
|
8021
|
+
});
|
|
8022
|
+
watchEffect(async () => {
|
|
8023
|
+
if (!inputRef.value) {
|
|
8024
|
+
return;
|
|
8025
|
+
}
|
|
8026
|
+
if (activeOption.value) {
|
|
8027
|
+
inputRef.value.setAttribute("aria-activedescendant", activeOptionId);
|
|
8028
|
+
} else {
|
|
8029
|
+
inputRef.value.removeAttribute("aria-activedescendant");
|
|
8030
|
+
}
|
|
8031
|
+
});
|
|
8032
|
+
watchEffect(() => {
|
|
8033
|
+
if (!inputRef.value) {
|
|
8034
|
+
return;
|
|
8035
|
+
}
|
|
8036
|
+
let description = selectMode.value ? `${$t("fkui.combobox.selected", "Valt förslag")} ` : "";
|
|
8037
|
+
if (isEmpty(filter2.value) || selectMode.value) {
|
|
8038
|
+
description += $t("fkui.combobox.listDetails", `Det finns {{ count }} förslag. Använd uppåtpil och nedåtpil för att navigera bland förslagen.`, {
|
|
8039
|
+
count: options.length
|
|
8040
|
+
});
|
|
8041
|
+
} else if (hasOptions.value) {
|
|
8042
|
+
description += $t("fkui.combobox.matchesListDetails", `Det finns {{ count }} förslag som matchar. Använd uppåtpil och nedåtpil för att navigera bland förslagen.`, {
|
|
8043
|
+
count: dropdownOptions.value.length
|
|
8044
|
+
});
|
|
8045
|
+
} else {
|
|
8046
|
+
description = $t("fkui.combobox.noMatchesListDetails", "Det finns inga förslag som matchar.");
|
|
8047
|
+
}
|
|
8048
|
+
inputRef.value.setAttribute("aria-description", description);
|
|
8049
|
+
});
|
|
8050
|
+
onMounted(() => {
|
|
8051
|
+
if (!inputRef.value) {
|
|
8052
|
+
throw new Error("missing input ref");
|
|
8053
|
+
}
|
|
8054
|
+
filter2.value = inputRef.value.value;
|
|
8055
|
+
inputRef.value.setAttribute("role", "combobox");
|
|
8056
|
+
inputRef.value.setAttribute("aria-autocomplete", "list");
|
|
8057
|
+
});
|
|
8058
|
+
return {
|
|
8059
|
+
dropdownId,
|
|
8060
|
+
dropdownIsOpen,
|
|
8061
|
+
dropdownOptions,
|
|
8062
|
+
activeOptionId,
|
|
8063
|
+
activeOption,
|
|
8064
|
+
toggleDropdown,
|
|
8065
|
+
selectOption,
|
|
8066
|
+
closeDropdown: close
|
|
8067
|
+
};
|
|
8068
|
+
function selectOption(value) {
|
|
8069
|
+
selectedOption.value = value;
|
|
8070
|
+
if (selectedOption.value) {
|
|
8071
|
+
close();
|
|
8072
|
+
filter2.value = selectedOption.value;
|
|
8073
|
+
selectMode.value = true;
|
|
8074
|
+
if (onOptionSelected) {
|
|
8075
|
+
onOptionSelected(value);
|
|
8076
|
+
}
|
|
8077
|
+
}
|
|
8078
|
+
}
|
|
8079
|
+
async function openSelected(fallback = null) {
|
|
8080
|
+
var _a;
|
|
8081
|
+
if (hasOptions.value) {
|
|
8082
|
+
dropdownIsOpen.value = true;
|
|
8083
|
+
await nextTick();
|
|
8084
|
+
if (selectMode.value) {
|
|
8085
|
+
activeOption.value = filter2.value;
|
|
8086
|
+
} else if (fallback === "first") {
|
|
8087
|
+
activeOption.value = dropdownOptions.value[0];
|
|
8088
|
+
} else if (fallback === "last") {
|
|
8089
|
+
activeOption.value = dropdownOptions.value[dropdownOptions.value.length - 1];
|
|
8090
|
+
} else {
|
|
8091
|
+
activeOption.value = null;
|
|
8092
|
+
}
|
|
8093
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
8094
|
+
}
|
|
8095
|
+
}
|
|
8096
|
+
function close() {
|
|
8097
|
+
dropdownIsOpen.value = false;
|
|
8098
|
+
activeOption.value = null;
|
|
8099
|
+
}
|
|
8100
|
+
function toggleDropdown() {
|
|
8101
|
+
if (!dropdownIsOpen.value) {
|
|
8102
|
+
openSelected();
|
|
8103
|
+
} else {
|
|
8104
|
+
close();
|
|
8105
|
+
}
|
|
8106
|
+
}
|
|
8107
|
+
function setNextOption() {
|
|
8108
|
+
if (activeOption.value && hasMultipleOptions.value) {
|
|
8109
|
+
const index = dropdownOptions.value.indexOf(activeOption.value);
|
|
8110
|
+
if (index === dropdownOptions.value.length - 1) {
|
|
8111
|
+
activeOption.value = dropdownOptions.value[0];
|
|
8112
|
+
} else {
|
|
8113
|
+
activeOption.value = dropdownOptions.value[index + 1];
|
|
8114
|
+
}
|
|
8115
|
+
} else {
|
|
8116
|
+
activeOption.value = dropdownOptions.value[0];
|
|
8117
|
+
}
|
|
8118
|
+
}
|
|
8119
|
+
function setPreviousOption() {
|
|
8120
|
+
if (activeOption.value && hasMultipleOptions.value) {
|
|
8121
|
+
const index = dropdownOptions.value.indexOf(activeOption.value);
|
|
8122
|
+
if (index === 0) {
|
|
8123
|
+
activeOption.value = dropdownOptions.value[dropdownOptions.value.length - 1];
|
|
8124
|
+
} else {
|
|
8125
|
+
activeOption.value = dropdownOptions.value[index - 1];
|
|
8126
|
+
}
|
|
8127
|
+
} else {
|
|
8128
|
+
activeOption.value = dropdownOptions.value[dropdownOptions.value.length - 1];
|
|
8129
|
+
}
|
|
8130
|
+
}
|
|
8131
|
+
function onInputClick() {
|
|
8132
|
+
toggleDropdown();
|
|
8133
|
+
}
|
|
8134
|
+
async function onInputFocus() {
|
|
8135
|
+
var _a;
|
|
8136
|
+
var _inputRef$value$value, _options$includes;
|
|
8137
|
+
await nextTick();
|
|
8138
|
+
filter2.value = (_inputRef$value$value = (_a = inputRef.value) == null ? void 0 : _a.value) !== null && _inputRef$value$value !== void 0 ? _inputRef$value$value : "";
|
|
8139
|
+
selectMode.value = (_options$includes = options == null ? void 0 : options.includes(filter2.value)) !== null && _options$includes !== void 0 ? _options$includes : false;
|
|
8140
|
+
}
|
|
8141
|
+
async function onInputKeyDown(event) {
|
|
8142
|
+
let flag = false;
|
|
8143
|
+
if (event.ctrlKey || event.shiftKey) {
|
|
8144
|
+
return;
|
|
8145
|
+
}
|
|
8146
|
+
switch (event.key) {
|
|
8147
|
+
case "Enter":
|
|
8148
|
+
if (dropdownIsOpen.value) {
|
|
8149
|
+
if (activeOption.value) {
|
|
8150
|
+
selectOption(activeOption.value);
|
|
8151
|
+
flag = true;
|
|
8152
|
+
}
|
|
8153
|
+
close();
|
|
8154
|
+
} else {
|
|
8155
|
+
openSelected();
|
|
8156
|
+
}
|
|
8157
|
+
break;
|
|
8158
|
+
case "Down":
|
|
8159
|
+
case "ArrowDown":
|
|
8160
|
+
if (dropdownIsOpen.value) {
|
|
8161
|
+
setNextOption();
|
|
8162
|
+
} else {
|
|
8163
|
+
openSelected("first");
|
|
8164
|
+
}
|
|
8165
|
+
flag = true;
|
|
8166
|
+
break;
|
|
8167
|
+
case "Up":
|
|
8168
|
+
case "ArrowUp":
|
|
8169
|
+
if (dropdownIsOpen.value) {
|
|
8170
|
+
setPreviousOption();
|
|
8171
|
+
} else {
|
|
8172
|
+
openSelected("last");
|
|
8173
|
+
}
|
|
8174
|
+
flag = true;
|
|
8175
|
+
break;
|
|
8176
|
+
case "Esc":
|
|
8177
|
+
case "Escape":
|
|
8178
|
+
if (dropdownIsOpen.value) {
|
|
8179
|
+
close();
|
|
8180
|
+
}
|
|
8181
|
+
flag = true;
|
|
8182
|
+
break;
|
|
8183
|
+
case "Tab":
|
|
8184
|
+
if (dropdownIsOpen.value) {
|
|
8185
|
+
close();
|
|
8186
|
+
}
|
|
8187
|
+
break;
|
|
8188
|
+
}
|
|
8189
|
+
if (flag) {
|
|
8190
|
+
event.stopPropagation();
|
|
8191
|
+
event.preventDefault();
|
|
8192
|
+
}
|
|
8193
|
+
}
|
|
8194
|
+
function onInputKeyUp() {
|
|
8195
|
+
if (!inputRef.value) {
|
|
8196
|
+
throw new Error("missing input ref");
|
|
8197
|
+
}
|
|
8198
|
+
if (filter2.value === inputRef.value.value) {
|
|
8199
|
+
return;
|
|
8200
|
+
}
|
|
8201
|
+
filter2.value = inputRef.value.value;
|
|
8202
|
+
activeOption.value = null;
|
|
8203
|
+
selectMode.value = false;
|
|
8204
|
+
if (!dropdownIsOpen.value) {
|
|
8205
|
+
openSelected();
|
|
8206
|
+
} else if (!hasOptions.value) {
|
|
8207
|
+
close();
|
|
8208
|
+
}
|
|
8209
|
+
}
|
|
7891
8210
|
}
|
|
7892
|
-
const
|
|
8211
|
+
const _hoisted_1$E = {
|
|
8212
|
+
class: "combobox"
|
|
8213
|
+
};
|
|
8214
|
+
const _hoisted_2$v = ["id"];
|
|
8215
|
+
const _hoisted_3$p = ["id", "aria-selected", "onClick"];
|
|
8216
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
8217
|
+
__name: "IComboboxDropdown",
|
|
8218
|
+
props: {
|
|
8219
|
+
id: {},
|
|
8220
|
+
isOpen: {
|
|
8221
|
+
type: Boolean
|
|
8222
|
+
},
|
|
8223
|
+
options: {},
|
|
8224
|
+
activeOption: {},
|
|
8225
|
+
activeOptionId: {},
|
|
8226
|
+
inputNode: {}
|
|
8227
|
+
},
|
|
8228
|
+
emits: ["select", "close"],
|
|
8229
|
+
setup(__props, {
|
|
8230
|
+
emit: __emit
|
|
8231
|
+
}) {
|
|
8232
|
+
const emit = __emit;
|
|
8233
|
+
const listboxRef = useTemplateRef("listbox");
|
|
8234
|
+
const activeElement = ref();
|
|
8235
|
+
function isOptionActive(item) {
|
|
8236
|
+
return item === __props.activeOption;
|
|
8237
|
+
}
|
|
8238
|
+
function onOptionClick(value) {
|
|
8239
|
+
emit("select", value);
|
|
8240
|
+
}
|
|
8241
|
+
function onListboxClose() {
|
|
8242
|
+
emit("close");
|
|
8243
|
+
}
|
|
8244
|
+
watchEffect(async () => {
|
|
8245
|
+
var _a;
|
|
8246
|
+
if (__props.activeOption !== null) {
|
|
8247
|
+
await nextTick();
|
|
8248
|
+
const activeOptionNode = (_a = listboxRef.value) == null ? void 0 : _a.querySelector(`#${__props.activeOptionId}`);
|
|
8249
|
+
activeElement.value = activeOptionNode !== null && activeOptionNode !== void 0 ? activeOptionNode : void 0;
|
|
8250
|
+
}
|
|
8251
|
+
});
|
|
8252
|
+
return (_ctx, _cache) => {
|
|
8253
|
+
return openBlock(), createElementBlock("div", _hoisted_1$E, [createVNode(unref(_sfc_main$W), {
|
|
8254
|
+
"is-open": _ctx.isOpen,
|
|
8255
|
+
anchor: _ctx.inputNode,
|
|
8256
|
+
"num-of-items": _ctx.options.length,
|
|
8257
|
+
"active-element": activeElement.value,
|
|
8258
|
+
class: "combobox__listbox",
|
|
8259
|
+
onClose: onListboxClose
|
|
8260
|
+
}, {
|
|
8261
|
+
default: withCtx(() => [createElementVNode("ul", {
|
|
8262
|
+
id: _ctx.id,
|
|
8263
|
+
ref: "listbox",
|
|
8264
|
+
role: "listbox",
|
|
8265
|
+
"aria-label": "Förslag",
|
|
8266
|
+
class: "combobox__listbox__list"
|
|
8267
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
|
|
8268
|
+
return openBlock(), createElementBlock("li", {
|
|
8269
|
+
id: isOptionActive(item) ? _ctx.activeOptionId : void 0,
|
|
8270
|
+
key: item,
|
|
8271
|
+
role: "option",
|
|
8272
|
+
"aria-selected": isOptionActive(item) ? "true" : void 0,
|
|
8273
|
+
class: normalizeClass(["combobox__listbox__option", {
|
|
8274
|
+
"combobox__listbox__option--highlight": isOptionActive(item)
|
|
8275
|
+
}]),
|
|
8276
|
+
onClick: withModifiers(($event) => onOptionClick(item), ["stop", "prevent"])
|
|
8277
|
+
}, toDisplayString(item), 11, _hoisted_3$p);
|
|
8278
|
+
}), 128))], 8, _hoisted_2$v)]),
|
|
8279
|
+
_: 1
|
|
8280
|
+
}, 8, ["is-open", "anchor", "num-of-items", "active-element"])]);
|
|
8281
|
+
};
|
|
8282
|
+
}
|
|
8283
|
+
});
|
|
8284
|
+
const _hoisted_1$D = ["aria-label"];
|
|
8285
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
8286
|
+
__name: "IComboboxToggleButton",
|
|
8287
|
+
emits: ["toggle"],
|
|
8288
|
+
setup(__props, {
|
|
8289
|
+
emit: __emit
|
|
8290
|
+
}) {
|
|
8291
|
+
const $t2 = useTranslate();
|
|
8292
|
+
const emit = __emit;
|
|
8293
|
+
const ariaLabel = $t2("fkui.combobox.toggle", "Öppna förslagen");
|
|
8294
|
+
return (_ctx, _cache) => {
|
|
8295
|
+
return openBlock(), createElementBlock("button", {
|
|
8296
|
+
class: "combobox__button",
|
|
8297
|
+
type: "button",
|
|
8298
|
+
"aria-label": unref(ariaLabel),
|
|
8299
|
+
tabindex: "-1",
|
|
8300
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
|
|
8301
|
+
}, [createVNode(unref(FIcon), {
|
|
8302
|
+
name: "arrow-down",
|
|
8303
|
+
class: "text-field__icon"
|
|
8304
|
+
})], 8, _hoisted_1$D);
|
|
8305
|
+
};
|
|
8306
|
+
}
|
|
8307
|
+
});
|
|
7893
8308
|
const tooltipAttachTo = Symbol("tooltipAttachTo");
|
|
7894
8309
|
let initialized = false;
|
|
7895
8310
|
const reducedMotion = ref(false);
|
|
@@ -8484,7 +8899,7 @@ const _hoisted_5$e = {
|
|
|
8484
8899
|
const _hoisted_6$c = {
|
|
8485
8900
|
key: 1
|
|
8486
8901
|
};
|
|
8487
|
-
const _hoisted_7$
|
|
8902
|
+
const _hoisted_7$c = {
|
|
8488
8903
|
ref: "tooltipAttachTo",
|
|
8489
8904
|
class: "label"
|
|
8490
8905
|
};
|
|
@@ -8515,7 +8930,7 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8515
8930
|
name: "error"
|
|
8516
8931
|
}), createTextVNode(" " + toDisplayString(_ctx.validity.validationMessage), 1)])) : createCommentVNode("", true)])], 2)), _cache[7] || (_cache[7] = createTextVNode()), _ctx.hasCheckbox ? (openBlock(), createElementBlock("span", _hoisted_4$j, [_ctx.children.length === 1 ? (openBlock(), createElementBlock("span", _hoisted_5$e, toDisplayString(_ctx.checkboxCheckedScreenReaderText), 1)) : (openBlock(), createElementBlock("span", _hoisted_6$c, toDisplayString(_ctx.numberOfCheckedCheckboxesScreenText), 1))])) : createCommentVNode("", true), _cache[8] || (_cache[8] = createTextVNode()), _ctx.hasTooltipSlot ? (openBlock(), createElementBlock(Fragment, {
|
|
8517
8932
|
key: 1
|
|
8518
|
-
}, [createElementVNode("div", _hoisted_7$
|
|
8933
|
+
}, [createElementVNode("div", _hoisted_7$c, [createElementVNode("span", _hoisted_8$7, [renderSlot(_ctx.$slots, "label")])], 512), _cache[5] || (_cache[5] = createTextVNode()), renderSlot(_ctx.$slots, "tooltip"), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasDescriptionSlot || _ctx.hasErrorMessageSlot || _ctx.hasError ? (openBlock(), createElementBlock("div", {
|
|
8519
8934
|
key: 0,
|
|
8520
8935
|
class: normalizeClass(["label", _ctx.groupLabelClass]),
|
|
8521
8936
|
"aria-hidden": "true"
|
|
@@ -9488,7 +9903,7 @@ const _hoisted_5$d = {
|
|
|
9488
9903
|
class: "label__message label__message--error"
|
|
9489
9904
|
};
|
|
9490
9905
|
const _hoisted_6$b = ["for"];
|
|
9491
|
-
const _hoisted_7$
|
|
9906
|
+
const _hoisted_7$b = {
|
|
9492
9907
|
key: 0,
|
|
9493
9908
|
class: "label__message label__message--error"
|
|
9494
9909
|
};
|
|
@@ -9514,7 +9929,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9514
9929
|
}, [renderSlot(_ctx.$slots, "default"), _cache[5] || (_cache[5] = createTextVNode()), renderSlot(_ctx.$slots, "description", normalizeProps(guardReactiveProps({
|
|
9515
9930
|
descriptionClass: _ctx.descriptionClass,
|
|
9516
9931
|
discreteDescriptionClass: _ctx.discreteDescriptionClass
|
|
9517
|
-
}))), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasErrorMessageSlot ? (openBlock(), createElementBlock("span", _hoisted_7$
|
|
9932
|
+
}))), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasErrorMessageSlot ? (openBlock(), createElementBlock("span", _hoisted_7$b, [createVNode(_component_f_icon, {
|
|
9518
9933
|
class: "label__icon--left",
|
|
9519
9934
|
name: "error"
|
|
9520
9935
|
}), _cache[4] || (_cache[4] = createTextVNode()), renderSlot(_ctx.$slots, "error-message")])) : createCommentVNode("", true)], 8, _hoisted_6$b));
|
|
@@ -9706,12 +10121,54 @@ const FSelectField = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_r
|
|
|
9706
10121
|
function resolveWidthClass(words, inline) {
|
|
9707
10122
|
return inline ? void 0 : words.split(" ").map((word) => `i-width-${word}`).join(" ");
|
|
9708
10123
|
}
|
|
10124
|
+
function setCursorAtEnd(input) {
|
|
10125
|
+
input.setSelectionRange(input.value.length, input.value.length);
|
|
10126
|
+
}
|
|
10127
|
+
function useTextFieldSetup(props) {
|
|
10128
|
+
const inputNode = useTemplateRef("input");
|
|
10129
|
+
const textFieldTableMode = inject("textFieldTableMode", false);
|
|
10130
|
+
const viewValue = ref("");
|
|
10131
|
+
async function onOptionSelected(value) {
|
|
10132
|
+
if (!inputNode.value) {
|
|
10133
|
+
return;
|
|
10134
|
+
}
|
|
10135
|
+
viewValue.value = value;
|
|
10136
|
+
await nextTick();
|
|
10137
|
+
inputNode.value.focus();
|
|
10138
|
+
setCursorAtEnd(inputNode.value);
|
|
10139
|
+
}
|
|
10140
|
+
const {
|
|
10141
|
+
dropdownId,
|
|
10142
|
+
dropdownIsOpen,
|
|
10143
|
+
dropdownOptions,
|
|
10144
|
+
activeOptionId,
|
|
10145
|
+
activeOption,
|
|
10146
|
+
toggleDropdown,
|
|
10147
|
+
selectOption,
|
|
10148
|
+
closeDropdown
|
|
10149
|
+
} = useCombobox(inputNode, props.options, onOptionSelected);
|
|
10150
|
+
return {
|
|
10151
|
+
textFieldTableMode,
|
|
10152
|
+
viewValue,
|
|
10153
|
+
onOptionSelected,
|
|
10154
|
+
dropdownId,
|
|
10155
|
+
dropdownIsOpen,
|
|
10156
|
+
dropdownOptions,
|
|
10157
|
+
activeOptionId,
|
|
10158
|
+
activeOption,
|
|
10159
|
+
toggleDropdown,
|
|
10160
|
+
selectOption,
|
|
10161
|
+
closeDropdown
|
|
10162
|
+
};
|
|
10163
|
+
}
|
|
9709
10164
|
const _sfc_main$H = defineComponent({
|
|
9710
10165
|
name: "FTextField",
|
|
9711
10166
|
components: {
|
|
9712
10167
|
FLabel,
|
|
9713
10168
|
FIcon,
|
|
9714
|
-
IPopupError
|
|
10169
|
+
IPopupError,
|
|
10170
|
+
IComboboxDropdown: _sfc_main$S,
|
|
10171
|
+
IComboboxToggleButton: _sfc_main$R
|
|
9715
10172
|
},
|
|
9716
10173
|
inheritAttrs: false,
|
|
9717
10174
|
props: {
|
|
@@ -9806,18 +10263,52 @@ const _sfc_main$H = defineComponent({
|
|
|
9806
10263
|
type: String,
|
|
9807
10264
|
required: false,
|
|
9808
10265
|
default: "sm-12"
|
|
10266
|
+
},
|
|
10267
|
+
/**
|
|
10268
|
+
* List of options.
|
|
10269
|
+
*
|
|
10270
|
+
* When set, the user can select a value from the list of options and filter while typing.
|
|
10271
|
+
*
|
|
10272
|
+
* If a formatter is used by the component, make sure the options are formatted as well.
|
|
10273
|
+
*/
|
|
10274
|
+
options: {
|
|
10275
|
+
type: Array,
|
|
10276
|
+
required: false,
|
|
10277
|
+
default: () => void 0
|
|
9809
10278
|
}
|
|
9810
10279
|
},
|
|
9811
10280
|
emits: ["blur", "change", "update", "update:modelValue"],
|
|
9812
|
-
setup() {
|
|
10281
|
+
setup(props) {
|
|
10282
|
+
const {
|
|
10283
|
+
textFieldTableMode,
|
|
10284
|
+
viewValue,
|
|
10285
|
+
onOptionSelected,
|
|
10286
|
+
dropdownId,
|
|
10287
|
+
dropdownIsOpen,
|
|
10288
|
+
dropdownOptions,
|
|
10289
|
+
activeOptionId,
|
|
10290
|
+
activeOption,
|
|
10291
|
+
toggleDropdown,
|
|
10292
|
+
selectOption,
|
|
10293
|
+
closeDropdown
|
|
10294
|
+
} = useTextFieldSetup(props);
|
|
9813
10295
|
return {
|
|
9814
|
-
textFieldTableMode
|
|
10296
|
+
textFieldTableMode,
|
|
10297
|
+
viewValue,
|
|
10298
|
+
onOptionSelected,
|
|
10299
|
+
dropdownId,
|
|
10300
|
+
dropdownIsOpen,
|
|
10301
|
+
dropdownOptions,
|
|
10302
|
+
activeOptionId,
|
|
10303
|
+
activeOption,
|
|
10304
|
+
toggleDropdown,
|
|
10305
|
+
selectOption,
|
|
10306
|
+
closeDropdown
|
|
9815
10307
|
};
|
|
9816
10308
|
},
|
|
9817
10309
|
data() {
|
|
9818
10310
|
return {
|
|
9819
10311
|
showErrorPopup: false,
|
|
9820
|
-
viewValue: "",
|
|
9821
10312
|
lastModelValue: "",
|
|
9822
10313
|
validationMessage: "",
|
|
9823
10314
|
validityMode: "INITIAL",
|
|
@@ -9880,6 +10371,12 @@ const _sfc_main$H = defineComponent({
|
|
|
9880
10371
|
this.isAfterInitialRender = true;
|
|
9881
10372
|
},
|
|
9882
10373
|
methods: {
|
|
10374
|
+
onDropdownSelect(value) {
|
|
10375
|
+
this.selectOption(value);
|
|
10376
|
+
},
|
|
10377
|
+
onDropdownClose() {
|
|
10378
|
+
this.closeDropdown();
|
|
10379
|
+
},
|
|
9883
10380
|
getErrorPopupAnchor() {
|
|
9884
10381
|
return this.$refs.input;
|
|
9885
10382
|
},
|
|
@@ -10014,10 +10511,16 @@ const _hoisted_6$a = {
|
|
|
10014
10511
|
key: 2,
|
|
10015
10512
|
class: "text-field__append-inner"
|
|
10016
10513
|
};
|
|
10514
|
+
const _hoisted_7$a = {
|
|
10515
|
+
key: 3,
|
|
10516
|
+
class: "text-field__append-inner"
|
|
10517
|
+
};
|
|
10017
10518
|
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10018
10519
|
const _component_f_label = resolveComponent("f-label");
|
|
10019
10520
|
const _component_f_icon = resolveComponent("f-icon");
|
|
10020
10521
|
const _component_i_popup_error = resolveComponent("i-popup-error");
|
|
10522
|
+
const _component_i_combobox_toggle_button = resolveComponent("i-combobox-toggle-button");
|
|
10523
|
+
const _component_i_combobox_dropdown = resolveComponent("i-combobox-dropdown");
|
|
10021
10524
|
return openBlock(), createElementBlock("div", {
|
|
10022
10525
|
class: normalizeClass(["text-field", _ctx.rootClass])
|
|
10023
10526
|
}, [createElementVNode("div", {
|
|
@@ -10051,9 +10554,9 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10051
10554
|
name: "tooltip",
|
|
10052
10555
|
fn: withCtx(() => [renderSlot(_ctx.$slots, "tooltip")]),
|
|
10053
10556
|
key: "0"
|
|
10054
|
-
} : void 0]), 1032, ["for", "class"])], 2), _cache[
|
|
10557
|
+
} : void 0]), 1032, ["for", "class"])], 2), _cache[19] || (_cache[19] = createTextVNode()), createElementVNode("div", {
|
|
10055
10558
|
class: normalizeClass(["text-field__input-wrapper", _ctx.inputWrapperClass])
|
|
10056
|
-
}, [renderSlot(_ctx.$slots, "input-left"), _cache[
|
|
10559
|
+
}, [renderSlot(_ctx.$slots, "input-left"), _cache[17] || (_cache[17] = createTextVNode()), createElementVNode("div", _hoisted_4$g, [withDirectives(createElementVNode("input", mergeProps({
|
|
10057
10560
|
id: _ctx.id,
|
|
10058
10561
|
ref: "input",
|
|
10059
10562
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.viewValue = $event),
|
|
@@ -10077,7 +10580,21 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10077
10580
|
"is-open": _ctx.showPopupError,
|
|
10078
10581
|
"error-message": _ctx.validationMessage,
|
|
10079
10582
|
onClose: _ctx.closePopupError
|
|
10080
|
-
}, null, 8, ["anchor", "is-open", "error-message", "onClose"])) : createCommentVNode("", true), _cache[15] || (_cache[15] = createTextVNode()), _ctx.$slots["append-inner"] ? (openBlock(), createElementBlock("div", _hoisted_6$a, [renderSlot(_ctx.$slots, "append-inner")])) : createCommentVNode("", true)
|
|
10583
|
+
}, null, 8, ["anchor", "is-open", "error-message", "onClose"])) : createCommentVNode("", true), _cache[15] || (_cache[15] = createTextVNode()), _ctx.$slots["append-inner"] ? (openBlock(), createElementBlock("div", _hoisted_6$a, [renderSlot(_ctx.$slots, "append-inner")])) : createCommentVNode("", true), _cache[16] || (_cache[16] = createTextVNode()), _ctx.options ? (openBlock(), createElementBlock("div", _hoisted_7$a, [createVNode(_component_i_combobox_toggle_button, {
|
|
10584
|
+
"aria-controls": _ctx.dropdownIsOpen ? _ctx.dropdownId : void 0,
|
|
10585
|
+
"aria-expanded": _ctx.dropdownIsOpen,
|
|
10586
|
+
onToggle: _ctx.toggleDropdown
|
|
10587
|
+
}, null, 8, ["aria-controls", "aria-expanded", "onToggle"])])) : createCommentVNode("", true)]), _cache[18] || (_cache[18] = createTextVNode()), renderSlot(_ctx.$slots, "input-right")], 2), _cache[20] || (_cache[20] = createTextVNode()), _ctx.options && _ctx.$refs.input ? (openBlock(), createBlock(_component_i_combobox_dropdown, {
|
|
10588
|
+
key: 0,
|
|
10589
|
+
id: _ctx.dropdownId,
|
|
10590
|
+
"is-open": _ctx.dropdownIsOpen,
|
|
10591
|
+
options: _ctx.dropdownOptions,
|
|
10592
|
+
"active-option": _ctx.activeOption,
|
|
10593
|
+
"active-option-id": _ctx.activeOptionId,
|
|
10594
|
+
"input-node": _ctx.$refs.input,
|
|
10595
|
+
onSelect: _ctx.onDropdownSelect,
|
|
10596
|
+
onClose: _ctx.onDropdownClose
|
|
10597
|
+
}, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node", "onSelect", "onClose"])) : createCommentVNode("", true)], 2);
|
|
10081
10598
|
}
|
|
10082
10599
|
const FTextField = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$w]]);
|
|
10083
10600
|
const _sfc_main$G = defineComponent({
|
|
@@ -10376,10 +10893,8 @@ const _sfc_main$E = defineComponent({
|
|
|
10376
10893
|
default: parseNumber
|
|
10377
10894
|
}
|
|
10378
10895
|
},
|
|
10379
|
-
setup() {
|
|
10380
|
-
return
|
|
10381
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10382
|
-
};
|
|
10896
|
+
setup(props) {
|
|
10897
|
+
return useTextFieldSetup(props);
|
|
10383
10898
|
},
|
|
10384
10899
|
data() {
|
|
10385
10900
|
return {
|
|
@@ -10522,10 +11037,8 @@ const _sfc_main$C = defineComponent({
|
|
|
10522
11037
|
default: parseBankAccountNumber
|
|
10523
11038
|
}
|
|
10524
11039
|
},
|
|
10525
|
-
setup() {
|
|
10526
|
-
return
|
|
10527
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10528
|
-
};
|
|
11040
|
+
setup(props) {
|
|
11041
|
+
return useTextFieldSetup(props);
|
|
10529
11042
|
},
|
|
10530
11043
|
data() {
|
|
10531
11044
|
return {
|
|
@@ -10553,10 +11066,8 @@ const _sfc_main$B = defineComponent({
|
|
|
10553
11066
|
default: parseBankgiro
|
|
10554
11067
|
}
|
|
10555
11068
|
},
|
|
10556
|
-
setup() {
|
|
10557
|
-
return
|
|
10558
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10559
|
-
};
|
|
11069
|
+
setup(props) {
|
|
11070
|
+
return useTextFieldSetup(props);
|
|
10560
11071
|
},
|
|
10561
11072
|
data() {
|
|
10562
11073
|
return {
|
|
@@ -10587,10 +11098,8 @@ const _sfc_main$A = defineComponent({
|
|
|
10587
11098
|
default: parseClearingNumber
|
|
10588
11099
|
}
|
|
10589
11100
|
},
|
|
10590
|
-
setup() {
|
|
10591
|
-
return
|
|
10592
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10593
|
-
};
|
|
11101
|
+
setup(props) {
|
|
11102
|
+
return useTextFieldSetup(props);
|
|
10594
11103
|
},
|
|
10595
11104
|
data() {
|
|
10596
11105
|
return {
|
|
@@ -10634,10 +11143,8 @@ const _sfc_main$z = defineComponent({
|
|
|
10634
11143
|
default: parseNumber
|
|
10635
11144
|
}
|
|
10636
11145
|
},
|
|
10637
|
-
setup() {
|
|
10638
|
-
return
|
|
10639
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10640
|
-
};
|
|
11146
|
+
setup(props) {
|
|
11147
|
+
return useTextFieldSetup(props);
|
|
10641
11148
|
},
|
|
10642
11149
|
mounted() {
|
|
10643
11150
|
const inputElement = getInputElement(this);
|
|
@@ -10665,10 +11172,8 @@ const _sfc_main$y = defineComponent({
|
|
|
10665
11172
|
default: parsePersonnummer
|
|
10666
11173
|
}
|
|
10667
11174
|
},
|
|
10668
|
-
setup() {
|
|
10669
|
-
return
|
|
10670
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10671
|
-
};
|
|
11175
|
+
setup(props) {
|
|
11176
|
+
return useTextFieldSetup(props);
|
|
10672
11177
|
},
|
|
10673
11178
|
data() {
|
|
10674
11179
|
return {
|
|
@@ -10702,10 +11207,8 @@ const _sfc_main$x = defineComponent({
|
|
|
10702
11207
|
default: parsePlusgiro
|
|
10703
11208
|
}
|
|
10704
11209
|
},
|
|
10705
|
-
setup() {
|
|
10706
|
-
return
|
|
10707
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10708
|
-
};
|
|
11210
|
+
setup(props) {
|
|
11211
|
+
return useTextFieldSetup(props);
|
|
10709
11212
|
},
|
|
10710
11213
|
data() {
|
|
10711
11214
|
return {
|
|
@@ -10736,10 +11239,8 @@ const _sfc_main$w = defineComponent({
|
|
|
10736
11239
|
default: formatPostalCode
|
|
10737
11240
|
}
|
|
10738
11241
|
},
|
|
10739
|
-
setup() {
|
|
10740
|
-
return
|
|
10741
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10742
|
-
};
|
|
11242
|
+
setup(props) {
|
|
11243
|
+
return useTextFieldSetup(props);
|
|
10743
11244
|
},
|
|
10744
11245
|
data() {
|
|
10745
11246
|
return {
|
|
@@ -10788,10 +11289,8 @@ const _sfc_main$v = defineComponent({
|
|
|
10788
11289
|
default: parsePercent
|
|
10789
11290
|
}
|
|
10790
11291
|
},
|
|
10791
|
-
setup() {
|
|
10792
|
-
return
|
|
10793
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10794
|
-
};
|
|
11292
|
+
setup(props) {
|
|
11293
|
+
return useTextFieldSetup(props);
|
|
10795
11294
|
},
|
|
10796
11295
|
data() {
|
|
10797
11296
|
return {
|
|
@@ -10825,10 +11324,8 @@ const _sfc_main$u = defineComponent({
|
|
|
10825
11324
|
default: parseOrganisationsnummer
|
|
10826
11325
|
}
|
|
10827
11326
|
},
|
|
10828
|
-
setup() {
|
|
10829
|
-
return
|
|
10830
|
-
textFieldTableMode: inject("textFieldTableMode", false)
|
|
10831
|
-
};
|
|
11327
|
+
setup(props) {
|
|
11328
|
+
return useTextFieldSetup(props);
|
|
10832
11329
|
},
|
|
10833
11330
|
data() {
|
|
10834
11331
|
return {
|
|
@@ -13707,7 +14204,9 @@ const _sfc_main$e = defineComponent({
|
|
|
13707
14204
|
}
|
|
13708
14205
|
},
|
|
13709
14206
|
updateActiveItemFromVModel() {
|
|
13710
|
-
if (this.active
|
|
14207
|
+
if (this.active === void 0) {
|
|
14208
|
+
this.activeItem = void 0;
|
|
14209
|
+
} else if (!itemEquals(this.active, this.activeItem, this.keyAttribute)) {
|
|
13711
14210
|
this.activeItem = this.active;
|
|
13712
14211
|
}
|
|
13713
14212
|
},
|
|
@@ -16639,7 +17138,7 @@ export {
|
|
|
16639
17138
|
ErrorPlugin,
|
|
16640
17139
|
ErrorViewData,
|
|
16641
17140
|
EventBus,
|
|
16642
|
-
_sfc_main$
|
|
17141
|
+
_sfc_main$1f as FBadge,
|
|
16643
17142
|
_sfc_main$C as FBankAccountNumberTextField,
|
|
16644
17143
|
_sfc_main$B as FBankgiroTextField,
|
|
16645
17144
|
FCalendar,
|
|
@@ -16722,11 +17221,13 @@ export {
|
|
|
16722
17221
|
ICalendarMonth,
|
|
16723
17222
|
ICalendarMonthGrid,
|
|
16724
17223
|
ICalendarNavbar,
|
|
17224
|
+
_sfc_main$S as IComboboxDropdown,
|
|
17225
|
+
_sfc_main$R as IComboboxToggleButton,
|
|
16725
17226
|
IFlex,
|
|
16726
17227
|
IFlexItem,
|
|
16727
17228
|
IPopup,
|
|
16728
17229
|
IPopupError,
|
|
16729
|
-
_sfc_main$
|
|
17230
|
+
_sfc_main$W as IPopupListbox,
|
|
16730
17231
|
IPopupMenu,
|
|
16731
17232
|
ISkipLink,
|
|
16732
17233
|
FValidationForm as IValidationForm,
|
|
@@ -16787,8 +17288,10 @@ export {
|
|
|
16787
17288
|
sortComponentsWithErrorsOnDOMOrder,
|
|
16788
17289
|
tableScrollClasses,
|
|
16789
17290
|
tooltipAttachTo,
|
|
17291
|
+
useCombobox,
|
|
16790
17292
|
useModal,
|
|
16791
17293
|
useSlotUtils,
|
|
17294
|
+
useTextFieldSetup,
|
|
16792
17295
|
useTranslate
|
|
16793
17296
|
};
|
|
16794
17297
|
//# sourceMappingURL=index.esm.js.map
|