amis-core 6.14.0-beta.4 → 6.14.0-beta.5
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 -1
- package/esm/Scoped.js +2 -1
- package/esm/StatusScoped.js +1 -1
- package/esm/StyleManager.js +1 -1
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +1 -1
- package/esm/actions/Action.js +2 -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 +2 -1
- package/esm/actions/DialogAction.js +2 -1
- package/esm/actions/DrawerAction.js +2 -1
- package/esm/actions/EmailAction.js +1 -1
- package/esm/actions/EventAction.js +2 -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/Animations.js +2 -1
- package/esm/components/CustomStyle.js +60 -33
- package/esm/components/ErrorBoundary.js +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.js +2 -1
- package/esm/components/PopOver.js +2 -1
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.js +1 -1
- package/esm/globalVar.js +1 -1
- package/esm/globalVarClientHandler.js +1 -1
- package/esm/globalVarDefaultValueHandler.js +1 -1
- package/esm/index.js +5 -5
- package/esm/locale.js +1 -1
- package/esm/polyfills.js +1 -1
- package/esm/renderers/Form.js +1 -1
- package/esm/renderers/Item.js +1 -1
- package/esm/renderers/Options.d.ts +3 -2
- package/esm/renderers/Options.js +57 -5
- 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 +2 -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 +2 -1
- package/esm/store/index.js +1 -1
- 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 +2 -1
- package/esm/store/service.js +2 -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/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 +13 -3
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/animations.js +1 -1
- package/esm/utils/api.js +1 -1
- 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 +2 -2
- 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/getPageId.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 +2 -2
- package/esm/utils/helper.js +3 -3
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/index.js +2 -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/loopTooMuch.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.d.ts +5 -1
- package/esm/utils/style-helper.js +30 -13
- 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 +1 -1
- package/lib/SchemaRenderer.js +2 -1
- package/lib/Scoped.js +2 -1
- package/lib/StatusScoped.js +1 -1
- package/lib/StyleManager.js +1 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/actions/Action.js +2 -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 +2 -1
- package/lib/actions/DialogAction.js +2 -1
- package/lib/actions/DrawerAction.js +2 -1
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/EventAction.js +2 -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/Animations.js +2 -1
- package/lib/components/CustomStyle.js +62 -31
- package/lib/components/ErrorBoundary.js +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.js +2 -1
- package/lib/components/PopOver.js +2 -1
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.js +1 -1
- package/lib/globalVar.js +1 -1
- package/lib/globalVarClientHandler.js +1 -1
- package/lib/globalVarDefaultValueHandler.js +1 -1
- package/lib/index.js +5 -4
- package/lib/locale.js +1 -1
- package/lib/polyfills.js +1 -1
- package/lib/renderers/Form.js +1 -1
- package/lib/renderers/Item.js +1 -1
- package/lib/renderers/Options.d.ts +3 -2
- package/lib/renderers/Options.js +57 -5
- 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 +2 -1
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.js +1 -1
- package/lib/store/form.js +1 -1
- package/lib/store/formItem.js +1 -1
- package/lib/store/iRenderer.js +2 -1
- package/lib/store/index.js +1 -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.js +2 -1
- package/lib/store/service.js +2 -1
- package/lib/store/status.js +1 -1
- package/lib/store/table.js +1 -1
- package/lib/store/table2.js +1 -1
- package/lib/theme.js +1 -1
- 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 +13 -2
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/animations.js +1 -1
- package/lib/utils/api.js +1 -1
- 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 +1 -1
- package/lib/utils/decodeEntity.js +1 -1
- package/lib/utils/dom.js +2 -2
- 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/getPageId.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 +2 -2
- package/lib/utils/helper.js +3 -3
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/index.js +2 -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/loopTooMuch.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.d.ts +5 -1
- package/lib/utils/style-helper.js +31 -12
- 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/esm/renderers/Options.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -17,9 +17,9 @@ import { normalizeOptions } from '../utils/normalizeOptions.js';
|
|
|
17
17
|
import { optionValueCompare } from '../utils/optionValueCompare.js';
|
|
18
18
|
import '../utils/index.js';
|
|
19
19
|
import { extendObject, createObject, setVariable } from '../utils/object.js';
|
|
20
|
+
import { resolveEventData } from '../utils/renderer-event.js';
|
|
20
21
|
import { isPureVariable } from '../utils/isPureVariable.js';
|
|
21
22
|
import { resolveVariableAndFilter } from '../utils/resolveVariableAndFilter.js';
|
|
22
|
-
import { resolveEventData } from '../utils/renderer-event.js';
|
|
23
23
|
|
|
24
24
|
var detectProps = detectProps$1.concat([
|
|
25
25
|
'value',
|
|
@@ -125,6 +125,30 @@ var OptionsControlBase = /** @class */ (function (_super) {
|
|
|
125
125
|
}
|
|
126
126
|
return false;
|
|
127
127
|
};
|
|
128
|
+
OptionsControlBase.prototype.onLoadOptionsFinished = function () {
|
|
129
|
+
var _a, _b;
|
|
130
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
+
var _c, options, _d, selectedOptions, multiple, tmpValue, dispatchEvent_1;
|
|
132
|
+
return __generator(this, function (_e) {
|
|
133
|
+
switch (_e.label) {
|
|
134
|
+
case 0:
|
|
135
|
+
if (!((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.dispatchEvent)) return [3 /*break*/, 2];
|
|
136
|
+
_c = this.props.formItem || {}, options = _c.options, _d = _c.selectedOptions, selectedOptions = _d === void 0 ? [] : _d, multiple = _c.multiple, tmpValue = _c.tmpValue;
|
|
137
|
+
dispatchEvent_1 = this.input.props.dispatchEvent;
|
|
138
|
+
return [4 /*yield*/, dispatchEvent_1('loadOptionsFinished', resolveEventData(this.props, {
|
|
139
|
+
options: options,
|
|
140
|
+
items: options,
|
|
141
|
+
value: tmpValue,
|
|
142
|
+
selectedItems: multiple ? selectedOptions : selectedOptions[0]
|
|
143
|
+
}))];
|
|
144
|
+
case 1:
|
|
145
|
+
_e.sent();
|
|
146
|
+
_e.label = 2;
|
|
147
|
+
case 2: return [2 /*return*/];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
};
|
|
128
152
|
OptionsControlBase.prototype.componentDidUpdate = function (prevProps) {
|
|
129
153
|
var _this = this;
|
|
130
154
|
var props = this.props;
|
|
@@ -149,8 +173,18 @@ var OptionsControlBase = /** @class */ (function (_super) {
|
|
|
149
173
|
else if (isEffectiveApi(props.source, props.data) &&
|
|
150
174
|
isApiOutdated(prevProps.source, props.source, prevProps.data, props.data)) {
|
|
151
175
|
formItem
|
|
152
|
-
.loadOptions(props.source, props.data, undefined, true, this.changeOptionValue)
|
|
153
|
-
.then(function () { return _this.normalizeValue(); })
|
|
176
|
+
.loadOptions(props.source, props.data, undefined, true, this.changeOptionValue, undefined)
|
|
177
|
+
.then(function () { return _this.normalizeValue(); })
|
|
178
|
+
.then(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
179
|
+
return __generator(this, function (_a) {
|
|
180
|
+
switch (_a.label) {
|
|
181
|
+
case 0: return [4 /*yield*/, this.onLoadOptionsFinished()];
|
|
182
|
+
case 1:
|
|
183
|
+
_a.sent();
|
|
184
|
+
return [2 /*return*/];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}); });
|
|
154
188
|
}
|
|
155
189
|
}
|
|
156
190
|
if (prevProps.value !== props.value || (formItem === null || formItem === void 0 ? void 0 : formItem.expressionsInOptions)) {
|
|
@@ -383,6 +417,7 @@ var OptionsControlBase = /** @class */ (function (_super) {
|
|
|
383
417
|
return this.reloadOptions(false, false, data);
|
|
384
418
|
};
|
|
385
419
|
OptionsControlBase.prototype.reloadOptions = function (setError, isInit, data) {
|
|
420
|
+
var _this = this;
|
|
386
421
|
if (isInit === void 0) { isInit = false; }
|
|
387
422
|
if (data === void 0) { data = this.props.data; }
|
|
388
423
|
var _a = this.props, source = _a.source, formItem = _a.formItem, onChange = _a.onChange, setPrinstineValue = _a.setPrinstineValue, valueField = _a.valueField;
|
|
@@ -395,7 +430,18 @@ var OptionsControlBase = /** @class */ (function (_super) {
|
|
|
395
430
|
return;
|
|
396
431
|
}
|
|
397
432
|
return isAlive(formItem)
|
|
398
|
-
? formItem
|
|
433
|
+
? formItem
|
|
434
|
+
.loadOptions(source, data, undefined, false, isInit ? setPrinstineValue : onChange, setError)
|
|
435
|
+
.then(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
436
|
+
return __generator(this, function (_a) {
|
|
437
|
+
switch (_a.label) {
|
|
438
|
+
case 0: return [4 /*yield*/, this.onLoadOptionsFinished()];
|
|
439
|
+
case 1:
|
|
440
|
+
_a.sent();
|
|
441
|
+
return [2 /*return*/];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
}); })
|
|
399
445
|
: undefined;
|
|
400
446
|
};
|
|
401
447
|
OptionsControlBase.prototype.deferLoad = function (option) {
|
|
@@ -896,6 +942,12 @@ var OptionsControlBase = /** @class */ (function (_super) {
|
|
|
896
942
|
? formItem.getSelectedOptions(value, enableNodePath ? nodeValueArray : undefined)
|
|
897
943
|
: [], nodePath: nodePathArray, loading: formItem ? formItem.loading : false, setLoading: this.setLoading, setOptions: this.setOptions, syncOptions: this.syncOptions, reloadOptions: this.reload, deferLoad: this.deferLoad, leftDeferLoad: this.leftDeferLoad, expandTreeOptions: this.expandTreeOptions, creatable: creatable !== false && isEffectiveApi(addApi) ? true : creatable, editable: editable || (editable !== false && isEffectiveApi(editApi)), removable: removable || (removable !== false && isEffectiveApi(deleteApi)), onAdd: this.handleOptionAdd, onEdit: this.handleOptionEdit, onDelete: this.handleOptionDelete })));
|
|
898
944
|
};
|
|
945
|
+
__decorate([
|
|
946
|
+
autobind,
|
|
947
|
+
__metadata("design:type", Function),
|
|
948
|
+
__metadata("design:paramtypes", []),
|
|
949
|
+
__metadata("design:returntype", Promise)
|
|
950
|
+
], OptionsControlBase.prototype, "onLoadOptionsFinished", null);
|
|
899
951
|
__decorate([
|
|
900
952
|
autobind,
|
|
901
953
|
__metadata("design:type", Function),
|
package/esm/renderers/builtin.js
CHANGED
package/esm/store/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -43,6 +43,7 @@ import 'lodash/cloneDeep';
|
|
|
43
43
|
import 'lodash/map';
|
|
44
44
|
import 'lodash/isEmpty';
|
|
45
45
|
import 'lodash/kebabCase';
|
|
46
|
+
import 'lodash/some';
|
|
46
47
|
import 'uncontrollable';
|
|
47
48
|
import 'hoist-non-react-statics';
|
|
48
49
|
import '../utils/validations.js';
|
package/esm/store/combo.js
CHANGED
package/esm/store/crud.js
CHANGED
package/esm/store/form.js
CHANGED
package/esm/store/formItem.js
CHANGED
package/esm/store/iRenderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -46,6 +46,7 @@ import 'lodash/cloneDeep';
|
|
|
46
46
|
import 'lodash/map';
|
|
47
47
|
import 'lodash/isEmpty';
|
|
48
48
|
import 'lodash/kebabCase';
|
|
49
|
+
import 'lodash/some';
|
|
49
50
|
import 'uncontrollable';
|
|
50
51
|
import 'hoist-non-react-statics';
|
|
51
52
|
import '../utils/validations.js';
|
package/esm/store/index.js
CHANGED
package/esm/store/list.js
CHANGED
package/esm/store/manager.js
CHANGED
package/esm/store/modal.js
CHANGED
package/esm/store/node.js
CHANGED
package/esm/store/pagination.js
CHANGED
package/esm/store/root.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -43,6 +43,7 @@ import 'lodash/cloneDeep';
|
|
|
43
43
|
import 'lodash/map';
|
|
44
44
|
import 'lodash/isEmpty';
|
|
45
45
|
import 'lodash/kebabCase';
|
|
46
|
+
import 'lodash/some';
|
|
46
47
|
import 'uncontrollable';
|
|
47
48
|
import 'hoist-non-react-statics';
|
|
48
49
|
import '../utils/validations.js';
|
package/esm/store/service.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -46,6 +46,7 @@ import 'lodash/cloneDeep';
|
|
|
46
46
|
import 'lodash/map';
|
|
47
47
|
import 'lodash/isEmpty';
|
|
48
48
|
import 'lodash/kebabCase';
|
|
49
|
+
import 'lodash/some';
|
|
49
50
|
import 'uncontrollable';
|
|
50
51
|
import 'hoist-non-react-statics';
|
|
51
52
|
import '../utils/validations.js';
|
package/esm/store/status.js
CHANGED
package/esm/store/table.js
CHANGED
package/esm/store/table2.js
CHANGED
package/esm/theme.js
CHANGED
package/esm/utils/Animation.js
CHANGED
package/esm/utils/ColorScale.js
CHANGED
package/esm/utils/DataSchema.js
CHANGED
package/esm/utils/DataScope.js
CHANGED
package/esm/utils/RootClose.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { __rest, __read } from 'tslib';
|
|
7
|
-
import { useState } from 'react';
|
|
7
|
+
import React, { useState } from 'react';
|
|
8
8
|
import useRootClose from 'react-overlays/useRootClose';
|
|
9
9
|
import { findDOMNode } from 'react-dom';
|
|
10
10
|
|
|
@@ -15,7 +15,17 @@ var RootClose = function (_a) {
|
|
|
15
15
|
var children = _a.children, onRootClose = _a.onRootClose, props = __rest(_a, ["children", "onRootClose"]);
|
|
16
16
|
var _b = __read(useState(null), 2), rootComponent = _b[0], attachRef = _b[1];
|
|
17
17
|
var rootElement = findDOMNode(rootComponent);
|
|
18
|
-
|
|
18
|
+
var onClose = React.useCallback(function (e) {
|
|
19
|
+
var target = e.target;
|
|
20
|
+
var belongedModal = target.closest('[role=dialog]');
|
|
21
|
+
if (!target.isConnected || // 如果不在文档树中,忽略
|
|
22
|
+
(rootElement && belongedModal && !belongedModal.contains(rootElement)) // 如果点击的是 modal 里面的,但是 rootElement 不在 modal 里面,忽略
|
|
23
|
+
) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
onRootClose && onRootClose(e);
|
|
27
|
+
}, [rootComponent, onRootClose]);
|
|
28
|
+
useRootClose(rootElement, onClose, props);
|
|
19
29
|
return typeof children === 'function' ? children(attachRef) : children;
|
|
20
30
|
};
|
|
21
31
|
|
package/esm/utils/SimpleMap.js
CHANGED
package/esm/utils/animations.js
CHANGED
package/esm/utils/api.js
CHANGED
package/esm/utils/arraySlice.js
CHANGED
package/esm/utils/autobind.js
CHANGED
package/esm/utils/browser.js
CHANGED
package/esm/utils/concatData.js
CHANGED
package/esm/utils/dataMapping.js
CHANGED
package/esm/utils/date.js
CHANGED
package/esm/utils/debug.js
CHANGED
package/esm/utils/dom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -77,7 +77,7 @@ function calculatePosition(placement, overlayNode, target, container, padding, c
|
|
|
77
77
|
var clip2 = overlayNode.getBoundingClientRect();
|
|
78
78
|
var clip3 = scrollParent.getBoundingClientRect();
|
|
79
79
|
var scaleX = overlayNode.offsetWidth
|
|
80
|
-
? clip2.width / overlayNode.offsetWidth
|
|
80
|
+
? Math.ceil(clip2.width) / overlayNode.offsetWidth
|
|
81
81
|
: 1;
|
|
82
82
|
var scaleY = overlayNode.offsetHeight
|
|
83
83
|
? clip2.height / overlayNode.offsetHeight
|
package/esm/utils/errors.js
CHANGED
package/esm/utils/escapeHtml.js
CHANGED
package/esm/utils/filter.js
CHANGED
package/esm/utils/formula.js
CHANGED
package/esm/utils/getPageId.js
CHANGED
package/esm/utils/getVariable.js
CHANGED
package/esm/utils/grammar.js
CHANGED
package/esm/utils/helper.d.ts
CHANGED
|
@@ -23,9 +23,9 @@ export declare function injectPropsToObject(target: any, props: any): any;
|
|
|
23
23
|
export declare function isSuperDataModified(data: any, prevData: any, store: IIRendererStore): boolean;
|
|
24
24
|
export declare function syncDataFromSuper(data: any, superObject: any, prevSuperObject: any, store: IIRendererStore, force: boolean): any;
|
|
25
25
|
/**
|
|
26
|
-
* 生成
|
|
26
|
+
* 生成 12 位随机数字。
|
|
27
27
|
*
|
|
28
|
-
* @return {string}
|
|
28
|
+
* @return {string} 12位随机数字
|
|
29
29
|
*/
|
|
30
30
|
export declare function guid(): string;
|
|
31
31
|
export declare function findIndex(arr: Array<any>, detect: (item?: any, index?: number) => boolean): number;
|
package/esm/utils/helper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core v6.14.0-beta.
|
|
2
|
+
* amis-core v6.14.0-beta.5
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -113,9 +113,9 @@ function syncDataFromSuper(data, superObject, prevSuperObject, store, force) {
|
|
|
113
113
|
return obj;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* 生成
|
|
116
|
+
* 生成 12 位随机数字。
|
|
117
117
|
*
|
|
118
|
-
* @return {string}
|
|
118
|
+
* @return {string} 12位随机数字
|
|
119
119
|
*/
|
|
120
120
|
function guid() {
|
|
121
121
|
function s4() {
|
package/esm/utils/highlight.js
CHANGED
package/esm/utils/icon.js
CHANGED
package/esm/utils/image.js
CHANGED