@firestitch/app-acl 12.4.3 → 12.4.4

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