@firestitch/app-acl 12.3.0 → 12.3.1

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