mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
fix: update import statements to use type imports
This commit is contained in:
parent
20ddbed4fd
commit
a74ce5c229
@ -13,7 +13,7 @@ import {
|
||||
import { setNativeSelection, cursor } from '@alilc/lowcode-utils';
|
||||
import { INode, Node } from '../document';
|
||||
import { ISimulatorHost, isSimulatorHost } from '../simulator';
|
||||
import { IDesigner } from './designer';
|
||||
import type { IDesigner } from './designer';
|
||||
import { makeEventsHandler } from '../utils/misc';
|
||||
|
||||
export interface ILocateEvent extends IPublicModelLocateEvent {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { IPublicApiSetters, IPublicModelEditor } from '@alilc/lowcode-types';
|
||||
import { IDesigner } from '../designer';
|
||||
import { INode } from '../../document';
|
||||
import { ISettingField } from './setting-field';
|
||||
import type { IPublicApiSetters, IPublicModelEditor } from '@alilc/lowcode-types';
|
||||
import type { IDesigner } from '../designer';
|
||||
import type { INode } from '../../document';
|
||||
import type { ISettingField } from './setting-field';
|
||||
|
||||
export interface ISettingEntry {
|
||||
readonly designer: IDesigner | undefined;
|
||||
|
||||
@ -14,7 +14,7 @@ import { Transducer } from './utils';
|
||||
import { SettingPropEntry } from './setting-prop-entry';
|
||||
import { computed, obx, makeObservable, action, untracked, intl } from '@alilc/lowcode-editor-core';
|
||||
import { cloneDeep, isCustomView, isDynamicSetter, isJSExpression } from '@alilc/lowcode-utils';
|
||||
import { ISettingTopEntry } from './setting-top-entry';
|
||||
import type { ISettingTopEntry } from './setting-top-entry';
|
||||
|
||||
function getSettingFieldCollectorKey(parent: ISettingTopEntry | ISettingField, config: IPublicTypeFieldConfig) {
|
||||
let cur = parent;
|
||||
@ -28,8 +28,6 @@ function getSettingFieldCollectorKey(parent: ISettingTopEntry | ISettingField, c
|
||||
return path.join('.');
|
||||
}
|
||||
|
||||
export interface ISettingField extends SettingField {}
|
||||
|
||||
export class SettingField extends SettingPropEntry {
|
||||
readonly isSettingField = true;
|
||||
|
||||
@ -273,3 +271,5 @@ export class SettingField extends SettingPropEntry {
|
||||
export function isSettingField(obj: any): obj is ISettingField {
|
||||
return obj && obj.isSettingField;
|
||||
}
|
||||
|
||||
export type ISettingField = typeof SettingField;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { obx, computed, makeObservable, runInAction, IEventBus, createModuleEventBus } from '@alilc/lowcode-editor-core';
|
||||
import { GlobalEvent, IPublicApiSetters, IPublicModelEditor, IPublicModelSettingField, IPublicTypeFieldExtraProps, IPublicTypeSetValueOptions } from '@alilc/lowcode-types';
|
||||
import { uniqueId, isJSExpression } from '@alilc/lowcode-utils';
|
||||
import { ISettingEntry } from './setting-entry-type';
|
||||
import { INode } from '../../document';
|
||||
import { uniqueId, isJSExpression, isSettingField } from '@alilc/lowcode-utils';
|
||||
import type { ISettingEntry } from './setting-entry-type';
|
||||
import type { INode } from '../../document';
|
||||
import type { IComponentMeta } from '../../component-meta';
|
||||
import { IDesigner } from '../designer';
|
||||
import { ISettingTopEntry } from './setting-top-entry';
|
||||
import { ISettingField, isSettingField } from './setting-field';
|
||||
import type { IDesigner } from '../designer';
|
||||
import type { ISettingTopEntry } from './setting-top-entry';
|
||||
import type { ISettingField } from './setting-field';
|
||||
|
||||
export interface ISettingPropEntry extends ISettingEntry {
|
||||
readonly isGroup: boolean;
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import { IPublicTypeCustomView, IPublicModelEditor, IPublicModelSettingTopEntry, IPublicApiSetters } from '@alilc/lowcode-types';
|
||||
import { isCustomView } from '@alilc/lowcode-utils';
|
||||
import { computed, IEventBus, createModuleEventBus, obx, makeObservable } from '@alilc/lowcode-editor-core';
|
||||
import { ISettingEntry } from './setting-entry-type';
|
||||
import { ISettingField, SettingField } from './setting-field';
|
||||
import { INode } from '../../document';
|
||||
import { SettingField } from './setting-field';
|
||||
import type { ISettingEntry } from './setting-entry-type';
|
||||
import type { ISettingField } from './setting-field';
|
||||
import type { INode } from '../../document';
|
||||
import type { IComponentMeta } from '../../component-meta';
|
||||
import { IDesigner } from '../designer';
|
||||
import type { IDesigner } from '../designer';
|
||||
|
||||
function generateSessionId(nodes: INode[]) {
|
||||
return nodes
|
||||
|
||||
@ -37,10 +37,10 @@ import {
|
||||
isDragNodeDataObject,
|
||||
isNode,
|
||||
} from '@alilc/lowcode-utils';
|
||||
import { IProject } from '../project';
|
||||
import { ISimulatorHost } from '../simulator';
|
||||
import type { IProject } from '../project';
|
||||
import type { ISimulatorHost } from '../simulator';
|
||||
import type { IComponentMeta } from '../component-meta';
|
||||
import { IDesigner, IHistory } from '../designer';
|
||||
import type { IDesigner, IHistory } from '../designer';
|
||||
import { insertChildren, insertChild, IRootNode } from './node/node';
|
||||
import type { INode } from './node/node';
|
||||
import { Selection, ISelection } from './selection';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Component } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { observer } from '@alilc/lowcode-editor-core';
|
||||
import { DocumentModel, IDocumentModel } from './document-model';
|
||||
import type { IDocumentModel } from './document-model';
|
||||
import { BuiltinSimulatorHostView } from '../builtin-simulator';
|
||||
|
||||
@observer
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { reaction, untracked, IEventBus, createModuleEventBus } from '@alilc/lowcode-editor-core';
|
||||
import { IPublicTypeNodeSchema, IPublicModelHistory, IPublicTypeDisposable } from '@alilc/lowcode-types';
|
||||
import { Logger } from '@alilc/lowcode-utils';
|
||||
import { IDocumentModel } from '../designer';
|
||||
import type { IDocumentModel } from '../designer';
|
||||
|
||||
const logger = new Logger({ level: 'warn', bizName: 'history' });
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { obx, computed, makeObservable, IEventBus, createModuleEventBus } from '@alilc/lowcode-editor-core';
|
||||
import { Node, INode } from './node';
|
||||
import type { INode } from './node';
|
||||
import { IPublicTypeNodeData, IPublicModelNodeChildren, IPublicEnumTransformStage, IPublicTypeDisposable } from '@alilc/lowcode-types';
|
||||
import { shallowEqual, compatStage, isNodeSchema } from '@alilc/lowcode-utils';
|
||||
import { foreachReverse } from '../../utils/tree';
|
||||
@ -7,7 +7,7 @@ import { NodeRemoveOptions } from '../../types';
|
||||
|
||||
export interface IOnChangeOptions {
|
||||
type: string;
|
||||
node: Node;
|
||||
node: INode;
|
||||
}
|
||||
|
||||
export class NodeChildren implements Omit<IPublicModelNodeChildren<INode>,
|
||||
@ -80,7 +80,7 @@ export class NodeChildren implements Omit<IPublicModelNodeChildren<INode>,
|
||||
const originChildren = this.children.slice();
|
||||
this.children.forEach((child) => child.internalSetParent(null));
|
||||
|
||||
const children = new Array<Node>(data.length);
|
||||
const children = new Array<INode>(data.length);
|
||||
for (let i = 0, l = data.length; i < l; i++) {
|
||||
const child = originChildren[i];
|
||||
const item = data[i];
|
||||
@ -169,14 +169,14 @@ export class NodeChildren implements Omit<IPublicModelNodeChildren<INode>,
|
||||
if (node.isParentalNode) {
|
||||
foreachReverse(
|
||||
node.children!,
|
||||
(subNode: Node) => {
|
||||
(subNode: INode) => {
|
||||
subNode.remove(useMutator, purge, options);
|
||||
},
|
||||
(iterable, idx) => (iterable as NodeChildren).get(idx),
|
||||
);
|
||||
foreachReverse(
|
||||
node.slots,
|
||||
(slotNode: Node) => {
|
||||
(slotNode: INode) => {
|
||||
slotNode.remove(useMutator, purge);
|
||||
},
|
||||
(iterable, idx) => (iterable as [])[idx],
|
||||
|
||||
@ -18,11 +18,11 @@ import {
|
||||
IBaseModelNode,
|
||||
} from '@alilc/lowcode-types';
|
||||
import { compatStage, isDOMText, isJSExpression, isNode, isNodeSchema } from '@alilc/lowcode-utils';
|
||||
import { ISettingTopEntry } from '@alilc/lowcode-designer';
|
||||
import type { ISettingTopEntry } from '@alilc/lowcode-designer';
|
||||
import { Props, getConvertedExtraKey, IProps } from './props/props';
|
||||
import type { IDocumentModel } from '../document-model';
|
||||
import { NodeChildren, INodeChildren } from './node-children';
|
||||
import { IProp, Prop } from './props/prop';
|
||||
import type { IProp } from './props/prop';
|
||||
import type { IComponentMeta } from '../../component-meta';
|
||||
import { ExclusiveGroup, isExclusiveGroup } from './exclusive-group';
|
||||
import type { IExclusiveGroup } from './exclusive-group';
|
||||
@ -495,7 +495,7 @@ export class Node<Schema extends IPublicTypeNodeSchema = IPublicTypeNodeSchema>
|
||||
}
|
||||
}
|
||||
|
||||
internalSetSlotFor(slotFor: Prop | null | undefined) {
|
||||
internalSetSlotFor(slotFor: IProp | null | undefined) {
|
||||
this._slotFor = slotFor;
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { Component, MouseEvent, Fragment, ReactNode } from 'react';
|
||||
import { shallowIntl, observer, obx, engineConfig, runInAction } from '@alilc/lowcode-editor-core';
|
||||
import { createContent, isJSSlot, isSetterConfig, shouldUseVariableSetter } from '@alilc/lowcode-utils';
|
||||
import { createContent, isJSSlot, isSetterConfig, shouldUseVariableSetter, isSettingField } from '@alilc/lowcode-utils';
|
||||
import { Skeleton, Stage } from '@alilc/lowcode-editor-skeleton';
|
||||
import { IPublicApiSetters, IPublicTypeCustomView, IPublicTypeDynamicProps } from '@alilc/lowcode-types';
|
||||
import { ISettingEntry, IComponentMeta, ISettingField, isSettingField, ISettingTopEntry } from '@alilc/lowcode-designer';
|
||||
import type { ISettingEntry, IComponentMeta, ISettingField, ISettingTopEntry } from '@alilc/lowcode-designer';
|
||||
import { createField } from '../field';
|
||||
import PopupService, { PopupPipe } from '../popup';
|
||||
import { SkeletonContext } from '../../context';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Tab, Breadcrumb } from '@alifd/next';
|
||||
import { Title, observer, Editor, obx, globalContext, engineConfig, makeObservable } from '@alilc/lowcode-editor-core';
|
||||
import { ISettingField, INode } from '@alilc/lowcode-designer';
|
||||
import type { ISettingField, INode } from '@alilc/lowcode-designer';
|
||||
import classNames from 'classnames';
|
||||
import { SettingsMain } from './main';
|
||||
import { SettingsPane } from './settings-pane';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user