Skip to content

Commit

Permalink
import selected ng-bootstrap modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Apr 26, 2024
1 parent 4320719 commit 4957b78
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-%>
import { Component, inject, OnInit } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { NgbModal, NgbModalModule } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { HealthService } from './health.service';
Expand All @@ -29,7 +29,7 @@ import HealthModalComponent from './modal/health-modal.component';
standalone: true,
selector: '<%= jhiPrefixDashed %>-health',
templateUrl: './health.component.html',
imports: [SharedModule, HealthModalComponent],
imports: [SharedModule, NgbModalModule, HealthModalComponent],
})
export default class HealthComponent implements OnInit {
health?: Health;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
limitations under the License.
-%>
import { Component, input } from '@angular/core';
import { NgbProgressbar } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { JvmMetrics } from 'app/admin/metrics/metrics.model';
Expand All @@ -25,7 +26,7 @@ import { JvmMetrics } from 'app/admin/metrics/metrics.model';
standalone: true,
selector: '<%= jhiPrefixDashed %>-jvm-memory',
templateUrl: './jvm-memory.component.html',
imports: [SharedModule],
imports: [SharedModule, NgbProgressbar],
})
export class JvmMemoryComponent {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
limitations under the License.
-%>
import { Component, inject, Input } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { NgbModal, NgbModalModule, NgbProgressbar } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { Thread, ThreadState } from 'app/admin/metrics/metrics.model';
Expand All @@ -27,7 +27,7 @@ import { MetricsModalThreadsComponent } from '../metrics-modal-threads/metrics-m
standalone: true,
selector: '<%= jhiPrefixDashed %>-jvm-threads',
templateUrl: './jvm-threads.component.html',
imports: [SharedModule],
imports: [SharedModule, NgbModalModule, NgbProgressbar],
})
export class JvmThreadsComponent {
threadStats = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
limitations under the License.
-%>
import { Component, input } from '@angular/core';
import { NgbProgressbar } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { GarbageCollector } from 'app/admin/metrics/metrics.model';
Expand All @@ -25,7 +26,7 @@ import { GarbageCollector } from 'app/admin/metrics/metrics.model';
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-garbagecollector',
templateUrl: './metrics-garbagecollector.component.html',
imports: [SharedModule],
imports: [SharedModule, NgbProgressbar],
})
export class MetricsGarbageCollectorComponent {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
limitations under the License.
-%>
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { NgbProgressbar } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { HttpServerRequests } from 'app/admin/metrics/metrics.model';
Expand All @@ -27,7 +28,7 @@ import { filterNaN } from 'app/core/util/operators';
selector: '<%= jhiPrefixDashed %>-metrics-request',
templateUrl: './metrics-request.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [SharedModule],
imports: [SharedModule, NgbProgressbar],
})
export class MetricsRequestComponent {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
limitations under the License.
-%>
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { NgbProgressbar } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { ProcessMetrics } from 'app/admin/metrics/metrics.model';
Expand All @@ -26,7 +27,7 @@ import { ProcessMetrics } from 'app/admin/metrics/metrics.model';
selector: '<%= jhiPrefixDashed %>-metrics-system',
templateUrl: './metrics-system.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [SharedModule],
imports: [SharedModule, NgbProgressbar],
})
export class MetricsSystemComponent {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { HttpResponse<%_ if (!databaseTypeCassandra) { %>, HttpHeaders <% } %>}
<%_ if (!databaseTypeCassandra) { _%>
import { combineLatest } from 'rxjs';
<%_ } _%>
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { NgbModal, NgbModalModule, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
<%_ if (!databaseTypeCassandra) { _%>
Expand All @@ -43,6 +43,8 @@ import UserManagementDeleteDialogComponent from '../delete/user-management-delet
templateUrl: './user-management.component.html',
imports: [
RouterModule,
NgbModalModule,
NgbPaginationModule,
SharedModule,
UserManagementDeleteDialogComponent,
<%_ if (!databaseTypeCassandra) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
-%>
import { Component, <% if (anyFieldIsBlobDerived) { %>inject, <% } %>input } from '@angular/core';
import { RouterModule } from '@angular/router';
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe } from 'app/shared/date';
Expand All @@ -30,7 +31,7 @@ import { DataUtils } from 'app/core/util/data-util.service';
standalone: true,
selector: '<%= jhiPrefixDashed %>-<%= entityFileName %>-detail',
templateUrl: './<%= entityFileName %>-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
imports: [SharedModule, NgbTooltipModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
export class <%= entityAngularName %>DetailComponent {
<%= entityInstance %> = input<I<%= entityAngularName %> | null>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ import { HttpHeaders } from '@angular/common/http';
<%_ } _%>
import { ActivatedRoute, Data, ParamMap, Router, RouterModule } from '@angular/router';
import { combineLatest<%_ if (!readOnly) { _%>, filter<%_ } _%>, Observable, Subscription, tap } from 'rxjs';
import {
<%_ if (!readOnly) { _%>
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
NgbModal,
NgbModalModule,
<%_ } _%>
<%_ if (paginationPagination) { _%>
NgbPaginationModule,
<%_ } _%>
} from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { sortStateSignal, SortDirective, SortByDirective, type SortState, SortService } from 'app/shared/sort';
Expand Down Expand Up @@ -90,8 +96,14 @@ import { InfiniteScrollModule } from 'ngx-infinite-scroll';
templateUrl: './<%= entityFileName %>.component.html',
imports: [
RouterModule,
<%_ if (!readOnly) { _%>
NgbModalModule,
<%_ } _%>
<%_ if (searchEngine) { _%>
FormsModule,
<%_ } _%>
<%_ if (paginationPagination) { _%>
NgbPaginationModule,
<%_ } _%>
SharedModule,
SortDirective,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { HttpResponse } from '@angular/common/http';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { finalize<% if (relationships.some(rel => rel.persistableRelationship)) { %>, map<% } %> } from 'rxjs/operators';
import { NgbDatepickerModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';

import SharedModule from 'app/shared/shared.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
Expand Down Expand Up @@ -61,7 +62,7 @@ import { <%- importedType %> } from '<%- importedPath %>';
standalone: true,
selector: '<%= jhiPrefixDashed %>-<%= entityFileName %>-update',
templateUrl: './<%= entityFileName %>-update.component.html',
imports: [SharedModule, FormsModule, ReactiveFormsModule],
imports: [SharedModule, NgbDatepickerModule, NgbTooltipModule, FormsModule, ReactiveFormsModule],
})
export class <%= entityAngularName %>UpdateComponent implements OnInit {
isSaving = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
-%>
import { Component, inject, signal, OnInit<% if (microfrontend && enableTranslation && applicationTypeGateway) { %>, createNgModule, Injector<% } %> } from '@angular/core';
import { Router, RouterModule } from '@angular/router';
import { NgbCollapseModule, NgbDropdownModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
<%_ if (enableTranslation) { _%>
import { TranslateService } from '@ngx-translate/core';
<%_ } _%>
Expand Down Expand Up @@ -49,6 +50,9 @@ import NavbarItem from './navbar-item.model';
RouterModule,
SharedModule,
HasAnyAuthorityDirective,
NgbCollapseModule,
NgbDropdownModule,
NgbNavModule,
<%_ if (enableTranslation) { _%>
ActiveMenuDirective,
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Component, inject, OnDestroy, signal } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { Subscription } from 'rxjs';
import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
<%_ if (enableTranslation) { _%>
import { TranslateService } from '@ngx-translate/core';
<%_ } _%>
Expand All @@ -33,7 +33,7 @@ import { EventManager, EventWithContent } from 'app/core/util/event-manager.serv
standalone: true,
selector: '<%= jhiPrefixDashed %>-alert-error',
templateUrl: './alert-error.component.html',
imports: [CommonModule, NgbModule],
imports: [CommonModule, NgbAlertModule],
})
export class AlertErrorComponent implements OnDestroy {
alerts = signal<Alert[]>([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
-%>
import { Component, inject, OnDestroy, OnInit, signal } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';

import { AlertService, Alert } from 'app/core/util/alert.service';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-alert',
templateUrl: './alert.component.html',
imports: [CommonModule, NgbModule],
imports: [CommonModule, NgbAlertModule],
})
export class AlertComponent implements OnInit, OnDestroy {
alerts = signal<Alert[]>([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
-%>
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
<%_ if (enableTranslation) { _%>
import { TranslateModule } from '@ngx-translate/core';
Expand All @@ -61,7 +60,6 @@ import { AlertErrorComponent } from './alert/alert-error.component';
],
exports: [
CommonModule,
NgbModule,
FontAwesomeModule,
AlertComponent,
AlertErrorComponent,
Expand Down

0 comments on commit 4957b78

Please sign in to comment.