ng 19
This commit is contained in:
parent
b929f1d136
commit
8582f2e6be
@ -8,8 +8,7 @@ import { randomString } from '../../utils';
|
|||||||
templateUrl: './chevron-button.component.html',
|
templateUrl: './chevron-button.component.html',
|
||||||
styleUrls: ['./chevron-button.component.scss'],
|
styleUrls: ['./chevron-button.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatIconModule, MatButtonModule]
|
||||||
imports: [MatIconModule, MatButtonModule],
|
|
||||||
})
|
})
|
||||||
export class ChevronButtonComponent {
|
export class ChevronButtonComponent {
|
||||||
readonly label = input.required<string>();
|
readonly label = input.required<string>();
|
||||||
|
|||||||
@ -24,8 +24,7 @@ import { CircleButtonType, CircleButtonTypes } from '../types/circle-button.type
|
|||||||
templateUrl: './circle-button.component.html',
|
templateUrl: './circle-button.component.html',
|
||||||
styleUrls: ['./circle-button.component.scss'],
|
styleUrls: ['./circle-button.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatTooltipModule, MatIconModule, MatButtonModule, StopPropagationDirective]
|
||||||
imports: [MatTooltipModule, MatIconModule, MatButtonModule, StopPropagationDirective],
|
|
||||||
})
|
})
|
||||||
export class CircleButtonComponent {
|
export class CircleButtonComponent {
|
||||||
readonly #elementRef = inject(ElementRef<HTMLElement>);
|
readonly #elementRef = inject(ElementRef<HTMLElement>);
|
||||||
|
|||||||
@ -11,8 +11,7 @@ import { IconButtonType, IconButtonTypes } from '../types/icon-button.type';
|
|||||||
selector: 'iqser-icon-button',
|
selector: 'iqser-icon-button',
|
||||||
templateUrl: './icon-button.component.html',
|
templateUrl: './icon-button.component.html',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [NgClass, MatButtonModule, MatIconModule, StopPropagationDirective]
|
||||||
imports: [NgClass, MatButtonModule, MatIconModule, StopPropagationDirective],
|
|
||||||
})
|
})
|
||||||
export class IconButtonComponent {
|
export class IconButtonComponent {
|
||||||
protected readonly _hasRouterLink = !!inject(RouterLink, { optional: true, host: true });
|
protected readonly _hasRouterLink = !!inject(RouterLink, { optional: true, host: true });
|
||||||
|
|||||||
@ -87,7 +87,6 @@ function getConfig(options?: IConfirmationDialogData): InternalConfirmationDialo
|
|||||||
templateUrl: './confirmation-dialog.component.html',
|
templateUrl: './confirmation-dialog.component.html',
|
||||||
styleUrls: ['./confirmation-dialog.component.scss'],
|
styleUrls: ['./confirmation-dialog.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
@ -98,7 +97,7 @@ function getConfig(options?: IConfirmationDialogData): InternalConfirmationDialo
|
|||||||
CircleButtonComponent,
|
CircleButtonComponent,
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
NgClass,
|
NgClass,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class ConfirmationDialogComponent implements AfterViewInit {
|
export class ConfirmationDialogComponent implements AfterViewInit {
|
||||||
readonly config = getConfig(inject(MAT_DIALOG_DATA));
|
readonly config = getConfig(inject(MAT_DIALOG_DATA));
|
||||||
|
|||||||
@ -19,8 +19,7 @@ import { randomString } from '../utils/functions';
|
|||||||
templateUrl: './empty-state.component.html',
|
templateUrl: './empty-state.component.html',
|
||||||
styleUrls: ['./empty-state.component.scss'],
|
styleUrls: ['./empty-state.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [NgStyle, MatIconModule, IconButtonComponent]
|
||||||
imports: [NgStyle, MatIconModule, IconButtonComponent],
|
|
||||||
})
|
})
|
||||||
export class EmptyStateComponent {
|
export class EmptyStateComponent {
|
||||||
protected readonly iconButtonTypes = IconButtonTypes;
|
protected readonly iconButtonTypes = IconButtonTypes;
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import { ErrorService } from '../error.service';
|
|||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class ConnectionStatusComponent {
|
export class ConnectionStatusComponent {
|
||||||
protected readonly connectionStatusTranslations = connectionStatusTranslations;
|
protected readonly connectionStatusTranslations = connectionStatusTranslations;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { CustomError, ErrorService, ErrorType } from '../error.service';
|
|||||||
templateUrl: './full-page-error.component.html',
|
templateUrl: './full-page-error.component.html',
|
||||||
styleUrls: ['./full-page-error.component.scss'],
|
styleUrls: ['./full-page-error.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class FullPageErrorComponent {
|
export class FullPageErrorComponent {
|
||||||
protected readonly iconButtonTypes = IconButtonTypes;
|
protected readonly iconButtonTypes = IconButtonTypes;
|
||||||
|
|||||||
@ -37,8 +37,7 @@ const atLeastOneIsExpandable = pipe(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
standalone: true,
|
imports: [AsyncPipe, InputWithActionComponent, NgTemplateOutlet, TranslateModule, MatIcon, MatCheckbox, StopPropagationDirective]
|
||||||
imports: [AsyncPipe, InputWithActionComponent, NgTemplateOutlet, TranslateModule, MatIcon, MatCheckbox, StopPropagationDirective],
|
|
||||||
})
|
})
|
||||||
export class FilterCardComponent implements OnInit {
|
export class FilterCardComponent implements OnInit {
|
||||||
readonly #filterService = inject(FilterService);
|
readonly #filterService = inject(FilterService);
|
||||||
|
|||||||
@ -28,8 +28,7 @@ import { IFilterGroup } from '../models/filter-group.model';
|
|||||||
FilterCardComponent,
|
FilterCardComponent,
|
||||||
StopPropagationDirective,
|
StopPropagationDirective,
|
||||||
MatMenuContent,
|
MatMenuContent,
|
||||||
],
|
]
|
||||||
standalone: true,
|
|
||||||
})
|
})
|
||||||
export class PopupFilterComponent implements OnInit {
|
export class PopupFilterComponent implements OnInit {
|
||||||
@Input() primaryFiltersSlug!: string;
|
@Input() primaryFiltersSlug!: string;
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { FilterService } from '../filter.service';
|
|||||||
templateUrl: './quick-filters.component.html',
|
templateUrl: './quick-filters.component.html',
|
||||||
styleUrls: ['./quick-filters.component.scss'],
|
styleUrls: ['./quick-filters.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class QuickFiltersComponent {
|
export class QuickFiltersComponent {
|
||||||
readonly quickFilters$ = this.filterService.getFilterModels$('quickFilters');
|
readonly quickFilters$ = this.filterService.getFilterModels$('quickFilters');
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import { SimpleFilterOption } from '../models/simple-filter-option';
|
|||||||
selector: 'iqser-simple-popup-filter',
|
selector: 'iqser-simple-popup-filter',
|
||||||
templateUrl: './simple-popup-filter.component.html',
|
templateUrl: './simple-popup-filter.component.html',
|
||||||
styleUrls: ['./simple-popup-filter.component.scss'],
|
styleUrls: ['./simple-popup-filter.component.scss'],
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
MatMenuModule,
|
MatMenuModule,
|
||||||
IconButtonComponent,
|
IconButtonComponent,
|
||||||
@ -24,7 +23,7 @@ import { SimpleFilterOption } from '../models/simple-filter-option';
|
|||||||
MatCheckbox,
|
MatCheckbox,
|
||||||
IconButtonComponent,
|
IconButtonComponent,
|
||||||
CircleButtonComponent,
|
CircleButtonComponent,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class SimplePopupFilterComponent<T> {
|
export class SimplePopupFilterComponent<T> {
|
||||||
readonly options = input.required<SimpleFilterOption<T>[]>();
|
readonly options = input.required<SimpleFilterOption<T>[]>();
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { IFilter } from '../models/filter.model';
|
|||||||
selector: 'iqser-single-filter',
|
selector: 'iqser-single-filter',
|
||||||
templateUrl: './single-filter.component.html',
|
templateUrl: './single-filter.component.html',
|
||||||
styleUrls: ['./single-filter.component.scss'],
|
styleUrls: ['./single-filter.component.scss'],
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class SingleFilterComponent {
|
export class SingleFilterComponent {
|
||||||
@Input() filter!: IFilter;
|
@Input() filter!: IFilter;
|
||||||
|
|||||||
@ -10,8 +10,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
|||||||
selector: 'iqser-help-button',
|
selector: 'iqser-help-button',
|
||||||
templateUrl: './help-button.component.html',
|
templateUrl: './help-button.component.html',
|
||||||
styleUrls: ['./help-button.component.scss'],
|
styleUrls: ['./help-button.component.scss'],
|
||||||
standalone: true,
|
imports: [MatIcon, MatTooltip]
|
||||||
imports: [MatIcon, MatTooltip],
|
|
||||||
})
|
})
|
||||||
export class HelpButtonComponent implements OnInit, OnDestroy {
|
export class HelpButtonComponent implements OnInit, OnDestroy {
|
||||||
#helpModeHasBeenActivated = false;
|
#helpModeHasBeenActivated = false;
|
||||||
|
|||||||
@ -12,8 +12,7 @@ const DEFAULT_CDK_OVERLAY_CONTAINER_ZINDEX = '800';
|
|||||||
templateUrl: './help-mode-dialog.component.html',
|
templateUrl: './help-mode-dialog.component.html',
|
||||||
styleUrls: ['./help-mode-dialog.component.scss'],
|
styleUrls: ['./help-mode-dialog.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatCheckbox, CircleButtonComponent, TranslateModule]
|
||||||
imports: [MatCheckbox, CircleButtonComponent, TranslateModule],
|
|
||||||
})
|
})
|
||||||
export class HelpModeDialogComponent implements OnInit, OnDestroy {
|
export class HelpModeDialogComponent implements OnInit, OnDestroy {
|
||||||
#backdropClickSubscription: Subscription;
|
#backdropClickSubscription: Subscription;
|
||||||
|
|||||||
@ -11,8 +11,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
templateUrl: './help-mode.component.html',
|
templateUrl: './help-mode.component.html',
|
||||||
styleUrls: ['./help-mode.component.scss'],
|
styleUrls: ['./help-mode.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [AsyncPipe, TranslateModule, NgIf, CircleButtonComponent]
|
||||||
imports: [AsyncPipe, TranslateModule, NgIf, CircleButtonComponent],
|
|
||||||
})
|
})
|
||||||
export class HelpModeComponent {
|
export class HelpModeComponent {
|
||||||
readonly circleButtonTypes = CircleButtonTypes;
|
readonly circleButtonTypes = CircleButtonTypes;
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import { DetailsRadioOption } from './details-radio-option';
|
|||||||
selector: 'iqser-details-radio',
|
selector: 'iqser-details-radio',
|
||||||
templateUrl: './details-radio.component.html',
|
templateUrl: './details-radio.component.html',
|
||||||
styleUrls: ['./details-radio.component.scss'],
|
styleUrls: ['./details-radio.component.scss'],
|
||||||
standalone: true,
|
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
@ -37,7 +36,7 @@ import { DetailsRadioOption } from './details-radio-option';
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatTooltipModule,
|
MatTooltipModule,
|
||||||
ReplaceNbspPipe,
|
ReplaceNbspPipe,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class DetailsRadioComponent<I> extends FormFieldComponent<DetailsRadioOption<I>> {
|
export class DetailsRadioComponent<I> extends FormFieldComponent<DetailsRadioOption<I>> {
|
||||||
readonly options = input.required<DetailsRadioOption<I>[]>();
|
readonly options = input.required<DetailsRadioOption<I>[]>();
|
||||||
|
|||||||
@ -23,7 +23,6 @@ type DynamicInput = number | string | Date;
|
|||||||
templateUrl: './dynamic-input.component.html',
|
templateUrl: './dynamic-input.component.html',
|
||||||
styleUrls: ['./dynamic-input.component.scss'],
|
styleUrls: ['./dynamic-input.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: NG_VALUE_ACCESSOR,
|
provide: NG_VALUE_ACCESSOR,
|
||||||
@ -36,7 +35,7 @@ type DynamicInput = number | string | Date;
|
|||||||
useExisting: DynamicInputComponent,
|
useExisting: DynamicInputComponent,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
imports: [NgClass, FormsModule, MatDatepickerModule, StopPropagationDirective, MatIconModule, MatInputModule],
|
imports: [NgClass, FormsModule, MatDatepickerModule, StopPropagationDirective, MatIconModule, MatInputModule]
|
||||||
})
|
})
|
||||||
export class DynamicInputComponent extends FormFieldComponent<DynamicInput> {
|
export class DynamicInputComponent extends FormFieldComponent<DynamicInput> {
|
||||||
readonly label = input<string>();
|
readonly label = input<string>();
|
||||||
|
|||||||
@ -8,11 +8,10 @@ import { CircleButtonType, CircleButtonTypes } from '../../buttons/types/circle-
|
|||||||
templateUrl: './editable-input.component.html',
|
templateUrl: './editable-input.component.html',
|
||||||
styleUrls: ['./editable-input.component.scss'],
|
styleUrls: ['./editable-input.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
|
||||||
imports: [CircleButtonComponent, FormsModule],
|
imports: [CircleButtonComponent, FormsModule],
|
||||||
host: {
|
host: {
|
||||||
'[class.editing]': '_editing()',
|
'[class.editing]': '_editing()',
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
export class EditableInputComponent implements OnChanges {
|
export class EditableInputComponent implements OnChanges {
|
||||||
protected readonly _editing = signal(false);
|
protected readonly _editing = signal(false);
|
||||||
|
|||||||
@ -10,8 +10,7 @@ import { randomString } from '../../utils/functions';
|
|||||||
templateUrl: './input-with-action.component.html',
|
templateUrl: './input-with-action.component.html',
|
||||||
styleUrls: ['./input-with-action.component.scss'],
|
styleUrls: ['./input-with-action.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [FormsModule, MatIconModule, CircleButtonComponent]
|
||||||
imports: [FormsModule, MatIconModule, CircleButtonComponent],
|
|
||||||
})
|
})
|
||||||
export class InputWithActionComponent {
|
export class InputWithActionComponent {
|
||||||
readonly inputId = input(`${randomString() + '-search-input'}`);
|
readonly inputId = input(`${randomString() + '-search-input'}`);
|
||||||
|
|||||||
@ -6,8 +6,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|||||||
templateUrl: './round-checkbox.component.html',
|
templateUrl: './round-checkbox.component.html',
|
||||||
styleUrls: ['./round-checkbox.component.scss'],
|
styleUrls: ['./round-checkbox.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatIconModule]
|
||||||
imports: [MatIconModule],
|
|
||||||
})
|
})
|
||||||
export class RoundCheckboxComponent {
|
export class RoundCheckboxComponent {
|
||||||
protected readonly _wrapper = viewChild.required('wrapper', { read: ElementRef });
|
protected readonly _wrapper = viewChild.required('wrapper', { read: ElementRef });
|
||||||
|
|||||||
@ -23,7 +23,6 @@ import { DisableStopPropagationDirective } from '../../directives';
|
|||||||
templateUrl: './page-header.component.html',
|
templateUrl: './page-header.component.html',
|
||||||
styleUrls: ['./page-header.component.scss'],
|
styleUrls: ['./page-header.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgTemplateOutlet,
|
NgTemplateOutlet,
|
||||||
@ -35,7 +34,7 @@ import { DisableStopPropagationDirective } from '../../directives';
|
|||||||
InputWithActionComponent,
|
InputWithActionComponent,
|
||||||
MatTooltip,
|
MatTooltip,
|
||||||
DisableStopPropagationDirective,
|
DisableStopPropagationDirective,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class PageHeaderComponent<T extends IListable> {
|
export class PageHeaderComponent<T extends IListable> {
|
||||||
readonly searchPositions = SearchPositions;
|
readonly searchPositions = SearchPositions;
|
||||||
|
|||||||
@ -18,8 +18,7 @@ type ButtonType = keyof typeof ButtonTypes;
|
|||||||
templateUrl: './scroll-button.component.html',
|
templateUrl: './scroll-button.component.html',
|
||||||
styleUrls: ['./scroll-button.component.scss'],
|
styleUrls: ['./scroll-button.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [AsyncPipe, MatIcon]
|
||||||
imports: [AsyncPipe, MatIcon],
|
|
||||||
})
|
})
|
||||||
export class ScrollButtonComponent implements OnInit {
|
export class ScrollButtonComponent implements OnInit {
|
||||||
readonly buttonType = ButtonTypes;
|
readonly buttonType = ButtonTypes;
|
||||||
|
|||||||
@ -12,8 +12,7 @@ import { Id, IListable } from '../models';
|
|||||||
templateUrl: './table-column-name.component.html',
|
templateUrl: './table-column-name.component.html',
|
||||||
styleUrls: ['./table-column-name.component.scss'],
|
styleUrls: ['./table-column-name.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatIcon, MatTooltip, TranslateModule, AsyncPipe, NgClass]
|
||||||
imports: [MatIcon, MatTooltip, TranslateModule, AsyncPipe, NgClass],
|
|
||||||
})
|
})
|
||||||
export class TableColumnNameComponent<T extends IListable<PrimaryKey>, PrimaryKey extends Id = T['id']> {
|
export class TableColumnNameComponent<T extends IListable<PrimaryKey>, PrimaryKey extends Id = T['id']> {
|
||||||
readonly sortingOrders = SortingOrders;
|
readonly sortingOrders = SortingOrders;
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
>
|
>
|
||||||
<iqser-table-item
|
<iqser-table-item
|
||||||
(click)="multiSelect(entity, $event)"
|
(click)="multiSelect(entity, $event)"
|
||||||
[entity]="entity"
|
[entity]="$any(entity)"
|
||||||
[selectionEnabled]="selectionEnabled"
|
[selectionEnabled]="selectionEnabled"
|
||||||
></iqser-table-item>
|
></iqser-table-item>
|
||||||
</a>
|
</a>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
>
|
>
|
||||||
<iqser-table-item
|
<iqser-table-item
|
||||||
(click)="multiSelect(entity, $event)"
|
(click)="multiSelect(entity, $event)"
|
||||||
[entity]="entity"
|
[entity]="$any(entity)"
|
||||||
[selectionEnabled]="selectionEnabled"
|
[selectionEnabled]="selectionEnabled"
|
||||||
></iqser-table-item>
|
></iqser-table-item>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import { TableItemComponent } from './table-item/table-item.component';
|
|||||||
selector: 'iqser-table-content',
|
selector: 'iqser-table-content',
|
||||||
templateUrl: './table-content.component.html',
|
templateUrl: './table-content.component.html',
|
||||||
styleUrls: ['./table-content.component.scss'],
|
styleUrls: ['./table-content.component.scss'],
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
CdkVirtualScrollViewport,
|
CdkVirtualScrollViewport,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
@ -31,7 +30,7 @@ import { TableItemComponent } from './table-item/table-item.component';
|
|||||||
NgClass,
|
NgClass,
|
||||||
RouterLink,
|
RouterLink,
|
||||||
TableItemComponent,
|
TableItemComponent,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryKey extends Id = Class['id']>
|
export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryKey extends Id = Class['id']>
|
||||||
extends AutoUnsubscribe
|
extends AutoUnsubscribe
|
||||||
|
|||||||
@ -12,8 +12,7 @@ import { ListingService } from '../../services/listing.service';
|
|||||||
templateUrl: './table-item.component.html',
|
templateUrl: './table-item.component.html',
|
||||||
styleUrls: ['./table-item.component.scss'],
|
styleUrls: ['./table-item.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [RoundCheckboxComponent, AsyncPipe, NgTemplateOutlet]
|
||||||
imports: [RoundCheckboxComponent, AsyncPipe, NgTemplateOutlet],
|
|
||||||
})
|
})
|
||||||
export class TableItemComponent<T extends IListable> implements OnChanges {
|
export class TableItemComponent<T extends IListable> implements OnChanges {
|
||||||
@Input() entity!: T;
|
@Input() entity!: T;
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import { TableColumnNameComponent } from '../table-column-name/table-column-name
|
|||||||
templateUrl: './table-header.component.html',
|
templateUrl: './table-header.component.html',
|
||||||
styleUrls: ['./table-header.component.scss'],
|
styleUrls: ['./table-header.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
RoundCheckboxComponent,
|
RoundCheckboxComponent,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
@ -22,7 +21,7 @@ import { TableColumnNameComponent } from '../table-column-name/table-column-name
|
|||||||
IqserFiltersModule,
|
IqserFiltersModule,
|
||||||
SyncWidthDirective,
|
SyncWidthDirective,
|
||||||
TableColumnNameComponent,
|
TableColumnNameComponent,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class TableHeaderComponent<T extends IListable<PrimaryKey>, PrimaryKey extends Id = T['id']> {
|
export class TableHeaderComponent<T extends IListable<PrimaryKey>, PrimaryKey extends Id = T['id']> {
|
||||||
readonly listingModes = ListingModes;
|
readonly listingModes = ListingModes;
|
||||||
|
|||||||
@ -28,8 +28,7 @@ const SCROLLBAR_WIDTH = 11;
|
|||||||
selector: 'iqser-table [tableColumnConfigs] [itemSize]',
|
selector: 'iqser-table [tableColumnConfigs] [itemSize]',
|
||||||
templateUrl: './table.component.html',
|
templateUrl: './table.component.html',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [TableHeaderComponent, NgTemplateOutlet, AsyncPipe, EmptyStateComponent, ScrollButtonComponent, TableContentComponent]
|
||||||
imports: [TableHeaderComponent, NgTemplateOutlet, AsyncPipe, EmptyStateComponent, ScrollButtonComponent, TableContentComponent],
|
|
||||||
})
|
})
|
||||||
export class TableComponent<Class extends IListable<PrimaryKey>, PrimaryKey extends Id = Class['id']> implements OnChanges {
|
export class TableComponent<Class extends IListable<PrimaryKey>, PrimaryKey extends Id = Class['id']> implements OnChanges {
|
||||||
@ViewChild(TableContentComponent, { static: true }) private readonly _tableContent!: TableContentComponent<Class>;
|
@ViewChild(TableContentComponent, { static: true }) private readonly _tableContent!: TableContentComponent<Class>;
|
||||||
|
|||||||
@ -36,8 +36,7 @@ interface ColumnHeaderContext {
|
|||||||
templateUrl: './column-header.component.html',
|
templateUrl: './column-header.component.html',
|
||||||
styleUrls: ['./column-header.component.scss'],
|
styleUrls: ['./column-header.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [AsyncPipe, TranslateModule, RoundCheckboxComponent, NgTemplateOutlet, CircleButtonComponent]
|
||||||
imports: [AsyncPipe, TranslateModule, RoundCheckboxComponent, NgTemplateOutlet, CircleButtonComponent],
|
|
||||||
})
|
})
|
||||||
export class ColumnHeaderComponent<T extends IListable, K extends string> extends ContextComponent<ColumnHeaderContext> implements OnInit {
|
export class ColumnHeaderComponent<T extends IListable, K extends string> extends ContextComponent<ColumnHeaderContext> implements OnInit {
|
||||||
readonly circleButtonTypes = CircleButtonTypes;
|
readonly circleButtonTypes = CircleButtonTypes;
|
||||||
|
|||||||
@ -50,7 +50,6 @@ interface WorkflowContext<T> {
|
|||||||
templateUrl: './workflow.component.html',
|
templateUrl: './workflow.component.html',
|
||||||
styleUrls: ['./workflow.component.scss'],
|
styleUrls: ['./workflow.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
|
||||||
imports: [
|
imports: [
|
||||||
TableHeaderComponent,
|
TableHeaderComponent,
|
||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
@ -64,7 +63,7 @@ interface WorkflowContext<T> {
|
|||||||
NgTemplateOutlet,
|
NgTemplateOutlet,
|
||||||
CdkDragPreview,
|
CdkDragPreview,
|
||||||
MatIcon,
|
MatIcon,
|
||||||
],
|
]
|
||||||
})
|
})
|
||||||
export class WorkflowComponent<T extends IListable, K extends string> extends ContextComponent<WorkflowContext<T>> implements OnInit {
|
export class WorkflowComponent<T extends IListable, K extends string> extends ContextComponent<WorkflowContext<T>> implements OnInit {
|
||||||
@ViewChildren(CdkDropList) private readonly _dropLists!: QueryList<CdkDropList>;
|
@ViewChildren(CdkDropList) private readonly _dropLists!: QueryList<CdkDropList>;
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { LoadingService } from '../loading.service';
|
|||||||
selector: 'iqser-full-page-loading-indicator',
|
selector: 'iqser-full-page-loading-indicator',
|
||||||
templateUrl: './full-page-loading-indicator.component.html',
|
templateUrl: './full-page-loading-indicator.component.html',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class FullPageLoadingIndicatorComponent {
|
export class FullPageLoadingIndicatorComponent {
|
||||||
constructor(readonly loadingService: LoadingService) {}
|
constructor(readonly loadingService: LoadingService) {}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import { map } from 'rxjs/operators';
|
|||||||
templateUrl: './progress-bar.component.html',
|
templateUrl: './progress-bar.component.html',
|
||||||
styleUrls: ['./progress-bar.component.scss'],
|
styleUrls: ['./progress-bar.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class ProgressBarComponent implements OnInit {
|
export class ProgressBarComponent implements OnInit {
|
||||||
@Input() config!: ProgressBarConfigModel;
|
@Input() config!: ProgressBarConfigModel;
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { ILoadingConfig } from '../loading.service';
|
|||||||
templateUrl: './progress-loading.component.html',
|
templateUrl: './progress-loading.component.html',
|
||||||
styleUrls: ['./progress-loading.component.scss'],
|
styleUrls: ['./progress-loading.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class ProgressLoadingComponent {
|
export class ProgressLoadingComponent {
|
||||||
@Input() config!: ILoadingConfig;
|
@Input() config!: ILoadingConfig;
|
||||||
|
|||||||
@ -7,9 +7,8 @@ import { PaginationSettings } from './pagination-settings';
|
|||||||
selector: 'iqser-pagination',
|
selector: 'iqser-pagination',
|
||||||
templateUrl: './pagination.component.html',
|
templateUrl: './pagination.component.html',
|
||||||
styleUrls: ['./pagination.component.scss'],
|
styleUrls: ['./pagination.component.scss'],
|
||||||
standalone: true,
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
imports: [TranslateModule],
|
imports: [TranslateModule]
|
||||||
})
|
})
|
||||||
export class PaginationComponent {
|
export class PaginationComponent {
|
||||||
displayedPages: (number | string)[] = [];
|
displayedPages: (number | string)[] = [];
|
||||||
|
|||||||
@ -18,8 +18,7 @@ import { NgClass } from '@angular/common';
|
|||||||
`,
|
`,
|
||||||
],
|
],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatIconModule, NgClass]
|
||||||
imports: [MatIconModule, NgClass],
|
|
||||||
})
|
})
|
||||||
export class LogoComponent {
|
export class LogoComponent {
|
||||||
icon = input.required<string>();
|
icon = input.required<string>();
|
||||||
|
|||||||
@ -9,8 +9,7 @@ import { tap } from 'rxjs/operators';
|
|||||||
templateUrl: './skeleton.component.html',
|
templateUrl: './skeleton.component.html',
|
||||||
styleUrls: ['./skeleton.component.scss'],
|
styleUrls: ['./skeleton.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [NgTemplateOutlet, AsyncPipe]
|
||||||
imports: [NgTemplateOutlet, AsyncPipe],
|
|
||||||
})
|
})
|
||||||
export class SkeletonComponent {
|
export class SkeletonComponent {
|
||||||
@Input() templates!: Record<string, TemplateRef<unknown>>;
|
@Input() templates!: Record<string, TemplateRef<unknown>>;
|
||||||
|
|||||||
@ -9,8 +9,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|||||||
styleUrls: ['./status-bar.component.scss'],
|
styleUrls: ['./status-bar.component.scss'],
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [NgClass, NgStyle, MatTooltipModule]
|
||||||
imports: [NgClass, NgStyle, MatTooltipModule],
|
|
||||||
})
|
})
|
||||||
export class StatusBarComponent<T extends string> {
|
export class StatusBarComponent<T extends string> {
|
||||||
@Input() configs: readonly StatusBarConfig<T>[] = [];
|
@Input() configs: readonly StatusBarConfig<T>[] = [];
|
||||||
|
|||||||
@ -8,8 +8,7 @@ import { StopPropagationDirective } from '../../directives';
|
|||||||
@Component({
|
@Component({
|
||||||
templateUrl: './toast.component.html',
|
templateUrl: './toast.component.html',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [MatIconModule, StopPropagationDirective]
|
||||||
imports: [MatIconModule, StopPropagationDirective],
|
|
||||||
})
|
})
|
||||||
export class ToastComponent extends Toast {
|
export class ToastComponent extends Toast {
|
||||||
get actions(): ToasterActions[] {
|
get actions(): ToasterActions[] {
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { KeycloakStatusService } from '../services/keycloak-status.service';
|
|||||||
templateUrl: './tenant-select.component.html',
|
templateUrl: './tenant-select.component.html',
|
||||||
styleUrls: ['./tenant-select.component.scss'],
|
styleUrls: ['./tenant-select.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class TenantSelectComponent {
|
export class TenantSelectComponent {
|
||||||
readonly #uiRoot = inject(UI_ROOT);
|
readonly #uiRoot = inject(UI_ROOT);
|
||||||
|
|||||||
@ -10,8 +10,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
|
||||||
host: { '[class.iqser-upload-file]': 'true' },
|
host: { '[class.iqser-upload-file]': 'true' },
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [DragDropFileUploadDirective, MatIcon, NgIf, TranslateModule]
|
||||||
imports: [DragDropFileUploadDirective, MatIcon, NgIf, TranslateModule],
|
|
||||||
})
|
})
|
||||||
export class UploadFileComponent {
|
export class UploadFileComponent {
|
||||||
@ViewChild('attachFileInput', { static: true }) attachFileInput!: ElementRef;
|
@ViewChild('attachFileInput', { static: true }) attachFileInput!: ElementRef;
|
||||||
|
|||||||
@ -1,21 +1,19 @@
|
|||||||
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
||||||
|
import { toSignal } from '@angular/core/rxjs-interop';
|
||||||
|
import { MatTooltip } from '@angular/material/tooltip';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { IqserUser } from '../../iqser-user.model';
|
import { IqserUser } from '../../iqser-user.model';
|
||||||
|
import { NamePipe } from '../../name.pipe';
|
||||||
import { IqserUserService } from '../../services/iqser-user.service';
|
import { IqserUserService } from '../../services/iqser-user.service';
|
||||||
import { NamePipeOptions } from '../../types/name-pipe-options';
|
import { NamePipeOptions } from '../../types/name-pipe-options';
|
||||||
import { IIqserUser } from '../../types/user.response';
|
import { IIqserUser } from '../../types/user.response';
|
||||||
import { NgIf } from '@angular/common';
|
|
||||||
import { NamePipe } from '../../name.pipe';
|
|
||||||
import { MatTooltip } from '@angular/material/tooltip';
|
|
||||||
import { toSignal } from '@angular/core/rxjs-interop';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'iqser-initials-avatar',
|
selector: 'iqser-initials-avatar',
|
||||||
templateUrl: './initials-avatar.component.html',
|
templateUrl: './initials-avatar.component.html',
|
||||||
styleUrls: ['./initials-avatar.component.scss'],
|
styleUrls: ['./initials-avatar.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
imports: [NamePipe, MatTooltip],
|
||||||
imports: [NgIf, NamePipe, MatTooltip],
|
|
||||||
})
|
})
|
||||||
export class InitialsAvatarComponent<
|
export class InitialsAvatarComponent<
|
||||||
Interface extends IIqserUser = IIqserUser,
|
Interface extends IIqserUser = IIqserUser,
|
||||||
@ -23,9 +21,7 @@ export class InitialsAvatarComponent<
|
|||||||
> {
|
> {
|
||||||
readonly #userService = inject<IqserUserService<Interface, Class>>(IqserUserService);
|
readonly #userService = inject<IqserUserService<Interface, Class>>(IqserUserService);
|
||||||
readonly #translateService = inject(TranslateService);
|
readonly #translateService = inject(TranslateService);
|
||||||
readonly #isSystemUser = computed(() => this._user()?.id?.toLowerCase() === 'system');
|
|
||||||
readonly #users = toSignal(this.#userService.all$);
|
readonly #users = toSignal(this.#userService.all$);
|
||||||
|
|
||||||
readonly color = input('lightgray');
|
readonly color = input('lightgray');
|
||||||
readonly size = input<'small' | 'large'>('small');
|
readonly size = input<'small' | 'large'>('small');
|
||||||
readonly withName = input(false);
|
readonly withName = input(false);
|
||||||
@ -35,7 +31,6 @@ export class InitialsAvatarComponent<
|
|||||||
readonly showTooltip = input(true);
|
readonly showTooltip = input(true);
|
||||||
readonly user = input.required<Class | string>();
|
readonly user = input.required<Class | string>();
|
||||||
readonly showBorderCondition = input<<T extends Class = Class>(user: T) => boolean>(user => user.isSpecial);
|
readonly showBorderCondition = input<<T extends Class = Class>(user: T) => boolean>(user => user.isSpecial);
|
||||||
|
|
||||||
readonly _user = computed(() => {
|
readonly _user = computed(() => {
|
||||||
const user = this.user();
|
const user = this.user();
|
||||||
if (typeof user === 'string') {
|
if (typeof user === 'string') {
|
||||||
@ -45,6 +40,7 @@ export class InitialsAvatarComponent<
|
|||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
});
|
});
|
||||||
|
readonly #isSystemUser = computed(() => this._user()?.id?.toLowerCase() === 'system');
|
||||||
readonly isCurrentUser = computed(() => this.#userService.currentUser?.id === this._user()?.id);
|
readonly isCurrentUser = computed(() => this.#userService.currentUser?.id === this._user()?.id);
|
||||||
readonly hasBorder = computed(() => !!this._user() && !this.isCurrentUser() && this.showBorderCondition()(this._user()!));
|
readonly hasBorder = computed(() => !!this._user() && !this.isCurrentUser() && this.showBorderCondition()(this._user()!));
|
||||||
readonly disabled = computed(() => !!this._user() && !this.#isSystemUser() && !this._user()?.hasAnyRole);
|
readonly disabled = computed(() => !!this._user() && !this.#isSystemUser() && !this._user()?.hasAnyRole);
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { IqserUserService } from '../../services/iqser-user.service';
|
|||||||
templateUrl: './user-button.component.html',
|
templateUrl: './user-button.component.html',
|
||||||
styleUrls: ['./user-button.component.scss'],
|
styleUrls: ['./user-button.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
standalone: false
|
||||||
})
|
})
|
||||||
export class UserButtonComponent {
|
export class UserButtonComponent {
|
||||||
@Input() showDot = false;
|
@Input() showDot = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user