@aplus-frontend/ui 0.0.15 → 0.0.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 (71) hide show
  1. package/es/index.mjs +42 -38
  2. package/es/src/ap-form/modal-form/index.vue.mjs +1 -1
  3. package/es/src/ap-table/ap-table.vue.d.ts +2 -2
  4. package/es/src/ap-table/ap-table.vue.mjs +1 -1
  5. package/es/src/ap-table/interface.d.ts +12 -11
  6. package/es/src/ap-table/style/ap-table.css +6 -0
  7. package/es/src/ap-table/utils.d.ts +2188 -5
  8. package/es/src/business/title/style.css +29 -9
  9. package/es/src/check-card/checked.svg.mjs +4 -0
  10. package/es/src/check-card/context.d.ts +6 -0
  11. package/es/src/check-card/context.mjs +16 -0
  12. package/es/src/check-card/group.vue.d.ts +57 -0
  13. package/es/src/check-card/group.vue.mjs +57 -0
  14. package/es/src/check-card/group.vue2.mjs +4 -0
  15. package/es/src/check-card/index.d.ts +9 -0
  16. package/es/src/check-card/index.mjs +11 -0
  17. package/es/src/check-card/index.vue.d.ts +54 -0
  18. package/es/src/check-card/index.vue.mjs +4 -0
  19. package/es/src/check-card/index.vue2.mjs +133 -0
  20. package/es/src/check-card/interface.d.ts +100 -0
  21. package/es/src/check-card/interface.mjs +1 -0
  22. package/es/src/check-card/style/index.css +108 -0
  23. package/es/src/editable-table/hooks/use-get-columns.d.ts +26 -3
  24. package/es/src/editable-table/hooks/use-get-columns.mjs +54 -52
  25. package/es/src/editable-table/interface.d.ts +24 -7
  26. package/es/src/hooks/useControllableValue.mjs +15 -13
  27. package/es/src/index.d.ts +1 -0
  28. package/es/src/index.mjs +194 -190
  29. package/es/src/theme/antd-global-overwrite/admin/index.css +6 -6
  30. package/es/src/theme/antd-global-overwrite/admin/modal.css +6 -6
  31. package/es/src/theme/antd-global-overwrite/aplus/index.css +6 -6
  32. package/es/src/theme/antd-global-overwrite/aplus/modal.css +6 -6
  33. package/es/src/theme/ap-table/ap-table.css +6 -0
  34. package/es/src/theme/ap-title/ap-title.css +29 -9
  35. package/es/src/theme/check-card/index.css +108 -0
  36. package/lib/index.js +1 -1
  37. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  38. package/lib/src/ap-table/ap-table.vue.d.ts +2 -2
  39. package/lib/src/ap-table/ap-table.vue.js +1 -1
  40. package/lib/src/ap-table/interface.d.ts +12 -11
  41. package/lib/src/ap-table/style/ap-table.css +6 -0
  42. package/lib/src/ap-table/utils.d.ts +2188 -5
  43. package/lib/src/business/title/style.css +29 -9
  44. package/lib/src/check-card/checked.svg.js +1 -0
  45. package/lib/src/check-card/context.d.ts +6 -0
  46. package/lib/src/check-card/context.js +1 -0
  47. package/lib/src/check-card/group.vue.d.ts +57 -0
  48. package/lib/src/check-card/group.vue.js +1 -0
  49. package/lib/src/check-card/group.vue2.js +1 -0
  50. package/lib/src/check-card/index.d.ts +9 -0
  51. package/lib/src/check-card/index.js +1 -0
  52. package/lib/src/check-card/index.vue.d.ts +54 -0
  53. package/lib/src/check-card/index.vue.js +1 -0
  54. package/lib/src/check-card/index.vue2.js +1 -0
  55. package/lib/src/check-card/interface.d.ts +100 -0
  56. package/lib/src/check-card/interface.js +1 -0
  57. package/lib/src/check-card/style/index.css +108 -0
  58. package/lib/src/editable-table/hooks/use-get-columns.d.ts +26 -3
  59. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  60. package/lib/src/editable-table/interface.d.ts +24 -7
  61. package/lib/src/hooks/useControllableValue.js +1 -1
  62. package/lib/src/index.d.ts +1 -0
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/theme/antd-global-overwrite/admin/index.css +6 -6
  65. package/lib/src/theme/antd-global-overwrite/admin/modal.css +6 -6
  66. package/lib/src/theme/antd-global-overwrite/aplus/index.css +6 -6
  67. package/lib/src/theme/antd-global-overwrite/aplus/modal.css +6 -6
  68. package/lib/src/theme/ap-table/ap-table.css +6 -0
  69. package/lib/src/theme/ap-title/ap-title.css +29 -9
  70. package/lib/src/theme/check-card/index.css +108 -0
  71. package/package.json +2 -2
package/es/index.mjs CHANGED
@@ -5,8 +5,8 @@ import { configProviderProps as x } from "./src/config-provider/config-provider-
5
5
  import { configProviderContextKey as n, tableDefaultConfig as u } from "./src/config-provider/constants.mjs";
6
6
  import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as T } from "./src/config-provider/hooks/use-global-config.mjs";
7
7
  import { buildLocaleContext as S, buildTranslator as I, localeContextKey as b, translate as g, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as R, namespaceContextKey as v, useGetDerivedNamespace as M, useNamespace as h } from "./src/config-provider/hooks/use-namespace.mjs";
9
- import { ConfigProvider as B } from "./src/config-provider/config-provider.mjs";
8
+ import { defaultNamespace as R, namespaceContextKey as h, useGetDerivedNamespace as v, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
9
+ import { ConfigProvider as w } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as G } from "./src/config-provider/index.mjs";
11
11
  import { Scrollbar as y } from "./src/scroll-bar/index.mjs";
12
12
  import { CollapseContainer as L, ScrollContainer as X } from "./src/container/index.mjs";
@@ -23,9 +23,9 @@ import { useForm as Te } from "./src/pro-form/hooks/use-form.mjs";
23
23
  import { isComponentFormSchema as Se, isSlotFormSchema as Ie } from "./src/pro-form/types/form.mjs";
24
24
  import { Field as ge } from "./src/pro-form/index.mjs";
25
25
  import { default as De } from "./src/pro-form/components/api-cascader.vue.mjs";
26
- import { default as ve } from "./src/pro-form/components/api-radio-group.vue.mjs";
27
- import { default as he } from "./src/pro-form/components/api-select.vue.mjs";
28
- import { default as Be } from "./src/pro-form/components/api-transfer.vue.mjs";
26
+ import { default as he } from "./src/pro-form/components/api-radio-group.vue.mjs";
27
+ import { default as Me } from "./src/pro-form/components/api-select.vue.mjs";
28
+ import { default as we } from "./src/pro-form/components/api-transfer.vue.mjs";
29
29
  import { default as Ge } from "./src/pro-form/components/api-tree.vue.mjs";
30
30
  import { default as ye } from "./src/pro-form/components/radio-button-group.vue.mjs";
31
31
  import { default as Le } from "./src/pro-form/pro-form.vue.mjs";
@@ -48,9 +48,9 @@ import { default as Co } from "./src/pro-table/components/table-action.vue.mjs";
48
48
  import { default as Io } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
49
49
  import { default as go } from "./src/pro-table/components/table-image.vue.mjs";
50
50
  import { useTable as Do } from "./src/pro-table/hooks/use-table.mjs";
51
- import { ApFormItemText as vo } from "./src/ap-form/items/text/index.mjs";
52
- import { default as ho } from "./src/ap-form/items/text-area/index.vue.mjs";
53
- import { default as Bo } from "./src/ap-form/items/number/index.vue.mjs";
51
+ import { ApFormItemText as ho } from "./src/ap-form/items/text/index.mjs";
52
+ import { default as Mo } from "./src/ap-form/items/text-area/index.vue.mjs";
53
+ import { default as wo } from "./src/ap-form/items/number/index.vue.mjs";
54
54
  import { default as Go } from "./src/ap-form/items/date/index.vue.mjs";
55
55
  import { default as yo } from "./src/ap-form/items/date-range/index.vue.mjs";
56
56
  import { default as Lo } from "./src/ap-form/items/radio/index.vue.mjs";
@@ -75,9 +75,9 @@ import { default as Cr } from "./src/ap-field/text-area/index.vue.mjs";
75
75
  import { default as Ir } from "./src/ap-field/date-range/index.vue.mjs";
76
76
  import { default as gr } from "./src/ap-field/select/index.vue.mjs";
77
77
  import { default as Dr } from "./src/ap-field/text/password.vue.mjs";
78
- import { default as vr } from "./src/ap-field/slider/index.vue.mjs";
79
- import { default as hr } from "./src/ap-field/segmented/index.vue.mjs";
80
- import { default as Br } from "./src/ap-field/rate/index.vue.mjs";
78
+ import { default as hr } from "./src/ap-field/slider/index.vue.mjs";
79
+ import { default as Mr } from "./src/ap-field/segmented/index.vue.mjs";
80
+ import { default as wr } from "./src/ap-field/rate/index.vue.mjs";
81
81
  import { adminToken as Gr, aplusToken as Nr } from "./src/design-token/index.mjs";
82
82
  import { ApActionItem as Er } from "./src/ap-action/index.mjs";
83
83
  import { default as Xr } from "./src/ap-action/item-modal/index.vue.mjs";
@@ -97,13 +97,15 @@ import { default as dt } from "./src/ap-layout/ap-info-layout/ap-info-layout.vue
97
97
  import { NeedNameKeyDefault as it } from "./src/ap-upload/apUploadTypes.mjs";
98
98
  import { default as ut } from "./src/ap-upload/apUpload.vue.mjs";
99
99
  import { default as ct } from "./src/ap-download/ap-download.vue.mjs";
100
- import { ApTitle as Tt } from "./src/business/index.mjs";
101
- import { useTablePaging as St } from "./src/ap-table/hooks/use-table-paging.mjs";
102
- import { default as bt } from "./src/ap-table/ap-table.vue.mjs";
103
- import { default as Pt } from "./src/editable-table/index.vue.mjs";
104
- import { default as Rt } from "./src/editable-table/form-item.vue.mjs";
105
- import { useMessage as Mt } from "./src/hooks/useMessage.mjs";
106
- import { useControllableValue as wt } from "./src/hooks/useControllableValue.mjs";
100
+ import { CheckCard as Tt } from "./src/check-card/index.mjs";
101
+ import { default as St } from "./src/check-card/group.vue.mjs";
102
+ import { ApTitle as bt } from "./src/business/index.mjs";
103
+ import { useTablePaging as Pt } from "./src/ap-table/hooks/use-table-paging.mjs";
104
+ import { default as Rt } from "./src/ap-table/ap-table.vue.mjs";
105
+ import { default as vt } from "./src/editable-table/index.vue.mjs";
106
+ import { default as kt } from "./src/editable-table/form-item.vue.mjs";
107
+ import { useMessage as Bt } from "./src/hooks/useMessage.mjs";
108
+ import { useControllableValue as Nt } from "./src/hooks/useControllableValue.mjs";
107
109
  const p = {
108
110
  install: (r) => {
109
111
  for (const t in o) {
@@ -129,10 +131,10 @@ export {
129
131
  nr as ApFieldNumber,
130
132
  Dr as ApFieldPassword,
131
133
  Ar as ApFieldRadio,
132
- Br as ApFieldRate,
133
- hr as ApFieldSegmented,
134
+ wr as ApFieldRate,
135
+ Mr as ApFieldSegmented,
134
136
  gr as ApFieldSelect,
135
- vr as ApFieldSlider,
137
+ hr as ApFieldSlider,
136
138
  Fr as ApFieldSwitch,
137
139
  mr as ApFieldText,
138
140
  Cr as ApFieldTextArea,
@@ -142,26 +144,26 @@ export {
142
144
  Go as ApFormItemDate,
143
145
  yo as ApFormItemDateRange,
144
146
  Qo as ApFormItemGroup,
145
- Bo as ApFormItemNumber,
147
+ wo as ApFormItemNumber,
146
148
  Lo as ApFormItemRadio,
147
149
  Ko as ApFormItemSelect,
148
150
  Oo as ApFormItemSwitch,
149
- vo as ApFormItemText,
150
- ho as ApFormItemTextArea,
151
+ ho as ApFormItemText,
152
+ Mo as ApFormItemTextArea,
151
153
  Uo as ApFormItemTextPassword,
152
154
  _o as ApFormList,
153
155
  tr as ApFormModalForm,
154
156
  or as ApFormSearchForm,
155
157
  dt as ApInfoLayout,
156
- bt as ApTable,
158
+ Rt as ApTable,
157
159
  ft as ApTag,
158
160
  lt as ApTagGroup,
159
- Tt as ApTitle,
161
+ bt as ApTitle,
160
162
  ut as ApUpload,
161
163
  De as ApiCascader,
162
- ve as ApiRadioGroup,
163
- he as ApiSelect,
164
- Be as ApiTransfer,
164
+ he as ApiRadioGroup,
165
+ Me as ApiSelect,
166
+ we as ApiTransfer,
165
167
  Ge as ApiTree,
166
168
  Ke as ApiTreeSelect,
167
169
  qe as BaseButton,
@@ -169,9 +171,11 @@ export {
169
171
  V as BasicArrow,
170
172
  $ as BasicHelp,
171
173
  j as BasicTitle,
174
+ Tt as CheckCard,
175
+ St as CheckCardGroup,
172
176
  L as CollapseContainer,
173
177
  J as CollapseTransition,
174
- B as ConfigProvider,
178
+ w as ConfigProvider,
175
179
  so as CountdownButton,
176
180
  xo as CountdownInput,
177
181
  fo as CropperAvatar,
@@ -180,8 +184,8 @@ export {
180
184
  et as DictCode,
181
185
  Ao as Dropdown,
182
186
  Io as EditTableHeaderIcon,
183
- Pt as EditableTable,
184
- Rt as EditableTableFormItem,
187
+ vt as EditableTable,
188
+ kt as EditableTableFormItem,
185
189
  Z as ExpandTransition,
186
190
  _ as ExpandXTransition,
187
191
  ee as FadeTransition,
@@ -229,24 +233,24 @@ export {
229
233
  Ie as isSlotFormSchema,
230
234
  c as keysOf,
231
235
  b as localeContextKey,
232
- v as namespaceContextKey,
236
+ h as namespaceContextKey,
233
237
  F as provideGlobalConfig,
234
238
  u as tableDefaultConfig,
235
239
  g as translate,
236
240
  jr as useCacheColumnSetting,
237
241
  ce as useComponentRegister,
238
- wt as useControllableValue,
242
+ Nt as useControllableValue,
239
243
  ie as useDescription,
240
244
  Te as useForm,
241
- M as useGetDerivedNamespace,
245
+ v as useGetDerivedNamespace,
242
246
  T as useGlobalConfig,
243
247
  P as useLocale,
244
- Mt as useMessage,
248
+ Bt as useMessage,
245
249
  oo as useModal,
246
250
  _e as useModalContext,
247
251
  ro as useModalInner,
248
- h as useNamespace,
252
+ M as useNamespace,
249
253
  Do as useTable,
250
- St as useTablePaging,
254
+ Pt as useTablePaging,
251
255
  H as zhCn
252
256
  };
@@ -97,7 +97,7 @@ const Se = /* @__PURE__ */ q({
97
97
  defaultValue: !1
98
98
  }), {
99
99
  t: v
100
- } = oe(), h = ie("uiMode"), {
100
+ } = oe(), h = ie("uiMode", "aplus"), {
101
101
  b: M,
102
102
  e: C
103
103
  } = se("ap-form-modal-form");
@@ -34,7 +34,7 @@ type ApTableSlots = {
34
34
  */
35
35
  declare function setSearchFormValues(fields: any): void;
36
36
  declare function getSearchFormValues(): Partial<any> | undefined;
37
- declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any, "text">>, {
37
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any>>, {
38
38
  bordered: boolean;
39
39
  childrenColumnName: string;
40
40
  defaultExpandAllRows: boolean;
@@ -59,7 +59,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
59
59
  setSearchFormValues: typeof setSearchFormValues;
60
60
  getSearchFormValues: typeof getSearchFormValues;
61
61
  dataSource: ComputedRef<any[]>;
62
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any, "text">>, {
62
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any>>, {
63
63
  bordered: boolean;
64
64
  childrenColumnName: string;
65
65
  defaultExpandAllRows: boolean;
@@ -136,7 +136,7 @@ const Pe = {
136
136
  } = Te(), {
137
137
  e: y,
138
138
  b: u
139
- } = Be("ap-table"), W = ve("uiMode"), {
139
+ } = Be("ap-table"), W = ve("uiMode", "aplus"), {
140
140
  height: _,
141
141
  contentRef: j
142
142
  } = we(), h = d(() => {
@@ -54,6 +54,7 @@ export type ApTableValueFields = {
54
54
  */
55
55
  password: ApFormItemTextPasswordProps;
56
56
  };
57
+ export type ApTableValueTypes = keyof ApTableValueFields;
57
58
  export type ValueEnum = Record<string, ValueEnumType>;
58
59
  export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'> & {
59
60
  sorter?: string | boolean | CompareFn<T> | {
@@ -62,8 +63,8 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'>
62
63
  multiple?: number;
63
64
  };
64
65
  };
65
- export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<RecordType> & {
66
- children?: ApColumnType<any, RecordType>[];
66
+ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = ValueType extends ApTableValueTypes ? ExtraProColumnType<RecordType> & {
67
+ children?: ApColumnType<RecordType, ValueType>[];
67
68
  /**
68
69
  * 表单项所占据的格子数(1-24格)
69
70
  */
@@ -91,11 +92,11 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', Re
91
92
  /**
92
93
  * 自定义查询表单渲染
93
94
  */
94
- customRenderFormItem?: (config: ApColumnType) => any;
95
+ customRenderFormItem?: (config: ApColumnType<RecordType, ValueType>) => any;
95
96
  /**
96
97
  * 指定值类型(将会用于默认渲染和查询表单生成)
97
98
  */
98
- valueType?: keyof ApTableValueFields;
99
+ valueType?: ValueType;
99
100
  /**
100
101
  * 值类型额外配置的参数(用于查询表单渲染)
101
102
  */
@@ -105,7 +106,7 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', Re
105
106
  record: RecordType;
106
107
  index: number;
107
108
  renderIndex: number;
108
- column: ApColumnType<ValueType, RecordType>;
109
+ column: ApColumnType<RecordType, ValueType>;
109
110
  }) => ApTableValueFields[ValueType]);
110
111
  /**
111
112
  * 用于表单项排序的字段
@@ -116,16 +117,16 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', Re
116
117
  * 表头的菜单筛选项,设置为true后会尝试使用valueEnum生成filters
117
118
  */
118
119
  filters?: ColumnType<RecordType>['filters'] | true;
119
- };
120
+ } : never;
120
121
  export type RequestData<T> = {
121
122
  data: T[] | undefined;
122
123
  total: number;
123
124
  } & Record<string, any>;
124
- export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends keyof ApTableValueFields = 'text'> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size'> & {
125
+ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size'> & {
125
126
  /**
126
127
  * 列配置
127
128
  */
128
- columns?: ApColumnType<any, RecordType>[];
129
+ columns?: ApColumnType<RecordType, any>[];
129
130
  /**
130
131
  * 是否启用卡片样式
131
132
  */
@@ -138,13 +139,13 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
138
139
  * 自定义渲染搜索表单
139
140
  * @deprecated 未实现 暂不可用
140
141
  */
141
- searchFormRender?: (props: ApTableProps<RecordType, ParamsType, ValueType>, defaultDom: any) => any;
142
+ searchFormRender?: (props: ApTableProps<RecordType, ParamsType>, defaultDom: any) => any;
142
143
  /**
143
144
  * 请求获取dataSource
144
145
  * @param params
145
146
  * @returns
146
147
  */
147
- request?: (params: ParamsType & {
148
+ request?: (params: Partial<ParamsType> & {
148
149
  pageSize?: number;
149
150
  current?: number;
150
151
  sort?: Record<string, SortOrder>;
@@ -229,6 +230,6 @@ export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
229
230
  */
230
231
  dataSource: ComputedRef<RecordType>;
231
232
  };
232
- export type FixedApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = Omit<ApColumnType<ValueType, RecordType>, 'filters'> & {
233
+ export type FixedApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = Omit<ApColumnType<RecordType, ValueType>, 'filters'> & {
233
234
  filters?: ColumnType<RecordType>['filters'];
234
235
  };
@@ -78,3 +78,9 @@
78
78
  .aplus-ap-table .ant-table-small .ant-table-cell {
79
79
  padding: 9px 16px !important;
80
80
  }
81
+ .aplus-ap-table .ant-table-middle .ant-table-placeholder .ant-table-cell {
82
+ padding: 0 !important;
83
+ }
84
+ .aplus-ap-table .ant-table-small .ant-table-placeholder .ant-table-cell {
85
+ padding: 0 !important;
86
+ }