@memberjunction/ng-entity-permissions 5.10.1 → 5.12.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.
@@ -397,11 +397,11 @@ export class EntityPermissionsGridComponent {
397
397
  i0.ɵɵproperty("disabled", ctx.NumDirtyPermissions === 0);
398
398
  i0.ɵɵadvance(2);
399
399
  i0.ɵɵconditional(!ctx.isLoading ? 6 : -1);
400
- } }, dependencies: [i1.NgClass, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgModel, i3.ButtonComponent, i4.LoadingComponent], 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}"] });
400
+ } }, dependencies: [i1.NgClass, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgModel, i3.ButtonComponent, i4.LoadingComponent], 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: var(--mj-bg-surface-sunken); \n\n color: var(--mj-text-primary); \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 var(--mj-border-default); \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: var(--mj-bg-surface); \n\n}\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: var(--mj-brand-primary-subtle); \n\n}\n\ntable[_ngcontent-%COMP%] tr.dirty-row[_ngcontent-%COMP%] {\n font-style: italic;\n background-color: var(--mj-status-error-subtle);\n}"] });
401
401
  }
402
402
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityPermissionsGridComponent, [{
403
403
  type: Component,
404
- args: [{ standalone: false, selector: 'mj-entity-permissions-grid', template: "<div>\n @if (isLoading) {\n <div><mj-loading [showText]=\"false\" size=\"medium\"></mj-loading></div>\n }\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"savePermissions()\">Save</button>\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"cancelEdit()\">Cancel</button>\n @if (!isLoading) {\n <table class=\"grid\">\n <thead>\n <tr>\n @if (this.Mode==='Entity') {\n <th>Role</th>\n }\n @if (this.Mode==='Role') {\n <th>Entity</th>\n }\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 @for (permission of permissions; track permission) {\n <tr [ngClass]=\"IsPermissionReallyDirty(permission) ? 'dirty-row' : ''\">\n <td class=\"permission-left-col\" (click)=\"flipRow(permission)\">\n @if(this.Mode === 'Entity') {\n <span>\n {{ getRoleName(permission.RoleID) }}\n </span>\n }\n @else if(this.Mode === 'Role') {\n <span>\n {{ permission.Entity }}\n </span>\n }\n @if(IsPermissionReallyDirty(permission)) {\n <span class=\"fa-solid fa-arrow-rotate-left\" (click)=\"revertRow($event, permission)\"></span>\n }\n </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 }\n </tbody>\n </table>\n}\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"] }]
404
+ args: [{ standalone: false, selector: 'mj-entity-permissions-grid', template: "<div>\n @if (isLoading) {\n <div><mj-loading [showText]=\"false\" size=\"medium\"></mj-loading></div>\n }\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"savePermissions()\">Save</button>\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"cancelEdit()\">Cancel</button>\n @if (!isLoading) {\n <table class=\"grid\">\n <thead>\n <tr>\n @if (this.Mode==='Entity') {\n <th>Role</th>\n }\n @if (this.Mode==='Role') {\n <th>Entity</th>\n }\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 @for (permission of permissions; track permission) {\n <tr [ngClass]=\"IsPermissionReallyDirty(permission) ? 'dirty-row' : ''\">\n <td class=\"permission-left-col\" (click)=\"flipRow(permission)\">\n @if(this.Mode === 'Entity') {\n <span>\n {{ getRoleName(permission.RoleID) }}\n </span>\n }\n @else if(this.Mode === 'Role') {\n <span>\n {{ permission.Entity }}\n </span>\n }\n @if(IsPermissionReallyDirty(permission)) {\n <span class=\"fa-solid fa-arrow-rotate-left\" (click)=\"revertRow($event, permission)\"></span>\n }\n </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 }\n </tbody>\n </table>\n}\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: var(--mj-bg-surface-sunken); /* Light gray background for headers */\n color: var(--mj-text-primary); /* 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 var(--mj-border-default); /* 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: var(--mj-bg-surface); /* Light color for odd rows */\n}\n\ntable tr:nth-child(even) {\n background-color: var(--mj-brand-primary-subtle); /* Light blue for even rows */\n}\n\ntable tr.dirty-row {\n font-style: italic;\n background-color: var(--mj-status-error-subtle);\n}\n\n"] }]
405
405
  }], () => [], { Mode: [{
406
406
  type: Input
407
407
  }], EntityName: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-entity-permissions",
3
- "version": "5.10.1",
3
+ "version": "5.12.0",
4
4
  "description": "MemberJunction: Angular components for displaying/editing permissions for an entity, and related components.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -25,12 +25,12 @@
25
25
  "@angular/router": "21.1.3"
26
26
  },
27
27
  "dependencies": {
28
- "@memberjunction/core": "5.10.1",
29
- "@memberjunction/core-entities": "5.10.1",
30
- "@memberjunction/global": "5.10.1",
31
- "@memberjunction/ng-container-directives": "5.10.1",
32
- "@memberjunction/ng-shared": "5.10.1",
33
- "@memberjunction/ng-shared-generic": "5.10.1",
28
+ "@memberjunction/core": "5.12.0",
29
+ "@memberjunction/core-entities": "5.12.0",
30
+ "@memberjunction/global": "5.12.0",
31
+ "@memberjunction/ng-container-directives": "5.12.0",
32
+ "@memberjunction/ng-shared": "5.12.0",
33
+ "@memberjunction/ng-shared-generic": "5.12.0",
34
34
  "@progress/kendo-angular-buttons": "22.0.1",
35
35
  "@progress/kendo-angular-dialog": "22.0.1",
36
36
  "@progress/kendo-angular-dropdowns": "22.0.1",