@jm-7c3/common-lib 21.1.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -5
- package/fesm2022/jm-7c3-common-lib.mjs +550 -117
- package/fesm2022/jm-7c3-common-lib.mjs.map +1 -1
- package/jm-7c3-common-lib-22.1.0.tgz +0 -0
- package/package.json +5 -3
- package/types/jm-7c3-common-lib.d.ts +230 -98
- package/jm-7c3-common-lib-21.1.0.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, signal, effect, ChangeDetectionStrategy, Component, Injectable, inject, Inject, ChangeDetectorRef, viewChild, ViewContainerRef, output, InjectionToken,
|
|
2
|
+
import { input, signal, effect, ChangeDetectionStrategy, Component, Injectable, inject, Inject, ChangeDetectorRef, viewChild, ViewContainerRef, Service, Directive, output, InjectionToken, contentChild, computed, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from 'primeng/button';
|
|
4
4
|
import { ButtonModule } from 'primeng/button';
|
|
5
5
|
import * as i2 from 'primeng/api';
|
|
@@ -8,29 +8,42 @@ import * as i1$1 from 'primeng/confirmdialog';
|
|
|
8
8
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
9
9
|
import { toObservable } from '@angular/core/rxjs-interop';
|
|
10
10
|
import { signalState, patchState } from '@ngrx/signals';
|
|
11
|
-
import { filter, map, Subscription, concatWith, toArray } from 'rxjs';
|
|
11
|
+
import { filter, map, Subject, takeUntil, Subscription, concatWith, toArray } from 'rxjs';
|
|
12
12
|
import * as i1$2 from '@angular/common';
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
14
14
|
import { DynamicDialogConfig, DynamicDialogRef, DialogService, DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
15
15
|
import * as i2$2 from '@angular/forms';
|
|
16
16
|
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormControl, Validators, FormArray, NG_VALIDATORS, FormControlName } from '@angular/forms';
|
|
17
|
-
import * as i1$3 from '
|
|
17
|
+
import * as i1$3 from '@angular/material/dialog';
|
|
18
|
+
import { MAT_DIALOG_DATA, MatDialogModule, MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
19
|
+
import * as i1$4 from '@angular/material/button';
|
|
20
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
21
|
+
import * as i1$5 from 'primeng/dialog';
|
|
18
22
|
import { DialogModule } from 'primeng/dialog';
|
|
19
23
|
import * as i2$1 from 'primeng/progressbar';
|
|
20
24
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
21
|
-
import * as i1$
|
|
25
|
+
import * as i1$6 from 'primeng/toast';
|
|
22
26
|
import { ToastModule } from 'primeng/toast';
|
|
23
27
|
import { cloneDeep } from 'lodash-es';
|
|
24
28
|
import { v4 } from 'uuid';
|
|
29
|
+
import * as i2$3 from '@angular/material/icon';
|
|
30
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
25
31
|
|
|
26
32
|
class ButtonComponent {
|
|
27
|
-
color = input('primary',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
color = input('primary', /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
35
|
+
disabled = input(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
37
|
+
icon = input(/* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
39
|
+
label = input(/* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
41
|
+
loading = input(false, /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
43
|
+
type = input('button', /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
45
|
+
buttonClass = signal('', /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []));
|
|
34
47
|
constructor() {
|
|
35
48
|
effect(() => {
|
|
36
49
|
switch (this.color()) {
|
|
@@ -52,10 +65,10 @@ class ButtonComponent {
|
|
|
52
65
|
}
|
|
53
66
|
});
|
|
54
67
|
}
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: ButtonComponent, isStandalone: true, selector: "cl-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button [class]=\"buttonClass()\" [disabled]=\"disabled()\" [icon]=\"icon()!\" [label]=\"label()!\" [loading]=\"loading()\" pButton\n [type]=\"type()\">\n</button>\n", styles: [".p-button-text.p-button-info{text-decoration:underline}.p-button-text.p-button-info:not(:disabled):hover{background:none!important}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
70
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
59
72
|
type: Component,
|
|
60
73
|
args: [{ selector: 'cl-button', imports: [
|
|
61
74
|
ButtonModule
|
|
@@ -75,10 +88,10 @@ class ClStateService {
|
|
|
75
88
|
updateStateMessage(stateMessage) {
|
|
76
89
|
patchState(this.state, { stateMessage });
|
|
77
90
|
}
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
79
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ClStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
92
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ClStateService, providedIn: 'root' });
|
|
80
93
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ClStateService, decorators: [{
|
|
82
95
|
type: Injectable,
|
|
83
96
|
args: [{
|
|
84
97
|
providedIn: 'root'
|
|
@@ -89,8 +102,10 @@ class ConfirmationComponent {
|
|
|
89
102
|
env;
|
|
90
103
|
clStateService = inject(ClStateService);
|
|
91
104
|
confirmationService = inject(ConfirmationService$1);
|
|
92
|
-
acceptLabel = signal('Accept',
|
|
93
|
-
|
|
105
|
+
acceptLabel = signal('Accept', /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "acceptLabel" }] : /* istanbul ignore next */ []));
|
|
107
|
+
cancelLabel = signal('Cancel', /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
|
|
94
109
|
constructor(env) {
|
|
95
110
|
this.env = env;
|
|
96
111
|
const confirmationConfig = this.env?.commonLib?.confirmation;
|
|
@@ -133,10 +148,10 @@ class ConfirmationComponent {
|
|
|
133
148
|
},
|
|
134
149
|
});
|
|
135
150
|
}
|
|
136
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmationComponent, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Component });
|
|
152
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: ConfirmationComponent, isStandalone: true, selector: "cl-confirmation", ngImport: i0, template: "<p-confirmDialog #general key=\"general\">\n <ng-template pTemplate=\"footer\">\n <cl-button class=\"mr-2\" (click)=\"general.onAccept()\" color=\"primary\" icon=\"pi pi-check\" [label]=\"acceptLabel()\" />\n <cl-button (click)=\"general.onReject()\" color=\"secondary\" icon=\"pi pi-times\" [label]=\"cancelLabel()\" />\n </ng-template>\n</p-confirmDialog>\n\n<p-confirmDialog icon=\"pi pi-exclamation-triangle\" key=\"general-warning\" #warning>\n <ng-template pTemplate=\"footer\">\n <cl-button class=\"mr-2\" (click)=\"warning.onAccept()\" color=\"primary\" icon=\"pi pi-check\" [label]=\"acceptLabel()\" />\n <cl-button (click)=\"warning.onReject()\" color=\"secondary\" icon=\"pi pi-times\" [label]=\"cancelLabel()\" />\n </ng-template>\n</p-confirmDialog>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "cl-button", inputs: ["color", "disabled", "icon", "label", "loading", "type"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i1$1.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
138
153
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmationComponent, decorators: [{
|
|
140
155
|
type: Component,
|
|
141
156
|
args: [{ selector: 'cl-confirmation', imports: [
|
|
142
157
|
ButtonComponent,
|
|
@@ -173,10 +188,10 @@ class ConfirmationService {
|
|
|
173
188
|
onCancel(key) {
|
|
174
189
|
return this.clStateService.onStateMessage('confirmation-cancel').pipe(filter(message => message?.key === key), map(() => null));
|
|
175
190
|
}
|
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
177
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
191
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
192
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
|
|
178
193
|
}
|
|
179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ConfirmationService, decorators: [{
|
|
180
195
|
type: Injectable,
|
|
181
196
|
args: [{
|
|
182
197
|
providedIn: 'root'
|
|
@@ -187,9 +202,12 @@ class ContentDialogComponent {
|
|
|
187
202
|
env;
|
|
188
203
|
dialogConfig = inject(DynamicDialogConfig);
|
|
189
204
|
dialogRef = inject(DynamicDialogRef);
|
|
190
|
-
component = signal(null,
|
|
191
|
-
|
|
192
|
-
|
|
205
|
+
component = signal(null, /* @ts-ignore */
|
|
206
|
+
...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
207
|
+
closeLabel = signal('Close', /* @ts-ignore */
|
|
208
|
+
...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
|
|
209
|
+
header = signal('', /* @ts-ignore */
|
|
210
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
193
211
|
constructor(env) {
|
|
194
212
|
this.env = env;
|
|
195
213
|
const contentDialogConfig = this.env?.commonLib?.contentDialog;
|
|
@@ -217,10 +235,10 @@ class ContentDialogComponent {
|
|
|
217
235
|
onClose() {
|
|
218
236
|
this.dialogRef.close();
|
|
219
237
|
}
|
|
220
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
221
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
238
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentDialogComponent, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Component });
|
|
239
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ContentDialogComponent, isStandalone: true, selector: "cl-content-dialog", ngImport: i0, template: "@if (component()) {\n <ng-container *ngComponentOutlet=\"component()\" />\n}\n\n<div class=\"text-right\">\n <cl-button (click)=\"onClose()\" color=\"secondary\" [label]=\"closeLabel()\" />\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "cl-button", inputs: ["color", "disabled", "icon", "label", "loading", "type"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
222
240
|
}
|
|
223
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentDialogComponent, decorators: [{
|
|
224
242
|
type: Component,
|
|
225
243
|
args: [{ selector: 'cl-content-dialog', imports: [
|
|
226
244
|
ButtonComponent,
|
|
@@ -254,10 +272,10 @@ class ContentDialogService {
|
|
|
254
272
|
});
|
|
255
273
|
});
|
|
256
274
|
}
|
|
257
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
258
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
275
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
276
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentDialogService, providedIn: 'root' });
|
|
259
277
|
}
|
|
260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentDialogService, decorators: [{
|
|
261
279
|
type: Injectable,
|
|
262
280
|
args: [{
|
|
263
281
|
providedIn: 'root'
|
|
@@ -270,11 +288,16 @@ class FormDialogComponent {
|
|
|
270
288
|
dialogConfig = inject(DynamicDialogConfig);
|
|
271
289
|
dialogRef = inject(DynamicDialogRef);
|
|
272
290
|
formContainer = viewChild('formContainer', { ...(ngDevMode ? { debugName: "formContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
273
|
-
cancelLabel = signal('Cancel',
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
291
|
+
cancelLabel = signal('Cancel', /* @ts-ignore */
|
|
292
|
+
...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
|
|
293
|
+
form = signal(null, /* @ts-ignore */
|
|
294
|
+
...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
295
|
+
header = signal('', /* @ts-ignore */
|
|
296
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
297
|
+
hideSubmitButton = signal(false, /* @ts-ignore */
|
|
298
|
+
...(ngDevMode ? [{ debugName: "hideSubmitButton" }] : /* istanbul ignore next */ []));
|
|
299
|
+
submitLabel = signal('Submit', /* @ts-ignore */
|
|
300
|
+
...(ngDevMode ? [{ debugName: "submitLabel" }] : /* istanbul ignore next */ []));
|
|
278
301
|
constructor(env) {
|
|
279
302
|
this.env = env;
|
|
280
303
|
const formDialogConfig = this.env?.commonLib?.formDialog;
|
|
@@ -321,10 +344,10 @@ class FormDialogComponent {
|
|
|
321
344
|
this.dialogRef.close(this.form().value);
|
|
322
345
|
}
|
|
323
346
|
}
|
|
324
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
325
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormDialogComponent, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Component });
|
|
348
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FormDialogComponent, isStandalone: true, selector: "cl-form-dialog", viewQueries: [{ propertyName: "formContainer", first: true, predicate: ["formContainer"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<h2>{{ header() }}</h2>\n\n<div class=\"mb-2\">\n <ng-container #formContainer />\n</div>\n\n@if (form()) {\n <div class=\"text-right\">\n @if (!hideSubmitButton()) {\n <cl-button class=\"mr-2\" (click)=\"onSubmit()\" color=\"main\" [disabled]=\"form()!.invalid || form()!.pristine\"\n [label]=\"submitLabel()\" />\n }\n\n <cl-button (click)=\"onCancel()\" color=\"secondary\" [label]=\"cancelLabel()\" />\n </div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "cl-button", inputs: ["color", "disabled", "icon", "label", "loading", "type"] }, { kind: "ngmodule", type: DynamicDialogModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
326
349
|
}
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormDialogComponent, decorators: [{
|
|
328
351
|
type: Component,
|
|
329
352
|
args: [{ selector: 'cl-form-dialog', imports: [
|
|
330
353
|
ButtonComponent,
|
|
@@ -373,10 +396,10 @@ class FormDialogService {
|
|
|
373
396
|
}
|
|
374
397
|
});
|
|
375
398
|
}
|
|
376
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
377
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
400
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormDialogService, providedIn: 'root' });
|
|
378
401
|
}
|
|
379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormDialogService, decorators: [{
|
|
380
403
|
type: Injectable,
|
|
381
404
|
args: [{
|
|
382
405
|
providedIn: 'root'
|
|
@@ -384,12 +407,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
384
407
|
}] });
|
|
385
408
|
|
|
386
409
|
class IconButtonComponent {
|
|
387
|
-
disabled = input(false,
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
410
|
+
disabled = input(false, /* @ts-ignore */
|
|
411
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
412
|
+
icon = input.required(/* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
414
|
+
loading = input(false, /* @ts-ignore */
|
|
415
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
416
|
+
severity = input('', /* @ts-ignore */
|
|
417
|
+
...(ngDevMode ? [{ debugName: "severity" }] : /* istanbul ignore next */ []));
|
|
418
|
+
type = input('button', /* @ts-ignore */
|
|
419
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
420
|
+
class = signal('p-button-icon-only p-button-text', /* @ts-ignore */
|
|
421
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
393
422
|
constructor() {
|
|
394
423
|
effect(() => {
|
|
395
424
|
this.updateClass(this.severity());
|
|
@@ -398,16 +427,147 @@ class IconButtonComponent {
|
|
|
398
427
|
updateClass(severity) {
|
|
399
428
|
this.class.update(value => value + ' p-button-' + severity);
|
|
400
429
|
}
|
|
401
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
402
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
430
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
431
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: IconButtonComponent, isStandalone: true, selector: "cl-icon-button", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button [class]=\"class()\" [disabled]=\"disabled()\" [icon]=\"icon()\" [loading]=\"loading()\" pButton [type]=\"type()\">\n</button>\n", styles: ["button{border-radius:25px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
403
432
|
}
|
|
404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconButtonComponent, decorators: [{
|
|
405
434
|
type: Component,
|
|
406
435
|
args: [{ selector: 'cl-icon-button', imports: [
|
|
407
436
|
ButtonModule,
|
|
408
437
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button [class]=\"class()\" [disabled]=\"disabled()\" [icon]=\"icon()\" [loading]=\"loading()\" pButton [type]=\"type()\">\n</button>\n", styles: ["button{border-radius:25px}\n"] }]
|
|
409
438
|
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
410
439
|
|
|
440
|
+
class MatConfirmationComponent {
|
|
441
|
+
data = inject(MAT_DIALOG_DATA);
|
|
442
|
+
contentHost = viewChild.required('contentHost', { read: ViewContainerRef });
|
|
443
|
+
title = signal('', /* @ts-ignore */
|
|
444
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
445
|
+
message = signal(undefined, /* @ts-ignore */
|
|
446
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
447
|
+
acceptButtonLabel = signal('Accept', /* @ts-ignore */
|
|
448
|
+
...(ngDevMode ? [{ debugName: "acceptButtonLabel" }] : /* istanbul ignore next */ []));
|
|
449
|
+
cancelButtonLabel = signal('Cancel', /* @ts-ignore */
|
|
450
|
+
...(ngDevMode ? [{ debugName: "cancelButtonLabel" }] : /* istanbul ignore next */ []));
|
|
451
|
+
ngAfterViewInit() {
|
|
452
|
+
const { acceptButtonLabel, cancelButtonLabel, component, message, title } = this.data;
|
|
453
|
+
this.acceptButtonLabel.set(acceptButtonLabel || 'Accept');
|
|
454
|
+
this.cancelButtonLabel.set(cancelButtonLabel || 'Cancel');
|
|
455
|
+
this.title.set(title ?? '');
|
|
456
|
+
if (component) {
|
|
457
|
+
this.contentHost().clear();
|
|
458
|
+
const componentRef = this.contentHost().createComponent(component);
|
|
459
|
+
Object.assign(componentRef.instance ?? {}, this.data.componentData);
|
|
460
|
+
}
|
|
461
|
+
else if (message) {
|
|
462
|
+
this.message.set(message);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatConfirmationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
466
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MatConfirmationComponent, isStandalone: true, selector: "cl-mat-confirmation", viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<h2 mat-dialog-title>{{ title() }}</h2>\n\n<mat-dialog-content>\n @if (message()) {\n <p>{{ message() }}</p>\n }\n <ng-template #contentHost />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">\n {{ cancelButtonLabel() }}\n </button>\n <button mat-flat-button color=\"primary\" [mat-dialog-close]=\"true\">\n {{ acceptButtonLabel() }}\n </button>\n</mat-dialog-actions>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] });
|
|
467
|
+
}
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatConfirmationComponent, decorators: [{
|
|
469
|
+
type: Component,
|
|
470
|
+
args: [{ selector: 'cl-mat-confirmation', standalone: true, imports: [CommonModule, MatDialogModule, MatButtonModule], template: "<h2 mat-dialog-title>{{ title() }}</h2>\n\n<mat-dialog-content>\n @if (message()) {\n <p>{{ message() }}</p>\n }\n <ng-template #contentHost />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"false\">\n {{ cancelButtonLabel() }}\n </button>\n <button mat-flat-button color=\"primary\" [mat-dialog-close]=\"true\">\n {{ acceptButtonLabel() }}\n </button>\n</mat-dialog-actions>" }]
|
|
471
|
+
}], propDecorators: { contentHost: [{ type: i0.ViewChild, args: ['contentHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
472
|
+
|
|
473
|
+
class MatConfirmationService {
|
|
474
|
+
dialog = inject(MatDialog);
|
|
475
|
+
confirm(data, width = '400px') {
|
|
476
|
+
const dialogRef = this.dialog.open(MatConfirmationComponent, {
|
|
477
|
+
data,
|
|
478
|
+
width,
|
|
479
|
+
disableClose: true,
|
|
480
|
+
});
|
|
481
|
+
return dialogRef.afterClosed().pipe(map((result) => result ?? false));
|
|
482
|
+
}
|
|
483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
484
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.5", ngImport: i0, type: MatConfirmationService });
|
|
485
|
+
}
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatConfirmationService, decorators: [{
|
|
487
|
+
type: Service
|
|
488
|
+
}] });
|
|
489
|
+
|
|
490
|
+
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
491
|
+
class MatFormHostableComponent {
|
|
492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFormHostableComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
493
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: MatFormHostableComponent, isStandalone: true, ngImport: i0 });
|
|
494
|
+
}
|
|
495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFormHostableComponent, decorators: [{
|
|
496
|
+
type: Directive
|
|
497
|
+
}] });
|
|
498
|
+
class MatFormDialogComponent {
|
|
499
|
+
data = inject(MAT_DIALOG_DATA);
|
|
500
|
+
dialogRef = inject((MatDialogRef));
|
|
501
|
+
formHost = viewChild.required('formHost', { read: ViewContainerRef });
|
|
502
|
+
actionsAlign = signal('end', /* @ts-ignore */
|
|
503
|
+
...(ngDevMode ? [{ debugName: "actionsAlign" }] : /* istanbul ignore next */ []));
|
|
504
|
+
cancelButtonLabel = signal('Cancel', /* @ts-ignore */
|
|
505
|
+
...(ngDevMode ? [{ debugName: "cancelButtonLabel" }] : /* istanbul ignore next */ []));
|
|
506
|
+
submitButtonLabel = signal('Submit', /* @ts-ignore */
|
|
507
|
+
...(ngDevMode ? [{ debugName: "submitButtonLabel" }] : /* istanbul ignore next */ []));
|
|
508
|
+
isFormValid = signal(false, /* @ts-ignore */
|
|
509
|
+
...(ngDevMode ? [{ debugName: "isFormValid" }] : /* istanbul ignore next */ []));
|
|
510
|
+
hostedComponentRef;
|
|
511
|
+
destroy$ = new Subject();
|
|
512
|
+
title = signal('', /* @ts-ignore */
|
|
513
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
514
|
+
ngAfterViewInit() {
|
|
515
|
+
const { component, dialogTitle, formDialogConfig, formValue } = this.data;
|
|
516
|
+
this.formHost().clear();
|
|
517
|
+
const componentRef = this.formHost().createComponent(component);
|
|
518
|
+
this.hostedComponentRef = componentRef.instance;
|
|
519
|
+
this.title.set(dialogTitle);
|
|
520
|
+
if (formDialogConfig) {
|
|
521
|
+
this.actionsAlign.set(formDialogConfig.actionsAlign || 'end');
|
|
522
|
+
this.cancelButtonLabel.set(formDialogConfig.cancelButtonLabel || 'Cancel');
|
|
523
|
+
this.submitButtonLabel.set(formDialogConfig.submitButtonLabel || 'Submit');
|
|
524
|
+
}
|
|
525
|
+
if (formValue) {
|
|
526
|
+
this.hostedComponentRef.form.patchValue(formValue);
|
|
527
|
+
}
|
|
528
|
+
this.hostedComponentRef?.form.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(status => {
|
|
529
|
+
this.isFormValid.set(status === 'VALID');
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
ngOnDestroy() {
|
|
533
|
+
this.destroy$.next();
|
|
534
|
+
this.destroy$.complete();
|
|
535
|
+
}
|
|
536
|
+
onSubmit() {
|
|
537
|
+
this.dialogRef.close(this.hostedComponentRef?.form.value);
|
|
538
|
+
}
|
|
539
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFormDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
540
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: MatFormDialogComponent, isStandalone: true, selector: "cl-mat-form-dialog", viewQueries: [{ propertyName: "formHost", first: true, predicate: ["formHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<h2 mat-dialog-title>\n {{ title() }}\n</h2>\n\n<mat-dialog-content>\n <ng-template #formHost />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"undefined\" type=\"button\">\n {{ cancelButtonLabel() }}\n </button>\n <button mat-flat-button color=\"primary\" [disabled]=\"!isFormValid()\" (click)=\"onSubmit()\" type=\"button\">\n {{ submitButtonLabel() }}\n </button>\n</mat-dialog-actions>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
|
|
541
|
+
}
|
|
542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFormDialogComponent, decorators: [{
|
|
543
|
+
type: Component,
|
|
544
|
+
args: [{ selector: 'cl-mat-form-dialog', imports: [
|
|
545
|
+
MatButtonModule,
|
|
546
|
+
MatDialogModule,
|
|
547
|
+
], template: "<h2 mat-dialog-title>\n {{ title() }}\n</h2>\n\n<mat-dialog-content>\n <ng-template #formHost />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-button [mat-dialog-close]=\"undefined\" type=\"button\">\n {{ cancelButtonLabel() }}\n </button>\n <button mat-flat-button color=\"primary\" [disabled]=\"!isFormValid()\" (click)=\"onSubmit()\" type=\"button\">\n {{ submitButtonLabel() }}\n </button>\n</mat-dialog-actions>\n", styles: [":host{display:block}\n"] }]
|
|
548
|
+
}], propDecorators: { formHost: [{ type: i0.ViewChild, args: ['formHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
|
|
549
|
+
|
|
550
|
+
class MatFormDialogService {
|
|
551
|
+
dialog = inject(MatDialog);
|
|
552
|
+
open(component, dialogTitle, data) {
|
|
553
|
+
const dialogRef = this.dialog.open(MatFormDialogComponent, {
|
|
554
|
+
...data?.matDialogConfig,
|
|
555
|
+
data: {
|
|
556
|
+
component,
|
|
557
|
+
dialogTitle,
|
|
558
|
+
formValue: data?.formValue,
|
|
559
|
+
formDialogConfig: data?.formDialogConfig
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
return dialogRef.afterClosed();
|
|
563
|
+
}
|
|
564
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFormDialogService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
565
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.5", ngImport: i0, type: MatFormDialogService });
|
|
566
|
+
}
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFormDialogService, decorators: [{
|
|
568
|
+
type: Service
|
|
569
|
+
}] });
|
|
570
|
+
|
|
411
571
|
class ProgressBarDialogComponent {
|
|
412
572
|
cdRef = inject(ChangeDetectorRef);
|
|
413
573
|
clStateService = inject(ClStateService);
|
|
@@ -426,10 +586,10 @@ class ProgressBarDialogComponent {
|
|
|
426
586
|
}
|
|
427
587
|
});
|
|
428
588
|
}
|
|
429
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
430
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
589
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ProgressBarDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
590
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: ProgressBarDialogComponent, isStandalone: true, selector: "cl-progress-bar-dialog", ngImport: i0, template: "<p-dialog [closable]=\"false\" [closeOnEscape]=\"false\" [draggable]=\"false\" [modal]=\"true\" [resizable]=\"false\"\n [showHeader]=\"true\" styleClass=\"w-4\" [(visible)]=\"visible\">\n <p-progressBar mode=\"indeterminate\" />\n</p-dialog>\n", styles: [":host ::ng-deep p-dialog .p-dialog-header{padding:1rem}\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$5.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i2$1.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
431
591
|
}
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ProgressBarDialogComponent, decorators: [{
|
|
433
593
|
type: Component,
|
|
434
594
|
args: [{ selector: 'cl-progress-bar-dialog', imports: [
|
|
435
595
|
DialogModule,
|
|
@@ -449,10 +609,10 @@ class ProgressBarDialogService {
|
|
|
449
609
|
type: 'progess-bar-dialog-open'
|
|
450
610
|
});
|
|
451
611
|
}
|
|
452
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
453
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
612
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ProgressBarDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
613
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ProgressBarDialogService, providedIn: 'root' });
|
|
454
614
|
}
|
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ProgressBarDialogService, decorators: [{
|
|
456
616
|
type: Injectable,
|
|
457
617
|
args: [{
|
|
458
618
|
providedIn: 'root'
|
|
@@ -460,12 +620,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
460
620
|
}] });
|
|
461
621
|
|
|
462
622
|
class ReadonlyValueComponent {
|
|
463
|
-
label = input(
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
623
|
+
label = input(/* @ts-ignore */
|
|
624
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
625
|
+
value = input(/* @ts-ignore */
|
|
626
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
627
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ReadonlyValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
628
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: ReadonlyValueComponent, isStandalone: true, selector: "cl-readonly-value", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div>\n <strong>{{ label() }}</strong>\n <div>{{ value() }}</div>\n</div>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
467
629
|
}
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ReadonlyValueComponent, decorators: [{
|
|
469
631
|
type: Component,
|
|
470
632
|
args: [{ selector: 'cl-readonly-value', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <strong>{{ label() }}</strong>\n <div>{{ value() }}</div>\n</div>\n" }]
|
|
471
633
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
@@ -491,10 +653,10 @@ class ToastsComponent {
|
|
|
491
653
|
this.messageService.add(message);
|
|
492
654
|
});
|
|
493
655
|
}
|
|
494
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
495
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
656
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
657
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: ToastsComponent, isStandalone: true, selector: "cl-toasts", ngImport: i0, template: "<p-toast key=\"general\" position=\"bottom-center\" />\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i1$6.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
496
658
|
}
|
|
497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastsComponent, decorators: [{
|
|
498
660
|
type: Component,
|
|
499
661
|
args: [{ selector: 'cl-toasts', imports: [
|
|
500
662
|
ToastModule,
|
|
@@ -533,10 +695,10 @@ class ToastsService {
|
|
|
533
695
|
type: 'toast'
|
|
534
696
|
});
|
|
535
697
|
}
|
|
536
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
537
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
699
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastsService, providedIn: 'root' });
|
|
538
700
|
}
|
|
539
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToastsService, decorators: [{
|
|
540
702
|
type: Injectable,
|
|
541
703
|
args: [{
|
|
542
704
|
providedIn: 'root'
|
|
@@ -545,7 +707,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
545
707
|
|
|
546
708
|
class BaseFormComponent {
|
|
547
709
|
control = this.getForm();
|
|
548
|
-
disabled = signal(false,
|
|
710
|
+
disabled = signal(false, /* @ts-ignore */
|
|
711
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
549
712
|
subscription = new Subscription();
|
|
550
713
|
ngOnDestroy() {
|
|
551
714
|
this.subscription.unsubscribe();
|
|
@@ -602,25 +765,34 @@ class BaseFormComponent {
|
|
|
602
765
|
get formGroup() {
|
|
603
766
|
return this.control;
|
|
604
767
|
}
|
|
605
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
606
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: BaseFormComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
607
770
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormComponent, decorators: [{
|
|
609
772
|
type: Component,
|
|
610
773
|
args: [{ imports: [], template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
611
774
|
}] });
|
|
612
775
|
|
|
613
776
|
class FileInputComponent {
|
|
614
|
-
directory = input('',
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
777
|
+
directory = input('', /* @ts-ignore */
|
|
778
|
+
...(ngDevMode ? [{ debugName: "directory" }] : /* istanbul ignore next */ []));
|
|
779
|
+
icon = input('pi pi-plus', /* @ts-ignore */
|
|
780
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
781
|
+
label = input('Browse', /* @ts-ignore */
|
|
782
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
783
|
+
readonly = input(false, /* @ts-ignore */
|
|
784
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
618
785
|
onDownloadEmitter = output({ alias: 'onDownload' });
|
|
619
|
-
fileInput = viewChild('fileInput',
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
786
|
+
fileInput = viewChild('fileInput', /* @ts-ignore */
|
|
787
|
+
...(ngDevMode ? [{ debugName: "fileInput" }] : /* istanbul ignore next */ []));
|
|
788
|
+
fileName = signal('', /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
|
|
790
|
+
isDisabled = signal(false, /* @ts-ignore */
|
|
791
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
792
|
+
isFileSelected = signal(false, /* @ts-ignore */
|
|
793
|
+
...(ngDevMode ? [{ debugName: "isFileSelected" }] : /* istanbul ignore next */ []));
|
|
794
|
+
value = signal(null, /* @ts-ignore */
|
|
795
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
624
796
|
// ControlValueAccessor interface methods
|
|
625
797
|
registerOnChange(fn) {
|
|
626
798
|
this.onChange = fn;
|
|
@@ -729,8 +901,8 @@ class FileInputComponent {
|
|
|
729
901
|
this.onChange(value);
|
|
730
902
|
this.onTouched();
|
|
731
903
|
}
|
|
732
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
733
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FileInputComponent, isStandalone: true, selector: "cl-file-input", inputs: { directory: { classPropertyName: "directory", publicName: "directory", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDownloadEmitter: "onDownload" }, providers: [
|
|
734
906
|
{
|
|
735
907
|
multi: true,
|
|
736
908
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -738,7 +910,7 @@ class FileInputComponent {
|
|
|
738
910
|
}
|
|
739
911
|
], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<input type=\"hidden\" [value]=\"value()\" />\n<input (change)=\"onFileSelected($event)\" class=\"file-input\" #fileInput type=\"file\" />\n\n@if (isFileSelected()) {\n @if (readonly()) {\n <button class=\"link-button\" (click)=\"onDownload()\" type=\"button\">\n {{ fileName() }}\n </button>\n } @else {\n <div class=\"flex\">\n <cl-button class=\"mr-3\" [label]=\"fileName()\" />\n <button class=\"p-button-danger p-button-rounded p-button-text\" (click)=\"onDelete()\" [disabled]=\"isDisabled()\"\n icon=\"pi pi-trash\" pButton type=\"button\">\n </button>\n </div>\n }\n} @else {\n <cl-button (click)=\"onClick()\" [disabled]=\"isDisabled()\" [icon]=\"icon()\" [label]=\"label()\" />\n}\n\n", styles: [".file-input{display:none}.link-button{background:none!important;border:none;padding:0!important;color:#069;text-decoration:underline;cursor:pointer}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "cl-button", inputs: ["color", "disabled", "icon", "label", "loading", "type"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
740
912
|
}
|
|
741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileInputComponent, decorators: [{
|
|
742
914
|
type: Component,
|
|
743
915
|
args: [{ selector: 'cl-file-input', imports: [
|
|
744
916
|
ButtonComponent,
|
|
@@ -755,11 +927,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
755
927
|
|
|
756
928
|
class FileInputsComponent extends BaseFormComponent {
|
|
757
929
|
cdRef = inject(ChangeDetectorRef);
|
|
758
|
-
directory = input('',
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
930
|
+
directory = input('', /* @ts-ignore */
|
|
931
|
+
...(ngDevMode ? [{ debugName: "directory" }] : /* istanbul ignore next */ []));
|
|
932
|
+
icon = input('pi pi-plus', /* @ts-ignore */
|
|
933
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
934
|
+
label = input('Browse', /* @ts-ignore */
|
|
935
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
936
|
+
max = input(5, /* @ts-ignore */
|
|
937
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
938
|
+
readonly = input(false, /* @ts-ignore */
|
|
939
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
763
940
|
onDownloadEmitter = output({ alias: 'onDownload' });
|
|
764
941
|
onAdd() {
|
|
765
942
|
this.formArray.push(new FormControl());
|
|
@@ -815,8 +992,8 @@ class FileInputsComponent extends BaseFormComponent {
|
|
|
815
992
|
getForm() {
|
|
816
993
|
return new FormArray([]);
|
|
817
994
|
}
|
|
818
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
819
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
995
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileInputsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
996
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FileInputsComponent, isStandalone: true, selector: "cl-file-inputs", inputs: { directory: { classPropertyName: "directory", publicName: "directory", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDownloadEmitter: "onDownload" }, providers: [
|
|
820
997
|
{
|
|
821
998
|
multi: true,
|
|
822
999
|
provide: NG_VALIDATORS,
|
|
@@ -829,7 +1006,7 @@ class FileInputsComponent extends BaseFormComponent {
|
|
|
829
1006
|
}
|
|
830
1007
|
], usesInheritance: true, ngImport: i0, template: "<ng-container [formGroup]=\"formGroup\">\n @for (item of formArray.value; track index; let index = $index) {\n <div class=\"flex mb-3\">\n <cl-file-input [formControlName]=\"index\" [directory]=\"directory()\" [icon]=\"icon()\" [label]=\"label()\"\n (onDownload)=\"onDownload($event)\" [readonly]=\"readonly()\" />\n @if (!readonly()) {\n @if (index === 0) {\n <button class=\"p-button-rounded p-button-text\" (click)=\"onAdd()\" [disabled]=\"formArray.length >= max()\"\n icon=\"pi pi-plus\" pButton type=\"button\">\n </button>\n } @else if (index > 0) {\n <button class=\"p-button-rounded p-button-text\" (click)=\"onDelete(index)\" icon=\"pi pi-minus\" pButton\n type=\"button\">\n </button>\n }\n }\n </div>\n }\n</ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: FileInputComponent, selector: "cl-file-input", inputs: ["directory", "icon", "label", "readonly"], outputs: ["onDownload"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
831
1008
|
}
|
|
832
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1009
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileInputsComponent, decorators: [{
|
|
833
1010
|
type: Component,
|
|
834
1011
|
args: [{ selector: 'cl-file-inputs', imports: [
|
|
835
1012
|
ButtonModule,
|
|
@@ -852,12 +1029,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
852
1029
|
|
|
853
1030
|
const ERROR_DIRECTIVE = new InjectionToken('ErrorDirective');
|
|
854
1031
|
class ErrorDirective {
|
|
855
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
856
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1032
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1033
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: ErrorDirective, isStandalone: true, selector: "ff-error", providers: [
|
|
857
1034
|
{ provide: ERROR_DIRECTIVE, useExisting: ErrorDirective }
|
|
858
1035
|
], ngImport: i0 });
|
|
859
1036
|
}
|
|
860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ErrorDirective, decorators: [{
|
|
861
1038
|
type: Directive,
|
|
862
1039
|
args: [{
|
|
863
1040
|
selector: 'ff-error',
|
|
@@ -870,28 +1047,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
870
1047
|
|
|
871
1048
|
const FORM_FIELD = new InjectionToken('FormFieldComponent');
|
|
872
1049
|
class FormFieldComponent {
|
|
873
|
-
control = contentChild(FormControlName,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1050
|
+
control = contentChild(FormControlName, /* @ts-ignore */
|
|
1051
|
+
...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
1052
|
+
isRequired = computed(() => this.control()?.control.hasValidator(Validators.required) ?? false, /* @ts-ignore */
|
|
1053
|
+
...(ngDevMode ? [{ debugName: "isRequired" }] : /* istanbul ignore next */ []));
|
|
1054
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1055
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FormFieldComponent, isStandalone: true, selector: "cl-form-field", providers: [
|
|
877
1056
|
{ provide: FORM_FIELD, useExisting: FormFieldComponent }
|
|
878
|
-
], queries: [{ propertyName: "control", first: true, predicate: FormControlName, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"field\">\n <label class=\"block\" [class.required]=\"isRequired()\">\n <ng-content select=\"ff-label\" />\n </label>\n <div>\n <ng-content />\n </div>\n @if ((control()?.dirty || control()?.touched) && control()?.errors) {\n <small class=\"p-block p-error\">\n <ng-content select=\"ff-error\" />\n </small>\n }\n</div>\n", styles: [""], encapsulation: i0.ViewEncapsulation.None });
|
|
1057
|
+
], queries: [{ propertyName: "control", first: true, predicate: FormControlName, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"field\">\n <label class=\"block\" [class.required]=\"isRequired()\">\n <ng-content select=\"ff-label\" />\n </label>\n <div>\n <ng-content />\n </div>\n @if ((control()?.dirty || control()?.touched) && control()?.errors) {\n <small class=\"p-block p-error\">\n <ng-content select=\"ff-error\" />\n </small>\n }\n</div>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
|
|
879
1058
|
}
|
|
880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1059
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
881
1060
|
type: Component,
|
|
882
|
-
args: [{ selector: 'cl-form-field', imports: [], encapsulation: ViewEncapsulation.None, providers: [
|
|
1061
|
+
args: [{ selector: 'cl-form-field', imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Eager, providers: [
|
|
883
1062
|
{ provide: FORM_FIELD, useExisting: FormFieldComponent }
|
|
884
1063
|
], template: "<div class=\"field\">\n <label class=\"block\" [class.required]=\"isRequired()\">\n <ng-content select=\"ff-label\" />\n </label>\n <div>\n <ng-content />\n </div>\n @if ((control()?.dirty || control()?.touched) && control()?.errors) {\n <small class=\"p-block p-error\">\n <ng-content select=\"ff-error\" />\n </small>\n }\n</div>\n" }]
|
|
885
1064
|
}], propDecorators: { control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FormControlName), { isSignal: true }] }] } });
|
|
886
1065
|
|
|
887
1066
|
const LABEL_DIRECTIVE = new InjectionToken('LabelDirective');
|
|
888
1067
|
class LabelDirective {
|
|
889
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
890
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1068
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1069
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: LabelDirective, isStandalone: true, selector: "ff-label", providers: [
|
|
891
1070
|
{ provide: LABEL_DIRECTIVE, useExisting: LabelDirective }
|
|
892
1071
|
], ngImport: i0 });
|
|
893
1072
|
}
|
|
894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LabelDirective, decorators: [{
|
|
895
1074
|
type: Directive,
|
|
896
1075
|
args: [{
|
|
897
1076
|
selector: 'ff-label',
|
|
@@ -903,15 +1082,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
903
1082
|
}] });
|
|
904
1083
|
|
|
905
1084
|
class FormFieldModule {
|
|
906
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
907
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1085
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1086
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: FormFieldModule, imports: [ErrorDirective,
|
|
908
1087
|
FormFieldComponent,
|
|
909
1088
|
LabelDirective], exports: [ErrorDirective,
|
|
910
1089
|
FormFieldComponent,
|
|
911
1090
|
LabelDirective] });
|
|
912
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1091
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldModule });
|
|
913
1092
|
}
|
|
914
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldModule, decorators: [{
|
|
915
1094
|
type: NgModule,
|
|
916
1095
|
args: [{
|
|
917
1096
|
exports: [
|
|
@@ -927,19 +1106,273 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
927
1106
|
}]
|
|
928
1107
|
}] });
|
|
929
1108
|
|
|
1109
|
+
class MatFileInputComponent {
|
|
1110
|
+
directory = input('', /* @ts-ignore */
|
|
1111
|
+
...(ngDevMode ? [{ debugName: "directory" }] : /* istanbul ignore next */ []));
|
|
1112
|
+
icon = input('add', /* @ts-ignore */
|
|
1113
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1114
|
+
label = input('Browse', /* @ts-ignore */
|
|
1115
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1116
|
+
readonly = input(false, /* @ts-ignore */
|
|
1117
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
1118
|
+
onDownloadEmitter = output({ alias: 'onDownload' });
|
|
1119
|
+
fileInput = viewChild('fileInput', /* @ts-ignore */
|
|
1120
|
+
...(ngDevMode ? [{ debugName: "fileInput" }] : /* istanbul ignore next */ []));
|
|
1121
|
+
fileName = signal('', /* @ts-ignore */
|
|
1122
|
+
...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
|
|
1123
|
+
isDisabled = signal(false, /* @ts-ignore */
|
|
1124
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1125
|
+
isFileSelected = signal(false, /* @ts-ignore */
|
|
1126
|
+
...(ngDevMode ? [{ debugName: "isFileSelected" }] : /* istanbul ignore next */ []));
|
|
1127
|
+
value = signal(null, /* @ts-ignore */
|
|
1128
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1129
|
+
// ControlValueAccessor interface methods
|
|
1130
|
+
registerOnChange(fn) {
|
|
1131
|
+
this.onChange = fn;
|
|
1132
|
+
}
|
|
1133
|
+
registerOnTouched(fn) {
|
|
1134
|
+
this.onTouched = fn;
|
|
1135
|
+
}
|
|
1136
|
+
setDisabledState(isDisabled) {
|
|
1137
|
+
setTimeout(() => {
|
|
1138
|
+
this.isDisabled.set(isDisabled);
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
writeValue(value = null) {
|
|
1142
|
+
let newValue = [];
|
|
1143
|
+
if (Array.isArray(value)) {
|
|
1144
|
+
newValue = cloneDeep(value);
|
|
1145
|
+
this.selectFile(newValue[0]);
|
|
1146
|
+
}
|
|
1147
|
+
else if (typeof value === 'string') {
|
|
1148
|
+
const hash = this.getHashFromFileName(value);
|
|
1149
|
+
const file = {
|
|
1150
|
+
isNew: !value,
|
|
1151
|
+
hash,
|
|
1152
|
+
name: value,
|
|
1153
|
+
path: this.directory(),
|
|
1154
|
+
toDelete: false,
|
|
1155
|
+
};
|
|
1156
|
+
newValue.push(file);
|
|
1157
|
+
this.selectFile(file);
|
|
1158
|
+
}
|
|
1159
|
+
this.setValue(newValue);
|
|
1160
|
+
}
|
|
1161
|
+
// Custom public methods
|
|
1162
|
+
onClick() {
|
|
1163
|
+
this.fileInput()?.nativeElement.click();
|
|
1164
|
+
this.onTouched();
|
|
1165
|
+
}
|
|
1166
|
+
onFileSelected(event) {
|
|
1167
|
+
const file = event.target.files[0];
|
|
1168
|
+
if (file) {
|
|
1169
|
+
const { extension, name } = this.getFileNameParts(file.name);
|
|
1170
|
+
const hash = v4().split('-')[0];
|
|
1171
|
+
const newFile = {
|
|
1172
|
+
file,
|
|
1173
|
+
hash,
|
|
1174
|
+
isNew: true,
|
|
1175
|
+
name: `${name}.${hash}.${extension}`,
|
|
1176
|
+
path: this.directory(),
|
|
1177
|
+
toDelete: false,
|
|
1178
|
+
};
|
|
1179
|
+
const newValue = [...(this.value() ?? [])];
|
|
1180
|
+
newValue.push(newFile);
|
|
1181
|
+
this.selectFile(newFile);
|
|
1182
|
+
this.setValue(newValue);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
onDelete() {
|
|
1186
|
+
const newValue = [...(this.value() ?? [])];
|
|
1187
|
+
const file = this.getLastFile(newValue);
|
|
1188
|
+
if (file) {
|
|
1189
|
+
if (file.isNew) {
|
|
1190
|
+
newValue.pop();
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
file.toDelete = true;
|
|
1194
|
+
}
|
|
1195
|
+
this.fileName.set('');
|
|
1196
|
+
this.isFileSelected.set(false);
|
|
1197
|
+
this.setValue(newValue);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
onDownload() {
|
|
1201
|
+
this.onDownloadEmitter.emit(this.value());
|
|
1202
|
+
}
|
|
1203
|
+
// Custom private methods
|
|
1204
|
+
getFileNameParts(fileName) {
|
|
1205
|
+
const lastDotIndex = fileName.lastIndexOf('.');
|
|
1206
|
+
if (lastDotIndex === -1) {
|
|
1207
|
+
return { name: fileName, extension: '' };
|
|
1208
|
+
}
|
|
1209
|
+
return {
|
|
1210
|
+
name: fileName.substring(0, lastDotIndex),
|
|
1211
|
+
extension: fileName.substring(lastDotIndex + 1),
|
|
1212
|
+
};
|
|
1213
|
+
}
|
|
1214
|
+
getHashFromFileName(fileName) {
|
|
1215
|
+
const parts = fileName.split('.');
|
|
1216
|
+
// Assumes format is name.hash.extension
|
|
1217
|
+
return parts.length > 2 ? parts[parts.length - 2] : '';
|
|
1218
|
+
}
|
|
1219
|
+
getLastFile(value) {
|
|
1220
|
+
return value.length > 0 ? value[value.length - 1] : undefined;
|
|
1221
|
+
}
|
|
1222
|
+
getSafeFileName(file) {
|
|
1223
|
+
const { name, extension } = this.getFileNameParts(file.name);
|
|
1224
|
+
const hash = this.getHashFromFileName(file.name);
|
|
1225
|
+
const fileName = name.replace(`.${hash}`, '');
|
|
1226
|
+
return `${decodeURIComponent(fileName)}.${extension}`;
|
|
1227
|
+
}
|
|
1228
|
+
onChange = (value) => { };
|
|
1229
|
+
onTouched = () => { };
|
|
1230
|
+
selectFile(file) {
|
|
1231
|
+
const safeFileName = this.getSafeFileName(file);
|
|
1232
|
+
this.fileName.set(safeFileName);
|
|
1233
|
+
this.isFileSelected.set(true);
|
|
1234
|
+
}
|
|
1235
|
+
setValue(value) {
|
|
1236
|
+
this.value.set(value);
|
|
1237
|
+
this.onChange(value);
|
|
1238
|
+
this.onTouched();
|
|
1239
|
+
}
|
|
1240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MatFileInputComponent, isStandalone: true, selector: "cl-mat-file-input", inputs: { directory: { classPropertyName: "directory", publicName: "directory", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDownloadEmitter: "onDownload" }, providers: [
|
|
1242
|
+
{
|
|
1243
|
+
multi: true,
|
|
1244
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1245
|
+
useExisting: MatFileInputComponent,
|
|
1246
|
+
},
|
|
1247
|
+
], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"file-input-container\">\n <input\n #fileInput\n (change)=\"onFileSelected($event)\"\n [disabled]=\"isDisabled()\"\n class=\"file-input\"\n hidden\n type=\"file\"\n />\n\n @if (isFileSelected()) {\n <div class=\"file-details\">\n <span class=\"file-name\" (click)=\"onDownload()\">{{ fileName() }}</span>\n <button mat-icon-button (click)=\"onDelete()\" [disabled]=\"isDisabled() || readonly()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n } @else {\n <button mat-raised-button (click)=\"onClick()\" [disabled]=\"isDisabled() || readonly()\">\n <mat-icon>{{ icon() }}</mat-icon>\n <span>{{ label() }}</span>\n </button>\n }\n</div>", styles: [":host .file-input-container{display:flex;align-items:center}:host .file-details{display:flex;align-items:center;gap:8px}:host .file-name{cursor:pointer;text-decoration:underline;color:#00f}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1248
|
+
}
|
|
1249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFileInputComponent, decorators: [{
|
|
1250
|
+
type: Component,
|
|
1251
|
+
args: [{ selector: 'cl-mat-file-input', standalone: true, imports: [FormsModule, MatButtonModule, MatIconModule], providers: [
|
|
1252
|
+
{
|
|
1253
|
+
multi: true,
|
|
1254
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1255
|
+
useExisting: MatFileInputComponent,
|
|
1256
|
+
},
|
|
1257
|
+
], template: "<div class=\"file-input-container\">\n <input\n #fileInput\n (change)=\"onFileSelected($event)\"\n [disabled]=\"isDisabled()\"\n class=\"file-input\"\n hidden\n type=\"file\"\n />\n\n @if (isFileSelected()) {\n <div class=\"file-details\">\n <span class=\"file-name\" (click)=\"onDownload()\">{{ fileName() }}</span>\n <button mat-icon-button (click)=\"onDelete()\" [disabled]=\"isDisabled() || readonly()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n } @else {\n <button mat-raised-button (click)=\"onClick()\" [disabled]=\"isDisabled() || readonly()\">\n <mat-icon>{{ icon() }}</mat-icon>\n <span>{{ label() }}</span>\n </button>\n }\n</div>", styles: [":host .file-input-container{display:flex;align-items:center}:host .file-details{display:flex;align-items:center;gap:8px}:host .file-name{cursor:pointer;text-decoration:underline;color:#00f}\n"] }]
|
|
1258
|
+
}], propDecorators: { directory: [{ type: i0.Input, args: [{ isSignal: true, alias: "directory", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], onDownloadEmitter: [{ type: i0.Output, args: ["onDownload"] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
|
|
1259
|
+
|
|
1260
|
+
class MatFileInputsComponent extends BaseFormComponent {
|
|
1261
|
+
cdRef = inject(ChangeDetectorRef);
|
|
1262
|
+
directory = input('', /* @ts-ignore */
|
|
1263
|
+
...(ngDevMode ? [{ debugName: "directory" }] : /* istanbul ignore next */ []));
|
|
1264
|
+
icon = input('add', /* @ts-ignore */
|
|
1265
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1266
|
+
label = input('Browse', /* @ts-ignore */
|
|
1267
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1268
|
+
max = input(5, /* @ts-ignore */
|
|
1269
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
1270
|
+
readonly = input(false, /* @ts-ignore */
|
|
1271
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
1272
|
+
onDownloadEmitter = output({ alias: 'onDownload' });
|
|
1273
|
+
onAdd() {
|
|
1274
|
+
this.formArray.push(new FormControl());
|
|
1275
|
+
this.cdRef.markForCheck();
|
|
1276
|
+
}
|
|
1277
|
+
onDelete(index) {
|
|
1278
|
+
this.formArray.removeAt(index);
|
|
1279
|
+
this.cdRef.markForCheck();
|
|
1280
|
+
}
|
|
1281
|
+
onDownload(file) {
|
|
1282
|
+
this.onDownloadEmitter.emit(file);
|
|
1283
|
+
}
|
|
1284
|
+
setDisabledState(isDisabled) {
|
|
1285
|
+
for (const control of this.formArray.controls) {
|
|
1286
|
+
if (isDisabled) {
|
|
1287
|
+
control.disable();
|
|
1288
|
+
}
|
|
1289
|
+
else {
|
|
1290
|
+
control.enable();
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
validate(control) {
|
|
1295
|
+
if (control?.hasValidator(Validators.required) && Array.isArray(control?.value)) {
|
|
1296
|
+
const first = control.value[0];
|
|
1297
|
+
if (!(typeof first === 'string' ||
|
|
1298
|
+
(Array.isArray(first) && first.some(({ toDelete }) => toDelete === false)))) {
|
|
1299
|
+
return {
|
|
1300
|
+
required: true
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
return null;
|
|
1305
|
+
}
|
|
1306
|
+
writeValue(value) {
|
|
1307
|
+
if (Array.isArray(value)) {
|
|
1308
|
+
setTimeout(() => {
|
|
1309
|
+
if (value.length === 0) {
|
|
1310
|
+
this.onAdd();
|
|
1311
|
+
}
|
|
1312
|
+
else {
|
|
1313
|
+
for (let i = 0, j = value.length; i < j; i++) {
|
|
1314
|
+
this.onAdd();
|
|
1315
|
+
}
|
|
1316
|
+
this.setValue(value);
|
|
1317
|
+
}
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
else if (!this.readonly()) {
|
|
1321
|
+
this.onAdd();
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
getForm() {
|
|
1325
|
+
return new FormArray([]);
|
|
1326
|
+
}
|
|
1327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFileInputsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1328
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: MatFileInputsComponent, isStandalone: true, selector: "cl-mat-file-inputs", inputs: { directory: { classPropertyName: "directory", publicName: "directory", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDownloadEmitter: "onDownload" }, providers: [
|
|
1329
|
+
{
|
|
1330
|
+
multi: true,
|
|
1331
|
+
provide: NG_VALIDATORS,
|
|
1332
|
+
useExisting: MatFileInputsComponent
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
multi: true,
|
|
1336
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1337
|
+
useExisting: MatFileInputsComponent
|
|
1338
|
+
}
|
|
1339
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-container [formGroup]=\"formGroup\">\n @for (item of formArray.value; track index; let index = $index) {\n <div class=\"flex mb-3\">\n <cl-mat-file-input [formControlName]=\"index\" [directory]=\"directory()\" [icon]=\"icon()\" [label]=\"label()\"\n (onDownload)=\"onDownload($event)\" [readonly]=\"readonly()\" />\n @if (!readonly()) {\n @if (index === 0) {\n <button (click)=\"onAdd()\" [disabled]=\"formArray.length >= max()\" mat-icon-button type=\"button\">\n <mat-icon>{{ icon() }}</mat-icon>\n </button>\n } @else if (index > 0) {\n <button (click)=\"onDelete(index)\" mat-icon-button type=\"button\">\n <mat-icon>remove</mat-icon>\n </button>\n }\n }\n </div>\n }\n</ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatFileInputComponent, selector: "cl-mat-file-input", inputs: ["directory", "icon", "label", "readonly"], outputs: ["onDownload"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1340
|
+
}
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MatFileInputsComponent, decorators: [{
|
|
1342
|
+
type: Component,
|
|
1343
|
+
args: [{ selector: 'cl-mat-file-inputs', imports: [
|
|
1344
|
+
MatButtonModule,
|
|
1345
|
+
MatFileInputComponent,
|
|
1346
|
+
MatIconModule,
|
|
1347
|
+
FormsModule,
|
|
1348
|
+
ReactiveFormsModule,
|
|
1349
|
+
], providers: [
|
|
1350
|
+
{
|
|
1351
|
+
multi: true,
|
|
1352
|
+
provide: NG_VALIDATORS,
|
|
1353
|
+
useExisting: MatFileInputsComponent
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
multi: true,
|
|
1357
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1358
|
+
useExisting: MatFileInputsComponent
|
|
1359
|
+
}
|
|
1360
|
+
], template: "<ng-container [formGroup]=\"formGroup\">\n @for (item of formArray.value; track index; let index = $index) {\n <div class=\"flex mb-3\">\n <cl-mat-file-input [formControlName]=\"index\" [directory]=\"directory()\" [icon]=\"icon()\" [label]=\"label()\"\n (onDownload)=\"onDownload($event)\" [readonly]=\"readonly()\" />\n @if (!readonly()) {\n @if (index === 0) {\n <button (click)=\"onAdd()\" [disabled]=\"formArray.length >= max()\" mat-icon-button type=\"button\">\n <mat-icon>{{ icon() }}</mat-icon>\n </button>\n } @else if (index > 0) {\n <button (click)=\"onDelete(index)\" mat-icon-button type=\"button\">\n <mat-icon>remove</mat-icon>\n </button>\n }\n }\n </div>\n }\n</ng-container>\n" }]
|
|
1361
|
+
}], propDecorators: { directory: [{ type: i0.Input, args: [{ isSignal: true, alias: "directory", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], onDownloadEmitter: [{ type: i0.Output, args: ["onDownload"] }] } });
|
|
1362
|
+
|
|
930
1363
|
;
|
|
931
1364
|
|
|
932
1365
|
class CommonLibModule {
|
|
933
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
934
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
935
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CommonLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1367
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: CommonLibModule });
|
|
1368
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CommonLibModule, providers: [
|
|
936
1369
|
ConfirmationService$1,
|
|
937
1370
|
DialogService,
|
|
938
1371
|
DynamicDialogConfig,
|
|
939
1372
|
MessageService,
|
|
940
1373
|
] });
|
|
941
1374
|
}
|
|
942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CommonLibModule, decorators: [{
|
|
943
1376
|
type: NgModule,
|
|
944
1377
|
args: [{
|
|
945
1378
|
providers: [
|
|
@@ -964,5 +1397,5 @@ function concatWithToArray(values) {
|
|
|
964
1397
|
* Generated bundle index. Do not edit.
|
|
965
1398
|
*/
|
|
966
1399
|
|
|
967
|
-
export { BaseFormComponent, ButtonComponent, ClStateService, CommonLibModule, ConfirmationComponent, ConfirmationService, ContentDialogComponent, ContentDialogService, ERROR_DIRECTIVE, ErrorDirective, FORM_FIELD, FileInputComponent, FileInputsComponent, FormDialogComponent, FormDialogService, FormFieldComponent, FormFieldModule, IconButtonComponent, LABEL_DIRECTIVE, LabelDirective, ProgressBarDialogComponent, ProgressBarDialogService, ReadonlyValueComponent, ToastsComponent, ToastsService, concatWithToArray };
|
|
1400
|
+
export { BaseFormComponent, ButtonComponent, ClStateService, CommonLibModule, ConfirmationComponent, ConfirmationService, ContentDialogComponent, ContentDialogService, ERROR_DIRECTIVE, ErrorDirective, FORM_FIELD, FileInputComponent, FileInputsComponent, FormDialogComponent, FormDialogService, FormFieldComponent, FormFieldModule, IconButtonComponent, LABEL_DIRECTIVE, LabelDirective, MatConfirmationComponent, MatConfirmationService, MatFileInputComponent, MatFileInputsComponent, MatFormDialogComponent, MatFormDialogService, MatFormHostableComponent, ProgressBarDialogComponent, ProgressBarDialogService, ReadonlyValueComponent, ToastsComponent, ToastsService, concatWithToArray };
|
|
968
1401
|
//# sourceMappingURL=jm-7c3-common-lib.mjs.map
|