@cauca-911/management 11.0.1 → 12.0.2
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/bundles/cauca-911-management.umd.js +329 -114
- package/bundles/cauca-911-management.umd.js.map +1 -1
- package/cauca-911-management.d.ts +1 -1
- package/esm2015/cauca-911-management.js +1 -2
- package/esm2015/lib/cauca-management-group/cauca-management-group.component.js +130 -44
- package/esm2015/lib/cauca-management-user/cauca-management-user.component.js +67 -18
- package/esm2015/lib/cauca-management.component.js +20 -7
- package/esm2015/lib/cauca-management.module.js +27 -5
- package/esm2015/lib/cauca-management.service.js +8 -7
- package/esm2015/lib/shared/models/group-model.js +1 -1
- package/esm2015/lib/shared/models/group-permission-model.js +1 -1
- package/esm2015/lib/shared/models/permission-model.js +1 -1
- package/esm2015/lib/shared/models/user-group-model.js +1 -1
- package/esm2015/lib/shared/models/user-model.js +1 -1
- package/esm2015/lib/shared/models/user-permission-model.js +1 -1
- package/esm2015/lib/shared/services/management-group.service.js +8 -12
- package/esm2015/lib/shared/services/management-permission.service.js +8 -12
- package/esm2015/lib/shared/services/management-user.service.js +8 -12
- package/esm2015/public-api.js +1 -1
- package/fesm2015/cauca-911-management.js +261 -102
- package/fesm2015/cauca-911-management.js.map +1 -1
- package/lib/cauca-management-group/cauca-management-group.component.d.ts +4 -1
- package/lib/cauca-management-user/cauca-management-user.component.d.ts +3 -0
- package/lib/cauca-management.component.d.ts +3 -0
- package/lib/cauca-management.module.d.ts +13 -0
- package/lib/cauca-management.service.d.ts +3 -0
- package/lib/shared/services/management-group.service.d.ts +3 -0
- package/lib/shared/services/management-permission.service.d.ts +3 -0
- package/lib/shared/services/management-user.service.d.ts +3 -0
- package/package.json +9 -7
- package/bundles/cauca-911-management.umd.min.js +0 -2
- package/bundles/cauca-911-management.umd.min.js.map +0 -1
- package/cauca-911-management.metadata.json +0 -1
|
@@ -1,21 +1,54 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('devextreme-angular/ui/check-box'), require('devextreme-angular/ui/list'), require('devextreme-angular/ui/tag-box'), require('@cauca-911/core'), require('@cauca-911/devextreme'), require('@angular/cdk/layout'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@cauca-911/management', ['exports', '@angular/core', 'devextreme-angular/ui/check-box', 'devextreme-angular/ui/list', 'devextreme-angular/ui/tag-box', '@cauca-911/core', '@cauca-911/devextreme', '@angular/cdk/layout', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global[
|
|
5
|
-
}(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngx-translate/core'), require('devextreme-angular/ui/check-box'), require('devextreme-angular/ui/list'), require('devextreme-angular/ui/tag-box'), require('@cauca-911/core'), require('@cauca-911/devextreme'), require('rxjs/operators'), require('@angular/common/http'), require('@angular/cdk/layout'), require('devextreme-angular/ui/nested'), require('devextreme-angular/core'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@cauca-911/management', ['exports', '@angular/core', '@ngx-translate/core', 'devextreme-angular/ui/check-box', 'devextreme-angular/ui/list', 'devextreme-angular/ui/tag-box', '@cauca-911/core', '@cauca-911/devextreme', 'rxjs/operators', '@angular/common/http', '@angular/cdk/layout', 'devextreme-angular/ui/nested', 'devextreme-angular/core', '@angular/common'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["cauca-911"] = global["cauca-911"] || {}, global["cauca-911"].management = {}), global.ng.core, global["@ngx-translate/core"], global["devextreme-angular/ui/check-box"], global["devextreme-angular/ui/list"], global["devextreme-angular/ui/tag-box"], global["@cauca-911/core"], global["@cauca-911/devextreme"], global.rxjs.operators, global.ng.common.http, global.ng.cdk.layout, global["devextreme-angular/ui/nested"], global["devextreme-angular/core"], global.ng.common));
|
|
5
|
+
})(this, (function (exports, i0, i1, i10, i9, i8, i1$1, i5, operators, i2, i4, i6, i7, common) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
28
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
29
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
30
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
31
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
32
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
33
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
34
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
35
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
6
36
|
|
|
7
37
|
var CaucaManagementService = /** @class */ (function () {
|
|
8
38
|
function CaucaManagementService() {
|
|
9
39
|
}
|
|
10
40
|
return CaucaManagementService;
|
|
11
41
|
}());
|
|
12
|
-
CaucaManagementService.ɵ
|
|
13
|
-
CaucaManagementService
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
42
|
+
CaucaManagementService.ɵfac = function CaucaManagementService_Factory(t) { return new (t || CaucaManagementService)(); };
|
|
43
|
+
CaucaManagementService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: CaucaManagementService, factory: CaucaManagementService.ɵfac, providedIn: 'root' });
|
|
44
|
+
(function () {
|
|
45
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaManagementService, [{
|
|
46
|
+
type: i0.Injectable,
|
|
47
|
+
args: [{
|
|
48
|
+
providedIn: 'root'
|
|
49
|
+
}]
|
|
50
|
+
}], function () { return []; }, null);
|
|
51
|
+
})();
|
|
19
52
|
|
|
20
53
|
var CaucaManagementComponent = /** @class */ (function () {
|
|
21
54
|
function CaucaManagementComponent() {
|
|
@@ -24,13 +57,29 @@
|
|
|
24
57
|
};
|
|
25
58
|
return CaucaManagementComponent;
|
|
26
59
|
}());
|
|
27
|
-
CaucaManagementComponent
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
60
|
+
CaucaManagementComponent.ɵfac = function CaucaManagementComponent_Factory(t) { return new (t || CaucaManagementComponent)(); };
|
|
61
|
+
CaucaManagementComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaManagementComponent, selectors: [["cauca-management"]], decls: 3, vars: 3, template: function CaucaManagementComponent_Template(rf, ctx) {
|
|
62
|
+
if (rf & 1) {
|
|
63
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
64
|
+
i0__namespace.ɵɵtext(1);
|
|
65
|
+
i0__namespace.ɵɵpipe(2, "translate");
|
|
66
|
+
i0__namespace.ɵɵelementEnd();
|
|
67
|
+
}
|
|
68
|
+
if (rf & 2) {
|
|
69
|
+
i0__namespace.ɵɵadvance(1);
|
|
70
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, "core.noGenericComponentOnThisLibrary"));
|
|
71
|
+
}
|
|
72
|
+
}, pipes: [i1__namespace.TranslatePipe], encapsulation: 2 });
|
|
73
|
+
(function () {
|
|
74
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaManagementComponent, [{
|
|
75
|
+
type: i0.Component,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: 'cauca-management',
|
|
78
|
+
templateUrl: './cauca-management.component.html',
|
|
79
|
+
styles: []
|
|
80
|
+
}]
|
|
81
|
+
}], function () { return []; }, null);
|
|
82
|
+
})();
|
|
34
83
|
|
|
35
84
|
var ManagementGroupService = /** @class */ (function () {
|
|
36
85
|
function ManagementGroupService(coreService, http) {
|
|
@@ -54,16 +103,16 @@
|
|
|
54
103
|
};
|
|
55
104
|
return ManagementGroupService;
|
|
56
105
|
}());
|
|
57
|
-
ManagementGroupService.ɵ
|
|
58
|
-
ManagementGroupService
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
106
|
+
ManagementGroupService.ɵfac = function ManagementGroupService_Factory(t) { return new (t || ManagementGroupService)(i0__namespace.ɵɵinject(i1__namespace$1.CaucaCoreService), i0__namespace.ɵɵinject(i2__namespace.HttpClient)); };
|
|
107
|
+
ManagementGroupService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ManagementGroupService, factory: ManagementGroupService.ɵfac, providedIn: 'root' });
|
|
108
|
+
(function () {
|
|
109
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ManagementGroupService, [{
|
|
110
|
+
type: i0.Injectable,
|
|
111
|
+
args: [{
|
|
112
|
+
providedIn: 'root'
|
|
113
|
+
}]
|
|
114
|
+
}], function () { return [{ type: i1__namespace$1.CaucaCoreService }, { type: i2__namespace.HttpClient }]; }, null);
|
|
115
|
+
})();
|
|
67
116
|
|
|
68
117
|
var ManagementUserService = /** @class */ (function () {
|
|
69
118
|
function ManagementUserService(coreService, http) {
|
|
@@ -102,16 +151,16 @@
|
|
|
102
151
|
};
|
|
103
152
|
return ManagementUserService;
|
|
104
153
|
}());
|
|
105
|
-
ManagementUserService.ɵ
|
|
106
|
-
ManagementUserService
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
154
|
+
ManagementUserService.ɵfac = function ManagementUserService_Factory(t) { return new (t || ManagementUserService)(i0__namespace.ɵɵinject(i1__namespace$1.CaucaCoreService), i0__namespace.ɵɵinject(i2__namespace.HttpClient)); };
|
|
155
|
+
ManagementUserService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ManagementUserService, factory: ManagementUserService.ɵfac, providedIn: 'root' });
|
|
156
|
+
(function () {
|
|
157
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ManagementUserService, [{
|
|
158
|
+
type: i0.Injectable,
|
|
159
|
+
args: [{
|
|
160
|
+
providedIn: 'root'
|
|
161
|
+
}]
|
|
162
|
+
}], function () { return [{ type: i1__namespace$1.CaucaCoreService }, { type: i2__namespace.HttpClient }]; }, null);
|
|
163
|
+
})();
|
|
115
164
|
|
|
116
165
|
var ManagementPermissionService = /** @class */ (function () {
|
|
117
166
|
function ManagementPermissionService(coreService, http) {
|
|
@@ -132,17 +181,64 @@
|
|
|
132
181
|
};
|
|
133
182
|
return ManagementPermissionService;
|
|
134
183
|
}());
|
|
135
|
-
ManagementPermissionService.ɵ
|
|
136
|
-
ManagementPermissionService
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
184
|
+
ManagementPermissionService.ɵfac = function ManagementPermissionService_Factory(t) { return new (t || ManagementPermissionService)(i0__namespace.ɵɵinject(i1__namespace$1.CaucaCoreService), i0__namespace.ɵɵinject(i2__namespace.HttpClient)); };
|
|
185
|
+
ManagementPermissionService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ManagementPermissionService, factory: ManagementPermissionService.ɵfac, providedIn: 'root' });
|
|
186
|
+
(function () {
|
|
187
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ManagementPermissionService, [{
|
|
188
|
+
type: i0.Injectable,
|
|
189
|
+
args: [{
|
|
190
|
+
providedIn: 'root'
|
|
191
|
+
}]
|
|
192
|
+
}], function () { return [{ type: i1__namespace$1.CaucaCoreService }, { type: i2__namespace.HttpClient }]; }, null);
|
|
193
|
+
})();
|
|
145
194
|
|
|
195
|
+
function CaucaManagementGroupComponent_div_17_Template(rf, ctx) {
|
|
196
|
+
if (rf & 1) {
|
|
197
|
+
var _r4_1 = i0__namespace.ɵɵgetCurrentView();
|
|
198
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
199
|
+
i0__namespace.ɵɵelementStart(1, "dx-tag-box", 13);
|
|
200
|
+
i0__namespace.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_17_Template_dx_tag_box_onInitialized_1_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r4_1); var field_r2 = restoredCtx.$implicit; var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.getGroupUser(field_r2, $event); })("onValueChanged", function CaucaManagementGroupComponent_div_17_Template_dx_tag_box_onValueChanged_1_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r4_1); var field_r2 = restoredCtx.$implicit; var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.setGroupUser(field_r2, $event); });
|
|
201
|
+
i0__namespace.ɵɵelementEnd();
|
|
202
|
+
i0__namespace.ɵɵelementEnd();
|
|
203
|
+
}
|
|
204
|
+
if (rf & 2) {
|
|
205
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
206
|
+
i0__namespace.ɵɵadvance(1);
|
|
207
|
+
i0__namespace.ɵɵproperty("displayExpr", ctx_r0.fullName)("dataSource", ctx_r0.users)("searchEnabled", true)("searchExpr", ctx_r0.fullName);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function CaucaManagementGroupComponent_div_18_div_2_Template(rf, ctx) {
|
|
211
|
+
if (rf & 1) {
|
|
212
|
+
var _r11_1 = i0__namespace.ɵɵgetCurrentView();
|
|
213
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
214
|
+
i0__namespace.ɵɵelementStart(1, "dx-check-box", 15);
|
|
215
|
+
i0__namespace.ɵɵlistener("onInitialized", function CaucaManagementGroupComponent_div_18_div_2_Template_dx_check_box_onInitialized_1_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r11_1); var permission_r8 = restoredCtx.$implicit; var field_r6 = i0__namespace.ɵɵnextContext().$implicit; var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.getPermissionStatus(field_r6, permission_r8, $event); })("onValueChanged", function CaucaManagementGroupComponent_div_18_div_2_Template_dx_check_box_onValueChanged_1_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r11_1); var permission_r8 = restoredCtx.$implicit; var field_r6 = i0__namespace.ɵɵnextContext().$implicit; var ctx_r12 = i0__namespace.ɵɵnextContext(); return ctx_r12.checkBoxToggled(field_r6, permission_r8, $event); });
|
|
216
|
+
i0__namespace.ɵɵelementEnd();
|
|
217
|
+
i0__namespace.ɵɵelementEnd();
|
|
218
|
+
}
|
|
219
|
+
if (rf & 2) {
|
|
220
|
+
var permission_r8 = ctx.$implicit;
|
|
221
|
+
i0__namespace.ɵɵadvance(1);
|
|
222
|
+
i0__namespace.ɵɵproperty("text", permission_r8.name);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
var _c0 = function () { return ["name", "tag"]; };
|
|
226
|
+
function CaucaManagementGroupComponent_div_18_Template(rf, ctx) {
|
|
227
|
+
if (rf & 1) {
|
|
228
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
229
|
+
i0__namespace.ɵɵelementStart(1, "dx-list", 14);
|
|
230
|
+
i0__namespace.ɵɵtemplate(2, CaucaManagementGroupComponent_div_18_div_2_Template, 2, 1, "div", 12);
|
|
231
|
+
i0__namespace.ɵɵelementEnd();
|
|
232
|
+
i0__namespace.ɵɵelementEnd();
|
|
233
|
+
}
|
|
234
|
+
if (rf & 2) {
|
|
235
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
236
|
+
i0__namespace.ɵɵadvance(1);
|
|
237
|
+
i0__namespace.ɵɵproperty("dataSource", ctx_r1.permissions)("searchEnabled", true)("searchExpr", i0__namespace.ɵɵpureFunction0(5, _c0))("hoverStateEnabled", ctx_r1.hoverStatePermission);
|
|
238
|
+
i0__namespace.ɵɵadvance(1);
|
|
239
|
+
i0__namespace.ɵɵproperty("dxTemplateOf", "rowTemplate");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
146
242
|
var CaucaManagementGroupComponent = /** @class */ (function () {
|
|
147
243
|
function CaucaManagementGroupComponent(managementGroupService, managementUserService, managementPermissionService, breakpointObserver) {
|
|
148
244
|
var _this = this;
|
|
@@ -170,11 +266,7 @@
|
|
|
170
266
|
usersNames = usersNames.sort(function (one, two) { return (one < two ? -1 : 1); });
|
|
171
267
|
return usersNames.join(', ');
|
|
172
268
|
};
|
|
173
|
-
this.groupNameAlreadyUsedValidation = function (e) {
|
|
174
|
-
return _this.managementGroupService.hasExistingGroupName(e.data).pipe(operators.map(function (exist) {
|
|
175
|
-
return !exist;
|
|
176
|
-
})).toPromise();
|
|
177
|
-
};
|
|
269
|
+
this.groupNameAlreadyUsedValidation = function (e) { return _this.managementGroupService.hasExistingGroupName(e.data).pipe(operators.map(function (exist) { return !exist; })).toPromise(); };
|
|
178
270
|
breakpointObserver.observe(['(max-width: 1000px)']).subscribe(function (result) {
|
|
179
271
|
_this.showColumn = !result.matches;
|
|
180
272
|
});
|
|
@@ -195,9 +287,7 @@
|
|
|
195
287
|
});
|
|
196
288
|
});
|
|
197
289
|
this.managementPermissionService.getAll().subscribe(function (permissions) {
|
|
198
|
-
var permissionIndex = permissions.findIndex(function (c) {
|
|
199
|
-
return c.tag === 'CanAccessPermissions';
|
|
200
|
-
});
|
|
290
|
+
var permissionIndex = permissions.findIndex(function (c) { return c.tag === 'CanAccessPermissions'; });
|
|
201
291
|
if (permissionIndex !== -1) {
|
|
202
292
|
permissions.splice(permissionIndex, 1);
|
|
203
293
|
}
|
|
@@ -286,7 +376,7 @@
|
|
|
286
376
|
CaucaManagementGroupComponent.prototype.onRowRemoved = function (e) {
|
|
287
377
|
var _this = this;
|
|
288
378
|
var group = e.data;
|
|
289
|
-
this.managementGroupService.delete(group.id).subscribe(function (
|
|
379
|
+
this.managementGroupService.delete(group.id).subscribe(function () {
|
|
290
380
|
_this.getGroups();
|
|
291
381
|
});
|
|
292
382
|
};
|
|
@@ -337,23 +427,74 @@
|
|
|
337
427
|
};
|
|
338
428
|
return CaucaManagementGroupComponent;
|
|
339
429
|
}());
|
|
340
|
-
CaucaManagementGroupComponent
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
430
|
+
CaucaManagementGroupComponent.ɵfac = function CaucaManagementGroupComponent_Factory(t) { return new (t || CaucaManagementGroupComponent)(i0__namespace.ɵɵdirectiveInject(ManagementGroupService), i0__namespace.ɵɵdirectiveInject(ManagementUserService), i0__namespace.ɵɵdirectiveInject(ManagementPermissionService), i0__namespace.ɵɵdirectiveInject(i4__namespace.BreakpointObserver)); };
|
|
431
|
+
CaucaManagementGroupComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaManagementGroupComponent, selectors: [["cauca-management-group"]], inputs: { showPrintButton: "showPrintButton", hoverStatePermission: "hoverStatePermission" }, decls: 19, vars: 31, consts: [["keyExpr", "id", 3, "allowPrint", "dataSource", "onRowInserted", "onInitNewRow", "onRowUpdated", "onEditingStart", "onRowRemoved"], ["dataField", "name", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "users", "editCellTemplate", "usersEditTemplate", 3, "caption", "calculateCellValue"], ["dataField", "permissions", "editCellTemplate", "permissionsEditTemplate", 3, "caption", "visible"], [3, "enabled"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title", "fullScreen"], ["colCount", "1", 3, "labelLocation"], ["dataField", "name", 3, "isRequired"], ["dataField", "users"], ["dataField", "permissions"], [4, "dxTemplate", "dxTemplateOf"], ["valueExpr", "id", 3, "displayExpr", "dataSource", "searchEnabled", "searchExpr", "onInitialized", "onValueChanged"], ["itemTemplate", "rowTemplate", 3, "dataSource", "searchEnabled", "searchExpr", "hoverStateEnabled"], [3, "text", "onInitialized", "onValueChanged"]], template: function CaucaManagementGroupComponent_Template(rf, ctx) {
|
|
432
|
+
if (rf & 1) {
|
|
433
|
+
i0__namespace.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
|
|
434
|
+
i0__namespace.ɵɵlistener("onRowInserted", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onInitNewRow", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onInitNewRow_0_listener() { return ctx.onInitNewRow(); })("onRowUpdated", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onEditingStart", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onEditingStart_0_listener($event) { return ctx.onEditingStart($event); })("onRowRemoved", function CaucaManagementGroupComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
|
|
435
|
+
i0__namespace.ɵɵelementStart(1, "dxi-column", 1);
|
|
436
|
+
i0__namespace.ɵɵpipe(2, "translate");
|
|
437
|
+
i0__namespace.ɵɵelement(3, "dxi-validation-rule", 2);
|
|
438
|
+
i0__namespace.ɵɵpipe(4, "translate");
|
|
439
|
+
i0__namespace.ɵɵelementEnd();
|
|
440
|
+
i0__namespace.ɵɵelement(5, "dxi-column", 3);
|
|
441
|
+
i0__namespace.ɵɵpipe(6, "translate");
|
|
442
|
+
i0__namespace.ɵɵelement(7, "dxi-column", 4);
|
|
443
|
+
i0__namespace.ɵɵpipe(8, "translate");
|
|
444
|
+
i0__namespace.ɵɵelement(9, "dxo-export", 5);
|
|
445
|
+
i0__namespace.ɵɵelementStart(10, "dxo-editing", 6);
|
|
446
|
+
i0__namespace.ɵɵelement(11, "dxo-popup", 7);
|
|
447
|
+
i0__namespace.ɵɵpipe(12, "translate");
|
|
448
|
+
i0__namespace.ɵɵelementStart(13, "dxo-form", 8);
|
|
449
|
+
i0__namespace.ɵɵelement(14, "dxi-item", 9);
|
|
450
|
+
i0__namespace.ɵɵelement(15, "dxi-item", 10);
|
|
451
|
+
i0__namespace.ɵɵelement(16, "dxi-item", 11);
|
|
452
|
+
i0__namespace.ɵɵelementEnd();
|
|
453
|
+
i0__namespace.ɵɵelementEnd();
|
|
454
|
+
i0__namespace.ɵɵtemplate(17, CaucaManagementGroupComponent_div_17_Template, 2, 4, "div", 12);
|
|
455
|
+
i0__namespace.ɵɵtemplate(18, CaucaManagementGroupComponent_div_18_Template, 3, 6, "div", 12);
|
|
456
|
+
i0__namespace.ɵɵelementEnd();
|
|
457
|
+
}
|
|
458
|
+
if (rf & 2) {
|
|
459
|
+
i0__namespace.ɵɵproperty("allowPrint", ctx.showPrintButton)("dataSource", ctx.groups);
|
|
460
|
+
i0__namespace.ɵɵadvance(1);
|
|
461
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(2, 21, "management.name"));
|
|
462
|
+
i0__namespace.ɵɵadvance(2);
|
|
463
|
+
i0__namespace.ɵɵproperty("message", i0__namespace.ɵɵpipeBind1(4, 23, "management.groupNameAlreadyUsed"))("validationCallback", ctx.groupNameAlreadyUsedValidation);
|
|
464
|
+
i0__namespace.ɵɵadvance(2);
|
|
465
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(6, 25, "management.users"))("calculateCellValue", ctx.calculateUsersCellValue);
|
|
466
|
+
i0__namespace.ɵɵadvance(2);
|
|
467
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(8, 27, "management.permissions"))("visible", false);
|
|
468
|
+
i0__namespace.ɵɵadvance(2);
|
|
469
|
+
i0__namespace.ɵɵproperty("enabled", false);
|
|
470
|
+
i0__namespace.ɵɵadvance(1);
|
|
471
|
+
i0__namespace.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
|
|
472
|
+
i0__namespace.ɵɵadvance(1);
|
|
473
|
+
i0__namespace.ɵɵproperty("showTitle", true)("title", i0__namespace.ɵɵpipeBind1(12, 29, "management.group"))("fullScreen", !ctx.showColumn);
|
|
474
|
+
i0__namespace.ɵɵadvance(2);
|
|
475
|
+
i0__namespace.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
|
|
476
|
+
i0__namespace.ɵɵadvance(1);
|
|
477
|
+
i0__namespace.ɵɵproperty("isRequired", true);
|
|
478
|
+
i0__namespace.ɵɵadvance(3);
|
|
479
|
+
i0__namespace.ɵɵproperty("dxTemplateOf", "usersEditTemplate");
|
|
480
|
+
i0__namespace.ɵɵadvance(1);
|
|
481
|
+
i0__namespace.ɵɵproperty("dxTemplateOf", "permissionsEditTemplate");
|
|
482
|
+
}
|
|
483
|
+
}, directives: [i5__namespace.CaucaDataGridComponent, i6__namespace.DxiColumnComponent, i6__namespace.DxiValidationRuleComponent, i6__namespace.DxoExportComponent, i6__namespace.DxoEditingComponent, i6__namespace.DxoPopupComponent, i6__namespace.DxoFormComponent, i6__namespace.DxiItemComponent, i7__namespace.DxTemplateDirective, i8__namespace.DxTagBoxComponent, i9__namespace.DxListComponent, i10__namespace.DxCheckBoxComponent], pipes: [i1__namespace.TranslatePipe], styles: [""] });
|
|
484
|
+
(function () {
|
|
485
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaManagementGroupComponent, [{
|
|
486
|
+
type: i0.Component,
|
|
487
|
+
args: [{
|
|
488
|
+
selector: 'cauca-management-group',
|
|
489
|
+
templateUrl: './cauca-management-group.component.html',
|
|
490
|
+
styleUrls: ['./cauca-management-group.component.scss']
|
|
491
|
+
}]
|
|
492
|
+
}], function () { return [{ type: ManagementGroupService }, { type: ManagementUserService }, { type: ManagementPermissionService }, { type: i4__namespace.BreakpointObserver }]; }, { showPrintButton: [{
|
|
493
|
+
type: i0.Input
|
|
494
|
+
}], hoverStatePermission: [{
|
|
495
|
+
type: i0.Input
|
|
496
|
+
}] });
|
|
497
|
+
})();
|
|
357
498
|
|
|
358
499
|
var UserModel = /** @class */ (function () {
|
|
359
500
|
function UserModel() {
|
|
@@ -376,11 +517,7 @@
|
|
|
376
517
|
new UserModel()
|
|
377
518
|
];
|
|
378
519
|
this.showColumnXS = true;
|
|
379
|
-
this.userNameAlreadyUsedValidation = function (e) {
|
|
380
|
-
return _this.managementUserService.hasExistingUserName(e.data).pipe(operators.map(function (exist) {
|
|
381
|
-
return !exist;
|
|
382
|
-
})).toPromise();
|
|
383
|
-
};
|
|
520
|
+
this.userNameAlreadyUsedValidation = function (e) { return _this.managementUserService.hasExistingUserName(e.data).pipe(operators.map(function (exist) { return !exist; })).toPromise(); };
|
|
384
521
|
breakpointObserver.observe(['(max-width: 600px)']).subscribe(function (result) {
|
|
385
522
|
_this.showColumnXS = !result.matches;
|
|
386
523
|
});
|
|
@@ -413,45 +550,124 @@
|
|
|
413
550
|
};
|
|
414
551
|
return CaucaManagementUserComponent;
|
|
415
552
|
}());
|
|
416
|
-
CaucaManagementUserComponent
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
553
|
+
CaucaManagementUserComponent.ɵfac = function CaucaManagementUserComponent_Factory(t) { return new (t || CaucaManagementUserComponent)(i0__namespace.ɵɵdirectiveInject(ManagementUserService), i0__namespace.ɵɵdirectiveInject(i4__namespace.BreakpointObserver)); };
|
|
554
|
+
CaucaManagementUserComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: CaucaManagementUserComponent, selectors: [["cauca-management-user"]], decls: 22, vars: 31, consts: [["keyExpr", "id", 3, "dataSource", "onRowInserted", "onRowUpdated", "onRowRemoved"], ["dataField", "userName", 3, "caption"], ["type", "async", 3, "message", "validationCallback"], ["dataField", "isActive", 3, "caption", "visible"], ["dataField", "firstName", 3, "caption"], ["dataField", "lastName", 3, "caption"], ["dataField", "groups", 3, "caption"], ["mode", "popup", 3, "allowAdding", "allowUpdating", "allowDeleting", "useIcons"], [3, "showTitle", "title"], ["colCount", "2", 3, "labelLocation"], ["dataField", "userName", 3, "isRequired"], ["dataField", "isActive"], ["dataField", "firstName"], ["dataField", "lastName"], ["dataField", "group"]], template: function CaucaManagementUserComponent_Template(rf, ctx) {
|
|
555
|
+
if (rf & 1) {
|
|
556
|
+
i0__namespace.ɵɵelementStart(0, "cauca-dx-data-grid", 0);
|
|
557
|
+
i0__namespace.ɵɵlistener("onRowInserted", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowInserted_0_listener($event) { return ctx.onRowInserted($event); })("onRowUpdated", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowUpdated_0_listener($event) { return ctx.onRowUpdated($event); })("onRowRemoved", function CaucaManagementUserComponent_Template_cauca_dx_data_grid_onRowRemoved_0_listener($event) { return ctx.onRowRemoved($event); });
|
|
558
|
+
i0__namespace.ɵɵelementStart(1, "dxi-column", 1);
|
|
559
|
+
i0__namespace.ɵɵpipe(2, "translate");
|
|
560
|
+
i0__namespace.ɵɵelement(3, "dxi-validation-rule", 2);
|
|
561
|
+
i0__namespace.ɵɵpipe(4, "translate");
|
|
562
|
+
i0__namespace.ɵɵelementEnd();
|
|
563
|
+
i0__namespace.ɵɵelement(5, "dxi-column", 3);
|
|
564
|
+
i0__namespace.ɵɵpipe(6, "translate");
|
|
565
|
+
i0__namespace.ɵɵelement(7, "dxi-column", 4);
|
|
566
|
+
i0__namespace.ɵɵpipe(8, "translate");
|
|
567
|
+
i0__namespace.ɵɵelement(9, "dxi-column", 5);
|
|
568
|
+
i0__namespace.ɵɵpipe(10, "translate");
|
|
569
|
+
i0__namespace.ɵɵelement(11, "dxi-column", 6);
|
|
570
|
+
i0__namespace.ɵɵpipe(12, "translate");
|
|
571
|
+
i0__namespace.ɵɵelementStart(13, "dxo-editing", 7);
|
|
572
|
+
i0__namespace.ɵɵelement(14, "dxo-popup", 8);
|
|
573
|
+
i0__namespace.ɵɵpipe(15, "translate");
|
|
574
|
+
i0__namespace.ɵɵelementStart(16, "dxo-form", 9);
|
|
575
|
+
i0__namespace.ɵɵelement(17, "dxi-item", 10);
|
|
576
|
+
i0__namespace.ɵɵelement(18, "dxi-item", 11);
|
|
577
|
+
i0__namespace.ɵɵelement(19, "dxi-item", 12);
|
|
578
|
+
i0__namespace.ɵɵelement(20, "dxi-item", 13);
|
|
579
|
+
i0__namespace.ɵɵelement(21, "dxi-item", 14);
|
|
580
|
+
i0__namespace.ɵɵelementEnd();
|
|
581
|
+
i0__namespace.ɵɵelementEnd();
|
|
582
|
+
i0__namespace.ɵɵelementEnd();
|
|
583
|
+
}
|
|
584
|
+
if (rf & 2) {
|
|
585
|
+
i0__namespace.ɵɵproperty("dataSource", ctx.users);
|
|
586
|
+
i0__namespace.ɵɵadvance(1);
|
|
587
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(2, 17, "management.userName"));
|
|
588
|
+
i0__namespace.ɵɵadvance(2);
|
|
589
|
+
i0__namespace.ɵɵproperty("message", i0__namespace.ɵɵpipeBind1(4, 19, "management.userNameAlreadyUsed"))("validationCallback", ctx.userNameAlreadyUsedValidation);
|
|
590
|
+
i0__namespace.ɵɵadvance(2);
|
|
591
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(6, 21, "management.isActive"))("visible", false);
|
|
592
|
+
i0__namespace.ɵɵadvance(2);
|
|
593
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(8, 23, "management.firstName"));
|
|
594
|
+
i0__namespace.ɵɵadvance(2);
|
|
595
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(10, 25, "management.lastName"));
|
|
596
|
+
i0__namespace.ɵɵadvance(2);
|
|
597
|
+
i0__namespace.ɵɵproperty("caption", i0__namespace.ɵɵpipeBind1(12, 27, "management.group"));
|
|
598
|
+
i0__namespace.ɵɵadvance(2);
|
|
599
|
+
i0__namespace.ɵɵproperty("allowAdding", true)("allowUpdating", true)("allowDeleting", true)("useIcons", true);
|
|
600
|
+
i0__namespace.ɵɵadvance(1);
|
|
601
|
+
i0__namespace.ɵɵproperty("showTitle", true)("title", i0__namespace.ɵɵpipeBind1(15, 29, "management.group"));
|
|
602
|
+
i0__namespace.ɵɵadvance(2);
|
|
603
|
+
i0__namespace.ɵɵproperty("labelLocation", ctx.showColumnXS ? "left" : "top");
|
|
604
|
+
i0__namespace.ɵɵadvance(1);
|
|
605
|
+
i0__namespace.ɵɵproperty("isRequired", true);
|
|
606
|
+
}
|
|
607
|
+
}, directives: [i5__namespace.CaucaDataGridComponent, i6__namespace.DxiColumnComponent, i6__namespace.DxiValidationRuleComponent, i6__namespace.DxoEditingComponent, i6__namespace.DxoPopupComponent, i6__namespace.DxoFormComponent, i6__namespace.DxiItemComponent], pipes: [i1__namespace.TranslatePipe], styles: [""] });
|
|
608
|
+
(function () {
|
|
609
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaManagementUserComponent, [{
|
|
610
|
+
type: i0.Component,
|
|
611
|
+
args: [{
|
|
612
|
+
selector: 'cauca-management-user',
|
|
613
|
+
templateUrl: './cauca-management-user.component.html',
|
|
614
|
+
styleUrls: ['./cauca-management-user.component.scss']
|
|
615
|
+
}]
|
|
616
|
+
}], function () { return [{ type: ManagementUserService }, { type: i4__namespace.BreakpointObserver }]; }, null);
|
|
617
|
+
})();
|
|
427
618
|
|
|
428
619
|
var CaucaManagementModule = /** @class */ (function () {
|
|
429
620
|
function CaucaManagementModule() {
|
|
430
621
|
}
|
|
431
622
|
return CaucaManagementModule;
|
|
432
623
|
}());
|
|
433
|
-
CaucaManagementModule
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
624
|
+
CaucaManagementModule.ɵfac = function CaucaManagementModule_Factory(t) { return new (t || CaucaManagementModule)(); };
|
|
625
|
+
CaucaManagementModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: CaucaManagementModule });
|
|
626
|
+
CaucaManagementModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
|
|
627
|
+
common.CommonModule,
|
|
628
|
+
i10.DxCheckBoxModule,
|
|
629
|
+
i9.DxListModule,
|
|
630
|
+
i8.DxTagBoxModule,
|
|
631
|
+
i1$1.CaucaCoreForChildModule,
|
|
632
|
+
i5.CaucaDevextremeModule,
|
|
633
|
+
]] });
|
|
634
|
+
(function () {
|
|
635
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaucaManagementModule, [{
|
|
636
|
+
type: i0.NgModule,
|
|
637
|
+
args: [{
|
|
638
|
+
declarations: [
|
|
639
|
+
CaucaManagementComponent,
|
|
640
|
+
CaucaManagementGroupComponent,
|
|
641
|
+
CaucaManagementUserComponent
|
|
642
|
+
],
|
|
643
|
+
imports: [
|
|
644
|
+
common.CommonModule,
|
|
645
|
+
i10.DxCheckBoxModule,
|
|
646
|
+
i9.DxListModule,
|
|
647
|
+
i8.DxTagBoxModule,
|
|
648
|
+
i1$1.CaucaCoreForChildModule,
|
|
649
|
+
i5.CaucaDevextremeModule,
|
|
650
|
+
],
|
|
651
|
+
exports: [
|
|
652
|
+
CaucaManagementComponent,
|
|
653
|
+
CaucaManagementUserComponent,
|
|
654
|
+
CaucaManagementGroupComponent,
|
|
655
|
+
]
|
|
656
|
+
}]
|
|
657
|
+
}], null, null);
|
|
658
|
+
})();
|
|
659
|
+
(function () {
|
|
660
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(CaucaManagementModule, { declarations: [CaucaManagementComponent,
|
|
661
|
+
CaucaManagementGroupComponent,
|
|
662
|
+
CaucaManagementUserComponent], imports: [common.CommonModule,
|
|
663
|
+
i10.DxCheckBoxModule,
|
|
664
|
+
i9.DxListModule,
|
|
665
|
+
i8.DxTagBoxModule,
|
|
666
|
+
i1$1.CaucaCoreForChildModule,
|
|
667
|
+
i5.CaucaDevextremeModule], exports: [CaucaManagementComponent,
|
|
668
|
+
CaucaManagementUserComponent,
|
|
669
|
+
CaucaManagementGroupComponent] });
|
|
670
|
+
})();
|
|
455
671
|
|
|
456
672
|
var UserGroupModel = /** @class */ (function () {
|
|
457
673
|
function UserGroupModel() {
|
|
@@ -511,9 +727,8 @@
|
|
|
511
727
|
exports.UserGroupModel = UserGroupModel;
|
|
512
728
|
exports.UserModel = UserModel;
|
|
513
729
|
exports.UserPermissionModel = UserPermissionModel;
|
|
514
|
-
exports.ɵa = ManagementPermissionService;
|
|
515
730
|
|
|
516
731
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
517
732
|
|
|
518
|
-
}))
|
|
733
|
+
}));
|
|
519
734
|
//# sourceMappingURL=cauca-911-management.umd.js.map
|