@firestitch/app-acl 12.4.12 → 12.5.0

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