amis-core 3.1.1 → 3.2.0
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/esm/Root.js +1 -1
- package/esm/RootRenderer.d.ts +1 -1
- package/esm/RootRenderer.js +2 -2
- package/esm/SchemaRenderer.js +3 -2
- package/esm/Scoped.js +2 -1
- package/esm/StatusScoped.js +1 -1
- package/esm/WithRootStore.d.ts +4 -24
- package/esm/WithRootStore.js +12 -4
- package/esm/WithStore.js +23 -16
- package/esm/actions/Action.js +14 -14
- package/esm/actions/AjaxAction.js +1 -1
- package/esm/actions/BreakAction.js +1 -1
- package/esm/actions/BroadcastAction.js +1 -1
- package/esm/actions/CmptAction.js +2 -2
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +1 -1
- package/esm/actions/CustomAction.js +2 -1
- package/esm/actions/DialogAction.d.ts +2 -0
- package/esm/actions/DialogAction.js +40 -23
- package/esm/actions/DrawerAction.js +4 -4
- package/esm/actions/EmailAction.js +1 -1
- package/esm/actions/LinkAction.js +1 -1
- package/esm/actions/LoopAction.js +1 -1
- package/esm/actions/PageAction.js +1 -1
- package/esm/actions/ParallelAction.js +1 -1
- package/esm/actions/SwitchAction.js +1 -1
- package/esm/actions/ToastAction.js +1 -1
- package/esm/components/CustomStyle.js +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.js +2 -1
- package/esm/components/PopOver.js +2 -1
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.js +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +6 -4
- package/esm/locale.js +1 -1
- package/esm/polyfills.d.ts +3 -0
- package/esm/polyfills.js +18 -0
- package/esm/renderers/Form.d.ts +1 -1
- package/esm/renderers/Form.js +17 -7
- package/esm/renderers/Item.d.ts +88 -59
- package/esm/renderers/Item.js +86 -40
- package/esm/renderers/Options.js +1 -1
- package/esm/renderers/Placeholder.js +1 -1
- package/esm/renderers/builtin.js +1 -1
- package/esm/renderers/register.js +1 -1
- package/esm/renderers/wrapControl.d.ts +4 -24
- package/esm/renderers/wrapControl.js +51 -53
- package/esm/store/app.js +37 -3
- package/esm/store/combo.d.ts +168 -28
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +3 -2
- package/esm/store/crud.js +12 -5
- package/esm/store/form.d.ts +72 -12
- package/esm/store/form.js +4 -4
- package/esm/store/formItem.d.ts +2 -1
- package/esm/store/formItem.js +7 -2
- package/esm/store/iRenderer.js +2 -1
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +1 -0
- package/esm/store/list.js +8 -2
- package/esm/store/manager.js +1 -1
- package/esm/store/modal.js +1 -1
- package/esm/store/node.js +1 -1
- package/esm/store/pagination.js +1 -1
- package/esm/store/root.js +2 -1
- package/esm/store/service.js +14 -9
- package/esm/store/status.js +1 -1
- package/esm/store/table.d.ts +145 -24
- package/esm/store/table.js +8 -2
- package/esm/store/table2.js +1 -1
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +5 -2
- package/esm/utils/Animation.js +1 -1
- package/esm/utils/ColorScale.js +1 -1
- package/esm/utils/DataSchema.d.ts +3 -2
- package/esm/utils/DataSchema.js +27 -7
- package/esm/utils/DataScope.d.ts +10 -3
- package/esm/utils/DataScope.js +50 -12
- package/esm/utils/RootClose.js +1 -1
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/api.js +40 -32
- package/esm/utils/arraySlice.d.ts +1 -0
- package/esm/utils/arraySlice.js +76 -0
- package/esm/utils/attachmentAdpator.js +1 -1
- package/esm/utils/autobind.js +1 -1
- package/esm/utils/columnsSplit.js +1 -1
- package/esm/utils/dataMapping.js +26 -18
- package/esm/utils/date.js +1 -1
- package/esm/utils/debug.js +1 -1
- package/esm/utils/decodeEntity.js +1 -1
- package/esm/utils/dom.js +4 -1
- package/esm/utils/errors.js +1 -1
- package/esm/utils/escapeHtml.js +1 -1
- package/esm/utils/filter-schema.js +1 -1
- package/esm/utils/filter.js +1 -1
- package/esm/utils/formatDuration.js +1 -1
- package/esm/utils/formula.js +1 -1
- package/esm/utils/getVariable.js +1 -1
- package/esm/utils/grammar.js +1 -1
- package/esm/utils/handleAction.js +1 -1
- package/esm/utils/helper.d.ts +8 -1
- package/esm/utils/helper.js +57 -10
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/isPureVariable.js +1 -1
- package/esm/utils/json-schema-2-amis-schema.js +1 -1
- package/esm/utils/keyToPath.js +1 -1
- package/esm/utils/makeSorter.js +1 -1
- package/esm/utils/memoryParse.js +1 -1
- package/esm/utils/normalizeLink.js +18 -9
- package/esm/utils/normalizeOptions.js +1 -1
- package/esm/utils/object.js +1 -1
- package/esm/utils/offset.js +1 -1
- package/esm/utils/offsetParent.js +1 -1
- package/esm/utils/optionValueCompare.js +1 -1
- package/esm/utils/position.js +1 -1
- package/esm/utils/prettyBytes.js +1 -1
- package/esm/utils/renderer-event.js +1 -1
- package/esm/utils/replaceText.js +1 -1
- package/esm/utils/resize-sensor.js +1 -1
- package/esm/utils/resolveCondition.js +1 -1
- package/esm/utils/resolveVariable.js +1 -1
- package/esm/utils/resolveVariableAndFilter.js +1 -1
- package/esm/utils/resolveVariableAndFilterForAsync.js +1 -1
- package/esm/utils/scrollPosition.js +1 -1
- package/esm/utils/string2regExp.js +1 -1
- package/esm/utils/stripNumber.js +1 -1
- package/esm/utils/style-helper.js +1 -1
- package/esm/utils/style.js +1 -1
- package/esm/utils/toNumber.js +1 -1
- package/esm/utils/tokenize.js +1 -1
- package/esm/utils/tpl-builtin.js +1 -1
- package/esm/utils/tpl-lodash.js +1 -1
- package/esm/utils/tpl.js +1 -1
- package/esm/utils/uncontrollable.js +1 -1
- package/esm/utils/validations.js +1 -1
- package/lib/Root.js +1 -1
- package/lib/RootRenderer.d.ts +1 -1
- package/lib/RootRenderer.js +2 -2
- package/lib/SchemaRenderer.js +3 -2
- package/lib/Scoped.js +2 -1
- package/lib/StatusScoped.js +1 -1
- package/lib/WithRootStore.d.ts +4 -24
- package/lib/WithRootStore.js +12 -4
- package/lib/WithStore.js +23 -16
- package/lib/actions/Action.js +14 -14
- package/lib/actions/AjaxAction.js +1 -1
- package/lib/actions/BreakAction.js +1 -1
- package/lib/actions/BroadcastAction.js +1 -1
- package/lib/actions/CmptAction.js +2 -2
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +1 -1
- package/lib/actions/CustomAction.js +2 -1
- package/lib/actions/DialogAction.d.ts +2 -0
- package/lib/actions/DialogAction.js +40 -23
- package/lib/actions/DrawerAction.js +4 -4
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/LinkAction.js +1 -1
- package/lib/actions/LoopAction.js +1 -1
- package/lib/actions/PageAction.js +1 -1
- package/lib/actions/ParallelAction.js +1 -1
- package/lib/actions/SwitchAction.js +1 -1
- package/lib/actions/ToastAction.js +1 -1
- package/lib/components/CustomStyle.js +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.js +2 -1
- package/lib/components/PopOver.js +2 -1
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -2
- package/lib/locale.js +1 -1
- package/lib/polyfills.d.ts +3 -0
- package/lib/polyfills.js +20 -0
- package/lib/renderers/Form.d.ts +1 -1
- package/lib/renderers/Form.js +17 -7
- package/lib/renderers/Item.d.ts +88 -59
- package/lib/renderers/Item.js +86 -40
- package/lib/renderers/Options.js +1 -1
- package/lib/renderers/Placeholder.js +1 -1
- package/lib/renderers/builtin.js +1 -1
- package/lib/renderers/register.js +1 -1
- package/lib/renderers/wrapControl.d.ts +4 -24
- package/lib/renderers/wrapControl.js +51 -53
- package/lib/store/app.js +36 -2
- package/lib/store/combo.d.ts +168 -28
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +3 -2
- package/lib/store/crud.js +12 -5
- package/lib/store/form.d.ts +72 -12
- package/lib/store/form.js +4 -4
- package/lib/store/formItem.d.ts +2 -1
- package/lib/store/formItem.js +7 -2
- package/lib/store/iRenderer.js +2 -1
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +1 -0
- package/lib/store/list.js +8 -2
- package/lib/store/manager.js +1 -1
- package/lib/store/modal.js +1 -1
- package/lib/store/node.js +1 -1
- package/lib/store/pagination.js +1 -1
- package/lib/store/root.js +2 -1
- package/lib/store/service.js +14 -9
- package/lib/store/status.js +1 -1
- package/lib/store/table.d.ts +145 -24
- package/lib/store/table.js +7 -1
- package/lib/store/table2.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +5 -2
- package/lib/utils/Animation.js +1 -1
- package/lib/utils/ColorScale.js +1 -1
- package/lib/utils/DataSchema.d.ts +3 -2
- package/lib/utils/DataSchema.js +27 -7
- package/lib/utils/DataScope.d.ts +10 -3
- package/lib/utils/DataScope.js +50 -11
- package/lib/utils/RootClose.js +1 -1
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/api.js +39 -31
- package/lib/utils/arraySlice.d.ts +1 -0
- package/lib/utils/arraySlice.js +80 -0
- package/lib/utils/attachmentAdpator.js +1 -1
- package/lib/utils/autobind.js +1 -1
- package/lib/utils/columnsSplit.js +1 -1
- package/lib/utils/dataMapping.js +26 -18
- package/lib/utils/date.js +1 -1
- package/lib/utils/debug.js +1 -1
- package/lib/utils/decodeEntity.js +1 -1
- package/lib/utils/dom.js +4 -1
- package/lib/utils/errors.js +1 -1
- package/lib/utils/escapeHtml.js +1 -1
- package/lib/utils/filter-schema.js +1 -1
- package/lib/utils/filter.js +1 -1
- package/lib/utils/formatDuration.js +1 -1
- package/lib/utils/formula.js +1 -1
- package/lib/utils/getVariable.js +1 -1
- package/lib/utils/grammar.js +1 -1
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/helper.d.ts +8 -1
- package/lib/utils/helper.js +57 -9
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/isPureVariable.js +1 -1
- package/lib/utils/json-schema-2-amis-schema.js +1 -1
- package/lib/utils/keyToPath.js +1 -1
- package/lib/utils/makeSorter.js +1 -1
- package/lib/utils/memoryParse.js +1 -1
- package/lib/utils/normalizeLink.js +18 -9
- package/lib/utils/normalizeOptions.js +1 -1
- package/lib/utils/object.js +1 -1
- package/lib/utils/offset.js +1 -1
- package/lib/utils/offsetParent.js +1 -1
- package/lib/utils/optionValueCompare.js +1 -1
- package/lib/utils/position.js +1 -1
- package/lib/utils/prettyBytes.js +1 -1
- package/lib/utils/renderer-event.js +1 -1
- package/lib/utils/replaceText.js +1 -1
- package/lib/utils/resize-sensor.js +1 -1
- package/lib/utils/resolveCondition.js +1 -1
- package/lib/utils/resolveVariable.js +1 -1
- package/lib/utils/resolveVariableAndFilter.js +1 -1
- package/lib/utils/resolveVariableAndFilterForAsync.js +1 -1
- package/lib/utils/scrollPosition.js +1 -1
- package/lib/utils/string2regExp.js +1 -1
- package/lib/utils/stripNumber.js +1 -1
- package/lib/utils/style-helper.js +1 -1
- package/lib/utils/style.js +1 -1
- package/lib/utils/toNumber.js +1 -1
- package/lib/utils/tokenize.js +1 -1
- package/lib/utils/tpl-builtin.js +1 -1
- package/lib/utils/tpl-lodash.js +1 -1
- package/lib/utils/tpl.js +1 -1
- package/lib/utils/uncontrollable.js +1 -1
- package/lib/utils/validations.js +1 -1
- package/package.json +8 -3
package/lib/renderers/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -195,7 +195,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
195
195
|
case 0:
|
|
196
196
|
_b = this.props, data = _b.data, store = _b.store, dispatchEvent = _b.dispatchEvent;
|
|
197
197
|
if (store.fetching) {
|
|
198
|
-
return [2 /*return
|
|
198
|
+
return [2 /*return*/, value];
|
|
199
199
|
}
|
|
200
200
|
// 派发init事件,参数为初始化数据
|
|
201
201
|
return [4 /*yield*/, dispatchEvent('inited', object.createObject(data, tslib.__assign(tslib.__assign({}, value === null || value === void 0 ? void 0 : value.data), { responseData: (_a = value === null || value === void 0 ? void 0 : value.data) !== null && _a !== void 0 ? _a : {}, responseStatus: store.error ? 1 : 0, responseMsg: store.msg })))];
|
|
@@ -317,7 +317,8 @@ var Form = /** @class */ (function (_super) {
|
|
|
317
317
|
Form.prototype.initInterval = function (value) {
|
|
318
318
|
var _a = this.props, interval = _a.interval, silentPolling = _a.silentPolling, stopAutoRefreshWhen = _a.stopAutoRefreshWhen, data = _a.data;
|
|
319
319
|
clearTimeout(this.timer);
|
|
320
|
-
|
|
320
|
+
(value === null || value === void 0 ? void 0 : value.ok) &&
|
|
321
|
+
interval &&
|
|
321
322
|
this.mounted &&
|
|
322
323
|
(!stopAutoRefreshWhen || !tpl.evalExpression(stopAutoRefreshWhen, data)) &&
|
|
323
324
|
(this.timer = setTimeout(silentPolling ? this.silentReload : this.reload, Math.max(interval, 1000)));
|
|
@@ -564,7 +565,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
564
565
|
_this.reloadTarget(Scoped.filterTarget(action.target, values), values);
|
|
565
566
|
}
|
|
566
567
|
else if (action.actionType === 'dialog') {
|
|
567
|
-
store.openDialog(data);
|
|
568
|
+
store.openDialog(data, undefined, action.callback);
|
|
568
569
|
}
|
|
569
570
|
else if (action.actionType === 'drawer') {
|
|
570
571
|
store.openDrawer(data);
|
|
@@ -691,7 +692,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
691
692
|
}
|
|
692
693
|
else if (action.actionType === 'dialog') {
|
|
693
694
|
store.setCurrentAction(action);
|
|
694
|
-
store.openDialog(data);
|
|
695
|
+
store.openDialog(data, undefined, action.callback);
|
|
695
696
|
}
|
|
696
697
|
else if (action.actionType === 'drawer') {
|
|
697
698
|
store.setCurrentAction(action);
|
|
@@ -764,12 +765,21 @@ var Form = /** @class */ (function (_super) {
|
|
|
764
765
|
});
|
|
765
766
|
};
|
|
766
767
|
Form.prototype.handleQuery = function (query) {
|
|
767
|
-
var _a, _b;
|
|
768
768
|
if (this.props.initApi) {
|
|
769
|
+
// 如果是分页动作,则看接口里面有没有用,没用则 return false
|
|
770
|
+
// 让组件自己去排序
|
|
771
|
+
if ((query === null || query === void 0 ? void 0 : query.hasOwnProperty('orderBy')) &&
|
|
772
|
+
!api.isApiOutdated(this.props.initApi, this.props.initApi, this.props.store.data, object.createObject(this.props.store.data, query))) {
|
|
773
|
+
return false;
|
|
774
|
+
}
|
|
769
775
|
this.receive(query);
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
if (this.props.onQuery) {
|
|
779
|
+
return this.props.onQuery(query);
|
|
770
780
|
}
|
|
771
781
|
else {
|
|
772
|
-
|
|
782
|
+
return false;
|
|
773
783
|
}
|
|
774
784
|
};
|
|
775
785
|
Form.prototype.handleDialogConfirm = function (values, action, ctx, targets) {
|
package/lib/renderers/Item.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import hoistNonReactStatic from 'hoist-non-react-statics';
|
|
|
4
4
|
import { IFormItemStore, IFormStore } from '../store/form';
|
|
5
5
|
import { RendererProps, TestFunc, RendererConfig } from '../factory';
|
|
6
6
|
import { FormHorizontal, FormSchemaBase } from './Form';
|
|
7
|
-
import { BaseApiObject, BaseSchemaWithoutType, ClassName, Schema } from '../types';
|
|
7
|
+
import { ActionObject, BaseApiObject, BaseSchemaWithoutType, ClassName, Schema } from '../types';
|
|
8
8
|
export type LabelAlign = 'right' | 'left';
|
|
9
9
|
export interface FormBaseControl extends BaseSchemaWithoutType {
|
|
10
10
|
/**
|
|
@@ -444,8 +444,9 @@ export declare class FormItemWrap extends React.Component<FormItemProps> {
|
|
|
444
444
|
label: any;
|
|
445
445
|
})[];
|
|
446
446
|
} | undefined;
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
handleSubmit(values: any): void;
|
|
448
|
+
handleAction(e: React.UIEvent<any>, action: ActionObject, data: object): void;
|
|
449
|
+
handleClose(): void;
|
|
449
450
|
handleOpenDialog(schema: Schema, data: any): Promise<unknown>;
|
|
450
451
|
handleDialogConfirm([values]: Array<any>): void;
|
|
451
452
|
handleDialogClose(confirmed?: boolean): void;
|
|
@@ -460,30 +461,10 @@ export declare class FormItemWrap extends React.Component<FormItemProps> {
|
|
|
460
461
|
}
|
|
461
462
|
export declare const detectProps: string[];
|
|
462
463
|
export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (Control: FormControlComponent) => {
|
|
463
|
-
new (props: Omit<any, "rootStore">
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
468
|
-
readonly props: Readonly<Omit<any, "rootStore">>;
|
|
469
|
-
state: Readonly<{}>;
|
|
470
|
-
refs: {
|
|
471
|
-
[key: string]: React.ReactInstance;
|
|
472
|
-
};
|
|
473
|
-
componentDidMount?(): void;
|
|
474
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
475
|
-
componentWillUnmount?(): void;
|
|
476
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
477
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>): any;
|
|
478
|
-
componentDidUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
479
|
-
componentWillMount?(): void;
|
|
480
|
-
UNSAFE_componentWillMount?(): void;
|
|
481
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
482
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
483
|
-
componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
484
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
485
|
-
};
|
|
486
|
-
new (props: Omit<any, "rootStore">, context: any): {
|
|
464
|
+
new (props: Omit<any, "rootStore">): {
|
|
465
|
+
ref: any;
|
|
466
|
+
getWrappedInstance(): any;
|
|
467
|
+
refFn(ref: any): void;
|
|
487
468
|
render(): React.JSX.Element;
|
|
488
469
|
context: unknown;
|
|
489
470
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, "rootStore">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
@@ -527,12 +508,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
527
508
|
readonly hasChildren: boolean;
|
|
528
509
|
readonly children: any[];
|
|
529
510
|
} & {
|
|
511
|
+
/**
|
|
512
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
513
|
+
*/
|
|
530
514
|
onChildStoreDispose(child: any): void;
|
|
531
515
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
532
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
516
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
517
|
+
addChildId: (id: string) => void; /**
|
|
533
518
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
534
519
|
*/
|
|
535
|
-
addChildId: (id: string) => void;
|
|
536
520
|
removeChildId: (id: string) => void;
|
|
537
521
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
538
522
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -547,12 +531,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
547
531
|
readonly hasChildren: boolean;
|
|
548
532
|
readonly children: any[];
|
|
549
533
|
} & {
|
|
534
|
+
/**
|
|
535
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
536
|
+
*/
|
|
550
537
|
onChildStoreDispose(child: any): void;
|
|
551
538
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
552
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
539
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
540
|
+
addChildId: (id: string) => void; /**
|
|
553
541
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
554
542
|
*/
|
|
555
|
-
addChildId: (id: string) => void;
|
|
556
543
|
removeChildId: (id: string) => void;
|
|
557
544
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
558
545
|
readonly stores: {
|
|
@@ -569,12 +556,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
569
556
|
readonly hasChildren: boolean;
|
|
570
557
|
readonly children: any[];
|
|
571
558
|
} & {
|
|
559
|
+
/**
|
|
560
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
561
|
+
*/
|
|
572
562
|
onChildStoreDispose(child: any): void;
|
|
573
563
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
574
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
564
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
565
|
+
addChildId: (id: string) => void; /**
|
|
575
566
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
576
567
|
*/
|
|
577
|
-
addChildId: (id: string) => void;
|
|
578
568
|
removeChildId: (id: string) => void;
|
|
579
569
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
580
570
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -589,12 +579,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
589
579
|
readonly hasChildren: boolean;
|
|
590
580
|
readonly children: any[];
|
|
591
581
|
} & {
|
|
582
|
+
/**
|
|
583
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
584
|
+
*/
|
|
592
585
|
onChildStoreDispose(child: any): void;
|
|
593
586
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
594
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
587
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
588
|
+
addChildId: (id: string) => void; /**
|
|
595
589
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
596
590
|
*/
|
|
597
|
-
addChildId: (id: string) => void;
|
|
598
591
|
removeChildId: (id: string) => void;
|
|
599
592
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
600
593
|
};
|
|
@@ -618,12 +611,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
618
611
|
readonly hasChildren: boolean;
|
|
619
612
|
readonly children: any[];
|
|
620
613
|
} & {
|
|
614
|
+
/**
|
|
615
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
616
|
+
*/
|
|
621
617
|
onChildStoreDispose(child: any): void;
|
|
622
618
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
623
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
619
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
620
|
+
addChildId: (id: string) => void; /**
|
|
624
621
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
625
622
|
*/
|
|
626
|
-
addChildId: (id: string) => void;
|
|
627
623
|
removeChildId: (id: string) => void;
|
|
628
624
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
629
625
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -638,12 +634,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
638
634
|
readonly hasChildren: boolean;
|
|
639
635
|
readonly children: any[];
|
|
640
636
|
} & {
|
|
637
|
+
/**
|
|
638
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
639
|
+
*/
|
|
641
640
|
onChildStoreDispose(child: any): void;
|
|
642
641
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
643
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
642
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
643
|
+
addChildId: (id: string) => void; /**
|
|
644
644
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
645
645
|
*/
|
|
646
|
-
addChildId: (id: string) => void;
|
|
647
646
|
removeChildId: (id: string) => void;
|
|
648
647
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
649
648
|
removeStore(store: {
|
|
@@ -659,12 +658,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
659
658
|
readonly hasChildren: boolean;
|
|
660
659
|
readonly children: any[];
|
|
661
660
|
} & {
|
|
661
|
+
/**
|
|
662
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
663
|
+
*/
|
|
662
664
|
onChildStoreDispose(child: any): void;
|
|
663
665
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
664
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
666
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
667
|
+
addChildId: (id: string) => void; /**
|
|
665
668
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
666
669
|
*/
|
|
667
|
-
addChildId: (id: string) => void;
|
|
668
670
|
removeChildId: (id: string) => void;
|
|
669
671
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
670
672
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -679,12 +681,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
679
681
|
readonly hasChildren: boolean;
|
|
680
682
|
readonly children: any[];
|
|
681
683
|
} & {
|
|
684
|
+
/**
|
|
685
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
686
|
+
*/
|
|
682
687
|
onChildStoreDispose(child: any): void;
|
|
683
688
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
684
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
689
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
690
|
+
addChildId: (id: string) => void; /**
|
|
685
691
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
686
692
|
*/
|
|
687
|
-
addChildId: (id: string) => void;
|
|
688
693
|
removeChildId: (id: string) => void;
|
|
689
694
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
690
695
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -707,12 +712,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
707
712
|
readonly hasChildren: boolean;
|
|
708
713
|
readonly children: any[];
|
|
709
714
|
} & {
|
|
715
|
+
/**
|
|
716
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
717
|
+
*/
|
|
710
718
|
onChildStoreDispose(child: any): void;
|
|
711
719
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
712
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
720
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
721
|
+
addChildId: (id: string) => void; /**
|
|
713
722
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
714
723
|
*/
|
|
715
|
-
addChildId: (id: string) => void;
|
|
716
724
|
removeChildId: (id: string) => void;
|
|
717
725
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
718
726
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -727,12 +735,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
727
735
|
readonly hasChildren: boolean;
|
|
728
736
|
readonly children: any[];
|
|
729
737
|
} & {
|
|
738
|
+
/**
|
|
739
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
740
|
+
*/
|
|
730
741
|
onChildStoreDispose(child: any): void;
|
|
731
742
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
732
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
743
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
744
|
+
addChildId: (id: string) => void; /**
|
|
733
745
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
734
746
|
*/
|
|
735
|
-
addChildId: (id: string) => void;
|
|
736
747
|
removeChildId: (id: string) => void;
|
|
737
748
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
738
749
|
readonly stores: {
|
|
@@ -749,12 +760,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
749
760
|
readonly hasChildren: boolean;
|
|
750
761
|
readonly children: any[];
|
|
751
762
|
} & {
|
|
763
|
+
/**
|
|
764
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
765
|
+
*/
|
|
752
766
|
onChildStoreDispose(child: any): void;
|
|
753
767
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
754
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
768
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
769
|
+
addChildId: (id: string) => void; /**
|
|
755
770
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
756
771
|
*/
|
|
757
|
-
addChildId: (id: string) => void;
|
|
758
772
|
removeChildId: (id: string) => void;
|
|
759
773
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
760
774
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -769,12 +783,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
769
783
|
readonly hasChildren: boolean;
|
|
770
784
|
readonly children: any[];
|
|
771
785
|
} & {
|
|
786
|
+
/**
|
|
787
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
788
|
+
*/
|
|
772
789
|
onChildStoreDispose(child: any): void;
|
|
773
790
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
774
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
791
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
792
|
+
addChildId: (id: string) => void; /**
|
|
775
793
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
776
794
|
*/
|
|
777
|
-
addChildId: (id: string) => void;
|
|
778
795
|
removeChildId: (id: string) => void;
|
|
779
796
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
780
797
|
};
|
|
@@ -798,12 +815,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
798
815
|
readonly hasChildren: boolean;
|
|
799
816
|
readonly children: any[];
|
|
800
817
|
} & {
|
|
818
|
+
/**
|
|
819
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
820
|
+
*/
|
|
801
821
|
onChildStoreDispose(child: any): void;
|
|
802
822
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
803
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
823
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
824
|
+
addChildId: (id: string) => void; /**
|
|
804
825
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
805
826
|
*/
|
|
806
|
-
addChildId: (id: string) => void;
|
|
807
827
|
removeChildId: (id: string) => void;
|
|
808
828
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
809
829
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -818,12 +838,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
818
838
|
readonly hasChildren: boolean;
|
|
819
839
|
readonly children: any[];
|
|
820
840
|
} & {
|
|
841
|
+
/**
|
|
842
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
843
|
+
*/
|
|
821
844
|
onChildStoreDispose(child: any): void;
|
|
822
845
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
823
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
846
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
847
|
+
addChildId: (id: string) => void; /**
|
|
824
848
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
825
849
|
*/
|
|
826
|
-
addChildId: (id: string) => void;
|
|
827
850
|
removeChildId: (id: string) => void;
|
|
828
851
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
829
852
|
removeStore(store: {
|
|
@@ -839,12 +862,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
839
862
|
readonly hasChildren: boolean;
|
|
840
863
|
readonly children: any[];
|
|
841
864
|
} & {
|
|
865
|
+
/**
|
|
866
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
867
|
+
*/
|
|
842
868
|
onChildStoreDispose(child: any): void;
|
|
843
869
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
844
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
870
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
871
|
+
addChildId: (id: string) => void; /**
|
|
845
872
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
846
873
|
*/
|
|
847
|
-
addChildId: (id: string) => void;
|
|
848
874
|
removeChildId: (id: string) => void;
|
|
849
875
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
850
876
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -859,12 +885,15 @@ export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (
|
|
|
859
885
|
readonly hasChildren: boolean;
|
|
860
886
|
readonly children: any[];
|
|
861
887
|
} & {
|
|
888
|
+
/**
|
|
889
|
+
* 显示一个小图标, 鼠标放上去的时候显示提示内容
|
|
890
|
+
*/
|
|
862
891
|
onChildStoreDispose(child: any): void;
|
|
863
892
|
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
864
|
-
dispose: (callback?: (() => void) | undefined) => void;
|
|
893
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
894
|
+
addChildId: (id: string) => void; /**
|
|
865
895
|
* 当配置为水平布局的时候,用来配置具体的左右分配。
|
|
866
896
|
*/
|
|
867
|
-
addChildId: (id: string) => void;
|
|
868
897
|
removeChildId: (id: string) => void;
|
|
869
898
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
870
899
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
package/lib/renderers/Item.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v3.
|
|
2
|
+
* amis-core v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -282,8 +282,9 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
282
282
|
return (React__default["default"].createElement(Overlay["default"], { container: popOverContainer || this.target, target: function () { return _this.target; }, placement: position || 'left-bottom-left-top', show: true },
|
|
283
283
|
React__default["default"].createElement(PopOver["default"], { classPrefix: ns, className: cx("".concat(ns, "auto-fill-popOver"), popOverClassName), style: {
|
|
284
284
|
minWidth: this.target ? this.target.offsetWidth : undefined
|
|
285
|
-
}, offset: offset, onHide: this.
|
|
286
|
-
|
|
285
|
+
}, offset: offset, onHide: this.handleClose, overlay: true }, render('popOver-auto-fill-form', form, {
|
|
286
|
+
onAction: this.handleAction,
|
|
287
|
+
onSubmit: this.handleSubmit
|
|
287
288
|
}))));
|
|
288
289
|
}
|
|
289
290
|
else {
|
|
@@ -291,15 +292,20 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
291
292
|
}
|
|
292
293
|
};
|
|
293
294
|
// 参照录入popOver提交
|
|
294
|
-
FormItemWrap.prototype.
|
|
295
|
+
FormItemWrap.prototype.handleSubmit = function (values) {
|
|
295
296
|
var _a = this.props; _a.onBulkChange; var autoFill = _a.autoFill;
|
|
296
297
|
if (!autoFill || (autoFill && !(autoFill === null || autoFill === void 0 ? void 0 : autoFill.hasOwnProperty('api')))) {
|
|
297
298
|
return;
|
|
298
299
|
}
|
|
299
300
|
this.updateAutoFillData(values.selectedItems);
|
|
300
|
-
this.
|
|
301
|
+
this.handleClose();
|
|
301
302
|
};
|
|
302
|
-
FormItemWrap.prototype.
|
|
303
|
+
FormItemWrap.prototype.handleAction = function (e, action, data) {
|
|
304
|
+
if (action.actionType === 'cancel') {
|
|
305
|
+
this.handleClose();
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
FormItemWrap.prototype.handleClose = function () {
|
|
303
309
|
this.setState({
|
|
304
310
|
isOpened: false
|
|
305
311
|
});
|
|
@@ -486,6 +492,7 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
486
492
|
normal: function (props, renderControl) {
|
|
487
493
|
var _a;
|
|
488
494
|
var className = props.className, style = props.style, cx = props.classnames, desc = props.desc, description = props.description, label = props.label, render = props.render, required = props.required, caption = props.caption, remark = props.remark, labelRemark = props.labelRemark, env = props.env, descriptionClassName = props.descriptionClassName, captionClassName = props.captionClassName, model = props.formItem, renderLabel = props.renderLabel, renderDescription = props.renderDescription, hint = props.hint, data = props.data, showErrorMsg = props.showErrorMsg, useMobileUI = props.useMobileUI; props.translate; var isStatic = props.static, staticClassName = props.staticClassName;
|
|
495
|
+
var mobileUI = useMobileUI && helper.isMobile();
|
|
489
496
|
description = description || desc;
|
|
490
497
|
return (React__default["default"].createElement("div", { "data-role": "form-item", className: cx("Form-item Form-item--normal", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
491
498
|
'is-error': model && !model.valid
|
|
@@ -512,38 +519,71 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
512
519
|
: undefined
|
|
513
520
|
})
|
|
514
521
|
: null))) : null,
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
522
|
+
mobileUI ? (React__default["default"].createElement("div", { className: cx('Form-item-controlBox') },
|
|
523
|
+
renderControl(),
|
|
524
|
+
caption
|
|
525
|
+
? render('caption', caption, {
|
|
526
|
+
className: cx("Form-caption", captionClassName)
|
|
527
|
+
})
|
|
528
|
+
: null,
|
|
529
|
+
remark
|
|
530
|
+
? render('remark', {
|
|
531
|
+
type: 'remark',
|
|
532
|
+
icon: remark.icon || 'warning-mark',
|
|
533
|
+
className: cx("Form-remark"),
|
|
534
|
+
tooltip: remark,
|
|
535
|
+
useMobileUI: useMobileUI,
|
|
536
|
+
container: env && env.getModalContainer
|
|
537
|
+
? env.getModalContainer
|
|
538
|
+
: undefined
|
|
539
|
+
})
|
|
540
|
+
: null,
|
|
541
|
+
hint && model && model.isFocused
|
|
542
|
+
? render('hint', hint, {
|
|
543
|
+
className: cx("Form-hint")
|
|
544
|
+
})
|
|
545
|
+
: null,
|
|
546
|
+
model &&
|
|
547
|
+
!model.valid &&
|
|
548
|
+
showErrorMsg !== false &&
|
|
549
|
+
Array.isArray(model.errors) ? (React__default["default"].createElement("ul", { className: cx("Form-feedback") }, model.errors.map(function (msg, key) { return (React__default["default"].createElement("li", { key: key }, msg)); }))) : null,
|
|
550
|
+
renderDescription !== false && description
|
|
551
|
+
? render('description', description, {
|
|
552
|
+
className: cx("Form-description", descriptionClassName)
|
|
553
|
+
})
|
|
554
|
+
: null)) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
555
|
+
renderControl(),
|
|
556
|
+
caption
|
|
557
|
+
? render('caption', caption, {
|
|
558
|
+
className: cx("Form-caption", captionClassName)
|
|
559
|
+
})
|
|
560
|
+
: null,
|
|
561
|
+
remark
|
|
562
|
+
? render('remark', {
|
|
563
|
+
type: 'remark',
|
|
564
|
+
icon: remark.icon || 'warning-mark',
|
|
565
|
+
className: cx("Form-remark"),
|
|
566
|
+
tooltip: remark,
|
|
567
|
+
useMobileUI: useMobileUI,
|
|
568
|
+
container: env && env.getModalContainer
|
|
569
|
+
? env.getModalContainer
|
|
570
|
+
: undefined
|
|
571
|
+
})
|
|
572
|
+
: null,
|
|
573
|
+
hint && model && model.isFocused
|
|
574
|
+
? render('hint', hint, {
|
|
575
|
+
className: cx("Form-hint")
|
|
576
|
+
})
|
|
577
|
+
: null,
|
|
578
|
+
model &&
|
|
579
|
+
!model.valid &&
|
|
580
|
+
showErrorMsg !== false &&
|
|
581
|
+
Array.isArray(model.errors) ? (React__default["default"].createElement("ul", { className: cx("Form-feedback") }, model.errors.map(function (msg, key) { return (React__default["default"].createElement("li", { key: key }, msg)); }))) : null,
|
|
582
|
+
renderDescription !== false && description
|
|
583
|
+
? render('description', description, {
|
|
584
|
+
className: cx("Form-description", descriptionClassName)
|
|
585
|
+
})
|
|
586
|
+
: null))));
|
|
547
587
|
},
|
|
548
588
|
inline: function (props, renderControl) {
|
|
549
589
|
var _a;
|
|
@@ -690,13 +730,19 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
690
730
|
tslib.__metadata("design:type", Function),
|
|
691
731
|
tslib.__metadata("design:paramtypes", [Object]),
|
|
692
732
|
tslib.__metadata("design:returntype", void 0)
|
|
693
|
-
], FormItemWrap.prototype, "
|
|
733
|
+
], FormItemWrap.prototype, "handleSubmit", null);
|
|
734
|
+
tslib.__decorate([
|
|
735
|
+
helper.autobind,
|
|
736
|
+
tslib.__metadata("design:type", Function),
|
|
737
|
+
tslib.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
738
|
+
tslib.__metadata("design:returntype", void 0)
|
|
739
|
+
], FormItemWrap.prototype, "handleAction", null);
|
|
694
740
|
tslib.__decorate([
|
|
695
741
|
helper.autobind,
|
|
696
742
|
tslib.__metadata("design:type", Function),
|
|
697
743
|
tslib.__metadata("design:paramtypes", []),
|
|
698
744
|
tslib.__metadata("design:returntype", void 0)
|
|
699
|
-
], FormItemWrap.prototype, "
|
|
745
|
+
], FormItemWrap.prototype, "handleClose", null);
|
|
700
746
|
tslib.__decorate([
|
|
701
747
|
helper.autobind,
|
|
702
748
|
tslib.__metadata("design:type", Function),
|
package/lib/renderers/Options.js
CHANGED
package/lib/renderers/builtin.js
CHANGED