antd-management-fast-framework 1.1.66 → 1.1.67
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/es/customComponents/FunctionComponent/index.d.ts +8 -0
- package/es/customComponents/FunctionComponent/index.js +106 -77
- package/es/framework/Common/index.d.ts +14 -1
- package/es/framework/Common/index.js +143 -85
- package/es/framework/DataForm/BaseUpdateFormContent/index.d.ts +4 -0
- package/es/framework/DataForm/BaseUpdateFormContent/index.js +62 -0
- package/es/framework/DataForm/BaseUpdateFormTab/index.d.ts +2 -2
- package/es/framework/DataForm/BaseUpdateFormTab/index.js +4 -21
- package/es/framework/DataMenuContainer/index.js +4 -6
- package/es/framework/DataMenuContainer/index.less +15 -14
- package/es/utils/constants.d.ts +5 -0
- package/es/utils/constants.js +3 -0
- package/es/utils/tools.d.ts +12 -0
- package/es/utils/tools.js +72 -2
- package/lib/customComponents/FunctionComponent/index.d.ts +8 -0
- package/lib/customComponents/FunctionComponent/index.js +106 -77
- package/lib/framework/Common/index.d.ts +14 -1
- package/lib/framework/Common/index.js +143 -85
- package/lib/framework/DataForm/BaseUpdateFormContent/index.d.ts +4 -0
- package/lib/framework/DataForm/BaseUpdateFormContent/index.js +62 -0
- package/lib/framework/DataForm/BaseUpdateFormTab/index.d.ts +2 -2
- package/lib/framework/DataForm/BaseUpdateFormTab/index.js +4 -21
- package/lib/framework/DataMenuContainer/index.js +4 -6
- package/lib/framework/DataMenuContainer/index.less +15 -14
- package/lib/utils/constants.d.ts +5 -0
- package/lib/utils/constants.js +3 -0
- package/lib/utils/tools.d.ts +12 -0
- package/lib/utils/tools.js +72 -2
- package/package.json +1 -1
- package/es/framework/DataForm/BaseUpdateForm/index.less +0 -3
- package/es/framework/DataForm/BaseUpdateFormTab/index.less +0 -3
- package/lib/framework/DataForm/BaseUpdateForm/index.less +0 -3
- package/lib/framework/DataForm/BaseUpdateFormTab/index.less +0 -3
|
@@ -276,6 +276,14 @@ export function buildFormInnerComponent({ label, innerComponent, helper, formIte
|
|
|
276
276
|
formItemLayout?: {} | undefined;
|
|
277
277
|
requiredForShow?: boolean | undefined;
|
|
278
278
|
}): JSX.Element;
|
|
279
|
+
export function buildFormActionItem({ component, formItemLayout }: {
|
|
280
|
+
component: any;
|
|
281
|
+
formItemLayout?: {} | undefined;
|
|
282
|
+
}): JSX.Element | null;
|
|
283
|
+
export function buildFormButton({ config, formItemLayout }: {
|
|
284
|
+
config: any;
|
|
285
|
+
formItemLayout?: {} | undefined;
|
|
286
|
+
}): JSX.Element;
|
|
279
287
|
export function buildFormOnlyShowSyntaxHighlighter({ language, label, value, helper, formItemLayout, requiredForShow, }: {
|
|
280
288
|
language: any;
|
|
281
289
|
label: any;
|
|
@@ -41,6 +41,8 @@ exports.buildFormOnlyShowText = buildFormOnlyShowText;
|
|
|
41
41
|
exports.buildSyntaxHighlighter = buildSyntaxHighlighter;
|
|
42
42
|
exports.buildJsonView = buildJsonView;
|
|
43
43
|
exports.buildFormInnerComponent = buildFormInnerComponent;
|
|
44
|
+
exports.buildFormActionItem = buildFormActionItem;
|
|
45
|
+
exports.buildFormButton = buildFormButton;
|
|
44
46
|
exports.buildFormOnlyShowSyntaxHighlighter = buildFormOnlyShowSyntaxHighlighter;
|
|
45
47
|
exports.buildFormOnlyShowTextarea = buildFormOnlyShowTextarea;
|
|
46
48
|
exports.buildFormText = buildFormText;
|
|
@@ -2136,16 +2138,43 @@ function buildFormInnerComponent(_ref36) {
|
|
|
2136
2138
|
}), innerComponent);
|
|
2137
2139
|
}
|
|
2138
2140
|
|
|
2139
|
-
function
|
|
2140
|
-
var
|
|
2141
|
-
label = _ref37.label,
|
|
2142
|
-
value = _ref37.value,
|
|
2143
|
-
_ref37$helper = _ref37.helper,
|
|
2144
|
-
helper = _ref37$helper === void 0 ? null : _ref37$helper,
|
|
2141
|
+
function buildFormActionItem(_ref37) {
|
|
2142
|
+
var component = _ref37.component,
|
|
2145
2143
|
_ref37$formItemLayout = _ref37.formItemLayout,
|
|
2146
|
-
formItemLayout = _ref37$formItemLayout === void 0 ? {} : _ref37$formItemLayout
|
|
2147
|
-
|
|
2148
|
-
|
|
2144
|
+
formItemLayout = _ref37$formItemLayout === void 0 ? {} : _ref37$formItemLayout;
|
|
2145
|
+
|
|
2146
|
+
if ((component || null) == null) {
|
|
2147
|
+
return null;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
return /*#__PURE__*/_react["default"].createElement(FormItem, _extends({}, _objectSpread(_objectSpread({}, formItemLayout || {}), {
|
|
2151
|
+
colon: false
|
|
2152
|
+
}), {
|
|
2153
|
+
label: /*#__PURE__*/_react["default"].createElement("div", null)
|
|
2154
|
+
}), component);
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
function buildFormButton(_ref38) {
|
|
2158
|
+
var config = _ref38.config,
|
|
2159
|
+
_ref38$formItemLayout = _ref38.formItemLayout,
|
|
2160
|
+
formItemLayout = _ref38$formItemLayout === void 0 ? {} : _ref38$formItemLayout;
|
|
2161
|
+
return /*#__PURE__*/_react["default"].createElement(FormItem, _extends({}, _objectSpread(_objectSpread({}, formItemLayout || {}), {
|
|
2162
|
+
colon: false
|
|
2163
|
+
}), {
|
|
2164
|
+
label: /*#__PURE__*/_react["default"].createElement("div", null)
|
|
2165
|
+
}), buildButton(config));
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
function buildFormOnlyShowSyntaxHighlighter(_ref39) {
|
|
2169
|
+
var language = _ref39.language,
|
|
2170
|
+
label = _ref39.label,
|
|
2171
|
+
value = _ref39.value,
|
|
2172
|
+
_ref39$helper = _ref39.helper,
|
|
2173
|
+
helper = _ref39$helper === void 0 ? null : _ref39$helper,
|
|
2174
|
+
_ref39$formItemLayout = _ref39.formItemLayout,
|
|
2175
|
+
formItemLayout = _ref39$formItemLayout === void 0 ? {} : _ref39$formItemLayout,
|
|
2176
|
+
_ref39$requiredForSho = _ref39.requiredForShow,
|
|
2177
|
+
requiredForShow = _ref39$requiredForSho === void 0 ? false : _ref39$requiredForSho;
|
|
2149
2178
|
return buildFormInnerComponent({
|
|
2150
2179
|
label: label,
|
|
2151
2180
|
innerComponent: buildSyntaxHighlighter({
|
|
@@ -2158,17 +2187,17 @@ function buildFormOnlyShowSyntaxHighlighter(_ref37) {
|
|
|
2158
2187
|
});
|
|
2159
2188
|
}
|
|
2160
2189
|
|
|
2161
|
-
function buildFormOnlyShowTextarea(
|
|
2162
|
-
var label =
|
|
2163
|
-
value =
|
|
2164
|
-
|
|
2165
|
-
helper =
|
|
2166
|
-
|
|
2167
|
-
textAreaProps =
|
|
2190
|
+
function buildFormOnlyShowTextarea(_ref40) {
|
|
2191
|
+
var label = _ref40.label,
|
|
2192
|
+
value = _ref40.value,
|
|
2193
|
+
_ref40$helper = _ref40.helper,
|
|
2194
|
+
helper = _ref40$helper === void 0 ? null : _ref40$helper,
|
|
2195
|
+
_ref40$textAreaProps = _ref40.textAreaProps,
|
|
2196
|
+
textAreaProps = _ref40$textAreaProps === void 0 ? {
|
|
2168
2197
|
disabled: true
|
|
2169
|
-
} :
|
|
2170
|
-
|
|
2171
|
-
formItemLayout =
|
|
2198
|
+
} : _ref40$textAreaProps,
|
|
2199
|
+
_ref40$formItemLayout = _ref40.formItemLayout,
|
|
2200
|
+
formItemLayout = _ref40$formItemLayout === void 0 ? {} : _ref40$formItemLayout;
|
|
2172
2201
|
var title = label;
|
|
2173
2202
|
|
|
2174
2203
|
var otherTextAreaProps = _objectSpread(_objectSpread({}, {
|
|
@@ -2191,13 +2220,13 @@ function buildFormOnlyShowTextarea(_ref38) {
|
|
|
2191
2220
|
}), /*#__PURE__*/_react["default"].createElement(TextArea, otherTextAreaProps));
|
|
2192
2221
|
}
|
|
2193
2222
|
|
|
2194
|
-
function buildFormText(
|
|
2195
|
-
var label =
|
|
2196
|
-
value =
|
|
2197
|
-
|
|
2198
|
-
helper =
|
|
2199
|
-
|
|
2200
|
-
formItemLayout =
|
|
2223
|
+
function buildFormText(_ref41) {
|
|
2224
|
+
var label = _ref41.label,
|
|
2225
|
+
value = _ref41.value,
|
|
2226
|
+
_ref41$helper = _ref41.helper,
|
|
2227
|
+
helper = _ref41$helper === void 0 ? null : _ref41$helper,
|
|
2228
|
+
_ref41$formItemLayout = _ref41.formItemLayout,
|
|
2229
|
+
formItemLayout = _ref41$formItemLayout === void 0 ? {} : _ref41$formItemLayout;
|
|
2201
2230
|
var title = label;
|
|
2202
2231
|
var resultCheck = (0, _tools.checkFromConfig)({
|
|
2203
2232
|
label: title,
|
|
@@ -2214,19 +2243,19 @@ function buildFormText(_ref39) {
|
|
|
2214
2243
|
}), value);
|
|
2215
2244
|
}
|
|
2216
2245
|
|
|
2217
|
-
function buildFormOnlyShowInput(
|
|
2218
|
-
var label =
|
|
2219
|
-
value =
|
|
2220
|
-
|
|
2221
|
-
helper =
|
|
2222
|
-
|
|
2223
|
-
icon =
|
|
2224
|
-
|
|
2225
|
-
inputProps =
|
|
2246
|
+
function buildFormOnlyShowInput(_ref42) {
|
|
2247
|
+
var label = _ref42.label,
|
|
2248
|
+
value = _ref42.value,
|
|
2249
|
+
_ref42$helper = _ref42.helper,
|
|
2250
|
+
helper = _ref42$helper === void 0 ? null : _ref42$helper,
|
|
2251
|
+
_ref42$icon = _ref42.icon,
|
|
2252
|
+
icon = _ref42$icon === void 0 ? /*#__PURE__*/_react["default"].createElement(_icons.FormOutlined, null) : _ref42$icon,
|
|
2253
|
+
_ref42$inputProps = _ref42.inputProps,
|
|
2254
|
+
inputProps = _ref42$inputProps === void 0 ? {
|
|
2226
2255
|
disabled: true
|
|
2227
|
-
} :
|
|
2228
|
-
|
|
2229
|
-
formItemLayout =
|
|
2256
|
+
} : _ref42$inputProps,
|
|
2257
|
+
_ref42$formItemLayout = _ref42.formItemLayout,
|
|
2258
|
+
formItemLayout = _ref42$formItemLayout === void 0 ? {} : _ref42$formItemLayout;
|
|
2230
2259
|
var title = label;
|
|
2231
2260
|
|
|
2232
2261
|
var otherInputProps = _objectSpread(_objectSpread({}, {
|
|
@@ -2250,19 +2279,19 @@ function buildFormOnlyShowInput(_ref40) {
|
|
|
2250
2279
|
}), /*#__PURE__*/_react["default"].createElement(_input["default"], otherInputProps));
|
|
2251
2280
|
}
|
|
2252
2281
|
|
|
2253
|
-
function buildFormInputNumber(
|
|
2254
|
-
var label =
|
|
2255
|
-
name =
|
|
2256
|
-
|
|
2257
|
-
required =
|
|
2258
|
-
|
|
2259
|
-
helper =
|
|
2260
|
-
|
|
2261
|
-
inputNumberProps =
|
|
2262
|
-
|
|
2263
|
-
canOperate =
|
|
2264
|
-
|
|
2265
|
-
formItemLayout =
|
|
2282
|
+
function buildFormInputNumber(_ref43) {
|
|
2283
|
+
var label = _ref43.label,
|
|
2284
|
+
name = _ref43.name,
|
|
2285
|
+
_ref43$required = _ref43.required,
|
|
2286
|
+
required = _ref43$required === void 0 ? false : _ref43$required,
|
|
2287
|
+
_ref43$helper = _ref43.helper,
|
|
2288
|
+
helper = _ref43$helper === void 0 ? null : _ref43$helper,
|
|
2289
|
+
_ref43$inputNumberPro = _ref43.inputNumberProps,
|
|
2290
|
+
inputNumberProps = _ref43$inputNumberPro === void 0 ? {} : _ref43$inputNumberPro,
|
|
2291
|
+
_ref43$canOperate = _ref43.canOperate,
|
|
2292
|
+
canOperate = _ref43$canOperate === void 0 ? true : _ref43$canOperate,
|
|
2293
|
+
_ref43$formItemLayout = _ref43.formItemLayout,
|
|
2294
|
+
formItemLayout = _ref43$formItemLayout === void 0 ? {} : _ref43$formItemLayout;
|
|
2266
2295
|
var title = label;
|
|
2267
2296
|
|
|
2268
2297
|
var otherInputNumberProps = _objectSpread(_objectSpread({}, {
|
|
@@ -2303,19 +2332,19 @@ function buildFormInputNumber(_ref41) {
|
|
|
2303
2332
|
}), /*#__PURE__*/_react["default"].createElement(_inputNumber["default"], otherInputNumberProps));
|
|
2304
2333
|
}
|
|
2305
2334
|
|
|
2306
|
-
function buildFormTextArea(
|
|
2307
|
-
var label =
|
|
2308
|
-
name =
|
|
2309
|
-
|
|
2310
|
-
required =
|
|
2311
|
-
|
|
2312
|
-
helper =
|
|
2313
|
-
|
|
2314
|
-
textAreaProps =
|
|
2315
|
-
|
|
2316
|
-
canOperate =
|
|
2317
|
-
|
|
2318
|
-
formItemLayout =
|
|
2335
|
+
function buildFormTextArea(_ref44) {
|
|
2336
|
+
var label = _ref44.label,
|
|
2337
|
+
name = _ref44.name,
|
|
2338
|
+
_ref44$required = _ref44.required,
|
|
2339
|
+
required = _ref44$required === void 0 ? false : _ref44$required,
|
|
2340
|
+
_ref44$helper = _ref44.helper,
|
|
2341
|
+
helper = _ref44$helper === void 0 ? null : _ref44$helper,
|
|
2342
|
+
_ref44$textAreaProps = _ref44.textAreaProps,
|
|
2343
|
+
textAreaProps = _ref44$textAreaProps === void 0 ? {} : _ref44$textAreaProps,
|
|
2344
|
+
_ref44$canOperate = _ref44.canOperate,
|
|
2345
|
+
canOperate = _ref44$canOperate === void 0 ? true : _ref44$canOperate,
|
|
2346
|
+
_ref44$formItemLayout = _ref44.formItemLayout,
|
|
2347
|
+
formItemLayout = _ref44$formItemLayout === void 0 ? {} : _ref44$formItemLayout;
|
|
2319
2348
|
var title = label;
|
|
2320
2349
|
|
|
2321
2350
|
var otherTextAreaProps = _objectSpread(_objectSpread({}, {
|
|
@@ -2352,19 +2381,19 @@ function buildFormTextArea(_ref42) {
|
|
|
2352
2381
|
}), /*#__PURE__*/_react["default"].createElement(TextArea, otherTextAreaProps));
|
|
2353
2382
|
}
|
|
2354
2383
|
|
|
2355
|
-
function buildFormDatePicker(
|
|
2356
|
-
var label =
|
|
2357
|
-
name =
|
|
2358
|
-
|
|
2359
|
-
required =
|
|
2360
|
-
|
|
2361
|
-
helper =
|
|
2362
|
-
|
|
2363
|
-
datePickerProps =
|
|
2364
|
-
|
|
2365
|
-
canOperate =
|
|
2366
|
-
|
|
2367
|
-
formItemLayout =
|
|
2384
|
+
function buildFormDatePicker(_ref45) {
|
|
2385
|
+
var label = _ref45.label,
|
|
2386
|
+
name = _ref45.name,
|
|
2387
|
+
_ref45$required = _ref45.required,
|
|
2388
|
+
required = _ref45$required === void 0 ? false : _ref45$required,
|
|
2389
|
+
_ref45$helper = _ref45.helper,
|
|
2390
|
+
helper = _ref45$helper === void 0 ? null : _ref45$helper,
|
|
2391
|
+
_ref45$datePickerProp = _ref45.datePickerProps,
|
|
2392
|
+
datePickerProps = _ref45$datePickerProp === void 0 ? {} : _ref45$datePickerProp,
|
|
2393
|
+
_ref45$canOperate = _ref45.canOperate,
|
|
2394
|
+
canOperate = _ref45$canOperate === void 0 ? true : _ref45$canOperate,
|
|
2395
|
+
_ref45$formItemLayout = _ref45.formItemLayout,
|
|
2396
|
+
formItemLayout = _ref45$formItemLayout === void 0 ? {} : _ref45$formItemLayout;
|
|
2368
2397
|
var title = label;
|
|
2369
2398
|
|
|
2370
2399
|
var otherDatePickerProps = _objectSpread(_objectSpread({}, {
|
|
@@ -71,6 +71,8 @@ declare class Common extends Core {
|
|
|
71
71
|
renderSyntaxHighlighter: (language: any, value: any) => JSX.Element;
|
|
72
72
|
renderJsonView: (value: any, theme?: string) => JSX.Element;
|
|
73
73
|
renderFormInnerComponent: (label: any, innerComponent: any, helper?: null, formItemLayout?: {}, requiredForShow?: boolean) => JSX.Element;
|
|
74
|
+
renderFormButton: (config: any, formItemLayout?: {}) => JSX.Element;
|
|
75
|
+
renderFormActionItem: (component: any, formItemLayout?: {}) => JSX.Element | null;
|
|
74
76
|
renderFormOnlyShowSyntaxHighlighter: (language: any, label: any, value: any, helper?: null, formItemLayout?: {}, requiredForShow?: boolean) => JSX.Element;
|
|
75
77
|
renderFormOnlyShowTextarea: (label: any, value: any, helper?: null, textAreaProps?: {
|
|
76
78
|
disabled: boolean;
|
|
@@ -133,6 +135,17 @@ declare class Common extends Core {
|
|
|
133
135
|
buildHelp: () => JSX.Element | null;
|
|
134
136
|
buildHelpWrapper: () => JSX.Element | null;
|
|
135
137
|
buildFormContent: (config: any) => JSX.Element;
|
|
136
|
-
buildFormContentItem: (mode
|
|
138
|
+
buildFormContentItem: ({ mode, justify, align, gutter, items: contentItems, index: contentIndex, }: {
|
|
139
|
+
mode: any;
|
|
140
|
+
justify: any;
|
|
141
|
+
align: any;
|
|
142
|
+
gutter?: number | undefined;
|
|
143
|
+
items: any;
|
|
144
|
+
index: any;
|
|
145
|
+
}) => JSX.Element;
|
|
146
|
+
buildFormActionList: ({ keyPrefix, configList }: {
|
|
147
|
+
keyPrefix?: string | undefined;
|
|
148
|
+
configList: any;
|
|
149
|
+
}) => any[];
|
|
137
150
|
}
|
|
138
151
|
import Core from "../Core";
|
|
@@ -684,6 +684,22 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
684
684
|
});
|
|
685
685
|
};
|
|
686
686
|
|
|
687
|
+
_this.renderFormButton = function (config) {
|
|
688
|
+
var formItemLayout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
689
|
+
return (0, _FunctionComponent.buildFormButton)({
|
|
690
|
+
config: config,
|
|
691
|
+
formItemLayout: formItemLayout
|
|
692
|
+
});
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
_this.renderFormActionItem = function (component) {
|
|
696
|
+
var formItemLayout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
697
|
+
return (0, _FunctionComponent.buildFormActionItem)({
|
|
698
|
+
component: component || null,
|
|
699
|
+
formItemLayout: formItemLayout
|
|
700
|
+
});
|
|
701
|
+
};
|
|
702
|
+
|
|
687
703
|
_this.renderFormOnlyShowSyntaxHighlighter = function (language, label, value) {
|
|
688
704
|
var helper = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
689
705
|
var formItemLayout = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
@@ -1207,12 +1223,16 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1207
1223
|
};
|
|
1208
1224
|
|
|
1209
1225
|
var configData = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, {
|
|
1210
|
-
mode: _constants.formContentConfig.wrapperType.page
|
|
1226
|
+
mode: _constants.formContentConfig.wrapperType.page,
|
|
1227
|
+
justify: 'start',
|
|
1228
|
+
align: 'top'
|
|
1211
1229
|
}), formContentWrapperTypeConfig || {}), {
|
|
1212
1230
|
list: []
|
|
1213
1231
|
}), config || {});
|
|
1214
1232
|
|
|
1215
1233
|
var mode = configData.mode,
|
|
1234
|
+
justifyGeneral = configData.justify,
|
|
1235
|
+
alignGeneral = configData.align,
|
|
1216
1236
|
list = configData.list;
|
|
1217
1237
|
var listData = [];
|
|
1218
1238
|
|
|
@@ -1248,7 +1268,9 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1248
1268
|
items: [],
|
|
1249
1269
|
otherComponent: null,
|
|
1250
1270
|
formItemLayout: null,
|
|
1251
|
-
instruction: null
|
|
1271
|
+
instruction: null,
|
|
1272
|
+
justify: 'start',
|
|
1273
|
+
align: 'top'
|
|
1252
1274
|
}), item || {}),
|
|
1253
1275
|
title = _title$extra$hidden$c.title,
|
|
1254
1276
|
extra = _title$extra$hidden$c.extra,
|
|
@@ -1259,7 +1281,9 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1259
1281
|
contentItems = _title$extra$hidden$c.items,
|
|
1260
1282
|
otherComponent = _title$extra$hidden$c.otherComponent,
|
|
1261
1283
|
formItemLayout = _title$extra$hidden$c.formItemLayout,
|
|
1262
|
-
instruction = _title$extra$hidden$c.instruction
|
|
1284
|
+
instruction = _title$extra$hidden$c.instruction,
|
|
1285
|
+
justifyRow = _title$extra$hidden$c.justify,
|
|
1286
|
+
alignRow = _title$extra$hidden$c.align;
|
|
1263
1287
|
|
|
1264
1288
|
if (hidden || false) {
|
|
1265
1289
|
return null;
|
|
@@ -1301,81 +1325,11 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1301
1325
|
});
|
|
1302
1326
|
}
|
|
1303
1327
|
|
|
1304
|
-
var extraItems =
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
var _hidden$buildType$ico = _objectSpread(_objectSpread({}, {
|
|
1308
|
-
hidden: false,
|
|
1309
|
-
buildType: null,
|
|
1310
|
-
icon: null,
|
|
1311
|
-
text: '',
|
|
1312
|
-
component: null
|
|
1313
|
-
}), extraItem),
|
|
1314
|
-
extraItemHidden = _hidden$buildType$ico.hidden,
|
|
1315
|
-
extraItemType = _hidden$buildType$ico.buildType,
|
|
1316
|
-
extraItemIcon = _hidden$buildType$ico.icon,
|
|
1317
|
-
extraItemText = _hidden$buildType$ico.text,
|
|
1318
|
-
componentSource = _hidden$buildType$ico.component;
|
|
1319
|
-
|
|
1320
|
-
if (!extraItemHidden) {
|
|
1321
|
-
var extraItemKey = "formContent_key_".concat(index, "_extra_").concat(extraItemIndex);
|
|
1322
|
-
var extraItemAdjust = extraItem;
|
|
1323
|
-
|
|
1324
|
-
switch (extraItemType) {
|
|
1325
|
-
case _constants.formContentConfig.cardExtraBuildType.refresh:
|
|
1326
|
-
extraItemAdjust = _this.renderRefreshButton();
|
|
1327
|
-
break;
|
|
1328
|
-
|
|
1329
|
-
case _constants.formContentConfig.cardExtraBuildType.save:
|
|
1330
|
-
extraItemAdjust = _this.renderSaveButton(extraItem);
|
|
1331
|
-
break;
|
|
1332
|
-
|
|
1333
|
-
case _constants.formContentConfig.cardExtraBuildType.generalButton:
|
|
1334
|
-
extraItemAdjust = _this.renderGeneralButton(extraItem);
|
|
1335
|
-
break;
|
|
1336
|
-
|
|
1337
|
-
case _constants.formContentConfig.cardExtraBuildType.button:
|
|
1338
|
-
extraItemAdjust = (0, _FunctionComponent.buildButton)(extraItem);
|
|
1339
|
-
break;
|
|
1340
|
-
|
|
1341
|
-
case _constants.formContentConfig.cardExtraBuildType.dropdown:
|
|
1342
|
-
extraItemAdjust = (0, _FunctionComponent.buildDropdown)(extraItem);
|
|
1343
|
-
break;
|
|
1344
|
-
|
|
1345
|
-
case _constants.formContentConfig.cardExtraBuildType.dropdownButton:
|
|
1346
|
-
extraItemAdjust = (0, _FunctionComponent.buildDropdownButton)(extraItem);
|
|
1347
|
-
break;
|
|
1348
|
-
|
|
1349
|
-
case _constants.formContentConfig.cardExtraBuildType.dropdownEllipsis:
|
|
1350
|
-
extraItemAdjust = (0, _FunctionComponent.buildDropdownEllipsis)(extraItem);
|
|
1351
|
-
break;
|
|
1352
|
-
|
|
1353
|
-
case _constants.formContentConfig.cardExtraBuildType.iconInfo:
|
|
1354
|
-
extraItemAdjust = /*#__PURE__*/_react["default"].createElement(_IconInfo["default"], {
|
|
1355
|
-
icon: extraItemIcon,
|
|
1356
|
-
text: extraItemText
|
|
1357
|
-
});
|
|
1358
|
-
break;
|
|
1359
|
-
|
|
1360
|
-
case _constants.formContentConfig.cardExtraBuildType.component:
|
|
1361
|
-
extraItemAdjust = componentSource || null;
|
|
1362
|
-
break;
|
|
1363
|
-
|
|
1364
|
-
default:
|
|
1365
|
-
(0, _tools.recordObject)({
|
|
1366
|
-
message: '未找到匹配的构建模式',
|
|
1367
|
-
config: extraItem
|
|
1368
|
-
});
|
|
1369
|
-
extraItemAdjust = null;
|
|
1370
|
-
break;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
extraItems.push( /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
|
|
1374
|
-
key: extraItemKey
|
|
1375
|
-
}, extraItemAdjust));
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1328
|
+
var extraItems = _this.buildFormActionList({
|
|
1329
|
+
keyPrefix: "formContent_key_".concat(index, "_extra"),
|
|
1330
|
+
configList: extraListData
|
|
1378
1331
|
});
|
|
1332
|
+
|
|
1379
1333
|
var hasExtraItems = extraItems.length > 0;
|
|
1380
1334
|
var cardTypeBodyStyle = {};
|
|
1381
1335
|
|
|
@@ -1414,11 +1368,17 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1414
1368
|
}) : _objectSpread(_objectSpread({}, cardBodyStyle || {}), cardTypeBodyStyle || {})
|
|
1415
1369
|
}, /*#__PURE__*/_react["default"].createElement(_spin["default"], {
|
|
1416
1370
|
spinning: spinning || false
|
|
1417
|
-
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this.buildFormContentItem(
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1371
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _this.buildFormContentItem({
|
|
1372
|
+
mode: mode,
|
|
1373
|
+
justify: justifyRow || justifyGeneral,
|
|
1374
|
+
align: alignRow || alignGeneral,
|
|
1375
|
+
items: (0, _tools.isArray)(contentItems) ? contentItems.map(function (o) {
|
|
1376
|
+
return _objectSpread(_objectSpread({}, o), {
|
|
1377
|
+
formItemLayout: formItemLayout || null
|
|
1378
|
+
});
|
|
1379
|
+
}) : [],
|
|
1380
|
+
index: index
|
|
1381
|
+
}), otherComponent || null, (0, _tools.isObject)(instruction !== null && instruction !== void 0 ? instruction : false) || (0, _tools.isArray)(instruction !== null && instruction !== void 0 ? instruction : false) ? (0, _tools.isArray)(instruction !== null && instruction !== void 0 ? instruction : false) ? instruction.map(function (o, indexHelpBox) {
|
|
1422
1382
|
if ((o !== null && o !== void 0 ? o : null) == null) {
|
|
1423
1383
|
return null;
|
|
1424
1384
|
}
|
|
@@ -1431,9 +1391,18 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1431
1391
|
}), _this.buildHelpWrapper()));
|
|
1432
1392
|
};
|
|
1433
1393
|
|
|
1434
|
-
_this.buildFormContentItem = function (
|
|
1394
|
+
_this.buildFormContentItem = function (_ref4) {
|
|
1395
|
+
var mode = _ref4.mode,
|
|
1396
|
+
justify = _ref4.justify,
|
|
1397
|
+
align = _ref4.align,
|
|
1398
|
+
_ref4$gutter = _ref4.gutter,
|
|
1399
|
+
gutter = _ref4$gutter === void 0 ? 24 : _ref4$gutter,
|
|
1400
|
+
contentItems = _ref4.items,
|
|
1401
|
+
contentIndex = _ref4.index;
|
|
1435
1402
|
return /*#__PURE__*/_react["default"].createElement(_row["default"], {
|
|
1436
|
-
|
|
1403
|
+
justify: justify,
|
|
1404
|
+
align: align,
|
|
1405
|
+
gutter: gutter || 24
|
|
1437
1406
|
}, (0, _tools.isArray)(contentItems) ? contentItems.map(function (contentItem, contentItemIndex) {
|
|
1438
1407
|
var contentItemKey = "formContent_key_".concat(contentIndex, "_content_").concat(contentItemIndex);
|
|
1439
1408
|
|
|
@@ -1727,12 +1696,101 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1727
1696
|
otherProps: _objectSpread(_objectSpread({}, {}), contentItem.otherProps || {})
|
|
1728
1697
|
}) : null, type === _constants.formContentConfig.contentItemType.customSelect ? contentItem.component : null, type === _constants.formContentConfig.contentItemType.radio ? _this.renderFormSelect(fieldData.label, fieldData.name, function () {
|
|
1729
1698
|
return _this.renderFormRadioCore((0, _tools.refitCommonData)((0, _tools.isArray)(contentItem.listData) ? contentItem.listData : []));
|
|
1730
|
-
}, fieldData.helper || '', (0, _tools.isFunction)(contentItem.onChangeCallback) ? contentItem.onChangeCallback : null, formItemLayout, true, _objectSpread(_objectSpread({}, {}), contentItem.otherProps || {})) : null, type === _constants.formContentConfig.contentItemType.whetherRadio ? _this.renderFormWhetherRadio(fieldData.label, fieldData.name, fieldData.helper, contentItem.onChangeCallback, formItemLayout, true, _objectSpread(_objectSpread({}, {}), contentItem.otherProps || {})) : null, type === _constants.formContentConfig.contentItemType.customRadio ? contentItem.component : null, type === _constants.formContentConfig.contentItemType.onlyShowText ? _this.renderFormOnlyShowText(fieldData.label, contentItem.value, ((0, _tools.isUndefined)(contentItem.showHelper) ? false : contentItem.showHelper || false) ? fieldData.helper || '' : '', formItemLayout) : null, type === _constants.formContentConfig.contentItemType.innerComponent ? _this.renderFormInnerComponent(fieldData.label, contentItem.component, fieldData.helper, formItemLayout, require) : null, type === _constants.formContentConfig.contentItemType.
|
|
1699
|
+
}, fieldData.helper || '', (0, _tools.isFunction)(contentItem.onChangeCallback) ? contentItem.onChangeCallback : null, formItemLayout, true, _objectSpread(_objectSpread({}, {}), contentItem.otherProps || {})) : null, type === _constants.formContentConfig.contentItemType.whetherRadio ? _this.renderFormWhetherRadio(fieldData.label, fieldData.name, fieldData.helper, contentItem.onChangeCallback, formItemLayout, true, _objectSpread(_objectSpread({}, {}), contentItem.otherProps || {})) : null, type === _constants.formContentConfig.contentItemType.customRadio ? contentItem.component : null, type === _constants.formContentConfig.contentItemType.onlyShowText ? _this.renderFormOnlyShowText(fieldData.label, contentItem.value, ((0, _tools.isUndefined)(contentItem.showHelper) ? false : contentItem.showHelper || false) ? fieldData.helper || '' : '', formItemLayout) : null, type === _constants.formContentConfig.contentItemType.innerComponent ? _this.renderFormInnerComponent(fieldData.label, contentItem.component, fieldData.helper, formItemLayout, require) : null, type === _constants.formContentConfig.contentItemType.save ? _this.renderFormActionItem(_this.renderSaveButton(contentItem.config || {}), formItemLayout) : null, type === _constants.formContentConfig.contentItemType.button ? _this.renderFormButton(contentItem.config || {}, formItemLayout) : null, type === _constants.formContentConfig.contentItemType.actionList ? /*#__PURE__*/_react["default"].createElement(_space["default"], {
|
|
1700
|
+
split: (0, _tools.isBoolean)(contentItem.split || false) ? contentItem.split || false ? /*#__PURE__*/_react["default"].createElement(_divider["default"], {
|
|
1701
|
+
type: "vertical"
|
|
1702
|
+
}) : null : contentItem.split
|
|
1703
|
+
}, _this.buildFormActionList({
|
|
1704
|
+
keyPrefix: "form_card_".concat(contentIndex, "_action_key"),
|
|
1705
|
+
configList: contentItem.config || []
|
|
1706
|
+
})) : null, type === _constants.formContentConfig.contentItemType.component ? contentItem.component || null : null, type === _constants.formContentConfig.contentItemType.jsonView ? _this.renderJsonView(contentItem.value) : null, type === _constants.formContentConfig.contentItemType.nowTime ? _this.renderFormNowTimeField({
|
|
1731
1707
|
formItemLayout: formItemLayout
|
|
1732
1708
|
}) : null);
|
|
1733
1709
|
}) : null);
|
|
1734
1710
|
};
|
|
1735
1711
|
|
|
1712
|
+
_this.buildFormActionList = function (_ref5) {
|
|
1713
|
+
var _ref5$keyPrefix = _ref5.keyPrefix,
|
|
1714
|
+
keyPrefix = _ref5$keyPrefix === void 0 ? '' : _ref5$keyPrefix,
|
|
1715
|
+
configList = _ref5.configList;
|
|
1716
|
+
var list = [];
|
|
1717
|
+
((0, _tools.isArray)(configList) ? configList : []).forEach(function (item, index) {
|
|
1718
|
+
if ((item || null) != null) {
|
|
1719
|
+
var _hidden$buildType$ico = _objectSpread(_objectSpread({}, {
|
|
1720
|
+
hidden: false,
|
|
1721
|
+
buildType: null,
|
|
1722
|
+
icon: null,
|
|
1723
|
+
text: '',
|
|
1724
|
+
component: null
|
|
1725
|
+
}), item),
|
|
1726
|
+
hidden = _hidden$buildType$ico.hidden,
|
|
1727
|
+
buildType = _hidden$buildType$ico.buildType,
|
|
1728
|
+
icon = _hidden$buildType$ico.icon,
|
|
1729
|
+
text = _hidden$buildType$ico.text,
|
|
1730
|
+
componentSource = _hidden$buildType$ico.component;
|
|
1731
|
+
|
|
1732
|
+
if (!hidden) {
|
|
1733
|
+
var itemKey = "".concat(keyPrefix || 'formAction', "_").concat(index);
|
|
1734
|
+
var itemAdjust = item;
|
|
1735
|
+
|
|
1736
|
+
switch (buildType) {
|
|
1737
|
+
case _constants.formContentConfig.cardExtraBuildType.refresh:
|
|
1738
|
+
itemAdjust = _this.renderRefreshButton();
|
|
1739
|
+
break;
|
|
1740
|
+
|
|
1741
|
+
case _constants.formContentConfig.cardExtraBuildType.save:
|
|
1742
|
+
itemAdjust = _this.renderSaveButton(item);
|
|
1743
|
+
break;
|
|
1744
|
+
|
|
1745
|
+
case _constants.formContentConfig.cardExtraBuildType.generalButton:
|
|
1746
|
+
itemAdjust = _this.renderGeneralButton(item);
|
|
1747
|
+
break;
|
|
1748
|
+
|
|
1749
|
+
case _constants.formContentConfig.cardExtraBuildType.button:
|
|
1750
|
+
itemAdjust = (0, _FunctionComponent.buildButton)(item);
|
|
1751
|
+
break;
|
|
1752
|
+
|
|
1753
|
+
case _constants.formContentConfig.cardExtraBuildType.dropdown:
|
|
1754
|
+
itemAdjust = (0, _FunctionComponent.buildDropdown)(item);
|
|
1755
|
+
break;
|
|
1756
|
+
|
|
1757
|
+
case _constants.formContentConfig.cardExtraBuildType.dropdownButton:
|
|
1758
|
+
itemAdjust = (0, _FunctionComponent.buildDropdownButton)(item);
|
|
1759
|
+
break;
|
|
1760
|
+
|
|
1761
|
+
case _constants.formContentConfig.cardExtraBuildType.dropdownEllipsis:
|
|
1762
|
+
itemAdjust = (0, _FunctionComponent.buildDropdownEllipsis)(item);
|
|
1763
|
+
break;
|
|
1764
|
+
|
|
1765
|
+
case _constants.formContentConfig.cardExtraBuildType.iconInfo:
|
|
1766
|
+
itemAdjust = /*#__PURE__*/_react["default"].createElement(_IconInfo["default"], {
|
|
1767
|
+
icon: icon,
|
|
1768
|
+
text: text
|
|
1769
|
+
});
|
|
1770
|
+
break;
|
|
1771
|
+
|
|
1772
|
+
case _constants.formContentConfig.cardExtraBuildType.component:
|
|
1773
|
+
itemAdjust = componentSource || null;
|
|
1774
|
+
break;
|
|
1775
|
+
|
|
1776
|
+
default:
|
|
1777
|
+
(0, _tools.recordObject)({
|
|
1778
|
+
message: '未找到匹配的构建模式',
|
|
1779
|
+
config: item
|
|
1780
|
+
});
|
|
1781
|
+
itemAdjust = null;
|
|
1782
|
+
break;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
list.push( /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
|
|
1786
|
+
key: itemKey
|
|
1787
|
+
}, itemAdjust));
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
});
|
|
1791
|
+
return list;
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1736
1794
|
var defaultState = (0, _tools.defaultCommonState)();
|
|
1737
1795
|
_this.state = _objectSpread(_objectSpread({}, defaultState), {
|
|
1738
1796
|
backPath: '',
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
require("antd/es/back-top/style");
|
|
11
|
+
|
|
12
|
+
var _backTop = _interopRequireDefault(require("antd/es/back-top"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _BaseUpdateForm2 = _interopRequireDefault(require("../BaseUpdateForm"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
+
|
|
22
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
+
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
25
|
+
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
+
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
|
+
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
33
|
+
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
+
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
|
|
40
|
+
var BaseUpdateFormContent = /*#__PURE__*/function (_BaseUpdateForm) {
|
|
41
|
+
_inherits(BaseUpdateFormContent, _BaseUpdateForm);
|
|
42
|
+
|
|
43
|
+
var _super = _createSuper(BaseUpdateFormContent);
|
|
44
|
+
|
|
45
|
+
function BaseUpdateFormContent() {
|
|
46
|
+
_classCallCheck(this, BaseUpdateFormContent);
|
|
47
|
+
|
|
48
|
+
return _super.apply(this, arguments);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_createClass(BaseUpdateFormContent, [{
|
|
52
|
+
key: "render",
|
|
53
|
+
value: function render() {
|
|
54
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.renderFormWrapper(), this.renderOther(), /*#__PURE__*/_react["default"].createElement(_backTop["default"], null));
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
57
|
+
|
|
58
|
+
return BaseUpdateFormContent;
|
|
59
|
+
}(_BaseUpdateForm2["default"]);
|
|
60
|
+
|
|
61
|
+
var _default = BaseUpdateFormContent;
|
|
62
|
+
exports["default"] = _default;
|