@memberjunction/ng-entity-permissions 1.0.4 → 1.0.7-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,10 +45,10 @@ EntityPermissionsSelectorWithGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCo
|
|
|
45
45
|
i0.ɵɵtwoWayProperty("value", ctx.CurrentEntity);
|
|
46
46
|
i0.ɵɵadvance();
|
|
47
47
|
i0.ɵɵproperty("ngIf", ctx.CurrentEntity);
|
|
48
|
-
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.DropDownListComponent, i4.EntityPermissionsGridComponent], styles: [".entity-selector[_ngcontent-%COMP%] {\
|
|
48
|
+
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.DropDownListComponent, i4.EntityPermissionsGridComponent], styles: [".entity-selector[_ngcontent-%COMP%] {\n min-width: 200px;\n max-width: 500px;\n}"] });
|
|
49
49
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityPermissionsSelectorWithGridComponent, [{
|
|
50
50
|
type: Component,
|
|
51
|
-
args: [{ selector: 'mj-entity-permissions-selector-with-grid', template: "<div mjFillContainer>\
|
|
51
|
+
args: [{ selector: 'mj-entity-permissions-selector-with-grid', template: "<div mjFillContainer>\n <kendo-dropdownlist\n [data]=\"entityList\"\n textField=\"Name\"\n valueField=\"Name\"\n placeholder=\"Select an entity...\"\n class=\"entity-selector\"\n [(value)]=\"CurrentEntity\"\n >\n </kendo-dropdownlist>\n <mj-entity-permissions-grid class=\"inner-grid\" *ngIf=\"CurrentEntity\" [EntityName]=\"CurrentEntity.Name\" (PermissionChanged)=\"handlePermissionChanged($event)\"></mj-entity-permissions-grid>\n</div>\n ", styles: [".entity-selector {\n min-width: 200px;\n max-width: 500px;\n}"] }]
|
|
52
52
|
}], null, { EntityName: [{
|
|
53
53
|
type: Input
|
|
54
54
|
}], BottomMargin: [{
|
|
@@ -58,4 +58,4 @@ EntityPermissionsSelectorWithGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCo
|
|
|
58
58
|
}], CurrentEntity: [{
|
|
59
59
|
type: Input
|
|
60
60
|
}] }); })();
|
|
61
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityPermissionsSelectorWithGridComponent, { className: "EntityPermissionsSelectorWithGridComponent", filePath: "src
|
|
61
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityPermissionsSelectorWithGridComponent, { className: "EntityPermissionsSelectorWithGridComponent", filePath: "src/lib/entity-selector-with-grid/entity-selector-with-grid.component.ts", lineNumber: 13 }); })();
|
|
@@ -422,10 +422,10 @@ EntityPermissionsGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
|
|
|
422
422
|
i0.ɵɵproperty("disabled", ctx.NumDirtyPermissions === 0);
|
|
423
423
|
i0.ɵɵadvance(2);
|
|
424
424
|
i0.ɵɵproperty("ngIf", !ctx.isLoading);
|
|
425
|
-
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgModel, i3.ButtonComponent, i4.SVGIconComponent, i5.LoaderComponent], styles: ["\n\
|
|
425
|
+
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgModel, i3.ButtonComponent, i4.SVGIconComponent, i5.LoaderComponent], styles: ["\n\ntable[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n border-collapse: collapse; \n\n}\n\nbutton[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n \ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: #f2f2f2; \n\n color: black; \n\n font-weight: bold; \n\n cursor: pointer;\n}\n\n.permission-left-col[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n\n\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n border: 1px solid gray; \n\n height: 36px; \n\n text-align: center;\n padding: 0 8px; \n\n}\n\n\n\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\n min-width: 150px; \n\n text-align: left;\n}\n\n\n\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(:first-child), table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(:first-child) {\n width: 100px; \n\n}\n\n\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd) {\n background-color: white; \n\n}\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: #e7f4ff; \n\n}\n\ntable[_ngcontent-%COMP%] tr.dirty-row[_ngcontent-%COMP%] {\n font-style: italic;\n background-color: #ffcccc;\n}"] });
|
|
426
426
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityPermissionsGridComponent, [{
|
|
427
427
|
type: Component,
|
|
428
|
-
args: [{ selector: 'mj-entity-permissions-grid', template: "<div>\
|
|
428
|
+
args: [{ selector: 'mj-entity-permissions-grid', template: "<div>\n <div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"savePermissions()\">Save</button>\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"cancelEdit()\">Cancel</button>\n <table *ngIf=\"!isLoading\" class=\"grid\">\n <thead>\n <tr>\n <th *ngIf=\"this.Mode==='Entity'\">Role</th>\n <th *ngIf=\"this.Mode==='Role'\">Entity</th>\n <th (click)=\"flipAllPermissions('Read')\">Read</th>\n <th (click)=\"flipAllPermissions('Create')\">Create</th>\n <th (click)=\"flipAllPermissions('Update')\">Update</th>\n <th (click)=\"flipAllPermissions('Delete')\">Delete</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let permission of permissions\" [ngClass]=\"IsPermissionReallyDirty(permission) ? 'dirty-row' : ''\">\n <td class=\"permission-left-col\" (click)=\"flipRow(permission)\">\n <span *ngIf=\"this.Mode==='Entity'\">\n {{ permission.RoleName }}\n </span>\n <span *ngIf=\"this.Mode==='Role'\">\n {{ permission.Entity }}\n </span>\n <kendo-svgicon *ngIf=\"IsPermissionReallyDirty(permission)\" \n [icon]=\"kendoSVGIcon('arrowRotateCcwSmallIcon')\" \n (click)=\"revertRow($event, permission)\"></kendo-svgicon></td>\n <td (click)=\"flipPermission($event, permission, 'Read', true)\">\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanRead\" (click)=\"flipPermission($event, permission, 'Read', false)\">\n </td>\n <td (click)=\"flipPermission($event, permission, 'Create', true)\">\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanCreate\" (click)=\"flipPermission($event, permission, 'Create', false)\">\n </td>\n <td (click)=\"flipPermission($event, permission, 'Update', true)\">\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanUpdate\" (click)=\"flipPermission($event, permission, 'Update', false)\">\n </td>\n <td (click)=\"flipPermission($event, permission, 'Delete', true)\">\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanDelete\" (click)=\"flipPermission($event, permission, 'Delete', false)\">\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n ", styles: ["/* Style for the whole table */\ntable {\n margin-left: 5px;\n margin-top: 5px;\n border-collapse: collapse; /* Ensures border collapse for a cleaner look */\n}\n\nbutton {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n \ntable th {\n background-color: #f2f2f2; /* Light gray background for headers */\n color: black; /* Black text color for headers */\n font-weight: bold; /* Bold font weight for headers */\n cursor: pointer;\n}\n\n.permission-left-col {\n cursor: pointer;\n}\n\n/* Style for all table cells */\ntable th, table td {\n border: 1px solid gray; /* Gray border for cells */\n height: 36px; /* Fixed height for all rows */\n text-align: center;\n padding: 0 8px; /* Add some padding inside cells */\n}\n\n/* Specific styles for the first column */\ntable th:first-child, table td:first-child {\n min-width: 150px; /* Set width for the first column */\n text-align: left;\n}\n\n/* Specific styles for the \"Can\" columns */\ntable th:not(:first-child), table td:not(:first-child) {\n width: 100px; /* Set width for \"Can\" columns */\n}\n\n/* Alternating row background colors */\ntable tr:nth-child(odd) {\n background-color: white; /* Light color for odd rows */\n}\n\ntable tr:nth-child(even) {\n background-color: #e7f4ff; /* Light blue for even rows */\n}\n\ntable tr.dirty-row {\n font-style: italic;\n background-color: #ffcccc;\n}\n\n"] }]
|
|
429
429
|
}], () => [], { Mode: [{
|
|
430
430
|
type: Input
|
|
431
431
|
}], EntityName: [{
|
|
@@ -437,4 +437,4 @@ EntityPermissionsGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
|
|
|
437
437
|
}], PermissionChanged: [{
|
|
438
438
|
type: Output
|
|
439
439
|
}] }); })();
|
|
440
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityPermissionsGridComponent, { className: "EntityPermissionsGridComponent", filePath: "src
|
|
440
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityPermissionsGridComponent, { className: "EntityPermissionsGridComponent", filePath: "src/lib/grid/entity-permissions-grid.component.ts", lineNumber: 21 }); })();
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@memberjunction/ng-entity-permissions",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "MemberJunction: Angular components for displaying/editing permissions for an entity, and related components.",
|
|
5
|
-
"main": "./dist/public-api.js",
|
|
6
|
-
"typings": "./dist/public-api.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"/dist"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
-
"build": "ngc"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [],
|
|
15
|
-
"author": "",
|
|
16
|
-
"license": "ISC",
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@angular/compiler": "~17.2.2",
|
|
19
|
-
"@angular/compiler-cli": "~17.2.2"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"@angular/common": "~17.2.2",
|
|
23
|
-
"@angular/core": "~17.2.2",
|
|
24
|
-
"@angular/forms": "~17.2.2",
|
|
25
|
-
"@angular/router": "~17.2.2"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@memberjunction/core-entities": "^1.0.
|
|
29
|
-
"@memberjunction/global": "^1.0.
|
|
30
|
-
"@memberjunction/core": "^1.0.
|
|
31
|
-
"@memberjunction/ng-container-directives": "^1.0.
|
|
32
|
-
"@memberjunction/ng-shared": "^1.0.
|
|
33
|
-
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
34
|
-
"@progress/kendo-angular-grid": "~15.1.0",
|
|
35
|
-
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
36
|
-
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
37
|
-
"@progress/kendo-angular-indicators": "~15.1.0",
|
|
38
|
-
"tslib": "^2.3.0"
|
|
39
|
-
},
|
|
40
|
-
"sideEffects": false
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-entity-permissions",
|
|
3
|
+
"version": "1.0.7-next.0",
|
|
4
|
+
"description": "MemberJunction: Angular components for displaying/editing permissions for an entity, and related components.",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "ngc"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@angular/compiler": "~17.2.2",
|
|
19
|
+
"@angular/compiler-cli": "~17.2.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular/common": "~17.2.2",
|
|
23
|
+
"@angular/core": "~17.2.2",
|
|
24
|
+
"@angular/forms": "~17.2.2",
|
|
25
|
+
"@angular/router": "~17.2.2"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@memberjunction/core-entities": "^1.0.7-next.0",
|
|
29
|
+
"@memberjunction/global": "^1.0.7-next.0",
|
|
30
|
+
"@memberjunction/core": "^1.0.7-next.0",
|
|
31
|
+
"@memberjunction/ng-container-directives": "^1.0.7-next.0",
|
|
32
|
+
"@memberjunction/ng-shared": "^1.0.7-next.0",
|
|
33
|
+
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
34
|
+
"@progress/kendo-angular-grid": "~15.1.0",
|
|
35
|
+
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
36
|
+
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
37
|
+
"@progress/kendo-angular-indicators": "~15.1.0",
|
|
38
|
+
"tslib": "^2.3.0"
|
|
39
|
+
},
|
|
40
|
+
"sideEffects": false
|
|
41
|
+
}
|