eco-vue-js 0.3.84 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
  2. package/dist/components/Button/WButtonSelection.vue.d.ts +4 -9
  3. package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
  4. package/dist/components/Button/WButtonSelection.vue.js +51 -6
  5. package/dist/components/Button/WButtonSelectionAction.vue.js +15 -15
  6. package/dist/components/Form/WFormValidator.vue.js +3 -3
  7. package/dist/components/Form/models/utils.d.ts.map +1 -1
  8. package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +1 -1
  9. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +13 -10
  10. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  11. package/dist/components/InfiniteList/WInfiniteList.vue.js +4 -2
  12. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +13 -10
  13. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
  14. package/dist/components/InfiniteList/WInfiniteListPages.vue.js +4 -2
  15. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +13 -10
  16. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
  17. package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +6 -4
  18. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts +13 -10
  19. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts.map +1 -1
  20. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.js +6 -5
  21. package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
  22. package/dist/components/Select/WSelect.vue.d.ts +3 -3
  23. package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
  24. package/dist/components/Select/WSelectAsync.vue.d.ts +34 -25
  25. package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
  26. package/dist/components/Select/WSelectAsync.vue.js +20 -15
  27. package/dist/components/Select/WSelectAsyncList.vue.d.ts +28 -22
  28. package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
  29. package/dist/components/Select/WSelectAsyncList.vue.js +8 -6
  30. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +22 -16
  31. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
  32. package/dist/components/Select/WSelectAsyncSingle.vue.js +7 -3
  33. package/dist/components/Select/WSelectSingle.vue.d.ts +3 -3
  34. package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
  35. package/dist/components/Select/components/SelectAsyncList.vue.d.ts +25 -22
  36. package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
  37. package/dist/components/Select/components/SelectAsyncList.vue.js +34 -32
  38. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +22 -16
  39. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
  40. package/dist/components/Select/components/SelectAsyncPrefix.vue.js +8 -5
  41. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +10 -7
  42. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
  43. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +5 -4
  44. package/dist/components/Select/components/SelectOption.vue.d.ts +149 -62
  45. package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -1
  46. package/dist/components/Tabs/WTabs.vue.js +2 -2
  47. package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
  48. package/dist/types/global.d.ts +5 -0
  49. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonGroup.vue"],"names":[],"mappings":"AAuCA;AAGA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAoM1C,GAAG;;uBA1BkB,GAAG;;;YACD,GAAG;;cAnI3B,mBAAmB,mBAAiB,IA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sB,MAAM,KAAK,KAAK;;;;;;;;;;;wBAjBxC,KAAK;kBAEX,KAAK,EAAE;0BACC,WAAW,GAAG,SAAS;;;;;wBAsLvB,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;2BA1BkB,GAAG;;;gBACD,GAAG;;kBAnI3B,mBAAmB,SAAS,KAAK,KAAG,IAAI;;;AArC9C,wBAsM2E"}
@@ -1,16 +1,16 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
2
  title?: string | undefined;
3
3
  selectedLength?: number | undefined;
4
+ disableMessageMore?: string | undefined;
4
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
6
  "clear:selected": () => void;
6
7
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
8
  title?: string | undefined;
8
9
  selectedLength?: number | undefined;
10
+ disableMessageMore?: string | undefined;
9
11
  }>>> & {
10
12
  "onClear:selected"?: (() => any) | undefined;
11
- }, {}, {}>, {
12
- default?(_: {}): any;
13
- }>;
13
+ }, {}, {}>;
14
14
  export default _default;
15
15
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
16
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -21,9 +21,4 @@ type __VLS_TypePropsToRuntimeProps<T> = {
21
21
  required: true;
22
22
  };
23
23
  };
24
- type __VLS_WithTemplateSlots<T, S> = T & {
25
- new (): {
26
- $slots: S;
27
- };
28
- };
29
24
  //# sourceMappingURL=WButtonSelection.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonSelection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonSelection.vue"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;AA6LA,wBAAwG;A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,14 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, Transition, withCtx, toDisplayString, unref, createCommentVNode } from 'vue';
1
+ import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, markRaw, createCommentVNode, Transition, toDisplayString } from 'vue';
2
2
  import { numberFormatter } from '../../utils/utils.js';
3
3
  import IconCancel from '../../assets/icons/default/IconCancel.svg.js';
4
+ import IconMore from '../../assets/icons/default/IconMore.svg.js';
5
+ import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
6
+ import _sfc_main$2 from './WButtonSelectionAction.vue.js';
7
+ import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
8
+ import _sfc_main$3 from '../ClickOutside/WClickOutside.vue.js';
4
9
 
5
- const _hoisted_1 = { class: "flex h-12 pb-3 w-full" };
6
- const _hoisted_2 = { class: "flex flex-1" };
10
+ const _hoisted_1 = { class: "grid grid-cols-[1fr,auto] h-12 pb-3 w-full" };
11
+ const _hoisted_2 = { class: "flex" };
7
12
  const _hoisted_3 = {
8
13
  key: 0,
9
14
  class: "flex gap-3 sm-not:gap-1"
@@ -16,14 +21,54 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
21
  __name: "WButtonSelection",
17
22
  props: {
18
23
  title: {},
19
- selectedLength: {}
24
+ selectedLength: {},
25
+ disableMessageMore: {}
20
26
  },
21
27
  emits: ["clear:selected"],
22
28
  setup(__props) {
29
+ const isOpen = ref(false);
23
30
  return (_ctx, _cache) => {
24
31
  return openBlock(), createElementBlock("div", _hoisted_1, [
25
32
  createElementVNode("div", _hoisted_2, [
26
- renderSlot(_ctx.$slots, "default")
33
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.default?.(), (slot, index) => {
34
+ return openBlock(), createBlock(resolveDynamicComponent(slot), {
35
+ key: index,
36
+ class: "border-r border-solid border-gray-300 dark:border-gray-700 last:border-r-0"
37
+ });
38
+ }), 128)),
39
+ _ctx.$slots.more?.()?.length ? (openBlock(), createBlock(_sfc_main$1, {
40
+ key: 0,
41
+ "is-open": isOpen.value,
42
+ "max-width": 200,
43
+ "max-height": 300,
44
+ "horizontal-align": unref(HorizontalAlign).RIGHT_INNER
45
+ }, {
46
+ toggle: withCtx(() => [
47
+ createVNode(_sfc_main$2, {
48
+ title: "More",
49
+ icon: markRaw(unref(IconMore)),
50
+ "disable-message": _ctx.disableMessageMore,
51
+ onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
52
+ }, null, 8, ["icon", "disable-message"])
53
+ ]),
54
+ content: withCtx(() => [
55
+ createVNode(_sfc_main$3, {
56
+ class: "my-2 grid grid-cols-1 bg-default dark:bg-default-dark shadow-md rounded-xl overflow-hidden dark:outline dark:outline-1 dark:outline-gray-800",
57
+ onClick: _cache[1] || (_cache[1] = ($event) => isOpen.value = false)
58
+ }, {
59
+ default: withCtx(() => [
60
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.more?.(), (slot, index) => {
61
+ return openBlock(), createBlock(resolveDynamicComponent(slot), {
62
+ key: index,
63
+ class: "first:pt-2 last:pb-2"
64
+ });
65
+ }), 128))
66
+ ]),
67
+ _: 1
68
+ })
69
+ ]),
70
+ _: 1
71
+ }, 8, ["is-open", "horizontal-align"])) : createCommentVNode("", true)
27
72
  ]),
28
73
  createVNode(Transition, {
29
74
  "enter-active-class": "transition-opacity",
@@ -40,7 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
85
  ]),
41
86
  createElementVNode("div", {
42
87
  class: "relative text-description sm-not:-px--inner-margin px-[1.125rem] flex items-center cursor-pointer select-none w-ripple w-ripple-hover",
43
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("clear:selected"))
88
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("clear:selected"))
44
89
  }, [
45
90
  createVNode(unref(IconCancel))
46
91
  ])
@@ -1,8 +1,8 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, createBlock, resolveDynamicComponent, toDisplayString, withCtx, createCommentVNode } from 'vue';
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, withCtx, createCommentVNode } from 'vue';
2
2
  import _sfc_main$1 from '../Tooltip/WTooltip.vue.js';
3
3
 
4
- const _hoisted_1 = { class: "border-r border-solid border-gray-300 dark:border-gray-700 last:border-r-0" };
5
- const _hoisted_2 = ["disabled"];
4
+ const _hoisted_1 = ["disabled"];
5
+ const _hoisted_2 = { class: "px-5 sm:px-[1.125rem] flex gap-2 items-center h-9" };
6
6
  const _hoisted_3 = { class: "whitespace-nowrap font-normal text-base sm-not:hidden" };
7
7
  const _hoisted_4 = { class: "whitespace-nowrap" };
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -16,26 +16,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  emits: ["click"],
17
17
  setup(__props) {
18
18
  return (_ctx, _cache) => {
19
- return openBlock(), createElementBlock("div", _hoisted_1, [
20
- createElementVNode("button", {
21
- disabled: _ctx.disableMessage !== void 0,
22
- class: normalizeClass(["relative h-9 flex gap-2 px-5 sm:px-[1.125rem] items-center select-none cursor-pointer no-underline outline-none border-none bg-none disabled:text-description disabled:cursor-not-allowed", {
23
- "w-ripple w-ripple-hover before:text-primary-default dark:before:text-primary-dark hover:text-primary-default dark:hover:text-primary-dark": !_ctx.disableMessage,
24
- "text-primary-default dark:text-primary-dark": _ctx.active,
25
- "text-accent": !_ctx.active
26
- }]),
27
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
28
- }, [
19
+ return openBlock(), createElementBlock("button", {
20
+ disabled: _ctx.disableMessage !== void 0,
21
+ class: normalizeClass(["relative select-none cursor-pointer no-underline outline-none bg-none disabled:text-description disabled:cursor-not-allowed", {
22
+ "w-ripple w-ripple-hover before:text-primary-default dark:before:text-primary-dark hover:text-primary-default dark:hover:text-primary-dark": !_ctx.disableMessage,
23
+ "text-primary-default dark:text-primary-dark": _ctx.active,
24
+ "text-accent": !_ctx.active
25
+ }]),
26
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
27
+ }, [
28
+ createElementVNode("div", _hoisted_2, [
29
29
  (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))),
30
30
  createElementVNode("div", _hoisted_3, toDisplayString(_ctx.title), 1)
31
- ], 10, _hoisted_2),
31
+ ]),
32
32
  _ctx.disableMessage ? (openBlock(), createBlock(_sfc_main$1, { key: 0 }, {
33
33
  default: withCtx(() => [
34
34
  createElementVNode("div", _hoisted_4, toDisplayString(_ctx.disableMessage), 1)
35
35
  ]),
36
36
  _: 1
37
37
  })) : createCommentVNode("", true)
38
- ]);
38
+ ], 10, _hoisted_1);
39
39
  };
40
40
  }
41
41
  });
@@ -123,7 +123,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
123
123
  newValue.splice(index, 1);
124
124
  validateOnUpdate(newValue);
125
125
  };
126
- const validate = (silent) => {
126
+ const doValidate = (silent) => {
127
127
  const message = _validate(modelValue.value);
128
128
  if (!silent) {
129
129
  errorMessage.value = message;
@@ -165,12 +165,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
165
165
  }, { immediate: true });
166
166
  watch(required, () => {
167
167
  if (hasBeenValidated.value)
168
- validate();
168
+ doValidate();
169
169
  });
170
170
  onBeforeMount(() => {
171
171
  if (props.name) {
172
172
  initModel();
173
- validateUpdater?.(props.name, validate);
173
+ validateUpdater?.(props.name, doValidate);
174
174
  invalidateUpdater?.(props.name, invalidate);
175
175
  initModelUpdater?.(props.name, initModel);
176
176
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/models/utils.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,sDAAuD,MAAM,MAMlF,CAAA;AAKD,eAAO,MAAM,cAAc,UAAW,MAAM,WAAW,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAQpF,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/models/utils.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,8CAA+C,CAAC,OAAO,MAAM,KAAG,CAMrF,CAAA;AAKD,eAAO,MAAM,cAAc,UAAW,MAAM,WAAW,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAQpF,CAAA"}
@@ -21,8 +21,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
21
21
  }>>> & {
22
22
  "onUpdate:search"?: ((value: string | undefined) => any) | undefined;
23
23
  }, {
24
- title: string;
25
24
  search: string;
25
+ title: string;
26
26
  headerPadding: number;
27
27
  }, {}>, {
28
28
  title?(_: {}): any;
@@ -1,10 +1,11 @@
1
- declare const _default: <Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
+ valueGetter?: ((data: Data) => Model) | undefined;
3
4
  wrap?: boolean | undefined;
4
5
  scrollingElement?: Element | null | undefined;
5
6
  queryParams: QueryParams;
6
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
7
- selected?: number[] | undefined;
7
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
8
+ selected?: Model[] | undefined;
8
9
  selectOnly?: boolean | undefined;
9
10
  unselectOnly?: boolean | undefined;
10
11
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -60,18 +61,19 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
60
61
  (e: 'update:page', value: number | undefined): void;
61
62
  (e: 'update:header-padding', value: number): void;
62
63
  (e: 'update:count', value: number): void;
63
- (e: 'update:selected', values: number[]): void;
64
+ (e: 'update:selected', values: Model[]): void;
64
65
  };
65
66
  } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
66
67
  resetPage(): void;
67
68
  }>) => void) | undefined, __VLS_setup?: Promise<{
68
69
  props: {
69
70
  transition?: boolean | undefined;
71
+ valueGetter?: ((data: Data) => Model) | undefined;
70
72
  wrap?: boolean | undefined;
71
73
  scrollingElement?: Element | null | undefined;
72
74
  queryParams: QueryParams;
73
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
74
- selected?: number[] | undefined;
75
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
76
+ selected?: Model[] | undefined;
75
77
  selectOnly?: boolean | undefined;
76
78
  unselectOnly?: boolean | undefined;
77
79
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -130,7 +132,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
130
132
  (e: 'update:page', value: number | undefined): void;
131
133
  (e: 'update:header-padding', value: number): void;
132
134
  (e: 'update:count', value: number): void;
133
- (e: 'update:selected', values: number[]): void;
135
+ (e: 'update:selected', values: Model[]): void;
134
136
  };
135
137
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
136
138
  [key: string]: any;
@@ -138,11 +140,12 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
138
140
  __ctx?: {
139
141
  props: {
140
142
  transition?: boolean | undefined;
143
+ valueGetter?: ((data: Data) => Model) | undefined;
141
144
  wrap?: boolean | undefined;
142
145
  scrollingElement?: Element | null | undefined;
143
146
  queryParams: QueryParams;
144
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
145
- selected?: number[] | undefined;
147
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
148
+ selected?: Model[] | undefined;
146
149
  selectOnly?: boolean | undefined;
147
150
  unselectOnly?: boolean | undefined;
148
151
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -201,7 +204,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
201
204
  (e: 'update:page', value: number | undefined): void;
202
205
  (e: 'update:header-padding', value: number): void;
203
206
  (e: 'update:count', value: number): void;
204
- (e: 'update:selected', values: number[]): void;
207
+ (e: 'update:selected', values: Model[]): void;
205
208
  };
206
209
  } | undefined;
207
210
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteList.vue"],"names":[],"mappings":"AA4DA;;;;;iBAwQiB,WAAW;;;;;;;2BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;WA8BvC,GAAG;;;;oDAhMkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;0BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;;oDATL,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;0BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;YAvD3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,uBAAuB,SAAS,MAAM,GAAG,IAAI;YAC7C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;OA0OuB,IAAI;;;;;qBA5B1D,WAAW;;;;;;;+BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;SA6ByB,IAAI;WACpE,GAAG;;;;oDAhMkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;0BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;;oDATL,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;0BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;YAvD3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,uBAAuB,SAAS,MAAM,GAAG,IAA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;aA8ByB,IAAI;eACpE,GAAG;;;sBAnMA,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;8BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;sBAVvC,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;8BACO,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;;;gBAvD3C,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;gBAC/C,uBAAuB,SAAS,MAAM,GAAG,IAAI;gBAC7C,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;;;;AArD/C,wBAuS2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -28,7 +28,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  allowPageSelection: { type: Boolean },
29
29
  pageClass: { default: void 0 },
30
30
  maxPages: { default: void 0 },
31
- refetchInterval: { type: [Number, Boolean], default: void 0 }
31
+ refetchInterval: { type: [Number, Boolean], default: void 0 },
32
+ valueGetter: { type: Function, default: (item) => item.id }
32
33
  },
33
34
  emits: ["update:page", "update:header-padding", "update:count", "update:selected"],
34
35
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -100,6 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
100
101
  "page-class": _ctx.pageClass,
101
102
  "max-pages": _ctx.maxPages,
102
103
  "refetch-interval": _ctx.refetchInterval,
104
+ "value-getter": _ctx.valueGetter,
103
105
  "onUpdate:count": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:count", $event)),
104
106
  "onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:selected", $event)),
105
107
  "onUpdate:page": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", $event))
@@ -118,7 +120,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
120
  })
119
121
  ]),
120
122
  _: 3
121
- }, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "selected", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "exclude-params", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "page-class", "max-pages", "refetch-interval"])
123
+ }, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "selected", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "exclude-params", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "page-class", "max-pages", "refetch-interval", "value-getter"])
122
124
  ], 64);
123
125
  };
124
126
  }
@@ -1,10 +1,11 @@
1
- declare const _default: <Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
+ valueGetter: (data: Data) => Model;
3
4
  wrap?: boolean | undefined;
4
5
  scrollingElement?: Element | null | undefined;
5
6
  queryParams: QueryParams;
6
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
7
- selected?: number[] | undefined;
7
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
8
+ selected?: Model[] | undefined;
8
9
  selectOnly?: boolean | undefined;
9
10
  unselectOnly?: boolean | undefined;
10
11
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -56,18 +57,19 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
56
57
  emit: {
57
58
  (e: 'update:page', value: number | undefined): void;
58
59
  (e: 'update:count', value: number): void;
59
- (e: 'update:selected', values: number[]): void;
60
+ (e: 'update:selected', values: Model[]): void;
60
61
  };
61
62
  } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
62
63
  resetPage: () => void;
63
64
  }>) => void) | undefined, __VLS_setup?: Promise<{
64
65
  props: {
65
66
  transition?: boolean | undefined;
67
+ valueGetter: (data: Data) => Model;
66
68
  wrap?: boolean | undefined;
67
69
  scrollingElement?: Element | null | undefined;
68
70
  queryParams: QueryParams;
69
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
70
- selected?: number[] | undefined;
71
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
72
+ selected?: Model[] | undefined;
71
73
  selectOnly?: boolean | undefined;
72
74
  unselectOnly?: boolean | undefined;
73
75
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -122,7 +124,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
122
124
  emit: {
123
125
  (e: 'update:page', value: number | undefined): void;
124
126
  (e: 'update:count', value: number): void;
125
- (e: 'update:selected', values: number[]): void;
127
+ (e: 'update:selected', values: Model[]): void;
126
128
  };
127
129
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
128
130
  [key: string]: any;
@@ -130,11 +132,12 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
130
132
  __ctx?: {
131
133
  props: {
132
134
  transition?: boolean | undefined;
135
+ valueGetter: (data: Data) => Model;
133
136
  wrap?: boolean | undefined;
134
137
  scrollingElement?: Element | null | undefined;
135
138
  queryParams: QueryParams;
136
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
137
- selected?: number[] | undefined;
139
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
140
+ selected?: Model[] | undefined;
138
141
  selectOnly?: boolean | undefined;
139
142
  unselectOnly?: boolean | undefined;
140
143
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -189,7 +192,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
189
192
  emit: {
190
193
  (e: 'update:page', value: number | undefined): void;
191
194
  (e: 'update:count', value: number): void;
192
- (e: 'update:selected', values: number[]): void;
195
+ (e: 'update:selected', values: Model[]): void;
193
196
  };
194
197
  } | undefined;
195
198
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"AA2EA;;;;;iBA0biB,WAAW;;;;;;;2BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;WA8BvC,GAAG;;;;oDAtRkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;;oDARgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;YA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;OAwZuB,IAAI;;;;;qBA5B1D,WAAW;;;;;;;+BADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;SA6ByB,IAAI;WACpE,GAAG;;;;oDAtRkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;;oDARgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;YA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;;;;;;;yBA4X/B,WAAW;;;;;;;mCADD,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;aA6ByB,IAAI;eACpE,GAAG;;;;wDAtRkC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;;;;wDARgC,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;2BACF,OAAO;kBACd,IAAI;;;gBA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;gBAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;;;;AAnDhD,wBAid2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"AA4EA;;;wBAidwB,IAAI,KAAK,KAAK;;;iBAtBrB,WAAW;;;;;;gBAFZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;WA+BvC,GAAG;;;kBAxRA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;kBATF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;YA7IN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;;;;OAyZwB,IAAI;;;4BAPnD,IAAI,KAAK,KAAK;;;qBAtBrB,WAAW;;;;;;oBAFZ,kBA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const _sfc_main = /* @__PURE__ */ defineComponent({
32
32
  allowPageSelection: { type: Boolean },
33
33
  pageClass: { default: void 0 },
34
34
  maxPages: { default: 5 },
35
- refetchInterval: { type: [Number, Boolean], default: void 0 }
35
+ refetchInterval: { type: [Number, Boolean], default: void 0 },
36
+ valueGetter: {}
36
37
  },
37
38
  emits: ["update:page", "update:count", "update:selected"],
38
39
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -180,6 +181,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
180
181
  "page-class": _ctx.pageClass,
181
182
  "refetch-interval": _ctx.refetchInterval,
182
183
  "scrolling-element": _ctx.scrollingElement,
184
+ "value-getter": _ctx.valueGetter,
183
185
  class: normalizeClass({
184
186
  "last:min-h-[calc(100vh-var(--header-height)-var(--infinite-list-header-height))] last:pb-16": !_ctx.minHeight
185
187
  }),
@@ -217,7 +219,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
219
  })
218
220
  ]),
219
221
  _: 2
220
- }, 1032, ["query-params", "use-query-fn", "is-invalid-page", "skeleton-length", "first-page", "last-page", "hide-page-title", "selected", "wrap", "no-gap", "transition", "resetting", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "min-height", "page-class", "refetch-interval", "scrolling-element", "class", "onRefetch"]);
222
+ }, 1032, ["query-params", "use-query-fn", "is-invalid-page", "skeleton-length", "first-page", "last-page", "hide-page-title", "selected", "wrap", "no-gap", "transition", "resetting", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "min-height", "page-class", "refetch-interval", "scrolling-element", "value-getter", "class", "onRefetch"]);
221
223
  }), 128)),
222
224
  count.value !== 0 && nextPage.value ? (openBlock(), createBlock(_sfc_main$2, {
223
225
  key: 1,
@@ -1,10 +1,11 @@
1
- declare const _default: <Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
+ valueGetter: (data: Data) => Model;
3
4
  wrap?: boolean | undefined;
4
5
  scrollingElement?: Element | null | undefined;
5
6
  queryParams: QueryParams;
6
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
7
- selected?: number[] | undefined;
7
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
8
+ selected?: Model[] | undefined;
8
9
  selectOnly?: boolean | undefined;
9
10
  unselectOnly?: boolean | undefined;
10
11
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -64,7 +65,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
64
65
  (e: 'error:invalidPage', value: number): void;
65
66
  (e: 'refetch'): void;
66
67
  (e: 'update-from-header:scroll'): void;
67
- (e: 'update:selected', values: number[]): void;
68
+ (e: 'update:selected', values: Model[]): void;
68
69
  (e: 'fetched'): void;
69
70
  };
70
71
  } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
@@ -74,11 +75,12 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
74
75
  }>) => void) | undefined, __VLS_setup?: Promise<{
75
76
  props: {
76
77
  transition?: boolean | undefined;
78
+ valueGetter: (data: Data) => Model;
77
79
  wrap?: boolean | undefined;
78
80
  scrollingElement?: Element | null | undefined;
79
81
  queryParams: QueryParams;
80
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
81
- selected?: number[] | undefined;
82
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
83
+ selected?: Model[] | undefined;
82
84
  selectOnly?: boolean | undefined;
83
85
  unselectOnly?: boolean | undefined;
84
86
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -143,7 +145,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
143
145
  (e: 'error:invalidPage', value: number): void;
144
146
  (e: 'refetch'): void;
145
147
  (e: 'update-from-header:scroll'): void;
146
- (e: 'update:selected', values: number[]): void;
148
+ (e: 'update:selected', values: Model[]): void;
147
149
  (e: 'fetched'): void;
148
150
  };
149
151
  }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -152,11 +154,12 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
152
154
  __ctx?: {
153
155
  props: {
154
156
  transition?: boolean | undefined;
157
+ valueGetter: (data: Data) => Model;
155
158
  wrap?: boolean | undefined;
156
159
  scrollingElement?: Element | null | undefined;
157
160
  queryParams: QueryParams;
158
- "onUpdate:selected"?: ((values: number[]) => any) | undefined;
159
- selected?: number[] | undefined;
161
+ "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
162
+ selected?: Model[] | undefined;
160
163
  selectOnly?: boolean | undefined;
161
164
  unselectOnly?: boolean | undefined;
162
165
  "onUpdate:count"?: ((value: number) => any) | undefined;
@@ -221,7 +224,7 @@ declare const _default: <Data extends DefaultData>(__VLS_props: {
221
224
  (e: 'error:invalidPage', value: number): void;
222
225
  (e: 'refetch'): void;
223
226
  (e: 'update-from-header:scroll'): void;
224
- (e: 'update:selected', values: number[]): void;
227
+ (e: 'update:selected', values: Model[]): void;
225
228
  (e: 'fetched'): void;
226
229
  };
227
230
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAsHA;;;;;iBAwdiB,WAAW;;;;;;;;;;;;;;;2BAED,OAAO,KAAK,OAAO;oBAC1B,MAAM;eACX,OAAO;cACR,OAAO;;;;;;;;;;;WAuBd,GAAG;;;;oDApSkC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;;oDAPgC,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;YAtKN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC9C,qBAAqB,SAAS,MAAM,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,OAAO;sBACR,OAAO;kBACT,IAAI;;;gBAtKN,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAClD,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;gBAChB,2BAA2B,GAAG,IAAI;gBAClC,iBAAiB,UAAU,MAAM,EAAE,GAAG,IAAI;gBAC1C,SAAS,GAAG,IAAI;;;;AAnDtB,wBAkf2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAuHA;;;wBA8ewB,IAAI,KAAK,KAAK;;;iBArBrB,WAAW;;;;;;;;;;;;;;gBACZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;oBAC1B,MAAM;eACX,OAAO;cACR,OAAO;;;;;;;;;;;WAwBd,GAAG;;;kBAtSA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;kBARF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;YAtKN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC9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O;;;;;;;;;;;;;;;aAuBkD,IAAI;eACpE,GAAG;;;sBAtSA,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;kBACT,IAAI;;;sBARF,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;kBACT,IAAI;;;gBAtKN,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAClD,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;gBAChB,2BAA2B,GAAG,IAAI;gBAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;;;;AApDtB,wBAof2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -27,7 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  minHeight: { type: Boolean },
28
28
  pageClass: { default: void 0 },
29
29
  refetchInterval: { type: [Number, Boolean], default: void 0 },
30
- scrollingElement: { default: void 0 }
30
+ scrollingElement: { default: void 0 },
31
+ valueGetter: {}
31
32
  },
32
33
  emits: ["update:count", "update:pagesCount", "update:nextPage", "update:previousPage", "update:scroll", "error:invalidPage", "refetch", "update-from-header:scroll", "update:selected", "fetched"],
33
34
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -179,9 +180,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
179
180
  "select-only": _ctx.selectOnly,
180
181
  "unselect-only": _ctx.unselectOnly,
181
182
  reverse: _ctx.reverseSelection,
183
+ "value-getter": _ctx.valueGetter,
182
184
  class: "sm:w-list-row-item sm-not:px-[calc(var(--inner-margin)-2px)] pb-4 pt-6",
183
185
  "onUpdate:selected": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:selected", $event))
184
- }, null, 8, ["selected", "items", "disabled", "tooltip-text-persisted", "select-only", "unselect-only", "reverse"])) : createCommentVNode("", true),
186
+ }, null, 8, ["selected", "items", "disabled", "tooltip-text-persisted", "select-only", "unselect-only", "reverse", "value-getter"])) : createCommentVNode("", true),
185
187
  !_ctx.hidePageTitle ? (openBlock(), createBlock(_sfc_main$2, {
186
188
  key: 1,
187
189
  "query-params": _ctx.queryParams,
@@ -205,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
205
207
  default: withCtx(() => [
206
208
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(data).results, (item, index) => {
207
209
  return openBlock(), createElementBlock("div", {
208
- key: item.id,
210
+ key: _ctx.valueGetter(item),
209
211
  class: "w-full group"
210
212
  }, [
211
213
  createElementVNode("div", _hoisted_1, [
@@ -226,7 +228,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
226
228
  _: 3
227
229
  }, 8, ["css"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(data).results, (item, index) => {
228
230
  return renderSlot(_ctx.$slots, "default", {
229
- key: item.id,
231
+ key: _ctx.valueGetter(item),
230
232
  item,
231
233
  setter: (newItem) => setItem(index, newItem),
232
234
  refetch: emitRefetch,