fds-vue-core 8.14.1 → 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.
@@ -1,5 +1,8 @@
1
- import { FdsSearchSelectProProps } from './types';
2
- declare const __VLS_export: import('vue').DefineComponent<FdsSearchSelectProProps, {
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
+ }
@@ -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)([labelClasses.value, listItemClasses.value]),
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.createElementVNode)("span", {
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: !!selectedItem.value && (0, vue.unref)(getItemIdentifier)(selectedItem.value) === (0, vue.unref)(getItemIdentifier)(item),
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.createElementVNode)("span", {
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.44_typescript@5.9.3_/node_modules/qrcode.vue/dist/qrcode.vue.esm.js
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