@firestitch/app-acl 9.0.17 → 12.0.0

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 (100) hide show
  1. package/app/components/acl-entries/acl-entries.component.d.ts +32 -27
  2. package/app/components/acl-entry/acl-entry.component.d.ts +29 -23
  3. package/app/components/acl-object-roles/acl-object-roles.component.d.ts +18 -14
  4. package/app/components/acl-permission-popover/acl-permission-popover.component.d.ts +12 -9
  5. package/app/components/acl-role/acl-role.component.d.ts +46 -42
  6. package/app/components/acl-role-popover/acl-role-popover.component.d.ts +13 -10
  7. package/app/components/acl-roles/acl-roles.component.d.ts +35 -31
  8. package/app/consts/acl-role-accesses.d.ts +5 -5
  9. package/app/enums/acl-role-access.d.ts +6 -6
  10. package/app/fs-app-acl.module.d.ts +31 -4
  11. package/app/injectors/app-acl-config.injector.d.ts +2 -2
  12. package/app/interfaces/acl-entry-data.d.ts +11 -11
  13. package/app/interfaces/acl-entry.d.ts +18 -18
  14. package/app/interfaces/acl-level.d.ts +3 -3
  15. package/app/interfaces/acl-object-entry.d.ts +11 -11
  16. package/app/interfaces/acl-object-role.d.ts +6 -6
  17. package/app/interfaces/acl-object.d.ts +4 -4
  18. package/app/interfaces/acl-permission.d.ts +7 -7
  19. package/app/interfaces/acl-role.d.ts +15 -15
  20. package/app/interfaces/app-acl-config.d.ts +7 -7
  21. package/app/interfaces/name-value.d.ts +4 -4
  22. package/app/services/app-acl.service.d.ts +18 -13
  23. package/bundles/firestitch-app-acl.umd.js +1210 -1080
  24. package/bundles/firestitch-app-acl.umd.js.map +1 -1
  25. package/esm2015/app/components/acl-entries/acl-entries.component.js +166 -177
  26. package/esm2015/app/components/acl-entry/acl-entry.component.js +93 -88
  27. package/esm2015/app/components/acl-object-roles/acl-object-roles.component.js +57 -63
  28. package/esm2015/app/components/acl-permission-popover/acl-permission-popover.component.js +33 -35
  29. package/esm2015/app/components/acl-role/acl-role.component.js +202 -191
  30. package/esm2015/app/components/acl-role-popover/acl-role-popover.component.js +38 -41
  31. package/esm2015/app/components/acl-roles/acl-roles.component.js +146 -158
  32. package/esm2015/app/consts/acl-role-accesses.js +8 -8
  33. package/esm2015/app/enums/acl-role-access.js +8 -8
  34. package/esm2015/app/fs-app-acl.module.js +124 -82
  35. package/esm2015/app/injectors/app-acl-config.injector.js +3 -3
  36. package/esm2015/app/interfaces/acl-entry-data.js +2 -1
  37. package/esm2015/app/interfaces/acl-entry.js +2 -1
  38. package/esm2015/app/interfaces/acl-level.js +2 -1
  39. package/esm2015/app/interfaces/acl-object-entry.js +2 -1
  40. package/esm2015/app/interfaces/acl-object-role.js +2 -1
  41. package/esm2015/app/interfaces/acl-object.js +2 -1
  42. package/esm2015/app/interfaces/acl-permission.js +2 -1
  43. package/esm2015/app/interfaces/acl-role.js +2 -1
  44. package/esm2015/app/interfaces/app-acl-config.js +2 -1
  45. package/esm2015/app/interfaces/name-value.js +2 -1
  46. package/esm2015/app/services/app-acl.service.js +78 -81
  47. package/esm2015/firestitch-app-acl.js +5 -11
  48. package/esm2015/public_api.js +11 -6
  49. package/fesm2015/firestitch-app-acl.js +831 -840
  50. package/fesm2015/firestitch-app-acl.js.map +1 -1
  51. package/firestitch-app-acl.d.ts +5 -11
  52. package/package.json +5 -9
  53. package/public_api.d.ts +20 -6
  54. package/app/components/acl-entry/index.d.ts +0 -1
  55. package/app/components/acl-permission-popover/index.d.ts +0 -1
  56. package/app/enums/index.d.ts +0 -1
  57. package/app/injectors/index.d.ts +0 -1
  58. package/app/interfaces/index.d.ts +0 -11
  59. package/app/services/index.d.ts +0 -1
  60. package/bundles/firestitch-app-acl.umd.min.js +0 -16
  61. package/bundles/firestitch-app-acl.umd.min.js.map +0 -1
  62. package/esm2015/app/components/acl-entry/index.js +0 -2
  63. package/esm2015/app/components/acl-permission-popover/index.js +0 -2
  64. package/esm2015/app/enums/index.js +0 -4
  65. package/esm2015/app/injectors/index.js +0 -4
  66. package/esm2015/app/interfaces/index.js +0 -2
  67. package/esm2015/app/services/index.js +0 -2
  68. package/esm5/app/components/acl-entries/acl-entries.component.js +0 -180
  69. package/esm5/app/components/acl-entry/acl-entry.component.js +0 -93
  70. package/esm5/app/components/acl-entry/index.js +0 -2
  71. package/esm5/app/components/acl-object-roles/acl-object-roles.component.js +0 -64
  72. package/esm5/app/components/acl-permission-popover/acl-permission-popover.component.js +0 -37
  73. package/esm5/app/components/acl-permission-popover/index.js +0 -2
  74. package/esm5/app/components/acl-role/acl-role.component.js +0 -201
  75. package/esm5/app/components/acl-role-popover/acl-role-popover.component.js +0 -43
  76. package/esm5/app/components/acl-roles/acl-roles.component.js +0 -163
  77. package/esm5/app/consts/acl-role-accesses.js +0 -8
  78. package/esm5/app/enums/acl-role-access.js +0 -8
  79. package/esm5/app/enums/index.js +0 -4
  80. package/esm5/app/fs-app-acl.module.js +0 -86
  81. package/esm5/app/injectors/app-acl-config.injector.js +0 -3
  82. package/esm5/app/injectors/index.js +0 -4
  83. package/esm5/app/interfaces/acl-entry-data.js +0 -1
  84. package/esm5/app/interfaces/acl-entry.js +0 -1
  85. package/esm5/app/interfaces/acl-level.js +0 -1
  86. package/esm5/app/interfaces/acl-object-entry.js +0 -1
  87. package/esm5/app/interfaces/acl-object-role.js +0 -1
  88. package/esm5/app/interfaces/acl-object.js +0 -1
  89. package/esm5/app/interfaces/acl-permission.js +0 -1
  90. package/esm5/app/interfaces/acl-role.js +0 -1
  91. package/esm5/app/interfaces/app-acl-config.js +0 -1
  92. package/esm5/app/interfaces/index.js +0 -2
  93. package/esm5/app/interfaces/name-value.js +0 -1
  94. package/esm5/app/services/app-acl.service.js +0 -86
  95. package/esm5/app/services/index.js +0 -2
  96. package/esm5/firestitch-app-acl.js +0 -11
  97. package/esm5/public_api.js +0 -6
  98. package/fesm5/firestitch-app-acl.js +0 -919
  99. package/fesm5/firestitch-app-acl.js.map +0 -1
  100. package/firestitch-app-acl.metadata.json +0 -1
@@ -1,1116 +1,1246 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/flex-layout'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@angular/material/dialog'), require('@angular/core'), require('@angular/common'), require('@firestitch/list'), require('@firestitch/popover'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/label'), require('@firestitch/radiogroup'), require('@firestitch/badge'), require('@firestitch/checkboxgroup'), require('rxjs/operators'), require('@firestitch/filter'), require('@firestitch/common'), require('rxjs'), require('@firestitch/message'), require('lodash-es'), require('snakecase-keys'), require('camelcase-keys'), require('@firestitch/prompt'), require('@angular/forms'), require('@angular/material/form-field')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/app-acl', ['exports', '@angular/flex-layout', '@angular/material/input', '@angular/material/radio', '@angular/material/button', '@angular/material/select', '@angular/material/checkbox', '@angular/material/dialog', '@angular/core', '@angular/common', '@firestitch/list', '@firestitch/popover', '@firestitch/dialog', '@firestitch/form', '@firestitch/label', '@firestitch/radiogroup', '@firestitch/badge', '@firestitch/checkboxgroup', 'rxjs/operators', '@firestitch/filter', '@firestitch/common', 'rxjs', '@firestitch/message', 'lodash-es', 'snakecase-keys', 'camelcase-keys', '@firestitch/prompt', '@angular/forms', '@angular/material/form-field'], factory) :
4
- (global = global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch['app-acl'] = {}), global.ng.flexLayout, global.ng.material.input, global.ng.material.radio, global.ng.material.button, global.ng.material.select, global.ng.material.checkbox, global.ng.material.dialog, global.ng.core, global.ng.common, global.list, global.popover, global.dialog$1, global.form, global.label, global.radiogroup, global.badge, global.checkboxgroup, global.rxjs.operators, global.filter, global.common$1, global.rxjs, global.message, global.lodashEs, global._snakecaseKeys, global._camelcaseKeys, global.prompt, global.ng.forms, global.ng.material.formField));
5
- }(this, (function (exports, flexLayout, input, radio, button, select, checkbox, dialog, core, common, list, popover, dialog$1, form, label, radiogroup, badge, checkboxgroup, operators, filter, common$1, rxjs, message, lodashEs, _snakecaseKeys, _camelcaseKeys, prompt, forms, formField) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/flex-layout'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@angular/material/dialog'), require('@angular/core'), require('@angular/common'), require('@firestitch/list'), require('@firestitch/popover'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/label'), require('@firestitch/radiogroup'), require('@firestitch/badge'), require('@firestitch/checkboxgroup'), require('rxjs/operators'), require('@firestitch/filter'), require('@firestitch/common'), require('rxjs'), require('lodash-es'), require('snakecase-keys'), require('camelcase-keys'), require('@firestitch/message'), require('@angular/material/form-field'), require('@angular/material/core'), require('@angular/forms'), require('@angular/flex-layout/flex'), require('@firestitch/prompt')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/app-acl', ['exports', '@angular/flex-layout', '@angular/material/input', '@angular/material/radio', '@angular/material/button', '@angular/material/select', '@angular/material/checkbox', '@angular/material/dialog', '@angular/core', '@angular/common', '@firestitch/list', '@firestitch/popover', '@firestitch/dialog', '@firestitch/form', '@firestitch/label', '@firestitch/radiogroup', '@firestitch/badge', '@firestitch/checkboxgroup', 'rxjs/operators', '@firestitch/filter', '@firestitch/common', 'rxjs', 'lodash-es', 'snakecase-keys', 'camelcase-keys', '@firestitch/message', '@angular/material/form-field', '@angular/material/core', '@angular/forms', '@angular/flex-layout/flex', '@firestitch/prompt'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["app-acl"] = {}), global.ng.flexLayout, global.ng.material.input, global.ng.material.radio, global.ng.material.button, global.ng.material.select, global.ng.material.checkbox, global.ng.material.dialog, global.ng.core, global.ng.common, global.i12, global.i2$1, global.i4, global.i15, global.i6, global.i7, global.i5$1, global.i1, global.rxjs.operators, global.filter, global.common, global.rxjs, global.lodashEs, global._snakecaseKeys, global._camelcaseKeys, global.i3, global.ng.material.formField, global.ng.material.core, global.ng.forms, global.ng.flexLayout.flex, global.i3$1));
5
+ })(this, (function (exports, flexLayout, i18, i8, i13, i10, i9, i2, i0, i7$1, i12, i2$1, i4, i15, i6, i7, i5$1, i1, operators, filter, common, rxjs, lodashEs, _snakecaseKeys, _camelcaseKeys, i3, i5, i11, i14, i17, i3$1) { 'use strict';
6
6
 
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation. All rights reserved.
9
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
10
- this file except in compliance with the License. You may obtain a copy of the
11
- License at http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16
- MERCHANTABLITY OR NON-INFRINGEMENT.
17
-
18
- See the Apache Version 2.0 License for specific language governing permissions
19
- and limitations under the License.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
-
23
- var extendStatics = function(d, b) {
24
- extendStatics = Object.setPrototypeOf ||
25
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
- return extendStatics(d, b);
28
- };
29
-
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- var __assign = function() {
37
- __assign = Object.assign || function __assign(t) {
38
- for (var s, i = 1, n = arguments.length; i < n; i++) {
39
- s = arguments[i];
40
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
- }
42
- return t;
43
- };
44
- return __assign.apply(this, arguments);
45
- };
46
-
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- }
58
-
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
- return c > 3 && r && Object.defineProperty(target, key, r), r;
64
- }
65
-
66
- function __param(paramIndex, decorator) {
67
- return function (target, key) { decorator(target, key, paramIndex); }
68
- }
69
-
70
- function __metadata(metadataKey, metadataValue) {
71
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
- }
73
-
74
- function __awaiter(thisArg, _arguments, P, generator) {
75
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
- return new (P || (P = Promise))(function (resolve, reject) {
77
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
- step((generator = generator.apply(thisArg, _arguments || [])).next());
81
- });
82
- }
83
-
84
- function __generator(thisArg, body) {
85
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
- function verb(n) { return function (v) { return step([n, v]); }; }
88
- function step(op) {
89
- if (f) throw new TypeError("Generator is already executing.");
90
- while (_) try {
91
- 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) return t;
92
- if (y = 0, t) op = [op[0] & 2, t.value];
93
- switch (op[0]) {
94
- case 0: case 1: t = op; break;
95
- case 4: _.label++; return { value: op[1], done: false };
96
- case 5: _.label++; y = op[1]; op = [0]; continue;
97
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
- default:
99
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
- if (t[2]) _.ops.pop();
104
- _.trys.pop(); continue;
105
- }
106
- op = body.call(thisArg, _);
107
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
- }
110
- }
111
-
112
- function __exportStar(m, exports) {
113
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
114
- }
115
-
116
- function __values(o) {
117
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
118
- if (m) return m.call(o);
119
- if (o && typeof o.length === "number") return {
120
- next: function () {
121
- if (o && i >= o.length) o = void 0;
122
- return { value: o && o[i++], done: !o };
123
- }
124
- };
125
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
126
- }
127
-
128
- function __read(o, n) {
129
- var m = typeof Symbol === "function" && o[Symbol.iterator];
130
- if (!m) return o;
131
- var i = m.call(o), r, ar = [], e;
132
- try {
133
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
134
- }
135
- catch (error) { e = { error: error }; }
136
- finally {
137
- try {
138
- if (r && !r.done && (m = i["return"])) m.call(i);
139
- }
140
- finally { if (e) throw e.error; }
141
- }
142
- return ar;
143
- }
144
-
145
- function __spread() {
146
- for (var ar = [], i = 0; i < arguments.length; i++)
147
- ar = ar.concat(__read(arguments[i]));
148
- return ar;
149
- }
150
-
151
- function __spreadArrays() {
152
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
153
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
154
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
155
- r[k] = a[j];
156
- return r;
157
- };
158
-
159
- function __await(v) {
160
- return this instanceof __await ? (this.v = v, this) : new __await(v);
161
- }
162
-
163
- function __asyncGenerator(thisArg, _arguments, generator) {
164
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
165
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
166
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
167
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
168
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
169
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
170
- function fulfill(value) { resume("next", value); }
171
- function reject(value) { resume("throw", value); }
172
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
173
- }
174
-
175
- function __asyncDelegator(o) {
176
- var i, p;
177
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
178
- 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; }
179
- }
180
-
181
- function __asyncValues(o) {
182
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
183
- var m = o[Symbol.asyncIterator], i;
184
- 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);
185
- 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); }); }; }
186
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
187
- }
188
-
189
- function __makeTemplateObject(cooked, raw) {
190
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
191
- return cooked;
192
- };
193
-
194
- function __importStar(mod) {
195
- if (mod && mod.__esModule) return mod;
196
- var result = {};
197
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
198
- result.default = mod;
199
- return result;
200
- }
201
-
202
- function __importDefault(mod) {
203
- return (mod && mod.__esModule) ? mod : { default: mod };
204
- }
205
-
206
- function __classPrivateFieldGet(receiver, privateMap) {
207
- if (!privateMap.has(receiver)) {
208
- throw new TypeError("attempted to get private field on non-instance");
209
- }
210
- return privateMap.get(receiver);
211
- }
212
-
213
- function __classPrivateFieldSet(receiver, privateMap, value) {
214
- if (!privateMap.has(receiver)) {
215
- throw new TypeError("attempted to set private field on non-instance");
216
- }
217
- privateMap.set(receiver, value);
218
- return value;
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
219
23
  }
220
24
 
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
- })(AclRoleAccess || (AclRoleAccess = {}));
25
+ var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
26
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
27
+ var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
28
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
29
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
30
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
32
+ var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
33
+ var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
34
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
35
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
36
+ var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
37
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
38
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
39
+ var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
40
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
41
+ var _snakecaseKeys__namespace = /*#__PURE__*/_interopNamespace(_snakecaseKeys);
42
+ var _camelcaseKeys__namespace = /*#__PURE__*/_interopNamespace(_camelcaseKeys);
43
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
44
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
45
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
46
+ var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
47
+ var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
48
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
49
+
50
+ /*! *****************************************************************************
51
+ Copyright (c) Microsoft Corporation.
52
+
53
+ Permission to use, copy, modify, and/or distribute this software for any
54
+ purpose with or without fee is hereby granted.
55
+
56
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
57
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
58
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
59
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
60
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
61
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
62
+ PERFORMANCE OF THIS SOFTWARE.
63
+ ***************************************************************************** */
64
+ /* global Reflect, Promise */
65
+ var extendStatics = function (d, b) {
66
+ extendStatics = Object.setPrototypeOf ||
67
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
68
+ function (d, b) { for (var p in b)
69
+ if (Object.prototype.hasOwnProperty.call(b, p))
70
+ d[p] = b[p]; };
71
+ return extendStatics(d, b);
72
+ };
73
+ function __extends(d, b) {
74
+ if (typeof b !== "function" && b !== null)
75
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
76
+ extendStatics(d, b);
77
+ function __() { this.constructor = d; }
78
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
79
+ }
80
+ var __assign = function () {
81
+ __assign = Object.assign || function __assign(t) {
82
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
83
+ s = arguments[i];
84
+ for (var p in s)
85
+ if (Object.prototype.hasOwnProperty.call(s, p))
86
+ t[p] = s[p];
87
+ }
88
+ return t;
89
+ };
90
+ return __assign.apply(this, arguments);
91
+ };
92
+ function __rest(s, e) {
93
+ var t = {};
94
+ for (var p in s)
95
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
96
+ t[p] = s[p];
97
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
98
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
99
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
100
+ t[p[i]] = s[p[i]];
101
+ }
102
+ return t;
103
+ }
104
+ function __decorate(decorators, target, key, desc) {
105
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
106
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
107
+ r = Reflect.decorate(decorators, target, key, desc);
108
+ else
109
+ for (var i = decorators.length - 1; i >= 0; i--)
110
+ if (d = decorators[i])
111
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
112
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
113
+ }
114
+ function __param(paramIndex, decorator) {
115
+ return function (target, key) { decorator(target, key, paramIndex); };
116
+ }
117
+ function __metadata(metadataKey, metadataValue) {
118
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
119
+ return Reflect.metadata(metadataKey, metadataValue);
120
+ }
121
+ function __awaiter(thisArg, _arguments, P, generator) {
122
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
123
+ return new (P || (P = Promise))(function (resolve, reject) {
124
+ function fulfilled(value) { try {
125
+ step(generator.next(value));
126
+ }
127
+ catch (e) {
128
+ reject(e);
129
+ } }
130
+ function rejected(value) { try {
131
+ step(generator["throw"](value));
132
+ }
133
+ catch (e) {
134
+ reject(e);
135
+ } }
136
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
137
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
138
+ });
139
+ }
140
+ function __generator(thisArg, body) {
141
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
142
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
143
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
144
+ function verb(n) { return function (v) { return step([n, v]); }; }
145
+ function step(op) {
146
+ if (f)
147
+ throw new TypeError("Generator is already executing.");
148
+ while (_)
149
+ try {
150
+ 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)
151
+ return t;
152
+ if (y = 0, t)
153
+ op = [op[0] & 2, t.value];
154
+ switch (op[0]) {
155
+ case 0:
156
+ case 1:
157
+ t = op;
158
+ break;
159
+ case 4:
160
+ _.label++;
161
+ return { value: op[1], done: false };
162
+ case 5:
163
+ _.label++;
164
+ y = op[1];
165
+ op = [0];
166
+ continue;
167
+ case 7:
168
+ op = _.ops.pop();
169
+ _.trys.pop();
170
+ continue;
171
+ default:
172
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
173
+ _ = 0;
174
+ continue;
175
+ }
176
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
177
+ _.label = op[1];
178
+ break;
179
+ }
180
+ if (op[0] === 6 && _.label < t[1]) {
181
+ _.label = t[1];
182
+ t = op;
183
+ break;
184
+ }
185
+ if (t && _.label < t[2]) {
186
+ _.label = t[2];
187
+ _.ops.push(op);
188
+ break;
189
+ }
190
+ if (t[2])
191
+ _.ops.pop();
192
+ _.trys.pop();
193
+ continue;
194
+ }
195
+ op = body.call(thisArg, _);
196
+ }
197
+ catch (e) {
198
+ op = [6, e];
199
+ y = 0;
200
+ }
201
+ finally {
202
+ f = t = 0;
203
+ }
204
+ if (op[0] & 5)
205
+ throw op[1];
206
+ return { value: op[0] ? op[1] : void 0, done: true };
207
+ }
208
+ }
209
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
210
+ if (k2 === undefined)
211
+ k2 = k;
212
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
213
+ }) : (function (o, m, k, k2) {
214
+ if (k2 === undefined)
215
+ k2 = k;
216
+ o[k2] = m[k];
217
+ });
218
+ function __exportStar(m, o) {
219
+ for (var p in m)
220
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
221
+ __createBinding(o, m, p);
222
+ }
223
+ function __values(o) {
224
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
225
+ if (m)
226
+ return m.call(o);
227
+ if (o && typeof o.length === "number")
228
+ return {
229
+ next: function () {
230
+ if (o && i >= o.length)
231
+ o = void 0;
232
+ return { value: o && o[i++], done: !o };
233
+ }
234
+ };
235
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
236
+ }
237
+ function __read(o, n) {
238
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
239
+ if (!m)
240
+ return o;
241
+ var i = m.call(o), r, ar = [], e;
242
+ try {
243
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
244
+ ar.push(r.value);
245
+ }
246
+ catch (error) {
247
+ e = { error: error };
248
+ }
249
+ finally {
250
+ try {
251
+ if (r && !r.done && (m = i["return"]))
252
+ m.call(i);
253
+ }
254
+ finally {
255
+ if (e)
256
+ throw e.error;
257
+ }
258
+ }
259
+ return ar;
260
+ }
261
+ /** @deprecated */
262
+ function __spread() {
263
+ for (var ar = [], i = 0; i < arguments.length; i++)
264
+ ar = ar.concat(__read(arguments[i]));
265
+ return ar;
266
+ }
267
+ /** @deprecated */
268
+ function __spreadArrays() {
269
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
270
+ s += arguments[i].length;
271
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
272
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
273
+ r[k] = a[j];
274
+ return r;
275
+ }
276
+ function __spreadArray(to, from, pack) {
277
+ if (pack || arguments.length === 2)
278
+ for (var i = 0, l = from.length, ar; i < l; i++) {
279
+ if (ar || !(i in from)) {
280
+ if (!ar)
281
+ ar = Array.prototype.slice.call(from, 0, i);
282
+ ar[i] = from[i];
283
+ }
284
+ }
285
+ return to.concat(ar || Array.prototype.slice.call(from));
286
+ }
287
+ function __await(v) {
288
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
289
+ }
290
+ function __asyncGenerator(thisArg, _arguments, generator) {
291
+ if (!Symbol.asyncIterator)
292
+ throw new TypeError("Symbol.asyncIterator is not defined.");
293
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
294
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
295
+ function verb(n) { if (g[n])
296
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
297
+ function resume(n, v) { try {
298
+ step(g[n](v));
299
+ }
300
+ catch (e) {
301
+ settle(q[0][3], e);
302
+ } }
303
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
304
+ function fulfill(value) { resume("next", value); }
305
+ function reject(value) { resume("throw", value); }
306
+ function settle(f, v) { if (f(v), q.shift(), q.length)
307
+ resume(q[0][0], q[0][1]); }
308
+ }
309
+ function __asyncDelegator(o) {
310
+ var i, p;
311
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
312
+ 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; }
313
+ }
314
+ function __asyncValues(o) {
315
+ if (!Symbol.asyncIterator)
316
+ throw new TypeError("Symbol.asyncIterator is not defined.");
317
+ var m = o[Symbol.asyncIterator], i;
318
+ 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);
319
+ 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); }); }; }
320
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
321
+ }
322
+ function __makeTemplateObject(cooked, raw) {
323
+ if (Object.defineProperty) {
324
+ Object.defineProperty(cooked, "raw", { value: raw });
325
+ }
326
+ else {
327
+ cooked.raw = raw;
328
+ }
329
+ return cooked;
330
+ }
331
+ ;
332
+ var __setModuleDefault = Object.create ? (function (o, v) {
333
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
334
+ }) : function (o, v) {
335
+ o["default"] = v;
336
+ };
337
+ function __importStar(mod) {
338
+ if (mod && mod.__esModule)
339
+ return mod;
340
+ var result = {};
341
+ if (mod != null)
342
+ for (var k in mod)
343
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
344
+ __createBinding(result, mod, k);
345
+ __setModuleDefault(result, mod);
346
+ return result;
347
+ }
348
+ function __importDefault(mod) {
349
+ return (mod && mod.__esModule) ? mod : { default: mod };
350
+ }
351
+ function __classPrivateFieldGet(receiver, state, kind, f) {
352
+ if (kind === "a" && !f)
353
+ throw new TypeError("Private accessor was defined without a getter");
354
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
355
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
356
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
357
+ }
358
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
359
+ if (kind === "m")
360
+ throw new TypeError("Private method is not writable");
361
+ if (kind === "a" && !f)
362
+ throw new TypeError("Private accessor was defined without a setter");
363
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
364
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
365
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
366
+ }
228
367
 
229
- // start:ng42.barrel
230
- // end:ng42.barrel
368
+ var AclRoleAccess;
369
+ (function (AclRoleAccess) {
370
+ AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
371
+ AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
372
+ AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
373
+ AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
374
+ })(AclRoleAccess || (AclRoleAccess = {}));
231
375
 
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 }
376
+ var AclRoleAccesses = [
377
+ { name: 'None', value: AclRoleAccess.None },
378
+ { name: 'Read', value: AclRoleAccess.Read },
379
+ { name: 'Write', value: AclRoleAccess.Write },
380
+ { name: 'Full', value: AclRoleAccess.Full }
237
381
  ];
238
382
 
239
- var FS_APP_ACL_CONFIG = new core.InjectionToken('fs-app-acl-config');
383
+ var FS_APP_ACL_CONFIG = new i0.InjectionToken('fs-app-acl-config');
240
384
 
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;
385
+ var snakecaseKeys = _snakecaseKeys__namespace;
386
+ var camelcaseKeys = _camelcaseKeys__namespace;
387
+ var FsAppAclService = /** @class */ (function () {
388
+ function FsAppAclService(_appAclConfig) {
389
+ this._appAclConfig = _appAclConfig;
390
+ }
391
+ FsAppAclService.prototype.getPermissions = function () {
392
+ var _this = this;
393
+ if (!this._permissions$) {
394
+ this._permissions$ = new rxjs.ReplaySubject();
395
+ this._appAclConfig.permissions
396
+ .pipe(operators.map(function (data) { return _this.input(data); }))
397
+ .subscribe(function (permissions) {
398
+ _this._permissions$.next(permissions);
399
+ _this._permissions$.complete();
400
+ });
401
+ }
402
+ return this._permissions$;
403
+ };
404
+ FsAppAclService.prototype.getLevels = function () {
405
+ var _this = this;
406
+ if (!this._levels$) {
407
+ this._levels$ = new rxjs.ReplaySubject();
408
+ this._appAclConfig.levels
409
+ .pipe(operators.map(function (data) { return _this.input(data); }))
410
+ .subscribe(function (levels) {
411
+ _this._levels$.next(levels);
412
+ _this._levels$.complete();
413
+ });
414
+ }
415
+ return this._levels$;
416
+ };
417
+ FsAppAclService.prototype.getIndexedLevels = function () {
418
+ return this.getLevels()
419
+ .pipe(operators.map(function (data) {
420
+ return common.list(data, 'name', 'value');
421
+ }));
422
+ };
423
+ FsAppAclService.prototype.input = function (data) {
424
+ var _this = this;
425
+ if (lodashEs.isArray(data)) {
426
+ return data.map(function (item) {
427
+ return _this._appAclConfig.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
428
+ });
429
+ }
430
+ else {
431
+ return this._appAclConfig.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
432
+ }
433
+ };
434
+ FsAppAclService.prototype.output = function (data) {
435
+ var _this = this;
436
+ if (lodashEs.isArray(data)) {
437
+ return data.map(function (item) {
438
+ return _this._appAclConfig.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
439
+ });
440
+ }
441
+ else {
442
+ return this._appAclConfig.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
443
+ }
444
+ };
445
+ return FsAppAclService;
313
446
  }());
447
+ FsAppAclService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclService, deps: [{ token: FS_APP_ACL_CONFIG }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
448
+ FsAppAclService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclService, providedIn: 'root' });
449
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclService, decorators: [{
450
+ type: i0.Injectable,
451
+ args: [{
452
+ providedIn: 'root',
453
+ }]
454
+ }], ctorParameters: function () {
455
+ return [{ type: undefined, decorators: [{
456
+ type: i0.Inject,
457
+ args: [FS_APP_ACL_CONFIG]
458
+ }] }];
459
+ } });
314
460
 
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
- scrollable: false,
392
- noResults: {
393
- message: '',
394
- },
395
- group: {
396
- groupBy: function (row) {
397
- return row;
398
- },
399
- compareBy: function (group) {
400
- return group.category || true;
401
- },
402
- actions: [
403
- {
404
- label: 'Group action',
405
- },
406
- ],
407
- },
408
- fetch: function (query) {
409
- return rxjs.of({
410
- data: _this.levelPermissions.sort(function (a, b) {
411
- a = a.name.toUpperCase();
412
- b = b.name.toUpperCase();
413
- if (a < b) {
414
- return -1;
415
- }
416
- else if (a > b) {
417
- return 1;
418
- }
419
- return 0;
420
- }),
421
- });
422
- },
423
- };
424
- };
425
- FsAclRoleComponent.prototype.levelChange = function () {
426
- var _this = this;
427
- this._updatePermissions();
428
- this._updateAclRoleConfigs();
429
- setTimeout(function () {
430
- _this.list.reload();
431
- });
432
- };
433
- FsAclRoleComponent.prototype.getRole = function () {
434
- var _this = this;
435
- if (!this._data.aclRole.id) {
436
- return rxjs.of(this._data.aclRole);
437
- }
438
- var query = {
439
- aclPermissions: true,
440
- aclRoleConfigs: true,
441
- };
442
- if (!this.environment) {
443
- query.environmentId = null;
444
- }
445
- return this._data.loadAclRole(this._data.aclRole, query)
446
- .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
447
- };
448
- FsAclRoleComponent.prototype.close = function (data) {
449
- if (data === void 0) { data = null; }
450
- this._dialogRef.close(data);
451
- };
452
- FsAclRoleComponent.prototype.allPermissionsChange = function (all) {
453
- this._updatePermissions();
454
- if (all) {
455
- this._applyMaxPermissionAccess();
456
- }
457
- };
458
- FsAclRoleComponent.prototype.ngOnDestroy = function () {
459
- this._destroy$.next();
460
- this._destroy$.complete();
461
- };
462
- FsAclRoleComponent.prototype._updatePermissions = function () {
463
- var _this = this;
464
- this.levelPermissions = this.permissions.filter(function (permission) {
465
- return permission.levels.some(function (item) {
466
- return item === _this.aclRole.level;
467
- });
468
- });
469
- };
470
- FsAclRoleComponent.prototype._updateAclRoleConfigs = function () {
471
- var _this = this;
472
- this.levelAclRoleConfigs = this.aclRoleConfigs.filter(function (item) {
473
- return _this.aclRole.level === item.level;
474
- });
475
- };
476
- FsAclRoleComponent.prototype._applyMaxPermissionAccess = function () {
477
- var _this = this;
478
- this.permissions.forEach(function (permission) {
479
- _this.aclRole.permissions[permission.value] = Math.max.apply(Math, __spread(permission.accesses));
480
- });
481
- };
482
- FsAclRoleComponent.ctorParameters = function () { return [
483
- { type: FsAppAclService },
484
- { type: dialog.MatDialogRef },
485
- { type: message.FsMessage },
486
- { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
487
- ]; };
488
- __decorate([
489
- core.ViewChild(list.FsListComponent),
490
- __metadata("design:type", list.FsListComponent)
491
- ], FsAclRoleComponent.prototype, "list", void 0);
492
- FsAclRoleComponent = __decorate([
493
- core.Component({
494
- 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-permission=\"row\">\n <div class=\"permission\">{{ permission.name }}</div>\n <div class=\"description small\">{{ permission.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\n <ng-template #elseAll>\n\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",
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])
501
- ], FsAclRoleComponent);
502
- return FsAclRoleComponent;
461
+ var FsAclRoleComponent = /** @class */ (function () {
462
+ function FsAclRoleComponent(_appAclService, _dialogRef, _message, _data, _cdRef) {
463
+ var _this = this;
464
+ this._appAclService = _appAclService;
465
+ this._dialogRef = _dialogRef;
466
+ this._message = _message;
467
+ this._data = _data;
468
+ this._cdRef = _cdRef;
469
+ this.aclRole = null;
470
+ this.permissions = [];
471
+ this.levelPermissions = [];
472
+ this.AclRoleAccesses = AclRoleAccesses;
473
+ this.indexedAccesses = {};
474
+ this.aclLevels = [];
475
+ this.indexedAclLevels = {};
476
+ this.onlyFullAccess = false;
477
+ this.AclLevels = {};
478
+ this.aclRoleConfigs = [];
479
+ this.levelAclRoleConfigs = [];
480
+ this._destroy$ = new rxjs.Subject();
481
+ this.save = function () {
482
+ var aclRole = Object.assign(Object.assign({}, _this.aclRole), { permissions: _this.levelPermissions.map(function (permission) {
483
+ return {
484
+ value: permission.value,
485
+ access: _this.aclRole.permissions[permission.value] || 0,
486
+ };
487
+ }), aclRoleConfigs: _this.levelAclRoleConfigs.map(function (item) {
488
+ return {
489
+ id: item.id,
490
+ value: item.value,
491
+ data: item.data,
492
+ };
493
+ }) });
494
+ return _this._data.saveAclRole(_this._appAclService.output(aclRole))
495
+ .pipe(operators.tap(function (response) {
496
+ _this._message.success('Saved Changes');
497
+ _this.close(response);
498
+ }));
499
+ };
500
+ }
501
+ FsAclRoleComponent.prototype.ngOnInit = function () {
502
+ var _this = this;
503
+ rxjs.forkJoin(this.getRole(), this._appAclService.getPermissions())
504
+ .pipe(operators.takeUntil(this._destroy$))
505
+ .subscribe(function (_a) {
506
+ var _b = __read(_a, 2), aclRole = _b[0], aclPermissions = _b[1];
507
+ _this.permissions = aclPermissions;
508
+ _this.aclLevels = _this._data.aclLevels;
509
+ _this.indexedAclLevels = common.list(_this.aclLevels, 'name', 'value');
510
+ _this.indexedAccesses = common.list(AclRoleAccesses, 'name', 'value');
511
+ _this.aclRole = Object.assign({
512
+ aclPermissions: [],
513
+ allPermissions: true,
514
+ aclRoleConfigs: [],
515
+ permissions: {},
516
+ level: _this.aclLevels[0].value,
517
+ }, aclRole);
518
+ if (_this.aclRole.id) {
519
+ _this.permissions.forEach(function (permission) {
520
+ var access = 0;
521
+ var aclPermission = _this.aclRole.aclPermissions.find(function (item) {
522
+ return item.permission === permission.value;
523
+ });
524
+ if (aclPermission) {
525
+ access = aclPermission.access;
526
+ }
527
+ _this.aclRole.permissions[permission.value] = access;
528
+ });
529
+ }
530
+ if (_this.aclRole.allPermissions) {
531
+ _this._applyMaxPermissionAccess();
532
+ }
533
+ _this._updatePermissions();
534
+ _this._updateAclRoleConfigs();
535
+ _this._cdRef.markForCheck();
536
+ });
537
+ this.listConfig = {
538
+ status: false,
539
+ paging: false,
540
+ noResults: {
541
+ message: '',
542
+ },
543
+ group: {
544
+ initialExpand: true,
545
+ groupBy: function (data) {
546
+ return data;
547
+ },
548
+ compareBy: function (data) {
549
+ return data.category || 'General';
550
+ },
551
+ },
552
+ fetch: function () {
553
+ return rxjs.of({
554
+ data: _this.levelPermissions.sort(function (a, b) {
555
+ a = a.name.toUpperCase();
556
+ b = b.name.toUpperCase();
557
+ if (a < b) {
558
+ return -1;
559
+ }
560
+ else if (a > b) {
561
+ return 1;
562
+ }
563
+ return 0;
564
+ }),
565
+ });
566
+ },
567
+ };
568
+ };
569
+ FsAclRoleComponent.prototype.levelChange = function () {
570
+ var _this = this;
571
+ this._updatePermissions();
572
+ this._updateAclRoleConfigs();
573
+ setTimeout(function () {
574
+ _this.list.reload();
575
+ });
576
+ };
577
+ FsAclRoleComponent.prototype.getRole = function () {
578
+ var _this = this;
579
+ if (!this._data.aclRole.id) {
580
+ return rxjs.of(this._data.aclRole);
581
+ }
582
+ var query = {
583
+ aclPermissions: true,
584
+ aclRoleConfigs: true,
585
+ };
586
+ if (!this.environment) {
587
+ query.environmentId = null;
588
+ }
589
+ return this._data.loadAclRole(this._data.aclRole, query)
590
+ .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
591
+ };
592
+ FsAclRoleComponent.prototype.close = function (data) {
593
+ if (data === void 0) { data = null; }
594
+ this._dialogRef.close(data);
595
+ };
596
+ FsAclRoleComponent.prototype.allPermissionsChange = function (all) {
597
+ this._updatePermissions();
598
+ if (all) {
599
+ this._applyMaxPermissionAccess();
600
+ }
601
+ };
602
+ FsAclRoleComponent.prototype.ngOnDestroy = function () {
603
+ this._destroy$.next();
604
+ this._destroy$.complete();
605
+ };
606
+ FsAclRoleComponent.prototype._updatePermissions = function () {
607
+ var _this = this;
608
+ this.levelPermissions = this.permissions.filter(function (permission) {
609
+ return permission.levels.some(function (item) {
610
+ return item === _this.aclRole.level;
611
+ });
612
+ });
613
+ };
614
+ FsAclRoleComponent.prototype._updateAclRoleConfigs = function () {
615
+ var _this = this;
616
+ this.levelAclRoleConfigs = this.aclRoleConfigs.filter(function (item) {
617
+ return _this.aclRole.level === item.level;
618
+ });
619
+ };
620
+ FsAclRoleComponent.prototype._applyMaxPermissionAccess = function () {
621
+ var _this = this;
622
+ this.permissions.forEach(function (permission) {
623
+ _this.aclRole.permissions[permission.value] = Math.max.apply(Math, __spreadArray([], __read(permission.accesses)));
624
+ });
625
+ };
626
+ return FsAclRoleComponent;
503
627
  }());
628
+ FsAclRoleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclRoleComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialogRef }, { token: i3__namespace.FsMessage }, { token: i2.MAT_DIALOG_DATA }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
629
+ FsAclRoleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclRoleComponent, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: i12.FsListComponent, descendants: true }], ngImport: i0__namespace, 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", 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%}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i5__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6__namespace.ɵb, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6__namespace.ɵa, selector: "fs-label" }, { type: i7__namespace.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "radioPosition", "compareWith", "required", "disabled", "label", "name"] }, { type: i8__namespace.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i9__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.ɵc, selector: "fs-label-message" }, { type: i10__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i11__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i12__namespace.FsListComponent, selector: "fs-list", inputs: ["loaderLines", "config"], outputs: ["filtersReady"] }, { type: i13__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i14__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i14__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i14__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i17__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i17__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i18__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i14__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i15__namespace.ɵf, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i14__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i14__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i12__namespace.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "customize", "title", "name", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i12__namespace.ɵd, selector: "[fs-list-group-cell]" }, { type: i12__namespace.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i15__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i2__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
630
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclRoleComponent, decorators: [{
631
+ type: i0.Component,
632
+ args: [{
633
+ templateUrl: './acl-role.component.html',
634
+ styleUrls: ['./acl-role.component.scss'],
635
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
636
+ }]
637
+ }], ctorParameters: function () {
638
+ return [{ type: FsAppAclService }, { type: i2__namespace.MatDialogRef }, { type: i3__namespace.FsMessage }, { type: undefined, decorators: [{
639
+ type: i0.Inject,
640
+ args: [i2.MAT_DIALOG_DATA]
641
+ }] }, { type: i0__namespace.ChangeDetectorRef }];
642
+ }, propDecorators: { list: [{
643
+ type: i0.ViewChild,
644
+ args: [i12.FsListComponent]
645
+ }] } });
504
646
 
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;
647
+ var FsAclPermissionPopoverComponent = /** @class */ (function () {
648
+ function FsAclPermissionPopoverComponent(_appAclService) {
649
+ this._appAclService = _appAclService;
650
+ }
651
+ FsAclPermissionPopoverComponent.prototype.ngOnInit = function () {
652
+ var _this = this;
653
+ this._appAclService.getPermissions()
654
+ .subscribe(function (permissions) {
655
+ _this.description = permissions.filter(function (item) {
656
+ return item.value === _this.permission.value;
657
+ }).map(function (item) {
658
+ return item.description;
659
+ })[0];
660
+ });
661
+ };
662
+ return FsAclPermissionPopoverComponent;
655
663
  }());
664
+ FsAclPermissionPopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclPermissionPopoverComponent, deps: [{ token: FsAppAclService }], target: i0__namespace.ɵɵFactoryTarget.Component });
665
+ FsAclPermissionPopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclPermissionPopoverComponent, selector: "acl-permission-popover", inputs: { permission: "permission" }, ngImport: i0__namespace, 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", styles: [":host{cursor:pointer}\n"], components: [{ type: i2__namespace$1.FsPopoverComponent, selector: "fs-popover", inputs: ["leaveDelay", "showDelay", "maxWidth", "autoShow", "autoClose", "loadingDiameter", "loading", "indication", "position", "theme", "size", "trigger", "template", "data", "wrapperClass"] }] });
666
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclPermissionPopoverComponent, decorators: [{
667
+ type: i0.Component,
668
+ args: [{
669
+ selector: 'acl-permission-popover',
670
+ templateUrl: './acl-permission-popover.component.html',
671
+ styleUrls: ['./acl-permission-popover.component.scss']
672
+ }]
673
+ }], ctorParameters: function () { return [{ type: FsAppAclService }]; }, propDecorators: { permission: [{
674
+ type: i0.Input
675
+ }] } });
656
676
 
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;
677
+ var FsAclRolesComponent = /** @class */ (function () {
678
+ function FsAclRolesComponent(_appAclService, _dialog, _cdRef) {
679
+ this._appAclService = _appAclService;
680
+ this._dialog = _dialog;
681
+ this._cdRef = _cdRef;
682
+ this.aclLevels = [];
683
+ this.list = new i0.QueryList();
684
+ this.indexedAclRoleLevels = {};
685
+ this._destroy$ = new rxjs.Subject();
686
+ }
687
+ FsAclRolesComponent.prototype.ngOnInit = function () {
688
+ var _this = this;
689
+ new rxjs.Observable(function (observer) {
690
+ if (_this.aclLevels.length) {
691
+ observer.next(_this.aclLevels);
692
+ observer.complete();
693
+ }
694
+ else {
695
+ _this._appAclService.getLevels()
696
+ .subscribe(function (aclLevels) {
697
+ observer.next(aclLevels);
698
+ observer.complete();
699
+ });
700
+ }
701
+ })
702
+ .subscribe(function (aclLevels) {
703
+ _this.aclLevels = aclLevels;
704
+ _this.indexedAclRoleLevels = common.list(_this.aclLevels, 'name', 'value');
705
+ _this._loadListConfig();
706
+ });
707
+ };
708
+ FsAclRolesComponent.prototype.openDialog = function (aclRole) {
709
+ var _this = this;
710
+ if (aclRole === void 0) { aclRole = { id: null }; }
711
+ var dialogRef = this._dialog.open(FsAclRoleComponent, {
712
+ width: '70%',
713
+ data: {
714
+ aclRole: aclRole,
715
+ aclLevels: this.aclLevels,
716
+ loadAclRole: this.loadAclRole,
717
+ saveAclRole: this.saveAclRole,
718
+ },
719
+ });
720
+ dialogRef.afterClosed()
721
+ .pipe(operators.takeUntil(this._destroy$), operators.filter(function (response) { return !!response; }))
722
+ .subscribe(function (response) {
723
+ _this.list.forEach(function (list) {
724
+ list.reload();
725
+ });
726
+ });
727
+ };
728
+ FsAclRolesComponent.prototype.ngOnDestroy = function () {
729
+ this._destroy$.next();
730
+ this._destroy$.complete();
731
+ };
732
+ FsAclRolesComponent.prototype._loadListConfig = function () {
733
+ var _this = this;
734
+ this.listConfig = {
735
+ sort: { value: 'hierarchy' },
736
+ filters: [
737
+ {
738
+ name: 'keyword',
739
+ type: filter.ItemType.Keyword,
740
+ label: 'Search',
741
+ },
742
+ {
743
+ name: 'level',
744
+ label: 'Level',
745
+ type: filter.ItemType.Select,
746
+ values: this.aclLevels,
747
+ hide: this.aclLevels.length <= 1
748
+ },
749
+ {
750
+ name: 'state',
751
+ label: 'Show Deleted',
752
+ type: filter.ItemType.Checkbox,
753
+ unchecked: 'active',
754
+ checked: 'deleted',
755
+ },
756
+ ],
757
+ actions: [
758
+ {
759
+ click: function (event) {
760
+ _this.openDialog();
761
+ },
762
+ label: 'Create',
763
+ },
764
+ ],
765
+ rowActions: [
766
+ {
767
+ click: function (data) {
768
+ return _this.deleteAclRole(_this._appAclService.output(data));
769
+ },
770
+ remove: {
771
+ title: 'Confirm',
772
+ template: 'Are you sure you would like to delete this role?',
773
+ },
774
+ menu: true,
775
+ label: 'Delete',
776
+ show: function (row) { return row.state !== 'deleted'; },
777
+ },
778
+ ],
779
+ fetch: function (query) {
780
+ query.permissions = true;
781
+ return _this.loadAclRoles(query)
782
+ .pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
783
+ },
784
+ };
785
+ };
786
+ return FsAclRolesComponent;
688
787
  }());
788
+ FsAclRolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclRolesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
789
+ FsAclRolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclRolesComponent, selector: "fs-acl-roles", inputs: { deleteAclRole: "deleteAclRole", saveAclRole: "saveAclRole", loadAclRoles: "loadAclRoles", loadAclRole: "loadAclRole", aclLevels: "aclLevels" }, viewQueries: [{ propertyName: "list", predicate: i12.FsListComponent, descendants: true }], ngImport: i0__namespace, 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", styles: [".permissions .permission+.permission:before{content:\", \"}\n"], components: [{ type: i12__namespace.FsListComponent, selector: "fs-list", inputs: ["loaderLines", "config"], outputs: ["filtersReady"] }, { type: FsAclPermissionPopoverComponent, selector: "acl-permission-popover", inputs: ["permission"] }], directives: [{ type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12__namespace.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "customize", "title", "name", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i12__namespace.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i7__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
790
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclRolesComponent, decorators: [{
791
+ type: i0.Component,
792
+ args: [{
793
+ selector: 'fs-acl-roles',
794
+ templateUrl: 'acl-roles.component.html',
795
+ styleUrls: ['acl-roles.component.scss'],
796
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
797
+ }]
798
+ }], ctorParameters: function () { return [{ type: FsAppAclService }, { type: i2__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { deleteAclRole: [{
799
+ type: i0.Input
800
+ }], saveAclRole: [{
801
+ type: i0.Input
802
+ }], loadAclRoles: [{
803
+ type: i0.Input
804
+ }], loadAclRole: [{
805
+ type: i0.Input
806
+ }], aclLevels: [{
807
+ type: i0.Input
808
+ }], list: [{
809
+ type: i0.ViewChildren,
810
+ args: [i12.FsListComponent]
811
+ }] } });
689
812
 
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;
813
+ var FsAclRolePopoverComponent = /** @class */ (function () {
814
+ function FsAclRolePopoverComponent(_appAclService) {
815
+ this._appAclService = _appAclService;
816
+ this.permissions = [];
817
+ }
818
+ FsAclRolePopoverComponent.prototype.ngOnInit = function () {
819
+ var _this = this;
820
+ var aclRolePermissions = this.aclRole.permissions || [];
821
+ this._appAclService.getPermissions()
822
+ .subscribe(function (response) {
823
+ _this.permissions = response.filter(function (item) {
824
+ return aclRolePermissions.some(function (permission) {
825
+ return item.value === permission.value;
826
+ });
827
+ });
828
+ });
829
+ };
830
+ return FsAclRolePopoverComponent;
727
831
  }());
832
+ FsAclRolePopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclRolePopoverComponent, deps: [{ token: FsAppAclService }], target: i0__namespace.ɵɵFactoryTarget.Component });
833
+ FsAclRolePopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclRolePopoverComponent, selector: "fs-acl-role-popover", inputs: { aclRole: "aclRole", objectName: "objectName" }, ngImport: i0__namespace, 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", styles: [".name{padding-bottom:10px}.permission+.permission{padding-top:5px}:host{cursor:pointer}\n"], components: [{ type: i2__namespace$1.FsPopoverComponent, selector: "fs-popover", inputs: ["leaveDelay", "showDelay", "maxWidth", "autoShow", "autoClose", "loadingDiameter", "loading", "indication", "position", "theme", "size", "trigger", "template", "data", "wrapperClass"] }], directives: [{ type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
834
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclRolePopoverComponent, decorators: [{
835
+ type: i0.Component,
836
+ args: [{
837
+ selector: 'fs-acl-role-popover',
838
+ templateUrl: './acl-role-popover.component.html',
839
+ styleUrls: ['./acl-role-popover.component.scss']
840
+ }]
841
+ }], ctorParameters: function () { return [{ type: FsAppAclService }]; }, propDecorators: { aclRole: [{
842
+ type: i0.Input
843
+ }], objectName: [{
844
+ type: i0.Input
845
+ }] } });
728
846
 
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;
847
+ var FsAclObjectRolesComponent = /** @class */ (function () {
848
+ function FsAclObjectRolesComponent() {
849
+ this.aclRoles = [];
850
+ this.required = false;
851
+ this.multiple = false;
852
+ this.disabled = false;
853
+ this.aclObjectRoles = [];
854
+ this.rolesLabel = 'Roles';
855
+ this.levelLabel = '';
856
+ this.change = new i0.EventEmitter();
857
+ this.compareAclRole = function (o1, o2) {
858
+ return o1 && o2 && o1.id === o2.id;
859
+ };
860
+ }
861
+ FsAclObjectRolesComponent.prototype.changed = function () {
862
+ this.change.emit(this.aclObjectRoles);
863
+ };
864
+ return FsAclObjectRolesComponent;
812
865
  }());
866
+ FsAclObjectRolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclObjectRolesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
867
+ FsAclObjectRolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclObjectRolesComponent, selector: "fs-acl-object-roles", inputs: { aclRoles: "aclRoles", required: "required", multiple: "multiple", disabled: "disabled", aclObjectRoles: "aclObjectRoles", rolesLabel: "rolesLabel", levelLabel: "levelLabel" }, outputs: { change: "change" }, ngImport: i0__namespace, 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", styles: ["table tr td:first-child{padding-right:15px}\n"], components: [{ type: i1__namespace.ɵa, selector: "fs-checkbox-group", inputs: ["orientation", "position", "disabled", "compareWith", "label"], outputs: ["change"] }, { type: i9__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i5__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i10__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i11__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i14__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i15__namespace.ɵf, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }], viewProviders: [{ provide: i14.ControlContainer, useExisting: i14.NgForm }] });
868
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclObjectRolesComponent, decorators: [{
869
+ type: i0.Component,
870
+ args: [{
871
+ selector: 'fs-acl-object-roles',
872
+ templateUrl: './acl-object-roles.component.html',
873
+ styleUrls: ['./acl-object-roles.component.scss'],
874
+ viewProviders: [{ provide: i14.ControlContainer, useExisting: i14.NgForm }]
875
+ }]
876
+ }], propDecorators: { aclRoles: [{
877
+ type: i0.Input
878
+ }], required: [{
879
+ type: i0.Input
880
+ }], multiple: [{
881
+ type: i0.Input
882
+ }], disabled: [{
883
+ type: i0.Input
884
+ }], aclObjectRoles: [{
885
+ type: i0.Input
886
+ }], rolesLabel: [{
887
+ type: i0.Input
888
+ }], levelLabel: [{
889
+ type: i0.Input
890
+ }], change: [{
891
+ type: i0.Output
892
+ }] } });
813
893
 
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;
894
+ var FsAclEntryComponent = /** @class */ (function () {
895
+ function FsAclEntryComponent(_appAclService, _dialogRef, _message, _data) {
896
+ var _this = this;
897
+ var _a;
898
+ this._appAclService = _appAclService;
899
+ this._dialogRef = _dialogRef;
900
+ this._message = _message;
901
+ this._data = _data;
902
+ this.aclRoles = [];
903
+ this.indexedAclRoleLevels = {};
904
+ this.titleEdit = 'Edit Roles';
905
+ this.titleAdd = 'Assign Roles';
906
+ this.required = true;
907
+ this.save = function () {
908
+ return _this._data.saveAclObjectEntry(_this._appAclService.output(_this.aclObjectEntry))
909
+ .subscribe(function (data) {
910
+ _this._message.success('Saved Changes');
911
+ _this.close(data);
912
+ });
913
+ };
914
+ this.aclObjectEntry = Object.assign({}, _data.aclObjectEntry);
915
+ this.required = (_a = _data.required) !== null && _a !== void 0 ? _a : true;
916
+ if (_data.titleEdit) {
917
+ this.titleEdit = _data.titleEdit;
918
+ }
919
+ if (_data.titleAdd) {
920
+ this.titleAdd = _data.titleAdd;
921
+ }
922
+ }
923
+ FsAclEntryComponent.prototype.ngOnInit = function () {
924
+ var _this = this;
925
+ rxjs.forkJoin(this._data.loadAclRoles({
926
+ level: this.aclObjectEntry.level,
927
+ environmentId: this.aclObjectEntry.environmentId,
928
+ })
929
+ .pipe(operators.map(function (data) { return _this._appAclService.input(data); })), this._appAclService.getIndexedLevels())
930
+ .subscribe(function (_b) {
931
+ var _c = __read(_b, 2), aclRoles = _c[0], levels = _c[1];
932
+ _this.aclRoles = aclRoles;
933
+ _this.indexedAclRoleLevels = levels;
934
+ _this.aclObjectRole = {
935
+ object: _this.aclObjectEntry.object,
936
+ aclRoles: _this.aclObjectEntry.aclEntries
937
+ .map(function (aclEntry) {
938
+ return aclEntry.aclRole;
939
+ })
940
+ };
941
+ });
942
+ };
943
+ FsAclEntryComponent.prototype.aclObjectRoleChange = function (aclObjectRoles) {
944
+ this.aclObjectEntry.aclEntries = aclObjectRoles.reduce(function (aclEntries, aclObjectRole) {
945
+ aclObjectRole.aclRoles.forEach(function (aclRole) {
946
+ aclEntries.push({
947
+ aclRoleId: aclRole.id,
948
+ aclRole: aclRole,
949
+ objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
950
+ object: aclObjectRole.object || null
951
+ });
952
+ });
953
+ return aclEntries;
954
+ }, []);
955
+ };
956
+ FsAclEntryComponent.prototype.close = function (data) {
957
+ if (data === void 0) { data = null; }
958
+ this._dialogRef.close(data);
959
+ };
960
+ return FsAclEntryComponent;
981
961
  }());
962
+ FsAclEntryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclEntryComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialogRef }, { token: i3__namespace.FsMessage }, { token: i2.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
963
+ FsAclEntryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclEntryComponent, selector: "ng-component", ngImport: i0__namespace, 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", 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}\n"], components: [{ type: i4__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i6__namespace.ɵb, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i6__namespace.ɵa, selector: "fs-label" }, { type: FsAclObjectRolesComponent, selector: "fs-acl-object-roles", inputs: ["aclRoles", "required", "multiple", "disabled", "aclObjectRoles", "rolesLabel", "levelLabel"], outputs: ["change"] }, { type: i13__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i14__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i14__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i14__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "successDelay", "errorDelay", "submit", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i2__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i2__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i15__namespace.ɵw, selector: "button[type=\"submit\"]", inputs: ["dirtySubmit", "name"] }, { type: i2__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
964
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclEntryComponent, decorators: [{
965
+ type: i0.Component,
966
+ args: [{
967
+ templateUrl: './acl-entry.component.html',
968
+ styleUrls: ['./acl-entry.component.scss'],
969
+ }]
970
+ }], ctorParameters: function () {
971
+ return [{ type: FsAppAclService }, { type: i2__namespace.MatDialogRef }, { type: i3__namespace.FsMessage }, { type: undefined, decorators: [{
972
+ type: i0.Inject,
973
+ args: [i2.MAT_DIALOG_DATA]
974
+ }] }];
975
+ } });
982
976
 
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;
977
+ var FsAclEntriesComponent = /** @class */ (function () {
978
+ function FsAclEntriesComponent(_appAclService, _dialog, _confirm) {
979
+ this._appAclService = _appAclService;
980
+ this._dialog = _dialog;
981
+ this._confirm = _confirm;
982
+ this.environmentShow = true;
983
+ this.environmentLabel = 'Environment';
984
+ this.actions = [];
985
+ this.aclEntriesList = null;
986
+ this.aclEntriesConfig = null;
987
+ this.permissions = [];
988
+ this._destroy$ = new rxjs.Subject();
989
+ }
990
+ FsAclEntriesComponent.prototype.ngOnInit = function () {
991
+ var _this = this;
992
+ this._appAclService.getPermissions()
993
+ .subscribe(function (response) {
994
+ _this.permissions = response;
995
+ });
996
+ this.aclEntriesConfig = {
997
+ status: false,
998
+ paging: false,
999
+ actions: this.actions,
1000
+ rowActions: [
1001
+ {
1002
+ label: 'Remove All Roles',
1003
+ click: function (aclObjectEntry) {
1004
+ _this._confirm
1005
+ .confirm({
1006
+ title: 'Remove All Roles',
1007
+ template: 'Are you sure you would like to remove all roles?',
1008
+ }).subscribe(function () {
1009
+ var data = _this._appAclService.output(Object.assign(Object.assign({}, aclObjectEntry), { aclEntries: [] }));
1010
+ _this.saveAclObjectEntry(data)
1011
+ .subscribe(function () {
1012
+ _this.aclEntriesList.reload();
1013
+ });
1014
+ });
1015
+ }
1016
+ }
1017
+ ],
1018
+ fetch: function () {
1019
+ return new rxjs.Observable(function (observer) {
1020
+ _this.loadAclEntries({
1021
+ aclRoles: true,
1022
+ aclRolePermissions: true,
1023
+ objects: true,
1024
+ aclRoleState: 'active',
1025
+ })
1026
+ .pipe(operators.map(function (response) { return _this._appAclService.input(response); }))
1027
+ .subscribe(function (aclEntries) {
1028
+ var objects = aclEntries.reduce(function (items, item) {
1029
+ if (item.object) {
1030
+ items[item.object.id] = item.object;
1031
+ }
1032
+ return items;
1033
+ }, {});
1034
+ var environments = aclEntries.reduce(function (items, item) {
1035
+ if (item.environment) {
1036
+ items[item.environment.id] = item.environment;
1037
+ }
1038
+ return items;
1039
+ }, {});
1040
+ var aclObjectEntry = [];
1041
+ var grouped = lodashEs.groupBy(aclEntries, function (item) {
1042
+ return [item.aclRole.level, item.environmentId, item.objectId];
1043
+ });
1044
+ lodashEs.forOwn(grouped, function (group, key) {
1045
+ key = key.split(',');
1046
+ aclObjectEntry.push({
1047
+ object: objects[key[2]],
1048
+ level: key[0],
1049
+ environmentId: key[1] ? parseInt(key[1]) : null,
1050
+ environment: environments[key[1]],
1051
+ aclEntries: group,
1052
+ });
1053
+ });
1054
+ var hasApp = aclObjectEntry.some(function (item) {
1055
+ return item.aclEntries.some(function (entry) {
1056
+ return !entry.objectId;
1057
+ });
1058
+ });
1059
+ if (!hasApp) {
1060
+ aclObjectEntry.unshift({
1061
+ object: null, aclEntries: [],
1062
+ level: 'app',
1063
+ environmentId: null,
1064
+ });
1065
+ }
1066
+ aclObjectEntry = lodashEs.sortBy(aclObjectEntry, function (item) {
1067
+ return item.object ? item.level : '';
1068
+ });
1069
+ observer.next({ data: aclObjectEntry });
1070
+ observer.complete();
1071
+ });
1072
+ });
1073
+ },
1074
+ };
1075
+ };
1076
+ FsAclEntriesComponent.prototype.update = function (aclObjectEntry) {
1077
+ var _this = this;
1078
+ var data = {
1079
+ aclObjectEntry: aclObjectEntry,
1080
+ required: false,
1081
+ loadAclRoles: this.loadAclRoles,
1082
+ saveAclObjectEntry: this.saveAclObjectEntry
1083
+ };
1084
+ this._dialog.open(FsAclEntryComponent, {
1085
+ data: data
1086
+ })
1087
+ .afterClosed()
1088
+ .pipe(operators.takeUntil(this._destroy$))
1089
+ .subscribe(function () {
1090
+ _this.aclEntriesList.reload();
1091
+ });
1092
+ };
1093
+ FsAclEntriesComponent.prototype.ngOnDestroy = function () {
1094
+ this._destroy$.next();
1095
+ this._destroy$.complete();
1096
+ };
1097
+ FsAclEntriesComponent.prototype.reload = function () {
1098
+ this.aclEntriesList.reload();
1099
+ };
1100
+ return FsAclEntriesComponent;
1041
1101
  }());
1102
+ FsAclEntriesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclEntriesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }, { token: i3__namespace$1.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
1103
+ FsAclEntriesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclEntriesComponent, selector: "fs-acl-entries", inputs: { loadAclEntries: "loadAclEntries", loadAclRoles: "loadAclRoles", saveAclObjectEntry: "saveAclObjectEntry", environmentShow: "environmentShow", environmentLabel: "environmentLabel", actions: "actions" }, viewQueries: [{ propertyName: "aclEntriesList", first: true, predicate: i12.FsListComponent, descendants: true }], ngImport: i0__namespace, 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", styles: [""], components: [{ type: i12__namespace.FsListComponent, selector: "fs-list", inputs: ["loaderLines", "config"], outputs: ["filtersReady"] }, { type: i5__namespace$1.ɵa, selector: "fs-badge", inputs: ["text", "shape", "color", "tooltip", "size", "image", "icon", "iconSize", "iconColor", "backgroundSize"] }, { type: FsAclRolePopoverComponent, selector: "fs-acl-role-popover", inputs: ["aclRole", "objectName"] }], directives: [{ type: i12__namespace.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "customize", "title", "name", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i12__namespace.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i12__namespace.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i17__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i7__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i7__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i7__namespace$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
1104
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclEntriesComponent, decorators: [{
1105
+ type: i0.Component,
1106
+ args: [{
1107
+ selector: 'fs-acl-entries',
1108
+ templateUrl: './acl-entries.component.html',
1109
+ styleUrls: ['./acl-entries.component.scss']
1110
+ }]
1111
+ }], ctorParameters: function () { return [{ type: FsAppAclService }, { type: i2__namespace.MatDialog }, { type: i3__namespace$1.FsPrompt }]; }, propDecorators: { loadAclEntries: [{
1112
+ type: i0.Input
1113
+ }], loadAclRoles: [{
1114
+ type: i0.Input
1115
+ }], saveAclObjectEntry: [{
1116
+ type: i0.Input
1117
+ }], environmentShow: [{
1118
+ type: i0.Input
1119
+ }], environmentLabel: [{
1120
+ type: i0.Input
1121
+ }], actions: [{
1122
+ type: i0.Input
1123
+ }], aclEntriesList: [{
1124
+ type: i0.ViewChild,
1125
+ args: [i12.FsListComponent]
1126
+ }] } });
1042
1127
 
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;
1128
+ var FsAppAclModule = /** @class */ (function () {
1129
+ function FsAppAclModule() {
1130
+ }
1131
+ return FsAppAclModule;
1099
1132
  }());
1133
+ FsAppAclModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1134
+ FsAppAclModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclModule, declarations: [FsAclRolesComponent,
1135
+ FsAclPermissionPopoverComponent,
1136
+ FsAclRoleComponent,
1137
+ FsAclEntriesComponent,
1138
+ FsAclRolePopoverComponent,
1139
+ FsAclObjectRolesComponent,
1140
+ FsAclEntryComponent], imports: [i7$1.CommonModule,
1141
+ i14.FormsModule,
1142
+ i2.MatDialogModule,
1143
+ i5.MatFormFieldModule,
1144
+ i9.MatCheckboxModule,
1145
+ i10.MatSelectModule,
1146
+ i13.MatButtonModule,
1147
+ i8.MatRadioModule,
1148
+ i18.MatInputModule,
1149
+ flexLayout.FlexLayoutModule,
1150
+ i12.FsListModule,
1151
+ i2$1.FsPopoverModule,
1152
+ i4.FsDialogModule,
1153
+ i15.FsFormModule,
1154
+ i6.FsLabelModule,
1155
+ i7.FsRadioGroupModule,
1156
+ i5$1.FsBadgeModule,
1157
+ i1.FsCheckboxGroupModule], exports: [FsAclRolesComponent,
1158
+ FsAclPermissionPopoverComponent,
1159
+ FsAclRoleComponent,
1160
+ FsAclEntriesComponent,
1161
+ FsAclRolePopoverComponent,
1162
+ FsAclObjectRolesComponent,
1163
+ FsAclEntryComponent] });
1164
+ FsAppAclModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclModule, imports: [[
1165
+ i7$1.CommonModule,
1166
+ i14.FormsModule,
1167
+ i2.MatDialogModule,
1168
+ i5.MatFormFieldModule,
1169
+ i9.MatCheckboxModule,
1170
+ i10.MatSelectModule,
1171
+ i13.MatButtonModule,
1172
+ i8.MatRadioModule,
1173
+ i18.MatInputModule,
1174
+ flexLayout.FlexLayoutModule,
1175
+ i12.FsListModule,
1176
+ i2$1.FsPopoverModule,
1177
+ i4.FsDialogModule,
1178
+ i15.FsFormModule,
1179
+ i6.FsLabelModule,
1180
+ i7.FsRadioGroupModule,
1181
+ i5$1.FsBadgeModule,
1182
+ i1.FsCheckboxGroupModule,
1183
+ ]] });
1184
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclModule, decorators: [{
1185
+ type: i0.NgModule,
1186
+ args: [{
1187
+ imports: [
1188
+ i7$1.CommonModule,
1189
+ i14.FormsModule,
1190
+ i2.MatDialogModule,
1191
+ i5.MatFormFieldModule,
1192
+ i9.MatCheckboxModule,
1193
+ i10.MatSelectModule,
1194
+ i13.MatButtonModule,
1195
+ i8.MatRadioModule,
1196
+ i18.MatInputModule,
1197
+ flexLayout.FlexLayoutModule,
1198
+ i12.FsListModule,
1199
+ i2$1.FsPopoverModule,
1200
+ i4.FsDialogModule,
1201
+ i15.FsFormModule,
1202
+ i6.FsLabelModule,
1203
+ i7.FsRadioGroupModule,
1204
+ i5$1.FsBadgeModule,
1205
+ i1.FsCheckboxGroupModule,
1206
+ ],
1207
+ declarations: [
1208
+ FsAclRolesComponent,
1209
+ FsAclPermissionPopoverComponent,
1210
+ FsAclRoleComponent,
1211
+ FsAclEntriesComponent,
1212
+ FsAclRolePopoverComponent,
1213
+ FsAclObjectRolesComponent,
1214
+ FsAclEntryComponent,
1215
+ ],
1216
+ exports: [
1217
+ FsAclRolesComponent,
1218
+ FsAclPermissionPopoverComponent,
1219
+ FsAclRoleComponent,
1220
+ FsAclEntriesComponent,
1221
+ FsAclRolePopoverComponent,
1222
+ FsAclObjectRolesComponent,
1223
+ FsAclEntryComponent,
1224
+ ],
1225
+ }]
1226
+ }] });
1227
+
1228
+ /**
1229
+ * Generated bundle index. Do not edit.
1230
+ */
1100
1231
 
1101
1232
  exports.FS_APP_ACL_CONFIG = FS_APP_ACL_CONFIG;
1102
1233
  exports.FsAclEntriesComponent = FsAclEntriesComponent;
1234
+ exports.FsAclEntryComponent = FsAclEntryComponent;
1235
+ exports.FsAclObjectRolesComponent = FsAclObjectRolesComponent;
1236
+ exports.FsAclPermissionPopoverComponent = FsAclPermissionPopoverComponent;
1237
+ exports.FsAclRoleComponent = FsAclRoleComponent;
1238
+ exports.FsAclRolePopoverComponent = FsAclRolePopoverComponent;
1103
1239
  exports.FsAclRolesComponent = FsAclRolesComponent;
1104
1240
  exports.FsAppAclModule = FsAppAclModule;
1105
1241
  exports.FsAppAclService = FsAppAclService;
1106
- exports.ɵa = FsAppAclService;
1107
- exports.ɵb = FsAclPermissionPopoverComponent;
1108
- exports.ɵc = FsAclRoleComponent;
1109
- exports.ɵd = FsAclRolePopoverComponent;
1110
- exports.ɵe = FsAclObjectRolesComponent;
1111
- exports.ɵf = FsAclEntryComponent;
1112
1242
 
1113
1243
  Object.defineProperty(exports, '__esModule', { value: true });
1114
1244
 
1115
- })));
1245
+ }));
1116
1246
  //# sourceMappingURL=firestitch-app-acl.umd.js.map