yc-pro-components 0.0.53 → 0.0.57

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 (128) hide show
  1. package/es/components/breadcrumb/index.d.ts +1 -1
  2. package/es/components/breadcrumb/src/index.vue.d.ts +1 -1
  3. package/es/components/check-card/index.d.ts +1 -1
  4. package/es/components/check-card-group/index.d.ts +2 -1
  5. package/es/components/check-card-group/src/index.vue.d.ts +1 -1
  6. package/es/components/descriptions/index.d.ts +2 -1
  7. package/es/components/dialog-form/index.d.ts +2 -1
  8. package/es/components/display-item/index.d.ts +2 -1
  9. package/es/components/drawer-form/index.d.ts +2 -1
  10. package/es/components/form/index.d.ts +2 -1
  11. package/es/components/form/src/form-content.vue.d.ts +2 -2
  12. package/es/components/form-item/index.d.ts +2 -1
  13. package/es/components/header/index.d.ts +1 -1
  14. package/es/components/input-tag/index.d.ts +1 -1
  15. package/es/components/layout/index.d.ts +2 -1
  16. package/es/components/page/index.d.ts +2 -1
  17. package/es/components/pagination/index.d.ts +1 -1
  18. package/es/components/radio/index.d.ts +1 -1
  19. package/es/components/render/index.d.ts +2 -1
  20. package/es/components/search/index.d.ts +2 -1
  21. package/es/components/sidebar/index.d.ts +1 -1
  22. package/es/components/steps-form/index.d.ts +2 -1
  23. package/es/components/table/index.d.ts +2 -1
  24. package/es/components/virtual-table/index.d.ts +2 -1
  25. package/es/components/yc-drawer/store.d.ts +1 -1
  26. package/es/components/yc-plus-page/src/filter-strategies.d.ts +22 -0
  27. package/es/components/yc-plus-page/src/filter-strategies.mjs +189 -0
  28. package/es/components/yc-plus-page/src/filter-utils.d.ts +37 -0
  29. package/es/components/yc-plus-page/src/filter-utils.mjs +27 -0
  30. package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +2 -0
  31. package/es/components/yc-plus-page/src/header-filter-cell.vue.mjs +1 -1
  32. package/es/components/yc-plus-page/src/header-filter-cell.vue2.mjs +136 -65
  33. package/es/components/yc-plus-page/src/index.vue.d.ts +2 -1
  34. package/es/components/yc-plus-page/src/index.vue.mjs +1 -1
  35. package/es/components/yc-plus-page/src/index.vue2.mjs +15 -4
  36. package/es/components/yc-plus-page/src/type.d.ts +8 -0
  37. package/es/components/yc-plus-page/src/use-header-filter.mjs +17 -4
  38. package/es/components/yc-select-v2/src/index.vue2.mjs +4 -2
  39. package/es/components/yc-select-v2/src/type.d.ts +2 -0
  40. package/es/directives/dist/fn-perm.mjs +2 -2
  41. package/es/hooks/useGetOptions.mjs +56 -34
  42. package/es/hooks/usePlusFormReset.d.ts +2 -1
  43. package/es/index.css +13 -12
  44. package/es/index.d.ts +1 -0
  45. package/es/index.mjs +1 -0
  46. package/es/types/table.d.ts +2 -3
  47. package/es/utils/dist/permission.mjs +2 -2
  48. package/es/version.d.ts +1 -1
  49. package/es/version.mjs +1 -1
  50. package/es/yc-components/index.d.ts +1 -0
  51. package/es/yc-components/version.d.ts +1 -1
  52. package/index.css +15 -12
  53. package/index.js +445 -117
  54. package/index.min.css +3 -2
  55. package/index.min.js +11 -11
  56. package/index.min.mjs +11 -11
  57. package/index.mjs +444 -118
  58. package/lib/components/breadcrumb/index.d.ts +1 -1
  59. package/lib/components/breadcrumb/src/index.vue.d.ts +1 -1
  60. package/lib/components/check-card/index.d.ts +1 -1
  61. package/lib/components/check-card-group/index.d.ts +2 -1
  62. package/lib/components/check-card-group/src/index.vue.d.ts +1 -1
  63. package/lib/components/descriptions/index.d.ts +2 -1
  64. package/lib/components/dialog-form/index.d.ts +2 -1
  65. package/lib/components/display-item/index.d.ts +2 -1
  66. package/lib/components/drawer-form/index.d.ts +2 -1
  67. package/lib/components/form/index.d.ts +2 -1
  68. package/lib/components/form/src/form-content.vue.d.ts +2 -2
  69. package/lib/components/form-item/index.d.ts +2 -1
  70. package/lib/components/header/index.d.ts +1 -1
  71. package/lib/components/input-tag/index.d.ts +1 -1
  72. package/lib/components/layout/index.d.ts +2 -1
  73. package/lib/components/page/index.d.ts +2 -1
  74. package/lib/components/pagination/index.d.ts +1 -1
  75. package/lib/components/radio/index.d.ts +1 -1
  76. package/lib/components/render/index.d.ts +2 -1
  77. package/lib/components/search/index.d.ts +2 -1
  78. package/lib/components/sidebar/index.d.ts +1 -1
  79. package/lib/components/steps-form/index.d.ts +2 -1
  80. package/lib/components/table/index.d.ts +2 -1
  81. package/lib/components/virtual-table/index.d.ts +2 -1
  82. package/lib/components/yc-drawer/store.d.ts +1 -1
  83. package/lib/components/yc-plus-page/src/filter-strategies.d.ts +22 -0
  84. package/lib/components/yc-plus-page/src/filter-strategies.js +193 -0
  85. package/lib/components/yc-plus-page/src/filter-utils.d.ts +37 -0
  86. package/lib/components/yc-plus-page/src/filter-utils.js +36 -0
  87. package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +2 -0
  88. package/lib/components/yc-plus-page/src/header-filter-cell.vue.js +1 -1
  89. package/lib/components/yc-plus-page/src/header-filter-cell.vue2.js +135 -64
  90. package/lib/components/yc-plus-page/src/index.vue.d.ts +2 -1
  91. package/lib/components/yc-plus-page/src/index.vue.js +1 -1
  92. package/lib/components/yc-plus-page/src/index.vue2.js +15 -4
  93. package/lib/components/yc-plus-page/src/type.d.ts +8 -0
  94. package/lib/components/yc-plus-page/src/use-header-filter.js +17 -4
  95. package/lib/components/yc-select-v2/src/index.vue2.js +4 -2
  96. package/lib/components/yc-select-v2/src/type.d.ts +2 -0
  97. package/lib/hooks/useGetOptions.js +55 -33
  98. package/lib/hooks/usePlusFormReset.d.ts +2 -1
  99. package/lib/index.css +14 -13
  100. package/lib/index.d.ts +1 -0
  101. package/lib/index.js +3 -0
  102. package/lib/types/table.d.ts +2 -3
  103. package/lib/utils/dist/permission.js +3 -2
  104. package/lib/version.d.ts +1 -1
  105. package/lib/version.js +1 -1
  106. package/lib/yc-components/index.d.ts +1 -0
  107. package/lib/yc-components/version.d.ts +1 -1
  108. package/locale/en.js +1 -1
  109. package/locale/en.min.js +1 -1
  110. package/locale/en.min.mjs +1 -1
  111. package/locale/en.mjs +1 -1
  112. package/locale/ja.js +1 -1
  113. package/locale/ja.min.js +1 -1
  114. package/locale/ja.min.mjs +1 -1
  115. package/locale/ja.mjs +1 -1
  116. package/locale/ko.js +1 -1
  117. package/locale/ko.min.js +1 -1
  118. package/locale/ko.min.mjs +1 -1
  119. package/locale/ko.mjs +1 -1
  120. package/locale/zh-cn.js +1 -1
  121. package/locale/zh-cn.min.js +1 -1
  122. package/locale/zh-cn.min.mjs +1 -1
  123. package/locale/zh-cn.mjs +1 -1
  124. package/locale/zh-tw.js +1 -1
  125. package/locale/zh-tw.min.js +1 -1
  126. package/locale/zh-tw.min.mjs +1 -1
  127. package/locale/zh-tw.mjs +1 -1
  128. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { LooseRequired } from '@vue/shared';
2
2
  import { RouteComponent, RouteLocation, RouteLocationRaw, LocationQueryRaw, HistoryState, RouteRecordName, RouteParamsRaw, NavigationGuardWithThis, NavigationGuard, RouteLocationNormalized, RouteMeta } from 'vue-router';
3
- import { PlusRouteRecordRaw, RenderTypes } from 'packages/yc-components';
3
+ import { PlusRouteRecordRaw, RenderTypes } from 'yc-pro-components';
4
4
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, FunctionalComponent, DefineComponent, Slot, Component, ComputedOptions, MethodOptions, Directive, WatchCallback, WatchOptions, ComponentProvideOptions, DebuggerEvent, ComponentPublicInstance } from 'vue';
5
5
  export * from './src/type';
6
6
  export declare const PlusBreadcrumb: {
@@ -1,6 +1,6 @@
1
1
  import { LooseRequired } from '@vue/shared';
2
2
  import { RouteComponent, RouteLocation, RouteLocationRaw, LocationQueryRaw, HistoryState, RouteRecordName, RouteParamsRaw, NavigationGuardWithThis, NavigationGuard, RouteLocationNormalized, RouteMeta } from 'vue-router';
3
- import { PlusRouteRecordRaw } from 'packages/yc-components';
3
+ import { PlusRouteRecordRaw } from 'yc-pro-components';
4
4
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, FunctionalComponent, Slot, Component, ComputedOptions, MethodOptions, Directive, WatchCallback, WatchOptions, ComponentProvideOptions, DebuggerEvent, ComponentPublicInstance, ComponentOptionsBase, PropType } from 'vue';
5
5
  import { PlusBreadcrumbSelfProps as PlusBreadcrumbProps } from './type';
6
6
 
@@ -1,4 +1,4 @@
1
- import { RenderTypes, RecordType } from 'packages/yc-components';
1
+ import { RenderTypes, RecordType } from 'yc-pro-components';
2
2
  import { PlusCheckCardProps } from './src/index.vue';
3
3
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
4
4
  export type { PlusCheckCardProps } from './src/index.vue';
@@ -1,5 +1,6 @@
1
+ import { RenderTypes } from 'yc-pro-components';
1
2
  import { ValueType } from './src/index.vue';
2
- import { PlusCheckCardProps, RenderTypes } from 'packages/yc-components';
3
+ import { PlusCheckCardProps } from 'packages/yc-components';
3
4
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
4
5
  export type { PlusCheckCardGroupProps } from './src/index.vue';
5
6
  export declare const PlusCheckCardGroup: {
@@ -1,4 +1,4 @@
1
- import { RenderTypes } from 'packages/yc-components';
1
+ import { RenderTypes } from 'yc-pro-components';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
3
  import { ComponentSize } from 'element-plus';
4
4
  import { PlusCheckCardProps } from 'yc-pro-components/es/components/check-card';
@@ -1,4 +1,5 @@
1
- import { RecordType, PlusColumn, PlusFormProps, FieldValueType, TableFormRefRow } from 'packages/yc-components';
1
+ import { PlusFormProps, TableFormRefRow } from 'packages/yc-components';
2
+ import { RecordType, PlusColumn, FieldValueType } from 'yc-pro-components';
2
3
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ShallowRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
3
4
  import { default as Descriptions } from './src/index.vue';
4
5
 
@@ -1,7 +1,8 @@
1
1
  import { EpPropMergeType } from 'element-plus/es/utils';
2
2
  import { LooseRequired } from '@vue/shared';
3
3
  import { FormInstance, ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus';
4
- import { PlusDialogProps, PlusFormProps, FieldValues, PlusColumn, PlusFormItemProps, RecordType, Mutable, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'packages/yc-components';
4
+ import { FieldValues, PlusColumn, RecordType, Mutable, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'yc-pro-components';
5
+ import { PlusDialogProps, PlusFormProps, PlusFormItemProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
5
6
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Ref, CSSProperties, Component } from 'vue';
6
7
  import { default as DialogForm } from './src/index.vue';
7
8
 
@@ -1,7 +1,8 @@
1
1
  import { EpPropMergeType } from 'element-plus/es/utils';
2
2
  import { ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus';
3
3
  import { LooseRequired } from '@vue/shared';
4
- import { RecordType, PlusFormProps, PlusColumn, FieldValueType, PlusFormItemProps, Mutable, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, OptionsRow } from 'packages/yc-components';
4
+ import { PlusFormProps, PlusFormItemProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
5
+ import { RecordType, PlusColumn, FieldValueType, Mutable, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, OptionsRow } from 'yc-pro-components';
5
6
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, Ref, ComputedRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, CSSProperties } from 'vue';
6
7
  import { default as DisplayItem } from './src/index.vue';
7
8
 
@@ -1,7 +1,8 @@
1
1
  import { LooseRequired } from '@vue/shared';
2
2
  import { EpPropMergeType, EpPropFinalized } from 'element-plus/es/utils';
3
3
  import { DrawerProps, DialogTransition, DialogBeforeCloseFn, FormInstance, ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus';
4
- import { PlusFormProps, FieldValues, Mutable, RecordType, PlusColumn, PlusFormItemProps, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'packages/yc-components';
4
+ import { FieldValues, Mutable, RecordType, PlusColumn, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'yc-pro-components';
5
+ import { PlusFormProps, PlusFormItemProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
5
6
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, Ref, ComponentInternalInstance, TransitionProps, Component, ComputedOptions, MethodOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, ComputedRef } from 'vue';
6
7
  export type { PlusDrawerFormProps } from './src/index.vue';
7
8
  export type PlusDrawerFormInstance = InstanceType<typeof PlusDrawerForm>;
@@ -1,8 +1,9 @@
1
+ import { PlusFormItemProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
1
2
  import { LooseRequired } from '@vue/shared';
2
3
  import { FormItemRule, RowProps, ColProps, CardProps, FormInstance, ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus';
3
4
  import { Arrayable, EpPropMergeType } from 'element-plus/es/utils';
4
5
  import { PlusFormGroupRow } from './src/type';
5
- import { PlusColumn, FieldValues, Mutable, RecordType, PlusFormItemProps, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'packages/yc-components';
6
+ import { PlusColumn, FieldValues, Mutable, RecordType, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'yc-pro-components';
6
7
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, Ref, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, ComputedRef, Component } from 'vue';
7
8
  import { default as Form } from './src/index.vue';
8
9
 
@@ -140,7 +140,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
140
140
  transform?: ((data: any) => OptionsRow<undefined>[]) | undefined;
141
141
  dictCode?: string | undefined;
142
142
  } | undefined;
143
- headerFilter?: boolean | undefined;
143
+ headerFilter?: boolean | Record<string, any> | undefined;
144
144
  disabledHeaderFilter?: boolean | undefined;
145
145
  headerIsChecked?: boolean | undefined;
146
146
  tableColumnProps?: Partial<Omit< TableColumnCtx<any>, "label " | "prop" | "width" | "minWidth"> & {
@@ -485,7 +485,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
485
485
  transform?: ((data: any) => OptionsRow<undefined>[]) | undefined;
486
486
  dictCode?: string | undefined;
487
487
  } | undefined;
488
- headerFilter?: boolean | undefined;
488
+ headerFilter?: boolean | Record<string, any> | undefined;
489
489
  disabledHeaderFilter?: boolean | undefined;
490
490
  headerIsChecked?: boolean | undefined;
491
491
  tableColumnProps?: Partial<Omit< TableColumnCtx<any>, "label " | "prop" | "width" | "minWidth"> & {
@@ -1,8 +1,9 @@
1
1
  import { PlusFormItemProps } from './src/index.vue';
2
2
  import { LooseRequired } from '@vue/shared';
3
+ import { PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
3
4
  import { EpPropMergeType, Arrayable, EpPropFinalized } from 'element-plus/es/utils';
4
5
  import { ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps, FormItemProp, FormItemRule, FormValidateCallback, FormValidationResult } from 'element-plus';
5
- import { Mutable, RecordType, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, OptionsRow, TableValueType, FieldValueType, PlusColumn, FormItemValueType } from 'packages/yc-components';
6
+ import { Mutable, RecordType, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, OptionsRow, TableValueType, FieldValueType, PlusColumn, FormItemValueType } from 'yc-pro-components';
6
7
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComputedRef, CSSProperties, Ref, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
7
8
  export type { PlusFormItemProps } from './src/index.vue';
8
9
  export declare const PlusFormItem: {
@@ -1,4 +1,4 @@
1
- import { RenderTypes } from 'packages/yc-components';
1
+ import { RenderTypes } from 'yc-pro-components';
2
2
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
3
3
  export * from './src/type';
4
4
  export declare const PlusHeader: {
@@ -1,5 +1,5 @@
1
1
  import { InputProps, TagProps, InputInstance, TagInstance } from 'element-plus';
2
- import { Mutable, RecordType } from 'packages/yc-components';
2
+ import { Mutable, RecordType } from 'yc-pro-components';
3
3
  import { DefineComponent, PropType, CSSProperties, Ref, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
4
4
  import { PlusInputTagProps } from './src/index.vue';
5
5
 
@@ -1,7 +1,8 @@
1
1
  import { NavigationFailure } from 'vue-router';
2
2
  import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils';
3
3
  import { ScrollbarProps, BacktopProps, PopperEffect, MenuItemClicked } from 'element-plus';
4
- import { PlusHeaderProps, Mutable, RecordType, PlusSidebarProps, PlusBreadcrumbProps, PlusRouteRecordRaw, RenderTypes } from 'packages/yc-components';
4
+ import { Mutable, RecordType, PlusRouteRecordRaw, RenderTypes } from 'yc-pro-components';
5
+ import { PlusHeaderProps, PlusSidebarProps, PlusBreadcrumbProps } from 'packages/yc-components';
5
6
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, Ref, ComponentInternalInstance, ComputedRef, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, Component, VNode, RendererNode, RendererElement, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
6
7
  export type { PlusLayoutProps } from './src/index.vue';
7
8
  export declare const PlusLayout: {
@@ -2,7 +2,8 @@ import { Options } from 'sortablejs';
2
2
  import { LooseRequired } from '@vue/shared';
3
3
  import { Arrayable, EpPropMergeType } from 'element-plus/es/utils';
4
4
  import { TableProps, CardProps, RowProps, ColProps, FormItemRule, FormInstance, ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps, TableColumnCtx, TableInstance, TableV2Instance } from 'element-plus';
5
- import { PlusSearchSelfProps, PlusFormSelfProps, ElementPlusFormProps, RecordType, PlusTableSelfProps, PlusColumn, PageInfo, PlusPaginationProps, Mutable, FieldValues, PlusFormGroupRow, PlusFormItemProps, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow, ActionBarProps, ColumnSetting, ButtonsCallBackParams, FormChangeCallBackParams, FilterTableHeaderEventType, TableFormRefRow, VirtualTableColumn } from 'packages/yc-components';
5
+ import { RecordType, PlusColumn, PageInfo, Mutable, FieldValues, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'yc-pro-components';
6
+ import { PlusSearchSelfProps, PlusFormSelfProps, ElementPlusFormProps, PlusTableSelfProps, PlusPaginationProps, PlusFormGroupRow, PlusFormItemProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, ActionBarProps, ColumnSetting, ButtonsCallBackParams, FormChangeCallBackParams, FilterTableHeaderEventType, TableFormRefRow, VirtualTableColumn } from 'packages/yc-components';
6
7
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, Ref, ComponentInternalInstance, Component, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, ComputedRef, ShallowRef } from 'vue';
7
8
  import { default as Page } from './src/index.vue';
8
9
 
@@ -1,4 +1,4 @@
1
- import { PageInfo } from 'packages/yc-components';
1
+ import { PageInfo } from 'yc-pro-components';
2
2
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
3
3
  import { default as Pagination } from './src/index.vue';
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { radioOptionProp, radioOption } from 'element-plus';
2
2
  import { EpPropMergeType, EpPropFinalized } from 'element-plus/es/utils';
3
- import { OptionsRow, RecordType, RenderTypes } from 'packages/yc-components';
3
+ import { OptionsRow, RecordType, RenderTypes } from 'yc-pro-components';
4
4
  import { DefineComponent, PropType, Ref, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PublicProps } from 'vue';
5
5
  import { PlusRadioProps } from './src/index.vue';
6
6
 
@@ -1,6 +1,7 @@
1
+ import { PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
1
2
  import { EpPropMergeType } from 'element-plus/es/utils';
2
3
  import { FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus';
3
- import { FieldValueType, PlusColumn, RenderTypes, RecordType, PropsItemType, Mutable, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
4
+ import { FieldValueType, PlusColumn, RenderTypes, RecordType, PropsItemType, Mutable, OmitTypes, CascaderProps } from 'yc-pro-components';
4
5
  import { DefineComponent, PropType, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
5
6
  export type { PlusRenderProps } from './src/index.vue';
6
7
  export declare const PlusRender: DefineComponent<{
@@ -1,7 +1,8 @@
1
1
  import { LooseRequired } from '@vue/shared';
2
2
  import { Arrayable, EpPropMergeType } from 'element-plus/es/utils';
3
+ import { PlusFormGroupRow, PlusFormItemProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps } from 'packages/yc-components';
3
4
  import { RowProps, ColProps, FormItemRule, CardProps, FormInstance, ElTooltipProps, FormItemProps, ProgressFn, CascaderNode, PopperEffect, InputAutoSize, AutocompleteProps, CheckboxGroupProps, ColorPickerProps, DatePickerProps, InputProps, InputNumberProps, RadioGroupProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerDefaultProps, TimeSelectProps, TextProps, ImageProps, LinkProps, TagProps, ProgressProps } from 'element-plus';
4
- import { PlusColumn, FieldValues, Mutable, RecordType, PlusFormGroupRow, PlusFormItemProps, PropsItemType, OmitTypes, CascaderProps, PlusRadioProps, PlusDatePickerProps, PlusInputTagProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'packages/yc-components';
5
+ import { PlusColumn, FieldValues, Mutable, RecordType, PropsItemType, OmitTypes, CascaderProps, OptionsType, RenderTypes, TableValueType, FormItemValueType, FieldValueType, OptionsRow } from 'yc-pro-components';
5
6
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, Component, Ref, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, ComputedRef } from 'vue';
6
7
  import { default as Search } from './src/index.vue';
7
8
 
@@ -1,7 +1,7 @@
1
1
  import { NavigationFailure } from 'vue-router';
2
2
  import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils';
3
3
  import { ScrollbarProps, PopperEffect, MenuItemClicked } from 'element-plus';
4
- import { PlusRouteRecordRaw, RenderTypes, Mutable, RecordType } from 'packages/yc-components';
4
+ import { PlusRouteRecordRaw, RenderTypes, Mutable, RecordType } from 'yc-pro-components';
5
5
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComputedRef, Ref, CSSProperties, Component, VNode, RendererNode, RendererElement, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
6
6
  import { default as Sidebar } from './src/index.vue';
7
7
 
@@ -1,5 +1,6 @@
1
1
  import { EpPropMergeType } from 'element-plus/es/utils';
2
- import { FieldValues, PlusColumn, PlusFormProps } from 'packages/yc-components';
2
+ import { PlusFormProps } from 'packages/yc-components';
3
+ import { FieldValues, PlusColumn } from 'yc-pro-components';
3
4
  import { PlusStepFromRow } from './src/type';
4
5
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Component, ComputedOptions, MethodOptions } from 'vue';
5
6
  export type { PlusStepsFormProps } from './src/index.vue';
@@ -1,7 +1,8 @@
1
1
  import { Options } from 'sortablejs';
2
+ import { PlusPaginationProps, PlusRadioProps } from 'packages/yc-components';
2
3
  import { ActionBarProps, ColumnSetting, ButtonsCallBackParams, FormChangeCallBackParams, FilterTableHeaderEventType, TableFormRefRow } from './src/type';
3
4
  import { TableColumnCtx, TableInstance } from 'element-plus';
4
- import { RecordType, PlusColumn, PlusPaginationProps, PlusRadioProps, PageInfo, TableValueType, FormItemValueType, OptionsRow } from 'packages/yc-components';
5
+ import { RecordType, PlusColumn, PageInfo, TableValueType, FormItemValueType, OptionsRow } from 'yc-pro-components';
5
6
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ShallowRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
6
7
  import { default as _Table } from './src/index.vue';
7
8
 
@@ -1,6 +1,7 @@
1
1
  import { TableV2Instance } from 'element-plus';
2
2
  import { VirtualTableColumn } from './src/type';
3
- import { RecordType, PlusColumn, ActionBarProps, PlusPaginationProps, ButtonsCallBackParams, PageInfo } from 'packages/yc-components';
3
+ import { ActionBarProps, PlusPaginationProps, ButtonsCallBackParams } from 'packages/yc-components';
4
+ import { RecordType, PlusColumn, PageInfo } from 'yc-pro-components';
4
5
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ShallowRef, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
5
6
  import { default as _VirtualTable } from './src/index.vue';
6
7
 
@@ -1,5 +1,5 @@
1
1
  import { Globals } from 'csstype';
2
- import { OptionsRow } from 'packages/yc-components';
2
+ import { OptionsRow } from 'yc-pro-components';
3
3
  import { NavigationGuardWithThis, NavigationGuard } from 'vue-router';
4
4
  import { LooseRequired } from '@vue/shared';
5
5
  import { Ref, FunctionalComponent, Slot, Component, ComputedOptions, MethodOptions, Directive, WatchCallback, WatchOptions, ComponentProvideOptions, DebuggerEvent, ComponentPublicInstance, ComponentOptionsBase, VNode, RendererNode, RendererElement } from 'vue';
@@ -0,0 +1,22 @@
1
+ import { h } from 'vue';
2
+
3
+ /**
4
+ * 筛选组件策略接口
5
+ */
6
+ export interface FilterComponentStrategy {
7
+ render: (ctx: {
8
+ fp: Record<string, unknown>;
9
+ inputVal: string;
10
+ setInputVal: (v: string) => void;
11
+ options: any[];
12
+ }) => ReturnType<typeof h>;
13
+ }
14
+ /** valueType -> interactionType 的映射表,用于自动推断交互组件类型 */
15
+ export declare const VALUE_TYPE_MAP: Record<string, string>;
16
+ /** 根据列配置解析最终的交互组件类型 */
17
+ export declare const resolveInteractionType: (customType: string | undefined, fieldConfig: Record<string, unknown> | undefined, valueType: string) => string | undefined;
18
+ /**
19
+ * 策略注册表
20
+ * 新增组件类型只需在此处追加一条策略,无需修改 renderValueField 主逻辑
21
+ */
22
+ export declare const FILTER_COMPONENT_STRATEGIES: Record<string, FilterComponentStrategy>;
@@ -0,0 +1,193 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var elementPlus = require('element-plus');
5
+ var filterUtils = require('./filter-utils.js');
6
+
7
+ const VALUE_TYPE_MAP = {
8
+ select: "select",
9
+ checkbox: "checkbox",
10
+ radio: "select",
11
+ "date-picker": "date-picker",
12
+ "datetime-picker": "date-picker",
13
+ datetime: "date-picker",
14
+ "time-picker": "time-picker",
15
+ "time-select": "time-select",
16
+ "tree-select": "tree-select",
17
+ cascader: "cascader"
18
+ };
19
+ const resolveInteractionType = (customType, fieldConfig, valueType) => {
20
+ if (customType) return customType;
21
+ if (fieldConfig) {
22
+ if (fieldConfig.type === "date") return "date-picker";
23
+ if (fieldConfig.dictField === true) return "select";
24
+ }
25
+ return VALUE_TYPE_MAP[valueType] || void 0;
26
+ };
27
+ const FILTER_COMPONENT_STRATEGIES = {
28
+ "time-picker": {
29
+ render: ({ fp, inputVal, setInputVal }) => {
30
+ var _a, _b;
31
+ return vue.h(elementPlus.ElTimePicker, {
32
+ ...fp,
33
+ format: (_a = fp == null ? void 0 : fp.format) != null ? _a : "HH:mm:ss",
34
+ valueFormat: (_b = fp == null ? void 0 : fp.valueFormat) != null ? _b : "HH:mm:ss",
35
+ modelValue: inputVal,
36
+ "onUpdate:modelValue": (v) => setInputVal(String(v != null ? v : "")),
37
+ popperClass: filterUtils.mergePopperClass(fp.popperClass),
38
+ style: filterUtils.FILTER_FIELD_STYLE
39
+ });
40
+ }
41
+ },
42
+ "time-select": {
43
+ render: ({ fp, inputVal, setInputVal }) => vue.h(elementPlus.ElTimeSelect, {
44
+ ...fp,
45
+ modelValue: inputVal,
46
+ "onUpdate:modelValue": (v) => {
47
+ const raw = String(v != null ? v : "");
48
+ setInputVal(raw && /^\d{2}:\d{2}$/.test(raw) ? `${raw}:00` : raw);
49
+ },
50
+ style: filterUtils.FILTER_FIELD_STYLE
51
+ })
52
+ },
53
+ "date-picker": {
54
+ render: ({ fp, inputVal, setInputVal }) => {
55
+ var _a;
56
+ const range = filterUtils.isRangeType(fp.type);
57
+ return vue.h(elementPlus.ElDatePicker, {
58
+ ...fp,
59
+ valueFormat: (_a = fp == null ? void 0 : fp.valueFormat) != null ? _a : "YYYY-MM-DD HH:mm:ss",
60
+ modelValue: range ? filterUtils.toArrayValue(inputVal) : inputVal,
61
+ "onUpdate:modelValue": (v) => setInputVal(filterUtils.fromArrayValue(v)),
62
+ popperClass: filterUtils.mergePopperClass(fp.popperClass),
63
+ style: filterUtils.FILTER_FIELD_STYLE
64
+ });
65
+ }
66
+ },
67
+ checkbox: {
68
+ render: ({ fp, inputVal, setInputVal, options }) => {
69
+ const parsedValue = filterUtils.toArrayValue(inputVal) || [];
70
+ const allVals = options.map((o) => o.value);
71
+ const selectedSet = new Set(parsedValue);
72
+ const checkAll = options.length > 0 && parsedValue.length === options.length;
73
+ const isIndeterminate = parsedValue.length > 0 && parsedValue.length < options.length;
74
+ const handleCheckAllChange = (val) => {
75
+ setInputVal(val ? options.map((opt) => opt.value).join(",") : "");
76
+ };
77
+ const handleInvert = () => {
78
+ if (!options.length) return;
79
+ const inverted = allVals.filter((v) => !selectedSet.has(v));
80
+ setInputVal(inverted.join(","));
81
+ };
82
+ const showCheckAll = fp.showCheckAll !== false;
83
+ const showInvert = fp.showInvert !== false;
84
+ const checkAllText = fp.checkAllText || "\u5168\u9009";
85
+ return vue.h("div", { class: "header-filter-checkbox-group", style: "max-height: 250px; overflow-y: auto; padding: 4px;" }, [
86
+ showCheckAll && options.length > 0 ? vue.h("div", { style: "display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--el-border-color-lighter);" }, [
87
+ vue.h(elementPlus.ElCheckbox, {
88
+ modelValue: checkAll,
89
+ indeterminate: isIndeterminate,
90
+ "onUpdate:modelValue": handleCheckAllChange,
91
+ style: "font-weight: bold; flex: 1; min-width: 0;"
92
+ }, () => checkAllText),
93
+ showInvert ? vue.h(
94
+ elementPlus.ElButton,
95
+ {
96
+ link: true,
97
+ type: "primary",
98
+ size: "small",
99
+ onClick: handleInvert
100
+ },
101
+ () => "\u53CD\u9009"
102
+ ) : null
103
+ ]) : null,
104
+ vue.h(elementPlus.ElCheckboxGroup, {
105
+ ...fp,
106
+ modelValue: parsedValue,
107
+ "onUpdate:modelValue": (v) => setInputVal(filterUtils.fromArrayValue(v)),
108
+ style: "display: flex; flex-direction: column;"
109
+ }, {
110
+ default: () => options.map(
111
+ (opt) => vue.h(
112
+ elementPlus.ElCheckbox,
113
+ {
114
+ value: opt.value,
115
+ label: opt.value,
116
+ style: "margin-bottom: 4px; height: auto;"
117
+ },
118
+ () => opt.label
119
+ )
120
+ )
121
+ })
122
+ ]);
123
+ }
124
+ },
125
+ "tree-select": {
126
+ render: ({ fp, inputVal, setInputVal, options }) => {
127
+ const isMultiple = !!fp.multiple;
128
+ const treeData = options && options.length > 0 ? options : fp.data || [];
129
+ return vue.h(elementPlus.ElTreeSelect, {
130
+ ...fp,
131
+ modelValue: filterUtils.parseTypedValue(inputVal, isMultiple),
132
+ "onUpdate:modelValue": (v) => setInputVal(filterUtils.fromArrayValue(v)),
133
+ data: treeData,
134
+ popperClass: filterUtils.mergePopperClass(fp.popperClass, "yc-header-filter-tree-popper"),
135
+ placeholder: fp.placeholder || "\u8BF7\u9009\u62E9",
136
+ style: filterUtils.FILTER_FIELD_STYLE
137
+ });
138
+ }
139
+ },
140
+ cascader: {
141
+ render: ({ fp, inputVal, setInputVal, options }) => {
142
+ const cascaderProps = fp.props || {};
143
+ const isMultiple = !!cascaderProps.multiple;
144
+ let parsedValue = inputVal;
145
+ if (isMultiple && typeof inputVal === "string" && inputVal && !cascaderProps.emitPath) {
146
+ parsedValue = inputVal.split(",");
147
+ }
148
+ return vue.h(elementPlus.ElCascader, {
149
+ ...fp,
150
+ modelValue: parsedValue,
151
+ "onUpdate:modelValue": (v) => {
152
+ let flat = v;
153
+ if (Array.isArray(v) && v.length && Array.isArray(v[0])) {
154
+ flat = v.map((arr) => Array.isArray(arr) ? arr[arr.length - 1] : arr);
155
+ }
156
+ setInputVal(filterUtils.fromArrayValue(flat));
157
+ },
158
+ options,
159
+ popperClass: filterUtils.mergePopperClass(fp.popperClass),
160
+ placeholder: fp.placeholder || "\u8BF7\u9009\u62E9",
161
+ style: filterUtils.FILTER_FIELD_STYLE
162
+ });
163
+ }
164
+ },
165
+ select: {
166
+ render: ({ fp, inputVal, setInputVal, options }) => {
167
+ const isMultiple = !!fp.multiple;
168
+ return vue.h(
169
+ elementPlus.ElSelect,
170
+ {
171
+ ...fp,
172
+ modelValue: filterUtils.parseTypedValue(inputVal, isMultiple),
173
+ "onUpdate:modelValue": (v) => setInputVal(filterUtils.fromArrayValue(v)),
174
+ popperClass: filterUtils.mergePopperClass(fp.popperClass),
175
+ placeholder: fp.placeholder || "\u8BF7\u9009\u62E9",
176
+ style: filterUtils.FILTER_FIELD_STYLE
177
+ },
178
+ {
179
+ default: () => options.map(
180
+ (opt) => vue.h(elementPlus.ElOption, {
181
+ label: opt.label,
182
+ value: opt.value
183
+ })
184
+ )
185
+ }
186
+ );
187
+ }
188
+ }
189
+ };
190
+
191
+ exports.FILTER_COMPONENT_STRATEGIES = FILTER_COMPONENT_STRATEGIES;
192
+ exports.VALUE_TYPE_MAP = VALUE_TYPE_MAP;
193
+ exports.resolveInteractionType = resolveInteractionType;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * 筛选组件公共工具函数
3
+ * 抽取自 header-filter-cell.vue,供策略和主渲染函数复用
4
+ */
5
+ /** 通用样式常量:筛选组件输入区域的宽度和间距 */
6
+ export declare const FILTER_FIELD_STYLE = "margin-top: 4px; width: 100%";
7
+ /** 统一的筛选内部下拉面板标记类名,用于 onDocPointerDown 豁免判断 */
8
+ export declare const FILTER_INNER_DROPDOWN_CLASS = "yc-header-filter-inner-dropdown";
9
+ /** 判断是否为范围类型的 date-picker */
10
+ export declare const isRangeType: (type: unknown) => boolean;
11
+ /**
12
+ * 将逗号分隔字符串转为数组
13
+ * 用于多选组件的 modelValue 回显
14
+ */
15
+ export declare const toArrayValue: (val: string | undefined) => string[] | undefined;
16
+ /**
17
+ * 将数组或单值转为逗号分隔字符串
18
+ * 用于将多选组件的 modelValue 存回 state.inputVal
19
+ */
20
+ export declare const fromArrayValue: (v: unknown) => string;
21
+ /**
22
+ * 将逗号分隔字符串还原为正确类型的数组或单值
23
+ * 解决 inputVal 存储字符串,但组件 option.value 为 number 导致的选中回显失败
24
+ * @param val 逗号分隔的字符串值
25
+ * @param isMultiple 是否多选模式
26
+ * @returns 多选时返回数组(还原数字类型),单选时返回原值
27
+ */
28
+ export declare const parseTypedValue: (val: string | undefined, isMultiple: boolean) => unknown;
29
+ /**
30
+ * 合并用户自定义的 popperClass 和内置标记类
31
+ * 确保下拉面板同时拥有:(1) z-index 提升类 (2) onDocPointerDown 豁免标记类 (3) 用户自定义类
32
+ */
33
+ export declare const mergePopperClass: (userClass: string | undefined, builtinClass?: string) => string;
34
+ /**
35
+ * 统一解析 options:优先使用 resolvedOptions,为空时回退到 headerFilter.options(自动解包 Ref)
36
+ */
37
+ export declare const resolveFilterOptions: (resolvedOptions: unknown[], headerFilterOptions: unknown) => unknown[];
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ const FILTER_FIELD_STYLE = "margin-top: 4px; width: 100%";
4
+ const FILTER_INNER_DROPDOWN_CLASS = "yc-header-filter-inner-dropdown";
5
+ const isRangeType = (type) => type === "daterange" || type === "monthrange" || type === "datetimerange" || type === "yearrange";
6
+ const toArrayValue = (val) => typeof val === "string" && val ? val.split(",") : void 0;
7
+ const fromArrayValue = (v) => Array.isArray(v) ? v.join(",") : String(v != null ? v : "");
8
+ const parseTypedValue = (val, isMultiple) => {
9
+ if (!val) return isMultiple ? [] : "";
10
+ if (!isMultiple) return val;
11
+ return val.split(",").filter(Boolean).map((s) => {
12
+ const n = Number(s);
13
+ return Number.isNaN(n) ? s : n;
14
+ });
15
+ };
16
+ const mergePopperClass = (userClass, builtinClass) => {
17
+ const parts = [FILTER_INNER_DROPDOWN_CLASS];
18
+ if (builtinClass) parts.push(builtinClass);
19
+ if (userClass) parts.push(userClass);
20
+ return parts.join(" ");
21
+ };
22
+ const resolveFilterOptions = (resolvedOptions, headerFilterOptions) => {
23
+ if (resolvedOptions && resolvedOptions.length > 0) return resolvedOptions;
24
+ if (!headerFilterOptions) return [];
25
+ const unwrapped = typeof headerFilterOptions.value !== "undefined" ? headerFilterOptions.value : headerFilterOptions;
26
+ return Array.isArray(unwrapped) ? unwrapped : [];
27
+ };
28
+
29
+ exports.FILTER_FIELD_STYLE = FILTER_FIELD_STYLE;
30
+ exports.FILTER_INNER_DROPDOWN_CLASS = FILTER_INNER_DROPDOWN_CLASS;
31
+ exports.fromArrayValue = fromArrayValue;
32
+ exports.isRangeType = isRangeType;
33
+ exports.mergePopperClass = mergePopperClass;
34
+ exports.parseTypedValue = parseTypedValue;
35
+ exports.resolveFilterOptions = resolveFilterOptions;
36
+ exports.toArrayValue = toArrayValue;
@@ -15,6 +15,8 @@ interface Props {
15
15
  orderBy?: OrderByItem[];
16
16
  /** 是否禁用筛选(仅显示排序) */
17
17
  disableFilter?: boolean;
18
+ /** 字段元数据配置(例如来自后端的 catalog 字典) */
19
+ fieldConfig?: Record<string, unknown>;
18
20
  /** 自定义渲染 reference */
19
21
  referenceRenderer?: () => unknown;
20
22
  }
@@ -5,6 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var headerFilterCell_vue_vue_type_script_setup_true_lang = require('./header-filter-cell.vue2.js');
6
6
  var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
7
7
 
8
- var YcTableHeaderFilterCellComponent = /* @__PURE__ */ _pluginVue_exportHelper.default(headerFilterCell_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-3330af37"], ["__file", "header-filter-cell.vue"]]);
8
+ var YcTableHeaderFilterCellComponent = /* @__PURE__ */ _pluginVue_exportHelper.default(headerFilterCell_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-1b4d52f7"], ["__file", "header-filter-cell.vue"]]);
9
9
 
10
10
  exports.default = YcTableHeaderFilterCellComponent;