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