amis-core 2.1.1-beta.2 → 2.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.js +1 -1
- package/esm/SchemaRenderer.js +2 -2
- package/esm/Scoped.js +1 -1
- package/esm/WithRootStore.d.ts +383 -1
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +1 -1
- package/esm/_virtual/index.js +1 -1
- package/esm/_virtual/index2.js +1 -1
- package/esm/_virtual/react-is.development.js +1 -1
- package/esm/_virtual/react-is.production.min.js +1 -1
- package/esm/actions/Action.js +1 -1
- package/esm/actions/AjaxAction.js +12 -12
- package/esm/actions/BreakAction.js +1 -1
- package/esm/actions/BroadcastAction.js +1 -1
- package/esm/actions/CmptAction.js +1 -1
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +1 -1
- package/esm/actions/CustomAction.js +1 -1
- package/esm/actions/Decorators.js +1 -1
- package/esm/actions/DialogAction.js +1 -1
- package/esm/actions/DrawerAction.js +1 -1
- 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/LazyComponent.js +1 -1
- package/esm/components/Overlay.js +1 -1
- package/esm/components/PopOver.d.ts +33 -1
- package/esm/components/PopOver.js +1 -1
- package/esm/env.d.ts +97 -1
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.d.ts +3 -0
- package/esm/factory.js +2 -2
- package/esm/index.d.ts +3 -2
- package/esm/index.js +4 -3
- package/esm/locale.d.ts +63 -1
- package/esm/locale.js +3 -2
- package/esm/node_modules/@restart/hooks/esm/useCommittedRef.js +1 -1
- package/esm/node_modules/@restart/hooks/esm/useEventCallback.js +1 -1
- package/esm/node_modules/dom-helpers/esm/addEventListener.js +1 -1
- package/esm/node_modules/dom-helpers/esm/canUseDOM.js +1 -1
- package/esm/node_modules/dom-helpers/esm/contains.js +1 -1
- package/esm/node_modules/dom-helpers/esm/listen.js +1 -1
- package/esm/node_modules/dom-helpers/esm/ownerDocument.js +1 -1
- package/esm/node_modules/dom-helpers/esm/removeEventListener.js +1 -1
- package/esm/node_modules/object-assign/index.js +1 -1
- package/esm/node_modules/prop-types/checkPropTypes.js +1 -1
- package/esm/node_modules/prop-types/factoryWithThrowingShims.js +1 -1
- package/esm/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/esm/node_modules/prop-types/index.js +1 -1
- package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -1
- package/esm/node_modules/prop-types/lib/has.js +1 -1
- package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/esm/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/esm/node_modules/react-overlays/esm/Portal.js +1 -1
- package/esm/node_modules/react-overlays/esm/ownerDocument.js +1 -1
- package/esm/node_modules/react-overlays/esm/safeFindDOMNode.js +1 -1
- package/esm/node_modules/react-overlays/esm/useRootClose.js +1 -1
- package/esm/node_modules/react-overlays/esm/useWaitForDOMRef.js +1 -1
- package/esm/node_modules/warning/warning.js +1 -1
- package/esm/renderers/Form.d.ts +30 -1
- package/esm/renderers/Form.js +18 -6
- package/esm/renderers/Item.d.ts +511 -2
- package/esm/renderers/Item.js +6 -3
- package/esm/renderers/Options.d.ts +8 -0
- package/esm/renderers/Options.js +55 -35
- package/esm/renderers/Placeholder.js +1 -1
- package/esm/renderers/builtin.js +1 -1
- package/esm/renderers/wrapControl.d.ts +384 -2
- package/esm/renderers/wrapControl.js +1 -1
- package/esm/store/app.js +1 -1
- package/esm/store/combo.d.ts +24 -0
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +1 -1
- package/esm/store/crud.js +35 -20
- package/esm/store/form.d.ts +10 -0
- package/esm/store/form.js +48 -22
- package/esm/store/formItem.d.ts +1 -0
- package/esm/store/formItem.js +7 -2
- package/esm/store/iRenderer.js +1 -1
- package/esm/store/index.d.ts +2 -2
- package/esm/store/index.js +4 -4
- package/esm/store/list.js +1 -1
- 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 +1 -1
- package/esm/store/service.js +11 -11
- package/esm/store/table.d.ts +27 -4
- package/esm/store/table.js +15 -4
- package/esm/store/{table-v2.d.ts → table2.d.ts} +32 -32
- package/esm/store/{table-v2.js → table2.js} +16 -16
- package/esm/theme.d.ts +33 -1
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +1 -0
- package/esm/utils/Animation.js +1 -1
- package/esm/utils/ColorScale.js +1 -1
- package/esm/utils/DataSchema.js +1 -1
- package/esm/utils/DataScope.js +1 -1
- package/esm/utils/RootClose.js +1 -1
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/api.js +3 -2
- 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 +1 -1
- package/esm/utils/date.js +1 -1
- package/esm/utils/debug.js +1 -1
- package/esm/utils/dom.js +1 -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 +3 -3
- package/esm/utils/helper.js +24 -9
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.d.ts +1 -0
- 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/normalizeLink.js +1 -1
- 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/resolveVariable.d.ts +1 -1
- package/esm/utils/resolveVariable.js +3 -3
- package/esm/utils/resolveVariableAndFilter.js +1 -1
- package/esm/utils/scrollPosition.js +1 -1
- package/esm/utils/string2regExp.js +1 -1
- package/esm/utils/stripNumber.js +2 -2
- package/esm/utils/style.js +1 -1
- package/esm/utils/toNumber.d.ts +7 -0
- package/esm/utils/toNumber.js +18 -0
- 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.d.ts +1 -1
- package/esm/utils/validations.js +60 -3
- package/lib/Root.js +1 -1
- package/lib/RootRenderer.js +1 -1
- package/lib/SchemaRenderer.js +2 -2
- package/lib/Scoped.js +1 -1
- package/lib/WithRootStore.d.ts +383 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/_virtual/index.js +1 -1
- package/lib/_virtual/index2.js +1 -1
- package/lib/_virtual/react-is.development.js +1 -1
- package/lib/_virtual/react-is.production.min.js +1 -1
- package/lib/actions/Action.js +1 -1
- package/lib/actions/AjaxAction.js +12 -12
- package/lib/actions/BreakAction.js +1 -1
- package/lib/actions/BroadcastAction.js +1 -1
- package/lib/actions/CmptAction.js +1 -1
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +1 -1
- package/lib/actions/CustomAction.js +1 -1
- package/lib/actions/Decorators.js +1 -1
- package/lib/actions/DialogAction.js +1 -1
- package/lib/actions/DrawerAction.js +1 -1
- 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/LazyComponent.js +1 -1
- package/lib/components/Overlay.js +1 -1
- package/lib/components/PopOver.d.ts +33 -1
- package/lib/components/PopOver.js +1 -1
- package/lib/env.d.ts +97 -1
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.d.ts +3 -0
- package/lib/factory.js +2 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +6 -3
- package/lib/locale.d.ts +63 -1
- package/lib/locale.js +3 -2
- package/lib/node_modules/@restart/hooks/esm/useCommittedRef.js +1 -1
- package/lib/node_modules/@restart/hooks/esm/useEventCallback.js +1 -1
- package/lib/node_modules/dom-helpers/esm/addEventListener.js +1 -1
- package/lib/node_modules/dom-helpers/esm/canUseDOM.js +1 -1
- package/lib/node_modules/dom-helpers/esm/contains.js +1 -1
- package/lib/node_modules/dom-helpers/esm/listen.js +1 -1
- package/lib/node_modules/dom-helpers/esm/ownerDocument.js +1 -1
- package/lib/node_modules/dom-helpers/esm/removeEventListener.js +1 -1
- package/lib/node_modules/object-assign/index.js +1 -1
- package/lib/node_modules/prop-types/checkPropTypes.js +1 -1
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js +1 -1
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/lib/node_modules/prop-types/index.js +1 -1
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -1
- package/lib/node_modules/prop-types/lib/has.js +1 -1
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/lib/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/lib/node_modules/react-overlays/esm/Portal.js +1 -1
- package/lib/node_modules/react-overlays/esm/ownerDocument.js +1 -1
- package/lib/node_modules/react-overlays/esm/safeFindDOMNode.js +1 -1
- package/lib/node_modules/react-overlays/esm/useRootClose.js +1 -1
- package/lib/node_modules/react-overlays/esm/useWaitForDOMRef.js +1 -1
- package/lib/node_modules/warning/warning.js +1 -1
- package/lib/renderers/Form.d.ts +30 -1
- package/lib/renderers/Form.js +19 -6
- package/lib/renderers/Item.d.ts +511 -2
- package/lib/renderers/Item.js +5 -1
- package/lib/renderers/Options.d.ts +8 -0
- package/lib/renderers/Options.js +55 -35
- package/lib/renderers/Placeholder.js +1 -1
- package/lib/renderers/builtin.js +1 -1
- package/lib/renderers/wrapControl.d.ts +384 -2
- package/lib/renderers/wrapControl.js +1 -1
- package/lib/store/app.js +1 -1
- package/lib/store/combo.d.ts +24 -0
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +1 -1
- package/lib/store/crud.js +35 -20
- package/lib/store/form.d.ts +10 -0
- package/lib/store/form.js +49 -22
- package/lib/store/formItem.d.ts +1 -0
- package/lib/store/formItem.js +7 -2
- package/lib/store/iRenderer.js +1 -1
- package/lib/store/index.d.ts +2 -2
- package/lib/store/index.js +4 -4
- package/lib/store/list.js +1 -1
- 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 +1 -1
- package/lib/store/service.js +11 -11
- package/lib/store/table.d.ts +27 -4
- package/lib/store/table.js +15 -4
- package/lib/store/{table-v2.d.ts → table2.d.ts} +32 -32
- package/lib/store/{table-v2.js → table2.js} +16 -16
- package/lib/theme.d.ts +33 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +1 -0
- package/lib/utils/Animation.js +1 -1
- package/lib/utils/ColorScale.js +1 -1
- package/lib/utils/DataSchema.js +1 -1
- package/lib/utils/DataScope.js +1 -1
- package/lib/utils/RootClose.js +1 -1
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/api.js +3 -2
- 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 +1 -1
- package/lib/utils/date.js +1 -1
- package/lib/utils/debug.js +1 -1
- package/lib/utils/dom.js +1 -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 +3 -3
- package/lib/utils/helper.js +24 -9
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.d.ts +1 -0
- 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/normalizeLink.js +1 -1
- 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/resolveVariable.d.ts +1 -1
- package/lib/utils/resolveVariable.js +3 -3
- package/lib/utils/resolveVariableAndFilter.js +1 -1
- package/lib/utils/scrollPosition.js +1 -1
- package/lib/utils/string2regExp.js +1 -1
- package/lib/utils/stripNumber.js +2 -2
- package/lib/utils/style.js +1 -1
- package/lib/utils/toNumber.d.ts +7 -0
- package/lib/utils/toNumber.js +22 -0
- 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.d.ts +1 -1
- package/lib/utils/validations.js +61 -3
- package/package.json +5 -4
package/lib/renderers/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v2.
|
|
2
|
+
* amis-core v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
|
|
10
10
|
var tslib = require('tslib');
|
|
11
11
|
var React = require('react');
|
|
12
|
+
var extend = require('lodash/extend');
|
|
12
13
|
var factory = require('../factory.js');
|
|
13
14
|
var form = require('../store/form.js');
|
|
14
15
|
var tpl = require('../utils/tpl.js');
|
|
@@ -31,6 +32,7 @@ var mobxStateTree = require('mobx-state-tree');
|
|
|
31
32
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
33
|
|
|
33
34
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
35
|
+
var extend__default = /*#__PURE__*/_interopDefaultLegacy(extend);
|
|
34
36
|
var debouce__default = /*#__PURE__*/_interopDefaultLegacy(debouce);
|
|
35
37
|
var flatten__default = /*#__PURE__*/_interopDefaultLegacy(flatten);
|
|
36
38
|
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
|
|
@@ -425,14 +427,17 @@ var Form = /** @class */ (function (_super) {
|
|
|
425
427
|
(formLazyChange === false ? this.emitChange : this.lazyEmitChange)(submit);
|
|
426
428
|
};
|
|
427
429
|
Form.prototype.handleFormSubmit = function (e) {
|
|
428
|
-
var
|
|
430
|
+
var _a = this.props, preventEnterSubmit = _a.preventEnterSubmit, onActionSensor = _a.onActionSensor;
|
|
429
431
|
e.preventDefault();
|
|
430
432
|
if (preventEnterSubmit) {
|
|
431
433
|
return false;
|
|
432
434
|
}
|
|
433
|
-
|
|
435
|
+
var sensor = this.handleAction(e, {
|
|
434
436
|
type: 'submit'
|
|
435
437
|
}, this.props.store.data);
|
|
438
|
+
// 让外层可以监控这个动作执行结果
|
|
439
|
+
onActionSensor === null || onActionSensor === void 0 ? void 0 : onActionSensor(sensor);
|
|
440
|
+
return sensor;
|
|
436
441
|
};
|
|
437
442
|
Form.prototype.handleReset = function (action) {
|
|
438
443
|
var onReset = this.props.onReset;
|
|
@@ -897,7 +902,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
897
902
|
return render("".concat(region ? "".concat(region, "/") : '').concat(key), subSchema, subProps);
|
|
898
903
|
};
|
|
899
904
|
Form.prototype.renderBody = function () {
|
|
900
|
-
var _a = this.props, body = _a.body, mode = _a.mode, className = _a.className, cx = _a.classnames, debug = _a.debug, $path = _a.$path, store = _a.store, columnCount = _a.columnCount, render = _a.render;
|
|
905
|
+
var _a = this.props, body = _a.body, mode = _a.mode, className = _a.className, cx = _a.classnames, debug = _a.debug, debugConfig = _a.debugConfig, $path = _a.$path, store = _a.store, columnCount = _a.columnCount, render = _a.render;
|
|
901
906
|
var restError = store.restError;
|
|
902
907
|
var WrapperComponent = this.props.wrapperComponent ||
|
|
903
908
|
(/(?:\/|^)form\//.test($path) ? 'div' : 'form');
|
|
@@ -906,8 +911,16 @@ var Form = /** @class */ (function (_super) {
|
|
|
906
911
|
: 0, function (index) { return (React__default["default"].createElement("div", { className: cx("Form-item Form-item--".concat(mode, " is-placeholder")), key: index })); });
|
|
907
912
|
return (React__default["default"].createElement(WrapperComponent, { className: cx("Form", "Form--".concat(mode || 'normal'), columnCount ? "Form--column Form--column-".concat(columnCount) : null, className), onSubmit: this.handleFormSubmit, noValidate: true },
|
|
908
913
|
React__default["default"].createElement("input", { type: "submit", style: { display: 'none' } }),
|
|
909
|
-
debug
|
|
910
|
-
|
|
914
|
+
debug
|
|
915
|
+
? render('form-debug-json', extend__default["default"]({
|
|
916
|
+
type: 'json',
|
|
917
|
+
value: store.data,
|
|
918
|
+
ellipsisThreshold: 120,
|
|
919
|
+
className: cx('Form--debug')
|
|
920
|
+
},
|
|
921
|
+
/** 定制debug输出格式 */
|
|
922
|
+
object.isObject(debugConfig) ? debugConfig : {}))
|
|
923
|
+
: null,
|
|
911
924
|
render('spinner', { type: 'spinner' }, {
|
|
912
925
|
overlay: true,
|
|
913
926
|
show: store.loading
|
package/lib/renderers/Item.d.ts
CHANGED
|
@@ -119,6 +119,18 @@ export interface FormBaseControl extends BaseSchemaWithoutType {
|
|
|
119
119
|
maximum?: string;
|
|
120
120
|
minLength?: string;
|
|
121
121
|
minimum?: string;
|
|
122
|
+
isDateTimeSame?: string;
|
|
123
|
+
isDateTimeBefore?: string;
|
|
124
|
+
isDateTimeAfter?: string;
|
|
125
|
+
isDateTimeSameOrBefore?: string;
|
|
126
|
+
isDateTimeSameOrAfter?: string;
|
|
127
|
+
isDateTimeBetween?: string;
|
|
128
|
+
isTimeSame?: string;
|
|
129
|
+
isTimeBefore?: string;
|
|
130
|
+
isTimeAfter?: string;
|
|
131
|
+
isTimeSameOrBefore?: string;
|
|
132
|
+
isTimeSameOrAfter?: string;
|
|
133
|
+
isTimeBetween?: string;
|
|
122
134
|
[propName: string]: any;
|
|
123
135
|
};
|
|
124
136
|
validations?: string | {
|
|
@@ -202,6 +214,66 @@ export interface FormBaseControl extends BaseSchemaWithoutType {
|
|
|
202
214
|
* 最小值为指定值
|
|
203
215
|
*/
|
|
204
216
|
minimum?: number;
|
|
217
|
+
/**
|
|
218
|
+
* 和目标日期相同,支持指定粒度,默认到毫秒
|
|
219
|
+
* @version 2.2.0
|
|
220
|
+
*/
|
|
221
|
+
isDateTimeSame?: string | string[];
|
|
222
|
+
/**
|
|
223
|
+
* 早于目标日期,支持指定粒度,默认到毫秒
|
|
224
|
+
* @version 2.2.0
|
|
225
|
+
*/
|
|
226
|
+
isDateTimeBefore?: string | string[];
|
|
227
|
+
/**
|
|
228
|
+
* 晚于目标日期,支持指定粒度,默认到毫秒
|
|
229
|
+
* @version 2.2.0
|
|
230
|
+
*/
|
|
231
|
+
isDateTimeAfter?: string | string[];
|
|
232
|
+
/**
|
|
233
|
+
* 早于目标日期或和目标日期相同,支持指定粒度,默认到毫秒
|
|
234
|
+
* @version 2.2.0
|
|
235
|
+
*/
|
|
236
|
+
isDateTimeSameOrBefore?: string | string[];
|
|
237
|
+
/**
|
|
238
|
+
* 晚于目标日期或和目标日期相同,支持指定粒度,默认到毫秒
|
|
239
|
+
* @version 2.2.0
|
|
240
|
+
*/
|
|
241
|
+
isDateTimeSameOrAfter?: string | string[];
|
|
242
|
+
/**
|
|
243
|
+
* 日期处于目标日期范围,支持指定粒度和区间的开闭形式,默认到毫秒, 左右开区间
|
|
244
|
+
* @version 2.2.0
|
|
245
|
+
*/
|
|
246
|
+
isDateTimeBetween?: string | string[];
|
|
247
|
+
/**
|
|
248
|
+
* 和目标时间相同,支持指定粒度,默认到毫秒
|
|
249
|
+
* @version 2.2.0
|
|
250
|
+
*/
|
|
251
|
+
isTimeSame?: string | string[];
|
|
252
|
+
/**
|
|
253
|
+
* 早于目标时间,支持指定粒度,默认到毫秒
|
|
254
|
+
* @version 2.2.0
|
|
255
|
+
*/
|
|
256
|
+
isTimeBefore?: string | string[];
|
|
257
|
+
/**
|
|
258
|
+
* 晚于目标时间,支持指定粒度,默认到毫秒
|
|
259
|
+
* @version 2.2.0
|
|
260
|
+
*/
|
|
261
|
+
isTimeAfter?: string | string[];
|
|
262
|
+
/**
|
|
263
|
+
* 早于目标时间或和目标时间相同,支持指定粒度,默认到毫秒
|
|
264
|
+
* @version 2.2.0
|
|
265
|
+
*/
|
|
266
|
+
isTimeSameOrBefore?: string | string[];
|
|
267
|
+
/**
|
|
268
|
+
* 晚于目标时间或和目标时间相同,支持指定粒度,默认到毫秒
|
|
269
|
+
* @version 2.2.0
|
|
270
|
+
*/
|
|
271
|
+
isTimeSameOrAfter?: string | string[];
|
|
272
|
+
/**
|
|
273
|
+
* 时间处于目标时间范围,支持指定粒度和区间的开闭形式,默认到毫秒, 左右开区间
|
|
274
|
+
* @version 2.2.0
|
|
275
|
+
*/
|
|
276
|
+
isTimeBetween?: string | string[];
|
|
205
277
|
[propName: string]: any;
|
|
206
278
|
};
|
|
207
279
|
/**
|
|
@@ -386,11 +458,448 @@ export declare class FormItemWrap extends React.Component<FormItemProps> {
|
|
|
386
458
|
render(): JSX.Element | null;
|
|
387
459
|
}
|
|
388
460
|
export declare const detectProps: string[];
|
|
389
|
-
export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (Control: FormControlComponent) =>
|
|
461
|
+
export declare function asFormItem(config: Omit<FormItemConfig, 'component'>): (Control: FormControlComponent) => {
|
|
462
|
+
new (props: Omit<any, "rootStore"> | Readonly<Omit<any, "rootStore">>): {
|
|
463
|
+
render(): JSX.Element;
|
|
464
|
+
context: any;
|
|
465
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, "rootStore">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
466
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
467
|
+
readonly props: Readonly<Omit<any, "rootStore">> & Readonly<{
|
|
468
|
+
children?: React.ReactNode;
|
|
469
|
+
}>;
|
|
470
|
+
state: Readonly<{}>;
|
|
471
|
+
refs: {
|
|
472
|
+
[key: string]: React.ReactInstance;
|
|
473
|
+
};
|
|
474
|
+
componentDidMount?(): void;
|
|
475
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
476
|
+
componentWillUnmount?(): void;
|
|
477
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
478
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>): any;
|
|
479
|
+
componentDidUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
480
|
+
componentWillMount?(): void;
|
|
481
|
+
UNSAFE_componentWillMount?(): void;
|
|
482
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
483
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
484
|
+
componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
485
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
486
|
+
};
|
|
487
|
+
new (props: Omit<any, "rootStore">, context: any): {
|
|
488
|
+
render(): JSX.Element;
|
|
489
|
+
context: any;
|
|
490
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<any, "rootStore">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
491
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
492
|
+
readonly props: Readonly<Omit<any, "rootStore">> & Readonly<{
|
|
493
|
+
children?: React.ReactNode;
|
|
494
|
+
}>;
|
|
495
|
+
state: Readonly<{}>;
|
|
496
|
+
refs: {
|
|
497
|
+
[key: string]: React.ReactInstance;
|
|
498
|
+
};
|
|
499
|
+
componentDidMount?(): void;
|
|
500
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
501
|
+
componentWillUnmount?(): void;
|
|
502
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
503
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>): any;
|
|
504
|
+
componentDidUpdate?(prevProps: Readonly<Omit<any, "rootStore">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
505
|
+
componentWillMount?(): void;
|
|
506
|
+
UNSAFE_componentWillMount?(): void;
|
|
507
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
508
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<any, "rootStore">>, nextContext: any): void;
|
|
509
|
+
componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
510
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<any, "rootStore">>, nextState: Readonly<{}>, nextContext: any): void;
|
|
511
|
+
};
|
|
512
|
+
displayName: string;
|
|
513
|
+
contextType: React.Context<{
|
|
514
|
+
storeType: string;
|
|
515
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
516
|
+
readonly fetcher: any;
|
|
517
|
+
readonly notify: any;
|
|
518
|
+
readonly isCancel: (value: any) => boolean;
|
|
519
|
+
/**
|
|
520
|
+
* 输入提示,聚焦的时候显示
|
|
521
|
+
*/
|
|
522
|
+
readonly __: import("..").TranslateFn<any>;
|
|
523
|
+
getStoreById(id: string): {
|
|
524
|
+
id: string;
|
|
525
|
+
path: string;
|
|
526
|
+
storeType: string;
|
|
527
|
+
disposed: boolean;
|
|
528
|
+
parentId: string;
|
|
529
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
530
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
531
|
+
readonly parentStore: any;
|
|
532
|
+
readonly __: any;
|
|
533
|
+
readonly hasChildren: boolean;
|
|
534
|
+
readonly children: any[];
|
|
535
|
+
} & {
|
|
536
|
+
onChildStoreDispose(child: any): void;
|
|
537
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
538
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
539
|
+
addChildId: (id: string) => void;
|
|
540
|
+
/**
|
|
541
|
+
* 表单 control 是否为 inline 模式。
|
|
542
|
+
*/
|
|
543
|
+
removeChildId: (id: string) => void;
|
|
544
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
545
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
546
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
547
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
548
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
549
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
550
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
551
|
+
}, {
|
|
552
|
+
readonly parentStore: any;
|
|
553
|
+
readonly __: any;
|
|
554
|
+
readonly hasChildren: boolean;
|
|
555
|
+
readonly children: any[];
|
|
556
|
+
} & {
|
|
557
|
+
onChildStoreDispose(child: any): void;
|
|
558
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
559
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
560
|
+
addChildId: (id: string) => void;
|
|
561
|
+
/**
|
|
562
|
+
* 表单 control 是否为 inline 模式。
|
|
563
|
+
*/
|
|
564
|
+
removeChildId: (id: string) => void;
|
|
565
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
566
|
+
readonly stores: {
|
|
567
|
+
[propName: string]: {
|
|
568
|
+
id: string;
|
|
569
|
+
path: string;
|
|
570
|
+
storeType: string;
|
|
571
|
+
disposed: boolean;
|
|
572
|
+
parentId: string;
|
|
573
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
574
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
575
|
+
readonly parentStore: any;
|
|
576
|
+
readonly __: any;
|
|
577
|
+
readonly hasChildren: boolean;
|
|
578
|
+
readonly children: any[];
|
|
579
|
+
} & {
|
|
580
|
+
onChildStoreDispose(child: any): void;
|
|
581
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
582
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
583
|
+
addChildId: (id: string) => void;
|
|
584
|
+
/**
|
|
585
|
+
* 表单 control 是否为 inline 模式。
|
|
586
|
+
*/
|
|
587
|
+
removeChildId: (id: string) => void;
|
|
588
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
589
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
590
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
591
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
592
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
593
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
594
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
595
|
+
}, {
|
|
596
|
+
readonly parentStore: any;
|
|
597
|
+
readonly __: any;
|
|
598
|
+
readonly hasChildren: boolean;
|
|
599
|
+
readonly children: any[];
|
|
600
|
+
} & {
|
|
601
|
+
onChildStoreDispose(child: any): void;
|
|
602
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
603
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
604
|
+
addChildId: (id: string) => void;
|
|
605
|
+
/**
|
|
606
|
+
* 表单 control 是否为 inline 模式。
|
|
607
|
+
*/
|
|
608
|
+
removeChildId: (id: string) => void;
|
|
609
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
610
|
+
};
|
|
611
|
+
} & {
|
|
612
|
+
addStore(store: {
|
|
613
|
+
[propName: string]: any;
|
|
614
|
+
storeType: string;
|
|
615
|
+
id: string;
|
|
616
|
+
path: string;
|
|
617
|
+
parentId?: string | undefined;
|
|
618
|
+
}): {
|
|
619
|
+
id: string;
|
|
620
|
+
path: string;
|
|
621
|
+
storeType: string;
|
|
622
|
+
disposed: boolean;
|
|
623
|
+
parentId: string;
|
|
624
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
625
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
626
|
+
readonly parentStore: any;
|
|
627
|
+
readonly __: any;
|
|
628
|
+
readonly hasChildren: boolean;
|
|
629
|
+
readonly children: any[];
|
|
630
|
+
} & {
|
|
631
|
+
onChildStoreDispose(child: any): void;
|
|
632
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
633
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
634
|
+
addChildId: (id: string) => void;
|
|
635
|
+
/**
|
|
636
|
+
* 表单 control 是否为 inline 模式。
|
|
637
|
+
*/
|
|
638
|
+
removeChildId: (id: string) => void;
|
|
639
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
640
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
641
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
642
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
643
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
644
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
645
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
646
|
+
}, {
|
|
647
|
+
readonly parentStore: any;
|
|
648
|
+
readonly __: any;
|
|
649
|
+
readonly hasChildren: boolean;
|
|
650
|
+
readonly children: any[];
|
|
651
|
+
} & {
|
|
652
|
+
onChildStoreDispose(child: any): void;
|
|
653
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
654
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
655
|
+
addChildId: (id: string) => void;
|
|
656
|
+
/**
|
|
657
|
+
* 表单 control 是否为 inline 模式。
|
|
658
|
+
*/
|
|
659
|
+
removeChildId: (id: string) => void;
|
|
660
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
661
|
+
removeStore(store: {
|
|
662
|
+
id: string;
|
|
663
|
+
path: string;
|
|
664
|
+
storeType: string;
|
|
665
|
+
disposed: boolean;
|
|
666
|
+
parentId: string;
|
|
667
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
668
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
669
|
+
readonly parentStore: any;
|
|
670
|
+
readonly __: any;
|
|
671
|
+
readonly hasChildren: boolean;
|
|
672
|
+
readonly children: any[];
|
|
673
|
+
} & {
|
|
674
|
+
onChildStoreDispose(child: any): void;
|
|
675
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
676
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
677
|
+
addChildId: (id: string) => void;
|
|
678
|
+
/**
|
|
679
|
+
* 表单 control 是否为 inline 模式。
|
|
680
|
+
*/
|
|
681
|
+
removeChildId: (id: string) => void;
|
|
682
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
683
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
684
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
685
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
686
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
687
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
688
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
689
|
+
}, {
|
|
690
|
+
readonly parentStore: any;
|
|
691
|
+
readonly __: any;
|
|
692
|
+
readonly hasChildren: boolean;
|
|
693
|
+
readonly children: any[];
|
|
694
|
+
} & {
|
|
695
|
+
onChildStoreDispose(child: any): void;
|
|
696
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
697
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
698
|
+
addChildId: (id: string) => void;
|
|
699
|
+
/**
|
|
700
|
+
* 表单 control 是否为 inline 模式。
|
|
701
|
+
*/
|
|
702
|
+
removeChildId: (id: string) => void;
|
|
703
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
704
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
705
|
+
storeType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
706
|
+
}, {
|
|
707
|
+
readonly fetcher: any;
|
|
708
|
+
readonly notify: any;
|
|
709
|
+
readonly isCancel: (value: any) => boolean;
|
|
710
|
+
/**
|
|
711
|
+
* 输入提示,聚焦的时候显示
|
|
712
|
+
*/
|
|
713
|
+
readonly __: import("..").TranslateFn<any>;
|
|
714
|
+
getStoreById(id: string): {
|
|
715
|
+
id: string;
|
|
716
|
+
path: string;
|
|
717
|
+
storeType: string;
|
|
718
|
+
disposed: boolean;
|
|
719
|
+
parentId: string;
|
|
720
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
721
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
722
|
+
readonly parentStore: any;
|
|
723
|
+
readonly __: any;
|
|
724
|
+
readonly hasChildren: boolean;
|
|
725
|
+
readonly children: any[];
|
|
726
|
+
} & {
|
|
727
|
+
onChildStoreDispose(child: any): void;
|
|
728
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
729
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
730
|
+
addChildId: (id: string) => void;
|
|
731
|
+
/**
|
|
732
|
+
* 表单 control 是否为 inline 模式。
|
|
733
|
+
*/
|
|
734
|
+
removeChildId: (id: string) => void;
|
|
735
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
736
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
737
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
738
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
739
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
740
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
741
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
742
|
+
}, {
|
|
743
|
+
readonly parentStore: any;
|
|
744
|
+
readonly __: any;
|
|
745
|
+
readonly hasChildren: boolean;
|
|
746
|
+
readonly children: any[];
|
|
747
|
+
} & {
|
|
748
|
+
onChildStoreDispose(child: any): void;
|
|
749
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
750
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
751
|
+
addChildId: (id: string) => void;
|
|
752
|
+
/**
|
|
753
|
+
* 表单 control 是否为 inline 模式。
|
|
754
|
+
*/
|
|
755
|
+
removeChildId: (id: string) => void;
|
|
756
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
757
|
+
readonly stores: {
|
|
758
|
+
[propName: string]: {
|
|
759
|
+
id: string;
|
|
760
|
+
path: string;
|
|
761
|
+
storeType: string;
|
|
762
|
+
disposed: boolean;
|
|
763
|
+
parentId: string;
|
|
764
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
765
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
766
|
+
readonly parentStore: any;
|
|
767
|
+
readonly __: any;
|
|
768
|
+
readonly hasChildren: boolean;
|
|
769
|
+
readonly children: any[];
|
|
770
|
+
} & {
|
|
771
|
+
onChildStoreDispose(child: any): void;
|
|
772
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
773
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
774
|
+
addChildId: (id: string) => void;
|
|
775
|
+
/**
|
|
776
|
+
* 表单 control 是否为 inline 模式。
|
|
777
|
+
*/
|
|
778
|
+
removeChildId: (id: string) => void;
|
|
779
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
780
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
781
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
782
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
783
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
784
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
785
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
786
|
+
}, {
|
|
787
|
+
readonly parentStore: any;
|
|
788
|
+
readonly __: any;
|
|
789
|
+
readonly hasChildren: boolean;
|
|
790
|
+
readonly children: any[];
|
|
791
|
+
} & {
|
|
792
|
+
onChildStoreDispose(child: any): void;
|
|
793
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
794
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
795
|
+
addChildId: (id: string) => void;
|
|
796
|
+
/**
|
|
797
|
+
* 表单 control 是否为 inline 模式。
|
|
798
|
+
*/
|
|
799
|
+
removeChildId: (id: string) => void;
|
|
800
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
801
|
+
};
|
|
802
|
+
} & {
|
|
803
|
+
addStore(store: {
|
|
804
|
+
[propName: string]: any;
|
|
805
|
+
storeType: string;
|
|
806
|
+
id: string;
|
|
807
|
+
path: string;
|
|
808
|
+
parentId?: string | undefined;
|
|
809
|
+
}): {
|
|
810
|
+
id: string;
|
|
811
|
+
path: string;
|
|
812
|
+
storeType: string;
|
|
813
|
+
disposed: boolean;
|
|
814
|
+
parentId: string;
|
|
815
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
816
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
817
|
+
readonly parentStore: any;
|
|
818
|
+
readonly __: any;
|
|
819
|
+
readonly hasChildren: boolean;
|
|
820
|
+
readonly children: any[];
|
|
821
|
+
} & {
|
|
822
|
+
onChildStoreDispose(child: any): void;
|
|
823
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
824
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
825
|
+
addChildId: (id: string) => void;
|
|
826
|
+
/**
|
|
827
|
+
* 表单 control 是否为 inline 模式。
|
|
828
|
+
*/
|
|
829
|
+
removeChildId: (id: string) => void;
|
|
830
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
831
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
832
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
833
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
834
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
835
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
836
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
837
|
+
}, {
|
|
838
|
+
readonly parentStore: any;
|
|
839
|
+
readonly __: any;
|
|
840
|
+
readonly hasChildren: boolean;
|
|
841
|
+
readonly children: any[];
|
|
842
|
+
} & {
|
|
843
|
+
onChildStoreDispose(child: any): void;
|
|
844
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
845
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
846
|
+
addChildId: (id: string) => void;
|
|
847
|
+
/**
|
|
848
|
+
* 表单 control 是否为 inline 模式。
|
|
849
|
+
*/
|
|
850
|
+
removeChildId: (id: string) => void;
|
|
851
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
852
|
+
removeStore(store: {
|
|
853
|
+
id: string;
|
|
854
|
+
path: string;
|
|
855
|
+
storeType: string;
|
|
856
|
+
disposed: boolean;
|
|
857
|
+
parentId: string;
|
|
858
|
+
childrenIds: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
859
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
860
|
+
readonly parentStore: any;
|
|
861
|
+
readonly __: any;
|
|
862
|
+
readonly hasChildren: boolean;
|
|
863
|
+
readonly children: any[];
|
|
864
|
+
} & {
|
|
865
|
+
onChildStoreDispose(child: any): void;
|
|
866
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
867
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
868
|
+
addChildId: (id: string) => void;
|
|
869
|
+
/**
|
|
870
|
+
* 表单 control 是否为 inline 模式。
|
|
871
|
+
*/
|
|
872
|
+
removeChildId: (id: string) => void;
|
|
873
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
874
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
875
|
+
path: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
876
|
+
storeType: import("mobx-state-tree").ISimpleType<string>;
|
|
877
|
+
disposed: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
878
|
+
parentId: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
879
|
+
childrenIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
880
|
+
}, {
|
|
881
|
+
readonly parentStore: any;
|
|
882
|
+
readonly __: any;
|
|
883
|
+
readonly hasChildren: boolean;
|
|
884
|
+
readonly children: any[];
|
|
885
|
+
} & {
|
|
886
|
+
onChildStoreDispose(child: any): void;
|
|
887
|
+
syncProps(props: any, prevProps: any, list?: string[]): void;
|
|
888
|
+
dispose: (callback?: (() => void) | undefined) => void;
|
|
889
|
+
addChildId: (id: string) => void;
|
|
890
|
+
/**
|
|
891
|
+
* 表单 control 是否为 inline 模式。
|
|
892
|
+
*/
|
|
893
|
+
removeChildId: (id: string) => void;
|
|
894
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
895
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
896
|
+
ComposedComponent: React.ComponentType<any>;
|
|
897
|
+
} & hoistNonReactStatic.NonReactStatics<any, {}> & {
|
|
390
898
|
ComposedComponent: any;
|
|
391
|
-
}
|
|
899
|
+
} & {
|
|
392
900
|
ComposedComponent: any;
|
|
393
901
|
};
|
|
394
902
|
export declare function registerFormItem(config: FormItemConfig): RendererConfig;
|
|
395
903
|
export declare function FormItem(config: FormItemBasicConfig): (component: FormControlComponent) => any;
|
|
904
|
+
export declare function getFormItemByName(name: string): boolean;
|
|
396
905
|
export default FormItem;
|
package/lib/renderers/Item.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v2.
|
|
2
|
+
* amis-core v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -850,10 +850,14 @@ function FormItem(config) {
|
|
|
850
850
|
return renderer.component;
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
+
function getFormItemByName(name) {
|
|
854
|
+
return factory.renderersMap[name];
|
|
855
|
+
}
|
|
853
856
|
|
|
854
857
|
exports.FormItem = FormItem;
|
|
855
858
|
exports.FormItemWrap = FormItemWrap;
|
|
856
859
|
exports.asFormItem = asFormItem;
|
|
857
860
|
exports["default"] = FormItem;
|
|
858
861
|
exports.detectProps = detectProps;
|
|
862
|
+
exports.getFormItemByName = getFormItemByName;
|
|
859
863
|
exports.registerFormItem = registerFormItem;
|
|
@@ -72,6 +72,10 @@ export interface FormOptionsControl extends FormBaseControl {
|
|
|
72
72
|
* 新增时的表单项。
|
|
73
73
|
*/
|
|
74
74
|
addControls?: Array<PlainObject>;
|
|
75
|
+
/**
|
|
76
|
+
* 控制新增弹框设置项
|
|
77
|
+
*/
|
|
78
|
+
addDialog?: PlainObject;
|
|
75
79
|
/**
|
|
76
80
|
* 是否可以新增
|
|
77
81
|
*/
|
|
@@ -92,6 +96,10 @@ export interface FormOptionsControl extends FormBaseControl {
|
|
|
92
96
|
* 选项修改的表单项
|
|
93
97
|
*/
|
|
94
98
|
editControls?: Array<PlainObject>;
|
|
99
|
+
/**
|
|
100
|
+
* 控制编辑弹框设置项
|
|
101
|
+
*/
|
|
102
|
+
editDialog?: PlainObject;
|
|
95
103
|
/**
|
|
96
104
|
* 是否可删除
|
|
97
105
|
*/
|