@eqproject/eqp-dynamic-module 2.8.25 → 2.8.26

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.
@@ -2173,14 +2173,21 @@ class HListFormRecordComponent {
2173
2173
  filterDataAnswers() {
2174
2174
  setTimeout(() => {
2175
2175
  this.filteredAnswers = [];
2176
+ if (!this.minDate) {
2177
+ // Converto le date di AnswerDate in oggetti Date e ordino
2178
+ const dates = this.configurations.values.map(value => new Date(value.AnswerDate));
2179
+ // Trovo la data più recente (max) e la più vecchia (min)
2180
+ this.minDate = new Date(Math.min(...dates.map(date => date.getTime())));
2181
+ }
2182
+ if (!this.maxDate) {
2183
+ // Converto le date di AnswerDate in oggetti Date e ordino
2184
+ const dates = this.configurations.values.map(value => new Date(value.AnswerDate));
2185
+ // Trovo la data più recente (max) e la più vecchia (min)
2186
+ this.maxDate = new Date(Math.max(...dates.map(date => date.getTime())));
2187
+ }
2176
2188
  this.maxDate.setHours(23, 59, 59, 59);
2177
- this.configurations.values.forEach((value) => {
2178
- if (new Date(value.AnswerDate) >= this.minDate && new Date(value.AnswerDate) <= this.maxDate) {
2179
- this.filteredAnswers.push(value);
2180
- }
2181
- });
2189
+ this.filteredAnswers = this.configurations.values.filter(value => new Date(value.AnswerDate) >= this.minDate && new Date(value.AnswerDate) <= this.maxDate);
2182
2190
  this.displayedColumns = ["property", ...this.filteredAnswers.map((_, i) => `col${i}`)];
2183
- // this.loadedTable = true;
2184
2191
  }, 100);
2185
2192
  }
2186
2193
  //#endregion filterDataAnswers
@@ -2195,14 +2202,66 @@ class HListFormRecordComponent {
2195
2202
  }
2196
2203
  //#endregion setMinMaxDates
2197
2204
  //#region printValue
2198
- printValue(fieldType, value, fieldconfig) {
2199
- // return value;
2200
- // PREPARO IL VALUEPAIRS
2205
+ printValue(fieldType, value, fieldconfig, record) {
2201
2206
  switch (fieldType) {
2202
2207
  case FieldTypeEnum["Elenco generico"]:
2203
2208
  {
2204
- return value;
2205
- break;
2209
+ if (!value) {
2210
+ return "N/A";
2211
+ }
2212
+ let output;
2213
+ let ValuePairs = [];
2214
+ // PREPARO/LEGGO I VALUEPAIRS
2215
+ if (fieldconfig.Formula != null && fieldconfig.Formula) {
2216
+ var temp = UtilityHelperService.EvaluateFieldFormula(fieldconfig.Formula, record, null);
2217
+ if (typeof temp === 'string') {
2218
+ let temp2 = temp.split(";");
2219
+ temp = [];
2220
+ temp2.forEach(item => {
2221
+ const arrItem = item.split("|");
2222
+ if (arrItem.length > 1) {
2223
+ temp[arrItem[1].trim()] = arrItem[0].trim();
2224
+ }
2225
+ else {
2226
+ temp[arrItem[0].trim()] = arrItem[0].trim();
2227
+ }
2228
+ });
2229
+ }
2230
+ for (let key2 in temp) {
2231
+ ValuePairs[temp[key2]] = key2;
2232
+ }
2233
+ }
2234
+ else if (fieldconfig.ValuePairs != null && fieldconfig.ValuePairs.length > 0) {
2235
+ // va bene così
2236
+ ValuePairs = JSON.parse(JSON.stringify(fieldconfig.ValuePairs));
2237
+ }
2238
+ else if (fieldconfig.ValueString != null && fieldconfig.ValueString != "") {
2239
+ // va presa la strigna e rimappata nel diario
2240
+ ValuePairs = GlobalService.stringToValuePairs(fieldconfig.ValueString);
2241
+ }
2242
+ // INVERTO I VALUEPAIRS CHIAVE/VALORE IN VALROE/CHIAVE
2243
+ let inverted = {};
2244
+ //GlobalService.debugLog("(<ListValueField>foundObject).ValuePairs", (<ListValueField>field).ValuePairs);
2245
+ // ValuePairs: {Si: 'Si', No: 'No'}
2246
+ for (let key in ValuePairs) {
2247
+ inverted[ValuePairs[key]] = key;
2248
+ }
2249
+ ValuePairs = inverted;
2250
+ // LEGGO I VALORI CHE VOGLIO STAMPARE
2251
+ if (record[fieldconfig.Name] != null && fieldconfig.IsMultiChoiche) {
2252
+ // caso MULTISCELTA
2253
+ let outValue = "";
2254
+ record[fieldconfig.Name].forEach((element, i) => {
2255
+ outValue += ValuePairs[element];
2256
+ outValue += i == record[fieldconfig.Name].length - 1 ? "" : ", ";
2257
+ });
2258
+ output = outValue;
2259
+ }
2260
+ else {
2261
+ // caso SCELTA SINGOLA
2262
+ output = ValuePairs[record[fieldconfig.Name]];
2263
+ }
2264
+ return output;
2206
2265
  }
2207
2266
  ;
2208
2267
  case FieldTypeEnum["Campo numerico"]:
@@ -2342,10 +2401,10 @@ class HListFormRecordComponent {
2342
2401
  }
2343
2402
  }
2344
2403
  HListFormRecordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HListFormRecordComponent, deps: [{ token: UtilityHelperService }, { token: i0.ChangeDetectorRef }, { token: i2$1.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
2345
- HListFormRecordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HListFormRecordComponent, selector: "hlist-form-record", inputs: { configurations: "configurations", endPointConfiguration: "endPointConfiguration", formID: "formID", form: "form", externalButtons: "externalButtons" }, outputs: { onViewRecord: "onViewRecord", onAddViewEditRecord: "onAddViewEditRecord", onDeleteRecord: "onDeleteRecord", onAfterDeleteRecord: "onAfterDeleteRecord" }, viewQueries: [{ propertyName: "tableRecords", first: true, predicate: ["tableRecords"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<mat-card class=\"list-form-record\">\r\n <mat-card-header class=\"align-items-center justify-content-between\">\r\n <mat-card-title *ngIf=\"loadedFilters && showTitle\"\r\n >Elenco {{ form.Name }}</mat-card-title\r\n >\r\n <!-- <mat-card-actions>\r\n <button\r\n class=\"btn btn-primary\"\r\n mat-raised-button\r\n color=\"primary\"\r\n type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\"\r\n >\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px\">Aggiungi</span>\r\n </button>\r\n </mat-card-actions> -->\r\n </mat-card-header>\r\n <mat-card-content>\r\n <!--#region FILTERS -->\r\n <div class=\"row\" *ngIf=\"loadedFilters\">\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo inizio'\"\r\n [label]=\"'Periodo inizio'\"\r\n [(ngModelInput)]=\"minDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo fine'\"\r\n [label]=\"'Periodo fine'\"\r\n [(ngModelInput)]=\"maxDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <mat-form-field>\r\n <mat-label>Selezione dei campi</mat-label>\r\n <mat-select (selectionChange)=\"onSelectionChange($event)\" multiple>\r\n <mat-option *ngFor=\"let property of properties\" [value]=\"property\">\r\n {{ propertiesLabel[property.label] }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <button\r\n [disabled]=\"\r\n selectedProperties == null || selectedProperties.length == 0\r\n \"\r\n class=\"btn btn-graph-generate button-next me-2\"\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"filterDataAnswers()\"\r\n >\r\n Genera\r\n </button>\r\n </div> -->\r\n </div>\r\n <!--#endregion FILTERS -->\r\n\r\n <!--#region TABLE -->\r\n <div class=\"table-container\">\r\n <table\r\n mat-table\r\n [dataSource]=\"selectedProperties\"\r\n class=\"mat-elevation-z8 mat-table-fixed\"\r\n >\r\n <!-- Colonna fissa per le propriet\u00E0 -->\r\n <ng-container matColumnDef=\"property\" sticky>\r\n <th mat-header-cell *matHeaderCellDef class=\"sticky-column\">\r\n Data Inserimento\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let selectedProperties\"\r\n class=\"sticky-column\"\r\n >\r\n {{ propertiesLabel[selectedProperties.label] }}\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Genera dinamicamente le colonne per ogni risposta -->\r\n <ng-container\r\n *ngFor=\"let value of filteredAnswers; let i = index\"\r\n [matColumnDef]=\"'col' + i\"\r\n >\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ value.AnswerDate | date : \"dd/MM/yyyy HH:mm\" }}\r\n </th>\r\n <!-- <th mat-header-cell *matHeaderCellDef> {{ value.AnswerDate | date:'dd/MM/yyyy HH:mm' }} </th> -->\r\n <td mat-cell *matCellDef=\"let selectedProperties\">\r\n {{\r\n selectedProperties.label === \"AnswerDate\"\r\n ? (value.AnswerDate | date : \"dd/MM/yyyy HH:mm\")\r\n : printValue(selectedProperties.type, value[selectedProperties.label], selectedProperties.config) ?? \"N/A\"\r\n }}\r\n <!-- - \r\n {{selectedProperties.type}}\r\n {{selectedProperties.label}} -->\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Header della tabella -->\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n\r\n <!-- Righe della tabella -->\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\r\n </table>\r\n </div>\r\n <!--#region TABLE -->\r\n </mat-card-content>\r\n <mat-card-footer>\r\n <!-- <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar> -->\r\n </mat-card-footer>\r\n</mat-card>\r\n\r\n<!-- <div class=\"row eqp-dynamic-module-title list-form-record-header\">\r\n <div class=\"col-md-6\">\r\n <h4 *ngIf=\"showTitle\">\r\n <b>Elenco {{ form.Name }}</b>\r\n </h4>\r\n </div>\r\n <div class=\"col-md-6 text-right\" *ngIf=\"defaultListActions.add\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\">\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\r\n<eqp-table class=\"list-form-record-table\" #tableRecords *ngIf=\"loader && configurations.values\"\r\n [data]=\"configurations.values\" [columns]=\"columns\"></eqp-table> -->\r\n", styles: ["::ng-deep .error-color{color:var(--danger)}::ng-deep .success-color{color:var(--success)}.table-container{max-width:100%;overflow-x:auto;border:1px solid #ddd}.sticky-column{position:sticky;left:0;background:white;z-index:10;box-shadow:2px 0 5px #0000001a}.mat-table-fixed{width:-moz-max-content;width:max-content;min-width:100%;table-layout:fixed}th,td{text-align:center;padding:10px;min-width:100px;max-width:200px}\n"], dependencies: [{ kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i6.MatCardFooter, selector: "mat-card-footer" }, { kind: "component", type: i6.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i6.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.TmwDateTimePickerComponent, selector: "tmw-datetimepicker", inputs: ["debugMode", "ngModelInput", "formGroupInput", "formControlNameInput", "pickerMode", "timeType", "label", "placeholder", "hint", "minDate", "maxDate", "locale", "inputFormat", "outputFormat", "forSaveLocalOnDB", "disabled", "readonly", "currentDateAsDefault", "showSpinners", "touchUi", "enableMeridian", "hideTime", "stepHour", "showHours", "hourLabel", "stepMinute", "showMinutes", "minuteLabel", "stepSecond", "showSeconds", "secondLabel", "disableMinute", "dayLabel", "monthLabel", "yearLabel", "highLightedDates", "highLightedAriaFormat"], outputs: ["ngModelInputChange"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
2404
+ HListFormRecordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HListFormRecordComponent, selector: "hlist-form-record", inputs: { configurations: "configurations", endPointConfiguration: "endPointConfiguration", formID: "formID", form: "form", externalButtons: "externalButtons" }, outputs: { onViewRecord: "onViewRecord", onAddViewEditRecord: "onAddViewEditRecord", onDeleteRecord: "onDeleteRecord", onAfterDeleteRecord: "onAfterDeleteRecord" }, viewQueries: [{ propertyName: "tableRecords", first: true, predicate: ["tableRecords"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<mat-card class=\"list-form-record\">\r\n <mat-card-header class=\"align-items-center justify-content-between\">\r\n <mat-card-title *ngIf=\"loadedFilters && showTitle\"\r\n >Elenco {{ form.Name }}</mat-card-title\r\n >\r\n <!-- <mat-card-actions>\r\n <button\r\n class=\"btn btn-primary\"\r\n mat-raised-button\r\n color=\"primary\"\r\n type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\"\r\n >\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px\">Aggiungi</span>\r\n </button>\r\n </mat-card-actions> -->\r\n </mat-card-header>\r\n <mat-card-content>\r\n <!--#region FILTERS -->\r\n <div class=\"row\" *ngIf=\"loadedFilters\">\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo inizio'\"\r\n [label]=\"'Periodo inizio'\"\r\n [(ngModelInput)]=\"minDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo fine'\"\r\n [label]=\"'Periodo fine'\"\r\n [(ngModelInput)]=\"maxDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <mat-form-field>\r\n <mat-label>Selezione dei campi</mat-label>\r\n <mat-select (selectionChange)=\"onSelectionChange($event)\" multiple>\r\n <mat-option *ngFor=\"let property of properties\" [value]=\"property\">\r\n {{ propertiesLabel[property.label] }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <button\r\n [disabled]=\"\r\n selectedProperties == null || selectedProperties.length == 0\r\n \"\r\n class=\"btn btn-graph-generate button-next me-2\"\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"filterDataAnswers()\"\r\n >\r\n Genera\r\n </button>\r\n </div> -->\r\n </div>\r\n <!--#endregion FILTERS -->\r\n\r\n <!--#region TABLE -->\r\n <div class=\"table-container mt-3 mb-2\" *ngIf=\"filteredAnswers && filteredAnswers.length > 0; else no_answers\">\r\n <table\r\n mat-table\r\n [dataSource]=\"selectedProperties\"\r\n class=\"mat-elevation-z8 mat-table-fixed\"\r\n >\r\n <!-- Colonna fissa per le propriet\u00E0 -->\r\n <ng-container matColumnDef=\"property\" sticky>\r\n <th mat-header-cell *matHeaderCellDef class=\"sticky-column\">\r\n Data Inserimento\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let selectedProperties\"\r\n class=\"sticky-column\"\r\n >\r\n {{ propertiesLabel[selectedProperties.label] }}\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Genera dinamicamente le colonne per ogni risposta -->\r\n <ng-container\r\n *ngFor=\"let value of filteredAnswers; let i = index\"\r\n [matColumnDef]=\"'col' + i\"\r\n >\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ value.AnswerDate | date : \"dd/MM/yyyy HH:mm\" }}\r\n </th>\r\n <!-- <th mat-header-cell *matHeaderCellDef> {{ value.AnswerDate | date:'dd/MM/yyyy HH:mm' }} </th> -->\r\n <td mat-cell *matCellDef=\"let selectedProperties\">\r\n {{\r\n selectedProperties.label === \"AnswerDate\"\r\n ? (value.AnswerDate | date : \"dd/MM/yyyy HH:mm\")\r\n : printValue(selectedProperties.type, value[selectedProperties.label], selectedProperties.config, value) ?? \"N/A\"\r\n }}\r\n <!-- - \r\n {{selectedProperties.type}}\r\n {{selectedProperties.label}} -->\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Header della tabella -->\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n\r\n <!-- Righe della tabella -->\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\r\n </table>\r\n </div>\r\n \r\n <ng-template #no_answers>\r\n <div class=\"mt-3 mb-2 text-center\">\r\n <span>\r\n Non ci sono risposte \r\n </span>\r\n </div>\r\n </ng-template>\r\n <!--#region TABLE -->\r\n </mat-card-content>\r\n <mat-card-footer>\r\n <!-- <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar> -->\r\n </mat-card-footer>\r\n</mat-card>\r\n\r\n<!-- <div class=\"row eqp-dynamic-module-title list-form-record-header\">\r\n <div class=\"col-md-6\">\r\n <h4 *ngIf=\"showTitle\">\r\n <b>Elenco {{ form.Name }}</b>\r\n </h4>\r\n </div>\r\n <div class=\"col-md-6 text-right\" *ngIf=\"defaultListActions.add\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\">\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\r\n<eqp-table class=\"list-form-record-table\" #tableRecords *ngIf=\"loader && configurations.values\"\r\n [data]=\"configurations.values\" [columns]=\"columns\"></eqp-table> -->\r\n", styles: ["::ng-deep .error-color{color:var(--danger)}::ng-deep .success-color{color:var(--success)}.table-container{max-width:100%;overflow-x:auto;border:1px solid #ddd}.sticky-column{position:sticky;left:0;background:white;z-index:10;box-shadow:2px 0 5px #0000001a}.mat-table-fixed{width:-moz-max-content;width:max-content;min-width:100%;table-layout:fixed}th,td{text-align:center;padding:10px;min-width:100px;max-width:200px}\n"], dependencies: [{ kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i6.MatCardFooter, selector: "mat-card-footer" }, { kind: "component", type: i6.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i6.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.TmwDateTimePickerComponent, selector: "tmw-datetimepicker", inputs: ["debugMode", "ngModelInput", "formGroupInput", "formControlNameInput", "pickerMode", "timeType", "label", "placeholder", "hint", "minDate", "maxDate", "locale", "inputFormat", "outputFormat", "forSaveLocalOnDB", "disabled", "readonly", "currentDateAsDefault", "showSpinners", "touchUi", "enableMeridian", "hideTime", "stepHour", "showHours", "hourLabel", "stepMinute", "showMinutes", "minuteLabel", "stepSecond", "showSeconds", "secondLabel", "disableMinute", "dayLabel", "monthLabel", "yearLabel", "highLightedDates", "highLightedAriaFormat"], outputs: ["ngModelInputChange"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
2346
2405
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HListFormRecordComponent, decorators: [{
2347
2406
  type: Component,
2348
- args: [{ selector: "hlist-form-record", template: "<mat-card class=\"list-form-record\">\r\n <mat-card-header class=\"align-items-center justify-content-between\">\r\n <mat-card-title *ngIf=\"loadedFilters && showTitle\"\r\n >Elenco {{ form.Name }}</mat-card-title\r\n >\r\n <!-- <mat-card-actions>\r\n <button\r\n class=\"btn btn-primary\"\r\n mat-raised-button\r\n color=\"primary\"\r\n type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\"\r\n >\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px\">Aggiungi</span>\r\n </button>\r\n </mat-card-actions> -->\r\n </mat-card-header>\r\n <mat-card-content>\r\n <!--#region FILTERS -->\r\n <div class=\"row\" *ngIf=\"loadedFilters\">\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo inizio'\"\r\n [label]=\"'Periodo inizio'\"\r\n [(ngModelInput)]=\"minDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo fine'\"\r\n [label]=\"'Periodo fine'\"\r\n [(ngModelInput)]=\"maxDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <mat-form-field>\r\n <mat-label>Selezione dei campi</mat-label>\r\n <mat-select (selectionChange)=\"onSelectionChange($event)\" multiple>\r\n <mat-option *ngFor=\"let property of properties\" [value]=\"property\">\r\n {{ propertiesLabel[property.label] }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <button\r\n [disabled]=\"\r\n selectedProperties == null || selectedProperties.length == 0\r\n \"\r\n class=\"btn btn-graph-generate button-next me-2\"\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"filterDataAnswers()\"\r\n >\r\n Genera\r\n </button>\r\n </div> -->\r\n </div>\r\n <!--#endregion FILTERS -->\r\n\r\n <!--#region TABLE -->\r\n <div class=\"table-container\">\r\n <table\r\n mat-table\r\n [dataSource]=\"selectedProperties\"\r\n class=\"mat-elevation-z8 mat-table-fixed\"\r\n >\r\n <!-- Colonna fissa per le propriet\u00E0 -->\r\n <ng-container matColumnDef=\"property\" sticky>\r\n <th mat-header-cell *matHeaderCellDef class=\"sticky-column\">\r\n Data Inserimento\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let selectedProperties\"\r\n class=\"sticky-column\"\r\n >\r\n {{ propertiesLabel[selectedProperties.label] }}\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Genera dinamicamente le colonne per ogni risposta -->\r\n <ng-container\r\n *ngFor=\"let value of filteredAnswers; let i = index\"\r\n [matColumnDef]=\"'col' + i\"\r\n >\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ value.AnswerDate | date : \"dd/MM/yyyy HH:mm\" }}\r\n </th>\r\n <!-- <th mat-header-cell *matHeaderCellDef> {{ value.AnswerDate | date:'dd/MM/yyyy HH:mm' }} </th> -->\r\n <td mat-cell *matCellDef=\"let selectedProperties\">\r\n {{\r\n selectedProperties.label === \"AnswerDate\"\r\n ? (value.AnswerDate | date : \"dd/MM/yyyy HH:mm\")\r\n : printValue(selectedProperties.type, value[selectedProperties.label], selectedProperties.config) ?? \"N/A\"\r\n }}\r\n <!-- - \r\n {{selectedProperties.type}}\r\n {{selectedProperties.label}} -->\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Header della tabella -->\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n\r\n <!-- Righe della tabella -->\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\r\n </table>\r\n </div>\r\n <!--#region TABLE -->\r\n </mat-card-content>\r\n <mat-card-footer>\r\n <!-- <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar> -->\r\n </mat-card-footer>\r\n</mat-card>\r\n\r\n<!-- <div class=\"row eqp-dynamic-module-title list-form-record-header\">\r\n <div class=\"col-md-6\">\r\n <h4 *ngIf=\"showTitle\">\r\n <b>Elenco {{ form.Name }}</b>\r\n </h4>\r\n </div>\r\n <div class=\"col-md-6 text-right\" *ngIf=\"defaultListActions.add\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\">\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\r\n<eqp-table class=\"list-form-record-table\" #tableRecords *ngIf=\"loader && configurations.values\"\r\n [data]=\"configurations.values\" [columns]=\"columns\"></eqp-table> -->\r\n", styles: ["::ng-deep .error-color{color:var(--danger)}::ng-deep .success-color{color:var(--success)}.table-container{max-width:100%;overflow-x:auto;border:1px solid #ddd}.sticky-column{position:sticky;left:0;background:white;z-index:10;box-shadow:2px 0 5px #0000001a}.mat-table-fixed{width:-moz-max-content;width:max-content;min-width:100%;table-layout:fixed}th,td{text-align:center;padding:10px;min-width:100px;max-width:200px}\n"] }]
2407
+ args: [{ selector: "hlist-form-record", template: "<mat-card class=\"list-form-record\">\r\n <mat-card-header class=\"align-items-center justify-content-between\">\r\n <mat-card-title *ngIf=\"loadedFilters && showTitle\"\r\n >Elenco {{ form.Name }}</mat-card-title\r\n >\r\n <!-- <mat-card-actions>\r\n <button\r\n class=\"btn btn-primary\"\r\n mat-raised-button\r\n color=\"primary\"\r\n type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\"\r\n >\r\n <mat-icon>add</mat-icon>\r\n <span style=\"margin-left: 10px\">Aggiungi</span>\r\n </button>\r\n </mat-card-actions> -->\r\n </mat-card-header>\r\n <mat-card-content>\r\n <!--#region FILTERS -->\r\n <div class=\"row\" *ngIf=\"loadedFilters\">\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo inizio'\"\r\n [label]=\"'Periodo inizio'\"\r\n [(ngModelInput)]=\"minDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3\">\r\n <tmw-datetimepicker\r\n class=\"date\"\r\n [placeholder]=\"'Periodo fine'\"\r\n [label]=\"'Periodo fine'\"\r\n [(ngModelInput)]=\"maxDate\"\r\n (ngModelInputChange)=\"filterDataAnswers()\"\r\n [pickerMode]=\"modes.DATEPICKER\"\r\n [outputFormat]=\"'DD/MM/YYYY'\"\r\n [showSeconds]=\"false\"\r\n >\r\n </tmw-datetimepicker>\r\n </div>\r\n <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <mat-form-field>\r\n <mat-label>Selezione dei campi</mat-label>\r\n <mat-select (selectionChange)=\"onSelectionChange($event)\" multiple>\r\n <mat-option *ngFor=\"let property of properties\" [value]=\"property\">\r\n {{ propertiesLabel[property.label] }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- <div class=\"col-sm-12 col-md-3 mt-2\">\r\n <button\r\n [disabled]=\"\r\n selectedProperties == null || selectedProperties.length == 0\r\n \"\r\n class=\"btn btn-graph-generate button-next me-2\"\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"filterDataAnswers()\"\r\n >\r\n Genera\r\n </button>\r\n </div> -->\r\n </div>\r\n <!--#endregion FILTERS -->\r\n\r\n <!--#region TABLE -->\r\n <div class=\"table-container mt-3 mb-2\" *ngIf=\"filteredAnswers && filteredAnswers.length > 0; else no_answers\">\r\n <table\r\n mat-table\r\n [dataSource]=\"selectedProperties\"\r\n class=\"mat-elevation-z8 mat-table-fixed\"\r\n >\r\n <!-- Colonna fissa per le propriet\u00E0 -->\r\n <ng-container matColumnDef=\"property\" sticky>\r\n <th mat-header-cell *matHeaderCellDef class=\"sticky-column\">\r\n Data Inserimento\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let selectedProperties\"\r\n class=\"sticky-column\"\r\n >\r\n {{ propertiesLabel[selectedProperties.label] }}\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Genera dinamicamente le colonne per ogni risposta -->\r\n <ng-container\r\n *ngFor=\"let value of filteredAnswers; let i = index\"\r\n [matColumnDef]=\"'col' + i\"\r\n >\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ value.AnswerDate | date : \"dd/MM/yyyy HH:mm\" }}\r\n </th>\r\n <!-- <th mat-header-cell *matHeaderCellDef> {{ value.AnswerDate | date:'dd/MM/yyyy HH:mm' }} </th> -->\r\n <td mat-cell *matCellDef=\"let selectedProperties\">\r\n {{\r\n selectedProperties.label === \"AnswerDate\"\r\n ? (value.AnswerDate | date : \"dd/MM/yyyy HH:mm\")\r\n : printValue(selectedProperties.type, value[selectedProperties.label], selectedProperties.config, value) ?? \"N/A\"\r\n }}\r\n <!-- - \r\n {{selectedProperties.type}}\r\n {{selectedProperties.label}} -->\r\n </td>\r\n </ng-container>\r\n\r\n <!-- Header della tabella -->\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n\r\n <!-- Righe della tabella -->\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\r\n </table>\r\n </div>\r\n \r\n <ng-template #no_answers>\r\n <div class=\"mt-3 mb-2 text-center\">\r\n <span>\r\n Non ci sono risposte \r\n </span>\r\n </div>\r\n </ng-template>\r\n <!--#region TABLE -->\r\n </mat-card-content>\r\n <mat-card-footer>\r\n <!-- <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar> -->\r\n </mat-card-footer>\r\n</mat-card>\r\n\r\n<!-- <div class=\"row eqp-dynamic-module-title list-form-record-header\">\r\n <div class=\"col-md-6\">\r\n <h4 *ngIf=\"showTitle\">\r\n <b>Elenco {{ form.Name }}</b>\r\n </h4>\r\n </div>\r\n <div class=\"col-md-6 text-right\" *ngIf=\"defaultListActions.add\">\r\n <button class=\"btn btn-primary\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"onAddViewEditRecord.emit(null)\">\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\r\n<eqp-table class=\"list-form-record-table\" #tableRecords *ngIf=\"loader && configurations.values\"\r\n [data]=\"configurations.values\" [columns]=\"columns\"></eqp-table> -->\r\n", styles: ["::ng-deep .error-color{color:var(--danger)}::ng-deep .success-color{color:var(--success)}.table-container{max-width:100%;overflow-x:auto;border:1px solid #ddd}.sticky-column{position:sticky;left:0;background:white;z-index:10;box-shadow:2px 0 5px #0000001a}.mat-table-fixed{width:-moz-max-content;width:max-content;min-width:100%;table-layout:fixed}th,td{text-align:center;padding:10px;min-width:100px;max-width:200px}\n"] }]
2349
2408
  }], ctorParameters: function () { return [{ type: UtilityHelperService }, { type: i0.ChangeDetectorRef }, { type: i2$1.DatePipe }]; }, propDecorators: { configurations: [{
2350
2409
  type: Input
2351
2410
  }], endPointConfiguration: [{