cilog-lib 0.2.3 → 0.2.7

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.
@@ -153,6 +153,324 @@
153
153
  },] }
154
154
  ];
155
155
 
156
+ /*! *****************************************************************************
157
+ Copyright (c) Microsoft Corporation.
158
+
159
+ Permission to use, copy, modify, and/or distribute this software for any
160
+ purpose with or without fee is hereby granted.
161
+
162
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
163
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
164
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
165
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
166
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
167
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
168
+ PERFORMANCE OF THIS SOFTWARE.
169
+ ***************************************************************************** */
170
+ /* global Reflect, Promise */
171
+ var extendStatics = function (d, b) {
172
+ extendStatics = Object.setPrototypeOf ||
173
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
174
+ function (d, b) { for (var p in b)
175
+ if (Object.prototype.hasOwnProperty.call(b, p))
176
+ d[p] = b[p]; };
177
+ return extendStatics(d, b);
178
+ };
179
+ function __extends(d, b) {
180
+ if (typeof b !== "function" && b !== null)
181
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
182
+ extendStatics(d, b);
183
+ function __() { this.constructor = d; }
184
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
185
+ }
186
+ var __assign = function () {
187
+ __assign = Object.assign || function __assign(t) {
188
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
189
+ s = arguments[i];
190
+ for (var p in s)
191
+ if (Object.prototype.hasOwnProperty.call(s, p))
192
+ t[p] = s[p];
193
+ }
194
+ return t;
195
+ };
196
+ return __assign.apply(this, arguments);
197
+ };
198
+ function __rest(s, e) {
199
+ var t = {};
200
+ for (var p in s)
201
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
202
+ t[p] = s[p];
203
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
204
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
205
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
206
+ t[p[i]] = s[p[i]];
207
+ }
208
+ return t;
209
+ }
210
+ function __decorate(decorators, target, key, desc) {
211
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
212
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
213
+ r = Reflect.decorate(decorators, target, key, desc);
214
+ else
215
+ for (var i = decorators.length - 1; i >= 0; i--)
216
+ if (d = decorators[i])
217
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
218
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
219
+ }
220
+ function __param(paramIndex, decorator) {
221
+ return function (target, key) { decorator(target, key, paramIndex); };
222
+ }
223
+ function __metadata(metadataKey, metadataValue) {
224
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
225
+ return Reflect.metadata(metadataKey, metadataValue);
226
+ }
227
+ function __awaiter(thisArg, _arguments, P, generator) {
228
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
229
+ return new (P || (P = Promise))(function (resolve, reject) {
230
+ function fulfilled(value) { try {
231
+ step(generator.next(value));
232
+ }
233
+ catch (e) {
234
+ reject(e);
235
+ } }
236
+ function rejected(value) { try {
237
+ step(generator["throw"](value));
238
+ }
239
+ catch (e) {
240
+ reject(e);
241
+ } }
242
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
243
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
244
+ });
245
+ }
246
+ function __generator(thisArg, body) {
247
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
248
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
249
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
250
+ function verb(n) { return function (v) { return step([n, v]); }; }
251
+ function step(op) {
252
+ if (f)
253
+ throw new TypeError("Generator is already executing.");
254
+ while (_)
255
+ try {
256
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
257
+ return t;
258
+ if (y = 0, t)
259
+ op = [op[0] & 2, t.value];
260
+ switch (op[0]) {
261
+ case 0:
262
+ case 1:
263
+ t = op;
264
+ break;
265
+ case 4:
266
+ _.label++;
267
+ return { value: op[1], done: false };
268
+ case 5:
269
+ _.label++;
270
+ y = op[1];
271
+ op = [0];
272
+ continue;
273
+ case 7:
274
+ op = _.ops.pop();
275
+ _.trys.pop();
276
+ continue;
277
+ default:
278
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
279
+ _ = 0;
280
+ continue;
281
+ }
282
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
283
+ _.label = op[1];
284
+ break;
285
+ }
286
+ if (op[0] === 6 && _.label < t[1]) {
287
+ _.label = t[1];
288
+ t = op;
289
+ break;
290
+ }
291
+ if (t && _.label < t[2]) {
292
+ _.label = t[2];
293
+ _.ops.push(op);
294
+ break;
295
+ }
296
+ if (t[2])
297
+ _.ops.pop();
298
+ _.trys.pop();
299
+ continue;
300
+ }
301
+ op = body.call(thisArg, _);
302
+ }
303
+ catch (e) {
304
+ op = [6, e];
305
+ y = 0;
306
+ }
307
+ finally {
308
+ f = t = 0;
309
+ }
310
+ if (op[0] & 5)
311
+ throw op[1];
312
+ return { value: op[0] ? op[1] : void 0, done: true };
313
+ }
314
+ }
315
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
316
+ if (k2 === undefined)
317
+ k2 = k;
318
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
319
+ }) : (function (o, m, k, k2) {
320
+ if (k2 === undefined)
321
+ k2 = k;
322
+ o[k2] = m[k];
323
+ });
324
+ function __exportStar(m, o) {
325
+ for (var p in m)
326
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
327
+ __createBinding(o, m, p);
328
+ }
329
+ function __values(o) {
330
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
331
+ if (m)
332
+ return m.call(o);
333
+ if (o && typeof o.length === "number")
334
+ return {
335
+ next: function () {
336
+ if (o && i >= o.length)
337
+ o = void 0;
338
+ return { value: o && o[i++], done: !o };
339
+ }
340
+ };
341
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
342
+ }
343
+ function __read(o, n) {
344
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
345
+ if (!m)
346
+ return o;
347
+ var i = m.call(o), r, ar = [], e;
348
+ try {
349
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
350
+ ar.push(r.value);
351
+ }
352
+ catch (error) {
353
+ e = { error: error };
354
+ }
355
+ finally {
356
+ try {
357
+ if (r && !r.done && (m = i["return"]))
358
+ m.call(i);
359
+ }
360
+ finally {
361
+ if (e)
362
+ throw e.error;
363
+ }
364
+ }
365
+ return ar;
366
+ }
367
+ /** @deprecated */
368
+ function __spread() {
369
+ for (var ar = [], i = 0; i < arguments.length; i++)
370
+ ar = ar.concat(__read(arguments[i]));
371
+ return ar;
372
+ }
373
+ /** @deprecated */
374
+ function __spreadArrays() {
375
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
376
+ s += arguments[i].length;
377
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
378
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
379
+ r[k] = a[j];
380
+ return r;
381
+ }
382
+ function __spreadArray(to, from, pack) {
383
+ if (pack || arguments.length === 2)
384
+ for (var i = 0, l = from.length, ar; i < l; i++) {
385
+ if (ar || !(i in from)) {
386
+ if (!ar)
387
+ ar = Array.prototype.slice.call(from, 0, i);
388
+ ar[i] = from[i];
389
+ }
390
+ }
391
+ return to.concat(ar || Array.prototype.slice.call(from));
392
+ }
393
+ function __await(v) {
394
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
395
+ }
396
+ function __asyncGenerator(thisArg, _arguments, generator) {
397
+ if (!Symbol.asyncIterator)
398
+ throw new TypeError("Symbol.asyncIterator is not defined.");
399
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
400
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
401
+ function verb(n) { if (g[n])
402
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
403
+ function resume(n, v) { try {
404
+ step(g[n](v));
405
+ }
406
+ catch (e) {
407
+ settle(q[0][3], e);
408
+ } }
409
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
410
+ function fulfill(value) { resume("next", value); }
411
+ function reject(value) { resume("throw", value); }
412
+ function settle(f, v) { if (f(v), q.shift(), q.length)
413
+ resume(q[0][0], q[0][1]); }
414
+ }
415
+ function __asyncDelegator(o) {
416
+ var i, p;
417
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
418
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
419
+ }
420
+ function __asyncValues(o) {
421
+ if (!Symbol.asyncIterator)
422
+ throw new TypeError("Symbol.asyncIterator is not defined.");
423
+ var m = o[Symbol.asyncIterator], i;
424
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
425
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
426
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
427
+ }
428
+ function __makeTemplateObject(cooked, raw) {
429
+ if (Object.defineProperty) {
430
+ Object.defineProperty(cooked, "raw", { value: raw });
431
+ }
432
+ else {
433
+ cooked.raw = raw;
434
+ }
435
+ return cooked;
436
+ }
437
+ ;
438
+ var __setModuleDefault = Object.create ? (function (o, v) {
439
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
440
+ }) : function (o, v) {
441
+ o["default"] = v;
442
+ };
443
+ function __importStar(mod) {
444
+ if (mod && mod.__esModule)
445
+ return mod;
446
+ var result = {};
447
+ if (mod != null)
448
+ for (var k in mod)
449
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
450
+ __createBinding(result, mod, k);
451
+ __setModuleDefault(result, mod);
452
+ return result;
453
+ }
454
+ function __importDefault(mod) {
455
+ return (mod && mod.__esModule) ? mod : { default: mod };
456
+ }
457
+ function __classPrivateFieldGet(receiver, state, kind, f) {
458
+ if (kind === "a" && !f)
459
+ throw new TypeError("Private accessor was defined without a getter");
460
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
461
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
462
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
463
+ }
464
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
465
+ if (kind === "m")
466
+ throw new TypeError("Private method is not writable");
467
+ if (kind === "a" && !f)
468
+ throw new TypeError("Private accessor was defined without a setter");
469
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
470
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
471
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
472
+ }
473
+
156
474
  (function (ColType) {
157
475
  ColType["MultiSelect"] = "MultiSelect";
158
476
  ColType["Dropdown"] = "Dropdown";
@@ -307,7 +625,9 @@
307
625
  key: 'confirm',
308
626
  message: 'Êtes-vous sûr de vouloir supprimer cette ligne ?',
309
627
  accept: function () {
628
+ console.log(_this.values.indexOf(row));
310
629
  _this.values.splice(_this.values.indexOf(row), 1);
630
+ _this.values = __spreadArray([], __read(_this.values));
311
631
  _this.onDelete.emit({ row: row });
312
632
  }
313
633
  });
@@ -415,8 +735,8 @@
415
735
  CilogTableComponent.decorators = [
416
736
  { type: i0.Component, args: [{
417
737
  selector: 'cilog-table',
418
- template: "<p-table #table\r\n [columns]=\"columns\"\r\n [value]=\"values\"\r\n (onEditComplete)=\"onEditText($event)\"\r\n (onEditInit)=\"onEditInitCell($event)\"\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 [scrollHeight]=\"options.scrollHeight != null ? options.scrollHeight : null\"\r\n [virtualScroll]=\"options.scrollHeight != null && options.grouping == null ? true : false\"\r\n [rowGroupMode]=\"options.grouping != null ? 'subheader' : null\"\r\n [groupRowsBy]=\"options.grouping != null ? options.grouping.obj + '.' + options.grouping.id : null\">\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 {{ col.libelle }}\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 [optionLabel]=\"col.options?.optionLabel\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"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 [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 }\"\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 <p-cellEditor *ngIf=\"rowData[col.id] != null\">\r\n <ng-template pTemplate=\"input\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"rowData[col.id].value\">\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n {{ rowData[col.id].value }}\r\n </ng-template>\r\n </p-cellEditor>\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 }\"\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 }\"\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 [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 [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 }\"\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 }\"\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)=\"onFocusNumber(rowData, col)\">\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 }\"\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 }\"\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 }\"\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 }\"\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 emptyFilterMessage=\"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} utilisateurs selectionn\u00E9s\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\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 }\"\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 }\"\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 <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 }\"\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 }\"\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 <!-- File -->\r\n <td *ngIf=\"checkType('File', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : 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 }\"\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 }\"\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",
419
- styles: ["::ng-deep .p-tooltip .p-tooltip-text{overflow-wrap:break-word!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,: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{background:#dedddd!important;border:1px solid rgba(0,0,0,.12)!important;color:#495057!important;font-weight:600!important;overflow:hidden;padding-bottom:8px!important;padding-top:8px!important;text-overflow:ellipsis;white-space:nowrap}: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;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .centerText{justify-content:center!important}:host ::ng-deep .p-button{padding-bottom:1px;padding-top:1px}:host ::ng-deep .p-calendar,:host ::ng-deep p-calendar,:host ::ng-deep p-dropdown,:host ::ng-deep p-inputNumber,:host ::ng-deep p-multiselect,:host ::ng-deep p-selectButton{width:100%!important}:host ::ng-deep .p-inputtext{height:25px!important;padding:0 5px!important;width:100%!important}:host ::ng-deep .p-inputnumber{height:25px;padding:0!important;width:100%}:host ::ng-deep .p-inputnumber-input{padding:0 5px!important;width:100%}:host ::ng-deep .p-inputgroup .p-inputtext{height:25px;padding:0 5px!important;width:100%}:host ::ng-deep .p-dropdown{vertical-align:middle;width:100%}:host ::ng-deep .p-dropdown-label{padding-bottom:2px;padding-top:2px}:host ::ng-deep .p-multiselect{vertical-align:middle;width:100%}:host ::ng-deep .p-multiselect-label{padding-bottom:2px;padding-top:2px}:host ::ng-deep .p-editable-column,:host ::ng-deep .paddingCell{padding:3px 10px!important}:host ::ng-deep .p-selectbutton>.p-button{height:25px;width:50%}:host ::ng-deep .p-inputgroup>.p-button{height:25px}:host ::ng-deep .buttonDelete{height:20px;width:100%}:host ::ng-deep .p-column-title{display:none}@media screen and (max-width:650px){:host ::ng-deep .p-datatable-tfoot>tr>td,:host ::ng-deep .p-datatable-thead>tr>th{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{display:inline-block!important;font-weight:700;margin:-.4rem 1rem -.4rem -.4rem;min-width:35%;padding:.4rem}:host ::ng-deep .centerText{justify-content:inherit!important}}"]
738
+ template: "<p-table #table\r\n [columns]=\"columns\"\r\n [value]=\"values\"\r\n (onEditComplete)=\"onEditText($event)\"\r\n (onEditInit)=\"onEditInitCell($event)\"\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 [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\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 {{ col.libelle }}\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 [optionLabel]=\"col.options?.optionLabel\"\r\n appendTo=\"body\"\r\n emptyFilterMessage=\"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 }\"\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 <p-cellEditor *ngIf=\"rowData[col.id] != null\">\r\n <ng-template pTemplate=\"input\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"rowData[col.id].value\">\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n {{ rowData[col.id].value }}\r\n </ng-template>\r\n </p-cellEditor>\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 }\"\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 }\"\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 [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 [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 }\"\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 }\"\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)=\"onFocusNumber(rowData, col)\">\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 }\"\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 }\"\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 }\"\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 }\"\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 emptyFilterMessage=\"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} utilisateurs selectionn\u00E9s\"\r\n (onChange)=\"onEditCell(rowData, col, rowData[col.id].value)\"\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 }\"\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 }\"\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 <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 }\"\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 }\"\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 <!-- File -->\r\n <td *ngIf=\"checkType('File', col) && isModeEdition() && !rowData.readonly && !rowData[col.id]?.readonly\"\r\n [ngStyle]=\"{ 'width' : col.width ? col.width : 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 }\"\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 }\"\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",
739
+ styles: ["::ng-deep .p-tooltip .p-tooltip-text{overflow-wrap:break-word!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,: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{background:#dedddd!important;border:1px solid rgba(0,0,0,.12)!important;color:#495057!important;font-weight:600!important;overflow:hidden;padding-bottom:8px!important;padding-top:8px!important;text-overflow:ellipsis;white-space:nowrap}: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;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .centerText{justify-content:center!important}:host ::ng-deep .p-button{padding-bottom:1px;padding-top:1px}:host ::ng-deep .p-calendar,:host ::ng-deep p-calendar,:host ::ng-deep p-dropdown,:host ::ng-deep p-inputNumber,:host ::ng-deep p-multiselect,:host ::ng-deep p-selectButton{width:100%!important}:host ::ng-deep .p-inputtext{height:25px!important;padding:4px 5px!important;width:100%!important}:host ::ng-deep .p-inputnumber{height:25px;padding:0!important;width:100%}:host ::ng-deep .p-inputnumber-input{padding:0 5px!important;width:100%}:host ::ng-deep .p-inputgroup .p-inputtext{height:25px;padding:4px 5px!important;width:100%}:host ::ng-deep .p-dropdown{vertical-align:middle;width:100%}:host ::ng-deep .p-dropdown-label{padding-bottom:2px;padding-top:2px}:host ::ng-deep .p-multiselect{vertical-align:middle;width:100%}:host ::ng-deep .p-multiselect-label{padding-bottom:2px;padding-top:2px}:host ::ng-deep .p-editable-column,:host ::ng-deep .paddingCell{padding:3px 10px!important}:host ::ng-deep .p-selectbutton>.p-button{height:25px;width:50%}:host ::ng-deep .p-inputgroup>.p-button{height:25px}:host ::ng-deep .buttonDelete{height:20px;width:100%}:host ::ng-deep .p-column-title{display:none}@media screen and (max-width:650px){:host ::ng-deep .p-datatable-tfoot>tr>td,:host ::ng-deep .p-datatable-thead>tr>th{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{display:inline-block!important;font-weight:700;margin:-.4rem 1rem -.4rem -.4rem;min-width:35%;padding:.4rem}:host ::ng-deep .centerText{justify-content:inherit!important}}"]
420
740
  },] }
421
741
  ];
422
742
  CilogTableComponent.ctorParameters = function () { return [