Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unused imports #845

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/ajs-upgraded-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const audioRecorder = new InjectionToken('audioRecorder');
export const audioRecorderService = new InjectionToken('recorderService');
export const csvUploadModalService = new InjectionToken('CsvUploadModalAngular');
export const csvResultModalService = new InjectionToken('CsvResultModalAngular');
export const confirmationModal = new InjectionToken('ConfirmationModal');
export const confirmationModalService = new InjectionToken('ConfirmationModal');
export const unitStudentEnrolmentModal = new InjectionToken('UnitStudentEnrolmentModalAngular');
export const commentsModal = new InjectionToken('CommentsModal');
export const visualisations = new InjectionToken('Visualisation');
Expand Down Expand Up @@ -113,7 +113,7 @@ export const CsvResultModalProvider = {
};

export const ConfirmationModalProvider = {
provide: confirmationModal,
provide: confirmationModalService,
useFactory: (i) => i.get('ConfirmationModal'),
deps: ['$injector'],
};
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/models/groups/group-set.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Entity, EntityCache, EntityMapping } from 'ngx-entity-service';
import { AppInjector } from 'src/app/app-injector';
import { DoubtfireConstants } from 'src/app/config/constants/doubtfire-constants';
import { Group, Unit, User } from '../doubtfire-model';
import { Group, Unit } from '../doubtfire-model';


export class GroupSet extends Entity {
Expand Down
1 change: 0 additions & 1 deletion src/app/api/models/overseer/overseer-image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { StringNullableChain } from 'lodash';
import { Entity, EntityMapping } from 'ngx-entity-service';

export class OverseerImage extends Entity {
Expand Down
1 change: 0 additions & 1 deletion src/app/api/models/task-comment/task-comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { AppInjector } from 'src/app/app-injector';
import { Entity } from 'ngx-entity-service';
import { Project, Task, TaskCommentService, User } from 'src/app/api/models/doubtfire-model';
import { UserService } from '../../services/user.service';
import API_URL from 'src/app/config/constants/apiURL';
import { DoubtfireConstants } from 'src/app/config/constants/doubtfire-constants';
import { AlertService } from 'src/app/common/services/alert.service';

Expand Down
4 changes: 1 addition & 3 deletions src/app/api/models/tii-action.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Entity, EntityCache, EntityMapping } from 'ngx-entity-service';
import { Observable } from 'rxjs';
import { Unit } from './doubtfire-model';
import { Entity } from 'ngx-entity-service';

export class TiiAction extends Entity {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/models/tutorial-enrolment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Entity } from 'ngx-entity-service';
import { Tutorial, User } from './doubtfire-model';
import { Tutorial } from './doubtfire-model';


export class TutorialEnrolment extends Entity {
Expand Down
3 changes: 1 addition & 2 deletions src/app/api/models/tutorial/tutorial.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Entity, EntityMapping } from 'ngx-entity-service';
import { AppInjector } from '../../../app-injector';
import { User, Campus, UserService, CampusService, TutorialStream } from 'src/app/api/models/doubtfire-model';
import { User, Campus, TutorialStream } from 'src/app/api/models/doubtfire-model';
import { Unit } from '../unit';

export class Tutorial extends Entity {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/services/authentication.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {User, UserService} from 'src/app/api/models/doubtfire-model';
import {Inject, Injectable} from '@angular/core';
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {DoubtfireConstants} from 'src/app/config/constants/doubtfire-constants';
import {StateService, UIRouter, UIRouterGlobals} from '@uirouter/angular';
Expand Down
1 change: 0 additions & 1 deletion src/app/api/services/task-outcome-alignment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CachedEntityService } from 'ngx-entity-service';
import { Project, TaskOutcomeAlignment, Unit } from 'src/app/api/models/doubtfire-model';
import { Injectable } from '@angular/core';
import API_URL from 'src/app/config/constants/apiURL';
import { UnitTutorialsListComponent } from 'src/app/units/states/edit/directives/unit-tutorials-list/unit-tutorials-list.component';

@Injectable()
export class TaskOutcomeAlignmentService extends CachedEntityService<TaskOutcomeAlignment> {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/services/teaching-period.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http';
import { CachedEntityService, Entity } from 'ngx-entity-service';
import { CachedEntityService } from 'ngx-entity-service';
import { TeachingPeriod, TeachingPeriodBreakService, UnitService } from 'src/app/api/models/doubtfire-model';
import { Injectable } from '@angular/core';
import API_URL from 'src/app/config/constants/apiURL';
Expand Down
6 changes: 2 additions & 4 deletions src/app/api/services/tii-action.service.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { HttpClient } from '@angular/common/http';
import { CachedEntityService, Entity } from 'ngx-entity-service';
import { TiiAction, Unit, UnitService, UserService } from 'src/app/api/models/doubtfire-model';
import { CachedEntityService } from 'ngx-entity-service';
import { TiiAction } from 'src/app/api/models/doubtfire-model';
import { Injectable } from '@angular/core';
import API_URL from 'src/app/config/constants/apiURL';
import { AppInjector } from 'src/app/app-injector';
import { MappingFunctions } from './mapping-fn';
import { MappingProcess } from 'ngx-entity-service/lib/mapping-process';

@Injectable()
export class TiiActionService extends CachedEntityService<TiiAction> {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/services/unit.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { GroupSetService, LearningOutcomeService, TaskOutcomeAlignmentService, TeachingPeriodService, TutorialService, TutorialStreamService, Unit, UserService } from 'src/app/api/models/doubtfire-model';
import { CachedEntityService, Entity, EntityMapping } from 'ngx-entity-service';
import { CachedEntityService } from 'ngx-entity-service';
import API_URL from 'src/app/config/constants/apiURL';
import { UnitRoleService } from './unit-role.service';
import { AppInjector } from 'src/app/app-injector';
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/services/webcal.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Webcal } from '../models/webcal/webcal';
import { Entity, EntityService } from 'ngx-entity-service';
import { EntityService } from 'ngx-entity-service';
import { HttpClient } from '@angular/common/http';
import API_URL from 'src/app/config/constants/apiURL';

Expand Down
2 changes: 1 addition & 1 deletion src/app/common/filters/task-definition-name.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { Pipe, PipeTransform } from '@angular/core';
import { Task, TaskDefinition } from '../../api/models/doubtfire-model';
import { TaskDefinition } from '../../api/models/doubtfire-model';

@Pipe({
name: 'taskDefinitionName',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, Inject, Input, OnInit } from '@angular/core';
import { UIRouter } from '@uirouter/angular';
import { dateService } from 'src/app/ajs-upgraded-providers';
import { Project, Unit, UnitRole } from 'src/app/api/models/doubtfire-model';
import { MediaObserver } from 'ng-flex-layout';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
import { CalendarModalComponent } from './calendar-modal.component';

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
import {TaskAssessmentModalComponent} from './task-assessment-modal.component';

@Injectable({
Expand Down
2 changes: 1 addition & 1 deletion src/app/common/obect-select/object-select.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { MatSelectChange } from '@angular/material/select';

/**
Expand Down
2 changes: 0 additions & 2 deletions src/app/common/pipes/safe.pipe.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Sanitizer } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { SafePipe } from './safe.pipe';

describe('SafePipe', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, Input, OnInit, SimpleChanges } from '@angular/core';
import { Project } from 'src/app/api/models/project';
import { Component, Input, SimpleChanges } from '@angular/core';

@Component({
selector: 'f-project-progress-bar',
Expand Down
2 changes: 1 addition & 1 deletion src/app/common/services/task-submission.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Injectable, Inject} from '@angular/core';
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {DoubtfireConstants} from 'src/app/config/constants/doubtfire-constants';
import {Observable} from 'rxjs';
Expand Down
2 changes: 1 addition & 1 deletion src/app/common/status-icon/status-icon.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, Inject, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { TaskStatus, TaskStatusEnum } from 'src/app/api/models/task-status';

@Component({
Expand Down
1 change: 0 additions & 1 deletion src/app/doubtfire-angular.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
// Lottie animation module
import {LottieModule, LottieCacheModule} from 'ngx-lottie';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import player from 'lottie-web';

import {ClipboardModule} from '@angular/cdk/clipboard';
import {DragDropModule} from '@angular/cdk/drag-drop';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ApplicationRef, Injectable } from '@angular/core';
import { SwUpdate } from '@angular/service-worker';
import { interval } from 'rxjs';
import { MatSnackBar } from '@angular/material/snack-bar';
import { delay } from 'rxjs/operators';
import { concat } from 'rxjs';

@Injectable()
export class CheckForUpdateService {
Expand Down
2 changes: 1 addition & 1 deletion src/app/sessions/states/sign-in/sign-in.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { StateService, Transition } from '@uirouter/core';
import { AuthenticationService } from 'src/app/api/services/authentication.service';
import { AlertService } from 'src/app/common/services/alert.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, OnInit, Input, Inject} from '@angular/core';
import {Component, OnInit, Input} from '@angular/core';
import {TaskComment, Task} from 'src/app/api/models/doubtfire-model';
import {ExtensionComment} from 'src/app/api/models/task-comment/extension-comment';
import {AlertService} from 'src/app/common/services/alert.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, OnInit, Inject, Input, Output, EventEmitter} from '@angular/core';
import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
import {TaskSubmissionService} from 'src/app/common/services/task-submission.service';
import {Subject} from 'rxjs';
import {OverseerAssessmentService, Task} from 'src/app/api/models/doubtfire-model';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Inject, Input, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { Campus, CampusService, Project, Unit } from 'src/app/api/models/doubtfire-model';
import { MatSelectChange } from '@angular/material/select';
import { AlertService } from 'src/app/common/services/alert.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, Inject, Input} from '@angular/core';
import {Component, Input} from '@angular/core';
import {TaskDefinition} from 'src/app/api/models/task-definition';
import {Unit} from 'src/app/api/models/unit';
import {TaskDefinitionService} from 'src/app/api/services/task-definition.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { Component, Input, ViewChild } from '@angular/core';
import { MatTable } from '@angular/material/table';
import { TaskDefinition, UploadRequirement } from 'src/app/api/models/task-definition';
import { Unit } from 'src/app/api/models/unit';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatSort, Sort } from '@angular/material/sort';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { Subscription } from 'rxjs';
import { confirmationModal, csvResultModalService, csvUploadModalService } from 'src/app/ajs-upgraded-providers';
import { confirmationModalService, csvResultModalService, csvUploadModalService } from 'src/app/ajs-upgraded-providers';
import { TaskDefinition } from 'src/app/api/models/task-definition';
import { Unit } from 'src/app/api/models/unit';
import { TaskDefinitionService } from 'src/app/api/services/task-definition.service';
Expand All @@ -29,9 +29,9 @@ export class UnitTaskEditorComponent implements AfterViewInit {
constructor(
private taskDefinitionService: TaskDefinitionService,
private alerts: AlertService,
@Inject(csvResultModalService) private csvResultModalService: any,
@Inject(csvResultModalService) private csvResultModal: any,
@Inject(csvUploadModalService) private csvUploadModal: any,
@Inject(confirmationModal) private confirmationModal: any
@Inject(confirmationModalService) private confirmationModal: any
) {}

ngAfterViewInit(): void {
Expand Down Expand Up @@ -151,7 +151,7 @@ export class UnitTaskEditorComponent implements AfterViewInit {
this.unit.getTaskDefinitionBatchUploadUrl(),
(response: any) => {
// at least one student?
this.csvResultModalService.show('Task Definition Import Results', response);
this.csvResultModal.show('Task Definition Import Results', response);
if (response.success.length > 0) {
this.unit.refresh();
}
Expand All @@ -167,7 +167,7 @@ export class UnitTaskEditorComponent implements AfterViewInit {
this.unit.taskUploadUrl,
(response: any) => {
// at least one student?
this.csvResultModalService.show('Task Sheet and Resources Import Results', response);
this.csvResultModal.show('Task Sheet and Resources Import Results', response);
if (response.success.length > 0) {
this.unit.refresh();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input, Inject, ViewChild, AfterViewInit } from '@angular/core';
import { confirmationModal } from 'src/app/ajs-upgraded-providers';
import { confirmationModalService } from 'src/app/ajs-upgraded-providers';
import { MatSort, Sort } from '@angular/material/sort';
import { MatTableDataSource, MatTable } from '@angular/material/table';
import {
Expand Down Expand Up @@ -46,7 +46,7 @@ export class UnitTutorialsListComponent extends EntityFormComponent<Tutorial> im
private tutorialService: TutorialService,
private tutorialStreamService: TutorialStreamService,
private campusService: CampusService,
@Inject(confirmationModal) private confirmationModal: any,
@Inject(confirmationModalService) private confirmationModal: any,
private alerts: AlertService,
) {
super(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, Inject, Input} from '@angular/core';
import {Component, Input} from '@angular/core';
import {
ActivityType,
ActivityTypeService,
Expand Down
2 changes: 1 addition & 1 deletion src/app/units/states/tasks/tasks-viewer.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { Subject } from 'rxjs';
import { TaskDefinition } from 'src/app/api/models/task-definition';

@Injectable({
Expand Down
Loading