refactor: 将data-source,dep,schema,utils收敛到core,将form,table,stage,design,util收敛到editor
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { getValueByKeyPath, setValueByKeyPath } from '@tmagic/utils';
|
||||
import { getValueByKeyPath, setValueByKeyPath } from '@tmagic/core';
|
||||
|
||||
import { ObservedData } from './ObservedData';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user