@firestitch/app-acl 9.0.18 → 9.0.19

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 (80) hide show
  1. package/app/components/acl-entries/acl-entries.component.d.ts +27 -27
  2. package/app/components/acl-entry/acl-entry.component.d.ts +23 -23
  3. package/app/components/acl-entry/index.d.ts +1 -1
  4. package/app/components/acl-object-roles/acl-object-roles.component.d.ts +14 -14
  5. package/app/components/acl-permission-popover/acl-permission-popover.component.d.ts +9 -9
  6. package/app/components/acl-permission-popover/index.d.ts +1 -1
  7. package/app/components/acl-role/acl-role.component.d.ts +43 -42
  8. package/app/components/acl-role-popover/acl-role-popover.component.d.ts +10 -10
  9. package/app/components/acl-roles/acl-roles.component.d.ts +31 -31
  10. package/app/consts/acl-role-accesses.d.ts +5 -5
  11. package/app/enums/acl-role-access.d.ts +6 -6
  12. package/app/enums/index.d.ts +1 -1
  13. package/app/fs-app-acl.module.d.ts +4 -4
  14. package/app/injectors/app-acl-config.injector.d.ts +2 -2
  15. package/app/injectors/index.d.ts +1 -1
  16. package/app/interfaces/acl-entry-data.d.ts +11 -11
  17. package/app/interfaces/acl-entry.d.ts +18 -18
  18. package/app/interfaces/acl-level.d.ts +3 -3
  19. package/app/interfaces/acl-object-entry.d.ts +11 -11
  20. package/app/interfaces/acl-object-role.d.ts +6 -6
  21. package/app/interfaces/acl-object.d.ts +4 -4
  22. package/app/interfaces/acl-permission.d.ts +7 -7
  23. package/app/interfaces/acl-role.d.ts +15 -15
  24. package/app/interfaces/app-acl-config.d.ts +7 -7
  25. package/app/interfaces/index.d.ts +11 -11
  26. package/app/interfaces/name-value.d.ts +4 -4
  27. package/app/services/app-acl.service.d.ts +13 -13
  28. package/app/services/index.d.ts +1 -1
  29. package/bundles/firestitch-app-acl.umd.js +854 -850
  30. package/bundles/firestitch-app-acl.umd.js.map +1 -1
  31. package/bundles/firestitch-app-acl.umd.min.js +2 -2
  32. package/bundles/firestitch-app-acl.umd.min.js.map +1 -1
  33. package/esm2015/app/components/acl-entries/acl-entries.component.js +176 -176
  34. package/esm2015/app/components/acl-entry/acl-entry.component.js +87 -87
  35. package/esm2015/app/components/acl-entry/index.js +1 -1
  36. package/esm2015/app/components/acl-object-roles/acl-object-roles.component.js +62 -62
  37. package/esm2015/app/components/acl-permission-popover/acl-permission-popover.component.js +34 -34
  38. package/esm2015/app/components/acl-permission-popover/index.js +1 -1
  39. package/esm2015/app/components/acl-role/acl-role.component.js +191 -187
  40. package/esm2015/app/components/acl-role-popover/acl-role-popover.component.js +40 -40
  41. package/esm2015/app/components/acl-roles/acl-roles.component.js +157 -157
  42. package/esm2015/app/consts/acl-role-accesses.js +7 -7
  43. package/esm2015/app/enums/acl-role-access.js +7 -7
  44. package/esm2015/app/enums/index.js +3 -3
  45. package/esm2015/app/fs-app-acl.module.js +81 -81
  46. package/esm2015/app/injectors/app-acl-config.injector.js +2 -2
  47. package/esm2015/app/injectors/index.js +3 -3
  48. package/esm2015/app/interfaces/index.js +1 -1
  49. package/esm2015/app/services/app-acl.service.js +80 -80
  50. package/esm2015/app/services/index.js +1 -1
  51. package/esm2015/firestitch-app-acl.js +10 -10
  52. package/esm2015/public_api.js +5 -5
  53. package/esm5/app/components/acl-entries/acl-entries.component.js +179 -179
  54. package/esm5/app/components/acl-entry/acl-entry.component.js +92 -92
  55. package/esm5/app/components/acl-entry/index.js +1 -1
  56. package/esm5/app/components/acl-object-roles/acl-object-roles.component.js +63 -63
  57. package/esm5/app/components/acl-permission-popover/acl-permission-popover.component.js +36 -36
  58. package/esm5/app/components/acl-permission-popover/index.js +1 -1
  59. package/esm5/app/components/acl-role/acl-role.component.js +201 -197
  60. package/esm5/app/components/acl-role-popover/acl-role-popover.component.js +42 -42
  61. package/esm5/app/components/acl-roles/acl-roles.component.js +162 -162
  62. package/esm5/app/consts/acl-role-accesses.js +7 -7
  63. package/esm5/app/enums/acl-role-access.js +7 -7
  64. package/esm5/app/enums/index.js +3 -3
  65. package/esm5/app/fs-app-acl.module.js +85 -85
  66. package/esm5/app/injectors/app-acl-config.injector.js +2 -2
  67. package/esm5/app/injectors/index.js +3 -3
  68. package/esm5/app/interfaces/index.js +1 -1
  69. package/esm5/app/services/app-acl.service.js +85 -85
  70. package/esm5/app/services/index.js +1 -1
  71. package/esm5/firestitch-app-acl.js +10 -10
  72. package/esm5/public_api.js +5 -5
  73. package/fesm2015/firestitch-app-acl.js +821 -817
  74. package/fesm2015/firestitch-app-acl.js.map +1 -1
  75. package/fesm5/firestitch-app-acl.js +858 -854
  76. package/fesm5/firestitch-app-acl.js.map +1 -1
  77. package/firestitch-app-acl.d.ts +11 -11
  78. package/firestitch-app-acl.metadata.json +1 -1
  79. package/package.json +1 -1
  80. package/public_api.d.ts +6 -6
@@ -218,880 +218,884 @@
218
218
  return value;
219
219
  }
220
220
 
221
- var AclRoleAccess;
222
- (function (AclRoleAccess) {
223
- AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
224
- AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
225
- AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
226
- AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
221
+ var AclRoleAccess;
222
+ (function (AclRoleAccess) {
223
+ AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
224
+ AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
225
+ AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
226
+ AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
227
227
  })(AclRoleAccess || (AclRoleAccess = {}));
228
228
 
229
- // start:ng42.barrel
229
+ // start:ng42.barrel
230
230
  // end:ng42.barrel
231
231
 
232
- var AclRoleAccesses = [
233
- { name: 'None', value: AclRoleAccess.None },
234
- { name: 'Read', value: AclRoleAccess.Read },
235
- { name: 'Write', value: AclRoleAccess.Write },
236
- { name: 'Full', value: AclRoleAccess.Full }
232
+ var AclRoleAccesses = [
233
+ { name: 'None', value: AclRoleAccess.None },
234
+ { name: 'Read', value: AclRoleAccess.Read },
235
+ { name: 'Write', value: AclRoleAccess.Write },
236
+ { name: 'Full', value: AclRoleAccess.Full }
237
237
  ];
238
238
 
239
239
  var FS_APP_ACL_CONFIG = new core.InjectionToken('fs-app-acl-config');
240
240
 
241
- var snakecaseKeys = _snakecaseKeys;
242
- var camelcaseKeys = _camelcaseKeys;
243
- var FsAppAclService = /** @class */ (function () {
244
- function FsAppAclService(_appAclConfig) {
245
- this._appAclConfig = _appAclConfig;
246
- }
247
- FsAppAclService.prototype.getPermissions = function () {
248
- var _this = this;
249
- if (!this._permissions$) {
250
- this._permissions$ = new rxjs.ReplaySubject();
251
- this._appAclConfig.permissions
252
- .pipe(operators.map(function (data) { return _this.input(data); }))
253
- .subscribe(function (permissions) {
254
- _this._permissions$.next(permissions);
255
- _this._permissions$.complete();
256
- });
257
- }
258
- return this._permissions$;
259
- };
260
- FsAppAclService.prototype.getLevels = function () {
261
- var _this = this;
262
- if (!this._levels$) {
263
- this._levels$ = new rxjs.ReplaySubject();
264
- this._appAclConfig.levels
265
- .pipe(operators.map(function (data) { return _this.input(data); }))
266
- .subscribe(function (levels) {
267
- _this._levels$.next(levels);
268
- _this._levels$.complete();
269
- });
270
- }
271
- return this._levels$;
272
- };
273
- FsAppAclService.prototype.getIndexedLevels = function () {
274
- return this.getLevels()
275
- .pipe(operators.map(function (data) {
276
- return common$1.list(data, 'name', 'value');
277
- }));
278
- };
279
- FsAppAclService.prototype.input = function (data) {
280
- var _this = this;
281
- if (lodashEs.isArray(data)) {
282
- return data.map(function (item) {
283
- return _this._appAclConfig.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
284
- });
285
- }
286
- else {
287
- return this._appAclConfig.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
288
- }
289
- };
290
- FsAppAclService.prototype.output = function (data) {
291
- var _this = this;
292
- if (lodashEs.isArray(data)) {
293
- return data.map(function (item) {
294
- return _this._appAclConfig.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
295
- });
296
- }
297
- else {
298
- return this._appAclConfig.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
299
- }
300
- };
301
- FsAppAclService.ctorParameters = function () { return [
302
- { type: undefined, decorators: [{ type: core.Inject, args: [FS_APP_ACL_CONFIG,] }] }
303
- ]; };
304
- FsAppAclService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function FsAppAclService_Factory() { return new FsAppAclService(core["ɵɵinject"](FS_APP_ACL_CONFIG)); }, token: FsAppAclService, providedIn: "root" });
305
- FsAppAclService = __decorate([
306
- core.Injectable({
307
- providedIn: 'root',
308
- }),
309
- __param(0, core.Inject(FS_APP_ACL_CONFIG)),
310
- __metadata("design:paramtypes", [Object])
311
- ], FsAppAclService);
312
- return FsAppAclService;
241
+ var snakecaseKeys = _snakecaseKeys;
242
+ var camelcaseKeys = _camelcaseKeys;
243
+ var FsAppAclService = /** @class */ (function () {
244
+ function FsAppAclService(_appAclConfig) {
245
+ this._appAclConfig = _appAclConfig;
246
+ }
247
+ FsAppAclService.prototype.getPermissions = function () {
248
+ var _this = this;
249
+ if (!this._permissions$) {
250
+ this._permissions$ = new rxjs.ReplaySubject();
251
+ this._appAclConfig.permissions
252
+ .pipe(operators.map(function (data) { return _this.input(data); }))
253
+ .subscribe(function (permissions) {
254
+ _this._permissions$.next(permissions);
255
+ _this._permissions$.complete();
256
+ });
257
+ }
258
+ return this._permissions$;
259
+ };
260
+ FsAppAclService.prototype.getLevels = function () {
261
+ var _this = this;
262
+ if (!this._levels$) {
263
+ this._levels$ = new rxjs.ReplaySubject();
264
+ this._appAclConfig.levels
265
+ .pipe(operators.map(function (data) { return _this.input(data); }))
266
+ .subscribe(function (levels) {
267
+ _this._levels$.next(levels);
268
+ _this._levels$.complete();
269
+ });
270
+ }
271
+ return this._levels$;
272
+ };
273
+ FsAppAclService.prototype.getIndexedLevels = function () {
274
+ return this.getLevels()
275
+ .pipe(operators.map(function (data) {
276
+ return common$1.list(data, 'name', 'value');
277
+ }));
278
+ };
279
+ FsAppAclService.prototype.input = function (data) {
280
+ var _this = this;
281
+ if (lodashEs.isArray(data)) {
282
+ return data.map(function (item) {
283
+ return _this._appAclConfig.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
284
+ });
285
+ }
286
+ else {
287
+ return this._appAclConfig.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
288
+ }
289
+ };
290
+ FsAppAclService.prototype.output = function (data) {
291
+ var _this = this;
292
+ if (lodashEs.isArray(data)) {
293
+ return data.map(function (item) {
294
+ return _this._appAclConfig.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
295
+ });
296
+ }
297
+ else {
298
+ return this._appAclConfig.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
299
+ }
300
+ };
301
+ FsAppAclService.ctorParameters = function () { return [
302
+ { type: undefined, decorators: [{ type: core.Inject, args: [FS_APP_ACL_CONFIG,] }] }
303
+ ]; };
304
+ FsAppAclService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function FsAppAclService_Factory() { return new FsAppAclService(core["ɵɵinject"](FS_APP_ACL_CONFIG)); }, token: FsAppAclService, providedIn: "root" });
305
+ FsAppAclService = __decorate([
306
+ core.Injectable({
307
+ providedIn: 'root',
308
+ }),
309
+ __param(0, core.Inject(FS_APP_ACL_CONFIG)),
310
+ __metadata("design:paramtypes", [Object])
311
+ ], FsAppAclService);
312
+ return FsAppAclService;
313
313
  }());
314
314
 
315
- var FsAclRoleComponent = /** @class */ (function () {
316
- function FsAclRoleComponent(_appAclService, _dialogRef, _message, _data) {
317
- var _this = this;
318
- this._appAclService = _appAclService;
319
- this._dialogRef = _dialogRef;
320
- this._message = _message;
321
- this._data = _data;
322
- this.aclRole = null;
323
- this.permissions = [];
324
- this.levelPermissions = [];
325
- this.AclRoleAccesses = AclRoleAccesses;
326
- this.indexedAccesses = {};
327
- this.aclLevels = [];
328
- this.indexedAclLevels = {};
329
- this.onlyFullAccess = false;
330
- this.AclLevels = {};
331
- this.aclRoleConfigs = [];
332
- this.levelAclRoleConfigs = [];
333
- this._destroy$ = new rxjs.Subject();
334
- this.save = function () {
335
- var aclRole = __assign(__assign({}, _this.aclRole), { permissions: _this.levelPermissions.map(function (permission) {
336
- return {
337
- value: permission.value,
338
- access: _this.aclRole.permissions[permission.value] || 0,
339
- };
340
- }), aclRoleConfigs: _this.levelAclRoleConfigs.map(function (item) {
341
- return {
342
- id: item.id,
343
- value: item.value,
344
- data: item.data,
345
- };
346
- }) });
347
- return _this._data.saveAclRole(_this._appAclService.output(aclRole))
348
- .pipe(operators.tap(function (response) {
349
- _this._message.success('Saved Changes');
350
- _this.close(response);
351
- }));
352
- };
353
- }
354
- FsAclRoleComponent.prototype.ngOnInit = function () {
355
- var _this = this;
356
- rxjs.forkJoin(this.getRole(), this._appAclService.getPermissions())
357
- .pipe(operators.takeUntil(this._destroy$))
358
- .subscribe(function (_a) {
359
- var _b = __read(_a, 2), aclRole = _b[0], aclPermissions = _b[1];
360
- _this.permissions = aclPermissions;
361
- _this.aclLevels = _this._data.aclLevels;
362
- _this.indexedAclLevels = common$1.list(_this.aclLevels, 'name', 'value');
363
- _this.indexedAccesses = common$1.list(AclRoleAccesses, 'name', 'value');
364
- _this.aclRole = __assign({
365
- aclPermissions: [],
366
- allPermissions: true,
367
- aclRoleConfigs: [],
368
- permissions: {},
369
- level: _this.aclLevels[0].value,
370
- }, aclRole);
371
- if (_this.aclRole.id) {
372
- _this.permissions.forEach(function (permission) {
373
- var access = 0;
374
- var aclPermission = _this.aclRole.aclPermissions.find(function (item) {
375
- return item.permission === permission.value;
376
- });
377
- if (aclPermission) {
378
- access = aclPermission.access;
379
- }
380
- _this.aclRole.permissions[permission.value] = access;
381
- });
382
- }
383
- if (_this.aclRole.allPermissions) {
384
- _this._applyMaxPermissionAccess();
385
- }
386
- _this._updatePermissions();
387
- _this._updateAclRoleConfigs();
388
- });
389
- this.listConfig = {
390
- status: false,
391
- paging: false,
392
- noResults: {
393
- message: '',
394
- },
395
- group: {
396
- initialExpand: true,
397
- groupBy: function (data) {
398
- return data;
399
- },
400
- compareBy: function (data) {
401
- return data.category || 'General';
402
- },
403
- },
404
- fetch: function () {
405
- return rxjs.of({
406
- data: _this.levelPermissions.sort(function (a, b) {
407
- a = a.name.toUpperCase();
408
- b = b.name.toUpperCase();
409
- if (a < b) {
410
- return -1;
411
- }
412
- else if (a > b) {
413
- return 1;
414
- }
415
- return 0;
416
- }),
417
- });
418
- },
419
- };
420
- };
421
- FsAclRoleComponent.prototype.levelChange = function () {
422
- var _this = this;
423
- this._updatePermissions();
424
- this._updateAclRoleConfigs();
425
- setTimeout(function () {
426
- _this.list.reload();
427
- });
428
- };
429
- FsAclRoleComponent.prototype.getRole = function () {
430
- var _this = this;
431
- if (!this._data.aclRole.id) {
432
- return rxjs.of(this._data.aclRole);
433
- }
434
- var query = {
435
- aclPermissions: true,
436
- aclRoleConfigs: true,
437
- };
438
- if (!this.environment) {
439
- query.environmentId = null;
440
- }
441
- return this._data.loadAclRole(this._data.aclRole, query)
442
- .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
443
- };
444
- FsAclRoleComponent.prototype.close = function (data) {
445
- if (data === void 0) { data = null; }
446
- this._dialogRef.close(data);
447
- };
448
- FsAclRoleComponent.prototype.allPermissionsChange = function (all) {
449
- this._updatePermissions();
450
- if (all) {
451
- this._applyMaxPermissionAccess();
452
- }
453
- };
454
- FsAclRoleComponent.prototype.ngOnDestroy = function () {
455
- this._destroy$.next();
456
- this._destroy$.complete();
457
- };
458
- FsAclRoleComponent.prototype._updatePermissions = function () {
459
- var _this = this;
460
- this.levelPermissions = this.permissions.filter(function (permission) {
461
- return permission.levels.some(function (item) {
462
- return item === _this.aclRole.level;
463
- });
464
- });
465
- };
466
- FsAclRoleComponent.prototype._updateAclRoleConfigs = function () {
467
- var _this = this;
468
- this.levelAclRoleConfigs = this.aclRoleConfigs.filter(function (item) {
469
- return _this.aclRole.level === item.level;
470
- });
471
- };
472
- FsAclRoleComponent.prototype._applyMaxPermissionAccess = function () {
473
- var _this = this;
474
- this.permissions.forEach(function (permission) {
475
- _this.aclRole.permissions[permission.value] = Math.max.apply(Math, __spread(permission.accesses));
476
- });
477
- };
478
- FsAclRoleComponent.ctorParameters = function () { return [
479
- { type: FsAppAclService },
480
- { type: dialog.MatDialogRef },
481
- { type: message.FsMessage },
482
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
483
- ]; };
484
- __decorate([
485
- core.ViewChild(list.FsListComponent),
486
- __metadata("design:type", list.FsListComponent)
487
- ], FsAclRoleComponent.prototype, "list", void 0);
488
- FsAclRoleComponent = __decorate([
489
- core.Component({
490
- template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <ng-container *ngIf=\"aclRole\">\n <div mat-dialog-title>{{ aclRole.id ? 'Edit' : 'Create' }} Role</div>\n <mat-dialog-content>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxLayoutGap=\"40px\" fxLayoutGap.lt-md=\"0\">\n <div fxLayout=\"column\" fxFlex fxFlex.lt-md=\"0\">\n <mat-form-field>\n <input matInput placeholder=\"Name\" [(ngModel)]=\"aclRole.name\" name=\"name\" fsFormRequired>\n </mat-form-field>\n\n <fs-label-field *ngIf=\"aclRole.id || aclLevels.length === 1; else levels\">\n <fs-label>Level</fs-label>\n {{indexedAclLevels[aclRole.level]}}\n </fs-label-field>\n\n <ng-template #levels>\n <div class=\"level\">\n <fs-radio-group\n [(ngModel)]=\"aclRole.level\"\n (ngModelChange)=\"levelChange()\"\n fsFormRequired\n label=\"Level\"\n orientation=\"vertical\"\n name=\"level\">\n <mat-radio-button\n *ngFor=\"let item of aclLevels\"\n [value]=\"item.value\"\n [disabled]=\"!!aclRole.protected\">\n {{ item.name }}\n </mat-radio-button>\n </fs-radio-group>\n </div>\n </ng-template>\n\n <fs-label-field *ngIf=\"levelPermissions.length\">\n <fs-label>All Permissions</fs-label>\n <mat-checkbox\n [(ngModel)]=\"aclRole.allPermissions\"\n (ngModelChange)=\"allPermissionsChange($event)\"\n [disabled]=\"!!aclRole.protected\"\n name=\"allPermissions\">\n </mat-checkbox>\n </fs-label-field>\n\n <div fxLayout=\"column\" *ngFor=\"let config of levelAclRoleConfigs\">\n <fs-label-field *ngIf=\"config.interface === 'checkbox'\">\n <fs-label>{{config.name}}</fs-label>\n <mat-checkbox\n [(ngModel)]=\"config.data\"\n [name]=\"config.name\">\n </mat-checkbox>\n <fs-label-message>\n <mat-hint>{{config.description}}</mat-hint>\n </fs-label-message>\n </fs-label-field>\n\n <mat-form-field *ngIf=\"config.interface === 'select'\">\n <mat-select\n [(ngModel)]=\"config.data\"\n [name]=\"config.value\"\n [required]=\"config.required\"\n [placeholder]=\"config.name\">\n <mat-option\n *ngFor=\"let item of config.values\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n <mat-hint>{{config.description}}</mat-hint>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" fxFlex=\"65\" fxFlex.lt-md=\"0\" *ngIf=\"aclRole.level\" [hidden]=\"!levelPermissions.length\" class=\"permissions\">\n\n <fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Permissions\">\n <ng-template colspan=\"2\" fs-list-group-cell let-row=\"row\" class=\"permission-group\">\n <small><b>{{row.category || 'General'}}</b></small>\n </ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permission\">{{ row.name }}</div>\n <div class=\"description small\">{{ row.description }}</div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Access\" width=\"1%\" class=\"access\">\n <ng-template fs-list-cell let-row=\"permission\" let-permission=\"row\">\n <span *ngIf=\"aclRole.allPermissions; else elseAll\">\n {{ indexedAccesses[aclRole.permissions[permission.value]] }}\n </span>\n <ng-template #elseAll>\n <mat-form-field>\n <mat-select\n [(ngModel)]=\"aclRole.permissions[permission.value]\"\n [disabled]=\"!!aclRole.protected\"\n fsFormRequired\n name=\"access-{{ permission.value }}\">\n <ng-container *ngFor=\"let access of AclRoleAccesses\">\n <mat-option\n *ngIf=\"access.value === 0 || permission.accesses.indexOf(access.value) !== -1\"\n [value]=\"access.value\">\n {{ access.name }}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">{{ aclRole.id ? 'Save' : 'Create' }}</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </ng-container>\n </fs-dialog>\n</form>\n",
491
- styles: [":host .permissions ::ng-deep .fs-list-row-group{background-color:#f6f6f6}:host .permissions ::ng-deep fs-list .access{white-space:nowrap}:host .permissions ::ng-deep .mat-form-field{width:100px}:host .permissions ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-infix{border-top:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-underline{bottom:0}:host ::ng-deep fs-radio-group{width:100%}:host ::ng-deep fs-label-field{width:100%}:host .level{width:100%}"]
492
- }),
493
- __param(3, core.Inject(dialog.MAT_DIALOG_DATA)),
494
- __metadata("design:paramtypes", [FsAppAclService,
495
- dialog.MatDialogRef,
496
- message.FsMessage, Object])
497
- ], FsAclRoleComponent);
498
- return FsAclRoleComponent;
315
+ var FsAclRoleComponent = /** @class */ (function () {
316
+ function FsAclRoleComponent(_appAclService, _dialogRef, _message, _data, _cdRef) {
317
+ var _this = this;
318
+ this._appAclService = _appAclService;
319
+ this._dialogRef = _dialogRef;
320
+ this._message = _message;
321
+ this._data = _data;
322
+ this._cdRef = _cdRef;
323
+ this.aclRole = null;
324
+ this.permissions = [];
325
+ this.levelPermissions = [];
326
+ this.AclRoleAccesses = AclRoleAccesses;
327
+ this.indexedAccesses = {};
328
+ this.aclLevels = [];
329
+ this.indexedAclLevels = {};
330
+ this.onlyFullAccess = false;
331
+ this.AclLevels = {};
332
+ this.aclRoleConfigs = [];
333
+ this.levelAclRoleConfigs = [];
334
+ this._destroy$ = new rxjs.Subject();
335
+ this.save = function () {
336
+ var aclRole = __assign(__assign({}, _this.aclRole), { permissions: _this.levelPermissions.map(function (permission) {
337
+ return {
338
+ value: permission.value,
339
+ access: _this.aclRole.permissions[permission.value] || 0,
340
+ };
341
+ }), aclRoleConfigs: _this.levelAclRoleConfigs.map(function (item) {
342
+ return {
343
+ id: item.id,
344
+ value: item.value,
345
+ data: item.data,
346
+ };
347
+ }) });
348
+ return _this._data.saveAclRole(_this._appAclService.output(aclRole))
349
+ .pipe(operators.tap(function (response) {
350
+ _this._message.success('Saved Changes');
351
+ _this.close(response);
352
+ }));
353
+ };
354
+ }
355
+ FsAclRoleComponent.prototype.ngOnInit = function () {
356
+ var _this = this;
357
+ rxjs.forkJoin(this.getRole(), this._appAclService.getPermissions())
358
+ .pipe(operators.takeUntil(this._destroy$))
359
+ .subscribe(function (_a) {
360
+ var _b = __read(_a, 2), aclRole = _b[0], aclPermissions = _b[1];
361
+ _this.permissions = aclPermissions;
362
+ _this.aclLevels = _this._data.aclLevels;
363
+ _this.indexedAclLevels = common$1.list(_this.aclLevels, 'name', 'value');
364
+ _this.indexedAccesses = common$1.list(AclRoleAccesses, 'name', 'value');
365
+ _this.aclRole = __assign({
366
+ aclPermissions: [],
367
+ allPermissions: true,
368
+ aclRoleConfigs: [],
369
+ permissions: {},
370
+ level: _this.aclLevels[0].value,
371
+ }, aclRole);
372
+ if (_this.aclRole.id) {
373
+ _this.permissions.forEach(function (permission) {
374
+ var access = 0;
375
+ var aclPermission = _this.aclRole.aclPermissions.find(function (item) {
376
+ return item.permission === permission.value;
377
+ });
378
+ if (aclPermission) {
379
+ access = aclPermission.access;
380
+ }
381
+ _this.aclRole.permissions[permission.value] = access;
382
+ });
383
+ }
384
+ if (_this.aclRole.allPermissions) {
385
+ _this._applyMaxPermissionAccess();
386
+ }
387
+ _this._updatePermissions();
388
+ _this._updateAclRoleConfigs();
389
+ _this._cdRef.markForCheck();
390
+ });
391
+ this.listConfig = {
392
+ status: false,
393
+ paging: false,
394
+ noResults: {
395
+ message: '',
396
+ },
397
+ group: {
398
+ initialExpand: true,
399
+ groupBy: function (data) {
400
+ return data;
401
+ },
402
+ compareBy: function (data) {
403
+ return data.category || 'General';
404
+ },
405
+ },
406
+ fetch: function () {
407
+ return rxjs.of({
408
+ data: _this.levelPermissions.sort(function (a, b) {
409
+ a = a.name.toUpperCase();
410
+ b = b.name.toUpperCase();
411
+ if (a < b) {
412
+ return -1;
413
+ }
414
+ else if (a > b) {
415
+ return 1;
416
+ }
417
+ return 0;
418
+ }),
419
+ });
420
+ },
421
+ };
422
+ };
423
+ FsAclRoleComponent.prototype.levelChange = function () {
424
+ var _this = this;
425
+ this._updatePermissions();
426
+ this._updateAclRoleConfigs();
427
+ setTimeout(function () {
428
+ _this.list.reload();
429
+ });
430
+ };
431
+ FsAclRoleComponent.prototype.getRole = function () {
432
+ var _this = this;
433
+ if (!this._data.aclRole.id) {
434
+ return rxjs.of(this._data.aclRole);
435
+ }
436
+ var query = {
437
+ aclPermissions: true,
438
+ aclRoleConfigs: true,
439
+ };
440
+ if (!this.environment) {
441
+ query.environmentId = null;
442
+ }
443
+ return this._data.loadAclRole(this._data.aclRole, query)
444
+ .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
445
+ };
446
+ FsAclRoleComponent.prototype.close = function (data) {
447
+ if (data === void 0) { data = null; }
448
+ this._dialogRef.close(data);
449
+ };
450
+ FsAclRoleComponent.prototype.allPermissionsChange = function (all) {
451
+ this._updatePermissions();
452
+ if (all) {
453
+ this._applyMaxPermissionAccess();
454
+ }
455
+ };
456
+ FsAclRoleComponent.prototype.ngOnDestroy = function () {
457
+ this._destroy$.next();
458
+ this._destroy$.complete();
459
+ };
460
+ FsAclRoleComponent.prototype._updatePermissions = function () {
461
+ var _this = this;
462
+ this.levelPermissions = this.permissions.filter(function (permission) {
463
+ return permission.levels.some(function (item) {
464
+ return item === _this.aclRole.level;
465
+ });
466
+ });
467
+ };
468
+ FsAclRoleComponent.prototype._updateAclRoleConfigs = function () {
469
+ var _this = this;
470
+ this.levelAclRoleConfigs = this.aclRoleConfigs.filter(function (item) {
471
+ return _this.aclRole.level === item.level;
472
+ });
473
+ };
474
+ FsAclRoleComponent.prototype._applyMaxPermissionAccess = function () {
475
+ var _this = this;
476
+ this.permissions.forEach(function (permission) {
477
+ _this.aclRole.permissions[permission.value] = Math.max.apply(Math, __spread(permission.accesses));
478
+ });
479
+ };
480
+ FsAclRoleComponent.ctorParameters = function () { return [
481
+ { type: FsAppAclService },
482
+ { type: dialog.MatDialogRef },
483
+ { type: message.FsMessage },
484
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
485
+ { type: core.ChangeDetectorRef }
486
+ ]; };
487
+ __decorate([
488
+ core.ViewChild(list.FsListComponent),
489
+ __metadata("design:type", list.FsListComponent)
490
+ ], FsAclRoleComponent.prototype, "list", void 0);
491
+ FsAclRoleComponent = __decorate([
492
+ core.Component({
493
+ template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <ng-container *ngIf=\"aclRole\">\n <div mat-dialog-title>{{ aclRole.id ? 'Edit' : 'Create' }} Role</div>\n <mat-dialog-content>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxLayoutGap=\"40px\" fxLayoutGap.lt-md=\"0\">\n <div fxLayout=\"column\" fxFlex fxFlex.lt-md=\"0\">\n <mat-form-field>\n <input matInput placeholder=\"Name\" [(ngModel)]=\"aclRole.name\" name=\"name\" fsFormRequired>\n </mat-form-field>\n\n <fs-label-field *ngIf=\"aclRole.id || aclLevels.length === 1; else levels\">\n <fs-label>Level</fs-label>\n {{indexedAclLevels[aclRole.level]}}\n </fs-label-field>\n\n <ng-template #levels>\n <div class=\"level\">\n <fs-radio-group\n [(ngModel)]=\"aclRole.level\"\n (ngModelChange)=\"levelChange()\"\n fsFormRequired\n label=\"Level\"\n orientation=\"vertical\"\n name=\"level\">\n <mat-radio-button\n *ngFor=\"let item of aclLevels\"\n [value]=\"item.value\"\n [disabled]=\"!!aclRole.protected\">\n {{ item.name }}\n </mat-radio-button>\n </fs-radio-group>\n </div>\n </ng-template>\n\n <fs-label-field *ngIf=\"levelPermissions.length\">\n <fs-label>All Permissions</fs-label>\n <mat-checkbox\n [(ngModel)]=\"aclRole.allPermissions\"\n (ngModelChange)=\"allPermissionsChange($event)\"\n [disabled]=\"!!aclRole.protected\"\n name=\"allPermissions\">\n </mat-checkbox>\n </fs-label-field>\n\n <div fxLayout=\"column\" *ngFor=\"let config of levelAclRoleConfigs\">\n <fs-label-field *ngIf=\"config.interface === 'checkbox'\">\n <fs-label>{{config.name}}</fs-label>\n <mat-checkbox\n [(ngModel)]=\"config.data\"\n [name]=\"config.name\">\n </mat-checkbox>\n <fs-label-message>\n <mat-hint>{{config.description}}</mat-hint>\n </fs-label-message>\n </fs-label-field>\n\n <mat-form-field *ngIf=\"config.interface === 'select'\">\n <mat-select\n [(ngModel)]=\"config.data\"\n [name]=\"config.value\"\n [required]=\"config.required\"\n [placeholder]=\"config.name\">\n <mat-option\n *ngFor=\"let item of config.values\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n <mat-hint>{{config.description}}</mat-hint>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" fxFlex=\"65\" fxFlex.lt-md=\"0\" *ngIf=\"aclRole.level\" [hidden]=\"!levelPermissions.length\" class=\"permissions\">\n\n <fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Permissions\">\n <ng-template colspan=\"2\" fs-list-group-cell let-row=\"row\" class=\"permission-group\">\n <small><b>{{row.category || 'General'}}</b></small>\n </ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permission\">{{ row.name }}</div>\n <div class=\"description small\">{{ row.description }}</div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Access\" width=\"1%\" class=\"access\">\n <ng-template fs-list-cell let-row=\"permission\" let-permission=\"row\">\n <span *ngIf=\"aclRole.allPermissions; else elseAll\">\n {{ indexedAccesses[aclRole.permissions[permission.value]] }}\n </span>\n <ng-template #elseAll>\n <mat-form-field>\n <mat-select\n [(ngModel)]=\"aclRole.permissions[permission.value]\"\n [disabled]=\"!!aclRole.protected\"\n fsFormRequired\n name=\"access-{{ permission.value }}\">\n <ng-container *ngFor=\"let access of AclRoleAccesses\">\n <mat-option\n *ngIf=\"access.value === 0 || permission.accesses.indexOf(access.value) !== -1\"\n [value]=\"access.value\">\n {{ access.name }}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">{{ aclRole.id ? 'Save' : 'Create' }}</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </ng-container>\n </fs-dialog>\n</form>\n",
494
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
495
+ styles: [":host .permissions ::ng-deep .fs-list-row-group{background-color:#f6f6f6}:host .permissions ::ng-deep fs-list .access{white-space:nowrap}:host .permissions ::ng-deep .mat-form-field{width:100px}:host .permissions ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-infix{border-top:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-underline{bottom:0}:host ::ng-deep fs-radio-group{width:100%}:host ::ng-deep fs-label-field{width:100%}:host .level{width:100%}"]
496
+ }),
497
+ __param(3, core.Inject(dialog.MAT_DIALOG_DATA)),
498
+ __metadata("design:paramtypes", [FsAppAclService,
499
+ dialog.MatDialogRef,
500
+ message.FsMessage, Object, core.ChangeDetectorRef])
501
+ ], FsAclRoleComponent);
502
+ return FsAclRoleComponent;
499
503
  }());
500
504
 
501
- var FsAclRolesComponent = /** @class */ (function () {
502
- function FsAclRolesComponent(_appAclService, _dialog, _cdRef) {
503
- this._appAclService = _appAclService;
504
- this._dialog = _dialog;
505
- this._cdRef = _cdRef;
506
- this.aclLevels = [];
507
- this.list = new core.QueryList();
508
- this.indexedAclRoleLevels = {};
509
- this._destroy$ = new rxjs.Subject();
510
- }
511
- FsAclRolesComponent.prototype.ngOnInit = function () {
512
- var _this = this;
513
- new rxjs.Observable(function (observer) {
514
- if (_this.aclLevels.length) {
515
- observer.next(_this.aclLevels);
516
- observer.complete();
517
- }
518
- else {
519
- _this._appAclService.getLevels()
520
- .subscribe(function (aclLevels) {
521
- observer.next(aclLevels);
522
- observer.complete();
523
- });
524
- }
525
- })
526
- .subscribe(function (aclLevels) {
527
- _this.aclLevels = aclLevels;
528
- _this.indexedAclRoleLevels = common$1.list(_this.aclLevels, 'name', 'value');
529
- _this._loadListConfig();
530
- });
531
- };
532
- FsAclRolesComponent.prototype.openDialog = function (aclRole) {
533
- var _this = this;
534
- if (aclRole === void 0) { aclRole = { id: null }; }
535
- var dialogRef = this._dialog.open(FsAclRoleComponent, {
536
- width: '70%',
537
- data: {
538
- aclRole: aclRole,
539
- aclLevels: this.aclLevels,
540
- loadAclRole: this.loadAclRole,
541
- saveAclRole: this.saveAclRole,
542
- },
543
- });
544
- dialogRef.afterClosed()
545
- .pipe(operators.takeUntil(this._destroy$), operators.filter(function (response) { return !!response; }))
546
- .subscribe(function (response) {
547
- _this.list.forEach(function (list) {
548
- list.reload();
549
- });
550
- });
551
- };
552
- FsAclRolesComponent.prototype.ngOnDestroy = function () {
553
- this._destroy$.next();
554
- this._destroy$.complete();
555
- };
556
- FsAclRolesComponent.prototype._loadListConfig = function () {
557
- var _this = this;
558
- this.listConfig = {
559
- sort: { value: 'hierarchy' },
560
- filters: [
561
- {
562
- name: 'keyword',
563
- type: filter.ItemType.Keyword,
564
- label: 'Search',
565
- },
566
- {
567
- name: 'level',
568
- label: 'Level',
569
- type: filter.ItemType.Select,
570
- values: this.aclLevels,
571
- hide: this.aclLevels.length <= 1
572
- },
573
- {
574
- name: 'state',
575
- label: 'Show Deleted',
576
- type: filter.ItemType.Checkbox,
577
- unchecked: 'active',
578
- checked: 'deleted',
579
- },
580
- ],
581
- actions: [
582
- {
583
- click: function (event) {
584
- _this.openDialog();
585
- },
586
- label: 'Create',
587
- },
588
- ],
589
- rowActions: [
590
- {
591
- click: function (data) {
592
- return _this.deleteAclRole(_this._appAclService.output(data));
593
- },
594
- remove: {
595
- title: 'Confirm',
596
- template: 'Are you sure you would like to delete this role?',
597
- },
598
- menu: true,
599
- label: 'Delete',
600
- show: function (row) { return row.state !== 'deleted'; },
601
- },
602
- ],
603
- fetch: function (query) {
604
- query.permissions = true;
605
- return _this.loadAclRoles(query)
606
- .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
607
- },
608
- };
609
- };
610
- FsAclRolesComponent.ctorParameters = function () { return [
611
- { type: FsAppAclService },
612
- { type: dialog.MatDialog },
613
- { type: core.ChangeDetectorRef }
614
- ]; };
615
- __decorate([
616
- core.Input(),
617
- __metadata("design:type", Function)
618
- ], FsAclRolesComponent.prototype, "deleteAclRole", void 0);
619
- __decorate([
620
- core.Input(),
621
- __metadata("design:type", Function)
622
- ], FsAclRolesComponent.prototype, "saveAclRole", void 0);
623
- __decorate([
624
- core.Input(),
625
- __metadata("design:type", Function)
626
- ], FsAclRolesComponent.prototype, "loadAclRoles", void 0);
627
- __decorate([
628
- core.Input(),
629
- __metadata("design:type", Function)
630
- ], FsAclRolesComponent.prototype, "loadAclRole", void 0);
631
- __decorate([
632
- core.Input(),
633
- __metadata("design:type", Array)
634
- ], FsAclRolesComponent.prototype, "aclLevels", void 0);
635
- __decorate([
636
- core.ViewChildren(list.FsListComponent),
637
- __metadata("design:type", Object)
638
- ], FsAclRolesComponent.prototype, "list", void 0);
639
- FsAclRolesComponent = __decorate([
640
- core.Component({
641
- selector: 'fs-acl-roles',
642
- template: "<fs-list [config]=\"listConfig\" *ngIf=\"listConfig\">\n <fs-list-column title=\"Name\" name=\"name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openDialog(row)\">{{ row.name }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"hierarchy\" title=\"Level\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ indexedAclRoleLevels[row.level] }}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Permissions\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permissions\">\n <ng-container *ngFor=\"let permission of row.permissions\">\n <span *ngIf=\"permission.access\" class=\"permission\">\n <acl-permission-popover [permission]=\"permission\">{{permission.name}}</acl-permission-popover>\n </span>\n </ng-container>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n",
643
- changeDetection: core.ChangeDetectionStrategy.OnPush,
644
- styles: [".permissions .permission+.permission::before{content:\", \"}"]
645
- }),
646
- __metadata("design:paramtypes", [FsAppAclService,
647
- dialog.MatDialog,
648
- core.ChangeDetectorRef])
649
- ], FsAclRolesComponent);
650
- return FsAclRolesComponent;
505
+ var FsAclRolesComponent = /** @class */ (function () {
506
+ function FsAclRolesComponent(_appAclService, _dialog, _cdRef) {
507
+ this._appAclService = _appAclService;
508
+ this._dialog = _dialog;
509
+ this._cdRef = _cdRef;
510
+ this.aclLevels = [];
511
+ this.list = new core.QueryList();
512
+ this.indexedAclRoleLevels = {};
513
+ this._destroy$ = new rxjs.Subject();
514
+ }
515
+ FsAclRolesComponent.prototype.ngOnInit = function () {
516
+ var _this = this;
517
+ new rxjs.Observable(function (observer) {
518
+ if (_this.aclLevels.length) {
519
+ observer.next(_this.aclLevels);
520
+ observer.complete();
521
+ }
522
+ else {
523
+ _this._appAclService.getLevels()
524
+ .subscribe(function (aclLevels) {
525
+ observer.next(aclLevels);
526
+ observer.complete();
527
+ });
528
+ }
529
+ })
530
+ .subscribe(function (aclLevels) {
531
+ _this.aclLevels = aclLevels;
532
+ _this.indexedAclRoleLevels = common$1.list(_this.aclLevels, 'name', 'value');
533
+ _this._loadListConfig();
534
+ });
535
+ };
536
+ FsAclRolesComponent.prototype.openDialog = function (aclRole) {
537
+ var _this = this;
538
+ if (aclRole === void 0) { aclRole = { id: null }; }
539
+ var dialogRef = this._dialog.open(FsAclRoleComponent, {
540
+ width: '70%',
541
+ data: {
542
+ aclRole: aclRole,
543
+ aclLevels: this.aclLevels,
544
+ loadAclRole: this.loadAclRole,
545
+ saveAclRole: this.saveAclRole,
546
+ },
547
+ });
548
+ dialogRef.afterClosed()
549
+ .pipe(operators.takeUntil(this._destroy$), operators.filter(function (response) { return !!response; }))
550
+ .subscribe(function (response) {
551
+ _this.list.forEach(function (list) {
552
+ list.reload();
553
+ });
554
+ });
555
+ };
556
+ FsAclRolesComponent.prototype.ngOnDestroy = function () {
557
+ this._destroy$.next();
558
+ this._destroy$.complete();
559
+ };
560
+ FsAclRolesComponent.prototype._loadListConfig = function () {
561
+ var _this = this;
562
+ this.listConfig = {
563
+ sort: { value: 'hierarchy' },
564
+ filters: [
565
+ {
566
+ name: 'keyword',
567
+ type: filter.ItemType.Keyword,
568
+ label: 'Search',
569
+ },
570
+ {
571
+ name: 'level',
572
+ label: 'Level',
573
+ type: filter.ItemType.Select,
574
+ values: this.aclLevels,
575
+ hide: this.aclLevels.length <= 1
576
+ },
577
+ {
578
+ name: 'state',
579
+ label: 'Show Deleted',
580
+ type: filter.ItemType.Checkbox,
581
+ unchecked: 'active',
582
+ checked: 'deleted',
583
+ },
584
+ ],
585
+ actions: [
586
+ {
587
+ click: function (event) {
588
+ _this.openDialog();
589
+ },
590
+ label: 'Create',
591
+ },
592
+ ],
593
+ rowActions: [
594
+ {
595
+ click: function (data) {
596
+ return _this.deleteAclRole(_this._appAclService.output(data));
597
+ },
598
+ remove: {
599
+ title: 'Confirm',
600
+ template: 'Are you sure you would like to delete this role?',
601
+ },
602
+ menu: true,
603
+ label: 'Delete',
604
+ show: function (row) { return row.state !== 'deleted'; },
605
+ },
606
+ ],
607
+ fetch: function (query) {
608
+ query.permissions = true;
609
+ return _this.loadAclRoles(query)
610
+ .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
611
+ },
612
+ };
613
+ };
614
+ FsAclRolesComponent.ctorParameters = function () { return [
615
+ { type: FsAppAclService },
616
+ { type: dialog.MatDialog },
617
+ { type: core.ChangeDetectorRef }
618
+ ]; };
619
+ __decorate([
620
+ core.Input(),
621
+ __metadata("design:type", Function)
622
+ ], FsAclRolesComponent.prototype, "deleteAclRole", void 0);
623
+ __decorate([
624
+ core.Input(),
625
+ __metadata("design:type", Function)
626
+ ], FsAclRolesComponent.prototype, "saveAclRole", void 0);
627
+ __decorate([
628
+ core.Input(),
629
+ __metadata("design:type", Function)
630
+ ], FsAclRolesComponent.prototype, "loadAclRoles", void 0);
631
+ __decorate([
632
+ core.Input(),
633
+ __metadata("design:type", Function)
634
+ ], FsAclRolesComponent.prototype, "loadAclRole", void 0);
635
+ __decorate([
636
+ core.Input(),
637
+ __metadata("design:type", Array)
638
+ ], FsAclRolesComponent.prototype, "aclLevels", void 0);
639
+ __decorate([
640
+ core.ViewChildren(list.FsListComponent),
641
+ __metadata("design:type", Object)
642
+ ], FsAclRolesComponent.prototype, "list", void 0);
643
+ FsAclRolesComponent = __decorate([
644
+ core.Component({
645
+ selector: 'fs-acl-roles',
646
+ template: "<fs-list [config]=\"listConfig\" *ngIf=\"listConfig\">\n <fs-list-column title=\"Name\" name=\"name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openDialog(row)\">{{ row.name }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"hierarchy\" title=\"Level\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ indexedAclRoleLevels[row.level] }}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Permissions\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permissions\">\n <ng-container *ngFor=\"let permission of row.permissions\">\n <span *ngIf=\"permission.access\" class=\"permission\">\n <acl-permission-popover [permission]=\"permission\">{{permission.name}}</acl-permission-popover>\n </span>\n </ng-container>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n",
647
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
648
+ styles: [".permissions .permission+.permission::before{content:\", \"}"]
649
+ }),
650
+ __metadata("design:paramtypes", [FsAppAclService,
651
+ dialog.MatDialog,
652
+ core.ChangeDetectorRef])
653
+ ], FsAclRolesComponent);
654
+ return FsAclRolesComponent;
651
655
  }());
652
656
 
653
- var FsAclPermissionPopoverComponent = /** @class */ (function () {
654
- function FsAclPermissionPopoverComponent(_appAclService) {
655
- this._appAclService = _appAclService;
656
- }
657
- FsAclPermissionPopoverComponent.prototype.ngOnInit = function () {
658
- var _this = this;
659
- this._appAclService.getPermissions()
660
- .subscribe(function (permissions) {
661
- _this.description = permissions.filter(function (item) {
662
- return item.value === _this.permission.value;
663
- }).map(function (item) {
664
- return item.description;
665
- })[0];
666
- });
667
- };
668
- FsAclPermissionPopoverComponent.ctorParameters = function () { return [
669
- { type: FsAppAclService }
670
- ]; };
671
- __decorate([
672
- core.Input(),
673
- __metadata("design:type", Object)
674
- ], FsAclPermissionPopoverComponent.prototype, "permission", void 0);
675
- FsAclPermissionPopoverComponent = __decorate([
676
- core.Component({
677
- selector: 'acl-permission-popover',
678
- template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n {{permission.name}}\n <div class=\"small\">{{description}}</div>\n</ng-template>\n\n",
679
- styles: [":host{cursor:pointer}"]
680
- }),
681
- __metadata("design:paramtypes", [FsAppAclService])
682
- ], FsAclPermissionPopoverComponent);
683
- return FsAclPermissionPopoverComponent;
657
+ var FsAclPermissionPopoverComponent = /** @class */ (function () {
658
+ function FsAclPermissionPopoverComponent(_appAclService) {
659
+ this._appAclService = _appAclService;
660
+ }
661
+ FsAclPermissionPopoverComponent.prototype.ngOnInit = function () {
662
+ var _this = this;
663
+ this._appAclService.getPermissions()
664
+ .subscribe(function (permissions) {
665
+ _this.description = permissions.filter(function (item) {
666
+ return item.value === _this.permission.value;
667
+ }).map(function (item) {
668
+ return item.description;
669
+ })[0];
670
+ });
671
+ };
672
+ FsAclPermissionPopoverComponent.ctorParameters = function () { return [
673
+ { type: FsAppAclService }
674
+ ]; };
675
+ __decorate([
676
+ core.Input(),
677
+ __metadata("design:type", Object)
678
+ ], FsAclPermissionPopoverComponent.prototype, "permission", void 0);
679
+ FsAclPermissionPopoverComponent = __decorate([
680
+ core.Component({
681
+ selector: 'acl-permission-popover',
682
+ template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n {{permission.name}}\n <div class=\"small\">{{description}}</div>\n</ng-template>\n\n",
683
+ styles: [":host{cursor:pointer}"]
684
+ }),
685
+ __metadata("design:paramtypes", [FsAppAclService])
686
+ ], FsAclPermissionPopoverComponent);
687
+ return FsAclPermissionPopoverComponent;
684
688
  }());
685
689
 
686
- var FsAclRolePopoverComponent = /** @class */ (function () {
687
- function FsAclRolePopoverComponent(_appAclService) {
688
- this._appAclService = _appAclService;
689
- this.permissions = [];
690
- }
691
- FsAclRolePopoverComponent.prototype.ngOnInit = function () {
692
- var _this = this;
693
- var aclRolePermissions = this.aclRole.permissions || [];
694
- this._appAclService.getPermissions()
695
- .subscribe(function (response) {
696
- _this.permissions = response.filter(function (item) {
697
- return aclRolePermissions.some(function (permission) {
698
- return item.value === permission.value;
699
- });
700
- });
701
- });
702
- };
703
- FsAclRolePopoverComponent.ctorParameters = function () { return [
704
- { type: FsAppAclService }
705
- ]; };
706
- __decorate([
707
- core.Input(),
708
- __metadata("design:type", Object)
709
- ], FsAclRolePopoverComponent.prototype, "aclRole", void 0);
710
- __decorate([
711
- core.Input(),
712
- __metadata("design:type", Object)
713
- ], FsAclRolePopoverComponent.prototype, "objectName", void 0);
714
- FsAclRolePopoverComponent = __decorate([
715
- core.Component({
716
- selector: 'fs-acl-role-popover',
717
- template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n <div class=\"name small\">{{aclRole.name}}<span *ngIf=\"objectName\">: {{objectName}}</span></div>\n\n <ng-container *ngIf=\"permissions.length; else nonePermission\">\n <div *ngFor=\"let permission of permissions\" class=\"permission\">\n <div>{{permission.name}}</div>\n <div class=\"small\">{{permission.description}}</div>\n </div>\n </ng-container>\n\n <ng-template #nonePermission>\n None\n </ng-template>\n</ng-template>\n",
718
- styles: [".name{padding-bottom:10px}.permission+.permission{padding-top:5px}:host{cursor:pointer}"]
719
- }),
720
- __metadata("design:paramtypes", [FsAppAclService])
721
- ], FsAclRolePopoverComponent);
722
- return FsAclRolePopoverComponent;
690
+ var FsAclRolePopoverComponent = /** @class */ (function () {
691
+ function FsAclRolePopoverComponent(_appAclService) {
692
+ this._appAclService = _appAclService;
693
+ this.permissions = [];
694
+ }
695
+ FsAclRolePopoverComponent.prototype.ngOnInit = function () {
696
+ var _this = this;
697
+ var aclRolePermissions = this.aclRole.permissions || [];
698
+ this._appAclService.getPermissions()
699
+ .subscribe(function (response) {
700
+ _this.permissions = response.filter(function (item) {
701
+ return aclRolePermissions.some(function (permission) {
702
+ return item.value === permission.value;
703
+ });
704
+ });
705
+ });
706
+ };
707
+ FsAclRolePopoverComponent.ctorParameters = function () { return [
708
+ { type: FsAppAclService }
709
+ ]; };
710
+ __decorate([
711
+ core.Input(),
712
+ __metadata("design:type", Object)
713
+ ], FsAclRolePopoverComponent.prototype, "aclRole", void 0);
714
+ __decorate([
715
+ core.Input(),
716
+ __metadata("design:type", Object)
717
+ ], FsAclRolePopoverComponent.prototype, "objectName", void 0);
718
+ FsAclRolePopoverComponent = __decorate([
719
+ core.Component({
720
+ selector: 'fs-acl-role-popover',
721
+ template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n <div class=\"name small\">{{aclRole.name}}<span *ngIf=\"objectName\">: {{objectName}}</span></div>\n\n <ng-container *ngIf=\"permissions.length; else nonePermission\">\n <div *ngFor=\"let permission of permissions\" class=\"permission\">\n <div>{{permission.name}}</div>\n <div class=\"small\">{{permission.description}}</div>\n </div>\n </ng-container>\n\n <ng-template #nonePermission>\n None\n </ng-template>\n</ng-template>\n",
722
+ styles: [".name{padding-bottom:10px}.permission+.permission{padding-top:5px}:host{cursor:pointer}"]
723
+ }),
724
+ __metadata("design:paramtypes", [FsAppAclService])
725
+ ], FsAclRolePopoverComponent);
726
+ return FsAclRolePopoverComponent;
723
727
  }());
724
728
 
725
- var FsAclEntryComponent = /** @class */ (function () {
726
- function FsAclEntryComponent(_appAclService, _dialogRef, _message, _data) {
727
- var _this = this;
728
- var _a;
729
- this._appAclService = _appAclService;
730
- this._dialogRef = _dialogRef;
731
- this._message = _message;
732
- this._data = _data;
733
- this.aclRoles = [];
734
- this.indexedAclRoleLevels = {};
735
- this.titleEdit = 'Edit Roles';
736
- this.titleAdd = 'Assign Roles';
737
- this.required = true;
738
- this.save = function () {
739
- return _this._data.saveAclObjectEntry(_this._appAclService.output(_this.aclObjectEntry))
740
- .subscribe(function (data) {
741
- _this._message.success('Saved Changes');
742
- _this.close(data);
743
- });
744
- };
745
- this.aclObjectEntry = __assign({}, _data.aclObjectEntry);
746
- this.required = (_a = _data.required, (_a !== null && _a !== void 0 ? _a : true));
747
- if (_data.titleEdit) {
748
- this.titleEdit = _data.titleEdit;
749
- }
750
- if (_data.titleAdd) {
751
- this.titleAdd = _data.titleAdd;
752
- }
753
- }
754
- FsAclEntryComponent.prototype.ngOnInit = function () {
755
- var _this = this;
756
- rxjs.forkJoin(this._data.loadAclRoles({
757
- level: this.aclObjectEntry.level,
758
- environmentId: this.aclObjectEntry.environmentId,
759
- })
760
- .pipe(operators.map(function (data) { return _this._appAclService.input(data); })), this._appAclService.getIndexedLevels())
761
- .subscribe(function (_a) {
762
- var _b = __read(_a, 2), aclRoles = _b[0], levels = _b[1];
763
- _this.aclRoles = aclRoles;
764
- _this.indexedAclRoleLevels = levels;
765
- _this.aclObjectRole = {
766
- object: _this.aclObjectEntry.object,
767
- aclRoles: _this.aclObjectEntry.aclEntries
768
- .map(function (aclEntry) {
769
- return aclEntry.aclRole;
770
- })
771
- };
772
- });
773
- };
774
- FsAclEntryComponent.prototype.aclObjectRoleChange = function (aclObjectRoles) {
775
- this.aclObjectEntry.aclEntries = aclObjectRoles.reduce(function (aclEntries, aclObjectRole) {
776
- aclObjectRole.aclRoles.forEach(function (aclRole) {
777
- aclEntries.push({
778
- aclRoleId: aclRole.id,
779
- aclRole: aclRole,
780
- objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
781
- object: aclObjectRole.object || null
782
- });
783
- });
784
- return aclEntries;
785
- }, []);
786
- };
787
- FsAclEntryComponent.prototype.close = function (data) {
788
- if (data === void 0) { data = null; }
789
- this._dialogRef.close(data);
790
- };
791
- FsAclEntryComponent.ctorParameters = function () { return [
792
- { type: FsAppAclService },
793
- { type: dialog.MatDialogRef },
794
- { type: message.FsMessage },
795
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
796
- ]; };
797
- FsAclEntryComponent = __decorate([
798
- core.Component({
799
- template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>{{ titleEdit? titleEdit : titleAdd }}</div>\n <mat-dialog-content>\n <div *ngIf=\"aclObjectRole\">\n <fs-label-field *ngIf=\"aclObjectEntry.object\">\n <fs-label>{{indexedAclRoleLevels[aclObjectEntry.level]}}</fs-label>\n {{aclObjectEntry.object.name}}\n </fs-label-field>\n\n <fs-acl-object-roles\n [aclRoles]=\"aclRoles\"\n [aclObjectRoles]=\"[aclObjectRole]\"\n [required]=\"required\"\n (change)=\"aclObjectRoleChange($event)\">\n </fs-acl-object-roles>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">Save</button>\n <button mat-button mat-dialog-close type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n",
800
- styles: ["::ng-deep .account-roles-autocomplete-panel .mat-option{line-height:normal}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text{display:flex;flex-direction:row;align-items:center}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text fs-badge{margin-right:5px}"]
801
- }),
802
- __param(3, core.Inject(dialog.MAT_DIALOG_DATA)),
803
- __metadata("design:paramtypes", [FsAppAclService,
804
- dialog.MatDialogRef,
805
- message.FsMessage, Object])
806
- ], FsAclEntryComponent);
807
- return FsAclEntryComponent;
729
+ var FsAclEntryComponent = /** @class */ (function () {
730
+ function FsAclEntryComponent(_appAclService, _dialogRef, _message, _data) {
731
+ var _this = this;
732
+ var _a;
733
+ this._appAclService = _appAclService;
734
+ this._dialogRef = _dialogRef;
735
+ this._message = _message;
736
+ this._data = _data;
737
+ this.aclRoles = [];
738
+ this.indexedAclRoleLevels = {};
739
+ this.titleEdit = 'Edit Roles';
740
+ this.titleAdd = 'Assign Roles';
741
+ this.required = true;
742
+ this.save = function () {
743
+ return _this._data.saveAclObjectEntry(_this._appAclService.output(_this.aclObjectEntry))
744
+ .subscribe(function (data) {
745
+ _this._message.success('Saved Changes');
746
+ _this.close(data);
747
+ });
748
+ };
749
+ this.aclObjectEntry = __assign({}, _data.aclObjectEntry);
750
+ this.required = (_a = _data.required, (_a !== null && _a !== void 0 ? _a : true));
751
+ if (_data.titleEdit) {
752
+ this.titleEdit = _data.titleEdit;
753
+ }
754
+ if (_data.titleAdd) {
755
+ this.titleAdd = _data.titleAdd;
756
+ }
757
+ }
758
+ FsAclEntryComponent.prototype.ngOnInit = function () {
759
+ var _this = this;
760
+ rxjs.forkJoin(this._data.loadAclRoles({
761
+ level: this.aclObjectEntry.level,
762
+ environmentId: this.aclObjectEntry.environmentId,
763
+ })
764
+ .pipe(operators.map(function (data) { return _this._appAclService.input(data); })), this._appAclService.getIndexedLevels())
765
+ .subscribe(function (_a) {
766
+ var _b = __read(_a, 2), aclRoles = _b[0], levels = _b[1];
767
+ _this.aclRoles = aclRoles;
768
+ _this.indexedAclRoleLevels = levels;
769
+ _this.aclObjectRole = {
770
+ object: _this.aclObjectEntry.object,
771
+ aclRoles: _this.aclObjectEntry.aclEntries
772
+ .map(function (aclEntry) {
773
+ return aclEntry.aclRole;
774
+ })
775
+ };
776
+ });
777
+ };
778
+ FsAclEntryComponent.prototype.aclObjectRoleChange = function (aclObjectRoles) {
779
+ this.aclObjectEntry.aclEntries = aclObjectRoles.reduce(function (aclEntries, aclObjectRole) {
780
+ aclObjectRole.aclRoles.forEach(function (aclRole) {
781
+ aclEntries.push({
782
+ aclRoleId: aclRole.id,
783
+ aclRole: aclRole,
784
+ objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
785
+ object: aclObjectRole.object || null
786
+ });
787
+ });
788
+ return aclEntries;
789
+ }, []);
790
+ };
791
+ FsAclEntryComponent.prototype.close = function (data) {
792
+ if (data === void 0) { data = null; }
793
+ this._dialogRef.close(data);
794
+ };
795
+ FsAclEntryComponent.ctorParameters = function () { return [
796
+ { type: FsAppAclService },
797
+ { type: dialog.MatDialogRef },
798
+ { type: message.FsMessage },
799
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
800
+ ]; };
801
+ FsAclEntryComponent = __decorate([
802
+ core.Component({
803
+ template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>{{ titleEdit? titleEdit : titleAdd }}</div>\n <mat-dialog-content>\n <div *ngIf=\"aclObjectRole\">\n <fs-label-field *ngIf=\"aclObjectEntry.object\">\n <fs-label>{{indexedAclRoleLevels[aclObjectEntry.level]}}</fs-label>\n {{aclObjectEntry.object.name}}\n </fs-label-field>\n\n <fs-acl-object-roles\n [aclRoles]=\"aclRoles\"\n [aclObjectRoles]=\"[aclObjectRole]\"\n [required]=\"required\"\n (change)=\"aclObjectRoleChange($event)\">\n </fs-acl-object-roles>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">Save</button>\n <button mat-button mat-dialog-close type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n",
804
+ styles: ["::ng-deep .account-roles-autocomplete-panel .mat-option{line-height:normal}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text{display:flex;flex-direction:row;align-items:center}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text fs-badge{margin-right:5px}"]
805
+ }),
806
+ __param(3, core.Inject(dialog.MAT_DIALOG_DATA)),
807
+ __metadata("design:paramtypes", [FsAppAclService,
808
+ dialog.MatDialogRef,
809
+ message.FsMessage, Object])
810
+ ], FsAclEntryComponent);
811
+ return FsAclEntryComponent;
808
812
  }());
809
813
 
810
- var FsAclEntriesComponent = /** @class */ (function () {
811
- function FsAclEntriesComponent(_appAclService, _dialog, _confirm) {
812
- this._appAclService = _appAclService;
813
- this._dialog = _dialog;
814
- this._confirm = _confirm;
815
- this.environmentShow = true;
816
- this.environmentLabel = 'Environment';
817
- this.actions = [];
818
- this.aclEntriesList = null;
819
- this.aclEntriesConfig = null;
820
- this.permissions = [];
821
- this._destroy$ = new rxjs.Subject();
822
- }
823
- FsAclEntriesComponent.prototype.ngOnInit = function () {
824
- var _this = this;
825
- this._appAclService.getPermissions()
826
- .subscribe(function (response) {
827
- _this.permissions = response;
828
- });
829
- this.aclEntriesConfig = {
830
- status: false,
831
- paging: false,
832
- actions: this.actions,
833
- rowActions: [
834
- {
835
- label: 'Remove All Roles',
836
- click: function (aclObjectEntry) {
837
- _this._confirm
838
- .confirm({
839
- title: 'Remove All Roles',
840
- template: 'Are you sure you would like to remove all roles?',
841
- }).subscribe(function () {
842
- var data = _this._appAclService.output(__assign(__assign({}, aclObjectEntry), { aclEntries: [] }));
843
- _this.saveAclObjectEntry(data)
844
- .subscribe(function () {
845
- _this.aclEntriesList.reload();
846
- });
847
- });
848
- }
849
- }
850
- ],
851
- fetch: function () {
852
- return new rxjs.Observable(function (observer) {
853
- _this.loadAclEntries({
854
- aclRoles: true,
855
- aclRolePermissions: true,
856
- objects: true,
857
- aclRoleState: 'active',
858
- })
859
- .pipe(operators.map(function (response) { return _this._appAclService.input(response); }))
860
- .subscribe(function (aclEntries) {
861
- var objects = aclEntries.reduce(function (items, item) {
862
- if (item.object) {
863
- items[item.object.id] = item.object;
864
- }
865
- return items;
866
- }, {});
867
- var environments = aclEntries.reduce(function (items, item) {
868
- if (item.environment) {
869
- items[item.environment.id] = item.environment;
870
- }
871
- return items;
872
- }, {});
873
- var aclObjectEntry = [];
874
- var grouped = lodashEs.groupBy(aclEntries, function (item) {
875
- return [item.aclRole.level, item.environmentId, item.objectId];
876
- });
877
- lodashEs.forOwn(grouped, function (group, key) {
878
- key = key.split(',');
879
- aclObjectEntry.push({
880
- object: objects[key[2]],
881
- level: key[0],
882
- environmentId: key[1] ? parseInt(key[1]) : null,
883
- environment: environments[key[1]],
884
- aclEntries: group,
885
- });
886
- });
887
- var hasApp = aclObjectEntry.some(function (item) {
888
- return item.aclEntries.some(function (entry) {
889
- return !entry.objectId;
890
- });
891
- });
892
- if (!hasApp) {
893
- aclObjectEntry.unshift({
894
- object: null, aclEntries: [],
895
- level: 'app',
896
- environmentId: null,
897
- });
898
- }
899
- aclObjectEntry = lodashEs.sortBy(aclObjectEntry, function (item) {
900
- return item.object ? item.level : '';
901
- });
902
- observer.next({ data: aclObjectEntry });
903
- observer.complete();
904
- });
905
- });
906
- },
907
- };
908
- };
909
- FsAclEntriesComponent.prototype.update = function (aclObjectEntry) {
910
- var _this = this;
911
- var data = {
912
- aclObjectEntry: aclObjectEntry,
913
- required: false,
914
- loadAclRoles: this.loadAclRoles,
915
- saveAclObjectEntry: this.saveAclObjectEntry
916
- };
917
- this._dialog.open(FsAclEntryComponent, {
918
- data: data
919
- })
920
- .afterClosed()
921
- .pipe(operators.takeUntil(this._destroy$))
922
- .subscribe(function () {
923
- _this.aclEntriesList.reload();
924
- });
925
- };
926
- FsAclEntriesComponent.prototype.ngOnDestroy = function () {
927
- this._destroy$.next();
928
- this._destroy$.complete();
929
- };
930
- FsAclEntriesComponent.prototype.reload = function () {
931
- this.aclEntriesList.reload();
932
- };
933
- FsAclEntriesComponent.ctorParameters = function () { return [
934
- { type: FsAppAclService },
935
- { type: dialog.MatDialog },
936
- { type: prompt.FsPrompt }
937
- ]; };
938
- __decorate([
939
- core.Input(),
940
- __metadata("design:type", Function)
941
- ], FsAclEntriesComponent.prototype, "loadAclEntries", void 0);
942
- __decorate([
943
- core.Input(),
944
- __metadata("design:type", Function)
945
- ], FsAclEntriesComponent.prototype, "loadAclRoles", void 0);
946
- __decorate([
947
- core.Input(),
948
- __metadata("design:type", Function)
949
- ], FsAclEntriesComponent.prototype, "saveAclObjectEntry", void 0);
950
- __decorate([
951
- core.Input(),
952
- __metadata("design:type", Object)
953
- ], FsAclEntriesComponent.prototype, "environmentShow", void 0);
954
- __decorate([
955
- core.Input(),
956
- __metadata("design:type", Object)
957
- ], FsAclEntriesComponent.prototype, "environmentLabel", void 0);
958
- __decorate([
959
- core.Input(),
960
- __metadata("design:type", Array)
961
- ], FsAclEntriesComponent.prototype, "actions", void 0);
962
- __decorate([
963
- core.ViewChild(list.FsListComponent),
964
- __metadata("design:type", list.FsListComponent)
965
- ], FsAclEntriesComponent.prototype, "aclEntriesList", void 0);
966
- FsAclEntriesComponent = __decorate([
967
- core.Component({
968
- selector: 'fs-acl-entries',
969
- template: "\n<fs-list [config]=\"aclEntriesConfig\">\n <fs-list-column>\n <ng-template fs-list-header>Context</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div\n *ngIf=\"row.object; else elseObject\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\">\n <fs-badge *ngIf=\"row.object.imageUrl\" shape=\"circle\" image=\"{{ row.object.imageUrl }}\"></fs-badge>\n <span>\n <div><small>{{ row.object.className }}</small></div>\n <a (click)=\"update(row)\">{{ row.object.name }}</a>\n </span>\n </div>\n\n <ng-template #elseObject>\n <a (click)=\"update(row)\">App</a>\n </ng-template>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column [show]=\"environmentShow\">\n <ng-template fs-list-header>{{environmentLabel}}</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.environment?.name}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Roles</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div fxLayout=\"column\" fxLayoutGap=\"10px\">\n <div div *ngFor=\"let aclEntry of row.aclEntries\">\n <ng-container [ngSwitch]=\"row.level\">\n <ng-container *ngSwitchCase=\"'app'\">\n <fs-acl-role-popover [aclRole]=\"aclEntry.aclRole\" objectName=\"App\">{{aclEntry.aclRole.name}}</fs-acl-role-popover>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"row.object\">\n <fs-acl-role-popover [aclRole]=\"aclEntry.aclRole\">{{aclEntry.aclRole.name}}</fs-acl-role-popover>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n",
970
- styles: [""]
971
- }),
972
- __metadata("design:paramtypes", [FsAppAclService,
973
- dialog.MatDialog,
974
- prompt.FsPrompt])
975
- ], FsAclEntriesComponent);
976
- return FsAclEntriesComponent;
814
+ var FsAclEntriesComponent = /** @class */ (function () {
815
+ function FsAclEntriesComponent(_appAclService, _dialog, _confirm) {
816
+ this._appAclService = _appAclService;
817
+ this._dialog = _dialog;
818
+ this._confirm = _confirm;
819
+ this.environmentShow = true;
820
+ this.environmentLabel = 'Environment';
821
+ this.actions = [];
822
+ this.aclEntriesList = null;
823
+ this.aclEntriesConfig = null;
824
+ this.permissions = [];
825
+ this._destroy$ = new rxjs.Subject();
826
+ }
827
+ FsAclEntriesComponent.prototype.ngOnInit = function () {
828
+ var _this = this;
829
+ this._appAclService.getPermissions()
830
+ .subscribe(function (response) {
831
+ _this.permissions = response;
832
+ });
833
+ this.aclEntriesConfig = {
834
+ status: false,
835
+ paging: false,
836
+ actions: this.actions,
837
+ rowActions: [
838
+ {
839
+ label: 'Remove All Roles',
840
+ click: function (aclObjectEntry) {
841
+ _this._confirm
842
+ .confirm({
843
+ title: 'Remove All Roles',
844
+ template: 'Are you sure you would like to remove all roles?',
845
+ }).subscribe(function () {
846
+ var data = _this._appAclService.output(__assign(__assign({}, aclObjectEntry), { aclEntries: [] }));
847
+ _this.saveAclObjectEntry(data)
848
+ .subscribe(function () {
849
+ _this.aclEntriesList.reload();
850
+ });
851
+ });
852
+ }
853
+ }
854
+ ],
855
+ fetch: function () {
856
+ return new rxjs.Observable(function (observer) {
857
+ _this.loadAclEntries({
858
+ aclRoles: true,
859
+ aclRolePermissions: true,
860
+ objects: true,
861
+ aclRoleState: 'active',
862
+ })
863
+ .pipe(operators.map(function (response) { return _this._appAclService.input(response); }))
864
+ .subscribe(function (aclEntries) {
865
+ var objects = aclEntries.reduce(function (items, item) {
866
+ if (item.object) {
867
+ items[item.object.id] = item.object;
868
+ }
869
+ return items;
870
+ }, {});
871
+ var environments = aclEntries.reduce(function (items, item) {
872
+ if (item.environment) {
873
+ items[item.environment.id] = item.environment;
874
+ }
875
+ return items;
876
+ }, {});
877
+ var aclObjectEntry = [];
878
+ var grouped = lodashEs.groupBy(aclEntries, function (item) {
879
+ return [item.aclRole.level, item.environmentId, item.objectId];
880
+ });
881
+ lodashEs.forOwn(grouped, function (group, key) {
882
+ key = key.split(',');
883
+ aclObjectEntry.push({
884
+ object: objects[key[2]],
885
+ level: key[0],
886
+ environmentId: key[1] ? parseInt(key[1]) : null,
887
+ environment: environments[key[1]],
888
+ aclEntries: group,
889
+ });
890
+ });
891
+ var hasApp = aclObjectEntry.some(function (item) {
892
+ return item.aclEntries.some(function (entry) {
893
+ return !entry.objectId;
894
+ });
895
+ });
896
+ if (!hasApp) {
897
+ aclObjectEntry.unshift({
898
+ object: null, aclEntries: [],
899
+ level: 'app',
900
+ environmentId: null,
901
+ });
902
+ }
903
+ aclObjectEntry = lodashEs.sortBy(aclObjectEntry, function (item) {
904
+ return item.object ? item.level : '';
905
+ });
906
+ observer.next({ data: aclObjectEntry });
907
+ observer.complete();
908
+ });
909
+ });
910
+ },
911
+ };
912
+ };
913
+ FsAclEntriesComponent.prototype.update = function (aclObjectEntry) {
914
+ var _this = this;
915
+ var data = {
916
+ aclObjectEntry: aclObjectEntry,
917
+ required: false,
918
+ loadAclRoles: this.loadAclRoles,
919
+ saveAclObjectEntry: this.saveAclObjectEntry
920
+ };
921
+ this._dialog.open(FsAclEntryComponent, {
922
+ data: data
923
+ })
924
+ .afterClosed()
925
+ .pipe(operators.takeUntil(this._destroy$))
926
+ .subscribe(function () {
927
+ _this.aclEntriesList.reload();
928
+ });
929
+ };
930
+ FsAclEntriesComponent.prototype.ngOnDestroy = function () {
931
+ this._destroy$.next();
932
+ this._destroy$.complete();
933
+ };
934
+ FsAclEntriesComponent.prototype.reload = function () {
935
+ this.aclEntriesList.reload();
936
+ };
937
+ FsAclEntriesComponent.ctorParameters = function () { return [
938
+ { type: FsAppAclService },
939
+ { type: dialog.MatDialog },
940
+ { type: prompt.FsPrompt }
941
+ ]; };
942
+ __decorate([
943
+ core.Input(),
944
+ __metadata("design:type", Function)
945
+ ], FsAclEntriesComponent.prototype, "loadAclEntries", void 0);
946
+ __decorate([
947
+ core.Input(),
948
+ __metadata("design:type", Function)
949
+ ], FsAclEntriesComponent.prototype, "loadAclRoles", void 0);
950
+ __decorate([
951
+ core.Input(),
952
+ __metadata("design:type", Function)
953
+ ], FsAclEntriesComponent.prototype, "saveAclObjectEntry", void 0);
954
+ __decorate([
955
+ core.Input(),
956
+ __metadata("design:type", Object)
957
+ ], FsAclEntriesComponent.prototype, "environmentShow", void 0);
958
+ __decorate([
959
+ core.Input(),
960
+ __metadata("design:type", Object)
961
+ ], FsAclEntriesComponent.prototype, "environmentLabel", void 0);
962
+ __decorate([
963
+ core.Input(),
964
+ __metadata("design:type", Array)
965
+ ], FsAclEntriesComponent.prototype, "actions", void 0);
966
+ __decorate([
967
+ core.ViewChild(list.FsListComponent),
968
+ __metadata("design:type", list.FsListComponent)
969
+ ], FsAclEntriesComponent.prototype, "aclEntriesList", void 0);
970
+ FsAclEntriesComponent = __decorate([
971
+ core.Component({
972
+ selector: 'fs-acl-entries',
973
+ template: "\n<fs-list [config]=\"aclEntriesConfig\">\n <fs-list-column>\n <ng-template fs-list-header>Context</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div\n *ngIf=\"row.object; else elseObject\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\">\n <fs-badge *ngIf=\"row.object.imageUrl\" shape=\"circle\" image=\"{{ row.object.imageUrl }}\"></fs-badge>\n <span>\n <div><small>{{ row.object.className }}</small></div>\n <a (click)=\"update(row)\">{{ row.object.name }}</a>\n </span>\n </div>\n\n <ng-template #elseObject>\n <a (click)=\"update(row)\">App</a>\n </ng-template>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column [show]=\"environmentShow\">\n <ng-template fs-list-header>{{environmentLabel}}</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.environment?.name}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Roles</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div fxLayout=\"column\" fxLayoutGap=\"10px\">\n <div div *ngFor=\"let aclEntry of row.aclEntries\">\n <ng-container [ngSwitch]=\"row.level\">\n <ng-container *ngSwitchCase=\"'app'\">\n <fs-acl-role-popover [aclRole]=\"aclEntry.aclRole\" objectName=\"App\">{{aclEntry.aclRole.name}}</fs-acl-role-popover>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"row.object\">\n <fs-acl-role-popover [aclRole]=\"aclEntry.aclRole\">{{aclEntry.aclRole.name}}</fs-acl-role-popover>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n",
974
+ styles: [""]
975
+ }),
976
+ __metadata("design:paramtypes", [FsAppAclService,
977
+ dialog.MatDialog,
978
+ prompt.FsPrompt])
979
+ ], FsAclEntriesComponent);
980
+ return FsAclEntriesComponent;
977
981
  }());
978
982
 
979
- var FsAclObjectRolesComponent = /** @class */ (function () {
980
- function FsAclObjectRolesComponent() {
981
- this.aclRoles = [];
982
- this.required = false;
983
- this.multiple = false;
984
- this.disabled = false;
985
- this.aclObjectRoles = [];
986
- this.rolesLabel = 'Roles';
987
- this.levelLabel = '';
988
- this.change = new core.EventEmitter();
989
- this.compareAclRole = function (o1, o2) {
990
- return o1 && o2 && o1.id === o2.id;
991
- };
992
- }
993
- FsAclObjectRolesComponent.prototype.changed = function () {
994
- this.change.emit(this.aclObjectRoles);
995
- };
996
- __decorate([
997
- core.Input(),
998
- __metadata("design:type", Array)
999
- ], FsAclObjectRolesComponent.prototype, "aclRoles", void 0);
1000
- __decorate([
1001
- core.Input(),
1002
- __metadata("design:type", Object)
1003
- ], FsAclObjectRolesComponent.prototype, "required", void 0);
1004
- __decorate([
1005
- core.Input(),
1006
- __metadata("design:type", Object)
1007
- ], FsAclObjectRolesComponent.prototype, "multiple", void 0);
1008
- __decorate([
1009
- core.Input(),
1010
- __metadata("design:type", Object)
1011
- ], FsAclObjectRolesComponent.prototype, "disabled", void 0);
1012
- __decorate([
1013
- core.Input(),
1014
- __metadata("design:type", Array)
1015
- ], FsAclObjectRolesComponent.prototype, "aclObjectRoles", void 0);
1016
- __decorate([
1017
- core.Input(),
1018
- __metadata("design:type", Object)
1019
- ], FsAclObjectRolesComponent.prototype, "rolesLabel", void 0);
1020
- __decorate([
1021
- core.Input(),
1022
- __metadata("design:type", Object)
1023
- ], FsAclObjectRolesComponent.prototype, "levelLabel", void 0);
1024
- __decorate([
1025
- core.Output(),
1026
- __metadata("design:type", Object)
1027
- ], FsAclObjectRolesComponent.prototype, "change", void 0);
1028
- FsAclObjectRolesComponent = __decorate([
1029
- core.Component({
1030
- selector: 'fs-acl-object-roles',
1031
- template: "<ng-container *ngIf=\"!multiple\">\n <ng-container *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <fs-checkbox-group\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n (ngModelChange)=\"changed()\"\n name=\"roles\"\n [compareWith]=\"compareAclRole\"\n [disabled]=\"disabled\"\n [label]=\"rolesLabel\"\n [fsFormRequired]=\"required\"\n orientation=\"vertical\">\n <mat-checkbox [disabled]=\"disabled\" *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-checkbox>\n </fs-checkbox-group>\n </ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"multiple\">\n <table>\n <tr>\n <td>\n <small>{{levelLabel}}</small>\n </td>\n <td>\n <small>{{rolesLabel}}</small>\n </td>\n </tr>\n <tr *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <td>{{aclObjectRole.object.name}}</td>\n <td>\n <mat-form-field class=\"form-field-padless\">\n <mat-select\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n multiple=\"true\"\n [disabled]=\"disabled\"\n [compareWith]=\"compareAclRole\"\n (ngModelChange)=\"changed()\"\n name=\"aclRole_{{ aclObjectRole.object.id }}\">\n <mat-option *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </td>\n </tr>\n </table>\n</ng-container>\n",
1032
- viewProviders: [{ provide: forms.ControlContainer, useExisting: forms.NgForm }],
1033
- styles: ["table tr td:first-child{padding-right:15px}"]
1034
- })
1035
- ], FsAclObjectRolesComponent);
1036
- return FsAclObjectRolesComponent;
983
+ var FsAclObjectRolesComponent = /** @class */ (function () {
984
+ function FsAclObjectRolesComponent() {
985
+ this.aclRoles = [];
986
+ this.required = false;
987
+ this.multiple = false;
988
+ this.disabled = false;
989
+ this.aclObjectRoles = [];
990
+ this.rolesLabel = 'Roles';
991
+ this.levelLabel = '';
992
+ this.change = new core.EventEmitter();
993
+ this.compareAclRole = function (o1, o2) {
994
+ return o1 && o2 && o1.id === o2.id;
995
+ };
996
+ }
997
+ FsAclObjectRolesComponent.prototype.changed = function () {
998
+ this.change.emit(this.aclObjectRoles);
999
+ };
1000
+ __decorate([
1001
+ core.Input(),
1002
+ __metadata("design:type", Array)
1003
+ ], FsAclObjectRolesComponent.prototype, "aclRoles", void 0);
1004
+ __decorate([
1005
+ core.Input(),
1006
+ __metadata("design:type", Object)
1007
+ ], FsAclObjectRolesComponent.prototype, "required", void 0);
1008
+ __decorate([
1009
+ core.Input(),
1010
+ __metadata("design:type", Object)
1011
+ ], FsAclObjectRolesComponent.prototype, "multiple", void 0);
1012
+ __decorate([
1013
+ core.Input(),
1014
+ __metadata("design:type", Object)
1015
+ ], FsAclObjectRolesComponent.prototype, "disabled", void 0);
1016
+ __decorate([
1017
+ core.Input(),
1018
+ __metadata("design:type", Array)
1019
+ ], FsAclObjectRolesComponent.prototype, "aclObjectRoles", void 0);
1020
+ __decorate([
1021
+ core.Input(),
1022
+ __metadata("design:type", Object)
1023
+ ], FsAclObjectRolesComponent.prototype, "rolesLabel", void 0);
1024
+ __decorate([
1025
+ core.Input(),
1026
+ __metadata("design:type", Object)
1027
+ ], FsAclObjectRolesComponent.prototype, "levelLabel", void 0);
1028
+ __decorate([
1029
+ core.Output(),
1030
+ __metadata("design:type", Object)
1031
+ ], FsAclObjectRolesComponent.prototype, "change", void 0);
1032
+ FsAclObjectRolesComponent = __decorate([
1033
+ core.Component({
1034
+ selector: 'fs-acl-object-roles',
1035
+ template: "<ng-container *ngIf=\"!multiple\">\n <ng-container *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <fs-checkbox-group\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n (ngModelChange)=\"changed()\"\n name=\"roles\"\n [compareWith]=\"compareAclRole\"\n [disabled]=\"disabled\"\n [label]=\"rolesLabel\"\n [fsFormRequired]=\"required\"\n orientation=\"vertical\">\n <mat-checkbox [disabled]=\"disabled\" *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-checkbox>\n </fs-checkbox-group>\n </ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"multiple\">\n <table>\n <tr>\n <td>\n <small>{{levelLabel}}</small>\n </td>\n <td>\n <small>{{rolesLabel}}</small>\n </td>\n </tr>\n <tr *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <td>{{aclObjectRole.object.name}}</td>\n <td>\n <mat-form-field class=\"form-field-padless\">\n <mat-select\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n multiple=\"true\"\n [disabled]=\"disabled\"\n [compareWith]=\"compareAclRole\"\n (ngModelChange)=\"changed()\"\n name=\"aclRole_{{ aclObjectRole.object.id }}\">\n <mat-option *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </td>\n </tr>\n </table>\n</ng-container>\n",
1036
+ viewProviders: [{ provide: forms.ControlContainer, useExisting: forms.NgForm }],
1037
+ styles: ["table tr td:first-child{padding-right:15px}"]
1038
+ })
1039
+ ], FsAclObjectRolesComponent);
1040
+ return FsAclObjectRolesComponent;
1037
1041
  }());
1038
1042
 
1039
- var FsAppAclModule = /** @class */ (function () {
1040
- function FsAppAclModule() {
1041
- }
1042
- FsAppAclModule_1 = FsAppAclModule;
1043
- FsAppAclModule.forRoot = function () {
1044
- return {
1045
- ngModule: FsAppAclModule_1,
1046
- };
1047
- };
1048
- var FsAppAclModule_1;
1049
- FsAppAclModule = FsAppAclModule_1 = __decorate([
1050
- core.NgModule({
1051
- imports: [
1052
- common.CommonModule,
1053
- forms.FormsModule,
1054
- dialog.MatDialogModule,
1055
- formField.MatFormFieldModule,
1056
- checkbox.MatCheckboxModule,
1057
- select.MatSelectModule,
1058
- button.MatButtonModule,
1059
- radio.MatRadioModule,
1060
- input.MatInputModule,
1061
- flexLayout.FlexLayoutModule,
1062
- list.FsListModule,
1063
- popover.FsPopoverModule,
1064
- dialog$1.FsDialogModule,
1065
- form.FsFormModule,
1066
- label.FsLabelModule,
1067
- radiogroup.FsRadioGroupModule,
1068
- badge.FsBadgeModule,
1069
- checkboxgroup.FsCheckboxGroupModule,
1070
- ],
1071
- declarations: [
1072
- FsAclRolesComponent,
1073
- FsAclPermissionPopoverComponent,
1074
- FsAclRoleComponent,
1075
- FsAclEntriesComponent,
1076
- FsAclRolePopoverComponent,
1077
- FsAclObjectRolesComponent,
1078
- FsAclEntryComponent,
1079
- ],
1080
- exports: [
1081
- FsAclRolesComponent,
1082
- FsAclPermissionPopoverComponent,
1083
- FsAclRoleComponent,
1084
- FsAclEntriesComponent,
1085
- FsAclRolePopoverComponent,
1086
- FsAclObjectRolesComponent,
1087
- FsAclEntryComponent,
1088
- ],
1089
- entryComponents: [
1090
- FsAclRoleComponent
1091
- ]
1092
- })
1093
- ], FsAppAclModule);
1094
- return FsAppAclModule;
1043
+ var FsAppAclModule = /** @class */ (function () {
1044
+ function FsAppAclModule() {
1045
+ }
1046
+ FsAppAclModule_1 = FsAppAclModule;
1047
+ FsAppAclModule.forRoot = function () {
1048
+ return {
1049
+ ngModule: FsAppAclModule_1,
1050
+ };
1051
+ };
1052
+ var FsAppAclModule_1;
1053
+ FsAppAclModule = FsAppAclModule_1 = __decorate([
1054
+ core.NgModule({
1055
+ imports: [
1056
+ common.CommonModule,
1057
+ forms.FormsModule,
1058
+ dialog.MatDialogModule,
1059
+ formField.MatFormFieldModule,
1060
+ checkbox.MatCheckboxModule,
1061
+ select.MatSelectModule,
1062
+ button.MatButtonModule,
1063
+ radio.MatRadioModule,
1064
+ input.MatInputModule,
1065
+ flexLayout.FlexLayoutModule,
1066
+ list.FsListModule,
1067
+ popover.FsPopoverModule,
1068
+ dialog$1.FsDialogModule,
1069
+ form.FsFormModule,
1070
+ label.FsLabelModule,
1071
+ radiogroup.FsRadioGroupModule,
1072
+ badge.FsBadgeModule,
1073
+ checkboxgroup.FsCheckboxGroupModule,
1074
+ ],
1075
+ declarations: [
1076
+ FsAclRolesComponent,
1077
+ FsAclPermissionPopoverComponent,
1078
+ FsAclRoleComponent,
1079
+ FsAclEntriesComponent,
1080
+ FsAclRolePopoverComponent,
1081
+ FsAclObjectRolesComponent,
1082
+ FsAclEntryComponent,
1083
+ ],
1084
+ exports: [
1085
+ FsAclRolesComponent,
1086
+ FsAclPermissionPopoverComponent,
1087
+ FsAclRoleComponent,
1088
+ FsAclEntriesComponent,
1089
+ FsAclRolePopoverComponent,
1090
+ FsAclObjectRolesComponent,
1091
+ FsAclEntryComponent,
1092
+ ],
1093
+ entryComponents: [
1094
+ FsAclRoleComponent
1095
+ ]
1096
+ })
1097
+ ], FsAppAclModule);
1098
+ return FsAppAclModule;
1095
1099
  }());
1096
1100
 
1097
1101
  exports.FS_APP_ACL_CONFIG = FS_APP_ACL_CONFIG;