@yelon/acl 12.0.17 → 12.0.18

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/fesm2015/acl.js CHANGED
@@ -7,396 +7,396 @@ import * as i2 from '@angular/router';
7
7
  import { Router } from '@angular/router';
8
8
  import { CommonModule } from '@angular/common';
9
9
 
10
- const ACL_DEFAULT_CONFIG = {
11
- guard_url: `/403`
10
+ const ACL_DEFAULT_CONFIG = {
11
+ guard_url: `/403`
12
12
  };
13
13
 
14
- /**
15
- * ACL 控制服务,[在线文档](https://ng.yunzainfo.com/acl)
16
- *
17
- * 务必在根目录注册 `YelonACLModule.forRoot()` 才能使用服务
18
- */
19
- class ACLService {
20
- constructor(configSrv) {
21
- this.roles = [];
22
- this.abilities = [];
23
- this.full = false;
24
- this.aclChange = new BehaviorSubject(null);
25
- this.options = configSrv.merge('acl', ACL_DEFAULT_CONFIG);
26
- }
27
- /** ACL变更通知 */
28
- get change() {
29
- return this.aclChange.asObservable();
30
- }
31
- /** 获取所有数据 */
32
- get data() {
33
- return {
34
- full: this.full,
35
- roles: this.roles,
36
- abilities: this.abilities
37
- };
38
- }
39
- get guard_url() {
40
- return this.options.guard_url;
41
- }
42
- parseACLType(val) {
43
- let t;
44
- if (typeof val === 'number') {
45
- t = { ability: [val] };
46
- }
47
- else if (Array.isArray(val) && val.length > 0 && typeof val[0] === 'number') {
48
- t = { ability: val };
49
- }
50
- else if (typeof val === 'object' && !Array.isArray(val)) {
51
- t = Object.assign({}, val);
52
- }
53
- else if (Array.isArray(val)) {
54
- t = { role: val };
55
- }
56
- else {
57
- t = { role: val == null ? [] : [val] };
58
- }
59
- return Object.assign({ except: false }, t);
60
- }
61
- /**
62
- * 设置当前用户角色或权限能力(会先清除所有)
63
- */
64
- set(value) {
65
- this.full = false;
66
- this.abilities = [];
67
- this.roles = [];
68
- this.add(value);
69
- this.aclChange.next(value);
70
- }
71
- /**
72
- * 标识当前用户为全量,即不受限
73
- */
74
- setFull(val) {
75
- this.full = val;
76
- this.aclChange.next(val);
77
- }
78
- /**
79
- * 设置当前用户权限能力(会先清除所有)
80
- */
81
- setAbility(abilities) {
82
- this.set({ ability: abilities });
83
- }
84
- /**
85
- * 设置当前用户角色(会先清除所有)
86
- */
87
- setRole(roles) {
88
- this.set({ role: roles });
89
- }
90
- /**
91
- * 为当前用户增加角色或权限能力
92
- */
93
- add(value) {
94
- if (value.role && value.role.length > 0) {
95
- this.roles.push(...value.role);
96
- }
97
- if (value.ability && value.ability.length > 0) {
98
- this.abilities.push(...value.ability);
99
- }
100
- }
101
- /**
102
- * 为当前用户附加角色
103
- */
104
- attachRole(roles) {
105
- for (const val of roles) {
106
- if (!this.roles.includes(val)) {
107
- this.roles.push(val);
108
- }
109
- }
110
- this.aclChange.next(this.data);
111
- }
112
- /**
113
- * 为当前用户附加权限
114
- */
115
- attachAbility(abilities) {
116
- for (const val of abilities) {
117
- if (!this.abilities.includes(val)) {
118
- this.abilities.push(val);
119
- }
120
- }
121
- this.aclChange.next(this.data);
122
- }
123
- /**
124
- * 为当前用户移除角色
125
- */
126
- removeRole(roles) {
127
- for (const val of roles) {
128
- const idx = this.roles.indexOf(val);
129
- if (idx !== -1) {
130
- this.roles.splice(idx, 1);
131
- }
132
- }
133
- this.aclChange.next(this.data);
134
- }
135
- /**
136
- * 为当前用户移除权限
137
- */
138
- removeAbility(abilities) {
139
- for (const val of abilities) {
140
- const idx = this.abilities.indexOf(val);
141
- if (idx !== -1) {
142
- this.abilities.splice(idx, 1);
143
- }
144
- }
145
- this.aclChange.next(this.data);
146
- }
147
- /**
148
- * 当前用户是否有对应角色,其实 `number` 表示Ability
149
- *
150
- * - 当 `full: true` 或参数 `null` 时返回 `true`
151
- * - 若使用 `ACLType` 参数,可以指定 `mode` 校验模式
152
- */
153
- can(roleOrAbility) {
154
- const { preCan } = this.options;
155
- if (preCan) {
156
- roleOrAbility = preCan(roleOrAbility);
157
- }
158
- const t = this.parseACLType(roleOrAbility);
159
- let result = false;
160
- if (this.full === true || !roleOrAbility) {
161
- result = true;
162
- }
163
- else {
164
- if (t.role && t.role.length > 0) {
165
- if (t.mode === 'allOf') {
166
- result = t.role.every(v => this.roles.includes(v));
167
- }
168
- else {
169
- result = t.role.some(v => this.roles.includes(v));
170
- }
171
- }
172
- if (t.ability && t.ability.length > 0) {
173
- if (t.mode === 'allOf') {
174
- result = t.ability.every(v => this.abilities.includes(v));
175
- }
176
- else {
177
- result = t.ability.some(v => this.abilities.includes(v));
178
- }
179
- }
180
- }
181
- return t.except === true ? !result : result;
182
- }
183
- /** @inner */
184
- parseAbility(value) {
185
- if (typeof value === 'number' || typeof value === 'string' || Array.isArray(value)) {
186
- value = { ability: Array.isArray(value) ? value : [value] };
187
- }
188
- delete value.role;
189
- return value;
190
- }
191
- /**
192
- * 当前用户是否有对应权限点
193
- */
194
- canAbility(value) {
195
- return this.can(this.parseAbility(value));
196
- }
197
- }
198
- ACLService.decorators = [
199
- { type: Injectable }
200
- ];
201
- ACLService.ctorParameters = () => [
202
- { type: YunzaiConfigService }
14
+ /**
15
+ * ACL 控制服务,[在线文档](https://ng.yunzainfo.com/acl)
16
+ *
17
+ * 务必在根目录注册 `YelonACLModule.forRoot()` 才能使用服务
18
+ */
19
+ class ACLService {
20
+ constructor(configSrv) {
21
+ this.roles = [];
22
+ this.abilities = [];
23
+ this.full = false;
24
+ this.aclChange = new BehaviorSubject(null);
25
+ this.options = configSrv.merge('acl', ACL_DEFAULT_CONFIG);
26
+ }
27
+ /** ACL变更通知 */
28
+ get change() {
29
+ return this.aclChange.asObservable();
30
+ }
31
+ /** 获取所有数据 */
32
+ get data() {
33
+ return {
34
+ full: this.full,
35
+ roles: this.roles,
36
+ abilities: this.abilities
37
+ };
38
+ }
39
+ get guard_url() {
40
+ return this.options.guard_url;
41
+ }
42
+ parseACLType(val) {
43
+ let t;
44
+ if (typeof val === 'number') {
45
+ t = { ability: [val] };
46
+ }
47
+ else if (Array.isArray(val) && val.length > 0 && typeof val[0] === 'number') {
48
+ t = { ability: val };
49
+ }
50
+ else if (typeof val === 'object' && !Array.isArray(val)) {
51
+ t = Object.assign({}, val);
52
+ }
53
+ else if (Array.isArray(val)) {
54
+ t = { role: val };
55
+ }
56
+ else {
57
+ t = { role: val == null ? [] : [val] };
58
+ }
59
+ return Object.assign({ except: false }, t);
60
+ }
61
+ /**
62
+ * 设置当前用户角色或权限能力(会先清除所有)
63
+ */
64
+ set(value) {
65
+ this.full = false;
66
+ this.abilities = [];
67
+ this.roles = [];
68
+ this.add(value);
69
+ this.aclChange.next(value);
70
+ }
71
+ /**
72
+ * 标识当前用户为全量,即不受限
73
+ */
74
+ setFull(val) {
75
+ this.full = val;
76
+ this.aclChange.next(val);
77
+ }
78
+ /**
79
+ * 设置当前用户权限能力(会先清除所有)
80
+ */
81
+ setAbility(abilities) {
82
+ this.set({ ability: abilities });
83
+ }
84
+ /**
85
+ * 设置当前用户角色(会先清除所有)
86
+ */
87
+ setRole(roles) {
88
+ this.set({ role: roles });
89
+ }
90
+ /**
91
+ * 为当前用户增加角色或权限能力
92
+ */
93
+ add(value) {
94
+ if (value.role && value.role.length > 0) {
95
+ this.roles.push(...value.role);
96
+ }
97
+ if (value.ability && value.ability.length > 0) {
98
+ this.abilities.push(...value.ability);
99
+ }
100
+ }
101
+ /**
102
+ * 为当前用户附加角色
103
+ */
104
+ attachRole(roles) {
105
+ for (const val of roles) {
106
+ if (!this.roles.includes(val)) {
107
+ this.roles.push(val);
108
+ }
109
+ }
110
+ this.aclChange.next(this.data);
111
+ }
112
+ /**
113
+ * 为当前用户附加权限
114
+ */
115
+ attachAbility(abilities) {
116
+ for (const val of abilities) {
117
+ if (!this.abilities.includes(val)) {
118
+ this.abilities.push(val);
119
+ }
120
+ }
121
+ this.aclChange.next(this.data);
122
+ }
123
+ /**
124
+ * 为当前用户移除角色
125
+ */
126
+ removeRole(roles) {
127
+ for (const val of roles) {
128
+ const idx = this.roles.indexOf(val);
129
+ if (idx !== -1) {
130
+ this.roles.splice(idx, 1);
131
+ }
132
+ }
133
+ this.aclChange.next(this.data);
134
+ }
135
+ /**
136
+ * 为当前用户移除权限
137
+ */
138
+ removeAbility(abilities) {
139
+ for (const val of abilities) {
140
+ const idx = this.abilities.indexOf(val);
141
+ if (idx !== -1) {
142
+ this.abilities.splice(idx, 1);
143
+ }
144
+ }
145
+ this.aclChange.next(this.data);
146
+ }
147
+ /**
148
+ * 当前用户是否有对应角色,其实 `number` 表示Ability
149
+ *
150
+ * - 当 `full: true` 或参数 `null` 时返回 `true`
151
+ * - 若使用 `ACLType` 参数,可以指定 `mode` 校验模式
152
+ */
153
+ can(roleOrAbility) {
154
+ const { preCan } = this.options;
155
+ if (preCan) {
156
+ roleOrAbility = preCan(roleOrAbility);
157
+ }
158
+ const t = this.parseACLType(roleOrAbility);
159
+ let result = false;
160
+ if (this.full === true || !roleOrAbility) {
161
+ result = true;
162
+ }
163
+ else {
164
+ if (t.role && t.role.length > 0) {
165
+ if (t.mode === 'allOf') {
166
+ result = t.role.every(v => this.roles.includes(v));
167
+ }
168
+ else {
169
+ result = t.role.some(v => this.roles.includes(v));
170
+ }
171
+ }
172
+ if (t.ability && t.ability.length > 0) {
173
+ if (t.mode === 'allOf') {
174
+ result = t.ability.every(v => this.abilities.includes(v));
175
+ }
176
+ else {
177
+ result = t.ability.some(v => this.abilities.includes(v));
178
+ }
179
+ }
180
+ }
181
+ return t.except === true ? !result : result;
182
+ }
183
+ /** @inner */
184
+ parseAbility(value) {
185
+ if (typeof value === 'number' || typeof value === 'string' || Array.isArray(value)) {
186
+ value = { ability: Array.isArray(value) ? value : [value] };
187
+ }
188
+ delete value.role;
189
+ return value;
190
+ }
191
+ /**
192
+ * 当前用户是否有对应权限点
193
+ */
194
+ canAbility(value) {
195
+ return this.can(this.parseAbility(value));
196
+ }
197
+ }
198
+ ACLService.decorators = [
199
+ { type: Injectable }
200
+ ];
201
+ ACLService.ctorParameters = () => [
202
+ { type: YunzaiConfigService }
203
203
  ];
204
204
 
205
- class ACLIfDirective {
206
- constructor(templateRef, srv, _viewContainer) {
207
- this.srv = srv;
208
- this._viewContainer = _viewContainer;
209
- this._thenTemplateRef = null;
210
- this._elseTemplateRef = null;
211
- this._thenViewRef = null;
212
- this._elseViewRef = null;
213
- this._except = false;
214
- this._change$ = this.srv.change.pipe(filter(r => r != null)).subscribe(() => this._updateView());
215
- this._thenTemplateRef = templateRef;
216
- }
217
- set aclIf(value) {
218
- this._value = value;
219
- this._updateView();
220
- }
221
- set aclIfThen(templateRef) {
222
- this._thenTemplateRef = templateRef;
223
- this._thenViewRef = null;
224
- this._updateView();
225
- }
226
- set aclIfElse(templateRef) {
227
- this._elseTemplateRef = templateRef;
228
- this._elseViewRef = null;
229
- this._updateView();
230
- }
231
- set except(value) {
232
- this._except = value != null && `${value}` !== 'false';
233
- }
234
- get except() {
235
- return this._except;
236
- }
237
- _updateView() {
238
- const res = this.srv.can(this._value);
239
- if ((res && !this.except) || (!res && this.except)) {
240
- if (!this._thenViewRef) {
241
- this._viewContainer.clear();
242
- this._elseViewRef = null;
243
- if (this._thenTemplateRef) {
244
- this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef);
245
- }
246
- }
247
- }
248
- else {
249
- if (!this._elseViewRef) {
250
- this._viewContainer.clear();
251
- this._thenViewRef = null;
252
- if (this._elseTemplateRef) {
253
- this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef);
254
- }
255
- }
256
- }
257
- }
258
- ngOnDestroy() {
259
- this._change$.unsubscribe();
260
- }
261
- }
262
- ACLIfDirective.decorators = [
263
- { type: Directive, args: [{
264
- selector: '[aclIf]',
265
- exportAs: 'aclIf'
266
- },] }
267
- ];
268
- ACLIfDirective.ctorParameters = () => [
269
- { type: TemplateRef },
270
- { type: ACLService },
271
- { type: ViewContainerRef }
272
- ];
273
- ACLIfDirective.propDecorators = {
274
- aclIf: [{ type: Input }],
275
- aclIfThen: [{ type: Input }],
276
- aclIfElse: [{ type: Input }],
277
- except: [{ type: Input }]
205
+ class ACLIfDirective {
206
+ constructor(templateRef, srv, _viewContainer) {
207
+ this.srv = srv;
208
+ this._viewContainer = _viewContainer;
209
+ this._thenTemplateRef = null;
210
+ this._elseTemplateRef = null;
211
+ this._thenViewRef = null;
212
+ this._elseViewRef = null;
213
+ this._except = false;
214
+ this._change$ = this.srv.change.pipe(filter(r => r != null)).subscribe(() => this._updateView());
215
+ this._thenTemplateRef = templateRef;
216
+ }
217
+ set aclIf(value) {
218
+ this._value = value;
219
+ this._updateView();
220
+ }
221
+ set aclIfThen(templateRef) {
222
+ this._thenTemplateRef = templateRef;
223
+ this._thenViewRef = null;
224
+ this._updateView();
225
+ }
226
+ set aclIfElse(templateRef) {
227
+ this._elseTemplateRef = templateRef;
228
+ this._elseViewRef = null;
229
+ this._updateView();
230
+ }
231
+ set except(value) {
232
+ this._except = value != null && `${value}` !== 'false';
233
+ }
234
+ get except() {
235
+ return this._except;
236
+ }
237
+ _updateView() {
238
+ const res = this.srv.can(this._value);
239
+ if ((res && !this.except) || (!res && this.except)) {
240
+ if (!this._thenViewRef) {
241
+ this._viewContainer.clear();
242
+ this._elseViewRef = null;
243
+ if (this._thenTemplateRef) {
244
+ this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef);
245
+ }
246
+ }
247
+ }
248
+ else {
249
+ if (!this._elseViewRef) {
250
+ this._viewContainer.clear();
251
+ this._thenViewRef = null;
252
+ if (this._elseTemplateRef) {
253
+ this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef);
254
+ }
255
+ }
256
+ }
257
+ }
258
+ ngOnDestroy() {
259
+ this._change$.unsubscribe();
260
+ }
261
+ }
262
+ ACLIfDirective.decorators = [
263
+ { type: Directive, args: [{
264
+ selector: '[aclIf]',
265
+ exportAs: 'aclIf'
266
+ },] }
267
+ ];
268
+ ACLIfDirective.ctorParameters = () => [
269
+ { type: TemplateRef },
270
+ { type: ACLService },
271
+ { type: ViewContainerRef }
272
+ ];
273
+ ACLIfDirective.propDecorators = {
274
+ aclIf: [{ type: Input }],
275
+ aclIfThen: [{ type: Input }],
276
+ aclIfElse: [{ type: Input }],
277
+ except: [{ type: Input }]
278
278
  };
279
279
 
280
- class ACLDirective {
281
- constructor(el, renderer, srv) {
282
- this.el = el;
283
- this.renderer = renderer;
284
- this.srv = srv;
285
- this.change$ = this.srv.change.pipe(filter(r => r != null)).subscribe(() => this.set(this._value));
286
- }
287
- set acl(value) {
288
- this.set(value);
289
- }
290
- set ability(value) {
291
- this.set(this.srv.parseAbility(value));
292
- }
293
- set(value) {
294
- this._value = value;
295
- const CLS = 'acl__hide';
296
- const el = this.el.nativeElement;
297
- if (this.srv.can(this._value)) {
298
- this.renderer.removeClass(el, CLS);
299
- }
300
- else {
301
- this.renderer.addClass(el, CLS);
302
- }
303
- }
304
- ngOnDestroy() {
305
- this.change$.unsubscribe();
306
- }
307
- }
308
- ACLDirective.decorators = [
309
- { type: Directive, args: [{
310
- selector: '[acl]',
311
- exportAs: 'acl'
312
- },] }
313
- ];
314
- ACLDirective.ctorParameters = () => [
315
- { type: ElementRef },
316
- { type: Renderer2 },
317
- { type: ACLService }
318
- ];
319
- ACLDirective.propDecorators = {
320
- acl: [{ type: Input, args: ['acl',] }],
321
- ability: [{ type: Input, args: ['acl-ability',] }]
280
+ class ACLDirective {
281
+ constructor(el, renderer, srv) {
282
+ this.el = el;
283
+ this.renderer = renderer;
284
+ this.srv = srv;
285
+ this.change$ = this.srv.change.pipe(filter(r => r != null)).subscribe(() => this.set(this._value));
286
+ }
287
+ set acl(value) {
288
+ this.set(value);
289
+ }
290
+ set ability(value) {
291
+ this.set(this.srv.parseAbility(value));
292
+ }
293
+ set(value) {
294
+ this._value = value;
295
+ const CLS = 'acl__hide';
296
+ const el = this.el.nativeElement;
297
+ if (this.srv.can(this._value)) {
298
+ this.renderer.removeClass(el, CLS);
299
+ }
300
+ else {
301
+ this.renderer.addClass(el, CLS);
302
+ }
303
+ }
304
+ ngOnDestroy() {
305
+ this.change$.unsubscribe();
306
+ }
307
+ }
308
+ ACLDirective.decorators = [
309
+ { type: Directive, args: [{
310
+ selector: '[acl]',
311
+ exportAs: 'acl'
312
+ },] }
313
+ ];
314
+ ACLDirective.ctorParameters = () => [
315
+ { type: ElementRef },
316
+ { type: Renderer2 },
317
+ { type: ACLService }
318
+ ];
319
+ ACLDirective.propDecorators = {
320
+ acl: [{ type: Input, args: ['acl',] }],
321
+ ability: [{ type: Input, args: ['acl-ability',] }]
322
322
  };
323
323
 
324
- /**
325
- * NOTE:`ACLType` 类型可能会被其他类库所引用,为了减少类库间彼此的依赖性,其他类库会以复制的形式存在
326
- * 当这里有变化时,请务必同步更新,涉及:`MenuService.acl`、`util.YunzaiACLType`
327
- * TODO: 尝试增加 `@yelon/core` 类库用于处理这种通用型
324
+ /**
325
+ * NOTE:`ACLType` 类型可能会被其他类库所引用,为了减少类库间彼此的依赖性,其他类库会以复制的形式存在
326
+ * 当这里有变化时,请务必同步更新,涉及:`MenuService.acl`、`util.YunzaiACLType`
327
+ * TODO: 尝试增加 `@yelon/core` 类库用于处理这种通用型
328
328
  */
329
329
 
330
- /**
331
- * Routing guard prevent unauthorized users visit the page, [ACL Document](https://ng.yunzainfo.com/acl).
332
- *
333
- * ```ts
334
- * data: {
335
- * path: 'home',
336
- * canActivate: [ ACLGuard ],
337
- * data: { guard: 'user1' }
338
- * }
339
- * ```
340
- */
341
- class ACLGuard {
342
- constructor(srv, router, injector) {
343
- this.srv = srv;
344
- this.router = router;
345
- this.injector = injector;
346
- }
347
- process(data) {
348
- data = Object.assign({ guard: null, guard_url: this.srv.guard_url }, data);
349
- let guard = data.guard;
350
- if (typeof guard === 'function')
351
- guard = guard(this.srv, this.injector);
352
- return (guard && guard instanceof Observable ? guard : of(guard != null ? guard : null)).pipe(map(v => this.srv.can(v)), tap(v => {
353
- if (v)
354
- return;
355
- this.router.navigateByUrl(data.guard_url);
356
- }));
357
- }
358
- // lazy loading
359
- canLoad(route) {
360
- return this.process(route.data);
361
- }
362
- // all children route
363
- canActivateChild(childRoute, state) {
364
- return this.canActivate(childRoute, state);
365
- }
366
- // route
367
- canActivate(route, _state) {
368
- return this.process(route.data);
369
- }
370
- }
371
- ACLGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function ACLGuard_Factory() { return new ACLGuard(i0.ɵɵinject(ACLService), i0.ɵɵinject(i2.Router), i0.ɵɵinject(i0.INJECTOR)); }, token: ACLGuard, providedIn: "root" });
372
- ACLGuard.decorators = [
373
- { type: Injectable, args: [{ providedIn: 'root' },] }
374
- ];
375
- ACLGuard.ctorParameters = () => [
376
- { type: ACLService },
377
- { type: Router },
378
- { type: Injector }
330
+ /**
331
+ * Routing guard prevent unauthorized users visit the page, [ACL Document](https://ng.yunzainfo.com/acl).
332
+ *
333
+ * ```ts
334
+ * data: {
335
+ * path: 'home',
336
+ * canActivate: [ ACLGuard ],
337
+ * data: { guard: 'user1' }
338
+ * }
339
+ * ```
340
+ */
341
+ class ACLGuard {
342
+ constructor(srv, router, injector) {
343
+ this.srv = srv;
344
+ this.router = router;
345
+ this.injector = injector;
346
+ }
347
+ process(data) {
348
+ data = Object.assign({ guard: null, guard_url: this.srv.guard_url }, data);
349
+ let guard = data.guard;
350
+ if (typeof guard === 'function')
351
+ guard = guard(this.srv, this.injector);
352
+ return (guard && guard instanceof Observable ? guard : of(guard != null ? guard : null)).pipe(map(v => this.srv.can(v)), tap(v => {
353
+ if (v)
354
+ return;
355
+ this.router.navigateByUrl(data.guard_url);
356
+ }));
357
+ }
358
+ // lazy loading
359
+ canLoad(route) {
360
+ return this.process(route.data);
361
+ }
362
+ // all children route
363
+ canActivateChild(childRoute, state) {
364
+ return this.canActivate(childRoute, state);
365
+ }
366
+ // route
367
+ canActivate(route, _state) {
368
+ return this.process(route.data);
369
+ }
370
+ }
371
+ ACLGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function ACLGuard_Factory() { return new ACLGuard(i0.ɵɵinject(ACLService), i0.ɵɵinject(i2.Router), i0.ɵɵinject(i0.INJECTOR)); }, token: ACLGuard, providedIn: "root" });
372
+ ACLGuard.decorators = [
373
+ { type: Injectable, args: [{ providedIn: 'root' },] }
374
+ ];
375
+ ACLGuard.ctorParameters = () => [
376
+ { type: ACLService },
377
+ { type: Router },
378
+ { type: Injector }
379
379
  ];
380
380
 
381
- const COMPONENTS = [ACLDirective, ACLIfDirective];
382
- class YelonACLModule {
383
- static forRoot() {
384
- return {
385
- ngModule: YelonACLModule,
386
- providers: [ACLService]
387
- };
388
- }
389
- }
390
- YelonACLModule.decorators = [
391
- { type: NgModule, args: [{
392
- imports: [CommonModule],
393
- declarations: COMPONENTS,
394
- exports: COMPONENTS
395
- },] }
381
+ const COMPONENTS = [ACLDirective, ACLIfDirective];
382
+ class YelonACLModule {
383
+ static forRoot() {
384
+ return {
385
+ ngModule: YelonACLModule,
386
+ providers: [ACLService]
387
+ };
388
+ }
389
+ }
390
+ YelonACLModule.decorators = [
391
+ { type: NgModule, args: [{
392
+ imports: [CommonModule],
393
+ declarations: COMPONENTS,
394
+ exports: COMPONENTS
395
+ },] }
396
396
  ];
397
397
 
398
- /**
399
- * Generated bundle index. Do not edit.
398
+ /**
399
+ * Generated bundle index. Do not edit.
400
400
  */
401
401
 
402
402
  export { ACLDirective, ACLGuard, ACLIfDirective, ACLService, ACL_DEFAULT_CONFIG, YelonACLModule };