Skip to content

Commit

Permalink
update modules export organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
fxmontigny committed Aug 2, 2023
1 parent de4d4d0 commit 064560c
Show file tree
Hide file tree
Showing 30 changed files with 410 additions and 80 deletions.
5 changes: 3 additions & 2 deletions front/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'

import { AppRoutingModule } from './routes/app-routing.module'
import { AppComponent } from './app.component'
import { HttpClientModule } from '@angular/common/http'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { AlertComponent } from './components/alert/alert.component'
import { PopupModule } from './components/popup/popup.module'
import { PipesModule } from './pipes/pipes.module'
import { MaterialModule } from './libs/material.module'
import { ReaffectatorModule } from './routes/reaffectator/reaffectator.module'

/**
* Module principal du projet
*/

@NgModule({
declarations: [AppComponent, AlertComponent],
imports: [
Expand All @@ -22,6 +22,7 @@ import { PipesModule } from './pipes/pipes.module'
BrowserAnimationsModule,
PipesModule,
PopupModule,
ReaffectatorModule,
],
providers: [],
bootstrap: [AppComponent],
Expand Down
30 changes: 6 additions & 24 deletions front/src/app/components/components.module.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { WrapperComponent } from './wrapper/wrapper.component'
import { SpeedometerComponent } from './speedometer/speedometer.component'
import { ListSelectionComponent } from './list-selection/list-selection.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MaterialModule } from '../libs/material.module'
import { OptionsBackupPanelComponent } from './options-backup-panel/options-backup-panel.component'
import { SelectCheckAllComponent } from './select-check-all/select-check-all.component'
import { SelectComponent } from './select/select.component'
import { DateSelectComponent } from './date-select/date-select.component'
import { InputButtonComponent } from './input-button/input-button.component'
import { EtpPreviewComponent } from './etp-preview/etp-preview.component'
import { ProgressionBarComponent } from './progression-bar/progression-bar.component'
import { PanelActivitiesComponent } from './panel-activities/panel-activities.component'
import { DateSelectBlueComponent } from './date-select-blue/date-select-blue.component'
import { TooltipsComponent } from './tooltips/tooltips.component'
import { PipesModule } from '../pipes/pipes.module'
Expand All @@ -29,30 +20,21 @@ import { RadioButtonComponent } from './radio-button/radio-button.component'
import { LegendLabelComponent } from './legend-label/legend-label.component'
import { InOutChartComponent } from './in-out-chart/in-out-chart.component'
import { EtpChartComponent } from './etp-chart/etp-chart.component'
import { NewsComponent } from './news/news.component'
import { HelpButtonComponent } from './help-button/help-button.component'
import { ExtractorActivityComponent } from './extractor-activity/extractor-activity.component';
import { ExtractorVentilationComponent } from './extractor-ventilation/extractor-ventilation.component'
import { TextEditorComponent } from './text-editor/text-editor.component';
import { EditableSituationComponent } from './editable-situation/editable-situation.component'
import { CalculatriceComponent } from './calculatrice/calculatrice.component';
import { PopupModule } from './popup/popup.module'
import { PanelActivitiesModule } from './panel-activities/panel-activities.module'
import { SelectModule } from './select/select.module'
import { DateSelectModule } from './date-select/date-select.module'

/**
* Liste des composants à importer
*/
const list = [
WrapperComponent,
SpeedometerComponent,
ListSelectionComponent,
OptionsBackupPanelComponent,
SelectCheckAllComponent,
SelectComponent,
DateSelectComponent,
InputButtonComponent,
EtpPreviewComponent,
ProgressionBarComponent,
PanelActivitiesComponent,
DateSelectBlueComponent,
TooltipsComponent,
TimeSelectorComponent,
Expand All @@ -66,11 +48,8 @@ const list = [
LegendLabelComponent,
InOutChartComponent,
EtpChartComponent,
NewsComponent,
HelpButtonComponent,
ExtractorActivityComponent,
ExtractorVentilationComponent,
TextEditorComponent,
EditableSituationComponent,
CalculatriceComponent,
]
Expand All @@ -89,6 +68,9 @@ const list = [
PipesModule,
NgSelectModule,
PopupModule,
PanelActivitiesModule,
SelectModule,
DateSelectModule
],
exports: list,
})
Expand Down
29 changes: 29 additions & 0 deletions front/src/app/components/date-select/date-select.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { DateSelectComponent } from './date-select.component'
import { MaterialModule } from 'src/app/libs/material.module'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'

/**
* Liste des composants à importer
*/
const list = [
DateSelectComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list],
imports: [
CommonModule,
RouterModule,
MaterialModule,
ReactiveFormsModule,
FormsModule
],
exports: list,
})
export class DateSelectModule {}
24 changes: 24 additions & 0 deletions front/src/app/components/etp-preview/etp-preview.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { EtpPreviewComponent } from './etp-preview.component'

/**
* Liste des composants à importer
*/
const list = [
EtpPreviewComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list],
imports: [
CommonModule,
RouterModule,
],
exports: list,
})
export class EtpPreviewModule {}
24 changes: 24 additions & 0 deletions front/src/app/components/help-button/help-button.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { HelpButtonComponent } from './help-button.component'

/**
* Liste des composants à importer
*/
const list = [
HelpButtonComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list],
imports: [
CommonModule,
RouterModule,
],
exports: list,
})
export class HelpButtonModule {}
29 changes: 29 additions & 0 deletions front/src/app/components/input-button/input-button.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { InputButtonComponent } from './input-button.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MaterialModule } from 'src/app/libs/material.module'

/**
* Liste des composants à importer
*/
const list = [
InputButtonComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list],
imports: [
CommonModule,
RouterModule,
FormsModule,
ReactiveFormsModule,
MaterialModule
],
exports: list,
})
export class InputButtonModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { PanelActivitiesComponent } from './panel-activities.component'
import { ProgressionBarComponent } from './progression-bar/progression-bar.component'

/**
* Liste des composants à importer
*/
const list = [
PanelActivitiesComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list, ProgressionBarComponent],
imports: [
CommonModule,
RouterModule,
],
exports: list,
})
export class PanelActivitiesModule {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../styles/utils.scss";
@import "../../../styles/utils.scss";

:host {
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/utils.scss';
@import '../../../styles/utils.scss';

::ng-deep .mdc-form-field {
font-size: 16px;
Expand All @@ -10,6 +10,4 @@

.mat-option {
margin-left: 5px;


}
31 changes: 31 additions & 0 deletions front/src/app/components/select/select.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { SelectComponent } from './select.component'
import { MaterialModule } from 'src/app/libs/material.module'
import { SelectCheckAllComponent } from './select-check-all/select-check-all.component'
import { FormsModule } from '@angular/forms'
import { PipesModule } from 'src/app/pipes/pipes.module'

/**
* Liste des composants à importer
*/
const list = [
SelectComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list, SelectCheckAllComponent],
imports: [
CommonModule,
RouterModule,
MaterialModule,
FormsModule,
PipesModule
],
exports: list,
})
export class SelectModule {}
24 changes: 24 additions & 0 deletions front/src/app/components/speedometer/speedometer.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { SpeedometerComponent } from './speedometer.component'

/**
* Liste des composants à importer
*/
const list = [
SpeedometerComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list],
imports: [
CommonModule,
RouterModule,
],
exports: list,
})
export class SpeedometerModule {}
30 changes: 30 additions & 0 deletions front/src/app/components/text-editor/text-editor.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { MaterialModule } from 'src/app/libs/material.module'
import { FormsModule } from '@angular/forms'
import { PipesModule } from 'src/app/pipes/pipes.module'
import { TextEditorComponent } from './text-editor.component'

/**
* Liste des composants à importer
*/
const list = [
TextEditorComponent,
]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list],
imports: [
CommonModule,
RouterModule,
MaterialModule,
FormsModule,
PipesModule
],
exports: list,
})
export class TextEditorModule {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/utils.scss';
@import '../../../styles/utils.scss';

:host {
position: relative;
Expand Down
33 changes: 33 additions & 0 deletions front/src/app/components/wrapper/wrapper.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { WrapperComponent } from './wrapper.component'
import { NewsComponent } from './news/news.component'
import { MaterialModule } from 'src/app/libs/material.module'
import { PopupModule } from '../popup/popup.module'
import { PipesModule } from 'src/app/pipes/pipes.module'
import { TextEditorModule } from '../text-editor/text-editor.module'
import { HelpButtonModule } from '../help-button/help-button.module'

/**
* Liste des composants à importer
*/
const list = [WrapperComponent]

/**
* Module d'import de composant
*/
@NgModule({
declarations: [...list, NewsComponent],
imports: [
CommonModule,
RouterModule,
MaterialModule,
PopupModule,
PipesModule,
TextEditorModule,
HelpButtonModule,
],
exports: list,
})
export class WrapperModule {}
Loading

0 comments on commit 064560c

Please sign in to comment.