@aplus-frontend/ui 0.0.2 → 0.0.3

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 (35) hide show
  1. package/es/src/ap-table/ap-table.vue.d.ts +1 -5
  2. package/es/src/ap-table/ap-table.vue.mjs +139 -125
  3. package/es/src/ap-table/interface.d.ts +16 -4
  4. package/es/src/ap-table/utils.d.ts +30 -1
  5. package/es/src/ap-table/utils.mjs +61 -41
  6. package/es/src/ap-tag/style/ap-tag-group.css +1 -0
  7. package/es/src/ap-tag/style/ap-tag.css +1 -0
  8. package/es/src/pro-form/components/form-action.vue2.mjs +37 -35
  9. package/es/src/pro-form/hooks/use-advanced.mjs +45 -45
  10. package/es/src/pro-table/style/pro-table.css +3 -0
  11. package/es/src/theme/antd-global-overwrite/admin/index.css +35 -20
  12. package/es/src/theme/antd-global-overwrite/admin/table.css +35 -20
  13. package/es/src/theme/antd-global-overwrite/aplus/index.css +35 -20
  14. package/es/src/theme/antd-global-overwrite/aplus/table.css +35 -20
  15. package/es/src/theme/ap-tag/ap-tag-group.css +1 -0
  16. package/es/src/theme/ap-tag/ap-tag.css +1 -0
  17. package/es/src/theme/pro-table/pro-table.css +3 -0
  18. package/lib/src/ap-table/ap-table.vue.d.ts +1 -5
  19. package/lib/src/ap-table/ap-table.vue.js +1 -1
  20. package/lib/src/ap-table/interface.d.ts +16 -4
  21. package/lib/src/ap-table/utils.d.ts +30 -1
  22. package/lib/src/ap-table/utils.js +1 -1
  23. package/lib/src/ap-tag/style/ap-tag-group.css +1 -0
  24. package/lib/src/ap-tag/style/ap-tag.css +1 -0
  25. package/lib/src/pro-form/components/form-action.vue2.js +1 -1
  26. package/lib/src/pro-form/hooks/use-advanced.js +1 -1
  27. package/lib/src/pro-table/style/pro-table.css +3 -0
  28. package/lib/src/theme/antd-global-overwrite/admin/index.css +35 -20
  29. package/lib/src/theme/antd-global-overwrite/admin/table.css +35 -20
  30. package/lib/src/theme/antd-global-overwrite/aplus/index.css +35 -20
  31. package/lib/src/theme/antd-global-overwrite/aplus/table.css +35 -20
  32. package/lib/src/theme/ap-tag/ap-tag-group.css +1 -0
  33. package/lib/src/theme/ap-tag/ap-tag.css +1 -0
  34. package/lib/src/theme/pro-table/pro-table.css +3 -0
  35. package/package.json +1 -1
@@ -140,11 +140,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
140
140
  };
141
141
  align: {
142
142
  type: PropType<AlignType>;
143
- default: AlignType; /**
144
- * tips
145
- * 通常情况下,表格渲染是不需要请求网络数据的,因此这里删掉request,
146
- * 如果需要做映射,可以在外部发起一次网络请求,然后使用valueEnum设置匹配枚举。
147
- */
143
+ default: AlignType;
148
144
  };
149
145
  builtinPlacements: {
150
146
  type: PropType<BuildInPlacements>;
@@ -1,17 +1,19 @@
1
- import { defineComponent as H, computed as d, createVNode as r, mergeProps as p, unref as o, watch as G, openBlock as s, createElementBlock as f, normalizeClass as b, normalizeStyle as R, withCtx as c, Fragment as Q, renderList as T, createBlock as U, resolveDynamicComponent as J, createCommentVNode as B, createElementVNode as I, renderSlot as P, createSlots as X, toDisplayString as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
2
- import { Typography as ae, Table as te, Tooltip as oe } from "ant-design-vue";
3
- import { ApForm as ne } from "../ap-form/index.mjs";
4
- import { apTableRenderItemMap as le, noRenderAsFormItemValueList as v, apTableFormItemMap as re } from "./constants.mjs";
1
+ import { defineComponent as U, computed as u, createVNode as d, mergeProps as f, unref as n, watch as J, openBlock as i, createElementBlock as m, normalizeClass as b, normalizeStyle as T, withCtx as y, Fragment as X, renderList as B, createBlock as Y, resolveDynamicComponent as Z, createCommentVNode as I, createElementVNode as v, renderSlot as P, createSlots as ee, toDisplayString as ae, normalizeProps as te, guardReactiveProps as oe } from "vue";
2
+ import { Typography as ne, Table as le, Tooltip as re } from "ant-design-vue";
3
+ import { ApForm as de } from "../ap-form/index.mjs";
4
+ import { apTableRenderItemMap as se, noRenderAsFormItemValueList as k, apTableFormItemMap as ue } from "./constants.mjs";
5
5
  import "../config-provider/index.mjs";
6
- import { useTablePaging as de } from "./hooks/use-table-paging.mjs";
7
- import { omit as k, isUndefined as se } from "lodash-unified";
6
+ import { useTablePaging as ie } from "./hooks/use-table-paging.mjs";
7
+ import { omit as O, isUndefined as pe } from "lodash-unified";
8
8
  import "./style/ap-table.css";
9
- import { QuestionCircleOutlined as ie } from "@ant-design/icons-vue";
10
- import { useNamespace as ue } from "../config-provider/hooks/use-namespace.mjs";
11
- import { useGlobalConfig as pe } from "../config-provider/hooks/use-global-config.mjs";
12
- const fe = {
9
+ import { QuestionCircleOutlined as ce } from "@ant-design/icons-vue";
10
+ import { getFieldProps as z, getColumnOrder as E, getPlaceholder as fe } from "./utils.mjs";
11
+ import { useLocale as me } from "../config-provider/hooks/use-locale.mjs";
12
+ import { useNamespace as ye } from "../config-provider/hooks/use-namespace.mjs";
13
+ import { useGlobalConfig as ge } from "../config-provider/hooks/use-global-config.mjs";
14
+ const he = {
13
15
  key: 0
14
- }, Re = /* @__PURE__ */ H({
16
+ }, Oe = /* @__PURE__ */ U({
15
17
  name: "ApTable",
16
18
  __name: "ap-table",
17
19
  props: {
@@ -120,158 +122,170 @@ const fe = {
120
122
  default: "middle"
121
123
  }
122
124
  },
123
- setup(z, {
124
- expose: E
125
+ setup(L, {
126
+ expose: N
125
127
  }) {
126
- const n = z, {
127
- e: h,
128
- b: m
129
- } = ue("ap-table"), L = pe("uiMode"), y = d(() => {
130
- var t;
131
- let a = ((t = n.columns) == null ? void 0 : t.filter((e) => !e.hideInTable)) || [];
132
- return a = a.map((e) => ({
133
- ...e,
128
+ const l = L, {
129
+ t: D
130
+ } = me(), {
131
+ e: C,
132
+ b: g
133
+ } = ye("ap-table"), V = ge("uiMode"), h = u(() => {
134
+ var o;
135
+ let e = ((o = l.columns) == null ? void 0 : o.filter((a) => !a.hideInTable)) || [];
136
+ return e = e.map((a) => ({
137
+ ...a,
134
138
  customRender({
135
- value: l,
136
- ...u
139
+ value: t,
140
+ ...r
137
141
  }) {
138
- var F;
139
- let g;
140
- if (e.customRender)
141
- g = e.customRender({
142
- value: l,
143
- ...u,
144
- column: e
142
+ let s;
143
+ if (a.customRender)
144
+ s = a.customRender({
145
+ value: t,
146
+ ...r,
147
+ column: a
145
148
  });
146
149
  else {
147
- const A = le[e.valueType || "text"], M = ((F = e.fieldProps) == null ? void 0 : F.field) || e.fieldProps || {}, _ = e.valueType === "switch", K = e.valueType === "index", $ = _ ? {
148
- checked: l
150
+ const R = se[a.valueType || "text"], c = z(a.fieldProps, {
151
+ value: t,
152
+ ...r
153
+ }), $ = (c == null ? void 0 : c.field) || c || {}, H = a.valueType === "switch", G = a.valueType === "index", Q = H ? {
154
+ checked: t
149
155
  } : {
150
- value: K ? u.index + 1 : l
156
+ value: G ? r.index + 1 : t
151
157
  };
152
- g = r(A, p(k(M, ["request"]), $, {
158
+ s = d(R, f(O($, ["request"]), Q, {
153
159
  mode: "read"
154
160
  }), null);
155
161
  }
156
- return W(e, l, g);
162
+ return _(a, t, s);
157
163
  }
158
- })), a;
159
- }), C = d(() => {
160
- var a, t;
161
- return ((t = (a = n.columns) == null ? void 0 : a.filter((e) => !e.hideInSearch && e.dataIndex && (e.valueType || e.customRenderFormItem) && !v.includes(e.valueType))) == null ? void 0 : t.map((e) => ({
162
- ...e,
163
- fieldProps: {
164
- ...e.fieldProps || {},
165
- label: e.title,
166
- name: e.dataIndex
167
- }
168
- }))) || [];
169
- }), N = d(() => o(y).filter((a) => a.sorter === !0).map((a) => a.dataIndex)), D = d(() => o(y).filter((a) => a.filters && !a.onFilter).map((a) => a.dataIndex)), {
170
- formRef: S,
171
- submit: w,
172
- reset: x,
173
- tableProps: i,
174
- handleTableChange: O,
175
- data: V
176
- } = de({
177
- async request(a) {
178
- var e, l;
179
- const t = await ((e = n.request) == null ? void 0 : e.call(n, a));
180
- return (l = n.onLoad) == null || l.call(n, (t == null ? void 0 : t.data) || []), {
181
- data: (t == null ? void 0 : t.data) || [],
182
- total: (t == null ? void 0 : t.total) || 0
164
+ })), e;
165
+ }), S = u(() => {
166
+ var e, o, a;
167
+ return ((a = (o = (e = l.columns) == null ? void 0 : e.filter((t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !k.includes(t.valueType))) == null ? void 0 : o.sort((t, r) => {
168
+ let s = E(t.order);
169
+ return E(r.order) - s;
170
+ })) == null ? void 0 : a.map((t) => {
171
+ const r = z(t.fieldProps);
172
+ return {
173
+ ...t,
174
+ fieldProps: {
175
+ ...r || {},
176
+ label: t.title,
177
+ name: t.dataIndex,
178
+ // 格式化placeholder
179
+ placeholder: fe(D, t.valueType, r == null ? void 0 : r.placeholder)
180
+ }
181
+ };
182
+ })) || [];
183
+ }), j = u(() => n(h).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), W = u(() => n(h).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
184
+ formRef: w,
185
+ submit: x,
186
+ reset: F,
187
+ tableProps: p,
188
+ handleTableChange: q,
189
+ data: A
190
+ } = ie({
191
+ async request(e) {
192
+ var a, t;
193
+ const o = await ((a = l.request) == null ? void 0 : a.call(l, e));
194
+ return (t = l.onLoad) == null || t.call(l, (o == null ? void 0 : o.data) || []), {
195
+ data: (o == null ? void 0 : o.data) || [],
196
+ total: (o == null ? void 0 : o.total) || 0
183
197
  };
184
198
  },
185
- filterFields: o(D),
186
- sortFields: o(N),
187
- defaultParams: n.params,
188
- defaultData: n.defaultData,
189
- manual: n.manual,
190
- defaultCurrent: n.pagination ? n.pagination.defaultCurrent : void 0,
191
- defaultPageSize: n.pagination ? n.pagination.defaultPageSize : void 0,
192
- formatParams: n.beforeSearchSubmit
193
- }), j = d(() => ({
194
- ...n,
195
- ...o(i),
196
- loading: se(n.loading) ? o(i).loading : n.loading,
197
- pagination: n.pagination === !1 ? !1 : o(i).pagination
199
+ filterFields: n(W),
200
+ sortFields: n(j),
201
+ defaultParams: l.params,
202
+ defaultData: l.defaultData,
203
+ manual: l.manual,
204
+ defaultCurrent: l.pagination ? l.pagination.defaultCurrent : void 0,
205
+ defaultPageSize: l.pagination ? l.pagination.defaultPageSize : void 0,
206
+ formatParams: l.beforeSearchSubmit
207
+ }), M = u(() => ({
208
+ ...l,
209
+ ...n(p),
210
+ loading: pe(l.loading) ? n(p).loading : l.loading,
211
+ pagination: l.pagination === !1 ? !1 : n(p).pagination
198
212
  }));
199
- function W(a, t, e) {
200
- return v.includes(a.valueType) ? e : a.copyable || a.ellipsis ? r(ae.Text, {
201
- copyable: a.copyable ? {
202
- text: t,
213
+ function _(e, o, a) {
214
+ return k.includes(e.valueType) ? a : e.copyable || e.ellipsis ? d(ne.Text, {
215
+ copyable: e.copyable ? {
216
+ text: o,
203
217
  tooltip: !1
204
218
  } : !1,
205
- ellipsis: a.ellipsis ? {
206
- tooltip: t
219
+ ellipsis: e.ellipsis ? {
220
+ tooltip: o
207
221
  } : !1,
208
- content: e
209
- }, null) : e;
222
+ content: a
223
+ }, null) : a;
210
224
  }
211
- G(() => o(V).loading, (a) => {
212
- var t;
213
- (t = n.onLoadingChange) == null || t.call(n, a);
225
+ J(() => n(A).loading, (e) => {
226
+ var o;
227
+ (o = l.onLoadingChange) == null || o.call(l, e);
214
228
  });
215
- function q(a) {
216
- var t, e, l;
217
- (l = (e = (t = S.value) == null ? void 0 : t.apForm) == null ? void 0 : e.setFieldsValue) == null || l.call(e, a);
229
+ function K(e) {
230
+ var o, a, t;
231
+ (t = (a = (o = w.value) == null ? void 0 : o.apForm) == null ? void 0 : a.setFieldsValue) == null || t.call(a, e);
218
232
  }
219
- return E({
220
- submit: () => w(),
221
- reset: () => x(),
222
- setSearchFormValues: q
223
- }), (a, t) => (s(), f("div", {
224
- class: b(a.card ? null : o(m)("wrapper"))
225
- }, [a.searchForm !== !1 && C.value.length > 0 ? (s(), f("div", {
233
+ return N({
234
+ submit: () => x(),
235
+ reset: () => F(),
236
+ setSearchFormValues: K
237
+ }), (e, o) => (i(), m("div", {
238
+ class: b(e.card ? null : n(g)("wrapper"))
239
+ }, [e.searchForm !== !1 && S.value.length > 0 ? (i(), m("div", {
226
240
  key: 0,
227
- class: b(a.card ? o(h)("search-wrapper") : null),
228
- style: R(a.searchFormWrapperStyle)
229
- }, [r(o(ne).SearchForm, p(a.searchForm || {}, {
241
+ class: b(e.card ? n(C)("search-wrapper") : null),
242
+ style: T(e.searchFormWrapperStyle)
243
+ }, [d(n(de).SearchForm, f(e.searchForm || {}, {
230
244
  ref_key: "formRef",
231
- ref: S,
245
+ ref: w,
232
246
  "custom-reset": "",
233
- onSubmit: o(w),
234
- onReset: o(x),
235
- "submit-loading": o(i).loading
247
+ onSubmit: n(x),
248
+ onReset: n(F),
249
+ "submit-loading": n(p).loading
236
250
  }), {
237
- default: c(() => [(s(!0), f(Q, null, T(C.value, (e) => (s(), U(J(e.customRenderFormItem ? e.customRenderFormItem(e) : o(re)[e.valueType || "text"]), p({
238
- key: e.dataIndex,
251
+ default: y(() => [(i(!0), m(X, null, B(S.value, (a) => (i(), Y(Z(a.customRenderFormItem ? a.customRenderFormItem(a) : n(ue)[a.valueType || "text"]), f({
252
+ key: a.dataIndex,
239
253
  ref_for: !0
240
- }, e.fieldProps || {}, {
241
- span: e.span
254
+ }, a.fieldProps || {}, {
255
+ span: a.span
242
256
  }), null, 16, ["span"]))), 128))]),
243
257
  _: 1
244
- }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : B("", !0), I("div", {
245
- class: b(a.card ? o(h)("table-wrapper") : null),
246
- style: R(a.tableWrapperStyle)
247
- }, [P(a.$slots, "title"), r(o(te), p({
248
- class: o(L) === "admin" ? o(m)("table-admin") : o(m)("table")
249
- }, j.value, {
250
- onChange: o(O),
251
- columns: y.value
252
- }), X({
253
- headerCell: c(({
254
- column: e,
255
- title: l
256
- }) => [e.tooltip ? (s(), f("span", fe, [I("span", null, Y(l), 1), r(o(oe), {
257
- title: e.tooltip,
258
+ }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : I("", !0), v("div", {
259
+ class: b(e.card ? n(C)("table-wrapper") : null),
260
+ style: T(e.tableWrapperStyle)
261
+ }, [P(e.$slots, "title"), d(n(le), f({
262
+ class: n(V) === "admin" ? n(g)("table-admin") : n(g)("table")
263
+ }, M.value, {
264
+ onChange: n(q),
265
+ columns: h.value
266
+ }), ee({
267
+ headerCell: y(({
268
+ column: a,
269
+ title: t
270
+ }) => [a.tooltip ? (i(), m("span", he, [v("span", null, ae(t), 1), d(n(re), {
271
+ title: a.tooltip,
258
272
  placement: "bottom"
259
273
  }, {
260
- default: c(() => [r(o(ie), {
274
+ default: y(() => [d(n(ce), {
261
275
  style: {
262
276
  color: "#0070ff",
263
277
  "padding-left": "4px"
264
278
  }
265
279
  })]),
266
280
  _: 2
267
- }, 1032, ["title"])])) : B("", !0)]),
281
+ }, 1032, ["title"])])) : I("", !0)]),
268
282
  _: 2
269
- }, [T(o(k)(a.$slots, "title"), (e, l) => ({
270
- name: l,
271
- fn: c((u) => [P(a.$slots, l, Z(ee(u || {})))])
283
+ }, [B(n(O)(e.$slots, "title"), (a, t) => ({
284
+ name: t,
285
+ fn: y((r) => [P(e.$slots, t, te(oe(r || {})))])
272
286
  }))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
273
287
  }
274
288
  });
275
289
  export {
276
- Re as default
290
+ Oe as default
277
291
  };
@@ -52,8 +52,8 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children'> & {
52
52
  multiple?: number;
53
53
  };
54
54
  };
55
- export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text'> = ExtraProColumnType<any> & {
56
- children?: ApColumnType[];
55
+ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<any> & {
56
+ children?: ApColumnType<any, RecordType>[];
57
57
  /**
58
58
  * 表单项所占据的格子数(1-24格)
59
59
  */
@@ -89,7 +89,19 @@ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text'> =
89
89
  /**
90
90
  * 值类型额外配置的参数(用于查询表单渲染)
91
91
  */
92
- fieldProps?: ApTableValueFields[ValueType];
92
+ fieldProps?: ApTableValueFields[ValueType] | ((opt?: {
93
+ value: any;
94
+ text: any;
95
+ record: RecordType;
96
+ index: number;
97
+ renderIndex: number;
98
+ column: ApColumnType<ValueType, RecordType>;
99
+ }) => ApTableValueFields[ValueType]);
100
+ /**
101
+ * 用于表单项排序的字段
102
+ * @description 值越大,越排在前面,请设置正整数,设置为0或负数将会无效
103
+ */
104
+ order?: number;
93
105
  };
94
106
  export type RequestData<T> = {
95
107
  data: T[] | undefined;
@@ -99,7 +111,7 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
99
111
  /**
100
112
  * 列配置
101
113
  */
102
- columns?: ApColumnType<any>[];
114
+ columns?: ApColumnType<any, RecordType>[];
103
115
  /**
104
116
  * 是否启用卡片样式
105
117
  */
@@ -1,4 +1,5 @@
1
- import { ValueEnum, ValueEnumType } from './interface';
1
+ import { ApColumnType, ApTableValueFields, ValueEnum, ValueEnumType } from './interface';
2
+ import { Translator } from '../config-provider';
2
3
 
3
4
  export type FieldValueType = 'multiple' | 'multipleNumber' | 'dayjs' | 'dayjsRange' | 'dayjsDayRange' | 'number' | 'boolean' | 'object';
4
5
  export declare const formatParamsValueType: (type: FieldValueType | Record<string, FieldValueType>, value: any, cb: (t: FieldValueType, value: any) => any) => any;
@@ -29,4 +30,32 @@ export declare const objectToMap: (value: ValueEnum | undefined) => ValueEnumMap
29
30
  * @returns
30
31
  */
31
32
  export declare const valueEnumToArray: (valueEnumParams: ValueEnum) => OptionType;
33
+ /**
34
+ * 获取列在查询表单中的排序
35
+ * @param order
36
+ * @returns
37
+ */
38
+ export declare const getColumnOrder: (order?: number) => number;
39
+ /**
40
+ * 获取查询表单的placeholder
41
+ * @param t
42
+ * @param valueType
43
+ * @param placeholder
44
+ * @returns
45
+ */
46
+ export declare const getPlaceholder: (t: Translator, valueType?: keyof ApTableValueFields, placeholder?: string) => string | string[] | undefined;
47
+ /**
48
+ * 获取对象形式的FieldProps
49
+ * @param fieldProps
50
+ * @param record
51
+ * @returns
52
+ */
53
+ export declare function getFieldProps<RecordType = any>(fieldProps: ApColumnType<any, any>['fieldProps'], opt?: {
54
+ value: any;
55
+ text: any;
56
+ record: any;
57
+ index: number;
58
+ renderIndex: number;
59
+ column: ApColumnType<any, RecordType>;
60
+ }): any;
32
61
  export {};
@@ -1,63 +1,83 @@
1
- import { isObject as c, isArray as a } from "lodash-unified";
2
- const u = (t, r, n) => {
3
- let o = {};
4
- return c(t) ? Object.keys(t).forEach((s) => {
5
- c(t[s]) ? o[s] = u(t[s], r[s], n) : o[s] = n(t[s], r);
6
- }) : o = n(t, r), o;
7
- }, d = (t, r) => {
1
+ import { isObject as c, isArray as u, isUndefined as i, isFunction as a } from "lodash-unified";
2
+ const f = (t, e, n) => {
3
+ let s = {};
4
+ return c(t) ? Object.keys(t).forEach((o) => {
5
+ c(t[o]) ? s[o] = f(t[o], e[o], n) : s[o] = n(t[o], e);
6
+ }) : s = n(t, e), s;
7
+ }, p = (t, e) => {
8
8
  switch (t) {
9
9
  case "dayjs":
10
- return r.valueOf();
10
+ return e.valueOf();
11
11
  case "dayjsRange":
12
- return r.map((n) => n.valueOf());
12
+ return e.map((n) => n.valueOf());
13
13
  case "dayjsDayRange": {
14
- const [n, o] = r;
15
- return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
14
+ const [n, s] = e;
15
+ return [n.startOf("day").valueOf(), s.endOf("day").valueOf()];
16
16
  }
17
17
  case "multiple":
18
18
  case "multipleNumber":
19
- return a(r) ? r : [r];
19
+ return u(e) ? e : [e];
20
20
  case "boolean":
21
- return r;
21
+ return e;
22
22
  case "object":
23
- return r;
23
+ return e;
24
24
  default:
25
- return r;
25
+ return e;
26
26
  }
27
27
  };
28
- function p(t) {
29
- return a(t) ? t.join(".") : t;
28
+ function b(t) {
29
+ return u(t) ? t.join(".") : t;
30
30
  }
31
- function f(t) {
32
- const r = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
33
- return r === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : r;
31
+ function d(t) {
32
+ const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
33
+ return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
34
34
  }
35
- const i = (t) => f(t) === "map" ? t : new Map(Object.entries(t || {})), b = (t) => {
36
- const r = [], n = i(t);
37
- return n.forEach((o, s) => {
38
- const e = n.get(s) || n.get(`${s}`);
39
- if (e) {
40
- if (typeof e == "object" && (e != null && e.text)) {
41
- r.push({
42
- text: e == null ? void 0 : e.text,
43
- value: s,
44
- label: e == null ? void 0 : e.text,
45
- disabled: e.disabled
35
+ const l = (t) => d(t) === "map" ? t : new Map(Object.entries(t || {})), g = (t) => {
36
+ const e = [], n = l(t);
37
+ return n.forEach((s, o) => {
38
+ const r = n.get(o) || n.get(`${o}`);
39
+ if (r) {
40
+ if (typeof r == "object" && (r != null && r.text)) {
41
+ e.push({
42
+ text: r == null ? void 0 : r.text,
43
+ value: o,
44
+ label: r == null ? void 0 : r.text,
45
+ disabled: r.disabled
46
46
  });
47
47
  return;
48
48
  }
49
- r.push({
50
- text: e,
51
- label: e,
52
- value: s
49
+ e.push({
50
+ text: r,
51
+ label: r,
52
+ value: o
53
53
  });
54
54
  }
55
- }), r;
55
+ }), e;
56
+ }, j = (t) => i(t) || t < 0 ? 0 : t, x = (t, e, n) => {
57
+ if (n)
58
+ return n;
59
+ const s = ["select", "date"], o = [
60
+ "text",
61
+ "textArea",
62
+ "number"
63
+ ];
64
+ if (e === "dateRange")
65
+ return [t("ap.common.chooseText"), t("ap.common.chooseText")];
66
+ if (s.includes(e))
67
+ return t("ap.common.chooseText");
68
+ if (o.includes(e))
69
+ return t("ap.common.inputText");
56
70
  };
71
+ function O(t, e) {
72
+ return !t || !a(t) ? t : t(e);
73
+ }
57
74
  export {
58
- p as dataIndexToStr,
59
- u as formatParamsValueType,
60
- i as objectToMap,
61
- d as parseFieldValue,
62
- b as valueEnumToArray
75
+ b as dataIndexToStr,
76
+ f as formatParamsValueType,
77
+ j as getColumnOrder,
78
+ O as getFieldProps,
79
+ x as getPlaceholder,
80
+ l as objectToMap,
81
+ p as parseFieldValue,
82
+ g as valueEnumToArray
63
83
  };
@@ -2,5 +2,6 @@
2
2
  text-wrap: nowrap;
3
3
  display: flex;
4
4
  flex-wrap: nowrap;
5
+ white-space: nowrap;
5
6
  align-items: center;
6
7
  }
@@ -1,5 +1,6 @@
1
1
  .aplus-tag-wrapper {
2
2
  text-wrap: nowrap;
3
+ white-space: nowrap;
3
4
  display: inline-block;
4
5
  }
5
6
  .aplus-tag-inner-wrapper {