@faasjs/ant-design 0.0.2-beta.382 → 0.0.2-beta.385
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.
- package/README.md +8 -4
- package/dist/index.d.ts +9 -2
- package/dist/index.js +32 -30
- package/dist/index.mjs +23 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -281,17 +281,21 @@ ___
|
|
|
281
281
|
| `Title` | { `separator`: `string` ; `suffix`: `string` } |
|
|
282
282
|
| `Title.separator` | `string` |
|
|
283
283
|
| `Title.suffix` | `string` |
|
|
284
|
-
| `common` | { `all`: `string` ; `blank`: `string` ; `pageNotFound`: `string` ; `submit`: `string` } |
|
|
284
|
+
| `common` | { `add`: `string` ; `all`: `string` ; `blank`: `string` ; `delete`: `string` ; `pageNotFound`: `string` ; `required`: `string` ; `submit`: `string` } |
|
|
285
|
+
| `common.add` | `string` |
|
|
285
286
|
| `common.all` | `string` |
|
|
286
287
|
| `common.blank` | `string` |
|
|
288
|
+
| `common.delete` | `string` |
|
|
287
289
|
| `common.pageNotFound` | `string` |
|
|
290
|
+
| `common.required` | `string` |
|
|
288
291
|
| `common.submit` | `string` |
|
|
292
|
+
| `lang` | `string` |
|
|
289
293
|
|
|
290
294
|
___
|
|
291
295
|
|
|
292
296
|
### FormItemProps
|
|
293
297
|
|
|
294
|
-
Ƭ **FormItemProps**<`T`\>: { `children?`: `JSX.Element` \| ``null`` ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `label?`: `string` \| ``false`` ; `rules?`: `RuleObject`[] ; `render?`: () => `Element` } & `FormItemInputProps` & [`FaasItemProps`](#faasitemprops) & `AntdFormItemProps`<`T
|
|
298
|
+
Ƭ **FormItemProps**<`T`\>: { `children?`: `JSX.Element` \| ``null`` ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `label?`: `string` \| ``false`` ; `rules?`: `RuleObject`[] ; `render?`: () => `Element` } & `FormItemInputProps` & [`FaasItemProps`](#faasitemprops) & `Omit`<`AntdFormItemProps`<`T`\>, ``"children"``\>
|
|
295
299
|
|
|
296
300
|
#### Type parameters
|
|
297
301
|
|
|
@@ -303,7 +307,7 @@ ___
|
|
|
303
307
|
|
|
304
308
|
### FormProps
|
|
305
309
|
|
|
306
|
-
Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `items?`: ([`FormItemProps`](#formitemprops) \| `ExtendItemProps`)[] ; `submit?`: ``false`` \| { `text?`: `string` ; `to?`: { `action`: `string` ; `params?`: `Record`<`string`, `any`\> } } ; `onFinish?`: (`values`: `Values`, `submit?`: (`values`: `any`) => `Promise`<`any`\>) => `Promise`<`any`\> } & `Omit`<`AntdFormProps`<`Values`\>, ``"onFinish"``\>
|
|
310
|
+
Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `footer?`: `JSX.Element` \| `JSX.Element`[] ; `items?`: ([`FormItemProps`](#formitemprops) \| `ExtendItemProps`)[] ; `submit?`: ``false`` \| { `text?`: `string` ; `to?`: { `action`: `string` ; `params?`: `Record`<`string`, `any`\> } } ; `onFinish?`: (`values`: `Values`, `submit?`: (`values`: `any`) => `Promise`<`any`\>) => `Promise`<`any`\> } & `Omit`<`AntdFormProps`<`Values`\>, ``"onFinish"``\>
|
|
307
311
|
|
|
308
312
|
#### Type parameters
|
|
309
313
|
|
|
@@ -423,7 +427,7 @@ ___
|
|
|
423
427
|
|
|
424
428
|
### DatePicker
|
|
425
429
|
|
|
426
|
-
• `Const` **DatePicker**: `PickerComponentClass`<`
|
|
430
|
+
• `Const` **DatePicker**: `PickerComponentClass`<`Omit`<`PickerBaseProps`<`Dayjs`\>, ``"locale"`` \| ``"generateConfig"`` \| ``"hideHeader"`` \| ``"components"``\> & {} & {} & `Omit`<`PickerDateProps`<`Dayjs`\>, ``"locale"`` \| ``"generateConfig"`` \| ``"hideHeader"`` \| ``"components"``\> & {} & {} & `Omit`<`PickerTimeProps`<`Dayjs`\>, ``"locale"`` \| ``"generateConfig"`` \| ``"hideHeader"`` \| ``"components"``\> & {} & {}, `unknown`\> & {}
|
|
427
431
|
|
|
428
432
|
___
|
|
429
433
|
|
package/dist/index.d.ts
CHANGED
|
@@ -36,11 +36,15 @@ declare type CalendarProps = CalendarProps$1<Dayjs>;
|
|
|
36
36
|
declare const Calendar: (props: antd_es_calendar_generateCalendar_js.CalendarProps<Dayjs>) => JSX.Element;
|
|
37
37
|
|
|
38
38
|
declare type FaasState = {
|
|
39
|
+
lang: string;
|
|
39
40
|
common: {
|
|
40
41
|
blank: string;
|
|
41
42
|
all: string;
|
|
42
43
|
submit: string;
|
|
43
44
|
pageNotFound: string;
|
|
45
|
+
add: string;
|
|
46
|
+
delete: string;
|
|
47
|
+
required: string;
|
|
44
48
|
};
|
|
45
49
|
Blank: {
|
|
46
50
|
text: string;
|
|
@@ -108,7 +112,9 @@ declare function transferOptions(options: BaseOption[]): {
|
|
|
108
112
|
}[];
|
|
109
113
|
|
|
110
114
|
declare type DatePickerProps = PickerDateProps<Dayjs>;
|
|
111
|
-
declare const DatePicker: antd_es_date_picker_generatePicker_interface.PickerComponentClass<antd_es_date_picker_generatePicker.PickerProps<Dayjs
|
|
115
|
+
declare const DatePicker: antd_es_date_picker_generatePicker_interface.PickerComponentClass<antd_es_date_picker_generatePicker.PickerProps<Dayjs> & {
|
|
116
|
+
status?: "" | "error" | "warning";
|
|
117
|
+
}, unknown> & {
|
|
112
118
|
WeekPicker: antd_es_date_picker_generatePicker_interface.PickerComponentClass<Omit<PickerDateProps<Dayjs>, "picker">, unknown>;
|
|
113
119
|
MonthPicker: antd_es_date_picker_generatePicker_interface.PickerComponentClass<Omit<PickerDateProps<Dayjs>, "picker">, unknown>;
|
|
114
120
|
YearPicker: antd_es_date_picker_generatePicker_interface.PickerComponentClass<Omit<PickerDateProps<Dayjs>, "picker">, unknown>;
|
|
@@ -225,7 +231,7 @@ declare type FormItemProps<T = any> = {
|
|
|
225
231
|
extendTypes?: {
|
|
226
232
|
[type: string]: ExtendFormTypeProps;
|
|
227
233
|
};
|
|
228
|
-
} & FormItemInputProps & FaasItemProps & FormItemProps$1<T>;
|
|
234
|
+
} & FormItemInputProps & FaasItemProps & Omit<FormItemProps$1<T>, 'children'>;
|
|
229
235
|
/**
|
|
230
236
|
* FormItem, can be used without Form.
|
|
231
237
|
*
|
|
@@ -280,6 +286,7 @@ declare type FormProps<Values = any, ExtendItemProps = any> = {
|
|
|
280
286
|
};
|
|
281
287
|
onFinish?: (values: Values, submit?: (values: any) => Promise<any>) => Promise<any>;
|
|
282
288
|
beforeItems?: JSX.Element | JSX.Element[];
|
|
289
|
+
footer?: JSX.Element | JSX.Element[];
|
|
283
290
|
extendTypes?: {
|
|
284
291
|
[type: string]: ExtendFormTypeProps;
|
|
285
292
|
};
|
package/dist/index.js
CHANGED
|
@@ -21,27 +21,20 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
24
|
var __export = (target, all) => {
|
|
26
25
|
for (var name in all)
|
|
27
26
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
27
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
33
|
}
|
|
35
|
-
return
|
|
34
|
+
return to;
|
|
36
35
|
};
|
|
37
|
-
var __toESM = (
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
-
return (module2, temp) => {
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
38
|
|
|
46
39
|
// src/index.ts
|
|
47
40
|
var src_exports = {};
|
|
@@ -64,6 +57,7 @@ __export(src_exports, {
|
|
|
64
57
|
useFaasState: () => useFaasState,
|
|
65
58
|
useModal: () => useModal
|
|
66
59
|
});
|
|
60
|
+
module.exports = __toCommonJS(src_exports);
|
|
67
61
|
|
|
68
62
|
// react-shim.js
|
|
69
63
|
var import_react = __toESM(require("react"));
|
|
@@ -75,19 +69,28 @@ var import_lodash = require("lodash");
|
|
|
75
69
|
// src/Config.tsx
|
|
76
70
|
var import_react2 = require("react");
|
|
77
71
|
var import_react_use = require("react-use");
|
|
78
|
-
var
|
|
79
|
-
var common =
|
|
72
|
+
var isZH = /^zh/i.test(navigator.language);
|
|
73
|
+
var common = isZH ? {
|
|
74
|
+
lang: "zh",
|
|
80
75
|
blank: "\u7A7A",
|
|
81
76
|
all: "\u5168\u90E8",
|
|
82
77
|
submit: "\u63D0\u4EA4",
|
|
83
|
-
pageNotFound: "\u9875\u9762\u672A\u627E\u5230"
|
|
78
|
+
pageNotFound: "\u9875\u9762\u672A\u627E\u5230",
|
|
79
|
+
add: "\u6DFB\u52A0",
|
|
80
|
+
delete: "\u5220\u9664",
|
|
81
|
+
required: "\u5FC5\u586B"
|
|
84
82
|
} : {
|
|
83
|
+
lang: "en",
|
|
85
84
|
blank: "Empty",
|
|
86
85
|
all: "All",
|
|
87
86
|
submit: "Submit",
|
|
88
|
-
pageNotFound: "Page Not Found"
|
|
87
|
+
pageNotFound: "Page Not Found",
|
|
88
|
+
add: "Add",
|
|
89
|
+
delete: "Delete",
|
|
90
|
+
required: "is required"
|
|
89
91
|
};
|
|
90
92
|
var useFaasState = (0, import_react_use.createGlobalState)({
|
|
93
|
+
lang: "en",
|
|
91
94
|
common,
|
|
92
95
|
Blank: { text: common.blank },
|
|
93
96
|
Form: { submit: { text: common.submit } },
|
|
@@ -283,7 +286,7 @@ var TimePicker = (0, import_react6.forwardRef)((props, ref) => {
|
|
|
283
286
|
TimePicker.displayName = "TimePicker";
|
|
284
287
|
|
|
285
288
|
// src/FormItem.tsx
|
|
286
|
-
function processProps(propsCopy) {
|
|
289
|
+
function processProps(propsCopy, config) {
|
|
287
290
|
if (!propsCopy.title)
|
|
288
291
|
propsCopy.title = (0, import_lodash4.upperFirst)(propsCopy.id);
|
|
289
292
|
if (!propsCopy.label && propsCopy.label !== false)
|
|
@@ -300,13 +303,13 @@ function processProps(propsCopy) {
|
|
|
300
303
|
required: true,
|
|
301
304
|
validator: async (_, values) => {
|
|
302
305
|
if (!values || values.length < 1)
|
|
303
|
-
return Promise.reject(Error(`${propsCopy.label || propsCopy.title}
|
|
306
|
+
return Promise.reject(Error(`${propsCopy.label || propsCopy.title} ${config.common.required}`));
|
|
304
307
|
}
|
|
305
308
|
});
|
|
306
309
|
else
|
|
307
310
|
propsCopy.rules.push({
|
|
308
311
|
required: true,
|
|
309
|
-
message: `${propsCopy.label || propsCopy.title}
|
|
312
|
+
message: `${propsCopy.label || propsCopy.title} ${config.common.required}`
|
|
310
313
|
});
|
|
311
314
|
}
|
|
312
315
|
if (!propsCopy.input)
|
|
@@ -323,7 +326,7 @@ function processProps(propsCopy) {
|
|
|
323
326
|
for (const sub of propsCopy.object) {
|
|
324
327
|
if (!sub.name)
|
|
325
328
|
sub.name = propsCopy.name.concat(sub.id);
|
|
326
|
-
processProps(sub);
|
|
329
|
+
processProps(sub, config);
|
|
327
330
|
}
|
|
328
331
|
break;
|
|
329
332
|
}
|
|
@@ -332,8 +335,9 @@ function processProps(propsCopy) {
|
|
|
332
335
|
function FormItem(props) {
|
|
333
336
|
var _a;
|
|
334
337
|
const [computedProps, setComputedProps] = (0, import_react7.useState)();
|
|
338
|
+
const [config] = useFaasState();
|
|
335
339
|
(0, import_react7.useEffect)(() => {
|
|
336
|
-
setComputedProps(processProps(__spreadValues({}, props)));
|
|
340
|
+
setComputedProps(processProps(__spreadValues({}, props), config));
|
|
337
341
|
}, [props]);
|
|
338
342
|
if (!computedProps)
|
|
339
343
|
return null;
|
|
@@ -464,9 +468,8 @@ function FormItem(props) {
|
|
|
464
468
|
}, /* @__PURE__ */ import_react.default.createElement("label", null, computedProps.label, " ", field.name + 1, !computedProps.disabled && (!computedProps.rules.find((r) => r.required) || field.key > 0) && /* @__PURE__ */ import_react.default.createElement(import_antd4.Button, {
|
|
465
469
|
danger: true,
|
|
466
470
|
type: "link",
|
|
467
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_icons2.MinusCircleOutlined, null),
|
|
468
471
|
onClick: () => remove(field.name)
|
|
469
|
-
}))), /* @__PURE__ */ import_react.default.createElement(import_antd4.Row, {
|
|
472
|
+
}, config.common.delete))), /* @__PURE__ */ import_react.default.createElement(import_antd4.Row, {
|
|
470
473
|
gutter: 24
|
|
471
474
|
}, computedProps.object.map((o) => /* @__PURE__ */ import_react.default.createElement(import_antd4.Col, {
|
|
472
475
|
key: o.id,
|
|
@@ -478,7 +481,7 @@ function FormItem(props) {
|
|
|
478
481
|
block: true,
|
|
479
482
|
onClick: () => add(),
|
|
480
483
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icons2.PlusOutlined, null)
|
|
481
|
-
}, computedProps.label), /* @__PURE__ */ import_react.default.createElement(import_antd4.Form.ErrorList, {
|
|
484
|
+
}, config.common.add, " ", computedProps.label), /* @__PURE__ */ import_react.default.createElement(import_antd4.Form.ErrorList, {
|
|
482
485
|
errors
|
|
483
486
|
}))));
|
|
484
487
|
default:
|
|
@@ -526,7 +529,7 @@ function Form(props) {
|
|
|
526
529
|
htmlType: "submit",
|
|
527
530
|
type: "primary",
|
|
528
531
|
loading
|
|
529
|
-
}, ((_b = computedProps.submit) == null ? void 0 : _b.text) || config.Form.submit.text));
|
|
532
|
+
}, ((_b = computedProps.submit) == null ? void 0 : _b.text) || config.Form.submit.text), computedProps.footer);
|
|
530
533
|
}
|
|
531
534
|
Form.useForm = import_antd5.Form.useForm;
|
|
532
535
|
Form.Item = FormItem;
|
|
@@ -682,7 +685,7 @@ function Table(props) {
|
|
|
682
685
|
color: "#ff4d4f"
|
|
683
686
|
}
|
|
684
687
|
});
|
|
685
|
-
if (
|
|
688
|
+
if (item.filterDropdown !== false)
|
|
686
689
|
item.filterDropdown = ({
|
|
687
690
|
setSelectedKeys,
|
|
688
691
|
selectedKeys,
|
|
@@ -820,7 +823,6 @@ function Title(props) {
|
|
|
820
823
|
return (0, import_react14.cloneElement)(props.children, { title: props.title });
|
|
821
824
|
return null;
|
|
822
825
|
}
|
|
823
|
-
module.exports = __toCommonJS(src_exports);
|
|
824
826
|
// Annotate the CommonJS export names for ESM import in node:
|
|
825
827
|
0 && (module.exports = {
|
|
826
828
|
Blank,
|
package/dist/index.mjs
CHANGED
|
@@ -28,19 +28,28 @@ import { isNil } from "lodash";
|
|
|
28
28
|
// src/Config.tsx
|
|
29
29
|
import { useEffect } from "react";
|
|
30
30
|
import { createGlobalState } from "react-use";
|
|
31
|
-
var
|
|
32
|
-
var common =
|
|
31
|
+
var isZH = /^zh/i.test(navigator.language);
|
|
32
|
+
var common = isZH ? {
|
|
33
|
+
lang: "zh",
|
|
33
34
|
blank: "\u7A7A",
|
|
34
35
|
all: "\u5168\u90E8",
|
|
35
36
|
submit: "\u63D0\u4EA4",
|
|
36
|
-
pageNotFound: "\u9875\u9762\u672A\u627E\u5230"
|
|
37
|
+
pageNotFound: "\u9875\u9762\u672A\u627E\u5230",
|
|
38
|
+
add: "\u6DFB\u52A0",
|
|
39
|
+
delete: "\u5220\u9664",
|
|
40
|
+
required: "\u5FC5\u586B"
|
|
37
41
|
} : {
|
|
42
|
+
lang: "en",
|
|
38
43
|
blank: "Empty",
|
|
39
44
|
all: "All",
|
|
40
45
|
submit: "Submit",
|
|
41
|
-
pageNotFound: "Page Not Found"
|
|
46
|
+
pageNotFound: "Page Not Found",
|
|
47
|
+
add: "Add",
|
|
48
|
+
delete: "Delete",
|
|
49
|
+
required: "is required"
|
|
42
50
|
};
|
|
43
51
|
var useFaasState = createGlobalState({
|
|
52
|
+
lang: "en",
|
|
44
53
|
common,
|
|
45
54
|
Blank: { text: common.blank },
|
|
46
55
|
Form: { submit: { text: common.submit } },
|
|
@@ -255,7 +264,7 @@ var TimePicker = forwardRef((props, ref) => {
|
|
|
255
264
|
TimePicker.displayName = "TimePicker";
|
|
256
265
|
|
|
257
266
|
// src/FormItem.tsx
|
|
258
|
-
function processProps(propsCopy) {
|
|
267
|
+
function processProps(propsCopy, config) {
|
|
259
268
|
if (!propsCopy.title)
|
|
260
269
|
propsCopy.title = upperFirst3(propsCopy.id);
|
|
261
270
|
if (!propsCopy.label && propsCopy.label !== false)
|
|
@@ -272,13 +281,13 @@ function processProps(propsCopy) {
|
|
|
272
281
|
required: true,
|
|
273
282
|
validator: async (_, values) => {
|
|
274
283
|
if (!values || values.length < 1)
|
|
275
|
-
return Promise.reject(Error(`${propsCopy.label || propsCopy.title}
|
|
284
|
+
return Promise.reject(Error(`${propsCopy.label || propsCopy.title} ${config.common.required}`));
|
|
276
285
|
}
|
|
277
286
|
});
|
|
278
287
|
else
|
|
279
288
|
propsCopy.rules.push({
|
|
280
289
|
required: true,
|
|
281
|
-
message: `${propsCopy.label || propsCopy.title}
|
|
290
|
+
message: `${propsCopy.label || propsCopy.title} ${config.common.required}`
|
|
282
291
|
});
|
|
283
292
|
}
|
|
284
293
|
if (!propsCopy.input)
|
|
@@ -295,7 +304,7 @@ function processProps(propsCopy) {
|
|
|
295
304
|
for (const sub of propsCopy.object) {
|
|
296
305
|
if (!sub.name)
|
|
297
306
|
sub.name = propsCopy.name.concat(sub.id);
|
|
298
|
-
processProps(sub);
|
|
307
|
+
processProps(sub, config);
|
|
299
308
|
}
|
|
300
309
|
break;
|
|
301
310
|
}
|
|
@@ -304,8 +313,9 @@ function processProps(propsCopy) {
|
|
|
304
313
|
function FormItem(props) {
|
|
305
314
|
var _a;
|
|
306
315
|
const [computedProps, setComputedProps] = useState3();
|
|
316
|
+
const [config] = useFaasState();
|
|
307
317
|
useEffect3(() => {
|
|
308
|
-
setComputedProps(processProps(__spreadValues({}, props)));
|
|
318
|
+
setComputedProps(processProps(__spreadValues({}, props), config));
|
|
309
319
|
}, [props]);
|
|
310
320
|
if (!computedProps)
|
|
311
321
|
return null;
|
|
@@ -436,9 +446,8 @@ function FormItem(props) {
|
|
|
436
446
|
}, /* @__PURE__ */ React.createElement("label", null, computedProps.label, " ", field.name + 1, !computedProps.disabled && (!computedProps.rules.find((r) => r.required) || field.key > 0) && /* @__PURE__ */ React.createElement(Button, {
|
|
437
447
|
danger: true,
|
|
438
448
|
type: "link",
|
|
439
|
-
icon: /* @__PURE__ */ React.createElement(MinusCircleOutlined, null),
|
|
440
449
|
onClick: () => remove(field.name)
|
|
441
|
-
}))), /* @__PURE__ */ React.createElement(Row, {
|
|
450
|
+
}, config.common.delete))), /* @__PURE__ */ React.createElement(Row, {
|
|
442
451
|
gutter: 24
|
|
443
452
|
}, computedProps.object.map((o) => /* @__PURE__ */ React.createElement(Col, {
|
|
444
453
|
key: o.id,
|
|
@@ -450,7 +459,7 @@ function FormItem(props) {
|
|
|
450
459
|
block: true,
|
|
451
460
|
onClick: () => add(),
|
|
452
461
|
icon: /* @__PURE__ */ React.createElement(PlusOutlined, null)
|
|
453
|
-
}, computedProps.label), /* @__PURE__ */ React.createElement(AntdForm.ErrorList, {
|
|
462
|
+
}, config.common.add, " ", computedProps.label), /* @__PURE__ */ React.createElement(AntdForm.ErrorList, {
|
|
454
463
|
errors
|
|
455
464
|
}))));
|
|
456
465
|
default:
|
|
@@ -498,7 +507,7 @@ function Form(props) {
|
|
|
498
507
|
htmlType: "submit",
|
|
499
508
|
type: "primary",
|
|
500
509
|
loading
|
|
501
|
-
}, ((_b = computedProps.submit) == null ? void 0 : _b.text) || config.Form.submit.text));
|
|
510
|
+
}, ((_b = computedProps.submit) == null ? void 0 : _b.text) || config.Form.submit.text), computedProps.footer);
|
|
502
511
|
}
|
|
503
512
|
Form.useForm = AntdForm2.useForm;
|
|
504
513
|
Form.Item = FormItem;
|
|
@@ -667,7 +676,7 @@ function Table(props) {
|
|
|
667
676
|
color: "#ff4d4f"
|
|
668
677
|
}
|
|
669
678
|
});
|
|
670
|
-
if (
|
|
679
|
+
if (item.filterDropdown !== false)
|
|
671
680
|
item.filterDropdown = ({
|
|
672
681
|
setSelectedKeys,
|
|
673
682
|
selectedKeys,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.385",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.2-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.2-beta.385",
|
|
32
32
|
"react-use": "*",
|
|
33
33
|
"react-router-dom": "*",
|
|
34
34
|
"dayjs": "*"
|