amis-core 6.8.0 → 6.9.0-rc.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 +24 -2
- package/esm/SchemaRenderer.js +29 -15
- package/esm/Scoped.js +1 -1
- package/esm/StatusScoped.js +1 -1
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +1 -1
- package/esm/actions/Action.js +1 -1
- 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 +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/DialogAction.js +1 -1
- package/esm/actions/DrawerAction.js +1 -1
- package/esm/actions/EmailAction.js +1 -1
- package/esm/actions/EventAction.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/PrintAction.js +1 -1
- package/esm/actions/StatusAction.js +1 -1
- package/esm/actions/SwitchAction.js +1 -1
- package/esm/actions/ToastAction.js +1 -1
- package/esm/actions/WaitAction.js +1 -1
- package/esm/components/CustomStyle.js +1 -1
- package/esm/components/ErrorBoundary.js +1 -1
- package/esm/components/LazyComponent.d.ts +40 -2
- package/esm/components/LazyComponent.js +13 -7
- package/esm/components/Overlay.js +1 -1
- package/esm/components/PopOver.d.ts +1 -1
- package/esm/components/PopOver.js +1 -1
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.d.ts +13 -2
- package/esm/factory.js +157 -45
- package/esm/index.d.ts +4 -4
- package/esm/index.js +5 -5
- package/esm/locale.js +1 -1
- package/esm/polyfills.js +1 -1
- package/esm/renderers/Form.js +3 -3
- package/esm/renderers/Item.js +6 -6
- package/esm/renderers/Options.d.ts +3 -3
- package/esm/renderers/Options.js +42 -19
- 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.js +1 -1
- package/esm/store/app.js +1 -1
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.js +1 -1
- package/esm/store/form.js +1 -1
- package/esm/store/formItem.js +1 -1
- package/esm/store/iRenderer.js +1 -1
- package/esm/store/index.d.ts +1 -0
- package/esm/store/index.js +3 -2
- 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.d.ts +2 -0
- package/esm/store/root.js +45 -21
- package/esm/store/service.js +1 -1
- package/esm/store/status.js +1 -1
- package/esm/store/table.js +1 -1
- package/esm/store/table2.js +1 -1
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +4 -2
- 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.d.ts +21 -1
- package/esm/utils/api.js +133 -41
- package/esm/utils/arraySlice.js +1 -1
- package/esm/utils/attachmentAdpator.js +1 -1
- package/esm/utils/autobind.js +1 -1
- package/esm/utils/browser.js +1 -1
- package/esm/utils/columnsSplit.js +1 -1
- package/esm/utils/concatData.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/decodeEntity.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.js +1 -1
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.js +1 -1
- 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/labelToString.js +1 -1
- package/esm/utils/makeSorter.js +1 -1
- package/esm/utils/math.js +1 -1
- package/esm/utils/memoryParse.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/printElement.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/validateId.js +1 -1
- package/esm/utils/validations.js +1 -1
- package/esm/utils/visitedCache.js +1 -1
- package/lib/Root.js +1 -1
- package/lib/RootRenderer.js +23 -1
- package/lib/SchemaRenderer.js +27 -13
- package/lib/Scoped.js +1 -1
- package/lib/StatusScoped.js +1 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/actions/Action.js +1 -1
- 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 +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/DialogAction.js +1 -1
- package/lib/actions/DrawerAction.js +1 -1
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/EventAction.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/PrintAction.js +1 -1
- package/lib/actions/StatusAction.js +1 -1
- package/lib/actions/SwitchAction.js +1 -1
- package/lib/actions/ToastAction.js +1 -1
- package/lib/actions/WaitAction.js +1 -1
- package/lib/components/CustomStyle.js +1 -1
- package/lib/components/ErrorBoundary.js +1 -1
- package/lib/components/LazyComponent.d.ts +40 -2
- package/lib/components/LazyComponent.js +14 -7
- package/lib/components/Overlay.js +1 -1
- package/lib/components/PopOver.d.ts +1 -1
- package/lib/components/PopOver.js +1 -1
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.d.ts +13 -2
- package/lib/factory.js +161 -44
- package/lib/index.d.ts +4 -4
- package/lib/index.js +10 -2
- package/lib/locale.js +1 -1
- package/lib/polyfills.js +1 -1
- package/lib/renderers/Form.js +1 -1
- package/lib/renderers/Item.js +6 -6
- package/lib/renderers/Options.d.ts +3 -3
- package/lib/renderers/Options.js +42 -19
- 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.js +1 -1
- package/lib/store/app.js +1 -1
- package/lib/store/combo.d.ts +24 -25
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.js +2 -2
- package/lib/store/form.d.ts +10 -11
- package/lib/store/form.js +1 -1
- package/lib/store/formItem.js +1 -1
- package/lib/store/iRenderer.js +1 -1
- package/lib/store/index.d.ts +1 -0
- package/lib/store/index.js +3 -1
- 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.d.ts +2 -0
- package/lib/store/root.js +43 -19
- package/lib/store/service.js +1 -1
- package/lib/store/status.js +1 -1
- package/lib/store/table.d.ts +20 -21
- package/lib/store/table.js +1 -1
- package/lib/store/table2.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +4 -2
- 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.d.ts +21 -1
- package/lib/utils/api.js +136 -40
- package/lib/utils/arraySlice.js +1 -1
- package/lib/utils/attachmentAdpator.js +1 -1
- package/lib/utils/autobind.js +1 -1
- package/lib/utils/browser.js +1 -1
- package/lib/utils/columnsSplit.js +1 -1
- package/lib/utils/concatData.js +1 -1
- package/lib/utils/dataMapping.js +1 -1
- package/lib/utils/date.js +1 -1
- package/lib/utils/debug.js +2 -2
- package/lib/utils/decodeEntity.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.js +1 -1
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.js +1 -1
- 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/labelToString.js +1 -1
- package/lib/utils/makeSorter.js +1 -1
- package/lib/utils/math.js +1 -1
- package/lib/utils/memoryParse.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/printElement.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/validateId.js +1 -1
- package/lib/utils/validations.js +1 -1
- package/lib/utils/visitedCache.js +1 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
/// <reference types="react" />
|
|
9
|
-
import { Renderer, getRendererByName, getRenderers, registerRenderer, unRegisterRenderer, resolveRenderer, filterSchema, clearStoresCache, updateEnv, addSchemaFilter, extendDefaultEnv } from './factory';
|
|
10
|
-
import type { RenderOptions, RendererConfig, RendererProps } from './factory';
|
|
9
|
+
import { Renderer, getRendererByName, getRenderers, loadAllAsyncRenderers, loadAsyncRenderersByType, loadAsyncRenderer, registerRenderer, unRegisterRenderer, resolveRenderer, filterSchema, clearStoresCache, updateEnv, addSchemaFilter, extendDefaultEnv } from './factory';
|
|
10
|
+
import type { RenderOptions, RendererConfig, RendererProps, hasAsyncRenderers } from './factory';
|
|
11
11
|
import './polyfills';
|
|
12
12
|
import './renderers/builtin';
|
|
13
13
|
import './renderers/register';
|
|
@@ -15,7 +15,7 @@ export * from './utils/index';
|
|
|
15
15
|
export * from './types';
|
|
16
16
|
export * from './store';
|
|
17
17
|
import * as utils from './utils/helper';
|
|
18
|
-
import { RegisterStore } from './store';
|
|
18
|
+
import { RegisterStore, registerStore } from './store';
|
|
19
19
|
import type { IColumn, IColumn2, IRow, IRow2 } from './store';
|
|
20
20
|
import { setDefaultLocale, getDefaultLocale, makeTranslator, register as registerLocale, extendLocale, removeLocaleData, localeable } from './locale';
|
|
21
21
|
import type { LocaleProps, TranslateFn } from './locale';
|
|
@@ -51,5 +51,5 @@ import type { IItem } from './store/list';
|
|
|
51
51
|
import CustomStyle from './components/CustomStyle';
|
|
52
52
|
import { StatusScoped } from './StatusScoped';
|
|
53
53
|
export declare const version = "__buildVersion";
|
|
54
|
-
export { clearStoresCache, updateEnv, Renderer, RendererProps, RenderOptions, RendererEnv, EnvContext, RegisterStore, FormItem, FormItemWrap, FormItemProps, OptionsControl, FormRenderer, FormHorizontal, utils, getRendererByName, registerRenderer, unRegisterRenderer, getRenderers, registerFormItem, getFormItemByName, registerOptionsControl, resolveRenderer, filterSchema, Scoped, ScopedContext, IScopedContext, StatusScoped, setDefaultTheme, theme, themeable, ThemeProps, getTheme, classPrefix, getClassPrefix, classnames, makeClassnames, getDefaultLocale, setDefaultLocale, registerLocale, makeTranslator, extendLocale, removeLocaleData, localeable, LocaleProps, TranslateFn, ClassNamesFn, parse, lexer, Evaluator, AsyncEvaluator, FilterContext, filters, getFilters, registerFilter, extendsFilters, registerFunction, evaluate, evaluateForAsync, LazyComponent, Overlay, PopOver, ErrorBoundary, addSchemaFilter, OptionsControlProps, FormOptionsControl, FormControlProps, FormBaseControl, extendDefaultEnv, addRootWrapper, RendererConfig, styleMap, RENDERER_TRANSMISSION_OMIT_PROPS, ScopedComponentType, IItem, IColumn, IRow, IColumn2, IRow2, OnEventProps, FormSchemaBase, filterTarget, splitTarget, CustomStyle, enableDebug, disableDebug, envOverwrite };
|
|
54
|
+
export { clearStoresCache, updateEnv, Renderer, RendererProps, RenderOptions, RendererEnv, EnvContext, RegisterStore, registerStore, FormItem, FormItemWrap, FormItemProps, OptionsControl, FormRenderer, FormHorizontal, utils, getRendererByName, registerRenderer, unRegisterRenderer, getRenderers, loadAllAsyncRenderers, loadAsyncRenderersByType, loadAsyncRenderer, hasAsyncRenderers, registerFormItem, getFormItemByName, registerOptionsControl, resolveRenderer, filterSchema, Scoped, ScopedContext, IScopedContext, StatusScoped, setDefaultTheme, theme, themeable, ThemeProps, getTheme, classPrefix, getClassPrefix, classnames, makeClassnames, getDefaultLocale, setDefaultLocale, registerLocale, makeTranslator, extendLocale, removeLocaleData, localeable, LocaleProps, TranslateFn, ClassNamesFn, parse, lexer, Evaluator, AsyncEvaluator, FilterContext, filters, getFilters, registerFilter, extendsFilters, registerFunction, evaluate, evaluateForAsync, LazyComponent, Overlay, PopOver, ErrorBoundary, addSchemaFilter, OptionsControlProps, FormOptionsControl, FormControlProps, FormBaseControl, extendDefaultEnv, addRootWrapper, RendererConfig, styleMap, RENDERER_TRANSMISSION_OMIT_PROPS, ScopedComponentType, IItem, IColumn, IRow, IColumn2, IRow2, OnEventProps, FormSchemaBase, filterTarget, splitTarget, CustomStyle, enableDebug, disableDebug, envOverwrite };
|
|
55
55
|
export declare function render(schema: Schema, props?: RootRenderProps, options?: RenderOptions, pathPrefix?: string): JSX.Element;
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.9.0-rc.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -139,7 +139,7 @@ var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
|
|
|
139
139
|
(__react_jsx__["default"] || __react_jsx__).Fragment;
|
|
140
140
|
var classPrefix = theme.getClassPrefix();
|
|
141
141
|
// @ts-ignore
|
|
142
|
-
var version = '6.
|
|
142
|
+
var version = '6.9.0-rc.0';
|
|
143
143
|
function render(schema, props, options, pathPrefix) {
|
|
144
144
|
if (props === void 0) { props = {}; }
|
|
145
145
|
if (options === void 0) { options = {}; }
|
|
@@ -215,10 +215,15 @@ exports.extendDefaultEnv = factory.extendDefaultEnv;
|
|
|
215
215
|
exports.filterSchema = factory.filterSchema;
|
|
216
216
|
exports.getRendererByName = factory.getRendererByName;
|
|
217
217
|
exports.getRenderers = factory.getRenderers;
|
|
218
|
+
exports.loadAllAsyncRenderers = factory.loadAllAsyncRenderers;
|
|
219
|
+
exports.loadAsyncRenderer = factory.loadAsyncRenderer;
|
|
220
|
+
exports.loadAsyncRenderersByType = factory.loadAsyncRenderersByType;
|
|
218
221
|
exports.registerRenderer = factory.registerRenderer;
|
|
219
222
|
exports.resolveRenderer = factory.resolveRenderer;
|
|
220
223
|
exports.unRegisterRenderer = factory.unRegisterRenderer;
|
|
221
224
|
exports.updateEnv = factory.updateEnv;
|
|
225
|
+
exports.addApiRequestAdaptor = api.addApiRequestAdaptor;
|
|
226
|
+
exports.addApiResponseAdator = api.addApiResponseAdator;
|
|
222
227
|
exports.buildApi = api.buildApi;
|
|
223
228
|
exports.callStrFunction = api.callStrFunction;
|
|
224
229
|
exports.clearApiCache = api.clearApiCache;
|
|
@@ -232,6 +237,8 @@ exports.jsFetcher = api.jsFetcher;
|
|
|
232
237
|
exports.jsonpFetcher = api.jsonpFetcher;
|
|
233
238
|
exports.normalizeApi = api.normalizeApi;
|
|
234
239
|
exports.normalizeApiResponseData = api.normalizeApiResponseData;
|
|
240
|
+
exports.removeApiRequestAdaptor = api.removeApiRequestAdaptor;
|
|
241
|
+
exports.removeApiResponseAdaptor = api.removeApiResponseAdaptor;
|
|
235
242
|
exports.responseAdaptor = api.responseAdaptor;
|
|
236
243
|
exports.setApiCache = api.setApiCache;
|
|
237
244
|
exports.str2AsyncFunction = api.str2AsyncFunction;
|
|
@@ -473,6 +480,7 @@ exports.safeSub = math.safeSub;
|
|
|
473
480
|
exports.animation = Animation["default"];
|
|
474
481
|
exports.RegisterStore = index.RegisterStore;
|
|
475
482
|
exports.RendererStore = index.RendererStore;
|
|
483
|
+
exports.registerStore = index.registerStore;
|
|
476
484
|
exports.extendLocale = locale.extendLocale;
|
|
477
485
|
exports.getDefaultLocale = locale.getDefaultLocale;
|
|
478
486
|
exports.localeable = locale.localeable;
|
package/lib/locale.js
CHANGED
package/lib/polyfills.js
CHANGED
package/lib/renderers/Form.js
CHANGED
package/lib/renderers/Item.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.9.0-rc.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -567,7 +567,7 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
567
567
|
var labelAlign = (props.labelAlign !== 'inherit' && props.labelAlign) ||
|
|
568
568
|
props.formLabelAlign;
|
|
569
569
|
var labelWidth = props.labelWidth || props.formLabelWidth;
|
|
570
|
-
return (_J$X_("div", { "data-role": "form-item", className: cx("Form-item Form-item--horizontal", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
570
|
+
return (_J$X_("div", { "data-role": "form-item", "data-amis-name": props.name, className: cx("Form-item Form-item--horizontal", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
571
571
|
'Form-item--horizontal-justify': horizontal.justify
|
|
572
572
|
},
|
|
573
573
|
_a["is-error"] = model && !model.valid,
|
|
@@ -633,7 +633,7 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
633
633
|
var _a;
|
|
634
634
|
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; props.data; var showErrorMsg = props.showErrorMsg, mobileUI = props.mobileUI; props.translate; var isStatic = props.static, staticClassName = props.staticClassName, themeCss = props.themeCss, wrapperCustomStyle = props.wrapperCustomStyle, id = props.id;
|
|
635
635
|
description = description || desc;
|
|
636
|
-
return (_J$X_("div", { "data-role": "form-item", className: cx("Form-item Form-item--normal", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
636
|
+
return (_J$X_("div", { "data-role": "form-item", "data-amis-name": props.name, className: cx("Form-item Form-item--normal", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
637
637
|
'is-error': model && !model.valid
|
|
638
638
|
},
|
|
639
639
|
_a["is-required"] = required,
|
|
@@ -719,7 +719,7 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
719
719
|
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, descriptionClassName = props.descriptionClassName, captionClassName = props.captionClassName, model = props.formItem, remark = props.remark, labelRemark = props.labelRemark, env = props.env, hint = props.hint, renderLabel = props.renderLabel, renderDescription = props.renderDescription; props.data; var showErrorMsg = props.showErrorMsg, mobileUI = props.mobileUI; props.translate; var isStatic = props.static, staticClassName = props.staticClassName, themeCss = props.themeCss, wrapperCustomStyle = props.wrapperCustomStyle, id = props.id;
|
|
720
720
|
var labelWidth = props.labelWidth || props.formLabelWidth;
|
|
721
721
|
description = description || desc;
|
|
722
|
-
return (_J$X_("div", { "data-role": "form-item", className: cx("Form-item Form-item--inline", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
722
|
+
return (_J$X_("div", { "data-role": "form-item", "data-amis-name": props.name, className: cx("Form-item Form-item--inline", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
723
723
|
'is-error': model && !model.valid
|
|
724
724
|
},
|
|
725
725
|
_a["is-required"] = required,
|
|
@@ -775,7 +775,7 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
775
775
|
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; props.data; var showErrorMsg = props.showErrorMsg, mobileUI = props.mobileUI; props.translate; var isStatic = props.static, staticClassName = props.staticClassName, wrapperCustomStyle = props.wrapperCustomStyle, themeCss = props.themeCss, id = props.id;
|
|
776
776
|
description = description || desc;
|
|
777
777
|
var labelWidth = props.labelWidth || props.formLabelWidth;
|
|
778
|
-
return (_J$X_("div", { "data-role": "form-item", className: cx("Form-item Form-item--row", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
778
|
+
return (_J$X_("div", { "data-role": "form-item", "data-amis-name": props.name, className: cx("Form-item Form-item--row", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
779
779
|
'is-error': model && !model.valid
|
|
780
780
|
},
|
|
781
781
|
_a["is-required"] = required,
|
|
@@ -832,7 +832,7 @@ var FormItemWrap = /** @class */ (function (_super) {
|
|
|
832
832
|
props.formLabelAlign;
|
|
833
833
|
var labelWidth = props.labelWidth || props.formLabelWidth;
|
|
834
834
|
description = description || desc;
|
|
835
|
-
return (_J$X_("div", { "data-role": "form-item", className: cx("Form-item Form-item--flex", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
835
|
+
return (_J$X_("div", { "data-role": "form-item", "data-amis-name": props.name, className: cx("Form-item Form-item--flex", isStatic && staticClassName ? staticClassName : className, (_a = {
|
|
836
836
|
'is-error': model && !model.valid
|
|
837
837
|
},
|
|
838
838
|
_a["is-required"] = required,
|
|
@@ -138,9 +138,9 @@ export interface OptionsControlProps extends FormControlProps, Omit<FormOptionsC
|
|
|
138
138
|
deferLoad: (option: Option) => void;
|
|
139
139
|
leftDeferLoad: (option: Option, leftOptions: Option) => void;
|
|
140
140
|
expandTreeOptions: (nodePathArr: any[]) => void;
|
|
141
|
-
onAdd?: (idx?: number | Array<number>, value?: any, skipForm?: boolean) => void;
|
|
142
|
-
onEdit?: (value: Option, origin?: Option, skipForm?: boolean) => void;
|
|
143
|
-
onDelete?: (value: Option) => void;
|
|
141
|
+
onAdd?: (idx?: number | Array<number>, value?: any, skipForm?: boolean, callback?: (value: any) => any) => void;
|
|
142
|
+
onEdit?: (value: Option, origin?: Option, skipForm?: boolean, callback?: (value: any) => any) => void;
|
|
143
|
+
onDelete?: (value: Option, callback?: (value: any) => any) => void;
|
|
144
144
|
}
|
|
145
145
|
export interface OptionsProps extends FormControlProps, Omit<OptionProps, 'className'> {
|
|
146
146
|
source?: Api;
|
package/lib/renderers/Options.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.9.0-rc.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -534,12 +534,12 @@ function registerOptionsControl(config) {
|
|
|
534
534
|
var formItem = this.props.formItem;
|
|
535
535
|
formItem && formItem.setLoading(value);
|
|
536
536
|
};
|
|
537
|
-
FormOptionsItem.prototype.handleOptionAdd = function (idx, value, skipForm) {
|
|
537
|
+
FormOptionsItem.prototype.handleOptionAdd = function (idx, value, skipForm, callback) {
|
|
538
538
|
var _a, _b;
|
|
539
539
|
if (idx === void 0) { idx = -1; }
|
|
540
540
|
if (skipForm === void 0) { skipForm = false; }
|
|
541
541
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
542
|
-
var _c, addControls, addDialog, disabled, labelField, onOpenDialog, optionLabel, addApi, source, data, valueField, deferField, model, createBtnLabel, env, __, parent, ctx, customAddPrevent, result, _d, prevent, payload, e_1, isPrevented, options;
|
|
542
|
+
var _c, addControls, addDialog, disabled, labelField, onOpenDialog, optionLabel, addApi, source, data, valueField, deferField, model, createBtnLabel, env, __, parent, ctx, customAddPrevent, result, _d, prevent, payload, e_1, isPrevented, ret, options;
|
|
543
543
|
var _e;
|
|
544
544
|
var _this = this;
|
|
545
545
|
return tslib.__generator(this, function (_f) {
|
|
@@ -669,13 +669,24 @@ function registerOptionsControl(config) {
|
|
|
669
669
|
if (isPrevented) {
|
|
670
670
|
return [2 /*return*/];
|
|
671
671
|
}
|
|
672
|
-
|
|
673
|
-
(parent === null || parent === void 0 ? void 0 : parent.defer))) return [3 /*break*/, 13];
|
|
674
|
-
return [4 /*yield*/, this.deferLoad(parent)];
|
|
672
|
+
return [4 /*yield*/, (callback === null || callback === void 0 ? void 0 : callback(result))];
|
|
675
673
|
case 12:
|
|
676
|
-
_f.sent();
|
|
677
|
-
return [3 /*break*/,
|
|
674
|
+
ret = _f.sent();
|
|
675
|
+
if (!(ret === false)) return [3 /*break*/, 13];
|
|
676
|
+
// 如果回调里面返回 false,就不继续了。
|
|
677
|
+
return [2 /*return*/];
|
|
678
678
|
case 13:
|
|
679
|
+
if (!
|
|
680
|
+
// 如果是懒加载的,只懒加载当前节点。
|
|
681
|
+
(((parent === null || parent === void 0 ? void 0 : parent.hasOwnProperty(deferField)) && parent[deferField]) ||
|
|
682
|
+
(parent === null || parent === void 0 ? void 0 : parent.defer)))
|
|
683
|
+
// 如果是懒加载的,只懒加载当前节点。
|
|
684
|
+
return [3 /*break*/, 15];
|
|
685
|
+
return [4 /*yield*/, this.deferLoad(parent)];
|
|
686
|
+
case 14:
|
|
687
|
+
_f.sent();
|
|
688
|
+
return [3 /*break*/, 16];
|
|
689
|
+
case 15:
|
|
679
690
|
if (source && addApi) {
|
|
680
691
|
// 如果配置了 source 且配置了 addApi 直接重新拉取接口就够了
|
|
681
692
|
// 不能不判断 addApi 就刷新,因为有些场景就是临时添加的。
|
|
@@ -693,18 +704,18 @@ function registerOptionsControl(config) {
|
|
|
693
704
|
}
|
|
694
705
|
model.setOptions(options, this.changeOptionValue, data);
|
|
695
706
|
}
|
|
696
|
-
_f.label =
|
|
697
|
-
case
|
|
707
|
+
_f.label = 16;
|
|
708
|
+
case 16: return [2 /*return*/];
|
|
698
709
|
}
|
|
699
710
|
});
|
|
700
711
|
});
|
|
701
712
|
};
|
|
702
|
-
FormOptionsItem.prototype.handleOptionEdit = function (value, origin, skipForm) {
|
|
713
|
+
FormOptionsItem.prototype.handleOptionEdit = function (value, origin, skipForm, callback) {
|
|
703
714
|
var _a, _b;
|
|
704
715
|
if (origin === void 0) { origin = value; }
|
|
705
716
|
if (skipForm === void 0) { skipForm = false; }
|
|
706
717
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
707
|
-
var _c, editControls, editDialog, disabled, labelField, valueField, onOpenDialog, editApi, editInitApi, env, source, data, model, optionLabel, __, customEditPrevent, result, _d, prevent, payload, e_2, isPrevented, indexes;
|
|
718
|
+
var _c, editControls, editDialog, disabled, labelField, valueField, onOpenDialog, editApi, editInitApi, env, source, data, model, optionLabel, __, customEditPrevent, result, _d, prevent, payload, e_2, isPrevented, ret, indexes;
|
|
708
719
|
var _this = this;
|
|
709
720
|
return tslib.__generator(this, function (_e) {
|
|
710
721
|
switch (_e.label) {
|
|
@@ -813,7 +824,14 @@ function registerOptionsControl(config) {
|
|
|
813
824
|
if (isPrevented) {
|
|
814
825
|
return [2 /*return*/];
|
|
815
826
|
}
|
|
816
|
-
|
|
827
|
+
return [4 /*yield*/, (callback === null || callback === void 0 ? void 0 : callback(result))];
|
|
828
|
+
case 12:
|
|
829
|
+
ret = _e.sent();
|
|
830
|
+
if (ret === false) {
|
|
831
|
+
// 如果回调里面返回 false,就不继续了。
|
|
832
|
+
return [2 /*return*/];
|
|
833
|
+
}
|
|
834
|
+
else if (source && editApi) {
|
|
817
835
|
this.reload();
|
|
818
836
|
}
|
|
819
837
|
else {
|
|
@@ -827,10 +845,10 @@ function registerOptionsControl(config) {
|
|
|
827
845
|
});
|
|
828
846
|
});
|
|
829
847
|
};
|
|
830
|
-
FormOptionsItem.prototype.handleOptionDelete = function (value) {
|
|
848
|
+
FormOptionsItem.prototype.handleOptionDelete = function (value, callback) {
|
|
831
849
|
var _a, _b;
|
|
832
850
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
833
|
-
var _c, deleteConfirmText, disabled, data, deleteApi, onDelete, env, model, source, valueField, __, ctx, confirmed, _d, isPrevented, delConfirmPrevent, result, options, indexes, e_3;
|
|
851
|
+
var _c, deleteConfirmText, disabled, data, deleteApi, onDelete, env, model, source, valueField, __, ctx, confirmed, _d, isPrevented, delConfirmPrevent, result, ret, options, indexes, e_3;
|
|
834
852
|
return tslib.__generator(this, function (_e) {
|
|
835
853
|
switch (_e.label) {
|
|
836
854
|
case 0:
|
|
@@ -886,7 +904,12 @@ function registerOptionsControl(config) {
|
|
|
886
904
|
if (onDelete) {
|
|
887
905
|
onDelete(ctx);
|
|
888
906
|
}
|
|
889
|
-
|
|
907
|
+
ret = callback === null || callback === void 0 ? void 0 : callback(ctx);
|
|
908
|
+
if (ret === false) {
|
|
909
|
+
// 如果回调里面返回 false,就不继续了。
|
|
910
|
+
return [2 /*return*/];
|
|
911
|
+
}
|
|
912
|
+
else if (source) {
|
|
890
913
|
this.reload();
|
|
891
914
|
}
|
|
892
915
|
else {
|
|
@@ -1000,19 +1023,19 @@ function registerOptionsControl(config) {
|
|
|
1000
1023
|
tslib.__decorate([
|
|
1001
1024
|
helper.autobind,
|
|
1002
1025
|
tslib.__metadata("design:type", Function),
|
|
1003
|
-
tslib.__metadata("design:paramtypes", [Object, Object, Boolean]),
|
|
1026
|
+
tslib.__metadata("design:paramtypes", [Object, Object, Boolean, Function]),
|
|
1004
1027
|
tslib.__metadata("design:returntype", Promise)
|
|
1005
1028
|
], FormOptionsItem.prototype, "handleOptionAdd", null);
|
|
1006
1029
|
tslib.__decorate([
|
|
1007
1030
|
helper.autobind,
|
|
1008
1031
|
tslib.__metadata("design:type", Function),
|
|
1009
|
-
tslib.__metadata("design:paramtypes", [Object, Object, Boolean]),
|
|
1032
|
+
tslib.__metadata("design:paramtypes", [Object, Object, Boolean, Function]),
|
|
1010
1033
|
tslib.__metadata("design:returntype", Promise)
|
|
1011
1034
|
], FormOptionsItem.prototype, "handleOptionEdit", null);
|
|
1012
1035
|
tslib.__decorate([
|
|
1013
1036
|
helper.autobind,
|
|
1014
1037
|
tslib.__metadata("design:type", Function),
|
|
1015
|
-
tslib.__metadata("design:paramtypes", [Object]),
|
|
1038
|
+
tslib.__metadata("design:paramtypes", [Object, Function]),
|
|
1016
1039
|
tslib.__metadata("design:returntype", Promise)
|
|
1017
1040
|
], FormOptionsItem.prototype, "handleOptionDelete", null);
|
|
1018
1041
|
return FormOptionsItem;
|
package/lib/renderers/builtin.js
CHANGED
package/lib/store/app.js
CHANGED
package/lib/store/combo.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { SnapshotIn, Instance } from 'mobx-state-tree';
|
|
3
2
|
import type { IFormStore, IFormItemStore } from './form';
|
|
4
3
|
export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
@@ -172,7 +171,7 @@ export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
|
172
171
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
173
172
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
174
173
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
175
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
174
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
176
175
|
changeEmitedValue: (value: any) => void;
|
|
177
176
|
addSubFormItem: (item: {
|
|
178
177
|
id: string;
|
|
@@ -707,7 +706,7 @@ export declare const UniqueGroup: import("mobx-state-tree").IModelType<{
|
|
|
707
706
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
708
707
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
709
708
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
710
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
709
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
711
710
|
changeEmitedValue: (value: any) => void;
|
|
712
711
|
addSubFormItem: (item: {
|
|
713
712
|
id: string;
|
|
@@ -1276,7 +1275,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
1276
1275
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
1277
1276
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
1278
1277
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
1279
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1278
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
1280
1279
|
changeEmitedValue: (value: any) => void;
|
|
1281
1280
|
addSubFormItem: (item: {
|
|
1282
1281
|
id: string;
|
|
@@ -1811,7 +1810,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
1811
1810
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
1812
1811
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
1813
1812
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
1814
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
1813
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
1815
1814
|
changeEmitedValue: (value: any) => void;
|
|
1816
1815
|
addSubFormItem: (item: {
|
|
1817
1816
|
id: string;
|
|
@@ -2471,7 +2470,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
2471
2470
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
2472
2471
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
2473
2472
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
2474
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
2473
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
2475
2474
|
changeEmitedValue: (value: any) => void;
|
|
2476
2475
|
addSubFormItem: (item: {
|
|
2477
2476
|
id: string;
|
|
@@ -3006,7 +3005,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
3006
3005
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
3007
3006
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
3008
3007
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
3009
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3008
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
3010
3009
|
changeEmitedValue: (value: any) => void;
|
|
3011
3010
|
addSubFormItem: (item: {
|
|
3012
3011
|
id: string;
|
|
@@ -3545,7 +3544,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
3545
3544
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
3546
3545
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
3547
3546
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
3548
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
3547
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
3549
3548
|
changeEmitedValue: (value: any) => void;
|
|
3550
3549
|
addSubFormItem: (item: {
|
|
3551
3550
|
id: string;
|
|
@@ -4080,7 +4079,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
4080
4079
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
4081
4080
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
4082
4081
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
4083
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4082
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
4084
4083
|
changeEmitedValue: (value: any) => void;
|
|
4085
4084
|
addSubFormItem: (item: {
|
|
4086
4085
|
id: string;
|
|
@@ -4624,7 +4623,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
4624
4623
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
4625
4624
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
4626
4625
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
4627
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
4626
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
4628
4627
|
changeEmitedValue: (value: any) => void;
|
|
4629
4628
|
addSubFormItem: (item: {
|
|
4630
4629
|
id: string;
|
|
@@ -5159,7 +5158,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
5159
5158
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
5160
5159
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
5161
5160
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
5162
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
5161
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
5163
5162
|
changeEmitedValue: (value: any) => void;
|
|
5164
5163
|
addSubFormItem: (item: {
|
|
5165
5164
|
id: string;
|
|
@@ -5698,7 +5697,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
5698
5697
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
5699
5698
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
5700
5699
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
5701
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
5700
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
5702
5701
|
changeEmitedValue: (value: any) => void;
|
|
5703
5702
|
addSubFormItem: (item: {
|
|
5704
5703
|
id: string;
|
|
@@ -6233,7 +6232,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
6233
6232
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
6234
6233
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
6235
6234
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
6236
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
6235
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
6237
6236
|
changeEmitedValue: (value: any) => void;
|
|
6238
6237
|
addSubFormItem: (item: {
|
|
6239
6238
|
id: string;
|
|
@@ -6772,7 +6771,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
6772
6771
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
6773
6772
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
6774
6773
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
6775
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
6774
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
6776
6775
|
changeEmitedValue: (value: any) => void;
|
|
6777
6776
|
addSubFormItem: (item: {
|
|
6778
6777
|
id: string;
|
|
@@ -7307,7 +7306,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7307
7306
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
7308
7307
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
7309
7308
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
7310
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
7309
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
7311
7310
|
changeEmitedValue: (value: any) => void;
|
|
7312
7311
|
addSubFormItem: (item: {
|
|
7313
7312
|
id: string;
|
|
@@ -7968,7 +7967,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
7968
7967
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
7969
7968
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
7970
7969
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
7971
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
7970
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
7972
7971
|
changeEmitedValue: (value: any) => void;
|
|
7973
7972
|
addSubFormItem: (item: {
|
|
7974
7973
|
id: string;
|
|
@@ -8503,7 +8502,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
8503
8502
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
8504
8503
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
8505
8504
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
8506
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
8505
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
8507
8506
|
changeEmitedValue: (value: any) => void;
|
|
8508
8507
|
addSubFormItem: (item: {
|
|
8509
8508
|
id: string;
|
|
@@ -9042,7 +9041,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
9042
9041
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
9043
9042
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
9044
9043
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
9045
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
9044
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
9046
9045
|
changeEmitedValue: (value: any) => void;
|
|
9047
9046
|
addSubFormItem: (item: {
|
|
9048
9047
|
id: string;
|
|
@@ -9577,7 +9576,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
9577
9576
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
9578
9577
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
9579
9578
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
9580
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
9579
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
9581
9580
|
changeEmitedValue: (value: any) => void;
|
|
9582
9581
|
addSubFormItem: (item: {
|
|
9583
9582
|
id: string;
|
|
@@ -10121,7 +10120,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
10121
10120
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
10122
10121
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
10123
10122
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
10124
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
10123
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
10125
10124
|
changeEmitedValue: (value: any) => void;
|
|
10126
10125
|
addSubFormItem: (item: {
|
|
10127
10126
|
id: string;
|
|
@@ -10656,7 +10655,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
10656
10655
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
10657
10656
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
10658
10657
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
10659
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
10658
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
10660
10659
|
changeEmitedValue: (value: any) => void;
|
|
10661
10660
|
addSubFormItem: (item: {
|
|
10662
10661
|
id: string;
|
|
@@ -11195,7 +11194,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
11195
11194
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
11196
11195
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
11197
11196
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
11198
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
11197
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
11199
11198
|
changeEmitedValue: (value: any) => void;
|
|
11200
11199
|
addSubFormItem: (item: {
|
|
11201
11200
|
id: string;
|
|
@@ -11730,7 +11729,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
11730
11729
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
11731
11730
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
11732
11731
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
11733
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
11732
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
11734
11733
|
changeEmitedValue: (value: any) => void;
|
|
11735
11734
|
addSubFormItem: (item: {
|
|
11736
11735
|
id: string;
|
|
@@ -12269,7 +12268,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
12269
12268
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
12270
12269
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
12271
12270
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
12272
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
12271
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
12273
12272
|
changeEmitedValue: (value: any) => void;
|
|
12274
12273
|
addSubFormItem: (item: {
|
|
12275
12274
|
id: string;
|
|
@@ -12804,7 +12803,7 @@ export declare const ComboStore: import("mobx-state-tree").IModelType<{
|
|
|
12804
12803
|
closeDialog: (confirmed?: any, result?: any) => void;
|
|
12805
12804
|
openPopOver: (schema: any, ctx: any, callback?: ((confirmed?: any, value?: any) => void) | undefined) => void;
|
|
12806
12805
|
closePopOver: (confirmed?: any, result?: any) => void;
|
|
12807
|
-
changeTmpValue: (value: any, changeReason?: "input" | "
|
|
12806
|
+
changeTmpValue: (value: any, changeReason?: "input" | "defaultValue" | "formInited" | "initialValue" | "dataChanged" | "formulaChanged" | "controlled" | undefined) => void;
|
|
12808
12807
|
changeEmitedValue: (value: any) => void;
|
|
12809
12808
|
addSubFormItem: (item: {
|
|
12810
12809
|
id: string;
|
package/lib/store/combo.js
CHANGED
package/lib/store/crud.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.
|
|
2
|
+
* amis-core v6.9.0-rc.0
|
|
3
3
|
* Copyright 2018-2024 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -561,7 +561,7 @@ var CRUDStore = service.ServiceStore.named('CRUDStore')
|
|
|
561
561
|
}
|
|
562
562
|
_b.label = 2;
|
|
563
563
|
case 2:
|
|
564
|
-
Promise.resolve().then(function() {return new Promise(function(fullfill) {require(['papaparse'], function(mod) {fullfill(tslib.__importStar(mod))})})}).then(function (papaparse) {
|
|
564
|
+
Promise.resolve().then(function() {return new Promise(function(fullfill) {require(['papaparse', "tslib"], function(mod, tslib) {fullfill(tslib.__importStar(mod))})})}).then(function (papaparse) {
|
|
565
565
|
var e_4, _a;
|
|
566
566
|
// 将数据里的对象转成 json 字符串,不然输出的 csv 没法显示
|
|
567
567
|
var csvData = [];
|