ll-plus 2.3.19 → 2.4.1

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 (146) hide show
  1. package/es/components/advanced-filtering/index.d.ts +40 -32
  2. package/es/components/advanced-filtering/index.mjs +1 -1
  3. package/es/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
  4. package/es/components/advanced-filtering/src/advanced-filtering.mjs +60 -2
  5. package/es/components/advanced-filtering/src/advanced-filtering.mjs.map +1 -1
  6. package/es/components/advanced-filtering/src/advanced-filtering.vue.d.ts +22 -18
  7. package/es/components/advanced-filtering/src/advanced-filtering.vue2.mjs +4 -3
  8. package/es/components/advanced-filtering/src/advanced-filtering.vue2.mjs.map +1 -1
  9. package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +13 -5
  10. package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs +67 -10
  11. package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs.map +1 -1
  12. package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
  13. package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs +33 -61
  14. package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs.map +1 -1
  15. package/es/components/api-component/index.d.ts +8 -8
  16. package/es/components/api-component/src/api-component.vue.d.ts +8 -8
  17. package/es/components/api-component/src/components/body-component.vue.d.ts +4 -4
  18. package/es/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
  19. package/es/components/api-component/src/components/params-table.vue.d.ts +4 -4
  20. package/es/components/code-editor/index.d.ts +2 -2
  21. package/es/components/code-editor/src/code-editor.vue.d.ts +2 -2
  22. package/es/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
  23. package/es/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
  24. package/es/components/easy-cron/index.d.ts +5 -5
  25. package/es/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
  26. package/es/components/form/index.d.ts +2 -0
  27. package/es/components/form/src/form.vue.d.ts +23 -20
  28. package/es/components/form/src/form.vue2.mjs +21 -1
  29. package/es/components/form/src/form.vue2.mjs.map +1 -1
  30. package/es/components/index.mjs +1 -1
  31. package/es/components/input/index.d.ts +31 -31
  32. package/es/components/input/src/input.vue.d.ts +31 -31
  33. package/es/components/key-value/index.d.ts +26 -11
  34. package/es/components/key-value/src/components/key-value-item.vue.d.ts +44 -38
  35. package/es/components/key-value/src/components/key-value-item.vue2.mjs +7 -2
  36. package/es/components/key-value/src/components/key-value-item.vue2.mjs.map +1 -1
  37. package/es/components/key-value/src/config/key-value-item.d.ts +1 -0
  38. package/es/components/key-value/src/config/key-value-item.mjs.map +1 -1
  39. package/es/components/key-value/src/key-value.vue.d.ts +26 -11
  40. package/es/components/number-range/index.d.ts +13 -13
  41. package/es/components/number-range/src/number-range.d.ts +4 -4
  42. package/es/components/number-range/src/number-range.mjs +1 -1
  43. package/es/components/number-range/src/number-range.mjs.map +1 -1
  44. package/es/components/number-range/src/number-range.vue.d.ts +13 -14
  45. package/es/components/number-range/src/number-range.vue2.mjs +14 -7
  46. package/es/components/number-range/src/number-range.vue2.mjs.map +1 -1
  47. package/es/components/select-group/index.d.ts +1 -1
  48. package/es/components/select-group/src/select-group.vue.d.ts +1 -1
  49. package/es/components/textarea/index.d.ts +5 -5
  50. package/es/components/textarea/src/textarea.vue.d.ts +5 -5
  51. package/es/index.mjs +1 -1
  52. package/index.full.js +215 -85
  53. package/index.full.min.js +24 -24
  54. package/index.full.min.js.map +1 -1
  55. package/index.full.min.mjs +24 -24
  56. package/index.full.min.mjs.map +1 -1
  57. package/index.full.mjs +212 -87
  58. package/lib/components/advanced-filtering/index.d.ts +40 -32
  59. package/lib/components/advanced-filtering/index.js +5 -0
  60. package/lib/components/advanced-filtering/index.js.map +1 -1
  61. package/lib/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
  62. package/lib/components/advanced-filtering/src/advanced-filtering.js +64 -1
  63. package/lib/components/advanced-filtering/src/advanced-filtering.js.map +1 -1
  64. package/lib/components/advanced-filtering/src/advanced-filtering.vue.d.ts +22 -18
  65. package/lib/components/advanced-filtering/src/advanced-filtering.vue2.js +3 -2
  66. package/lib/components/advanced-filtering/src/advanced-filtering.vue2.js.map +1 -1
  67. package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +13 -5
  68. package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js +65 -8
  69. package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js.map +1 -1
  70. package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
  71. package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js +33 -61
  72. package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js.map +1 -1
  73. package/lib/components/api-component/index.d.ts +8 -8
  74. package/lib/components/api-component/src/api-component.vue.d.ts +8 -8
  75. package/lib/components/api-component/src/components/body-component.vue.d.ts +4 -4
  76. package/lib/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
  77. package/lib/components/api-component/src/components/params-table.vue.d.ts +4 -4
  78. package/lib/components/code-editor/index.d.ts +2 -2
  79. package/lib/components/code-editor/src/code-editor.vue.d.ts +2 -2
  80. package/lib/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
  81. package/lib/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
  82. package/lib/components/easy-cron/index.d.ts +5 -5
  83. package/lib/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
  84. package/lib/components/form/index.d.ts +2 -0
  85. package/lib/components/form/src/form.vue.d.ts +23 -20
  86. package/lib/components/form/src/form.vue2.js +21 -1
  87. package/lib/components/form/src/form.vue2.js.map +1 -1
  88. package/lib/components/index.js +5 -0
  89. package/lib/components/index.js.map +1 -1
  90. package/lib/components/input/index.d.ts +31 -31
  91. package/lib/components/input/src/input.vue.d.ts +31 -31
  92. package/lib/components/key-value/index.d.ts +26 -11
  93. package/lib/components/key-value/src/components/key-value-item.vue.d.ts +44 -38
  94. package/lib/components/key-value/src/components/key-value-item.vue2.js +7 -2
  95. package/lib/components/key-value/src/components/key-value-item.vue2.js.map +1 -1
  96. package/lib/components/key-value/src/config/key-value-item.d.ts +1 -0
  97. package/lib/components/key-value/src/config/key-value-item.js.map +1 -1
  98. package/lib/components/key-value/src/key-value.vue.d.ts +26 -11
  99. package/lib/components/number-range/index.d.ts +13 -13
  100. package/lib/components/number-range/src/number-range.d.ts +4 -4
  101. package/lib/components/number-range/src/number-range.js +1 -1
  102. package/lib/components/number-range/src/number-range.js.map +1 -1
  103. package/lib/components/number-range/src/number-range.vue.d.ts +13 -14
  104. package/lib/components/number-range/src/number-range.vue2.js +14 -7
  105. package/lib/components/number-range/src/number-range.vue2.js.map +1 -1
  106. package/lib/components/select-group/index.d.ts +1 -1
  107. package/lib/components/select-group/src/select-group.vue.d.ts +1 -1
  108. package/lib/components/textarea/index.d.ts +5 -5
  109. package/lib/components/textarea/src/textarea.vue.d.ts +5 -5
  110. package/lib/index.js +5 -0
  111. package/lib/index.js.map +1 -1
  112. package/package.json +1 -1
  113. package/theme-chalk/css/index.css +1 -1
  114. package/theme-chalk/css/modal.css +1 -1
  115. package/theme-chalk/css/operate-icon.css +1 -1
  116. package/types/packages/components/advanced-filtering/index.d.ts +40 -32
  117. package/types/packages/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
  118. package/types/packages/components/advanced-filtering/src/advanced-filtering.vue.d.ts +22 -18
  119. package/types/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +13 -5
  120. package/types/packages/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
  121. package/types/packages/components/api-component/index.d.ts +8 -8
  122. package/types/packages/components/api-component/src/api-component.vue.d.ts +8 -8
  123. package/types/packages/components/api-component/src/components/body-component.vue.d.ts +4 -4
  124. package/types/packages/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
  125. package/types/packages/components/api-component/src/components/params-table.vue.d.ts +4 -4
  126. package/types/packages/components/code-editor/index.d.ts +2 -2
  127. package/types/packages/components/code-editor/src/code-editor.vue.d.ts +2 -2
  128. package/types/packages/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
  129. package/types/packages/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
  130. package/types/packages/components/easy-cron/index.d.ts +5 -5
  131. package/types/packages/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
  132. package/types/packages/components/form/index.d.ts +2 -0
  133. package/types/packages/components/form/src/form.vue.d.ts +23 -20
  134. package/types/packages/components/input/index.d.ts +31 -31
  135. package/types/packages/components/input/src/input.vue.d.ts +31 -31
  136. package/types/packages/components/key-value/index.d.ts +26 -11
  137. package/types/packages/components/key-value/src/components/key-value-item.vue.d.ts +44 -38
  138. package/types/packages/components/key-value/src/config/key-value-item.d.ts +1 -0
  139. package/types/packages/components/key-value/src/key-value.vue.d.ts +26 -11
  140. package/types/packages/components/number-range/index.d.ts +13 -13
  141. package/types/packages/components/number-range/src/number-range.d.ts +4 -4
  142. package/types/packages/components/number-range/src/number-range.vue.d.ts +13 -14
  143. package/types/packages/components/select-group/index.d.ts +1 -1
  144. package/types/packages/components/select-group/src/select-group.vue.d.ts +1 -1
  145. package/types/packages/components/textarea/index.d.ts +5 -5
  146. package/types/packages/components/textarea/src/textarea.vue.d.ts +5 -5
@@ -2,7 +2,7 @@ import AdvancedFiltering from './src/advanced-filtering.vue';
2
2
  import AdvancedFilteringParams from './src/components/advanced-filtering-params.vue';
3
3
  import AdvancedFilteringTags from './src/components/advanced-filtering-tags.vue';
4
4
  export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
5
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
5
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
6
6
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
7
7
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
8
8
  layout: import("vue-types").VueTypeDef<string>;
@@ -904,7 +904,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
904
904
  }, boolean>;
905
905
  }, {
906
906
  props: import("@vue/shared").LooseRequired<{
907
- readonly filterColumns: any[];
907
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
908
908
  readonly value: Record<string, any>;
909
909
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
910
910
  layout: import("vue-types").VueTypeDef<string>;
@@ -1590,7 +1590,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
1590
1590
  };
1591
1591
  }>>, {}, {}>>;
1592
1592
  AdvancedFilteringParams: import("vue").DefineComponent<{
1593
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
1593
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
1594
1594
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
1595
1595
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
1596
1596
  layout: import("vue-types").VueTypeDef<string>;
@@ -2490,7 +2490,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
2490
2490
  readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
2491
2491
  }, {
2492
2492
  props: import("@vue/shared").LooseRequired<{
2493
- readonly filterColumns: any[];
2493
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
2494
2494
  readonly value: Record<string, any>;
2495
2495
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
2496
2496
  layout: import("vue-types").VueTypeDef<string>;
@@ -2717,11 +2717,12 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
2717
2717
  };
2718
2718
  }>>;
2719
2719
  readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
2720
+ readonly "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
2720
2721
  readonly onClose?: (() => any) | undefined;
2721
2722
  readonly onConfirm?: (() => any) | undefined;
2722
2723
  readonly onChangeValue?: ((value: Record<string, any>) => any) | undefined;
2723
2724
  } & {}>;
2724
- emits: ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
2725
+ emits: ((event: "update:value", value: Record<string, any>) => void) & ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
2725
2726
  bem: {
2726
2727
  b: (blockSuffix?: string) => string;
2727
2728
  e: (element?: string) => string;
@@ -2732,10 +2733,13 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
2732
2733
  bem: (blockSuffix: string, element: string, modifier: string) => string;
2733
2734
  is: (name?: string) => string;
2734
2735
  };
2736
+ innerValue: import("vue").Ref<{}>;
2735
2737
  key: import("vue").Ref<number>;
2738
+ computeFormColumns: import("vue").ComputedRef<import("./src/advanced-filtering").FilterColumn[]>;
2736
2739
  handleClose: () => void;
2737
2740
  handleAdvancedFilterConfirm: () => void;
2738
2741
  handleChange: (val: Record<string, any>) => void;
2742
+ setData: (val: Record<string, any>) => void;
2739
2743
  readonly LlForm: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
2740
2744
  readonly formColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
2741
2745
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
@@ -4115,6 +4119,8 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
4115
4119
  formRef: import("vue").Ref<any>;
4116
4120
  validate: () => Promise<any>;
4117
4121
  resetFields: () => Promise<any>;
4122
+ clearValidate: (nameList?: import("ant-design-vue/es/form/interface").NamePath[] | undefined) => Promise<any>;
4123
+ scrollToField: (name: import("ant-design-vue/es/form/interface").NamePath, options?: ScrollOptions | undefined) => Promise<any>;
4118
4124
  getBindValue: (item: any) => import("lodash").Omit<any, "label">;
4119
4125
  getFormItemClass: (item?: any) => string;
4120
4126
  readonly isEmpty: {
@@ -5531,8 +5537,9 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
5531
5537
  close: () => boolean;
5532
5538
  confirm: () => boolean;
5533
5539
  changeValue: (value: Record<string, any>) => boolean;
5540
+ 'update:value': (value: Record<string, any>) => boolean;
5534
5541
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5535
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
5542
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
5536
5543
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
5537
5544
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
5538
5545
  layout: import("vue-types").VueTypeDef<string>;
@@ -6431,11 +6438,12 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
6431
6438
  }, boolean>;
6432
6439
  readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
6433
6440
  }>> & {
6441
+ "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
6434
6442
  onClose?: (() => any) | undefined;
6435
6443
  onConfirm?: (() => any) | undefined;
6436
6444
  onChangeValue?: ((value: Record<string, any>) => any) | undefined;
6437
6445
  }, {
6438
- readonly filterColumns: any[];
6446
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
6439
6447
  readonly value: Record<string, any>;
6440
6448
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
6441
6449
  layout: import("vue-types").VueTypeDef<string>;
@@ -6664,7 +6672,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
6664
6672
  readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
6665
6673
  }, {}>;
6666
6674
  AdvancedFilteringTags: import("vue").DefineComponent<{
6667
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
6675
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
6668
6676
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
6669
6677
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
6670
6678
  layout: import("vue-types").VueTypeDef<string>;
@@ -7566,7 +7574,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
7566
7574
  }, boolean>;
7567
7575
  }, {
7568
7576
  props: import("@vue/shared").LooseRequired<{
7569
- readonly filterColumns: any[];
7577
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
7570
7578
  readonly value: Record<string, any>;
7571
7579
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
7572
7580
  layout: import("vue-types").VueTypeDef<string>;
@@ -7815,16 +7823,12 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
7815
7823
  }[]>;
7816
7824
  handleClean: (tag?: import("./src/advanced-filtering").IAvancedFilteringTag | null) => void;
7817
7825
  setData: (obj: Record<string, any>) => void;
7818
- treeDataFormat: (arr: any[] | undefined, fieldNames: {
7819
- [key: string]: string;
7820
- }) => any[];
7821
- findLabelByValue: (tree: any, value: any) => string;
7822
- getTags: (filterColumns: any[], value: Record<string, any>) => import("./src/advanced-filtering").IAvancedFilteringTag[];
7826
+ getTags: (filterColumns: any[], values: Record<string, any>) => import("./src/advanced-filtering").IAvancedFilteringTag[];
7823
7827
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7824
7828
  change: (value: Record<string, any>) => boolean;
7825
7829
  'update:value': (value: Record<string, any>) => boolean;
7826
7830
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7827
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
7831
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
7828
7832
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
7829
7833
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
7830
7834
  layout: import("vue-types").VueTypeDef<string>;
@@ -8728,7 +8732,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
8728
8732
  onChange?: ((value: Record<string, any>) => any) | undefined;
8729
8733
  "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
8730
8734
  }, {
8731
- readonly filterColumns: any[];
8735
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
8732
8736
  readonly value: Record<string, any>;
8733
8737
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
8734
8738
  layout: import("vue-types").VueTypeDef<string>;
@@ -8960,7 +8964,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
8960
8964
  change: (value: Record<string, any>) => boolean;
8961
8965
  'update:value': (value: Record<string, any>) => boolean;
8962
8966
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8963
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
8967
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
8964
8968
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
8965
8969
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
8966
8970
  layout: import("vue-types").VueTypeDef<string>;
@@ -9864,7 +9868,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
9864
9868
  onChange?: ((value: Record<string, any>) => any) | undefined;
9865
9869
  "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
9866
9870
  }, {
9867
- readonly filterColumns: any[];
9871
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
9868
9872
  readonly value: Record<string, any>;
9869
9873
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
9870
9874
  layout: import("vue-types").VueTypeDef<string>;
@@ -10093,7 +10097,7 @@ export declare const LlAdvancedFiltering: import("ll-plus/es/utils").SFCWithInst
10093
10097
  readonly overlayStyle: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("vue").CSSProperties) | (() => import("vue").CSSProperties | undefined) | ((new (...args: any[]) => import("vue").CSSProperties) | (() => import("vue").CSSProperties | undefined))[], unknown, unknown>;
10094
10098
  }, {}>>;
10095
10099
  export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
10096
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
10100
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
10097
10101
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
10098
10102
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
10099
10103
  layout: import("vue-types").VueTypeDef<string>;
@@ -10993,7 +10997,7 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
10993
10997
  readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
10994
10998
  }, {
10995
10999
  props: import("@vue/shared").LooseRequired<{
10996
- readonly filterColumns: any[];
11000
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
10997
11001
  readonly value: Record<string, any>;
10998
11002
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
10999
11003
  layout: import("vue-types").VueTypeDef<string>;
@@ -11220,11 +11224,12 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
11220
11224
  };
11221
11225
  }>>;
11222
11226
  readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
11227
+ readonly "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
11223
11228
  readonly onClose?: (() => any) | undefined;
11224
11229
  readonly onConfirm?: (() => any) | undefined;
11225
11230
  readonly onChangeValue?: ((value: Record<string, any>) => any) | undefined;
11226
11231
  } & {}>;
11227
- emits: ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
11232
+ emits: ((event: "update:value", value: Record<string, any>) => void) & ((event: "close") => void) & ((event: "confirm") => void) & ((event: "changeValue", value: Record<string, any>) => void);
11228
11233
  bem: {
11229
11234
  b: (blockSuffix?: string) => string;
11230
11235
  e: (element?: string) => string;
@@ -11235,10 +11240,13 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
11235
11240
  bem: (blockSuffix: string, element: string, modifier: string) => string;
11236
11241
  is: (name?: string) => string;
11237
11242
  };
11243
+ innerValue: import("vue").Ref<{}>;
11238
11244
  key: import("vue").Ref<number>;
11245
+ computeFormColumns: import("vue").ComputedRef<import("./src/advanced-filtering").FilterColumn[]>;
11239
11246
  handleClose: () => void;
11240
11247
  handleAdvancedFilterConfirm: () => void;
11241
11248
  handleChange: (val: Record<string, any>) => void;
11249
+ setData: (val: Record<string, any>) => void;
11242
11250
  readonly LlForm: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
11243
11251
  readonly formColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
11244
11252
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
@@ -12618,6 +12626,8 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
12618
12626
  formRef: import("vue").Ref<any>;
12619
12627
  validate: () => Promise<any>;
12620
12628
  resetFields: () => Promise<any>;
12629
+ clearValidate: (nameList?: import("ant-design-vue/es/form/interface").NamePath[] | undefined) => Promise<any>;
12630
+ scrollToField: (name: import("ant-design-vue/es/form/interface").NamePath, options?: ScrollOptions | undefined) => Promise<any>;
12621
12631
  getBindValue: (item: any) => import("lodash").Omit<any, "label">;
12622
12632
  getFormItemClass: (item?: any) => string;
12623
12633
  readonly isEmpty: {
@@ -14034,8 +14044,9 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
14034
14044
  close: () => boolean;
14035
14045
  confirm: () => boolean;
14036
14046
  changeValue: (value: Record<string, any>) => boolean;
14047
+ 'update:value': (value: Record<string, any>) => boolean;
14037
14048
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14038
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
14049
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
14039
14050
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
14040
14051
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
14041
14052
  layout: import("vue-types").VueTypeDef<string>;
@@ -14934,11 +14945,12 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
14934
14945
  }, boolean>;
14935
14946
  readonly showFooter: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
14936
14947
  }>> & {
14948
+ "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
14937
14949
  onClose?: (() => any) | undefined;
14938
14950
  onConfirm?: (() => any) | undefined;
14939
14951
  onChangeValue?: ((value: Record<string, any>) => any) | undefined;
14940
14952
  }, {
14941
- readonly filterColumns: any[];
14953
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
14942
14954
  readonly value: Record<string, any>;
14943
14955
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
14944
14956
  layout: import("vue-types").VueTypeDef<string>;
@@ -15167,7 +15179,7 @@ export declare const LlAdvancedFilteringParams: import("ll-plus/es/utils").SFCWi
15167
15179
  readonly showFooter: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
15168
15180
  }, {}>>;
15169
15181
  export declare const LlAdvancedFilteringTags: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
15170
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
15182
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
15171
15183
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
15172
15184
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
15173
15185
  layout: import("vue-types").VueTypeDef<string>;
@@ -16069,7 +16081,7 @@ export declare const LlAdvancedFilteringTags: import("ll-plus/es/utils").SFCWith
16069
16081
  }, boolean>;
16070
16082
  }, {
16071
16083
  props: import("@vue/shared").LooseRequired<{
16072
- readonly filterColumns: any[];
16084
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
16073
16085
  readonly value: Record<string, any>;
16074
16086
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
16075
16087
  layout: import("vue-types").VueTypeDef<string>;
@@ -16318,16 +16330,12 @@ export declare const LlAdvancedFilteringTags: import("ll-plus/es/utils").SFCWith
16318
16330
  }[]>;
16319
16331
  handleClean: (tag?: import("./src/advanced-filtering").IAvancedFilteringTag | null) => void;
16320
16332
  setData: (obj: Record<string, any>) => void;
16321
- treeDataFormat: (arr: any[] | undefined, fieldNames: {
16322
- [key: string]: string;
16323
- }) => any[];
16324
- findLabelByValue: (tree: any, value: any) => string;
16325
- getTags: (filterColumns: any[], value: Record<string, any>) => import("./src/advanced-filtering").IAvancedFilteringTag[];
16333
+ getTags: (filterColumns: any[], values: Record<string, any>) => import("./src/advanced-filtering").IAvancedFilteringTag[];
16326
16334
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16327
16335
  change: (value: Record<string, any>) => boolean;
16328
16336
  'update:value': (value: Record<string, any>) => boolean;
16329
16337
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16330
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
16338
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]) | ((new (...args: any[]) => import("./src/advanced-filtering").FilterColumn[]) | (() => import("./src/advanced-filtering").FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
16331
16339
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
16332
16340
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("vue").ExtractPropTypes<{
16333
16341
  layout: import("vue-types").VueTypeDef<string>;
@@ -17231,7 +17239,7 @@ export declare const LlAdvancedFilteringTags: import("ll-plus/es/utils").SFCWith
17231
17239
  onChange?: ((value: Record<string, any>) => any) | undefined;
17232
17240
  "onUpdate:value"?: ((value: Record<string, any>) => any) | undefined;
17233
17241
  }, {
17234
- readonly filterColumns: any[];
17242
+ readonly filterColumns: import("./src/advanced-filtering").FilterColumn[];
17235
17243
  readonly value: Record<string, any>;
17236
17244
  readonly formOptions: Partial<import("vue").ExtractPropTypes<{
17237
17245
  layout: import("vue-types").VueTypeDef<string>;
@@ -2,7 +2,7 @@ import '../../utils/index.mjs';
2
2
  import AdvancedFiltering from './src/advanced-filtering.vue.mjs';
3
3
  import AdvancedFilteringParams from './src/components/advanced-filtering-params.vue.mjs';
4
4
  import AdvancedFilteringTags from './src/components/advanced-filtering-tags.vue.mjs';
5
- export { advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits } from './src/advanced-filtering.mjs';
5
+ export { ALL_VALUE, advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits, filterAllValue, findLabelByValue, initValue, treeDataFormat } from './src/advanced-filtering.mjs';
6
6
  import { withInstall } from '../../utils/with-install.mjs';
7
7
 
8
8
  "use strict";
@@ -1,4 +1,5 @@
1
1
  import type { ExtractPropTypes } from 'vue';
2
+ import type { FormColumn } from 'll-plus/es/components';
2
3
  import type advancedFiltering from './advanced-filtering.vue';
3
4
  import type advancedFilteringParams from './components/advanced-filtering-params.vue';
4
5
  import type advancedFilteringTags from './components/advanced-filtering-tags.vue';
@@ -8,8 +9,19 @@ export interface IAvancedFilteringTag {
8
9
  value: string | string[];
9
10
  showValue: string | string[];
10
11
  }
12
+ export declare const ALL_VALUE: string;
13
+ export type FilterColumn = FormColumn<{
14
+ unUseDefaultOption?: boolean;
15
+ defaultOptionLabel?: string;
16
+ }>;
17
+ export declare const initValue: (column: FilterColumn, values: any) => any;
18
+ export declare const filterAllValue: (values: string | string[]) => any;
19
+ export declare const treeDataFormat: (arr: any[] | undefined, fieldNames: {
20
+ [key: string]: string;
21
+ }) => any[];
22
+ export declare const findLabelByValue: (tree: FilterColumn['options'], value: any) => string;
11
23
  export declare const advancedFilteringProps: {
12
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
24
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => FilterColumn[]) | (() => FilterColumn[]) | ((new (...args: any[]) => FilterColumn[]) | (() => FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
13
25
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
14
26
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<ExtractPropTypes<{
15
27
  layout: import("vue-types").VueTypeDef<string>;
@@ -911,7 +923,7 @@ export declare const advancedFilteringProps: {
911
923
  }, boolean>;
912
924
  };
913
925
  export declare const advancedFilteringParamsProps: {
914
- readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
926
+ readonly filterColumns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => FilterColumn[]) | (() => FilterColumn[]) | ((new (...args: any[]) => FilterColumn[]) | (() => FilterColumn[]))[], unknown, unknown, () => never[], boolean>;
915
927
  readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
916
928
  readonly formOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<ExtractPropTypes<{
917
929
  layout: import("vue-types").VueTypeDef<string>;
@@ -1818,6 +1830,7 @@ export declare const advancedFilteringParamsEmits: {
1818
1830
  close: () => boolean;
1819
1831
  confirm: () => boolean;
1820
1832
  changeValue: (value: Record<string, any>) => boolean;
1833
+ 'update:value': (value: Record<string, any>) => boolean;
1821
1834
  };
1822
1835
  export declare const advancedFilteringTagsEmits: {
1823
1836
  change: (value: Record<string, any>) => boolean;
@@ -1,7 +1,64 @@
1
1
  import '../../../utils/index.mjs';
2
+ import { has, isEmpty, isNil } from 'lodash-es';
2
3
  import { buildProps, definePropType } from '../../../utils/props/runtime.mjs';
3
4
 
4
5
  "use strict";
6
+ const ALL_VALUE = "_ALL";
7
+ const initValue = (column, values) => {
8
+ let value = has(values, column.key) ? values[column.key] : null;
9
+ if (has(column, "options") && !column.unUseDefaultOption) {
10
+ if (column.type === "checkbox-group" || has(column, "mode")) {
11
+ value = isEmpty(value) || isNil(value) ? [ALL_VALUE] : value;
12
+ } else {
13
+ value = isNil(value) ? ALL_VALUE : value;
14
+ }
15
+ }
16
+ return value;
17
+ };
18
+ const filterAllValue = (values) => {
19
+ let value = null;
20
+ if (Array.isArray(values)) {
21
+ value = values.filter((item) => item !== ALL_VALUE);
22
+ } else {
23
+ value = values === ALL_VALUE ? null : values;
24
+ }
25
+ return value;
26
+ };
27
+ const treeDataFormat = (arr = [], fieldNames) => {
28
+ let options = [];
29
+ if (!arr)
30
+ return [];
31
+ options = arr.map((e) => {
32
+ const obj = {};
33
+ obj.label = e[fieldNames.label];
34
+ obj.value = e[fieldNames.value];
35
+ if (e[fieldNames.children] && e[fieldNames.children].length) {
36
+ obj.children = treeDataFormat(e[fieldNames.children], fieldNames);
37
+ }
38
+ return obj;
39
+ });
40
+ return options;
41
+ };
42
+ const findLabelByValue = (tree, value) => {
43
+ function _findLabel(nodes) {
44
+ const labels = [];
45
+ if (!nodes)
46
+ return [];
47
+ for (const node of nodes) {
48
+ if (node.value === value) {
49
+ labels.push(node.label);
50
+ }
51
+ if (node.children && node.children.length > 0) {
52
+ const childLabels = _findLabel(node.children);
53
+ if (childLabels) {
54
+ labels.push(...childLabels);
55
+ }
56
+ }
57
+ }
58
+ return labels.length > 0 ? labels : [];
59
+ }
60
+ return _findLabel(tree).join(",");
61
+ };
5
62
  const advancedFilteringProps = buildProps({
6
63
  filterColumns: {
7
64
  type: definePropType(Array),
@@ -47,12 +104,13 @@ const advancedFilteringEmits = {
47
104
  const advancedFilteringParamsEmits = {
48
105
  close: () => true,
49
106
  confirm: () => true,
50
- changeValue: (value) => !!value
107
+ changeValue: (value) => !!value,
108
+ "update:value": (value) => !!value
51
109
  };
52
110
  const advancedFilteringTagsEmits = {
53
111
  change: (value) => !!value,
54
112
  "update:value": (value) => !!value
55
113
  };
56
114
 
57
- export { advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits };
115
+ export { ALL_VALUE, advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits, filterAllValue, findLabelByValue, initValue, treeDataFormat };
58
116
  //# sourceMappingURL=advanced-filtering.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"advanced-filtering.mjs","sources":["../../../../../packages/components/advanced-filtering/src/advanced-filtering.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormProps as AntFormProps, TooltipProps } from 'ant-design-vue'\nimport type { FormColumn } from '@ll-plus/components'\nimport type advancedFiltering from './advanced-filtering.vue'\nimport type advancedFilteringParams from './components/advanced-filtering-params.vue'\nimport type advancedFilteringTags from './components/advanced-filtering-tags.vue'\nexport interface IAvancedFilteringTag {\n label: string\n key: string\n value: string | string[]\n showValue: string | string[]\n}\n\nexport const advancedFilteringProps = buildProps({\n filterColumns: {\n type: definePropType<FormColumn[]>(Array),\n default: () => []\n },\n value: {\n type: Object,\n default: () => ({})\n },\n formOptions: {\n type: definePropType<AntFormProps>(Object),\n default: () => ({ layout: 'vertical' })\n },\n overlayStyle: {\n type: definePropType<TooltipProps['overlayStyle']>(Object),\n default: () => ({\n width: '500px'\n })\n }\n} as const)\n\nexport const advancedFilteringParamsProps = buildProps({\n filterColumns: {\n type: definePropType<FormColumn[]>(Array),\n default: () => []\n },\n value: {\n type: Object,\n default: () => ({})\n },\n formOptions: {\n type: definePropType<AntFormProps>(Object),\n default: () => ({ layout: 'vertical' })\n },\n showFooter: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const advancedFilteringEmits = {\n change: (value: Record<string, any>) => !!value,\n 'update:value': (value: Record<string, any>) => !!value\n}\n\nexport const advancedFilteringParamsEmits = {\n close: () => true,\n confirm: () => true,\n changeValue: (value: Record<string, any>) => !!value\n}\n\nexport const advancedFilteringTagsEmits = {\n change: (value: Record<string, any>) => !!value,\n 'update:value': (value: Record<string, any>) => !!value\n}\n\n// props\nexport type AdvancedFilteringProps = ExtractPropTypes<\n typeof advancedFilteringProps\n>\n\nexport type AdvancedFilteringParamsProps = ExtractPropTypes<\n typeof advancedFilteringParamsProps\n>\n\n// emits\nexport type AdvancedFilteringEmits = typeof advancedFilteringEmits\n\nexport type AdvancedFilteringParamsEmits = typeof advancedFilteringParamsEmits\n\nexport type AdvancedFilteringTagsEmits = typeof advancedFilteringTagsEmits\n\n// instance\nexport type AdvancedFilteringInstance = InstanceType<typeof advancedFiltering>\n\nexport type AdvancedFilteringParamsInstance = InstanceType<\n typeof advancedFilteringParams\n>\n\nexport type AdvancedFilteringTagsInstance = InstanceType<\n typeof advancedFilteringTags\n>\n"],"names":[],"mappings":";;;;AAeO,MAAM,yBAAyB,UAAW,CAAA;AAAA,EAC/C,aAAe,EAAA;AAAA,IACb,IAAA,EAAM,eAA6B,KAAK,CAAA;AAAA,IACxC,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAA6B,MAAM,CAAA;AAAA,IACzC,OAAS,EAAA,OAAO,EAAE,MAAA,EAAQ,UAAW,EAAA,CAAA;AAAA,GACvC;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAA,EAAM,eAA6C,MAAM,CAAA;AAAA,IACzD,SAAS,OAAO;AAAA,MACd,KAAO,EAAA,OAAA;AAAA,KACT,CAAA;AAAA,GACF;AACF,CAAU,EAAA;AAEH,MAAM,+BAA+B,UAAW,CAAA;AAAA,EACrD,aAAe,EAAA;AAAA,IACb,IAAA,EAAM,eAA6B,KAAK,CAAA;AAAA,IACxC,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAA,EAAM,eAA6B,MAAM,CAAA;AAAA,IACzC,OAAS,EAAA,OAAO,EAAE,MAAA,EAAQ,UAAW,EAAA,CAAA;AAAA,GACvC;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAEH,MAAM,sBAAyB,GAAA;AAAA,EACpC,MAAQ,EAAA,CAAC,KAA+B,KAAA,CAAC,CAAC,KAAA;AAAA,EAC1C,cAAgB,EAAA,CAAC,KAA+B,KAAA,CAAC,CAAC,KAAA;AACpD,EAAA;AAEO,MAAM,4BAA+B,GAAA;AAAA,EAC1C,OAAO,MAAM,IAAA;AAAA,EACb,SAAS,MAAM,IAAA;AAAA,EACf,WAAa,EAAA,CAAC,KAA+B,KAAA,CAAC,CAAC,KAAA;AACjD,EAAA;AAEO,MAAM,0BAA6B,GAAA;AAAA,EACxC,MAAQ,EAAA,CAAC,KAA+B,KAAA,CAAC,CAAC,KAAA;AAAA,EAC1C,cAAgB,EAAA,CAAC,KAA+B,KAAA,CAAC,CAAC,KAAA;AACpD;;;;"}
1
+ {"version":3,"file":"advanced-filtering.mjs","sources":["../../../../../packages/components/advanced-filtering/src/advanced-filtering.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\nimport { has, isEmpty, isNil } from 'lodash-es'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormProps as AntFormProps, TooltipProps } from 'ant-design-vue'\nimport type { FormColumn } from '@ll-plus/components'\nimport type advancedFiltering from './advanced-filtering.vue'\nimport type advancedFilteringParams from './components/advanced-filtering-params.vue'\nimport type advancedFilteringTags from './components/advanced-filtering-tags.vue'\n\nexport interface IAvancedFilteringTag {\n label: string\n key: string\n value: string | string[]\n showValue: string | string[]\n}\n\nexport const ALL_VALUE: string = '_ALL'\n\nexport type FilterColumn = FormColumn<{\n unUseDefaultOption?: boolean\n defaultOptionLabel?: string\n}>\n\nexport const initValue = (column: FilterColumn, values: any) => {\n let value: any = has(values, column.key) ? values[column.key] : null\n if (has(column, 'options') && !column.unUseDefaultOption) {\n if (column.type === 'checkbox-group' || has(column, 'mode')) {\n value = isEmpty(value) || isNil(value) ? [ALL_VALUE] : value\n } else {\n value = isNil(value) ? ALL_VALUE : value\n }\n }\n\n return value\n}\n\nexport const filterAllValue = (values: string | string[]) => {\n let value: any = null\n if (Array.isArray(values)) {\n value = values.filter(item => item !== ALL_VALUE)\n } else {\n value = values === ALL_VALUE ? null : values\n }\n\n return value\n}\n\nexport const treeDataFormat = (\n arr = [] as any[],\n fieldNames: { [key: string]: string }\n) => {\n let options = [] as any[]\n if (!arr) return []\n options = arr.map((e: any) => {\n const obj: any = {}\n obj.label = e[fieldNames.label]\n obj.value = e[fieldNames.value]\n if (e[fieldNames.children] && e[fieldNames.children].length) {\n obj.children = treeDataFormat(e[fieldNames.children], fieldNames)\n }\n\n return obj\n })\n return options\n}\n\nexport const findLabelByValue = (\n tree: FilterColumn['options'],\n value: any\n): string => {\n // 递归函数,用于遍历 Tree 数据\n function _findLabel(nodes: FilterColumn['options']): string[] {\n const labels: string[] = []\n if (!nodes) return []\n for (const node of nodes) {\n if (node.value === value) {\n labels.push(node.label)\n }\n if (node.children && node.children.length > 0) {\n const childLabels = _findLabel(node.children)\n if (childLabels) {\n labels.push(...childLabels)\n }\n }\n }\n return labels.length > 0 ? labels : []\n }\n // 开始递归查找\n return _findLabel(tree).join(',')\n}\n\nexport const advancedFilteringProps = buildProps({\n filterColumns: {\n type: definePropType<FilterColumn[]>(Array),\n default: () => []\n },\n value: {\n type: Object,\n default: () => ({})\n },\n formOptions: {\n type: definePropType<AntFormProps>(Object),\n default: () => ({ layout: 'vertical' })\n },\n overlayStyle: {\n type: definePropType<TooltipProps['overlayStyle']>(Object),\n default: () => ({\n width: '500px'\n })\n }\n} as const)\n\nexport const advancedFilteringParamsProps = buildProps({\n filterColumns: {\n type: definePropType<FilterColumn[]>(Array),\n default: () => []\n },\n value: {\n type: Object,\n default: () => ({})\n },\n formOptions: {\n type: definePropType<AntFormProps>(Object),\n default: () => ({ layout: 'vertical' })\n },\n showFooter: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const advancedFilteringEmits = {\n change: (value: Record<string, any>) => !!value,\n 'update:value': (value: Record<string, any>) => !!value\n}\n\nexport const advancedFilteringParamsEmits = {\n close: () => true,\n confirm: () => true,\n changeValue: (value: Record<string, any>) => !!value,\n 'update:value': (value: Record<string, any>) => !!value\n}\n\nexport const advancedFilteringTagsEmits = {\n change: (value: Record<string, any>) => !!value,\n 'update:value': (value: Record<string, any>) => !!value\n}\n\n// props\nexport type AdvancedFilteringProps = ExtractPropTypes<\n typeof advancedFilteringProps\n>\n\nexport type AdvancedFilteringParamsProps = ExtractPropTypes<\n typeof advancedFilteringParamsProps\n>\n\n// emits\nexport type AdvancedFilteringEmits = typeof advancedFilteringEmits\n\nexport type AdvancedFilteringParamsEmits = typeof advancedFilteringParamsEmits\n\nexport type AdvancedFilteringTagsEmits = typeof advancedFilteringTagsEmits\n\n// instance\nexport type AdvancedFilteringInstance = InstanceType<typeof advancedFiltering>\n\nexport type AdvancedFilteringParamsInstance = InstanceType<\n typeof advancedFilteringParams\n>\n\nexport type AdvancedFilteringTagsInstance = InstanceType<\n typeof advancedFilteringTags\n>\n"],"names":[],"mappings":";;;;;AAiBO,MAAM,SAAoB,GAAA,OAAA;AAOpB,MAAA,SAAA,GAAY,CAAC,MAAA,EAAsB,MAAgB,KAAA;AAC9D,EAAI,IAAA,KAAA,GAAa,IAAI,MAAQ,EAAA,MAAA,CAAO,GAAG,CAAI,GAAA,MAAA,CAAO,MAAO,CAAA,GAAG,CAAI,GAAA,IAAA,CAAA;AAChE,EAAA,IAAI,IAAI,MAAQ,EAAA,SAAS,CAAK,IAAA,CAAC,OAAO,kBAAoB,EAAA;AACxD,IAAA,IAAI,OAAO,IAAS,KAAA,gBAAA,IAAoB,GAAI,CAAA,MAA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