@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%] {\r\n min-width: 200px;\r\n max-width: 500px;\r\n}"] });
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>\r\n <kendo-dropdownlist\r\n [data]=\"entityList\"\r\n textField=\"Name\"\r\n valueField=\"Name\"\r\n placeholder=\"Select an entity...\"\r\n class=\"entity-selector\"\r\n [(value)]=\"CurrentEntity\"\r\n >\r\n </kendo-dropdownlist>\r\n <mj-entity-permissions-grid class=\"inner-grid\" *ngIf=\"CurrentEntity\" [EntityName]=\"CurrentEntity.Name\" (PermissionChanged)=\"handlePermissionChanged($event)\"></mj-entity-permissions-grid>\r\n</div>\r\n ", styles: [".entity-selector {\r\n min-width: 200px;\r\n max-width: 500px;\r\n}"] }]
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\\lib\\entity-selector-with-grid\\entity-selector-with-grid.component.ts", lineNumber: 13 }); })();
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\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 width: 125px;\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 cursor: pointer;\r\n}\r\n\r\n.permission-left-col[_ngcontent-%COMP%] {\r\n cursor: pointer;\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 min-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}\r\n\r\ntable[_ngcontent-%COMP%] tr.dirty-row[_ngcontent-%COMP%] {\r\n font-style: italic;\r\n background-color: #ffcccc;\r\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>\r\n <div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\r\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"savePermissions()\">Save</button>\r\n <button [disabled]=\"NumDirtyPermissions === 0\" kendoButton (click)=\"cancelEdit()\">Cancel</button>\r\n <table *ngIf=\"!isLoading\" class=\"grid\">\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"this.Mode==='Entity'\">Role</th>\r\n <th *ngIf=\"this.Mode==='Role'\">Entity</th>\r\n <th (click)=\"flipAllPermissions('Read')\">Read</th>\r\n <th (click)=\"flipAllPermissions('Create')\">Create</th>\r\n <th (click)=\"flipAllPermissions('Update')\">Update</th>\r\n <th (click)=\"flipAllPermissions('Delete')\">Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let permission of permissions\" [ngClass]=\"IsPermissionReallyDirty(permission) ? 'dirty-row' : ''\">\r\n <td class=\"permission-left-col\" (click)=\"flipRow(permission)\">\r\n <span *ngIf=\"this.Mode==='Entity'\">\r\n {{ permission.RoleName }}\r\n </span>\r\n <span *ngIf=\"this.Mode==='Role'\">\r\n {{ permission.Entity }}\r\n </span>\r\n <kendo-svgicon *ngIf=\"IsPermissionReallyDirty(permission)\" \r\n [icon]=\"kendoSVGIcon('arrowRotateCcwSmallIcon')\" \r\n (click)=\"revertRow($event, permission)\"></kendo-svgicon></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, '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, '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, '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 width: 125px;\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 cursor: pointer;\r\n}\r\n\r\n.permission-left-col {\r\n cursor: pointer;\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 min-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\r\ntable tr.dirty-row {\r\n font-style: italic;\r\n background-color: #ffcccc;\r\n}\r\n\r\n"] }]
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\\lib\\grid\\entity-permissions-grid.component.ts", lineNumber: 21 }); })();
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",
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.4",
29
- "@memberjunction/global": "^1.0.4",
30
- "@memberjunction/core": "^1.0.4",
31
- "@memberjunction/ng-container-directives": "^1.0.4",
32
- "@memberjunction/ng-shared": "^1.0.4",
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
+ }