@memberjunction/ng-resource-permissions 2.48.0 → 2.49.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.
@@ -1,12 +1,3 @@
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
1
  import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
11
2
  import { RunView } from '@memberjunction/core';
12
3
  import { ResourcePermissionEngine } from '@memberjunction/core-entities';
@@ -52,20 +43,19 @@ function AvailableResourcesComponent_Conditional_1_Template(rf, ctx) { if (rf &
52
43
  * This component displays a list of available resources for a user for a specific Resource Type.
53
44
  */
54
45
  export class AvailableResourcesComponent extends BaseAngularComponent {
55
- constructor() {
56
- super(...arguments);
57
- this.SelectionMode = 'Single';
58
- /**
59
- * Optional, comma-delimited list of field names to provide extra columns here to display in the grid. These columns will be displayed after the Name of the resource
60
- */
61
- this.ExtraColumns = "";
62
- this.SelectedResources = [];
63
- this.SelectionChanged = new EventEmitter();
64
- this.gridRecordSelection = [];
65
- this.gridExtraColumns = [];
66
- this.resourcePermissions = [];
67
- this.resources = [];
68
- }
46
+ User;
47
+ ResourceTypeID;
48
+ ResourceExtraFilter;
49
+ SelectionMode = 'Single';
50
+ /**
51
+ * Optional, comma-delimited list of field names to provide extra columns here to display in the grid. These columns will be displayed after the Name of the resource
52
+ */
53
+ ExtraColumns = "";
54
+ SelectedResources = [];
55
+ SelectionChanged = new EventEmitter();
56
+ gridRecordSelection = [];
57
+ gridExtraColumns = [];
58
+ resourcesGrid;
69
59
  onSelectionChange(e) {
70
60
  this.SelectedResources.splice(0, this.SelectedResources.length); // empty the array
71
61
  this.gridRecordSelection.forEach((item) => {
@@ -77,82 +67,80 @@ export class AvailableResourcesComponent extends BaseAngularComponent {
77
67
  // now bubble up the event
78
68
  this.SelectionChanged.emit(this.SelectedResources);
79
69
  }
80
- ngAfterViewInit() {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- yield this.Refresh();
83
- });
70
+ resourcePermissions = [];
71
+ resources = [];
72
+ async ngAfterViewInit() {
73
+ await this.Refresh();
84
74
  }
85
75
  /**
86
76
  * This method will refresh the contents of the component based on the current state of the component.
87
77
  */
88
- Refresh() {
89
- return __awaiter(this, void 0, void 0, function* () {
90
- if (!this.User) {
91
- throw new Error('User is a required property for the AvailableResourcesDialogComponent');
92
- }
93
- // load up the current permissions for the specified ResourceTypeID and user
94
- yield ResourcePermissionEngine.Instance.Config();
95
- // now we can get the permissions for the specified resource
96
- this.resourcePermissions = ResourcePermissionEngine.Instance.GetUserAvailableResources(this.User, this.ResourceTypeID);
97
- if (this.resourcePermissions.length === 0) {
98
- this.resources = [];
99
- }
100
- else {
101
- const rt = ResourcePermissionEngine.Instance.ResourceTypes.find(rt => rt.ID === this.ResourceTypeID);
102
- if (!rt || !rt.EntityID)
103
- throw new Error(`Resource Type ${this.ResourceTypeID} not found`);
104
- const p = this.ProviderToUse;
105
- const entity = p.Entities.find(e => e.ID === rt.EntityID);
106
- if (!entity || !entity.NameField)
107
- throw new Error(`Entity ${rt.EntityID} not found, or no Name field defined`);
108
- const rv = new RunView(this.RunViewToUse);
109
- const nameField = entity.NameField;
110
- if (this.ExtraColumns && this.ExtraColumns.length > 0) {
111
- /// split the comma delim string and for each item find it in the EntityFields collection
112
- const extraColumns = this.ExtraColumns.split(',');
113
- this.gridExtraColumns = [];
114
- extraColumns.forEach((ec) => {
115
- const field = entity.Fields.find((f) => f.Name.trim().toLowerCase() === ec.trim().toLowerCase());
116
- if (field)
117
- this.gridExtraColumns.push(field);
118
- });
119
- }
120
- const extraFilter = this.ResourceExtraFilter ? ` AND (${this.ResourceExtraFilter})` : '';
121
- const result = yield rv.RunView({
122
- EntityName: entity.Name,
123
- ExtraFilter: `(ID in (${this.resourcePermissions.map((r) => `'${r.ResourceRecordID}'`).join(',')})${extraFilter})`,
124
- OrderBy: nameField.Name
125
- });
126
- if (!result || !result.Success)
127
- throw new Error(`Error running view for entity ${entity.Name}`);
128
- // only return rows where we have a record in result.Results
129
- this.resources = result.Results.map((r) => {
130
- return new ResourceData({
131
- ResourceRecordID: r.ID,
132
- Name: r[nameField.Name],
133
- ResourceTypeID: this.ResourceTypeID,
134
- ResourceType: rt.Name,
135
- Configuration: r // pass the whole resource record into configuration so it is accessible as desired
136
- });
78
+ async Refresh() {
79
+ if (!this.User) {
80
+ throw new Error('User is a required property for the AvailableResourcesDialogComponent');
81
+ }
82
+ // load up the current permissions for the specified ResourceTypeID and user
83
+ await ResourcePermissionEngine.Instance.Config();
84
+ // now we can get the permissions for the specified resource
85
+ this.resourcePermissions = ResourcePermissionEngine.Instance.GetUserAvailableResources(this.User, this.ResourceTypeID);
86
+ if (this.resourcePermissions.length === 0) {
87
+ this.resources = [];
88
+ }
89
+ else {
90
+ const rt = ResourcePermissionEngine.Instance.ResourceTypes.find(rt => rt.ID === this.ResourceTypeID);
91
+ if (!rt || !rt.EntityID)
92
+ throw new Error(`Resource Type ${this.ResourceTypeID} not found`);
93
+ const p = this.ProviderToUse;
94
+ const entity = p.Entities.find(e => e.ID === rt.EntityID);
95
+ if (!entity || !entity.NameField)
96
+ throw new Error(`Entity ${rt.EntityID} not found, or no Name field defined`);
97
+ const rv = new RunView(this.RunViewToUse);
98
+ const nameField = entity.NameField;
99
+ if (this.ExtraColumns && this.ExtraColumns.length > 0) {
100
+ /// split the comma delim string and for each item find it in the EntityFields collection
101
+ const extraColumns = this.ExtraColumns.split(',');
102
+ this.gridExtraColumns = [];
103
+ extraColumns.forEach((ec) => {
104
+ const field = entity.Fields.find((f) => f.Name.trim().toLowerCase() === ec.trim().toLowerCase());
105
+ if (field)
106
+ this.gridExtraColumns.push(field);
137
107
  });
138
108
  }
139
- });
109
+ const extraFilter = this.ResourceExtraFilter ? ` AND (${this.ResourceExtraFilter})` : '';
110
+ const result = await rv.RunView({
111
+ EntityName: entity.Name,
112
+ ExtraFilter: `(ID in (${this.resourcePermissions.map((r) => `'${r.ResourceRecordID}'`).join(',')})${extraFilter})`,
113
+ OrderBy: nameField.Name
114
+ });
115
+ if (!result || !result.Success)
116
+ throw new Error(`Error running view for entity ${entity.Name}`);
117
+ // only return rows where we have a record in result.Results
118
+ this.resources = result.Results.map((r) => {
119
+ return new ResourceData({
120
+ ResourceRecordID: r.ID,
121
+ Name: r[nameField.Name],
122
+ ResourceTypeID: this.ResourceTypeID,
123
+ ResourceType: rt.Name,
124
+ Configuration: r // pass the whole resource record into configuration so it is accessible as desired
125
+ });
126
+ });
127
+ }
140
128
  }
129
+ static ɵfac = /*@__PURE__*/ (() => { let ɵAvailableResourcesComponent_BaseFactory; return function AvailableResourcesComponent_Factory(t) { return (ɵAvailableResourcesComponent_BaseFactory || (ɵAvailableResourcesComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AvailableResourcesComponent)))(t || AvailableResourcesComponent); }; })();
130
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AvailableResourcesComponent, selectors: [["mj-available-resources"]], viewQuery: function AvailableResourcesComponent_Query(rf, ctx) { if (rf & 1) {
131
+ i0.ɵɵviewQuery(_c0, 5);
132
+ } if (rf & 2) {
133
+ let _t;
134
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.resourcesGrid = _t.first);
135
+ } }, inputs: { User: "User", ResourceTypeID: "ResourceTypeID", ResourceExtraFilter: "ResourceExtraFilter", SelectionMode: "SelectionMode", ExtraColumns: "ExtraColumns", SelectedResources: "SelectedResources" }, outputs: { SelectionChanged: "SelectionChanged" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [["resourcesGrid", ""], [1, "container"], ["kendoGridSelectBy", "ResourceRecordID", 2, "width", "100%", "max-height", "400px", 3, "data", "selectable", "selectedKeys"], ["kendoGridSelectBy", "ResourceRecordID", 2, "width", "100%", "max-height", "400px", 3, "selectionChange", "selectedKeysChange", "data", "selectable", "selectedKeys"], ["field", "Name", "title", "Name", 3, "width"], [3, "title"], ["kendoGridCellTemplate", ""]], template: function AvailableResourcesComponent_Template(rf, ctx) { if (rf & 1) {
136
+ i0.ɵɵelementStart(0, "div", 1);
137
+ i0.ɵɵtemplate(1, AvailableResourcesComponent_Conditional_1_Template, 5, 6, "kendo-grid", 2);
138
+ i0.ɵɵelementEnd();
139
+ } if (rf & 2) {
140
+ i0.ɵɵadvance();
141
+ i0.ɵɵconditional(ctx.User ? 1 : -1);
142
+ } }, dependencies: [i1.GridComponent, i1.SelectionDirective, i1.ColumnComponent, i1.CellTemplateDirective], styles: ["\n\n.container[_ngcontent-%COMP%] {\n max-width: 100%;\n }\n \n h3[_ngcontent-%COMP%] {\n margin-bottom: 15px;\n font-size: 1.5em;\n color: #333;\n }\n \n \n\n kendo-grid[_ngcontent-%COMP%] {\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n }\n \n kendo-grid-header[_ngcontent-%COMP%] {\n background-color: #f4f4f4;\n font-weight: bold;\n position: sticky;\n top: 0;\n z-index: 1;\n }\n \n kendo-grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 12px;\n border-bottom: 1px solid #ddd;\n cursor: pointer;\n }"] });
141
143
  }
142
- AvailableResourcesComponent.ɵfac = /*@__PURE__*/ (() => { let ɵAvailableResourcesComponent_BaseFactory; return function AvailableResourcesComponent_Factory(t) { return (ɵAvailableResourcesComponent_BaseFactory || (ɵAvailableResourcesComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AvailableResourcesComponent)))(t || AvailableResourcesComponent); }; })();
143
- AvailableResourcesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AvailableResourcesComponent, selectors: [["mj-available-resources"]], viewQuery: function AvailableResourcesComponent_Query(rf, ctx) { if (rf & 1) {
144
- i0.ɵɵviewQuery(_c0, 5);
145
- } if (rf & 2) {
146
- let _t;
147
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.resourcesGrid = _t.first);
148
- } }, inputs: { User: "User", ResourceTypeID: "ResourceTypeID", ResourceExtraFilter: "ResourceExtraFilter", SelectionMode: "SelectionMode", ExtraColumns: "ExtraColumns", SelectedResources: "SelectedResources" }, outputs: { SelectionChanged: "SelectionChanged" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [["resourcesGrid", ""], [1, "container"], ["kendoGridSelectBy", "ResourceRecordID", 2, "width", "100%", "max-height", "400px", 3, "data", "selectable", "selectedKeys"], ["kendoGridSelectBy", "ResourceRecordID", 2, "width", "100%", "max-height", "400px", 3, "selectionChange", "selectedKeysChange", "data", "selectable", "selectedKeys"], ["field", "Name", "title", "Name", 3, "width"], [3, "title"], ["kendoGridCellTemplate", ""]], template: function AvailableResourcesComponent_Template(rf, ctx) { if (rf & 1) {
149
- i0.ɵɵelementStart(0, "div", 1);
150
- i0.ɵɵtemplate(1, AvailableResourcesComponent_Conditional_1_Template, 5, 6, "kendo-grid", 2);
151
- i0.ɵɵelementEnd();
152
- } if (rf & 2) {
153
- i0.ɵɵadvance();
154
- i0.ɵɵconditional(ctx.User ? 1 : -1);
155
- } }, dependencies: [i1.GridComponent, i1.SelectionDirective, i1.ColumnComponent, i1.CellTemplateDirective], styles: ["\n\n.container[_ngcontent-%COMP%] {\n max-width: 100%;\n }\n \n h3[_ngcontent-%COMP%] {\n margin-bottom: 15px;\n font-size: 1.5em;\n color: #333;\n }\n \n \n\n kendo-grid[_ngcontent-%COMP%] {\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n }\n \n kendo-grid-header[_ngcontent-%COMP%] {\n background-color: #f4f4f4;\n font-weight: bold;\n position: sticky;\n top: 0;\n z-index: 1;\n }\n \n kendo-grid[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 12px;\n border-bottom: 1px solid #ddd;\n cursor: pointer;\n }"] });
156
144
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AvailableResourcesComponent, [{
157
145
  type: Component,
158
146
  args: [{ selector: 'mj-available-resources', template: "<div class=\"container\">\n @if (User) {\n <kendo-grid\n #resourcesGrid\n [data]=\"resources\"\n [selectable]=\"{ mode: SelectionMode.toLowerCase() === 'Single' ? 'single' : 'multiple' }\"\n (selectionChange)=\"onSelectionChange($event)\"\n style=\"width: 100%; max-height: 400px;\"\n kendoGridSelectBy=\"ResourceRecordID\"\n [(selectedKeys)]=\"gridRecordSelection\"\n >\n <kendo-grid-column field=\"Name\" title=\"Name\" [width]=\"225\">\n </kendo-grid-column>\n\n @for (col of gridExtraColumns; track col) {\n <kendo-grid-column [title]=\"col.DisplayNameOrName\">\n <ng-template kendoGridCellTemplate let-dataItem>\n {{ dataItem.Configuration[col.Name] }} \n </ng-template>\n </kendo-grid-column>\n }\n </kendo-grid> \n }\n </div>\n ", styles: ["/* Container styling */\n.container {\n max-width: 100%;\n }\n \n h3 {\n margin-bottom: 15px;\n font-size: 1.5em;\n color: #333;\n }\n \n /* Grid styling */\n kendo-grid {\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n }\n \n kendo-grid-header {\n background-color: #f4f4f4;\n font-weight: bold;\n position: sticky;\n top: 0;\n z-index: 1;\n }\n \n kendo-grid td {\n padding: 12px;\n border-bottom: 1px solid #ddd;\n cursor: pointer;\n }\n "] }]
@@ -1 +1 @@
1
- {"version":3,"file":"available-resources.component.js","sourceRoot":"","sources":["../../src/lib/available-resources.component.ts","../../src/lib/available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jBjB,2BAA2B"}
1
+ {"version":3,"file":"available-resources.component.js","sourceRoot":"","sources":["../../src/lib/available-resources.component.ts","../../src/lib/available-resources.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAmB,OAAO,EAAY,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAA4B,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;ICa7C,YACJ;;;;IADI,uEACJ;;;IAHJ,4CAAmD;IAC/C,gHAAgD;IAGpD,iBAAoB;;;IAJD,gDAA+B;;;;IAb1D,wCAQG;IAJC,6NAAmB,gCAAyB,KAAC;IAG7C,wVAAsC;IAEtC,uCACoB;IAEpB,4IAMC;IACL,iBAAa;;;IAhBT,AADA,uCAAkB,mHACuE;IAIzF,+DAAsC;IAEO,eAAa;IAAb,2BAAa;IAG1D,cAMC;IAND,sCAMC;;ADZb;;GAEG;AAMH,MAAM,OAAO,2BAA6B,SAAQ,oBAAoB;IACzD,IAAI,CAAY;IAChB,cAAc,CAAU;IACxB,mBAAmB,CAAU;IAC7B,aAAa,GAA0B,QAAQ,CAAC;IAEzD;;OAEG;IACM,YAAY,GAAW,EAAE,CAAC;IAE1B,iBAAiB,GAAmB,EAAE,CAAC;IACtC,gBAAgB,GAAG,IAAI,YAAY,EAAkB,CAAC;IAEzD,mBAAmB,GAAa,EAAE,CAAC;IACnC,gBAAgB,GAAsB,EAAE,CAAC;IAEpB,aAAa,CAAiB;IACnD,iBAAiB,CAAC,CAAiB;QACtC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB;QAEnF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KG,YAAY;kBAApB,KAAK;YAEG,iBAAiB;kBAAzB,KAAK;YACI,gBAAgB;kBAAzB,MAAM;YAKqB,aAAa;kBAAxC,SAAS;mBAAC,eAAe;;kFAjBjB,2BAA2B"}
@@ -1,12 +1,3 @@
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
1
  import { Component, EventEmitter, Input, Output } from '@angular/core';
11
2
  import { LogError } from '@memberjunction/core';
12
3
  import { ResourcePermissionEngine } from '@memberjunction/core-entities';
@@ -61,82 +52,87 @@ function RequestResourceAccessComponent_Conditional_11_Template(rf, ctx) { if (r
61
52
  * Use this component to display to the user the ability to request access to a resource they do not own and do not currently have permission to access
62
53
  */
63
54
  export class RequestResourceAccessComponent extends BaseAngularComponent {
64
- constructor() {
65
- super(...arguments);
66
- /**
67
- * Optional, the name of the resource that the user is requesting access to that will be displayed to the user
68
- */
69
- this.ResourceName = "";
70
- /**
71
- * The default value for the permission level
72
- */
73
- this.PermissionLevel = 'View';
74
- /**
75
- * Turn this off to not show the user the permission level drop down which would result in the default value for the PermissionLevel being requested.
76
- */
77
- this.ShowPermissionLevelDropdown = true;
78
- this.AccessRequested = new EventEmitter();
79
- this.AfterRequest = false;
55
+ /**
56
+ * The name of the resource type that the user is requesting access to
57
+ */
58
+ ResourceType;
59
+ /**
60
+ * Optional, the name of the resource that the user is requesting access to that will be displayed to the user
61
+ */
62
+ ResourceName = "";
63
+ /**
64
+ * The resource record ID that the user is requesting access to
65
+ */
66
+ ResourceRecordID;
67
+ /**
68
+ * The default value for the permission level
69
+ */
70
+ PermissionLevel = 'View';
71
+ /**
72
+ * Turn this off to not show the user the permission level drop down which would result in the default value for the PermissionLevel being requested.
73
+ */
74
+ ShowPermissionLevelDropdown = true;
75
+ AccessRequested = new EventEmitter();
76
+ /**
77
+ * The resource type object that the user is requesting access to for all info on the resource type
78
+ */
79
+ ResourceTypeObject;
80
+ AfterRequest = false;
81
+ async ngOnInit() {
82
+ await ResourcePermissionEngine.Instance.Config();
83
+ const rt = ResourcePermissionEngine.Instance.ResourceTypes.find(x => x.Name.trim().toLowerCase() === this.ResourceType.trim().toLowerCase());
84
+ if (rt)
85
+ this.ResourceTypeObject = rt;
86
+ else
87
+ throw new Error(`Resource Type ${this.ResourceType} not found`);
80
88
  }
81
- ngOnInit() {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- yield ResourcePermissionEngine.Instance.Config();
84
- const rt = ResourcePermissionEngine.Instance.ResourceTypes.find(x => x.Name.trim().toLowerCase() === this.ResourceType.trim().toLowerCase());
85
- if (rt)
86
- this.ResourceTypeObject = rt;
87
- else
88
- throw new Error(`Resource Type ${this.ResourceType} not found`);
89
- });
90
- }
91
- requestAccess() {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- const p = this.ProviderToUse;
94
- const permission = yield p.GetEntityObject("Resource Permissions", p.CurrentUser);
95
- permission.ResourceTypeID = this.ResourceTypeObject.ID;
96
- permission.ResourceRecordID = this.ResourceRecordID;
97
- permission.Status = 'Requested';
98
- permission.Type = 'User';
99
- permission.UserID = p.CurrentUser.ID;
100
- permission.PermissionLevel = this.PermissionLevel;
101
- if (yield permission.Save()) {
102
- // worked, fire the event.
103
- // NOTE - the notification creatd to notify the resource owner happens in the ResourcePermissionEntity sub-class not here in the UI
104
- this.AccessRequested.emit(permission);
105
- this.AfterRequest = true;
106
- }
107
- else {
108
- //failed
109
- LogError(`Failed to request access to ${this.ResourceType} record ${this.ResourceRecordID}`, undefined, permission.LatestResult);
110
- MJNotificationService.Instance.CreateSimpleNotification(`Failed to request access to ${this.ResourceType} record ${this.ResourceName} (${this.ResourceRecordID})`, 'error', 5000);
111
- }
112
- });
89
+ async requestAccess() {
90
+ const p = this.ProviderToUse;
91
+ const permission = await p.GetEntityObject("Resource Permissions", p.CurrentUser);
92
+ permission.ResourceTypeID = this.ResourceTypeObject.ID;
93
+ permission.ResourceRecordID = this.ResourceRecordID;
94
+ permission.Status = 'Requested';
95
+ permission.Type = 'User';
96
+ permission.UserID = p.CurrentUser.ID;
97
+ permission.PermissionLevel = this.PermissionLevel;
98
+ if (await permission.Save()) {
99
+ // worked, fire the event.
100
+ // NOTE - the notification creatd to notify the resource owner happens in the ResourcePermissionEntity sub-class not here in the UI
101
+ this.AccessRequested.emit(permission);
102
+ this.AfterRequest = true;
103
+ }
104
+ else {
105
+ //failed
106
+ LogError(`Failed to request access to ${this.ResourceType} record ${this.ResourceRecordID}`, undefined, permission.LatestResult);
107
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to request access to ${this.ResourceType} record ${this.ResourceName} (${this.ResourceRecordID})`, 'error', 5000);
108
+ }
113
109
  }
110
+ static ɵfac = /*@__PURE__*/ (() => { let ɵRequestResourceAccessComponent_BaseFactory; return function RequestResourceAccessComponent_Factory(t) { return (ɵRequestResourceAccessComponent_BaseFactory || (ɵRequestResourceAccessComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RequestResourceAccessComponent)))(t || RequestResourceAccessComponent); }; })();
111
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RequestResourceAccessComponent, selectors: [["mj-request-resource-access"]], inputs: { ResourceType: "ResourceType", ResourceName: "ResourceName", ResourceRecordID: "ResourceRecordID", PermissionLevel: "PermissionLevel", ShowPermissionLevelDropdown: "ShowPermissionLevelDropdown" }, outputs: { AccessRequested: "AccessRequested" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 5, consts: [[1, "request-access-container"], [1, "request-icon"], [1, "fas", "fa-lock"], [1, "request-info"], [1, "request-actions"], ["for", "permissionLevel"], [3, "ngModelChange", "ngModel"], ["value", "View"], ["value", "Edit"], ["value", "Owner"], ["kendoButton", "", 1, "request-button", 3, "click"], [1, "fas", "fa-paper-plane"]], template: function RequestResourceAccessComponent_Template(rf, ctx) { if (rf & 1) {
112
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
113
+ i0.ɵɵelement(2, "i", 2);
114
+ i0.ɵɵelementEnd();
115
+ i0.ɵɵelementStart(3, "div", 3)(4, "h3");
116
+ i0.ɵɵtext(5, "Request Access");
117
+ i0.ɵɵelementEnd();
118
+ i0.ɵɵelementStart(6, "h5");
119
+ i0.ɵɵtext(7);
120
+ i0.ɵɵelementEnd();
121
+ i0.ɵɵtemplate(8, RequestResourceAccessComponent_Conditional_8_Template, 2, 0, "p")(9, RequestResourceAccessComponent_Conditional_9_Template, 4, 0)(10, RequestResourceAccessComponent_Conditional_10_Template, 10, 1, "span");
122
+ i0.ɵɵelementEnd();
123
+ i0.ɵɵtemplate(11, RequestResourceAccessComponent_Conditional_11_Template, 4, 0, "div", 4);
124
+ i0.ɵɵelementEnd();
125
+ } if (rf & 2) {
126
+ i0.ɵɵadvance(7);
127
+ i0.ɵɵtextInterpolate2("", ctx.ResourceType ? ctx.ResourceType : "Resource", "", ctx.ResourceName ? ": " + ctx.ResourceName : "", "");
128
+ i0.ɵɵadvance();
129
+ i0.ɵɵconditional(!ctx.AfterRequest ? 8 : 9);
130
+ i0.ɵɵadvance(2);
131
+ i0.ɵɵconditional(ctx.ShowPermissionLevelDropdown && !ctx.AfterRequest ? 10 : -1);
132
+ i0.ɵɵadvance();
133
+ i0.ɵɵconditional(!ctx.AfterRequest ? 11 : -1);
134
+ } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.ButtonComponent], styles: [".request-access-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 20px;\n background-color: #f9f9f9;\n border: 1px solid #ddd;\n border-radius: 8px;\n max-width: 400px;\n margin: 10px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n }\n \n .request-icon[_ngcontent-%COMP%] {\n font-size: 48px;\n color: #ffcc00; \n\n margin-bottom: 10px;\n }\n \n .request-info[_ngcontent-%COMP%] {\n text-align: center;\n margin-bottom: 20px;\n }\n \n .request-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n font-size: 1.5rem;\n margin: 0;\n color: #333;\n }\n \n .request-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 1rem;\n color: #666;\n margin-top: 8px;\n }\n \n .request-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n }\n \n .request-button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n background-color: #28a745; \n\n color: #fff;\n padding: 10px 20px;\n border: none;\n border-radius: 5px;\n font-size: 1rem;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n \n .request-button[_ngcontent-%COMP%]:hover {\n background-color: #218838;\n }\n \n .request-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 8px;\n }\n \n @media (max-width: 600px) {\n .request-access-container[_ngcontent-%COMP%] {\n padding: 15px;\n max-width: 90%;\n }\n \n .request-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n font-size: 1.25rem;\n }\n \n .request-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 0.9rem;\n }\n \n .request-button[_ngcontent-%COMP%] {\n font-size: 0.9rem;\n padding: 8px 16px;\n }\n }"] });
114
135
  }
115
- RequestResourceAccessComponent.ɵfac = /*@__PURE__*/ (() => { let ɵRequestResourceAccessComponent_BaseFactory; return function RequestResourceAccessComponent_Factory(t) { return (ɵRequestResourceAccessComponent_BaseFactory || (ɵRequestResourceAccessComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RequestResourceAccessComponent)))(t || RequestResourceAccessComponent); }; })();
116
- RequestResourceAccessComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RequestResourceAccessComponent, selectors: [["mj-request-resource-access"]], inputs: { ResourceType: "ResourceType", ResourceName: "ResourceName", ResourceRecordID: "ResourceRecordID", PermissionLevel: "PermissionLevel", ShowPermissionLevelDropdown: "ShowPermissionLevelDropdown" }, outputs: { AccessRequested: "AccessRequested" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 5, consts: [[1, "request-access-container"], [1, "request-icon"], [1, "fas", "fa-lock"], [1, "request-info"], [1, "request-actions"], ["for", "permissionLevel"], [3, "ngModelChange", "ngModel"], ["value", "View"], ["value", "Edit"], ["value", "Owner"], ["kendoButton", "", 1, "request-button", 3, "click"], [1, "fas", "fa-paper-plane"]], template: function RequestResourceAccessComponent_Template(rf, ctx) { if (rf & 1) {
117
- i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
118
- i0.ɵɵelement(2, "i", 2);
119
- i0.ɵɵelementEnd();
120
- i0.ɵɵelementStart(3, "div", 3)(4, "h3");
121
- i0.ɵɵtext(5, "Request Access");
122
- i0.ɵɵelementEnd();
123
- i0.ɵɵelementStart(6, "h5");
124
- i0.ɵɵtext(7);
125
- i0.ɵɵelementEnd();
126
- i0.ɵɵtemplate(8, RequestResourceAccessComponent_Conditional_8_Template, 2, 0, "p")(9, RequestResourceAccessComponent_Conditional_9_Template, 4, 0)(10, RequestResourceAccessComponent_Conditional_10_Template, 10, 1, "span");
127
- i0.ɵɵelementEnd();
128
- i0.ɵɵtemplate(11, RequestResourceAccessComponent_Conditional_11_Template, 4, 0, "div", 4);
129
- i0.ɵɵelementEnd();
130
- } if (rf & 2) {
131
- i0.ɵɵadvance(7);
132
- i0.ɵɵtextInterpolate2("", ctx.ResourceType ? ctx.ResourceType : "Resource", "", ctx.ResourceName ? ": " + ctx.ResourceName : "", "");
133
- i0.ɵɵadvance();
134
- i0.ɵɵconditional(!ctx.AfterRequest ? 8 : 9);
135
- i0.ɵɵadvance(2);
136
- i0.ɵɵconditional(ctx.ShowPermissionLevelDropdown && !ctx.AfterRequest ? 10 : -1);
137
- i0.ɵɵadvance();
138
- i0.ɵɵconditional(!ctx.AfterRequest ? 11 : -1);
139
- } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.ButtonComponent], styles: [".request-access-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 20px;\n background-color: #f9f9f9;\n border: 1px solid #ddd;\n border-radius: 8px;\n max-width: 400px;\n margin: 10px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n }\n \n .request-icon[_ngcontent-%COMP%] {\n font-size: 48px;\n color: #ffcc00; \n\n margin-bottom: 10px;\n }\n \n .request-info[_ngcontent-%COMP%] {\n text-align: center;\n margin-bottom: 20px;\n }\n \n .request-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n font-size: 1.5rem;\n margin: 0;\n color: #333;\n }\n \n .request-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 1rem;\n color: #666;\n margin-top: 8px;\n }\n \n .request-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n }\n \n .request-button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n background-color: #28a745; \n\n color: #fff;\n padding: 10px 20px;\n border: none;\n border-radius: 5px;\n font-size: 1rem;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n \n .request-button[_ngcontent-%COMP%]:hover {\n background-color: #218838;\n }\n \n .request-button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 8px;\n }\n \n @media (max-width: 600px) {\n .request-access-container[_ngcontent-%COMP%] {\n padding: 15px;\n max-width: 90%;\n }\n \n .request-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n font-size: 1.25rem;\n }\n \n .request-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 0.9rem;\n }\n \n .request-button[_ngcontent-%COMP%] {\n font-size: 0.9rem;\n padding: 8px 16px;\n }\n }"] });
140
136
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RequestResourceAccessComponent, [{
141
137
  type: Component,
142
138
  args: [{ selector: 'mj-request-resource-access', template: "<div class=\"request-access-container\">\n <div class=\"request-icon\">\n <i class=\"fas fa-lock\"></i>\n </div>\n <div class=\"request-info\">\n <h3>Request Access</h3>\n <h5>{{ResourceType ? ResourceType : 'Resource'}}{{ResourceName ? ': ' + ResourceName : ''}}</h5>\n @if (!AfterRequest){\n <p> You do not have access to this resource. Click the button below to request access.</p>\n }\n @else {\n <h3>Your request has been submitted</h3>\n <p> You will be notified when your request has been processed.</p>\n }\n @if(ShowPermissionLevelDropdown && !AfterRequest) {\n <span>\n <label for=\"permissionLevel\">Permission Level:</label>\n <select [(ngModel)] = \"PermissionLevel\">\n <option value=\"View\">View</option>\n <option value=\"Edit\">Edit</option>\n <option value=\"Owner\">Owner</option> \n </select>\n </span> \n }\n </div>\n @if (!AfterRequest) {\n <div class=\"request-actions\">\n <button kendoButton class=\"request-button\" (click)=\"requestAccess()\">\n <i class=\"fas fa-paper-plane\"></i> Request Access\n </button>\n </div> \n }\n</div>\n", styles: [".request-access-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 20px;\n background-color: #f9f9f9;\n border: 1px solid #ddd;\n border-radius: 8px;\n max-width: 400px;\n margin: 10px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n }\n \n .request-icon {\n font-size: 48px;\n color: #ffcc00; /* Adjust color as needed */\n margin-bottom: 10px;\n }\n \n .request-info {\n text-align: center;\n margin-bottom: 20px;\n }\n \n .request-info h3 {\n font-size: 1.5rem;\n margin: 0;\n color: #333;\n }\n \n .request-info p {\n font-size: 1rem;\n color: #666;\n margin-top: 8px;\n }\n \n .request-actions {\n display: flex;\n justify-content: center;\n }\n \n .request-button {\n display: flex;\n align-items: center;\n background-color: #28a745; /* Green color */\n color: #fff;\n padding: 10px 20px;\n border: none;\n border-radius: 5px;\n font-size: 1rem;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n \n .request-button:hover {\n background-color: #218838;\n }\n \n .request-button i {\n margin-right: 8px;\n }\n \n @media (max-width: 600px) {\n .request-access-container {\n padding: 15px;\n max-width: 90%;\n }\n \n .request-info h3 {\n font-size: 1.25rem;\n }\n \n .request-info p {\n font-size: 0.9rem;\n }\n \n .request-button {\n font-size: 0.9rem;\n padding: 8px 16px;\n }\n }\n "] }]
@@ -1 +1 @@
1
- {"version":3,"file":"request-access.component.js","sourceRoot":"","sources":["../../src/lib/request-access.component.ts","../../src/lib/request-access.component.html"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAgD,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;ICIjE,yBAAG;IAAC,mGAAkF;IAAA,iBAAI;;;IAG1F,0BAAI;IAAA,+CAA+B;IAAA,iBAAK;IACxC,yBAAG;IAAC,2EAA0D;IAAA,iBAAI;;;;IAI9D,AADJ,4BAAM,eAC2B;IAAA,iCAAiB;IAAA,iBAAQ;IACtD,iCAAwC;IAAhC,sUAA+B;IACnC,iCAAqB;IAAA,oBAAI;IAAA,iBAAS;IAClC,iCAAqB;IAAA,oBAAI;IAAA,iBAAS;IAClC,iCAAsB;IAAA,qBAAK;IAEnC,AADI,AAD+B,iBAAS,EAC/B,EACN;;;IALK,eAA+B;IAA/B,sDAA+B;;;;IAUvC,AADJ,8BAA6B,iBAC4C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B,MAAM;;kFAzBE,8BAA8B"}
1
+ {"version":3,"file":"request-access.component.js","sourceRoot":"","sources":["../../src/lib/request-access.component.ts","../../src/lib/request-access.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAgD,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;ICIjE,yBAAG;IAAC,mGAAkF;IAAA,iBAAI;;;IAG1F,0BAAI;IAAA,+CAA+B;IAAA,iBAAK;IACxC,yBAAG;IAAC,2EAA0D;IAAA,iBAAI;;;;IAI9D,AADJ,4BAAM,eAC2B;IAAA,iCAAiB;IAAA,iBAAQ;IACtD,iCAAwC;IAAhC,sUAA+B;IACnC,iCAAqB;IAAA,oBAAI;IAAA,iBAAS;IAClC,iCAAqB;IAAA,oBAAI;IAAA,iBAAS;IAClC,iCAAsB;IAAA,qBAAK;IAEnC,AADI,AAD+B,iBAAS,EAC/B,EACN;;;IALK,eAA+B;IAA/B,sDAA+B;;;;IAUvC,AADJ,8BAA6B,iBAC4C;IAA1B,mMAAS,sBAAe,KAAC;IAClE,wBAAkC;IAAC,gCACrC;IACJ,AADI,iBAAS,EACP;;ADxBd;;GAEG;AAMH,MAAM,OAAO,8BAAgC,SAAQ,oBAAoB;IACrE;;OAEG;IACM,YAAY,CAAU;IAE/B;;OAEG;IACM,YAAY,GAAS,EAAE,CAAC;IACjC;;OAEG;IACM,gBAAgB,CAAU;IAEnC;;OAEG;IACM,eAAe,GAA8B,MAAM,CAAC;IAE7D;;OAEG;IACM,2BAA2B,GAAY,IAAI,CAAC;IAE3C,eAAe,GAAG,IAAI,YAAY,EAA4B,CAAC;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aACI,CAAC;YACF,QAAQ;YACR,QAAQ,CAAC,+BAA+B,IAAI,CAAC,YAAY,WAAW,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;YACjI,qBAAqB,CAAC,QAAQ,CAAC,wBAAwB,CAAC,+BAA+B,IAAI,CAAC,YAAY,WAAW,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACtL,CAAC;IACL,CAAC;qRA9DQ,8BAA8B,SAA9B,8BAA8B;6DAA9B,8BAA8B;YCbvC,AADJ,8BAAsC,aACR;YACxB,uBAA2B;YAC7B,iBAAM;YAEJ,AADF,8BAA0B,SACpB;YAAA,8BAAc;YAAA,iBAAK;YACvB,0BAAI;YAAA,YAAuF;YAAA,iBAAK;YAQhG,AAJA,AAHA,kFAAoB,gEAGb,2EAI4C;YAUrD,iBAAM;YACN,yFAAqB;YAOzB,iBAAM;;YA1BI,eAAuF;YAAvF,oIAAuF;YAC3F,cAMC;YAND,2CAMC;YACD,eASC;YATD,gFASC;YAEH,cAMC;YAND,6CAMC;;;iFDjBQ,8BAA8B;cAL1C,SAAS;2BACE,4BAA4B;gBAQ3B,YAAY;kBAApB,KAAK;YAKG,YAAY;kBAApB,KAAK;YAIG,gBAAgB;kBAAxB,KAAK;YAKG,eAAe;kBAAvB,KAAK;YAKG,2BAA2B;kBAAnC,KAAK;YAEI,eAAe;kBAAxB,MAAM;;kFAzBE,8BAA8B"}
@@ -1,12 +1,3 @@
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
1
  import { Component, Input } from '@angular/core';
11
2
  import { LogError, RunView } from '@memberjunction/core';
12
3
  import { ResourcePermissionEngine } from '@memberjunction/core-entities';
@@ -157,143 +148,141 @@ function ResourcePermissionsComponent_For_16_Template(rf, ctx) { if (rf & 1) {
157
148
  * an Angular application or component.
158
149
  */
159
150
  export class ResourcePermissionsComponent extends BaseAngularComponent {
160
- constructor() {
161
- super(...arguments);
162
- /**
163
- * If set to true, the component will show a Save button to the user and persist the changes to the
164
- * database when the user clicks the Save button. By default this is off to allow users of the component
165
- * to wrap the component as desired, and handle the save themselves.
166
- */
167
- this.ShowSaveButton = false;
168
- /**
169
- * If set to true, the component will show the permission levels to the user. By default this is on. If you have
170
- * a Resource Type or run-time use case where levels are not relevant, you can turn this off.
171
- */
172
- this.ShowPermissionLevels = true;
173
- /**
174
- * By default, this component will not show any error messages to the user.
175
- * If you want to show error messages to the user, set this to true. The component will always throw exceptions when error occur internally.
176
- */
177
- this.ShowUserErrorMessages = false;
178
- /**
179
- * Allows you to determine if the user is able to add new permissions for the resource.
180
- */
181
- this.AllowAddPermissions = true;
182
- /**
183
- * Allows you to determine if the user is able to edit existing permissions for the resource.
184
- */
185
- this.AllowEditPermissions = true;
186
- /**
187
- * Allows you to determine if the user is able to delete existing permissions for the resource.
188
- */
189
- this.AllowDeletePermissions = true;
190
- /**
191
- * List of possible permission levels that can be set for the resource. An array of strings, defaults to ['View', 'Edit', 'Owner']
192
- */
193
- this.PermissionLevels = ['View', 'Edit', 'Owner']; // these are the possible permission levels
194
- /**
195
- * Specifies the types of permissions the UI will allow settings for. An array of strings, defaults to ['User', 'Role']
196
- */
197
- this.PermissionTypes = ['User', 'Role'];
198
- /**
199
- * This optional input allows you to exclude certain roles from the list of roles that can be selected for permissions. If existing permissions have been created with roles that are in this list they will still be displayed,
200
- * but the user will not be able to add new permissions with these roles. This is an array of strings with the NAMES of the roles.
201
- */
202
- this.ExcludedRoleNames = [];
203
- /**
204
- * This optional input allows you to exclude certain users from the list of users that can be selected for permissions. If existing permissions have been created with users that are in this list they will still be displayed,
205
- * but the user will not be able to add new permissions with these users. This is an array of strings with EMAILS.
206
- */
207
- this.ExcludedUserEmails = [];
208
- this.AllUsers = [];
209
- this.AllRoles = [];
210
- this.SelectedUser = null;
211
- this.SelectedRole = null;
212
- this.SelectedType = 'Role';
213
- this.SelectedPermissionLevel = 'View';
214
- this._Loading = false;
215
- this.resourcePermissions = [];
216
- this._pendingDeletes = [];
217
- this._pendingAdds = [];
218
- }
219
- UpdateResourceRecordID(ResourceRecordID) {
220
- return __awaiter(this, void 0, void 0, function* () {
221
- this.ResourceRecordID = ResourceRecordID;
222
- // now go through all of our permissions and update the ResourceRecordID
223
- for (const permission of this.resourcePermissions) {
224
- permission.ResourceRecordID = ResourceRecordID;
225
- }
226
- });
151
+ /**
152
+ * Required: the ID of the resource type record for the specified resource that the permissions are being set for.
153
+ */
154
+ ResourceTypeID;
155
+ /**
156
+ * Required: the record ID of the resource that the permissions are being set for.
157
+ */
158
+ ResourceRecordID;
159
+ /**
160
+ * If set to true, the component will show a Save button to the user and persist the changes to the
161
+ * database when the user clicks the Save button. By default this is off to allow users of the component
162
+ * to wrap the component as desired, and handle the save themselves.
163
+ */
164
+ ShowSaveButton = false;
165
+ /**
166
+ * If set to true, the component will show the permission levels to the user. By default this is on. If you have
167
+ * a Resource Type or run-time use case where levels are not relevant, you can turn this off.
168
+ */
169
+ ShowPermissionLevels = true;
170
+ /**
171
+ * By default, this component will not show any error messages to the user.
172
+ * If you want to show error messages to the user, set this to true. The component will always throw exceptions when error occur internally.
173
+ */
174
+ ShowUserErrorMessages = false;
175
+ /**
176
+ * Allows you to determine if the user is able to add new permissions for the resource.
177
+ */
178
+ AllowAddPermissions = true;
179
+ /**
180
+ * Allows you to determine if the user is able to edit existing permissions for the resource.
181
+ */
182
+ AllowEditPermissions = true;
183
+ /**
184
+ * Allows you to determine if the user is able to delete existing permissions for the resource.
185
+ */
186
+ AllowDeletePermissions = true;
187
+ /**
188
+ * List of possible permission levels that can be set for the resource. An array of strings, defaults to ['View', 'Edit', 'Owner']
189
+ */
190
+ PermissionLevels = ['View', 'Edit', 'Owner']; // these are the possible permission levels
191
+ /**
192
+ * Specifies the types of permissions the UI will allow settings for. An array of strings, defaults to ['User', 'Role']
193
+ */
194
+ PermissionTypes = ['User', 'Role'];
195
+ /**
196
+ * This optional input allows you to exclude certain roles from the list of roles that can be selected for permissions. If existing permissions have been created with roles that are in this list they will still be displayed,
197
+ * but the user will not be able to add new permissions with these roles. This is an array of strings with the NAMES of the roles.
198
+ */
199
+ ExcludedRoleNames = [];
200
+ /**
201
+ * This optional input allows you to exclude certain users from the list of users that can be selected for permissions. If existing permissions have been created with users that are in this list they will still be displayed,
202
+ * but the user will not be able to add new permissions with these users. This is an array of strings with EMAILS.
203
+ */
204
+ ExcludedUserEmails = [];
205
+ AllUsers = [];
206
+ AllRoles = [];
207
+ SelectedUser = null;
208
+ SelectedRole = null;
209
+ SelectedType = 'Role';
210
+ SelectedPermissionLevel = 'View';
211
+ _Loading = false;
212
+ async UpdateResourceRecordID(ResourceRecordID) {
213
+ this.ResourceRecordID = ResourceRecordID;
214
+ // now go through all of our permissions and update the ResourceRecordID
215
+ for (const permission of this.resourcePermissions) {
216
+ permission.ResourceRecordID = ResourceRecordID;
217
+ }
227
218
  }
228
- ngAfterViewInit() {
229
- return __awaiter(this, void 0, void 0, function* () {
230
- if (!this.ResourceTypeID || !this.ResourceRecordID) {
231
- throw new Error('ResourceTypeID and ResourceRecordID must be set');
232
- }
233
- this._Loading = true;
234
- // load up the current permissions for the specified ResourceTypeID and ResourceRecordID
235
- const engine = this.GetEngine();
236
- yield engine.Config(false, this.ProviderToUse.CurrentUser, this.ProviderToUse);
237
- // now we can get the permissions for the specified resource
238
- const allResourcePermissions = engine.GetResourcePermissions(this.ResourceTypeID, this.ResourceRecordID);
239
- this.resourcePermissions = allResourcePermissions.filter((p) => p.Status === 'Approved'); // only include approved permissions in the UI, we don't show requested, rejected, revoked permissions here, just suppress them.
240
- const p = this.ProviderToUse;
241
- const rv = new RunView(p);
242
- const result = yield rv.RunView({
243
- EntityName: "Users",
244
- ResultType: "entity_object",
245
- OrderBy: "Name",
246
- ExtraFilter: "IsActive=1"
247
- });
248
- // filter out any users that are in the ExcludedUserEmails list
249
- this.AllUsers = result.Results.filter((u) => !this.ExcludedUserEmails.includes(u.Email));
250
- // filter out any roles that are in the ExcludedRoleNames list
251
- this.AllRoles = p.Roles.filter((r) => !this.ExcludedRoleNames.includes(r.Name));
252
- if (this.AllUsers.length > 0)
253
- this.SelectedUser = this.AllUsers[0];
254
- if (this.AllRoles.length > 0)
255
- this.SelectedRole = this.AllRoles[0];
256
- this._Loading = false;
219
+ resourcePermissions = [];
220
+ async ngAfterViewInit() {
221
+ if (!this.ResourceTypeID || !this.ResourceRecordID) {
222
+ throw new Error('ResourceTypeID and ResourceRecordID must be set');
223
+ }
224
+ this._Loading = true;
225
+ // load up the current permissions for the specified ResourceTypeID and ResourceRecordID
226
+ const engine = this.GetEngine();
227
+ await engine.Config(false, this.ProviderToUse.CurrentUser, this.ProviderToUse);
228
+ // now we can get the permissions for the specified resource
229
+ const allResourcePermissions = engine.GetResourcePermissions(this.ResourceTypeID, this.ResourceRecordID);
230
+ this.resourcePermissions = allResourcePermissions.filter((p) => p.Status === 'Approved'); // only include approved permissions in the UI, we don't show requested, rejected, revoked permissions here, just suppress them.
231
+ const p = this.ProviderToUse;
232
+ const rv = new RunView(p);
233
+ const result = await rv.RunView({
234
+ EntityName: "Users",
235
+ ResultType: "entity_object",
236
+ OrderBy: "Name",
237
+ ExtraFilter: "IsActive=1"
257
238
  });
239
+ // filter out any users that are in the ExcludedUserEmails list
240
+ this.AllUsers = result.Results.filter((u) => !this.ExcludedUserEmails.includes(u.Email));
241
+ // filter out any roles that are in the ExcludedRoleNames list
242
+ this.AllRoles = p.Roles.filter((r) => !this.ExcludedRoleNames.includes(r.Name));
243
+ if (this.AllUsers.length > 0)
244
+ this.SelectedUser = this.AllUsers[0];
245
+ if (this.AllRoles.length > 0)
246
+ this.SelectedRole = this.AllRoles[0];
247
+ this._Loading = false;
258
248
  }
249
+ _pendingDeletes = [];
259
250
  deletePermission(permission) {
260
251
  this._pendingDeletes.push(permission);
261
252
  this.resourcePermissions = this.resourcePermissions.filter((p) => p !== permission);
262
253
  }
263
- addPermission() {
264
- return __awaiter(this, void 0, void 0, function* () {
265
- const p = this.ProviderToUse;
266
- const permission = yield p.GetEntityObject("Resource Permissions", p.CurrentUser);
267
- permission.ResourceTypeID = this.ResourceTypeID;
268
- permission.ResourceRecordID = this.ResourceRecordID;
269
- permission.Type = this.SelectedType;
270
- permission.Status = 'Approved';
271
- permission.PermissionLevel = this.SelectedPermissionLevel;
272
- if (this.SelectedType === 'User' && this.SelectedUser) {
273
- permission.UserID = this.SelectedUser.ID;
274
- permission.Set("User", this.SelectedUser.Name); // set the virtual field for display purposes
275
- }
276
- else if (this.SelectedType === 'Role' && this.SelectedRole) {
277
- permission.RoleID = this.SelectedRole.ID;
278
- permission.Set("Role", this.SelectedRole.Name); // set the virtual field for display purposes
279
- }
280
- else {
281
- LogError('Invalid permission type or missing user/role');
282
- return;
283
- }
284
- this.resourcePermissions.push(permission);
285
- });
254
+ _pendingAdds = [];
255
+ async addPermission() {
256
+ const p = this.ProviderToUse;
257
+ const permission = await p.GetEntityObject("Resource Permissions", p.CurrentUser);
258
+ permission.ResourceTypeID = this.ResourceTypeID;
259
+ permission.ResourceRecordID = this.ResourceRecordID;
260
+ permission.Type = this.SelectedType;
261
+ permission.Status = 'Approved';
262
+ permission.PermissionLevel = this.SelectedPermissionLevel;
263
+ if (this.SelectedType === 'User' && this.SelectedUser) {
264
+ permission.UserID = this.SelectedUser.ID;
265
+ permission.Set("User", this.SelectedUser.Name); // set the virtual field for display purposes
266
+ }
267
+ else if (this.SelectedType === 'Role' && this.SelectedRole) {
268
+ permission.RoleID = this.SelectedRole.ID;
269
+ permission.Set("Role", this.SelectedRole.Name); // set the virtual field for display purposes
270
+ }
271
+ else {
272
+ LogError('Invalid permission type or missing user/role');
273
+ return;
274
+ }
275
+ this.resourcePermissions.push(permission);
286
276
  }
287
277
  permissionAlreadyExists() {
288
- var _a, _b;
289
278
  // check to see if the selection that the user currently has in place for the combination of TYPE + either USER or ROLE already exists
290
279
  // in our list of permissions
291
280
  for (const permission of this.resourcePermissions) {
292
281
  if (permission.Type === this.SelectedType) {
293
- if (this.SelectedType === 'User' && permission.UserID === ((_a = this.SelectedUser) === null || _a === void 0 ? void 0 : _a.ID)) {
282
+ if (this.SelectedType === 'User' && permission.UserID === this.SelectedUser?.ID) {
294
283
  return true;
295
284
  }
296
- else if (this.SelectedType === 'Role' && permission.RoleID === ((_b = this.SelectedRole) === null || _b === void 0 ? void 0 : _b.ID)) {
285
+ else if (this.SelectedType === 'Role' && permission.RoleID === this.SelectedRole?.ID) {
297
286
  return true;
298
287
  }
299
288
  }
@@ -301,107 +290,105 @@ export class ResourcePermissionsComponent extends BaseAngularComponent {
301
290
  // if we get here, then the permission does not already exist
302
291
  return false;
303
292
  }
304
- SavePermissions() {
305
- return __awaiter(this, void 0, void 0, function* () {
306
- // first delete any permissions that were marked for deletion
307
- this._Loading = true;
308
- const p = this.ProviderToUse;
309
- const tg = yield p.CreateTransactionGroup();
310
- for (const permission of this._pendingDeletes) {
311
- if (permission.IsSaved) {
312
- // only delete records previously saved, sometimes a user adds a new permission and deletes it before saving it
313
- permission.TransactionGroup = tg;
314
- if (!(yield permission.Delete())) { // we use await here because the promise will resolve before the actual save occurs --- the internals will not call the network until tg.Submit() below
315
- // validation errors come back here
316
- if (this.ShowUserErrorMessages)
317
- MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error', 2500);
318
- LogError('Error deleting permission record in the transaction group: ' + permission.LatestResult.Error);
319
- return false;
320
- }
293
+ async SavePermissions() {
294
+ // first delete any permissions that were marked for deletion
295
+ this._Loading = true;
296
+ const p = this.ProviderToUse;
297
+ const tg = await p.CreateTransactionGroup();
298
+ for (const permission of this._pendingDeletes) {
299
+ if (permission.IsSaved) {
300
+ // only delete records previously saved, sometimes a user adds a new permission and deletes it before saving it
301
+ permission.TransactionGroup = tg;
302
+ if (!await permission.Delete()) { // we use await here because the promise will resolve before the actual save occurs --- the internals will not call the network until tg.Submit() below
303
+ // validation errors come back here
304
+ if (this.ShowUserErrorMessages)
305
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error', 2500);
306
+ LogError('Error deleting permission record in the transaction group: ' + permission.LatestResult.Error);
307
+ return false;
321
308
  }
322
309
  }
323
- // next add new permissions by saving them in the transaction group
324
- for (const permission of this._pendingAdds) {
325
- if (this._pendingDeletes.includes(permission)) {
326
- // don't save a permission record that is new, if it was also marked for deletion
327
- permission.TransactionGroup = tg;
328
- if (!(yield permission.Save())) {
329
- // validation errors come back here
330
- if (this.ShowUserErrorMessages)
331
- MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error', 2500);
332
- LogError('Error saving permission record in the transaction group: ' + permission.LatestResult.Error);
333
- return false;
334
- }
310
+ }
311
+ // next add new permissions by saving them in the transaction group
312
+ for (const permission of this._pendingAdds) {
313
+ if (this._pendingDeletes.includes(permission)) {
314
+ // don't save a permission record that is new, if it was also marked for deletion
315
+ permission.TransactionGroup = tg;
316
+ if (!await permission.Save()) {
317
+ // validation errors come back here
318
+ if (this.ShowUserErrorMessages)
319
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error', 2500);
320
+ LogError('Error saving permission record in the transaction group: ' + permission.LatestResult.Error);
321
+ return false;
335
322
  }
336
323
  }
337
- // now save the existing permissions
338
- for (const permission of this.resourcePermissions) {
339
- // make sure not in the delete array
340
- if (!this._pendingDeletes.includes(permission)) {
341
- permission.TransactionGroup = tg;
342
- if (!(yield permission.Save())) {
343
- // validation errors come back here
344
- if (this.ShowUserErrorMessages)
345
- MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error', 2500);
346
- LogError('Error saving permission record in the transaction group: ' + permission.LatestResult.Error);
347
- return false;
348
- }
324
+ }
325
+ // now save the existing permissions
326
+ for (const permission of this.resourcePermissions) {
327
+ // make sure not in the delete array
328
+ if (!this._pendingDeletes.includes(permission)) {
329
+ permission.TransactionGroup = tg;
330
+ if (!await permission.Save()) {
331
+ // validation errors come back here
332
+ if (this.ShowUserErrorMessages)
333
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error', 2500);
334
+ LogError('Error saving permission record in the transaction group: ' + permission.LatestResult.Error);
335
+ return false;
349
336
  }
350
337
  }
351
- // now save the changes
352
- if (yield tg.Submit()) {
353
- this._Loading = false;
354
- this._pendingDeletes = [];
355
- this._pendingAdds = [];
356
- const engine = this.GetEngine();
357
- yield engine.RefreshAllItems(); // refresh the permissions cache
358
- return true;
359
- }
360
- else {
361
- // we had an error, show the user via SharedService
362
- this._Loading = false;
363
- if (this.ShowUserErrorMessages)
364
- MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error');
365
- LogError('Error saving permissions in the transaction group');
366
- return false;
367
- }
368
- });
338
+ }
339
+ // now save the changes
340
+ if (await tg.Submit()) {
341
+ this._Loading = false;
342
+ this._pendingDeletes = [];
343
+ this._pendingAdds = [];
344
+ const engine = this.GetEngine();
345
+ await engine.RefreshAllItems(); // refresh the permissions cache
346
+ return true;
347
+ }
348
+ else {
349
+ // we had an error, show the user via SharedService
350
+ this._Loading = false;
351
+ if (this.ShowUserErrorMessages)
352
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving permissions', 'error');
353
+ LogError('Error saving permissions in the transaction group');
354
+ return false;
355
+ }
369
356
  }
370
357
  GetEngine() {
371
358
  return ResourcePermissionEngine.GetProviderInstance(this.ProviderToUse, ResourcePermissionEngine);
372
359
  }
360
+ static ɵfac = /*@__PURE__*/ (() => { let ɵResourcePermissionsComponent_BaseFactory; return function ResourcePermissionsComponent_Factory(t) { return (ɵResourcePermissionsComponent_BaseFactory || (ɵResourcePermissionsComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ResourcePermissionsComponent)))(t || ResourcePermissionsComponent); }; })();
361
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ResourcePermissionsComponent, selectors: [["mj-resource-permissions"]], inputs: { ResourceTypeID: "ResourceTypeID", ResourceRecordID: "ResourceRecordID", ShowSaveButton: "ShowSaveButton", ShowPermissionLevels: "ShowPermissionLevels", ShowUserErrorMessages: "ShowUserErrorMessages", AllowAddPermissions: "AllowAddPermissions", AllowEditPermissions: "AllowEditPermissions", AllowDeletePermissions: "AllowDeletePermissions", PermissionLevels: "PermissionLevels", PermissionTypes: "PermissionTypes", ExcludedRoleNames: "ExcludedRoleNames", ExcludedUserEmails: "ExcludedUserEmails" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 17, vars: 5, consts: [[1, "container"], ["kendoButton", ""], [1, "table-container"], [1, "add-permission-section"], [1, "resource-table"], ["kendoButton", "", 3, "click"], [1, "add-permission-label"], [2, "width", "100px", 3, "ngModelChange", "data", "ngModel"], ["textField", "Name", "valueField", "ID", 2, "width", "225px", 3, "data", "ngModel"], ["textField", "Name", "valueField", "ID", 2, "width", "150px", 3, "data", "ngModel"], [2, "width", "100px", 3, "data", "ngModel"], ["kendoButton", "", 3, "click", "disabled", "title"], ["textField", "Name", "valueField", "ID", 2, "width", "225px", 3, "ngModelChange", "data", "ngModel"], ["textField", "Name", "valueField", "ID", 2, "width", "150px", 3, "ngModelChange", "data", "ngModel"], [2, "width", "100px", 3, "ngModel", "data"], [2, "width", "100px", 3, "ngModelChange", "ngModel", "data"], [1, "fa-solid", "fa-trash-can"]], template: function ResourcePermissionsComponent_Template(rf, ctx) { if (rf & 1) {
362
+ i0.ɵɵelementStart(0, "div", 0);
363
+ i0.ɵɵtemplate(1, ResourcePermissionsComponent_Conditional_1_Template, 1, 0, "kendo-loader")(2, ResourcePermissionsComponent_Conditional_2_Template, 2, 0, "button", 1);
364
+ i0.ɵɵelementStart(3, "div", 2);
365
+ i0.ɵɵtemplate(4, ResourcePermissionsComponent_Conditional_4_Template, 10, 6, "div", 3);
366
+ i0.ɵɵelementStart(5, "table", 4)(6, "thead")(7, "tr")(8, "th");
367
+ i0.ɵɵtext(9, "Type");
368
+ i0.ɵɵelementEnd();
369
+ i0.ɵɵelementStart(10, "th");
370
+ i0.ɵɵtext(11, "Name");
371
+ i0.ɵɵelementEnd();
372
+ i0.ɵɵtemplate(12, ResourcePermissionsComponent_Conditional_12_Template, 2, 0, "th")(13, ResourcePermissionsComponent_Conditional_13_Template, 2, 0, "th");
373
+ i0.ɵɵelementEnd()();
374
+ i0.ɵɵelementStart(14, "tbody");
375
+ i0.ɵɵrepeaterCreate(15, ResourcePermissionsComponent_For_16_Template, 7, 4, "tr", null, i0.ɵɵrepeaterTrackByIdentity);
376
+ i0.ɵɵelementEnd()()()();
377
+ } if (rf & 2) {
378
+ i0.ɵɵadvance();
379
+ i0.ɵɵconditional(ctx._Loading ? 1 : -1);
380
+ i0.ɵɵadvance();
381
+ i0.ɵɵconditional(ctx.ShowSaveButton ? 2 : -1);
382
+ i0.ɵɵadvance(2);
383
+ i0.ɵɵconditional(ctx.AllowAddPermissions ? 4 : -1);
384
+ i0.ɵɵadvance(8);
385
+ i0.ɵɵconditional(ctx.ShowPermissionLevels ? 12 : -1);
386
+ i0.ɵɵadvance();
387
+ i0.ɵɵconditional(ctx.AllowDeletePermissions ? 13 : -1);
388
+ i0.ɵɵadvance(2);
389
+ i0.ɵɵrepeater(ctx.resourcePermissions);
390
+ } }, dependencies: [i1.NgControlStatus, i1.NgModel, i2.ButtonComponent, i3.DropDownListComponent, i4.LoaderComponent], styles: ["\n\n.container[_ngcontent-%COMP%] {\n max-width: 100%;\n}\n\n\n\n.table-container[_ngcontent-%COMP%] {\n max-height: 400px; \n\n overflow-y: auto;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n\n\n.resource-table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n}\n\n.resource-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] {\n background-color: #f4f4f4;\n font-weight: bold;\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.resource-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .resource-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 12px;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\n.resource-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: #f8f8f8;\n}\n\n.resource-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.resource-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background-color: #f1f1f1;\n}\n\n\n\nbutton.k-button[_ngcontent-%COMP%] {\n background-color: #ff5252;\n color: white;\n border: none;\n padding: 5px 10px;\n border-radius: 4px;\n cursor: pointer;\n}\n\nbutton.k-button[_ngcontent-%COMP%]:hover {\n background-color: #ff1744;\n}\n\n.add-permission-label[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-right: 5px;\n font-weight: bold;\n}\n\n.add-permission-section[_ngcontent-%COMP%] {\n margin-top: 10px;\n margin-bottom: 10px;\n}"] });
373
391
  }
374
- ResourcePermissionsComponent.ɵfac = /*@__PURE__*/ (() => { let ɵResourcePermissionsComponent_BaseFactory; return function ResourcePermissionsComponent_Factory(t) { return (ɵResourcePermissionsComponent_BaseFactory || (ɵResourcePermissionsComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ResourcePermissionsComponent)))(t || ResourcePermissionsComponent); }; })();
375
- ResourcePermissionsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ResourcePermissionsComponent, selectors: [["mj-resource-permissions"]], inputs: { ResourceTypeID: "ResourceTypeID", ResourceRecordID: "ResourceRecordID", ShowSaveButton: "ShowSaveButton", ShowPermissionLevels: "ShowPermissionLevels", ShowUserErrorMessages: "ShowUserErrorMessages", AllowAddPermissions: "AllowAddPermissions", AllowEditPermissions: "AllowEditPermissions", AllowDeletePermissions: "AllowDeletePermissions", PermissionLevels: "PermissionLevels", PermissionTypes: "PermissionTypes", ExcludedRoleNames: "ExcludedRoleNames", ExcludedUserEmails: "ExcludedUserEmails" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 17, vars: 5, consts: [[1, "container"], ["kendoButton", ""], [1, "table-container"], [1, "add-permission-section"], [1, "resource-table"], ["kendoButton", "", 3, "click"], [1, "add-permission-label"], [2, "width", "100px", 3, "ngModelChange", "data", "ngModel"], ["textField", "Name", "valueField", "ID", 2, "width", "225px", 3, "data", "ngModel"], ["textField", "Name", "valueField", "ID", 2, "width", "150px", 3, "data", "ngModel"], [2, "width", "100px", 3, "data", "ngModel"], ["kendoButton", "", 3, "click", "disabled", "title"], ["textField", "Name", "valueField", "ID", 2, "width", "225px", 3, "ngModelChange", "data", "ngModel"], ["textField", "Name", "valueField", "ID", 2, "width", "150px", 3, "ngModelChange", "data", "ngModel"], [2, "width", "100px", 3, "ngModel", "data"], [2, "width", "100px", 3, "ngModelChange", "ngModel", "data"], [1, "fa-solid", "fa-trash-can"]], template: function ResourcePermissionsComponent_Template(rf, ctx) { if (rf & 1) {
376
- i0.ɵɵelementStart(0, "div", 0);
377
- i0.ɵɵtemplate(1, ResourcePermissionsComponent_Conditional_1_Template, 1, 0, "kendo-loader")(2, ResourcePermissionsComponent_Conditional_2_Template, 2, 0, "button", 1);
378
- i0.ɵɵelementStart(3, "div", 2);
379
- i0.ɵɵtemplate(4, ResourcePermissionsComponent_Conditional_4_Template, 10, 6, "div", 3);
380
- i0.ɵɵelementStart(5, "table", 4)(6, "thead")(7, "tr")(8, "th");
381
- i0.ɵɵtext(9, "Type");
382
- i0.ɵɵelementEnd();
383
- i0.ɵɵelementStart(10, "th");
384
- i0.ɵɵtext(11, "Name");
385
- i0.ɵɵelementEnd();
386
- i0.ɵɵtemplate(12, ResourcePermissionsComponent_Conditional_12_Template, 2, 0, "th")(13, ResourcePermissionsComponent_Conditional_13_Template, 2, 0, "th");
387
- i0.ɵɵelementEnd()();
388
- i0.ɵɵelementStart(14, "tbody");
389
- i0.ɵɵrepeaterCreate(15, ResourcePermissionsComponent_For_16_Template, 7, 4, "tr", null, i0.ɵɵrepeaterTrackByIdentity);
390
- i0.ɵɵelementEnd()()()();
391
- } if (rf & 2) {
392
- i0.ɵɵadvance();
393
- i0.ɵɵconditional(ctx._Loading ? 1 : -1);
394
- i0.ɵɵadvance();
395
- i0.ɵɵconditional(ctx.ShowSaveButton ? 2 : -1);
396
- i0.ɵɵadvance(2);
397
- i0.ɵɵconditional(ctx.AllowAddPermissions ? 4 : -1);
398
- i0.ɵɵadvance(8);
399
- i0.ɵɵconditional(ctx.ShowPermissionLevels ? 12 : -1);
400
- i0.ɵɵadvance();
401
- i0.ɵɵconditional(ctx.AllowDeletePermissions ? 13 : -1);
402
- i0.ɵɵadvance(2);
403
- i0.ɵɵrepeater(ctx.resourcePermissions);
404
- } }, dependencies: [i1.NgControlStatus, i1.NgModel, i2.ButtonComponent, i3.DropDownListComponent, i4.LoaderComponent], styles: ["\n\n.container[_ngcontent-%COMP%] {\n max-width: 100%;\n}\n\n\n\n.table-container[_ngcontent-%COMP%] {\n max-height: 400px; \n\n overflow-y: auto;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n\n\n.resource-table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n}\n\n.resource-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] {\n background-color: #f4f4f4;\n font-weight: bold;\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.resource-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .resource-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 12px;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\n.resource-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: #f8f8f8;\n}\n\n.resource-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.resource-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background-color: #f1f1f1;\n}\n\n\n\nbutton.k-button[_ngcontent-%COMP%] {\n background-color: #ff5252;\n color: white;\n border: none;\n padding: 5px 10px;\n border-radius: 4px;\n cursor: pointer;\n}\n\nbutton.k-button[_ngcontent-%COMP%]:hover {\n background-color: #ff1744;\n}\n\n.add-permission-label[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-right: 5px;\n font-weight: bold;\n}\n\n.add-permission-section[_ngcontent-%COMP%] {\n margin-top: 10px;\n margin-bottom: 10px;\n}"] });
405
392
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ResourcePermissionsComponent, [{
406
393
  type: Component,
407
394
  args: [{ selector: 'mj-resource-permissions', template: "<div class=\"container\">\n @if(_Loading) {\n <kendo-loader></kendo-loader>\n }\n @if(ShowSaveButton) {\n <button kendoButton (click)=\"SavePermissions()\">Save</button>\n }\n <div class=\"table-container\">\n @if(AllowAddPermissions) {\n <div class=\"add-permission-section\">\n <span class=\"add-permission-label\">Add Permission</span>\n <kendo-dropdownlist \n [data]=\"PermissionTypes\"\n [(ngModel)]=\"SelectedType\"\n style=\"width: 100px;\">\n </kendo-dropdownlist>\n @if (SelectedType === 'User') {\n <kendo-dropdownlist \n [data]=\"AllUsers\"\n [(ngModel)]=\"SelectedUser\"\n textField=\"Name\"\n valueField=\"ID\"\n style=\"width: 225px;\">\n </kendo-dropdownlist>\n }\n @else if (SelectedType === 'Role') {\n <kendo-dropdownlist \n [data]=\"AllRoles\"\n [(ngModel)]=\"SelectedRole\"\n textField=\"Name\"\n valueField=\"ID\"\n style=\"width: 150px;\">\n </kendo-dropdownlist>\n }\n @else {\n SelectedType: {{ SelectedType }}\n }\n @if (ShowPermissionLevels) {\n <kendo-dropdownlist \n [data]=\"PermissionLevels\"\n [(ngModel)]=\"SelectedPermissionLevel\"\n style=\"width: 100px;\">\n </kendo-dropdownlist>\n }\n <button kendoButton (click)=\"addPermission()\" [disabled]=\"permissionAlreadyExists()\" [title]=\"permissionAlreadyExists() ? 'This combination of Type/User/Role already exists below' : ''\" >Add</button>\n </div>\n }\n <table class=\"resource-table\">\n <thead>\n <tr>\n <th>Type</th>\n <th>Name</th>\n @if (ShowPermissionLevels) {\n <th>Level</th>\n }\n @if(AllowDeletePermissions) {\n <th>Actions</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (p of resourcePermissions; track p) {\n <tr>\n <td>{{ p.Type }}</td>\n <td>{{ p.Type === 'User' ? p.User : p.Role }}</td>\n @if (ShowPermissionLevels) {\n <td>\n @if (AllowEditPermissions) {\n <kendo-dropdownlist \n [(ngModel)]=\"p.PermissionLevel\"\n [data]=\"PermissionLevels\"\n style=\"width: 100px;\">\n </kendo-dropdownlist>\n }\n @else {\n {{ p.PermissionLevel }}\n }\n </td>\n }\n @if(AllowDeletePermissions) {\n <td>\n <button kendoButton (click)=\"deletePermission(p)\"><span class=\"fa-solid fa-trash-can\"></span></button>\n </td>\n }\n </tr> \n }\n </tbody>\n </table>\n </div>\n</div>\n", styles: ["/* Container styling */\n.container {\n max-width: 100%;\n}\n\n/* Table container for vertical scrolling */\n.table-container {\n max-height: 400px; /* Adjust as needed */\n overflow-y: auto;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n/* Table styling */\n.resource-table {\n width: 100%;\n border-collapse: collapse;\n}\n\n.resource-table thead {\n background-color: #f4f4f4;\n font-weight: bold;\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.resource-table th, .resource-table td {\n padding: 12px;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\n.resource-table th {\n background-color: #f8f8f8;\n}\n\n.resource-table tbody tr:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.resource-table tbody tr:hover {\n background-color: #f1f1f1;\n}\n\n/* Button styling */\nbutton.k-button {\n background-color: #ff5252;\n color: white;\n border: none;\n padding: 5px 10px;\n border-radius: 4px;\n cursor: pointer;\n}\n\nbutton.k-button:hover {\n background-color: #ff1744;\n}\n\n.add-permission-label {\n margin-left: 5px;\n margin-right: 5px;\n font-weight: bold;\n}\n\n.add-permission-section {\n margin-top: 10px;\n margin-bottom: 10px;\n}"] }]
@@ -1 +1 @@
1
- {"version":3,"file":"resource-permissions.component.js","sourceRoot":"","sources":["../../src/lib/resource-permissions.component.ts","../../src/lib/resource-permissions.component.html"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAuC,QAAQ,EAAsB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClH,OAAO,EAAE,wBAAwB,EAAwC,MAAM,+BAA+B,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;ICFrE,+BAA6B;;;;IAG7B,iCAAgD;IAA5B,gMAAS,wBAAiB,KAAC;IAAC,oBAAI;IAAA,iBAAS;;;;IAYvD,8CAKwB;IAHtB,wVAA0B;IAI5B,iBAAqB;;;IALnB,sCAAiB;IACjB,mDAA0B;;;;IAO5B,8CAKwB;IAHtB,wVAA0B;IAI5B,iBAAqB;;;IALnB,sCAAiB;IACjB,mDAA0B;;;IAO5B,YACF;;;IADE,kEACF;;;;IAEE,6CAGwB;IADtB,8WAAqC;IAEvC,iBAAqB;;;IAHnB,8CAAyB;IACzB,8DAAqC;;;;IA9BzC,AADF,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E,iBAAK,EACC;QACR,8BAAO;QACL,qHAwBC;QAIT,AADE,AADE,AADE,iBAAQ,EACF,EACJ,EACF;;QAxFJ,cAEC;QAFD,uCAEC;QACD,cAEC;QAFD,6CAEC;QAEC,eAsCC;QAtCD,kDAsCC;QAMK,eAEC;QAFD,oDAEC;QACD,cAEC;QAFD,sDAEC;QAIH,eAwBC;QAxBD,sCAwBC;;iFDtEI,4BAA4B;cALxC,SAAS;2BACE,yBAAyB;gBAQ1B,cAAc;kBAAtB,KAAK;YAIG,gBAAgB;kBAAxB,KAAK;YAMG,cAAc;kBAAtB,KAAK;YAKG,oBAAoB;kBAA5B,KAAK;YAKG,qBAAqB;kBAA7B,KAAK;YAIG,mBAAmB;kBAA3B,KAAK;YAIG,oBAAoB;kBAA5B,KAAK;YAIG,sBAAsB;kBAA9B,KAAK;YAKG,gBAAgB;kBAAxB,KAAK;YAKG,eAAe;kBAAvB,KAAK;YAMG,iBAAiB;kBAAzB,KAAK;YAMG,kBAAkB;kBAA1B,KAAK;;kFA1DK,4BAA4B"}
1
+ {"version":3,"file":"resource-permissions.component.js","sourceRoot":"","sources":["../../src/lib/resource-permissions.component.ts","../../src/lib/resource-permissions.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAuC,QAAQ,EAAsB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClH,OAAO,EAAE,wBAAwB,EAAwC,MAAM,+BAA+B,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;ICFrE,+BAA6B;;;;IAG7B,iCAAgD;IAA5B,gMAAS,wBAAiB,KAAC;IAAC,oBAAI;IAAA,iBAAS;;;;IAYvD,8CAKwB;IAHtB,wVAA0B;IAI5B,iBAAqB;;;IALnB,sCAAiB;IACjB,mDAA0B;;;;IAO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A0CpB,AADF,AADF,AADF,gCAA8B,YACrB,SACD,SACE;YAAA,oBAAI;YAAA,iBAAK;YACb,2BAAI;YAAA,qBAAI;YAAA,iBAAK;YAIb,AAHA,mFAA4B,sEAGC;YAIjC,AADE,iBAAK,EACC;YACR,8BAAO;YACL,qHAwBC;YAIT,AADE,AADE,AADE,iBAAQ,EACF,EACJ,EACF;;YAxFJ,cAEC;YAFD,uCAEC;YACD,cAEC;YAFD,6CAEC;YAEC,eAsCC;YAtCD,kDAsCC;YAMK,eAEC;YAFD,oDAEC;YACD,cAEC;YAFD,sDAEC;YAIH,eAwBC;YAxBD,sCAwBC;;;iFDtEI,4BAA4B;cALxC,SAAS;2BACE,yBAAyB;gBAQ1B,cAAc;kBAAtB,KAAK;YAIG,gBAAgB;kBAAxB,KAAK;YAMG,cAAc;kBAAtB,KAAK;YAKG,oBAAoB;kBAA5B,KAAK;YAKG,qBAAqB;kBAA7B,KAAK;YAIG,mBAAmB;kBAA3B,KAAK;YAIG,oBAAoB;kBAA5B,KAAK;YAIG,sBAAsB;kBAA9B,KAAK;YAKG,gBAAgB;kBAAxB,KAAK;YAKG,eAAe;kBAAvB,KAAK;YAMG,iBAAiB;kBAAzB,KAAK;YAMG,kBAAkB;kBAA1B,KAAK;;kFA1DK,4BAA4B"}
package/dist/module.js CHANGED
@@ -18,22 +18,22 @@ import { GenericDialogModule } from '@memberjunction/ng-generic-dialog';
18
18
  import { RequestResourceAccessComponent } from './lib/request-access.component';
19
19
  import * as i0 from "@angular/core";
20
20
  export class ResourcePermissionsModule {
21
+ static ɵfac = function ResourcePermissionsModule_Factory(t) { return new (t || ResourcePermissionsModule)(); };
22
+ static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ResourcePermissionsModule });
23
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
24
+ GridModule,
25
+ FormsModule,
26
+ DialogsModule,
27
+ ExcelExportModule,
28
+ CompareRecordsModule,
29
+ ContainerDirectivesModule,
30
+ ButtonsModule,
31
+ DropDownsModule,
32
+ IndicatorsModule,
33
+ ListViewModule,
34
+ LayoutModule,
35
+ GenericDialogModule] });
21
36
  }
22
- ResourcePermissionsModule.ɵfac = function ResourcePermissionsModule_Factory(t) { return new (t || ResourcePermissionsModule)(); };
23
- ResourcePermissionsModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ResourcePermissionsModule });
24
- ResourcePermissionsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
25
- GridModule,
26
- FormsModule,
27
- DialogsModule,
28
- ExcelExportModule,
29
- CompareRecordsModule,
30
- ContainerDirectivesModule,
31
- ButtonsModule,
32
- DropDownsModule,
33
- IndicatorsModule,
34
- ListViewModule,
35
- LayoutModule,
36
- GenericDialogModule] });
37
37
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ResourcePermissionsModule, [{
38
38
  type: NgModule,
39
39
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,2BAA2B;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,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B;cA3BrC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,4BAA4B;oBAC5B,2BAA2B;oBAC3B,8BAA8B;iBAC/B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,UAAU;oBACV,WAAW;oBACX,aAAa;oBACb,iBAAiB;oBACjB,oBAAoB;oBACpB,yBAAyB;oBACzB,aAAa;oBACb,eAAe;oBACf,gBAAgB;oBAChB,cAAc;oBACd,YAAY;oBACZ,mBAAmB;iBACpB;gBACD,OAAO,EAAE;oBACP,4BAA4B;oBAC5B,2BAA2B;oBAC3B,8BAA8B;iBAC/B;aACF;;wFACY,yBAAyB,mBAzBlC,4BAA4B;QAC5B,2BAA2B;QAC3B,8BAA8B,aAG9B,YAAY;QACZ,UAAU;QACV,WAAW;QACX,aAAa;QACb,iBAAiB;QACjB,oBAAoB;QACpB,yBAAyB;QACzB,aAAa;QACb,eAAe;QACf,gBAAgB;QAChB,cAAc;QACd,YAAY;QACZ,mBAAmB,aAGnB,4BAA4B;QAC5B,2BAA2B;QAC3B,8BAA8B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-resource-permissions",
3
- "version": "2.48.0",
3
+ "version": "2.49.0",
4
4
  "description": "MemberJunction: Generic Angular components for displaying/editing permissions for a resource",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -25,13 +25,13 @@
25
25
  "@angular/router": "18.0.2"
26
26
  },
27
27
  "dependencies": {
28
- "@memberjunction/global": "2.48.0",
29
- "@memberjunction/core": "2.48.0",
30
- "@memberjunction/core-entities": "2.48.0",
31
- "@memberjunction/ng-container-directives": "2.48.0",
32
- "@memberjunction/ng-notifications": "2.48.0",
33
- "@memberjunction/ng-generic-dialog": "2.48.0",
34
- "@memberjunction/ng-base-types": "2.48.0",
28
+ "@memberjunction/global": "2.49.0",
29
+ "@memberjunction/core": "2.49.0",
30
+ "@memberjunction/core-entities": "2.49.0",
31
+ "@memberjunction/ng-container-directives": "2.49.0",
32
+ "@memberjunction/ng-notifications": "2.49.0",
33
+ "@memberjunction/ng-generic-dialog": "2.49.0",
34
+ "@memberjunction/ng-base-types": "2.49.0",
35
35
  "@progress/kendo-angular-dropdowns": "16.2.0",
36
36
  "@progress/kendo-angular-grid": "16.2.0",
37
37
  "@progress/kendo-angular-buttons": "16.2.0",