From 823628e5bdf51aa17c5d159b78563b4479dc6e01 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 27 Nov 2021 11:29:28 +0100 Subject: [PATCH] Move input components to separate module Signed-off-by: trivernis --- .../src/app/components/core/core.module.ts | 2 ++ .../components/shared/input/input.module.ts | 36 +++++++++++++++++++ .../native-file-select.component.html | 0 .../native-file-select.component.scss | 0 .../native-file-select.component.spec.ts | 0 .../native-file-select.component.ts | 0 .../tag-input/tag-input.component.html | 0 .../tag-input/tag-input.component.scss | 0 .../tag-input/tag-input.component.spec.ts | 0 .../tag-input/tag-input.component.ts | 0 .../app/components/shared/shared.module.ts | 7 ++-- 11 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 mediarepo-ui/src/app/components/shared/input/input.module.ts rename mediarepo-ui/src/app/components/shared/{inputs => input}/native-file-select/native-file-select.component.html (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/native-file-select/native-file-select.component.scss (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/native-file-select/native-file-select.component.spec.ts (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/native-file-select/native-file-select.component.ts (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/tag-input/tag-input.component.html (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/tag-input/tag-input.component.scss (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/tag-input/tag-input.component.spec.ts (100%) rename mediarepo-ui/src/app/components/shared/{inputs => input}/tag-input/tag-input.component.ts (100%) diff --git a/mediarepo-ui/src/app/components/core/core.module.ts b/mediarepo-ui/src/app/components/core/core.module.ts index 0ddbfb3..1c3a9cc 100644 --- a/mediarepo-ui/src/app/components/core/core.module.ts +++ b/mediarepo-ui/src/app/components/core/core.module.ts @@ -21,6 +21,7 @@ import {MatDividerModule} from "@angular/material/divider"; import {NgIconsModule} from "@ng-icons/core"; import * as materialIcons from "@ng-icons/material-icons"; import {MatMenuModule} from "@angular/material/menu"; +import {InputModule} from "../shared/input/input.module"; @NgModule({ @@ -52,6 +53,7 @@ import {MatMenuModule} from "@angular/material/menu"; MatButtonModule, MatMenuModule, MatRippleModule, + InputModule, ] }) export class CoreModule { diff --git a/mediarepo-ui/src/app/components/shared/input/input.module.ts b/mediarepo-ui/src/app/components/shared/input/input.module.ts new file mode 100644 index 0000000..f7e19ed --- /dev/null +++ b/mediarepo-ui/src/app/components/shared/input/input.module.ts @@ -0,0 +1,36 @@ +import {NgModule} from "@angular/core"; +import {CommonModule} from "@angular/common"; +import {NativeFileSelectComponent} from "./native-file-select/native-file-select.component"; +import {TagInputComponent} from "./tag-input/tag-input.component"; +import {MatAutocompleteModule} from "@angular/material/autocomplete"; +import {MatFormFieldModule} from "@angular/material/form-field"; +import {ReactiveFormsModule} from "@angular/forms"; +import {MatInputModule} from "@angular/material/input"; +import {NgIconsModule} from "@ng-icons/core"; +import {MatInsertDriveFile, MatFolder} from "@ng-icons/material-icons"; +import {MatButtonModule} from "@angular/material/button"; +import {FlexModule} from "@angular/flex-layout"; + + +@NgModule({ + declarations: [ + NativeFileSelectComponent, + TagInputComponent + ], + exports: [ + NativeFileSelectComponent, + TagInputComponent + ], + imports: [ + CommonModule, + MatAutocompleteModule, + MatFormFieldModule, + ReactiveFormsModule, + MatInputModule, + NgIconsModule.withIcons({MatInsertDriveFile, MatFolder}), + MatButtonModule, + FlexModule, + ] +}) +export class InputModule { +} diff --git a/mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.html b/mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.html similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.html rename to mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.html diff --git a/mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.scss b/mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.scss similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.scss rename to mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.scss diff --git a/mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.spec.ts b/mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.spec.ts similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.spec.ts rename to mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.spec.ts diff --git a/mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.ts b/mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.ts similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/native-file-select/native-file-select.component.ts rename to mediarepo-ui/src/app/components/shared/input/native-file-select/native-file-select.component.ts diff --git a/mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.html b/mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.html similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.html rename to mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.html diff --git a/mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.scss b/mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.scss similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.scss rename to mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.scss diff --git a/mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.spec.ts b/mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.spec.ts similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.spec.ts rename to mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.spec.ts diff --git a/mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.ts b/mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.ts similarity index 100% rename from mediarepo-ui/src/app/components/shared/inputs/tag-input/tag-input.component.ts rename to mediarepo-ui/src/app/components/shared/input/tag-input/tag-input.component.ts diff --git a/mediarepo-ui/src/app/components/shared/shared.module.ts b/mediarepo-ui/src/app/components/shared/shared.module.ts index 37ab0aa..1bae818 100644 --- a/mediarepo-ui/src/app/components/shared/shared.module.ts +++ b/mediarepo-ui/src/app/components/shared/shared.module.ts @@ -12,10 +12,8 @@ import {AddRepositoryDialogComponent} from "../core/repositories-tab/add-reposit import {ConfirmDialogComponent} from "./confirm-dialog/confirm-dialog.component"; import {TagItemComponent} from "./tag-item/tag-item.component"; import {FileEditComponent} from "./file-edit/file-edit.component"; -import {NativeFileSelectComponent} from "./inputs/native-file-select/native-file-select.component"; import {FilterDialogComponent} from "./file-search/filter-dialog/filter-dialog.component"; import {TagFilterListItemComponent} from "./file-search/filter-dialog/tag-filter-list-item/tag-filter-list-item.component"; -import {TagInputComponent} from "./inputs/tag-input/tag-input.component"; import {ContextMenuComponent} from "./context-menu/context-menu.component"; import {FileContextMenuComponent} from "./context-menu/file-context-menu/file-context-menu.component"; import {ContentViewerComponent} from "./file-multiview/file-gallery/content-viewer/content-viewer.component"; @@ -57,6 +55,7 @@ import {MatCheckboxModule} from "@angular/material/checkbox"; import {AppRoutingModule} from "../../app-routing.module"; import {NgIconsModule} from "@ng-icons/core"; import * as materialIcons from "@ng-icons/material-icons"; +import {InputModule} from "./input/input.module"; @NgModule({ @@ -73,10 +72,8 @@ import * as materialIcons from "@ng-icons/material-icons"; ConfirmDialogComponent, TagItemComponent, FileEditComponent, - NativeFileSelectComponent, FilterDialogComponent, TagFilterListItemComponent, - TagInputComponent, ContextMenuComponent, FileContextMenuComponent, ContentViewerComponent, @@ -89,7 +86,6 @@ import * as materialIcons from "@ng-icons/material-icons"; ], exports: [ FileMultiviewComponent, - NativeFileSelectComponent, BusyIndicatorComponent, FileSearchComponent, TagItemComponent, @@ -131,6 +127,7 @@ import * as materialIcons from "@ng-icons/material-icons"; MatCheckboxModule, AppRoutingModule, NgIconsModule.withIcons({...materialIcons}), + InputModule, ] }) export class SharedModule {