Skip to content

Commit

Permalink
Remove/clean up AngularJS Modules: remove all downgradeComponent exce…
Browse files Browse the repository at this point in the history
…pt AT and CM
  • Loading branch information
hirokiterashima committed Aug 8, 2023
1 parent b7f9165 commit ebe31c0
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 264 deletions.
13 changes: 1 addition & 12 deletions src/assets/wise5/classroomMonitor/classroom-monitor.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@

import * as angular from 'angular';
import './classroomMonitorComponents/manageStudents/manageStudentsModule';
import './classroomMonitorComponents/nodeProgress/nodeProgress';
import './classroomMonitorComponents/studentProgress/studentProgress';
import './dataExport/data-export-angular-js-module';
import { downgradeComponent } from '@angular/upgrade/static';
import { NotebookGradingComponent } from './notebook-grading/notebook-grading.component';
import { StudentGradingComponent } from './student-grading/student-grading.component';
import { StudentProgressComponent } from './student-progress/student-progress.component';
import { ClassroomMonitorComponent } from './classroom-monitor.component';

export default angular
.module('classroomMonitor', ['dataExport', 'manageStudents', 'nodeProgress', 'studentProgress'])
.module('classroomMonitor', ['dataExport', 'manageStudents'])
.directive('classroomMonitor', downgradeComponent({ component: ClassroomMonitorComponent }))
.directive('notebookGrading', downgradeComponent({ component: NotebookGradingComponent }))
.directive(
'studentGrading',
downgradeComponent({ component: StudentGradingComponent }) as angular.IDirectiveFactory
)
.directive('studentProgress', downgradeComponent({ component: StudentProgressComponent }))
.config([
'$stateProvider',
'$translatePartialLoaderProvider',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import * as angular from 'angular';
import { downgradeComponent } from '@angular/upgrade/static';
import { ManageStudentsComponent } from './manage-students/manage-students.component';

angular
.module('manageStudents', [])
.directive(
'manageStudentsComponent',
downgradeComponent({ component: ManageStudentsComponent }) as angular.IDirectiveFactory
)
.config([
'$stateProvider',
($stateProvider) => {
$stateProvider.state('root.cm.manageStudents', {
url: '/manage-students',
component: 'manageStudentsComponent'
});
}
]);
angular.module('manageStudents', []).config([
'$stateProvider',
($stateProvider) => {
$stateProvider.state('root.cm.manageStudents', {
url: '/manage-students',
component: 'manageStudentsComponent'
});
}
]);

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import { downgradeComponent, downgradeInjectable } from '@angular/upgrade/static';
import { downgradeInjectable } from '@angular/upgrade/static';
import * as angular from 'angular';
import { ComponentServiceLookupService } from '../../services/componentServiceLookupService';
import { DataExportService } from '../../services/dataExportService';
import { DataExportComponent } from './data-export/data-export.component';
import { ExportStepVisitsComponent } from './export-step-visits/export-step-visits.component';

export default angular
.module('dataExport', ['ngFileSaver'])
.factory('DataExportService', downgradeInjectable(DataExportService))
.factory('ComponentServiceLookupService', downgradeInjectable(ComponentServiceLookupService))
.directive('dataExport', downgradeComponent({ component: DataExportComponent }))
.directive('exportStepVisits', downgradeComponent({ component: ExportStepVisitsComponent }))
.config([
'$stateProvider',
($stateProvider) => {
Expand Down
35 changes: 1 addition & 34 deletions src/assets/wise5/common-angular-js-module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './lib/jquery/jquery-global';
import * as angular from 'angular';
import { downgradeComponent, downgradeInjectable } from '@angular/upgrade/static';
import { downgradeInjectable } from '@angular/upgrade/static';
import { AchievementService } from './services/achievementService';
import 'angular-file-saver';
import 'ng-file-upload';
Expand Down Expand Up @@ -33,19 +33,12 @@ import { NodeService } from './services/nodeService';
import { NotebookService } from './services/notebookService';
import { NotificationService } from './services/notificationService';
import { SessionService } from './services/sessionService';
import './vle/studentAsset/studentAsset';
import { StudentAssetService } from './services/studentAssetService';
import { StudentDataService } from './services/studentDataService';
import { TagService } from './services/tagService';
import './themes/default/theme';
import { EditorComponent } from '@tinymce/tinymce-angular';
import { WiseTinymceEditorComponent } from './directives/wise-tinymce-editor/wise-tinymce-editor.component';
import { NotebookNotesComponent } from '../../app/notebook/notebook-notes/notebook-notes.component';
import { NotebookReportComponent } from '../../app/notebook/notebook-report/notebook-report.component';
import { NotebookReportAnnotationsComponent } from '../../app/notebook/notebook-report-annotations/notebook-report-annotations.component';
import { ComputerAvatarService } from './services/computerAvatarService';
import { ComponentTypeService } from './services/componentTypeService';
import { SideMenuComponent } from './common/side-menu/side-menu.component';

angular
.module('common', [
Expand All @@ -60,28 +53,6 @@ angular
'pascalprecht.translate',
'ui.router'
])
.directive(
'editor',
downgradeComponent({ component: EditorComponent }) as angular.IDirectiveFactory
)
.directive(
'wiseTinymceEditor',
downgradeComponent({ component: WiseTinymceEditorComponent }) as angular.IDirectiveFactory
)
.directive(
'notebookNotes',
downgradeComponent({ component: NotebookNotesComponent }) as angular.IDirectiveFactory
)
.directive(
'notebookReport',
downgradeComponent({ component: NotebookReportComponent }) as angular.IDirectiveFactory
)
.directive(
'notebookReportAnnotations',
downgradeComponent({
component: NotebookReportAnnotationsComponent
}) as angular.IDirectiveFactory
)
.service('AchievementService', downgradeInjectable(AchievementService))
.factory('AnnotationService', downgradeInjectable(AnnotationService))
.factory('AudioRecorderService', downgradeInjectable(AudioRecorderService))
Expand All @@ -98,10 +69,6 @@ angular
.factory('StudentAssetService', downgradeInjectable(StudentAssetService))
.factory('TagService', downgradeInjectable(TagService))
.factory('StudentDataService', downgradeInjectable(StudentDataService))
.directive(
'sideMenu',
downgradeComponent({ component: SideMenuComponent }) as angular.IDirectiveFactory
)
.filter('Filters', Filters)
.config([
'$httpProvider',
Expand Down

This file was deleted.

32 changes: 0 additions & 32 deletions src/assets/wise5/directives/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,11 @@ import Compile from './compile/compile';
import DisableDeleteKeypress from './disableDeleteKeypress/disableDeleteKeypress';
import Draggable from './draggable/draggable';
import Sticky from './sticky/sticky';
import { downgradeComponent } from '@angular/upgrade/static';
import { MilestoneReportDataComponent } from '../../../app/teacher/milestone/milestone-report-data/milestone-report-data.component';
import { PossibleScoreComponent } from '../../../app/possible-score/possible-score.component';
import { ComponentComponent } from '../components/component/component.component';
import { TeacherSummaryDisplay } from './teacher-summary-display/teacher-summary-display.component';
import { TeacherNodeIconComponent } from '../authoringTool/teacher-node-icon/teacher-node-icon.component';
import { MilestoneReportGraphComponent } from '../../../app/teacher/milestone/milestone-report-graph/milestone-report-graph.component';

const Components = angular.module('components', []);

Components.component('compile', Compile);
Components.directive(
'component',
downgradeComponent({ component: ComponentComponent }) as angular.IDirectiveFactory
);
Components.component('disableDeleteKeypress', DisableDeleteKeypress);
Components.component('draggable', Draggable);
Components.directive(
'milestoneReportData',
downgradeComponent({ component: MilestoneReportDataComponent }) as angular.IDirectiveFactory
);
Components.directive(
'milestoneReportGraph',
downgradeComponent({ component: MilestoneReportGraphComponent }) as angular.IDirectiveFactory
);
Components.directive(
'nodeIcon',
downgradeComponent({ component: TeacherNodeIconComponent }) as angular.IDirectiveFactory
);
Components.directive(
'possibleScore',
downgradeComponent({ component: PossibleScoreComponent }) as angular.IDirectiveFactory
);
Components.directive(
'teacherSummaryDisplay',
downgradeComponent({ component: TeacherSummaryDisplay }) as angular.IDirectiveFactory
);
Components.directive('sticky', Sticky);

export default Components;
9 changes: 0 additions & 9 deletions src/assets/wise5/themes/default/theme.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/assets/wise5/themes/default/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';
import * as angular from 'angular';
import './js/webfonts';

const themeModule = angular.module('theme', []);
export default themeModule;
24 changes: 0 additions & 24 deletions src/assets/wise5/themes/default/themeComponents.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/assets/wise5/vle/studentAsset/studentAsset.ts

This file was deleted.

Loading

0 comments on commit ebe31c0

Please sign in to comment.