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
@@ -15,8 +15,8 @@ declare function __VLS_template(): {
15
15
  readonly name?: string | undefined;
16
16
  readonly title?: string | undefined;
17
17
  readonly noTag?: boolean | undefined;
18
- readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
19
18
  readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
19
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
20
20
  readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
21
21
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
22
22
  $attrs: {
@@ -31,15 +31,15 @@ declare function __VLS_template(): {
31
31
  $root: import('vue').ComponentPublicInstance | null;
32
32
  $parent: import('vue').ComponentPublicInstance | null;
33
33
  $host: Element | null;
34
- $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
34
+ $emit: ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-changes", value: boolean) => void) & ((event: "update:has-value", value: boolean | null) => void);
35
35
  $el: any;
36
36
  $options: import('vue').ComponentOptionsBase<Readonly<{
37
37
  name?: string;
38
38
  title?: string;
39
39
  noTag?: boolean;
40
40
  }> & Readonly<{
41
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
42
41
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
42
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
43
43
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
44
44
  }>, {
45
45
  isValid: import('vue').ComputedRef<boolean>;
@@ -56,8 +56,8 @@ declare function __VLS_template(): {
56
56
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
57
57
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
58
58
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
59
- "update:has-changes": (value: boolean) => any;
60
59
  "update:is-valid": (value: boolean | undefined) => any;
60
+ "update:has-changes": (value: boolean) => any;
61
61
  "update:has-value": (value: boolean | null) => any;
62
62
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
63
63
  beforeCreate?: (() => void) | (() => void)[];
@@ -84,10 +84,10 @@ declare function __VLS_template(): {
84
84
  title?: string;
85
85
  noTag?: boolean;
86
86
  }> & Readonly<{
87
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
88
87
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
88
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
89
89
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
90
- }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
90
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasChangesMap" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
91
91
  isValid: import('vue').ComputedRef<boolean>;
92
92
  hasChanges: import('vue').Ref<boolean, boolean>;
93
93
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
@@ -272,8 +272,8 @@ declare function __VLS_template(): {
272
272
  readonly name?: string | undefined;
273
273
  readonly title?: string | undefined;
274
274
  readonly noTag?: boolean | undefined;
275
- readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
276
275
  readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
276
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
277
277
  readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
278
278
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
279
279
  $attrs: {
@@ -288,15 +288,15 @@ declare function __VLS_template(): {
288
288
  $root: import('vue').ComponentPublicInstance | null;
289
289
  $parent: import('vue').ComponentPublicInstance | null;
290
290
  $host: Element | null;
291
- $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
291
+ $emit: ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-changes", value: boolean) => void) & ((event: "update:has-value", value: boolean | null) => void);
292
292
  $el: any;
293
293
  $options: import('vue').ComponentOptionsBase<Readonly<{
294
294
  name?: string;
295
295
  title?: string;
296
296
  noTag?: boolean;
297
297
  }> & Readonly<{
298
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
299
298
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
299
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
300
300
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
301
301
  }>, {
302
302
  isValid: import('vue').ComputedRef<boolean>;
@@ -313,8 +313,8 @@ declare function __VLS_template(): {
313
313
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
314
314
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
315
315
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
316
- "update:has-changes": (value: boolean) => any;
317
316
  "update:is-valid": (value: boolean | undefined) => any;
317
+ "update:has-changes": (value: boolean) => any;
318
318
  "update:has-value": (value: boolean | null) => any;
319
319
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
320
320
  beforeCreate?: (() => void) | (() => void)[];
@@ -341,10 +341,10 @@ declare function __VLS_template(): {
341
341
  title?: string;
342
342
  noTag?: boolean;
343
343
  }> & Readonly<{
344
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
345
344
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
345
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
346
346
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
347
- }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
347
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasChangesMap" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
348
348
  isValid: import('vue').ComputedRef<boolean>;
349
349
  hasChanges: import('vue').Ref<boolean, boolean>;
350
350
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
@@ -465,8 +465,8 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
465
465
  readonly name?: string | undefined;
466
466
  readonly title?: string | undefined;
467
467
  readonly noTag?: boolean | undefined;
468
- readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
469
468
  readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
469
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
470
470
  readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
471
471
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
472
472
  $attrs: {
@@ -481,15 +481,15 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
481
481
  $root: import('vue').ComponentPublicInstance | null;
482
482
  $parent: import('vue').ComponentPublicInstance | null;
483
483
  $host: Element | null;
484
- $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
484
+ $emit: ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-changes", value: boolean) => void) & ((event: "update:has-value", value: boolean | null) => void);
485
485
  $el: any;
486
486
  $options: import('vue').ComponentOptionsBase<Readonly<{
487
487
  name?: string;
488
488
  title?: string;
489
489
  noTag?: boolean;
490
490
  }> & Readonly<{
491
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
492
491
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
492
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
493
493
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
494
494
  }>, {
495
495
  isValid: import('vue').ComputedRef<boolean>;
@@ -506,8 +506,8 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
506
506
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
507
507
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
508
508
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
509
- "update:has-changes": (value: boolean) => any;
510
509
  "update:is-valid": (value: boolean | undefined) => any;
510
+ "update:has-changes": (value: boolean) => any;
511
511
  "update:has-value": (value: boolean | null) => any;
512
512
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
513
513
  beforeCreate?: (() => void) | (() => void)[];
@@ -534,10 +534,10 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
534
534
  title?: string;
535
535
  noTag?: boolean;
536
536
  }> & Readonly<{
537
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
538
537
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
538
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
539
539
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
540
- }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
540
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasChangesMap" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
541
541
  isValid: import('vue').ComputedRef<boolean>;
542
542
  hasChanges: import('vue').Ref<boolean, boolean>;
543
543
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
@@ -722,8 +722,8 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
722
722
  readonly name?: string | undefined;
723
723
  readonly title?: string | undefined;
724
724
  readonly noTag?: boolean | undefined;
725
- readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
726
725
  readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
726
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
727
727
  readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
728
728
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
729
729
  $attrs: {
@@ -738,15 +738,15 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
738
738
  $root: import('vue').ComponentPublicInstance | null;
739
739
  $parent: import('vue').ComponentPublicInstance | null;
740
740
  $host: Element | null;
741
- $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
741
+ $emit: ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-changes", value: boolean) => void) & ((event: "update:has-value", value: boolean | null) => void);
742
742
  $el: any;
743
743
  $options: import('vue').ComponentOptionsBase<Readonly<{
744
744
  name?: string;
745
745
  title?: string;
746
746
  noTag?: boolean;
747
747
  }> & Readonly<{
748
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
749
748
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
749
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
750
750
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
751
751
  }>, {
752
752
  isValid: import('vue').ComputedRef<boolean>;
@@ -763,8 +763,8 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
763
763
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
764
764
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
765
765
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
766
- "update:has-changes": (value: boolean) => any;
767
766
  "update:is-valid": (value: boolean | undefined) => any;
767
+ "update:has-changes": (value: boolean) => any;
768
768
  "update:has-value": (value: boolean | null) => any;
769
769
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
770
770
  beforeCreate?: (() => void) | (() => void)[];
@@ -791,10 +791,10 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
791
791
  title?: string;
792
792
  noTag?: boolean;
793
793
  }> & Readonly<{
794
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
795
794
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
795
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
796
796
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
797
- }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
797
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasChangesMap" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
798
798
  isValid: import('vue').ComputedRef<boolean>;
799
799
  hasChanges: import('vue').Ref<boolean, boolean>;
800
800
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
@@ -1 +1 @@
1
- {"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAyZA,OAAO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAErD,OAAO,EAAC,KAAK,aAAa,EAAsJ,MAAM,KAAK,CAAA;AAE3L,OAAO,KAAK,MAAM,6BAA6B,CAAA;AA6S/C,iBAAS,cAAc;;iBAjBZ,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAqE+X,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAoC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAoC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAoC,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;OAyShe,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,24 +1,11 @@
1
1
  import { defineComponent, useSlots, useTemplateRef, computed, ref, inject, watch, onMounted, onUnmounted, createBlock, openBlock, normalizeClass, withCtx, createElementBlock, createCommentVNode, Fragment, renderList, unref, createSlots, resolveDynamicComponent, mergeProps, normalizeStyle, createVNode, TransitionGroup } from 'vue';
2
2
  import _sfc_main$1 from '../Form/WForm.vue.js';
3
- import '../Button/WButtonAction.vue.js';
4
- import '../Button/WButton.vue.js';
5
- import { getIsMobile } from '../../utils/mobile.js';
6
3
  import { Notify } from '../../utils/Notify.js';
7
- import '../Button/WButtonDropdown.vue.js';
4
+ import { useIsMobile } from '../../utils/mobile.js';
8
5
  import { throttle, debounce } from '../../utils/utils.js';
9
- import '../../utils/supportsPassive.js';
10
- import '../Dropdown/utils/DropdownStyle.js';
11
- import 'vue-router';
12
- import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
13
- import '../../utils/Modal.js';
14
- import '../Input/WInputSuggest.vue.js';
15
- import '../HeaderBar/use/useHeaderPadding.js';
16
- import '../Input/WInputDate.vue.js';
17
- import '../Link/WLink.vue.js';
18
- import '@tanstack/vue-query';
19
- import '../List/use/useListConfig.js';
20
6
  import _sfc_main$3 from './components/TabItem.vue.js';
21
7
  import _sfc_main$2 from './components/TabTitleButton.vue.js';
8
+ import { wTabItemListener, wTabItemUnlistener } from './models/injection.js';
22
9
 
23
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
24
11
  __name: "WTabs",
@@ -38,9 +25,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
25
  },
39
26
  emits: ["update:current", "update:current-index", "update:has-changes", "update:current-title", "update:tabs-length", "update:progress", "update:first", "update:last"],
40
27
  setup(__props, { expose: __expose, emit: __emit }) {
41
- const mobile = getIsMobile();
42
28
  const props = __props;
43
29
  const emit = __emit;
30
+ const { isMobile } = useIsMobile();
44
31
  const slots = useSlots();
45
32
  const formRef = useTemplateRef("form");
46
33
  const buttonContainerRef = useTemplateRef("buttonContainer");
@@ -95,7 +82,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
95
82
  };
96
83
  let timeout = null;
97
84
  const scrollToTabContent = () => {
98
- if (!mobile || !props.side) return;
85
+ if (!isMobile.value || !props.side) return;
99
86
  if (timeout) {
100
87
  clearTimeout(timeout);
101
88
  timeout = null;
@@ -1,11 +1,11 @@
1
1
  import { defineComponent, createBlock, createElementBlock, unref, openBlock, withCtx, renderSlot, normalizeStyle, Fragment, renderList, resolveDynamicComponent } from 'vue';
2
2
  import _sfc_main$1 from './WTabs.vue.js';
3
- import { getIsMobile } from '../../utils/mobile.js';
3
+ import { useIsMobile } from '../../utils/mobile.js';
4
4
 
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "WTabsColumns",
7
7
  setup(__props) {
8
- const isMobile = getIsMobile();
8
+ const { isMobile } = useIsMobile();
9
9
  return (_ctx, _cache) => {
10
10
  return unref(isMobile) ? (openBlock(), createBlock(_sfc_main$1, { key: 0 }, {
11
11
  default: withCtx(() => [
@@ -11,8 +11,8 @@ declare function __VLS_template(): {
11
11
  readonly name?: string | undefined;
12
12
  readonly title?: string | undefined;
13
13
  readonly noTag?: boolean | undefined;
14
- readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
15
14
  readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
15
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
16
16
  readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
17
17
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
18
18
  $attrs: {
@@ -27,15 +27,15 @@ declare function __VLS_template(): {
27
27
  $root: import('vue').ComponentPublicInstance | null;
28
28
  $parent: import('vue').ComponentPublicInstance | null;
29
29
  $host: Element | null;
30
- $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
30
+ $emit: ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-changes", value: boolean) => void) & ((event: "update:has-value", value: boolean | null) => void);
31
31
  $el: any;
32
32
  $options: import('vue').ComponentOptionsBase<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
  }>, {
41
41
  isValid: import('vue').ComputedRef<boolean>;
@@ -52,8 +52,8 @@ declare function __VLS_template(): {
52
52
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
53
53
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
54
54
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
55
- "update:has-changes": (value: boolean) => any;
56
55
  "update:is-valid": (value: boolean | undefined) => any;
56
+ "update:has-changes": (value: boolean) => any;
57
57
  "update:has-value": (value: boolean | null) => any;
58
58
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
59
59
  beforeCreate?: (() => void) | (() => void)[];
@@ -80,10 +80,10 @@ declare function __VLS_template(): {
80
80
  title?: string;
81
81
  noTag?: boolean;
82
82
  }> & Readonly<{
83
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
84
83
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
84
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
85
85
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
86
- }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
86
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasChangesMap" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
87
87
  isValid: import('vue').ComputedRef<boolean>;
88
88
  hasChanges: import('vue').Ref<boolean, boolean>;
89
89
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
@@ -135,8 +135,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
135
135
  readonly name?: string | undefined;
136
136
  readonly title?: string | undefined;
137
137
  readonly noTag?: boolean | undefined;
138
- readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
139
138
  readonly "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
139
+ readonly "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
140
140
  readonly "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
141
141
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
142
142
  $attrs: {
@@ -151,15 +151,15 @@ declare const __VLS_component: import('vue').DefineComponent<{
151
151
  $root: import('vue').ComponentPublicInstance | null;
152
152
  $parent: import('vue').ComponentPublicInstance | null;
153
153
  $host: Element | null;
154
- $emit: ((event: "update:has-changes", value: boolean) => void) & ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-value", value: boolean | null) => void);
154
+ $emit: ((event: "update:is-valid", value: boolean | undefined) => void) & ((event: "update:has-changes", value: boolean) => void) & ((event: "update:has-value", value: boolean | null) => void);
155
155
  $el: any;
156
156
  $options: import('vue').ComponentOptionsBase<Readonly<{
157
157
  name?: string;
158
158
  title?: string;
159
159
  noTag?: boolean;
160
160
  }> & Readonly<{
161
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
162
161
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
162
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
163
163
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
164
164
  }>, {
165
165
  isValid: import('vue').ComputedRef<boolean>;
@@ -176,8 +176,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
176
176
  errorMessage: import('vue').Ref<string | undefined, string | undefined>;
177
177
  errorMessageMap: import('vue').Ref<Record<string, string | undefined>, Record<string, string | undefined>>;
178
178
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
179
- "update:has-changes": (value: boolean) => any;
180
179
  "update:is-valid": (value: boolean | undefined) => any;
180
+ "update:has-changes": (value: boolean) => any;
181
181
  "update:has-value": (value: boolean | null) => any;
182
182
  }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
183
183
  beforeCreate?: (() => void) | (() => void)[];
@@ -204,10 +204,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
204
204
  title?: string;
205
205
  noTag?: boolean;
206
206
  }> & Readonly<{
207
- "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
208
207
  "onUpdate:is-valid"?: ((value: boolean | undefined) => any) | undefined;
208
+ "onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
209
209
  "onUpdate:has-value"?: ((value: boolean | null) => any) | undefined;
210
- }>, "errorMessage" | "hasChanges" | "hasChangesMap" | "isValid" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
210
+ }>, "errorMessage" | "hasChanges" | "isValid" | "hasChangesMap" | "hasValue" | "hasValueMap" | "validate" | "validateMap" | "invalidate" | "invalidateMap" | "initModel" | "initModelMap" | "errorMessageMap"> & import('vue').ShallowUnwrapRef<{
211
211
  isValid: import('vue').ComputedRef<boolean>;
212
212
  hasChanges: import('vue').Ref<boolean, boolean>;
213
213
  hasChangesMap: import('vue').Ref<Record<string, boolean>, Record<string, boolean>>;
package/dist/main.js CHANGED
@@ -90,9 +90,9 @@ export { DOMListenerContainer };
90
90
  export { SemanticType } from './utils/SemanticType.js';
91
91
  export { HorizontalAlign } from './utils/HorizontalAlign.js';
92
92
  export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfNextDay, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter } from './utils/dateTime.js';
93
- export { getIsMobile, getIsTouchDevice } from './utils/mobile.js';
93
+ export { getIsMobile, getIsTouchDevice, useIsMobile } from './utils/mobile.js';
94
94
  export { PAGE_LENGTH, makeQueryPaginated, useDefaultQuery } from './utils/useDefaultQuery.js';
95
95
  export { paginatedResponseUpdater, useQueryUpdater } from './utils/useQueryUpdater.js';
96
96
  export { useCopy } from './utils/useCopy.js';
97
- export { debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIndex, isPage, numberCompactFormatter, numberFormatter, parseId, parseIndex, percentCompactFormatter, percentFormatter, set, throttle } from './utils/utils.js';
97
+ export { ListMode, debounce, genId, get, getAllScrollParents, getDefaultFieldConfigMap, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, isId, isIdArray, isIndex, isPage, numberCompactFormatter, numberFormatter, parseId, parseIndex, percentCompactFormatter, percentFormatter, set, throttle } from './utils/utils.js';
98
98
  export { validateRequired } from './utils/validate.js';
@@ -62,17 +62,6 @@ declare type UseQueryWithParams<Model, QueryParams> =
62
62
 
63
63
  declare type UseQueryPaginated<Model, QueryParams> = UseQueryWithParams<PaginatedResponse<Model>, QueryParams>
64
64
 
65
- declare interface SelectedPage<Value> {
66
- page: number
67
- index: number
68
- id: Value
69
- }
70
-
71
- declare type SelectedRange<Value> = [
72
- SelectedPage<Value>,
73
- SelectedPage<Value>,
74
- ]
75
-
76
65
  declare type ConfirmProps = Omit<import('../components/Modal/types').ConfirmModalProps, 'onAccept' | 'onCancel' | 'onIntermediate'>
77
66
 
78
67
  declare type RequestData = Record<string, unknown> | Record<string, unknown>[] | FormData
@@ -1,3 +1,6 @@
1
1
  export declare const getIsMobile: () => boolean;
2
+ export declare const useIsMobile: () => {
3
+ isMobile: import('vue').Ref<boolean, boolean>;
4
+ };
2
5
  export declare const getIsTouchDevice: () => boolean;
3
6
  //# sourceMappingURL=mobile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../src/utils/mobile.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAO,OAEnC,CAAA"}
1
+ {"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../src/utils/mobile.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAA;AAID,eAAO,MAAM,WAAW;;CAIvB,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAO,OAEnC,CAAA"}
@@ -1,10 +1,23 @@
1
- import { isClientSide } from './utils.js';
1
+ import { ref } from 'vue';
2
+ import { isClientSide, debounce } from './utils.js';
2
3
 
3
4
  const getIsMobile = () => {
4
5
  return isClientSide && window.innerWidth < 640;
5
6
  };
7
+ const isMobile = ref(getIsMobile());
8
+ const useIsMobile = () => {
9
+ return {
10
+ isMobile
11
+ };
12
+ };
6
13
  const getIsTouchDevice = () => {
7
14
  return isClientSide && "ontouchstart" in window || navigator.maxTouchPoints > 0;
8
15
  };
16
+ if (isClientSide) {
17
+ const listener = debounce(() => {
18
+ isMobile.value = getIsMobile();
19
+ }, 50);
20
+ window.addEventListener("resize", listener);
21
+ }
9
22
 
10
- export { getIsMobile, getIsTouchDevice };
23
+ export { getIsMobile, getIsTouchDevice, useIsMobile };
@@ -1,12 +1,24 @@
1
- export declare const isSelecionPage: <T>(value: unknown) => value is SelectedPage<T>;
2
- export declare const isSelectedRange: <T>(value: unknown) => value is SelectedRange<T>;
3
- export declare const getPosition: <T>(range: SelectedPage<T>, pageLength: number) => number;
4
- export declare const useSelected: () => {
5
- selectedRange: import('vue').ComputedRef<SelectedRange<number> | undefined>;
6
- setSelectedRange: (value: SelectedRange<number>) => void;
7
- selected: import('vue').ComputedRef<number[]>;
8
- reverse: import('vue').ComputedRef<boolean>;
9
- setSelected: (value: number[]) => void;
10
- setSelectedReverse: (value: number[]) => void;
1
+ import { MaybeRef } from 'vue';
2
+ export declare const getPosition: (page: number, index: number, pageLength: number) => number;
3
+ export type Selection<Value> = {
4
+ id__in?: Value[];
5
+ id__not_in?: Value[];
6
+ range?: [number, number];
7
+ };
8
+ export type QueryParamsSelection = {
9
+ slice_indexes?: [number, number];
10
+ id__in?: number[];
11
+ id__not_in?: number[];
12
+ };
13
+ export declare const useSelected: <Value extends number>(count: MaybeRef<number | undefined>) => {
14
+ allowSelectHover: import('vue').ComputedRef<boolean>;
15
+ selectionCount: import('vue').ComputedRef<number>;
16
+ selectAllValue: import('vue').ComputedRef<boolean | null>;
17
+ getIsSelected: (id: Value, position: number) => boolean;
18
+ hoverSelected: (position: number) => void;
19
+ toggleSelected: (id: Value, position: number) => void;
20
+ selectAll: () => void;
21
+ resetSelection: () => void;
22
+ getQueryParams: () => QueryParamsSelection | undefined;
11
23
  };
12
24
  //# sourceMappingURL=useSelected.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSelected.d.ts","sourceRoot":"","sources":["../../src/utils/useSelected.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,KAAG,KAAK,IAAI,YAAY,CAAC,CAAC,CAMzE,CAAA;AAMD,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,OAAO,KAAG,KAAK,IAAI,aAAa,CAAC,CAAC,CAK3E,CAAA;AAMD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,cAAc,MAAM,KAAG,MAE3E,CAAA;AAMD,eAAO,MAAM,WAAW;;8BAmBW,aAAa,CAAC,MAAM,CAAC;;;yBAgB1B,MAAM,EAAE,KAAG,IAAI;gCAIR,MAAM,EAAE,KAAG,IAAI;CAanD,CAAA"}
1
+ {"version":3,"file":"useSelected.d.ts","sourceRoot":"","sources":["../../src/utils/useSelected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,QAAQ,EAAmD,MAAM,KAAK,CAAA;AA4BnF,eAAO,MAAM,WAAW,SAAU,MAAM,SAAS,MAAM,cAAc,MAAM,KAAG,MAE7E,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,KAAK,IAAI;IAC7B,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,KAAK,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;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