Skip to content
Snippets Groups Projects
app.module.ts 9.79 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { DoBootstrap, Injector, NgModule } from '@angular/core';
    
    import { BrowserModule } from '@angular/platform-browser';
    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
    
    import { CommonModule } from '@angular/common';
    
    import { createCustomElement } from '@angular/elements';
    
    rhenck's avatar
    rhenck committed
    import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
    
    import { NgxTiptapModule } from 'ngx-tiptap';
    
    import { MatButtonToggleModule } from '@angular/material/button-toggle';
    
    import { MatMenuModule } from '@angular/material/menu';
    
    import { MatSliderModule } from '@angular/material/slider';
    
    import { MatSelectModule } from '@angular/material/select';
    import { MatExpansionModule } from '@angular/material/expansion';
    import { MatCheckboxModule } from '@angular/material/checkbox';
    import { MatToolbarModule } from '@angular/material/toolbar';
    import { MatSidenavModule } from '@angular/material/sidenav';
    import { MatDividerModule } from '@angular/material/divider';
    import { MatInputModule } from '@angular/material/input';
    
    rhenck's avatar
    rhenck committed
    import { MatListModule } from '@angular/material/list';
    
    import { APIService, SharedModule } from 'common/shared.module';
    
    rhenck's avatar
    rhenck committed
    import { SectionInsertDialogComponent } from 'editor/src/app/components/dialogs/section-insert-dialog.component';
    
    jojohoch's avatar
    jojohoch committed
    import { HotspotListPanelComponent } from 'editor/src/app/components/properties-panel/hotspot-list-panel.component';
    import { VeronaAPIService } from 'editor/src/app/services/verona-api.service';
    import { MatRadioModule } from '@angular/material/radio';
    import {
      HotspotFieldSetComponent
    } from 'editor/src/app/components/properties-panel/model-properties-tab/input-groups/hotspot-field-set.component';
    import { HotspotEditDialogComponent } from 'editor/src/app/components/dialogs/hotspot-edit-dialog.component';
    
    import { MathEditorModule } from 'common/math-editor.module';
    
    import { AppComponent } from './app.component';
    
    import { ToolbarComponent } from './components/toolbar/toolbar.component';
    
    rhenck's avatar
    rhenck committed
    import { UiElementToolboxComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/new-ui-element-panel/ui-element-toolbox.component';
    
    import { UnitViewComponent } from './components/unit-view/unit-view.component';
    
    import { CanvasComponent } from './components/canvas/canvas.component';
    
    rhenck's avatar
    rhenck committed
    import { StaticCanvasOverlayComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/canvas/overlays/static-canvas-overlay.component';
    
    rhenck's avatar
    rhenck committed
    import { DynamicCanvasOverlayComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/canvas/overlays/dynamic-canvas-overlay.component';
    
    import { EditorTranslateLoader } from './editor-translate-loader';
    
    import { SectionMenuComponent } from './components/canvas/section-menu.component';
    import { SectionStaticComponent } from './components/canvas/section-static.component';
    import { SectionDynamicComponent } from './components/canvas/section-dynamic.component';
    
    import { RichTextEditorComponent } from './text-editor/rich-text-editor.component';
    
    import { ConfirmationDialogComponent } from './components/dialogs/confirmation-dialog.component';
    import { TextEditDialogComponent } from './components/dialogs/text-edit-dialog.component';
    import { TextEditMultilineDialogComponent } from './components/dialogs/text-edit-multiline-dialog.component';
    import { PlayerEditDialogComponent } from './components/dialogs/player-edit-dialog.component';
    import { LikertRowEditDialogComponent } from './components/dialogs/likert-row-edit-dialog.component';
    import { RichTextEditDialogComponent } from './components/dialogs/rich-text-edit-dialog.component';
    
    import { DropListOptionEditDialogComponent } from './components/dialogs/drop-list-option-edit-dialog.component';
    
    import { ToggleButtonNodeviewComponent } from './text-editor/angular-node-views/toggle-button-nodeview.component';
    import { TextFieldNodeviewComponent } from './text-editor/angular-node-views/text-field-nodeview.component';
    import { DropListNodeviewComponent } from './text-editor/angular-node-views/drop-list-nodeview.component';
    
    import { ButtonNodeviewComponent } from './text-editor/angular-node-views/button-nodeview.component';
    
    rhenck's avatar
    rhenck committed
    import { PositionFieldSetComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/position-properties-tab/input-groups/position-field-set.component';
    
    rhenck's avatar
    rhenck committed
    import { DimensionFieldSetComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/position-properties-tab/input-groups/dimension-field-set.component';
    
    rhenck's avatar
    rhenck committed
    import { ElementPropertiesPanelComponent }
    
      from './components/properties-panel/element-properties-panel.component';
    
    rhenck's avatar
    rhenck committed
    import { ElementPositionPropertiesComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/position-properties-tab/element-position-properties.component';
    
    rhenck's avatar
    rhenck committed
    import { ElementStylePropertiesComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/style-properties-tab/element-style-properties.component';
    
    rhenck's avatar
    rhenck committed
    import { ElementModelPropertiesComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/model-properties-tab/element-model-properties.component';
    
    import { DynamicSectionHelperGridComponent } from './components/canvas/dynamic-section-helper-grid.component';
    import { ElementGridChangeListenerDirective } from './components/canvas/element-grid-change-listener.directive';
    
    rhenck's avatar
    rhenck committed
    import { OptionsFieldSetComponent } from
      './components/properties-panel/model-properties-tab/input-groups/options-field-set.component';
    import { TextPropertiesFieldSetComponent } from
      './components/properties-panel/model-properties-tab/input-groups/text-properties-field-set.component';
    
    import { ButtonPropertiesComponent, GetAnchorIdsPipe, ScrollPageIndexPipe } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/model-properties-tab/input-groups/button-properties.component';
    import { SliderPropertiesComponent } from
      './components/properties-panel/model-properties-tab/input-groups/slider-properties.component';
    
    import { TextFieldElementPropertiesComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/model-properties-tab/input-groups/text-field-element-properties.component';
    
    import { ScaleAndZoomPropertiesComponent } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/model-properties-tab/input-groups/scale-and-zoom-properties.component';
    
    import { DropListPropertiesComponent, GetValidDropListsPipe } from
    
    rhenck's avatar
    rhenck committed
      './components/properties-panel/model-properties-tab/input-groups/drop-list-properties.component';
    
    import { RichTextEditorSimpleComponent } from './text-editor-simple/rich-text-editor-simple.component';
    import { RichTextSimpleEditDialogComponent } from './components/dialogs/rich-text-simple-edit-dialog.component';
    
    rhenck's avatar
    rhenck committed
    import { SelectPropertiesComponent } from
      './components/properties-panel/model-properties-tab/input-groups/select-properties.component';
    import { InputElementPropertiesComponent } from
      './components/properties-panel/model-properties-tab/input-groups/input-element-properties.component';
    import { PresetValuePropertiesComponent } from
      './components/properties-panel/model-properties-tab/input-groups/preset-value-properties.component';
    
    import { OptionListPanelComponent } from './components/properties-panel/option-list-panel.component';
    import { LikertRowLabelPipe } from './components/properties-panel/likert-row-label.pipe';
    
    rhenck's avatar
    rhenck committed
    import { LabelEditDialogComponent } from './components/dialogs/label-edit-dialog.component';
    
    import {
      BorderPropertiesComponent
    } from './components/properties-panel/model-properties-tab/input-groups/border-properties.component';
    
    import { GeogebraAppDefinitionDialogComponent } from './components/dialogs/geogebra-app-definition-dialog.component';
    
    @NgModule({
      declarations: [
        AppComponent,
        ToolbarComponent,
        UiElementToolboxComponent,
        UnitViewComponent,
    
        StaticCanvasOverlayComponent,
        DynamicCanvasOverlayComponent,
    
    rhenck's avatar
    rhenck committed
        ElementPropertiesPanelComponent,
    
        SectionMenuComponent,
        SectionStaticComponent,
    
        SectionDynamicComponent,
    
        RichTextEditorComponent,
    
        ToggleButtonNodeviewComponent,
        TextFieldNodeviewComponent,
        DropListNodeviewComponent,
    
        ButtonNodeviewComponent,
    
        ElementStylePropertiesComponent,
    
    rhenck's avatar
    rhenck committed
        ElementPositionPropertiesComponent,
    
        ConfirmationDialogComponent,
        TextEditDialogComponent,
        TextEditMultilineDialogComponent,
        PlayerEditDialogComponent,
        LikertRowEditDialogComponent,
    
        RichTextEditDialogComponent,
    
    jojohoch's avatar
    jojohoch committed
        HotspotEditDialogComponent,
    
        ElementModelPropertiesComponent,
    
    rhenck's avatar
    rhenck committed
        DropListOptionEditDialogComponent,
        PositionFieldSetComponent,
    
        DimensionFieldSetComponent,
        DynamicSectionHelperGridComponent,
    
        ElementGridChangeListenerDirective,
        OptionsFieldSetComponent,
        TextPropertiesFieldSetComponent,
        ButtonPropertiesComponent,
        SliderPropertiesComponent,
    
        TextFieldElementPropertiesComponent,
        ScaleAndZoomPropertiesComponent,
    
        DropListPropertiesComponent,
        RichTextEditorSimpleComponent,
    
        RichTextSimpleEditDialogComponent,
    
        SectionInsertDialogComponent,
        SelectPropertiesComponent,
    
        InputElementPropertiesComponent,
        PresetValuePropertiesComponent,
        OptionListPanelComponent,
    
    jojohoch's avatar
    jojohoch committed
        HotspotFieldSetComponent,
        HotspotListPanelComponent,
    
        LabelEditDialogComponent,
    
        BorderPropertiesComponent,
    
        GeogebraAppDefinitionDialogComponent,
    
        GetAnchorIdsPipe,
        ScrollPageIndexPipe
    
      ],
      imports: [
        BrowserModule,
        BrowserAnimationsModule,
    
        CommonModule,
    
        MatInputModule,
    
        MatButtonToggleModule,
    
        MatCheckboxModule,
        MatSelectModule,
        MatToolbarModule,
    
        MatSliderModule,
    
        MatExpansionModule,
        MatSidenavModule,
        MatDividerModule,
    
        NgxTiptapModule,
    
        TranslateModule.forRoot({
          loader: {
            provide: TranslateLoader,
            useClass: EditorTranslateLoader
          }
    
    jojohoch's avatar
    jojohoch committed
        MatListModule,
    
    rhenck's avatar
    rhenck committed
        MatRadioModule,
        MathEditorModule
    
      providers: [
        { provide: APIService, useExisting: VeronaAPIService }
      ]
    
    
    export class AppModule implements DoBootstrap {
    
      constructor(private injector: Injector) {}
    
    rhenck's avatar
    rhenck committed
      ngDoBootstrap(): void {
        const editorElement = createCustomElement(AppComponent, { injector: this.injector });
    
        customElements.define('aspect-editor', editorElement);