index.ts 3.1 KB
Newer Older
1 2 3 4 5 6
import { ViewType } from '@ibiz-template/model';
import { AppPortalViewProvider } from './app-portal-view-provider';
import { EditViewProvider } from './edit-view-provider';
import { EditView3Provider } from './edit-view3-provider';
import { GridViewProvider } from './grid-view-provider';
import { IndexViewProvider } from './index-view-provider';
7 8
import { ListExpViewProvider } from './list-exp-view-provider';
import { ListViewProvider } from './list-view-provider';
9 10 11 12
import { MPickupViewProvider } from './mpickup-view-provider';
import { OptViewProvider } from './opt-view-provider';
import { PickupGridViewProvider } from './pickup-grid-view-provider';
import { PickupViewProvider } from './pickup-view-provider';
13
import { TabExpViewProvider } from './tab-exp-view-provider';
14
import { TreeExpViewProvider } from './tree-exp-view-provider';
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
import { WFDynaActionViewProvider } from './wf-dyna-action-view-provider';
import { WFDynaEditView3Provider } from './wf-dyna-edit-view3-provider';
import { WFDynaStartViewProvider } from './wf-dyna-start-view-provider';
import { WFStepTraceViewProvider } from './wf-step-trace-view-provider';

/**
 * 预置默认的视图适配器
 *
 * @author lxm
 * @date 2022-10-26 11:10:46
 * @export
 * @returns {*}  {void}
 */
export function presetViewProvider(): void {
  const { view } = ibiz.register;
  if (!view) {
    return;
  }
  view.register(ViewType.APP_INDEX_VIEW, new IndexViewProvider());
  view.register(ViewType.DE_EDIT_VIEW, new EditViewProvider());
35
  view.register(ViewType.DE_EDIT_VIEW9, new EditViewProvider());
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  view.register(ViewType.DE_GRID_VIEW, new GridViewProvider());
  view.register(ViewType.DE_GRID_VIEW9, new GridViewProvider());
  view.register(ViewType.DE_EDIT_VIEW3, new EditView3Provider());
  view.register(ViewType.DE_OPT_VIEW, new OptViewProvider());
  view.register(ViewType.DE_PICKUP_VIEW, new PickupViewProvider());
  view.register(ViewType.DE_MPICKUP_VIEW, new MPickupViewProvider());
  view.register(ViewType.DE_PICKUP_GRID_VIEW, new PickupGridViewProvider());
  view.register(ViewType.DE_WF_DYNA_EDIT_VIEW3, new WFDynaEditView3Provider());
  view.register(ViewType.DE_WF_DYNA_START_VIEW, new WFDynaStartViewProvider());
  view.register(
    ViewType.DE_WF_DYNA_ACTION_VIEW,
    new WFDynaActionViewProvider(),
  );
  view.register(ViewType.APP_WF_STEP_TRACE_VIEW, new WFStepTraceViewProvider());
  view.register(ViewType.APP_PORTAL_VIEW, new AppPortalViewProvider());
51 52 53 54
  // 导航
  view.register(ViewType.DE_TAB_EXP_VIEW, new TabExpViewProvider());
  view.register(ViewType.DE_LIST_EXP_VIEW, new ListExpViewProvider());
  view.register(ViewType.DE_LIST_VIEW, new ListViewProvider());
55
  view.register(ViewType.DE_TREE_EXP_VIEW, new TreeExpViewProvider());
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
}

export {
  EditViewProvider,
  IndexViewProvider,
  GridViewProvider,
  EditView3Provider,
  OptViewProvider,
  PickupViewProvider,
  MPickupViewProvider,
  PickupGridViewProvider,
  WFDynaEditView3Provider,
  WFDynaStartViewProvider,
  WFDynaActionViewProvider,
  WFStepTraceViewProvider,
  AppPortalViewProvider,
72 73 74
  ListExpViewProvider,
  ListViewProvider,
  TabExpViewProvider,
75
  TreeExpViewProvider,
76
};