cilog-lib 0.3.8 → 0.4.2

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.
Files changed (52) hide show
  1. package/cilog-lib.d.ts +1 -3
  2. package/esm2020/cilog-lib.mjs +5 -0
  3. package/esm2020/lib/cilog-lib.component.mjs +26 -0
  4. package/esm2020/lib/cilog-lib.module.mjs +69 -0
  5. package/esm2020/lib/cilog-lib.service.mjs +14 -0
  6. package/esm2020/lib/helpers/enums/grille.enum.mjs +24 -0
  7. package/esm2020/lib/helpers/interfaces/edition.interface.mjs +2 -0
  8. package/esm2020/lib/helpers/interfaces/grille.interface.mjs +2 -0
  9. package/esm2020/lib/helpers/interfaces/message.interface.mjs +2 -0
  10. package/esm2020/lib/modules/primeng.module.mjs +72 -0
  11. package/esm2020/lib/services/message.service.mjs +27 -0
  12. package/esm2020/lib/services/table.service.mjs +14 -0
  13. package/esm2020/lib/views/message/message.component.mjs +77 -0
  14. package/esm2020/lib/views/table/table.component.mjs +312 -0
  15. package/esm2020/public-api.mjs +20 -0
  16. package/fesm2015/cilog-lib.mjs +620 -0
  17. package/fesm2015/cilog-lib.mjs.map +1 -0
  18. package/fesm2020/cilog-lib.mjs +620 -0
  19. package/fesm2020/cilog-lib.mjs.map +1 -0
  20. package/lib/cilog-lib.component.d.ts +3 -0
  21. package/lib/cilog-lib.module.d.ts +12 -0
  22. package/lib/cilog-lib.service.d.ts +3 -0
  23. package/lib/helpers/enums/grille.enum.d.ts +1 -0
  24. package/lib/helpers/interfaces/grille.interface.d.ts +5 -0
  25. package/lib/modules/primeng.module.d.ts +18 -0
  26. package/lib/services/message.service.d.ts +3 -0
  27. package/lib/services/table.service.d.ts +3 -0
  28. package/lib/views/message/message.component.d.ts +3 -0
  29. package/lib/views/table/table.component.d.ts +11 -3
  30. package/package.json +22 -15
  31. package/public-api.d.ts +2 -0
  32. package/bundles/cilog-lib.umd.js +0 -837
  33. package/bundles/cilog-lib.umd.js.map +0 -1
  34. package/bundles/cilog-lib.umd.min.js +0 -2
  35. package/bundles/cilog-lib.umd.min.js.map +0 -1
  36. package/cilog-lib.metadata.json +0 -1
  37. package/esm2015/cilog-lib.js +0 -8
  38. package/esm2015/lib/cilog-lib.component.js +0 -18
  39. package/esm2015/lib/cilog-lib.module.js +0 -44
  40. package/esm2015/lib/cilog-lib.service.js +0 -13
  41. package/esm2015/lib/helpers/enums/grille.enum.js +0 -23
  42. package/esm2015/lib/helpers/interfaces/edition.interface.js +0 -2
  43. package/esm2015/lib/helpers/interfaces/grille.interface.js +0 -2
  44. package/esm2015/lib/helpers/interfaces/message.interface.js +0 -2
  45. package/esm2015/lib/modules/primeng.module.js +0 -39
  46. package/esm2015/lib/services/message.service.js +0 -25
  47. package/esm2015/lib/services/table.service.js +0 -13
  48. package/esm2015/lib/views/message/message.component.js +0 -76
  49. package/esm2015/lib/views/table/table.component.js +0 -260
  50. package/esm2015/public-api.js +0 -18
  51. package/fesm2015/cilog-lib.js +0 -503
  52. package/fesm2015/cilog-lib.js.map +0 -1
@@ -0,0 +1,620 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, NgModule, EventEmitter, Input, Output, ViewChild, LOCALE_ID } from '@angular/core';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import * as i2 from 'primeng/dialog';
5
+ import { DialogModule } from 'primeng/dialog';
6
+ import * as i3 from 'primeng/button';
7
+ import { ButtonModule } from 'primeng/button';
8
+ import * as i1 from 'primeng/api';
9
+ import { ConfirmationService } from 'primeng/api';
10
+ import * as i10 from '@angular/common';
11
+ import { CommonModule, registerLocaleData } from '@angular/common';
12
+ import * as i2$1 from 'primeng/table';
13
+ import { TableModule } from 'primeng/table';
14
+ import * as i11 from 'primeng/inputtext';
15
+ import { InputTextModule } from 'primeng/inputtext';
16
+ import * as i7 from 'primeng/selectbutton';
17
+ import { SelectButtonModule } from 'primeng/selectbutton';
18
+ import * as i6 from 'primeng/dropdown';
19
+ import { DropdownModule } from 'primeng/dropdown';
20
+ import * as i4 from 'primeng/inputnumber';
21
+ import { InputNumberModule } from 'primeng/inputnumber';
22
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
23
+ import * as i5 from 'primeng/multiselect';
24
+ import { MultiSelectModule } from 'primeng/multiselect';
25
+ import * as i3$1 from 'primeng/calendar';
26
+ import { CalendarModule } from 'primeng/calendar';
27
+ import * as i9 from 'primeng/tag';
28
+ import { TagModule } from 'primeng/tag';
29
+ import * as i13 from 'primeng/tooltip';
30
+ import { TooltipModule } from 'primeng/tooltip';
31
+ import * as i8 from 'primeng/inputswitch';
32
+ import { InputSwitchModule } from 'primeng/inputswitch';
33
+ import { BrowserModule } from '@angular/platform-browser';
34
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
35
+ import * as i12 from '@angular/forms';
36
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
37
+ import localeFr from '@angular/common/locales/fr';
38
+
39
+ class CilogMessageService {
40
+ constructor() {
41
+ this.message = new BehaviorSubject(null);
42
+ this.display = new BehaviorSubject(null);
43
+ }
44
+ showDialog(pContent, pSeverity, pClosable = true, pRefresh = false) {
45
+ this.message.next({
46
+ content: pContent,
47
+ severity: pSeverity,
48
+ closable: pClosable,
49
+ refresh: pRefresh
50
+ });
51
+ this.display.next(true);
52
+ }
53
+ closeDialog() {
54
+ this.display.next(false);
55
+ }
56
+ }
57
+ CilogMessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
58
+ CilogMessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogMessageService });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogMessageService, decorators: [{
60
+ type: Injectable
61
+ }], ctorParameters: function () { return []; } });
62
+
63
+ class CilogMessageComponent {
64
+ constructor(messageService) {
65
+ this.messageService = messageService;
66
+ }
67
+ ngOnInit() {
68
+ this.display = false;
69
+ this.messageService.message.subscribe(message => {
70
+ if (message != null) {
71
+ this.message = message;
72
+ }
73
+ });
74
+ this.messageService.display.subscribe(display => {
75
+ if (display != null) {
76
+ this.display = display;
77
+ }
78
+ });
79
+ }
80
+ headerBySeverity() {
81
+ if (this.message != null) {
82
+ switch (this.message.severity) {
83
+ case 'warn':
84
+ return 'Attention';
85
+ case 'error':
86
+ return 'Erreur';
87
+ case 'success':
88
+ return 'Succès';
89
+ case 'info':
90
+ return 'Information';
91
+ }
92
+ }
93
+ }
94
+ iconBySeverity() {
95
+ if (this.message != null) {
96
+ switch (this.message.severity) {
97
+ case 'warn':
98
+ return 'pi-exclamation-triangle';
99
+ case 'error':
100
+ return 'pi-exclamation-circle';
101
+ case 'success':
102
+ return 'pi-check';
103
+ case 'info':
104
+ return 'pi-info-circle';
105
+ }
106
+ }
107
+ }
108
+ classBySeverity() {
109
+ if (this.message != null) {
110
+ switch (this.message.severity) {
111
+ case 'warn':
112
+ return 'message_warn';
113
+ case 'error':
114
+ return 'message_error';
115
+ case 'success':
116
+ return 'message_success';
117
+ case 'info':
118
+ return 'message_info';
119
+ }
120
+ }
121
+ }
122
+ refreshPage() {
123
+ window.location.reload();
124
+ }
125
+ }
126
+ CilogMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogMessageComponent, deps: [{ token: CilogMessageService }], target: i0.ɵɵFactoryTarget.Component });
127
+ CilogMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: CilogMessageComponent, selector: "cilog-message", ngImport: i0, template: "<p-dialog [styleClass]=\"classBySeverity()\"\r\n [(visible)]=\"display\"\r\n [modal]=\"true\"\r\n [baseZIndex]=\"10000\"\r\n [closable]=\"false\"\r\n [resizable]=\"false\"\r\n [draggable]=\"false\">\r\n\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <i class=\"pi {{ iconBySeverity() }} header_icon\"></i>\r\n <span class=\"header_text\">{{ headerBySeverity() }}</span>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <p class=\"content\">\r\n {{ message?.content }}\r\n </p>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <p-button *ngIf=\"message?.closable == true && message?.refresh == false\" icon=\"pi pi-check\" (click)=\"display=false\" label=\"Ok\" styleClass=\"p-button-text\"></p-button>\r\n <p-button *ngIf=\"message?.refresh == true\" icon=\"pi pi-refresh\" (click)=\"refreshPage()\" label=\"Rafra\u00EEchir\" styleClass=\"p-button-text\"></p-button>\r\n </ng-template>\r\n\r\n</p-dialog>\r\n", styles: [":host ::ng-deep .message_success :nth-child(1n){background-color:#b7fdc0}:host ::ng-deep .message_error :nth-child(1n){background-color:#fdb8b7}:host ::ng-deep .message_warn :nth-child(1n){background-color:#fff5ba}:host ::ng-deep .message_info :nth-child(1n){background-color:#b7eefd}:host ::ng-deep .p-dialog-content,:host ::ng-deep .p-dialog-footer,:host ::ng-deep .p-dialog-header{padding:10px}:host ::ng-deep .content{margin:4px}:host ::ng-deep .p-button-text{padding-top:0;padding-bottom:3px}:host ::ng-deep .header_text{font-weight:500;font-size:1.25rem;margin-left:10px}:host ::ng-deep .header_icon{font-size:1.5rem}:host ::ng-deep .p-dialog-header{justify-content:inherit}\n"], components: [{ type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogMessageComponent, decorators: [{
129
+ type: Component,
130
+ args: [{ selector: 'cilog-message', template: "<p-dialog [styleClass]=\"classBySeverity()\"\r\n [(visible)]=\"display\"\r\n [modal]=\"true\"\r\n [baseZIndex]=\"10000\"\r\n [closable]=\"false\"\r\n [resizable]=\"false\"\r\n [draggable]=\"false\">\r\n\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <i class=\"pi {{ iconBySeverity() }} header_icon\"></i>\r\n <span class=\"header_text\">{{ headerBySeverity() }}</span>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <p class=\"content\">\r\n {{ message?.content }}\r\n </p>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <p-button *ngIf=\"message?.closable == true && message?.refresh == false\" icon=\"pi pi-check\" (click)=\"display=false\" label=\"Ok\" styleClass=\"p-button-text\"></p-button>\r\n <p-button *ngIf=\"message?.refresh == true\" icon=\"pi pi-refresh\" (click)=\"refreshPage()\" label=\"Rafra\u00EEchir\" styleClass=\"p-button-text\"></p-button>\r\n </ng-template>\r\n\r\n</p-dialog>\r\n", styles: [":host ::ng-deep .message_success :nth-child(1n){background-color:#b7fdc0}:host ::ng-deep .message_error :nth-child(1n){background-color:#fdb8b7}:host ::ng-deep .message_warn :nth-child(1n){background-color:#fff5ba}:host ::ng-deep .message_info :nth-child(1n){background-color:#b7eefd}:host ::ng-deep .p-dialog-content,:host ::ng-deep .p-dialog-footer,:host ::ng-deep .p-dialog-header{padding:10px}:host ::ng-deep .content{margin:4px}:host ::ng-deep .p-button-text{padding-top:0;padding-bottom:3px}:host ::ng-deep .header_text{font-weight:500;font-size:1.25rem;margin-left:10px}:host ::ng-deep .header_icon{font-size:1.5rem}:host ::ng-deep .p-dialog-header{justify-content:inherit}\n"] }]
131
+ }], ctorParameters: function () { return [{ type: CilogMessageService }]; } });
132
+
133
+ class CilogLibComponent {
134
+ constructor() { }
135
+ ngOnInit() {
136
+ }
137
+ }
138
+ CilogLibComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
139
+ CilogLibComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: CilogLibComponent, selector: "lib-cilog-lib", ngImport: i0, template: `
140
+ <p>
141
+ cilog-lib works!
142
+ </p>
143
+ `, isInline: true });
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibComponent, decorators: [{
145
+ type: Component,
146
+ args: [{
147
+ selector: 'lib-cilog-lib',
148
+ template: `
149
+ <p>
150
+ cilog-lib works!
151
+ </p>
152
+ `,
153
+ styles: []
154
+ }]
155
+ }], ctorParameters: function () { return []; } });
156
+
157
+ class PrimengModule {
158
+ }
159
+ PrimengModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: PrimengModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
160
+ PrimengModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: PrimengModule, imports: [CommonModule], exports: [DialogModule,
161
+ ButtonModule,
162
+ TableModule,
163
+ InputTextModule,
164
+ SelectButtonModule,
165
+ DropdownModule,
166
+ InputNumberModule,
167
+ ConfirmDialogModule,
168
+ MultiSelectModule,
169
+ CalendarModule,
170
+ TagModule,
171
+ TooltipModule,
172
+ InputSwitchModule] });
173
+ PrimengModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: PrimengModule, imports: [[
174
+ CommonModule
175
+ ], DialogModule,
176
+ ButtonModule,
177
+ TableModule,
178
+ InputTextModule,
179
+ SelectButtonModule,
180
+ DropdownModule,
181
+ InputNumberModule,
182
+ ConfirmDialogModule,
183
+ MultiSelectModule,
184
+ CalendarModule,
185
+ TagModule,
186
+ TooltipModule,
187
+ InputSwitchModule] });
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: PrimengModule, decorators: [{
189
+ type: NgModule,
190
+ args: [{
191
+ declarations: [],
192
+ exports: [
193
+ DialogModule,
194
+ ButtonModule,
195
+ TableModule,
196
+ InputTextModule,
197
+ SelectButtonModule,
198
+ DropdownModule,
199
+ InputNumberModule,
200
+ ConfirmDialogModule,
201
+ MultiSelectModule,
202
+ CalendarModule,
203
+ TagModule,
204
+ TooltipModule,
205
+ InputSwitchModule
206
+ ],
207
+ imports: [
208
+ CommonModule
209
+ ]
210
+ }]
211
+ }] });
212
+
213
+ var ColType;
214
+ (function (ColType) {
215
+ ColType["MultiSelect"] = "MultiSelect";
216
+ ColType["Dropdown"] = "Dropdown";
217
+ ColType["File"] = "File";
218
+ ColType["Text"] = "Text";
219
+ ColType["Number"] = "Number";
220
+ ColType["SelectButton"] = "SelectButton";
221
+ ColType["Switch"] = "Switch";
222
+ ColType["Button"] = "Button";
223
+ ColType["Image"] = "Image";
224
+ ColType["Date"] = "Date";
225
+ ColType["State"] = "State";
226
+ })(ColType || (ColType = {}));
227
+ var Severity;
228
+ (function (Severity) {
229
+ Severity["Secondary"] = "secondary";
230
+ Severity["Success"] = "success";
231
+ Severity["Info"] = "info";
232
+ Severity["Warning"] = "warning";
233
+ Severity["Help"] = "help";
234
+ Severity["Danger"] = "danger";
235
+ })(Severity || (Severity = {}));
236
+
237
+ class CilogTableComponent {
238
+ constructor(confirmationService, filterService, cdRef) {
239
+ this.confirmationService = confirmationService;
240
+ this.filterService = filterService;
241
+ this.cdRef = cdRef;
242
+ this.onEdit = new EventEmitter();
243
+ this.onEditInit = new EventEmitter();
244
+ this.onDelete = new EventEmitter();
245
+ this.onSelect = new EventEmitter();
246
+ this.onUnselect = new EventEmitter();
247
+ this.onFilter = new EventEmitter();
248
+ this.onSort = new EventEmitter();
249
+ this.onPage = new EventEmitter();
250
+ }
251
+ ngOnInit() {
252
+ this.optionsSwitch = [
253
+ { label: 'Oui', value: true },
254
+ { label: 'Non', value: false },
255
+ ];
256
+ // Date
257
+ this.filterService.register('dateRangeFilter', (cell, filter) => {
258
+ if (filter == null) {
259
+ return true;
260
+ }
261
+ let start = filter[0].getTime();
262
+ let end;
263
+ let endDate;
264
+ if (filter[1]) {
265
+ endDate = new Date(filter[1].getFullYear(), filter[1].getMonth(), filter[1].getDate(), 23, 59, 59);
266
+ }
267
+ else {
268
+ endDate = new Date(filter[0].getFullYear(), filter[0].getMonth(), filter[0].getDate(), 23, 59, 59);
269
+ }
270
+ end = endDate.getTime();
271
+ return cell.value == null ? false : cell.value.getTime() >= start && cell.value.getTime() <= end;
272
+ });
273
+ // Text
274
+ this.filterService.register('textFilter', (cell, filter) => {
275
+ if (filter == null || filter.trim() == '') {
276
+ return true;
277
+ }
278
+ if (cell.value == null) {
279
+ return false;
280
+ }
281
+ return cell.value.toLowerCase().includes(filter.toLowerCase());
282
+ });
283
+ // Number
284
+ this.filterService.register('numberFilter', (cell, filter) => {
285
+ if (filter == null) {
286
+ return true;
287
+ }
288
+ if (cell.value == null) {
289
+ return false;
290
+ }
291
+ return cell.value == filter;
292
+ });
293
+ // Objet
294
+ this.filterService.register('objetFilter', (cell, filter) => {
295
+ return (filter.indexOf(cell.value) != -1);
296
+ });
297
+ // Liste
298
+ this.filterService.register('listeFilter', (cell, filter) => {
299
+ let ok = false;
300
+ filter.forEach(val => {
301
+ if (cell.value.indexOf(val) != -1) {
302
+ ok = true;
303
+ }
304
+ });
305
+ return ok;
306
+ });
307
+ // Switch
308
+ this.filterService.register('switchFilter', (cell, filter) => {
309
+ return (filter.indexOf(cell.value) != -1);
310
+ });
311
+ this.columns.forEach(col => {
312
+ if (col.options == null) {
313
+ col.options = { defaultFilters: null };
314
+ }
315
+ });
316
+ }
317
+ ngAfterViewInit() {
318
+ this.columns.forEach(col => {
319
+ if (col.options.defaultFilters != null) {
320
+ this.filter(col, col.options.defaultFilters, this.getFilterByCol(col));
321
+ }
322
+ });
323
+ this.cdRef.detectChanges();
324
+ }
325
+ // Sort
326
+ customSort(event) {
327
+ let col = this.columns.find(col => col.id == event.field);
328
+ this.onSort.emit({ column: col, order: event.order });
329
+ let typeCol = col.type;
330
+ event.data.sort((data1, data2) => {
331
+ let value1 = data1[event.field].value;
332
+ let value2 = data2[event.field].value;
333
+ let result = null;
334
+ if (value1 == null && value2 != null)
335
+ result = -1;
336
+ else if (value1 != null && value2 == null)
337
+ result = 1;
338
+ else if (value1 == null && value2 == null)
339
+ result = 0;
340
+ else if (typeCol == ColType.Text || typeCol == ColType.File)
341
+ result = value1.localeCompare(value2);
342
+ else if (typeCol == ColType.MultiSelect) {
343
+ result = this.getMultiSelectConcat(value1, this.getOption(col, data1, 'optionLabel')).localeCompare(this.getMultiSelectConcat(value2, this.getOption(col, data2, 'optionLabel')));
344
+ }
345
+ else if (typeCol == ColType.Dropdown || typeCol == ColType.SelectButton || typeCol == ColType.State) {
346
+ result = value1[this.getOption(col, data1, 'optionLabel')].localeCompare(value2[this.getOption(col, data2, 'optionLabel')]);
347
+ }
348
+ else if (typeCol == ColType.Number || typeCol == ColType.Date) {
349
+ result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;
350
+ }
351
+ else if (typeCol == ColType.Switch)
352
+ result = (value1 === value2) ? 0 : value1 ? -1 : 1;
353
+ else
354
+ result == 0;
355
+ return (event.order * result);
356
+ });
357
+ }
358
+ checkType(typeCol, col) {
359
+ return col['type'] == typeCol;
360
+ }
361
+ clickById(id) {
362
+ document.getElementById(id).click();
363
+ }
364
+ onEditCell(row, column, value) {
365
+ if (this.getOption(column, row, 'action') != null) {
366
+ this.getOption(column, row, 'action')();
367
+ event.stopPropagation();
368
+ }
369
+ else {
370
+ this.onEdit.emit({ row: row, column: column, value: value });
371
+ }
372
+ }
373
+ onSelectRow(row) {
374
+ this.onSelect.emit({ row: row });
375
+ }
376
+ refreshData() {
377
+ if (this.options.sortable && this.options.virtualScroll) {
378
+ this.values = [...this.values];
379
+ }
380
+ }
381
+ onPageTable(event) {
382
+ this.onPage.emit(event);
383
+ }
384
+ onUnselectRow(row) {
385
+ this.onUnselect.emit({ row: row });
386
+ }
387
+ onDeleteLine(row) {
388
+ this.confirmationService.confirm({
389
+ key: 'confirm',
390
+ message: 'Êtes-vous sûr de vouloir supprimer cette ligne ?',
391
+ accept: () => {
392
+ this.values.splice(this.values.indexOf(row), 1);
393
+ this.values = [...this.values];
394
+ this.onDelete.emit({ row: row });
395
+ }
396
+ });
397
+ }
398
+ onEditInitCell(row, column, value) {
399
+ this.onEditInit.emit({ row: row, column: column, value: value });
400
+ }
401
+ isModeEdition() {
402
+ return this.options.editable;
403
+ }
404
+ getOption(col, row, option) {
405
+ if (row[col.id].options != null) {
406
+ if (row[col.id].options[option] != null) {
407
+ return row[col.id].options[option];
408
+ }
409
+ }
410
+ if (col.options != null) {
411
+ if (col.options[option] != null) {
412
+ return col.options[option];
413
+ }
414
+ }
415
+ return null;
416
+ }
417
+ getMultiSelectConcat(value, label) {
418
+ if (value != null) {
419
+ return value.map(val => { return val[label]; }).join(', ');
420
+ }
421
+ else {
422
+ return '';
423
+ }
424
+ }
425
+ getSelectLibelleByValue(row, col) {
426
+ let label = '';
427
+ if (row[col.id].value == null) {
428
+ return label;
429
+ }
430
+ if (row[col.id].options != null) {
431
+ label = row[col.id].options['options'].find(opt => opt.value == row[col.id].value)[row[col.id].options.optionLabel];
432
+ }
433
+ else {
434
+ if (col.options != null) {
435
+ label = col.options['options'].find(opt => opt.value == row[col.id].value)[col.options.optionLabel];
436
+ }
437
+ }
438
+ return label;
439
+ }
440
+ getFilterByCol(col) {
441
+ // Dates (range)
442
+ if (col.type == ColType.Date) {
443
+ return 'dateRangeFilter';
444
+ }
445
+ // Number
446
+ if (col.type == ColType.Number) {
447
+ return 'numberFilter';
448
+ }
449
+ // Objet
450
+ if (col.type == ColType.Dropdown || col.type == ColType.State || col.type == ColType.SelectButton) {
451
+ return 'objetFilter';
452
+ }
453
+ // Liste
454
+ if (col.type == ColType.MultiSelect) {
455
+ return 'listeFilter';
456
+ }
457
+ // Texte
458
+ if (col.type == ColType.File || col.type == ColType.Text) {
459
+ return 'textFilter';
460
+ }
461
+ return null;
462
+ }
463
+ onFilterCol(event, col) {
464
+ // Dates (range)
465
+ if (col.type == ColType.Date) {
466
+ this.filter(col, col.options.defaultFilters, 'dateRangeFilter');
467
+ }
468
+ // Number
469
+ if (col.type == ColType.Number) {
470
+ this.filter(col, event.value, 'numberFilter');
471
+ }
472
+ // Objet
473
+ if (col.type == ColType.Dropdown || col.type == ColType.State || col.type == ColType.SelectButton) {
474
+ this.filter(col, event.value, 'objetFilter');
475
+ }
476
+ // Liste
477
+ if (col.type == ColType.MultiSelect) {
478
+ this.filter(col, event.value, 'listeFilter');
479
+ }
480
+ // Texte
481
+ if (col.type == ColType.File || col.type == ColType.Text) {
482
+ this.filter(col, event.target.value, 'textFilter');
483
+ }
484
+ // Switch
485
+ if (col.type == ColType.Switch) {
486
+ this.filter(col, event.value, 'switchFilter');
487
+ }
488
+ }
489
+ filter(col, val, filter) {
490
+ this.filterCol = col;
491
+ this.filterValue = val;
492
+ this.table.filter(val, col.id, filter);
493
+ }
494
+ onFilterTable(event) {
495
+ this.onFilter.emit({ column: this.filterCol, value: this.filterValue, filteredValue: this.table.filteredValue });
496
+ }
497
+ }
498
+ CilogTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogTableComponent, deps: [{ token: i1.ConfirmationService }, { token: i1.FilterService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
499
+ CilogTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: CilogTableComponent, selector: "cilog-table", inputs: { columns: "columns", values: "values", options: "options", loading: "loading" }, outputs: { onEdit: "onEdit", onEditInit: "onEditInit", onDelete: "onDelete", onSelect: "onSelect", onUnselect: "onUnselect", onFilter: "onFilter", onSort: "onSort", onPage: "onPage" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, static: true }], ngImport: i0, template: "<p-table #table\r\n [columns]=\"columns\"\r\n [value]=\"values\"\r\n dataKey=\"id\"\r\n [selectionMode]=\"options.selectable && !isModeEdition() ? 'single' : null\"\r\n [(selection)]=\"selectedRow\"\r\n (onRowSelect)=\"onSelectRow($event)\"\r\n (onRowUnselect)=\"onUnselectRow($event)\"\r\n (sortFunction)=\"customSort($event)\"\r\n [customSort]=\"options.grouping == null ? true : false\"\r\n [scrollable]=\"true\"\r\n [loading]=\"loading\"\r\n [scrollHeight]=\"options.scrollHeight != null ? options.scrollHeight : null\"\r\n [rowGroupMode]=\"options.grouping != null ? 'subheader' : null\"\r\n [groupRowsBy]=\"options.grouping != null ? options.grouping.obj + '.' + options.grouping.id : null\"\r\n [virtualScroll]=\"options.virtualScroll != null && options.scrollHeight != null ? true : false\"\r\n [virtualRowHeight]=\"35\"\r\n [paginator]=\"options.paginator == null ? false : true\"\r\n [rows]=\"options.paginatorRows\"\r\n (onPage)=\"onPageTable($event)\"\r\n (onFilter)=\"onFilterTable($event)\">\r\n\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\"\r\n [ngClass]=\"{ 'centerText' : options.centerHeaders }\"\r\n [pSortableColumn]=\"col.id\"\r\n [pSortableColumnDisabled]=\"options.grouping != null || !options.sortable\"\r\n id=\"{{ col.id }}\"\r\n (click)=\"refreshData()\">\r\n <span>{{ col.libelle }}</span>\r\n <p-sortIcon *ngIf=\"options.sortable && options.grouping == null\" [field]=\"col.id\"></p-sortIcon>\r\n </th>\r\n <th class=\"cellDelete\" *ngIf=\"options.rowsDeletable\"></th>\r\n </tr>\r\n <!-- FILTRES -->\r\n <tr *ngIf=\"options.filterable\">\r\n <ng-container *ngFor=\"let col of columns\">\r\n <!-- Text -->\r\n <th *ngIf=\"checkType('Text', col) || checkType('File', col)\">\r\n <input pInputText\r\n type=\"text\"\r\n (input)=\"onFilterCol($event, col)\">\r\n </th>\r\n\r\n <!-- Date -->\r\n <th *ngIf=\"checkType('Date', col)\">\r\n <p-calendar dateFormat=\"dd/mm/yy\"\r\n [inputId]=\"col.id + '_filter'\"\r\n firstDayOfWeek=\"1\"\r\n [readonlyInput]=\"true\"\r\n appendTo=\"body\"\r\n selectionMode=\"range\"\r\n (onSelect)=\"onFilterCol($event, col)\"\r\n showButtonBar=\"true\"\r\n (onClearClick)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\">\r\n </p-calendar>\r\n </th>\r\n\r\n <!-- Number -->\r\n <th *ngIf=\"checkType('Number', col)\">\r\n <p-inputNumber mode=\"decimal\"\r\n locale=\"fr-FR\"\r\n [minFractionDigits]=\"2\"\r\n [showButtons]=\"true\"\r\n (onInput)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\">\r\n </p-inputNumber>\r\n </th>\r\n\r\n <!-- Liste -->\r\n <th *ngIf=\"checkType('Dropdown', col) || checkType('MultiSelect', col) || checkType('SelectButton', col) || checkType('State', col)\">\r\n <p-multiSelect [options]=\"col.options?.options\"\r\n [filter]=\"true\"\r\n dataKey=\"ID\"\r\n [optionLabel]=\"col.options?.optionLabel\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n itemSize=\"30\"\r\n selectedItemsLabel=\"{0} selectionn\u00E9s\"\r\n (onChange)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\"\r\n [group]=\"col.options.optionGroupChildren != null ? true : false\"\r\n [optionGroupLabel]=\"col.options.optionGroupLabel\"\r\n [optionGroupChildren]=\"col.options.optionGroupChildren\">\r\n </p-multiSelect>\r\n </th>\r\n\r\n <!-- Switch -->\r\n <th *ngIf=\"checkType('Switch', col)\">\r\n <p-multiSelect [options]=\"optionsSwitch\"\r\n [showHeader]=\"false\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n itemSize=\"30\"\r\n selectedItemsLabel=\"{0} selectionn\u00E9s\"\r\n (onChange)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\">\r\n </p-multiSelect>\r\n </th>\r\n\r\n <!-- Non filtrable -->\r\n <th *ngIf=\"checkType('Button', col) || checkType('Image', col)\">\r\n\r\n </th>\r\n </ng-container>\r\n <th class=\"cellDelete\" *ngIf=\"options.rowsDeletable\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Groupheader -->\r\n <ng-template pTemplate=\"groupheader\" let-rowData>\r\n <tr pRowGroupHeader class=\"row_grouping\">\r\n <td [attr.colspan]=\"columns.length + 1\">\r\n <span class=\"text_bold\">{{ rowData[options.grouping.obj][options.grouping.libelle] }}</span>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Body -->\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr id=\"{{ rowData.id }}\"\r\n [ngStyle]=\"{ 'background-color': rowData.color ? rowData.color : null }\"\r\n [pSelectableRow]=\"rowData\"\r\n [pSelectableRowDisabled]=\"!options.selectable || isModeEdition()\">\r\n <ng-container *ngFor=\"let col of columns\">\r\n\r\n <!-- Text -->\r\n <td *ngIf=\"checkType('Text', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.id\"\r\n [pTooltip]=\"rowData[col.id].value\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <input pInputText\r\n type=\"text\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n (change)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n (keyup.enter)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n (click)=\"onEditInitCell(rowData, col, rowData[col.id].value)\" />\r\n </td>\r\n <td *ngIf=\"checkType('Text', col) && (!isModeEdition() || rowData.readonly || rowData[col.id]?.readonly)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"{ 'paddingCell': rowData[col.id] != null }\"\r\n [pTooltip]=\"rowData[col.id].value\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value }}</span>\r\n </td>\r\n\r\n <!-- Dropdown -->\r\n <td *ngIf=\"checkType('Dropdown', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value != null ? rowData[col.id].value[getOption(col, rowData, 'optionLabel')] : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-dropdown *ngIf=\"rowData[col.id] != null\"\r\n dataKey=\"ID\"\r\n [options]=\"getOption(col, rowData, 'options')\"\r\n [filter]=\"getOption(col, rowData, 'filter')\"\r\n [optionLabel]=\"getOption(col, rowData, 'optionLabel')\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [autoDisplayFirst]=\"false\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n [baseZIndex]=\"getOption(col, rowData, 'baseZIndex')\"\r\n [virtualScroll]=\"getOption(col, rowData, 'virtualScroll')\"\r\n [readonly]=\"rowData.readonly || rowData[col.id]?.readonly\"\r\n itemSize=\"30\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\">\r\n </p-dropdown>\r\n </td>\r\n <td *ngIf=\"checkType('Dropdown', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value != null ? rowData[col.id].value[getOption(col, rowData, 'optionLabel')] : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value != null ? rowData[col.id].value[getOption(col, rowData, 'optionLabel')] : '' }}</span>\r\n </td>\r\n\r\n <!-- Number -->\r\n <td *ngIf=\"checkType('Number', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | number\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-inputNumber *ngIf=\"rowData[col.id] && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n mode=\"decimal\"\r\n locale=\"fr-FR\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [showButtons]=\"getOption(col, rowData, 'showButtons')\"\r\n [suffix]=\"getOption(col, rowData, 'suffix')\"\r\n [prefix]=\"getOption(col, rowData, 'prefix') != null ? getOption(col, rowData, 'prefix') + ' ' : null\"\r\n [minFractionDigits]=\"2\"\r\n [maxFractionDigits]=\"getOption(col, rowData, 'maxDecimales') != null ? getOption(col, rowData, 'maxDecimales') : 2 \"\r\n (ngModelChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n (onFocus)=\"onEditInitCell(rowData, col, rowData[col.id].value)\">\r\n </p-inputNumber>\r\n </td>\r\n <td *ngIf=\"checkType('Number', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | number\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value | number }}</span>\r\n </td>\r\n\r\n <!-- Date -->\r\n <td *ngIf=\"checkType('Date', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | date: 'dd/MM/yyyy'\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-calendar [(ngModel)]=\"rowData[col.id].value\"\r\n dateFormat=\"dd/mm/yy\"\r\n firstDayOfWeek=\"1\"\r\n (onSelect)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n [readonlyInput]=\"true\"\r\n appendTo=\"body\">\r\n </p-calendar>\r\n </td>\r\n <td *ngIf=\"checkType('Date', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | date: 'dd/MM/yyyy'\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value | date: 'dd/MM/yyyy' }}</span>\r\n </td>\r\n\r\n <!-- MultiSelect -->\r\n <td *ngIf=\"checkType('MultiSelect', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"getMultiSelectConcat(rowData[col.id].value, getOption(col, rowData, 'optionLabel'))\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-multiSelect *ngIf=\"rowData[col.id] != null\"\r\n [options]=\"getOption(col, rowData, 'options')\"\r\n [filter]=\"getOption(col, rowData, 'filter')\"\r\n [optionLabel]=\"getOption(col, rowData, 'optionLabel')\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n appendTo=\"body\"\r\n dataKey=\"ID\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n [baseZIndex]=\"getOption(col, rowData, 'baseZIndex')\"\r\n [virtualScroll]=\"getOption(col, rowData, 'virtualScroll')\"\r\n [readonly]=\"rowData.readonly || rowData[col.id]?.readonly || !isModeEdition()\"\r\n itemSize=\"30\"\r\n selectedItemsLabel=\"{0} selectionn\u00E9s\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n [showToggleAll]=\"false\"\r\n [showHeader]=\"getOption(col, rowData, 'filter')\"\r\n [group]=\"getOption(col, rowData, 'optionGroupChildren') != null ? true : false\"\r\n [optionGroupLabel]=\"getOption(col, rowData, 'optionGroupLabel')\"\r\n [optionGroupChildren]=\"getOption(col, rowData, 'optionGroupChildren')\"\r\n ngDefaultControl>\r\n </p-multiSelect>\r\n </td>\r\n <td *ngIf=\"checkType('MultiSelect', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"getMultiSelectConcat(rowData[col.id].value, getOption(col, rowData, 'optionLabel'))\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ getMultiSelectConcat(rowData[col.id].value, getOption(col, rowData, 'optionLabel')) }}</span>\r\n </td>\r\n\r\n <!-- Image -->\r\n <td *ngIf=\"checkType('Image', col)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n class=\"centerText\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <img *ngIf=\"rowData[col.id]\" style=\"vertical-align: middle; width: 40px;\" src=\"{{ rowData[col.id].value }}\" />\r\n </td>\r\n\r\n <!-- Button -->\r\n <td *ngIf=\"checkType('Button', col)\"\r\n class=\"paddingCell centerText\"\r\n [ngStyle]=\"{ 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <button pButton\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly\"\r\n [ngClass]=\"'p-button-' + getOption(col, rowData, 'severity')\"\r\n [label]=\"getOption(col, rowData, 'label')\"\r\n [icon]=\"getOption(col, rowData, 'icon')\"\r\n (click)=\"rowData[col.id].value()\"\r\n [pTooltip]=\"getOption(col, rowData, 'label')\"\r\n [tooltipDisabled]=\"!col.tooltip\">\r\n </button>\r\n </td>\r\n\r\n <!-- SelectButton -->\r\n <td *ngIf=\"checkType('SelectButton', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-selectButton *ngIf=\"rowData[col.id] != null\"\r\n [options]=\"getOption(col, rowData, 'options')\"\r\n [optionLabel]=\"getOption(col, rowData, 'optionLabel')\"\r\n [optionValue]=\"getOption(col, rowData, 'optionValue') != null ? getOption(col, rowData, 'optionValue') : 'value'\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly || !isModeEdition()\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\">\r\n </p-selectButton>\r\n </td>\r\n <td *ngIf=\"checkType('SelectButton', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ getSelectLibelleByValue(rowData, col) }}</span>\r\n </td>\r\n\r\n <!-- Switch -->\r\n <td *ngIf=\"checkType('Switch', col)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n style=\"justify-content: center;\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-inputSwitch *ngIf=\"rowData[col.id] != null\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly || (getOption(col, rowData, 'action') == null && !isModeEdition())\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n ngDefaultControl>\r\n </p-inputSwitch>\r\n </td>\r\n\r\n <!-- File -->\r\n <td *ngIf=\"checkType('File', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value ? rowData[col.id].value : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <div class=\"p-inputgroup\" *ngIf=\"rowData[col.id] != null\">\r\n <button type=\"button\"\r\n pButton\r\n pRipple\r\n icon=\"pi pi-upload\"\r\n (click)=\"clickById('input_' + rowData[col.id].id)\"\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly || !isModeEdition()\">\r\n </button>\r\n <input id=\"{{'output_' + rowData[col.id].id}}\" pInputText type=\"text\" value=\"{{ rowData[col.id].value != null ? rowData[col.id].value : '' }}\" readonly>\r\n </div>\r\n <input *ngIf=\"rowData[col.id]\" id=\"{{'input_' + rowData[col.id].id}}\" #inputFile pInputText type=\"file\" hidden (change)=\"rowData[col.id].value = inputFile.files[0].name; onEditCell(rowData, col, inputFile.files[0])\">\r\n </td>\r\n <td *ngIf=\"checkType('File', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value ? rowData[col.id].value : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value ? rowData[col.id].value : '' }}</span>\r\n </td>\r\n\r\n <!-- State -->\r\n <td *ngIf=\"checkType('State', col)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n class=\"centerText\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-tag [value]=\"rowData[col.id].value[getOption(col, rowData, 'optionLabel')]\"\r\n [severity]=\"rowData[col.id].value.severity\"\r\n [icon]=\"rowData[col.id].value.icon\">\r\n </p-tag>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- Deletion -->\r\n <td *ngIf=\"options.rowsDeletable\"\r\n class=\"cellDelete\"\r\n [ngClass]=\"rowData.deletable ? 'paddingCell' : null\">\r\n <button *ngIf=\"rowData.deletable\"\r\n pButton\r\n type=\"button\"\r\n icon=\"pi pi-times\"\r\n class=\"p-button-danger buttonDelete p-button-text\"\r\n [disabled]=\"rowData.readonly\"\r\n (click)=\"onDeleteLine(rowData)\">\r\n </button>\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n</p-table>\r\n", styles: ["::ng-deep .p-tooltip .p-tooltip-text{overflow-wrap:break-word!important}:host ::ng-deep .p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{background:#30e130}:host ::ng-deep .p-inputswitch.p-inputswitch-checked:not(.p-disabled):hover .p-inputswitch-slider{background:#2bd12b}:host ::ng-deep .p-datatable-thead>tr>th>span{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep .p-datatable-tbody>tr>td>span{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep .row_grouping{background:#faeada!important}:host ::ng-deep .text_bold{font-weight:700!important}:host ::ng-deep .cellDelete{flex:0 0 50px!important}:host ::ng-deep .p-datatable .p-sortable-column.p-highlight{color:#2196f3!important}:host ::ng-deep .p-datatable .p-sortable-column.p-highlight .p-sortable-column-icon{color:#2196f3!important}:host ::ng-deep .p-tooltip .p-tooltip-text{background-color:red!important}:host ::ng-deep .p-datatable-thead>tr>th{border:1px solid rgba(0,0,0,.12)!important;padding-bottom:8px!important;padding-top:8px!important;font-weight:600!important;color:#495057!important;background:#dedddd!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep .p-datatable-tbody>tr{height:35px!important}:host ::ng-deep .p-datatable-tbody>tr>td{border:1px solid rgba(0,0,0,.12)!important;min-width:0!important}:host ::ng-deep .centerText{justify-content:center!important}:host ::ng-deep .p-button{padding-top:1px;padding-bottom:1px}:host ::ng-deep .p-button-label{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep p-calendar,:host ::ng-deep p-inputNumber,:host ::ng-deep p-dropdown,:host ::ng-deep p-selectButton,:host ::ng-deep p-multiselect{width:100%!important}:host ::ng-deep .p-calendar{width:100%!important}:host ::ng-deep .p-inputtext{width:100%!important;height:25px!important;padding:4px 5px!important}:host ::ng-deep .p-inputnumber{width:100%;height:25px;padding:0!important}:host ::ng-deep .p-inputnumber-input{width:100%;padding:0 5px!important}:host ::ng-deep .p-inputgroup .p-inputtext{width:100%;height:25px;padding:4px 5px!important}:host ::ng-deep .p-dropdown{width:100%;vertical-align:middle}:host ::ng-deep .p-dropdown-label{padding-top:2px;padding-bottom:2px}:host ::ng-deep .p-multiselect{width:100%;vertical-align:middle}:host ::ng-deep .p-multiselect-label{padding-top:2px;padding-bottom:2px}:host ::ng-deep .p-editable-column{padding:3px 10px!important}:host ::ng-deep .paddingCell{padding:3px 10px!important}:host ::ng-deep .p-selectbutton>.p-button{width:50%;height:25px}:host ::ng-deep .p-inputgroup>.p-button{height:25px}:host ::ng-deep .buttonDelete{width:100%;height:20px}:host ::ng-deep .p-column-title{display:none}:host ::ng-deep .p-datatable-loading-icon{color:#fff}@media screen and (max-width: 650px){:host ::ng-deep .p-datatable-thead>tr>th,:host ::ng-deep .p-datatable-tfoot>tr>td{display:none!important;width:inherit!important}:host ::ng-deep .p-datatable-tbody>tr{border:2px solid rgba(0,0,0,.12);flex-direction:column;height:inherit!important;padding-top:12px!important}:host ::ng-deep .p-datatable-tbody>tr>td{border:0!important;flex-basis:auto!important;width:100%!important}:host ::ng-deep td .p-column-title{padding:.4rem;min-width:35%;display:inline-block!important;margin:-.4rem 1rem -.4rem -.4rem;font-weight:700}:host ::ng-deep .centerText{justify-content:inherit!important}}\n"], components: [{ type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: i3$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i4.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i5.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }, { type: i6.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i7.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "tabindex", "multiple", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { type: i8.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i9.Tag, selector: "p-tag", inputs: ["styleClass", "style", "severity", "value", "icon", "rounded"] }], directives: [{ type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.InputText, selector: "[pInputText]" }, { type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.RowGroupHeader, selector: "[pRowGroupHeader]" }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$1.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { type: i2$1.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { type: i13.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "number": i10.DecimalPipe, "date": i10.DatePipe } });
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogTableComponent, decorators: [{
501
+ type: Component,
502
+ args: [{ selector: 'cilog-table', template: "<p-table #table\r\n [columns]=\"columns\"\r\n [value]=\"values\"\r\n dataKey=\"id\"\r\n [selectionMode]=\"options.selectable && !isModeEdition() ? 'single' : null\"\r\n [(selection)]=\"selectedRow\"\r\n (onRowSelect)=\"onSelectRow($event)\"\r\n (onRowUnselect)=\"onUnselectRow($event)\"\r\n (sortFunction)=\"customSort($event)\"\r\n [customSort]=\"options.grouping == null ? true : false\"\r\n [scrollable]=\"true\"\r\n [loading]=\"loading\"\r\n [scrollHeight]=\"options.scrollHeight != null ? options.scrollHeight : null\"\r\n [rowGroupMode]=\"options.grouping != null ? 'subheader' : null\"\r\n [groupRowsBy]=\"options.grouping != null ? options.grouping.obj + '.' + options.grouping.id : null\"\r\n [virtualScroll]=\"options.virtualScroll != null && options.scrollHeight != null ? true : false\"\r\n [virtualRowHeight]=\"35\"\r\n [paginator]=\"options.paginator == null ? false : true\"\r\n [rows]=\"options.paginatorRows\"\r\n (onPage)=\"onPageTable($event)\"\r\n (onFilter)=\"onFilterTable($event)\">\r\n\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\"\r\n [ngClass]=\"{ 'centerText' : options.centerHeaders }\"\r\n [pSortableColumn]=\"col.id\"\r\n [pSortableColumnDisabled]=\"options.grouping != null || !options.sortable\"\r\n id=\"{{ col.id }}\"\r\n (click)=\"refreshData()\">\r\n <span>{{ col.libelle }}</span>\r\n <p-sortIcon *ngIf=\"options.sortable && options.grouping == null\" [field]=\"col.id\"></p-sortIcon>\r\n </th>\r\n <th class=\"cellDelete\" *ngIf=\"options.rowsDeletable\"></th>\r\n </tr>\r\n <!-- FILTRES -->\r\n <tr *ngIf=\"options.filterable\">\r\n <ng-container *ngFor=\"let col of columns\">\r\n <!-- Text -->\r\n <th *ngIf=\"checkType('Text', col) || checkType('File', col)\">\r\n <input pInputText\r\n type=\"text\"\r\n (input)=\"onFilterCol($event, col)\">\r\n </th>\r\n\r\n <!-- Date -->\r\n <th *ngIf=\"checkType('Date', col)\">\r\n <p-calendar dateFormat=\"dd/mm/yy\"\r\n [inputId]=\"col.id + '_filter'\"\r\n firstDayOfWeek=\"1\"\r\n [readonlyInput]=\"true\"\r\n appendTo=\"body\"\r\n selectionMode=\"range\"\r\n (onSelect)=\"onFilterCol($event, col)\"\r\n showButtonBar=\"true\"\r\n (onClearClick)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\">\r\n </p-calendar>\r\n </th>\r\n\r\n <!-- Number -->\r\n <th *ngIf=\"checkType('Number', col)\">\r\n <p-inputNumber mode=\"decimal\"\r\n locale=\"fr-FR\"\r\n [minFractionDigits]=\"2\"\r\n [showButtons]=\"true\"\r\n (onInput)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\">\r\n </p-inputNumber>\r\n </th>\r\n\r\n <!-- Liste -->\r\n <th *ngIf=\"checkType('Dropdown', col) || checkType('MultiSelect', col) || checkType('SelectButton', col) || checkType('State', col)\">\r\n <p-multiSelect [options]=\"col.options?.options\"\r\n [filter]=\"true\"\r\n dataKey=\"ID\"\r\n [optionLabel]=\"col.options?.optionLabel\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n itemSize=\"30\"\r\n selectedItemsLabel=\"{0} selectionn\u00E9s\"\r\n (onChange)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\"\r\n [group]=\"col.options.optionGroupChildren != null ? true : false\"\r\n [optionGroupLabel]=\"col.options.optionGroupLabel\"\r\n [optionGroupChildren]=\"col.options.optionGroupChildren\">\r\n </p-multiSelect>\r\n </th>\r\n\r\n <!-- Switch -->\r\n <th *ngIf=\"checkType('Switch', col)\">\r\n <p-multiSelect [options]=\"optionsSwitch\"\r\n [showHeader]=\"false\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n itemSize=\"30\"\r\n selectedItemsLabel=\"{0} selectionn\u00E9s\"\r\n (onChange)=\"onFilterCol($event, col)\"\r\n [(ngModel)]=\"col.options.defaultFilters\">\r\n </p-multiSelect>\r\n </th>\r\n\r\n <!-- Non filtrable -->\r\n <th *ngIf=\"checkType('Button', col) || checkType('Image', col)\">\r\n\r\n </th>\r\n </ng-container>\r\n <th class=\"cellDelete\" *ngIf=\"options.rowsDeletable\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Groupheader -->\r\n <ng-template pTemplate=\"groupheader\" let-rowData>\r\n <tr pRowGroupHeader class=\"row_grouping\">\r\n <td [attr.colspan]=\"columns.length + 1\">\r\n <span class=\"text_bold\">{{ rowData[options.grouping.obj][options.grouping.libelle] }}</span>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Body -->\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr id=\"{{ rowData.id }}\"\r\n [ngStyle]=\"{ 'background-color': rowData.color ? rowData.color : null }\"\r\n [pSelectableRow]=\"rowData\"\r\n [pSelectableRowDisabled]=\"!options.selectable || isModeEdition()\">\r\n <ng-container *ngFor=\"let col of columns\">\r\n\r\n <!-- Text -->\r\n <td *ngIf=\"checkType('Text', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.id\"\r\n [pTooltip]=\"rowData[col.id].value\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <input pInputText\r\n type=\"text\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n (change)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n (keyup.enter)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n (click)=\"onEditInitCell(rowData, col, rowData[col.id].value)\" />\r\n </td>\r\n <td *ngIf=\"checkType('Text', col) && (!isModeEdition() || rowData.readonly || rowData[col.id]?.readonly)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"{ 'paddingCell': rowData[col.id] != null }\"\r\n [pTooltip]=\"rowData[col.id].value\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value }}</span>\r\n </td>\r\n\r\n <!-- Dropdown -->\r\n <td *ngIf=\"checkType('Dropdown', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value != null ? rowData[col.id].value[getOption(col, rowData, 'optionLabel')] : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-dropdown *ngIf=\"rowData[col.id] != null\"\r\n dataKey=\"ID\"\r\n [options]=\"getOption(col, rowData, 'options')\"\r\n [filter]=\"getOption(col, rowData, 'filter')\"\r\n [optionLabel]=\"getOption(col, rowData, 'optionLabel')\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [autoDisplayFirst]=\"false\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n [baseZIndex]=\"getOption(col, rowData, 'baseZIndex')\"\r\n [virtualScroll]=\"getOption(col, rowData, 'virtualScroll')\"\r\n [readonly]=\"rowData.readonly || rowData[col.id]?.readonly\"\r\n itemSize=\"30\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\">\r\n </p-dropdown>\r\n </td>\r\n <td *ngIf=\"checkType('Dropdown', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value != null ? rowData[col.id].value[getOption(col, rowData, 'optionLabel')] : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value != null ? rowData[col.id].value[getOption(col, rowData, 'optionLabel')] : '' }}</span>\r\n </td>\r\n\r\n <!-- Number -->\r\n <td *ngIf=\"checkType('Number', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | number\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-inputNumber *ngIf=\"rowData[col.id] && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n mode=\"decimal\"\r\n locale=\"fr-FR\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [showButtons]=\"getOption(col, rowData, 'showButtons')\"\r\n [suffix]=\"getOption(col, rowData, 'suffix')\"\r\n [prefix]=\"getOption(col, rowData, 'prefix') != null ? getOption(col, rowData, 'prefix') + ' ' : null\"\r\n [minFractionDigits]=\"2\"\r\n [maxFractionDigits]=\"getOption(col, rowData, 'maxDecimales') != null ? getOption(col, rowData, 'maxDecimales') : 2 \"\r\n (ngModelChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n (onFocus)=\"onEditInitCell(rowData, col, rowData[col.id].value)\">\r\n </p-inputNumber>\r\n </td>\r\n <td *ngIf=\"checkType('Number', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | number\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value | number }}</span>\r\n </td>\r\n\r\n <!-- Date -->\r\n <td *ngIf=\"checkType('Date', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | date: 'dd/MM/yyyy'\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-calendar [(ngModel)]=\"rowData[col.id].value\"\r\n dateFormat=\"dd/mm/yy\"\r\n firstDayOfWeek=\"1\"\r\n (onSelect)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n [readonlyInput]=\"true\"\r\n appendTo=\"body\">\r\n </p-calendar>\r\n </td>\r\n <td *ngIf=\"checkType('Date', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value | date: 'dd/MM/yyyy'\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value | date: 'dd/MM/yyyy' }}</span>\r\n </td>\r\n\r\n <!-- MultiSelect -->\r\n <td *ngIf=\"checkType('MultiSelect', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"getMultiSelectConcat(rowData[col.id].value, getOption(col, rowData, 'optionLabel'))\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-multiSelect *ngIf=\"rowData[col.id] != null\"\r\n [options]=\"getOption(col, rowData, 'options')\"\r\n [filter]=\"getOption(col, rowData, 'filter')\"\r\n [optionLabel]=\"getOption(col, rowData, 'optionLabel')\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n appendTo=\"body\"\r\n dataKey=\"ID\"\r\n emptyFilterMessage=\"Aucun r\u00E9sultat\"\r\n emptyMessage=\"Aucun r\u00E9sultat\"\r\n [baseZIndex]=\"getOption(col, rowData, 'baseZIndex')\"\r\n [virtualScroll]=\"getOption(col, rowData, 'virtualScroll')\"\r\n [readonly]=\"rowData.readonly || rowData[col.id]?.readonly || !isModeEdition()\"\r\n itemSize=\"30\"\r\n selectedItemsLabel=\"{0} selectionn\u00E9s\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n [showToggleAll]=\"false\"\r\n [showHeader]=\"getOption(col, rowData, 'filter')\"\r\n [group]=\"getOption(col, rowData, 'optionGroupChildren') != null ? true : false\"\r\n [optionGroupLabel]=\"getOption(col, rowData, 'optionGroupLabel')\"\r\n [optionGroupChildren]=\"getOption(col, rowData, 'optionGroupChildren')\"\r\n ngDefaultControl>\r\n </p-multiSelect>\r\n </td>\r\n <td *ngIf=\"checkType('MultiSelect', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"getMultiSelectConcat(rowData[col.id].value, getOption(col, rowData, 'optionLabel'))\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ getMultiSelectConcat(rowData[col.id].value, getOption(col, rowData, 'optionLabel')) }}</span>\r\n </td>\r\n\r\n <!-- Image -->\r\n <td *ngIf=\"checkType('Image', col)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n class=\"centerText\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <img *ngIf=\"rowData[col.id]\" style=\"vertical-align: middle; width: 40px;\" src=\"{{ rowData[col.id].value }}\" />\r\n </td>\r\n\r\n <!-- Button -->\r\n <td *ngIf=\"checkType('Button', col)\"\r\n class=\"paddingCell centerText\"\r\n [ngStyle]=\"{ 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <button pButton\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly\"\r\n [ngClass]=\"'p-button-' + getOption(col, rowData, 'severity')\"\r\n [label]=\"getOption(col, rowData, 'label')\"\r\n [icon]=\"getOption(col, rowData, 'icon')\"\r\n (click)=\"rowData[col.id].value()\"\r\n [pTooltip]=\"getOption(col, rowData, 'label')\"\r\n [tooltipDisabled]=\"!col.tooltip\">\r\n </button>\r\n </td>\r\n\r\n <!-- SelectButton -->\r\n <td *ngIf=\"checkType('SelectButton', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-selectButton *ngIf=\"rowData[col.id] != null\"\r\n [options]=\"getOption(col, rowData, 'options')\"\r\n [optionLabel]=\"getOption(col, rowData, 'optionLabel')\"\r\n [optionValue]=\"getOption(col, rowData, 'optionValue') != null ? getOption(col, rowData, 'optionValue') : 'value'\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly || !isModeEdition()\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\">\r\n </p-selectButton>\r\n </td>\r\n <td *ngIf=\"checkType('SelectButton', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ getSelectLibelleByValue(rowData, col) }}</span>\r\n </td>\r\n\r\n <!-- Switch -->\r\n <td *ngIf=\"checkType('Switch', col)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n style=\"justify-content: center;\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-inputSwitch *ngIf=\"rowData[col.id] != null\"\r\n [(ngModel)]=\"rowData[col.id].value\"\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly || (getOption(col, rowData, 'action') == null && !isModeEdition())\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\r\n ngDefaultControl>\r\n </p-inputSwitch>\r\n </td>\r\n\r\n <!-- File -->\r\n <td *ngIf=\"checkType('File', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value ? rowData[col.id].value : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <div class=\"p-inputgroup\" *ngIf=\"rowData[col.id] != null\">\r\n <button type=\"button\"\r\n pButton\r\n pRipple\r\n icon=\"pi pi-upload\"\r\n (click)=\"clickById('input_' + rowData[col.id].id)\"\r\n [disabled]=\"rowData.readonly || rowData[col.id]?.readonly || !isModeEdition()\">\r\n </button>\r\n <input id=\"{{'output_' + rowData[col.id].id}}\" pInputText type=\"text\" value=\"{{ rowData[col.id].value != null ? rowData[col.id].value : '' }}\" readonly>\r\n </div>\r\n <input *ngIf=\"rowData[col.id]\" id=\"{{'input_' + rowData[col.id].id}}\" #inputFile pInputText type=\"file\" hidden (change)=\"rowData[col.id].value = inputFile.files[0].name; onEditCell(rowData, col, inputFile.files[0])\">\r\n </td>\r\n <td *ngIf=\"checkType('File', col) && (rowData.readonly || rowData[col.id]?.readonly || !isModeEdition())\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n [pTooltip]=\"rowData[col.id].value ? rowData[col.id].value : ''\"\r\n [tooltipDisabled]=\"!col.tooltip\"\r\n tooltipPosition=\"bottom\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <span *ngIf=\"rowData[col.id]\">{{ rowData[col.id].value ? rowData[col.id].value : '' }}</span>\r\n </td>\r\n\r\n <!-- State -->\r\n <td *ngIf=\"checkType('State', col)\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : null, 'background-color': rowData[col.id].color ? rowData[col.id].color : null }\"\r\n id=\"{{ rowData[col.id] != null ? rowData[col.id].id : '' }}\"\r\n [ngClass]=\"rowData[col.id] != null ? 'paddingCell' : null\"\r\n class=\"centerText\">\r\n <span class=\"p-column-title\">{{ col.libelle }} : </span>\r\n <p-tag [value]=\"rowData[col.id].value[getOption(col, rowData, 'optionLabel')]\"\r\n [severity]=\"rowData[col.id].value.severity\"\r\n [icon]=\"rowData[col.id].value.icon\">\r\n </p-tag>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- Deletion -->\r\n <td *ngIf=\"options.rowsDeletable\"\r\n class=\"cellDelete\"\r\n [ngClass]=\"rowData.deletable ? 'paddingCell' : null\">\r\n <button *ngIf=\"rowData.deletable\"\r\n pButton\r\n type=\"button\"\r\n icon=\"pi pi-times\"\r\n class=\"p-button-danger buttonDelete p-button-text\"\r\n [disabled]=\"rowData.readonly\"\r\n (click)=\"onDeleteLine(rowData)\">\r\n </button>\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n</p-table>\r\n", styles: ["::ng-deep .p-tooltip .p-tooltip-text{overflow-wrap:break-word!important}:host ::ng-deep .p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{background:#30e130}:host ::ng-deep .p-inputswitch.p-inputswitch-checked:not(.p-disabled):hover .p-inputswitch-slider{background:#2bd12b}:host ::ng-deep .p-datatable-thead>tr>th>span{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep .p-datatable-tbody>tr>td>span{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep .row_grouping{background:#faeada!important}:host ::ng-deep .text_bold{font-weight:700!important}:host ::ng-deep .cellDelete{flex:0 0 50px!important}:host ::ng-deep .p-datatable .p-sortable-column.p-highlight{color:#2196f3!important}:host ::ng-deep .p-datatable .p-sortable-column.p-highlight .p-sortable-column-icon{color:#2196f3!important}:host ::ng-deep .p-tooltip .p-tooltip-text{background-color:red!important}:host ::ng-deep .p-datatable-thead>tr>th{border:1px solid rgba(0,0,0,.12)!important;padding-bottom:8px!important;padding-top:8px!important;font-weight:600!important;color:#495057!important;background:#dedddd!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep .p-datatable-tbody>tr{height:35px!important}:host ::ng-deep .p-datatable-tbody>tr>td{border:1px solid rgba(0,0,0,.12)!important;min-width:0!important}:host ::ng-deep .centerText{justify-content:center!important}:host ::ng-deep .p-button{padding-top:1px;padding-bottom:1px}:host ::ng-deep .p-button-label{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}:host ::ng-deep p-calendar,:host ::ng-deep p-inputNumber,:host ::ng-deep p-dropdown,:host ::ng-deep p-selectButton,:host ::ng-deep p-multiselect{width:100%!important}:host ::ng-deep .p-calendar{width:100%!important}:host ::ng-deep .p-inputtext{width:100%!important;height:25px!important;padding:4px 5px!important}:host ::ng-deep .p-inputnumber{width:100%;height:25px;padding:0!important}:host ::ng-deep .p-inputnumber-input{width:100%;padding:0 5px!important}:host ::ng-deep .p-inputgroup .p-inputtext{width:100%;height:25px;padding:4px 5px!important}:host ::ng-deep .p-dropdown{width:100%;vertical-align:middle}:host ::ng-deep .p-dropdown-label{padding-top:2px;padding-bottom:2px}:host ::ng-deep .p-multiselect{width:100%;vertical-align:middle}:host ::ng-deep .p-multiselect-label{padding-top:2px;padding-bottom:2px}:host ::ng-deep .p-editable-column{padding:3px 10px!important}:host ::ng-deep .paddingCell{padding:3px 10px!important}:host ::ng-deep .p-selectbutton>.p-button{width:50%;height:25px}:host ::ng-deep .p-inputgroup>.p-button{height:25px}:host ::ng-deep .buttonDelete{width:100%;height:20px}:host ::ng-deep .p-column-title{display:none}:host ::ng-deep .p-datatable-loading-icon{color:#fff}@media screen and (max-width: 650px){:host ::ng-deep .p-datatable-thead>tr>th,:host ::ng-deep .p-datatable-tfoot>tr>td{display:none!important;width:inherit!important}:host ::ng-deep .p-datatable-tbody>tr{border:2px solid rgba(0,0,0,.12);flex-direction:column;height:inherit!important;padding-top:12px!important}:host ::ng-deep .p-datatable-tbody>tr>td{border:0!important;flex-basis:auto!important;width:100%!important}:host ::ng-deep td .p-column-title{padding:.4rem;min-width:35%;display:inline-block!important;margin:-.4rem 1rem -.4rem -.4rem;font-weight:700}:host ::ng-deep .centerText{justify-content:inherit!important}}\n"] }]
503
+ }], ctorParameters: function () { return [{ type: i1.ConfirmationService }, { type: i1.FilterService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
504
+ type: Input
505
+ }], values: [{
506
+ type: Input
507
+ }], options: [{
508
+ type: Input
509
+ }], loading: [{
510
+ type: Input
511
+ }], onEdit: [{
512
+ type: Output
513
+ }], onEditInit: [{
514
+ type: Output
515
+ }], onDelete: [{
516
+ type: Output
517
+ }], onSelect: [{
518
+ type: Output
519
+ }], onUnselect: [{
520
+ type: Output
521
+ }], onFilter: [{
522
+ type: Output
523
+ }], onSort: [{
524
+ type: Output
525
+ }], onPage: [{
526
+ type: Output
527
+ }], table: [{
528
+ type: ViewChild,
529
+ args: ['table', { static: true }]
530
+ }] } });
531
+
532
+ class CilogTableService {
533
+ constructor() { }
534
+ }
535
+ CilogTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
536
+ CilogTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogTableService, providedIn: 'root' });
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogTableService, decorators: [{
538
+ type: Injectable,
539
+ args: [{
540
+ providedIn: 'root'
541
+ }]
542
+ }], ctorParameters: function () { return []; } });
543
+
544
+ registerLocaleData(localeFr);
545
+ class CilogLibModule {
546
+ }
547
+ CilogLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
548
+ CilogLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibModule, declarations: [CilogLibComponent,
549
+ CilogMessageComponent,
550
+ CilogTableComponent], imports: [CommonModule,
551
+ PrimengModule,
552
+ BrowserModule,
553
+ BrowserAnimationsModule,
554
+ FormsModule,
555
+ ReactiveFormsModule], exports: [CilogMessageComponent,
556
+ CilogTableComponent] });
557
+ CilogLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibModule, providers: [
558
+ CilogMessageService,
559
+ CilogTableService,
560
+ ConfirmationService,
561
+ { provide: LOCALE_ID, useValue: 'fr-FR' },
562
+ ], imports: [[
563
+ CommonModule,
564
+ PrimengModule,
565
+ BrowserModule,
566
+ BrowserAnimationsModule,
567
+ FormsModule,
568
+ ReactiveFormsModule
569
+ ]] });
570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibModule, decorators: [{
571
+ type: NgModule,
572
+ args: [{
573
+ imports: [
574
+ CommonModule,
575
+ PrimengModule,
576
+ BrowserModule,
577
+ BrowserAnimationsModule,
578
+ FormsModule,
579
+ ReactiveFormsModule
580
+ ],
581
+ declarations: [
582
+ CilogLibComponent,
583
+ CilogMessageComponent,
584
+ CilogTableComponent
585
+ ],
586
+ exports: [
587
+ CilogMessageComponent,
588
+ CilogTableComponent
589
+ ],
590
+ providers: [
591
+ CilogMessageService,
592
+ CilogTableService,
593
+ ConfirmationService,
594
+ { provide: LOCALE_ID, useValue: 'fr-FR' },
595
+ ]
596
+ }]
597
+ }] });
598
+
599
+ class CilogLibService {
600
+ constructor() { }
601
+ }
602
+ CilogLibService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
603
+ CilogLibService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibService, providedIn: 'root' });
604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CilogLibService, decorators: [{
605
+ type: Injectable,
606
+ args: [{
607
+ providedIn: 'root'
608
+ }]
609
+ }], ctorParameters: function () { return []; } });
610
+
611
+ /*
612
+ * Public API Surface of cilog-lib
613
+ */
614
+
615
+ /**
616
+ * Generated bundle index. Do not edit.
617
+ */
618
+
619
+ export { CilogLibComponent, CilogLibModule, CilogLibService, CilogMessageComponent, CilogMessageService, CilogTableComponent, CilogTableService, ColType, Severity };
620
+ //# sourceMappingURL=cilog-lib.mjs.map