fds-vue-core 8.14.0 → 8.15.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/components/FdsAppVersion/FdsAppVersion.vue.d.ts +1 -0
- package/dist/components/FdsAppVersion/types.d.ts +1 -1
- package/dist/components/FdsSearchSelectPro/FdsSearchSelectPro.vue.d.ts +12 -2
- package/dist/components/FdsSearchSelectPro/types.d.ts +11 -0
- package/dist/fds-vue-core.cjs.js +34 -15
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +34 -15
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/FdsAppVersion/FdsAppVersion.vue +2 -1
- package/src/components/FdsAppVersion/types.ts +1 -1
- package/src/components/FdsSearchSelectPro/FdsSearchSelectPro.stories.ts +46 -0
- package/src/components/FdsSearchSelectPro/FdsSearchSelectPro.vue +32 -5
- package/src/components/FdsSearchSelectPro/types.ts +12 -0
- package/src/index.ts +1 -1
- package/src/lang/en.json +2 -2
- package/src/lang/sv.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FdsAppVersionProps } from './types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<FdsAppVersionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FdsAppVersionProps> & Readonly<{}>, {
|
|
3
|
+
name: string;
|
|
3
4
|
dataTestid: string;
|
|
4
5
|
to: string | import('vue-router').RouteLocationAsRelativeGeneric | import('vue-router').RouteLocationAsPathGeneric;
|
|
5
6
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'vue';
|
|
2
2
|
import { RouteLocationRaw } from 'vue-router';
|
|
3
3
|
export interface FdsAppVersionProps extends /* @vue-ignore */ HTMLAttributes {
|
|
4
|
-
name
|
|
4
|
+
name?: string;
|
|
5
5
|
version: string;
|
|
6
6
|
to?: RouteLocationRaw;
|
|
7
7
|
dataTestid?: string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { FdsSearchSelectProProps } from './types';
|
|
2
|
-
|
|
1
|
+
import { FdsSearchSelectProItemSlotProps, FdsSearchSelectProProps } from './types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
item?: (props: FdsSearchSelectProItemSlotProps) => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import('vue').DefineComponent<FdsSearchSelectProProps, {
|
|
3
6
|
blur: () => void;
|
|
4
7
|
clear: () => void;
|
|
5
8
|
blurAndClear: () => void;
|
|
@@ -42,6 +45,7 @@ declare const __VLS_export: import('vue').DefineComponent<FdsSearchSelectProProp
|
|
|
42
45
|
};
|
|
43
46
|
noResultPrompt: string;
|
|
44
47
|
maxListHeight: string | number;
|
|
48
|
+
hideRadio: boolean;
|
|
45
49
|
hierarchical: boolean;
|
|
46
50
|
selectChildrenRecursively: boolean;
|
|
47
51
|
initialSelectedItems: Record<string, any>[];
|
|
@@ -65,5 +69,11 @@ declare const __VLS_export: import('vue').DefineComponent<FdsSearchSelectProProp
|
|
|
65
69
|
invalidOnEmptySelection: boolean;
|
|
66
70
|
unspecifiedLabel: string;
|
|
67
71
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
68
73
|
declare const _default: typeof __VLS_export;
|
|
69
74
|
export default _default;
|
|
75
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
76
|
+
new (): {
|
|
77
|
+
$slots: S;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
@@ -14,6 +14,8 @@ export interface FdsSearchSelectProProps extends Omit</* @vue-ignore */ HTMLAttr
|
|
|
14
14
|
items: Array<Record<string, any>>;
|
|
15
15
|
/** Enables multi-select mode (checkboxes) instead of single-select (radio). */
|
|
16
16
|
multiple?: boolean;
|
|
17
|
+
/** In single-select mode, visually hides the radio buttons and marks the selected row with a background instead. */
|
|
18
|
+
hideRadio?: boolean;
|
|
17
19
|
/** Enables hierarchy indentation based on `levelField`. */
|
|
18
20
|
hierarchical?: boolean;
|
|
19
21
|
/** In hierarchical mode, selecting a parent also toggles descendants until next sibling/root. */
|
|
@@ -121,3 +123,12 @@ export interface FdsSearchSelectProProps extends Omit</* @vue-ignore */ HTMLAttr
|
|
|
121
123
|
/** Listener for load-more requests (used in external loading mode). */
|
|
122
124
|
onLoadMore?: (() => void) | Array<() => void>;
|
|
123
125
|
}
|
|
126
|
+
/** Props passed to the `item` slot of `FdsSearchSelectPro`. */
|
|
127
|
+
export interface FdsSearchSelectProItemSlotProps {
|
|
128
|
+
/** The option item as given in `items`. */
|
|
129
|
+
item: Record<string, unknown>;
|
|
130
|
+
/** Whether the option is currently selected. */
|
|
131
|
+
selected: boolean;
|
|
132
|
+
/** Default row text as HTML, with the search match wrapped in `<b>`. */
|
|
133
|
+
highlightedText: string;
|
|
134
|
+
}
|
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -20,8 +20,8 @@ var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
|
|
|
20
20
|
var en_default = {
|
|
21
21
|
"App.treeViewTest": "FDS Tree View Test",
|
|
22
22
|
"common.plus": "+",
|
|
23
|
-
"FdsAppVersion.name": "{name} •",
|
|
24
|
-
"FdsAppVersion.version": "
|
|
23
|
+
"FdsAppVersion.name": "{name} • ",
|
|
24
|
+
"FdsAppVersion.version": "v{version}",
|
|
25
25
|
"FdsBankId.cancel": "Cancel sign in",
|
|
26
26
|
"FdsBankId.logoAlt": "BankID",
|
|
27
27
|
"FdsBankId.otherDevice": "Use BankID on another device",
|
|
@@ -169,8 +169,8 @@ var sv_exports = /* @__PURE__ */ __exportAll({ default: () => sv_default });
|
|
|
169
169
|
var sv_default = {
|
|
170
170
|
"App.treeViewTest": "FDS Tree View Test",
|
|
171
171
|
"common.plus": "+",
|
|
172
|
-
"FdsAppVersion.name": "{name} •",
|
|
173
|
-
"FdsAppVersion.version": "
|
|
172
|
+
"FdsAppVersion.name": "{name} • ",
|
|
173
|
+
"FdsAppVersion.version": "v{version}",
|
|
174
174
|
"FdsBankId.cancel": "Avbryt inloggning",
|
|
175
175
|
"FdsBankId.logoAlt": "BankID",
|
|
176
176
|
"FdsBankId.otherDevice": "Använd BankID på annan enhet",
|
|
@@ -413,7 +413,7 @@ var FdsMeta_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
413
413
|
var FdsAppVersion_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
414
414
|
__name: "FdsAppVersion",
|
|
415
415
|
props: {
|
|
416
|
-
name: {},
|
|
416
|
+
name: { default: void 0 },
|
|
417
417
|
version: {},
|
|
418
418
|
to: { default: void 0 },
|
|
419
419
|
dataTestid: { default: void 0 }
|
|
@@ -424,14 +424,14 @@ var FdsAppVersion_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
424
424
|
return (_ctx, _cache) => {
|
|
425
425
|
const _component_router_link = (0, vue.resolveComponent)("router-link");
|
|
426
426
|
return (0, vue.openBlock)(), (0, vue.createBlock)(FdsMeta_default, { "data-testid": props.dataTestid }, {
|
|
427
|
-
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("FdsAppVersion.name", { name: props.name }))
|
|
428
|
-
key:
|
|
427
|
+
default: (0, vue.withCtx)(() => [props.name ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("FdsAppVersion.name", { name: props.name })), 1)], 64)) : (0, vue.createCommentVNode)("", true), props.to ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_router_link, {
|
|
428
|
+
key: 1,
|
|
429
429
|
to: props.to,
|
|
430
430
|
class: "link"
|
|
431
431
|
}, {
|
|
432
432
|
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("FdsAppVersion.version", { version: props.version })), 1)]),
|
|
433
433
|
_: 1
|
|
434
|
-
}, 8, ["to"])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key:
|
|
434
|
+
}, 8, ["to"])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("FdsAppVersion.version", { version: props.version })), 1)], 64))]),
|
|
435
435
|
_: 1
|
|
436
436
|
}, 8, ["data-testid"]);
|
|
437
437
|
};
|
|
@@ -13460,6 +13460,10 @@ var FdsSearchSelectPro_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
13460
13460
|
type: Boolean,
|
|
13461
13461
|
default: false
|
|
13462
13462
|
},
|
|
13463
|
+
hideRadio: {
|
|
13464
|
+
type: Boolean,
|
|
13465
|
+
default: false
|
|
13466
|
+
},
|
|
13463
13467
|
hierarchical: {
|
|
13464
13468
|
type: Boolean,
|
|
13465
13469
|
default: false
|
|
@@ -13791,6 +13795,7 @@ var FdsSearchSelectPro_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
13791
13795
|
}
|
|
13792
13796
|
return result;
|
|
13793
13797
|
};
|
|
13798
|
+
const isSingleSelected = (item) => !!selectedItem.value && getItemIdentifier(selectedItem.value) === getItemIdentifier(item);
|
|
13794
13799
|
function selectItem(item) {
|
|
13795
13800
|
selectedItem.value = item;
|
|
13796
13801
|
setValidSelectedState();
|
|
@@ -14133,7 +14138,11 @@ var FdsSearchSelectPro_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14133
14138
|
}, null, 14, _hoisted_6$7)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
14134
14139
|
key: 1,
|
|
14135
14140
|
onClick: (event) => handleOptionClick(event, item),
|
|
14136
|
-
class: (0, vue.normalizeClass)([
|
|
14141
|
+
class: (0, vue.normalizeClass)([
|
|
14142
|
+
labelClasses.value,
|
|
14143
|
+
listItemClasses.value,
|
|
14144
|
+
__props.hideRadio && !__props.multiple && isSingleSelected(item) && "bg-blue_t-100"
|
|
14145
|
+
]),
|
|
14137
14146
|
style: (0, vue.normalizeStyle)((0, vue.unref)(optionPaddingStyle)(item))
|
|
14138
14147
|
}, [__props.multiple ? ((0, vue.openBlock)(), (0, vue.createBlock)(FdsCheckbox_default, {
|
|
14139
14148
|
key: 0,
|
|
@@ -14145,10 +14154,14 @@ var FdsSearchSelectPro_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14145
14154
|
class: "mb-0!",
|
|
14146
14155
|
onChange: () => handleMultipleSelectionChange(item)
|
|
14147
14156
|
}, {
|
|
14148
|
-
default: (0, vue.withCtx)(() => [(0, vue.
|
|
14157
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "item", {
|
|
14158
|
+
item,
|
|
14159
|
+
selected: (0, vue.unref)(isItemSelected)(item),
|
|
14160
|
+
highlightedText: handleMatchingString(item)
|
|
14161
|
+
}, () => [(0, vue.createElementVNode)("span", {
|
|
14149
14162
|
class: "min-w-0 flex-1",
|
|
14150
14163
|
innerHTML: handleMatchingString(item)
|
|
14151
|
-
}, null, 8, _hoisted_8$4)]),
|
|
14164
|
+
}, null, 8, _hoisted_8$4)])]),
|
|
14152
14165
|
_: 2
|
|
14153
14166
|
}, 1032, [
|
|
14154
14167
|
"id",
|
|
@@ -14160,22 +14173,28 @@ var FdsSearchSelectPro_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
14160
14173
|
id: `search-select-radio-${index}`,
|
|
14161
14174
|
name: "search-select-radio-group",
|
|
14162
14175
|
value: index,
|
|
14163
|
-
checked:
|
|
14176
|
+
checked: isSingleSelected(item),
|
|
14164
14177
|
tabindex: -1,
|
|
14165
14178
|
disablePseudoStates: true,
|
|
14179
|
+
inputClass: __props.hideRadio ? "sr-only" : void 0,
|
|
14166
14180
|
class: "mb-0!",
|
|
14167
14181
|
onChange: () => handleSingleSelection(item),
|
|
14168
14182
|
onKeydown: (0, vue.withKeys)((e) => handleClick(e, item), ["enter"])
|
|
14169
14183
|
}, {
|
|
14170
|
-
default: (0, vue.withCtx)(() => [(0, vue.
|
|
14184
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "item", {
|
|
14185
|
+
item,
|
|
14186
|
+
selected: isSingleSelected(item),
|
|
14187
|
+
highlightedText: handleMatchingString(item)
|
|
14188
|
+
}, () => [(0, vue.createElementVNode)("span", {
|
|
14171
14189
|
class: "min-w-0 flex-1",
|
|
14172
14190
|
innerHTML: handleMatchingString(item)
|
|
14173
|
-
}, null, 8, _hoisted_9$3)]),
|
|
14191
|
+
}, null, 8, _hoisted_9$3)])]),
|
|
14174
14192
|
_: 2
|
|
14175
14193
|
}, 1032, [
|
|
14176
14194
|
"id",
|
|
14177
14195
|
"value",
|
|
14178
14196
|
"checked",
|
|
14197
|
+
"inputClass",
|
|
14179
14198
|
"onChange",
|
|
14180
14199
|
"onKeydown"
|
|
14181
14200
|
]))], 14, _hoisted_7$5))], 42, _hoisted_5$8);
|
|
@@ -18545,7 +18564,7 @@ var FdsWizard_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
18545
18564
|
};
|
|
18546
18565
|
}
|
|
18547
18566
|
});
|
|
18548
|
-
// node_modules/.pnpm/qrcode.vue@3.11.0_vue@3.5.
|
|
18567
|
+
// node_modules/.pnpm/qrcode.vue@3.11.0_vue@3.5.45_typescript@5.9.3_/node_modules/qrcode.vue/dist/qrcode.vue.esm.js
|
|
18549
18568
|
/*!
|
|
18550
18569
|
* qrcode.vue v3.11.0
|
|
18551
18570
|
* A Vue.js component to generate QRCode. Both support Vue 2 and Vue 3
|