@memberjunction/ng-explorer-settings 0.9.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.
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./single-role/single-role.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@progress/kendo-angular-grid";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "@progress/kendo-angular-dialog";
7
+ import * as i6 from "@progress/kendo-angular-excel-export";
8
+ import * as i7 from "@memberjunction/ng-compare-records";
9
+ import * as i8 from "@memberjunction/ng-container-directives";
10
+ import * as i9 from "@progress/kendo-angular-buttons";
11
+ import * as i10 from "@progress/kendo-angular-icons";
12
+ import * as i11 from "@progress/kendo-angular-dropdowns";
13
+ export declare class ExplorerSettingsModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExplorerSettingsModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ExplorerSettingsModule, [typeof i1.SingleRoleComponent], [typeof i2.CommonModule, typeof i3.GridModule, typeof i4.FormsModule, typeof i5.DialogsModule, typeof i6.ExcelExportModule, typeof i7.CompareRecordsModule, typeof i8.ContainerDirectivesModule, typeof i9.ButtonsModule, typeof i10.IconsModule, typeof i11.DropDownsModule], [typeof i1.SingleRoleComponent]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<ExplorerSettingsModule>;
17
+ }
@@ -0,0 +1,61 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ // Kendo UI Angular imports
4
+ import { GridModule } from '@progress/kendo-angular-grid';
5
+ import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
6
+ import { DialogsModule } from "@progress/kendo-angular-dialog";
7
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
8
+ import { IconsModule } from '@progress/kendo-angular-icons';
9
+ import { CompareRecordsModule } from '@memberjunction/ng-compare-records';
10
+ import { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';
11
+ import { FormsModule } from '@angular/forms';
12
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
13
+ import { SingleRoleComponent } from './single-role/single-role.component';
14
+ import * as i0 from "@angular/core";
15
+ export class ExplorerSettingsModule {
16
+ }
17
+ ExplorerSettingsModule.ɵfac = function ExplorerSettingsModule_Factory(t) { return new (t || ExplorerSettingsModule)(); };
18
+ ExplorerSettingsModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ExplorerSettingsModule });
19
+ ExplorerSettingsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
20
+ GridModule,
21
+ FormsModule,
22
+ DialogsModule,
23
+ ExcelExportModule,
24
+ CompareRecordsModule,
25
+ ContainerDirectivesModule,
26
+ ButtonsModule,
27
+ IconsModule,
28
+ DropDownsModule] });
29
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExplorerSettingsModule, [{
30
+ type: NgModule,
31
+ args: [{
32
+ declarations: [
33
+ SingleRoleComponent
34
+ ],
35
+ imports: [
36
+ CommonModule,
37
+ GridModule,
38
+ FormsModule,
39
+ DialogsModule,
40
+ ExcelExportModule,
41
+ CompareRecordsModule,
42
+ ContainerDirectivesModule,
43
+ ButtonsModule,
44
+ IconsModule,
45
+ DropDownsModule
46
+ ],
47
+ exports: [
48
+ SingleRoleComponent
49
+ ]
50
+ }]
51
+ }], null, null); })();
52
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ExplorerSettingsModule, { declarations: [SingleRoleComponent], imports: [CommonModule,
53
+ GridModule,
54
+ FormsModule,
55
+ DialogsModule,
56
+ ExcelExportModule,
57
+ CompareRecordsModule,
58
+ ContainerDirectivesModule,
59
+ ButtonsModule,
60
+ IconsModule,
61
+ DropDownsModule], exports: [SingleRoleComponent] }); })();
@@ -0,0 +1,33 @@
1
+ import { OnInit, SimpleChanges, OnChanges } from '@angular/core';
2
+ import { kendoSVGIcon } from '@memberjunction/ng-shared';
3
+ import { UserRoleEntity } from '@memberjunction/core-entities';
4
+ import * as i0 from "@angular/core";
5
+ export declare class UserRoleEntity_Ext extends UserRoleEntity {
6
+ private _selected;
7
+ get Selected(): boolean;
8
+ set Selected(value: boolean);
9
+ private _userName;
10
+ get SavedUserName(): string;
11
+ set SavedUserName(value: string);
12
+ private _userID;
13
+ get SavedUserID(): number;
14
+ set SavedUserID(value: number);
15
+ }
16
+ export declare class SingleRoleComponent implements OnInit, OnChanges {
17
+ RoleName: string;
18
+ BottomMargin: number;
19
+ userRoles: UserRoleEntity_Ext[];
20
+ gridHeight: number;
21
+ isLoading: boolean;
22
+ kendoSVGIcon: typeof kendoSVGIcon;
23
+ constructor();
24
+ ngOnInit(): void;
25
+ ngOnChanges(changes: SimpleChanges): void;
26
+ Refresh(): Promise<void>;
27
+ saveUserRoles(): Promise<void>;
28
+ get NumDirty(): number;
29
+ protected IsReallyDirty(ur: UserRoleEntity_Ext): boolean;
30
+ flipState($event: MouseEvent, ur: UserRoleEntity_Ext, flipState: boolean): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<SingleRoleComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<SingleRoleComponent, "mj-single-role", never, { "RoleName": { "alias": "RoleName"; "required": false; }; "BottomMargin": { "alias": "BottomMargin"; "required": false; }; }, {}, never, never, false, never>;
33
+ }
@@ -0,0 +1,251 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
+ return new (P || (P = Promise))(function (resolve, reject) {
10
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
14
+ });
15
+ };
16
+ import { Component, Input } from '@angular/core';
17
+ import { BaseEntity, Metadata, RunView } from '@memberjunction/core';
18
+ import { kendoSVGIcon } from '@memberjunction/ng-shared';
19
+ import { UserRoleEntity } from '@memberjunction/core-entities';
20
+ import { RegisterClass } from '@memberjunction/global';
21
+ import * as i0 from "@angular/core";
22
+ import * as i1 from "@angular/common";
23
+ import * as i2 from "@angular/forms";
24
+ import * as i3 from "@memberjunction/ng-container-directives";
25
+ import * as i4 from "@progress/kendo-angular-buttons";
26
+ function SingleRoleComponent_div_1_Template(rf, ctx) { if (rf & 1) {
27
+ i0.ɵɵelementStart(0, "div");
28
+ i0.ɵɵtext(1, "Loading...");
29
+ i0.ɵɵelementEnd();
30
+ } }
31
+ function SingleRoleComponent_button_2_Template(rf, ctx) { if (rf & 1) {
32
+ const _r4 = i0.ɵɵgetCurrentView();
33
+ i0.ɵɵelementStart(0, "button", 4);
34
+ i0.ɵɵlistener("click", function SingleRoleComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.saveUserRoles()); });
35
+ i0.ɵɵtext(1, "Save");
36
+ i0.ɵɵelementEnd();
37
+ } }
38
+ function SingleRoleComponent_table_5_tr_8_Template(rf, ctx) { if (rf & 1) {
39
+ const _r8 = i0.ɵɵgetCurrentView();
40
+ i0.ɵɵelementStart(0, "tr")(1, "td");
41
+ i0.ɵɵtext(2);
42
+ i0.ɵɵelementEnd();
43
+ i0.ɵɵelementStart(3, "td", 7);
44
+ i0.ɵɵlistener("click", function SingleRoleComponent_table_5_tr_8_Template_td_click_3_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r8); const ur_r6 = restoredCtx.$implicit; const ctx_r7 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r7.flipState($event, ur_r6, true)); });
45
+ i0.ɵɵelementStart(4, "input", 8);
46
+ i0.ɵɵtwoWayListener("ngModelChange", function SingleRoleComponent_table_5_tr_8_Template_input_ngModelChange_4_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r8); const ur_r6 = restoredCtx.$implicit; i0.ɵɵtwoWayBindingSet(ur_r6.Selected, $event) || (ur_r6.Selected = $event); return i0.ɵɵresetView($event); });
47
+ i0.ɵɵlistener("click", function SingleRoleComponent_table_5_tr_8_Template_input_click_4_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r8); const ur_r6 = restoredCtx.$implicit; const ctx_r10 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r10.flipState($event, ur_r6, false)); });
48
+ i0.ɵɵelementEnd()()();
49
+ } if (rf & 2) {
50
+ const ur_r6 = ctx.$implicit;
51
+ i0.ɵɵadvance(2);
52
+ i0.ɵɵtextInterpolate(ur_r6.User);
53
+ i0.ɵɵadvance(2);
54
+ i0.ɵɵtwoWayProperty("ngModel", ur_r6.Selected);
55
+ } }
56
+ function SingleRoleComponent_table_5_Template(rf, ctx) { if (rf & 1) {
57
+ i0.ɵɵelementStart(0, "table", 5)(1, "thead")(2, "tr")(3, "th");
58
+ i0.ɵɵtext(4, "User");
59
+ i0.ɵɵelementEnd();
60
+ i0.ɵɵelementStart(5, "th");
61
+ i0.ɵɵtext(6, "In Role");
62
+ i0.ɵɵelementEnd()()();
63
+ i0.ɵɵelementStart(7, "tbody");
64
+ i0.ɵɵtemplate(8, SingleRoleComponent_table_5_tr_8_Template, 5, 2, "tr", 6);
65
+ i0.ɵɵelementEnd()();
66
+ } if (rf & 2) {
67
+ const ctx_r2 = i0.ɵɵnextContext();
68
+ i0.ɵɵadvance(8);
69
+ i0.ɵɵproperty("ngForOf", ctx_r2.userRoles);
70
+ } }
71
+ let UserRoleEntity_Ext = class UserRoleEntity_Ext extends UserRoleEntity {
72
+ constructor() {
73
+ super(...arguments);
74
+ this._selected = false;
75
+ this._userName = '';
76
+ this._userID = 0;
77
+ }
78
+ get Selected() {
79
+ return this._selected;
80
+ }
81
+ set Selected(value) {
82
+ this._selected = value;
83
+ }
84
+ get SavedUserName() {
85
+ return this._userName;
86
+ }
87
+ set SavedUserName(value) {
88
+ this._userName = value;
89
+ }
90
+ get SavedUserID() {
91
+ return this._userID;
92
+ }
93
+ set SavedUserID(value) {
94
+ this._userID = value;
95
+ }
96
+ };
97
+ UserRoleEntity_Ext = __decorate([
98
+ RegisterClass(BaseEntity, 'User Roles', 10) // register this with a high priority so we are used here, we just need to extend it to add a property as a flag to know if it's in the database or not
99
+ ], UserRoleEntity_Ext);
100
+ export { UserRoleEntity_Ext };
101
+ export class SingleRoleComponent {
102
+ constructor() {
103
+ this.BottomMargin = 0;
104
+ this.userRoles = [];
105
+ this.gridHeight = 750;
106
+ this.isLoading = false;
107
+ this.kendoSVGIcon = kendoSVGIcon;
108
+ }
109
+ ngOnInit() {
110
+ this.Refresh();
111
+ }
112
+ ngOnChanges(changes) {
113
+ if (changes.EntityName && !changes.EntityName.isFirstChange()) {
114
+ // If EntityName has changed and it's not the first change (initialization)
115
+ this.Refresh();
116
+ }
117
+ }
118
+ Refresh() {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ if (this.RoleName && this.RoleName.length > 0) {
121
+ const startTime = new Date().getTime();
122
+ this.isLoading = true;
123
+ const md = new Metadata();
124
+ const rv = new RunView();
125
+ const result = yield rv.RunView({
126
+ EntityName: 'User Roles',
127
+ ExtraFilter: `RoleName='${this.RoleName}'`,
128
+ ResultType: 'entity_object'
129
+ });
130
+ if (result.Success) {
131
+ // we have all of the saved permissions now
132
+ // the post-process we need to do now is to see if there are any roles that don't have any existing permissions and if so, we need to create
133
+ // new permission records for them. We won't actually consider those "Dirty" and save those unless the user actually selects one or more
134
+ // to turn on, we are just doing this to make the grid easy to manage from the user perspective.
135
+ const existingUserRoles = result.Results;
136
+ existingUserRoles.forEach(ur => {
137
+ ur.Selected = true;
138
+ ur.SavedUserID = ur.UserID; // stash this in an extra property so we can later set it if we have a delete operation
139
+ ur.SavedUserName = ur.User; // stash this in an extra property so we can later set it if we have a delete operation
140
+ }); // flip this on for all records that come from the DB
141
+ const userResult = yield rv.RunView({
142
+ EntityName: 'Users',
143
+ ExtraFilter: 'IsActive=1',
144
+ ResultType: 'entity_object'
145
+ });
146
+ if (userResult.Success) {
147
+ const users = userResult.Results;
148
+ const usersNotInRole = users.filter(u => !existingUserRoles.some(p => p.UserID === u.ID));
149
+ for (const u of usersNotInRole) {
150
+ const ur = yield md.GetEntityObject('User Roles');
151
+ ur.NewRecord();
152
+ ur.RoleName = this.RoleName;
153
+ ur.UserID = u.ID;
154
+ ur.Set('User', u.Name); // use weak typing to get around the readonly property
155
+ ur.SavedUserName = u.Name; // stash this in an extra property so we can later set it if we have a delete operation
156
+ ur.SavedUserID = u.ID; // stash this in an extra property so we can later set it if we have a delete operation
157
+ ur.Selected = false;
158
+ existingUserRoles.push(ur);
159
+ }
160
+ }
161
+ this.userRoles = existingUserRoles.sort((a, b) => a.User.localeCompare(b.User));
162
+ }
163
+ else {
164
+ throw new Error("Error loading user roles: " + result.ErrorMessage);
165
+ }
166
+ this.isLoading = false;
167
+ }
168
+ });
169
+ }
170
+ saveUserRoles() {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ // iterate through each permisison and for the ones that are dirty, add to transaction group then commit at once
173
+ const md = new Metadata();
174
+ const tg = yield md.CreateTransactionGroup();
175
+ let itemCount = 0;
176
+ this.userRoles.forEach(ur => {
177
+ if (this.IsReallyDirty(ur)) {
178
+ ur.TransactionGroup = tg;
179
+ itemCount++;
180
+ // now, we have to determine if we are going to save the record or delete it
181
+ // if ur.Selected === false and we are in the database, we need to delete
182
+ // otherwise, we need to save
183
+ if (ur.Selected)
184
+ ur.Save();
185
+ else
186
+ ur.Delete();
187
+ }
188
+ });
189
+ if (itemCount > 0) {
190
+ if (yield tg.Submit()) {
191
+ // for any items in the above that were deleted, we would have had the User property wiped out so we need to go check to see if we have a null ID and if so, copy the UserName back into the User property
192
+ this.userRoles.forEach(ur => {
193
+ if (ur.User === null) {
194
+ ur.Set('User', ur.SavedUserName); // get around the read-only property
195
+ ur.UserID = ur.SavedUserID;
196
+ ur.RoleName = this.RoleName;
197
+ }
198
+ });
199
+ }
200
+ }
201
+ });
202
+ }
203
+ get NumDirty() {
204
+ return this.userRoles.filter(ur => this.IsReallyDirty(ur)).length;
205
+ }
206
+ IsReallyDirty(ur) {
207
+ // logic is simple, if we are in the database, but the checkbox is not checked (or vice versa), then we are dirty
208
+ if (ur.Selected && ur.ID > 0)
209
+ return false; // if we are in the database and the checkbox is checked, we are not dirty
210
+ else if (!ur.Selected && ur.ID > 0)
211
+ return true; // if we are in the database and the checkbox is not checked, we are dirty because we'd have to be removed
212
+ else if (ur.Selected)
213
+ return true; // if we are NOT in the database and the checkbox is checked, we are dirty because we'd have to be added
214
+ else
215
+ return false;
216
+ }
217
+ flipState($event, ur, flipState) {
218
+ if (flipState)
219
+ ur.Selected = !ur.Selected;
220
+ else
221
+ $event.stopPropagation();
222
+ }
223
+ }
224
+ SingleRoleComponent.ɵfac = function SingleRoleComponent_Factory(t) { return new (t || SingleRoleComponent)(); };
225
+ SingleRoleComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleRoleComponent, selectors: [["mj-single-role"]], inputs: { RoleName: "RoleName", BottomMargin: "BottomMargin" }, features: [i0.ɵɵNgOnChangesFeature], decls: 6, vars: 4, consts: [["mjFillContainer", ""], [4, "ngIf"], ["kendoButton", "", 3, "click", 4, "ngIf"], ["class", "grid", 4, "ngIf"], ["kendoButton", "", 3, "click"], [1, "grid"], [4, "ngFor", "ngForOf"], [3, "click"], ["type", "checkbox", "kendoCheckBox", "", 3, "ngModel", "ngModelChange", "click"]], template: function SingleRoleComponent_Template(rf, ctx) { if (rf & 1) {
226
+ i0.ɵɵelementStart(0, "div", 0);
227
+ i0.ɵɵtemplate(1, SingleRoleComponent_div_1_Template, 2, 0, "div", 1)(2, SingleRoleComponent_button_2_Template, 2, 0, "button", 2);
228
+ i0.ɵɵelementStart(3, "span");
229
+ i0.ɵɵtext(4);
230
+ i0.ɵɵelementEnd();
231
+ i0.ɵɵtemplate(5, SingleRoleComponent_table_5_Template, 9, 1, "table", 3);
232
+ i0.ɵɵelementEnd();
233
+ } if (rf & 2) {
234
+ i0.ɵɵadvance();
235
+ i0.ɵɵproperty("ngIf", ctx.isLoading);
236
+ i0.ɵɵadvance();
237
+ i0.ɵɵproperty("ngIf", ctx.NumDirty > 0);
238
+ i0.ɵɵadvance(2);
239
+ i0.ɵɵtextInterpolate(ctx.RoleName);
240
+ i0.ɵɵadvance();
241
+ i0.ɵɵproperty("ngIf", !ctx.isLoading);
242
+ } }, 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}"] });
243
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleRoleComponent, [{
244
+ type: Component,
245
+ args: [{ selector: 'mj-single-role', 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...</div>\r\n <button *ngIf=\"NumDirty > 0\" kendoButton (click)=\"saveUserRoles()\">Save</button>\r\n <span>{{this.RoleName}}</span>\r\n <table *ngIf=\"!isLoading\" class=\"grid\">\r\n <thead>\r\n <tr>\r\n <th>User</th>\r\n <th>In Role</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let ur of userRoles\">\r\n <td>{{ ur.User }}</td>\r\n <td (click)=\"flipState($event, ur, true)\">\r\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"ur.Selected\" (click)=\"flipState($event, ur, 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"] }]
246
+ }], () => [], { RoleName: [{
247
+ type: Input
248
+ }], BottomMargin: [{
249
+ type: Input
250
+ }] }); })();
251
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRoleComponent, { className: "SingleRoleComponent", filePath: "src\\lib\\single-role\\single-role.component.ts", lineNumber: 40 }); })();
@@ -0,0 +1,2 @@
1
+ export * from './lib/single-role/single-role.component';
2
+ export * from './lib/module';
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Public API Surface
3
+ */
4
+ export * from './lib/single-role/single-role.component';
5
+ export * from './lib/module';
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@memberjunction/ng-explorer-settings",
3
+ "version": "0.9.2",
4
+ "description": "MemberJunction: Reusable Angular components for the settings section of the MJ Explorer App",
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
40
+ }