@memberjunction/ng-explorer-settings 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.
- package/dist/lib/application-entities-grid/application-entities-grid.component.js +3 -3
- package/dist/lib/settings/settings.component.js +3 -3
- package/dist/lib/single-application/single-application.component.js +3 -3
- package/dist/lib/single-role/single-role.component.js +3 -3
- package/dist/lib/single-user/single-user.component.js +3 -3
- package/dist/lib/user-roles-grid/user-roles-grid.component.js +3 -3
- package/package.json +48 -48
- package/dist/lib/entity-form-dialog/entity-form-dialog.component.d.ts +0 -33
- package/dist/lib/entity-form-dialog/entity-form-dialog.component.js +0 -183
- package/dist/lib/entity-form-window/entity-form-window.component.d.ts +0 -17
- package/dist/lib/entity-form-window/entity-form-window.component.js +0 -99
- package/dist/lib/record-list/record-list.component.d.ts +0 -41
- package/dist/lib/record-list/record-list.component.js +0 -324
- package/dist/lib/roles-list/roles-list.component.d.ts +0 -25
- package/dist/lib/roles-list/roles-list.component.js +0 -201
|
@@ -331,10 +331,10 @@ ApplicationEntitiesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
331
331
|
i0.ɵɵproperty("ngIf", ctx.isLoading);
|
|
332
332
|
i0.ɵɵadvance();
|
|
333
333
|
i0.ɵɵproperty("ngIf", !ctx.isLoading);
|
|
334
|
-
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.CheckboxControlValueAccessor, i3.NgControlStatus, i3.NgModel, i4.ButtonComponent, i5.LoaderComponent], styles: ["button[_ngcontent-%COMP%] {\
|
|
334
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.CheckboxControlValueAccessor, i3.NgControlStatus, i3.NgModel, i4.ButtonComponent, i5.LoaderComponent], styles: ["button[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.grid[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n border-collapse: collapse;\n}\n\n\n\n.grid[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: #f2f2f2;\n color: black;\n font-weight: bold;\n text-align: center;\n border: 1px solid gray;\n padding: 0 8px;\n cursor: pointer;\n}\n\n\n\n.grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n border: 1px solid gray;\n height: 36px;\n text-align: center;\n padding: 0 8px;\n}\n\n\n\n.grid[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, .grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\n min-width: 150px;\n text-align: left;\n}\n\n\n\n.grid[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(:first-child), .grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(:first-child) {\n width: 100px;\n}\n\n\n\n.grid[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd) {\n background-color: white;\n}\n\n.grid[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: #e7f4ff;\n}"] });
|
|
335
335
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApplicationEntitiesGridComponent, [{
|
|
336
336
|
type: Component,
|
|
337
|
-
args: [{ selector: 'mj-application-entities-grid', template: "<div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\
|
|
337
|
+
args: [{ selector: 'mj-application-entities-grid', template: "<div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\n<div class=\"content\" *ngIf=\"!isLoading\">\n <button [disabled]=\"NumDirty === 0\" kendoButton (click)=\"save()\">Save</button>\n <button [disabled]=\"NumDirty === 0\" kendoButton (click)=\"cancelEdit()\">Cancel</button>\n <table *ngIf=\"!isLoading\" class=\"grid\">\n <thead>\n <tr>\n <th *ngIf=\"Mode === 'Applications'\">Entity</th>\n <th *ngIf=\"Mode === 'Entities'\">Application</th>\n <th (click)=\"flipAll()\">In Application</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let r of rows\">\n <td *ngIf=\"Mode === 'Applications'\">{{ r.Entity }}</td>\n <td *ngIf=\"Mode === 'Entities'\">{{ r.Application }}</td>\n <td (click)=\"flipState($event, r, true)\">\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"r.Selected\" (click)=\"flipState($event, r, false)\">\n </td>\n </tr>\n </tbody>\n </table> \n</div>", styles: ["button {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n/* Styles for the table with the 'grid' class */\n.grid {\n margin-left: 5px;\n margin-top: 5px;\n border-collapse: collapse;\n}\n\n/* Styles for th elements within the table with the 'grid' class */\n.grid th {\n background-color: #f2f2f2;\n color: black;\n font-weight: bold;\n text-align: center;\n border: 1px solid gray;\n padding: 0 8px;\n cursor: pointer;\n}\n\n/* Styles for td elements within the table with the 'grid' class */\n.grid td {\n border: 1px solid gray;\n height: 36px;\n text-align: center;\n padding: 0 8px;\n}\n\n/* Styles for the first child th and td within the table with the 'grid' class */\n.grid th:first-child,\n.grid td:first-child {\n min-width: 150px;\n text-align: left;\n}\n\n/* Styles for non-first-child th and td elements within the table with the 'grid' class */\n.grid th:not(:first-child),\n.grid td:not(:first-child) {\n width: 100px;\n}\n\n/* Alternating row background colors for the table with the 'grid' class */\n.grid tr:nth-child(odd) {\n background-color: white;\n}\n\n.grid tr:nth-child(even) {\n background-color: #e7f4ff;\n}\n\n"] }]
|
|
338
338
|
}], () => [{ type: i1.Router }], { ApplicationName: [{
|
|
339
339
|
type: Input
|
|
340
340
|
}], EntityID: [{
|
|
@@ -346,4 +346,4 @@ ApplicationEntitiesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
346
346
|
}], EntityRecord: [{
|
|
347
347
|
type: Input
|
|
348
348
|
}] }); })();
|
|
349
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ApplicationEntitiesGridComponent, { className: "ApplicationEntitiesGridComponent", filePath: "src
|
|
349
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ApplicationEntitiesGridComponent, { className: "ApplicationEntitiesGridComponent", filePath: "src/lib/application-entities-grid/application-entities-grid.component.ts", lineNumber: 45 }); })();
|
|
@@ -189,9 +189,9 @@ SettingsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SettingsC
|
|
|
189
189
|
i0.ɵɵproperty("fillWidth", false);
|
|
190
190
|
i0.ɵɵadvance();
|
|
191
191
|
i0.ɵɵconditional(4, (SettingsComponent_contFlowTmp = ctx.currentItem) === "EntityPermissions" ? 4 : SettingsComponent_contFlowTmp === "Users" ? 5 : SettingsComponent_contFlowTmp === "User" ? 6 : SettingsComponent_contFlowTmp === "Roles" ? 7 : SettingsComponent_contFlowTmp === "Role" ? 8 : SettingsComponent_contFlowTmp === "Applications" ? 9 : SettingsComponent_contFlowTmp === "Application" ? 10 : -1);
|
|
192
|
-
} }, dependencies: [i2.NgForOf, i3.FillContainer, i4.EntityPermissionsSelectorWithGridComponent, i5.SimpleRecordListComponent, i6.SingleRoleComponent, i7.SingleUserComponent, i8.SingleApplicationComponent], styles: [".container[_ngcontent-%COMP%] {\
|
|
192
|
+
} }, dependencies: [i2.NgForOf, i3.FillContainer, i4.EntityPermissionsSelectorWithGridComponent, i5.SimpleRecordListComponent, i6.SingleRoleComponent, i7.SingleUserComponent, i8.SingleApplicationComponent], styles: [".container[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n overflow: hidden; \n}\n\n.options-container[_ngcontent-%COMP%] {\n float: left; \n\n width: 150px; \n\n flex: 0 0 150px;\n padding: 10px;\n border-right: solid 1px lightgray;\n box-sizing: border-box; \n\n}\n\n.option-item[_ngcontent-%COMP%] {\n cursor: pointer;\n margin-bottom: 10px; \n\n padding: 5px 10px; \n\n border-radius: 4px; \n\n}\n\n.display-container[_ngcontent-%COMP%] {\n display: block; \n\n margin-left: 160px; \n\n padding: 10px;\n box-sizing: border-box; \n\n}\n\n.selected[_ngcontent-%COMP%] {\n background-color: #007bff; \n\n color: white; \n\n padding: 5px 10px; \n\n border-radius: 4px; \n\n}"] });
|
|
193
193
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SettingsComponent, [{
|
|
194
194
|
type: Component,
|
|
195
|
-
args: [{ selector: 'mj-settings', template: "<div class=\"container\" mjFillContainer [bottomMargin]=\"5\" [rightMargin]=\"0\">\
|
|
195
|
+
args: [{ selector: 'mj-settings', template: "<div class=\"container\" mjFillContainer [bottomMargin]=\"5\" [rightMargin]=\"0\">\n <!-- Options container -->\n <div class=\"options-container\" mjFillContainer [fillWidth]=\"false\">\n <div *ngFor=\"let o of options\"\n class=\"option-item\"\n [class.selected]=\"leftNavItemSelected(o)\"\n (click)=\"selectItem(o.value)\"\n >{{o.label}}</div>\n </div>\n\n <!-- Display container -->\n <div class=\"display-container\" mjFillContainer [fillWidth]=\"false\">\n @switch (currentItem) {\n @case ('EntityPermissions') {\n <mj-entity-permissions-selector-with-grid></mj-entity-permissions-selector-with-grid>\n }\n @case ('Users') {\n <mj-simple-record-list\n EntityName=\"Users\"\n SortBy=\"Name\"\n [Columns]=\"['Name', 'Email', 'IsActive', 'Type']\"\n (RecordSelected)=\"selectUser($event)\"\n ></mj-simple-record-list>\n }\n @case ('User') {\n <mj-single-user [UserID]=\"selectedUserID\"></mj-single-user>\n }\n @case ('Roles') {\n <mj-simple-record-list\n EntityName=\"Roles\"\n SortBy=\"Name\"\n [Columns]=\"['Name', 'Description']\"\n (RecordSelected)=\"selectRole($event)\"\n ></mj-simple-record-list>\n }\n @case ('Role') {\n <mj-single-role [RoleName]=\"selectedRoleName\" mjFillContainer></mj-single-role>\n }\n @case ('Applications') {\n <mj-simple-record-list\n EntityName=\"Applications\"\n SortBy=\"Name\"\n [Columns]=\"['Name', 'Description']\"\n (RecordSelected)=\"selectApplication($event)\"\n ></mj-simple-record-list>\n }\n @case ('Application') {\n <mj-single-application [ApplicationName]=\"selectedApplicationName\"></mj-single-application>\n }\n }\n </div>\n</div>", styles: [".container {\n display: block;\n width: 100%;\n overflow: hidden; \n}\n\n.options-container {\n float: left; /* Float to the left */\n width: 150px; /* Fixed width as specified */\n flex: 0 0 150px;\n padding: 10px;\n border-right: solid 1px lightgray;\n box-sizing: border-box; /* Ensures padding is included in the width */\n}\n\n.option-item {\n cursor: pointer;\n margin-bottom: 10px; /* Adds space between the options for better readability */\n padding: 5px 10px; /* Optional: Adds some padding for a better visual appearance */\n border-radius: 4px; /* Optional: Adds rounded corners for a more polished look */\n}\n\n.display-container {\n display: block; /* Ensures it's treated as a block-level element */\n margin-left: 160px; /* Width of the options-container plus its padding */\n padding: 10px;\n box-sizing: border-box; /* Ensures padding doesn't add to the width */\n}\n\n.selected {\n background-color: #007bff; /* A blue background for selected item */\n color: white; /* White text color for better contrast */\n padding: 5px 10px; /* Optional: Adds some padding for a better visual appearance */\n border-radius: 4px; /* Optional: Adds rounded corners for a more polished look */\n}\n"] }]
|
|
196
196
|
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }], null); })();
|
|
197
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SettingsComponent, { className: "SettingsComponent", filePath: "src
|
|
197
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SettingsComponent, { className: "SettingsComponent", filePath: "src/lib/settings/settings.component.ts", lineNumber: 22 }); })();
|
|
@@ -123,14 +123,14 @@ SingleApplicationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
123
123
|
i0.ɵɵconditional(2, !ctx.isLoading && ctx.Record ? 2 : -1);
|
|
124
124
|
i0.ɵɵadvance();
|
|
125
125
|
i0.ɵɵproperty("Record", ctx.Record)("Visible", ctx.showEntityEditingForm)("AutoRevertOnCancel", true)("HandleSave", true)("Width", 550)("Height", 450);
|
|
126
|
-
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.MJTabStripComponent, i3.MJTabBodyComponent, i3.MJTabComponent, i4.EntityFormDialog, i5.LoaderComponent, i6.ApplicationEntitiesGridComponent], styles: ["button[_ngcontent-%COMP%] {\
|
|
126
|
+
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.MJTabStripComponent, i3.MJTabBodyComponent, i3.MJTabComponent, i4.EntityFormDialog, i5.LoaderComponent, i6.ApplicationEntitiesGridComponent], styles: ["button[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.name[_ngcontent-%COMP%] {\n font-weight: bold;\n font-size: 20px;\n margin-left: 5px;\n margin-top: 5px;\n}\n\n.info-table[_ngcontent-%COMP%] {\n width: 100%; \n\n border-collapse: collapse; \n\n margin-bottom: 10px;\n}\n\n.info-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n width: 150px; \n\n font-weight: bold; \n\n text-align: left; \n\n padding: 8px; \n\n border: none; \n\n background-color: transparent; \n\n}\n\n.info-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n text-align: left; \n\n padding: 8px; \n\n border: none; \n\n background-color: transparent; \n\n overflow: hidden; \n\n text-overflow: ellipsis; \n\n}\n\n\n\n.edit-icon[_ngcontent-%COMP%] {\n margin-left: 20px; \n vertical-align: middle;;\n cursor: pointer; \n\n}\n\n.edit-icon[_ngcontent-%COMP%]:hover {\n fill: #007bff; \n\n}"] });
|
|
127
127
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleApplicationComponent, [{
|
|
128
128
|
type: Component,
|
|
129
|
-
args: [{ selector: 'mj-single-application', template: "<div mjFillContainer>\
|
|
129
|
+
args: [{ selector: 'mj-single-application', template: "<div mjFillContainer>\n @if(isLoading) {\n <kendo-loader></kendo-loader>\n }\n @if(!isLoading && Record) {\n <table class=\"info-table\">\n <tbody>\n <tr>\n <th scope=\"row\">Application</th>\n <td>{{Record.Name}}\n <span class=\"edit-icon fa-solid fa-pen-to-square\" (click)=\"EditRecord()\"></span>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">Description</th>\n <td>{{Record.Description}}</td>\n </tr>\n </tbody>\n </table> \n <mj-tabstrip mjFillContainer>\n <mj-tab [TabSelected]=\"true\">\n Entities\n </mj-tab>\n <mj-tab-body>\n <mj-application-entities-grid *ngIf=\"ApplicationName && Record\" Mode=\"Applications\" [ApplicationName]=\"ApplicationName\" [ApplicationRecord]=\"Record\"></mj-application-entities-grid>\n </mj-tab-body>\n </mj-tabstrip>\n }\n</div>\n\n\n<mj-entity-form-dialog #entityForm \n [Record]=\"Record\" \n SectionName=\"details\" \n Mode=\"section\" \n [Visible]=\"showEntityEditingForm\" \n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (close)=\"onEntityFormClosed($event)\">\n</mj-entity-form-dialog>\n", styles: ["button {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.name {\n font-weight: bold;\n font-size: 20px;\n margin-left: 5px;\n margin-top: 5px;\n}\n\n.info-table {\n width: 100%; /* Take up the full width of the container */\n border-collapse: collapse; /* For a cleaner look */\n margin-bottom: 10px;\n}\n\n.info-table th {\n width: 150px; /* Adjust this fixed width as needed */\n font-weight: bold; /* Make header labels bold */\n text-align: left; /* Align text to the left */\n padding: 8px; /* Add some padding for spacing */\n border: none; /* Removes the borders */\n background-color: transparent; /* Removes any background color */\n}\n\n.info-table td {\n text-align: left; /* Align text to the left */\n padding: 8px; /* Add some padding for spacing */\n border: none; /* Removes the borders */\n background-color: transparent; /* Removes any background color */\n overflow: hidden; /* Prevents content from overflowing */\n text-overflow: ellipsis; /* Adds an ellipsis if the text overflows */\n}\n\n/* Style for SVG icon */\n.edit-icon {\n margin-left: 20px; \n vertical-align: middle;;\n cursor: pointer; /* Changes the cursor to a pointer */\n}\n\n.edit-icon:hover {\n fill: #007bff; /* Changes the color on hover, set to the color you prefer */\n}"] }]
|
|
130
130
|
}], () => [{ type: i0.ChangeDetectorRef }], { ApplicationName: [{
|
|
131
131
|
type: Input
|
|
132
132
|
}], entityFormComponent: [{
|
|
133
133
|
type: ViewChild,
|
|
134
134
|
args: ['entityForm']
|
|
135
135
|
}] }); })();
|
|
136
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleApplicationComponent, { className: "SingleApplicationComponent", filePath: "src
|
|
136
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleApplicationComponent, { className: "SingleApplicationComponent", filePath: "src/lib/single-application/single-application.component.ts", lineNumber: 14 }); })();
|
|
@@ -186,14 +186,14 @@ SingleRoleComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleR
|
|
|
186
186
|
i0.ɵɵconditional(2, !ctx.isLoading && ctx.RoleRecord ? 2 : -1);
|
|
187
187
|
i0.ɵɵadvance();
|
|
188
188
|
i0.ɵɵproperty("Record", ctx.RoleRecord)("Visible", ctx.showEntityEditingForm)("AutoRevertOnCancel", true)("HandleSave", true)("Width", 550)("Height", 450);
|
|
189
|
-
} }, styles: [".wrapper[_ngcontent-%COMP%] {\
|
|
189
|
+
} }, styles: [".wrapper[_ngcontent-%COMP%] {\n display: block;\n}\n\nbutton[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.role-name[_ngcontent-%COMP%] {\n font-weight: bold;\n font-size: 20px;\n margin-left: 5px;\n margin-top: 5px;\n}\n\n.role-info-table[_ngcontent-%COMP%] {\n width: 100%; \n\n border-collapse: collapse; \n\n margin-bottom: 10px;\n}\n\n.role-info-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n width: 150px; \n\n font-weight: bold; \n\n text-align: left; \n\n padding: 8px; \n\n border: none; \n\n background-color: transparent; \n\n}\n\n.role-info-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n text-align: left; \n\n padding: 8px; \n\n border: none; \n\n background-color: transparent; \n\n overflow: hidden; \n\n text-overflow: ellipsis; \n\n}\n\n\n\n.edit-icon[_ngcontent-%COMP%] {\n margin-left: 20px; \n vertical-align: middle;;\n cursor: pointer; \n\n}\n\n.edit-icon[_ngcontent-%COMP%]:hover {\n fill: #007bff; \n\n}"] });
|
|
190
190
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleRoleComponent, [{
|
|
191
191
|
type: Component,
|
|
192
|
-
args: [{ selector: 'mj-single-role', template: "<div mjFillContainer class=\"wrapper\">\
|
|
192
|
+
args: [{ selector: 'mj-single-role', template: "<div mjFillContainer class=\"wrapper\">\n @if(isLoading) {\n <kendo-loader></kendo-loader> \n }\n @if(!isLoading && RoleRecord) {\n <table class=\"role-info-table\">\n <tbody>\n <tr>\n <th scope=\"row\">Role</th>\n <td>{{RoleRecord.Name}}\n <kendo-svgicon class='edit-icon' [icon]=\"kendoSVGIcon('pencil')\" (click)=\"EditRecord()\"></kendo-svgicon>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">Description</th>\n <td>{{RoleRecord.Description}}</td>\n </tr>\n <tr>\n <th scope=\"row\">Directory ID</th>\n <td>{{RoleRecord.DirectoryID}}</td>\n </tr>\n <tr>\n <th scope=\"row\">SQL Name</th>\n <td>{{RoleRecord.SQLName}}</td>\n </tr>\n </tbody>\n </table> \n\n <mj-tabstrip mjFillContainer [bottomMargin]=\"150\">\n <mj-tab>\n Users\n </mj-tab>\n <mj-tab-body>\n <mj-user-roles-grid Mode=\"Roles\" [RoleName]=\"RoleName\" [RoleRecord]=\"RoleRecord\"></mj-user-roles-grid>\n </mj-tab-body>\n\n <mj-tab>\n Entity Permissions\n </mj-tab>\n <mj-tab-body>\n <mj-entity-permissions-grid *ngIf=\"RoleRecord && RoleRecord.Name\" Mode=\"Role\" [RoleName]=\"RoleRecord.Name\" mjFillContainer></mj-entity-permissions-grid>\n </mj-tab-body>\n </mj-tabstrip>\n }\n</div>\n \n<mj-entity-form-dialog #entityForm \n [Record]=\"RoleRecord\" \n SectionName=\"details\" \n Mode=\"section\" \n [Visible]=\"showEntityEditingForm\" \n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (close)=\"onEntityFormClosed($event)\">\n</mj-entity-form-dialog>\n", styles: [".wrapper {\n display: block;\n}\n\nbutton {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.role-name {\n font-weight: bold;\n font-size: 20px;\n margin-left: 5px;\n margin-top: 5px;\n}\n\n.role-info-table {\n width: 100%; /* Take up the full width of the container */\n border-collapse: collapse; /* For a cleaner look */\n margin-bottom: 10px;\n}\n\n.role-info-table th {\n width: 150px; /* Adjust this fixed width as needed */\n font-weight: bold; /* Make header labels bold */\n text-align: left; /* Align text to the left */\n padding: 8px; /* Add some padding for spacing */\n border: none; /* Removes the borders */\n background-color: transparent; /* Removes any background color */\n}\n\n.role-info-table td {\n text-align: left; /* Align text to the left */\n padding: 8px; /* Add some padding for spacing */\n border: none; /* Removes the borders */\n background-color: transparent; /* Removes any background color */\n overflow: hidden; /* Prevents content from overflowing */\n text-overflow: ellipsis; /* Adds an ellipsis if the text overflows */\n}\n\n/* Style for SVG icon */\n.edit-icon {\n margin-left: 20px; \n vertical-align: middle;;\n cursor: pointer; /* Changes the cursor to a pointer */\n}\n\n.edit-icon:hover {\n fill: #007bff; /* Changes the color on hover, set to the color you prefer */\n}"] }]
|
|
193
193
|
}], () => [{ type: i0.ChangeDetectorRef }], { RoleName: [{
|
|
194
194
|
type: Input
|
|
195
195
|
}], entityFormComponent: [{
|
|
196
196
|
type: ViewChild,
|
|
197
197
|
args: ['entityForm']
|
|
198
198
|
}] }); })();
|
|
199
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRoleComponent, { className: "SingleRoleComponent", filePath: "src
|
|
199
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleRoleComponent, { className: "SingleRoleComponent", filePath: "src/lib/single-role/single-role.component.ts", lineNumber: 49 }); })();
|
|
@@ -171,14 +171,14 @@ SingleUserComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleU
|
|
|
171
171
|
i0.ɵɵproperty("ngIf", !ctx.isLoading && ctx.UserRecord);
|
|
172
172
|
i0.ɵɵadvance();
|
|
173
173
|
i0.ɵɵproperty("Record", ctx.UserRecord)("Visible", ctx.showEntityEditingForm)("AutoRevertOnCancel", true)("HandleSave", true)("Width", 550)("Height", 450);
|
|
174
|
-
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.SVGIconComponent, i4.MJTabStripComponent, i4.MJTabBodyComponent, i4.MJTabComponent, i5.EntityFormDialog, i6.LoaderComponent, i7.UserViewGridComponent, i8.UserRolesGridComponent], styles: ["button[_ngcontent-%COMP%] {\
|
|
174
|
+
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.SVGIconComponent, i4.MJTabStripComponent, i4.MJTabBodyComponent, i4.MJTabComponent, i5.EntityFormDialog, i6.LoaderComponent, i7.UserViewGridComponent, i8.UserRolesGridComponent], styles: ["button[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.name[_ngcontent-%COMP%] {\n font-weight: bold;\n font-size: 20px;\n margin-left: 5px;\n margin-top: 5px;\n}\n\n.info-table[_ngcontent-%COMP%] {\n width: 100%; \n\n border-collapse: collapse; \n\n margin-bottom: 10px;\n}\n\n.info-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n width: 150px; \n\n font-weight: bold; \n\n text-align: left; \n\n padding: 8px; \n\n border: none; \n\n background-color: transparent; \n\n}\n\n.info-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n text-align: left; \n\n padding: 8px; \n\n border: none; \n\n background-color: transparent; \n\n overflow: hidden; \n\n text-overflow: ellipsis; \n\n}\n\n\n\n.edit-icon[_ngcontent-%COMP%] {\n margin-left: 20px; \n vertical-align: middle;;\n cursor: pointer; \n\n}\n\n.edit-icon[_ngcontent-%COMP%]:hover {\n fill: #007bff; \n\n}"] });
|
|
175
175
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleUserComponent, [{
|
|
176
176
|
type: Component,
|
|
177
|
-
args: [{ selector: 'mj-single-user', template: "<div mjFillContainer>\
|
|
177
|
+
args: [{ selector: 'mj-single-user', template: "<div mjFillContainer>\n <div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\n <div *ngIf=\"!isLoading && UserRecord\">\n <table class=\"info-table\">\n <tbody>\n <tr>\n <th scope=\"row\">User</th>\n <td>{{UserRecord.Name}}<kendo-svgicon class='edit-icon' [icon]=\"kendoSVGIcon('pencil')\" (click)=\"EditRecord()\"></kendo-svgicon></td>\n </tr>\n <tr>\n <th scope=\"row\">First Name</th>\n <td>{{UserRecord.FirstName}}</td>\n </tr>\n <tr>\n <th scope=\"row\">Last Name</th>\n <td>{{UserRecord.LastName}}</td>\n </tr>\n <tr>\n <th scope=\"row\">Title</th>\n <td>{{UserRecord.Title}}</td>\n </tr>\n <tr>\n <th scope=\"row\">Email</th>\n <td>{{UserRecord.Email}}</td>\n </tr>\n <tr>\n <th scope=\"row\">Type</th>\n <td>{{UserRecord.Type}}</td>\n </tr>\n <tr>\n <th scope=\"row\">Is Active</th>\n <td>{{UserRecord.IsActive}}</td>\n </tr>\n </tbody>\n </table> \n <mj-tabstrip>\n <mj-tab [TabSelected]=\"true\">\n Roles\n </mj-tab>\n <mj-tab-body>\n <mj-user-roles-grid Mode=\"Users\" [UserID]=\"UserID\" [UserRecord]=\"UserRecord\"></mj-user-roles-grid>\n </mj-tab-body>\n\n <mj-tab>\n Views\n </mj-tab> \n <mj-tab-body> \n <div class=\"content\">\n <mj-user-view-grid *ngIf=\"UserViewsParams\" [Params]=\"UserViewsParams\"></mj-user-view-grid>\n </div>\n </mj-tab-body>\n </mj-tabstrip>\n </div>\n</div>\n\n\n<mj-entity-form-dialog #entityForm \n [Record]=\"UserRecord\" \n SectionName=\"details\" \n Mode=\"section\" \n [Visible]=\"showEntityEditingForm\" \n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (close)=\"onEntityFormClosed($event)\">\n</mj-entity-form-dialog>\n", styles: ["button {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.name {\n font-weight: bold;\n font-size: 20px;\n margin-left: 5px;\n margin-top: 5px;\n}\n\n.info-table {\n width: 100%; /* Take up the full width of the container */\n border-collapse: collapse; /* For a cleaner look */\n margin-bottom: 10px;\n}\n\n.info-table th {\n width: 150px; /* Adjust this fixed width as needed */\n font-weight: bold; /* Make header labels bold */\n text-align: left; /* Align text to the left */\n padding: 8px; /* Add some padding for spacing */\n border: none; /* Removes the borders */\n background-color: transparent; /* Removes any background color */\n}\n\n.info-table td {\n text-align: left; /* Align text to the left */\n padding: 8px; /* Add some padding for spacing */\n border: none; /* Removes the borders */\n background-color: transparent; /* Removes any background color */\n overflow: hidden; /* Prevents content from overflowing */\n text-overflow: ellipsis; /* Adds an ellipsis if the text overflows */\n}\n\n/* Style for SVG icon */\n.edit-icon {\n margin-left: 20px; \n vertical-align: middle;;\n cursor: pointer; /* Changes the cursor to a pointer */\n}\n\n.edit-icon:hover {\n fill: #007bff; /* Changes the color on hover, set to the color you prefer */\n}"] }]
|
|
178
178
|
}], () => [{ type: i0.ChangeDetectorRef }], { UserID: [{
|
|
179
179
|
type: Input
|
|
180
180
|
}], entityFormComponent: [{
|
|
181
181
|
type: ViewChild,
|
|
182
182
|
args: ['entityForm']
|
|
183
183
|
}] }); })();
|
|
184
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleUserComponent, { className: "SingleUserComponent", filePath: "src
|
|
184
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleUserComponent, { className: "SingleUserComponent", filePath: "src/lib/single-user/single-user.component.ts", lineNumber: 14 }); })();
|
|
@@ -302,10 +302,10 @@ UserRolesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: User
|
|
|
302
302
|
i0.ɵɵproperty("ngIf", ctx.isLoading);
|
|
303
303
|
i0.ɵɵadvance();
|
|
304
304
|
i0.ɵɵproperty("ngIf", !ctx.isLoading);
|
|
305
|
-
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.CheckboxControlValueAccessor, i3.NgControlStatus, i3.NgModel, i4.ButtonComponent, i5.LoaderComponent], styles: ["button[_ngcontent-%COMP%] {\
|
|
305
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.CheckboxControlValueAccessor, i3.NgControlStatus, i3.NgModel, i4.ButtonComponent, i5.LoaderComponent], styles: ["button[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n\n\n.grid[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n border-collapse: collapse;\n}\n\n\n\n.grid[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: #f2f2f2;\n color: black;\n font-weight: bold;\n text-align: center;\n border: 1px solid gray;\n padding: 0 8px;\n cursor: pointer;\n}\n\n\n\n.grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n border: 1px solid gray;\n height: 36px;\n text-align: center;\n padding: 0 8px;\n}\n\n\n\n.grid[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, .grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\n min-width: 150px;\n text-align: left;\n}\n\n\n\n.grid[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(:first-child), .grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(:first-child) {\n width: 100px;\n}\n\n\n\n.grid[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd) {\n background-color: white;\n}\n\n.grid[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: #e7f4ff;\n}"] });
|
|
306
306
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserRolesGridComponent, [{
|
|
307
307
|
type: Component,
|
|
308
|
-
args: [{ selector: 'mj-user-roles-grid', template: "<div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\
|
|
308
|
+
args: [{ selector: 'mj-user-roles-grid', template: "<div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\n<div class=\"content\" *ngIf=\"!isLoading\">\n <button [disabled]=\"NumDirty === 0\" kendoButton (click)=\"saveUserRoles()\">Save</button>\n <button [disabled]=\"NumDirty === 0\" kendoButton (click)=\"cancelEdit()\">Cancel</button>\n <table *ngIf=\"!isLoading\" class=\"grid\">\n <thead>\n <tr>\n <th *ngIf=\"Mode === 'Roles'\">User</th>\n <th *ngIf=\"Mode === 'Users'\">Role</th>\n <th (click)=\"flipAll()\">In Role</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let ur of userRoles\">\n <td *ngIf=\"Mode === 'Roles'\">{{ ur.User }}</td>\n <td *ngIf=\"Mode === 'Users'\">{{ ur.RoleName }}</td>\n <td (click)=\"flipState($event, ur, true)\">\n <input type=\"checkbox\" kendoCheckBox [(ngModel)]=\"ur.Selected\" (click)=\"flipState($event, ur, false)\">\n </td>\n </tr>\n </tbody>\n </table> \n</div>", styles: ["button {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n/* Styles for the table with the 'grid' class */\n.grid {\n margin-left: 5px;\n margin-top: 5px;\n border-collapse: collapse;\n}\n\n/* Styles for th elements within the table with the 'grid' class */\n.grid th {\n background-color: #f2f2f2;\n color: black;\n font-weight: bold;\n text-align: center;\n border: 1px solid gray;\n padding: 0 8px;\n cursor: pointer;\n}\n\n/* Styles for td elements within the table with the 'grid' class */\n.grid td {\n border: 1px solid gray;\n height: 36px;\n text-align: center;\n padding: 0 8px;\n}\n\n/* Styles for the first child th and td within the table with the 'grid' class */\n.grid th:first-child,\n.grid td:first-child {\n min-width: 150px;\n text-align: left;\n}\n\n/* Styles for non-first-child th and td elements within the table with the 'grid' class */\n.grid th:not(:first-child),\n.grid td:not(:first-child) {\n width: 100px;\n}\n\n/* Alternating row background colors for the table with the 'grid' class */\n.grid tr:nth-child(odd) {\n background-color: white;\n}\n\n.grid tr:nth-child(even) {\n background-color: #e7f4ff;\n}\n\n"] }]
|
|
309
309
|
}], () => [{ type: i1.Router }], { RoleName: [{
|
|
310
310
|
type: Input
|
|
311
311
|
}], UserID: [{
|
|
@@ -317,4 +317,4 @@ UserRolesGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: User
|
|
|
317
317
|
}], UserRecord: [{
|
|
318
318
|
type: Input
|
|
319
319
|
}] }); })();
|
|
320
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserRolesGridComponent, { className: "UserRolesGridComponent", filePath: "src
|
|
320
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserRolesGridComponent, { className: "UserRolesGridComponent", filePath: "src/lib/user-roles-grid/user-roles-grid.component.ts", lineNumber: 16 }); })();
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@memberjunction/ng-explorer-settings",
|
|
3
|
-
"version": "1.0.
|
|
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": "^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
|
-
"@memberjunction/ng-entity-permissions": "^1.0.
|
|
34
|
-
"@memberjunction/ng-base-forms": "^1.0.
|
|
35
|
-
"@memberjunction/ng-entity-form-dialog": "^1.0.
|
|
36
|
-
"@memberjunction/ng-user-view-grid": "^1.0.
|
|
37
|
-
"@memberjunction/ng-simple-record-list": "^1.0.
|
|
38
|
-
"@memberjunction/ng-tabstrip": "^1.0.
|
|
39
|
-
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
40
|
-
"@progress/kendo-angular-grid": "~15.1.0",
|
|
41
|
-
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
42
|
-
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
43
|
-
"@progress/kendo-angular-layout": "~15.1.0",
|
|
44
|
-
"@progress/kendo-angular-indicators": "~15.1.0",
|
|
45
|
-
"tslib": "^2.3.0"
|
|
46
|
-
},
|
|
47
|
-
"sideEffects": false
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-explorer-settings",
|
|
3
|
+
"version": "1.0.7-next.0",
|
|
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": "^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
|
+
"@memberjunction/ng-entity-permissions": "^1.0.7-next.0",
|
|
34
|
+
"@memberjunction/ng-base-forms": "^1.0.7-next.0",
|
|
35
|
+
"@memberjunction/ng-entity-form-dialog": "^1.0.7-next.0",
|
|
36
|
+
"@memberjunction/ng-user-view-grid": "^1.0.7-next.0",
|
|
37
|
+
"@memberjunction/ng-simple-record-list": "^1.0.7-next.0",
|
|
38
|
+
"@memberjunction/ng-tabstrip": "^1.0.7-next.0",
|
|
39
|
+
"@progress/kendo-angular-dropdowns": "~15.1.0",
|
|
40
|
+
"@progress/kendo-angular-grid": "~15.1.0",
|
|
41
|
+
"@progress/kendo-angular-buttons": "~15.1.0",
|
|
42
|
+
"@progress/kendo-angular-dialog": "~15.1.0",
|
|
43
|
+
"@progress/kendo-angular-layout": "~15.1.0",
|
|
44
|
+
"@progress/kendo-angular-indicators": "~15.1.0",
|
|
45
|
+
"tslib": "^2.3.0"
|
|
46
|
+
},
|
|
47
|
+
"sideEffects": false
|
|
48
|
+
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef, EventEmitter } from '@angular/core';
|
|
2
|
-
import { BaseEntity } from '@memberjunction/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class EntityFormDialog {
|
|
5
|
-
/**
|
|
6
|
-
* The title of the dialog
|
|
7
|
-
*/
|
|
8
|
-
Title: string;
|
|
9
|
-
ShowSaveButton: boolean;
|
|
10
|
-
ShowCancelButton: boolean;
|
|
11
|
-
Width: number;
|
|
12
|
-
Height: number;
|
|
13
|
-
Mode: 'complete' | 'section';
|
|
14
|
-
SectionName: string;
|
|
15
|
-
Record: BaseEntity | null;
|
|
16
|
-
/**
|
|
17
|
-
* If true, when the user clicks the Save button, the Record will be saved. Only applicable if ShowSaveButton is true.
|
|
18
|
-
*/
|
|
19
|
-
HandleSave: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* If true, when the user clicks the Cancel button, the Record will be reverted to its original state. Only applicable if ShowCancelButton is true.
|
|
22
|
-
*/
|
|
23
|
-
AutoRevertOnCancel: boolean;
|
|
24
|
-
close: EventEmitter<'Save' | 'Cancel'>;
|
|
25
|
-
private _visible;
|
|
26
|
-
set Visible(val: boolean);
|
|
27
|
-
get Visible(): boolean;
|
|
28
|
-
container: ViewContainerRef;
|
|
29
|
-
showForm(): void;
|
|
30
|
-
closeWindow(status: 'Save' | 'Cancel'): Promise<void>;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EntityFormDialog, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EntityFormDialog, "mj-entity-form-dialog", never, { "Title": { "alias": "Title"; "required": false; }; "ShowSaveButton": { "alias": "ShowSaveButton"; "required": false; }; "ShowCancelButton": { "alias": "ShowCancelButton"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "Height": { "alias": "Height"; "required": false; }; "Mode": { "alias": "Mode"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "Record": { "alias": "Record"; "required": false; }; "HandleSave": { "alias": "HandleSave"; "required": false; }; "AutoRevertOnCancel": { "alias": "AutoRevertOnCancel"; "required": false; }; "Visible": { "alias": "Visible"; "required": false; }; }, { "close": "close"; }, never, never, false, never>;
|
|
33
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Component, Input, Output, ViewChild, ViewContainerRef, EventEmitter } from '@angular/core';
|
|
11
|
-
import { SharedService } from '@memberjunction/ng-shared';
|
|
12
|
-
import { MJGlobal } from '@memberjunction/global';
|
|
13
|
-
import { BaseFormComponent, BaseFormSectionComponent } from '@memberjunction/ng-base-forms';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "@angular/common";
|
|
16
|
-
import * as i2 from "@progress/kendo-angular-dialog";
|
|
17
|
-
import * as i3 from "@progress/kendo-angular-buttons";
|
|
18
|
-
const _c0 = ["dynamicFormContainer"];
|
|
19
|
-
function EntityFormDialog_kendo_dialog_0_ng_template_1_Template(rf, ctx) { }
|
|
20
|
-
function EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
-
const _r7 = i0.ɵɵgetCurrentView();
|
|
22
|
-
i0.ɵɵelementStart(0, "button", 6);
|
|
23
|
-
i0.ɵɵlistener("click", function EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r6.closeWindow("Save")); });
|
|
24
|
-
i0.ɵɵtext(1, "Save");
|
|
25
|
-
i0.ɵɵelementEnd();
|
|
26
|
-
} }
|
|
27
|
-
function EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
-
const _r9 = i0.ɵɵgetCurrentView();
|
|
29
|
-
i0.ɵɵelementStart(0, "button", 7);
|
|
30
|
-
i0.ɵɵlistener("click", function EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r8.closeWindow("Cancel")); });
|
|
31
|
-
i0.ɵɵtext(1, "Cancel");
|
|
32
|
-
i0.ɵɵelementEnd();
|
|
33
|
-
} }
|
|
34
|
-
function EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
-
i0.ɵɵelementStart(0, "kendo-dialog-actions");
|
|
36
|
-
i0.ɵɵtemplate(1, EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_button_1_Template, 2, 0, "button", 4)(2, EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_button_2_Template, 2, 0, "button", 5);
|
|
37
|
-
i0.ɵɵelementEnd();
|
|
38
|
-
} if (rf & 2) {
|
|
39
|
-
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
40
|
-
i0.ɵɵadvance();
|
|
41
|
-
i0.ɵɵproperty("ngIf", ctx_r3.ShowSaveButton);
|
|
42
|
-
i0.ɵɵadvance();
|
|
43
|
-
i0.ɵɵproperty("ngIf", ctx_r3.ShowCancelButton);
|
|
44
|
-
} }
|
|
45
|
-
function EntityFormDialog_kendo_dialog_0_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
-
const _r11 = i0.ɵɵgetCurrentView();
|
|
47
|
-
i0.ɵɵelementStart(0, "kendo-dialog", 1);
|
|
48
|
-
i0.ɵɵlistener("close", function EntityFormDialog_kendo_dialog_0_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.closeWindow("Cancel")); });
|
|
49
|
-
i0.ɵɵtemplate(1, EntityFormDialog_kendo_dialog_0_ng_template_1_Template, 0, 0, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(3, EntityFormDialog_kendo_dialog_0_kendo_dialog_actions_3_Template, 3, 2, "kendo-dialog-actions", 3);
|
|
50
|
-
i0.ɵɵelementEnd();
|
|
51
|
-
} if (rf & 2) {
|
|
52
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
53
|
-
i0.ɵɵproperty("title", ctx_r0.Title)("width", ctx_r0.Width)("height", ctx_r0.Height);
|
|
54
|
-
i0.ɵɵadvance(3);
|
|
55
|
-
i0.ɵɵproperty("ngIf", ctx_r0.ShowSaveButton || ctx_r0.ShowCancelButton);
|
|
56
|
-
} }
|
|
57
|
-
export class EntityFormDialog {
|
|
58
|
-
constructor() {
|
|
59
|
-
/**
|
|
60
|
-
* The title of the dialog
|
|
61
|
-
*/
|
|
62
|
-
this.Title = '';
|
|
63
|
-
this.ShowSaveButton = true;
|
|
64
|
-
this.ShowCancelButton = true;
|
|
65
|
-
this.Width = 800;
|
|
66
|
-
this.Height = 600;
|
|
67
|
-
this.Mode = 'complete';
|
|
68
|
-
this.SectionName = '';
|
|
69
|
-
this.Record = null;
|
|
70
|
-
/**
|
|
71
|
-
* If true, when the user clicks the Save button, the Record will be saved. Only applicable if ShowSaveButton is true.
|
|
72
|
-
*/
|
|
73
|
-
this.HandleSave = true;
|
|
74
|
-
/**
|
|
75
|
-
* If true, when the user clicks the Cancel button, the Record will be reverted to its original state. Only applicable if ShowCancelButton is true.
|
|
76
|
-
*/
|
|
77
|
-
this.AutoRevertOnCancel = true;
|
|
78
|
-
this.close = new EventEmitter();
|
|
79
|
-
this._visible = false;
|
|
80
|
-
}
|
|
81
|
-
set Visible(val) {
|
|
82
|
-
this._visible = val;
|
|
83
|
-
if (val) {
|
|
84
|
-
Promise.resolve().then(() => {
|
|
85
|
-
// At this point, the DOM should be updated, and `this.container` should be available.
|
|
86
|
-
this.showForm();
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
get Visible() {
|
|
91
|
-
return this._visible;
|
|
92
|
-
}
|
|
93
|
-
showForm() {
|
|
94
|
-
var _a, _b;
|
|
95
|
-
if (!this.container)
|
|
96
|
-
throw new Error('Container not found');
|
|
97
|
-
if (!this.Record)
|
|
98
|
-
throw new Error('Record is a required property');
|
|
99
|
-
// Ensure the container is clear before inserting a new component
|
|
100
|
-
this.container.clear();
|
|
101
|
-
// here we want to grab the right type of object to instantiate based on the settings either mode of complete or section
|
|
102
|
-
// if section, we grab a sub-class of BaseFormSectionComponent, if complete, we grab a sub-class of the BaseForComponent class
|
|
103
|
-
let reg;
|
|
104
|
-
if (this.Mode === 'complete') {
|
|
105
|
-
reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormComponent, (_a = this.Record) === null || _a === void 0 ? void 0 : _a.EntityInfo.Name);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormSectionComponent, ((_b = this.Record) === null || _b === void 0 ? void 0 : _b.EntityInfo.Name) + '.' + this.SectionName);
|
|
109
|
-
}
|
|
110
|
-
if (reg && reg.SubClass) {
|
|
111
|
-
// we have our class registration
|
|
112
|
-
const component = this.container.createComponent(reg.SubClass);
|
|
113
|
-
if (this.Record && component.instance instanceof BaseFormSectionComponent) {
|
|
114
|
-
component.instance.record = this.Record;
|
|
115
|
-
component.instance.EditMode = true;
|
|
116
|
-
}
|
|
117
|
-
else if (this.Record && component.instance instanceof BaseFormComponent) {
|
|
118
|
-
component.instance.record = this.Record;
|
|
119
|
-
component.instance.EditMode = true;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
closeWindow(status) {
|
|
124
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
this.Visible = false;
|
|
126
|
-
if (this.Record) {
|
|
127
|
-
if (this.HandleSave && status === 'Save') {
|
|
128
|
-
if (!(yield this.Record.Save())) {
|
|
129
|
-
SharedService.Instance.CreateSimpleNotification(`Error saving ${this.Record.EntityInfo.Name} record, rolling back changes`, 'error');
|
|
130
|
-
this.Record.Revert();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (this.AutoRevertOnCancel && status === 'Cancel') {
|
|
134
|
-
this.Record.Revert();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
this.close.emit(status);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
EntityFormDialog.ɵfac = function EntityFormDialog_Factory(t) { return new (t || EntityFormDialog)(); };
|
|
142
|
-
EntityFormDialog.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityFormDialog, selectors: [["mj-entity-form-dialog"]], viewQuery: function EntityFormDialog_Query(rf, ctx) { if (rf & 1) {
|
|
143
|
-
i0.ɵɵviewQuery(_c0, 5, ViewContainerRef);
|
|
144
|
-
} if (rf & 2) {
|
|
145
|
-
let _t;
|
|
146
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);
|
|
147
|
-
} }, inputs: { Title: "Title", ShowSaveButton: "ShowSaveButton", ShowCancelButton: "ShowCancelButton", Width: "Width", Height: "Height", Mode: "Mode", SectionName: "SectionName", Record: "Record", HandleSave: "HandleSave", AutoRevertOnCancel: "AutoRevertOnCancel", Visible: "Visible" }, outputs: { close: "close" }, decls: 1, vars: 1, consts: [[3, "title", "width", "height", "close", 4, "ngIf"], [3, "title", "width", "height", "close"], ["dynamicFormContainer", ""], [4, "ngIf"], ["kendoButton", "", "themeColor", "primary", 3, "click", 4, "ngIf"], ["kendoButton", "", 3, "click", 4, "ngIf"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function EntityFormDialog_Template(rf, ctx) { if (rf & 1) {
|
|
148
|
-
i0.ɵɵtemplate(0, EntityFormDialog_kendo_dialog_0_Template, 4, 4, "kendo-dialog", 0);
|
|
149
|
-
} if (rf & 2) {
|
|
150
|
-
i0.ɵɵproperty("ngIf", ctx.Visible);
|
|
151
|
-
} }, dependencies: [i1.NgIf, i2.DialogComponent, i2.DialogActionsComponent, i3.ButtonComponent] });
|
|
152
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityFormDialog, [{
|
|
153
|
-
type: Component,
|
|
154
|
-
args: [{ selector: 'mj-entity-form-dialog', template: "<kendo-dialog *ngIf=\"Visible\" \r\n [title]=\"Title\" \r\n [width]=\"Width\"\r\n [height]=\"Height\"\r\n (close)=\"closeWindow('Cancel')\" >\r\n <ng-template #dynamicFormContainer></ng-template>\r\n <kendo-dialog-actions *ngIf=\"ShowSaveButton || ShowCancelButton\">\r\n <button *ngIf=\"ShowSaveButton\" kendoButton (click)=\"closeWindow('Save')\" themeColor=\"primary\">Save</button>\r\n <button *ngIf=\"ShowCancelButton\" kendoButton (click)=\"closeWindow('Cancel')\">Cancel</button>\r\n </kendo-dialog-actions>\r\n</kendo-dialog>" }]
|
|
155
|
-
}], null, { Title: [{
|
|
156
|
-
type: Input
|
|
157
|
-
}], ShowSaveButton: [{
|
|
158
|
-
type: Input
|
|
159
|
-
}], ShowCancelButton: [{
|
|
160
|
-
type: Input
|
|
161
|
-
}], Width: [{
|
|
162
|
-
type: Input
|
|
163
|
-
}], Height: [{
|
|
164
|
-
type: Input
|
|
165
|
-
}], Mode: [{
|
|
166
|
-
type: Input
|
|
167
|
-
}], SectionName: [{
|
|
168
|
-
type: Input
|
|
169
|
-
}], Record: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], HandleSave: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], AutoRevertOnCancel: [{
|
|
174
|
-
type: Input
|
|
175
|
-
}], close: [{
|
|
176
|
-
type: Output
|
|
177
|
-
}], Visible: [{
|
|
178
|
-
type: Input
|
|
179
|
-
}], container: [{
|
|
180
|
-
type: ViewChild,
|
|
181
|
-
args: ['dynamicFormContainer', { read: ViewContainerRef }]
|
|
182
|
-
}] }); })();
|
|
183
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityFormDialog, { className: "EntityFormDialog", filePath: "src\\lib\\entity-form-dialog\\entity-form-dialog.component.ts", lineNumber: 15 }); })();
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef, EventEmitter } from '@angular/core';
|
|
2
|
-
import { BaseEntity } from '@memberjunction/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class EntityFormWindow {
|
|
5
|
-
Mode: 'complete' | 'section';
|
|
6
|
-
SectionName: string;
|
|
7
|
-
Record: BaseEntity | null;
|
|
8
|
-
close: EventEmitter<void>;
|
|
9
|
-
private _visible;
|
|
10
|
-
set Visible(val: boolean);
|
|
11
|
-
get Visible(): boolean;
|
|
12
|
-
container: ViewContainerRef;
|
|
13
|
-
showForm(): void;
|
|
14
|
-
closeWindow(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EntityFormWindow, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EntityFormWindow, "mj-entity-form-window", never, { "Mode": { "alias": "Mode"; "required": false; }; "SectionName": { "alias": "SectionName"; "required": false; }; "Record": { "alias": "Record"; "required": false; }; "Visible": { "alias": "Visible"; "required": false; }; }, { "close": "close"; }, never, never, false, never>;
|
|
17
|
-
}
|