@meshmakers/shared-ui-legacy 3.3.390
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.
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Component, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/dialog';
|
|
4
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
5
|
+
import { firstValueFrom } from 'rxjs';
|
|
6
|
+
import * as i2 from '@angular/material/button';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import { IsoDateTime } from '@meshmakers/shared-services';
|
|
9
|
+
import { Validators } from '@angular/forms';
|
|
10
|
+
import * as i3 from '@angular/material/progress-bar';
|
|
11
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
12
|
+
|
|
13
|
+
var ButtonTypes;
|
|
14
|
+
(function (ButtonTypes) {
|
|
15
|
+
ButtonTypes[ButtonTypes["Ok"] = 0] = "Ok";
|
|
16
|
+
ButtonTypes[ButtonTypes["Cancel"] = 1] = "Cancel";
|
|
17
|
+
ButtonTypes[ButtonTypes["Yes"] = 2] = "Yes";
|
|
18
|
+
ButtonTypes[ButtonTypes["No"] = 3] = "No";
|
|
19
|
+
})(ButtonTypes || (ButtonTypes = {}));
|
|
20
|
+
var DialogType;
|
|
21
|
+
(function (DialogType) {
|
|
22
|
+
DialogType[DialogType["YesNo"] = 0] = "YesNo";
|
|
23
|
+
DialogType[DialogType["YesNoCancel"] = 1] = "YesNoCancel";
|
|
24
|
+
DialogType[DialogType["OkCancel"] = 2] = "OkCancel";
|
|
25
|
+
DialogType[DialogType["Ok"] = 3] = "Ok";
|
|
26
|
+
})(DialogType || (DialogType = {}));
|
|
27
|
+
class ConfirmationWindowResult {
|
|
28
|
+
result;
|
|
29
|
+
constructor(result) {
|
|
30
|
+
this.result = result;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class ConfirmationDialogComponent {
|
|
35
|
+
dialogRef = inject(MatDialogRef);
|
|
36
|
+
data = inject(MAT_DIALOG_DATA);
|
|
37
|
+
button1Text = 'OK';
|
|
38
|
+
button2Text = null;
|
|
39
|
+
button3Text = null;
|
|
40
|
+
button1Result = ButtonTypes.Ok;
|
|
41
|
+
button2Result = null;
|
|
42
|
+
button3Result = null;
|
|
43
|
+
ngOnInit() {
|
|
44
|
+
switch (this.data.dialogType) {
|
|
45
|
+
case DialogType.OkCancel:
|
|
46
|
+
this.button1Text = 'OK';
|
|
47
|
+
this.button1Result = ButtonTypes.Ok;
|
|
48
|
+
this.button2Text = 'Cancel';
|
|
49
|
+
this.button2Result = ButtonTypes.Cancel;
|
|
50
|
+
break;
|
|
51
|
+
case DialogType.YesNoCancel:
|
|
52
|
+
this.button1Text = 'Yes';
|
|
53
|
+
this.button1Result = ButtonTypes.Yes;
|
|
54
|
+
this.button2Text = 'No';
|
|
55
|
+
this.button2Result = ButtonTypes.No;
|
|
56
|
+
this.button3Text = 'Cancel';
|
|
57
|
+
this.button3Result = ButtonTypes.Cancel;
|
|
58
|
+
break;
|
|
59
|
+
case DialogType.Ok:
|
|
60
|
+
this.button1Text = 'OK';
|
|
61
|
+
this.button1Result = ButtonTypes.Ok;
|
|
62
|
+
break;
|
|
63
|
+
default: // YesNo
|
|
64
|
+
this.button1Text = 'Yes';
|
|
65
|
+
this.button1Result = ButtonTypes.Yes;
|
|
66
|
+
this.button2Text = 'No';
|
|
67
|
+
this.button2Result = ButtonTypes.No;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
onButton1() {
|
|
72
|
+
this.dialogRef.close(new ConfirmationWindowResult(this.button1Result));
|
|
73
|
+
}
|
|
74
|
+
onButton2() {
|
|
75
|
+
this.dialogRef.close(new ConfirmationWindowResult(this.button2Result));
|
|
76
|
+
}
|
|
77
|
+
onButton3() {
|
|
78
|
+
this.dialogRef.close(new ConfirmationWindowResult(this.button3Result));
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ConfirmationDialogComponent, isStandalone: true, selector: "mm-confirmation-dialog", ngImport: i0, template: `
|
|
82
|
+
<h2 mat-dialog-title>{{ data.title }}</h2>
|
|
83
|
+
<mat-dialog-content>{{ data.message }}</mat-dialog-content>
|
|
84
|
+
<mat-dialog-actions align="end">
|
|
85
|
+
<button mat-flat-button color="primary" (click)="onButton1()">{{ button1Text }}</button>
|
|
86
|
+
@if (button2Text) {
|
|
87
|
+
<button mat-stroked-button (click)="onButton2()">{{ button2Text }}</button>
|
|
88
|
+
}
|
|
89
|
+
@if (button3Text) {
|
|
90
|
+
<button mat-stroked-button (click)="onButton3()">{{ button3Text }}</button>
|
|
91
|
+
}
|
|
92
|
+
</mat-dialog-actions>
|
|
93
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.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"] }] });
|
|
94
|
+
}
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
96
|
+
type: Component,
|
|
97
|
+
args: [{
|
|
98
|
+
selector: 'mm-confirmation-dialog',
|
|
99
|
+
standalone: true,
|
|
100
|
+
imports: [MatDialogModule, MatButtonModule],
|
|
101
|
+
template: `
|
|
102
|
+
<h2 mat-dialog-title>{{ data.title }}</h2>
|
|
103
|
+
<mat-dialog-content>{{ data.message }}</mat-dialog-content>
|
|
104
|
+
<mat-dialog-actions align="end">
|
|
105
|
+
<button mat-flat-button color="primary" (click)="onButton1()">{{ button1Text }}</button>
|
|
106
|
+
@if (button2Text) {
|
|
107
|
+
<button mat-stroked-button (click)="onButton2()">{{ button2Text }}</button>
|
|
108
|
+
}
|
|
109
|
+
@if (button3Text) {
|
|
110
|
+
<button mat-stroked-button (click)="onButton3()">{{ button3Text }}</button>
|
|
111
|
+
}
|
|
112
|
+
</mat-dialog-actions>
|
|
113
|
+
`
|
|
114
|
+
}]
|
|
115
|
+
}] });
|
|
116
|
+
|
|
117
|
+
class ConfirmationService {
|
|
118
|
+
dialog = inject(MatDialog);
|
|
119
|
+
async showYesNoConfirmationDialog(title, message) {
|
|
120
|
+
const result = await this.openDialog(title, message, DialogType.YesNo);
|
|
121
|
+
if (result instanceof ConfirmationWindowResult) {
|
|
122
|
+
return result.result === ButtonTypes.Yes;
|
|
123
|
+
}
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
async showYesNoCancelConfirmationDialog(title, message) {
|
|
127
|
+
const result = await this.openDialog(title, message, DialogType.YesNoCancel);
|
|
128
|
+
if (result instanceof ConfirmationWindowResult) {
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
async showOkCancelConfirmationDialog(title, message) {
|
|
134
|
+
const result = await this.openDialog(title, message, DialogType.OkCancel);
|
|
135
|
+
if (result instanceof ConfirmationWindowResult) {
|
|
136
|
+
return result.result === ButtonTypes.Ok;
|
|
137
|
+
}
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
async showOkDialog(title, message) {
|
|
141
|
+
const result = await this.openDialog(title, message, DialogType.Ok);
|
|
142
|
+
if (result instanceof ConfirmationWindowResult) {
|
|
143
|
+
return result.result === ButtonTypes.Ok;
|
|
144
|
+
}
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
async openDialog(title, message, dialogType) {
|
|
148
|
+
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
|
149
|
+
data: { title, message, dialogType },
|
|
150
|
+
});
|
|
151
|
+
return firstValueFrom(dialogRef.afterClosed());
|
|
152
|
+
}
|
|
153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ConfirmationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
154
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ConfirmationService });
|
|
155
|
+
}
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ConfirmationService, decorators: [{
|
|
157
|
+
type: Injectable
|
|
158
|
+
}] });
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Backward-compatible MmSharedUiModule for legacy apps that use
|
|
162
|
+
* importProvidersFrom(MmSharedUiModule.forRoot()).
|
|
163
|
+
*
|
|
164
|
+
* Provides a Material-based ConfirmationService as a drop-in replacement
|
|
165
|
+
* for the Kendo-based version from @meshmakers/shared-ui.
|
|
166
|
+
*/
|
|
167
|
+
class MmSharedUiModule {
|
|
168
|
+
static forRoot() {
|
|
169
|
+
return {
|
|
170
|
+
ngModule: MmSharedUiModule,
|
|
171
|
+
providers: [
|
|
172
|
+
ConfirmationService,
|
|
173
|
+
]
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: MmSharedUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
177
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.5", ngImport: i0, type: MmSharedUiModule });
|
|
178
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: MmSharedUiModule });
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: MmSharedUiModule, decorators: [{
|
|
181
|
+
type: NgModule,
|
|
182
|
+
args: [{
|
|
183
|
+
declarations: [],
|
|
184
|
+
imports: [],
|
|
185
|
+
exports: []
|
|
186
|
+
}]
|
|
187
|
+
}] });
|
|
188
|
+
|
|
189
|
+
class AbstractDetailsComponent {
|
|
190
|
+
_loading;
|
|
191
|
+
_ownerForm;
|
|
192
|
+
_entity;
|
|
193
|
+
constructor(formGroup) {
|
|
194
|
+
this._loading = true;
|
|
195
|
+
this._entity = null;
|
|
196
|
+
this._ownerForm = formGroup;
|
|
197
|
+
}
|
|
198
|
+
get loading() {
|
|
199
|
+
return this._loading;
|
|
200
|
+
}
|
|
201
|
+
set loading(value) {
|
|
202
|
+
this._loading = value;
|
|
203
|
+
}
|
|
204
|
+
get entity() {
|
|
205
|
+
return this._entity;
|
|
206
|
+
}
|
|
207
|
+
set entity(value) {
|
|
208
|
+
this._entity = value;
|
|
209
|
+
}
|
|
210
|
+
get ownerForm() {
|
|
211
|
+
return this._ownerForm;
|
|
212
|
+
}
|
|
213
|
+
get isLoaded() {
|
|
214
|
+
return this._entity !== null;
|
|
215
|
+
}
|
|
216
|
+
hasError = (controlName, errorName) => {
|
|
217
|
+
return this.ownerForm?.controls[controlName].hasError(errorName);
|
|
218
|
+
};
|
|
219
|
+
hasFormError = (errorName) => {
|
|
220
|
+
return this.ownerForm?.hasError(errorName);
|
|
221
|
+
};
|
|
222
|
+
updateDateTime(controlName) {
|
|
223
|
+
this.ownerForm?.get(controlName)?.setValue(IsoDateTime.utcToLocalDateTimeIso(IsoDateTime.currentUtcDateTimeIso()));
|
|
224
|
+
}
|
|
225
|
+
copyInputMessage(inputElement) {
|
|
226
|
+
inputElement.select();
|
|
227
|
+
document.execCommand('copy');
|
|
228
|
+
inputElement.setSelectionRange(0, 0);
|
|
229
|
+
}
|
|
230
|
+
onProgressStarting() {
|
|
231
|
+
this._loading = true;
|
|
232
|
+
this.ownerForm?.disable();
|
|
233
|
+
this.ownerForm?.updateValueAndValidity();
|
|
234
|
+
}
|
|
235
|
+
onProgressCompleted() {
|
|
236
|
+
this.ownerForm?.enable();
|
|
237
|
+
this._loading = false;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Backward-compatible CommonValidators for legacy apps.
|
|
243
|
+
*/
|
|
244
|
+
class CommonValidators {
|
|
245
|
+
static phoneNumber() {
|
|
246
|
+
return Validators.pattern('^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$');
|
|
247
|
+
}
|
|
248
|
+
static httpUri() {
|
|
249
|
+
return Validators.pattern('^(http:\\/\\/|https:\\/\\/)([a-zA-Z0-9-_]+\\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+(\\.[a-zA-Z]{2,11}?)*(:[0-9]{2,5}){0,1}\\/{0,1}$');
|
|
250
|
+
}
|
|
251
|
+
static ensureSameValue(sourceControlName) {
|
|
252
|
+
return (control) => {
|
|
253
|
+
const value = control.value;
|
|
254
|
+
return value === control.parent?.get(sourceControlName)?.value ? null : { notSame: true };
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
static conditionalRequired(sourceControlName, sourceValueCompareExpression) {
|
|
258
|
+
return (control) => {
|
|
259
|
+
if (control.parent != null && sourceValueCompareExpression(control.parent.get(sourceControlName)?.value)) {
|
|
260
|
+
const val = control.value;
|
|
261
|
+
const isEmpty = val == null || (typeof val === 'string' && val.length === 0) || (Array.isArray(val) && val.length === 0);
|
|
262
|
+
return isEmpty ? { required: true } : null;
|
|
263
|
+
}
|
|
264
|
+
return null;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
static dependentControls(controlNames) {
|
|
268
|
+
return (control) => {
|
|
269
|
+
controlNames.forEach((controlName) => {
|
|
270
|
+
control.parent?.get(controlName)?.updateValueAndValidity();
|
|
271
|
+
});
|
|
272
|
+
return null;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
class ProgressValue {
|
|
278
|
+
statusText;
|
|
279
|
+
progressValue;
|
|
280
|
+
constructor() {
|
|
281
|
+
this.statusText = null;
|
|
282
|
+
this.progressValue = 0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
class ProgressWindowComponent {
|
|
287
|
+
dialogRef = inject(MatDialogRef);
|
|
288
|
+
data = inject(MAT_DIALOG_DATA);
|
|
289
|
+
progressSubscription;
|
|
290
|
+
isDeterminate;
|
|
291
|
+
isCancelOperationAvailable;
|
|
292
|
+
statusText = null;
|
|
293
|
+
progressPercent = 0;
|
|
294
|
+
constructor() {
|
|
295
|
+
this.isDeterminate = this.data.isDeterminate;
|
|
296
|
+
this.isCancelOperationAvailable = this.data.isCancelOperationAvailable;
|
|
297
|
+
}
|
|
298
|
+
ngAfterViewInit() {
|
|
299
|
+
if (this.data.progress) {
|
|
300
|
+
this.progressSubscription = this.data.progress.subscribe((value) => {
|
|
301
|
+
this.statusText = value.statusText;
|
|
302
|
+
this.progressPercent = value.progressValue;
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
ngOnDestroy() {
|
|
307
|
+
this.progressSubscription?.unsubscribe();
|
|
308
|
+
}
|
|
309
|
+
onCancelClick() {
|
|
310
|
+
if (this.data.cancelOperation) {
|
|
311
|
+
this.data.cancelOperation();
|
|
312
|
+
}
|
|
313
|
+
this.dialogRef.close();
|
|
314
|
+
}
|
|
315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ProgressWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: ProgressWindowComponent, isStandalone: true, selector: "mm-progress-window", ngImport: i0, template: `
|
|
317
|
+
<mat-dialog-content>
|
|
318
|
+
<div class="progress-section">
|
|
319
|
+
@if (isDeterminate) {
|
|
320
|
+
<mat-progress-bar mode="determinate" [value]="progressPercent"></mat-progress-bar>
|
|
321
|
+
} @else {
|
|
322
|
+
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
|
323
|
+
}
|
|
324
|
+
@if (statusText) {
|
|
325
|
+
<p class="status-text">{{ statusText }}</p>
|
|
326
|
+
}
|
|
327
|
+
</div>
|
|
328
|
+
</mat-dialog-content>
|
|
329
|
+
<mat-dialog-actions align="end">
|
|
330
|
+
@if (isCancelOperationAvailable) {
|
|
331
|
+
<button mat-stroked-button (click)="onCancelClick()">Cancel</button>
|
|
332
|
+
}
|
|
333
|
+
</mat-dialog-actions>
|
|
334
|
+
`, isInline: true, styles: [".progress-section{display:flex;flex-direction:column;gap:12px;min-width:350px}.status-text{margin:0;font-size:14px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.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: MatProgressBarModule }, { kind: "component", type: i3.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
|
|
335
|
+
}
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ProgressWindowComponent, decorators: [{
|
|
337
|
+
type: Component,
|
|
338
|
+
args: [{ selector: 'mm-progress-window', standalone: true, imports: [MatDialogModule, MatButtonModule, MatProgressBarModule], template: `
|
|
339
|
+
<mat-dialog-content>
|
|
340
|
+
<div class="progress-section">
|
|
341
|
+
@if (isDeterminate) {
|
|
342
|
+
<mat-progress-bar mode="determinate" [value]="progressPercent"></mat-progress-bar>
|
|
343
|
+
} @else {
|
|
344
|
+
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
|
345
|
+
}
|
|
346
|
+
@if (statusText) {
|
|
347
|
+
<p class="status-text">{{ statusText }}</p>
|
|
348
|
+
}
|
|
349
|
+
</div>
|
|
350
|
+
</mat-dialog-content>
|
|
351
|
+
<mat-dialog-actions align="end">
|
|
352
|
+
@if (isCancelOperationAvailable) {
|
|
353
|
+
<button mat-stroked-button (click)="onCancelClick()">Cancel</button>
|
|
354
|
+
}
|
|
355
|
+
</mat-dialog-actions>
|
|
356
|
+
`, styles: [".progress-section{display:flex;flex-direction:column;gap:12px;min-width:350px}.status-text{margin:0;font-size:14px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
357
|
+
}], ctorParameters: () => [] });
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Reference returned by showProgress methods.
|
|
361
|
+
* Provides a close() method compatible with the Kendo DialogRef API.
|
|
362
|
+
*/
|
|
363
|
+
class ProgressDialogRef {
|
|
364
|
+
dialogRef;
|
|
365
|
+
constructor(dialogRef) {
|
|
366
|
+
this.dialogRef = dialogRef;
|
|
367
|
+
}
|
|
368
|
+
close() {
|
|
369
|
+
this.dialogRef.close();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
class ProgressWindowService {
|
|
373
|
+
dialog = inject(MatDialog);
|
|
374
|
+
showProgress(config) {
|
|
375
|
+
const dialogRef = this.dialog.open(ProgressWindowComponent, {
|
|
376
|
+
data: {
|
|
377
|
+
isDeterminate: config.isDeterminate !== false,
|
|
378
|
+
progress: config.progress,
|
|
379
|
+
isCancelOperationAvailable: config.isCancelOperationAvailable || false,
|
|
380
|
+
cancelOperation: config.cancelOperation || (() => { }),
|
|
381
|
+
},
|
|
382
|
+
width: config.width ? `${config.width}px` : '450px',
|
|
383
|
+
disableClose: true,
|
|
384
|
+
});
|
|
385
|
+
if (config.title) {
|
|
386
|
+
// MatDialog doesn't have a built-in title on the ref, but we set it via the component
|
|
387
|
+
}
|
|
388
|
+
return new ProgressDialogRef(dialogRef);
|
|
389
|
+
}
|
|
390
|
+
showDeterminateProgress(title, progress, options) {
|
|
391
|
+
return this.showProgress({
|
|
392
|
+
title,
|
|
393
|
+
isDeterminate: true,
|
|
394
|
+
progress,
|
|
395
|
+
...options
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
showIndeterminateProgress(title, progress, options) {
|
|
399
|
+
return this.showProgress({
|
|
400
|
+
title,
|
|
401
|
+
isDeterminate: false,
|
|
402
|
+
progress,
|
|
403
|
+
...options
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ProgressWindowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
407
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ProgressWindowService });
|
|
408
|
+
}
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ProgressWindowService, decorators: [{
|
|
410
|
+
type: Injectable
|
|
411
|
+
}] });
|
|
412
|
+
|
|
413
|
+
var ImportStrategyDto;
|
|
414
|
+
(function (ImportStrategyDto) {
|
|
415
|
+
ImportStrategyDto[ImportStrategyDto["InsertOnly"] = 0] = "InsertOnly";
|
|
416
|
+
ImportStrategyDto[ImportStrategyDto["Upsert"] = 1] = "Upsert";
|
|
417
|
+
})(ImportStrategyDto || (ImportStrategyDto = {}));
|
|
418
|
+
|
|
419
|
+
/*
|
|
420
|
+
* Public API Surface of shared-ui-legacy
|
|
421
|
+
*/
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Generated bundle index. Do not edit.
|
|
425
|
+
*/
|
|
426
|
+
|
|
427
|
+
export { AbstractDetailsComponent, ButtonTypes, CommonValidators, ConfirmationDialogComponent, ConfirmationService, ConfirmationWindowResult, DialogType, ImportStrategyDto, MmSharedUiModule, ProgressDialogRef, ProgressValue, ProgressWindowComponent, ProgressWindowService };
|
|
428
|
+
//# sourceMappingURL=meshmakers-shared-ui-legacy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meshmakers-shared-ui-legacy.mjs","sources":["../../../../projects/meshmakers/shared-ui-legacy/src/lib/confirmation/confirmation.model.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/confirmation/confirmation-dialog.component.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/confirmation/confirmation.service.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/shared-ui-module/mm-shared-ui-module.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/abstract-details/abstract-details-component.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/common-validators/common-validators.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/progress-window/progress-value.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/progress-window/progress-window.component.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/progress-window/progress-window.service.ts","../../../../projects/meshmakers/shared-ui-legacy/src/lib/import-strategy/import-strategy-dto.ts","../../../../projects/meshmakers/shared-ui-legacy/src/public-api.ts","../../../../projects/meshmakers/shared-ui-legacy/src/meshmakers-shared-ui-legacy.ts"],"sourcesContent":["export enum ButtonTypes {\n Ok,\n Cancel,\n Yes,\n No\n}\n\nexport enum DialogType {\n YesNo = 0,\n YesNoCancel = 1,\n OkCancel = 2,\n Ok = 3\n}\n\nexport interface ConfirmationWindowData {\n title: string;\n message: string;\n dialogType: DialogType;\n}\n\nexport class ConfirmationWindowResult {\n result: ButtonTypes;\n\n constructor(result: ButtonTypes) {\n this.result = result;\n }\n}\n","import { Component, inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ButtonTypes, ConfirmationWindowData, ConfirmationWindowResult, DialogType } from './confirmation.model';\n\n@Component({\n selector: 'mm-confirmation-dialog',\n standalone: true,\n imports: [MatDialogModule, MatButtonModule],\n template: `\n <h2 mat-dialog-title>{{ data.title }}</h2>\n <mat-dialog-content>{{ data.message }}</mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button mat-flat-button color=\"primary\" (click)=\"onButton1()\">{{ button1Text }}</button>\n @if (button2Text) {\n <button mat-stroked-button (click)=\"onButton2()\">{{ button2Text }}</button>\n }\n @if (button3Text) {\n <button mat-stroked-button (click)=\"onButton3()\">{{ button3Text }}</button>\n }\n </mat-dialog-actions>\n `\n})\nexport class ConfirmationDialogComponent implements OnInit {\n private readonly dialogRef = inject<MatDialogRef<ConfirmationDialogComponent>>(MatDialogRef);\n readonly data = inject<ConfirmationWindowData>(MAT_DIALOG_DATA);\n\n button1Text = 'OK';\n button2Text: string | null = null;\n button3Text: string | null = null;\n\n private button1Result: ButtonTypes = ButtonTypes.Ok;\n private button2Result: ButtonTypes | null = null;\n private button3Result: ButtonTypes | null = null;\n\n ngOnInit(): void {\n switch (this.data.dialogType) {\n case DialogType.OkCancel:\n this.button1Text = 'OK';\n this.button1Result = ButtonTypes.Ok;\n this.button2Text = 'Cancel';\n this.button2Result = ButtonTypes.Cancel;\n break;\n case DialogType.YesNoCancel:\n this.button1Text = 'Yes';\n this.button1Result = ButtonTypes.Yes;\n this.button2Text = 'No';\n this.button2Result = ButtonTypes.No;\n this.button3Text = 'Cancel';\n this.button3Result = ButtonTypes.Cancel;\n break;\n case DialogType.Ok:\n this.button1Text = 'OK';\n this.button1Result = ButtonTypes.Ok;\n break;\n default: // YesNo\n this.button1Text = 'Yes';\n this.button1Result = ButtonTypes.Yes;\n this.button2Text = 'No';\n this.button2Result = ButtonTypes.No;\n break;\n }\n }\n\n onButton1(): void {\n this.dialogRef.close(new ConfirmationWindowResult(this.button1Result));\n }\n\n onButton2(): void {\n this.dialogRef.close(new ConfirmationWindowResult(this.button2Result!));\n }\n\n onButton3(): void {\n this.dialogRef.close(new ConfirmationWindowResult(this.button3Result!));\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { firstValueFrom } from 'rxjs';\nimport { ConfirmationDialogComponent } from './confirmation-dialog.component';\nimport {\n ButtonTypes,\n ConfirmationWindowData,\n ConfirmationWindowResult,\n DialogType,\n} from './confirmation.model';\n\n@Injectable()\nexport class ConfirmationService {\n private readonly dialog = inject(MatDialog);\n\n public async showYesNoConfirmationDialog(title: string, message: string): Promise<boolean> {\n const result = await this.openDialog(title, message, DialogType.YesNo);\n if (result instanceof ConfirmationWindowResult) {\n return result.result === ButtonTypes.Yes;\n }\n return false;\n }\n\n public async showYesNoCancelConfirmationDialog(title: string, message: string): Promise<ConfirmationWindowResult | undefined> {\n const result = await this.openDialog(title, message, DialogType.YesNoCancel);\n if (result instanceof ConfirmationWindowResult) {\n return result;\n }\n return undefined;\n }\n\n public async showOkCancelConfirmationDialog(title: string, message: string): Promise<boolean> {\n const result = await this.openDialog(title, message, DialogType.OkCancel);\n if (result instanceof ConfirmationWindowResult) {\n return result.result === ButtonTypes.Ok;\n }\n return false;\n }\n\n public async showOkDialog(title: string, message: string): Promise<boolean> {\n const result = await this.openDialog(title, message, DialogType.Ok);\n if (result instanceof ConfirmationWindowResult) {\n return result.result === ButtonTypes.Ok;\n }\n return false;\n }\n\n private async openDialog(title: string, message: string, dialogType: DialogType): Promise<ConfirmationWindowResult | undefined> {\n const dialogRef = this.dialog.open(ConfirmationDialogComponent, {\n data: { title, message, dialogType } as ConfirmationWindowData,\n });\n\n return firstValueFrom(dialogRef.afterClosed());\n }\n}\n","/**\n * Backward-compatible MmSharedUiModule for legacy apps that use\n * importProvidersFrom(MmSharedUiModule.forRoot()).\n *\n * Provides a Material-based ConfirmationService as a drop-in replacement\n * for the Kendo-based version from @meshmakers/shared-ui.\n */\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ConfirmationService } from '../confirmation/confirmation.service';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: []\n})\nexport class MmSharedUiModule {\n static forRoot(): ModuleWithProviders<MmSharedUiModule> {\n return {\n ngModule: MmSharedUiModule,\n providers: [\n ConfirmationService,\n ]\n };\n }\n}\n","/**\n * Backward-compatible AbstractDetailsComponent for legacy apps.\n */\nimport { FormGroup } from '@angular/forms';\nimport { IsoDateTime } from '@meshmakers/shared-services';\n\nexport abstract class AbstractDetailsComponent<TEntity> {\n private _loading: boolean;\n private readonly _ownerForm: FormGroup;\n private _entity: TEntity | null;\n\n protected constructor(formGroup: FormGroup) {\n this._loading = true;\n this._entity = null;\n this._ownerForm = formGroup;\n }\n\n public get loading(): boolean {\n return this._loading;\n }\n\n public set loading(value: boolean) {\n this._loading = value;\n }\n\n public get entity(): TEntity | null {\n return this._entity;\n }\n\n public set entity(value: TEntity | null) {\n this._entity = value;\n }\n\n public get ownerForm(): FormGroup {\n return this._ownerForm;\n }\n\n public get isLoaded(): boolean {\n return this._entity !== null;\n }\n\n public hasError = (controlName: string, errorName: string): boolean => {\n return this.ownerForm?.controls[controlName].hasError(errorName);\n };\n\n public hasFormError = (errorName: string): boolean => {\n return this.ownerForm?.hasError(errorName);\n };\n\n public updateDateTime(controlName: string): void {\n this.ownerForm?.get(controlName)?.setValue(IsoDateTime.utcToLocalDateTimeIso(IsoDateTime.currentUtcDateTimeIso()));\n }\n\n public copyInputMessage(inputElement: HTMLInputElement): void {\n inputElement.select();\n document.execCommand('copy');\n inputElement.setSelectionRange(0, 0);\n }\n\n protected onProgressStarting(): void {\n this._loading = true;\n this.ownerForm?.disable();\n this.ownerForm?.updateValueAndValidity();\n }\n\n protected onProgressCompleted(): void {\n this.ownerForm?.enable();\n this._loading = false;\n }\n}\n","/**\n * Backward-compatible CommonValidators for legacy apps.\n */\nimport { AbstractControl, ValidatorFn, Validators } from '@angular/forms';\n\nexport type CompareValueFn<TValue> = (value: TValue) => boolean;\n\nexport class CommonValidators {\n public static phoneNumber(): ValidatorFn {\n return Validators.pattern('^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\\\s\\\\./0-9]*$');\n }\n\n public static httpUri(): ValidatorFn {\n return Validators.pattern(\n '^(http:\\\\/\\\\/|https:\\\\/\\\\/)([a-zA-Z0-9-_]+\\\\.)*[a-zA-Z0-9][a-zA-Z0-9-_]+(\\\\.[a-zA-Z]{2,11}?)*(:[0-9]{2,5}){0,1}\\\\/{0,1}$'\n );\n }\n\n public static ensureSameValue(sourceControlName: string): ValidatorFn {\n return (control: AbstractControl) => {\n const value = control.value;\n return value === control.parent?.get(sourceControlName)?.value ? null : { notSame: true };\n };\n }\n\n public static conditionalRequired<TCompareValue>(\n sourceControlName: string,\n sourceValueCompareExpression: CompareValueFn<TCompareValue>\n ): ValidatorFn {\n return (control: AbstractControl) => {\n if (control.parent != null && sourceValueCompareExpression((control.parent.get(sourceControlName)?.value as TCompareValue))) {\n const val = control.value;\n const isEmpty = val == null || (typeof val === 'string' && val.length === 0) || (Array.isArray(val) && val.length === 0);\n return isEmpty ? { required: true } : null;\n }\n return null;\n };\n }\n\n public static dependentControls(controlNames: string[]): ValidatorFn {\n return (control: AbstractControl) => {\n controlNames.forEach((controlName) => {\n control.parent?.get(controlName)?.updateValueAndValidity();\n });\n return null;\n };\n }\n}\n","export class ProgressValue {\n statusText: string | null;\n progressValue: number;\n\n constructor() {\n this.statusText = null;\n this.progressValue = 0;\n }\n}\n","import { Component, inject, OnDestroy, AfterViewInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { Observable, Subscription } from 'rxjs';\nimport { ProgressValue } from './progress-value';\n\nexport interface ProgressWindowData {\n isDeterminate: boolean;\n progress: Observable<ProgressValue>;\n isCancelOperationAvailable: boolean;\n cancelOperation: () => void;\n}\n\n@Component({\n selector: 'mm-progress-window',\n standalone: true,\n imports: [MatDialogModule, MatButtonModule, MatProgressBarModule],\n template: `\n <mat-dialog-content>\n <div class=\"progress-section\">\n @if (isDeterminate) {\n <mat-progress-bar mode=\"determinate\" [value]=\"progressPercent\"></mat-progress-bar>\n } @else {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n @if (statusText) {\n <p class=\"status-text\">{{ statusText }}</p>\n }\n </div>\n </mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n @if (isCancelOperationAvailable) {\n <button mat-stroked-button (click)=\"onCancelClick()\">Cancel</button>\n }\n </mat-dialog-actions>\n `,\n styles: [`\n .progress-section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 350px;\n }\n .status-text {\n margin: 0;\n font-size: 14px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n `]\n})\nexport class ProgressWindowComponent implements AfterViewInit, OnDestroy {\n private readonly dialogRef = inject<MatDialogRef<ProgressWindowComponent>>(MatDialogRef);\n private readonly data = inject<ProgressWindowData>(MAT_DIALOG_DATA);\n private progressSubscription?: Subscription;\n\n isDeterminate: boolean;\n isCancelOperationAvailable: boolean;\n statusText: string | null = null;\n progressPercent = 0;\n\n constructor() {\n this.isDeterminate = this.data.isDeterminate;\n this.isCancelOperationAvailable = this.data.isCancelOperationAvailable;\n }\n\n ngAfterViewInit(): void {\n if (this.data.progress) {\n this.progressSubscription = this.data.progress.subscribe((value: ProgressValue) => {\n this.statusText = value.statusText;\n this.progressPercent = value.progressValue;\n });\n }\n }\n\n ngOnDestroy(): void {\n this.progressSubscription?.unsubscribe();\n }\n\n onCancelClick(): void {\n if (this.data.cancelOperation) {\n this.data.cancelOperation();\n }\n this.dialogRef.close();\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\nimport { ProgressValue } from './progress-value';\nimport { ProgressWindowComponent, ProgressWindowData } from './progress-window.component';\n\n/**\n * Reference returned by showProgress methods.\n * Provides a close() method compatible with the Kendo DialogRef API.\n */\nexport class ProgressDialogRef {\n constructor(private readonly dialogRef: MatDialogRef<ProgressWindowComponent>) {}\n\n close(): void {\n this.dialogRef.close();\n }\n}\n\nexport interface ProgressWindowConfig {\n title: string;\n progress: Observable<ProgressValue>;\n isDeterminate?: boolean;\n isCancelOperationAvailable?: boolean;\n cancelOperation?: () => void;\n width?: number;\n height?: number | string;\n}\n\nexport interface ProgressWindowOptions {\n isCancelOperationAvailable?: boolean;\n cancelOperation?: () => void;\n width?: number;\n height?: number | string;\n}\n\n@Injectable()\nexport class ProgressWindowService {\n private readonly dialog = inject(MatDialog);\n\n showProgress(config: ProgressWindowConfig): ProgressDialogRef {\n const dialogRef = this.dialog.open(ProgressWindowComponent, {\n data: {\n isDeterminate: config.isDeterminate !== false,\n progress: config.progress,\n isCancelOperationAvailable: config.isCancelOperationAvailable || false,\n cancelOperation: config.cancelOperation || (() => { /* noop */ }),\n } as ProgressWindowData,\n width: config.width ? `${config.width}px` : '450px',\n disableClose: true,\n });\n\n if (config.title) {\n // MatDialog doesn't have a built-in title on the ref, but we set it via the component\n }\n\n return new ProgressDialogRef(dialogRef);\n }\n\n showDeterminateProgress(\n title: string,\n progress: Observable<ProgressValue>,\n options?: Partial<ProgressWindowOptions>\n ): ProgressDialogRef {\n return this.showProgress({\n title,\n isDeterminate: true,\n progress,\n ...options\n });\n }\n\n showIndeterminateProgress(\n title: string,\n progress: Observable<ProgressValue>,\n options?: Partial<ProgressWindowOptions>\n ): ProgressDialogRef {\n return this.showProgress({\n title,\n isDeterminate: false,\n progress,\n ...options\n });\n }\n}\n","export enum ImportStrategyDto {\n InsertOnly = 0,\n Upsert = 1\n}\n","/*\n * Public API Surface of shared-ui-legacy\n */\n\nexport * from './lib/shared-ui-module';\nexport * from './lib/abstract-details';\nexport * from './lib/common-validators';\nexport * from './lib/confirmation';\nexport * from './lib/progress-window';\nexport * from './lib/import-strategy';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,WAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAE;AACF,IAAA,WAAA,CAAA,WAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,WAAA,CAAA,WAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAG;AACH,IAAA,WAAA,CAAA,WAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAE;AACJ,CAAC,EALW,WAAW,KAAX,WAAW,GAAA,EAAA,CAAA,CAAA;IAOX;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,UAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAS;AACT,IAAA,UAAA,CAAA,UAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAe;AACf,IAAA,UAAA,CAAA,U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AAA,EAAA,CAAA;2GAArB,qBAAqB,EAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC;;;ICnCW;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,iBAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc;AACd,IAAA,iBAAA,CAAA,iBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU;AACZ,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;;ACA7B;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@meshmakers/shared-ui-legacy",
|
|
3
|
+
"version": "3.3.390",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/cdk": "^21.0.0",
|
|
6
|
+
"@angular/common": "^21.0.6",
|
|
7
|
+
"@angular/core": "^21.0.6",
|
|
8
|
+
"@angular/forms": "^21.0.6",
|
|
9
|
+
"@angular/material": "^21.0.0",
|
|
10
|
+
"@meshmakers/shared-services": "*"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"tslib": "^2.8.1"
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"module": "fesm2022/meshmakers-shared-ui-legacy.mjs",
|
|
17
|
+
"typings": "types/meshmakers-shared-ui-legacy.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./types/meshmakers-shared-ui-legacy.d.ts",
|
|
24
|
+
"default": "./fesm2022/meshmakers-shared-ui-legacy.mjs"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ModuleWithProviders, OnInit, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import { FormGroup, ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Backward-compatible MmSharedUiModule for legacy apps that use
|
|
9
|
+
* importProvidersFrom(MmSharedUiModule.forRoot()).
|
|
10
|
+
*
|
|
11
|
+
* Provides a Material-based ConfirmationService as a drop-in replacement
|
|
12
|
+
* for the Kendo-based version from @meshmakers/shared-ui.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
declare class MmSharedUiModule {
|
|
16
|
+
static forRoot(): ModuleWithProviders<MmSharedUiModule>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MmSharedUiModule, never>;
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MmSharedUiModule, never, never, never>;
|
|
19
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MmSharedUiModule>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Backward-compatible AbstractDetailsComponent for legacy apps.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
declare abstract class AbstractDetailsComponent<TEntity> {
|
|
27
|
+
private _loading;
|
|
28
|
+
private readonly _ownerForm;
|
|
29
|
+
private _entity;
|
|
30
|
+
protected constructor(formGroup: FormGroup);
|
|
31
|
+
get loading(): boolean;
|
|
32
|
+
set loading(value: boolean);
|
|
33
|
+
get entity(): TEntity | null;
|
|
34
|
+
set entity(value: TEntity | null);
|
|
35
|
+
get ownerForm(): FormGroup;
|
|
36
|
+
get isLoaded(): boolean;
|
|
37
|
+
hasError: (controlName: string, errorName: string) => boolean;
|
|
38
|
+
hasFormError: (errorName: string) => boolean;
|
|
39
|
+
updateDateTime(controlName: string): void;
|
|
40
|
+
copyInputMessage(inputElement: HTMLInputElement): void;
|
|
41
|
+
protected onProgressStarting(): void;
|
|
42
|
+
protected onProgressCompleted(): void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Backward-compatible CommonValidators for legacy apps.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
type CompareValueFn<TValue> = (value: TValue) => boolean;
|
|
50
|
+
declare class CommonValidators {
|
|
51
|
+
static phoneNumber(): ValidatorFn;
|
|
52
|
+
static httpUri(): ValidatorFn;
|
|
53
|
+
static ensureSameValue(sourceControlName: string): ValidatorFn;
|
|
54
|
+
static conditionalRequired<TCompareValue>(sourceControlName: string, sourceValueCompareExpression: CompareValueFn<TCompareValue>): ValidatorFn;
|
|
55
|
+
static dependentControls(controlNames: string[]): ValidatorFn;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare enum ButtonTypes {
|
|
59
|
+
Ok = 0,
|
|
60
|
+
Cancel = 1,
|
|
61
|
+
Yes = 2,
|
|
62
|
+
No = 3
|
|
63
|
+
}
|
|
64
|
+
declare enum DialogType {
|
|
65
|
+
YesNo = 0,
|
|
66
|
+
YesNoCancel = 1,
|
|
67
|
+
OkCancel = 2,
|
|
68
|
+
Ok = 3
|
|
69
|
+
}
|
|
70
|
+
interface ConfirmationWindowData {
|
|
71
|
+
title: string;
|
|
72
|
+
message: string;
|
|
73
|
+
dialogType: DialogType;
|
|
74
|
+
}
|
|
75
|
+
declare class ConfirmationWindowResult {
|
|
76
|
+
result: ButtonTypes;
|
|
77
|
+
constructor(result: ButtonTypes);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare class ConfirmationService {
|
|
81
|
+
private readonly dialog;
|
|
82
|
+
showYesNoConfirmationDialog(title: string, message: string): Promise<boolean>;
|
|
83
|
+
showYesNoCancelConfirmationDialog(title: string, message: string): Promise<ConfirmationWindowResult | undefined>;
|
|
84
|
+
showOkCancelConfirmationDialog(title: string, message: string): Promise<boolean>;
|
|
85
|
+
showOkDialog(title: string, message: string): Promise<boolean>;
|
|
86
|
+
private openDialog;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationService, never>;
|
|
88
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationService>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare class ConfirmationDialogComponent implements OnInit {
|
|
92
|
+
private readonly dialogRef;
|
|
93
|
+
readonly data: ConfirmationWindowData;
|
|
94
|
+
button1Text: string;
|
|
95
|
+
button2Text: string | null;
|
|
96
|
+
button3Text: string | null;
|
|
97
|
+
private button1Result;
|
|
98
|
+
private button2Result;
|
|
99
|
+
private button3Result;
|
|
100
|
+
ngOnInit(): void;
|
|
101
|
+
onButton1(): void;
|
|
102
|
+
onButton2(): void;
|
|
103
|
+
onButton3(): void;
|
|
104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogComponent, never>;
|
|
105
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "mm-confirmation-dialog", never, {}, {}, never, never, true, never>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare class ProgressValue {
|
|
109
|
+
statusText: string | null;
|
|
110
|
+
progressValue: number;
|
|
111
|
+
constructor();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface ProgressWindowData {
|
|
115
|
+
isDeterminate: boolean;
|
|
116
|
+
progress: Observable<ProgressValue>;
|
|
117
|
+
isCancelOperationAvailable: boolean;
|
|
118
|
+
cancelOperation: () => void;
|
|
119
|
+
}
|
|
120
|
+
declare class ProgressWindowComponent implements AfterViewInit, OnDestroy {
|
|
121
|
+
private readonly dialogRef;
|
|
122
|
+
private readonly data;
|
|
123
|
+
private progressSubscription?;
|
|
124
|
+
isDeterminate: boolean;
|
|
125
|
+
isCancelOperationAvailable: boolean;
|
|
126
|
+
statusText: string | null;
|
|
127
|
+
progressPercent: number;
|
|
128
|
+
constructor();
|
|
129
|
+
ngAfterViewInit(): void;
|
|
130
|
+
ngOnDestroy(): void;
|
|
131
|
+
onCancelClick(): void;
|
|
132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressWindowComponent, never>;
|
|
133
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProgressWindowComponent, "mm-progress-window", never, {}, {}, never, never, true, never>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Reference returned by showProgress methods.
|
|
138
|
+
* Provides a close() method compatible with the Kendo DialogRef API.
|
|
139
|
+
*/
|
|
140
|
+
declare class ProgressDialogRef {
|
|
141
|
+
private readonly dialogRef;
|
|
142
|
+
constructor(dialogRef: MatDialogRef<ProgressWindowComponent>);
|
|
143
|
+
close(): void;
|
|
144
|
+
}
|
|
145
|
+
interface ProgressWindowConfig {
|
|
146
|
+
title: string;
|
|
147
|
+
progress: Observable<ProgressValue>;
|
|
148
|
+
isDeterminate?: boolean;
|
|
149
|
+
isCancelOperationAvailable?: boolean;
|
|
150
|
+
cancelOperation?: () => void;
|
|
151
|
+
width?: number;
|
|
152
|
+
height?: number | string;
|
|
153
|
+
}
|
|
154
|
+
interface ProgressWindowOptions {
|
|
155
|
+
isCancelOperationAvailable?: boolean;
|
|
156
|
+
cancelOperation?: () => void;
|
|
157
|
+
width?: number;
|
|
158
|
+
height?: number | string;
|
|
159
|
+
}
|
|
160
|
+
declare class ProgressWindowService {
|
|
161
|
+
private readonly dialog;
|
|
162
|
+
showProgress(config: ProgressWindowConfig): ProgressDialogRef;
|
|
163
|
+
showDeterminateProgress(title: string, progress: Observable<ProgressValue>, options?: Partial<ProgressWindowOptions>): ProgressDialogRef;
|
|
164
|
+
showIndeterminateProgress(title: string, progress: Observable<ProgressValue>, options?: Partial<ProgressWindowOptions>): ProgressDialogRef;
|
|
165
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressWindowService, never>;
|
|
166
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ProgressWindowService>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare enum ImportStrategyDto {
|
|
170
|
+
InsertOnly = 0,
|
|
171
|
+
Upsert = 1
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export { AbstractDetailsComponent, ButtonTypes, CommonValidators, ConfirmationDialogComponent, ConfirmationService, ConfirmationWindowResult, DialogType, ImportStrategyDto, MmSharedUiModule, ProgressDialogRef, ProgressValue, ProgressWindowComponent, ProgressWindowService };
|
|
175
|
+
export type { CompareValueFn, ConfirmationWindowData, ProgressWindowConfig, ProgressWindowData, ProgressWindowOptions };
|