8000 Update of packages · dynamic-forms/dynamic-forms@ab1f523 · GitHub
[go: up one dir, main page]

Skip to content

Commit ab1f523

Browse files
Update of packages
1 parent cb0fbc5 commit ab1f523
8000

File tree

11 files changed

+2512
-1400
lines changed

11 files changed

+2512
-1400
lines changed

apps/demo/src/app/layout/content/sidebar/sidebar-menu/sidebar-menu.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</mat-tree-node>
1515
<mat-nested-tree-node *matTreeNodeDef="let menuItem; when: hasChildren">
1616
<li class="mat-tree-node" [class.expanded]="treeControl.isExpanded(menuItem)">
17-
<button mat-button matTreeNodeToggle type="button" class="sidebar-menu-button" [attr.aria-label]="'toggle ' + menuItem.label">
17+
<button mat-button matTreeNodeToggle type="button" class="sidebar-menu-button" [attr.aria-label]="`toggle ${menuItem.label}`">
1818
<mat-icon class="mat-icon-rtl-mirror">{{ treeControl.isExpanded(menuItem) ? "expand_more" : "chevron_right" }}</mat-icon>
1919
<span>{{ menuItem.label }}</span>
2020
</button>

libs/bootstrap/src/lib/dynamic-form-action/dynamic-form-button/dynamic-form-button.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@if (template.url) {
22
<a
3-
[class]="'dynamic-form-button btn btn-' + (template.color | dynamicFormColor: 'primary')"
3+
[class]="`dynamic-form-button btn btn-${template.color | dynamicFormColor: 'primary'}`"
44
[class.disabled]="template.disabled"
55
[ngClass]="template.className"
66
[hidden]="template.hidden"
@@ -11,7 +11,7 @@
1111
} @else {
1212
<button
1313
[id]="id"
14-
[class]="'dynamic-form-button btn btn-' + (template.color | dynamicFormColor: 'primary')"
14+
[class]="`dynamic-form-button btn btn-${template.color | dynamicFormColor: 'primary'}`"
1515
[ngClass]="template.className"
1616
[type]="template.type || 'button'"
1717
[disabled]="template.disabled"

libs/bootstrap/src/lib/dynamic-form-action/dynamic-form-icon/dynamic-form-icon.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="dynamic-form-icon-wrapper" [ngClass]="template.classNameWrapper">
22
@if (template.url) {
33
<a
4-
[class]="'dynamic-form-icon btn btn-outline-' + (template.color | dynamicFormColor: 'primary')"
4+
[class]="`dynamic-form-icon btn btn-outline-${template.color | dynamicFormColor: 'primary'}`"
55
[class.disabled]="template.disabled"
66
[ngClass]="template.className"
77
[hidden]="template.hidden"
@@ -13,7 +13,7 @@
1313
} @else {
1414
<button
1515
[id]="id"
16-
[class]="'dynamic-form-icon btn btn-outline-' + (template.color | dynamicFormColor: 'primary')"
16+
[class]="`dynamic-form-icon btn btn-outline-${template.color | dynamicFormColor: 'primary'}`"
1717
[ngClass]="template.className"
1818
[type]="template.type || 'button'"
1919
[disabled]="template.disabled"

libs/bootstrap/src/lib/dynamic-form-input/dynamic-form-radio/dynamic-form-radio.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<input
44
class="form-check-input"
55
type="radio"
6-
[id]="inputId + '-' + $index"
6+
[id]="`${inputId}-${$index}`"
77
[name]="inputId"
88
[formControl]="control"
99
[value]="option.value"
1010
[attr.disabled]="control.disabled || option.disabled"
1111
[readonly]="readonly"
1212
/>
13-
<label class="form-check-label" [for]="inputId + '-' + $index">{{ option.label }}</label>
13+
<label class="form-check-label" [for]="`${inputId}-${$index}`">{{ option.label }}</label>
1414
</div>
1515
}

libs/bootstrap/src/lib/dynamic-form-input/dynamic-form-toggle/dynamic-form-toggle.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class="btn-check"
55
type="radio"
66
autocomplete="off"
7-
[id]="inputId + '-' + $index"
7+
[id]="`${inputId}-${$index}`"
88
[name]="inputId"
99
[formControl]="control"
1010
[value]="option.value"
@@ -13,7 +13,7 @@
1313
/>
1414
<label
1515
class="btn btn-outline-secondary"
16-
[for]="inputId + '-' + $index"
16+
[for]="`${inputId}-${$index}`"
1717
[class.disabled]="control.disabled || option.disabled"
1818
[class.active]="control.value === option.value"
1919
>{{ option.label }}</label

libs/core/src/lib/dynamic-form/dynamic-form.component.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
/* eslint-disable @angular-eslint/no-conflicting-lifecycle */
22
import { NgClass } from '@angular/common';
3-
import {
4-
Component,
5-
DoCheck,
6-
EventEmitter,
7-
Inject,
8-
Input,
9-
OnChanges,
10-
OnDestroy,
11-
OnInit,
12-
Optional,
13-
Output,
14-
SimpleChanges,
15-
} from '@angular/core';
3+
import { Component, DoCheck, Inject, Input, OnChanges, OnDestroy, OnInit, Optional, SimpleChanges, output } from '@angular/core';
164
import { ReactiveFormsModule } from '@angular/forms';
175
import { Subscription } from 'rxjs';
186
import { DynamicFormAction } from '../dynamic-form-action/dynamic-form-action';
@@ -42,8 +30,8 @@ export class DynamicFormComponent<Value extends Record<string, any> = any, Model
4230

4331
@Input() definition: DynamicFormDefinition;
4432
@Input() model: Model;
45-
@Output() readonly valueChange = new EventEmitter<Value>();
46-
@Output() readonly formSubmit = new EventEmitter<DynamicFormSubmit>();
33+
readonly valueChange = output<Value>();
34+
readonly formSubmit = output<DynamicFormSubmit>();
4735

4836
constructor(
4937
protected formBuilder: DynamicFormBuilder,

libs/material/src/lib/dynamic-form-dialog/dynamic-form-dialog.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import { NgClass } from '@angular/common';
22
import {
33
Component,
4-
EventEmitter,
54
Inject,
65
Input,
76
OnChanges,
87
OnDestroy,
98
OnInit,
109
Optional,
11-
Output,
1210
SimpleChanges,
1311
TemplateRef,
1412
ViewChild,
13+
output,
1514
} from '@angular/core';
1615
import { MatDialog, MatDialogConfig, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
1716
import { DYNAMIC_FORM_THEME, DynamicFormAction, DynamicFormElement, DynamicFormElementsComponent } from '@dynamic-forms/core';
@@ -54,7 +53,7 @@ export class MatDynamicFormDialogComponent implements OnInit, OnChanges, OnDestr
5453

5554
@Input() classNameTitle: string;
5655

57-
@Output() readonly escaped = new EventEmitter();
56+
readonly escaped = output();
5857

5958
constructor(
6059
private dialog: MatDialog,

libs/material/src/lib/dynamic-form-input/dynamic-form-radio/dynamic-form-radio.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
<mat-radio-group [formControl]="control">
1010
@for (option of input.options; track $index) {
11-
<mat-radio-button color="primary" [id]="inputId + '-' + $index" [value]="option.value" [disabled]="option.disabled">{{
11+
<mat-radio-button color="primary" [id]="`${inputId}-${$index}`" [value]="option.value" [disabled]="option.disabled">{{
1212
option.label
1313
}}</mat-radio-button>
1414
}

libs/material/src/lib/dynamic-form-input/dynamic-form-toggle/dynamic-form-toggle.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
>
1010
<mat-button-toggle-group [formControl]="control">
1111
@for (option of input.options; track $index) {
12-
<mat-button-toggle [id]="inputId + '-' + $index" [value]="option.value" [disabled]="option.disabled">{{
12+
<mat-button-t 480C oggle [id]="`${inputId}-${$index}`" [value]="option.value" [disabled]="option.disabled">{{
1313
option.label
1414
}}</mat-button-toggle>
1515
}

0 commit comments

Comments
 (0)
0