amis-core 2.9.0 → 3.1.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.d.ts +89 -4
- package/esm/Root.js +15 -4
- package/esm/RootRenderer.d.ts +3 -1
- package/esm/RootRenderer.js +9 -3
- package/esm/SchemaRenderer.d.ts +4 -2
- package/esm/SchemaRenderer.js +32 -24
- package/esm/Scoped.d.ts +8 -0
- package/esm/Scoped.js +20 -5
- package/esm/StatusScoped.d.ts +58 -0
- package/esm/StatusScoped.js +54 -0
- package/esm/WithRootStore.d.ts +2 -2
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +6 -2
- package/esm/actions/Action.d.ts +1 -0
- package/esm/actions/Action.js +19 -5
- 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 +8 -7
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +1 -1
- package/esm/actions/CustomAction.js +4 -4
- package/esm/actions/DialogAction.d.ts +16 -2
- package/esm/actions/DialogAction.js +23 -7
- 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/CustomStyle.d.ts +13 -0
- package/esm/components/CustomStyle.js +18 -0
- package/esm/components/LazyComponent.d.ts +1 -1
- package/esm/components/LazyComponent.js +1 -1
- package/esm/components/Overlay.d.ts +3 -3
- package/esm/components/Overlay.js +1 -1
- package/esm/components/PopOver.d.ts +2 -2
- package/esm/components/PopOver.js +1 -1
- package/esm/env.d.ts +10 -2
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -5
- package/esm/factory.d.ts +5 -3
- package/esm/factory.js +3 -3
- package/esm/index.d.ts +11 -4
- package/esm/index.js +55 -33
- package/esm/locale.d.ts +2 -2
- package/esm/locale.js +10 -3
- package/esm/renderers/Form.d.ts +3 -2
- package/esm/renderers/Form.js +216 -180
- package/esm/renderers/Item.d.ts +55 -41
- package/esm/renderers/Item.js +30 -19
- package/esm/renderers/Options.js +11 -4
- package/esm/renderers/Placeholder.js +1 -1
- package/esm/renderers/builtin.js +1 -1
- package/esm/renderers/register.js +1 -1
- package/esm/renderers/wrapControl.d.ts +2 -2
- package/esm/renderers/wrapControl.js +13 -16
- package/esm/store/app.d.ts +1 -0
- package/esm/store/app.js +1 -1
- package/esm/store/combo.d.ts +3 -0
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +2 -0
- package/esm/store/crud.js +31 -9
- package/esm/store/form.d.ts +1 -0
- package/esm/store/form.js +10 -4
- package/esm/store/formItem.js +2 -2
- package/esm/store/iRenderer.d.ts +1 -0
- package/esm/store/iRenderer.js +54 -13
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +1 -0
- package/esm/store/list.js +7 -3
- package/esm/store/manager.js +1 -1
- package/esm/store/modal.d.ts +1 -0
- package/esm/store/modal.js +1 -1
- package/esm/store/node.js +1 -1
- package/esm/store/pagination.d.ts +1 -0
- package/esm/store/pagination.js +2 -2
- package/esm/store/root.d.ts +4 -6
- package/esm/store/root.js +53 -24
- package/esm/store/service.d.ts +1 -0
- package/esm/store/service.js +1 -1
- package/esm/store/status.d.ts +12 -0
- package/esm/store/status.js +38 -0
- package/esm/store/table.d.ts +28 -23
- package/esm/store/table.js +26 -5
- package/esm/store/table2.d.ts +7 -6
- package/esm/store/table2.js +27 -23
- package/esm/theme.d.ts +1 -1
- package/esm/theme.js +1 -1
- package/esm/types.d.ts +7 -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.d.ts +3 -5
- package/esm/utils/DataScope.js +88 -31
- package/esm/utils/RootClose.js +1 -1
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/api.js +14 -5
- package/esm/utils/attachmentAdpator.js +2 -2
- 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.d.ts +7 -0
- package/esm/utils/date.js +34 -2
- package/esm/utils/debug.js +4 -4
- package/esm/utils/decodeEntity.js +1 -1
- package/esm/utils/dom.d.ts +3 -0
- package/esm/utils/dom.js +47 -10
- 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 +2 -2
- package/esm/utils/getVariable.js +1 -1
- package/esm/utils/grammar.js +3 -3
- package/esm/utils/handleAction.js +1 -1
- package/esm/utils/helper.d.ts +9 -2
- package/esm/utils/helper.js +52 -20
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.d.ts +6 -1
- package/esm/utils/icon.js +6 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/isPureVariable.js +3 -3
- package/esm/utils/json-schema-2-amis-schema.js +1 -1
- package/esm/utils/keyToPath.js +1 -1
- package/esm/utils/makeSorter.js +1 -1
- package/esm/utils/memoryParse.d.ts +17 -0
- package/esm/utils/memoryParse.js +26 -0
- package/esm/utils/normalizeLink.js +1 -1
- package/esm/utils/normalizeOptions.js +4 -2
- package/esm/utils/object.d.ts +2 -0
- package/esm/utils/object.js +27 -2
- 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 +35 -32
- package/esm/utils/replaceText.js +1 -1
- package/esm/utils/resize-sensor.js +1 -1
- package/esm/utils/resolveCondition.d.ts +1 -0
- package/esm/utils/resolveCondition.js +19 -4
- package/esm/utils/resolveVariable.js +4 -3
- package/esm/utils/resolveVariableAndFilter.js +1 -1
- package/esm/utils/resolveVariableAndFilterForAsync.d.ts +6 -1
- package/esm/utils/resolveVariableAndFilterForAsync.js +23 -5
- 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 +12 -4
- package/esm/utils/style-helper.js +96 -19
- package/esm/utils/style.js +2 -2
- package/esm/utils/toNumber.js +1 -1
- package/esm/utils/tokenize.js +1 -1
- package/esm/utils/tpl-builtin.d.ts +2 -1
- package/esm/utils/tpl-builtin.js +19 -2
- package/esm/utils/tpl-lodash.js +3 -2
- package/esm/utils/tpl.d.ts +2 -0
- package/esm/utils/tpl.js +24 -2
- package/esm/utils/uncontrollable.js +1 -1
- package/esm/utils/validations.d.ts +4 -1
- package/esm/utils/validations.js +27 -12
- package/lib/Root.d.ts +89 -4
- package/lib/Root.js +15 -4
- package/lib/RootRenderer.d.ts +3 -1
- package/lib/RootRenderer.js +8 -2
- package/lib/SchemaRenderer.d.ts +4 -2
- package/lib/SchemaRenderer.js +32 -23
- package/lib/Scoped.d.ts +8 -0
- package/lib/Scoped.js +20 -4
- package/lib/StatusScoped.d.ts +58 -0
- package/lib/StatusScoped.js +63 -0
- package/lib/WithRootStore.d.ts +2 -2
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +6 -2
- package/lib/actions/Action.d.ts +1 -0
- package/lib/actions/Action.js +19 -5
- 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 +8 -7
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +1 -1
- package/lib/actions/CustomAction.js +4 -4
- package/lib/actions/DialogAction.d.ts +16 -2
- package/lib/actions/DialogAction.js +23 -7
- 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/CustomStyle.d.ts +13 -0
- package/lib/components/CustomStyle.js +22 -0
- package/lib/components/LazyComponent.d.ts +1 -1
- package/lib/components/LazyComponent.js +1 -1
- package/lib/components/Overlay.d.ts +3 -3
- package/lib/components/Overlay.js +1 -1
- package/lib/components/PopOver.d.ts +2 -2
- package/lib/components/PopOver.js +1 -1
- package/lib/env.d.ts +10 -2
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -5
- package/lib/factory.d.ts +5 -3
- package/lib/factory.js +3 -3
- package/lib/index.d.ts +11 -4
- package/lib/index.js +61 -23
- package/lib/locale.d.ts +2 -2
- package/lib/locale.js +10 -3
- package/lib/renderers/Form.d.ts +3 -2
- package/lib/renderers/Form.js +215 -179
- package/lib/renderers/Item.d.ts +55 -41
- package/lib/renderers/Item.js +30 -19
- package/lib/renderers/Options.js +11 -4
- package/lib/renderers/Placeholder.js +1 -1
- package/lib/renderers/builtin.js +1 -1
- package/lib/renderers/register.js +1 -1
- package/lib/renderers/wrapControl.d.ts +2 -2
- package/lib/renderers/wrapControl.js +12 -15
- package/lib/store/app.d.ts +1 -0
- package/lib/store/app.js +1 -1
- package/lib/store/combo.d.ts +3 -0
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +2 -0
- package/lib/store/crud.js +31 -9
- package/lib/store/form.d.ts +1 -0
- package/lib/store/form.js +10 -4
- package/lib/store/formItem.js +2 -2
- package/lib/store/iRenderer.d.ts +1 -0
- package/lib/store/iRenderer.js +53 -12
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +1 -0
- package/lib/store/list.js +7 -3
- package/lib/store/manager.js +1 -1
- package/lib/store/modal.d.ts +1 -0
- package/lib/store/modal.js +1 -1
- package/lib/store/node.js +1 -1
- package/lib/store/pagination.d.ts +1 -0
- package/lib/store/pagination.js +2 -2
- package/lib/store/root.d.ts +4 -6
- package/lib/store/root.js +52 -23
- package/lib/store/service.d.ts +1 -0
- package/lib/store/service.js +1 -1
- package/lib/store/status.d.ts +12 -0
- package/lib/store/status.js +42 -0
- package/lib/store/table.d.ts +28 -23
- package/lib/store/table.js +26 -5
- package/lib/store/table2.d.ts +7 -6
- package/lib/store/table2.js +27 -23
- package/lib/theme.d.ts +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.d.ts +7 -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.d.ts +3 -5
- package/lib/utils/DataScope.js +86 -29
- package/lib/utils/RootClose.js +1 -1
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/api.js +13 -4
- package/lib/utils/attachmentAdpator.js +2 -2
- 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.d.ts +7 -0
- package/lib/utils/date.js +34 -1
- package/lib/utils/debug.js +4 -4
- package/lib/utils/decodeEntity.js +1 -1
- package/lib/utils/dom.d.ts +3 -0
- package/lib/utils/dom.js +48 -9
- 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 +2 -2
- package/lib/utils/getVariable.js +1 -1
- package/lib/utils/grammar.js +3 -3
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/helper.d.ts +9 -2
- package/lib/utils/helper.js +53 -19
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.d.ts +6 -1
- package/lib/utils/icon.js +6 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/isPureVariable.js +3 -3
- package/lib/utils/json-schema-2-amis-schema.js +1 -1
- package/lib/utils/keyToPath.js +1 -1
- package/lib/utils/makeSorter.js +1 -1
- package/lib/utils/memoryParse.d.ts +17 -0
- package/lib/utils/memoryParse.js +30 -0
- package/lib/utils/normalizeLink.js +1 -1
- package/lib/utils/normalizeOptions.js +4 -2
- package/lib/utils/object.d.ts +2 -0
- package/lib/utils/object.js +28 -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 +35 -32
- package/lib/utils/replaceText.js +1 -1
- package/lib/utils/resize-sensor.js +1 -1
- package/lib/utils/resolveCondition.d.ts +1 -0
- package/lib/utils/resolveCondition.js +19 -3
- package/lib/utils/resolveVariable.js +3 -2
- package/lib/utils/resolveVariableAndFilter.js +1 -1
- package/lib/utils/resolveVariableAndFilterForAsync.d.ts +6 -1
- package/lib/utils/resolveVariableAndFilterForAsync.js +22 -3
- 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 +12 -4
- package/lib/utils/style-helper.js +101 -18
- package/lib/utils/style.js +2 -2
- package/lib/utils/toNumber.js +1 -1
- package/lib/utils/tokenize.js +1 -1
- package/lib/utils/tpl-builtin.d.ts +2 -1
- package/lib/utils/tpl-builtin.js +19 -2
- package/lib/utils/tpl-lodash.js +3 -2
- package/lib/utils/tpl.d.ts +2 -0
- package/lib/utils/tpl.js +24 -1
- package/lib/utils/uncontrollable.js +1 -1
- package/lib/utils/validations.d.ts +4 -1
- package/lib/utils/validations.js +27 -12
- package/package.json +3 -3
package/lib/utils/helper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -556,22 +556,23 @@ var uuidv4 = function () {
|
|
|
556
556
|
* @param {Function} iterator 处理函数,返回的数据会被替换成新的。
|
|
557
557
|
* @return {Tree} 返回处理过的 tree
|
|
558
558
|
*/
|
|
559
|
-
function mapTree(tree, iterator, level, depthFirst, paths) {
|
|
559
|
+
function mapTree(tree, iterator, level, depthFirst, paths, indexes) {
|
|
560
560
|
if (level === void 0) { level = 1; }
|
|
561
561
|
if (depthFirst === void 0) { depthFirst = false; }
|
|
562
562
|
if (paths === void 0) { paths = []; }
|
|
563
|
+
if (indexes === void 0) { indexes = []; }
|
|
563
564
|
return tree.map(function (item, index) {
|
|
564
565
|
if (depthFirst) {
|
|
565
566
|
var children = item.children
|
|
566
|
-
? mapTree(item.children, iterator, level + 1, depthFirst, paths.concat(item))
|
|
567
|
+
? mapTree(item.children, iterator, level + 1, depthFirst, paths.concat(item), indexes.concat(index))
|
|
567
568
|
: undefined;
|
|
568
569
|
children && (item = tslib.__assign(tslib.__assign({}, item), { children: children }));
|
|
569
|
-
item = iterator(item, index, level, paths) || tslib.__assign({}, item);
|
|
570
|
+
item = iterator(item, index, level, paths, indexes.concat(index)) || tslib.__assign({}, item);
|
|
570
571
|
return item;
|
|
571
572
|
}
|
|
572
|
-
item = iterator(item, index, level, paths) || tslib.__assign({}, item);
|
|
573
|
+
item = iterator(item, index, level, paths, indexes.concat(index)) || tslib.__assign({}, item);
|
|
573
574
|
if (item.children && item.children.splice) {
|
|
574
|
-
item.children = mapTree(item.children, iterator, level + 1, depthFirst, paths.concat(item));
|
|
575
|
+
item.children = mapTree(item.children, iterator, level + 1, depthFirst, paths.concat(item), indexes.concat(index));
|
|
575
576
|
}
|
|
576
577
|
return item;
|
|
577
578
|
});
|
|
@@ -586,10 +587,9 @@ function eachTree(tree, iterator, level, paths) {
|
|
|
586
587
|
if (paths === void 0) { paths = []; }
|
|
587
588
|
tree.map(function (item, index) {
|
|
588
589
|
var _a;
|
|
589
|
-
|
|
590
|
-
iterator(item, index, level, currentPath);
|
|
590
|
+
iterator(item, index, level, paths);
|
|
591
591
|
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.splice) {
|
|
592
|
-
eachTree(item.children, iterator, level + 1,
|
|
592
|
+
eachTree(item.children, iterator, level + 1, paths.concat(item));
|
|
593
593
|
}
|
|
594
594
|
});
|
|
595
595
|
}
|
|
@@ -609,6 +609,21 @@ function findTree(tree, iterator) {
|
|
|
609
609
|
});
|
|
610
610
|
return result;
|
|
611
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* 在树中查找节点。
|
|
614
|
+
* @param tree
|
|
615
|
+
* @param iterator
|
|
616
|
+
*/
|
|
617
|
+
function findTreeAll(tree, iterator) {
|
|
618
|
+
var result = [];
|
|
619
|
+
everyTree(tree, function (item, key, level, paths) {
|
|
620
|
+
if (iterator(item, key, level, paths)) {
|
|
621
|
+
result.push(item);
|
|
622
|
+
}
|
|
623
|
+
return true;
|
|
624
|
+
});
|
|
625
|
+
return result;
|
|
626
|
+
}
|
|
612
627
|
/**
|
|
613
628
|
* 在树中查找节点, 返回下标数组。
|
|
614
629
|
* @param tree
|
|
@@ -654,28 +669,29 @@ function getTree(tree, idx) {
|
|
|
654
669
|
* @param tree
|
|
655
670
|
* @param iterator
|
|
656
671
|
*/
|
|
657
|
-
function filterTree(tree, iterator, level, depthFirst) {
|
|
672
|
+
function filterTree(tree, iterator, level, depthFirst, paths) {
|
|
658
673
|
if (level === void 0) { level = 1; }
|
|
659
674
|
if (depthFirst === void 0) { depthFirst = false; }
|
|
675
|
+
if (paths === void 0) { paths = []; }
|
|
660
676
|
if (depthFirst) {
|
|
661
677
|
return tree
|
|
662
678
|
.map(function (item) {
|
|
663
679
|
var children = item.children
|
|
664
|
-
? filterTree(item.children, iterator, level + 1, depthFirst)
|
|
680
|
+
? filterTree(item.children, iterator, level + 1, depthFirst, paths.concat(item))
|
|
665
681
|
: undefined;
|
|
666
682
|
if (Array.isArray(children) && Array.isArray(item.children)) {
|
|
667
683
|
item = tslib.__assign(tslib.__assign({}, item), { children: children });
|
|
668
684
|
}
|
|
669
685
|
return item;
|
|
670
686
|
})
|
|
671
|
-
.filter(function (item, index) { return iterator(item, index, level); });
|
|
687
|
+
.filter(function (item, index) { return iterator(item, index, level, paths); });
|
|
672
688
|
}
|
|
673
689
|
return tree
|
|
674
|
-
.filter(function (item, index) { return iterator(item, index, level); })
|
|
690
|
+
.filter(function (item, index) { return iterator(item, index, level, paths); })
|
|
675
691
|
.map(function (item) {
|
|
676
692
|
var _a;
|
|
677
693
|
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.splice) {
|
|
678
|
-
var children = filterTree(item.children, iterator, level + 1, depthFirst);
|
|
694
|
+
var children = filterTree(item.children, iterator, level + 1, depthFirst, paths.concat(item));
|
|
679
695
|
if (Array.isArray(children) && Array.isArray(item.children)) {
|
|
680
696
|
item = tslib.__assign(tslib.__assign({}, item), { children: children });
|
|
681
697
|
}
|
|
@@ -775,6 +791,9 @@ function spliceTree(tree, idx, deleteCount) {
|
|
|
775
791
|
* @param tree
|
|
776
792
|
*/
|
|
777
793
|
function getTreeDepth(tree) {
|
|
794
|
+
if (Array.isArray(tree) && tree.length === 0) {
|
|
795
|
+
return 0;
|
|
796
|
+
}
|
|
778
797
|
return Math.max.apply(Math, tslib.__spreadArray([], tslib.__read(tree.map(function (item) {
|
|
779
798
|
if (Array.isArray(item.children)) {
|
|
780
799
|
return 1 + getTreeDepth(item.children);
|
|
@@ -1015,6 +1034,16 @@ function loadScript(src) {
|
|
|
1015
1034
|
document.head.appendChild(script);
|
|
1016
1035
|
});
|
|
1017
1036
|
}
|
|
1037
|
+
function loadStyle(href) {
|
|
1038
|
+
return new Promise(function (ok, fail) {
|
|
1039
|
+
var link = document.createElement('link');
|
|
1040
|
+
link.rel = 'stylesheet';
|
|
1041
|
+
link.onerror = function (reason) { return fail(reason); };
|
|
1042
|
+
link.onload = function () { return ok(); };
|
|
1043
|
+
link.href = href;
|
|
1044
|
+
document.head.appendChild(link);
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1018
1047
|
var SkipOperation = /** @class */ (function (_super) {
|
|
1019
1048
|
tslib.__extends(SkipOperation, _super);
|
|
1020
1049
|
function SkipOperation() {
|
|
@@ -1189,7 +1218,7 @@ function isClickOnInput(e) {
|
|
|
1189
1218
|
var formItem;
|
|
1190
1219
|
if (!e.currentTarget.contains(target) ||
|
|
1191
1220
|
~['INPUT', 'TEXTAREA'].indexOf(target.tagName) ||
|
|
1192
|
-
((formItem = target.closest("button, a, [data-role=\"form-item\"]")) &&
|
|
1221
|
+
((formItem = target.closest("button, a, [data-role=\"form-item\"], label[data-role=\"checkbox\"]")) &&
|
|
1193
1222
|
e.currentTarget.contains(formItem))) {
|
|
1194
1223
|
return true;
|
|
1195
1224
|
}
|
|
@@ -1258,14 +1287,17 @@ function isNumeric(value) {
|
|
|
1258
1287
|
* @param location Location对象,或者类Location结构的对象
|
|
1259
1288
|
*/
|
|
1260
1289
|
function parseQuery(location) {
|
|
1261
|
-
var _a
|
|
1290
|
+
var _a;
|
|
1262
1291
|
var query = (location && !(location instanceof Location) && (location === null || location === void 0 ? void 0 : location.query)) ||
|
|
1263
1292
|
(location && (location === null || location === void 0 ? void 0 : location.search) && qsparse(location.search.substring(1))) ||
|
|
1264
1293
|
(window.location.search && qsparse(window.location.search.substring(1)));
|
|
1265
1294
|
/* 处理hash中的query */
|
|
1266
|
-
var
|
|
1267
|
-
|
|
1268
|
-
|
|
1295
|
+
var hash = (_a = window.location) === null || _a === void 0 ? void 0 : _a.hash;
|
|
1296
|
+
var hashQuery = {};
|
|
1297
|
+
var idx = -1;
|
|
1298
|
+
if (typeof hash === 'string' && ~(idx = hash.indexOf('?'))) {
|
|
1299
|
+
hashQuery = qsparse(hash.substring(idx + 1));
|
|
1300
|
+
}
|
|
1269
1301
|
var normalizedQuery = isPlainObject__default["default"](query) ? query : {};
|
|
1270
1302
|
return merge__default["default"](normalizedQuery, hashQuery);
|
|
1271
1303
|
}
|
|
@@ -1297,6 +1329,7 @@ exports.filterTree = filterTree;
|
|
|
1297
1329
|
exports.findIndex = findIndex;
|
|
1298
1330
|
exports.findObjectsWithKey = findObjectsWithKey;
|
|
1299
1331
|
exports.findTree = findTree;
|
|
1332
|
+
exports.findTreeAll = findTreeAll;
|
|
1300
1333
|
exports.findTreeIndex = findTreeIndex;
|
|
1301
1334
|
exports.flattenTree = flattenTree;
|
|
1302
1335
|
exports.flattenTreeWithLeafNodes = flattenTreeWithLeafNodes;
|
|
@@ -1331,6 +1364,7 @@ exports.isUnfolded = isUnfolded;
|
|
|
1331
1364
|
exports.isVisible = isVisible;
|
|
1332
1365
|
exports.lcFirst = lcFirst;
|
|
1333
1366
|
exports.loadScript = loadScript;
|
|
1367
|
+
exports.loadStyle = loadStyle;
|
|
1334
1368
|
exports.makeColumnClassBuild = makeColumnClassBuild;
|
|
1335
1369
|
exports.makeHorizontalDeeper = makeHorizontalDeeper;
|
|
1336
1370
|
exports.mapObject = mapObject;
|
package/lib/utils/highlight.js
CHANGED
package/lib/utils/icon.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ import { ClassNamesFn } from '../theme';
|
|
|
6
6
|
export interface IconCheckedSchema {
|
|
7
7
|
id: string;
|
|
8
8
|
name?: string;
|
|
9
|
+
svg?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IconCheckedSchemaNew {
|
|
12
|
+
type: 'icon';
|
|
13
|
+
icon: IconCheckedSchema;
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* 判断字符串来生成 i 或 img
|
|
@@ -13,4 +18,4 @@ export interface IconCheckedSchema {
|
|
|
13
18
|
* @param className 内部用的 className
|
|
14
19
|
* @param classNameProp amis 配置里设置的 className
|
|
15
20
|
*/
|
|
16
|
-
export declare const generateIcon: (cx: ClassNamesFn, icon?: string | IconCheckedSchema | React.ReactNode, className?: string, classNameProp?: string) => JSX.Element | null | undefined;
|
|
21
|
+
export declare const generateIcon: (cx: ClassNamesFn, icon?: string | IconCheckedSchema | React.ReactNode | IconCheckedSchemaNew, className?: string, classNameProp?: string) => React.JSX.Element | null | undefined;
|
package/lib/utils/icon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -24,6 +24,11 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
24
24
|
* @param classNameProp amis 配置里设置的 className
|
|
25
25
|
*/
|
|
26
26
|
var generateIcon = function (cx, icon, className, classNameProp) {
|
|
27
|
+
if (lodash.isObject(icon) &&
|
|
28
|
+
icon.type === 'icon' &&
|
|
29
|
+
icon.icon) {
|
|
30
|
+
icon = icon.icon;
|
|
31
|
+
}
|
|
27
32
|
if (React__default["default"].isValidElement(icon)) {
|
|
28
33
|
return icon;
|
|
29
34
|
}
|
package/lib/utils/image.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var memoryParse = require('./memoryParse.js');
|
|
11
11
|
|
|
12
12
|
function isPureVariable(path) {
|
|
13
13
|
if (typeof path === 'string') {
|
|
14
14
|
try {
|
|
15
|
-
var ast =
|
|
15
|
+
var ast = memoryParse.memoryParse(path);
|
|
16
16
|
// 只有一个成员说明是纯表达式模式
|
|
17
17
|
return ast.body.length === 1 && ast.body[0].type === 'script';
|
|
18
18
|
}
|
package/lib/utils/keyToPath.js
CHANGED
package/lib/utils/makeSorter.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function memoryParse(input: string, options?: {
|
|
2
|
+
/**
|
|
3
|
+
* 直接是运算表达式?还是从模板开始 ${} 里面才算运算表达式
|
|
4
|
+
*/
|
|
5
|
+
evalMode?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* 只支持取变量。
|
|
8
|
+
*/
|
|
9
|
+
variableMode?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 是否允许 filter 语法,比如:
|
|
12
|
+
*
|
|
13
|
+
* ${abc | html}
|
|
14
|
+
*/
|
|
15
|
+
allowFilter?: boolean;
|
|
16
|
+
variableNamespaces?: Array<string>;
|
|
17
|
+
}): any;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-core v3.1.0
|
|
3
|
+
* Copyright 2018-2023 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
var amisFormula = require('amis-formula');
|
|
11
|
+
|
|
12
|
+
var cache = {};
|
|
13
|
+
function memoryParse(input, options) {
|
|
14
|
+
if (options === void 0) { options = {
|
|
15
|
+
evalMode: false
|
|
16
|
+
}; }
|
|
17
|
+
// @todo 优化内存缓存释放,比如只缓存最高频的模版
|
|
18
|
+
if (typeof input !== 'string') {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
var key = input + JSON.stringify(options);
|
|
22
|
+
if (cache[key]) {
|
|
23
|
+
return cache[key];
|
|
24
|
+
}
|
|
25
|
+
var ast = amisFormula.parse(input, options);
|
|
26
|
+
cache[key] = ast;
|
|
27
|
+
return ast;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.memoryParse = memoryParse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -58,7 +58,9 @@ function normalizeOptions(options, share, valueField) {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
else if (Array.isArray(options)) {
|
|
61
|
-
return options
|
|
61
|
+
return options
|
|
62
|
+
.filter(function (item) { return item !== null && item !== undefined; })
|
|
63
|
+
.map(function (item) {
|
|
62
64
|
var _a;
|
|
63
65
|
var value = item && item[valueField];
|
|
64
66
|
var idx = value !== undefined && !item.children
|
package/lib/utils/object.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export declare function createObject(superProps?: {
|
|
|
3
3
|
}, props?: {
|
|
4
4
|
[propName: string]: any;
|
|
5
5
|
}, properties?: any): object;
|
|
6
|
+
export declare function extractObjectChain(value: any): object[];
|
|
7
|
+
export declare function createObjectFromChain(chain: Array<object>): object;
|
|
6
8
|
export declare function cloneObject(target: any, persistOwnProps?: boolean): any;
|
|
7
9
|
export declare function extendObject(target: any, src?: any, persistOwnProps?: boolean): any;
|
|
8
10
|
export declare function isObject(obj: any): any;
|
package/lib/utils/object.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -33,6 +33,31 @@ function createObject(superProps, props, properties) {
|
|
|
33
33
|
Object.keys(props).forEach(function (key) { return (obj[key] = props[key]); });
|
|
34
34
|
return obj;
|
|
35
35
|
}
|
|
36
|
+
function extractObjectChain(value) {
|
|
37
|
+
var result = value ? [value] : [];
|
|
38
|
+
while (value === null || value === void 0 ? void 0 : value.__super) {
|
|
39
|
+
result.unshift(value.__super);
|
|
40
|
+
value = value.__super;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function createObjectFromChain(chain) {
|
|
45
|
+
return chain
|
|
46
|
+
.filter(function (item) { return item; })
|
|
47
|
+
.reduce(function (proto, value) {
|
|
48
|
+
proto = proto || Object.prototype;
|
|
49
|
+
if (Object.isFrozen(proto)) {
|
|
50
|
+
proto = cloneObject(proto);
|
|
51
|
+
}
|
|
52
|
+
return Object.assign(Object.create(proto, {
|
|
53
|
+
__super: {
|
|
54
|
+
value: proto,
|
|
55
|
+
writable: false,
|
|
56
|
+
enumerable: false
|
|
57
|
+
}
|
|
58
|
+
}), value);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
36
61
|
function cloneObject(target, persistOwnProps) {
|
|
37
62
|
if (persistOwnProps === void 0) { persistOwnProps = true; }
|
|
38
63
|
var obj = target && target.__super
|
|
@@ -149,8 +174,10 @@ function pickValues(names, data) {
|
|
|
149
174
|
|
|
150
175
|
exports.cloneObject = cloneObject;
|
|
151
176
|
exports.createObject = createObject;
|
|
177
|
+
exports.createObjectFromChain = createObjectFromChain;
|
|
152
178
|
exports.deleteVariable = deleteVariable;
|
|
153
179
|
exports.extendObject = extendObject;
|
|
180
|
+
exports.extractObjectChain = extractObjectChain;
|
|
154
181
|
exports.isObject = isObject;
|
|
155
182
|
exports.pickValues = pickValues;
|
|
156
183
|
exports.setVariable = setVariable;
|
package/lib/utils/offset.js
CHANGED
package/lib/utils/position.js
CHANGED
package/lib/utils/prettyBytes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v3.1.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -42,7 +42,7 @@ function createRendererEvent(type, context) {
|
|
|
42
42
|
// 绑定事件
|
|
43
43
|
var bindEvent = function (renderer) {
|
|
44
44
|
var e_1, _a;
|
|
45
|
-
var _b, _c;
|
|
45
|
+
var _b, _c, _d;
|
|
46
46
|
if (!renderer) {
|
|
47
47
|
return undefined;
|
|
48
48
|
}
|
|
@@ -57,15 +57,16 @@ var bindEvent = function (renderer) {
|
|
|
57
57
|
rendererEventListeners = rendererEventListeners.filter(function (item) {
|
|
58
58
|
return !(item.renderer === listener.renderer && item.type === listener.type);
|
|
59
59
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
listener.actions.length &&
|
|
61
|
+
rendererEventListeners.push({
|
|
62
|
+
renderer: renderer,
|
|
63
|
+
type: key,
|
|
64
|
+
debounce: listener.debounce || null,
|
|
65
|
+
weight: listener.weight || 0,
|
|
66
|
+
actions: listener.actions
|
|
67
|
+
});
|
|
67
68
|
}
|
|
68
|
-
if (!listener) {
|
|
69
|
+
if (!listener && ((_d = listeners[key].actions) === null || _d === void 0 ? void 0 : _d.length)) {
|
|
69
70
|
rendererEventListeners.push({
|
|
70
71
|
renderer: renderer,
|
|
71
72
|
type: key,
|
|
@@ -77,15 +78,15 @@ var bindEvent = function (renderer) {
|
|
|
77
78
|
};
|
|
78
79
|
try {
|
|
79
80
|
// 暂存
|
|
80
|
-
for (var
|
|
81
|
-
var key =
|
|
81
|
+
for (var _e = tslib.__values(Object.keys(listeners)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
82
|
+
var key = _f.value;
|
|
82
83
|
_loop_1(key);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
86
87
|
finally {
|
|
87
88
|
try {
|
|
88
|
-
if (
|
|
89
|
+
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
|
|
89
90
|
}
|
|
90
91
|
finally { if (e_1) throw e_1.error; }
|
|
91
92
|
}
|
|
@@ -97,19 +98,20 @@ var bindEvent = function (renderer) {
|
|
|
97
98
|
};
|
|
98
99
|
// 触发事件
|
|
99
100
|
function dispatchEvent(e, renderer, scoped, data, broadcast) {
|
|
100
|
-
var _a, _b, _c, _d, _e, _f;
|
|
101
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
101
102
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
102
103
|
var unbindEvent, eventName, eventConfig, rendererEvent, listeners, executedCount, checkExecuted, _loop_2, listeners_1, listeners_1_1, listener, state_1, e_2_1;
|
|
103
|
-
var e_2,
|
|
104
|
+
var e_2, _j;
|
|
104
105
|
var _this = this;
|
|
105
|
-
return tslib.__generator(this, function (
|
|
106
|
-
switch (
|
|
106
|
+
return tslib.__generator(this, function (_k) {
|
|
107
|
+
switch (_k.label) {
|
|
107
108
|
case 0:
|
|
108
109
|
unbindEvent = null;
|
|
109
110
|
eventName = typeof e === 'string' ? e : e.type;
|
|
110
111
|
(_c = (_b = (_a = renderer === null || renderer === void 0 ? void 0 : renderer.props) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.beforeDispatchEvent) === null || _c === void 0 ? void 0 : _c.call(_b, e, renderer, scoped, data, broadcast);
|
|
112
|
+
broadcast && ((_e = (_d = renderer.props).onBroadcast) === null || _e === void 0 ? void 0 : _e.call(_d, e, broadcast, data));
|
|
111
113
|
if (!broadcast) {
|
|
112
|
-
eventConfig = (
|
|
114
|
+
eventConfig = (_g = (_f = renderer === null || renderer === void 0 ? void 0 : renderer.props) === null || _f === void 0 ? void 0 : _f.onEvent) === null || _g === void 0 ? void 0 : _g[eventName];
|
|
113
115
|
if (!eventConfig) {
|
|
114
116
|
// 没命中也没关系
|
|
115
117
|
return [2 /*return*/, Promise.resolve()];
|
|
@@ -122,7 +124,7 @@ function dispatchEvent(e, renderer, scoped, data, broadcast) {
|
|
|
122
124
|
}
|
|
123
125
|
rendererEvent = broadcast ||
|
|
124
126
|
createRendererEvent(eventName, {
|
|
125
|
-
env: (
|
|
127
|
+
env: (_h = renderer === null || renderer === void 0 ? void 0 : renderer.props) === null || _h === void 0 ? void 0 : _h.env,
|
|
126
128
|
nativeEvent: e,
|
|
127
129
|
data: data,
|
|
128
130
|
scoped: scoped
|
|
@@ -143,11 +145,11 @@ function dispatchEvent(e, renderer, scoped, data, broadcast) {
|
|
|
143
145
|
}
|
|
144
146
|
};
|
|
145
147
|
_loop_2 = function (listener) {
|
|
146
|
-
var
|
|
147
|
-
return tslib.__generator(this, function (
|
|
148
|
-
switch (
|
|
148
|
+
var _l, _m, wait, _o, trailing, _p, leading, _q, maxWait, debounced_1;
|
|
149
|
+
return tslib.__generator(this, function (_r) {
|
|
150
|
+
switch (_r.label) {
|
|
149
151
|
case 0:
|
|
150
|
-
|
|
152
|
+
_l = (listener === null || listener === void 0 ? void 0 : listener.debounce) || {}, _m = _l.wait, wait = _m === void 0 ? 100 : _m, _o = _l.trailing, trailing = _o === void 0 ? true : _o, _p = _l.leading, leading = _p === void 0 ? false : _p, _q = _l.maxWait, maxWait = _q === void 0 ? 10000 : _q;
|
|
151
153
|
if (!(listener === null || listener === void 0 ? void 0 : listener.debounce)) return [3 /*break*/, 1];
|
|
152
154
|
debounced_1 = debounce__default["default"](function () { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
153
155
|
return tslib.__generator(this, function (_a) {
|
|
@@ -176,9 +178,9 @@ function dispatchEvent(e, renderer, scoped, data, broadcast) {
|
|
|
176
178
|
return [3 /*break*/, 3];
|
|
177
179
|
case 1: return [4 /*yield*/, Action.runActions(listener.actions, listener.renderer, rendererEvent)];
|
|
178
180
|
case 2:
|
|
179
|
-
|
|
181
|
+
_r.sent();
|
|
180
182
|
checkExecuted();
|
|
181
|
-
|
|
183
|
+
_r.label = 3;
|
|
182
184
|
case 3:
|
|
183
185
|
// 停止后续监听器执行
|
|
184
186
|
if (rendererEvent.stoped) {
|
|
@@ -188,31 +190,31 @@ function dispatchEvent(e, renderer, scoped, data, broadcast) {
|
|
|
188
190
|
}
|
|
189
191
|
});
|
|
190
192
|
};
|
|
191
|
-
|
|
193
|
+
_k.label = 1;
|
|
192
194
|
case 1:
|
|
193
|
-
|
|
195
|
+
_k.trys.push([1, 6, 7, 8]);
|
|
194
196
|
listeners_1 = tslib.__values(listeners), listeners_1_1 = listeners_1.next();
|
|
195
|
-
|
|
197
|
+
_k.label = 2;
|
|
196
198
|
case 2:
|
|
197
199
|
if (!!listeners_1_1.done) return [3 /*break*/, 5];
|
|
198
200
|
listener = listeners_1_1.value;
|
|
199
201
|
return [5 /*yield**/, _loop_2(listener)];
|
|
200
202
|
case 3:
|
|
201
|
-
state_1 =
|
|
203
|
+
state_1 = _k.sent();
|
|
202
204
|
if (state_1 === "break")
|
|
203
205
|
return [3 /*break*/, 5];
|
|
204
|
-
|
|
206
|
+
_k.label = 4;
|
|
205
207
|
case 4:
|
|
206
208
|
listeners_1_1 = listeners_1.next();
|
|
207
209
|
return [3 /*break*/, 2];
|
|
208
210
|
case 5: return [3 /*break*/, 8];
|
|
209
211
|
case 6:
|
|
210
|
-
e_2_1 =
|
|
212
|
+
e_2_1 = _k.sent();
|
|
211
213
|
e_2 = { error: e_2_1 };
|
|
212
214
|
return [3 /*break*/, 8];
|
|
213
215
|
case 7:
|
|
214
216
|
try {
|
|
215
|
-
if (listeners_1_1 && !listeners_1_1.done && (
|
|
217
|
+
if (listeners_1_1 && !listeners_1_1.done && (_j = listeners_1.return)) _j.call(listeners_1);
|
|
216
218
|
}
|
|
217
219
|
finally { if (e_2) throw e_2.error; }
|
|
218
220
|
return [7 /*endfinally*/];
|
|
@@ -232,6 +234,7 @@ var getRendererEventListeners = function () {
|
|
|
232
234
|
*/
|
|
233
235
|
var resolveEventData = function (props, data, valueKey) {
|
|
234
236
|
var _a, _b;
|
|
237
|
+
if (valueKey === void 0) { valueKey = 'value'; }
|
|
235
238
|
return object.createObject(props.data, props.name && valueKey
|
|
236
239
|
? tslib.__assign(tslib.__assign({}, data), (_a = {}, _a[props.name] = data[valueKey], _a.__rendererData = tslib.__assign(tslib.__assign({}, props.data), (_b = {}, _b[props.name] = data[valueKey], _b)), _a)) : data);
|
|
237
240
|
};
|
package/lib/utils/replaceText.js
CHANGED
|
@@ -3,3 +3,4 @@ export declare function registerConditionComputer(op: string, func: (left: any,
|
|
|
3
3
|
export declare function getConditionComputers(): {
|
|
4
4
|
[op: string]: (left: any, right: any, fieldType?: string | undefined) => boolean;
|
|
5
5
|
};
|
|
6
|
+
export declare function setConditionComputeErrorHandler(fn: (conditions: any, data: any, defaultResult: boolean) => boolean | Promise<boolean>): void;
|