amis-core 6.14.0-beta.8 → 7.0.0-next.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 +3 -2
- package/esm/Root.js +3 -2
- package/esm/RootRenderer.d.ts +18 -0
- package/esm/RootRenderer.js +8 -5
- package/esm/SchemaRenderer.js +7 -3
- package/esm/Scoped.js +1 -1
- package/esm/StatusScoped.js +1 -1
- package/esm/StyleManager.js +1 -1
- package/esm/TaggerWrapper.d.ts +14 -0
- package/esm/TaggerWrapper.js +57 -0
- package/esm/WithRootStore.d.ts +70 -358
- package/esm/WithRootStore.js +1 -1
- package/esm/WithStore.js +2 -3
- package/esm/actions/Action.d.ts +3 -17
- package/esm/actions/Action.js +2 -2
- package/esm/actions/AjaxAction.d.ts +1 -1
- package/esm/actions/AjaxAction.js +11 -11
- package/esm/actions/BreakAction.js +1 -1
- package/esm/actions/BroadcastAction.js +2 -2
- package/esm/actions/CmptAction.d.ts +1 -1
- package/esm/actions/CmptAction.js +41 -41
- package/esm/actions/ContinueAction.js +1 -1
- package/esm/actions/CopyAction.js +2 -2
- package/esm/actions/CustomAction.d.ts +2 -1
- package/esm/actions/CustomAction.js +3 -3
- package/esm/actions/DialogAction.d.ts +6 -6
- package/esm/actions/DialogAction.js +13 -13
- package/esm/actions/DrawerAction.d.ts +3 -3
- package/esm/actions/DrawerAction.js +11 -11
- package/esm/actions/EmailAction.js +2 -2
- package/esm/actions/EventAction.js +7 -7
- package/esm/actions/LinkAction.js +2 -2
- package/esm/actions/LoopAction.js +12 -12
- package/esm/actions/PageAction.js +2 -2
- package/esm/actions/ParallelAction.js +1 -1
- package/esm/actions/PrintAction.js +2 -2
- package/esm/actions/StatusAction.js +2 -2
- package/esm/actions/SwitchAction.js +1 -1
- package/esm/actions/ToastAction.js +2 -2
- package/esm/actions/WaitAction.js +2 -2
- package/esm/actions/index.d.ts +66 -0
- package/esm/components/Animations.d.ts +2 -2
- package/esm/components/Animations.js +2 -2
- package/esm/components/CustomStyle.js +1 -1
- package/esm/components/ErrorBoundary.js +1 -1
- package/esm/components/LazyComponent.d.ts +0 -1
- package/esm/components/LazyComponent.js +2 -3
- package/esm/components/Overlay.js +6 -13
- package/esm/components/PopOver.d.ts +0 -1
- package/esm/components/PopOver.js +6 -6
- package/esm/env.d.ts +24 -22
- package/esm/env.js +1 -1
- package/esm/envOverwrite.js +1 -1
- package/esm/factory.d.ts +3 -1
- package/esm/factory.js +10 -7
- package/esm/globalVar.js +1 -1
- package/esm/globalVarClientHandler.js +1 -1
- package/esm/globalVarDefaultValueHandler.js +1 -1
- package/esm/hooks/useEnvContext.js +1 -1
- package/esm/hooks/useRenderOptionsContext.js +1 -1
- package/esm/index.d.ts +6 -6
- package/esm/index.js +15 -9
- package/esm/locale.d.ts +22 -22
- package/esm/locale.js +6 -6
- package/esm/polyfills.js +1 -1
- package/esm/renderers/Form.d.ts +42 -18
- package/esm/renderers/Form.js +35 -29
- package/esm/renderers/Item.d.ts +52 -206
- package/esm/renderers/Item.js +20 -16
- package/esm/renderers/Options.d.ts +18 -17
- package/esm/renderers/Options.js +48 -49
- 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 +36 -180
- package/esm/renderers/wrapControl.js +49 -50
- package/esm/schema.d.ts +1317 -0
- package/esm/store/app.d.ts +17 -17
- package/esm/store/app.js +1 -1
- package/esm/store/combo.d.ts +1504 -10289
- package/esm/store/combo.js +1 -1
- package/esm/store/crud.d.ts +22 -22
- package/esm/store/crud.js +9 -5
- package/esm/store/form.d.ts +571 -4232
- package/esm/store/form.js +1 -1
- package/esm/store/formItem.d.ts +48 -48
- package/esm/store/formItem.js +9 -4
- package/esm/store/iRenderer.d.ts +7 -7
- package/esm/store/iRenderer.js +6 -6
- package/esm/store/index.d.ts +15 -15
- package/esm/store/index.js +1 -1
- package/esm/store/list.d.ts +10 -10
- package/esm/store/list.js +1 -1
- package/esm/store/manager.d.ts +18 -18
- package/esm/store/manager.js +1 -1
- package/esm/store/modal.d.ts +16 -16
- package/esm/store/modal.js +1 -1
- package/esm/store/node.d.ts +1 -1
- package/esm/store/node.js +1 -1
- package/esm/store/pagination.d.ts +9 -9
- package/esm/store/pagination.js +1 -1
- package/esm/store/root.d.ts +20 -19
- package/esm/store/root.js +9 -3
- package/esm/store/service.d.ts +9 -9
- package/esm/store/service.js +1 -1
- package/esm/store/status.js +1 -1
- package/esm/store/table.d.ts +16 -11238
- package/esm/store/table.js +8 -8
- package/esm/store/table2.d.ts +20 -20
- package/esm/store/table2.js +4 -4
- package/esm/theme.d.ts +2 -2
- package/esm/theme.js +5 -5
- package/esm/types.d.ts +21 -352
- 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 +3 -3
- package/esm/utils/SimpleMap.js +1 -1
- package/esm/utils/animations.d.ts +2 -27
- package/esm/utils/animations.js +1 -1
- package/esm/utils/api.d.ts +1 -1
- package/esm/utils/api.js +2 -2
- 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 +6 -5
- package/esm/utils/decodeEntity.js +1 -1
- package/esm/utils/dom.js +4 -5
- package/esm/utils/errors.js +1 -1
- package/esm/utils/escapeHtml.js +3 -4
- package/esm/utils/filter-schema.js +1 -1
- package/esm/utils/filter.js +1 -1
- package/esm/utils/findDomCompat.d.ts +16 -0
- package/esm/utils/findDomCompat.js +253 -0
- package/esm/utils/formatDuration.js +1 -1
- package/esm/utils/formula.js +2 -2
- 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.d.ts +0 -1
- package/esm/utils/handleAction.js +1 -1
- package/esm/utils/helper.d.ts +5 -4
- package/esm/utils/helper.js +2 -2
- package/esm/utils/highlight.js +1 -1
- package/esm/utils/icon.js +1 -1
- package/esm/utils/image.d.ts +0 -1
- package/esm/utils/image.js +1 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +2 -2
- 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.d.ts +4 -5
- package/esm/utils/renderer-event.js +10 -10
- package/esm/utils/replaceText.js +1 -1
- package/esm/utils/resize-sensor.js +1 -1
- package/esm/utils/resolveCondition.d.ts +1 -1
- package/esm/utils/resolveCondition.js +8 -8
- package/esm/utils/resolveVariable.js +1 -1
- package/esm/utils/resolveVariableAndFilter.js +1 -1
- package/esm/utils/resolveVariableAndFilterForAsync.js +12 -8
- 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.d.ts +1 -1
- package/esm/utils/tpl-builtin.js +9 -5
- package/esm/utils/tpl-lodash.js +1 -1
- package/esm/utils/tpl.d.ts +1 -1
- package/esm/utils/tpl.js +6 -2
- package/esm/utils/uncontrollable.d.ts +0 -1
- package/esm/utils/uncontrollable.js +1 -1
- package/esm/utils/validateId.js +1 -1
- package/esm/utils/validations.js +5 -1
- package/esm/utils/visitedCache.js +1 -1
- package/lib/Root.d.ts +3 -2
- package/lib/Root.js +3 -1
- package/lib/RootRenderer.d.ts +18 -0
- package/lib/RootRenderer.js +8 -5
- package/lib/SchemaRenderer.js +6 -2
- package/lib/Scoped.js +1 -1
- package/lib/StatusScoped.js +1 -1
- package/lib/StyleManager.js +1 -1
- package/lib/TaggerWrapper.d.ts +14 -0
- package/lib/TaggerWrapper.js +66 -0
- package/lib/WithRootStore.d.ts +70 -358
- package/lib/WithRootStore.js +1 -1
- package/lib/WithStore.js +2 -3
- package/lib/actions/Action.d.ts +3 -17
- package/lib/actions/Action.js +1 -1
- package/lib/actions/AjaxAction.d.ts +1 -1
- package/lib/actions/AjaxAction.js +11 -11
- package/lib/actions/BreakAction.js +1 -1
- package/lib/actions/BroadcastAction.js +2 -2
- package/lib/actions/CmptAction.d.ts +1 -1
- package/lib/actions/CmptAction.js +41 -41
- package/lib/actions/ContinueAction.js +1 -1
- package/lib/actions/CopyAction.js +2 -2
- package/lib/actions/CustomAction.d.ts +2 -1
- package/lib/actions/CustomAction.js +2 -2
- package/lib/actions/DialogAction.d.ts +6 -6
- package/lib/actions/DialogAction.js +12 -12
- package/lib/actions/DrawerAction.d.ts +3 -3
- package/lib/actions/DrawerAction.js +10 -10
- package/lib/actions/EmailAction.js +2 -2
- package/lib/actions/EventAction.js +6 -6
- package/lib/actions/LinkAction.js +2 -2
- package/lib/actions/LoopAction.js +12 -12
- package/lib/actions/PageAction.js +2 -2
- package/lib/actions/ParallelAction.js +1 -1
- package/lib/actions/PrintAction.js +2 -2
- package/lib/actions/StatusAction.js +2 -2
- package/lib/actions/SwitchAction.js +1 -1
- package/lib/actions/ToastAction.js +2 -2
- package/lib/actions/WaitAction.js +2 -2
- package/lib/actions/index.d.ts +66 -0
- package/lib/components/Animations.d.ts +2 -2
- package/lib/components/Animations.js +1 -1
- package/lib/components/CustomStyle.js +1 -1
- package/lib/components/ErrorBoundary.js +1 -1
- package/lib/components/LazyComponent.d.ts +0 -1
- package/lib/components/LazyComponent.js +2 -3
- package/lib/components/Overlay.js +6 -14
- package/lib/components/PopOver.d.ts +0 -1
- package/lib/components/PopOver.js +5 -5
- package/lib/env.d.ts +24 -22
- package/lib/env.js +1 -1
- package/lib/envOverwrite.js +1 -1
- package/lib/factory.d.ts +3 -1
- package/lib/factory.js +10 -7
- package/lib/globalVar.js +1 -1
- package/lib/globalVarClientHandler.js +1 -1
- package/lib/globalVarDefaultValueHandler.js +1 -1
- package/lib/hooks/useEnvContext.js +1 -1
- package/lib/hooks/useRenderOptionsContext.js +1 -1
- package/lib/index.d.ts +6 -6
- package/lib/index.js +16 -7
- package/lib/locale.d.ts +22 -22
- package/lib/locale.js +6 -6
- package/lib/polyfills.js +1 -1
- package/lib/renderers/Form.d.ts +42 -18
- package/lib/renderers/Form.js +35 -29
- package/lib/renderers/Item.d.ts +52 -206
- package/lib/renderers/Item.js +19 -15
- package/lib/renderers/Options.d.ts +18 -17
- package/lib/renderers/Options.js +48 -49
- 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 +36 -180
- package/lib/renderers/wrapControl.js +49 -50
- package/lib/schema.d.ts +1317 -0
- package/lib/store/app.d.ts +17 -17
- package/lib/store/app.js +1 -1
- package/lib/store/combo.d.ts +1504 -10289
- package/lib/store/combo.js +1 -1
- package/lib/store/crud.d.ts +22 -22
- package/lib/store/crud.js +8 -4
- package/lib/store/form.d.ts +571 -4232
- package/lib/store/form.js +1 -1
- package/lib/store/formItem.d.ts +48 -48
- package/lib/store/formItem.js +9 -4
- package/lib/store/iRenderer.d.ts +7 -7
- package/lib/store/iRenderer.js +6 -6
- package/lib/store/index.d.ts +15 -15
- package/lib/store/index.js +1 -1
- package/lib/store/list.d.ts +10 -10
- package/lib/store/list.js +1 -1
- package/lib/store/manager.d.ts +18 -18
- package/lib/store/manager.js +1 -1
- package/lib/store/modal.d.ts +16 -16
- package/lib/store/modal.js +1 -1
- package/lib/store/node.d.ts +1 -1
- package/lib/store/node.js +1 -1
- package/lib/store/pagination.d.ts +9 -9
- package/lib/store/pagination.js +1 -1
- package/lib/store/root.d.ts +20 -19
- package/lib/store/root.js +9 -3
- package/lib/store/service.d.ts +9 -9
- package/lib/store/service.js +1 -1
- package/lib/store/status.js +1 -1
- package/lib/store/table.d.ts +16 -11238
- package/lib/store/table.js +8 -8
- package/lib/store/table2.d.ts +20 -20
- package/lib/store/table2.js +4 -4
- package/lib/theme.d.ts +2 -2
- package/lib/theme.js +5 -5
- package/lib/types.d.ts +21 -352
- 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 +3 -3
- package/lib/utils/SimpleMap.js +1 -1
- package/lib/utils/animations.d.ts +2 -27
- package/lib/utils/animations.js +1 -1
- package/lib/utils/api.d.ts +1 -1
- package/lib/utils/api.js +2 -2
- 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 +7 -6
- package/lib/utils/decodeEntity.js +1 -1
- package/lib/utils/dom.js +4 -9
- package/lib/utils/errors.js +1 -1
- package/lib/utils/escapeHtml.js +3 -4
- package/lib/utils/filter-schema.js +1 -1
- package/lib/utils/filter.js +1 -1
- package/lib/utils/findDomCompat.d.ts +16 -0
- package/lib/utils/findDomCompat.js +262 -0
- package/lib/utils/formatDuration.js +1 -1
- package/lib/utils/formula.js +2 -2
- 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.d.ts +0 -1
- package/lib/utils/handleAction.js +1 -1
- package/lib/utils/helper.d.ts +5 -4
- package/lib/utils/helper.js +2 -2
- package/lib/utils/highlight.js +1 -1
- package/lib/utils/icon.js +1 -1
- package/lib/utils/image.d.ts +0 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.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/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.d.ts +4 -5
- package/lib/utils/renderer-event.js +10 -10
- package/lib/utils/replaceText.js +1 -1
- package/lib/utils/resize-sensor.js +1 -1
- package/lib/utils/resolveCondition.d.ts +1 -1
- package/lib/utils/resolveCondition.js +8 -8
- package/lib/utils/resolveVariable.js +1 -1
- package/lib/utils/resolveVariableAndFilter.js +1 -1
- package/lib/utils/resolveVariableAndFilterForAsync.js +11 -7
- 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.d.ts +1 -1
- package/lib/utils/tpl-builtin.js +8 -4
- package/lib/utils/tpl-lodash.js +1 -1
- package/lib/utils/tpl.d.ts +1 -1
- package/lib/utils/tpl.js +6 -2
- package/lib/utils/uncontrollable.d.ts +0 -1
- package/lib/utils/uncontrollable.js +1 -1
- package/lib/utils/validateId.js +1 -1
- package/lib/utils/validations.js +5 -1
- package/lib/utils/visitedCache.js +1 -1
- package/package.json +3 -3
package/esm/store/table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v7.0.0-next.0
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -147,15 +147,15 @@ var Row = types
|
|
|
147
147
|
rowSpans: types.frozen({}),
|
|
148
148
|
index: types.number,
|
|
149
149
|
newIndex: types.number,
|
|
150
|
-
path: '',
|
|
150
|
+
path: '', // 行数据的位置
|
|
151
151
|
checkdisable: false,
|
|
152
152
|
isHover: false,
|
|
153
153
|
children: types.optional(types.array(types.late(function () { return Row; })), []),
|
|
154
154
|
height: 0,
|
|
155
|
-
defer: false,
|
|
156
|
-
loaded: false,
|
|
157
|
-
loading: false,
|
|
158
|
-
error: '',
|
|
155
|
+
defer: false, // 是否为懒数据
|
|
156
|
+
loaded: false, // 懒数据是否加载完了
|
|
157
|
+
loading: false, // 懒数据是否正在加载
|
|
158
|
+
error: '', // 懒数据加载失败的错误信息
|
|
159
159
|
depth: types.number // 当前children位于第几层,便于使用getParent获取最顶层TableStore
|
|
160
160
|
// appeared: true,
|
|
161
161
|
// lazyRender: false
|
|
@@ -429,7 +429,7 @@ var TableStore = iRendererStore
|
|
|
429
429
|
maxItemSelectionLength: Infinity,
|
|
430
430
|
// 导出 Excel 按钮的 loading 状态
|
|
431
431
|
exportExcelLoading: false,
|
|
432
|
-
searchFormExpanded: false,
|
|
432
|
+
searchFormExpanded: false, // 用来控制搜索框是否展开了,那个自动根据 searchable 生成的表单 autoGenerateFilter
|
|
433
433
|
lazyRenderAfter: 100,
|
|
434
434
|
tableLayout: 'auto',
|
|
435
435
|
theadHeight: 0,
|
|
@@ -1153,7 +1153,7 @@ var TableStore = iRendererStore
|
|
|
1153
1153
|
// id: getEntryId ? getEntryId(item, key) : String(item && (item as any)[self.primaryField] || `${key}-1-${key}`),
|
|
1154
1154
|
id: id,
|
|
1155
1155
|
key: String("".concat(index, "-1-").concat(index)),
|
|
1156
|
-
depth: 1,
|
|
1156
|
+
depth: 1, // 最大父节点默认为第一层,逐层叠加
|
|
1157
1157
|
index: index,
|
|
1158
1158
|
newIndex: index,
|
|
1159
1159
|
pristine: item.__pristine || item,
|
package/esm/store/table2.d.ts
CHANGED
|
@@ -154,11 +154,11 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
|
|
|
154
154
|
readonly parentStore: any;
|
|
155
155
|
readonly __: any;
|
|
156
156
|
readonly hasChildren: boolean;
|
|
157
|
-
readonly children: any
|
|
157
|
+
readonly children: Array<any>;
|
|
158
158
|
} & {
|
|
159
159
|
onChildStoreDispose(child: any): void;
|
|
160
|
-
syncProps(props: any, prevProps: any, list?: string
|
|
161
|
-
dispose: (callback?: (
|
|
160
|
+
syncProps(props: any, prevProps: any, list?: Array<string>): void;
|
|
161
|
+
dispose: (callback?: () => void) => void;
|
|
162
162
|
addChildId: (id: string) => void;
|
|
163
163
|
removeChildId: (id: string) => void;
|
|
164
164
|
} & {
|
|
@@ -167,16 +167,16 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
|
|
|
167
167
|
readonly pristineDiff: any;
|
|
168
168
|
} & {
|
|
169
169
|
setTopStore(value: any): void;
|
|
170
|
-
initData(data?: object, skipSetPristine?: boolean, changeReason?: import("../types").DataChangeReason
|
|
170
|
+
initData(data?: object, skipSetPristine?: boolean, changeReason?: import("../types").DataChangeReason): void;
|
|
171
171
|
temporaryUpdateGlobalVars(globalVar: any): void;
|
|
172
172
|
unDoTemporaryUpdateGlobalVars(): void;
|
|
173
173
|
reset(): void;
|
|
174
|
-
updateData(data?: object, tag?: object
|
|
175
|
-
changeValue(name: string, value: any, changePristine?: boolean
|
|
176
|
-
setCurrentAction(action: any, resolveDefinitions?: (
|
|
177
|
-
openDialog(ctx: any, additonal?: object
|
|
174
|
+
updateData(data?: object, tag?: object, replace?: boolean, concatFields?: string | string[], changeReason?: import("../types").DataChangeReason): void;
|
|
175
|
+
changeValue(name: string, value: any, changePristine?: boolean, force?: boolean, otherModifier?: (data: Object) => void, changeReason?: import("../types").DataChangeReason): void;
|
|
176
|
+
setCurrentAction(action: any, resolveDefinitions?: (schema: any) => any): void;
|
|
177
|
+
openDialog(ctx: any, additonal?: object, callback?: (confirmed: boolean, values: any) => void, scoped?: import("..").IScopedContext): void;
|
|
178
178
|
closeDialog(confirmed?: any, data?: any): void;
|
|
179
|
-
openDrawer(ctx: any, additonal?: object
|
|
179
|
+
openDrawer(ctx: any, additonal?: object, callback?: (confirmed: boolean, ret: any) => void, scoped?: import("..").IScopedContext): void;
|
|
180
180
|
closeDrawer(confirmed?: any, data?: any): void;
|
|
181
181
|
getDialogScoped(): import("..").IScopedContext | null;
|
|
182
182
|
getDrawerScoped(): import("..").IScopedContext | null;
|
|
@@ -186,15 +186,15 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
|
|
|
186
186
|
markFetching: (fetching?: boolean) => void;
|
|
187
187
|
markSaving: (saving?: boolean) => void;
|
|
188
188
|
markBusying: (busying?: boolean) => void;
|
|
189
|
-
fetchInitData: (api: Api, data?: object
|
|
190
|
-
fetchData: (api: Api, data?: object
|
|
191
|
-
reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[]
|
|
192
|
-
updateMessage: (msg?: string
|
|
189
|
+
fetchInitData: (api: Api, data?: object, options?: fetchOptions) => Promise<any>;
|
|
190
|
+
fetchData: (api: Api, data?: object, options?: fetchOptions) => Promise<any>;
|
|
191
|
+
reInitData: (data: object | undefined, replace?: boolean, concatFields?: string | string[]) => void;
|
|
192
|
+
updateMessage: (msg?: string, error?: boolean) => void;
|
|
193
193
|
clearMessage: () => void;
|
|
194
194
|
setHasRemoteData: () => void;
|
|
195
|
-
saveRemote: (api: Api, data?: object
|
|
196
|
-
fetchSchema: (api: Api, data?: object
|
|
197
|
-
checkRemote: (api: Api, data?: object
|
|
195
|
+
saveRemote: (api: Api, data?: object, options?: fetchOptions) => Promise<any>;
|
|
196
|
+
fetchSchema: (api: Api, data?: object, options?: fetchOptions) => Promise<any>;
|
|
197
|
+
checkRemote: (api: Api, data?: object, options?: fetchOptions) => Promise<any>;
|
|
198
198
|
} & {
|
|
199
199
|
readonly toggable: boolean;
|
|
200
200
|
readonly columnsData: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IModelType<{
|
|
@@ -525,12 +525,12 @@ export declare const TableStore2: import("mobx-state-tree").IModelType<{
|
|
|
525
525
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
|
|
526
526
|
} & {
|
|
527
527
|
update: (config: Partial<STableStore2>, options?: {
|
|
528
|
-
resolveDefinitions?: (
|
|
529
|
-
}
|
|
528
|
+
resolveDefinitions?: (ref: string) => any;
|
|
529
|
+
}) => void;
|
|
530
530
|
persistSaveToggledColumns: () => void;
|
|
531
|
-
setOrderByInfo: (key: string, direction:
|
|
531
|
+
setOrderByInfo: (key: string, direction: "asc" | "desc") => void;
|
|
532
532
|
updateQuery: (values: object, updater?: Function, pageNoField?: string, pageSizeField?: string, replace?: boolean) => void;
|
|
533
|
-
initRows: (rows: Array<any>, getEntryId?: (
|
|
533
|
+
initRows: (rows: Array<any>, getEntryId?: (entry: any, index: number) => string, reUseRow?: boolean, keyField?: string) => void;
|
|
534
534
|
updateSelected: (selectedKeys: Array<any>) => void;
|
|
535
535
|
updateSelectedAll: () => void;
|
|
536
536
|
updateExpanded: (expandedRowKeys: Array<any>, keyField: string) => void;
|
package/esm/store/table2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v7.0.0-next.0
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -56,11 +56,11 @@ var Row = types
|
|
|
56
56
|
id: types.identifier,
|
|
57
57
|
parentId: '',
|
|
58
58
|
name: types.string,
|
|
59
|
-
pristine: types.frozen({}),
|
|
59
|
+
pristine: types.frozen({}), // 原始数据
|
|
60
60
|
data: types.frozen({}),
|
|
61
61
|
index: types.number,
|
|
62
62
|
newIndex: types.number,
|
|
63
|
-
depth: types.number,
|
|
63
|
+
depth: types.number, // 当前children位于第几层,便于使用getParent获取最顶层TableStore
|
|
64
64
|
children: types.optional(types.array(types.late(function () { return Row; })), []),
|
|
65
65
|
path: '' // 行数据的位置
|
|
66
66
|
})
|
|
@@ -499,7 +499,7 @@ var TableStore2 = ServiceStore.named('TableStore2')
|
|
|
499
499
|
pristine: item,
|
|
500
500
|
path: "".concat(index),
|
|
501
501
|
data: item,
|
|
502
|
-
depth: 1,
|
|
502
|
+
depth: 1, // 最大父节点默认为第一层,逐层叠加
|
|
503
503
|
children: item && Array.isArray(item[key])
|
|
504
504
|
? initChildren(item[key], 1, index, id, "".concat(index, "."), key)
|
|
505
505
|
: []
|
package/esm/theme.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare let defaultTheme: string;
|
|
|
40
40
|
export declare const ThemeContext: React.Context<string>;
|
|
41
41
|
export declare function themeable<T extends React.ComponentType<React.ComponentProps<T> & ThemeProps> & {
|
|
42
42
|
themeKey?: string;
|
|
43
|
-
}>(ComposedComponent: T, methods?: Array<string>): {
|
|
43
|
+
}>(ComposedComponent: T, methods?: Array<string>): ({
|
|
44
44
|
new (props: JSX.LibraryManagedAttributes<T, Omit<React.ComponentProps<T>, keyof ThemeProps>> & ThemeOuterProps): {
|
|
45
45
|
ref: any;
|
|
46
46
|
childRef: (ref: any) => void;
|
|
@@ -70,7 +70,7 @@ export declare function themeable<T extends React.ComponentType<React.ComponentP
|
|
|
70
70
|
displayName: string;
|
|
71
71
|
contextType: React.Context<string>;
|
|
72
72
|
ComposedComponent: React.ComponentType<T>;
|
|
73
|
-
} & hoistNonReactStatic.NonReactStatics<T, {}> & {
|
|
73
|
+
} & hoistNonReactStatic.NonReactStatics<T, {}>) & {
|
|
74
74
|
ComposedComponent: T;
|
|
75
75
|
};
|
|
76
76
|
export {};
|
package/esm/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v7.0.0-next.0
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -97,7 +97,7 @@ function themeable(ComposedComponent, methods) {
|
|
|
97
97
|
return _this;
|
|
98
98
|
}
|
|
99
99
|
class_1.prototype.render = function () {
|
|
100
|
-
var
|
|
100
|
+
var _b;
|
|
101
101
|
var theme = this.props.theme || this.context || defaultTheme;
|
|
102
102
|
var config = hasTheme(theme)
|
|
103
103
|
? getTheme(theme)
|
|
@@ -107,7 +107,7 @@ function themeable(ComposedComponent, methods) {
|
|
|
107
107
|
classnames: config.classnames,
|
|
108
108
|
theme: theme
|
|
109
109
|
};
|
|
110
|
-
var refConfig = ((
|
|
110
|
+
var refConfig = ((_b = ComposedComponent.prototype) === null || _b === void 0 ? void 0 : _b.isReactComponent) ||
|
|
111
111
|
ComposedComponent.$$typeof ===
|
|
112
112
|
Symbol.for('react.forward_ref')
|
|
113
113
|
? { ref: this.childRef }
|
|
@@ -125,8 +125,8 @@ function themeable(ComposedComponent, methods) {
|
|
|
125
125
|
methods.forEach(function (method) {
|
|
126
126
|
if (ComposedComponent.prototype[method]) {
|
|
127
127
|
result.prototype[method] = function () {
|
|
128
|
-
var
|
|
129
|
-
var fn = (
|
|
128
|
+
var _b;
|
|
129
|
+
var fn = (_b = this.ref) === null || _b === void 0 ? void 0 : _b[method];
|
|
130
130
|
return fn ? fn.apply(this.ref, arguments) : undefined;
|
|
131
131
|
};
|
|
132
132
|
}
|
package/esm/types.d.ts
CHANGED
|
@@ -1,58 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { JSONSchema7 } from 'json-schema';
|
|
3
|
-
import { ListenerAction } from './actions/Action';
|
|
4
|
-
import { debounceConfig, trackConfig } from './utils/renderer-event';
|
|
5
2
|
import type { ValidateError } from './utils/helper';
|
|
6
|
-
import {
|
|
7
|
-
export interface Option {
|
|
8
|
-
/**
|
|
9
|
-
* 用来显示的文字
|
|
10
|
-
*/
|
|
11
|
-
label?: string;
|
|
12
|
-
/**
|
|
13
|
-
* 可以用来给 Option 标记个范围,让数据展示更清晰。
|
|
14
|
-
*
|
|
15
|
-
* 这个只有在数值展示的时候显示。
|
|
16
|
-
*/
|
|
17
|
-
scopeLabel?: string;
|
|
18
|
-
/**
|
|
19
|
-
* 请保证数值唯一,多个选项值一致会认为是同一个选项。
|
|
20
|
-
*/
|
|
21
|
-
value?: any;
|
|
22
|
-
/**
|
|
23
|
-
* 是否禁用
|
|
24
|
-
*/
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* 禁用提示
|
|
28
|
-
*/
|
|
29
|
-
disabledTip?: string;
|
|
30
|
-
/**
|
|
31
|
-
* 支持嵌套
|
|
32
|
-
*/
|
|
33
|
-
children?: Options;
|
|
34
|
-
/**
|
|
35
|
-
* 是否可见
|
|
36
|
-
*/
|
|
37
|
-
visible?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 最好不要用!因为有 visible 就够了。
|
|
40
|
-
*
|
|
41
|
-
* @deprecated 用 visible
|
|
42
|
-
*/
|
|
43
|
-
hidden?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* 描述,部分控件支持
|
|
46
|
-
*/
|
|
47
|
-
description?: string;
|
|
48
|
-
/**
|
|
49
|
-
* 标记后数据延时加载
|
|
50
|
-
*/
|
|
51
|
-
defer?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* 如果设置了,优先级更高,不设置走 source 接口加载。
|
|
54
|
-
*/
|
|
55
|
-
deferApi?: BaseApi;
|
|
3
|
+
import { AMISOption, AMISApiObject, AMISClassName, AMISSchemaBase, AMISOperatorType, AMISExpressionValue, AMISExpressionSimple, AMISExpressionFunc, AMISExpressionField, AMISExpressionFormula, AMISExpressionComplex, AMISConditionRule, AMISConditionGroupValue, AMISConditionValue, AMISExpression } from './schema';
|
|
4
|
+
export interface Option extends AMISOption {
|
|
56
5
|
/**
|
|
57
6
|
* 标记正在加载。只有 defer 为 true 时有意义。内部字段不可以外部设置
|
|
58
7
|
*/
|
|
@@ -61,132 +10,14 @@ export interface Option {
|
|
|
61
10
|
* 只有设置了 defer 才有意义,内部字段不可以外部设置
|
|
62
11
|
*/
|
|
63
12
|
loaded?: boolean;
|
|
64
|
-
[propName: string]: any;
|
|
65
13
|
}
|
|
66
14
|
export interface Options extends Array<Option> {
|
|
67
15
|
}
|
|
68
16
|
export type OptionValue = string | number | null | undefined | Option;
|
|
69
|
-
export interface BaseApiObject {
|
|
70
|
-
/**
|
|
71
|
-
* API 发送类型
|
|
72
|
-
*/
|
|
73
|
-
method?: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'jsonp' | 'js';
|
|
74
|
-
/**
|
|
75
|
-
* API 发送目标地址
|
|
76
|
-
*/
|
|
77
|
-
url: string;
|
|
78
|
-
/**
|
|
79
|
-
* 用来控制携带数据. 当key 为 `&` 值为 `$$` 时, 将所有原始数据打平设置到 data 中. 当值为 $$ 将所有原始数据赋值到对应的 key 中. 当值为 $ 打头时, 将变量值设置到 key 中.
|
|
80
|
-
*/
|
|
81
|
-
data?: {
|
|
82
|
-
[propName: string]: any;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* 默认数据映射中的key如果带点,或者带大括号,会转成对象比如:
|
|
86
|
-
*
|
|
87
|
-
* {
|
|
88
|
-
* 'a.b': '123'
|
|
89
|
-
* }
|
|
90
|
-
*
|
|
91
|
-
* 经过数据映射后变成
|
|
92
|
-
* {
|
|
93
|
-
* a: {
|
|
94
|
-
* b: '123
|
|
95
|
-
* }
|
|
96
|
-
* }
|
|
97
|
-
*
|
|
98
|
-
* 如果想要关闭此功能,请设置 convertKeyToPath 为 false
|
|
99
|
-
*/
|
|
100
|
-
convertKeyToPath?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* 用来做接口返回的数据映射。
|
|
103
|
-
*/
|
|
104
|
-
responseData?: {
|
|
105
|
-
[propName: string]: any;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* 如果 method 为 get 的接口,设置了 data 信息。
|
|
109
|
-
* 默认 data 会自动附带在 query 里面发送给后端。
|
|
110
|
-
*
|
|
111
|
-
* 如果想通过 body 发送给后端,那么请把这个配置成 false。
|
|
112
|
-
*
|
|
113
|
-
* 但是,浏览器还不支持啊,设置了只是摆设。除非服务端支持 method-override
|
|
114
|
-
*/
|
|
115
|
-
attachDataToQuery?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* 发送体的格式
|
|
118
|
-
*/
|
|
119
|
-
dataType?: 'json' | 'form-data' | 'form';
|
|
120
|
-
/**
|
|
121
|
-
* 如果是文件下载接口,请配置这个。
|
|
122
|
-
*/
|
|
123
|
-
responseType?: 'blob';
|
|
124
|
-
/**
|
|
125
|
-
* 携带 headers,用法和 data 一样,可以用变量。
|
|
126
|
-
*/
|
|
127
|
-
headers?: {
|
|
128
|
-
[propName: string]: string | number;
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* 设置发送条件
|
|
132
|
-
*/
|
|
133
|
-
sendOn?: string;
|
|
134
|
-
/**
|
|
135
|
-
* 默认都是追加模式,如果想完全替换把这个配置成 true
|
|
136
|
-
*/
|
|
137
|
-
replaceData?: boolean;
|
|
138
|
-
/**
|
|
139
|
-
* 是否将两次返回的数据字段,做一个合并。配置返回对象中的字段名,支持配置多个。
|
|
140
|
-
*
|
|
141
|
-
* 比如:同时返回 log 字段,第一次返回 {log: '1'},第二次返回 {log: '2'},合并后的结果是 {log: ['1', '2']]}
|
|
142
|
-
* 再比如:同时返回 items 字段,第一次返回 {items: [1, 2]},第二次返回 {items: [3, 4]},合并后的结果是 {items: [1, 2, 3, 4]}
|
|
143
|
-
*/
|
|
144
|
-
concatDataFields?: string | Array<string>;
|
|
145
|
-
/**
|
|
146
|
-
* 是否自动刷新,当 url 中的取值结果变化时,自动刷新数据。
|
|
147
|
-
*
|
|
148
|
-
* @default true
|
|
149
|
-
*/
|
|
150
|
-
autoRefresh?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* 当开启自动刷新的时候,默认是 api 的 url 来自动跟踪变量变化的。
|
|
153
|
-
* 如果你希望监控 url 外的变量,请配置 trackExpression。
|
|
154
|
-
*/
|
|
155
|
-
trackExpression?: string;
|
|
156
|
-
/**
|
|
157
|
-
* 如果设置了值,同一个接口,相同参数,指定的时间(单位:ms)内请求将直接走缓存。
|
|
158
|
-
*/
|
|
159
|
-
cache?: number;
|
|
160
|
-
/**
|
|
161
|
-
* 强制将数据附加在 query,默认只有 api 地址中没有用变量的时候 crud 查询接口才会
|
|
162
|
-
* 自动附加数据到 query 部分,如果想强制附加请设置这个属性。
|
|
163
|
-
* 对于那种临时加了个变量但是又不想全部参数写一遍的时候配置很有用。
|
|
164
|
-
*/
|
|
165
|
-
forceAppendDataToQuery?: boolean;
|
|
166
|
-
/**
|
|
167
|
-
* qs 配置项
|
|
168
|
-
*/
|
|
169
|
-
qsOptions?: {
|
|
170
|
-
arrayFormat?: 'indices' | 'brackets' | 'repeat' | 'comma';
|
|
171
|
-
indices?: boolean;
|
|
172
|
-
allowDots?: boolean;
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* autoFill 是否显示自动填充错误提示
|
|
176
|
-
*/
|
|
177
|
-
silent?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
* 提示信息
|
|
180
|
-
*/
|
|
181
|
-
messages?: {
|
|
182
|
-
success?: string;
|
|
183
|
-
failed?: string;
|
|
184
|
-
};
|
|
17
|
+
export interface BaseApiObject extends AMISApiObject {
|
|
185
18
|
}
|
|
186
19
|
export type BaseApi = BaseApiObject | string;
|
|
187
|
-
export type ClassName =
|
|
188
|
-
[propName: string]: boolean | undefined | null | string;
|
|
189
|
-
};
|
|
20
|
+
export type ClassName = AMISClassName;
|
|
190
21
|
export type RequestAdaptor = (api: ApiObject, context: any) => ApiObject | Promise<ApiObject>;
|
|
191
22
|
export type ResponseAdaptor = (payload: object, response: fetcherResult, api: ApiObject, context: any) => any;
|
|
192
23
|
export interface ApiObject extends BaseApiObject {
|
|
@@ -255,20 +86,11 @@ export interface Payload {
|
|
|
255
86
|
[propName: string]: string;
|
|
256
87
|
};
|
|
257
88
|
}
|
|
258
|
-
export interface Schema {
|
|
259
|
-
type: string;
|
|
260
|
-
detectField?: string;
|
|
261
|
-
visibleOn?: string;
|
|
262
|
-
hiddenOn?: string;
|
|
263
|
-
disabledOn?: string;
|
|
264
|
-
staticOn?: string;
|
|
265
|
-
visible?: boolean;
|
|
266
|
-
hidden?: boolean;
|
|
267
|
-
disabled?: boolean;
|
|
268
|
-
static?: boolean;
|
|
89
|
+
export interface Schema extends AMISSchemaBase {
|
|
269
90
|
children?: JSX.Element | ((props: any, schema?: any) => JSX.Element) | null;
|
|
270
|
-
|
|
271
|
-
|
|
91
|
+
component?: React.ElementType & {
|
|
92
|
+
wrapedAsFormItem?: any;
|
|
93
|
+
};
|
|
272
94
|
[propName: string]: any;
|
|
273
95
|
}
|
|
274
96
|
export interface ButtonObject {
|
|
@@ -444,170 +266,17 @@ export interface NavigationObject {
|
|
|
444
266
|
className?: string;
|
|
445
267
|
[propName: string]: any;
|
|
446
268
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
export type
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
* "blue": "data.progress > 60"
|
|
461
|
-
* }
|
|
462
|
-
*/
|
|
463
|
-
export type SchemaClassName = string | {
|
|
464
|
-
[propName: string]: boolean | undefined | null | SchemaExpression;
|
|
465
|
-
};
|
|
466
|
-
export interface BaseSchemaWithoutType {
|
|
467
|
-
/**
|
|
468
|
-
* 组件唯一 id,主要用于页面设计器中定位 json 节点
|
|
469
|
-
*/
|
|
470
|
-
$$id?: string;
|
|
471
|
-
/**
|
|
472
|
-
* 容器 css 类名
|
|
473
|
-
*/
|
|
474
|
-
className?: SchemaClassName;
|
|
475
|
-
/**
|
|
476
|
-
* 配合 definitions 一起使用,可以实现无限循环的渲染器。
|
|
477
|
-
*/
|
|
478
|
-
$ref?: string;
|
|
479
|
-
/**
|
|
480
|
-
* 是否禁用
|
|
481
|
-
*/
|
|
482
|
-
disabled?: boolean;
|
|
483
|
-
/**
|
|
484
|
-
* 是否禁用表达式
|
|
485
|
-
*/
|
|
486
|
-
disabledOn?: SchemaExpression;
|
|
487
|
-
/**
|
|
488
|
-
* 是否隐藏
|
|
489
|
-
* @deprecated 推荐用 visible
|
|
490
|
-
*/
|
|
491
|
-
hidden?: boolean;
|
|
492
|
-
/**
|
|
493
|
-
* 是否隐藏表达式
|
|
494
|
-
* @deprecated 推荐用 visibleOn
|
|
495
|
-
*/
|
|
496
|
-
hiddenOn?: SchemaExpression;
|
|
497
|
-
/**
|
|
498
|
-
* 是否显示
|
|
499
|
-
*/
|
|
500
|
-
visible?: boolean;
|
|
501
|
-
/**
|
|
502
|
-
* 是否显示表达式
|
|
503
|
-
*/
|
|
504
|
-
visibleOn?: SchemaExpression;
|
|
505
|
-
/**
|
|
506
|
-
* 组件唯一 id,主要用于日志采集
|
|
507
|
-
*/
|
|
508
|
-
id?: string;
|
|
509
|
-
/**
|
|
510
|
-
* 事件动作配置
|
|
511
|
-
*/
|
|
512
|
-
onEvent?: {
|
|
513
|
-
[propName: string]: {
|
|
514
|
-
weight?: number;
|
|
515
|
-
actions: ListenerAction[];
|
|
516
|
-
debounce?: debounceConfig;
|
|
517
|
-
track?: trackConfig;
|
|
518
|
-
};
|
|
519
|
-
};
|
|
520
|
-
/**
|
|
521
|
-
* 是否静态展示
|
|
522
|
-
*/
|
|
523
|
-
static?: boolean;
|
|
524
|
-
/**
|
|
525
|
-
* 是否静态展示表达式
|
|
526
|
-
*/
|
|
527
|
-
staticOn?: SchemaExpression;
|
|
528
|
-
/**
|
|
529
|
-
* 静态展示空值占位
|
|
530
|
-
*/
|
|
531
|
-
staticPlaceholder?: string;
|
|
532
|
-
/**
|
|
533
|
-
* 静态展示表单项类名
|
|
534
|
-
*/
|
|
535
|
-
staticClassName?: SchemaClassName;
|
|
536
|
-
/**
|
|
537
|
-
* 静态展示表单项Label类名
|
|
538
|
-
*/
|
|
539
|
-
staticLabelClassName?: SchemaClassName;
|
|
540
|
-
/**
|
|
541
|
-
* 静态展示表单项Value类名
|
|
542
|
-
*/
|
|
543
|
-
staticInputClassName?: SchemaClassName;
|
|
544
|
-
staticSchema?: any;
|
|
545
|
-
/**
|
|
546
|
-
* 组件样式
|
|
547
|
-
*/
|
|
548
|
-
style?: {
|
|
549
|
-
[propName: string]: any;
|
|
550
|
-
};
|
|
551
|
-
/**
|
|
552
|
-
* 编辑器配置,运行时可以忽略
|
|
553
|
-
*/
|
|
554
|
-
editorSetting?: {
|
|
555
|
-
/**
|
|
556
|
-
* 组件行为、用途,如 create、update、remove
|
|
557
|
-
*/
|
|
558
|
-
behavior?: string;
|
|
559
|
-
/**
|
|
560
|
-
* 组件名称,通常是业务名称方便定位
|
|
561
|
-
*/
|
|
562
|
-
displayName?: string;
|
|
563
|
-
/**
|
|
564
|
-
* 编辑器假数据,方便展示
|
|
565
|
-
*/
|
|
566
|
-
mock?: any;
|
|
567
|
-
[propName: string]: any;
|
|
568
|
-
};
|
|
569
|
-
/**
|
|
570
|
-
* 可以组件级别用来关闭移动端样式
|
|
571
|
-
*/
|
|
572
|
-
useMobileUI?: boolean;
|
|
573
|
-
}
|
|
574
|
-
export type OperatorType = 'equal' | 'not_equal' | 'is_empty' | 'is_not_empty' | 'like' | 'not_like' | 'starts_with' | 'ends_with' | 'less' | 'less_or_equal' | 'greater' | 'greater_or_equal' | 'between' | 'not_between' | 'select_equals' | 'select_not_equals' | 'select_any_in' | 'select_not_any_in' | {
|
|
575
|
-
label: string;
|
|
576
|
-
value: string;
|
|
577
|
-
};
|
|
578
|
-
export type ExpressionSimple = string | number | object | undefined;
|
|
579
|
-
export type ExpressionValue = ExpressionSimple | {
|
|
580
|
-
type: 'value';
|
|
581
|
-
value: ExpressionSimple;
|
|
582
|
-
};
|
|
583
|
-
export type ExpressionFunc = {
|
|
584
|
-
type: 'func';
|
|
585
|
-
func: string;
|
|
586
|
-
args: Array<ExpressionComplex>;
|
|
587
|
-
};
|
|
588
|
-
export type ExpressionField = {
|
|
589
|
-
type: 'field';
|
|
590
|
-
field: string;
|
|
591
|
-
};
|
|
592
|
-
export type ExpressionFormula = {
|
|
593
|
-
type: 'formula';
|
|
594
|
-
value: string;
|
|
595
|
-
};
|
|
596
|
-
export type ExpressionComplex = ExpressionValue | ExpressionFunc | ExpressionField | ExpressionFormula;
|
|
597
|
-
export interface ConditionRule {
|
|
598
|
-
id: any;
|
|
599
|
-
left?: ExpressionComplex;
|
|
600
|
-
op?: OperatorType;
|
|
601
|
-
right?: ExpressionComplex | Array<ExpressionComplex>;
|
|
602
|
-
if?: string;
|
|
603
|
-
}
|
|
604
|
-
export interface ConditionGroupValue {
|
|
605
|
-
id: string;
|
|
606
|
-
conjunction: 'and' | 'or';
|
|
607
|
-
not?: boolean;
|
|
608
|
-
children?: Array<ConditionRule | ConditionGroupValue>;
|
|
609
|
-
if?: string;
|
|
610
|
-
}
|
|
611
|
-
export interface ConditionValue extends ConditionGroupValue {
|
|
612
|
-
}
|
|
269
|
+
export type SchemaExpression = AMISExpression;
|
|
270
|
+
export type SchemaClassName = AMISClassName;
|
|
271
|
+
export type BaseSchemaWithoutType = AMISSchemaBase;
|
|
272
|
+
export type OperatorType = AMISOperatorType;
|
|
273
|
+
export type ExpressionSimple = AMISExpressionSimple;
|
|
274
|
+
export type ExpressionValue = AMISExpressionValue;
|
|
275
|
+
export type ExpressionFunc = AMISExpressionFunc;
|
|
276
|
+
export type ExpressionField = AMISExpressionField;
|
|
277
|
+
export type ExpressionFormula = AMISExpressionFormula;
|
|
278
|
+
export type ExpressionComplex = AMISExpressionComplex;
|
|
279
|
+
export type ConditionRule = AMISConditionRule;
|
|
280
|
+
export type ConditionGroupValue = AMISConditionGroupValue;
|
|
281
|
+
export type ConditionValue = AMISConditionValue;
|
|
613
282
|
export {};
|
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,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-core
|
|
2
|
+
* amis-core v7.0.0-next.0
|
|
3
3
|
* Copyright 2018-2025 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { __rest, __read } from 'tslib';
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import useRootClose from 'react-overlays/useRootClose';
|
|
9
|
-
import {
|
|
9
|
+
import { findDomCompat } from './findDomCompat.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* 兼容之前的 RootCloseWrapper 写法
|
|
@@ -14,7 +14,7 @@ import { findDOMNode } from 'react-dom';
|
|
|
14
14
|
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
|
-
var rootElement =
|
|
17
|
+
var rootElement = findDomCompat(rootComponent);
|
|
18
18
|
var onClose = React.useCallback(function (e) {
|
|
19
19
|
var target = e.target;
|
|
20
20
|
var belongedModal = target.closest('[role=dialog]');
|
package/esm/utils/SimpleMap.js
CHANGED