@aplus-frontend/ui 0.1.15 → 0.1.17

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 (117) hide show
  1. package/es/index.mjs +99 -95
  2. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +26 -24
  3. package/es/src/ap-modal/index.d.ts +2 -2
  4. package/es/src/ap-modal/index.mjs +1 -1
  5. package/es/src/ap-modal/{type.d.ts → interface.d.ts} +3 -3
  6. package/es/src/ap-modal/utils/createModal.d.ts +1 -1
  7. package/es/src/ap-table/ap-table.vue.mjs +132 -129
  8. package/es/src/ap-table/interface.d.ts +19 -13
  9. package/es/src/ap-table/utils.d.ts +8340 -1
  10. package/es/src/ap-table/utils.mjs +134 -78
  11. package/es/src/business/ap-batch-action/index.css +2 -0
  12. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +13 -0
  13. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue.mjs +4 -0
  14. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +110 -0
  15. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +17 -0
  16. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.mjs +4 -0
  17. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +50 -0
  18. package/es/src/business/ap-batch-action-group/interface.d.ts +41 -0
  19. package/es/src/business/ap-batch-action-group/interface.mjs +1 -0
  20. package/es/src/business/ap-image/ApImage.vue.d.ts +65 -0
  21. package/es/src/business/ap-image/ApImage.vue.mjs +4 -0
  22. package/es/src/business/ap-image/ApImage.vue2.mjs +56 -0
  23. package/es/src/business/ap-image/hooks/useOss.d.ts +11 -0
  24. package/es/src/business/ap-image/hooks/useOss.mjs +37 -0
  25. package/es/src/business/ap-image/imgs/admin-fallback.jpg.mjs +4 -0
  26. package/es/src/business/ap-image/imgs/aplus-fallback.jpg.mjs +4 -0
  27. package/es/src/business/index.d.ts +662 -1
  28. package/es/src/business/index.mjs +25 -16
  29. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  30. package/es/src/config-provider/config-provider-props.mjs +4 -0
  31. package/es/src/config-provider/config-provider.d.ts +10 -1
  32. package/es/src/config-provider/config-provider.mjs +18 -17
  33. package/es/src/config-provider/constants.d.ts +6 -2
  34. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  35. package/es/src/config-provider/index.d.ts +20 -1
  36. package/es/src/editable-table/form-item.vue.mjs +85 -71
  37. package/es/src/editable-table/hooks/use-get-columns.d.ts +3 -2
  38. package/es/src/editable-table/hooks/use-get-columns.mjs +32 -32
  39. package/es/src/editable-table/index.vue.mjs +106 -92
  40. package/es/src/editable-table/interface.d.ts +7 -13
  41. package/es/src/editable-table/utils.d.ts +14 -2
  42. package/es/src/editable-table/utils.mjs +67 -57
  43. package/es/src/index.mjs +211 -207
  44. package/es/src/locale/lang/en.mjs +10 -7
  45. package/es/src/locale/lang/zh-cn.mjs +3 -0
  46. package/es/src/pro-form/hooks/use-label-width.d.ts +1 -1
  47. package/es/src/theme/antd-global-overwrite/admin/form.css +10 -5
  48. package/es/src/theme/antd-global-overwrite/admin/index.css +117 -38
  49. package/es/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
  50. package/es/src/theme/antd-global-overwrite/admin/table.css +53 -17
  51. package/es/src/theme/antd-global-overwrite/aplus/form.css +28 -14
  52. package/es/src/theme/antd-global-overwrite/aplus/index.css +159 -67
  53. package/es/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
  54. package/es/src/theme/antd-global-overwrite/aplus/table.css +65 -33
  55. package/es/src/theme/ap-batch-action/ap-batch-action.css +2 -0
  56. package/es/src/utils/ap-trans-data/index.d.ts +9 -10
  57. package/es/src/utils/ap-trans-data/index.mjs +20 -0
  58. package/lib/index.js +1 -1
  59. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  60. package/lib/src/ap-modal/index.d.ts +2 -2
  61. package/lib/src/ap-modal/index.js +1 -1
  62. package/lib/src/ap-modal/{type.d.ts → interface.d.ts} +3 -3
  63. package/lib/src/ap-modal/utils/createModal.d.ts +1 -1
  64. package/lib/src/ap-table/ap-table.vue.js +1 -1
  65. package/lib/src/ap-table/interface.d.ts +19 -13
  66. package/lib/src/ap-table/utils.d.ts +8340 -1
  67. package/lib/src/ap-table/utils.js +1 -1
  68. package/lib/src/business/ap-batch-action/index.css +2 -0
  69. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.d.ts +13 -0
  70. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue.js +1 -0
  71. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -0
  72. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +17 -0
  73. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.js +1 -0
  74. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -0
  75. package/lib/src/business/ap-batch-action-group/interface.d.ts +41 -0
  76. package/lib/src/business/ap-batch-action-group/interface.js +1 -0
  77. package/lib/src/business/ap-image/ApImage.vue.d.ts +65 -0
  78. package/lib/src/business/ap-image/ApImage.vue.js +1 -0
  79. package/lib/src/business/ap-image/ApImage.vue2.js +1 -0
  80. package/lib/src/business/ap-image/hooks/useOss.d.ts +11 -0
  81. package/lib/src/business/ap-image/hooks/useOss.js +1 -0
  82. package/lib/src/business/ap-image/imgs/admin-fallback.jpg.js +1 -0
  83. package/lib/src/business/ap-image/imgs/aplus-fallback.jpg.js +1 -0
  84. package/lib/src/business/index.d.ts +662 -1
  85. package/lib/src/business/index.js +1 -1
  86. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  87. package/lib/src/config-provider/config-provider-props.js +1 -1
  88. package/lib/src/config-provider/config-provider.d.ts +10 -1
  89. package/lib/src/config-provider/config-provider.js +1 -1
  90. package/lib/src/config-provider/constants.d.ts +6 -2
  91. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  92. package/lib/src/config-provider/index.d.ts +20 -1
  93. package/lib/src/editable-table/form-item.vue.js +1 -1
  94. package/lib/src/editable-table/hooks/use-get-columns.d.ts +3 -2
  95. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  96. package/lib/src/editable-table/index.vue.js +1 -1
  97. package/lib/src/editable-table/interface.d.ts +7 -13
  98. package/lib/src/editable-table/utils.d.ts +14 -2
  99. package/lib/src/editable-table/utils.js +1 -1
  100. package/lib/src/index.js +1 -1
  101. package/lib/src/locale/lang/en.js +1 -1
  102. package/lib/src/locale/lang/zh-cn.js +1 -1
  103. package/lib/src/pro-form/hooks/use-label-width.d.ts +1 -1
  104. package/lib/src/theme/antd-global-overwrite/admin/form.css +10 -5
  105. package/lib/src/theme/antd-global-overwrite/admin/index.css +117 -38
  106. package/lib/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
  107. package/lib/src/theme/antd-global-overwrite/admin/table.css +53 -17
  108. package/lib/src/theme/antd-global-overwrite/aplus/form.css +28 -14
  109. package/lib/src/theme/antd-global-overwrite/aplus/index.css +159 -67
  110. package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
  111. package/lib/src/theme/antd-global-overwrite/aplus/table.css +65 -33
  112. package/lib/src/theme/ap-batch-action/ap-batch-action.css +2 -0
  113. package/lib/src/utils/ap-trans-data/index.d.ts +9 -10
  114. package/lib/src/utils/ap-trans-data/index.js +1 -0
  115. package/package.json +2 -2
  116. /package/es/src/ap-modal/{type.mjs → interface.mjs} +0 -0
  117. /package/lib/src/ap-modal/{type.js → interface.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { ColumnType, TableProps } from 'ant-design-vue/es/table';
2
2
  import { CompareFn, SortOrder, TableRowSelection } from 'ant-design-vue/es/table/interface';
3
- import { ApFormSearchFormProps } from '../ap-form';
3
+ import { ApFormItemProps, ApFormSearchFormProps } from '../ap-form';
4
4
  import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextPasswordProps, ApFormItemTextProps } from '../ap-form/items/interface';
5
5
  import { Recordable } from '../type';
6
6
  import { ComputedRef, CSSProperties, VNode } from 'vue';
@@ -67,8 +67,21 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters' |
67
67
  export type ApTableRowSelection<RecordType = any> = Omit<TableRowSelection<RecordType>, 'selectedRowKeys' | 'onChange' | 'onSelect' | 'onSelectAll' | 'onSelectInvert' | 'onSelectNone'> & {
68
68
  mode: 'internal';
69
69
  };
70
- export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = ValueType extends ApTableValueTypes ? ExtraProColumnType<RecordType> & {
71
- children?: ApColumnType<RecordType, ValueType>[];
70
+ export type CommonFieldReturnType = ApFormItemProps & {
71
+ field: Recordable;
72
+ placeholder?: string;
73
+ disabled?: boolean;
74
+ };
75
+ export type FieldPropsType<ReturnType, RecordType, ExtraValueType, ValueType extends ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType> = ReturnType | ((opt: Partial<{
76
+ value: any;
77
+ text: any;
78
+ record: RecordType;
79
+ index: number;
80
+ renderIndex: number;
81
+ column: ApColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>;
82
+ }>) => ReturnType);
83
+ export type ApColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? ExtraProColumnType<RecordType> & {
84
+ children?: ApColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
72
85
  /**
73
86
  * 表单项所占据的格子数(1-24格)
74
87
  */
@@ -100,7 +113,7 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
100
113
  /**
101
114
  * 自定义查询表单渲染
102
115
  */
103
- customRenderFormItem?: (config: ApColumnType<RecordType, ValueType>) => any;
116
+ customRenderFormItem?: (config: ApColumnType<RecordType>) => any;
104
117
  /**
105
118
  * 自定义渲染文本,和customRender相比,其必须返回字符串,并且后续的渲染(例如copy/ellipsis)都将使用这个值
106
119
  */
@@ -115,18 +128,11 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
115
128
  /**
116
129
  * 指定值类型(将会用于默认渲染和查询表单生成)
117
130
  */
118
- valueType?: ValueType;
131
+ valueType?: MergedValueType;
119
132
  /**
120
133
  * 值类型额外配置的参数(用于查询表单渲染)
121
134
  */
122
- fieldProps?: ApTableValueFields[ValueType] | ((opt: Partial<{
123
- value: any;
124
- text: any;
125
- record: RecordType;
126
- index: number;
127
- renderIndex: number;
128
- column: ApColumnType<RecordType, ValueType>;
129
- }>) => ApTableValueFields[ValueType]);
135
+ fieldProps?: FieldPropsType<Extract<MergedValueType, ValueType> extends never ? CommonFieldReturnType : ApTableValueFields[Extract<MergedValueType, ValueType>], RecordType, ExtraValueType, ValueType, MergedValueType>;
130
136
  /**
131
137
  * 用于表单项排序的字段
132
138
  * @description 值越大,越排在前面,请设置正整数,设置为0或负数将会无效