removed some @Required()

This commit is contained in:
Dan Percic 2021-12-14 14:36:13 +02:00
parent e0de29cb68
commit 6bd54f11ab
4 changed files with 26 additions and 24 deletions

View File

@ -2,4 +2,5 @@
<span>{{ label }}</span>
<mat-icon class="chevron-icon" svgIcon="iqser:arrow-down"></mat-icon>
</button>
<div *ngIf="showDot" class="dot"></div>

View File

@ -1,14 +1,13 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { Required } from '../../utils';
@Component({
selector: 'iqser-chevron-button',
selector: 'iqser-chevron-button [label]',
templateUrl: './chevron-button.component.html',
styleUrls: ['./chevron-button.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ChevronButtonComponent {
@Input() @Required() label!: string;
@Input() label!: string;
@Input() showDot = false;
@Input() primary = false;
@Input() disabled = false;

View File

@ -1,10 +1,10 @@
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { MatTooltip } from '@angular/material/tooltip';
import { CircleButtonType, CircleButtonTypes } from '../types/circle-button.type';
import { IqserTooltipPosition, IqserTooltipPositions, Required } from '../../utils';
import { IqserTooltipPosition, IqserTooltipPositions } from '../../utils';
@Component({
selector: 'iqser-circle-button',
selector: 'iqser-circle-button [icon]',
templateUrl: './circle-button.component.html',
styleUrls: ['./circle-button.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
@ -12,7 +12,7 @@ import { IqserTooltipPosition, IqserTooltipPositions, Required } from '../../uti
export class CircleButtonComponent implements OnInit {
readonly circleButtonTypes = CircleButtonTypes;
@Input() @Required() icon!: string;
@Input() icon!: string;
@Input() tooltip?: string;
@Input() tooltipClass?: string;
@Input() showDot = false;

View File

@ -1,15 +1,15 @@
<ng-container *ngIf="column.entities | async as entities">
<div class="heading">
<span>{{ column.label | translate }} ({{entities.length || 0}})</span>
<span (click)="enableSelection()"
*ngIf="!activeSelection && !selectionColumn && entities.length > 1"
class="all-caps-label primary pointer"
translate="workflow.selection.select"></span>
<span>{{ column.label | translate }} ({{ entities.length || 0 }})</span>
<span
(click)="enableSelection()"
*ngIf="!activeSelection && !selectionColumn && entities.length > 1"
class="all-caps-label primary pointer"
translate="workflow.selection.select"
></span>
<div *ngIf="activeSelection" class="d-flex">
<span (click)="selectAll()" class="all-caps-label primary pointer mr-10"
translate="workflow.selection.all"></span>
<span (click)="selectNone()" class="all-caps-label primary pointer"
translate="workflow.selection.none"></span>
<span (click)="selectAll()" class="all-caps-label primary pointer mr-10" translate="workflow.selection.all"></span>
<span (click)="selectNone()" class="all-caps-label primary pointer" translate="workflow.selection.none"></span>
</div>
</div>
<div *ngIf="activeSelection" class="multi-select mb-8">
@ -21,19 +21,21 @@
type="with-bg"
></iqser-round-checkbox>
<span [translateParams]="{ count: listingService.selectedLength$ | async }" [translate]="'workflow.selection.count'"
class="all-caps-label"></span>
<span
[translateParams]="{ count: listingService.selectedLength$ | async }"
[translate]="'workflow.selection.count'"
class="all-caps-label"
></span>
</div>
<div #bulkActionsContainer class="flex-1 overflow-hidden">
<ng-container *ngIf="bulkActionsContainerWidth" [ngTemplateOutletContext]="{ maxWidth: bulkActionsContainerWidth }"
[ngTemplateOutlet]="bulkActions"></ng-container>
<ng-container
*ngIf="bulkActionsContainerWidth"
[ngTemplateOutletContext]="{ maxWidth: bulkActionsContainerWidth }"
[ngTemplateOutlet]="bulkActions"
></ng-container>
</div>
<iqser-circle-button
(action)="disableSelection()"
[type]="circleButtonTypes.primary"
icon="iqser:close"
></iqser-circle-button>
<iqser-circle-button (action)="disableSelection()" [type]="circleButtonTypes.primary" icon="iqser:close"></iqser-circle-button>
</div>
</ng-container>