@eqproject/eqp-dynamic-module 0.0.4 → 0.0.6
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 +43 -24
- package/bundles/eqproject-eqp-dynamic-module.umd.js +871 -227
- package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -1
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js +2 -2
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +1 -1
- package/eqproject-eqp-dynamic-module.d.ts +2 -1
- package/eqproject-eqp-dynamic-module.metadata.json +1 -1
- package/esm2015/eqproject-eqp-dynamic-module.js +3 -2
- package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +198 -22
- package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +124 -9
- package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +64 -12
- package/esm2015/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/date-field-template/date-field-template.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/image-field-template/image-field-template.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +21 -24
- package/esm2015/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +10 -2
- package/esm2015/lib/components/private/field-templates/text-field-template/text-field-template.component.js +18 -2
- package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +2 -2
- package/esm2015/lib/components/private/form-records/add-form-record/add-form-record.component.js +2 -2
- package/esm2015/lib/components/private/form-records/list-form-record/list-form-record.component.js +2 -18
- package/esm2015/lib/components/private/spinner/spinner.component.js +23 -0
- package/esm2015/lib/eqp-dynamic-module.module.js +3 -3
- package/esm2015/lib/models/endPointConfiguration.model.js +23 -0
- package/esm2015/lib/models/fields/dateField.model.js +1 -1
- package/esm2015/lib/models/fields/listValueField.model.js +3 -1
- package/esm2015/lib/models/fields/numericField.model.js +1 -1
- package/esm2015/lib/models/fields/textField.model.js +10 -1
- package/esm2015/lib/models/form.model.js +1 -1
- package/esm2015/lib/models/record.model.js +6 -1
- package/esm2015/lib/services/eqp-dynamic-module-dialog.service.js +10 -1
- package/esm2015/lib/services/spinner.service.js +43 -0
- package/esm2015/lib/services/utilityHelper.services.js +180 -13
- package/esm2015/public-api.js +3 -1
- package/esm5/eqproject-eqp-dynamic-module.js +3 -2
- package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +204 -22
- package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +126 -8
- package/esm5/lib/components/private/add-form-field/add-form-field.component.js +64 -12
- package/esm5/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +2 -2
- package/esm5/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +2 -2
- package/esm5/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +2 -2
- package/esm5/lib/components/private/field-templates/date-field-template/date-field-template.component.js +2 -2
- package/esm5/lib/components/private/field-templates/image-field-template/image-field-template.component.js +2 -2
- package/esm5/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +22 -24
- package/esm5/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +10 -2
- package/esm5/lib/components/private/field-templates/text-field-template/text-field-template.component.js +18 -2
- package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +2 -2
- package/esm5/lib/components/private/form-records/add-form-record/add-form-record.component.js +2 -2
- package/esm5/lib/components/private/form-records/list-form-record/list-form-record.component.js +2 -18
- package/esm5/lib/components/private/spinner/spinner.component.js +24 -0
- package/esm5/lib/eqp-dynamic-module.module.js +3 -3
- package/esm5/lib/models/endPointConfiguration.model.js +33 -0
- package/esm5/lib/models/fields/dateField.model.js +1 -1
- package/esm5/lib/models/fields/listValueField.model.js +7 -1
- package/esm5/lib/models/fields/numericField.model.js +1 -1
- package/esm5/lib/models/fields/textField.model.js +10 -1
- package/esm5/lib/models/form.model.js +1 -1
- package/esm5/lib/models/record.model.js +8 -1
- package/esm5/lib/services/eqp-dynamic-module-dialog.service.js +11 -1
- package/esm5/lib/services/spinner.service.js +46 -0
- package/esm5/lib/services/utilityHelper.services.js +182 -11
- package/esm5/public-api.js +3 -1
- package/fesm2015/eqproject-eqp-dynamic-module.js +820 -214
- package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -1
- package/fesm5/eqproject-eqp-dynamic-module.js +864 -228
- package/fesm5/eqproject-eqp-dynamic-module.js.map +1 -1
- package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +78 -4
- package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +51 -2
- package/lib/components/private/add-form-field/add-form-field.component.d.ts +29 -4
- package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +3 -11
- package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +3 -1
- package/lib/components/private/spinner/spinner.component.d.ts +9 -0
- package/lib/models/endPointConfiguration.model.d.ts +35 -0
- package/lib/models/fields/dateField.model.d.ts +1 -0
- package/lib/models/fields/listValueField.model.d.ts +17 -0
- package/lib/models/fields/numericField.model.d.ts +3 -1
- package/lib/models/fields/textField.model.d.ts +9 -1
- package/lib/models/form.model.d.ts +1 -0
- package/lib/models/record.model.d.ts +8 -0
- package/lib/services/eqp-dynamic-module-dialog.service.d.ts +6 -0
- package/lib/services/spinner.service.d.ts +15 -0
- package/lib/services/utilityHelper.services.d.ts +30 -1
- package/package.json +3 -3
- package/public-api.d.ts +2 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { __extends, __decorate, __awaiter, __generator } from 'tslib';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { ɵɵdefineInjectable,
|
|
3
|
+
import { ɵɵdefineInjectable, Injectable, ɵɵinject, EventEmitter, Input, Output, Component, NgModule, ViewChild, ChangeDetectorRef, ViewChildren } from '@angular/core';
|
|
4
4
|
import { Validators, FormControl, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import Swal from 'sweetalert2';
|
|
6
|
+
import { HttpClient } from '@angular/common/http';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
5
8
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
6
9
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
10
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -34,14 +37,12 @@ import { MatSortModule } from '@angular/material/sort';
|
|
|
34
37
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
35
38
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
36
39
|
import { TypeColumn, CellAlignmentEnum, NumberColumnPipe, EqpTableModule } from '@eqproject/eqp-table';
|
|
37
|
-
import { EqpAttachmentsModule } from '@eqproject/eqp-attachments';
|
|
40
|
+
import { AttachmentType, EqpAttachmentsModule } from '@eqproject/eqp-attachments';
|
|
38
41
|
import { EnumHelper, EqpSelectModule } from '@eqproject/eqp-select';
|
|
39
42
|
import { PickerModeEnum, EqpDatetimepickerModule } from '@eqproject/eqp-datetimepicker';
|
|
40
43
|
import { EqpImgDrawingModule } from '@eqproject/eqp-img-drawing';
|
|
41
44
|
import { EqpFiltersModule } from '@eqproject/eqp-filters';
|
|
42
|
-
import { EqpNumericModule } from '@eqproject/eqp-numeric';
|
|
43
|
-
import Swal from 'sweetalert2';
|
|
44
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
45
|
+
import { EqpNumericInputMode, EqpNumericModule } from '@eqproject/eqp-numeric';
|
|
45
46
|
|
|
46
47
|
var Context = /** @class */ (function () {
|
|
47
48
|
function Context() {
|
|
@@ -55,6 +56,36 @@ var ContextUser = /** @class */ (function () {
|
|
|
55
56
|
return ContextUser;
|
|
56
57
|
}());
|
|
57
58
|
|
|
59
|
+
var EndPointConfiguration = /** @class */ (function () {
|
|
60
|
+
function EndPointConfiguration() {
|
|
61
|
+
}
|
|
62
|
+
return EndPointConfiguration;
|
|
63
|
+
}());
|
|
64
|
+
var EndPointData = /** @class */ (function () {
|
|
65
|
+
function EndPointData() {
|
|
66
|
+
}
|
|
67
|
+
return EndPointData;
|
|
68
|
+
}());
|
|
69
|
+
var EndPointDataParams = /** @class */ (function () {
|
|
70
|
+
function EndPointDataParams() {
|
|
71
|
+
this.ParamValue = null;
|
|
72
|
+
}
|
|
73
|
+
return EndPointDataParams;
|
|
74
|
+
}());
|
|
75
|
+
var ParamTypeEnum;
|
|
76
|
+
(function (ParamTypeEnum) {
|
|
77
|
+
ParamTypeEnum[ParamTypeEnum["Query param"] = 1] = "Query param";
|
|
78
|
+
ParamTypeEnum[ParamTypeEnum["In route"] = 2] = "In route";
|
|
79
|
+
ParamTypeEnum[ParamTypeEnum["In Body"] = 3] = "In Body";
|
|
80
|
+
})(ParamTypeEnum || (ParamTypeEnum = {}));
|
|
81
|
+
var RequestMethodEnum;
|
|
82
|
+
(function (RequestMethodEnum) {
|
|
83
|
+
RequestMethodEnum["GET"] = "GET";
|
|
84
|
+
RequestMethodEnum["POST"] = "POST";
|
|
85
|
+
RequestMethodEnum["PUT"] = "PUT";
|
|
86
|
+
RequestMethodEnum["DELETE"] = "DELETE";
|
|
87
|
+
})(RequestMethodEnum || (RequestMethodEnum = {}));
|
|
88
|
+
|
|
58
89
|
/**
|
|
59
90
|
* Classe base che implementa la valorizzazione dell'ID (se null) con una nuova GUID
|
|
60
91
|
* in creazione dell'oggetto.
|
|
@@ -101,6 +132,136 @@ var FormScalarTypeEnum;
|
|
|
101
132
|
FormScalarTypeEnum[FormScalarTypeEnum["In accordion"] = 4] = "In accordion"; //GROUPED_BY_ACCORDION
|
|
102
133
|
})(FormScalarTypeEnum || (FormScalarTypeEnum = {}));
|
|
103
134
|
|
|
135
|
+
var Record = /** @class */ (function () {
|
|
136
|
+
function Record() {
|
|
137
|
+
}
|
|
138
|
+
return Record;
|
|
139
|
+
}());
|
|
140
|
+
var DynRecord = /** @class */ (function () {
|
|
141
|
+
function DynRecord() {
|
|
142
|
+
this.Values = {};
|
|
143
|
+
}
|
|
144
|
+
return DynRecord;
|
|
145
|
+
}());
|
|
146
|
+
|
|
147
|
+
var EqpDynamicModuleDialogService = /** @class */ (function () {
|
|
148
|
+
function EqpDynamicModuleDialogService() {
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Mostra uno sweet alert di tipo SUCCESS con il messaggio passato come parametro.
|
|
152
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
153
|
+
* @param title Titolo dello sweetalert (di default mostra 'Operazione completata')
|
|
154
|
+
*/
|
|
155
|
+
EqpDynamicModuleDialogService.Success = function (message, title) {
|
|
156
|
+
if (title === void 0) { title = null; }
|
|
157
|
+
var currentTitle = title != null ? title : 'Operazione completata con successo.';
|
|
158
|
+
Swal.fire(currentTitle, message, 'success');
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.
|
|
162
|
+
* @param message Messaggio d'errore da mostrare nello sweetalert
|
|
163
|
+
* @param title Titolo dello sweetalert (di default mostra 'Errore')
|
|
164
|
+
*/
|
|
165
|
+
EqpDynamicModuleDialogService.Error = function (message, title) {
|
|
166
|
+
if (title === void 0) { title = null; }
|
|
167
|
+
var currentTitle = title != null ? title : 'Errore';
|
|
168
|
+
if (Array.isArray(message)) {
|
|
169
|
+
currentTitle = title != null ? title : 'Errore';
|
|
170
|
+
var htmlErrors = message.join("<br>");
|
|
171
|
+
Swal.fire({
|
|
172
|
+
title: currentTitle,
|
|
173
|
+
html: htmlErrors,
|
|
174
|
+
icon: 'error'
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
Swal.fire(currentTitle, message, 'error');
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto
|
|
183
|
+
* CONFERMA lancia la funzione di callback passata come parametro
|
|
184
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
185
|
+
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
186
|
+
*/
|
|
187
|
+
EqpDynamicModuleDialogService.Confirm = function (message, confirmCallback, isWarning, title, customWidth) {
|
|
188
|
+
if (isWarning === void 0) { isWarning = false; }
|
|
189
|
+
if (title === void 0) { title = null; }
|
|
190
|
+
if (customWidth === void 0) { customWidth = null; }
|
|
191
|
+
var currentTitle = title != null ? title : 'Sei sicuro di voler procedere?';
|
|
192
|
+
if (Array.isArray(message)) {
|
|
193
|
+
var htmlErrors = message.join("<br>");
|
|
194
|
+
Swal.fire({
|
|
195
|
+
title: currentTitle,
|
|
196
|
+
html: htmlErrors,
|
|
197
|
+
width: customWidth ? customWidth : '32rem',
|
|
198
|
+
icon: !isWarning ? 'question' : 'warning',
|
|
199
|
+
showCancelButton: true,
|
|
200
|
+
allowOutsideClick: false,
|
|
201
|
+
allowEscapeKey: false
|
|
202
|
+
}).then(function (result) {
|
|
203
|
+
if (result.value && confirmCallback) {
|
|
204
|
+
confirmCallback();
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
Swal.fire({
|
|
210
|
+
title: currentTitle,
|
|
211
|
+
text: message,
|
|
212
|
+
width: customWidth ? customWidth : '32rem',
|
|
213
|
+
icon: !isWarning ? 'question' : 'warning',
|
|
214
|
+
showCancelButton: true,
|
|
215
|
+
allowOutsideClick: false,
|
|
216
|
+
allowEscapeKey: false
|
|
217
|
+
}).then(function (result) {
|
|
218
|
+
if (result.value && confirmCallback) {
|
|
219
|
+
confirmCallback();
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro
|
|
226
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
227
|
+
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
228
|
+
*/
|
|
229
|
+
EqpDynamicModuleDialogService.Info = function (message, title, isToast) {
|
|
230
|
+
if (title === void 0) { title = null; }
|
|
231
|
+
if (isToast === void 0) { isToast = null; }
|
|
232
|
+
var currentTitle = title != null ? title : "Informazione:";
|
|
233
|
+
Swal.fire(currentTitle, message, 'info');
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro
|
|
237
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
238
|
+
* @param title Titolo dello sweetalert (di default mostra 'Attenzione!')
|
|
239
|
+
*/
|
|
240
|
+
EqpDynamicModuleDialogService.Warning = function (message, title, isToast) {
|
|
241
|
+
if (title === void 0) { title = null; }
|
|
242
|
+
if (isToast === void 0) { isToast = null; }
|
|
243
|
+
var currentTitle = title != null ? title : "Attenzione!";
|
|
244
|
+
if (Array.isArray(message)) {
|
|
245
|
+
var htmlWarnings = message.join("<br>");
|
|
246
|
+
Swal.fire({
|
|
247
|
+
title: currentTitle,
|
|
248
|
+
html: htmlWarnings,
|
|
249
|
+
icon: 'warning'
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
Swal.fire(currentTitle, message, 'warning');
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
EqpDynamicModuleDialogService.ɵprov = ɵɵdefineInjectable({ factory: function EqpDynamicModuleDialogService_Factory() { return new EqpDynamicModuleDialogService(); }, token: EqpDynamicModuleDialogService, providedIn: "root" });
|
|
257
|
+
EqpDynamicModuleDialogService = __decorate([
|
|
258
|
+
Injectable({
|
|
259
|
+
providedIn: 'root'
|
|
260
|
+
})
|
|
261
|
+
], EqpDynamicModuleDialogService);
|
|
262
|
+
return EqpDynamicModuleDialogService;
|
|
263
|
+
}());
|
|
264
|
+
|
|
104
265
|
/**
|
|
105
266
|
* Contiene le informazioni di base del campo, indipendentemente dal tipo.
|
|
106
267
|
* Questa classe è volutamente astratta perché il tipo di campo è dettato dal tipo
|
|
@@ -141,6 +302,24 @@ var ColSpanSizesEnum;
|
|
|
141
302
|
ColSpanSizesEnum[ColSpanSizesEnum["col-lg-12"] = 12] = "col-lg-12";
|
|
142
303
|
})(ColSpanSizesEnum || (ColSpanSizesEnum = {}));
|
|
143
304
|
|
|
305
|
+
/**Campo di testo */
|
|
306
|
+
var TextField = /** @class */ (function (_super) {
|
|
307
|
+
__extends(TextField, _super);
|
|
308
|
+
function TextField() {
|
|
309
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
310
|
+
}
|
|
311
|
+
return TextField;
|
|
312
|
+
}(BaseField));
|
|
313
|
+
var TextMaskEnum;
|
|
314
|
+
(function (TextMaskEnum) {
|
|
315
|
+
TextMaskEnum[TextMaskEnum["Password"] = 1] = "Password";
|
|
316
|
+
TextMaskEnum[TextMaskEnum["Email"] = 2] = "Email";
|
|
317
|
+
TextMaskEnum[TextMaskEnum["Telefono"] = 3] = "Telefono";
|
|
318
|
+
TextMaskEnum[TextMaskEnum["Url"] = 4] = "Url";
|
|
319
|
+
})(TextMaskEnum || (TextMaskEnum = {}));
|
|
320
|
+
var UrlRegex = '(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?';
|
|
321
|
+
var TelRegex = '([+]?[0-9]{10,14})';
|
|
322
|
+
|
|
144
323
|
var ArrayValidators = /** @class */ (function () {
|
|
145
324
|
function ArrayValidators() {
|
|
146
325
|
}
|
|
@@ -163,18 +342,73 @@ var ArrayValidators = /** @class */ (function () {
|
|
|
163
342
|
return ArrayValidators;
|
|
164
343
|
}());
|
|
165
344
|
|
|
345
|
+
var SpinnerService = /** @class */ (function () {
|
|
346
|
+
function SpinnerService() {
|
|
347
|
+
this.isLoading = new Subject();
|
|
348
|
+
this.requestsCount = 0;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Mostra lo spinner
|
|
352
|
+
*/
|
|
353
|
+
SpinnerService.prototype.show = function () {
|
|
354
|
+
var _this = this;
|
|
355
|
+
setTimeout(function () {
|
|
356
|
+
_this.isLoading.next(true);
|
|
357
|
+
}, 100);
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Nasconde lo spinner
|
|
361
|
+
*/
|
|
362
|
+
SpinnerService.prototype.hide = function () {
|
|
363
|
+
var _this = this;
|
|
364
|
+
setTimeout(function () {
|
|
365
|
+
_this.isLoading.next(false);
|
|
366
|
+
}, 100);
|
|
367
|
+
};
|
|
368
|
+
SpinnerService.prototype.addRequestCounter = function () {
|
|
369
|
+
this.requestsCount++;
|
|
370
|
+
this.show();
|
|
371
|
+
};
|
|
372
|
+
SpinnerService.prototype.removeRequestCounter = function () {
|
|
373
|
+
this.requestsCount--;
|
|
374
|
+
if (this.requestsCount == 0)
|
|
375
|
+
this.hide();
|
|
376
|
+
};
|
|
377
|
+
SpinnerService.ɵprov = ɵɵdefineInjectable({ factory: function SpinnerService_Factory() { return new SpinnerService(); }, token: SpinnerService, providedIn: "root" });
|
|
378
|
+
SpinnerService = __decorate([
|
|
379
|
+
Injectable({
|
|
380
|
+
providedIn: 'root'
|
|
381
|
+
})
|
|
382
|
+
], SpinnerService);
|
|
383
|
+
return SpinnerService;
|
|
384
|
+
}());
|
|
385
|
+
|
|
166
386
|
var UtilityHelperService = /** @class */ (function () {
|
|
167
|
-
function UtilityHelperService(formBuilder) {
|
|
387
|
+
function UtilityHelperService(formBuilder, http, spinnerService) {
|
|
168
388
|
this.formBuilder = formBuilder;
|
|
389
|
+
this.http = http;
|
|
390
|
+
this.spinnerService = spinnerService;
|
|
169
391
|
}
|
|
170
392
|
UtilityHelperService_1 = UtilityHelperService;
|
|
171
393
|
UtilityHelperService.EvaluateFieldFormula = function (formula, rec, ctx) {
|
|
172
|
-
var evaluatedValue = eval(formula
|
|
394
|
+
var evaluatedValue = eval(formula);
|
|
173
395
|
return (evaluatedValue ? evaluatedValue : null);
|
|
174
396
|
};
|
|
175
397
|
UtilityHelperService.SetContext = function (ctx) {
|
|
176
398
|
this.context = ctx;
|
|
177
399
|
};
|
|
400
|
+
UtilityHelperService.GetFieldType = function (field) {
|
|
401
|
+
switch (field.FieldType) {
|
|
402
|
+
case FieldTypeEnum["Campo di testo"]: {
|
|
403
|
+
var t = Object.assign(new TextField, field);
|
|
404
|
+
return t;
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
default: {
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
};
|
|
178
412
|
/**
|
|
179
413
|
* Metodo per impostare i valori da suggerire nell'autocomplete per i campi in cui l'utente deve scrivere comandi javascript.
|
|
180
414
|
* In base all'ultimo carattere digitato viene impostato un elenco di oggetti o proprietà che l'utente ha a disposizione in quel momento.
|
|
@@ -222,7 +456,7 @@ var UtilityHelperService = /** @class */ (function () {
|
|
|
222
456
|
// funzione javascript. Controllo la parola che l'utente sta digitando e se fa parte di uno degli oggetti a disposizione
|
|
223
457
|
// o una proprietà di essi allora suggerisco i possibili match.
|
|
224
458
|
else {
|
|
225
|
-
var
|
|
459
|
+
var availableOptions_1 = [];
|
|
226
460
|
// Prendo tutti i blocchi di caratteri digitati dall'utente
|
|
227
461
|
var allFormulaWords = typedFormula.split(" ");
|
|
228
462
|
// Prendo l'ultimo blocco di caratteri digitato dall'utente
|
|
@@ -231,7 +465,7 @@ var UtilityHelperService = /** @class */ (function () {
|
|
|
231
465
|
// sui "." e imposto i suggerimenti in base al path della prorpietà che si sta digitando.
|
|
232
466
|
if (!new RegExp("[^0-9a-zA-Z_.]").test(lastTypedString)) {
|
|
233
467
|
var propertyPath = lastTypedString.split(".");
|
|
234
|
-
var
|
|
468
|
+
var lastTypedWork_1 = propertyPath[propertyPath.length - 1];
|
|
235
469
|
var propertiesToCheck = [];
|
|
236
470
|
if (propertyPath.length == 1) {
|
|
237
471
|
propertiesToCheck = ["rec", "ctx"];
|
|
@@ -245,15 +479,15 @@ var UtilityHelperService = /** @class */ (function () {
|
|
|
245
479
|
else if (propertyPath.length > 1 && propertyPath[propertyPath.length - 2] === "rec") {
|
|
246
480
|
propertiesToCheck = availableRecProperties;
|
|
247
481
|
}
|
|
248
|
-
// Eseguo il controllo sulle proprietà recuperate, aggiungo ai suggerimenti tutti i nomi che iniziano con
|
|
482
|
+
// Eseguo il controllo sulle proprietà recuperate, aggiungo ai suggerimenti tutti i nomi che iniziano con
|
|
249
483
|
// quello che sta digitando l'utente.
|
|
250
484
|
propertiesToCheck.forEach(function (prop) {
|
|
251
|
-
if (prop.startsWith(
|
|
252
|
-
|
|
485
|
+
if (prop.startsWith(lastTypedWork_1)) {
|
|
486
|
+
availableOptions_1.push({ label: prop, value: typedFormula + prop.substring(lastTypedWork_1.length, prop.length) });
|
|
253
487
|
}
|
|
254
488
|
});
|
|
255
489
|
}
|
|
256
|
-
autocompleteOptions =
|
|
490
|
+
autocompleteOptions = availableOptions_1;
|
|
257
491
|
}
|
|
258
492
|
return autocompleteOptions;
|
|
259
493
|
};
|
|
@@ -343,6 +577,17 @@ var UtilityHelperService = /** @class */ (function () {
|
|
|
343
577
|
if (field.MinLenght) {
|
|
344
578
|
validators.push(Validators.minLength(field.MinLenght));
|
|
345
579
|
}
|
|
580
|
+
switch (field.TextMask) {
|
|
581
|
+
case TextMaskEnum.Url:
|
|
582
|
+
validators.push(Validators.pattern(UrlRegex));
|
|
583
|
+
break;
|
|
584
|
+
case TextMaskEnum.Email:
|
|
585
|
+
validators.push(Validators.email);
|
|
586
|
+
break;
|
|
587
|
+
case TextMaskEnum.Telefono:
|
|
588
|
+
validators.push(Validators.pattern(TelRegex));
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
346
591
|
break;
|
|
347
592
|
case FieldTypeEnum["Area di testo"]:
|
|
348
593
|
if (field.MaxLenght) {
|
|
@@ -365,12 +610,151 @@ var UtilityHelperService = /** @class */ (function () {
|
|
|
365
610
|
}
|
|
366
611
|
return new FormControl(record[field.Name], validators);
|
|
367
612
|
};
|
|
613
|
+
/**
|
|
614
|
+
* Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
|
|
615
|
+
* a cui si deve connettere e al token da passare per autenticarsi.
|
|
616
|
+
* @param baseServerUrl Stringa dell'url base del server (es: "http://localhost:5000").
|
|
617
|
+
* @param userToken Token dell'utente loggato da usare per autenticarsi se necessario.
|
|
618
|
+
* @returns Resituisce la configurazione completa degli endPoint da usare di default.
|
|
619
|
+
*/
|
|
620
|
+
UtilityHelperService.prototype.ConfigureDefaultEndPoints = function (baseServerUrl, userToken) {
|
|
621
|
+
var endPointConfiguration = new EndPointConfiguration();
|
|
622
|
+
endPointConfiguration = new EndPointConfiguration();
|
|
623
|
+
endPointConfiguration.Records = {
|
|
624
|
+
GetByFormIDEndPoint: {
|
|
625
|
+
Url: baseServerUrl + "/api/v1/getall",
|
|
626
|
+
Token: userToken,
|
|
627
|
+
RequestMethod: RequestMethodEnum.GET,
|
|
628
|
+
},
|
|
629
|
+
GetByIDEndPoint: {
|
|
630
|
+
Url: baseServerUrl + "/api/v1/getByID",
|
|
631
|
+
Token: userToken,
|
|
632
|
+
RequestMethod: RequestMethodEnum.GET,
|
|
633
|
+
},
|
|
634
|
+
SaveEndPoint: {
|
|
635
|
+
Url: baseServerUrl + "/api/v1/save",
|
|
636
|
+
Token: userToken,
|
|
637
|
+
RequestMethod: RequestMethodEnum.POST,
|
|
638
|
+
},
|
|
639
|
+
DuplicateEndPoint: {
|
|
640
|
+
Url: baseServerUrl + "/api/v1/duplicate",
|
|
641
|
+
Token: userToken,
|
|
642
|
+
RequestMethod: RequestMethodEnum.POST,
|
|
643
|
+
},
|
|
644
|
+
DeleteEndPoint: {
|
|
645
|
+
Url: baseServerUrl + "/api/v1/delete",
|
|
646
|
+
Token: userToken,
|
|
647
|
+
RequestMethod: RequestMethodEnum.DELETE,
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
endPointConfiguration.Forms = {
|
|
651
|
+
GetByIDEndPoint: {
|
|
652
|
+
Url: baseServerUrl + "/api/conf/form",
|
|
653
|
+
Token: userToken,
|
|
654
|
+
RequestMethod: RequestMethodEnum.GET,
|
|
655
|
+
},
|
|
656
|
+
SaveEndPoint: {
|
|
657
|
+
Url: baseServerUrl + "/api/conf/form",
|
|
658
|
+
Token: userToken,
|
|
659
|
+
RequestMethod: RequestMethodEnum.POST,
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
return endPointConfiguration;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* Metodo che data la configurazione di un endpoint costruisce l'url da chiamare, gli eventuali parametri
|
|
666
|
+
* da passare (nel body o nella rotta) ed effettua la chiamata. Al termine della chiamata esegue le eventuali
|
|
667
|
+
* funzioni di callback (sia in caso di successo che in caso di errore) passate in input.
|
|
668
|
+
* @param endPointData Cofigurazione dell'endpoint da chiamare.
|
|
669
|
+
* @param dynamicModuleParams Array dei parametri aggiunti dal modulo dinamico a quelli già configurati
|
|
670
|
+
* (ad esempio il record o la form da salvare oppure l'ID per recuperare una particolare entità).
|
|
671
|
+
* @param callback Metodo da eseguire in caso di successo dopo la chiamata http.
|
|
672
|
+
* NOTA: in input viene passata la risposta della chiamata stessa.
|
|
673
|
+
* @param errorCallBack Metodo da eseguire in caso di errore dopo la chiamata http.
|
|
674
|
+
* NOTA: in input viene passato l'errore generato della chiamata stessa.
|
|
675
|
+
*/
|
|
676
|
+
UtilityHelperService.prototype.RunEndPointCall = function (endPointData, dynamicModuleParams, callback, errorCallBack) {
|
|
677
|
+
var _this = this;
|
|
678
|
+
if (dynamicModuleParams === void 0) { dynamicModuleParams = null; }
|
|
679
|
+
if (callback === void 0) { callback = null; }
|
|
680
|
+
if (errorCallBack === void 0) { errorCallBack = null; }
|
|
681
|
+
this.spinnerService.addRequestCounter();
|
|
682
|
+
var url = "" + endPointData.Url;
|
|
683
|
+
var queryParams = null;
|
|
684
|
+
var bodyParams = {
|
|
685
|
+
AdditionalParams: {}
|
|
686
|
+
};
|
|
687
|
+
// Se nella configurazione sono stati definiti parametri da aggiungere alla chiamata questi vengono ciclati
|
|
688
|
+
// e aggiunti nel punto in cui devono essere usati.
|
|
689
|
+
if (endPointData.Params) {
|
|
690
|
+
endPointData.Params.forEach(function (p) {
|
|
691
|
+
switch (p.ParamType) {
|
|
692
|
+
case ParamTypeEnum['Query param']: {
|
|
693
|
+
var stringParam = p.ParamName + "=" + p.ParamValue;
|
|
694
|
+
queryParams = (queryParams == null ? "" : queryParams + "&") + stringParam;
|
|
695
|
+
break;
|
|
696
|
+
}
|
|
697
|
+
case ParamTypeEnum['In route']: {
|
|
698
|
+
url = url + (url.endsWith("/") ? "" : "/") + p.ParamValue;
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
case ParamTypeEnum['In Body']: {
|
|
702
|
+
bodyParams.AdditionalParams[p.ParamName] = p.ParamValue;
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
// Se sono stati passati parametri da aggiungere alla chiamata definiti all'interno del modulo dinamico
|
|
709
|
+
// vengono ciclati e aggiunti nel punto in cui devono essere usati dopo quelli definiti nella configurazione.
|
|
710
|
+
if (dynamicModuleParams) {
|
|
711
|
+
dynamicModuleParams.forEach(function (p) {
|
|
712
|
+
switch (p.ParamType) {
|
|
713
|
+
case ParamTypeEnum['Query param']: {
|
|
714
|
+
var stringParam = p.ParamName + "=" + p.ParamValue;
|
|
715
|
+
queryParams = (queryParams == null ? "" : queryParams + "&") + stringParam;
|
|
716
|
+
break;
|
|
717
|
+
}
|
|
718
|
+
case ParamTypeEnum['In route']: {
|
|
719
|
+
url = url + (url.endsWith("/") ? "" : "/") + p.ParamValue;
|
|
720
|
+
break;
|
|
721
|
+
}
|
|
722
|
+
case ParamTypeEnum['In Body']: {
|
|
723
|
+
bodyParams[p.ParamName] = p.ParamValue;
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
if (queryParams != null) {
|
|
730
|
+
url = (url.endsWith("/") ? url.substring(0, url.length - 1) : url) + "?" + queryParams;
|
|
731
|
+
}
|
|
732
|
+
this.http.request(endPointData.RequestMethod, url, {
|
|
733
|
+
headers: endPointData.Token ? { Authorization: endPointData.Token } : null,
|
|
734
|
+
body: ![RequestMethodEnum.DELETE, RequestMethodEnum.GET].includes(endPointData.RequestMethod) ? bodyParams : null
|
|
735
|
+
})
|
|
736
|
+
.subscribe(function (res) {
|
|
737
|
+
_this.spinnerService.removeRequestCounter();
|
|
738
|
+
if (callback) {
|
|
739
|
+
callback(res);
|
|
740
|
+
}
|
|
741
|
+
}, function (error) {
|
|
742
|
+
_this.spinnerService.removeRequestCounter();
|
|
743
|
+
if (errorCallBack) {
|
|
744
|
+
errorCallBack(error);
|
|
745
|
+
}
|
|
746
|
+
EqpDynamicModuleDialogService.Error(error.message);
|
|
747
|
+
throw new Error(error.message);
|
|
748
|
+
});
|
|
749
|
+
};
|
|
368
750
|
var UtilityHelperService_1;
|
|
369
751
|
UtilityHelperService.context = new Context();
|
|
370
752
|
UtilityHelperService.ctorParameters = function () { return [
|
|
371
|
-
{ type: FormBuilder }
|
|
753
|
+
{ type: FormBuilder },
|
|
754
|
+
{ type: HttpClient },
|
|
755
|
+
{ type: SpinnerService }
|
|
372
756
|
]; };
|
|
373
|
-
UtilityHelperService.ɵprov = ɵɵdefineInjectable({ factory: function UtilityHelperService_Factory() { return new UtilityHelperService(ɵɵinject(FormBuilder)); }, token: UtilityHelperService, providedIn: "root" });
|
|
757
|
+
UtilityHelperService.ɵprov = ɵɵdefineInjectable({ factory: function UtilityHelperService_Factory() { return new UtilityHelperService(ɵɵinject(FormBuilder), ɵɵinject(HttpClient), ɵɵinject(SpinnerService)); }, token: UtilityHelperService, providedIn: "root" });
|
|
374
758
|
UtilityHelperService = UtilityHelperService_1 = __decorate([
|
|
375
759
|
Injectable({
|
|
376
760
|
providedIn: 'root'
|
|
@@ -380,55 +764,219 @@ var UtilityHelperService = /** @class */ (function () {
|
|
|
380
764
|
}());
|
|
381
765
|
|
|
382
766
|
var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
383
|
-
function EqpDynamicModuleComponent() {
|
|
767
|
+
function EqpDynamicModuleComponent(utilityHelperService) {
|
|
768
|
+
this.utilityHelperService = utilityHelperService;
|
|
384
769
|
this.context = new Context();
|
|
385
|
-
this.form = new Form();
|
|
386
770
|
this.showButtons = true;
|
|
387
771
|
this.showTitle = true;
|
|
388
|
-
|
|
772
|
+
/**
|
|
773
|
+
* Url del server da chiamare per recuperare, salvare o eliminare i record.
|
|
774
|
+
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
775
|
+
*/
|
|
776
|
+
this.baseServerUrl = null;
|
|
777
|
+
/**
|
|
778
|
+
* Token da usare negli endpoint da chiamare per recuperare o salvare i record.
|
|
779
|
+
* Usato solo se viene popolata la proprietà "baseServerUrl".
|
|
780
|
+
*/
|
|
781
|
+
this.userToken = null;
|
|
782
|
+
/**
|
|
783
|
+
* Configurazione degli endpoint da chiamare per recuperare o salvare i dati.
|
|
784
|
+
* Può essere definita dall'utente oppure lasciata null, viene popolata con dei
|
|
785
|
+
* valori di default se viene valorizzata la proprietà "baseServerUrl" altrimenti
|
|
786
|
+
* viene lasciata null e non viene eseguita nessuna chiamata al server.
|
|
787
|
+
*/
|
|
788
|
+
this.endPointConfiguration = null;
|
|
789
|
+
/**
|
|
790
|
+
* Eventi emessi quando si salva, elimina o duplica un record
|
|
791
|
+
* se non è stato specificato un endpoint da chiamare.
|
|
792
|
+
*/
|
|
389
793
|
this.saveRecord = new EventEmitter();
|
|
390
794
|
this.deleteRecord = new EventEmitter();
|
|
391
795
|
this.duplicateRecord = new EventEmitter();
|
|
796
|
+
/**
|
|
797
|
+
* Eventi emessi DOPO aver eseguito una chiamata al server per il salvataggio,
|
|
798
|
+
* l'eliminazione o la duplicazione di un record all'endpoint specificato.
|
|
799
|
+
*/
|
|
800
|
+
this.afterSaveRecord = new EventEmitter();
|
|
801
|
+
this.afterDeleteRecord = new EventEmitter();
|
|
802
|
+
this.afterDuplicateRecord = new EventEmitter();
|
|
803
|
+
this.form = new Form();
|
|
804
|
+
this.viewMode = FormTypeEnum.LIST;
|
|
392
805
|
this.FormTypeEnum = FormTypeEnum;
|
|
393
806
|
}
|
|
394
807
|
EqpDynamicModuleComponent.prototype.ngOnInit = function () {
|
|
395
808
|
UtilityHelperService.SetContext(this.context);
|
|
809
|
+
this.configureDefaultEndPoints();
|
|
810
|
+
this.getFormByID();
|
|
396
811
|
};
|
|
812
|
+
EqpDynamicModuleComponent.prototype.getFormByID = function () {
|
|
813
|
+
var _this = this;
|
|
814
|
+
var dynamicModuleParams = new Array();
|
|
815
|
+
dynamicModuleParams.push({
|
|
816
|
+
ParamName: "id",
|
|
817
|
+
ParamValue: this.formID,
|
|
818
|
+
ParamType: ParamTypeEnum['Query param']
|
|
819
|
+
});
|
|
820
|
+
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, function (res) {
|
|
821
|
+
_this.form = res;
|
|
822
|
+
_this.getRecordsByFormID();
|
|
823
|
+
}, function (err) {
|
|
824
|
+
console.log(err);
|
|
825
|
+
});
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
|
|
829
|
+
* a cui si deve connettere e al token da passare per autenticarsi.
|
|
830
|
+
* Se la proprietà "baseServerUrl" è null e non sono stati configurati i vari endpoint allora
|
|
831
|
+
* non viene eseguita nessuna chiamata http per recuperare/salvare i dati.
|
|
832
|
+
*/
|
|
833
|
+
EqpDynamicModuleComponent.prototype.configureDefaultEndPoints = function () {
|
|
834
|
+
if (!this.endPointConfiguration && this.baseServerUrl) {
|
|
835
|
+
this.endPointConfiguration = this.utilityHelperService.ConfigureDefaultEndPoints(this.baseServerUrl, this.userToken);
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
/**
|
|
839
|
+
* Metodo per recuperare tutti i record salvati per una particolare Form.
|
|
840
|
+
* La chiamata viene effettuata solo se è stato configurato l'endPoint da usare.
|
|
841
|
+
* La risposta della chiamata deve essere un array di oggetti di tipo "DynRecord"
|
|
842
|
+
* a partire dai quali vengono ricreati i Record usati nel client.
|
|
843
|
+
*/
|
|
844
|
+
EqpDynamicModuleComponent.prototype.getRecordsByFormID = function () {
|
|
845
|
+
var _this = this;
|
|
846
|
+
if (this.endPointConfiguration && this.endPointConfiguration.Records && this.endPointConfiguration.Records.GetByFormIDEndPoint) {
|
|
847
|
+
var dynamicModuleParams = [
|
|
848
|
+
{ ParamName: 'EntID', ParamValue: this.form.ID, ParamType: ParamTypeEnum['Query param'] }
|
|
849
|
+
];
|
|
850
|
+
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Records.GetByFormIDEndPoint, dynamicModuleParams, function (res) {
|
|
851
|
+
_this.values = new Array();
|
|
852
|
+
res.forEach(function (r) {
|
|
853
|
+
var tmpRec = new Record();
|
|
854
|
+
tmpRec = JSON.parse(r.SerializedValues);
|
|
855
|
+
tmpRec.ID = r.ID;
|
|
856
|
+
tmpRec.EntID = r.EntID;
|
|
857
|
+
_this.values.push(tmpRec);
|
|
858
|
+
});
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
/**
|
|
863
|
+
* Metodo invocato quando si vuole aggiungere, visualizzare o modificare un record.
|
|
864
|
+
* Se l'evento è null vuol dire che stiamo aggiungendo un nuovo record altrimenti siamo in modifica
|
|
865
|
+
* o visualizzazione. In questi ultimi due casi, se è stato configurato un endpoint per il recupero
|
|
866
|
+
* del record completo allora viene effettuata una chiamata al server, altrimenti viene usato l'oggetto selezionato.
|
|
867
|
+
* @param event Oggetto con due proprietà:
|
|
868
|
+
* "record" = oggetto da modificare/visualizzare,
|
|
869
|
+
* "onlyView" = booleano (se TRUE siamo in visualizzazione altrimenti in modifica)
|
|
870
|
+
*/
|
|
397
871
|
EqpDynamicModuleComponent.prototype.onAddViewEditRecord = function (event) {
|
|
872
|
+
var _this = this;
|
|
398
873
|
if (event != null) {
|
|
399
|
-
this.selectedRecord = JSON.parse(JSON.stringify(event.record));
|
|
400
874
|
this.onlyView = event.onlyView;
|
|
875
|
+
if (this.endPointConfiguration && this.endPointConfiguration.Records && this.endPointConfiguration.Records.GetByIDEndPoint) {
|
|
876
|
+
var dynamicModuleParams = [
|
|
877
|
+
{ ParamName: "id", ParamValue: event.record.ID, ParamType: ParamTypeEnum['Query param'] }
|
|
878
|
+
];
|
|
879
|
+
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Records.GetByIDEndPoint, dynamicModuleParams, function (res) {
|
|
880
|
+
_this.selectedRecord = JSON.parse(res.SerializedValues);
|
|
881
|
+
_this.selectedRecord.ID = res.ID;
|
|
882
|
+
_this.selectedRecord.EntID = res.EntID;
|
|
883
|
+
_this.viewMode = FormTypeEnum.SCALAR;
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
this.selectedRecord = JSON.parse(JSON.stringify(event.record));
|
|
888
|
+
this.viewMode = FormTypeEnum.SCALAR;
|
|
889
|
+
}
|
|
401
890
|
}
|
|
402
891
|
else {
|
|
403
892
|
this.selectedRecord = null;
|
|
404
893
|
this.onlyView = false;
|
|
894
|
+
this.viewMode = FormTypeEnum.SCALAR;
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
/**
|
|
898
|
+
* Metodo per salvare il record aggiunto o modificato.
|
|
899
|
+
* Se è stato configurato un endPoint per il salvataggio viene effettuata una chiamata al server passando l'oggeto da salvare
|
|
900
|
+
* nel body della chiamata, altrimenti scatena l'evento "saveRecord".
|
|
901
|
+
* @param event Oggetto di tipo Record da salvare.
|
|
902
|
+
*/
|
|
903
|
+
EqpDynamicModuleComponent.prototype.onSaveRecord = function (event) {
|
|
904
|
+
var _this = this;
|
|
905
|
+
var _a;
|
|
906
|
+
if (event != null && this.endPointConfiguration != null && this.endPointConfiguration.Records.SaveEndPoint) {
|
|
907
|
+
var dynRec = new DynRecord();
|
|
908
|
+
dynRec.ID = (_a = event.ID, (_a !== null && _a !== void 0 ? _a : null));
|
|
909
|
+
dynRec.EntID = this.form.ID;
|
|
910
|
+
dynRec.Values = (event !== null && event !== void 0 ? event : null);
|
|
911
|
+
var dynamicModuleParams = [
|
|
912
|
+
{ ParamName: "Record", ParamValue: dynRec, ParamType: ParamTypeEnum['In Body'] }
|
|
913
|
+
];
|
|
914
|
+
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Records.SaveEndPoint, dynamicModuleParams, function (res) {
|
|
915
|
+
_this.getRecordsByFormID();
|
|
916
|
+
_this.afterSaveRecord.emit(event);
|
|
917
|
+
_this.viewMode = FormTypeEnum.LIST;
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
else {
|
|
921
|
+
this.saveRecord.emit(event);
|
|
922
|
+
this.viewMode = FormTypeEnum.LIST;
|
|
405
923
|
}
|
|
406
|
-
this.viewMode = FormTypeEnum.SCALAR;
|
|
407
|
-
};
|
|
408
|
-
EqpDynamicModuleComponent.prototype.onSaveForm = function (event) {
|
|
409
|
-
//TODO: Salvare il record!
|
|
410
|
-
// if (event != null) {
|
|
411
|
-
// if (event.ID && this.values.find(v => v.ID == event.ID)) {
|
|
412
|
-
// this.values[this.values.findIndex(v => v.ID == event.ID)] = event;
|
|
413
|
-
// } else {
|
|
414
|
-
// this.values.push(event);
|
|
415
|
-
// }
|
|
416
|
-
// }
|
|
417
|
-
this.saveRecord.emit(event);
|
|
418
|
-
this.viewMode = FormTypeEnum.LIST;
|
|
419
924
|
};
|
|
925
|
+
/**
|
|
926
|
+
* Metodo per duplicare un record precedentemente salvato.
|
|
927
|
+
* Se è stato configurato un endPoint per la duplicazione lato server allora effettua una chiamata passando nel body
|
|
928
|
+
* un oggetto contenente il record da duplicare, altrimenti scatena l'evento di output "duplicateRecord".
|
|
929
|
+
* @param record Oggetto di tipo Record da duplicare.
|
|
930
|
+
*/
|
|
420
931
|
EqpDynamicModuleComponent.prototype.onDuplicateRecord = function (record) {
|
|
421
|
-
this
|
|
932
|
+
var _this = this;
|
|
933
|
+
if (this.endPointConfiguration && this.endPointConfiguration.Records.DuplicateEndPoint) {
|
|
934
|
+
EqpDynamicModuleDialogService.Confirm('Duplicare il record selezionato?', function () {
|
|
935
|
+
var dynamicModuleParams = [
|
|
936
|
+
{ ParamName: "id", ParamValue: record.ID, ParamType: ParamTypeEnum['Query param'] }
|
|
937
|
+
];
|
|
938
|
+
_this.utilityHelperService.RunEndPointCall(_this.endPointConfiguration.Records.DuplicateEndPoint, dynamicModuleParams, function (res) {
|
|
939
|
+
_this.getRecordsByFormID();
|
|
940
|
+
_this.afterDuplicateRecord.emit(record);
|
|
941
|
+
});
|
|
942
|
+
}, false, 'Richiesta conferma');
|
|
943
|
+
}
|
|
944
|
+
else {
|
|
945
|
+
this.duplicateRecord.emit(record);
|
|
946
|
+
}
|
|
422
947
|
};
|
|
948
|
+
/**
|
|
949
|
+
* Metodo per eliminare un record.
|
|
950
|
+
* Se è stato configurato un endPoint per l'eliminazione allora effettua una chiamata passando l'ID del record da eliminare
|
|
951
|
+
* come query param all'interno della rotta, altrimenti scatena l'evento di output "deleteRecord".
|
|
952
|
+
* @param record Oggetto di tipo Record da duplicare.
|
|
953
|
+
*/
|
|
423
954
|
EqpDynamicModuleComponent.prototype.onDeleteRecord = function (record) {
|
|
424
|
-
this
|
|
955
|
+
var _this = this;
|
|
956
|
+
if (this.endPointConfiguration && this.endPointConfiguration.Records.DeleteEndPoint) {
|
|
957
|
+
EqpDynamicModuleDialogService.Confirm('Eliminare il record selezionato?', function () {
|
|
958
|
+
var dynamicModuleParams = [
|
|
959
|
+
{ ParamName: "id", ParamValue: record.ID, ParamType: ParamTypeEnum['Query param'] }
|
|
960
|
+
];
|
|
961
|
+
_this.utilityHelperService.RunEndPointCall(_this.endPointConfiguration.Records.DeleteEndPoint, dynamicModuleParams, function (res) {
|
|
962
|
+
_this.getRecordsByFormID();
|
|
963
|
+
_this.afterDeleteRecord.emit(record);
|
|
964
|
+
});
|
|
965
|
+
}, false, 'Richiesta conferma');
|
|
966
|
+
}
|
|
967
|
+
else {
|
|
968
|
+
this.deleteRecord.emit(record);
|
|
969
|
+
}
|
|
425
970
|
};
|
|
971
|
+
EqpDynamicModuleComponent.ctorParameters = function () { return [
|
|
972
|
+
{ type: UtilityHelperService }
|
|
973
|
+
]; };
|
|
426
974
|
__decorate([
|
|
427
975
|
Input()
|
|
428
976
|
], EqpDynamicModuleComponent.prototype, "context", void 0);
|
|
429
977
|
__decorate([
|
|
430
978
|
Input()
|
|
431
|
-
], EqpDynamicModuleComponent.prototype, "
|
|
979
|
+
], EqpDynamicModuleComponent.prototype, "formID", void 0);
|
|
432
980
|
__decorate([
|
|
433
981
|
Input()
|
|
434
982
|
], EqpDynamicModuleComponent.prototype, "values", void 0);
|
|
@@ -440,7 +988,13 @@ var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
|
440
988
|
], EqpDynamicModuleComponent.prototype, "showTitle", void 0);
|
|
441
989
|
__decorate([
|
|
442
990
|
Input()
|
|
443
|
-
], EqpDynamicModuleComponent.prototype, "
|
|
991
|
+
], EqpDynamicModuleComponent.prototype, "baseServerUrl", void 0);
|
|
992
|
+
__decorate([
|
|
993
|
+
Input()
|
|
994
|
+
], EqpDynamicModuleComponent.prototype, "userToken", void 0);
|
|
995
|
+
__decorate([
|
|
996
|
+
Input()
|
|
997
|
+
], EqpDynamicModuleComponent.prototype, "endPointConfiguration", void 0);
|
|
444
998
|
__decorate([
|
|
445
999
|
Output()
|
|
446
1000
|
], EqpDynamicModuleComponent.prototype, "saveRecord", void 0);
|
|
@@ -450,10 +1004,19 @@ var EqpDynamicModuleComponent = /** @class */ (function () {
|
|
|
450
1004
|
__decorate([
|
|
451
1005
|
Output()
|
|
452
1006
|
], EqpDynamicModuleComponent.prototype, "duplicateRecord", void 0);
|
|
1007
|
+
__decorate([
|
|
1008
|
+
Output()
|
|
1009
|
+
], EqpDynamicModuleComponent.prototype, "afterSaveRecord", void 0);
|
|
1010
|
+
__decorate([
|
|
1011
|
+
Output()
|
|
1012
|
+
], EqpDynamicModuleComponent.prototype, "afterDeleteRecord", void 0);
|
|
1013
|
+
__decorate([
|
|
1014
|
+
Output()
|
|
1015
|
+
], EqpDynamicModuleComponent.prototype, "afterDuplicateRecord", void 0);
|
|
453
1016
|
EqpDynamicModuleComponent = __decorate([
|
|
454
1017
|
Component({
|
|
455
1018
|
selector: 'eqp-dynamic-module',
|
|
456
|
-
template: "<add-form-record *ngIf=\"viewMode == FormTypeEnum.SCALAR\" [form]=\"form\" [record]=\"selectedRecord\"\r\n [showButtons]=\"showButtons\" [onlyView]=\"onlyView\" (saveRecordEvent)=\"
|
|
1019
|
+
template: "<eqp-dynamic-module-spinner></eqp-dynamic-module-spinner>\r\n\r\n<add-form-record *ngIf=\"viewMode == FormTypeEnum.SCALAR\" [form]=\"form\" [record]=\"selectedRecord\"\r\n [showButtons]=\"showButtons\" [onlyView]=\"onlyView\" (saveRecordEvent)=\"onSaveRecord($event)\" [showTitle]=\"showTitle\">\r\n</add-form-record>\r\n\r\n<list-form-record *ngIf=\"viewMode == FormTypeEnum.LIST && values\" [form]=\"form\" [values]=\"values\"\r\n (onAddViewEditRecord)=\"onAddViewEditRecord($event)\" [showTitle]=\"showTitle\"\r\n (onDeleteRecord)=\"onDeleteRecord($event)\" (onDuplicateRecord)=\"onDuplicateRecord($event)\">\r\n</list-form-record>",
|
|
457
1020
|
styles: ["::ng-deep mat-form-field{width:100%}"]
|
|
458
1021
|
})
|
|
459
1022
|
], EqpDynamicModuleComponent);
|
|
@@ -536,134 +1099,83 @@ var MaterialModule = /** @class */ (function () {
|
|
|
536
1099
|
return MaterialModule;
|
|
537
1100
|
}());
|
|
538
1101
|
|
|
539
|
-
var EqpDynamicModuleDialogService = /** @class */ (function () {
|
|
540
|
-
function EqpDynamicModuleDialogService() {
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.
|
|
544
|
-
* @param message Messaggio d'errore da mostrare nello sweetalert
|
|
545
|
-
* @param title Titolo dello sweetalert (di default mostra 'Errore')
|
|
546
|
-
*/
|
|
547
|
-
EqpDynamicModuleDialogService.Error = function (message, title) {
|
|
548
|
-
if (title === void 0) { title = null; }
|
|
549
|
-
var currentTitle = title != null ? title : 'Errore';
|
|
550
|
-
if (Array.isArray(message)) {
|
|
551
|
-
currentTitle = title != null ? title : 'Errore';
|
|
552
|
-
var htmlErrors = message.join("<br>");
|
|
553
|
-
Swal.fire({
|
|
554
|
-
title: currentTitle,
|
|
555
|
-
html: htmlErrors,
|
|
556
|
-
icon: 'error'
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
else {
|
|
560
|
-
Swal.fire(currentTitle, message, 'error');
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
/**
|
|
564
|
-
* Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto
|
|
565
|
-
* CONFERMA lancia la funzione di callback passata come parametro
|
|
566
|
-
* @param message Messaggio da mostrare nello sweetalert
|
|
567
|
-
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
568
|
-
*/
|
|
569
|
-
EqpDynamicModuleDialogService.Confirm = function (message, confirmCallback, isWarning, title, customWidth) {
|
|
570
|
-
if (isWarning === void 0) { isWarning = false; }
|
|
571
|
-
if (title === void 0) { title = null; }
|
|
572
|
-
if (customWidth === void 0) { customWidth = null; }
|
|
573
|
-
var currentTitle = title != null ? title : 'Sei sicuro di voler procedere?';
|
|
574
|
-
if (Array.isArray(message)) {
|
|
575
|
-
var htmlErrors = message.join("<br>");
|
|
576
|
-
Swal.fire({
|
|
577
|
-
title: currentTitle,
|
|
578
|
-
html: htmlErrors,
|
|
579
|
-
width: customWidth ? customWidth : '32rem',
|
|
580
|
-
icon: !isWarning ? 'question' : 'warning',
|
|
581
|
-
showCancelButton: true,
|
|
582
|
-
allowOutsideClick: false,
|
|
583
|
-
allowEscapeKey: false
|
|
584
|
-
}).then(function (result) {
|
|
585
|
-
if (result.value && confirmCallback) {
|
|
586
|
-
confirmCallback();
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
else {
|
|
591
|
-
Swal.fire({
|
|
592
|
-
title: currentTitle,
|
|
593
|
-
text: message,
|
|
594
|
-
width: customWidth ? customWidth : '32rem',
|
|
595
|
-
icon: !isWarning ? 'question' : 'warning',
|
|
596
|
-
showCancelButton: true,
|
|
597
|
-
allowOutsideClick: false,
|
|
598
|
-
allowEscapeKey: false
|
|
599
|
-
}).then(function (result) {
|
|
600
|
-
if (result.value && confirmCallback) {
|
|
601
|
-
confirmCallback();
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
/**
|
|
607
|
-
* Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro
|
|
608
|
-
* @param message Messaggio da mostrare nello sweetalert
|
|
609
|
-
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
610
|
-
*/
|
|
611
|
-
EqpDynamicModuleDialogService.Info = function (message, title, isToast) {
|
|
612
|
-
if (title === void 0) { title = null; }
|
|
613
|
-
if (isToast === void 0) { isToast = null; }
|
|
614
|
-
var currentTitle = title != null ? title : "Informazione:";
|
|
615
|
-
Swal.fire(currentTitle, message, 'info');
|
|
616
|
-
};
|
|
617
|
-
/**
|
|
618
|
-
* Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro
|
|
619
|
-
* @param message Messaggio da mostrare nello sweetalert
|
|
620
|
-
* @param title Titolo dello sweetalert (di default mostra 'Attenzione!')
|
|
621
|
-
*/
|
|
622
|
-
EqpDynamicModuleDialogService.Warning = function (message, title, isToast) {
|
|
623
|
-
if (title === void 0) { title = null; }
|
|
624
|
-
if (isToast === void 0) { isToast = null; }
|
|
625
|
-
var currentTitle = title != null ? title : "Attenzione!";
|
|
626
|
-
if (Array.isArray(message)) {
|
|
627
|
-
var htmlWarnings = message.join("<br>");
|
|
628
|
-
Swal.fire({
|
|
629
|
-
title: currentTitle,
|
|
630
|
-
html: htmlWarnings,
|
|
631
|
-
icon: 'warning'
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
else {
|
|
635
|
-
Swal.fire(currentTitle, message, 'warning');
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
EqpDynamicModuleDialogService.ɵprov = ɵɵdefineInjectable({ factory: function EqpDynamicModuleDialogService_Factory() { return new EqpDynamicModuleDialogService(); }, token: EqpDynamicModuleDialogService, providedIn: "root" });
|
|
639
|
-
EqpDynamicModuleDialogService = __decorate([
|
|
640
|
-
Injectable({
|
|
641
|
-
providedIn: 'root'
|
|
642
|
-
})
|
|
643
|
-
], EqpDynamicModuleDialogService);
|
|
644
|
-
return EqpDynamicModuleDialogService;
|
|
645
|
-
}());
|
|
646
|
-
|
|
647
1102
|
var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
648
|
-
function EqpDynamicModuleConfiguratorComponent(formBuilder, dialog) {
|
|
1103
|
+
function EqpDynamicModuleConfiguratorComponent(formBuilder, dialog, utilityHelperService) {
|
|
649
1104
|
this.formBuilder = formBuilder;
|
|
650
1105
|
this.dialog = dialog;
|
|
1106
|
+
this.utilityHelperService = utilityHelperService;
|
|
651
1107
|
this.context = new Context();
|
|
652
1108
|
this.form = new Form();
|
|
1109
|
+
this.formID = null;
|
|
653
1110
|
this.innerFormManagment = false;
|
|
1111
|
+
/**
|
|
1112
|
+
* Url del server da chiamare per recuerare, salvare o eliminare i record.
|
|
1113
|
+
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
1114
|
+
*/
|
|
1115
|
+
this.baseServerUrl = null;
|
|
1116
|
+
/**
|
|
1117
|
+
* Token da usare negli endpoint da chiamare per recuperare o salvare i record.
|
|
1118
|
+
* Usato solo se viene popolata la proprietà "baseServerUrl".
|
|
1119
|
+
*/
|
|
1120
|
+
this.userToken = null;
|
|
1121
|
+
/**
|
|
1122
|
+
* Configurazione degli endpoint da chiamare per recuperare o salvare i dati.
|
|
1123
|
+
* Può essere definita dall'utente oppure lasciata null, viene popolata con dei
|
|
1124
|
+
* valori di default se viene valorizzata la proprietà "baseServerUrl" altrimenti
|
|
1125
|
+
* viene lasciata null e non viene eseguita nessuna chiamata al server.
|
|
1126
|
+
*/
|
|
1127
|
+
this.endPointConfiguration = null;
|
|
654
1128
|
this.formCompleted = false;
|
|
655
1129
|
//#region Enumeratori usati nell'html
|
|
656
1130
|
this.FormTypeEnum = FormTypeEnum;
|
|
657
1131
|
this.FormScalarTypeEnum = FormScalarTypeEnum;
|
|
658
1132
|
//#endregion
|
|
1133
|
+
/**
|
|
1134
|
+
* Evento emesso quando si salva una form e non è stato specificato un endpoint da chiamare.
|
|
1135
|
+
*/
|
|
659
1136
|
this.saveFormEvent = new EventEmitter();
|
|
1137
|
+
/**
|
|
1138
|
+
* Evento emesso DOPO aver eseguito una chiamata al server per il salvataggiodi una form all'endpoint specificato.
|
|
1139
|
+
*/
|
|
1140
|
+
this.afterSaveFormEvent = new EventEmitter();
|
|
660
1141
|
}
|
|
661
1142
|
EqpDynamicModuleConfiguratorComponent.prototype.ngOnInit = function () {
|
|
1143
|
+
this.configureDefaultEndPoints();
|
|
1144
|
+
this.getFormByID();
|
|
662
1145
|
if (this.context) {
|
|
663
1146
|
UtilityHelperService.SetContext(this.context);
|
|
664
1147
|
}
|
|
665
|
-
|
|
666
|
-
|
|
1148
|
+
};
|
|
1149
|
+
/**
|
|
1150
|
+
* Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
|
|
1151
|
+
* a cui si deve connettere e al token da passare per autenticarsi.
|
|
1152
|
+
* Se la proprietà baseServerUrl è null e non sono stati configurati i vari endpoint allora
|
|
1153
|
+
* non viene eseguita nessuna chiamata http per recuperare/salvare i dati.
|
|
1154
|
+
*/
|
|
1155
|
+
EqpDynamicModuleConfiguratorComponent.prototype.configureDefaultEndPoints = function () {
|
|
1156
|
+
if (!this.endPointConfiguration && this.baseServerUrl) {
|
|
1157
|
+
this.endPointConfiguration = this.utilityHelperService.ConfigureDefaultEndPoints(this.baseServerUrl, this.userToken);
|
|
1158
|
+
if (this.formID) {
|
|
1159
|
+
this.endPointConfiguration.Forms.GetByIDEndPoint.Params = [{ ParamName: 'id', ParamValue: this.formID, ParamType: ParamTypeEnum['Query param'] }];
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
/**
|
|
1164
|
+
* Metodo per recuperare tutti i record salvati per una particolare Form.
|
|
1165
|
+
* La chiamata viene effettuata solo se è stato configurato l'endPoint da usare.
|
|
1166
|
+
*/
|
|
1167
|
+
EqpDynamicModuleConfiguratorComponent.prototype.getFormByID = function () {
|
|
1168
|
+
var _this = this;
|
|
1169
|
+
if (this.formID && this.endPointConfiguration && this.endPointConfiguration.Forms && this.endPointConfiguration.Forms.GetByIDEndPoint) {
|
|
1170
|
+
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, null, function (res) {
|
|
1171
|
+
_this.setFormAndConfigure(res);
|
|
1172
|
+
}, function (err) {
|
|
1173
|
+
_this.setFormAndConfigure(new Form());
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1177
|
+
this.setFormAndConfigure();
|
|
1178
|
+
}
|
|
667
1179
|
};
|
|
668
1180
|
/**
|
|
669
1181
|
* Metodo invocato al cambio del tipo di visualizzazione della form.
|
|
@@ -939,10 +1451,54 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
939
1451
|
}
|
|
940
1452
|
};
|
|
941
1453
|
/**
|
|
942
|
-
* Metodo
|
|
1454
|
+
* Metodo per salvare la form creata alla fine del wizard.
|
|
1455
|
+
* Se è stato configurato un endPoint per il salvataggio viene effettuata una chiamata al server passando l'oggeto da salvare
|
|
1456
|
+
* nel body della chiamata, altrimenti scatena l'evento "saveFormEvent".
|
|
1457
|
+
* NOTA: Per comunicare correttamente con la parte server del modulo dinamico bisogna modificare l'array dei Fields.
|
|
1458
|
+
* Al posto di passare un array di BaseField bisogna passare un array di oggetti del tipo { FieldType: FieldTypeEnum, Value: BaseField }.
|
|
943
1459
|
*/
|
|
944
1460
|
EqpDynamicModuleConfiguratorComponent.prototype.saveForm = function () {
|
|
945
|
-
this
|
|
1461
|
+
var _this = this;
|
|
1462
|
+
if (this.endPointConfiguration != null && this.endPointConfiguration.Forms.SaveEndPoint) {
|
|
1463
|
+
// Copio la form da salvare per riwrappare i Fields in oggetti del tipo { FieldType: FieldTypeEnum, Value: BaseField }.
|
|
1464
|
+
// Necessario per far funzionare correttamente il FieldConverter del server.
|
|
1465
|
+
var formToSave_1 = JSON.parse(JSON.stringify(this.form));
|
|
1466
|
+
/*formToSave.Fields = [];
|
|
1467
|
+
this.form.Fields.forEach(field => {
|
|
1468
|
+
formToSave.Fields.push({
|
|
1469
|
+
FieldType: field.FieldType,
|
|
1470
|
+
Value: JSON.parse(JSON.stringify(field))
|
|
1471
|
+
});
|
|
1472
|
+
});*/
|
|
1473
|
+
formToSave_1.Fields = [];
|
|
1474
|
+
this.form.Fields.forEach(function (field) {
|
|
1475
|
+
var fld = UtilityHelperService.GetFieldType(field);
|
|
1476
|
+
formToSave_1.Fields.push(fld);
|
|
1477
|
+
});
|
|
1478
|
+
var dynamicModuleParams = [
|
|
1479
|
+
{ ParamName: "Form", ParamValue: formToSave_1, ParamType: ParamTypeEnum['In Body'] }
|
|
1480
|
+
];
|
|
1481
|
+
this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.SaveEndPoint, dynamicModuleParams, function (res) {
|
|
1482
|
+
EqpDynamicModuleDialogService.Success("Form salvata con successo!");
|
|
1483
|
+
_this.afterSaveFormEvent.emit(_this.form);
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
else {
|
|
1487
|
+
this.saveFormEvent.emit(this.form);
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
//#region FUNZIONI PRIVATE
|
|
1491
|
+
/**
|
|
1492
|
+
* Metodo per impostare la form e configurare colonne/FormGourp.
|
|
1493
|
+
* @param form Form da utilizzare.
|
|
1494
|
+
*/
|
|
1495
|
+
EqpDynamicModuleConfiguratorComponent.prototype.setFormAndConfigure = function (form) {
|
|
1496
|
+
if (form === void 0) { form = null; }
|
|
1497
|
+
if (form != null) {
|
|
1498
|
+
this.form = form;
|
|
1499
|
+
}
|
|
1500
|
+
this.configureColumns();
|
|
1501
|
+
this.createFormForm();
|
|
946
1502
|
};
|
|
947
1503
|
/**
|
|
948
1504
|
* Configura le colonne per le tabelle necessarie alla creazione della form:
|
|
@@ -1136,7 +1692,8 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
1136
1692
|
};
|
|
1137
1693
|
EqpDynamicModuleConfiguratorComponent.ctorParameters = function () { return [
|
|
1138
1694
|
{ type: FormBuilder },
|
|
1139
|
-
{ type: MatDialog }
|
|
1695
|
+
{ type: MatDialog },
|
|
1696
|
+
{ type: UtilityHelperService }
|
|
1140
1697
|
]; };
|
|
1141
1698
|
__decorate([
|
|
1142
1699
|
Input()
|
|
@@ -1144,9 +1701,21 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
1144
1701
|
__decorate([
|
|
1145
1702
|
Input()
|
|
1146
1703
|
], EqpDynamicModuleConfiguratorComponent.prototype, "form", void 0);
|
|
1704
|
+
__decorate([
|
|
1705
|
+
Input()
|
|
1706
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "formID", void 0);
|
|
1147
1707
|
__decorate([
|
|
1148
1708
|
Input()
|
|
1149
1709
|
], EqpDynamicModuleConfiguratorComponent.prototype, "innerFormManagment", void 0);
|
|
1710
|
+
__decorate([
|
|
1711
|
+
Input()
|
|
1712
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "baseServerUrl", void 0);
|
|
1713
|
+
__decorate([
|
|
1714
|
+
Input()
|
|
1715
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "userToken", void 0);
|
|
1716
|
+
__decorate([
|
|
1717
|
+
Input()
|
|
1718
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "endPointConfiguration", void 0);
|
|
1150
1719
|
__decorate([
|
|
1151
1720
|
ViewChild('fieldsTable', { static: false })
|
|
1152
1721
|
], EqpDynamicModuleConfiguratorComponent.prototype, "fieldsTable", void 0);
|
|
@@ -1168,10 +1737,13 @@ var EqpDynamicModuleConfiguratorComponent = /** @class */ (function () {
|
|
|
1168
1737
|
__decorate([
|
|
1169
1738
|
Output()
|
|
1170
1739
|
], EqpDynamicModuleConfiguratorComponent.prototype, "saveFormEvent", void 0);
|
|
1740
|
+
__decorate([
|
|
1741
|
+
Output()
|
|
1742
|
+
], EqpDynamicModuleConfiguratorComponent.prototype, "afterSaveFormEvent", void 0);
|
|
1171
1743
|
EqpDynamicModuleConfiguratorComponent = __decorate([
|
|
1172
1744
|
Component({
|
|
1173
1745
|
selector: 'eqp-dynamic-module-configurator',
|
|
1174
|
-
template: "<mat-horizontal-stepper linear #stepper>\r\n <!-- DATI GENERALI DELLA FORM -->\r\n <mat-step [stepControl]=\"formFormGroup\">\r\n <form [formGroup]=\"formFormGroup\" (keydown.enter)=\"false\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Dati generali della form\r\n </ng-template>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <mat-form-field>\r\n <mat-label>Nome</mat-label>\r\n <input matInput formControlName=\"Name\" [(ngModel)]=\"form.Name\" required>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-md-4\">\r\n <eqp-select [enumData]=\"FormScalarTypeEnum\" [(ngModelInput)]=\"form.FormScalarType\"\r\n [isRequired]=\"true\" [showCancelButton]=\"false\" placeholder=\"Tipo di visualizzazione\"\r\n [formGroupInput]=\"formFormGroup\" [formControlNameInput]=\"'FormScalarType'\"\r\n (ngModelInputChange)=\"onChangeFormScalarType()\">\r\n </eqp-select>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"form.FormScalarType && form.FormScalarType != FormScalarTypeEnum.Semplice\">\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Nome sezione (invio per confermare) </mat-label>\r\n <input matInput [(ngModel)]=\"formFieldGroupName\" [ngModelOptions]=\"{standalone: true}\"\r\n (keyup)=\"onFormFieldGroupNameKeyUp($event)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <span class=\"mr-3\">Sezioni inserite:</span>\r\n <ul class=\"section-list\">\r\n <li *ngFor=\"let groupName of form.FormFieldsGroups, let i=index\">\r\n <mat-icon class=\"mr-1\" (click)=\"onDeleteFormFieldGroupName(groupName.Name)\">close\r\n </mat-icon>\r\n <span> {{i+1}}) {{groupName.Name}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button mat-raised-button color=\"primary\" matStepperNext\r\n [disabled]=\"formFormGroup.invalid\">Successivo</button>\r\n </div>\r\n </form>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DEI CAMPI DELLA FORM -->\r\n <mat-step [completed]=\"isFieldStepCompleted()\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Campi da inserire\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\" (click)=\"openFieldDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi campo</span>\r\n </button>\r\n\r\n <button class=\"btn btn-primary ml-2\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openInnerFormDialog()\" *ngIf=\"!innerFormManagment\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi form di dettaglio</span>\r\n </button>\r\n </div>\r\n\r\n <eqp-table #fieldsTable [createMatCard]=\"false\" [columns]=\"fieldsColumns\" [data]=\"form.Fields\"\r\n [emptyTableMessage]=\"'Nessun campo inserito'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext [disabled]=\"!isFieldStepCompleted()\"\r\n (click)=\"setFormStatus(false)\">Successivo</button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DELLE OPERAZIONI SUI RECORD -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Azioni aggiuntive sui record\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openActionOnRecordDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi azione</span>\r\n </button>\r\n </div>\r\n <eqp-table #actionsOnRecordTable [createMatCard]=\"false\" [columns]=\"actionsOnRecordColumns\"\r\n [data]=\"form.ActionsOnRecord\" [emptyTableMessage]=\"'Nessuna action inserita'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext (click)=\"setFormStatus(true)\">\r\n Successivo\r\n </button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- VISUALIZZAZIONE FORM CREATA -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\"\r\n (click)=\"setFormStatus(formFormGroup.valid && form.Fields && form.Fields.length > 0)\"></div>\r\n Riepilogo\r\n </ng-template>\r\n\r\n <eqp-dynamic-module [form]=\"previewForm\" *ngIf=\"previewForm && formCompleted\" [showButtons]=\"false\"\r\n [viewMode]=\"FormTypeEnum.SCALAR\"></eqp-dynamic-module>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious (click)=\"setFormStatus(false)\">Precedente</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"saveForm()\">Salva form</button>\r\n </div>\r\n </mat-step>\r\n</mat-horizontal-stepper>\r\n\r\n<div class=\"row\" *ngIf=\"innerFormManagment\">\r\n <div class=\"col-md-12 text-right\">\r\n <button mat-raised-button (click)=\"saveFormEvent.emit(null)\">Esci</button>\r\n </div>\r\n</div>\r\n\r\n<!-- DIALOG AGGIUNTA/MODIFICA CAMPO -->\r\n<ng-template #dialogField>\r\n <eqp-dynamic-module-add-form-field [field]=\"selectedField\" [indexField]=\"indexSelectedField\"\r\n (saveFieldEvent)=\"onSaveField($event)\" [availableFields]=\"form.Fields\"\r\n [formFieldsGroups]=\"form.FormScalarType != FormScalarTypeEnum.Semplice ? form.FormFieldsGroups : null\">\r\n </eqp-dynamic-module-add-form-field>\r\n</ng-template>\r\n\r\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\r\n<ng-template #fieldSectionColumnTemplate let-row=\"row\">\r\n <eqp-select [arrayData]=\"form.FormFieldsGroups\" [(ngModelInput)]=\"row.FieldGroup\" [arrayKeyProperty]=\"'Name'\"\r\n [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\" [isRequired]=\"true\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n</ng-template>\r\n\r\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE UNA ACTION SUI RECORD DELLA FORM -->\r\n<ng-template #dialogActionOnRecord>\r\n <div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"actionOnRecordFormGroup\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">{{indexSelectedAction != null && indexSelectedAction >= 0 ?\r\n \"Modifica\"\r\n : \"Aggiungi\"}} azione sul record</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Nome </mat-label>\r\n <input formControlName=\"Name\" required matInput [(ngModel)]=\"selectedAction.Name\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Icona </mat-label>\r\n <input formControlName=\"Icon\" required matInput [(ngModel)]=\"selectedAction.Icon\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-12 mt-2\">\r\n <mat-form-field>\r\n <textarea matInput [placeholder]=\"'Azione (Javascript)'\" [rows]=\"3\" formControlName=\"Action\"\r\n required [(ngModel)]=\"selectedAction.Action\" [matAutocomplete]=\"actionAutocomplete\"\r\n (keyup)=\"setActionAutocompleteOptions($event)\"\r\n (focus)=\"setActionAutocompleteOptions(null)\"></textarea>\r\n <mat-autocomplete #actionAutocomplete=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of actionAutocompleteOptions\" [value]=\"option.value\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveActionOnRecord()\"\r\n [disabled]=\"actionOnRecordFormGroup.invalid\" type=\"button\">\r\n Salva\r\n </button>\r\n <button class=\"btn mat-raised-button\" (click)=\"closeDialogActionOnRecord()\" type=\"button\">\r\n Esci\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dialogInnerForm>\r\n <eqp-dynamic-module-configurator [form]=\"selectedInnerForm\" [innerFormManagment]=\"true\"\r\n (saveFormEvent)=\"onSaveOrExitInnerForm($event)\"></eqp-dynamic-module-configurator>\r\n</ng-template>",
|
|
1746
|
+
template: "<eqp-dynamic-module-spinner></eqp-dynamic-module-spinner>\r\n\r\n<mat-horizontal-stepper linear #stepper>\r\n <!-- DATI GENERALI DELLA FORM -->\r\n <mat-step [stepControl]=\"formFormGroup\">\r\n <form [formGroup]=\"formFormGroup\" (keydown.enter)=\"false\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Dati generali della form\r\n </ng-template>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <mat-form-field>\r\n <mat-label>Nome</mat-label>\r\n <input matInput formControlName=\"Name\" [(ngModel)]=\"form.Name\" required>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-md-4\">\r\n <eqp-select [enumData]=\"FormScalarTypeEnum\" [(ngModelInput)]=\"form.FormScalarType\"\r\n [isRequired]=\"true\" [showCancelButton]=\"false\" placeholder=\"Tipo di visualizzazione\"\r\n [formGroupInput]=\"formFormGroup\" [formControlNameInput]=\"'FormScalarType'\"\r\n (ngModelInputChange)=\"onChangeFormScalarType()\">\r\n </eqp-select>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"form.FormScalarType && form.FormScalarType != FormScalarTypeEnum.Semplice\">\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Nome sezione (invio per confermare) </mat-label>\r\n <input matInput [(ngModel)]=\"formFieldGroupName\" [ngModelOptions]=\"{standalone: true}\"\r\n (keyup)=\"onFormFieldGroupNameKeyUp($event)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <span class=\"mr-3\">Sezioni inserite:</span>\r\n <ul class=\"section-list\">\r\n <li *ngFor=\"let groupName of form.FormFieldsGroups, let i=index\">\r\n <mat-icon class=\"mr-1\" (click)=\"onDeleteFormFieldGroupName(groupName.Name)\">close\r\n </mat-icon>\r\n <span> {{i+1}}) {{groupName.Name}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button mat-raised-button color=\"primary\" matStepperNext\r\n [disabled]=\"formFormGroup.invalid\">Successivo</button>\r\n </div>\r\n </form>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DEI CAMPI DELLA FORM -->\r\n <mat-step [completed]=\"isFieldStepCompleted()\">\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Campi da inserire\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\" (click)=\"openFieldDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi campo</span>\r\n </button>\r\n\r\n <button class=\"btn btn-primary ml-2\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openInnerFormDialog()\" *ngIf=\"!innerFormManagment\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi form di dettaglio</span>\r\n </button>\r\n </div>\r\n\r\n <eqp-table #fieldsTable [createMatCard]=\"false\" [columns]=\"fieldsColumns\" [data]=\"form.Fields\"\r\n [emptyTableMessage]=\"'Nessun campo inserito'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext [disabled]=\"!isFieldStepCompleted()\"\r\n (click)=\"setFormStatus(false)\">Successivo</button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- AGGIUNTA DELLE OPERAZIONI SUI RECORD -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\" (click)=\"setFormStatus(false)\"></div>\r\n Azioni aggiuntive sui record\r\n </ng-template>\r\n\r\n <div class=\"row justify-content-end\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openActionOnRecordDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi azione</span>\r\n </button>\r\n </div>\r\n <eqp-table #actionsOnRecordTable [createMatCard]=\"false\" [columns]=\"actionsOnRecordColumns\"\r\n [data]=\"form.ActionsOnRecord\" [emptyTableMessage]=\"'Nessuna action inserita'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious>Precedente</button>\r\n <button mat-raised-button color=\"primary\" matStepperNext (click)=\"setFormStatus(true)\">\r\n Successivo\r\n </button>\r\n </div>\r\n </mat-step>\r\n\r\n <!-- VISUALIZZAZIONE FORM CREATA -->\r\n <mat-step>\r\n <ng-template matStepLabel>\r\n <div class=\"stepper-header-overlay\"\r\n (click)=\"setFormStatus(formFormGroup.valid && form.Fields && form.Fields.length > 0)\"></div>\r\n Anteprima\r\n </ng-template>\r\n\r\n <add-form-record *ngIf=\"previewForm && formCompleted\" [form]=\"previewForm\" [showButtons]=\"false\">\r\n </add-form-record>\r\n\r\n\r\n <div class=\"mt-2 d-flex justify-content-end\">\r\n <button class=\"mr-2\" mat-raised-button matStepperPrevious (click)=\"setFormStatus(false)\">Precedente</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"saveForm()\">Salva form</button>\r\n </div>\r\n </mat-step>\r\n</mat-horizontal-stepper>\r\n\r\n<div class=\"row\" *ngIf=\"innerFormManagment\">\r\n <div class=\"col-md-12 text-right\">\r\n <button mat-raised-button (click)=\"saveFormEvent.emit(null)\">Esci</button>\r\n </div>\r\n</div>\r\n\r\n<!-- DIALOG AGGIUNTA/MODIFICA CAMPO -->\r\n<ng-template #dialogField>\r\n <eqp-dynamic-module-add-form-field [field]=\"selectedField\" [indexField]=\"indexSelectedField\"\r\n (saveFieldEvent)=\"onSaveField($event)\" [availableFields]=\"form.Fields\"\r\n [formFieldsGroups]=\"form.FormScalarType != FormScalarTypeEnum.Semplice ? form.FormFieldsGroups : null\">\r\n </eqp-dynamic-module-add-form-field>\r\n</ng-template>\r\n\r\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\r\n<ng-template #fieldSectionColumnTemplate let-row=\"row\">\r\n <eqp-select [arrayData]=\"form.FormFieldsGroups\" [(ngModelInput)]=\"row.FieldGroup\" [arrayKeyProperty]=\"'Name'\"\r\n [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\" [isRequired]=\"true\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n</ng-template>\r\n\r\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE UNA ACTION SUI RECORD DELLA FORM -->\r\n<ng-template #dialogActionOnRecord>\r\n <div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"actionOnRecordFormGroup\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">{{indexSelectedAction != null && indexSelectedAction >= 0 ?\r\n \"Modifica\"\r\n : \"Aggiungi\"}} azione sul record</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Nome </mat-label>\r\n <input formControlName=\"Name\" required matInput [(ngModel)]=\"selectedAction.Name\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Icona </mat-label>\r\n <input formControlName=\"Icon\" required matInput [(ngModel)]=\"selectedAction.Icon\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-12 mt-2\">\r\n <mat-form-field>\r\n <textarea matInput [placeholder]=\"'Azione (Javascript)'\" [rows]=\"3\" formControlName=\"Action\"\r\n required [(ngModel)]=\"selectedAction.Action\" [matAutocomplete]=\"actionAutocomplete\"\r\n (keyup)=\"setActionAutocompleteOptions($event)\"\r\n (focus)=\"setActionAutocompleteOptions(null)\"></textarea>\r\n <mat-autocomplete #actionAutocomplete=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of actionAutocompleteOptions\" [value]=\"option.value\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveActionOnRecord()\"\r\n [disabled]=\"actionOnRecordFormGroup.invalid\" type=\"button\">\r\n Salva\r\n </button>\r\n <button class=\"btn mat-raised-button\" (click)=\"closeDialogActionOnRecord()\" type=\"button\">\r\n Esci\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- TEMPLATE PER CONFIGURARE LE FORM DI DETTAGLIO -->\r\n<ng-template #dialogInnerForm>\r\n <eqp-dynamic-module-configurator [form]=\"selectedInnerForm\" [innerFormManagment]=\"true\"\r\n (saveFormEvent)=\"onSaveOrExitInnerForm($event)\"></eqp-dynamic-module-configurator>\r\n</ng-template>",
|
|
1175
1747
|
styles: ["::ng-deep mat-form-field{width:100%}.stepper-header-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.section-list{list-style:none;padding:0}.section-list mat-icon{vertical-align:middle;font-size:15px;height:15px;width:15px;color:var(--danger);margin-right:10px;cursor:pointer}.danger-color{color:var(--danger)}"]
|
|
1176
1748
|
})
|
|
1177
1749
|
], EqpDynamicModuleConfiguratorComponent);
|
|
@@ -1243,6 +1815,11 @@ var ListValueField = /** @class */ (function (_super) {
|
|
|
1243
1815
|
}
|
|
1244
1816
|
return ListValueField;
|
|
1245
1817
|
}(BaseField));
|
|
1818
|
+
var ButtonImage = /** @class */ (function () {
|
|
1819
|
+
function ButtonImage() {
|
|
1820
|
+
}
|
|
1821
|
+
return ButtonImage;
|
|
1822
|
+
}());
|
|
1246
1823
|
var ListPresentationEnum;
|
|
1247
1824
|
(function (ListPresentationEnum) {
|
|
1248
1825
|
ListPresentationEnum[ListPresentationEnum["Combo box"] = 1] = "Combo box";
|
|
@@ -1253,10 +1830,11 @@ var ListPresentationEnum;
|
|
|
1253
1830
|
|
|
1254
1831
|
var AddFormFieldComponent = /** @class */ (function () {
|
|
1255
1832
|
//#endregion
|
|
1256
|
-
function AddFormFieldComponent(formBuilder, enumHelper, dialog) {
|
|
1833
|
+
function AddFormFieldComponent(formBuilder, enumHelper, dialog, cdr) {
|
|
1257
1834
|
this.formBuilder = formBuilder;
|
|
1258
1835
|
this.enumHelper = enumHelper;
|
|
1259
1836
|
this.dialog = dialog;
|
|
1837
|
+
this.cdr = cdr;
|
|
1260
1838
|
this.fieldTypesToExclude = [FieldTypeEnum['Form di dettaglio']];
|
|
1261
1839
|
this.keyValueObject = { key: '', value: '' };
|
|
1262
1840
|
this.availableColSpanSizes = [];
|
|
@@ -1269,6 +1847,8 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1269
1847
|
this.BoolPresentantioEnum = BoolPresentantioEnum;
|
|
1270
1848
|
this.DateTimeTypeEnum = DateTimeTypeEnum;
|
|
1271
1849
|
this.ListPresentationEnum = ListPresentationEnum;
|
|
1850
|
+
this.TextMaskEnum = TextMaskEnum;
|
|
1851
|
+
this.AttachmentType = AttachmentType;
|
|
1272
1852
|
}
|
|
1273
1853
|
AddFormFieldComponent.prototype.ngOnInit = function () {
|
|
1274
1854
|
var _this = this;
|
|
@@ -1307,7 +1887,7 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1307
1887
|
Required: [this.field.Required],
|
|
1308
1888
|
FieldType: [this.field.FieldType, Validators.required],
|
|
1309
1889
|
Formula: [this.field.Formula],
|
|
1310
|
-
|
|
1890
|
+
ColSpanSizes: [this.field.ColSpanSizes],
|
|
1311
1891
|
InListView: [this.field.InListView],
|
|
1312
1892
|
});
|
|
1313
1893
|
if (this.formFieldsGroups) {
|
|
@@ -1326,7 +1906,7 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1326
1906
|
if (restoreField)
|
|
1327
1907
|
this.restoreBaseFieldProperties();
|
|
1328
1908
|
this.createFieldForm();
|
|
1329
|
-
this.
|
|
1909
|
+
this.onColSpanSizeSelect();
|
|
1330
1910
|
this.fieldTypeFormTemplate = null;
|
|
1331
1911
|
switch (this.field.FieldType) {
|
|
1332
1912
|
case FieldTypeEnum['Campo di testo']:
|
|
@@ -1350,13 +1930,16 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1350
1930
|
this.fieldFormGroup.addControl('IsOnlyDate', new FormControl(this.field.IsOnlyDate, Validators.required));
|
|
1351
1931
|
this.fieldFormGroup.addControl('MinDate', new FormControl(this.field.MinDate));
|
|
1352
1932
|
this.fieldFormGroup.addControl('MaxDate', new FormControl(this.field.MaxDate));
|
|
1933
|
+
this.fieldFormGroup.addControl('DateFormat', new FormControl(this.field.DateFormat));
|
|
1353
1934
|
this.fieldTypeFormTemplate = this.dateFieldFormTemplate;
|
|
1354
1935
|
break;
|
|
1355
1936
|
case FieldTypeEnum['Campo numerico']:
|
|
1356
1937
|
this.fieldFormGroup.addControl('IsInteger', new FormControl(this.field.IsInteger));
|
|
1357
1938
|
this.fieldFormGroup.addControl('MinValue', new FormControl(this.field.MinValue));
|
|
1358
1939
|
this.fieldFormGroup.addControl('MaxValue', new FormControl(this.field.MaxValue));
|
|
1359
|
-
this.fieldFormGroup.addControl('
|
|
1940
|
+
this.fieldFormGroup.addControl('DecimalSeparator', new FormControl(this.field.DecimalSeparator));
|
|
1941
|
+
this.fieldFormGroup.addControl('DecimalPrecision', new FormControl(this.field.DecimalPrecision));
|
|
1942
|
+
this.fieldFormGroup.addControl('ThousandsSeparator', new FormControl(this.field.ThousandsSeparator));
|
|
1360
1943
|
this.fieldFormGroup.addControl('CurrencySymbol', new FormControl(this.field.CurrencySymbol));
|
|
1361
1944
|
this.fieldTypeFormTemplate = this.numericFieldFormTemplate;
|
|
1362
1945
|
break;
|
|
@@ -1440,17 +2023,50 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1440
2023
|
* seleziona la classe "col-sm-6", al change del valore questo metodo rimuove dalla select
|
|
1441
2024
|
* tutti gli altri valori per la grandezza di schermo selezionata.
|
|
1442
2025
|
*/
|
|
1443
|
-
AddFormFieldComponent.prototype.
|
|
2026
|
+
AddFormFieldComponent.prototype.onColSpanSizeSelect = function () {
|
|
1444
2027
|
// Recupero l'array degli oggetti chiave-valore che rappreseta l'enumeratore
|
|
1445
2028
|
var colSizeClassEnumArray = this.enumHelper.getEnumArray(ColSpanSizesEnum, false, null);
|
|
1446
2029
|
// Costruisco l'array delle classi selezionate dall'utente in formato stringa
|
|
1447
|
-
var selectedDimensions = this.field.
|
|
2030
|
+
var selectedDimensions = this.field.ColSpanSizes ? this.field.ColSpanSizes.map(function (col) { return ColSpanSizesEnum[col]; }) : [];
|
|
1448
2031
|
// Filtro i valori ottenuti dall'enumeratore per escludere tutti i valori per le
|
|
1449
2032
|
// grandezze di schermo già selezionatead esclusione dei valori selezionati.
|
|
1450
2033
|
this.availableColSpanSizes = colSizeClassEnumArray.filter(function (value) {
|
|
1451
2034
|
return !selectedDimensions.find(function (col) { return value.value.includes(col.substring(4, 6)) && value.value != col; });
|
|
1452
2035
|
});
|
|
1453
2036
|
};
|
|
2037
|
+
/**
|
|
2038
|
+
* Metodo invocato al cambio del tipo di visualizzazione scelta per i campi di tipo elenco generico.
|
|
2039
|
+
* Se viene scelta la visualizzazione ad immagini svuota la lista delle coppie chiave-valore inserite
|
|
2040
|
+
* in precedenza, altrimenti svuota la lista delle immagini caricate.
|
|
2041
|
+
*/
|
|
2042
|
+
AddFormFieldComponent.prototype.onPresentationModeChange = function () {
|
|
2043
|
+
if (this.field.PresentationMode === ListPresentationEnum.Immagini) {
|
|
2044
|
+
this.field.ValuePairs = null;
|
|
2045
|
+
}
|
|
2046
|
+
else {
|
|
2047
|
+
this.field.ButtonImageList = null;
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
2050
|
+
/**
|
|
2051
|
+
* Metodo invocato quando viene caricato il componente eqp-attachments per caricare le immagini da usare
|
|
2052
|
+
* nella visualizzazione ad immagini dei campi di tipo "Elenco generico". Aggiunge due colonne a quelle
|
|
2053
|
+
* configurate nel componente in cui l'utente può indicare chiave e valore della scelta.
|
|
2054
|
+
* @param component Istanza del componente eqp-attachments in cui effettuare la modifica.
|
|
2055
|
+
*/
|
|
2056
|
+
AddFormFieldComponent.prototype.configureButtonImagesColumns = function (component) {
|
|
2057
|
+
component.attachmentsColumns.splice(component.attachmentsColumns.length - 1, 0, { key: "ButtonKey", display: "Label", type: TypeColumn.ExternalTemplate, externalTemplate: this.buttonImagesKeyValueInputColumn });
|
|
2058
|
+
component.attachmentsColumns.splice(component.attachmentsColumns.length - 1, 0, { key: "ButtonValue", display: "Valore", type: TypeColumn.ExternalTemplate, externalTemplate: this.buttonImagesKeyValueInputColumn });
|
|
2059
|
+
this.cdr.detectChanges();
|
|
2060
|
+
};
|
|
2061
|
+
/**
|
|
2062
|
+
* Metodo invocato al salvataggio degli allegati quando viene configurato un campo di tipo "Elenco generico"
|
|
2063
|
+
* con il tipo di visualizzazione ad immagini. Intercetta l'elenco aggiornato delle immagini caricate e lo
|
|
2064
|
+
* memorizza nell'oggetto field corrente.
|
|
2065
|
+
* @param attachments Array aggiornato degli allegati caricati.
|
|
2066
|
+
*/
|
|
2067
|
+
AddFormFieldComponent.prototype.catchButtonImagesChange = function (attachments) {
|
|
2068
|
+
this.field.ButtonImageList = attachments;
|
|
2069
|
+
};
|
|
1454
2070
|
/**
|
|
1455
2071
|
* Metodo chiamato al keyup degli input testuali che prevedono l'aggiunta del valore inserito in un array.
|
|
1456
2072
|
* Se l'utente preme il tasto invio, in base al tipo di campo che sta inserendo/modificando, questo metodo
|
|
@@ -1598,7 +2214,14 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1598
2214
|
}
|
|
1599
2215
|
switch (this.field.FieldType) {
|
|
1600
2216
|
case FieldTypeEnum['Elenco generico']:
|
|
1601
|
-
|
|
2217
|
+
if (this.field.PresentationMode != ListPresentationEnum.Immagini) {
|
|
2218
|
+
return !this.field.ValuePairs || this.field.ValuePairs.length === 0;
|
|
2219
|
+
}
|
|
2220
|
+
else {
|
|
2221
|
+
return (!this.field.ButtonImageList
|
|
2222
|
+
|| this.field.ButtonImageList.length === 0
|
|
2223
|
+
|| !!this.field.ButtonImageList.find(function (i) { return !i.ButtonKey || !i.ButtonValue; }));
|
|
2224
|
+
}
|
|
1602
2225
|
case FieldTypeEnum.Lookup:
|
|
1603
2226
|
return !this.field.FieldNames || this.field.FieldNames.length === 0;
|
|
1604
2227
|
default:
|
|
@@ -1632,7 +2255,7 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1632
2255
|
this.field.Required = tmpBaseField.Required;
|
|
1633
2256
|
this.field.FieldType = tmpBaseField.FieldType;
|
|
1634
2257
|
this.field.Formula = tmpBaseField.Formula;
|
|
1635
|
-
this.field.
|
|
2258
|
+
this.field.ColSpanSizes = tmpBaseField.ColSpanSizes;
|
|
1636
2259
|
this.field.FieldGroup = tmpBaseField.FieldGroup;
|
|
1637
2260
|
}
|
|
1638
2261
|
};
|
|
@@ -1710,7 +2333,8 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1710
2333
|
AddFormFieldComponent.ctorParameters = function () { return [
|
|
1711
2334
|
{ type: FormBuilder },
|
|
1712
2335
|
{ type: EnumHelper },
|
|
1713
|
-
{ type: MatDialog }
|
|
2336
|
+
{ type: MatDialog },
|
|
2337
|
+
{ type: ChangeDetectorRef }
|
|
1714
2338
|
]; };
|
|
1715
2339
|
__decorate([
|
|
1716
2340
|
Input()
|
|
@@ -1763,10 +2387,13 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1763
2387
|
__decorate([
|
|
1764
2388
|
ViewChild('dialogMetadata', { static: true })
|
|
1765
2389
|
], AddFormFieldComponent.prototype, "dialogMetadata", void 0);
|
|
2390
|
+
__decorate([
|
|
2391
|
+
ViewChild('buttonImagesKeyValueInputColumn', { static: true })
|
|
2392
|
+
], AddFormFieldComponent.prototype, "buttonImagesKeyValueInputColumn", void 0);
|
|
1766
2393
|
AddFormFieldComponent = __decorate([
|
|
1767
2394
|
Component({
|
|
1768
2395
|
selector: 'eqp-dynamic-module-add-form-field',
|
|
1769
|
-
template: "<div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\n <form [formGroup]=\"fieldFormGroup\">\n <div class=\"row\">\n <div class=\"header-title-standard\">{{indexField != null && indexField >= 0 ? \"Modifica\"\n : \"Aggiungi\"}} campo</div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"FieldTypeEnum\" [(ngModelInput)]=\"field.FieldType\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo campo\" (ngModelInputChange)=\"onFieldTypeChange()\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldType'\"\n [enumDataToExclude]=\"fieldTypesToExclude\">\n </eqp-select>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <mat-form-field>\n <mat-label> Label </mat-label>\n <input formControlName=\"Label\" required matInput [(ngModel)]=\"field.Label\">\n </mat-form-field>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <mat-form-field>\n <mat-label> Descrizione </mat-label>\n <input formControlName=\"Description\" required matInput [(ngModel)]=\"field.Description\">\n </mat-form-field>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\n <mat-slide-toggle [(ngModel)]=\"field.Required\" formControlName=\"Required\" color=\"primary\">\n Obbligatorio\n </mat-slide-toggle>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <mat-form-field>\n <mat-label> Formula (Javascript) </mat-label>\n <input formControlName=\"Formula\" matInput [(ngModel)]=\"field.Formula\"\n [matAutocomplete]=\"formulaAutocomplete\" (keyup)=\"setFormulaAutocompleteOptions($event)\"\n (focus)=\"setFormulaAutocompleteOptions(null)\">\n <mat-autocomplete #formulaAutocomplete=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of formulaAutocompleteOptions\" [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"formFieldsGroups\">\n <eqp-select [arrayData]=\"formFieldsGroups\" [(ngModelInput)]=\"field.FieldGroup\"\n [arrayKeyProperty]=\"'Name'\" [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldGroup'\" [isRequired]=\"true\"\n [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [arrayData]=\"availableColSpanSizes\" [(ngModelInput)]=\"field.ColSizes\"\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" (ngModelInputChange)=\"onColSizeSelect()\"\n [isMultiSelect]=\"true\" placeholder=\"Larghezza campo\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'ColSizes'\" [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\n <mat-slide-toggle [(ngModel)]=\"field.InListView\" formControlName=\"InListView\" color=\"primary\"\n [disabled]=\"fieldFormGroup.controls['InListView'].disabled\">\n Mostrare nella visualizzazione a lista\n </mat-slide-toggle>\n </div>\n\n <ng-container *ngTemplateOutlet=\"fieldTypeFormTemplate\">\n </ng-container>\n </div>\n\n\n <div class=\"row mt-2 mb-1\">\n <div class=\"col-sm-12 text-right\">\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveAndExitAddField(true)\"\n [disabled]=\"disableSaveField()\" type=\"button\">\n Salva\n </button>\n <button class=\"btn mat-raised-button\" (click)=\"saveAndExitAddField(false)\" type=\"button\">\n Esci\n </button>\n </div>\n </div>\n </form>\n</div>\n\n\n<!-- FORM PROPRIET\u00C0 CAMPI DI TESTO -->\n<ng-template #textFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Maschera </mat-label>\n <input formControlName=\"TextMask\" matInput [(ngModel)]=\"field.TextMask\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza massima </mat-label>\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza minima </mat-label>\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\n </mat-form-field>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI AREA DI TESTO -->\n<ng-template #textareaFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Righe </mat-label>\n <input formControlName=\"Rows\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.Rows\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza massima </mat-label>\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Lunghezza minima </mat-label>\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\n </mat-form-field>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI BOOLEANI -->\n<ng-template #booleadFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsTristate\" formControlName=\"IsTristate\" color=\"primary\">\n A tre stati\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"BoolPresentantioEnum\" [(ngModelInput)]=\"field.PresetationType\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'PresetationType'\">\n </eqp-select>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI DATA -->\n<ng-template #dateFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-datetimepicker [placeholder]=\"'Data minima'\" [(ngModelInput)]=\"field.MinDate\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MinDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\n </eqp-datetimepicker>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-datetimepicker [placeholder]=\"'Data massima'\" [(ngModelInput)]=\"field.MaxDate\"\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MaxDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\n </eqp-datetimepicker>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"DateTimeTypeEnum\" [(ngModelInput)]=\"field.IsOnlyDate\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo di data\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'IsOnlyDate'\">\n </eqp-select>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI NUMERICI -->\n<ng-template #numericFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsInteger\" formControlName=\"IsInteger\" color=\"primary\">\n Valore intero\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Formato numerico </mat-label>\n <input formControlName=\"NumberFormat\" matInput [(ngModel)]=\"field.NumberFormat\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Simbolo valuta </mat-label>\n <input formControlName=\"CurrencySymbol\" matInput [(ngModel)]=\"field.CurrencySymbol\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Valore massimo </mat-label>\n <input formControlName=\"MinValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinValue\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field>\n <mat-label> Valore minimo </mat-label>\n <input formControlName=\"MaxValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxValue\">\n </mat-form-field>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI ALLEGATO -->\n<ng-template #attachmentFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiAttach\" formControlName=\"IsMultiAttach\" color=\"primary\">\n Allegati multipli\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [arrayData]=\"AvailableFileExtensions.concat(AvailableImageExtensions)\"\n [(ngModelInput)]=\"field.AllowedExtensions\" [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\"\n [isMultiSelect]=\"true\" placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row mt-2\">\n <div class=\"col-sm-12 col-md-6\">\n <div class=\"header-title-standard\">\n Elenco metadata\n </div>\n </div>\n <div class=\"col-sm-12 col-md-6 text-right\">\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"openMetadataDialog()\">\n <mat-icon>add</mat-icon>\n <span style=\"margin-left: 10px;\">Aggiungi</span>\n </button>\n </div>\n </div>\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\n [data]=\"field.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\" [searchText]=\"'Cerca'\">\n </eqp-table>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI IMMAGINE -->\n<ng-template #imageFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.ImageIsContextualAttachment\" formControlName=\"ImageIsContextualAttachment\"\n color=\"primary\" (ngModelChange)=\"onImageIsContextualAttachmentChange()\">\n Immagine pre-caricata nel campo\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.EnableDrawing\" formControlName=\"EnableDrawing\" color=\"primary\">\n Abilita il disegno\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\"\n *ngIf=\"!field.ImageIsContextualAttachment\">\n <mat-slide-toggle [(ngModel)]=\"field.AttachDefinition.IsMultiAttach\" formControlName=\"IsMultiAttach\"\n color=\"primary\">\n Immagini multiple\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"!field.ImageIsContextualAttachment\">\n <eqp-select [arrayData]=\"AvailableImageExtensions\" [(ngModelInput)]=\"field.AttachDefinition.AllowedExtensions\"\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" [isMultiSelect]=\"true\"\n placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\n </eqp-select>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\n <mat-form-field>\n <mat-label> Nome immagine </mat-label>\n <input formControlName=\"ImgName\" matInput [(ngModel)]=\"field.ImgName\" required>\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 col-md-8 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\n <eqp-attachments [attachmentsList]=\"field._contextualAttachments\" [showMatCard]=\"false\" [allowOnlyImages]=\"true\"\n [isDisabled]=\"false\" [showInlinePreview]=\"true\" [multipleAttachment]=\"false\" [showHeader]=\"false\"\n (localEditedAttachments)=\"catchContextualAttachmentChange($event)\" #contextualAttachmentEqpAttachments>\n </eqp-attachments>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row mt-2\">\n <div class=\"col-sm-12 col-md-6\">\n <div class=\"header-title-standard\">\n Elenco metadata\n </div>\n </div>\n <div class=\"col-sm-12 col-md-6 text-right\">\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"openMetadataDialog()\">\n <mat-icon>add</mat-icon>\n <span style=\"margin-left: 10px;\">Aggiungi</span>\n </button>\n </div>\n </div>\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\n [data]=\"field.AttachDefinition.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\"\n [searchText]=\"'Cerca'\">\n </eqp-table>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI LISTA DI VALORI -->\n<ng-template #listValueFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiChoiche\" formControlName=\"IsMultiChoiche\" color=\"primary\">\n Scelta multipla\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\">\n <eqp-select [enumData]=\"ListPresentationEnum\" [(ngModelInput)]=\"field.PresentationMode\" [isRequired]=\"true\"\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\n [formControlNameInput]=\"'PresentationMode'\">\n </eqp-select>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row\">\n <h4 class=\"key-value-list-section-title\"> </h4>\n <div class=\"col-md-4 d-flex align-items-center\">\n <mat-form-field>\n <mat-label> Label opzione (invio per confermare)</mat-label>\n <input matInput [(ngModel)]=\"keyValueObject.key\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\n </mat-form-field>\n </div>\n <div class=\"col-md-4 d-flex align-items-center\">\n <mat-form-field>\n <mat-label> Valore opzione (invio per confermare)</mat-label>\n <input matInput [(ngModel)]=\"keyValueObject.value\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\n </mat-form-field>\n </div>\n <div class=\"col-md-4 d-flex align-items-center\">\n <span class=\"mr-3\">Opzioni inserite:</span>\n <ul class=\"value-pairs-list\">\n <li *ngFor=\"let keyValuePair of getDictionaryKeyValue()\">\n <mat-icon class=\"mr-1\" (click)=\"deleteKeyFromDictionary(keyValuePair.key)\">close\n </mat-icon>\n <span><b>Label: </b> {{keyValuePair.key}} - <b>Valore: </b> {{keyValuePair.value}}</span>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- FORM PROPRIET\u00C0 CAMPI LOOKUP -->\n<ng-template #lookupFieldFormTemplate>\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\n <mat-slide-toggle [(ngModel)]=\"field.UseAsGetOrDiscard\" formControlName=\"UseAsGetOrDiscard\" color=\"primary\"\n matTooltip=\"Se true la lookup viene visualizzata in una modale per lo scegli scarta\">\n Usa per scegli o scarta\n </mat-slide-toggle>\n </div>\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\n <mat-form-field matTooltip=\"Nome dell'entit\u00E0 relazionata\">\n <mat-label> Nome entit\u00E0 </mat-label>\n <input formControlName=\"EntitySourceName\" required matInput [(ngModel)]=\"field.EntitySourceName\">\n </mat-form-field>\n </div>\n <div class=\"col-sm-12 mt-2\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <mat-form-field\n matTooltip=\"Elenco di campi ordinato che verr\u00E0 visualizzato nella lookup (premere invio per confermare)\">\n <mat-label>\n Nomi dei campi (invio per confermare) </mat-label>\n <input matInput (keyup)=\"onMultiSelectInputKeyup($event, 'FieldNames')\">\n </mat-form-field>\n </div>\n <div class=\"col-md-8 d-flex align-items-center\">\n <span class=\"mr-3\">Nomi selezionati:</span>\n <div class=\"extension-container\" *ngFor=\"let extension of field.FieldNames; let i = index\">\n <span>{{extension}}</span>\n <mat-icon class=\"ml-1\" (click)=\"field.FieldNames.splice(i,1)\">close\n </mat-icon>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- DIALOG PER AGGIUNGERE UN METADATA NEI CAMPI DI TIPO ALLEGATO O IMMAGINE -->\n<ng-template #dialogMetadata>\n <eqp-dynamic-module-add-form-field [field]=\"selectedMetadata\" [availableFields]=\"availableFields\"\n [indexField]=\"indexSelectedMetadata\" (saveFieldEvent)=\"onSaveMetadata($event)\" [fieldTypesToExclude]=\"[6,7,10]\">\n </eqp-dynamic-module-add-form-field>\n</ng-template>",
|
|
2396
|
+
template: "<div class=\"container-fluid\" style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"fieldFormGroup\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">{{indexField != null && indexField >= 0 ? \"Modifica\"\r\n : \"Aggiungi\"}} campo</div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"FieldTypeEnum\" [(ngModelInput)]=\"field.FieldType\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo campo\" (ngModelInputChange)=\"onFieldTypeChange()\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldType'\"\r\n [enumDataToExclude]=\"fieldTypesToExclude\">\r\n </eqp-select>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Label </mat-label>\r\n <input formControlName=\"Label\" required matInput [(ngModel)]=\"field.Label\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Descrizione </mat-label>\r\n <input formControlName=\"Description\" required matInput [(ngModel)]=\"field.Description\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\r\n <mat-slide-toggle [(ngModel)]=\"field.Required\" formControlName=\"Required\" color=\"primary\">\r\n Obbligatorio\r\n </mat-slide-toggle>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <mat-form-field>\r\n <mat-label> Formula (Javascript) </mat-label>\r\n <input formControlName=\"Formula\" matInput [(ngModel)]=\"field.Formula\"\r\n [matAutocomplete]=\"formulaAutocomplete\" (keyup)=\"setFormulaAutocompleteOptions($event)\"\r\n (focus)=\"setFormulaAutocompleteOptions(null)\">\r\n <mat-autocomplete #formulaAutocomplete=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of formulaAutocompleteOptions\" [value]=\"option.value\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"formFieldsGroups\">\r\n <eqp-select [arrayData]=\"formFieldsGroups\" [(ngModelInput)]=\"field.FieldGroup\"\r\n [arrayKeyProperty]=\"'Name'\" [arrayValueProperty]=\"'Name'\" placeholder=\"Sezione\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'FieldGroup'\" [isRequired]=\"true\"\r\n [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [arrayData]=\"availableColSpanSizes\" [(ngModelInput)]=\"field.ColSpanSizes\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" (ngModelInputChange)=\"onColSpanSizeSelect()\"\r\n [isMultiSelect]=\"true\" placeholder=\"Larghezza campo\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'ColSpanSizes'\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\">\r\n <mat-slide-toggle [(ngModel)]=\"field.InListView\" formControlName=\"InListView\" color=\"primary\"\r\n [disabled]=\"fieldFormGroup.controls['InListView'].disabled\">\r\n Mostrare nella visualizzazione a lista\r\n </mat-slide-toggle>\r\n </div>\r\n\r\n <ng-container *ngTemplateOutlet=\"fieldTypeFormTemplate\">\r\n </ng-container>\r\n </div>\r\n\r\n\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveAndExitAddField(true)\"\r\n [disabled]=\"disableSaveField()\" type=\"button\">\r\n Salva\r\n </button>\r\n <button class=\"btn mat-raised-button\" (click)=\"saveAndExitAddField(false)\" type=\"button\">\r\n Esci\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI DI TESTO -->\r\n<ng-template #textFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4\">\r\n <eqp-select [enumData]=\"TextMaskEnum\" [(ngModelInput)]=\"field.TextMask\" placeholder=\"Maschera\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'TextMask'\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza massima </mat-label>\r\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza minima </mat-label>\r\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI AREA DI TESTO -->\r\n<ng-template #textareaFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Righe </mat-label>\r\n <input formControlName=\"Rows\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.Rows\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza massima </mat-label>\r\n <input formControlName=\"MaxLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxLenght\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Lunghezza minima </mat-label>\r\n <input formControlName=\"MinLenght\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinLenght\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI BOOLEANI -->\r\n<ng-template #booleadFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsTristate\" formControlName=\"IsTristate\" color=\"primary\">\r\n A tre stati\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"BoolPresentantioEnum\" [(ngModelInput)]=\"field.PresetationType\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'PresetationType'\">\r\n </eqp-select>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI DATA -->\r\n<ng-template #dateFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-datetimepicker [placeholder]=\"'Data minima'\" [(ngModelInput)]=\"field.MinDate\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MinDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\r\n </eqp-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-datetimepicker [placeholder]=\"'Data massima'\" [(ngModelInput)]=\"field.MaxDate\"\r\n [formGroupInput]=\"fieldFormGroup\" [formControlNameInput]=\"'MaxDate'\" [UTCDate]=\"true\" [showSeconds]=\"false\">\r\n </eqp-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"DateTimeTypeEnum\" [(ngModelInput)]=\"field.IsOnlyDate\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo di data\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'IsOnlyDate'\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Formato </mat-label>\r\n <input formControlName=\"DateFormat\" matInput [(ngModel)]=\"field.DateFormat\"\r\n [matTooltip]=\"'Indicare il formato senguendo la guida del pacchetto momentjs.'\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI NUMERICI -->\r\n<ng-template #numericFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsInteger\" formControlName=\"IsInteger\" color=\"primary\">\r\n Valore intero\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Separatore decimali </mat-label>\r\n <input formControlName=\"DecimalSeparator\" matInput [(ngModel)]=\"field.DecimalSeparator\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Precisione decimali </mat-label>\r\n <input formControlName=\"DecimalPrecision\" type=\"number\" [min]=\"0\" matInput\r\n [(ngModel)]=\"field.DecimalPrecision\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Separatore migliaia </mat-label>\r\n <input formControlName=\"ThousandsSeparator\" matInput [(ngModel)]=\"field.ThousandsSeparator\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Simbolo valuta </mat-label>\r\n <input formControlName=\"CurrencySymbol\" matInput [(ngModel)]=\"field.CurrencySymbol\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Valore massimo </mat-label>\r\n <input formControlName=\"MinValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MinValue\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field>\r\n <mat-label> Valore minimo </mat-label>\r\n <input formControlName=\"MaxValue\" type=\"number\" [min]=\"0\" matInput [(ngModel)]=\"field.MaxValue\">\r\n </mat-form-field>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI ALLEGATO -->\r\n<ng-template #attachmentFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiAttach\" formControlName=\"IsMultiAttach\" color=\"primary\">\r\n Allegati multipli\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [arrayData]=\"AvailableFileExtensions.concat(AvailableImageExtensions)\"\r\n [(ngModelInput)]=\"field.AllowedExtensions\" [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\"\r\n [isMultiSelect]=\"true\" placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\">\r\n <div class=\"row mt-2\">\r\n <div class=\"col-sm-12 col-md-6\">\r\n <div class=\"header-title-standard\">\r\n Elenco metadata\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 col-md-6 text-right\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openMetadataDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi</span>\r\n </button>\r\n </div>\r\n </div>\r\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\r\n [data]=\"field.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\" [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI IMMAGINE -->\r\n<ng-template #imageFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.ImageIsContextualAttachment\" formControlName=\"ImageIsContextualAttachment\"\r\n color=\"primary\" (ngModelChange)=\"onImageIsContextualAttachmentChange()\">\r\n Immagine pre-caricata nel campo\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2 mb-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.EnableDrawing\" formControlName=\"EnableDrawing\" color=\"primary\">\r\n Abilita il disegno\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\"\r\n *ngIf=\"!field.ImageIsContextualAttachment\">\r\n <mat-slide-toggle [(ngModel)]=\"field.AttachDefinition.IsMultiAttach\" formControlName=\"IsMultiAttach\"\r\n color=\"primary\">\r\n Immagini multiple\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" *ngIf=\"!field.ImageIsContextualAttachment\">\r\n <eqp-select [arrayData]=\"AvailableImageExtensions\" [(ngModelInput)]=\"field.AttachDefinition.AllowedExtensions\"\r\n [arrayKeyProperty]=\"'key'\" [arrayValueProperty]=\"'value'\" [isMultiSelect]=\"true\"\r\n placeholder=\"Estensioni accettate\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'AllowedExtensions'\" [includeFullObject]=\"false\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\r\n <mat-form-field>\r\n <mat-label> Nome immagine </mat-label>\r\n <input formControlName=\"ImgName\" matInput [(ngModel)]=\"field.ImgName\" required>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 col-md-8 mt-2\" [formGroup]=\"fieldFormGroup\" *ngIf=\"field.ImageIsContextualAttachment\">\r\n <eqp-attachments [attachmentsList]=\"field._contextualAttachments\" [showMatCard]=\"false\" [allowOnlyImages]=\"true\"\r\n [isDisabled]=\"false\" [showInlinePreview]=\"true\" [multipleAttachment]=\"false\" [showHeader]=\"false\"\r\n (localEditedAttachments)=\"catchContextualAttachmentChange($event)\" #contextualAttachmentEqpAttachments>\r\n </eqp-attachments>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\">\r\n <div class=\"row mt-2\">\r\n <div class=\"col-sm-12 col-md-6\">\r\n <div class=\"header-title-standard\">\r\n Elenco metadata\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 col-md-6 text-right\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"openMetadataDialog()\">\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px;\">Aggiungi</span>\r\n </button>\r\n </div>\r\n </div>\r\n <eqp-table #metadataFieldsTable [createMatCard]=\"false\" [columns]=\"metadataColumns\"\r\n [data]=\"field.AttachDefinition.MetadataFields\" [emptyTableMessage]=\"'Nessun metadata inserito'\"\r\n [searchText]=\"'Cerca'\">\r\n </eqp-table>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI LISTA DI VALORI -->\r\n<ng-template #listValueFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.IsMultiChoiche\" formControlName=\"IsMultiChoiche\" color=\"primary\">\r\n Scelta multipla\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\">\r\n <eqp-select [enumData]=\"ListPresentationEnum\" [(ngModelInput)]=\"field.PresentationMode\" [isRequired]=\"true\"\r\n [showCancelButton]=\"false\" placeholder=\"Tipo di presentazione\" [formGroupInput]=\"fieldFormGroup\"\r\n [formControlNameInput]=\"'PresentationMode'\" (ngModelInputChange)=\"onPresentationModeChange()\">\r\n </eqp-select>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\" *ngIf=\"field.PresentationMode != ListPresentationEnum.Immagini\">\r\n <div class=\"row\">\r\n <h4 class=\"key-value-list-section-title\"> </h4>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Label opzione (invio per confermare)</mat-label>\r\n <input matInput [(ngModel)]=\"keyValueObject.key\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <mat-form-field>\r\n <mat-label> Valore opzione (invio per confermare)</mat-label>\r\n <input matInput [(ngModel)]=\"keyValueObject.value\" (keyup)=\"onMultiSelectInputKeyup($event, null)\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-4 d-flex align-items-center\">\r\n <span class=\"mr-3\">Opzioni inserite:</span>\r\n <ul class=\"value-pairs-list\">\r\n <li *ngFor=\"let keyValuePair of getDictionaryKeyValue()\">\r\n <mat-icon class=\"mr-1\" (click)=\"deleteKeyFromDictionary(keyValuePair.key)\">close\r\n </mat-icon>\r\n <span><b>Label: </b> {{keyValuePair.key}} - <b>Valore: </b> {{keyValuePair.value}}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-sm-12 col-md-12 mt-2\" *ngIf=\"field.PresentationMode == ListPresentationEnum.Immagini\">\r\n <eqp-attachments [attachmentsList]=\"field.ButtonImageList\" [showMatCard]=\"false\" [allowOnlyImages]=\"true\"\r\n [isDisabled]=\"false\" [showInlinePreview]=\"true\" [multipleAttachment]=\"true\" [showHeader]=\"false\"\r\n [allowedTypes]=\"[AttachmentType.FILE]\" (localEditedAttachments)=\"catchButtonImagesChange($event)\"\r\n (onComponentLoaded)=\"configureButtonImagesColumns($event)\">\r\n </eqp-attachments>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- FORM PROPRIET\u00C0 CAMPI LOOKUP -->\r\n<ng-template #lookupFieldFormTemplate>\r\n <div class=\"col-sm-12 col-md-4 mt-2 d-flex align-items-center\" [formGroup]=\"fieldFormGroup\">\r\n <mat-slide-toggle [(ngModel)]=\"field.UseAsGetOrDiscard\" formControlName=\"UseAsGetOrDiscard\" color=\"primary\"\r\n matTooltip=\"Se true la lookup viene visualizzata in una modale per lo scegli scarta\">\r\n Usa per scegli o scarta\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"col-sm-12 col-md-4 mt-2\" [formGroup]=\"fieldFormGroup\">\r\n <mat-form-field matTooltip=\"Nome dell'entit\u00E0 relazionata\">\r\n <mat-label> Nome entit\u00E0 </mat-label>\r\n <input formControlName=\"EntitySourceName\" required matInput [(ngModel)]=\"field.EntitySourceName\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12 mt-2\">\r\n <div class=\"row\">\r\n <div class=\"col-md-4\">\r\n <mat-form-field\r\n matTooltip=\"Elenco di campi ordinato che verr\u00E0 visualizzato nella lookup (premere invio per confermare)\">\r\n <mat-label>\r\n Nomi dei campi (invio per confermare) </mat-label>\r\n <input matInput (keyup)=\"onMultiSelectInputKeyup($event, 'FieldNames')\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-8 d-flex align-items-center\">\r\n <span class=\"mr-3\">Nomi selezionati:</span>\r\n <div class=\"extension-container\" *ngFor=\"let extension of field.FieldNames; let i = index\">\r\n <span>{{extension}}</span>\r\n <mat-icon class=\"ml-1\" (click)=\"field.FieldNames.splice(i,1)\">close\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- DIALOG PER AGGIUNGERE UN METADATA NEI CAMPI DI TIPO ALLEGATO O IMMAGINE -->\r\n<ng-template #dialogMetadata>\r\n <eqp-dynamic-module-add-form-field [field]=\"selectedMetadata\" [availableFields]=\"availableFields\"\r\n [indexField]=\"indexSelectedMetadata\" (saveFieldEvent)=\"onSaveMetadata($event)\" [fieldTypesToExclude]=\"[6,7,10]\">\r\n </eqp-dynamic-module-add-form-field>\r\n</ng-template>\r\n\r\n<ng-template #buttonImagesKeyValueInputColumn let-row=\"row\" let-col=\"col\">\r\n <mat-form-field>\r\n <mat-label> {{col.display}} </mat-label>\r\n <input matInput [(ngModel)]=\"row[col.key]\" required>\r\n </mat-form-field>\r\n</ng-template>",
|
|
1770
2397
|
styles: [".extension-container{display:inline-block;font-size:15px;border:1px solid var(--primary);border-radius:15px;margin-right:10px}.extension-container mat-icon{vertical-align:middle;font-size:15px;height:15px;width:15px;color:var(--danger);margin-right:10px;cursor:pointer}.extension-container span{margin-left:10px}.key-value-list-section-title{background:linear-gradient(to right,var(--gray) 0,#fff 100%) left bottom #fff no-repeat;background-size:100% 1px}.value-pairs-list{list-style:none;padding:0}.value-pairs-list mat-icon{vertical-align:middle;font-size:15px;height:15px;width:15px;color:var(--danger);margin-right:10px;cursor:pointer}"]
|
|
1771
2398
|
})
|
|
1772
2399
|
], AddFormFieldComponent);
|
|
@@ -1776,6 +2403,7 @@ var AddFormFieldComponent = /** @class */ (function () {
|
|
|
1776
2403
|
var TextFieldTemplateComponent = /** @class */ (function () {
|
|
1777
2404
|
function TextFieldTemplateComponent() {
|
|
1778
2405
|
this.recordChange = new EventEmitter();
|
|
2406
|
+
this.InputMaskEnum = TextMaskEnum;
|
|
1779
2407
|
}
|
|
1780
2408
|
TextFieldTemplateComponent.prototype.ngOnInit = function () {
|
|
1781
2409
|
};
|
|
@@ -1786,6 +2414,20 @@ var TextFieldTemplateComponent = /** @class */ (function () {
|
|
|
1786
2414
|
this.updateField();
|
|
1787
2415
|
}
|
|
1788
2416
|
};
|
|
2417
|
+
TextFieldTemplateComponent.prototype.getInputType = function () {
|
|
2418
|
+
switch (this.field.TextMask) {
|
|
2419
|
+
case TextMaskEnum.Email:
|
|
2420
|
+
return 'email';
|
|
2421
|
+
case TextMaskEnum.Password:
|
|
2422
|
+
return 'password';
|
|
2423
|
+
case TextMaskEnum.Telefono:
|
|
2424
|
+
return 'tel';
|
|
2425
|
+
case TextMaskEnum.Url:
|
|
2426
|
+
return 'url';
|
|
2427
|
+
default:
|
|
2428
|
+
return 'text';
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
1789
2431
|
/**
|
|
1790
2432
|
* Metodo per aggiornare il valore del campo quando questo è rappresentato da una formula.
|
|
1791
2433
|
*/
|
|
@@ -1814,7 +2456,7 @@ var TextFieldTemplateComponent = /** @class */ (function () {
|
|
|
1814
2456
|
TextFieldTemplateComponent = __decorate([
|
|
1815
2457
|
Component({
|
|
1816
2458
|
selector: 'text-field-template',
|
|
1817
|
-
template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <mat-label> {{field.Label}} </mat-label>\r\n <input matInput type=\"
|
|
2459
|
+
template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <mat-label> {{field.Label}} </mat-label>\r\n <input matInput [type]=\"getInputType()\" [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n</mat-form-field>",
|
|
1818
2460
|
styles: [""]
|
|
1819
2461
|
})
|
|
1820
2462
|
], TextFieldTemplateComponent);
|
|
@@ -1866,7 +2508,7 @@ var BooleanFieldTemplateComponent = /** @class */ (function () {
|
|
|
1866
2508
|
BooleanFieldTemplateComponent = __decorate([
|
|
1867
2509
|
Component({
|
|
1868
2510
|
selector: 'boolean-field-template',
|
|
1869
|
-
template: "<div [formGroup]=\"field.FormFormGroup\">\n\n <!-- VISUALIZZAZIONE A TOGGLE -->\n <mat-slide-toggle color=\"primary\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Toggle\"\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n </mat-slide-toggle>\n\n\n <!-- VISUALIZZAZIONE A RADIOBUTTON -->\n <mat-label class=\"mr-3\" *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n </mat-label>\n <mat-radio-group *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\"\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n <mat-radio-button class=\"mr-2\" [value]=\"true\" color=\"primary\"> Si </mat-radio-button>\n <mat-radio-button class=\"mr-2\" [value]=\"false\" color=\"primary\"> No </mat-radio-button>\n <mat-radio-button class=\"mr-2\" [value]=\"null\" color=\"primary\" *ngIf=\"field.IsTristate\"> ND\n </mat-radio-button>\n </mat-radio-group>\n\n <!-- VISUALIZZAZIONE A CHECKBOX -->\n <mat-checkbox class=\"mr-2\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Checkbox\"\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [formControlName]=\"field.Name\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n </mat-checkbox>\n\n <!-- TODO: Visualizzazione \"Stringa true o false\" e \"Numerico 0 o 1\" ?? -->\n</div>",
|
|
2511
|
+
template: "<div [formGroup]=\"field.FormFormGroup\">\r\n\r\n <!-- VISUALIZZAZIONE A TOGGLE -->\r\n <mat-slide-toggle color=\"primary\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Toggle\"\r\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n </mat-slide-toggle>\r\n\r\n\r\n <!-- VISUALIZZAZIONE A RADIOBUTTON -->\r\n <mat-label class=\"mr-3\" *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n </mat-label>\r\n <mat-radio-group *ngIf=\"field.PresetationType == BoolPresentantioEnum['Radio button']\"\r\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n <mat-radio-button class=\"mr-2\" [value]=\"true\" color=\"primary\"> Si </mat-radio-button>\r\n <mat-radio-button class=\"mr-2\" [value]=\"false\" color=\"primary\"> No </mat-radio-button>\r\n <mat-radio-button class=\"mr-2\" [value]=\"null\" color=\"primary\" *ngIf=\"field.IsTristate\"> ND\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n\r\n <!-- VISUALIZZAZIONE A CHECKBOX -->\r\n <mat-checkbox class=\"mr-2\" *ngIf=\"field.PresetationType == BoolPresentantioEnum.Checkbox\"\r\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [formControlName]=\"field.Name\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n </mat-checkbox>\r\n\r\n <!-- TODO: Visualizzazione \"Stringa true o false\" e \"Numerico 0 o 1\" ?? -->\r\n</div>",
|
|
1870
2512
|
styles: [""]
|
|
1871
2513
|
})
|
|
1872
2514
|
], BooleanFieldTemplateComponent);
|
|
@@ -1932,7 +2574,7 @@ var DateFieldTemplateComponent = /** @class */ (function () {
|
|
|
1932
2574
|
DateFieldTemplateComponent = __decorate([
|
|
1933
2575
|
Component({
|
|
1934
2576
|
selector: 'date-field-template',
|
|
1935
|
-
template: "<eqp-datetimepicker [placeholder]=\"field.Label\" [UTCDate]=\"true\" [pickerMode]=\"pickerMode\"\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\"\n [minDate]=\"field.MinDate ? field.MinDate : null\" [maxDate]=\"field.MaxDate ? field.MaxDate : null\"\n [isRequired]=\"field.Required\" [disabled]=\"field.FormFormGroup.disabled\" [(ngModelInput)]=\"record[field.Name]\"\n (ngModelInputChange)=\"onRecordValueChange()\">\n</eqp-datetimepicker>",
|
|
2577
|
+
template: "<eqp-datetimepicker [placeholder]=\"field.Label\" [UTCDate]=\"true\" [pickerMode]=\"pickerMode\"\r\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\"\r\n [minDate]=\"field.MinDate ? field.MinDate : null\" [maxDate]=\"field.MaxDate ? field.MaxDate : null\"\r\n [isRequired]=\"field.Required\" [disabled]=\"field.FormFormGroup.disabled\" [(ngModelInput)]=\"record[field.Name]\"\r\n (ngModelInputChange)=\"onRecordValueChange()\" [customDateFormat]=\"field.DateFormat ? field.DateFormat : null\">\r\n</eqp-datetimepicker>",
|
|
1936
2578
|
styles: [""]
|
|
1937
2579
|
})
|
|
1938
2580
|
], DateFieldTemplateComponent);
|
|
@@ -1980,7 +2622,7 @@ var TextareaFieldTemplateComponent = /** @class */ (function () {
|
|
|
1980
2622
|
TextareaFieldTemplateComponent = __decorate([
|
|
1981
2623
|
Component({
|
|
1982
2624
|
selector: 'textarea-field-template',
|
|
1983
|
-
template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\n <textarea matInput [placeholder]=\"field.Label\" [rows]=\"field.Rows\" [formControlName]=\"field.Name\"\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\"\n (ngModelChange)=\"onRecordValueChange()\"></textarea>\n</mat-form-field>",
|
|
2625
|
+
template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <textarea matInput [placeholder]=\"field.Label\" [rows]=\"field.Rows\" [formControlName]=\"field.Name\"\r\n [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\"\r\n (ngModelChange)=\"onRecordValueChange()\"></textarea>\r\n</mat-form-field>",
|
|
1984
2626
|
styles: [""]
|
|
1985
2627
|
})
|
|
1986
2628
|
], TextareaFieldTemplateComponent);
|
|
@@ -2023,10 +2665,17 @@ var NumericFieldTemplateComponent = /** @class */ (function () {
|
|
|
2023
2665
|
*/
|
|
2024
2666
|
NumericFieldTemplateComponent.prototype.configureEqpNumericOptions = function () {
|
|
2025
2667
|
this.eqpNumericOptions.prefix = this.field.CurrencySymbol ? this.field.CurrencySymbol : "";
|
|
2668
|
+
this.eqpNumericOptions.inputMode = this.field.CurrencySymbol ? EqpNumericInputMode.FINANCIAL : EqpNumericInputMode.NATURAL;
|
|
2026
2669
|
if (this.field.MinValue != null && this.field.MinValue != undefined)
|
|
2027
2670
|
this.eqpNumericOptions.min = this.field.MinValue;
|
|
2028
2671
|
if (this.field.MaxValue != null && this.field.MaxValue != undefined)
|
|
2029
2672
|
this.eqpNumericOptions.max = this.field.MaxValue;
|
|
2673
|
+
if (this.field.DecimalSeparator != null && this.field.DecimalSeparator != undefined)
|
|
2674
|
+
this.eqpNumericOptions.decimal = this.field.DecimalSeparator;
|
|
2675
|
+
if (this.field.ThousandsSeparator != null && this.field.ThousandsSeparator != undefined)
|
|
2676
|
+
this.eqpNumericOptions.thousands = this.field.ThousandsSeparator;
|
|
2677
|
+
if (this.field.DecimalPrecision != null && this.field.DecimalPrecision != undefined)
|
|
2678
|
+
this.eqpNumericOptions.precision = this.field.DecimalPrecision;
|
|
2030
2679
|
};
|
|
2031
2680
|
__decorate([
|
|
2032
2681
|
Input()
|
|
@@ -2040,7 +2689,7 @@ var NumericFieldTemplateComponent = /** @class */ (function () {
|
|
|
2040
2689
|
NumericFieldTemplateComponent = __decorate([
|
|
2041
2690
|
Component({
|
|
2042
2691
|
selector: 'numeric-field-template',
|
|
2043
|
-
template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\n <mat-label> {{field.Label}} </mat-label>\n <input matInput eqpNumericMask [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" [options]=\"eqpNumericOptions\"\n [step]=\"field.IsInteger ? 1 : null\" (ngModelChange)=\"onRecordValueChange()\" />\n</mat-form-field>",
|
|
2692
|
+
template: "<mat-form-field [formGroup]=\"field.FormFormGroup\">\r\n <mat-label> {{field.Label}} </mat-label>\r\n <input matInput eqpNumericMask [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [required]=\"field.Required\" [(ngModel)]=\"record[field.Name]\" [options]=\"eqpNumericOptions\"\r\n [step]=\"field.IsInteger ? 1 : null\" (ngModelChange)=\"onRecordValueChange()\" />\r\n</mat-form-field>",
|
|
2044
2693
|
styles: [""]
|
|
2045
2694
|
})
|
|
2046
2695
|
], NumericFieldTemplateComponent);
|
|
@@ -2078,26 +2727,17 @@ var ListValueFieldTemplateComponent = /** @class */ (function () {
|
|
|
2078
2727
|
this.record[this.field.Name] = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
|
|
2079
2728
|
}
|
|
2080
2729
|
};
|
|
2081
|
-
/**
|
|
2082
|
-
* Metodo per recuperare la classe da applicare al button (nella relativa visualizzazione).
|
|
2083
|
-
* Se il pulsante è stato selezionato imposta la classe "selected-button".
|
|
2084
|
-
* @param data Oggetto bindato al pulsante
|
|
2085
|
-
* @returns Restituisce la classe da applicare tramite [ngClass]
|
|
2086
|
-
*/
|
|
2087
|
-
ListValueFieldTemplateComponent.prototype.getSelectButtonClass = function (data) {
|
|
2088
|
-
var selectedButtonClass = "selected-button";
|
|
2089
|
-
return data.Selected ? selectedButtonClass : null;
|
|
2090
|
-
};
|
|
2091
2730
|
/**
|
|
2092
2731
|
* Metodo invocato quando viene selezionata un'opzione nella visualizzazione a button
|
|
2093
2732
|
* @param data Rappresenta l'oggetto selezionato
|
|
2094
2733
|
*/
|
|
2095
2734
|
ListValueFieldTemplateComponent.prototype.buttonSelectClick = function (data) {
|
|
2735
|
+
data.Selected = !data.Selected;
|
|
2096
2736
|
if (this.field.IsMultiChoiche) {
|
|
2097
|
-
data.Selected = !data.Selected;
|
|
2098
2737
|
this.updateSelected(false);
|
|
2099
2738
|
}
|
|
2100
2739
|
else {
|
|
2740
|
+
this.arrayData.filter(function (d) { return d.Key != data.Key && d.Value != data.Value; }).forEach(function (d) { return d.Selected = false; });
|
|
2101
2741
|
this.record[this.field.Name] = data.Value;
|
|
2102
2742
|
}
|
|
2103
2743
|
this.onRecordValueChange();
|
|
@@ -2127,16 +2767,23 @@ var ListValueFieldTemplateComponent = /** @class */ (function () {
|
|
|
2127
2767
|
*/
|
|
2128
2768
|
ListValueFieldTemplateComponent.prototype.setArrayData = function () {
|
|
2129
2769
|
var _this = this;
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2770
|
+
if (this.field.PresentationMode != ListPresentationEnum.Immagini) {
|
|
2771
|
+
Object.keys(this.field.ValuePairs).forEach(function (k) { _this.createArrayDataElement(k, _this.field.ValuePairs[k]); });
|
|
2772
|
+
}
|
|
2773
|
+
else {
|
|
2774
|
+
this.field.ButtonImageList.forEach(function (i) { _this.createArrayDataElement(i.ButtonKey, i.ButtonValue, 'data:' + i.FileContentType + ';base64,' + i.FileDataBase64); });
|
|
2775
|
+
}
|
|
2776
|
+
};
|
|
2777
|
+
ListValueFieldTemplateComponent.prototype.createArrayDataElement = function (key, value, imgUrl) {
|
|
2778
|
+
if (imgUrl === void 0) { imgUrl = null; }
|
|
2779
|
+
var isOptionSelected;
|
|
2780
|
+
if (this.field.IsMultiChoiche && this.record[this.field.Name] && this.record[this.field.Name].length > 0) {
|
|
2781
|
+
isOptionSelected = !!this.record[this.field.Name].find(function (v) { return v == value; });
|
|
2782
|
+
}
|
|
2783
|
+
else {
|
|
2784
|
+
isOptionSelected = this.record[this.field.Name] === value;
|
|
2785
|
+
}
|
|
2786
|
+
this.arrayData.push({ Key: key, Value: value, Selected: isOptionSelected, ImgUrl: imgUrl });
|
|
2140
2787
|
};
|
|
2141
2788
|
/**
|
|
2142
2789
|
* Metodo per aggiornare il valore e il validator del FormControl associato al campo.
|
|
@@ -2156,8 +2803,8 @@ var ListValueFieldTemplateComponent = /** @class */ (function () {
|
|
|
2156
2803
|
ListValueFieldTemplateComponent = __decorate([
|
|
2157
2804
|
Component({
|
|
2158
2805
|
selector: 'list-value-field-template',
|
|
2159
|
-
template: "<eqp-select *ngIf=\"field.PresentationMode == ListPresentationEnum['Combo box']\" [arrayData]=\"arrayData\"\n [arrayKeyProperty]=\"'Value'\" [showCancelButton]=\"!field.Required\" [arrayValueProperty]=\"'Key'\"\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\" [placeholder]=\"field.Label\"\n [includeFullObject]=\"false\" [isRequired]=\"field.Required\" [isDisabled]=\"field.FormFormGroup.disabled\"\n [(ngModelInput)]=\"record[field.Name]\" [isMultiSelect]=\"field.IsMultiChoiche\"\n (ngModelInputChange)=\"onRecordValueChange()\">\n</eqp-select>\n\n<div *ngIf=\"field.PresentationMode != ListPresentationEnum['Combo box']\" [formGroup]=\"field.FormFormGroup\">\n\n <mat-label class=\"mr-3\"> {{field.Label + (field.Required ? \" *\" : \"\")}} </mat-label>\n\n <!-- VISUALIZZAZIONE A RADIO BUTTON (SENZA SELEZIONE MULTIPLA) -->\n <mat-radio-group *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && !field.IsMultiChoiche\"\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\n <mat-radio-button class=\"mr-2\" *ngFor=\"let data of arrayData\" [value]=\"data.Value\" color=\"primary\">\n {{data.Key}}\n </mat-radio-button>\n </mat-radio-group>\n\n <!-- VISUALIZZAZIONE A CHECKBOX (SELEZIONE MULTIPLA) -->\n <div class=\"d-inline-block\"\n *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && field.IsMultiChoiche\">\n <mat-checkbox class=\"mr-2\" *ngFor=\"let data of arrayData\" [disabled]=\"field.FormFormGroup.disabled\"\n [formControlName]=\"field.Name\" [(ngModel)]=\"data.Selected\" (ngModelChange)=\"updateSelected()\">\n {{data.Key}}\n </mat-checkbox>\n </div>\n\n <!-- VISUALIZZAZIONE A PULSANTI (CON TESTO) -->\n <div class=\"d-inline-block\"
|
|
2160
|
-
styles: [".selected-button{opacity:.7}.selected-button:disabled{background-color:var(--primary)!important;opacity:.3;color:#fff}"]
|
|
2806
|
+
template: "<eqp-select *ngIf=\"field.PresentationMode == ListPresentationEnum['Combo box']\" [arrayData]=\"arrayData\"\r\n [arrayKeyProperty]=\"'Value'\" [showCancelButton]=\"!field.Required\" [arrayValueProperty]=\"'Key'\"\r\n [formGroupInput]=\"field.FormFormGroup\" [formControlNameInput]=\"field.Name\" [placeholder]=\"field.Label\"\r\n [includeFullObject]=\"false\" [isRequired]=\"field.Required\" [isDisabled]=\"field.FormFormGroup.disabled\"\r\n [(ngModelInput)]=\"record[field.Name]\" [isMultiSelect]=\"field.IsMultiChoiche\"\r\n (ngModelInputChange)=\"onRecordValueChange()\">\r\n</eqp-select>\r\n\r\n<div *ngIf=\"field.PresentationMode != ListPresentationEnum['Combo box']\" [formGroup]=\"field.FormFormGroup\">\r\n\r\n <mat-label class=\"mr-3\"> {{field.Label + (field.Required ? \" *\" : \"\")}} </mat-label>\r\n\r\n <!-- VISUALIZZAZIONE A RADIO BUTTON (SENZA SELEZIONE MULTIPLA) -->\r\n <mat-radio-group *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && !field.IsMultiChoiche\"\r\n [formControlName]=\"field.Name\" [disabled]=\"field.FormFormGroup.disabled\" [required]=\"field.Required\"\r\n [(ngModel)]=\"record[field.Name]\" (ngModelChange)=\"onRecordValueChange()\">\r\n <mat-radio-button class=\"mr-2\" *ngFor=\"let data of arrayData\" [value]=\"data.Value\" color=\"primary\">\r\n {{data.Key}}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n\r\n <!-- VISUALIZZAZIONE A CHECKBOX (SELEZIONE MULTIPLA) -->\r\n <div class=\"d-inline-block\"\r\n *ngIf=\"field.PresentationMode == ListPresentationEnum['Radio button'] && field.IsMultiChoiche\">\r\n <mat-checkbox class=\"mr-2\" *ngFor=\"let data of arrayData\" [disabled]=\"field.FormFormGroup.disabled\"\r\n [formControlName]=\"field.Name\" [(ngModel)]=\"data.Selected\" (ngModelChange)=\"updateSelected()\">\r\n {{data.Key}}\r\n </mat-checkbox>\r\n </div>\r\n\r\n <!-- VISUALIZZAZIONE A PULSANTI (CON TESTO O IMMAGINI) -->\r\n <div class=\"d-inline-block\"\r\n *ngIf=\"[ListPresentationEnum['Pulsante con testo'], ListPresentationEnum.Immagini].includes(field.PresentationMode)\">\r\n <button mat-raised-button color=\"primary\" class=\"btn btn-primary m-1 data-button\" *ngFor=\"let data of arrayData\"\r\n [ngClass]=\"{'selected-button': data.Selected == true, 'p-0': field.PresentationMode == ListPresentationEnum.Immagini}\"\r\n (click)=\"buttonSelectClick(data)\" [disabled]=\"field.FormFormGroup.disabled\">\r\n\r\n <!-- TESTO DEL PULSANTE -->\r\n <span *ngIf=\"field.PresentationMode == ListPresentationEnum['Pulsante con testo']\"> {{data.Key}}</span>\r\n\r\n <!-- IMMAGINE DEL PULSANTE -->\r\n <img *ngIf=\"field.PresentationMode == ListPresentationEnum.Immagini\" [src]=\"data.ImgUrl\">\r\n </button>\r\n </div>\r\n\r\n</div>",
|
|
2807
|
+
styles: [".selected-button{opacity:.7}.selected-button:disabled{background-color:var(--primary)!important;opacity:.3;color:#fff}.data-button img{max-height:300px;max-width:300px}"]
|
|
2161
2808
|
})
|
|
2162
2809
|
], ListValueFieldTemplateComponent);
|
|
2163
2810
|
return ListValueFieldTemplateComponent;
|
|
@@ -2323,7 +2970,7 @@ var AttachmentFieldTemplateComponent = /** @class */ (function () {
|
|
|
2323
2970
|
AttachmentFieldTemplateComponent = __decorate([
|
|
2324
2971
|
Component({
|
|
2325
2972
|
selector: 'attachment-field-template',
|
|
2326
|
-
template: "<p *ngIf=\"!field.IsMultiAttach\" class=\"mb-2\">\n {{field.Label + (field.Required ? \" *\" : \"\")}}\n</p>\n<div class=\"row\" *ngIf=\"!field.IsMultiAttach && record[field.Name] && record[field.Name][0]\">\n <div class=\"mt-2\" *ngFor=\"let metadata of field.MetadataFields\"\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\n <dynamic-module-field [field]=\"metadata\" [record]=\"record[field.Name][0]\"\n (recordChange)=\"updateMetadataValidity()\">\n </dynamic-module-field>\n </div>\n</div>\n\n<eqp-attachments [attachmentsList]=\"record[field.Name]\" [showMatCard]=\"true\" [allowOnlyImages]=\"onlyImages\"\n [isDisabled]=\"field.FormFormGroup.disabled\" [showInlinePreview]=\"true\" [multipleAttachment]=\"field.IsMultiAttach\"\n [disableAction]=\"field.FormFormGroup.disabled\" [acceptedFileTypes]=\"field.AllowedExtensions\" [showHeader]=\"true\"\n [headerTitle]=\"field.Label + (field.Required ? ' *' : '')\" (localEditedAttachments)=\"catchAttachmentList($event)\"\n #eqpAttachments>\n</eqp-attachments>\n\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\n<ng-template #metadataColumnTemplate let-row=\"row\" let-col=\"col\">\n <dynamic-module-field [field]=\"getFieldFromMetadata(col, row)\" [record]=\"row\"\n (recordChange)=\"updateMetadataValidity()\">\n </dynamic-module-field>\n</ng-template>",
|
|
2973
|
+
template: "<p *ngIf=\"!field.IsMultiAttach\" class=\"mb-2\">\r\n {{field.Label + (field.Required ? \" *\" : \"\")}}\r\n</p>\r\n<div class=\"row\" *ngIf=\"!field.IsMultiAttach && record[field.Name] && record[field.Name][0]\">\r\n <div class=\"mt-2\" *ngFor=\"let metadata of field.MetadataFields\"\r\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\r\n <dynamic-module-field [field]=\"metadata\" [record]=\"record[field.Name][0]\"\r\n (recordChange)=\"updateMetadataValidity()\">\r\n </dynamic-module-field>\r\n </div>\r\n</div>\r\n\r\n<eqp-attachments [attachmentsList]=\"record[field.Name]\" [showMatCard]=\"true\" [allowOnlyImages]=\"onlyImages\"\r\n [isDisabled]=\"field.FormFormGroup.disabled\" [showInlinePreview]=\"true\" [multipleAttachment]=\"field.IsMultiAttach\"\r\n [disableAction]=\"field.FormFormGroup.disabled\" [acceptedFileTypes]=\"field.AllowedExtensions\" [showHeader]=\"true\"\r\n [headerTitle]=\"field.Label + (field.Required ? ' *' : '')\" (localEditedAttachments)=\"catchAttachmentList($event)\"\r\n #eqpAttachments>\r\n</eqp-attachments>\r\n\r\n<!-- TEMPLATE PER VISUALIZZARE LA COLONNA DELLA SEZIONE NELLA TABELLA DEI FIELDS -->\r\n<ng-template #metadataColumnTemplate let-row=\"row\" let-col=\"col\">\r\n <dynamic-module-field [field]=\"getFieldFromMetadata(col, row)\" [record]=\"row\"\r\n (recordChange)=\"updateMetadataValidity()\">\r\n </dynamic-module-field>\r\n</ng-template>",
|
|
2327
2974
|
styles: [""]
|
|
2328
2975
|
})
|
|
2329
2976
|
], AttachmentFieldTemplateComponent);
|
|
@@ -2522,7 +3169,7 @@ var ImageFieldTemplateComponent = /** @class */ (function () {
|
|
|
2522
3169
|
ImageFieldTemplateComponent = __decorate([
|
|
2523
3170
|
Component({
|
|
2524
3171
|
selector: 'image-field-template',
|
|
2525
|
-
template: "<!-- VISUALIZZAZIONE ALLEGATO PRE CARICATO CON POSSIBILITA' DI DISEGNO -->\n<div class=\"row\" *ngIf=\"field.ImageIsContextualAttachment && field.ContextualAttachment\">\n <div class=\"col-sm-12 col-md-6 col-lg-4\">\n <p class=\"mb-2\">\n {{ field.Label + (field.Required ? \" *\" : \"\")}}\n <br>\n Nome immagine: {{ field.ImgName}}\n </p>\n <eqp-img-drawing\n *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\n [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\" [width]=\"width\"\n [height]=\"height\" [i18n]=\"i18n\" [showCancelButton]=\"true\" (save)=\"saveDrowning($event)\"\n (cancel)=\"resetPreLoadedImage()\">\n </eqp-img-drawing>\n\n <img *ngIf=\"!field.EnableDrawing\"\n [src]=\"'data:'+ record[field.Name][0].FileContentType+ ';base64,'+ record[field.Name][0].FileDataBase64\">\n </div>\n\n <div class=\"col-sm-12 col-md-6 col-lg-8\">\n <div class=\"row\"\n *ngIf=\"field.AttachDefinition && field.AttachDefinition.MetadataFields && preLoadedImageMetadataFormGroup\">\n <div class=\"mt-2\" *ngFor=\"let metadata of field.AttachDefinition.MetadataFields\"\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\n <dynamic-module-field #fieldTemplate [field]=\"metadata\" [form]=\"preLoadedImageMetadataFormGroup\"\n [record]=\"record[field.Name][0]\" (recordChange)=\"updateMetadataValidity()\">\n </dynamic-module-field>\n </div>\n </div>\n </div>\n</div>\n\n<!-- COMPONENTE IN CUI CARICARE NUOVI ALLEGATI -->\n<attachment-field-template [(record)]=\"record\" [field]=\"field.AttachDefinition\" [onlyImages]=\"true\"\n (onAttachmentsChange)=\"onAttachmentsChange()\" *ngIf=\"!field.ImageIsContextualAttachment\">\n</attachment-field-template>\n\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\n<ng-template #dialogImageDrowing>\n <div *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\n class=\"row\">\n <div class=\"col-sm-12 col-md-12\">\n <eqp-img-drawing [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\"\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\n [i18n]=\"i18n\" [showCancelButton]=\"false\" (save)=\"saveDrowning($event)\">\n </eqp-img-drawing>\n </div>\n </div>\n <div class=\"row mt-2 mb-1\">\n <div class=\"col-sm-12 text-right\">\n <button class=\"btn mat-raised-button\" (click)=\"closeImageDrowingDialog()\" type=\"button\">\n Annulla disegno\n </button>\n </div>\n </div>\n</ng-template>",
|
|
3172
|
+
template: "<!-- VISUALIZZAZIONE ALLEGATO PRE CARICATO CON POSSIBILITA' DI DISEGNO -->\r\n<div class=\"row\" *ngIf=\"field.ImageIsContextualAttachment && field.ContextualAttachment\">\r\n <div class=\"col-sm-12 col-md-6 col-lg-4\">\r\n <p class=\"mb-2\">\r\n {{ field.Label + (field.Required ? \" *\" : \"\")}}\r\n <br>\r\n Nome immagine: {{ field.ImgName}}\r\n </p>\r\n <eqp-img-drawing\r\n *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\r\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\r\n [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\" [width]=\"width\"\r\n [height]=\"height\" [i18n]=\"i18n\" [showCancelButton]=\"true\" (save)=\"saveDrowning($event)\"\r\n (cancel)=\"resetPreLoadedImage()\">\r\n </eqp-img-drawing>\r\n\r\n <img *ngIf=\"!field.EnableDrawing\"\r\n [src]=\"'data:'+ record[field.Name][0].FileContentType+ ';base64,'+ record[field.Name][0].FileDataBase64\">\r\n </div>\r\n\r\n <div class=\"col-sm-12 col-md-6 col-lg-8\">\r\n <div class=\"row\"\r\n *ngIf=\"field.AttachDefinition && field.AttachDefinition.MetadataFields && preLoadedImageMetadataFormGroup\">\r\n <div class=\"mt-2\" *ngFor=\"let metadata of field.AttachDefinition.MetadataFields\"\r\n [ngClass]=\"utilityService.getFieldSyleClass(metadata)\">\r\n <dynamic-module-field #fieldTemplate [field]=\"metadata\" [form]=\"preLoadedImageMetadataFormGroup\"\r\n [record]=\"record[field.Name][0]\" (recordChange)=\"updateMetadataValidity()\">\r\n </dynamic-module-field>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- COMPONENTE IN CUI CARICARE NUOVI ALLEGATI -->\r\n<attachment-field-template [(record)]=\"record\" [field]=\"field.AttachDefinition\" [onlyImages]=\"true\"\r\n (onAttachmentsChange)=\"onAttachmentsChange()\" *ngIf=\"!field.ImageIsContextualAttachment\">\r\n</attachment-field-template>\r\n\r\n<!-- DIALOG PER DISEGNARE SUL NUOVO ALLEGATO CARICATO -->\r\n<ng-template #dialogImageDrowing>\r\n <div *ngIf=\"field.EnableDrawing && record[field.Name] && record[field.Name][0] && width != null && height != null\"\r\n class=\"row\">\r\n <div class=\"col-sm-12 col-md-12\">\r\n <eqp-img-drawing [showCancelButton]=\"false\" [enableLoadAnotherImage]=\"false\" [enableRemoveImage]=\"false\"\r\n [src]=\"'data:'+ record[field.Name][0].FileContentType + ';base64,'+ record[field.Name][0].FileDataBase64\"\r\n [i18n]=\"i18n\" [showCancelButton]=\"false\" (save)=\"saveDrowning($event)\">\r\n </eqp-img-drawing>\r\n </div>\r\n </div>\r\n <div class=\"row mt-2 mb-1\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"btn mat-raised-button\" (click)=\"closeImageDrowingDialog()\" type=\"button\">\r\n Annulla disegno\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2526
3173
|
styles: ["::ng-deep image-drawing>button{background-color:var(--primary)!important;color:#fff!important}"]
|
|
2527
3174
|
})
|
|
2528
3175
|
], ImageFieldTemplateComponent);
|
|
@@ -2604,30 +3251,14 @@ var ListFormRecordComponent = /** @class */ (function () {
|
|
|
2604
3251
|
* @param record Record da duplicare.
|
|
2605
3252
|
*/
|
|
2606
3253
|
ListFormRecordComponent.prototype.duplicateRecord = function (record) {
|
|
2607
|
-
// EqpDynamicModuleDialogService.Confirm('Duplicare il record selezionato?', () => {
|
|
2608
|
-
// var copiedRecord: Record = JSON.parse(JSON.stringify(record));
|
|
2609
|
-
// if (!isNaN(parseInt(copiedRecord.ID))) {
|
|
2610
|
-
// copiedRecord.ID = (parseInt(copiedRecord.ID) + 1).toString();
|
|
2611
|
-
// } else {
|
|
2612
|
-
// copiedRecord.ID = "xxxxxxxxx".replace("x", (c) => { return (Math.random() + 16 | 0).toString(16); });
|
|
2613
|
-
// }
|
|
2614
|
-
// this.values.push(copiedRecord);
|
|
2615
|
-
// this.reloadTables();
|
|
2616
|
-
// }, false, 'Richiesta conferma');
|
|
2617
3254
|
this.onDuplicateRecord.emit(record);
|
|
2618
|
-
//TODO
|
|
2619
3255
|
};
|
|
2620
3256
|
/**
|
|
2621
3257
|
* Metodo per eliminare un record dalla lista.
|
|
2622
3258
|
* @param record Record da eliminare selezionato sulla eqp-table.
|
|
2623
3259
|
*/
|
|
2624
3260
|
ListFormRecordComponent.prototype.deleteRecord = function (record) {
|
|
2625
|
-
// EqpDynamicModuleDialogService.Confirm('Eliminare il record selezionato?', () => {
|
|
2626
|
-
// this.values.splice(this.values.indexOf(record), 1);
|
|
2627
|
-
// this.reloadTables();
|
|
2628
|
-
// }, false, 'Richiesta conferma');
|
|
2629
3261
|
this.onDeleteRecord.emit(record);
|
|
2630
|
-
// TODO
|
|
2631
3262
|
};
|
|
2632
3263
|
/**
|
|
2633
3264
|
* Metodo per creare la configurazione delle colonne per la eqp-table.
|
|
@@ -2670,7 +3301,7 @@ var ListFormRecordComponent = /** @class */ (function () {
|
|
|
2670
3301
|
column.format = "dd/MM/yyyy HH:mm";
|
|
2671
3302
|
}
|
|
2672
3303
|
else if (field.IsOnlyDate == DateTimeTypeEnum['Solo data']) {
|
|
2673
|
-
column.format = "dd/MM/yyyy";
|
|
3304
|
+
column.format = field.DateFormat ? field.DateFormat.replace("DD", "dd") : "dd/MM/yyyy";
|
|
2674
3305
|
}
|
|
2675
3306
|
}
|
|
2676
3307
|
break;
|
|
@@ -2758,12 +3389,6 @@ var ListFormRecordComponent = /** @class */ (function () {
|
|
|
2758
3389
|
return ListFormRecordComponent;
|
|
2759
3390
|
}());
|
|
2760
3391
|
|
|
2761
|
-
var Record = /** @class */ (function () {
|
|
2762
|
-
function Record() {
|
|
2763
|
-
}
|
|
2764
|
-
return Record;
|
|
2765
|
-
}());
|
|
2766
|
-
|
|
2767
3392
|
var AddFormRecordComponent = /** @class */ (function () {
|
|
2768
3393
|
function AddFormRecordComponent(cdr, utilityService) {
|
|
2769
3394
|
this.cdr = cdr;
|
|
@@ -2883,7 +3508,7 @@ var AddFormRecordComponent = /** @class */ (function () {
|
|
|
2883
3508
|
AddFormRecordComponent = __decorate([
|
|
2884
3509
|
Component({
|
|
2885
3510
|
selector: 'add-form-record',
|
|
2886
|
-
template: "<div class=\"row eqp-dynamic-module-title\" *ngIf=\"showTitle\">\n <div class=\"col-md-12\">\n <h4><b>{{form.Name}}</b></h4>\n </div>\n</div>\n\n<form [formGroup]=\"formForm\">\n\n <!-- VISUALIZZAZIONE SEMPLICE -->\n <ng-container *ngIf=\"form.FormScalarType == FormScalarTypeEnum.Semplice\" [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: form.Fields }\">\n </ng-container>\n\n <!-- VISUALIZZAZIONE A STEPPER -->\n <mat-horizontal-stepper linear *ngIf=\"form.FormScalarType == FormScalarTypeEnum['A step']\">\n <mat-step *ngFor=\"let group of form.FormFieldsGroups\">\n <ng-template matStepLabel>\n {{group.Name}}\n </ng-template>\n\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\n </ng-container>\n </mat-step>\n </mat-horizontal-stepper>\n\n <!-- VISUALIZZAZIONE A TAB -->\n <mat-tab-group *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In tab']\">\n <mat-tab *ngFor=\"let group of form.FormFieldsGroups\" [label]=\"group.Name\">\n <div class=\"mt-3\">\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n <!-- VISUALIZZAZIONE AD ACCORDION -->\n <mat-accordion multi *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In accordion']\">\n <mat-expansion-panel *ngFor=\"let group of form.FormFieldsGroups\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n {{group.Name}}\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\n </ng-container>\n </mat-expansion-panel>\n </mat-accordion>\n</form>\n\n<div class=\"row mt-2\" *ngIf=\"showButtons\">\n <div class=\"col-sm-12 text-right\">\n <button class=\"mr-2\" mat-raised-button (click)=\"saveOrExitForm(true)\" type=\"button\">\n Annulla\n </button>\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveOrExitForm(false)\"\n [disabled]=\"formForm.invalid || formForm.disabled\" type=\"button\">\n Salva\n </button>\n </div>\n</div>\n\n<!-- TEMPLATE PER LA VISUALIZZAZIONE DEI CAMPI DELLA FORM -->\n<ng-template #fieldTemplates let-fields='fields'>\n <div class=\"row\">\n <div class=\"mt-2\" *ngFor=\"let field of fields\" [ngClass]=\"utilityService.getFieldSyleClass(field)\">\n <dynamic-module-field #fieldTemplate [field]=\"field\" [form]=\"form\" [record]=\"record\"\n (recordChange)=\"onRecordChange()\"></dynamic-module-field>\n </div>\n </div>\n</ng-template>",
|
|
3511
|
+
template: "<div class=\"row eqp-dynamic-module-title\" *ngIf=\"showTitle\">\r\n <div class=\"col-md-12\">\r\n <h4><b>{{form.Name}}</b></h4>\r\n </div>\r\n</div>\r\n\r\n<form [formGroup]=\"formForm\">\r\n\r\n <!-- VISUALIZZAZIONE SEMPLICE -->\r\n <ng-container *ngIf=\"form.FormScalarType == FormScalarTypeEnum.Semplice\" [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: form.Fields }\">\r\n </ng-container>\r\n\r\n <!-- VISUALIZZAZIONE A STEPPER -->\r\n <mat-horizontal-stepper linear *ngIf=\"form.FormScalarType == FormScalarTypeEnum['A step']\">\r\n <mat-step *ngFor=\"let group of form.FormFieldsGroups\">\r\n <ng-template matStepLabel>\r\n {{group.Name}}\r\n </ng-template>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </mat-step>\r\n </mat-horizontal-stepper>\r\n\r\n <!-- VISUALIZZAZIONE A TAB -->\r\n <mat-tab-group *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In tab']\">\r\n <mat-tab *ngFor=\"let group of form.FormFieldsGroups\" [label]=\"group.Name\">\r\n <div class=\"mt-3\">\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n </mat-tab-group>\r\n\r\n <!-- VISUALIZZAZIONE AD ACCORDION -->\r\n <mat-accordion multi *ngIf=\"form.FormScalarType == FormScalarTypeEnum['In accordion']\">\r\n <mat-expansion-panel *ngFor=\"let group of form.FormFieldsGroups\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{group.Name}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fieldTemplates\"\r\n [ngTemplateOutletContext]=\"{ fields: fieldGroups[group.Name] }\">\r\n </ng-container>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n</form>\r\n\r\n<div class=\"row mt-2\" *ngIf=\"showButtons\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"mr-2\" mat-raised-button (click)=\"saveOrExitForm(true)\" type=\"button\">\r\n Annulla\r\n </button>\r\n <button class=\"mr-2\" mat-raised-button color=\"primary\" (click)=\"saveOrExitForm(false)\"\r\n [disabled]=\"formForm.invalid || formForm.disabled\" type=\"button\">\r\n Salva\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<!-- TEMPLATE PER LA VISUALIZZAZIONE DEI CAMPI DELLA FORM -->\r\n<ng-template #fieldTemplates let-fields='fields'>\r\n <div class=\"row\">\r\n <div class=\"mt-2\" *ngFor=\"let field of fields\" [ngClass]=\"utilityService.getFieldSyleClass(field)\">\r\n <dynamic-module-field #fieldTemplate [field]=\"field\" [form]=\"form\" [record]=\"record\"\r\n (recordChange)=\"onRecordChange()\"></dynamic-module-field>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2887
3512
|
styles: [""]
|
|
2888
3513
|
})
|
|
2889
3514
|
], AddFormRecordComponent);
|
|
@@ -3005,13 +3630,33 @@ var DynamicModuleFieldComponent = /** @class */ (function () {
|
|
|
3005
3630
|
DynamicModuleFieldComponent = __decorate([
|
|
3006
3631
|
Component({
|
|
3007
3632
|
selector: 'dynamic-module-field',
|
|
3008
|
-
template: "<text-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo di testo']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</text-field-template>\n\n<textarea-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Area di testo']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</textarea-field-template>\n\n<boolean-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Booleano']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</boolean-field-template>\n\n<date-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Data e/o ora']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</date-field-template>\n\n<numeric-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo numerico']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</numeric-field-template>\n\n<list-value-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco generico']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</list-value-field-template>\n\n<attachment-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Allegato']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</attachment-field-template>\n\n<image-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine']\"\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\n</image-field-template>\n\n<list-form-record #listInnerFormRecords *ngIf=\"field.FieldType == FieldTypeEnum['Form di dettaglio']\"\n [form]=\"getInnerFormFromField(field)\" [values]=\"record[field.Name]\"\n (onAddViewEditRecord)=\"onAddViewEditInnerFormRecord($event, field)\">\n</list-form-record>\n\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE/VISUALIZZARE UN RECORD IN UNA FORM DI DETTAGLIO -->\n<ng-template #dialogInnerFormRecord>\n <add-form-record [form]=\"selectedInnerForm\" [record]=\"selectedInnerFormRecord\" [onlyView]=\"onlyViewInnerFormRecord\"\n (saveRecordEvent)=\"onSaveInnerFormRecord($event)\"></add-form-record>\n</ng-template>",
|
|
3633
|
+
template: "<text-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo di testo']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</text-field-template>\r\n\r\n<textarea-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Area di testo']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</textarea-field-template>\r\n\r\n<boolean-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Booleano']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</boolean-field-template>\r\n\r\n<date-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Data e/o ora']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</date-field-template>\r\n\r\n<numeric-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Campo numerico']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</numeric-field-template>\r\n\r\n<list-value-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Elenco generico']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</list-value-field-template>\r\n\r\n<attachment-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Allegato']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</attachment-field-template>\r\n\r\n<image-field-template #fieldTemplate *ngIf=\"field.FieldType == FieldTypeEnum['Immagine']\"\r\n [matTooltip]=\"field.Description\" [(record)]=\"record\" [field]=\"field\" (recordChange)=\"onRecordChange()\">\r\n</image-field-template>\r\n\r\n<list-form-record #listInnerFormRecords *ngIf=\"field.FieldType == FieldTypeEnum['Form di dettaglio']\"\r\n [form]=\"getInnerFormFromField(field)\" [values]=\"record[field.Name]\"\r\n (onAddViewEditRecord)=\"onAddViewEditInnerFormRecord($event, field)\">\r\n</list-form-record>\r\n\r\n<!-- DIALOG PER AGGIUNGERE/MODIFICARE/VISUALIZZARE UN RECORD IN UNA FORM DI DETTAGLIO -->\r\n<ng-template #dialogInnerFormRecord>\r\n <add-form-record [form]=\"selectedInnerForm\" [record]=\"selectedInnerFormRecord\" [onlyView]=\"onlyViewInnerFormRecord\"\r\n (saveRecordEvent)=\"onSaveInnerFormRecord($event)\"></add-form-record>\r\n</ng-template>",
|
|
3009
3634
|
styles: [""]
|
|
3010
3635
|
})
|
|
3011
3636
|
], DynamicModuleFieldComponent);
|
|
3012
3637
|
return DynamicModuleFieldComponent;
|
|
3013
3638
|
}());
|
|
3014
3639
|
|
|
3640
|
+
var SpinnerComponent = /** @class */ (function () {
|
|
3641
|
+
function SpinnerComponent(spinnerService) {
|
|
3642
|
+
this.spinnerService = spinnerService;
|
|
3643
|
+
this.isLoading = this.spinnerService.isLoading;
|
|
3644
|
+
}
|
|
3645
|
+
SpinnerComponent.prototype.ngOnInit = function () {
|
|
3646
|
+
};
|
|
3647
|
+
SpinnerComponent.ctorParameters = function () { return [
|
|
3648
|
+
{ type: SpinnerService }
|
|
3649
|
+
]; };
|
|
3650
|
+
SpinnerComponent = __decorate([
|
|
3651
|
+
Component({
|
|
3652
|
+
selector: 'eqp-dynamic-module-spinner',
|
|
3653
|
+
template: "<div class=\"eqp-splash-screen\" *ngIf=\"isLoading | async\">\r\n <div id=\"loader\"></div>\r\n</div>",
|
|
3654
|
+
styles: [":host #loader{display:block;position:relative;width:150px;height:150px;border-radius:50%;border:3px solid transparent;border-top-color:var(--primary);-webkit-animation:2s linear infinite spin;animation:2s linear infinite spin}:host #loader:before{content:\"\";position:absolute;top:5px;left:5px;right:5px;bottom:5px;border-radius:50%;border:3px solid transparent;border-top-color:var(--primary);-webkit-animation:3s linear infinite spin;animation:3s linear infinite spin}:host #loader:after{content:\"\";position:absolute;top:15px;left:15px;right:15px;bottom:15px;border-radius:50%;border:3px solid transparent;border-top-color:var(--primary);-webkit-animation:1.5s linear infinite spin;animation:1.5s linear infinite spin}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}:host .eqp-splash-screen{background-color:#343a4040;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;width:100%;z-index:9999}:host .eqp-splash-screen img{margin-left:calc(100vw - 100%);width:90px;margin-bottom:30px}:host .eqp-splash-screen span{margin-left:calc(100vw - 100%);margin-bottom:30px}:host .eqp-splash-screen ::ng-deep .mat-progress-spinner circle,:host .eqp-splash-screen ::ng-deep .mat-spinner circle{stroke:#5d78ff}"]
|
|
3655
|
+
})
|
|
3656
|
+
], SpinnerComponent);
|
|
3657
|
+
return SpinnerComponent;
|
|
3658
|
+
}());
|
|
3659
|
+
|
|
3015
3660
|
var EqpDynamicModuleModule = /** @class */ (function () {
|
|
3016
3661
|
function EqpDynamicModuleModule() {
|
|
3017
3662
|
}
|
|
@@ -3032,9 +3677,9 @@ var EqpDynamicModuleModule = /** @class */ (function () {
|
|
|
3032
3677
|
ListFormRecordComponent,
|
|
3033
3678
|
AddFormRecordComponent,
|
|
3034
3679
|
DynamicModuleFieldComponent,
|
|
3680
|
+
SpinnerComponent,
|
|
3035
3681
|
],
|
|
3036
3682
|
imports: [
|
|
3037
|
-
BrowserModule,
|
|
3038
3683
|
MaterialModule,
|
|
3039
3684
|
FormsModule,
|
|
3040
3685
|
CommonModule,
|
|
@@ -3109,15 +3754,6 @@ var TextareaField = /** @class */ (function (_super) {
|
|
|
3109
3754
|
return TextareaField;
|
|
3110
3755
|
}(BaseField));
|
|
3111
3756
|
|
|
3112
|
-
/**Campo di testo */
|
|
3113
|
-
var TextField = /** @class */ (function (_super) {
|
|
3114
|
-
__extends(TextField, _super);
|
|
3115
|
-
function TextField() {
|
|
3116
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3117
|
-
}
|
|
3118
|
-
return TextField;
|
|
3119
|
-
}(BaseField));
|
|
3120
|
-
|
|
3121
3757
|
/*
|
|
3122
3758
|
* Public API Surface of eqp-dynamic-module
|
|
3123
3759
|
*/
|
|
@@ -3126,5 +3762,5 @@ var TextField = /** @class */ (function (_super) {
|
|
|
3126
3762
|
* Generated bundle index. Do not edit.
|
|
3127
3763
|
*/
|
|
3128
3764
|
|
|
3129
|
-
export { ActionOnRecord, AddFormFieldComponent, AddFormRecordComponent, ArrayValidators, AttachmentField, AttachmentFieldTemplateComponent, AvailableFileExtensions, AvailableImageExtensions, BaseField, BaseObj, BoolPresentantioEnum, BooleanField, BooleanFieldTemplateComponent, ColSpanSizesEnum, Context, ContextUser, DateField, DateFieldTemplateComponent, DateTimeTypeEnum, DynamicModuleFieldComponent, Entity, EqpDynamicModuleComponent, EqpDynamicModuleConfiguratorComponent, EqpDynamicModuleDialogService, EqpDynamicModuleModule, FieldTypeEnum, Form, FormFieldGroup, FormScalarTypeEnum, FormTypeEnum, ImageField, ImageFieldTemplateComponent, ListFormRecordComponent, ListPresentationEnum, ListValueField, ListValueFieldTemplateComponent, LookupField, NumericField, NumericFieldTemplateComponent, Record, TextField, TextFieldTemplateComponent, TextareaField, TextareaFieldTemplateComponent, UtilityHelperService, ɵ0,
|
|
3765
|
+
export { ActionOnRecord, AddFormFieldComponent, AddFormRecordComponent, ArrayValidators, AttachmentField, AttachmentFieldTemplateComponent, AvailableFileExtensions, AvailableImageExtensions, BaseField, BaseObj, BoolPresentantioEnum, BooleanField, BooleanFieldTemplateComponent, ButtonImage, ColSpanSizesEnum, Context, ContextUser, DateField, DateFieldTemplateComponent, DateTimeTypeEnum, DynRecord, DynamicModuleFieldComponent, EndPointConfiguration, EndPointData, EndPointDataParams, Entity, EqpDynamicModuleComponent, EqpDynamicModuleConfiguratorComponent, EqpDynamicModuleDialogService, EqpDynamicModuleModule, FieldTypeEnum, Form, FormFieldGroup, FormScalarTypeEnum, FormTypeEnum, ImageField, ImageFieldTemplateComponent, ListFormRecordComponent, ListPresentationEnum, ListValueField, ListValueFieldTemplateComponent, LookupField, NumericField, NumericFieldTemplateComponent, ParamTypeEnum, Record, RequestMethodEnum, SpinnerService, TelRegex, TextField, TextFieldTemplateComponent, TextMaskEnum, TextareaField, TextareaFieldTemplateComponent, UrlRegex, UtilityHelperService, ɵ0, SpinnerComponent as ɵa, MaterialModule as ɵb };
|
|
3130
3766
|
//# sourceMappingURL=eqproject-eqp-dynamic-module.js.map
|