eco-vue-js 0.10.5 → 0.10.6

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.
Files changed (96) hide show
  1. package/dist/components/Button/WButtonDropdown.vue.d.ts +1 -1
  2. package/dist/components/Button/WButtonDropdown.vue.d.ts.map +1 -1
  3. package/dist/components/Button/WButtonDropdown.vue.js +1 -12
  4. package/dist/components/Button/WButtonSelection.vue.d.ts +6 -5
  5. package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
  6. package/dist/components/Button/WButtonSelection.vue.js +10 -24
  7. package/dist/components/Checkbox/WCheckbox.vue.d.ts +0 -2
  8. package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
  9. package/dist/components/Checkbox/WCheckbox.vue.js +2 -8
  10. package/dist/components/FieldWrapper/WFieldWrapper.vue.js +1 -14
  11. package/dist/components/Form/WForm.vue.d.ts +2 -2
  12. package/dist/components/Form/WFormValidator.vue.d.ts +2 -2
  13. package/dist/components/Form/WFormValidator.vue.js +1 -14
  14. package/dist/components/Form/models/utils.js +0 -14
  15. package/dist/components/FormAsync/use/useFormAsync.d.ts.map +1 -1
  16. package/dist/components/FormAsync/use/useFormAsync.js +2 -14
  17. package/dist/components/HeaderBar/WHeaderBar.vue.js +2 -2
  18. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +3 -18
  19. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  20. package/dist/components/InfiniteList/WInfiniteList.vue.js +25 -83
  21. package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +1 -1
  22. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +0 -5
  23. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
  24. package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +8 -27
  25. package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts +1 -8
  26. package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts.map +1 -1
  27. package/dist/components/InfiniteList/components/InfiniteListPages.vue.js +10 -21
  28. package/dist/components/InfiniteList/use/useInfiniteListHeader.js +0 -13
  29. package/dist/components/Input/WInputSuggest.vue.js +3 -3
  30. package/dist/components/List/WList.vue.d.ts +2 -0
  31. package/dist/components/List/WList.vue.d.ts.map +1 -1
  32. package/dist/components/List/WList.vue.js +59 -79
  33. package/dist/components/List/WListCard.vue.d.ts +13 -9
  34. package/dist/components/List/WListCard.vue.d.ts.map +1 -1
  35. package/dist/components/List/WListCard.vue.js +77 -84
  36. package/dist/components/List/WListHeaderItem.vue.d.ts.map +1 -1
  37. package/dist/components/List/WListHeaderItem.vue.js +1 -1
  38. package/dist/components/List/components/HeaderSettings.vue.d.ts +3 -2
  39. package/dist/components/List/components/HeaderSettings.vue.d.ts.map +1 -1
  40. package/dist/components/List/components/HeaderSettings.vue.js +20 -24
  41. package/dist/components/List/components/HeaderSort.vue.d.ts +1 -1
  42. package/dist/components/List/components/HeaderSort.vue.d.ts.map +1 -1
  43. package/dist/components/List/components/HeaderSort.vue.js +0 -13
  44. package/dist/components/List/components/ListCardAction.vue.d.ts +23 -0
  45. package/dist/components/List/components/ListCardAction.vue.d.ts.map +1 -0
  46. package/dist/components/List/components/ListCardAction.vue.js +23 -0
  47. package/dist/components/List/components/ListCardAction.vue2.js +5 -0
  48. package/dist/components/List/types.d.ts +5 -0
  49. package/dist/components/List/types.d.ts.map +1 -1
  50. package/dist/components/List/use/useListConfig.d.ts +3 -10
  51. package/dist/components/List/use/useListConfig.d.ts.map +1 -1
  52. package/dist/components/List/use/useListConfig.js +20 -16
  53. package/dist/components/Modal/WModalStepper.vue.d.ts +26 -26
  54. package/dist/components/Nav/WNavItemExpand.vue.js +0 -13
  55. package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
  56. package/dist/components/Select/WSelect.vue.js +2 -2
  57. package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
  58. package/dist/components/Select/WSelectAsync.vue.js +2 -2
  59. package/dist/components/Select/WSelectAsyncList.vue.d.ts +1 -1
  60. package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
  61. package/dist/components/Select/WSelectAsyncList.vue.js +0 -1
  62. package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
  63. package/dist/components/Select/components/SelectAsyncList.vue.js +15 -11
  64. package/dist/components/Tabs/WTabs.vue.d.ts +24 -24
  65. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  66. package/dist/components/Tabs/WTabs.vue.js +4 -17
  67. package/dist/components/Tabs/WTabsColumns.vue.js +2 -2
  68. package/dist/components/Tabs/components/TabItem.vue.d.ts +12 -12
  69. package/dist/main.js +2 -2
  70. package/dist/types/global.d.ts +0 -11
  71. package/dist/utils/mobile.d.ts +3 -0
  72. package/dist/utils/mobile.d.ts.map +1 -1
  73. package/dist/utils/mobile.js +15 -2
  74. package/dist/utils/useSelected.d.ts +22 -10
  75. package/dist/utils/useSelected.d.ts.map +1 -1
  76. package/dist/utils/useSelected.js +172 -45
  77. package/dist/utils/utils.d.ts +5 -0
  78. package/dist/utils/utils.d.ts.map +1 -1
  79. package/dist/utils/utils.js +9 -1
  80. package/eslint/plugin.js +4 -0
  81. package/package.json +1 -1
  82. package/tailwind-base/plugins/default.ts +1 -0
  83. package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.d.ts +0 -31
  84. package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.d.ts.map +0 -1
  85. package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.js +0 -30
  86. package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue2.js +0 -5
  87. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts +0 -27
  88. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts.map +0 -1
  89. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.js +0 -66
  90. package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue2.js +0 -5
  91. package/dist/components/InfiniteList/models/injection.d.ts +0 -16
  92. package/dist/components/InfiniteList/models/injection.d.ts.map +0 -1
  93. package/dist/components/InfiniteList/models/injection.js +0 -4
  94. package/dist/components/InfiniteList/use/useSelected.d.ts +0 -14
  95. package/dist/components/InfiniteList/use/useSelected.d.ts.map +0 -1
  96. package/dist/components/InfiniteList/use/useSelected.js +0 -151
@@ -1,5 +1,5 @@
1
1
  import { ButtonDropdownProps } from './types';
2
- import { HorizontalAlign } from '../../main';
2
+ import { HorizontalAlign } from '../../utils/HorizontalAlign';
3
3
  declare function __VLS_template(): {
4
4
  slots: {
5
5
  content?(_: {
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonDropdown.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAShD,OAAO,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAA;AA+BtC,iBAAS,cAAc;;;;YA0JO,GAAG;;;WASnB,OAAO,IAA6B;EAEjD;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6EAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WButtonDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonDropdown.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAShD,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AA+BvD,iBAAS,cAAc;;;;YA0JO,GAAG;;;WASnB,OAAO,IAA6B;EAEjD;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6EAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,19 +2,8 @@ import { defineComponent, ref, createBlock, openBlock, withCtx, createVNode, ren
2
2
  import _sfc_main$2 from '../ClickOutside/WClickOutside.vue.js';
3
3
  import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
4
4
  import IconArrow from '../../assets/icons/default/IconArrow.svg.js';
5
- import './WButtonAction.vue.js';
6
- import _sfc_main$3 from './WButton.vue.js';
7
5
  import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
8
- import 'vue-router';
9
- import '../../utils/supportsPassive.js';
10
- import '../Dropdown/utils/DropdownStyle.js';
11
- import '../../utils/Modal.js';
12
- import '../Input/WInputSuggest.vue.js';
13
- import '../HeaderBar/use/useHeaderPadding.js';
14
- import '../Input/WInputDate.vue.js';
15
- import '../Link/WLink.vue.js';
16
- import '@tanstack/vue-query';
17
- import '../List/use/useListConfig.js';
6
+ import _sfc_main$3 from './WButton.vue.js';
18
7
 
19
8
  const _hoisted_1 = { class: "flex" };
20
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -17,18 +17,19 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<{
18
18
  title?: string;
19
19
  disableMessage?: string;
20
- }, {
21
- clearSelected: (() => void) | undefined;
22
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
23
- "update:selectionCount": (value: number) => any;
20
+ selectedCount?: number;
21
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
22
+ "clear:selection": () => any;
24
23
  }, string, import('vue').PublicProps, Readonly<{
25
24
  title?: string;
26
25
  disableMessage?: string;
26
+ selectedCount?: number;
27
27
  }> & Readonly<{
28
- "onUpdate:selectionCount"?: ((value: number) => any) | undefined;
28
+ "onClear:selection"?: (() => any) | undefined;
29
29
  }>, {
30
30
  title: string;
31
31
  disableMessage: string;
32
+ selectedCount: number;
32
33
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
34
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
35
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonSelection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonSelection.vue"],"names":[],"mappings":"AAuLA,iBAAS,cAAc;;;;;YA0KM,GAAG;;;;YACL,GAAG;0BACC,GAAG;;;WASpB,OAAO,IAA6B;EAEjD;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YAhQT,MAAM;qBACG,MAAM;;;;;;YADf,MAAM;qBACG,MAAM;;;;WADf,MAAM;oBACG,MAAM;6EA0QzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WButtonSelection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonSelection.vue"],"names":[],"mappings":"AAyJA,iBAAS,cAAc;;;;;YA6KM,GAAG;;;;YACL,GAAG;0BACC,GAAG;;;WASpB,OAAO,IAA6B;EAEjD;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;YAlPT,MAAM;qBACG,MAAM;oBACP,MAAM;;;;YAFd,MAAM;qBACG,MAAM;oBACP,MAAM;;;;WAFd,MAAM;oBACG,MAAM;mBACP,MAAM;6EA0PxB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, inject, computed, watch, createElementBlock, openBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, normalizeProps, guardReactiveProps, unref, withCtx, createVNode, markRaw, toDisplayString } from 'vue';
1
+ import { defineComponent, ref, computed, createElementBlock, openBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, normalizeProps, guardReactiveProps, unref, withCtx, createVNode, markRaw, toDisplayString } from 'vue';
2
2
  import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
3
3
  import IconCancel from '../../assets/icons/default/IconCancel.svg.js';
4
4
  import IconMore from '../../assets/icons/default/IconMore.svg.js';
@@ -6,7 +6,6 @@ import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
6
6
  import { numberFormatter } from '../../utils/utils.js';
7
7
  import _sfc_main$3 from './WButtonSelectionAction.vue.js';
8
8
  import _sfc_main$2 from '../ClickOutside/WClickOutside.vue.js';
9
- import { wInfiniteListSelection } from '../InfiniteList/models/injection.js';
10
9
 
11
10
  const _hoisted_1 = { class: "sm:left-inner sm:w-inner grid h-12 w-full grid-cols-[1fr,auto] pb-3 sm:sticky" };
12
11
  const _hoisted_2 = { class: "flex" };
@@ -21,26 +20,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
20
  __name: "WButtonSelection",
22
21
  props: {
23
22
  title: { default: "item" },
24
- disableMessage: { default: "No selected items" }
23
+ disableMessage: { default: "No selected items" },
24
+ selectedCount: { default: void 0 }
25
25
  },
26
- emits: ["update:selectionCount"],
27
- setup(__props, { expose: __expose, emit: __emit }) {
26
+ emits: ["clear:selection"],
27
+ setup(__props) {
28
28
  const props = __props;
29
- const emit = __emit;
30
29
  const isOpen = ref(false);
31
- const {
32
- selectedCount,
33
- clearSelected
34
- } = inject(wInfiniteListSelection, {});
35
- const disableMessageValue = computed(() => selectedCount?.value === 0 ? props.disableMessage : void 0);
36
- if (selectedCount) {
37
- watch(selectedCount, (value) => {
38
- emit("update:selectionCount", value);
39
- }, { immediate: true });
40
- }
41
- __expose({
42
- clearSelected
43
- });
30
+ const disableMessageValue = computed(() => props.selectedCount === 0 ? props.disableMessage : void 0);
44
31
  return (_ctx, _cache) => {
45
32
  return openBlock(), createElementBlock("div", _hoisted_1, [
46
33
  createElementVNode("div", _hoisted_2, [
@@ -80,16 +67,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
67
  _: 3
81
68
  }, 8, ["is-open", "horizontal-align"])) : createCommentVNode("", true)
82
69
  ]),
83
- unref(selectedCount) ? (openBlock(), createElementBlock("div", _hoisted_3, [
70
+ _ctx.selectedCount ? (openBlock(), createElementBlock("div", _hoisted_3, [
84
71
  createElementVNode("div", _hoisted_4, [
85
72
  _cache[3] || (_cache[3] = createElementVNode("span", { class: "sm-not:hidden" }, "Selected ", -1)),
86
- createElementVNode("span", _hoisted_5, toDisplayString(unref(numberFormatter).format(unref(selectedCount))), 1),
87
- createElementVNode("span", _hoisted_6, " " + toDisplayString(_ctx.title) + toDisplayString(unref(selectedCount) === 1 ? "" : "s"), 1)
73
+ createElementVNode("span", _hoisted_5, toDisplayString(unref(numberFormatter).format(_ctx.selectedCount)), 1),
74
+ createElementVNode("span", _hoisted_6, " " + toDisplayString(_ctx.title) + toDisplayString(_ctx.selectedCount === 1 ? "" : "s"), 1)
88
75
  ]),
89
76
  createElementVNode("button", {
90
77
  class: "text-description w-ripple w-ripple-hover relative flex cursor-pointer select-none items-center justify-self-end",
91
- onClick: _cache[2] || (_cache[2] = //@ts-ignore
92
- (...args) => unref(clearSelected) && unref(clearSelected)(...args))
78
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("clear:selection"))
93
79
  }, [
94
80
  createVNode(unref(IconCancel), { class: "square-5 sm-not:-mx--inner-margin mx-[1.125rem]" })
95
81
  ])
@@ -18,7 +18,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
18
18
  loading?: boolean;
19
19
  intermediate?: boolean;
20
20
  tooltipText?: string;
21
- allowShift?: boolean;
22
21
  alignTop?: boolean;
23
22
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
24
23
  "update:modelValue": (value: boolean) => any;
@@ -33,7 +32,6 @@ declare const __VLS_component: import('vue').DefineComponent<{
33
32
  loading?: boolean;
34
33
  intermediate?: boolean;
35
34
  tooltipText?: string;
36
- allowShift?: boolean;
37
35
  alignTop?: boolean;
38
36
  }> & Readonly<{
39
37
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/WCheckbox.vue"],"names":[],"mappings":"AAiLA,iBAAS,cAAc;;yBAkKO,GAAG;;;;;WAUnB,OAAO,IAA6B;EAEjD;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;gBAvOP,OAAO,GAAG,IAAI;YAClB,MAAM;eACH,OAAO;eACP,OAAO;WACX,YAAY;YACX,OAAO;cACL,OAAO;mBACF,OAAO;kBACR,MAAM;iBACP,OAAO;eACT,OAAO;;;;;gBAVN,OAAO,GAAG,IAAI;YAClB,MAAM;eACH,OAAO;eACP,OAAO;WACX,YAAY;YACX,OAAO;cACL,OAAO;mBACF,OAAO;kBACR,MAAM;iBACP,OAAO;eACT,OAAO;;;;;;OAwOlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/WCheckbox.vue"],"names":[],"mappings":"AAqKA,iBAAS,cAAc;;yBAkKO,GAAG;;;;;WAUnB,OAAO,IAA6B;EAEjD;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;gBAjOP,OAAO,GAAG,IAAI;YAClB,MAAM;eACH,OAAO;eACP,OAAO;WACX,YAAY;YACX,OAAO;cACL,OAAO;mBACF,OAAO;kBACR,MAAM;eACT,OAAO;;;;;gBATN,OAAO,GAAG,IAAI;YAClB,MAAM;eACH,OAAO;eACP,OAAO;WACX,YAAY;YACX,OAAO;cACL,OAAO;mBACF,OAAO;kBACR,MAAM;eACT,OAAO;;;;;;OAmOlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -20,7 +20,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  loading: { type: Boolean },
21
21
  intermediate: { type: Boolean },
22
22
  tooltipText: {},
23
- allowShift: { type: Boolean },
24
23
  alignTop: { type: Boolean }
25
24
  },
26
25
  emits: ["update:modelValue", "update-shift:modelValue"],
@@ -28,14 +27,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
27
  const props = __props;
29
28
  const emit = __emit;
30
29
  const elementRef = useTemplateRef("element");
31
- const toggle = (e) => {
30
+ const toggle = () => {
32
31
  if (props.disabled || props.readonly || props.loading) return;
33
- if (props.allowShift && e.shiftKey) {
34
- emit("update-shift:modelValue", !props.modelValue);
35
- return;
36
- } else {
37
- emit("update:modelValue", !props.modelValue);
38
- }
32
+ emit("update:modelValue", !props.modelValue);
39
33
  };
40
34
  return (_ctx, _cache) => {
41
35
  return openBlock(), createElementBlock("button", {
@@ -2,22 +2,9 @@ import { defineComponent, useId, ref, computed, createElementBlock, openBlock, n
2
2
  import _sfc_main$2 from '../Button/WButtonCopy.vue.js';
3
3
  import WSkeleton from '../Skeleton/WSkeleton.vue.js';
4
4
  import _sfc_main$3 from '../Tooltip/WTooltip.vue.js';
5
- import '../Button/WButtonAction.vue.js';
6
- import '../Button/WButton.vue.js';
7
- import '../Button/WButtonDropdown.vue.js';
5
+ import { encodeQueryParam } from '../../utils/api.js';
8
6
  import { numberFormatter } from '../../utils/utils.js';
9
7
  import _sfc_main$1 from './components/FilterButton.vue.js';
10
- import '../../utils/supportsPassive.js';
11
- import '../Dropdown/utils/DropdownStyle.js';
12
- import 'vue-router';
13
- import '../../utils/Modal.js';
14
- import '../Input/WInputSuggest.vue.js';
15
- import { encodeQueryParam } from '../../utils/api.js';
16
- import '../HeaderBar/use/useHeaderPadding.js';
17
- import '../Input/WInputDate.vue.js';
18
- import '../Link/WLink.vue.js';
19
- import '@tanstack/vue-query';
20
- import '../List/use/useListConfig.js';
21
8
 
22
9
  const _hoisted_1 = ["for"];
23
10
  const _hoisted_2 = {
@@ -26,16 +26,16 @@ declare const __VLS_component: import('vue').DefineComponent<{
26
26
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
27
27
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
28
28
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
- "update:has-changes": (value: boolean) => any;
30
29
  "update:is-valid": (value: boolean | undefined) => any;
30
+ "update:has-changes": (value: boolean) => any;
31
31
  "update:has-value": (value: boolean | null) => any;
32
32
  }, string, import('vue').PublicProps, Readonly<{
33
33
  name?: string;
34
34
  title?: string;
35
35
  noTag?: boolean;
36
36
  }> & Readonly<{
37
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
38
37
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
38
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
39
39
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
40
40
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
41
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -24,8 +24,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
24
24
  invalidate(message: string): void;
25
25
  initModel: () => void;
26
26
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
27
- "update:has-changes": (value: boolean) => any;
28
27
  "update:is-valid": (value: boolean) => any;
28
+ "update:has-changes": (value: boolean) => any;
29
29
  "update:has-value": (value: boolean | null) => any;
30
30
  invalidate: (value: Record<string, string | string[] | undefined>) => any;
31
31
  }, string, import('vue').PublicProps, Readonly<{
@@ -37,8 +37,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
37
37
  noChanges?: boolean;
38
38
  hasValue?: boolean;
39
39
  }> & Readonly<{
40
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
41
40
  "onUpdate:is-valid"?: ((value: boolean) => any) | undefined;
41
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
42
42
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
43
43
  onInvalidate?: ((value: Record<string, string | string[] | undefined>) => any) | undefined;
44
44
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,23 +1,10 @@
1
1
  import { defineComponent, inject, useSlots, computed, useTemplateRef, ref, watch, onBeforeMount, onBeforeUnmount, createBlock, openBlock, resolveDynamicComponent } from 'vue';
2
2
  import { useIsInsideTab } from '../Tabs/use/useIsInsideTab.js';
3
3
  import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
4
- import '../Button/WButtonAction.vue.js';
5
- import '../Button/WButton.vue.js';
6
4
  import { debounce } from '../../utils/utils.js';
7
- import '../Button/WButtonDropdown.vue.js';
8
- import '../../utils/supportsPassive.js';
9
- import '../Dropdown/utils/DropdownStyle.js';
10
- import 'vue-router';
11
- import '../../utils/Modal.js';
5
+ import { validateRequired } from '../../utils/validate.js';
12
6
  import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormHasValueUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
13
7
  import { scrollToValidator } from './models/utils.js';
14
- import { validateRequired } from '../../utils/validate.js';
15
- import '../Input/WInputSuggest.vue.js';
16
- import '../HeaderBar/use/useHeaderPadding.js';
17
- import '../Input/WInputDate.vue.js';
18
- import '../Link/WLink.vue.js';
19
- import '@tanstack/vue-query';
20
- import '../List/use/useListConfig.js';
21
8
 
22
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
23
10
  __name: "WFormValidator",
@@ -1,18 +1,4 @@
1
- import 'vue';
2
- import '../../Button/WButtonAction.vue.js';
3
- import '../../Button/WButton.vue.js';
4
1
  import { throttle } from '../../../utils/utils.js';
5
- import '../../Button/WButtonDropdown.vue.js';
6
- import '../../../utils/supportsPassive.js';
7
- import '../../Dropdown/utils/DropdownStyle.js';
8
- import 'vue-router';
9
- import '../../../utils/Modal.js';
10
- import '../../Input/WInputSuggest.vue.js';
11
- import '../../HeaderBar/use/useHeaderPadding.js';
12
- import '../../Input/WInputDate.vue.js';
13
- import '../../Link/WLink.vue.js';
14
- import '@tanstack/vue-query';
15
- import '../../List/use/useListConfig.js';
16
2
 
17
3
  const fieldMessageStart = " - ";
18
4
  const subformMessageStart = " ";
@@ -1 +1 @@
1
- {"version":3,"file":"useFormAsync.d.ts","sourceRoot":"","sources":["../../../../src/components/FormAsync/use/useFormAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;AAM5C,eAAO,MAAM,YAAY,GAAI,KAAK,EAAE,SAAS,EAAE,WAAW,SAAS,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;;;;;uBAgCvH,SAAS;CA8BpC,CAAA"}
1
+ {"version":3,"file":"useFormAsync.d.ts","sourceRoot":"","sources":["../../../../src/components/FormAsync/use/useFormAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,UAAU,CAAA;AAS5C,eAAO,MAAM,YAAY,GAAI,KAAK,EAAE,SAAS,EAAE,WAAW,SAAS,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;;;;;uBAgCvH,SAAS;CA8BpC,CAAA"}
@@ -1,20 +1,8 @@
1
1
  import { toRef, ref, computed, onBeforeUnmount } from 'vue';
2
- import '../../Button/WButtonAction.vue.js';
3
- import '../../Button/WButton.vue.js';
4
- import { get, set } from '../../../utils/utils.js';
5
- import { Notify } from '../../../utils/Notify.js';
6
- import '../../Button/WButtonDropdown.vue.js';
7
- import '../../../utils/supportsPassive.js';
8
- import '../../Dropdown/utils/DropdownStyle.js';
9
- import 'vue-router';
10
2
  import { Modal } from '../../../utils/Modal.js';
11
- import '../../Input/WInputSuggest.vue.js';
3
+ import { Notify } from '../../../utils/Notify.js';
12
4
  import { handleApiError } from '../../../utils/api.js';
13
- import '../../HeaderBar/use/useHeaderPadding.js';
14
- import '../../Input/WInputDate.vue.js';
15
- import '../../Link/WLink.vue.js';
16
- import '@tanstack/vue-query';
17
- import '../../List/use/useListConfig.js';
5
+ import { get, set } from '../../../utils/utils.js';
18
6
 
19
7
  const useFormAsync = (props, onSuccess) => {
20
8
  const enabled = toRef(props, "queryEnabled");
@@ -2,7 +2,7 @@ import { defineComponent, useTemplateRef, ref, watch, toRef, onMounted, onBefore
2
2
  import _sfc_main$2 from '../Input/WInput.vue.js';
3
3
  import _sfc_main$1 from '../Input/WInputSuggest.vue.js';
4
4
  import IconSearch from '../../assets/icons/sax/IconSearch.svg.js';
5
- import { getIsMobile } from '../../utils/mobile.js';
5
+ import { useIsMobile } from '../../utils/mobile.js';
6
6
  import { useHeaderPadding } from './use/useHeaderPadding.js';
7
7
 
8
8
  const _hoisted_1 = { class: "fixed inset-x-0 top-0 z-10 flex h-[3.75rem] print:hidden" };
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  emits: ["update:search"],
23
23
  setup(__props) {
24
24
  const props = __props;
25
- const isMobile = getIsMobile();
25
+ const { isMobile } = useIsMobile();
26
26
  const { headerPadding } = useHeaderPadding();
27
27
  const inputRef = useTemplateRef("input");
28
28
  const isTransparent = ref(false);
@@ -1,16 +1,13 @@
1
1
  import { ApiError } from '../../utils/api';
2
2
  declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
- readonly onSelect?: ((values: Model[]) => any) | undefined;
5
4
  readonly "onUpdate:count"?: ((value: number) => any) | undefined;
6
5
  readonly "onUpdate:error"?: ((value: ApiError<{}, {
7
6
  detail?: string | undefined;
8
7
  non_field_errors?: string[] | undefined;
9
8
  }>) => any) | undefined;
10
9
  readonly "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
11
- readonly "onSelect-reverse"?: ((values: Model[]) => any) | undefined;
12
- readonly "onSelect-range"?: ((value: SelectedRange<Model>) => any) | undefined;
13
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSelect" | "onUpdate:count" | "onUpdate:error" | "onUpdate:page" | "onSelect-reverse" | "onSelect-range"> & {
10
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:count" | "onUpdate:error" | "onUpdate:page"> & {
14
11
  useQueryFn: UseQueryPaginated<Data, QueryParams>;
15
12
  queryParams: QueryParams;
16
13
  skeletonLength?: number;
@@ -29,16 +26,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
29
26
  queryOptions?: Partial<QueryOptions<PaginatedResponse<Data>>>;
30
27
  pageLength?: number;
31
28
  count?: number;
32
- allowSelect?: boolean;
33
- allowSelectRange?: boolean;
34
29
  valueGetter?: (data: Data) => Model;
35
- selected?: Model[];
36
- selectedRange?: SelectedRange<Model>;
37
- reverse?: boolean;
38
- selectOnly?: boolean;
39
- unselectOnly?: boolean;
40
- reverseSelection?: boolean;
41
- allowPageSelection?: boolean;
42
30
  }> & import('vue').PublicProps;
43
31
  expose(exposed: import('vue').ShallowUnwrapRef<{
44
32
  resetPage(): void;
@@ -57,11 +45,11 @@ declare const _default: <Model extends number | string, Data extends DefaultData
57
45
  resetting: boolean;
58
46
  page: number;
59
47
  index: number;
48
+ position: number;
60
49
  value: Model;
61
50
  }) => void;
62
51
  header?: (props: {
63
52
  goto: (page: number, itemIndex?: number) => void;
64
- selectAllValue: boolean | null;
65
53
  }) => void;
66
54
  }> & {
67
55
  default?: (props: {
@@ -76,19 +64,16 @@ declare const _default: <Model extends number | string, Data extends DefaultData
76
64
  resetting: boolean;
77
65
  page: number;
78
66
  index: number;
67
+ position: number;
79
68
  value: Model;
80
69
  }) => void;
81
70
  header?: (props: {
82
71
  goto: (page: number, itemIndex?: number) => void;
83
- selectAllValue: boolean | null;
84
72
  }) => void;
85
73
  };
86
74
  emit: {
87
75
  (e: "update:page", value: number | undefined): void;
88
76
  (e: "update:count", value: number): void;
89
- (e: "select", values: Model[]): void;
90
- (e: "select-reverse", values: Model[]): void;
91
- (e: "select-range", value: SelectedRange<Model>): void;
92
77
  (e: "update:error", value: ApiError): void;
93
78
  };
94
79
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteList.vue"],"names":[],"mappings":"AAkOA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;yBAaxB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,eACvE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAyXxD,mBAAmB,CAAC;;;;;;;;;;;oBArXd,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;qBACnC,WAAW;yBACP,MAAM;wBACP,OAAO;eAChB,OAAO;qBACD,OAAO;2BACD,OAAO,GAAG,IAAI;0BACf,OAAO;oBACb,OAAO;oBACP,OAAO;wBACH,CAAC,MAAM,WAAW,CAAC,EAAE;oBACzB,MAAM;oBACN,MAAM;mBACP,MAAM;0BACC,MAAM,GAAG,KAAK;uBACjB,OAAO,CAAC,Y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,IAAI,CAAA;YAC5C,QAAQ,EAAE,OAAO,CAAA;YACjB,OAAO,EAAE,MAAM,IAAI,CAAA;YACnB,QAAQ,CAAC,EAAE,IAAI,CAAA;YACf,IAAI,CAAC,EAAE,IAAI,CAAA;YACX,KAAK,EAAE,OAAO,CAAA;YACd,IAAI,EAAE,OAAO,CAAA;YACb,SAAS,EAAE,OAAO,CAAA;YAClB,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,QAAQ,EAAE,MAAM,CAAA;YAChB,KAAK,EAAE,KAAK,CAAA;SACb,KAAK,IAAI;iBACD,CAAC,KAAK,EAAE;YACf,IAAI,SAhCY,MAAM,cAAc,MAAM,UAgCzB;SAClB,KAAK,IAAI;;;YAxCN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,cAAc,SAAS,QAAQ,GAAG,IAAI;;;;;YAuMA,OAAO,CAAC,OAAO,WAAW,CAAC;;AAzPvE,wBAyP4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,10 +1,8 @@
1
- import { defineComponent, useTemplateRef, toRef, provide, createBlock, openBlock, resolveDynamicComponent, withCtx, createVNode, normalizeStyle, normalizeClass, unref, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
1
+ import { defineComponent, useTemplateRef, createBlock, openBlock, resolveDynamicComponent, withCtx, createVNode, normalizeStyle, normalizeClass, renderSlot, unref, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import _sfc_main$1 from '../EmptyComponent/WEmptyComponent.vue.js';
3
+ import { getPosition } from '../../utils/useSelected.js';
3
4
  import _sfc_main$2 from './WInfiniteListWrapper.vue.js';
4
- import _sfc_main$4 from './components/InfiniteListPageSelectItem.vue.js';
5
5
  import _sfc_main$3 from './components/InfiniteListPages.vue.js';
6
- import { wInfiniteListSelection } from './models/injection.js';
7
- import { useSelected } from './use/useSelected.js';
8
6
 
9
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
8
  __name: "WInfiniteList",
@@ -27,52 +25,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
25
  queryOptions: { default: void 0 },
28
26
  pageLength: { default: 24 },
29
27
  count: { default: 0 },
30
- allowSelect: { type: Boolean },
31
- allowSelectRange: { type: Boolean },
32
- valueGetter: { type: Function, default: (item) => item.id },
33
- selected: { default: () => [] },
34
- selectedRange: { default: void 0 },
35
- reverse: { type: Boolean },
36
- selectOnly: { type: Boolean },
37
- unselectOnly: { type: Boolean },
38
- reverseSelection: { type: Boolean },
39
- allowPageSelection: { type: Boolean }
28
+ valueGetter: { type: Function, default: (item) => item.id }
40
29
  },
41
- emits: ["update:page", "update:count", "select", "select-reverse", "select-range", "update:error"],
42
- setup(__props, { expose: __expose, emit: __emit }) {
30
+ emits: ["update:page", "update:count", "update:error"],
31
+ setup(__props, { expose: __expose }) {
43
32
  const props = __props;
44
- const emit = __emit;
45
33
  const infiniteListPagesRef = useTemplateRef("infiniteListPages");
46
34
  const goto = (page, itemIndex) => {
47
35
  infiniteListPagesRef.value?.goto(page, itemIndex);
48
36
  };
49
- const {
50
- setSelectedRange,
51
- getIsSelected,
52
- getIsSelectedBetween,
53
- allowSelectHover,
54
- setRangeHover,
55
- setSelectedCursor,
56
- toggleSelected,
57
- selectedCount,
58
- selectAllValue
59
- } = useSelected(
60
- toRef(props, "count"),
61
- toRef(props, "pageLength"),
62
- toRef(props, "selected"),
63
- toRef(props, "reverse"),
64
- toRef(props, "selectedRange"),
65
- (value) => emit("select", value),
66
- (value) => emit("select-reverse", value),
67
- (value) => emit("select-range", value)
68
- );
69
- provide(wInfiniteListSelection, {
70
- allowSelect: toRef(props, "allowSelect"),
71
- allowSelectRange: toRef(props, "allowSelectRange"),
72
- allowSelectHover,
73
- selectedCount,
74
- clearSelected: () => emit("select", [])
75
- });
76
37
  __expose({
77
38
  resetPage() {
78
39
  infiniteListPagesRef.value?.resetPage();
@@ -84,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
45
  "init-is-intersecting": props.queryParams instanceof Object && "page" in props.queryParams && Number.isInteger(props.queryParams.page) && props.queryParams.page > 1 ? false : void 0
85
46
  }, {
86
47
  header: withCtx(() => [
87
- renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({ selectAllValue: unref(selectAllValue), goto })))
48
+ renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({ goto })))
88
49
  ]),
89
50
  default: withCtx((defaultScope) => [
90
51
  createVNode(_sfc_main$3, {
@@ -109,49 +70,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
109
70
  "query-options": _ctx.queryOptions,
110
71
  class: normalizeClass(_ctx.$attrs.class),
111
72
  style: normalizeStyle(_ctx.$attrs.style),
112
- selected: _ctx.selected,
113
73
  "value-getter": _ctx.valueGetter,
114
- "select-only": _ctx.selectOnly,
115
- "unselect-only": _ctx.unselectOnly,
116
- "reverse-selection": _ctx.reverseSelection,
117
- "allow-page-selection": _ctx.allowPageSelection,
118
- "onUpdate:selected": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("select", $event)),
119
- "onUpdate:count": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:count", $event)),
120
- "onUpdate:page": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", $event)),
121
- "onUpdate:error": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("update:error", $event))
74
+ "onUpdate:count": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:count", $event)),
75
+ "onUpdate:page": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:page", $event)),
76
+ "onUpdate:error": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:error", $event))
122
77
  }, {
123
78
  default: withCtx(({ item, value, setter, skeleton, refetch, previous, next, first, last, resetting, page, index }) => [
124
- (openBlock(), createBlock(resolveDynamicComponent(skeleton ? _sfc_main$1 : _sfc_main$4), {
125
- selected: skeleton ? false : unref(getIsSelected)(value),
126
- "selected-between": skeleton ? false : unref(getIsSelectedBetween)(value, page, index),
127
- "onUpdate:selected": ($event) => {
128
- unref(toggleSelected)(value, _ctx.reverse && !_ctx.selectedRange ? !$event : $event);
129
- unref(setSelectedCursor)($event ? { page, index, id: value } : null);
130
- },
131
- "onUpdate:selectedRange": ($event) => unref(setSelectedRange)({ page, index, id: value }),
132
- "onUpdate:selectedRangeHover": ($event) => unref(setRangeHover)({ page, index, id: value })
133
- }, {
134
- default: withCtx(() => [
135
- renderSlot(_ctx.$slots, "default", {
136
- item,
137
- setter,
138
- skeleton,
139
- refetch,
140
- previous,
141
- next,
142
- first,
143
- last,
144
- resetting,
145
- page,
146
- index,
147
- value
148
- })
149
- ]),
150
- _: 2
151
- }, 1064, ["selected", "selected-between", "onUpdate:selected", "onUpdate:selectedRange", "onUpdate:selectedRangeHover"]))
79
+ renderSlot(_ctx.$slots, "default", {
80
+ item,
81
+ setter,
82
+ skeleton,
83
+ refetch,
84
+ previous,
85
+ next,
86
+ first,
87
+ last,
88
+ resetting,
89
+ page,
90
+ index,
91
+ position: unref(getPosition)(page, index, _ctx.pageLength),
92
+ value
93
+ })
152
94
  ]),
153
95
  _: 2
154
- }, 1032, ["query-params", "use-query-fn", "scrolling-element", "skeleton-length", "hide-page-title", "wrap", "transition", "page-length", "header-top", "header-height", "min-height", "last-child", "exclude-params", "empty-stub", "page-class", "max-pages", "refetch-interval", "query-options", "class", "style", "selected", "value-getter", "select-only", "unselect-only", "reverse-selection", "allow-page-selection"])
96
+ }, 1032, ["query-params", "use-query-fn", "scrolling-element", "skeleton-length", "hide-page-title", "wrap", "transition", "page-length", "header-top", "header-height", "min-height", "last-child", "exclude-params", "empty-stub", "page-class", "max-pages", "refetch-interval", "query-options", "class", "style", "value-getter"])
155
97
  ]),
156
98
  _: 3
157
99
  }, 8, ["scrolling-element", "init-is-intersecting"]);
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  ref: header,
35
35
  class: normalizeClass(["sticky top-[var(--header-height)]", {
36
36
  "z-20": !unref(isIntersecting),
37
- "z-[1]": unref(isIntersecting)
37
+ "z-[2]": unref(isIntersecting)
38
38
  }])
39
39
  }, [
40
40
  renderSlot(_ctx.$slots, "header")
@@ -17,12 +17,7 @@ declare const _default: <Model extends number | string, Data extends DefaultData
17
17
  refetchInterval?: number | false;
18
18
  scrollingElement?: Element | null;
19
19
  queryOptions?: Partial<QueryOptions<PaginatedResponse<Data>>>;
20
- selected?: Model[];
21
20
  valueGetter: (data: Data) => Model;
22
- selectOnly?: boolean;
23
- unselectOnly?: boolean;
24
- reverseSelection?: boolean;
25
- allowPageSelection?: boolean;
26
21
  }> & import('vue').PublicProps;
27
22
  expose(exposed: import('vue').ShallowUnwrapRef<{
28
23
  getFirst: () => Data | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAuWA,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;yBAMnB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,eACvE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA4cxD,mBAAmB,CAAC;qBAxcb,WAAW;oBACZ,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;wBAChC,MAAM;mBACX,OAAO;kBACR,OAAO;wBACD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,KAAK,IAAI;;;YApMN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,kBAAkB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC/C,sBAAsB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YACnD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,aAAa,SAAS,MAAM,GAAG,IAAI;YACnC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;YAChB,cAAc,SAAS,QAAQ,GAAG,IAAI;;;;;YA8ZA,OAAO,CAAC,OAAO,WAAW,CAAC;;AAtdvE,wBAsd4E;AAC5E,KAAK,mBAAmB,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":"AAkVA,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;yBAKnB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,eACvE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAuaxD,mBAAmB,CAAC;qBAnab,WAAW;oBACZ,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;wBAChC,MAAM;mBACX,OAAO;kBACR,OAA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