1
0
mirror of synced 2026-03-26 05:18:34 +08:00

refactor: 将data-source,dep,schema,utils收敛到core,将form,table,stage,design,util收敛到editor

This commit is contained in:
roymondchen
2024-09-04 17:25:33 +08:00
committed by roymondchen
parent c3bc1035ad
commit 34fc0a15b9
212 changed files with 634 additions and 778 deletions

View File

@@ -20,9 +20,8 @@ import EventEmitter from 'events';
import { cloneDeep } from 'lodash-es';
import type { default as TMagicApp } from '@tmagic/core';
import type { DataSourceSchema, DisplayCond, Id, MNode, NODE_CONDS_KEY } from '@tmagic/schema';
import { compiledNode } from '@tmagic/utils';
import type { DataSourceSchema, default as TMagicApp, DisplayCond, Id, MNode, NODE_CONDS_KEY } from '@tmagic/core';
import { compiledNode } from '@tmagic/core';
import { SimpleObservedData } from './observed-data/SimpleObservedData';
import { DataSource, HttpDataSource } from './data-sources';

View File

@@ -18,7 +18,7 @@
import { union } from 'lodash-es';
import type { default as TMagicApp } from '@tmagic/core';
import { getDepNodeIds, getNodes, isPage } from '@tmagic/utils';
import { getDepNodeIds, getNodes, isPage } from '@tmagic/core';
import DataSourceManager from './DataSourceManager';
import type { ChangeEvent, DataSourceManagerData } from './types';

View File

@@ -19,9 +19,8 @@ import EventEmitter from 'events';
import { cloneDeep } from 'lodash-es';
import type { default as TMagicApp } from '@tmagic/core';
import type { CodeBlockContent, DataSchema, DataSourceSchema } from '@tmagic/schema';
import { getDefaultValueFromFields } from '@tmagic/utils';
import type { CodeBlockContent, DataSchema, DataSourceSchema, default as TMagicApp } from '@tmagic/core';
import { getDefaultValueFromFields } from '@tmagic/core';
import { ObservedData } from '@data-source/observed-data/ObservedData';
import { SimpleObservedData } from '@data-source/observed-data/SimpleObservedData';

View File

@@ -15,8 +15,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { HttpOptions, RequestFunction } from '@tmagic/schema';
import { getValueByKeyPath } from '@tmagic/utils';
import type { HttpOptions, RequestFunction } from '@tmagic/core';
import { getValueByKeyPath } from '@tmagic/core';
import { DataSourceOptions, HttpDataSourceSchema } from '@data-source/types';

View File

@@ -1,6 +1,5 @@
import { isDataSourceCondTarget, isDataSourceTarget, Target, Watcher } from '@tmagic/dep';
import type { DataSourceSchema, MNode } from '@tmagic/schema';
import { DSL_NODE_KEY_COPY_PREFIX } from '@tmagic/utils';
import type { DataSourceSchema, MNode } from '@tmagic/core';
import { DSL_NODE_KEY_COPY_PREFIX, isDataSourceCondTarget, isDataSourceTarget, Target, Watcher } from '@tmagic/core';
const cache = new Map();

View File

@@ -15,7 +15,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { default as DataSourceManager } from './DataSourceManager';
export * from './data-sources';
export * from './createDataSourceManager';

View File

@@ -1,6 +1,6 @@
import { EventEmitter } from 'events';
import { getValueByKeyPath, setValueByKeyPath } from '@tmagic/utils';
import { getValueByKeyPath, setValueByKeyPath } from '@tmagic/core';
import { ObservedData } from './ObservedData';

View File

@@ -1,5 +1,4 @@
import type { default as TMagicApp } from '@tmagic/core';
import type { DataSourceSchema, HttpOptions, RequestFunction } from '@tmagic/schema';
import type { DataSourceSchema, default as TMagicApp, HttpOptions, RequestFunction } from '@tmagic/core';
import type DataSource from './data-sources/Base';
import type HttpDataSource from './data-sources/Http';

View File

@@ -1,7 +1,6 @@
import { cloneDeep } from 'lodash-es';
import type { DepData, DisplayCond, DisplayCondItem, MApp, MNode, MPage, MPageFragment } from '@tmagic/schema';
import { NODE_CONDS_KEY } from '@tmagic/schema';
import type { DepData, DisplayCond, DisplayCondItem, MApp, MNode, MPage, MPageFragment } from '@tmagic/core';
import {
compiledCond,
compiledNode,
@@ -10,8 +9,9 @@ import {
getValueByKeyPath,
isPage,
isPageFragment,
NODE_CONDS_KEY,
replaceChildNode,
} from '@tmagic/utils';
} from '@tmagic/core';
import type { AsyncDataSourceResolveResult, DataSourceManagerData } from './types';