@memberjunction/ng-entity-permissions 0.9.2 → 0.9.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.
@@ -228,7 +228,7 @@ EntityPermissionsGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ ty
228
228
  } }, dependencies: [i1.NgForOf, i1.NgIf, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgModel, i3.FillContainer, i4.ButtonComponent], styles: ["\n\r\ntable[_ngcontent-%COMP%] {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n border-collapse: collapse; \n\r\n}\r\n\r\nbutton[_ngcontent-%COMP%] {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n}\r\n \r\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\r\n background-color: #f2f2f2; \n\r\n color: black; \n\r\n font-weight: bold; \n\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\r\n border: 1px solid gray; \n\r\n height: 36px; \n\r\n text-align: center;\r\n padding: 0 8px; \n\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\r\n width: 150px; \n\r\n text-align: left;\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(:first-child), table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(:first-child) {\r\n width: 100px; \n\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd) {\r\n background-color: white; \n\r\n}\r\n\r\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\r\n background-color: #e7f4ff; \n\r\n}"] });
229
229
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityPermissionsGridComponent, [{
230
230
  type: Component,
231
- args: [{ selector: 'mj-entity-permissions-grid', template: "<div mjFillContainer>\r\n <!-- We are going to do a simple custom grid here because Kendo Grid is way too much for this and doesn't show checkboxes even when not editing, this is cleaner and simpler -->\r\n <!-- Assuming your component's selector is 'app-permissions-grid' -->\r\n <div *ngIf=\"isLoading\">Loading permissions...</div>\r\n <button *ngIf=\"NumDirtyPermissions > 0\" kendoButton (click)=\"savePermissions()\">Save</button>\r\n <table *ngIf=\"!isLoading\" class=\"grid\">\r\n <thead>\r\n <tr>\r\n <th>Role</th>\r\n <th>Read</th>\r\n <th>Update</th>\r\n <th>Create</th>\r\n <th>Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let permission of permissions\">\r\n <td>{{ permission.RoleName }}</td>\r\n <td (click)=\"flipPermission($event, permission, 'Read', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanRead\" (click)=\"flipPermission($event, permission, 'Read', false)\">\r\n </td>\r\n <td (click)=\"flipPermission($event, permission, 'Update', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanUpdate\" (click)=\"flipPermission($event, permission, 'Update', false)\">\r\n </td>\r\n <td (click)=\"flipPermission($event, permission, 'Create', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanCreate\" (click)=\"flipPermission($event, permission, 'Create', false)\">\r\n </td>\r\n <td (click)=\"flipPermission($event, permission, 'Delete', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanDelete\" (click)=\"flipPermission($event, permission, 'Delete', false)\">\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n ", styles: ["/* Style for the whole table */\r\ntable {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n border-collapse: collapse; /* Ensures border collapse for a cleaner look */\r\n}\r\n\r\nbutton {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n}\r\n \r\ntable th {\r\n background-color: #f2f2f2; /* Light gray background for headers */\r\n color: black; /* Black text color for headers */\r\n font-weight: bold; /* Bold font weight for headers */\r\n}\r\n\r\n/* Style for all table cells */\r\ntable th, table td {\r\n border: 1px solid gray; /* Gray border for cells */\r\n height: 36px; /* Fixed height for all rows */\r\n text-align: center;\r\n padding: 0 8px; /* Add some padding inside cells */\r\n}\r\n\r\n/* Specific styles for the first column */\r\ntable th:first-child, table td:first-child {\r\n width: 150px; /* Set width for the first column */\r\n text-align: left;\r\n}\r\n\r\n/* Specific styles for the \"Can\" columns */\r\ntable th:not(:first-child), table td:not(:first-child) {\r\n width: 100px; /* Set width for \"Can\" columns */\r\n}\r\n\r\n/* Alternating row background colors */\r\ntable tr:nth-child(odd) {\r\n background-color: white; /* Light color for odd rows */\r\n}\r\n\r\ntable tr:nth-child(even) {\r\n background-color: #e7f4ff; /* Light blue for even rows */\r\n}\r\n"] }]
231
+ args: [{ selector: 'mj-entity-permissions-grid', template: "<div mjFillContainer>\r\n <div *ngIf=\"isLoading\">Loading permissions...</div>\r\n <button *ngIf=\"NumDirtyPermissions > 0\" kendoButton (click)=\"savePermissions()\">Save</button>\r\n <table *ngIf=\"!isLoading\" class=\"grid\">\r\n <thead>\r\n <tr>\r\n <th>Role</th>\r\n <th>Read</th>\r\n <th>Update</th>\r\n <th>Create</th>\r\n <th>Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let permission of permissions\">\r\n <td>{{ permission.RoleName }}</td>\r\n <td (click)=\"flipPermission($event, permission, 'Read', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanRead\" (click)=\"flipPermission($event, permission, 'Read', false)\">\r\n </td>\r\n <td (click)=\"flipPermission($event, permission, 'Update', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanUpdate\" (click)=\"flipPermission($event, permission, 'Update', false)\">\r\n </td>\r\n <td (click)=\"flipPermission($event, permission, 'Create', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanCreate\" (click)=\"flipPermission($event, permission, 'Create', false)\">\r\n </td>\r\n <td (click)=\"flipPermission($event, permission, 'Delete', true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"permission.CanDelete\" (click)=\"flipPermission($event, permission, 'Delete', false)\">\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n ", styles: ["/* Style for the whole table */\r\ntable {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n border-collapse: collapse; /* Ensures border collapse for a cleaner look */\r\n}\r\n\r\nbutton {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n}\r\n \r\ntable th {\r\n background-color: #f2f2f2; /* Light gray background for headers */\r\n color: black; /* Black text color for headers */\r\n font-weight: bold; /* Bold font weight for headers */\r\n}\r\n\r\n/* Style for all table cells */\r\ntable th, table td {\r\n border: 1px solid gray; /* Gray border for cells */\r\n height: 36px; /* Fixed height for all rows */\r\n text-align: center;\r\n padding: 0 8px; /* Add some padding inside cells */\r\n}\r\n\r\n/* Specific styles for the first column */\r\ntable th:first-child, table td:first-child {\r\n width: 150px; /* Set width for the first column */\r\n text-align: left;\r\n}\r\n\r\n/* Specific styles for the \"Can\" columns */\r\ntable th:not(:first-child), table td:not(:first-child) {\r\n width: 100px; /* Set width for \"Can\" columns */\r\n}\r\n\r\n/* Alternating row background colors */\r\ntable tr:nth-child(odd) {\r\n background-color: white; /* Light color for odd rows */\r\n}\r\n\r\ntable tr:nth-child(even) {\r\n background-color: #e7f4ff; /* Light blue for even rows */\r\n}\r\n"] }]
232
232
  }], () => [], { EntityName: [{
233
233
  type: Input
234
234
  }], BottomMargin: [{
package/package.json CHANGED
@@ -1,40 +1,42 @@
1
1
  {
2
- "name": "@memberjunction/ng-entity-permissions",
3
- "version": "0.9.2",
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": "^0.9.156",
29
- "@memberjunction/global": "^0.9.153",
30
- "@memberjunction/core": "^0.9.172",
31
- "@memberjunction/ng-container-directives": "^0.9.136",
32
- "@memberjunction/ng-shared": "^0.9.25",
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
- "tslib": "^2.3.0"
38
- },
39
- "sideEffects": false
2
+ "name": "@memberjunction/ng-entity-permissions",
3
+ "version": "0.9.7",
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\" \u0026\u0026 exit 1",
12
+ "build": "ngc"
13
+ },
14
+ "keywords": [
15
+
16
+ ],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "devDependencies": {
20
+ "@angular/compiler": "~17.2.2",
21
+ "@angular/compiler-cli": "~17.2.2"
22
+ },
23
+ "peerDependencies": {
24
+ "@angular/common": "~17.2.2",
25
+ "@angular/core": "~17.2.2",
26
+ "@angular/forms": "~17.2.2",
27
+ "@angular/router": "~17.2.2"
28
+ },
29
+ "dependencies": {
30
+ "@memberjunction/core-entities": "^0.9.162",
31
+ "@memberjunction/global": "^0.9.158",
32
+ "@memberjunction/core": "^0.9.177",
33
+ "@memberjunction/ng-container-directives": "^0.9.140",
34
+ "@memberjunction/ng-shared": "^0.9.30",
35
+ "@progress/kendo-angular-dropdowns": "~15.1.0",
36
+ "@progress/kendo-angular-grid": "~15.1.0",
37
+ "@progress/kendo-angular-buttons": "~15.1.0",
38
+ "@progress/kendo-angular-dialog": "~15.1.0",
39
+ "tslib": "^2.3.0"
40
+ },
41
+ "sideEffects": false
40
42
  }