@firestitch/app-acl 12.4.6 → 12.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) 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 -51
  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 +32 -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/pipes/bulk-options-filter.pipe.d.ts +13 -0
  26. package/app/services/app-acl.service.d.ts +16 -16
  27. package/bundles/firestitch-app-acl.umd.js +1352 -1322
  28. package/bundles/firestitch-app-acl.umd.js.map +1 -1
  29. package/esm2015/app/components/acl-entries/acl-entries.component.js +173 -173
  30. package/esm2015/app/components/acl-entry/acl-entry.component.js +93 -93
  31. package/esm2015/app/components/acl-object-roles/acl-object-roles.component.js +56 -56
  32. package/esm2015/app/components/acl-permission-popover/acl-permission-popover.component.js +32 -32
  33. package/esm2015/app/components/acl-role/acl-role.component.js +222 -221
  34. package/esm2015/app/components/acl-role-popover/acl-role-popover.component.js +37 -37
  35. package/esm2015/app/components/acl-roles/acl-roles.component.js +162 -162
  36. package/esm2015/app/consts/acl-role-accesses.js +7 -7
  37. package/esm2015/app/enums/acl-role-access.js +7 -7
  38. package/esm2015/app/fs-app-acl.module.js +127 -124
  39. package/esm2015/app/injectors/app-acl-config.injector.js +2 -2
  40. package/esm2015/app/interfaces/acl-entry-data.js +1 -1
  41. package/esm2015/app/interfaces/acl-entry.js +1 -1
  42. package/esm2015/app/interfaces/acl-level.js +1 -1
  43. package/esm2015/app/interfaces/acl-object-entry.js +1 -1
  44. package/esm2015/app/interfaces/acl-object-role.js +1 -1
  45. package/esm2015/app/interfaces/acl-object.js +1 -1
  46. package/esm2015/app/interfaces/acl-permission.js +1 -1
  47. package/esm2015/app/interfaces/acl-role-config.js +1 -1
  48. package/esm2015/app/interfaces/acl-role.js +1 -1
  49. package/esm2015/app/interfaces/app-acl-config.js +1 -1
  50. package/esm2015/app/interfaces/index.js +2 -2
  51. package/esm2015/app/interfaces/name-value.js +1 -1
  52. package/esm2015/app/interfaces/role-config.js +1 -1
  53. package/esm2015/app/pipes/bulk-options-filter.pipe.js +27 -0
  54. package/esm2015/app/services/app-acl.service.js +50 -50
  55. package/esm2015/firestitch-app-acl.js +4 -4
  56. package/esm2015/public_api.js +10 -10
  57. package/fesm2015/firestitch-app-acl.js +845 -818
  58. package/fesm2015/firestitch-app-acl.js.map +1 -1
  59. package/firestitch-app-acl.d.ts +5 -5
  60. package/package.json +1 -1
  61. package/public_api.d.ts +20 -20
@@ -45,1354 +45,1384 @@
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, SuppressedError, Symbol */
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 __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
116
- function accept(f) { if (f !== void 0 && typeof f !== "function")
117
- throw new TypeError("Function expected"); return f; }
118
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
119
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
120
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
121
- var _, done = false;
122
- for (var i = decorators.length - 1; i >= 0; i--) {
123
- var context = {};
124
- for (var p in contextIn)
125
- context[p] = p === "access" ? {} : contextIn[p];
126
- for (var p in contextIn.access)
127
- context.access[p] = contextIn.access[p];
128
- context.addInitializer = function (f) { if (done)
129
- throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
130
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
131
- if (kind === "accessor") {
132
- if (result === void 0)
133
- continue;
134
- if (result === null || typeof result !== "object")
135
- throw new TypeError("Object expected");
136
- if (_ = accept(result.get))
137
- descriptor.get = _;
138
- if (_ = accept(result.set))
139
- descriptor.set = _;
140
- if (_ = accept(result.init))
141
- initializers.unshift(_);
142
- }
143
- else if (_ = accept(result)) {
144
- if (kind === "field")
145
- initializers.unshift(_);
146
- else
147
- descriptor[key] = _;
148
- }
149
- }
150
- if (target)
151
- Object.defineProperty(target, contextIn.name, descriptor);
152
- done = true;
153
- }
154
- ;
155
- function __runInitializers(thisArg, initializers, value) {
156
- var useValue = arguments.length > 2;
157
- for (var i = 0; i < initializers.length; i++) {
158
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
159
- }
160
- return useValue ? value : void 0;
161
- }
162
- ;
163
- function __propKey(x) {
164
- return typeof x === "symbol" ? x : "".concat(x);
165
- }
166
- ;
167
- function __setFunctionName(f, name, prefix) {
168
- if (typeof name === "symbol")
169
- name = name.description ? "[".concat(name.description, "]") : "";
170
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
171
- }
172
- ;
173
- function __metadata(metadataKey, metadataValue) {
174
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
175
- return Reflect.metadata(metadataKey, metadataValue);
176
- }
177
- function __awaiter(thisArg, _arguments, P, generator) {
178
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
179
- return new (P || (P = Promise))(function (resolve, reject) {
180
- function fulfilled(value) { try {
181
- step(generator.next(value));
182
- }
183
- catch (e) {
184
- reject(e);
185
- } }
186
- function rejected(value) { try {
187
- step(generator["throw"](value));
188
- }
189
- catch (e) {
190
- reject(e);
191
- } }
192
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
193
- step((generator = generator.apply(thisArg, _arguments || [])).next());
194
- });
195
- }
196
- function __generator(thisArg, body) {
197
- var _ = { label: 0, sent: function () { if (t[0] & 1)
198
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
199
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
200
- function verb(n) { return function (v) { return step([n, v]); }; }
201
- function step(op) {
202
- if (f)
203
- throw new TypeError("Generator is already executing.");
204
- while (g && (g = 0, op[0] && (_ = 0)), _)
205
- try {
206
- 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)
207
- return t;
208
- if (y = 0, t)
209
- op = [op[0] & 2, t.value];
210
- switch (op[0]) {
211
- case 0:
212
- case 1:
213
- t = op;
214
- break;
215
- case 4:
216
- _.label++;
217
- return { value: op[1], done: false };
218
- case 5:
219
- _.label++;
220
- y = op[1];
221
- op = [0];
222
- continue;
223
- case 7:
224
- op = _.ops.pop();
225
- _.trys.pop();
226
- continue;
227
- default:
228
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
229
- _ = 0;
230
- continue;
231
- }
232
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
233
- _.label = op[1];
234
- break;
235
- }
236
- if (op[0] === 6 && _.label < t[1]) {
237
- _.label = t[1];
238
- t = op;
239
- break;
240
- }
241
- if (t && _.label < t[2]) {
242
- _.label = t[2];
243
- _.ops.push(op);
244
- break;
245
- }
246
- if (t[2])
247
- _.ops.pop();
248
- _.trys.pop();
249
- continue;
250
- }
251
- op = body.call(thisArg, _);
252
- }
253
- catch (e) {
254
- op = [6, e];
255
- y = 0;
256
- }
257
- finally {
258
- f = t = 0;
259
- }
260
- if (op[0] & 5)
261
- throw op[1];
262
- return { value: op[0] ? op[1] : void 0, done: true };
263
- }
264
- }
265
- var __createBinding = Object.create ? (function (o, m, k, k2) {
266
- if (k2 === undefined)
267
- k2 = k;
268
- var desc = Object.getOwnPropertyDescriptor(m, k);
269
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
270
- desc = { enumerable: true, get: function () { return m[k]; } };
271
- }
272
- Object.defineProperty(o, k2, desc);
273
- }) : (function (o, m, k, k2) {
274
- if (k2 === undefined)
275
- k2 = k;
276
- o[k2] = m[k];
277
- });
278
- function __exportStar(m, o) {
279
- for (var p in m)
280
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
281
- __createBinding(o, m, p);
282
- }
283
- function __values(o) {
284
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
285
- if (m)
286
- return m.call(o);
287
- if (o && typeof o.length === "number")
288
- return {
289
- next: function () {
290
- if (o && i >= o.length)
291
- o = void 0;
292
- return { value: o && o[i++], done: !o };
293
- }
294
- };
295
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
296
- }
297
- function __read(o, n) {
298
- var m = typeof Symbol === "function" && o[Symbol.iterator];
299
- if (!m)
300
- return o;
301
- var i = m.call(o), r, ar = [], e;
302
- try {
303
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
304
- ar.push(r.value);
305
- }
306
- catch (error) {
307
- e = { error: error };
308
- }
309
- finally {
310
- try {
311
- if (r && !r.done && (m = i["return"]))
312
- m.call(i);
313
- }
314
- finally {
315
- if (e)
316
- throw e.error;
317
- }
318
- }
319
- return ar;
320
- }
321
- /** @deprecated */
322
- function __spread() {
323
- for (var ar = [], i = 0; i < arguments.length; i++)
324
- ar = ar.concat(__read(arguments[i]));
325
- return ar;
326
- }
327
- /** @deprecated */
328
- function __spreadArrays() {
329
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
330
- s += arguments[i].length;
331
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
332
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
333
- r[k] = a[j];
334
- return r;
335
- }
336
- function __spreadArray(to, from, pack) {
337
- if (pack || arguments.length === 2)
338
- for (var i = 0, l = from.length, ar; i < l; i++) {
339
- if (ar || !(i in from)) {
340
- if (!ar)
341
- ar = Array.prototype.slice.call(from, 0, i);
342
- ar[i] = from[i];
343
- }
344
- }
345
- return to.concat(ar || Array.prototype.slice.call(from));
346
- }
347
- function __await(v) {
348
- return this instanceof __await ? (this.v = v, this) : new __await(v);
349
- }
350
- function __asyncGenerator(thisArg, _arguments, generator) {
351
- if (!Symbol.asyncIterator)
352
- throw new TypeError("Symbol.asyncIterator is not defined.");
353
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
354
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
355
- function verb(n) { if (g[n])
356
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
357
- function resume(n, v) { try {
358
- step(g[n](v));
359
- }
360
- catch (e) {
361
- settle(q[0][3], e);
362
- } }
363
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
364
- function fulfill(value) { resume("next", value); }
365
- function reject(value) { resume("throw", value); }
366
- function settle(f, v) { if (f(v), q.shift(), q.length)
367
- resume(q[0][0], q[0][1]); }
368
- }
369
- function __asyncDelegator(o) {
370
- var i, p;
371
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
372
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
373
- }
374
- function __asyncValues(o) {
375
- if (!Symbol.asyncIterator)
376
- throw new TypeError("Symbol.asyncIterator is not defined.");
377
- var m = o[Symbol.asyncIterator], i;
378
- 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);
379
- 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); }); }; }
380
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
381
- }
382
- function __makeTemplateObject(cooked, raw) {
383
- if (Object.defineProperty) {
384
- Object.defineProperty(cooked, "raw", { value: raw });
385
- }
386
- else {
387
- cooked.raw = raw;
388
- }
389
- return cooked;
390
- }
391
- ;
392
- var __setModuleDefault = Object.create ? (function (o, v) {
393
- Object.defineProperty(o, "default", { enumerable: true, value: v });
394
- }) : function (o, v) {
395
- o["default"] = v;
396
- };
397
- function __importStar(mod) {
398
- if (mod && mod.__esModule)
399
- return mod;
400
- var result = {};
401
- if (mod != null)
402
- for (var k in mod)
403
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
404
- __createBinding(result, mod, k);
405
- __setModuleDefault(result, mod);
406
- return result;
407
- }
408
- function __importDefault(mod) {
409
- return (mod && mod.__esModule) ? mod : { default: mod };
410
- }
411
- function __classPrivateFieldGet(receiver, state, kind, f) {
412
- if (kind === "a" && !f)
413
- throw new TypeError("Private accessor was defined without a getter");
414
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
415
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
416
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
417
- }
418
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
419
- if (kind === "m")
420
- throw new TypeError("Private method is not writable");
421
- if (kind === "a" && !f)
422
- throw new TypeError("Private accessor was defined without a setter");
423
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
424
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
425
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
426
- }
427
- function __classPrivateFieldIn(state, receiver) {
428
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
429
- throw new TypeError("Cannot use 'in' operator on non-object");
430
- return typeof state === "function" ? receiver === state : state.has(receiver);
431
- }
432
- function __addDisposableResource(env, value, async) {
433
- if (value !== null && value !== void 0) {
434
- if (typeof value !== "object")
435
- throw new TypeError("Object expected.");
436
- var dispose;
437
- if (async) {
438
- if (!Symbol.asyncDispose)
439
- throw new TypeError("Symbol.asyncDispose is not defined.");
440
- dispose = value[Symbol.asyncDispose];
441
- }
442
- if (dispose === void 0) {
443
- if (!Symbol.dispose)
444
- throw new TypeError("Symbol.dispose is not defined.");
445
- dispose = value[Symbol.dispose];
446
- }
447
- if (typeof dispose !== "function")
448
- throw new TypeError("Object not disposable.");
449
- env.stack.push({ value: value, dispose: dispose, async: async });
450
- }
451
- else if (async) {
452
- env.stack.push({ async: true });
453
- }
454
- return value;
455
- }
456
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
457
- var e = new Error(message);
458
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
459
- };
460
- function __disposeResources(env) {
461
- function fail(e) {
462
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
463
- env.hasError = true;
464
- }
465
- function next() {
466
- while (env.stack.length) {
467
- var rec = env.stack.pop();
468
- try {
469
- var result = rec.dispose && rec.dispose.call(rec.value);
470
- if (rec.async)
471
- return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
472
- }
473
- catch (e) {
474
- fail(e);
475
- }
476
- }
477
- if (env.hasError)
478
- throw env.error;
479
- }
480
- return next();
481
- }
482
- var tslib_es6 = {
483
- __extends: __extends,
484
- __assign: __assign,
485
- __rest: __rest,
486
- __decorate: __decorate,
487
- __param: __param,
488
- __metadata: __metadata,
489
- __awaiter: __awaiter,
490
- __generator: __generator,
491
- __createBinding: __createBinding,
492
- __exportStar: __exportStar,
493
- __values: __values,
494
- __read: __read,
495
- __spread: __spread,
496
- __spreadArrays: __spreadArrays,
497
- __spreadArray: __spreadArray,
498
- __await: __await,
499
- __asyncGenerator: __asyncGenerator,
500
- __asyncDelegator: __asyncDelegator,
501
- __asyncValues: __asyncValues,
502
- __makeTemplateObject: __makeTemplateObject,
503
- __importStar: __importStar,
504
- __importDefault: __importDefault,
505
- __classPrivateFieldGet: __classPrivateFieldGet,
506
- __classPrivateFieldSet: __classPrivateFieldSet,
507
- __classPrivateFieldIn: __classPrivateFieldIn,
508
- __addDisposableResource: __addDisposableResource,
509
- __disposeResources: __disposeResources,
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, SuppressedError, Symbol */
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 __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
116
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
117
+ throw new TypeError("Function expected"); return f; }
118
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
119
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
120
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
121
+ var _, done = false;
122
+ for (var i = decorators.length - 1; i >= 0; i--) {
123
+ var context = {};
124
+ for (var p in contextIn)
125
+ context[p] = p === "access" ? {} : contextIn[p];
126
+ for (var p in contextIn.access)
127
+ context.access[p] = contextIn.access[p];
128
+ context.addInitializer = function (f) { if (done)
129
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
130
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
131
+ if (kind === "accessor") {
132
+ if (result === void 0)
133
+ continue;
134
+ if (result === null || typeof result !== "object")
135
+ throw new TypeError("Object expected");
136
+ if (_ = accept(result.get))
137
+ descriptor.get = _;
138
+ if (_ = accept(result.set))
139
+ descriptor.set = _;
140
+ if (_ = accept(result.init))
141
+ initializers.unshift(_);
142
+ }
143
+ else if (_ = accept(result)) {
144
+ if (kind === "field")
145
+ initializers.unshift(_);
146
+ else
147
+ descriptor[key] = _;
148
+ }
149
+ }
150
+ if (target)
151
+ Object.defineProperty(target, contextIn.name, descriptor);
152
+ done = true;
153
+ }
154
+ ;
155
+ function __runInitializers(thisArg, initializers, value) {
156
+ var useValue = arguments.length > 2;
157
+ for (var i = 0; i < initializers.length; i++) {
158
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
159
+ }
160
+ return useValue ? value : void 0;
161
+ }
162
+ ;
163
+ function __propKey(x) {
164
+ return typeof x === "symbol" ? x : "".concat(x);
165
+ }
166
+ ;
167
+ function __setFunctionName(f, name, prefix) {
168
+ if (typeof name === "symbol")
169
+ name = name.description ? "[".concat(name.description, "]") : "";
170
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
171
+ }
172
+ ;
173
+ function __metadata(metadataKey, metadataValue) {
174
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
175
+ return Reflect.metadata(metadataKey, metadataValue);
176
+ }
177
+ function __awaiter(thisArg, _arguments, P, generator) {
178
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
179
+ return new (P || (P = Promise))(function (resolve, reject) {
180
+ function fulfilled(value) { try {
181
+ step(generator.next(value));
182
+ }
183
+ catch (e) {
184
+ reject(e);
185
+ } }
186
+ function rejected(value) { try {
187
+ step(generator["throw"](value));
188
+ }
189
+ catch (e) {
190
+ reject(e);
191
+ } }
192
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
193
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
194
+ });
195
+ }
196
+ function __generator(thisArg, body) {
197
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
198
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
199
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
200
+ function verb(n) { return function (v) { return step([n, v]); }; }
201
+ function step(op) {
202
+ if (f)
203
+ throw new TypeError("Generator is already executing.");
204
+ while (g && (g = 0, op[0] && (_ = 0)), _)
205
+ try {
206
+ 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)
207
+ return t;
208
+ if (y = 0, t)
209
+ op = [op[0] & 2, t.value];
210
+ switch (op[0]) {
211
+ case 0:
212
+ case 1:
213
+ t = op;
214
+ break;
215
+ case 4:
216
+ _.label++;
217
+ return { value: op[1], done: false };
218
+ case 5:
219
+ _.label++;
220
+ y = op[1];
221
+ op = [0];
222
+ continue;
223
+ case 7:
224
+ op = _.ops.pop();
225
+ _.trys.pop();
226
+ continue;
227
+ default:
228
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
229
+ _ = 0;
230
+ continue;
231
+ }
232
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
233
+ _.label = op[1];
234
+ break;
235
+ }
236
+ if (op[0] === 6 && _.label < t[1]) {
237
+ _.label = t[1];
238
+ t = op;
239
+ break;
240
+ }
241
+ if (t && _.label < t[2]) {
242
+ _.label = t[2];
243
+ _.ops.push(op);
244
+ break;
245
+ }
246
+ if (t[2])
247
+ _.ops.pop();
248
+ _.trys.pop();
249
+ continue;
250
+ }
251
+ op = body.call(thisArg, _);
252
+ }
253
+ catch (e) {
254
+ op = [6, e];
255
+ y = 0;
256
+ }
257
+ finally {
258
+ f = t = 0;
259
+ }
260
+ if (op[0] & 5)
261
+ throw op[1];
262
+ return { value: op[0] ? op[1] : void 0, done: true };
263
+ }
264
+ }
265
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
266
+ if (k2 === undefined)
267
+ k2 = k;
268
+ var desc = Object.getOwnPropertyDescriptor(m, k);
269
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
270
+ desc = { enumerable: true, get: function () { return m[k]; } };
271
+ }
272
+ Object.defineProperty(o, k2, desc);
273
+ }) : (function (o, m, k, k2) {
274
+ if (k2 === undefined)
275
+ k2 = k;
276
+ o[k2] = m[k];
277
+ });
278
+ function __exportStar(m, o) {
279
+ for (var p in m)
280
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
281
+ __createBinding(o, m, p);
282
+ }
283
+ function __values(o) {
284
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
285
+ if (m)
286
+ return m.call(o);
287
+ if (o && typeof o.length === "number")
288
+ return {
289
+ next: function () {
290
+ if (o && i >= o.length)
291
+ o = void 0;
292
+ return { value: o && o[i++], done: !o };
293
+ }
294
+ };
295
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
296
+ }
297
+ function __read(o, n) {
298
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
299
+ if (!m)
300
+ return o;
301
+ var i = m.call(o), r, ar = [], e;
302
+ try {
303
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
304
+ ar.push(r.value);
305
+ }
306
+ catch (error) {
307
+ e = { error: error };
308
+ }
309
+ finally {
310
+ try {
311
+ if (r && !r.done && (m = i["return"]))
312
+ m.call(i);
313
+ }
314
+ finally {
315
+ if (e)
316
+ throw e.error;
317
+ }
318
+ }
319
+ return ar;
320
+ }
321
+ /** @deprecated */
322
+ function __spread() {
323
+ for (var ar = [], i = 0; i < arguments.length; i++)
324
+ ar = ar.concat(__read(arguments[i]));
325
+ return ar;
326
+ }
327
+ /** @deprecated */
328
+ function __spreadArrays() {
329
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
330
+ s += arguments[i].length;
331
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
332
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
333
+ r[k] = a[j];
334
+ return r;
335
+ }
336
+ function __spreadArray(to, from, pack) {
337
+ if (pack || arguments.length === 2)
338
+ for (var i = 0, l = from.length, ar; i < l; i++) {
339
+ if (ar || !(i in from)) {
340
+ if (!ar)
341
+ ar = Array.prototype.slice.call(from, 0, i);
342
+ ar[i] = from[i];
343
+ }
344
+ }
345
+ return to.concat(ar || Array.prototype.slice.call(from));
346
+ }
347
+ function __await(v) {
348
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
349
+ }
350
+ function __asyncGenerator(thisArg, _arguments, generator) {
351
+ if (!Symbol.asyncIterator)
352
+ throw new TypeError("Symbol.asyncIterator is not defined.");
353
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
354
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
355
+ function verb(n) { if (g[n])
356
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
357
+ function resume(n, v) { try {
358
+ step(g[n](v));
359
+ }
360
+ catch (e) {
361
+ settle(q[0][3], e);
362
+ } }
363
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
364
+ function fulfill(value) { resume("next", value); }
365
+ function reject(value) { resume("throw", value); }
366
+ function settle(f, v) { if (f(v), q.shift(), q.length)
367
+ resume(q[0][0], q[0][1]); }
368
+ }
369
+ function __asyncDelegator(o) {
370
+ var i, p;
371
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
372
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
373
+ }
374
+ function __asyncValues(o) {
375
+ if (!Symbol.asyncIterator)
376
+ throw new TypeError("Symbol.asyncIterator is not defined.");
377
+ var m = o[Symbol.asyncIterator], i;
378
+ 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);
379
+ 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); }); }; }
380
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
381
+ }
382
+ function __makeTemplateObject(cooked, raw) {
383
+ if (Object.defineProperty) {
384
+ Object.defineProperty(cooked, "raw", { value: raw });
385
+ }
386
+ else {
387
+ cooked.raw = raw;
388
+ }
389
+ return cooked;
390
+ }
391
+ ;
392
+ var __setModuleDefault = Object.create ? (function (o, v) {
393
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
394
+ }) : function (o, v) {
395
+ o["default"] = v;
396
+ };
397
+ function __importStar(mod) {
398
+ if (mod && mod.__esModule)
399
+ return mod;
400
+ var result = {};
401
+ if (mod != null)
402
+ for (var k in mod)
403
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
404
+ __createBinding(result, mod, k);
405
+ __setModuleDefault(result, mod);
406
+ return result;
407
+ }
408
+ function __importDefault(mod) {
409
+ return (mod && mod.__esModule) ? mod : { default: mod };
410
+ }
411
+ function __classPrivateFieldGet(receiver, state, kind, f) {
412
+ if (kind === "a" && !f)
413
+ throw new TypeError("Private accessor was defined without a getter");
414
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
415
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
416
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
417
+ }
418
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
419
+ if (kind === "m")
420
+ throw new TypeError("Private method is not writable");
421
+ if (kind === "a" && !f)
422
+ throw new TypeError("Private accessor was defined without a setter");
423
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
424
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
425
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
426
+ }
427
+ function __classPrivateFieldIn(state, receiver) {
428
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
429
+ throw new TypeError("Cannot use 'in' operator on non-object");
430
+ return typeof state === "function" ? receiver === state : state.has(receiver);
431
+ }
432
+ function __addDisposableResource(env, value, async) {
433
+ if (value !== null && value !== void 0) {
434
+ if (typeof value !== "object")
435
+ throw new TypeError("Object expected.");
436
+ var dispose;
437
+ if (async) {
438
+ if (!Symbol.asyncDispose)
439
+ throw new TypeError("Symbol.asyncDispose is not defined.");
440
+ dispose = value[Symbol.asyncDispose];
441
+ }
442
+ if (dispose === void 0) {
443
+ if (!Symbol.dispose)
444
+ throw new TypeError("Symbol.dispose is not defined.");
445
+ dispose = value[Symbol.dispose];
446
+ }
447
+ if (typeof dispose !== "function")
448
+ throw new TypeError("Object not disposable.");
449
+ env.stack.push({ value: value, dispose: dispose, async: async });
450
+ }
451
+ else if (async) {
452
+ env.stack.push({ async: true });
453
+ }
454
+ return value;
455
+ }
456
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
457
+ var e = new Error(message);
458
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
459
+ };
460
+ function __disposeResources(env) {
461
+ function fail(e) {
462
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
463
+ env.hasError = true;
464
+ }
465
+ function next() {
466
+ while (env.stack.length) {
467
+ var rec = env.stack.pop();
468
+ try {
469
+ var result = rec.dispose && rec.dispose.call(rec.value);
470
+ if (rec.async)
471
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
472
+ }
473
+ catch (e) {
474
+ fail(e);
475
+ }
476
+ }
477
+ if (env.hasError)
478
+ throw env.error;
479
+ }
480
+ return next();
481
+ }
482
+ var tslib_es6 = {
483
+ __extends: __extends,
484
+ __assign: __assign,
485
+ __rest: __rest,
486
+ __decorate: __decorate,
487
+ __param: __param,
488
+ __metadata: __metadata,
489
+ __awaiter: __awaiter,
490
+ __generator: __generator,
491
+ __createBinding: __createBinding,
492
+ __exportStar: __exportStar,
493
+ __values: __values,
494
+ __read: __read,
495
+ __spread: __spread,
496
+ __spreadArrays: __spreadArrays,
497
+ __spreadArray: __spreadArray,
498
+ __await: __await,
499
+ __asyncGenerator: __asyncGenerator,
500
+ __asyncDelegator: __asyncDelegator,
501
+ __asyncValues: __asyncValues,
502
+ __makeTemplateObject: __makeTemplateObject,
503
+ __importStar: __importStar,
504
+ __importDefault: __importDefault,
505
+ __classPrivateFieldGet: __classPrivateFieldGet,
506
+ __classPrivateFieldSet: __classPrivateFieldSet,
507
+ __classPrivateFieldIn: __classPrivateFieldIn,
508
+ __addDisposableResource: __addDisposableResource,
509
+ __disposeResources: __disposeResources,
510
510
  };
511
511
 
512
- var AclRoleAccess;
513
- (function (AclRoleAccess) {
514
- AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
515
- AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
516
- AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
517
- AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
512
+ var AclRoleAccess;
513
+ (function (AclRoleAccess) {
514
+ AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
515
+ AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
516
+ AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
517
+ AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
518
518
  })(AclRoleAccess || (AclRoleAccess = {}));
519
519
 
520
- var AclRoleAccesses = [
521
- { name: 'None', value: AclRoleAccess.None },
522
- { name: 'Read', value: AclRoleAccess.Read },
523
- { name: 'Write', value: AclRoleAccess.Write },
524
- { name: 'Full', value: AclRoleAccess.Full }
520
+ var AclRoleAccesses = [
521
+ { name: 'None', value: AclRoleAccess.None },
522
+ { name: 'Read', value: AclRoleAccess.Read },
523
+ { name: 'Write', value: AclRoleAccess.Write },
524
+ { name: 'Full', value: AclRoleAccess.Full }
525
525
  ];
526
526
 
527
527
  var FS_APP_ACL_CONFIG = new i0.InjectionToken('fs-app-acl-config');
528
528
 
529
- var FsAppAclService = /** @class */ (function () {
530
- function FsAppAclService(_appAclConfig) {
531
- this._appAclConfig = _appAclConfig;
532
- }
533
- FsAppAclService.prototype.getPermissions = function () {
534
- var _this = this;
535
- if (!this._permissions$) {
536
- this._permissions$ = new rxjs.ReplaySubject();
537
- this._appAclConfig.permissions
538
- .subscribe(function (permissions) {
539
- _this._permissions$.next(permissions);
540
- _this._permissions$.complete();
541
- });
542
- }
543
- return this._permissions$;
544
- };
545
- FsAppAclService.prototype.getLevels = function () {
546
- var _this = this;
547
- if (!this._levels$) {
548
- this._levels$ = new rxjs.ReplaySubject();
549
- this._appAclConfig.levels
550
- .subscribe(function (levels) {
551
- _this._levels$.next(levels);
552
- _this._levels$.complete();
553
- });
554
- }
555
- return this._levels$;
556
- };
557
- FsAppAclService.prototype.getIndexedLevels = function () {
558
- return this.getLevels()
559
- .pipe(operators.map(function (data) {
560
- return common.list(data, 'name', 'value');
561
- }));
562
- };
563
- return FsAppAclService;
564
- }());
565
- FsAppAclService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclService, deps: [{ token: FS_APP_ACL_CONFIG }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
566
- FsAppAclService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclService, providedIn: 'root' });
567
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclService, decorators: [{
568
- type: i0.Injectable,
569
- args: [{
570
- providedIn: 'root',
571
- }]
572
- }], ctorParameters: function () {
573
- return [{ type: undefined, decorators: [{
574
- type: i0.Inject,
575
- args: [FS_APP_ACL_CONFIG]
576
- }] }];
529
+ var FsAppAclService = /** @class */ (function () {
530
+ function FsAppAclService(_appAclConfig) {
531
+ this._appAclConfig = _appAclConfig;
532
+ }
533
+ FsAppAclService.prototype.getPermissions = function () {
534
+ var _this = this;
535
+ if (!this._permissions$) {
536
+ this._permissions$ = new rxjs.ReplaySubject();
537
+ this._appAclConfig.permissions
538
+ .subscribe(function (permissions) {
539
+ _this._permissions$.next(permissions);
540
+ _this._permissions$.complete();
541
+ });
542
+ }
543
+ return this._permissions$;
544
+ };
545
+ FsAppAclService.prototype.getLevels = function () {
546
+ var _this = this;
547
+ if (!this._levels$) {
548
+ this._levels$ = new rxjs.ReplaySubject();
549
+ this._appAclConfig.levels
550
+ .subscribe(function (levels) {
551
+ _this._levels$.next(levels);
552
+ _this._levels$.complete();
553
+ });
554
+ }
555
+ return this._levels$;
556
+ };
557
+ FsAppAclService.prototype.getIndexedLevels = function () {
558
+ return this.getLevels()
559
+ .pipe(operators.map(function (data) {
560
+ return common.list(data, 'name', 'value');
561
+ }));
562
+ };
563
+ return FsAppAclService;
564
+ }());
565
+ FsAppAclService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclService, deps: [{ token: FS_APP_ACL_CONFIG }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
566
+ FsAppAclService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclService, providedIn: 'root' });
567
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclService, decorators: [{
568
+ type: i0.Injectable,
569
+ args: [{
570
+ providedIn: 'root',
571
+ }]
572
+ }], ctorParameters: function () {
573
+ return [{ type: undefined, decorators: [{
574
+ type: i0.Inject,
575
+ args: [FS_APP_ACL_CONFIG]
576
+ }] }];
577
577
  } });
578
578
 
579
- var FsAclRoleComponent = /** @class */ (function () {
580
- function FsAclRoleComponent(_data, _appAclService, _dialogRef, _message, _cdRef) {
581
- var _this = this;
582
- this._data = _data;
583
- this._appAclService = _appAclService;
584
- this._dialogRef = _dialogRef;
585
- this._message = _message;
586
- this._cdRef = _cdRef;
587
- this.aclRole = null;
588
- this.permissions = [];
589
- this.levelPermissions = [];
590
- this.AclRoleAccesses = AclRoleAccesses;
591
- this.indexedAccesses = {};
592
- this.aclLevels = [];
593
- this.indexedAclLevels = {};
594
- this.onlyFullAccess = false;
595
- this.AclLevels = {};
596
- this.roleConfigs = [];
597
- this.aclRoleConfigValues = {};
598
- this.aclRolePermissions = {};
599
- this._destroy$ = new rxjs.Subject();
600
- this.save = function () {
601
- var aclRoleConfigs = _this.roleConfigs
602
- .map(function (roleConfig) {
603
- return {
604
- name: roleConfig.name,
605
- value: _this.aclRoleConfigValues[roleConfig.name],
606
- };
607
- });
608
- var aclRole = Object.assign(Object.assign({}, _this.aclRole), { permissions: _this.levelPermissions.map(function (permission) {
609
- return {
610
- value: permission.value,
611
- access: _this.aclRolePermissions[permission.value] || 0,
612
- };
613
- }), aclRoleConfigs: aclRoleConfigs });
614
- return _this._data.saveAclRole(aclRole)
615
- .pipe(operators.tap(function (response) {
616
- _this._message.success('Saved Changes');
617
- _this.close(response);
618
- }));
619
- };
620
- }
621
- FsAclRoleComponent.prototype.ngOnInit = function () {
622
- var _this = this;
623
- rxjs.forkJoin(this.getRole(), this._appAclService.getPermissions())
624
- .pipe(operators.takeUntil(this._destroy$))
625
- .subscribe(function (_a) {
626
- var _b = __read(_a, 2), aclRole = _b[0], aclPermissions = _b[1];
627
- _this.permissions = aclPermissions;
628
- _this.aclLevels = _this._data.aclLevels;
629
- _this.indexedAclLevels = common.list(_this.aclLevels, 'name', 'value');
630
- _this.indexedAccesses = common.list(AclRoleAccesses, 'name', 'value');
631
- _this.aclRole = Object.assign({
632
- aclPermissions: [],
633
- allPermissions: true,
634
- aclRoleConfigs: [],
635
- permissions: {},
636
- level: _this.aclLevels[0].value,
637
- }, aclRole);
638
- _this.aclRoleConfigValues = (aclRole.aclRoleConfigs || [])
639
- .reduce(function (accum, aclRoleConfig) {
640
- var _a;
641
- return Object.assign(Object.assign({}, accum), (_a = {}, _a[aclRoleConfig.name] = aclRoleConfig.value, _a));
642
- }, {});
643
- if (_this.aclRole.id) {
644
- _this.permissions.forEach(function (permission) {
645
- var access = 0;
646
- var aclPermission = _this.aclRole.aclPermissions.find(function (item) {
647
- return item.permission === permission.value;
648
- });
649
- if (aclPermission) {
650
- access = aclPermission.access;
651
- }
652
- _this.aclRolePermissions[permission.value] = access;
653
- });
654
- }
655
- if (_this.aclRole.allPermissions) {
656
- _this._applyMaxPermissionAccess();
657
- }
658
- _this._updatePermissions();
659
- _this._updateRoleConfigs();
660
- _this._cdRef.markForCheck();
661
- });
662
- this.listConfig = {
663
- status: false,
664
- paging: false,
665
- noResults: {
666
- message: '',
667
- },
668
- group: {
669
- initialExpand: true,
670
- groupBy: function (data) {
671
- return data;
672
- },
673
- compareBy: function (data) {
674
- return data.category || 'General';
675
- },
676
- },
677
- fetch: function () {
678
- return rxjs.of({
679
- data: _this.levelPermissions.sort(function (a, b) {
680
- a = a.name.toUpperCase();
681
- b = b.name.toUpperCase();
682
- if (a < b) {
683
- return -1;
684
- }
685
- else if (a > b) {
686
- return 1;
687
- }
688
- return 0;
689
- }),
690
- });
691
- },
692
- };
693
- };
694
- FsAclRoleComponent.prototype.bulkChange = function (event, groupChildren, group) {
695
- var _this = this;
696
- groupChildren
697
- .forEach(function (permission) {
698
- var access = permission.accesses
699
- .find(function (access) { return event.value === access; });
700
- if (access || !event.value) {
701
- _this.aclRolePermissions[permission.value] = event.value;
702
- }
703
- });
704
- event.source.writeValue(null);
705
- };
706
- FsAclRoleComponent.prototype.levelChange = function () {
707
- this._updatePermissions();
708
- this._updateRoleConfigs();
709
- this.list.reload();
710
- };
711
- FsAclRoleComponent.prototype.getRole = function () {
712
- if (!this._data.aclRole.id) {
713
- return rxjs.of(this._data.aclRole);
714
- }
715
- var query = {
716
- aclPermissions: true,
717
- aclRoleConfigs: true,
718
- };
719
- if (!this.environment) {
720
- query.environmentId = null;
721
- }
722
- return this._data.loadAclRole(this._data.aclRole, query);
723
- };
724
- FsAclRoleComponent.prototype.close = function (data) {
725
- if (data === void 0) { data = null; }
726
- this._dialogRef.close(data);
727
- };
728
- FsAclRoleComponent.prototype.allPermissionsChange = function (all) {
729
- this._updatePermissions();
730
- if (all) {
731
- this._applyMaxPermissionAccess();
732
- }
733
- };
734
- FsAclRoleComponent.prototype.ngOnDestroy = function () {
735
- this._destroy$.next();
736
- this._destroy$.complete();
737
- };
738
- FsAclRoleComponent.prototype._updatePermissions = function () {
739
- var _this = this;
740
- this.levelPermissions = this.permissions.filter(function (permission) {
741
- return permission.levels.some(function (item) {
742
- return item === _this.aclRole.level;
743
- });
744
- });
745
- };
746
- FsAclRoleComponent.prototype._updateRoleConfigs = function () {
747
- var _this = this;
748
- if (this._data.loadRoleConfigs) {
749
- this._data.loadRoleConfigs()
750
- .subscribe(function (roleConfigs) {
751
- _this.roleConfigs = roleConfigs
752
- .filter(function (roleConfig) { return roleConfig.level === _this.aclRole.level; });
753
- _this._cdRef.markForCheck();
754
- });
755
- }
756
- };
757
- FsAclRoleComponent.prototype._applyMaxPermissionAccess = function () {
758
- var _this = this;
759
- this.permissions.forEach(function (permission) {
760
- _this.aclRolePermissions[permission.value] = Math.max.apply(Math, __spreadArray([], __read(permission.accesses)));
761
- });
762
- };
763
- return FsAclRoleComponent;
764
- }());
765
- FsAclRoleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
766
- FsAclRoleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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", "mobileActionPlacement", "mobileWidth", "mode"] }, { 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", "deactivationGuard"], 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: i15__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { 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.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", 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 });
767
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRoleComponent, decorators: [{
768
- type: i0.Component,
769
- args: [{
770
- templateUrl: './acl-role.component.html',
771
- styleUrls: ['./acl-role.component.scss'],
772
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
773
- }]
774
- }], ctorParameters: function () {
775
- return [{ type: undefined, decorators: [{
776
- type: i0.Inject,
777
- args: [i2.MAT_DIALOG_DATA]
778
- }] }, { type: FsAppAclService }, { type: i2__namespace.MatDialogRef }, { type: i3__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
779
- }, propDecorators: { list: [{
780
- type: i0.ViewChild,
781
- args: [i12.FsListComponent]
579
+ var BulkOptionsFilterPipe = /** @class */ (function () {
580
+ function BulkOptionsFilterPipe() {
581
+ }
582
+ BulkOptionsFilterPipe.prototype.transform = function (rolesList, children) {
583
+ var accessLevels = this._uniqListOfAccessLevels(children);
584
+ return rolesList.filter(function (permission) {
585
+ return permission.value === 0 || accessLevels.has(permission.value);
586
+ });
587
+ };
588
+ BulkOptionsFilterPipe.prototype._uniqListOfAccessLevels = function (children) {
589
+ return children.reduce(function (acc, value) {
590
+ value.accesses.forEach(function (access) {
591
+ acc.add(access);
592
+ });
593
+ return acc;
594
+ }, (new Set));
595
+ };
596
+ return BulkOptionsFilterPipe;
597
+ }());
598
+ BulkOptionsFilterPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BulkOptionsFilterPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
599
+ BulkOptionsFilterPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BulkOptionsFilterPipe, name: "builkOptionsFilter" });
600
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BulkOptionsFilterPipe, decorators: [{
601
+ type: i0.Pipe,
602
+ args: [{
603
+ name: 'builkOptionsFilter'
604
+ }]
605
+ }] });
606
+
607
+ var FsAclRoleComponent = /** @class */ (function () {
608
+ function FsAclRoleComponent(_data, _appAclService, _dialogRef, _message, _cdRef) {
609
+ var _this = this;
610
+ this._data = _data;
611
+ this._appAclService = _appAclService;
612
+ this._dialogRef = _dialogRef;
613
+ this._message = _message;
614
+ this._cdRef = _cdRef;
615
+ this.aclRole = null;
616
+ this.permissions = [];
617
+ this.levelPermissions = [];
618
+ this.AclRoleAccesses = AclRoleAccesses;
619
+ this.indexedAccesses = {};
620
+ this.aclLevels = [];
621
+ this.indexedAclLevels = {};
622
+ this.onlyFullAccess = false;
623
+ this.AclLevels = {};
624
+ this.roleConfigs = [];
625
+ this.aclRoleConfigValues = {};
626
+ this.aclRolePermissions = {};
627
+ this._destroy$ = new rxjs.Subject();
628
+ this.save = function () {
629
+ var aclRoleConfigs = _this.roleConfigs
630
+ .map(function (roleConfig) {
631
+ return {
632
+ name: roleConfig.name,
633
+ value: _this.aclRoleConfigValues[roleConfig.name],
634
+ };
635
+ });
636
+ var aclRole = Object.assign(Object.assign({}, _this.aclRole), { permissions: _this.levelPermissions.map(function (permission) {
637
+ return {
638
+ value: permission.value,
639
+ access: _this.aclRolePermissions[permission.value] || 0,
640
+ };
641
+ }), aclRoleConfigs: aclRoleConfigs });
642
+ return _this._data.saveAclRole(aclRole)
643
+ .pipe(operators.tap(function (response) {
644
+ _this._message.success('Saved Changes');
645
+ _this.close(response);
646
+ }));
647
+ };
648
+ }
649
+ FsAclRoleComponent.prototype.ngOnInit = function () {
650
+ var _this = this;
651
+ rxjs.forkJoin(this.getRole(), this._appAclService.getPermissions())
652
+ .pipe(operators.takeUntil(this._destroy$))
653
+ .subscribe(function (_a) {
654
+ var _b = __read(_a, 2), aclRole = _b[0], aclPermissions = _b[1];
655
+ _this.permissions = aclPermissions;
656
+ _this.aclLevels = _this._data.aclLevels;
657
+ _this.indexedAclLevels = common.list(_this.aclLevels, 'name', 'value');
658
+ _this.indexedAccesses = common.list(AclRoleAccesses, 'name', 'value');
659
+ _this.aclRole = Object.assign({
660
+ aclPermissions: [],
661
+ allPermissions: true,
662
+ aclRoleConfigs: [],
663
+ permissions: {},
664
+ level: _this.aclLevels[0].value,
665
+ }, aclRole);
666
+ _this.aclRoleConfigValues = (aclRole.aclRoleConfigs || [])
667
+ .reduce(function (accum, aclRoleConfig) {
668
+ var _a;
669
+ return Object.assign(Object.assign({}, accum), (_a = {}, _a[aclRoleConfig.name] = aclRoleConfig.value, _a));
670
+ }, {});
671
+ if (_this.aclRole.id) {
672
+ _this.permissions.forEach(function (permission) {
673
+ var access = 0;
674
+ var aclPermission = _this.aclRole.aclPermissions.find(function (item) {
675
+ return item.permission === permission.value;
676
+ });
677
+ if (aclPermission) {
678
+ access = aclPermission.access;
679
+ }
680
+ _this.aclRolePermissions[permission.value] = access;
681
+ });
682
+ }
683
+ if (_this.aclRole.allPermissions) {
684
+ _this._applyMaxPermissionAccess();
685
+ }
686
+ _this._updatePermissions();
687
+ _this._updateRoleConfigs();
688
+ _this._cdRef.markForCheck();
689
+ });
690
+ this.listConfig = {
691
+ status: false,
692
+ paging: false,
693
+ noResults: {
694
+ message: '',
695
+ },
696
+ group: {
697
+ initialExpand: true,
698
+ groupBy: function (data) {
699
+ return data;
700
+ },
701
+ compareBy: function (data) {
702
+ return data.category || 'General';
703
+ },
704
+ },
705
+ fetch: function () {
706
+ return rxjs.of({
707
+ data: _this.levelPermissions.sort(function (a, b) {
708
+ a = a.name.toUpperCase();
709
+ b = b.name.toUpperCase();
710
+ if (a < b) {
711
+ return -1;
712
+ }
713
+ else if (a > b) {
714
+ return 1;
715
+ }
716
+ return 0;
717
+ }),
718
+ });
719
+ },
720
+ };
721
+ };
722
+ FsAclRoleComponent.prototype.bulkChange = function (event, groupChildren, group) {
723
+ var _this = this;
724
+ groupChildren
725
+ .forEach(function (permission) {
726
+ var access = permission.accesses
727
+ .find(function (access) { return event.value === access; });
728
+ if (access || !event.value) {
729
+ _this.aclRolePermissions[permission.value] = event.value;
730
+ }
731
+ });
732
+ event.source.writeValue(null);
733
+ };
734
+ FsAclRoleComponent.prototype.levelChange = function () {
735
+ this._updatePermissions();
736
+ this._updateRoleConfigs();
737
+ this.list.reload();
738
+ };
739
+ FsAclRoleComponent.prototype.getRole = function () {
740
+ if (!this._data.aclRole.id) {
741
+ return rxjs.of(this._data.aclRole);
742
+ }
743
+ var query = {
744
+ aclPermissions: true,
745
+ aclRoleConfigs: true,
746
+ };
747
+ if (!this.environment) {
748
+ query.environmentId = null;
749
+ }
750
+ return this._data.loadAclRole(this._data.aclRole, query);
751
+ };
752
+ FsAclRoleComponent.prototype.close = function (data) {
753
+ if (data === void 0) { data = null; }
754
+ this._dialogRef.close(data);
755
+ };
756
+ FsAclRoleComponent.prototype.allPermissionsChange = function (all) {
757
+ this._updatePermissions();
758
+ if (all) {
759
+ this._applyMaxPermissionAccess();
760
+ }
761
+ };
762
+ FsAclRoleComponent.prototype.ngOnDestroy = function () {
763
+ this._destroy$.next();
764
+ this._destroy$.complete();
765
+ };
766
+ FsAclRoleComponent.prototype._updatePermissions = function () {
767
+ var _this = this;
768
+ this.levelPermissions = this.permissions.filter(function (permission) {
769
+ return permission.levels.some(function (item) {
770
+ return item === _this.aclRole.level;
771
+ });
772
+ });
773
+ };
774
+ FsAclRoleComponent.prototype._updateRoleConfigs = function () {
775
+ var _this = this;
776
+ if (this._data.loadRoleConfigs) {
777
+ this._data.loadRoleConfigs()
778
+ .subscribe(function (roleConfigs) {
779
+ _this.roleConfigs = roleConfigs
780
+ .filter(function (roleConfig) { return roleConfig.level === _this.aclRole.level; });
781
+ _this._cdRef.markForCheck();
782
+ });
783
+ }
784
+ };
785
+ FsAclRoleComponent.prototype._applyMaxPermissionAccess = function () {
786
+ var _this = this;
787
+ this.permissions.forEach(function (permission) {
788
+ _this.aclRolePermissions[permission.value] = Math.max.apply(Math, __spreadArray([], __read(permission.accesses)));
789
+ });
790
+ };
791
+ return FsAclRoleComponent;
792
+ }());
793
+ FsAclRoleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
794
+ FsAclRoleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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 | builkOptionsFilter: groupChildren\">\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", "mobileActionPlacement", "mobileWidth", "mode"] }, { 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", "deactivationGuard"], 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: i15__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { 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.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "builkOptionsFilter": BulkOptionsFilterPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
795
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRoleComponent, decorators: [{
796
+ type: i0.Component,
797
+ args: [{
798
+ templateUrl: './acl-role.component.html',
799
+ styleUrls: ['./acl-role.component.scss'],
800
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
801
+ }]
802
+ }], ctorParameters: function () {
803
+ return [{ type: undefined, decorators: [{
804
+ type: i0.Inject,
805
+ args: [i2.MAT_DIALOG_DATA]
806
+ }] }, { type: FsAppAclService }, { type: i2__namespace.MatDialogRef }, { type: i3__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
807
+ }, propDecorators: { list: [{
808
+ type: i0.ViewChild,
809
+ args: [i12.FsListComponent]
782
810
  }] } });
783
811
 
784
- var FsAclPermissionPopoverComponent = /** @class */ (function () {
785
- function FsAclPermissionPopoverComponent(_appAclService) {
786
- this._appAclService = _appAclService;
787
- }
788
- FsAclPermissionPopoverComponent.prototype.ngOnInit = function () {
789
- var _this = this;
790
- this._appAclService.getPermissions()
791
- .subscribe(function (permissions) {
792
- _this.description = permissions.filter(function (item) {
793
- return item.value === _this.permission.value;
794
- }).map(function (item) {
795
- return item.description;
796
- })[0];
797
- });
798
- };
799
- return FsAclPermissionPopoverComponent;
800
- }());
801
- FsAclPermissionPopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclPermissionPopoverComponent, deps: [{ token: FsAppAclService }], target: i0__namespace.ɵɵFactoryTarget.Component });
802
- FsAclPermissionPopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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"] }] });
803
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclPermissionPopoverComponent, decorators: [{
804
- type: i0.Component,
805
- args: [{
806
- selector: 'acl-permission-popover',
807
- templateUrl: './acl-permission-popover.component.html',
808
- styleUrls: ['./acl-permission-popover.component.scss']
809
- }]
810
- }], ctorParameters: function () { return [{ type: FsAppAclService }]; }, propDecorators: { permission: [{
811
- type: i0.Input
812
+ var FsAclPermissionPopoverComponent = /** @class */ (function () {
813
+ function FsAclPermissionPopoverComponent(_appAclService) {
814
+ this._appAclService = _appAclService;
815
+ }
816
+ FsAclPermissionPopoverComponent.prototype.ngOnInit = function () {
817
+ var _this = this;
818
+ this._appAclService.getPermissions()
819
+ .subscribe(function (permissions) {
820
+ _this.description = permissions.filter(function (item) {
821
+ return item.value === _this.permission.value;
822
+ }).map(function (item) {
823
+ return item.description;
824
+ })[0];
825
+ });
826
+ };
827
+ return FsAclPermissionPopoverComponent;
828
+ }());
829
+ FsAclPermissionPopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclPermissionPopoverComponent, deps: [{ token: FsAppAclService }], target: i0__namespace.ɵɵFactoryTarget.Component });
830
+ FsAclPermissionPopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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"] }] });
831
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclPermissionPopoverComponent, decorators: [{
832
+ type: i0.Component,
833
+ args: [{
834
+ selector: 'acl-permission-popover',
835
+ templateUrl: './acl-permission-popover.component.html',
836
+ styleUrls: ['./acl-permission-popover.component.scss']
837
+ }]
838
+ }], ctorParameters: function () { return [{ type: FsAppAclService }]; }, propDecorators: { permission: [{
839
+ type: i0.Input
812
840
  }] } });
813
841
 
814
- var FsAclRolesComponent = /** @class */ (function () {
815
- function FsAclRolesComponent(_appAclService, _dialog) {
816
- this._appAclService = _appAclService;
817
- this._dialog = _dialog;
818
- this.aclLevels = [];
819
- this.list = new i0.QueryList();
820
- this.indexedAclRoleLevels = {};
821
- this._destroy$ = new rxjs.Subject();
822
- }
823
- FsAclRolesComponent.prototype.ngOnInit = function () {
824
- var _this = this;
825
- new rxjs.Observable(function (observer) {
826
- if (_this.aclLevels.length) {
827
- observer.next(_this.aclLevels);
828
- observer.complete();
829
- }
830
- else {
831
- _this._appAclService.getLevels()
832
- .subscribe(function (aclLevels) {
833
- observer.next(aclLevels);
834
- observer.complete();
835
- });
836
- }
837
- })
838
- .subscribe(function (aclLevels) {
839
- _this.aclLevels = aclLevels;
840
- _this.indexedAclRoleLevels = common.list(_this.aclLevels, 'name', 'value');
841
- _this._loadListConfig();
842
- });
843
- };
844
- FsAclRolesComponent.prototype.openDialog = function (aclRole) {
845
- var _this = this;
846
- if (aclRole === void 0) { aclRole = { id: null }; }
847
- this._dialog.open(FsAclRoleComponent, {
848
- width: '70%',
849
- data: {
850
- aclRole: aclRole,
851
- aclLevels: this.aclLevels,
852
- loadAclRole: this.loadAclRole,
853
- saveAclRole: this.saveAclRole,
854
- loadRoleConfigs: this.loadRoleConfigs,
855
- },
856
- })
857
- .afterClosed()
858
- .pipe(operators.takeUntil(this._destroy$), operators.filter(function (response) { return !!response; }))
859
- .subscribe(function (response) {
860
- _this.list.forEach(function (list) {
861
- list.reload();
862
- });
863
- });
864
- };
865
- FsAclRolesComponent.prototype.ngOnDestroy = function () {
866
- this._destroy$.next();
867
- this._destroy$.complete();
868
- };
869
- FsAclRolesComponent.prototype._loadListConfig = function () {
870
- var _this = this;
871
- this.listConfig = {
872
- sort: { value: 'hierarchy' },
873
- filters: [
874
- {
875
- name: 'keyword',
876
- type: filter.ItemType.Keyword,
877
- label: 'Search',
878
- },
879
- {
880
- name: 'level',
881
- label: 'Level',
882
- type: filter.ItemType.Select,
883
- values: this.aclLevels,
884
- hide: this.aclLevels.length <= 1
885
- },
886
- {
887
- name: 'state',
888
- label: 'Show Deleted',
889
- type: filter.ItemType.Checkbox,
890
- unchecked: 'active',
891
- checked: 'deleted',
892
- },
893
- ],
894
- actions: [
895
- {
896
- click: function (event) {
897
- _this.openDialog();
898
- },
899
- label: 'Create',
900
- },
901
- ],
902
- rowActions: [
903
- {
904
- click: function (data) {
905
- return _this.deleteAclRole(data);
906
- },
907
- remove: {
908
- title: 'Confirm',
909
- template: 'Are you sure you would like to delete this role?',
910
- },
911
- menu: true,
912
- label: 'Delete',
913
- show: function (row) { return !!_this.deleteAclRole && row.state !== 'deleted'; },
914
- },
915
- {
916
- click: function (data) {
917
- return _this.restoreAclRole(data)
918
- .pipe(operators.tap(function () {
919
- _this.list.forEach(function (l) {
920
- l.reload();
921
- });
922
- }), operators.takeUntil(_this._destroy$))
923
- .subscribe();
924
- },
925
- label: 'Restore',
926
- show: function (row) { return !!_this.restoreAclRole && row.state === 'deleted'; },
927
- },
928
- ],
929
- fetch: function (query) {
930
- query.permissions = true;
931
- return _this.loadAclRoles(query)
932
- .pipe(operators.map(function (data) { return data; }));
933
- },
934
- };
935
- };
936
- return FsAclRolesComponent;
937
- }());
938
- FsAclRolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
939
- FsAclRolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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 });
940
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolesComponent, decorators: [{
941
- type: i0.Component,
942
- args: [{
943
- selector: 'fs-acl-roles',
944
- templateUrl: 'acl-roles.component.html',
945
- styleUrls: ['acl-roles.component.scss'],
946
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
947
- }]
948
- }], ctorParameters: function () { return [{ type: FsAppAclService }, { type: i2__namespace.MatDialog }]; }, propDecorators: { deleteAclRole: [{
949
- type: i0.Input
950
- }], restoreAclRole: [{
951
- type: i0.Input
952
- }], saveAclRole: [{
953
- type: i0.Input
954
- }], loadAclRoles: [{
955
- type: i0.Input
956
- }], loadAclRole: [{
957
- type: i0.Input
958
- }], loadRoleConfigs: [{
959
- type: i0.Input
960
- }], aclLevels: [{
961
- type: i0.Input
962
- }], list: [{
963
- type: i0.ViewChildren,
964
- args: [i12.FsListComponent]
842
+ var FsAclRolesComponent = /** @class */ (function () {
843
+ function FsAclRolesComponent(_appAclService, _dialog) {
844
+ this._appAclService = _appAclService;
845
+ this._dialog = _dialog;
846
+ this.aclLevels = [];
847
+ this.list = new i0.QueryList();
848
+ this.indexedAclRoleLevels = {};
849
+ this._destroy$ = new rxjs.Subject();
850
+ }
851
+ FsAclRolesComponent.prototype.ngOnInit = function () {
852
+ var _this = this;
853
+ new rxjs.Observable(function (observer) {
854
+ if (_this.aclLevels.length) {
855
+ observer.next(_this.aclLevels);
856
+ observer.complete();
857
+ }
858
+ else {
859
+ _this._appAclService.getLevels()
860
+ .subscribe(function (aclLevels) {
861
+ observer.next(aclLevels);
862
+ observer.complete();
863
+ });
864
+ }
865
+ })
866
+ .subscribe(function (aclLevels) {
867
+ _this.aclLevels = aclLevels;
868
+ _this.indexedAclRoleLevels = common.list(_this.aclLevels, 'name', 'value');
869
+ _this._loadListConfig();
870
+ });
871
+ };
872
+ FsAclRolesComponent.prototype.openDialog = function (aclRole) {
873
+ var _this = this;
874
+ if (aclRole === void 0) { aclRole = { id: null }; }
875
+ this._dialog.open(FsAclRoleComponent, {
876
+ width: '70%',
877
+ data: {
878
+ aclRole: aclRole,
879
+ aclLevels: this.aclLevels,
880
+ loadAclRole: this.loadAclRole,
881
+ saveAclRole: this.saveAclRole,
882
+ loadRoleConfigs: this.loadRoleConfigs,
883
+ },
884
+ })
885
+ .afterClosed()
886
+ .pipe(operators.takeUntil(this._destroy$), operators.filter(function (response) { return !!response; }))
887
+ .subscribe(function (response) {
888
+ _this.list.forEach(function (list) {
889
+ list.reload();
890
+ });
891
+ });
892
+ };
893
+ FsAclRolesComponent.prototype.ngOnDestroy = function () {
894
+ this._destroy$.next();
895
+ this._destroy$.complete();
896
+ };
897
+ FsAclRolesComponent.prototype._loadListConfig = function () {
898
+ var _this = this;
899
+ this.listConfig = {
900
+ sort: { value: 'hierarchy' },
901
+ filters: [
902
+ {
903
+ name: 'keyword',
904
+ type: filter.ItemType.Keyword,
905
+ label: 'Search',
906
+ },
907
+ {
908
+ name: 'level',
909
+ label: 'Level',
910
+ type: filter.ItemType.Select,
911
+ values: this.aclLevels,
912
+ hide: this.aclLevels.length <= 1
913
+ },
914
+ {
915
+ name: 'state',
916
+ label: 'Show Deleted',
917
+ type: filter.ItemType.Checkbox,
918
+ unchecked: 'active',
919
+ checked: 'deleted',
920
+ },
921
+ ],
922
+ actions: [
923
+ {
924
+ click: function (event) {
925
+ _this.openDialog();
926
+ },
927
+ label: 'Create',
928
+ },
929
+ ],
930
+ rowActions: [
931
+ {
932
+ click: function (data) {
933
+ return _this.deleteAclRole(data);
934
+ },
935
+ remove: {
936
+ title: 'Confirm',
937
+ template: 'Are you sure you would like to delete this role?',
938
+ },
939
+ menu: true,
940
+ label: 'Delete',
941
+ show: function (row) { return !!_this.deleteAclRole && row.state !== 'deleted'; },
942
+ },
943
+ {
944
+ click: function (data) {
945
+ return _this.restoreAclRole(data)
946
+ .pipe(operators.tap(function () {
947
+ _this.list.forEach(function (l) {
948
+ l.reload();
949
+ });
950
+ }), operators.takeUntil(_this._destroy$))
951
+ .subscribe();
952
+ },
953
+ label: 'Restore',
954
+ show: function (row) { return !!_this.restoreAclRole && row.state === 'deleted'; },
955
+ },
956
+ ],
957
+ fetch: function (query) {
958
+ query.permissions = true;
959
+ return _this.loadAclRoles(query)
960
+ .pipe(operators.map(function (data) { return data; }));
961
+ },
962
+ };
963
+ };
964
+ return FsAclRolesComponent;
965
+ }());
966
+ FsAclRolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
967
+ FsAclRolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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 });
968
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolesComponent, decorators: [{
969
+ type: i0.Component,
970
+ args: [{
971
+ selector: 'fs-acl-roles',
972
+ templateUrl: 'acl-roles.component.html',
973
+ styleUrls: ['acl-roles.component.scss'],
974
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
975
+ }]
976
+ }], ctorParameters: function () { return [{ type: FsAppAclService }, { type: i2__namespace.MatDialog }]; }, propDecorators: { deleteAclRole: [{
977
+ type: i0.Input
978
+ }], restoreAclRole: [{
979
+ type: i0.Input
980
+ }], saveAclRole: [{
981
+ type: i0.Input
982
+ }], loadAclRoles: [{
983
+ type: i0.Input
984
+ }], loadAclRole: [{
985
+ type: i0.Input
986
+ }], loadRoleConfigs: [{
987
+ type: i0.Input
988
+ }], aclLevels: [{
989
+ type: i0.Input
990
+ }], list: [{
991
+ type: i0.ViewChildren,
992
+ args: [i12.FsListComponent]
965
993
  }] } });
966
994
 
967
- var FsAclRolePopoverComponent = /** @class */ (function () {
968
- function FsAclRolePopoverComponent(_appAclService) {
969
- this._appAclService = _appAclService;
970
- this.permissions = [];
971
- }
972
- FsAclRolePopoverComponent.prototype.ngOnInit = function () {
973
- var _this = this;
974
- var aclRolePermissions = this.aclRole.permissions || [];
975
- this._appAclService.getPermissions()
976
- .subscribe(function (response) {
977
- _this.permissions = response.filter(function (item) {
978
- return aclRolePermissions.some(function (permission) {
979
- return item.value === permission.value;
980
- });
981
- });
982
- });
983
- };
984
- return FsAclRolePopoverComponent;
985
- }());
986
- FsAclRolePopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolePopoverComponent, deps: [{ token: FsAppAclService }], target: i0__namespace.ɵɵFactoryTarget.Component });
987
- FsAclRolePopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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"] }] });
988
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolePopoverComponent, decorators: [{
989
- type: i0.Component,
990
- args: [{
991
- selector: 'fs-acl-role-popover',
992
- templateUrl: './acl-role-popover.component.html',
993
- styleUrls: ['./acl-role-popover.component.scss']
994
- }]
995
- }], ctorParameters: function () { return [{ type: FsAppAclService }]; }, propDecorators: { aclRole: [{
996
- type: i0.Input
997
- }], objectName: [{
998
- type: i0.Input
995
+ var FsAclRolePopoverComponent = /** @class */ (function () {
996
+ function FsAclRolePopoverComponent(_appAclService) {
997
+ this._appAclService = _appAclService;
998
+ this.permissions = [];
999
+ }
1000
+ FsAclRolePopoverComponent.prototype.ngOnInit = function () {
1001
+ var _this = this;
1002
+ var aclRolePermissions = this.aclRole.permissions || [];
1003
+ this._appAclService.getPermissions()
1004
+ .subscribe(function (response) {
1005
+ _this.permissions = response.filter(function (item) {
1006
+ return aclRolePermissions.some(function (permission) {
1007
+ return item.value === permission.value;
1008
+ });
1009
+ });
1010
+ });
1011
+ };
1012
+ return FsAclRolePopoverComponent;
1013
+ }());
1014
+ FsAclRolePopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolePopoverComponent, deps: [{ token: FsAppAclService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1015
+ FsAclRolePopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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"] }] });
1016
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclRolePopoverComponent, decorators: [{
1017
+ type: i0.Component,
1018
+ args: [{
1019
+ selector: 'fs-acl-role-popover',
1020
+ templateUrl: './acl-role-popover.component.html',
1021
+ styleUrls: ['./acl-role-popover.component.scss']
1022
+ }]
1023
+ }], ctorParameters: function () { return [{ type: FsAppAclService }]; }, propDecorators: { aclRole: [{
1024
+ type: i0.Input
1025
+ }], objectName: [{
1026
+ type: i0.Input
999
1027
  }] } });
1000
1028
 
1001
- var FsAclObjectRolesComponent = /** @class */ (function () {
1002
- function FsAclObjectRolesComponent() {
1003
- this.aclRoles = [];
1004
- this.required = false;
1005
- this.multiple = false;
1006
- this.disabled = false;
1007
- this.aclObjectRoles = [];
1008
- this.rolesLabel = 'Roles';
1009
- this.levelLabel = '';
1010
- this.change = new i0.EventEmitter();
1011
- this.compareAclRole = function (o1, o2) {
1012
- return o1 && o2 && o1.id === o2.id;
1013
- };
1014
- }
1015
- FsAclObjectRolesComponent.prototype.changed = function () {
1016
- this.change.emit(this.aclObjectRoles);
1017
- };
1018
- return FsAclObjectRolesComponent;
1019
- }());
1020
- FsAclObjectRolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclObjectRolesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1021
- FsAclObjectRolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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"] }, { type: i15__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }], viewProviders: [{ provide: i14.ControlContainer, useExisting: i14.NgForm }] });
1022
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclObjectRolesComponent, decorators: [{
1023
- type: i0.Component,
1024
- args: [{
1025
- selector: 'fs-acl-object-roles',
1026
- templateUrl: './acl-object-roles.component.html',
1027
- styleUrls: ['./acl-object-roles.component.scss'],
1028
- viewProviders: [{ provide: i14.ControlContainer, useExisting: i14.NgForm }]
1029
- }]
1030
- }], propDecorators: { aclRoles: [{
1031
- type: i0.Input
1032
- }], required: [{
1033
- type: i0.Input
1034
- }], multiple: [{
1035
- type: i0.Input
1036
- }], disabled: [{
1037
- type: i0.Input
1038
- }], aclObjectRoles: [{
1039
- type: i0.Input
1040
- }], rolesLabel: [{
1041
- type: i0.Input
1042
- }], levelLabel: [{
1043
- type: i0.Input
1044
- }], change: [{
1045
- type: i0.Output
1029
+ var FsAclObjectRolesComponent = /** @class */ (function () {
1030
+ function FsAclObjectRolesComponent() {
1031
+ this.aclRoles = [];
1032
+ this.required = false;
1033
+ this.multiple = false;
1034
+ this.disabled = false;
1035
+ this.aclObjectRoles = [];
1036
+ this.rolesLabel = 'Roles';
1037
+ this.levelLabel = '';
1038
+ this.change = new i0.EventEmitter();
1039
+ this.compareAclRole = function (o1, o2) {
1040
+ return o1 && o2 && o1.id === o2.id;
1041
+ };
1042
+ }
1043
+ FsAclObjectRolesComponent.prototype.changed = function () {
1044
+ this.change.emit(this.aclObjectRoles);
1045
+ };
1046
+ return FsAclObjectRolesComponent;
1047
+ }());
1048
+ FsAclObjectRolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclObjectRolesComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1049
+ FsAclObjectRolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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"] }, { type: i15__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }], viewProviders: [{ provide: i14.ControlContainer, useExisting: i14.NgForm }] });
1050
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclObjectRolesComponent, decorators: [{
1051
+ type: i0.Component,
1052
+ args: [{
1053
+ selector: 'fs-acl-object-roles',
1054
+ templateUrl: './acl-object-roles.component.html',
1055
+ styleUrls: ['./acl-object-roles.component.scss'],
1056
+ viewProviders: [{ provide: i14.ControlContainer, useExisting: i14.NgForm }]
1057
+ }]
1058
+ }], propDecorators: { aclRoles: [{
1059
+ type: i0.Input
1060
+ }], required: [{
1061
+ type: i0.Input
1062
+ }], multiple: [{
1063
+ type: i0.Input
1064
+ }], disabled: [{
1065
+ type: i0.Input
1066
+ }], aclObjectRoles: [{
1067
+ type: i0.Input
1068
+ }], rolesLabel: [{
1069
+ type: i0.Input
1070
+ }], levelLabel: [{
1071
+ type: i0.Input
1072
+ }], change: [{
1073
+ type: i0.Output
1046
1074
  }] } });
1047
1075
 
1048
- var FsAclEntryComponent = /** @class */ (function () {
1049
- function FsAclEntryComponent(_appAclService, _dialogRef, _message, _data) {
1050
- var _this = this;
1051
- var _a;
1052
- this._appAclService = _appAclService;
1053
- this._dialogRef = _dialogRef;
1054
- this._message = _message;
1055
- this._data = _data;
1056
- this.aclRoles = [];
1057
- this.aclEntries = [];
1058
- this.indexedAclRoleLevels = {};
1059
- this.titleEdit = 'Edit Roles';
1060
- this.titleAdd = 'Assign Roles';
1061
- this.required = true;
1062
- this.save = function () {
1063
- var aclObjectEntry = Object.assign(Object.assign({}, _this.aclObjectEntry), { aclEntries: _this.aclEntries });
1064
- return _this._data.saveAclObjectEntry(aclObjectEntry)
1065
- .pipe(operators.tap(function (data) {
1066
- _this._message.success('Saved Changes');
1067
- _this.close(data);
1068
- }));
1069
- };
1070
- this.aclObjectEntry = Object.assign({}, _data.aclObjectEntry);
1071
- this.required = (_a = _data.required) !== null && _a !== void 0 ? _a : true;
1072
- if (_data.titleEdit) {
1073
- this.titleEdit = _data.titleEdit;
1074
- }
1075
- if (_data.titleAdd) {
1076
- this.titleAdd = _data.titleAdd;
1077
- }
1078
- }
1079
- FsAclEntryComponent.prototype.ngOnInit = function () {
1080
- var _this = this;
1081
- rxjs.forkJoin(this._data.loadAclRoles({
1082
- level: this.aclObjectEntry.level,
1083
- environmentId: this.aclObjectEntry.environmentId || null,
1084
- }), this._appAclService.getIndexedLevels())
1085
- .subscribe(function (_b) {
1086
- var _c = __read(_b, 2), aclRoles = _c[0], levels = _c[1];
1087
- _this.aclRoles = aclRoles;
1088
- _this.indexedAclRoleLevels = levels;
1089
- _this.aclObjectRole = {
1090
- object: _this.aclObjectEntry.object,
1091
- aclRoles: _this.aclObjectEntry.aclEntries
1092
- .map(function (aclEntry) {
1093
- return aclEntry.aclRole;
1094
- }),
1095
- };
1096
- });
1097
- };
1098
- FsAclEntryComponent.prototype.aclObjectRoleChange = function (aclObjectRoles) {
1099
- this.aclEntries = aclObjectRoles.reduce(function (aclEntries, aclObjectRole) {
1100
- aclObjectRole.aclRoles.forEach(function (aclRole) {
1101
- aclEntries.push({
1102
- aclRoleId: aclRole.id,
1103
- aclRole: aclRole,
1104
- objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
1105
- object: aclObjectRole.object || null
1106
- });
1107
- });
1108
- return aclEntries;
1109
- }, []);
1110
- };
1111
- FsAclEntryComponent.prototype.close = function (data) {
1112
- if (data === void 0) { data = null; }
1113
- this._dialogRef.close(data);
1114
- };
1115
- return FsAclEntryComponent;
1116
- }());
1117
- FsAclEntryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
1118
- FsAclEntryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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", "mobileActionPlacement", "mobileWidth", "mode"] }, { 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", "deactivationGuard"], 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.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
1119
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclEntryComponent, decorators: [{
1120
- type: i0.Component,
1121
- args: [{
1122
- templateUrl: './acl-entry.component.html',
1123
- styleUrls: ['./acl-entry.component.scss'],
1124
- }]
1125
- }], ctorParameters: function () {
1126
- return [{ type: FsAppAclService }, { type: i2__namespace.MatDialogRef }, { type: i3__namespace.FsMessage }, { type: undefined, decorators: [{
1127
- type: i0.Inject,
1128
- args: [i2.MAT_DIALOG_DATA]
1129
- }] }];
1076
+ var FsAclEntryComponent = /** @class */ (function () {
1077
+ function FsAclEntryComponent(_appAclService, _dialogRef, _message, _data) {
1078
+ var _this = this;
1079
+ var _a;
1080
+ this._appAclService = _appAclService;
1081
+ this._dialogRef = _dialogRef;
1082
+ this._message = _message;
1083
+ this._data = _data;
1084
+ this.aclRoles = [];
1085
+ this.aclEntries = [];
1086
+ this.indexedAclRoleLevels = {};
1087
+ this.titleEdit = 'Edit Roles';
1088
+ this.titleAdd = 'Assign Roles';
1089
+ this.required = true;
1090
+ this.save = function () {
1091
+ var aclObjectEntry = Object.assign(Object.assign({}, _this.aclObjectEntry), { aclEntries: _this.aclEntries });
1092
+ return _this._data.saveAclObjectEntry(aclObjectEntry)
1093
+ .pipe(operators.tap(function (data) {
1094
+ _this._message.success('Saved Changes');
1095
+ _this.close(data);
1096
+ }));
1097
+ };
1098
+ this.aclObjectEntry = Object.assign({}, _data.aclObjectEntry);
1099
+ this.required = (_a = _data.required) !== null && _a !== void 0 ? _a : true;
1100
+ if (_data.titleEdit) {
1101
+ this.titleEdit = _data.titleEdit;
1102
+ }
1103
+ if (_data.titleAdd) {
1104
+ this.titleAdd = _data.titleAdd;
1105
+ }
1106
+ }
1107
+ FsAclEntryComponent.prototype.ngOnInit = function () {
1108
+ var _this = this;
1109
+ rxjs.forkJoin(this._data.loadAclRoles({
1110
+ level: this.aclObjectEntry.level,
1111
+ environmentId: this.aclObjectEntry.environmentId || null,
1112
+ }), this._appAclService.getIndexedLevels())
1113
+ .subscribe(function (_b) {
1114
+ var _c = __read(_b, 2), aclRoles = _c[0], levels = _c[1];
1115
+ _this.aclRoles = aclRoles;
1116
+ _this.indexedAclRoleLevels = levels;
1117
+ _this.aclObjectRole = {
1118
+ object: _this.aclObjectEntry.object,
1119
+ aclRoles: _this.aclObjectEntry.aclEntries
1120
+ .map(function (aclEntry) {
1121
+ return aclEntry.aclRole;
1122
+ }),
1123
+ };
1124
+ });
1125
+ };
1126
+ FsAclEntryComponent.prototype.aclObjectRoleChange = function (aclObjectRoles) {
1127
+ this.aclEntries = aclObjectRoles.reduce(function (aclEntries, aclObjectRole) {
1128
+ aclObjectRole.aclRoles.forEach(function (aclRole) {
1129
+ aclEntries.push({
1130
+ aclRoleId: aclRole.id,
1131
+ aclRole: aclRole,
1132
+ objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
1133
+ object: aclObjectRole.object || null
1134
+ });
1135
+ });
1136
+ return aclEntries;
1137
+ }, []);
1138
+ };
1139
+ FsAclEntryComponent.prototype.close = function (data) {
1140
+ if (data === void 0) { data = null; }
1141
+ this._dialogRef.close(data);
1142
+ };
1143
+ return FsAclEntryComponent;
1144
+ }());
1145
+ FsAclEntryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
1146
+ FsAclEntryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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", "mobileActionPlacement", "mobileWidth", "mode"] }, { 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", "deactivationGuard"], 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.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit"] }, { type: i2__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
1147
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclEntryComponent, decorators: [{
1148
+ type: i0.Component,
1149
+ args: [{
1150
+ templateUrl: './acl-entry.component.html',
1151
+ styleUrls: ['./acl-entry.component.scss'],
1152
+ }]
1153
+ }], ctorParameters: function () {
1154
+ return [{ type: FsAppAclService }, { type: i2__namespace.MatDialogRef }, { type: i3__namespace.FsMessage }, { type: undefined, decorators: [{
1155
+ type: i0.Inject,
1156
+ args: [i2.MAT_DIALOG_DATA]
1157
+ }] }];
1130
1158
  } });
1131
1159
 
1132
- var FsAclEntriesComponent = /** @class */ (function () {
1133
- function FsAclEntriesComponent(_appAclService, _dialog, _confirm) {
1134
- this._appAclService = _appAclService;
1135
- this._dialog = _dialog;
1136
- this._confirm = _confirm;
1137
- this.environmentShow = true;
1138
- this.environmentLabel = 'Environment';
1139
- this.environmentKey = 'environment';
1140
- this.actions = [];
1141
- this.aclEntriesList = null;
1142
- this.aclEntriesConfig = null;
1143
- this.permissions = [];
1144
- this._destroy$ = new rxjs.Subject();
1145
- }
1146
- FsAclEntriesComponent.prototype.ngOnInit = function () {
1147
- var _this = this;
1148
- this._appAclService.getPermissions()
1149
- .subscribe(function (response) {
1150
- _this.permissions = response;
1151
- });
1152
- this.aclEntriesConfig = {
1153
- status: false,
1154
- paging: false,
1155
- actions: this.actions,
1156
- rowActions: [
1157
- {
1158
- label: 'Remove All Roles',
1159
- click: function (aclObjectEntry) {
1160
- _this._confirm
1161
- .confirm({
1162
- title: 'Remove All Roles',
1163
- commitLabel: 'Save',
1164
- 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?",
1165
- }).subscribe(function () {
1166
- var data = Object.assign(Object.assign({}, aclObjectEntry), { aclEntries: [] });
1167
- _this.saveAclObjectEntry(data)
1168
- .subscribe(function () {
1169
- _this.aclEntriesList.reload();
1170
- });
1171
- });
1172
- }
1173
- }
1174
- ],
1175
- fetch: function () {
1176
- return new rxjs.Observable(function (observer) {
1177
- _this.loadAclEntries({
1178
- aclRoles: true,
1179
- aclRolePermissions: true,
1180
- objects: true,
1181
- aclRoleState: 'active',
1182
- })
1183
- .subscribe(function (aclEntries) {
1184
- var objects = aclEntries
1185
- .filter(function (aclEntry) { return (!!aclEntry.object); })
1186
- .reduce(function (items, item) {
1187
- var _b;
1188
- return Object.assign(Object.assign({}, items), (_b = {}, _b[item.object.id] = item.object, _b));
1189
- }, {});
1190
- var environments = aclEntries
1191
- .filter(function (aclEntry) { return (!!aclEntry[_this.environmentKey]); })
1192
- .reduce(function (items, item) {
1193
- var _b;
1194
- var environment = item[_this.environmentKey];
1195
- return Object.assign(Object.assign({}, items), (_b = {}, _b[environment.id] = environment, _b));
1196
- }, {});
1197
- var groupedAclEntries = lodashEs.groupBy(aclEntries, function (item) {
1198
- var _a;
1199
- var environmentId = (_a = (item[_this.environmentKey])) === null || _a === void 0 ? void 0 : _a.id;
1200
- return [item.aclRole.level, environmentId, item.objectId];
1201
- });
1202
- var aclObjectEntries = Object.keys(groupedAclEntries)
1203
- .reduce(function (accum, key) {
1204
- var _b;
1205
- var parts = key.split(',');
1206
- return __spreadArray(__spreadArray([], __read(accum)), [
1207
- (_b = {
1208
- object: objects[parts[2]],
1209
- level: parts[0]
1210
- },
1211
- _b[_this.environmentKey + "Id"] = parts[1] ? parseInt(parts[1]) : null,
1212
- _b[_this.environmentKey] = environments[parts[1]],
1213
- _b.aclEntries = groupedAclEntries[key],
1214
- _b)
1215
- ]);
1216
- }, []);
1217
- var hasApp = aclObjectEntries.some(function (item) {
1218
- return item.aclEntries.some(function (entry) {
1219
- return !entry.objectId;
1220
- });
1221
- });
1222
- if (!hasApp) {
1223
- aclObjectEntries.unshift({
1224
- object: null,
1225
- aclEntries: [],
1226
- level: 'app',
1227
- environmentId: null,
1228
- });
1229
- }
1230
- aclObjectEntries = lodashEs.sortBy(aclObjectEntries, function (item) {
1231
- return item.object ? item.level : '';
1232
- });
1233
- observer.next({ data: aclObjectEntries });
1234
- observer.complete();
1235
- });
1236
- });
1237
- },
1238
- };
1239
- };
1240
- FsAclEntriesComponent.prototype.update = function (aclObjectEntry) {
1241
- var _this = this;
1242
- var data = {
1243
- aclObjectEntry: aclObjectEntry,
1244
- required: false,
1245
- loadAclRoles: this.loadAclRoles,
1246
- saveAclObjectEntry: this.saveAclObjectEntry
1247
- };
1248
- this._dialog.open(FsAclEntryComponent, {
1249
- data: data
1250
- })
1251
- .afterClosed()
1252
- .pipe(operators.takeUntil(this._destroy$))
1253
- .subscribe(function () {
1254
- _this.aclEntriesList.reload();
1255
- });
1256
- };
1257
- FsAclEntriesComponent.prototype.ngOnDestroy = function () {
1258
- this._destroy$.next();
1259
- this._destroy$.complete();
1260
- };
1261
- FsAclEntriesComponent.prototype.reload = function () {
1262
- this.aclEntriesList.reload();
1263
- };
1264
- return FsAclEntriesComponent;
1265
- }());
1266
- FsAclEntriesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclEntriesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }, { token: i3__namespace$1.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
1267
- FsAclEntriesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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]" }] });
1268
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclEntriesComponent, decorators: [{
1269
- type: i0.Component,
1270
- args: [{
1271
- selector: 'fs-acl-entries',
1272
- templateUrl: './acl-entries.component.html',
1273
- styleUrls: ['./acl-entries.component.scss']
1274
- }]
1275
- }], ctorParameters: function () { return [{ type: FsAppAclService }, { type: i2__namespace.MatDialog }, { type: i3__namespace$1.FsPrompt }]; }, propDecorators: { loadAclEntries: [{
1276
- type: i0.Input
1277
- }], loadAclRoles: [{
1278
- type: i0.Input
1279
- }], saveAclObjectEntry: [{
1280
- type: i0.Input
1281
- }], environmentShow: [{
1282
- type: i0.Input
1283
- }], environmentLabel: [{
1284
- type: i0.Input
1285
- }], environmentKey: [{
1286
- type: i0.Input
1287
- }], actions: [{
1288
- type: i0.Input
1289
- }], aclEntriesList: [{
1290
- type: i0.ViewChild,
1291
- args: [i12.FsListComponent]
1160
+ var FsAclEntriesComponent = /** @class */ (function () {
1161
+ function FsAclEntriesComponent(_appAclService, _dialog, _confirm) {
1162
+ this._appAclService = _appAclService;
1163
+ this._dialog = _dialog;
1164
+ this._confirm = _confirm;
1165
+ this.environmentShow = true;
1166
+ this.environmentLabel = 'Environment';
1167
+ this.environmentKey = 'environment';
1168
+ this.actions = [];
1169
+ this.aclEntriesList = null;
1170
+ this.aclEntriesConfig = null;
1171
+ this.permissions = [];
1172
+ this._destroy$ = new rxjs.Subject();
1173
+ }
1174
+ FsAclEntriesComponent.prototype.ngOnInit = function () {
1175
+ var _this = this;
1176
+ this._appAclService.getPermissions()
1177
+ .subscribe(function (response) {
1178
+ _this.permissions = response;
1179
+ });
1180
+ this.aclEntriesConfig = {
1181
+ status: false,
1182
+ paging: false,
1183
+ actions: this.actions,
1184
+ rowActions: [
1185
+ {
1186
+ label: 'Remove All Roles',
1187
+ click: function (aclObjectEntry) {
1188
+ _this._confirm
1189
+ .confirm({
1190
+ title: 'Remove All Roles',
1191
+ commitLabel: 'Save',
1192
+ 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?",
1193
+ }).subscribe(function () {
1194
+ var data = Object.assign(Object.assign({}, aclObjectEntry), { aclEntries: [] });
1195
+ _this.saveAclObjectEntry(data)
1196
+ .subscribe(function () {
1197
+ _this.aclEntriesList.reload();
1198
+ });
1199
+ });
1200
+ }
1201
+ }
1202
+ ],
1203
+ fetch: function () {
1204
+ return new rxjs.Observable(function (observer) {
1205
+ _this.loadAclEntries({
1206
+ aclRoles: true,
1207
+ aclRolePermissions: true,
1208
+ objects: true,
1209
+ aclRoleState: 'active',
1210
+ })
1211
+ .subscribe(function (aclEntries) {
1212
+ var objects = aclEntries
1213
+ .filter(function (aclEntry) { return (!!aclEntry.object); })
1214
+ .reduce(function (items, item) {
1215
+ var _b;
1216
+ return Object.assign(Object.assign({}, items), (_b = {}, _b[item.object.id] = item.object, _b));
1217
+ }, {});
1218
+ var environments = aclEntries
1219
+ .filter(function (aclEntry) { return (!!aclEntry[_this.environmentKey]); })
1220
+ .reduce(function (items, item) {
1221
+ var _b;
1222
+ var environment = item[_this.environmentKey];
1223
+ return Object.assign(Object.assign({}, items), (_b = {}, _b[environment.id] = environment, _b));
1224
+ }, {});
1225
+ var groupedAclEntries = lodashEs.groupBy(aclEntries, function (item) {
1226
+ var _a;
1227
+ var environmentId = (_a = (item[_this.environmentKey])) === null || _a === void 0 ? void 0 : _a.id;
1228
+ return [item.aclRole.level, environmentId, item.objectId];
1229
+ });
1230
+ var aclObjectEntries = Object.keys(groupedAclEntries)
1231
+ .reduce(function (accum, key) {
1232
+ var _b;
1233
+ var parts = key.split(',');
1234
+ return __spreadArray(__spreadArray([], __read(accum)), [
1235
+ (_b = {
1236
+ object: objects[parts[2]],
1237
+ level: parts[0]
1238
+ },
1239
+ _b[_this.environmentKey + "Id"] = parts[1] ? parseInt(parts[1]) : null,
1240
+ _b[_this.environmentKey] = environments[parts[1]],
1241
+ _b.aclEntries = groupedAclEntries[key],
1242
+ _b)
1243
+ ]);
1244
+ }, []);
1245
+ var hasApp = aclObjectEntries.some(function (item) {
1246
+ return item.aclEntries.some(function (entry) {
1247
+ return !entry.objectId;
1248
+ });
1249
+ });
1250
+ if (!hasApp) {
1251
+ aclObjectEntries.unshift({
1252
+ object: null,
1253
+ aclEntries: [],
1254
+ level: 'app',
1255
+ environmentId: null,
1256
+ });
1257
+ }
1258
+ aclObjectEntries = lodashEs.sortBy(aclObjectEntries, function (item) {
1259
+ return item.object ? item.level : '';
1260
+ });
1261
+ observer.next({ data: aclObjectEntries });
1262
+ observer.complete();
1263
+ });
1264
+ });
1265
+ },
1266
+ };
1267
+ };
1268
+ FsAclEntriesComponent.prototype.update = function (aclObjectEntry) {
1269
+ var _this = this;
1270
+ var data = {
1271
+ aclObjectEntry: aclObjectEntry,
1272
+ required: false,
1273
+ loadAclRoles: this.loadAclRoles,
1274
+ saveAclObjectEntry: this.saveAclObjectEntry
1275
+ };
1276
+ this._dialog.open(FsAclEntryComponent, {
1277
+ data: data
1278
+ })
1279
+ .afterClosed()
1280
+ .pipe(operators.takeUntil(this._destroy$))
1281
+ .subscribe(function () {
1282
+ _this.aclEntriesList.reload();
1283
+ });
1284
+ };
1285
+ FsAclEntriesComponent.prototype.ngOnDestroy = function () {
1286
+ this._destroy$.next();
1287
+ this._destroy$.complete();
1288
+ };
1289
+ FsAclEntriesComponent.prototype.reload = function () {
1290
+ this.aclEntriesList.reload();
1291
+ };
1292
+ return FsAclEntriesComponent;
1293
+ }());
1294
+ FsAclEntriesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclEntriesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }, { token: i3__namespace$1.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
1295
+ FsAclEntriesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", 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]" }] });
1296
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAclEntriesComponent, decorators: [{
1297
+ type: i0.Component,
1298
+ args: [{
1299
+ selector: 'fs-acl-entries',
1300
+ templateUrl: './acl-entries.component.html',
1301
+ styleUrls: ['./acl-entries.component.scss']
1302
+ }]
1303
+ }], ctorParameters: function () { return [{ type: FsAppAclService }, { type: i2__namespace.MatDialog }, { type: i3__namespace$1.FsPrompt }]; }, propDecorators: { loadAclEntries: [{
1304
+ type: i0.Input
1305
+ }], loadAclRoles: [{
1306
+ type: i0.Input
1307
+ }], saveAclObjectEntry: [{
1308
+ type: i0.Input
1309
+ }], environmentShow: [{
1310
+ type: i0.Input
1311
+ }], environmentLabel: [{
1312
+ type: i0.Input
1313
+ }], environmentKey: [{
1314
+ type: i0.Input
1315
+ }], actions: [{
1316
+ type: i0.Input
1317
+ }], aclEntriesList: [{
1318
+ type: i0.ViewChild,
1319
+ args: [i12.FsListComponent]
1292
1320
  }] } });
1293
1321
 
1294
- var FsAppAclModule = /** @class */ (function () {
1295
- function FsAppAclModule() {
1296
- }
1297
- return FsAppAclModule;
1298
- }());
1299
- FsAppAclModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1300
- FsAppAclModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, declarations: [FsAclRolesComponent,
1301
- FsAclPermissionPopoverComponent,
1302
- FsAclRoleComponent,
1303
- FsAclEntriesComponent,
1304
- FsAclRolePopoverComponent,
1305
- FsAclObjectRolesComponent,
1306
- FsAclEntryComponent], imports: [i7$1.CommonModule,
1307
- i14.FormsModule,
1308
- i2.MatDialogModule,
1309
- i5.MatFormFieldModule,
1310
- i9.MatCheckboxModule,
1311
- i10.MatSelectModule,
1312
- i13.MatButtonModule,
1313
- i8.MatRadioModule,
1314
- i18.MatInputModule,
1315
- flexLayout.FlexLayoutModule,
1316
- i12.FsListModule,
1317
- i2$1.FsPopoverModule,
1318
- i4.FsDialogModule,
1319
- i15.FsFormModule,
1320
- i6.FsLabelModule,
1321
- i7.FsRadioGroupModule,
1322
- i5$1.FsBadgeModule,
1323
- i1.FsCheckboxGroupModule], exports: [FsAclRolesComponent,
1324
- FsAclPermissionPopoverComponent,
1325
- FsAclRoleComponent,
1326
- FsAclEntriesComponent,
1327
- FsAclRolePopoverComponent,
1328
- FsAclObjectRolesComponent,
1329
- FsAclEntryComponent] });
1330
- FsAppAclModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, imports: [[
1331
- i7$1.CommonModule,
1332
- i14.FormsModule,
1333
- i2.MatDialogModule,
1334
- i5.MatFormFieldModule,
1335
- i9.MatCheckboxModule,
1336
- i10.MatSelectModule,
1337
- i13.MatButtonModule,
1338
- i8.MatRadioModule,
1339
- i18.MatInputModule,
1340
- flexLayout.FlexLayoutModule,
1341
- i12.FsListModule,
1342
- i2$1.FsPopoverModule,
1343
- i4.FsDialogModule,
1344
- i15.FsFormModule,
1345
- i6.FsLabelModule,
1346
- i7.FsRadioGroupModule,
1347
- i5$1.FsBadgeModule,
1348
- i1.FsCheckboxGroupModule,
1349
- ]] });
1350
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, decorators: [{
1351
- type: i0.NgModule,
1352
- args: [{
1353
- imports: [
1354
- i7$1.CommonModule,
1355
- i14.FormsModule,
1356
- i2.MatDialogModule,
1357
- i5.MatFormFieldModule,
1358
- i9.MatCheckboxModule,
1359
- i10.MatSelectModule,
1360
- i13.MatButtonModule,
1361
- i8.MatRadioModule,
1362
- i18.MatInputModule,
1363
- flexLayout.FlexLayoutModule,
1364
- i12.FsListModule,
1365
- i2$1.FsPopoverModule,
1366
- i4.FsDialogModule,
1367
- i15.FsFormModule,
1368
- i6.FsLabelModule,
1369
- i7.FsRadioGroupModule,
1370
- i5$1.FsBadgeModule,
1371
- i1.FsCheckboxGroupModule,
1372
- ],
1373
- declarations: [
1374
- FsAclRolesComponent,
1375
- FsAclPermissionPopoverComponent,
1376
- FsAclRoleComponent,
1377
- FsAclEntriesComponent,
1378
- FsAclRolePopoverComponent,
1379
- FsAclObjectRolesComponent,
1380
- FsAclEntryComponent,
1381
- ],
1382
- exports: [
1383
- FsAclRolesComponent,
1384
- FsAclPermissionPopoverComponent,
1385
- FsAclRoleComponent,
1386
- FsAclEntriesComponent,
1387
- FsAclRolePopoverComponent,
1388
- FsAclObjectRolesComponent,
1389
- FsAclEntryComponent,
1390
- ],
1391
- }]
1322
+ var FsAppAclModule = /** @class */ (function () {
1323
+ function FsAppAclModule() {
1324
+ }
1325
+ return FsAppAclModule;
1326
+ }());
1327
+ FsAppAclModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1328
+ FsAppAclModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, declarations: [FsAclRolesComponent,
1329
+ FsAclPermissionPopoverComponent,
1330
+ FsAclRoleComponent,
1331
+ FsAclEntriesComponent,
1332
+ FsAclRolePopoverComponent,
1333
+ FsAclObjectRolesComponent,
1334
+ FsAclEntryComponent,
1335
+ BulkOptionsFilterPipe], imports: [i7$1.CommonModule,
1336
+ i14.FormsModule,
1337
+ i2.MatDialogModule,
1338
+ i5.MatFormFieldModule,
1339
+ i9.MatCheckboxModule,
1340
+ i10.MatSelectModule,
1341
+ i13.MatButtonModule,
1342
+ i8.MatRadioModule,
1343
+ i18.MatInputModule,
1344
+ flexLayout.FlexLayoutModule,
1345
+ i12.FsListModule,
1346
+ i2$1.FsPopoverModule,
1347
+ i4.FsDialogModule,
1348
+ i15.FsFormModule,
1349
+ i6.FsLabelModule,
1350
+ i7.FsRadioGroupModule,
1351
+ i5$1.FsBadgeModule,
1352
+ i1.FsCheckboxGroupModule], exports: [FsAclRolesComponent,
1353
+ FsAclPermissionPopoverComponent,
1354
+ FsAclRoleComponent,
1355
+ FsAclEntriesComponent,
1356
+ FsAclRolePopoverComponent,
1357
+ FsAclObjectRolesComponent,
1358
+ FsAclEntryComponent] });
1359
+ FsAppAclModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, imports: [[
1360
+ i7$1.CommonModule,
1361
+ i14.FormsModule,
1362
+ i2.MatDialogModule,
1363
+ i5.MatFormFieldModule,
1364
+ i9.MatCheckboxModule,
1365
+ i10.MatSelectModule,
1366
+ i13.MatButtonModule,
1367
+ i8.MatRadioModule,
1368
+ i18.MatInputModule,
1369
+ flexLayout.FlexLayoutModule,
1370
+ i12.FsListModule,
1371
+ i2$1.FsPopoverModule,
1372
+ i4.FsDialogModule,
1373
+ i15.FsFormModule,
1374
+ i6.FsLabelModule,
1375
+ i7.FsRadioGroupModule,
1376
+ i5$1.FsBadgeModule,
1377
+ i1.FsCheckboxGroupModule,
1378
+ ]] });
1379
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FsAppAclModule, decorators: [{
1380
+ type: i0.NgModule,
1381
+ args: [{
1382
+ imports: [
1383
+ i7$1.CommonModule,
1384
+ i14.FormsModule,
1385
+ i2.MatDialogModule,
1386
+ i5.MatFormFieldModule,
1387
+ i9.MatCheckboxModule,
1388
+ i10.MatSelectModule,
1389
+ i13.MatButtonModule,
1390
+ i8.MatRadioModule,
1391
+ i18.MatInputModule,
1392
+ flexLayout.FlexLayoutModule,
1393
+ i12.FsListModule,
1394
+ i2$1.FsPopoverModule,
1395
+ i4.FsDialogModule,
1396
+ i15.FsFormModule,
1397
+ i6.FsLabelModule,
1398
+ i7.FsRadioGroupModule,
1399
+ i5$1.FsBadgeModule,
1400
+ i1.FsCheckboxGroupModule,
1401
+ ],
1402
+ declarations: [
1403
+ FsAclRolesComponent,
1404
+ FsAclPermissionPopoverComponent,
1405
+ FsAclRoleComponent,
1406
+ FsAclEntriesComponent,
1407
+ FsAclRolePopoverComponent,
1408
+ FsAclObjectRolesComponent,
1409
+ FsAclEntryComponent,
1410
+ BulkOptionsFilterPipe,
1411
+ ],
1412
+ exports: [
1413
+ FsAclRolesComponent,
1414
+ FsAclPermissionPopoverComponent,
1415
+ FsAclRoleComponent,
1416
+ FsAclEntriesComponent,
1417
+ FsAclRolePopoverComponent,
1418
+ FsAclObjectRolesComponent,
1419
+ FsAclEntryComponent,
1420
+ ],
1421
+ }]
1392
1422
  }] });
1393
1423
 
1394
- /**
1395
- * Generated bundle index. Do not edit.
1424
+ /**
1425
+ * Generated bundle index. Do not edit.
1396
1426
  */
1397
1427
 
1398
1428
  exports.FS_APP_ACL_CONFIG = FS_APP_ACL_CONFIG;