From e21c225ddd913a1ea0ae93d4c9041893cac85bfa Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 5 Dec 2024 12:49:51 +0200 Subject: [PATCH] updates --- .eslintrc.js | 1 + .../buttons/chevron-button/chevron-button.component.ts | 2 +- .../buttons/circle-button/circle-button.component.ts | 2 +- src/lib/buttons/icon-button/icon-button.component.ts | 2 +- .../confirmation-dialog.component.ts | 5 ++--- .../directives/disable-stop-propagation.directive.ts | 1 - src/lib/directives/has-scrollbar.directive.ts | 1 - src/lib/directives/hidden-action.directive.ts | 1 - src/lib/directives/prevent-default.directive.ts | 1 - src/lib/directives/stop-propagation.directive.ts | 1 - src/lib/directives/sync-width.directive.ts | 1 - src/lib/empty-state/empty-state.component.ts | 2 +- .../connection-status/connection-status.component.ts | 2 +- .../error/full-page-error/full-page-error.component.ts | 2 +- src/lib/filtering/filter-card/filter-card.component.ts | 2 +- .../filtering/popup-filter/popup-filter.component.ts | 2 +- .../filtering/quick-filters/quick-filters.component.ts | 2 +- .../filtering/single-filter/single-filter.component.ts | 2 +- src/lib/help-mode/help-button/help-button.component.ts | 2 +- .../help-mode-dialog/help-mode-dialog.component.ts | 2 +- src/lib/help-mode/help-mode/help-mode.component.ts | 4 ++-- .../input-with-action/input-with-action.component.ts | 2 +- .../inputs/round-checkbox/round-checkbox.component.ts | 2 +- .../listing/scroll-button/scroll-button.component.ts | 2 +- .../table-column-name/table-column-name.component.ts | 2 +- .../table-content/table-item/table-item.component.ts | 2 +- src/lib/listing/table/table.component.ts | 2 +- .../workflow/column-header/column-header.component.ts | 2 +- .../full-page-loading-indicator.component.ts | 2 +- src/lib/loading/progress-bar/progress-bar.component.ts | 10 +++++----- .../progress-loading/progress-loading.component.ts | 2 +- src/lib/permissions/directives/allow.directive.ts | 1 - src/lib/permissions/directives/deny.directive.ts | 1 - src/lib/pipes/capitalize.pipe.ts | 1 - src/lib/pipes/humanize-camel-case.pipe.ts | 1 - src/lib/pipes/humanize.pipe.ts | 1 - src/lib/pipes/log.pipe.ts | 1 - src/lib/pipes/replace-nbsp.pipe.ts | 1 - src/lib/pipes/size.pipe.ts | 1 - src/lib/pipes/snake-case.pipe.ts | 1 - src/lib/shared/logo/logo.component.ts | 5 ++--- src/lib/shared/side-nav/side-nav.component.ts | 1 - src/lib/shared/skeleton/skeleton.component.ts | 2 +- src/lib/shared/small-chip/small-chip.component.ts | 1 - src/lib/shared/spacer/spacer.component.ts | 1 - src/lib/shared/status-bar/status-bar.component.ts | 2 +- src/lib/shared/toast/toast.component.ts | 2 +- src/lib/sorting/sort-by.pipe.ts | 2 +- .../tenants/tenant-select/tenant-select.component.ts | 10 +++++----- src/lib/upload-file/drag-drop-file-upload.directive.ts | 1 - src/lib/upload-file/upload-file.component.ts | 4 +--- .../components/user-button/user-button.component.ts | 2 +- src/lib/users/name.pipe.ts | 1 - 53 files changed, 44 insertions(+), 67 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b5dd005..6f48723 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -206,6 +206,7 @@ module.exports = { ], rules: { 'rxjs/no-ignored-subscription': 'error', + '@angular-eslint/prefer-standalone': 'off', '@angular-eslint/directive-selector': [ 'error', { diff --git a/src/lib/buttons/chevron-button/chevron-button.component.ts b/src/lib/buttons/chevron-button/chevron-button.component.ts index 8a7b022..96a38dc 100644 --- a/src/lib/buttons/chevron-button/chevron-button.component.ts +++ b/src/lib/buttons/chevron-button/chevron-button.component.ts @@ -8,7 +8,7 @@ import { randomString } from '../../utils'; templateUrl: './chevron-button.component.html', styleUrls: ['./chevron-button.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatIconModule, MatButtonModule] + imports: [MatIconModule, MatButtonModule], }) export class ChevronButtonComponent { readonly label = input.required(); diff --git a/src/lib/buttons/circle-button/circle-button.component.ts b/src/lib/buttons/circle-button/circle-button.component.ts index 866c46a..a7c3532 100644 --- a/src/lib/buttons/circle-button/circle-button.component.ts +++ b/src/lib/buttons/circle-button/circle-button.component.ts @@ -24,7 +24,7 @@ import { CircleButtonType, CircleButtonTypes } from '../types/circle-button.type templateUrl: './circle-button.component.html', styleUrls: ['./circle-button.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatTooltipModule, MatIconModule, MatButtonModule, StopPropagationDirective] + imports: [MatTooltipModule, MatIconModule, MatButtonModule, StopPropagationDirective], }) export class CircleButtonComponent { readonly #elementRef = inject(ElementRef); diff --git a/src/lib/buttons/icon-button/icon-button.component.ts b/src/lib/buttons/icon-button/icon-button.component.ts index 3c3f839..159a512 100644 --- a/src/lib/buttons/icon-button/icon-button.component.ts +++ b/src/lib/buttons/icon-button/icon-button.component.ts @@ -11,7 +11,7 @@ import { IconButtonType, IconButtonTypes } from '../types/icon-button.type'; selector: 'iqser-icon-button', templateUrl: './icon-button.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NgClass, MatButtonModule, MatIconModule, StopPropagationDirective] + imports: [NgClass, MatButtonModule, MatIconModule, StopPropagationDirective], }) export class IconButtonComponent { protected readonly _hasRouterLink = !!inject(RouterLink, { optional: true, host: true }); diff --git a/src/lib/dialog/confirmation-dialog/confirmation-dialog.component.ts b/src/lib/dialog/confirmation-dialog/confirmation-dialog.component.ts index a70393e..73eb65e 100644 --- a/src/lib/dialog/confirmation-dialog/confirmation-dialog.component.ts +++ b/src/lib/dialog/confirmation-dialog/confirmation-dialog.component.ts @@ -1,4 +1,4 @@ -import { NgClass, NgTemplateOutlet } from '@angular/common'; +import { NgTemplateOutlet } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, @@ -96,8 +96,7 @@ function getConfig(options?: IConfirmationDialogData): InternalConfirmationDialo IconButtonComponent, CircleButtonComponent, MatDialogModule, - NgClass, - ] + ], }) export class ConfirmationDialogComponent implements AfterViewInit { readonly config = getConfig(inject(MAT_DIALOG_DATA)); diff --git a/src/lib/directives/disable-stop-propagation.directive.ts b/src/lib/directives/disable-stop-propagation.directive.ts index 2f7e0cd..a1edccb 100644 --- a/src/lib/directives/disable-stop-propagation.directive.ts +++ b/src/lib/directives/disable-stop-propagation.directive.ts @@ -2,7 +2,6 @@ import { booleanAttribute, Directive, input } from '@angular/core'; @Directive({ selector: '[iqserDisableStopPropagation]', - standalone: true, }) export class DisableStopPropagationDirective { readonly iqserDisableStopPropagation = input(true, { transform: booleanAttribute }); diff --git a/src/lib/directives/has-scrollbar.directive.ts b/src/lib/directives/has-scrollbar.directive.ts index 7b400f7..561f7ff 100644 --- a/src/lib/directives/has-scrollbar.directive.ts +++ b/src/lib/directives/has-scrollbar.directive.ts @@ -2,7 +2,6 @@ import { Directive, ElementRef, OnDestroy, OnInit, signal } from '@angular/core' @Directive({ selector: '[iqserHasScrollbar]', - standalone: true, host: { '[class]': '_class()', }, diff --git a/src/lib/directives/hidden-action.directive.ts b/src/lib/directives/hidden-action.directive.ts index 23940c6..d72391f 100644 --- a/src/lib/directives/hidden-action.directive.ts +++ b/src/lib/directives/hidden-action.directive.ts @@ -2,7 +2,6 @@ import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/c @Directive({ selector: '[iqserHiddenAction]', - standalone: true, }) export class HiddenActionDirective { @Input() requiredClicks = 4; diff --git a/src/lib/directives/prevent-default.directive.ts b/src/lib/directives/prevent-default.directive.ts index a63e9d2..b083e5e 100644 --- a/src/lib/directives/prevent-default.directive.ts +++ b/src/lib/directives/prevent-default.directive.ts @@ -3,7 +3,6 @@ import { NGXLogger } from 'ngx-logger'; @Directive({ selector: '[iqserPreventDefault]', - standalone: true, }) export class PreventDefaultDirective { readonly #logger = inject(NGXLogger); diff --git a/src/lib/directives/stop-propagation.directive.ts b/src/lib/directives/stop-propagation.directive.ts index 67f23df..481bd3c 100644 --- a/src/lib/directives/stop-propagation.directive.ts +++ b/src/lib/directives/stop-propagation.directive.ts @@ -4,7 +4,6 @@ import { DisableStopPropagationDirective } from './disable-stop-propagation.dire @Directive({ selector: '[iqserStopPropagation]', - standalone: true, }) export class StopPropagationDirective { readonly #disableStopPropagation = inject(DisableStopPropagationDirective, { optional: true }); diff --git a/src/lib/directives/sync-width.directive.ts b/src/lib/directives/sync-width.directive.ts index 11d0eb9..b99cccd 100644 --- a/src/lib/directives/sync-width.directive.ts +++ b/src/lib/directives/sync-width.directive.ts @@ -2,7 +2,6 @@ import { Directive, ElementRef, HostListener, Input, OnDestroy } from '@angular/ @Directive({ selector: '[iqserSyncWidth]', - standalone: true, }) export class SyncWidthDirective implements OnDestroy { @Input() iqserSyncWidth!: string; diff --git a/src/lib/empty-state/empty-state.component.ts b/src/lib/empty-state/empty-state.component.ts index e7c0b90..9e3cd93 100644 --- a/src/lib/empty-state/empty-state.component.ts +++ b/src/lib/empty-state/empty-state.component.ts @@ -19,7 +19,7 @@ import { randomString } from '../utils/functions'; templateUrl: './empty-state.component.html', styleUrls: ['./empty-state.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NgStyle, MatIconModule, IconButtonComponent] + imports: [NgStyle, MatIconModule, IconButtonComponent], }) export class EmptyStateComponent { protected readonly iconButtonTypes = IconButtonTypes; diff --git a/src/lib/error/connection-status/connection-status.component.ts b/src/lib/error/connection-status/connection-status.component.ts index d5a275c..0f8dfc2 100644 --- a/src/lib/error/connection-status/connection-status.component.ts +++ b/src/lib/error/connection-status/connection-status.component.ts @@ -17,7 +17,7 @@ import { ErrorService } from '../error.service'; ]), ], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class ConnectionStatusComponent { protected readonly connectionStatusTranslations = connectionStatusTranslations; diff --git a/src/lib/error/full-page-error/full-page-error.component.ts b/src/lib/error/full-page-error/full-page-error.component.ts index d282a1c..f2bbf75 100644 --- a/src/lib/error/full-page-error/full-page-error.component.ts +++ b/src/lib/error/full-page-error/full-page-error.component.ts @@ -8,7 +8,7 @@ import { CustomError, ErrorService, ErrorType } from '../error.service'; templateUrl: './full-page-error.component.html', styleUrls: ['./full-page-error.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class FullPageErrorComponent { protected readonly iconButtonTypes = IconButtonTypes; diff --git a/src/lib/filtering/filter-card/filter-card.component.ts b/src/lib/filtering/filter-card/filter-card.component.ts index dd7b18e..08a7ffa 100644 --- a/src/lib/filtering/filter-card/filter-card.component.ts +++ b/src/lib/filtering/filter-card/filter-card.component.ts @@ -37,7 +37,7 @@ const atLeastOneIsExpandable = pipe( }, }, ], - imports: [AsyncPipe, InputWithActionComponent, NgTemplateOutlet, TranslateModule, MatIcon, MatCheckbox, StopPropagationDirective] + imports: [AsyncPipe, InputWithActionComponent, NgTemplateOutlet, TranslateModule, MatIcon, MatCheckbox, StopPropagationDirective], }) export class FilterCardComponent implements OnInit { readonly #filterService = inject(FilterService); diff --git a/src/lib/filtering/popup-filter/popup-filter.component.ts b/src/lib/filtering/popup-filter/popup-filter.component.ts index c3cc8d8..96861b1 100644 --- a/src/lib/filtering/popup-filter/popup-filter.component.ts +++ b/src/lib/filtering/popup-filter/popup-filter.component.ts @@ -28,7 +28,7 @@ import { IFilterGroup } from '../models/filter-group.model'; FilterCardComponent, StopPropagationDirective, MatMenuContent, - ] + ], }) export class PopupFilterComponent implements OnInit { @Input() primaryFiltersSlug!: string; diff --git a/src/lib/filtering/quick-filters/quick-filters.component.ts b/src/lib/filtering/quick-filters/quick-filters.component.ts index 6436306..9afeadb 100644 --- a/src/lib/filtering/quick-filters/quick-filters.component.ts +++ b/src/lib/filtering/quick-filters/quick-filters.component.ts @@ -6,7 +6,7 @@ import { FilterService } from '../filter.service'; templateUrl: './quick-filters.component.html', styleUrls: ['./quick-filters.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class QuickFiltersComponent { readonly quickFilters$ = this.filterService.getFilterModels$('quickFilters'); diff --git a/src/lib/filtering/single-filter/single-filter.component.ts b/src/lib/filtering/single-filter/single-filter.component.ts index f4928f4..e6ecd8d 100644 --- a/src/lib/filtering/single-filter/single-filter.component.ts +++ b/src/lib/filtering/single-filter/single-filter.component.ts @@ -7,7 +7,7 @@ import { IFilter } from '../models/filter.model'; selector: 'iqser-single-filter', templateUrl: './single-filter.component.html', styleUrls: ['./single-filter.component.scss'], - standalone: false + standalone: false, }) export class SingleFilterComponent { @Input() filter!: IFilter; diff --git a/src/lib/help-mode/help-button/help-button.component.ts b/src/lib/help-mode/help-button/help-button.component.ts index c2537b2..b4deebf 100644 --- a/src/lib/help-mode/help-button/help-button.component.ts +++ b/src/lib/help-mode/help-button/help-button.component.ts @@ -10,7 +10,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; selector: 'iqser-help-button', templateUrl: './help-button.component.html', styleUrls: ['./help-button.component.scss'], - imports: [MatIcon, MatTooltip] + imports: [MatIcon, MatTooltip], }) export class HelpButtonComponent implements OnInit, OnDestroy { #helpModeHasBeenActivated = false; diff --git a/src/lib/help-mode/help-mode-dialog/help-mode-dialog.component.ts b/src/lib/help-mode/help-mode-dialog/help-mode-dialog.component.ts index f3d609b..76fb615 100644 --- a/src/lib/help-mode/help-mode-dialog/help-mode-dialog.component.ts +++ b/src/lib/help-mode/help-mode-dialog/help-mode-dialog.component.ts @@ -12,7 +12,7 @@ const DEFAULT_CDK_OVERLAY_CONTAINER_ZINDEX = '800'; templateUrl: './help-mode-dialog.component.html', styleUrls: ['./help-mode-dialog.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatCheckbox, CircleButtonComponent, TranslateModule] + imports: [MatCheckbox, CircleButtonComponent, TranslateModule], }) export class HelpModeDialogComponent implements OnInit, OnDestroy { #backdropClickSubscription: Subscription; diff --git a/src/lib/help-mode/help-mode/help-mode.component.ts b/src/lib/help-mode/help-mode/help-mode.component.ts index 4e8c135..7a8d6d2 100644 --- a/src/lib/help-mode/help-mode/help-mode.component.ts +++ b/src/lib/help-mode/help-mode/help-mode.component.ts @@ -3,7 +3,7 @@ import { HelpModeService } from '../help-mode.service'; import { IqserEventTarget } from '../../utils'; import { MatDialog } from '@angular/material/dialog'; import { CircleButtonComponent, CircleButtonTypes } from '../../buttons'; -import { AsyncPipe, NgIf } from '@angular/common'; +import { AsyncPipe } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; @Component({ @@ -11,7 +11,7 @@ import { TranslateModule } from '@ngx-translate/core'; templateUrl: './help-mode.component.html', styleUrls: ['./help-mode.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [AsyncPipe, TranslateModule, NgIf, CircleButtonComponent] + imports: [AsyncPipe, TranslateModule, CircleButtonComponent], }) export class HelpModeComponent { readonly circleButtonTypes = CircleButtonTypes; diff --git a/src/lib/inputs/input-with-action/input-with-action.component.ts b/src/lib/inputs/input-with-action/input-with-action.component.ts index c725692..909cb52 100644 --- a/src/lib/inputs/input-with-action/input-with-action.component.ts +++ b/src/lib/inputs/input-with-action/input-with-action.component.ts @@ -10,7 +10,7 @@ import { randomString } from '../../utils/functions'; templateUrl: './input-with-action.component.html', styleUrls: ['./input-with-action.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [FormsModule, MatIconModule, CircleButtonComponent] + imports: [FormsModule, MatIconModule, CircleButtonComponent], }) export class InputWithActionComponent { readonly inputId = input(`${randomString() + '-search-input'}`); diff --git a/src/lib/inputs/round-checkbox/round-checkbox.component.ts b/src/lib/inputs/round-checkbox/round-checkbox.component.ts index fc1f533..0390788 100644 --- a/src/lib/inputs/round-checkbox/round-checkbox.component.ts +++ b/src/lib/inputs/round-checkbox/round-checkbox.component.ts @@ -6,7 +6,7 @@ import { MatIconModule } from '@angular/material/icon'; templateUrl: './round-checkbox.component.html', styleUrls: ['./round-checkbox.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatIconModule] + imports: [MatIconModule], }) export class RoundCheckboxComponent { protected readonly _wrapper = viewChild.required('wrapper', { read: ElementRef }); diff --git a/src/lib/listing/scroll-button/scroll-button.component.ts b/src/lib/listing/scroll-button/scroll-button.component.ts index 73942f2..4c83a76 100644 --- a/src/lib/listing/scroll-button/scroll-button.component.ts +++ b/src/lib/listing/scroll-button/scroll-button.component.ts @@ -18,7 +18,7 @@ type ButtonType = keyof typeof ButtonTypes; templateUrl: './scroll-button.component.html', styleUrls: ['./scroll-button.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [AsyncPipe, MatIcon] + imports: [AsyncPipe, MatIcon], }) export class ScrollButtonComponent implements OnInit { readonly buttonType = ButtonTypes; diff --git a/src/lib/listing/table-column-name/table-column-name.component.ts b/src/lib/listing/table-column-name/table-column-name.component.ts index 469c1d8..9a4ad40 100644 --- a/src/lib/listing/table-column-name/table-column-name.component.ts +++ b/src/lib/listing/table-column-name/table-column-name.component.ts @@ -12,7 +12,7 @@ import { Id, IListable } from '../models'; templateUrl: './table-column-name.component.html', styleUrls: ['./table-column-name.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatIcon, MatTooltip, TranslateModule, AsyncPipe, NgClass] + imports: [MatIcon, MatTooltip, TranslateModule, AsyncPipe, NgClass], }) export class TableColumnNameComponent, PrimaryKey extends Id = T['id']> { readonly sortingOrders = SortingOrders; diff --git a/src/lib/listing/table-content/table-item/table-item.component.ts b/src/lib/listing/table-content/table-item/table-item.component.ts index 88c64d3..5c90093 100644 --- a/src/lib/listing/table-content/table-item/table-item.component.ts +++ b/src/lib/listing/table-content/table-item/table-item.component.ts @@ -12,7 +12,7 @@ import { ListingService } from '../../services/listing.service'; templateUrl: './table-item.component.html', styleUrls: ['./table-item.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [RoundCheckboxComponent, AsyncPipe, NgTemplateOutlet] + imports: [RoundCheckboxComponent, AsyncPipe, NgTemplateOutlet], }) export class TableItemComponent implements OnChanges { @Input() entity!: T; diff --git a/src/lib/listing/table/table.component.ts b/src/lib/listing/table/table.component.ts index 96a74aa..da3da76 100644 --- a/src/lib/listing/table/table.component.ts +++ b/src/lib/listing/table/table.component.ts @@ -28,7 +28,7 @@ const SCROLLBAR_WIDTH = 11; selector: 'iqser-table [tableColumnConfigs] [itemSize]', templateUrl: './table.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - imports: [TableHeaderComponent, NgTemplateOutlet, AsyncPipe, EmptyStateComponent, ScrollButtonComponent, TableContentComponent] + imports: [TableHeaderComponent, NgTemplateOutlet, AsyncPipe, EmptyStateComponent, ScrollButtonComponent, TableContentComponent], }) export class TableComponent, PrimaryKey extends Id = Class['id']> implements OnChanges { @ViewChild(TableContentComponent, { static: true }) private readonly _tableContent!: TableContentComponent; diff --git a/src/lib/listing/workflow/column-header/column-header.component.ts b/src/lib/listing/workflow/column-header/column-header.component.ts index 30a3151..a18c8d3 100644 --- a/src/lib/listing/workflow/column-header/column-header.component.ts +++ b/src/lib/listing/workflow/column-header/column-header.component.ts @@ -36,7 +36,7 @@ interface ColumnHeaderContext { templateUrl: './column-header.component.html', styleUrls: ['./column-header.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [AsyncPipe, TranslateModule, RoundCheckboxComponent, NgTemplateOutlet, CircleButtonComponent] + imports: [AsyncPipe, TranslateModule, RoundCheckboxComponent, NgTemplateOutlet, CircleButtonComponent], }) export class ColumnHeaderComponent extends ContextComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; diff --git a/src/lib/loading/full-page-loading-indicator/full-page-loading-indicator.component.ts b/src/lib/loading/full-page-loading-indicator/full-page-loading-indicator.component.ts index 3fcc9a5..43bca4c 100644 --- a/src/lib/loading/full-page-loading-indicator/full-page-loading-indicator.component.ts +++ b/src/lib/loading/full-page-loading-indicator/full-page-loading-indicator.component.ts @@ -5,7 +5,7 @@ import { LoadingService } from '../loading.service'; selector: 'iqser-full-page-loading-indicator', templateUrl: './full-page-loading-indicator.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class FullPageLoadingIndicatorComponent { constructor(readonly loadingService: LoadingService) {} diff --git a/src/lib/loading/progress-bar/progress-bar.component.ts b/src/lib/loading/progress-bar/progress-bar.component.ts index 76dd40c..acd0830 100644 --- a/src/lib/loading/progress-bar/progress-bar.component.ts +++ b/src/lib/loading/progress-bar/progress-bar.component.ts @@ -1,16 +1,16 @@ -import { ChangeDetectionStrategy, Component, Input, Optional, OnInit } from '@angular/core'; -import { ProgressBarConfigModel } from './progress-bar-config.model'; -import { FilterService, INestedFilter } from '../../filtering'; +import { ChangeDetectionStrategy, Component, Input, OnInit, Optional } from '@angular/core'; import { Observable, of } from 'rxjs'; -import { get, shareLast } from '../../utils'; import { map } from 'rxjs/operators'; +import { FilterService, INestedFilter } from '../../filtering'; +import { get, shareLast } from '../../utils'; +import { ProgressBarConfigModel } from './progress-bar-config.model'; @Component({ selector: 'iqser-progress-bar [config]', templateUrl: './progress-bar.component.html', styleUrls: ['./progress-bar.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class ProgressBarComponent implements OnInit { @Input() config!: ProgressBarConfigModel; diff --git a/src/lib/loading/progress-loading/progress-loading.component.ts b/src/lib/loading/progress-loading/progress-loading.component.ts index a35a9d1..a7a02c1 100644 --- a/src/lib/loading/progress-loading/progress-loading.component.ts +++ b/src/lib/loading/progress-loading/progress-loading.component.ts @@ -6,7 +6,7 @@ import { ILoadingConfig } from '../loading.service'; templateUrl: './progress-loading.component.html', styleUrls: ['./progress-loading.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class ProgressLoadingComponent { @Input() config!: ILoadingConfig; diff --git a/src/lib/permissions/directives/allow.directive.ts b/src/lib/permissions/directives/allow.directive.ts index 7f423e8..f526e45 100644 --- a/src/lib/permissions/directives/allow.directive.ts +++ b/src/lib/permissions/directives/allow.directive.ts @@ -6,7 +6,6 @@ import { assertTemplate, IqserPermissionsDirective } from './permissions.directi @Directive({ selector: '[allow]', - standalone: true, }) export class IqserAllowDirective extends IqserPermissionsDirective implements OnDestroy, OnInit { /** diff --git a/src/lib/permissions/directives/deny.directive.ts b/src/lib/permissions/directives/deny.directive.ts index 64df945..edd40c1 100644 --- a/src/lib/permissions/directives/deny.directive.ts +++ b/src/lib/permissions/directives/deny.directive.ts @@ -6,7 +6,6 @@ import { assertTemplate, IqserPermissionsDirective } from './permissions.directi @Directive({ selector: '[deny]', - standalone: true, }) export class IqserDenyDirective extends IqserPermissionsDirective implements OnDestroy, OnInit { /** diff --git a/src/lib/pipes/capitalize.pipe.ts b/src/lib/pipes/capitalize.pipe.ts index 6ea45d7..3055a6d 100644 --- a/src/lib/pipes/capitalize.pipe.ts +++ b/src/lib/pipes/capitalize.pipe.ts @@ -3,7 +3,6 @@ import { capitalize } from '../utils'; @Pipe({ name: 'capitalize', - standalone: true, }) export class CapitalizePipe implements PipeTransform { transform(value: string): string { diff --git a/src/lib/pipes/humanize-camel-case.pipe.ts b/src/lib/pipes/humanize-camel-case.pipe.ts index 11136f8..fe2fd75 100644 --- a/src/lib/pipes/humanize-camel-case.pipe.ts +++ b/src/lib/pipes/humanize-camel-case.pipe.ts @@ -3,7 +3,6 @@ import { humanizeCamelCase } from '../utils'; @Pipe({ name: 'humanizeCamelCase', - standalone: true, }) export class HumanizeCamelCasePipe implements PipeTransform { transform(item: string): string { diff --git a/src/lib/pipes/humanize.pipe.ts b/src/lib/pipes/humanize.pipe.ts index 2535904..18a04fb 100644 --- a/src/lib/pipes/humanize.pipe.ts +++ b/src/lib/pipes/humanize.pipe.ts @@ -3,7 +3,6 @@ import { humanize } from '../utils'; @Pipe({ name: 'humanize', - standalone: true, }) export class HumanizePipe implements PipeTransform { transform(item: string, lowercase = false): string { diff --git a/src/lib/pipes/log.pipe.ts b/src/lib/pipes/log.pipe.ts index 8a85372..9231cb3 100644 --- a/src/lib/pipes/log.pipe.ts +++ b/src/lib/pipes/log.pipe.ts @@ -2,7 +2,6 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'log', - standalone: true, }) export class LogPipe implements PipeTransform { transform(value: T, message = ''): T { diff --git a/src/lib/pipes/replace-nbsp.pipe.ts b/src/lib/pipes/replace-nbsp.pipe.ts index a930af9..7acb171 100644 --- a/src/lib/pipes/replace-nbsp.pipe.ts +++ b/src/lib/pipes/replace-nbsp.pipe.ts @@ -2,7 +2,6 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'replaceNbsp', - standalone: true, }) export class ReplaceNbspPipe implements PipeTransform { transform(value: string): string { diff --git a/src/lib/pipes/size.pipe.ts b/src/lib/pipes/size.pipe.ts index 2bece27..b8b3da4 100644 --- a/src/lib/pipes/size.pipe.ts +++ b/src/lib/pipes/size.pipe.ts @@ -3,7 +3,6 @@ import { size } from '../utils'; @Pipe({ name: 'size', - standalone: true, }) export class SizePipe implements PipeTransform { transform(value: number): string { diff --git a/src/lib/pipes/snake-case.pipe.ts b/src/lib/pipes/snake-case.pipe.ts index b2c247d..bbc9ee5 100644 --- a/src/lib/pipes/snake-case.pipe.ts +++ b/src/lib/pipes/snake-case.pipe.ts @@ -2,7 +2,6 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'snakeCase', - standalone: true, }) export class SnakeCasePipe implements PipeTransform { transform(value: string): string | undefined { diff --git a/src/lib/shared/logo/logo.component.ts b/src/lib/shared/logo/logo.component.ts index d940893..ba32c5e 100644 --- a/src/lib/shared/logo/logo.component.ts +++ b/src/lib/shared/logo/logo.component.ts @@ -1,6 +1,5 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core'; import { MatIconModule } from '@angular/material/icon'; -import { NgClass } from '@angular/common'; @Component({ selector: 'iqser-logo', @@ -18,8 +17,8 @@ import { NgClass } from '@angular/common'; `, ], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatIconModule, NgClass] + imports: [MatIconModule], }) export class LogoComponent { - icon = input.required(); + readonly icon = input.required(); } diff --git a/src/lib/shared/side-nav/side-nav.component.ts b/src/lib/shared/side-nav/side-nav.component.ts index 6f90f11..ff12de5 100644 --- a/src/lib/shared/side-nav/side-nav.component.ts +++ b/src/lib/shared/side-nav/side-nav.component.ts @@ -4,7 +4,6 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; selector: 'iqser-side-nav [title]', templateUrl: './side-nav.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) export class SideNavComponent { @Input() title!: string; diff --git a/src/lib/shared/skeleton/skeleton.component.ts b/src/lib/shared/skeleton/skeleton.component.ts index f6aff36..da59feb 100644 --- a/src/lib/shared/skeleton/skeleton.component.ts +++ b/src/lib/shared/skeleton/skeleton.component.ts @@ -9,7 +9,7 @@ import { tap } from 'rxjs/operators'; templateUrl: './skeleton.component.html', styleUrls: ['./skeleton.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NgTemplateOutlet, AsyncPipe] + imports: [NgTemplateOutlet, AsyncPipe], }) export class SkeletonComponent { @Input() templates!: Record>; diff --git a/src/lib/shared/small-chip/small-chip.component.ts b/src/lib/shared/small-chip/small-chip.component.ts index afc8bbe..fafa19b 100644 --- a/src/lib/shared/small-chip/small-chip.component.ts +++ b/src/lib/shared/small-chip/small-chip.component.ts @@ -13,7 +13,6 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; `, ], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) export class SmallChipComponent { @Input() color!: string; diff --git a/src/lib/shared/spacer/spacer.component.ts b/src/lib/shared/spacer/spacer.component.ts index becc99a..44659b9 100644 --- a/src/lib/shared/spacer/spacer.component.ts +++ b/src/lib/shared/spacer/spacer.component.ts @@ -4,7 +4,6 @@ import { Component, HostBinding, Input } from '@angular/core'; selector: 'iqser-spacer [height]', template: '
', styleUrls: ['./spacer.component.scss'], - standalone: true, }) export class SpacerComponent { @Input({ required: true }) height!: number; diff --git a/src/lib/shared/status-bar/status-bar.component.ts b/src/lib/shared/status-bar/status-bar.component.ts index ab9c2c0..ab9560c 100644 --- a/src/lib/shared/status-bar/status-bar.component.ts +++ b/src/lib/shared/status-bar/status-bar.component.ts @@ -9,7 +9,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; styleUrls: ['./status-bar.component.scss'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NgClass, NgStyle, MatTooltipModule] + imports: [NgClass, NgStyle, MatTooltipModule], }) export class StatusBarComponent { @Input() configs: readonly StatusBarConfig[] = []; diff --git a/src/lib/shared/toast/toast.component.ts b/src/lib/shared/toast/toast.component.ts index 390e820..45e8d18 100644 --- a/src/lib/shared/toast/toast.component.ts +++ b/src/lib/shared/toast/toast.component.ts @@ -8,7 +8,7 @@ import { StopPropagationDirective } from '../../directives'; @Component({ templateUrl: './toast.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - imports: [MatIconModule, StopPropagationDirective] + imports: [MatIconModule, StopPropagationDirective], }) export class ToastComponent extends Toast { get actions(): ToasterActions[] { diff --git a/src/lib/sorting/sort-by.pipe.ts b/src/lib/sorting/sort-by.pipe.ts index ff4eb03..1dbad80 100644 --- a/src/lib/sorting/sort-by.pipe.ts +++ b/src/lib/sorting/sort-by.pipe.ts @@ -3,7 +3,7 @@ import { SortingOrder } from './models/sorting-order.type'; import { KeysOf } from '../utils'; import { sort } from './functions'; -@Pipe({ name: 'sortBy', standalone: true }) +@Pipe({ name: 'sortBy' }) export class SortByPipe implements PipeTransform { transform(values: T[], order: SortingOrder, column: KeysOf): T[] { return sort(values, order, column); diff --git a/src/lib/tenants/tenant-select/tenant-select.component.ts b/src/lib/tenants/tenant-select/tenant-select.component.ts index 17bfb6f..d9f4481 100644 --- a/src/lib/tenants/tenant-select/tenant-select.component.ts +++ b/src/lib/tenants/tenant-select/tenant-select.component.ts @@ -15,7 +15,7 @@ import { KeycloakStatusService } from '../services/keycloak-status.service'; templateUrl: './tenant-select.component.html', styleUrls: ['./tenant-select.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class TenantSelectComponent { readonly #uiRoot = inject(UI_ROOT); @@ -39,10 +39,6 @@ export class TenantSelectComponent { this.#loadStoredTenants(); } - protected tenantIcon(tenant: IStoredTenantId) { - return `red:${tenant.documine ? 'documine' : 'redaction'}-logo`; - } - updateTenantSelection() { const tenantId = this.form.controls.tenantId.value; if (!tenantId) { @@ -75,6 +71,10 @@ export class TenantSelectComponent { this.#loadStoredTenants(); } + protected tenantIcon(tenant: IStoredTenantId) { + return `red:${tenant.documine ? 'documine' : 'redaction'}-logo`; + } + #loadStoredTenants() { this.storedTenants = this.tenantsService.getStoredTenants().sort((a, b) => a.tenantId.localeCompare(b.tenantId)); } diff --git a/src/lib/upload-file/drag-drop-file-upload.directive.ts b/src/lib/upload-file/drag-drop-file-upload.directive.ts index 6a3383c..fc73659 100644 --- a/src/lib/upload-file/drag-drop-file-upload.directive.ts +++ b/src/lib/upload-file/drag-drop-file-upload.directive.ts @@ -2,7 +2,6 @@ import { Directive, EventEmitter, HostBinding, HostListener, Output } from '@ang @Directive({ selector: '[iqserDragDropFileUpload]', - standalone: true, }) export class DragDropFileUploadDirective { @Output() readonly fileDropped = new EventEmitter(); diff --git a/src/lib/upload-file/upload-file.component.ts b/src/lib/upload-file/upload-file.component.ts index b7c2fe9..64d405e 100644 --- a/src/lib/upload-file/upload-file.component.ts +++ b/src/lib/upload-file/upload-file.component.ts @@ -1,16 +1,14 @@ import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core'; import { DragDropFileUploadDirective } from './drag-drop-file-upload.directive'; import { MatIcon } from '@angular/material/icon'; -import { NgIf } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'iqser-upload-file', templateUrl: './upload-file.component.html', - // eslint-disable-next-line @angular-eslint/no-host-metadata-property host: { '[class.iqser-upload-file]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, - imports: [DragDropFileUploadDirective, MatIcon, NgIf, TranslateModule] + imports: [DragDropFileUploadDirective, MatIcon, TranslateModule], }) export class UploadFileComponent { @ViewChild('attachFileInput', { static: true }) attachFileInput!: ElementRef; diff --git a/src/lib/users/components/user-button/user-button.component.ts b/src/lib/users/components/user-button/user-button.component.ts index 016a522..50f707d 100644 --- a/src/lib/users/components/user-button/user-button.component.ts +++ b/src/lib/users/components/user-button/user-button.component.ts @@ -6,7 +6,7 @@ import { IqserUserService } from '../../services/iqser-user.service'; templateUrl: './user-button.component.html', styleUrls: ['./user-button.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false + standalone: false, }) export class UserButtonComponent { @Input() showDot = false; diff --git a/src/lib/users/name.pipe.ts b/src/lib/users/name.pipe.ts index 492606f..22e302a 100644 --- a/src/lib/users/name.pipe.ts +++ b/src/lib/users/name.pipe.ts @@ -19,7 +19,6 @@ function getInitials(name: string) { @Pipe({ name: 'name', - standalone: true, }) export class NamePipe implements PipeTransform { readonly #translateService = inject(TranslateService);