@memberjunction/ng-resource-permissions 2.8.0 → 2.9.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.
@@ -26,6 +26,10 @@ export declare class AvailableResourcesComponent implements AfterViewInit {
26
26
  resourcePermissions: ResourcePermissionEntity[];
27
27
  resources: ResourceData[];
28
28
  ngAfterViewInit(): Promise<void>;
29
+ /**
30
+ * This method will refresh the contents of the component based on the current state of the component.
31
+ */
32
+ Refresh(): Promise<void>;
29
33
  static ɵfac: i0.ɵɵFactoryDeclaration<AvailableResourcesComponent, never>;
30
34
  static ɵcmp: i0.ɵɵComponentDeclaration<AvailableResourcesComponent, "mj-available-resources", never, { "User": { "alias": "User"; "required": false; }; "ResourceTypeID": { "alias": "ResourceTypeID"; "required": false; }; "ResourceExtraFilter": { "alias": "ResourceExtraFilter"; "required": false; }; "SelectionMode": { "alias": "SelectionMode"; "required": false; }; "ExtraColumns": { "alias": "ExtraColumns"; "required": false; }; "SelectedResources": { "alias": "SelectedResources"; "required": false; }; }, { "SelectionChanged": "SelectionChanged"; }, never, never, false, never>;
31
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"available-resources.component.d.ts","sourceRoot":"","sources":["../../src/lib/available-resources.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,YAAY,EAA4B,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,eAAe,EAAqB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAA4B,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,YAAY,EAAiB,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAqB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;;AAE7D;;GAEG;AACH,qBAKa,2BAA4B,YAAW,aAAa;IACpD,IAAI,EAAG,QAAQ,CAAC;IAChB,cAAc,EAAG,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,QAAQ,GAAG,UAAU,CAAY;IAEzD;;OAEG;IACM,YAAY,EAAE,MAAM,CAAM;IAE1B,iBAAiB,EAAE,YAAY,EAAE,CAAM;IACtC,gBAAgB,+BAAsC;IAEzD,mBAAmB,EAAE,MAAM,EAAE,CAAM;IACnC,gBAAgB,EAAE,eAAe,EAAE,CAAM;IAEpB,aAAa,EAAG,aAAa,CAAC;IACnD,iBAAiB,CAAC,CAAC,EAAE,cAAc;IAcnC,mBAAmB,EAAE,wBAAwB,EAAE,CAAM;IACrD,SAAS,EAAE,YAAY,EAAE,CAAM;IAChC,eAAe;yCAlCZ,2BAA2B;2CAA3B,2BAA2B;CAmFvC"}
1
+ {"version":3,"file":"available-resources.component.d.ts","sourceRoot":"","sources":["../../src/lib/available-resources.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,YAAY,EAA4B,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,eAAe,EAAqB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAA4B,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,YAAY,EAAiB,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;;AAE7D;;GAEG;AACH,qBAKa,2BAA4B,YAAW,aAAa;IACpD,IAAI,EAAG,QAAQ,CAAC;IAChB,cAAc,EAAG,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,QAAQ,GAAG,UAAU,CAAY;IAEzD;;OAEG;IACM,YAAY,EAAE,MAAM,CAAM;IAE1B,iBAAiB,EAAE,YAAY,EAAE,CAAM;IACtC,gBAAgB,+BAAsC;IAEzD,mBAAmB,EAAE,MAAM,EAAE,CAAM;IACnC,gBAAgB,EAAE,eAAe,EAAE,CAAM;IAEpB,aAAa,EAAG,aAAa,CAAC;IACnD,iBAAiB,CAAC,CAAC,EAAE,cAAc;IAcnC,mBAAmB,EAAE,wBAAwB,EAAE,CAAM;IACrD,SAAS,EAAE,YAAY,EAAE,CAAM;IAChC,eAAe;IAIrB;;OAEG;IACU,OAAO;yCAzCX,2BAA2B;2CAA3B,2BAA2B;CAgGvC"}
@@ -76,6 +76,14 @@ export class AvailableResourcesComponent {
76
76
  this.SelectionChanged.emit(this.SelectedResources);
77
77
  }
78
78
  ngAfterViewInit() {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ yield this.Refresh();
81
+ });
82
+ }
83
+ /**
84
+ * This method will refresh the contents of the component based on the current state of the component.
85
+ */
86
+ Refresh() {
79
87
  return __awaiter(this, void 0, void 0, function* () {
80
88
  if (!this.User) {
81
89
  throw new Error('User is a required property for the AvailableResourcesDialogComponent');
@@ -84,42 +92,48 @@ export class AvailableResourcesComponent {
84
92
  yield ResourcePermissionEngine.Instance.Config();
85
93
  // now we can get the permissions for the specified resource
86
94
  this.resourcePermissions = ResourcePermissionEngine.Instance.GetUserAvailableResources(this.User, this.ResourceTypeID);
87
- const rt = SharedService.Instance.ResourceTypeByID(this.ResourceTypeID);
88
- if (!rt || !rt.EntityID)
89
- throw new Error(`Resource Type ${this.ResourceTypeID} not found`);
90
- const md = new Metadata();
91
- const entity = md.EntityByID(rt.EntityID);
92
- if (!entity || !entity.NameField)
93
- throw new Error(`Entity ${rt.EntityID} not found, or no Name field defined`);
94
- const rv = new RunView();
95
- const nameField = entity.NameField;
96
- if (this.ExtraColumns && this.ExtraColumns.length > 0) {
97
- /// split the comma delim string and for each item find it in the EntityFields collection
98
- const extraColumns = this.ExtraColumns.split(',');
99
- extraColumns.forEach((ec) => {
100
- const field = entity.Fields.find((f) => f.Name.trim().toLowerCase() === ec.trim().toLowerCase());
101
- if (field)
102
- this.gridExtraColumns.push(field);
103
- });
95
+ if (this.resourcePermissions.length === 0) {
96
+ this.resources = [];
104
97
  }
105
- const extraFilter = this.ResourceExtraFilter ? ` AND (${this.ResourceExtraFilter})` : '';
106
- const result = yield rv.RunView({
107
- EntityName: entity.Name,
108
- ExtraFilter: `(ID in (${this.resourcePermissions.map((r) => `'${r.ResourceRecordID}'`).join(',')})${extraFilter})`,
109
- OrderBy: nameField.Name
110
- });
111
- if (!result || !result.Success)
112
- throw new Error(`Error running view for entity ${entity.Name}`);
113
- // only return rows where we have a record in result.Results
114
- this.resources = result.Results.map((r) => {
115
- return new ResourceData({
116
- ResourceRecordID: r.ID,
117
- Name: r[nameField.Name],
118
- ResourceTypeID: this.ResourceTypeID,
119
- ResourceType: rt.Name,
120
- Configuration: r // pass the whole resource record into configuration so it is accessible as desired
98
+ else {
99
+ const rt = SharedService.Instance.ResourceTypeByID(this.ResourceTypeID);
100
+ if (!rt || !rt.EntityID)
101
+ throw new Error(`Resource Type ${this.ResourceTypeID} not found`);
102
+ const md = new Metadata();
103
+ const entity = md.EntityByID(rt.EntityID);
104
+ if (!entity || !entity.NameField)
105
+ throw new Error(`Entity ${rt.EntityID} not found, or no Name field defined`);
106
+ const rv = new RunView();
107
+ const nameField = entity.NameField;
108
+ if (this.ExtraColumns && this.ExtraColumns.length > 0) {
109
+ /// split the comma delim string and for each item find it in the EntityFields collection
110
+ const extraColumns = this.ExtraColumns.split(',');
111
+ this.gridExtraColumns = [];
112
+ extraColumns.forEach((ec) => {
113
+ const field = entity.Fields.find((f) => f.Name.trim().toLowerCase() === ec.trim().toLowerCase());
114
+ if (field)
115
+ this.gridExtraColumns.push(field);
116
+ });
117
+ }
118
+ const extraFilter = this.ResourceExtraFilter ? ` AND (${this.ResourceExtraFilter})` : '';
119
+ const result = yield rv.RunView({
120
+ EntityName: entity.Name,
121
+ ExtraFilter: `(ID in (${this.resourcePermissions.map((r) => `'${r.ResourceRecordID}'`).join(',')})${extraFilter})`,
122
+ OrderBy: nameField.Name
123
+ });
124
+ if (!result || !result.Success)
125
+ throw new Error(`Error running view for entity ${entity.Name}`);
126
+ // only return rows where we have a record in result.Results
127
+ this.resources = result.Results.map((r) => {
128
+ return new ResourceData({
129
+ ResourceRecordID: r.ID,
130
+ Name: r[nameField.Name],
131
+ ResourceTypeID: this.ResourceTypeID,
132
+ ResourceType: rt.Name,
133
+ Configuration: r // pass the whole resource record into configuration so it is accessible as desired
134
+ });
121
135
  });
122
- });
136
+ }
123
137
  });
124
138
  }
125
139
  }
@@ -1 +1 @@
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,QAAQ,EAAE,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAA4B,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;;;;;;ICchD,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;;ADbb;;GAEG;AAMH,MAAM,OAAO,2BAA2B;IALxC;QASa,kBAAa,GAA0B,QAAQ,CAAC;QAEzD;;WAEG;QACM,iBAAY,GAAW,EAAE,CAAC;QAE1B,sBAAiB,GAAmB,EAAE,CAAC;QACtC,qBAAgB,GAAG,IAAI,YAAY,EAAkB,CAAC;QAEzD,wBAAmB,GAAa,EAAE,CA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,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,WAAW,GAAG;gBAClH,OAAO,EAAE,SAAS,CAAC,IAAI;aAC1B,CAAC,CAAA;YACF,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO;gBAC1B,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YAEpE,4DAA4D;YAC5D,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACtC,OAAO,IAAI,YAAY,CAAC;oBACpB,gBAAgB,EAAE,CAAC,CAAC,EAAE;oBACtB,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;oBACvB,cAAc,EAAE,IAAI,CAAC,cAAc;oBACnC,YAAY,EAAE,EAAE,CAAC,IAAI;oBACrB,aAAa,EAAE,CAAC,CAAC,mFAAmF;iBACvG,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;;sGAlFQ,2BAA2B;8EAA3B,2BAA2B;;;;;;QCfxC,8BAAuB;QACnB,2FAAY;QAsBd,iBAAM;;QAtBJ,cAqBC;QArBD,mCAqBC;;iFDPQ,2BAA2B;cALvC,SAAS;2BACE,wBAAwB;gBAKvB,IAAI;kBAAZ,KAAK;YACG,cAAc;kBAAtB,KAAK;YACG,mBAAmB;kBAA3B,KAAK;YACG,aAAa;kBAArB,KAAK;YAKG,YAAY;kBAApB,KAAK;YAEG,iBAAiB;kBAAzB,KAAK;YACI,gBAAgB;kBAAzB,MAAM;YAKqB,aAAa;kBAAxC,SAAS;mBAAC,eAAe;;kFAjBjB,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":";;;;;;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,EAAE,SAAS,CAAC,IAAI;iBAC1B,CAAC,CAAA;gBACF,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO;oBAC1B,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAEpE,4DAA4D;gBAC5D,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBACtC,OAAO,IAAI,YAAY,CAAC;wBACpB,gBAAgB,EAAE,CAAC,CAAC,EAAE;wBACtB,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;wBACvB,cAAc,EAAE,IAAI,CAAC,cAAc;wBACnC,YAAY,EAAE,EAAE,CAAC,IAAI;wBACrB,aAAa,EAAE,CAAC,CAAC,mFAAmF;qBACvG,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC;KAAA;;sGA/FQ,2BAA2B;8EAA3B,2BAA2B;;;;;;QCfxC,8BAAuB;QACnB,2FAAY;QAsBd,iBAAM;;QAtBJ,cAqBC;QArBD,mCAqBC;;iFDPQ,2BAA2B;cALvC,SAAS;2BACE,wBAAwB;gBAKvB,IAAI;kBAAZ,KAAK;YACG,cAAc;kBAAtB,KAAK;YACG,mBAAmB;kBAA3B,KAAK;YACG,aAAa;kBAArB,KAAK;YAKG,YAAY;kBAApB,KAAK;YAEG,iBAAiB;kBAAzB,KAAK;YACI,gBAAgB;kBAAzB,MAAM;YAKqB,aAAa;kBAAxC,SAAS;mBAAC,eAAe;;kFAjBjB,2BAA2B"}
@@ -0,0 +1,39 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { ResourcePermissionEntity, ResourceTypeEntity } from '@memberjunction/core-entities';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * 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
6
+ */
7
+ export declare class RequestResourceAccessComponent implements OnInit {
8
+ /**
9
+ * The name of the resource type that the user is requesting access to
10
+ */
11
+ ResourceType: string;
12
+ /**
13
+ * Optional, the name of the resource that the user is requesting access to that will be displayed to the user
14
+ */
15
+ ResourceName: string;
16
+ /**
17
+ * The resource record ID that the user is requesting access to
18
+ */
19
+ ResourceRecordID: string;
20
+ /**
21
+ * The default value for the permission level
22
+ */
23
+ PermissionLevel: 'View' | 'Edit' | 'Owner';
24
+ /**
25
+ * 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.
26
+ */
27
+ ShowPermissionLevelDropdown: boolean;
28
+ AccessRequested: EventEmitter<ResourcePermissionEntity>;
29
+ /**
30
+ * The resource type object that the user is requesting access to for all info on the resource type
31
+ */
32
+ ResourceTypeObject: ResourceTypeEntity;
33
+ AfterRequest: boolean;
34
+ ngOnInit(): Promise<void>;
35
+ requestAccess(): Promise<void>;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<RequestResourceAccessComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<RequestResourceAccessComponent, "mj-request-resource-access", never, { "ResourceType": { "alias": "ResourceType"; "required": false; }; "ResourceName": { "alias": "ResourceName"; "required": false; }; "ResourceRecordID": { "alias": "ResourceRecordID"; "required": false; }; "PermissionLevel": { "alias": "PermissionLevel"; "required": false; }; "ShowPermissionLevelDropdown": { "alias": "ShowPermissionLevelDropdown"; "required": false; }; }, { "AccessRequested": "AccessRequested"; }, never, never, false, never>;
38
+ }
39
+ //# sourceMappingURL=request-access.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-access.component.d.ts","sourceRoot":"","sources":["../../src/lib/request-access.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,MAAM,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAA4B,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;;AAIvH;;GAEG;AACH,qBAKa,8BAA+B,YAAW,MAAM;IACzD;;OAEG;IACM,YAAY,EAAG,MAAM,CAAC;IAE/B;;OAEG;IACM,YAAY,EAAE,MAAM,CAAI;IACjC;;OAEG;IACM,gBAAgB,EAAG,MAAM,CAAC;IAEnC;;OAEG;IACM,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAU;IAE7D;;OAEG;IACM,2BAA2B,EAAE,OAAO,CAAQ;IAE3C,eAAe,yCAAgD;IAEzE;;OAEG;IACI,kBAAkB,EAAG,kBAAkB,CAAC;IACxC,YAAY,EAAE,OAAO,CAAS;IAE/B,QAAQ;IASD,aAAa;yCA1CjB,8BAA8B;2CAA9B,8BAA8B;CA+D1C"}
@@ -0,0 +1,155 @@
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, EventEmitter, Input, Output } from '@angular/core';
11
+ import { LogError, Metadata } from '@memberjunction/core';
12
+ import { ResourcePermissionEngine } from '@memberjunction/core-entities';
13
+ import { SharedService } from '@memberjunction/ng-shared';
14
+ import * as i0 from "@angular/core";
15
+ import * as i1 from "@angular/forms";
16
+ import * as i2 from "@progress/kendo-angular-buttons";
17
+ function RequestResourceAccessComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
18
+ i0.ɵɵelementStart(0, "p");
19
+ i0.ɵɵtext(1, " You do not have access to this resource. Click the button below to request access.");
20
+ i0.ɵɵelementEnd();
21
+ } }
22
+ function RequestResourceAccessComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
23
+ i0.ɵɵelementStart(0, "h3");
24
+ i0.ɵɵtext(1, "Your request has been submitted");
25
+ i0.ɵɵelementEnd();
26
+ i0.ɵɵelementStart(2, "p");
27
+ i0.ɵɵtext(3, " You will be notified when your request has been processed.");
28
+ i0.ɵɵelementEnd();
29
+ } }
30
+ function RequestResourceAccessComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
31
+ const _r1 = i0.ɵɵgetCurrentView();
32
+ i0.ɵɵelementStart(0, "span")(1, "label", 5);
33
+ i0.ɵɵtext(2, "Permission Level:");
34
+ i0.ɵɵelementEnd();
35
+ i0.ɵɵelementStart(3, "select", 6);
36
+ i0.ɵɵtwoWayListener("ngModelChange", function RequestResourceAccessComponent_Conditional_10_Template_select_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.PermissionLevel, $event) || (ctx_r1.PermissionLevel = $event); return i0.ɵɵresetView($event); });
37
+ i0.ɵɵelementStart(4, "option", 7);
38
+ i0.ɵɵtext(5, "View");
39
+ i0.ɵɵelementEnd();
40
+ i0.ɵɵelementStart(6, "option", 8);
41
+ i0.ɵɵtext(7, "Edit");
42
+ i0.ɵɵelementEnd();
43
+ i0.ɵɵelementStart(8, "option", 9);
44
+ i0.ɵɵtext(9, "Owner");
45
+ i0.ɵɵelementEnd()()();
46
+ } if (rf & 2) {
47
+ const ctx_r1 = i0.ɵɵnextContext();
48
+ i0.ɵɵadvance(3);
49
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.PermissionLevel);
50
+ } }
51
+ function RequestResourceAccessComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
52
+ const _r3 = i0.ɵɵgetCurrentView();
53
+ i0.ɵɵelementStart(0, "div", 4)(1, "button", 10);
54
+ i0.ɵɵlistener("click", function RequestResourceAccessComponent_Conditional_11_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.requestAccess()); });
55
+ i0.ɵɵelement(2, "i", 11);
56
+ i0.ɵɵtext(3, " Request Access ");
57
+ i0.ɵɵelementEnd()();
58
+ } }
59
+ /**
60
+ * 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
61
+ */
62
+ export class RequestResourceAccessComponent {
63
+ constructor() {
64
+ /**
65
+ * Optional, the name of the resource that the user is requesting access to that will be displayed to the user
66
+ */
67
+ this.ResourceName = "";
68
+ /**
69
+ * The default value for the permission level
70
+ */
71
+ this.PermissionLevel = 'View';
72
+ /**
73
+ * 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.
74
+ */
75
+ this.ShowPermissionLevelDropdown = true;
76
+ this.AccessRequested = new EventEmitter();
77
+ this.AfterRequest = false;
78
+ }
79
+ ngOnInit() {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ yield ResourcePermissionEngine.Instance.Config();
82
+ const rt = ResourcePermissionEngine.Instance.ResourceTypes.find(x => x.Name.trim().toLowerCase() === this.ResourceType.trim().toLowerCase());
83
+ if (rt)
84
+ this.ResourceTypeObject = rt;
85
+ else
86
+ throw new Error(`Resource Type ${this.ResourceType} not found`);
87
+ });
88
+ }
89
+ requestAccess() {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ const md = new Metadata();
92
+ const permission = yield md.GetEntityObject("Resource Permissions");
93
+ permission.ResourceTypeID = this.ResourceTypeObject.ID;
94
+ permission.ResourceRecordID = this.ResourceRecordID;
95
+ permission.Status = 'Requested';
96
+ permission.Type = 'User';
97
+ permission.UserID = md.CurrentUser.ID;
98
+ permission.PermissionLevel = this.PermissionLevel;
99
+ if (yield permission.Save()) {
100
+ // worked, fire the event.
101
+ // NOTE - the notification creatd to notify the resource owner happens in the ResourcePermissionEntity sub-class not here in the UI
102
+ this.AccessRequested.emit(permission);
103
+ this.AfterRequest = true;
104
+ }
105
+ else {
106
+ //failed
107
+ LogError(`Failed to request access to ${this.ResourceType} record ${this.ResourceRecordID}`, undefined, permission.LatestResult);
108
+ SharedService.Instance.CreateSimpleNotification(`Failed to request access to ${this.ResourceType} record ${this.ResourceName} (${this.ResourceRecordID})`, 'error', 5000);
109
+ }
110
+ });
111
+ }
112
+ }
113
+ RequestResourceAccessComponent.ɵfac = function RequestResourceAccessComponent_Factory(t) { return new (t || RequestResourceAccessComponent)(); };
114
+ 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" }, 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) {
115
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
116
+ i0.ɵɵelement(2, "i", 2);
117
+ i0.ɵɵelementEnd();
118
+ i0.ɵɵelementStart(3, "div", 3)(4, "h3");
119
+ i0.ɵɵtext(5, "Request Access");
120
+ i0.ɵɵelementEnd();
121
+ i0.ɵɵelementStart(6, "h5");
122
+ i0.ɵɵtext(7);
123
+ i0.ɵɵelementEnd();
124
+ 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");
125
+ i0.ɵɵelementEnd();
126
+ i0.ɵɵtemplate(11, RequestResourceAccessComponent_Conditional_11_Template, 4, 0, "div", 4);
127
+ i0.ɵɵelementEnd();
128
+ } if (rf & 2) {
129
+ i0.ɵɵadvance(7);
130
+ i0.ɵɵtextInterpolate2("", ctx.ResourceType ? ctx.ResourceType : "Resource", "", ctx.ResourceName ? ": " + ctx.ResourceName : "", "");
131
+ i0.ɵɵadvance();
132
+ i0.ɵɵconditional(!ctx.AfterRequest ? 8 : 9);
133
+ i0.ɵɵadvance(2);
134
+ i0.ɵɵconditional(ctx.ShowPermissionLevelDropdown && !ctx.AfterRequest ? 10 : -1);
135
+ i0.ɵɵadvance();
136
+ i0.ɵɵconditional(!ctx.AfterRequest ? 11 : -1);
137
+ } }, 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 }"] });
138
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RequestResourceAccessComponent, [{
139
+ type: Component,
140
+ 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 "] }]
141
+ }], null, { ResourceType: [{
142
+ type: Input
143
+ }], ResourceName: [{
144
+ type: Input
145
+ }], ResourceRecordID: [{
146
+ type: Input
147
+ }], PermissionLevel: [{
148
+ type: Input
149
+ }], ShowPermissionLevelDropdown: [{
150
+ type: Input
151
+ }], AccessRequested: [{
152
+ type: Output
153
+ }] }); })();
154
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RequestResourceAccessComponent, { className: "RequestResourceAccessComponent", filePath: "src/lib/request-access.component.ts", lineNumber: 15 }); })();
155
+ //# sourceMappingURL=request-access.component.js.map
@@ -0,0 +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,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA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AEJ,AADF,8BAA0B,SACpB;QAAA,8BAAc;QAAA,iBAAK;QACvB,0BAAI;QAAA,YAAuF;QAAA,iBAAK;QAQhG,AAJA,AAHA,kFAAoB,gEAGb,2EAI4C;QAUrD,iBAAM;QACN,yFAAqB;QAOzB,iBAAM;;QA1BI,eAAuF;QAAvF,oIAAuF;QAC3F,cAMC;QAND,2CAMC;QACD,eASC;QATD,gFASC;QAEH,cAMC;QAND,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,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./resource-permissions.component";
3
- import * as i2 from "./available-resources.component";
4
- import * as i3 from "./available-resources-dialog.component";
2
+ import * as i1 from "./lib/resource-permissions.component";
3
+ import * as i2 from "./lib/available-resources.component";
4
+ import * as i3 from "./lib/request-access.component";
5
5
  import * as i4 from "@angular/common";
6
6
  import * as i5 from "@progress/kendo-angular-grid";
7
7
  import * as i6 from "@angular/forms";
@@ -14,9 +14,10 @@ import * as i12 from "@progress/kendo-angular-dropdowns";
14
14
  import * as i13 from "@progress/kendo-angular-indicators";
15
15
  import * as i14 from "@progress/kendo-angular-listview";
16
16
  import * as i15 from "@progress/kendo-angular-layout";
17
+ import * as i16 from "@memberjunction/ng-generic-dialog";
17
18
  export declare class ResourcePermissionsModule {
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourcePermissionsModule, never>;
19
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourcePermissionsModule, [typeof i1.ResourcePermissionsComponent, typeof i2.AvailableResourcesComponent, typeof i3.AvailableResourcesDialogComponent], [typeof i4.CommonModule, typeof i5.GridModule, typeof i6.FormsModule, typeof i7.DialogsModule, typeof i8.ExcelExportModule, typeof i9.CompareRecordsModule, typeof i10.ContainerDirectivesModule, typeof i11.ButtonsModule, typeof i12.DropDownsModule, typeof i13.IndicatorsModule, typeof i14.ListViewModule, typeof i15.LayoutModule], [typeof i1.ResourcePermissionsComponent, typeof i2.AvailableResourcesComponent, typeof i3.AvailableResourcesDialogComponent]>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ResourcePermissionsModule, [typeof i1.ResourcePermissionsComponent, typeof i2.AvailableResourcesComponent, typeof i3.RequestResourceAccessComponent], [typeof i4.CommonModule, typeof i5.GridModule, typeof i6.FormsModule, typeof i7.DialogsModule, typeof i8.ExcelExportModule, typeof i9.CompareRecordsModule, typeof i10.ContainerDirectivesModule, typeof i11.ButtonsModule, typeof i12.DropDownsModule, typeof i13.IndicatorsModule, typeof i14.ListViewModule, typeof i15.LayoutModule, typeof i16.GenericDialogModule], [typeof i1.ResourcePermissionsComponent, typeof i2.AvailableResourcesComponent, typeof i3.RequestResourceAccessComponent]>;
20
21
  static ɵinj: i0.ɵɵInjectorDeclaration<ResourcePermissionsModule>;
21
22
  }
22
23
  //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAsBA,qBA2Ba,yBAAyB;yCAAzB,yBAAyB;0CAAzB,yBAAyB;0CAAzB,yBAAyB;CAAI"}
@@ -1,5 +1,5 @@
1
1
  import { NgModule } from '@angular/core';
2
- import { ResourcePermissionsComponent } from './resource-permissions.component';
2
+ import { ResourcePermissionsComponent } from './lib/resource-permissions.component';
3
3
  import { CommonModule } from '@angular/common';
4
4
  // Kendo UI Angular imports
5
5
  import { GridModule } from '@progress/kendo-angular-grid';
@@ -13,8 +13,9 @@ import { ContainerDirectivesModule } from '@memberjunction/ng-container-directiv
13
13
  import { FormsModule } from '@angular/forms';
14
14
  import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
15
15
  import { IndicatorsModule } from '@progress/kendo-angular-indicators';
16
- import { AvailableResourcesComponent } from './available-resources.component';
17
- import { AvailableResourcesDialogComponent } from './available-resources-dialog.component';
16
+ import { AvailableResourcesComponent } from './lib/available-resources.component';
17
+ import { GenericDialogModule } from '@memberjunction/ng-generic-dialog';
18
+ import { RequestResourceAccessComponent } from './lib/request-access.component';
18
19
  import * as i0 from "@angular/core";
19
20
  export class ResourcePermissionsModule {
20
21
  }
@@ -31,14 +32,15 @@ ResourcePermissionsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
31
32
  DropDownsModule,
32
33
  IndicatorsModule,
33
34
  ListViewModule,
34
- LayoutModule] });
35
+ LayoutModule,
36
+ GenericDialogModule] });
35
37
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ResourcePermissionsModule, [{
36
38
  type: NgModule,
37
39
  args: [{
38
40
  declarations: [
39
41
  ResourcePermissionsComponent,
40
42
  AvailableResourcesComponent,
41
- AvailableResourcesDialogComponent
43
+ RequestResourceAccessComponent
42
44
  ],
43
45
  imports: [
44
46
  CommonModule,
@@ -52,18 +54,19 @@ ResourcePermissionsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
52
54
  DropDownsModule,
53
55
  IndicatorsModule,
54
56
  ListViewModule,
55
- LayoutModule
57
+ LayoutModule,
58
+ GenericDialogModule
56
59
  ],
57
60
  exports: [
58
61
  ResourcePermissionsComponent,
59
62
  AvailableResourcesComponent,
60
- AvailableResourcesDialogComponent
63
+ RequestResourceAccessComponent
61
64
  ]
62
65
  }]
63
66
  }], null, null); })();
64
67
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ResourcePermissionsModule, { declarations: [ResourcePermissionsComponent,
65
68
  AvailableResourcesComponent,
66
- AvailableResourcesDialogComponent], imports: [CommonModule,
69
+ RequestResourceAccessComponent], imports: [CommonModule,
67
70
  GridModule,
68
71
  FormsModule,
69
72
  DialogsModule,
@@ -74,7 +77,8 @@ ResourcePermissionsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports:
74
77
  DropDownsModule,
75
78
  IndicatorsModule,
76
79
  ListViewModule,
77
- LayoutModule], exports: [ResourcePermissionsComponent,
80
+ LayoutModule,
81
+ GenericDialogModule], exports: [ResourcePermissionsComponent,
78
82
  AvailableResourcesComponent,
79
- AvailableResourcesDialogComponent] }); })();
83
+ RequestResourceAccessComponent] }); })();
80
84
  //# sourceMappingURL=module.js.map
@@ -0,0 +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,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;;AA6BhF,MAAM,OAAO,yBAAyB;;kGAAzB,yBAAyB;2EAAzB,yBAAyB;+EApBlC,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;iFAQV,yBAAyB;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"}
@@ -1,5 +1,5 @@
1
1
  export * from './lib/resource-permissions.component';
2
2
  export * from './lib/available-resources.component';
3
- export * from './lib/available-resources-dialog.component';
4
- export * from './lib/module';
3
+ export * from './lib/request-access.component';
4
+ export * from './module';
5
5
  //# sourceMappingURL=public-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,UAAU,CAAC"}
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export * from './lib/resource-permissions.component';
5
5
  export * from './lib/available-resources.component';
6
- export * from './lib/available-resources-dialog.component';
7
- export * from './lib/module';
6
+ export * from './lib/request-access.component';
7
+ export * from './module';
8
8
  //# sourceMappingURL=public-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-resource-permissions",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "MemberJunction: 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,11 +25,12 @@
25
25
  "@angular/router": "18.0.2"
26
26
  },
27
27
  "dependencies": {
28
- "@memberjunction/core-entities": "2.8.0",
29
- "@memberjunction/global": "2.8.0",
30
- "@memberjunction/core": "2.8.0",
31
- "@memberjunction/ng-container-directives": "2.8.0",
32
- "@memberjunction/ng-shared": "2.8.0",
28
+ "@memberjunction/core-entities": "2.9.0",
29
+ "@memberjunction/global": "2.9.0",
30
+ "@memberjunction/core": "2.9.0",
31
+ "@memberjunction/ng-container-directives": "2.9.0",
32
+ "@memberjunction/ng-shared": "2.9.0",
33
+ "@memberjunction/ng-generic-dialog": "2.9.0",
33
34
  "@progress/kendo-angular-dropdowns": "16.2.0",
34
35
  "@progress/kendo-angular-grid": "16.2.0",
35
36
  "@progress/kendo-angular-buttons": "16.2.0",
@@ -1,39 +0,0 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { UserInfo } from '@memberjunction/core';
3
- import { ResourceData } from '@memberjunction/ng-shared';
4
- import * as i0 from "@angular/core";
5
- export declare class AvailableResourcesDialogComponent implements OnInit {
6
- DialogTitle: string;
7
- DialogWidth: string;
8
- DialogHeight: string;
9
- get DialogVisible(): boolean;
10
- set DialogVisible(value: boolean);
11
- private _dialogVisible;
12
- OnCancel(): void;
13
- OnOK(): void;
14
- /**
15
- * Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button
16
- */
17
- DialogClosed: EventEmitter<boolean>;
18
- SelectedResourcesChanged: EventEmitter<ResourceData[]>;
19
- /**
20
- * Optional, set this to the currently selected record to start the dialog with that record selected, if desired. This property will be updated as the user selects records in the dialog.
21
- */
22
- SelectedResources: ResourceData[];
23
- ResourceExtraFilter?: string;
24
- User: UserInfo;
25
- /**
26
- * Resource Type to show available resources for
27
- */
28
- ResourceTypeID: string;
29
- SelectionMode: 'Single' | 'Multiple';
30
- /**
31
- * 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
32
- */
33
- ExtraColumns: string;
34
- BubbleOnSelectedResourcesChanged(resources: ResourceData[]): void;
35
- ngOnInit(): void;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<AvailableResourcesDialogComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<AvailableResourcesDialogComponent, "mj-available-resources-dialog", never, { "DialogTitle": { "alias": "DialogTitle"; "required": false; }; "DialogWidth": { "alias": "DialogWidth"; "required": false; }; "DialogHeight": { "alias": "DialogHeight"; "required": false; }; "DialogVisible": { "alias": "DialogVisible"; "required": false; }; "SelectedResources": { "alias": "SelectedResources"; "required": false; }; "ResourceExtraFilter": { "alias": "ResourceExtraFilter"; "required": false; }; "User": { "alias": "User"; "required": false; }; "ResourceTypeID": { "alias": "ResourceTypeID"; "required": false; }; "SelectionMode": { "alias": "SelectionMode"; "required": false; }; "ExtraColumns": { "alias": "ExtraColumns"; "required": false; }; }, { "DialogClosed": "DialogClosed"; "SelectedResourcesChanged": "SelectedResourcesChanged"; }, never, never, false, never>;
38
- }
39
- //# sourceMappingURL=available-resources-dialog.component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"available-resources-dialog.component.d.ts","sourceRoot":"","sources":["../../src/lib/available-resources-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAS,MAAM,EAAG,MAAM,eAAe,CAAC;AAEhF,OAAO,EAA+B,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;AAGzD,qBAKa,iCAAkC,YAAW,MAAM;IACrD,WAAW,EAAE,MAAM,CAAyB;IAC5C,WAAW,EAAE,MAAM,CAAW;IAC9B,YAAY,EAAE,MAAM,CAAW;IAExC,IAAa,aAAa,IAAI,OAAO,CAEpC;IACD,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAK/B;IACD,OAAO,CAAC,cAAc,CAAkB;IAEjC,QAAQ;IAKR,IAAI;IAIX;;OAEG;IACO,YAAY,wBAA+B;IAE3C,wBAAwB,+BAAsC;IAGxE;;OAEG;IACM,iBAAiB,EAAE,YAAY,EAAE,CAAK;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAG,QAAQ,CAAC;IACzB;;OAEG;IACM,cAAc,EAAG,MAAM,CAAC;IACxB,aAAa,EAAE,QAAQ,GAAG,UAAU,CAAY;IAEzD;;OAEG;IACM,YAAY,EAAE,MAAM,CAAM;IAG5B,gCAAgC,CAAC,SAAS,EAAE,YAAY,EAAE;IAK1D,QAAQ,IAAI,IAAI;yCAxDZ,iCAAiC;2CAAjC,iCAAiC;CA6D7C"}
@@ -1,111 +0,0 @@
1
- import { Component, Output, EventEmitter, Input } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@progress/kendo-angular-dialog";
4
- import * as i2 from "@progress/kendo-angular-buttons";
5
- import * as i3 from "./available-resources.component";
6
- function AvailableResourcesDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
7
- const _r1 = i0.ɵɵgetCurrentView();
8
- i0.ɵɵelementStart(0, "kendo-dialog", 1);
9
- i0.ɵɵlistener("close", function AvailableResourcesDialogComponent_Conditional_0_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
10
- i0.ɵɵelementStart(1, "mj-available-resources", 2);
11
- i0.ɵɵlistener("SelectionChanged", function AvailableResourcesDialogComponent_Conditional_0_Template_mj_available_resources_SelectionChanged_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.BubbleOnSelectedResourcesChanged($event)); });
12
- i0.ɵɵelementEnd();
13
- i0.ɵɵelementStart(2, "kendo-dialog-actions")(3, "button", 3);
14
- i0.ɵɵlistener("click", function AvailableResourcesDialogComponent_Conditional_0_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnOK()); });
15
- i0.ɵɵtext(4, "OK");
16
- i0.ɵɵelementEnd();
17
- i0.ɵɵelementStart(5, "button", 4);
18
- i0.ɵɵlistener("click", function AvailableResourcesDialogComponent_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
19
- i0.ɵɵtext(6, "Cancel");
20
- i0.ɵɵelementEnd()()();
21
- } if (rf & 2) {
22
- const ctx_r1 = i0.ɵɵnextContext();
23
- i0.ɵɵproperty("width", ctx_r1.DialogWidth)("height", ctx_r1.DialogHeight)("title", ctx_r1.DialogTitle);
24
- i0.ɵɵadvance();
25
- i0.ɵɵproperty("User", ctx_r1.User)("ResourceTypeID", ctx_r1.ResourceTypeID)("ResourceExtraFilter", ctx_r1.ResourceExtraFilter)("ExtraColumns", ctx_r1.ExtraColumns)("SelectionMode", ctx_r1.SelectionMode)("SelectedResources", ctx_r1.SelectedResources);
26
- } }
27
- export class AvailableResourcesDialogComponent {
28
- constructor() {
29
- this.DialogTitle = 'Available Resources';
30
- this.DialogWidth = '700px';
31
- this.DialogHeight = '450px';
32
- this._dialogVisible = false;
33
- /**
34
- * Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button
35
- */
36
- this.DialogClosed = new EventEmitter();
37
- this.SelectedResourcesChanged = new EventEmitter();
38
- ///// REST OF THE BELOW JUST GET MAPPED TO THE CONTAINED RecordSelectorComponent
39
- /**
40
- * Optional, set this to the currently selected record to start the dialog with that record selected, if desired. This property will be updated as the user selects records in the dialog.
41
- */
42
- this.SelectedResources = [];
43
- this.SelectionMode = 'Single';
44
- /**
45
- * 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
46
- */
47
- this.ExtraColumns = "";
48
- }
49
- get DialogVisible() {
50
- return this._dialogVisible;
51
- }
52
- set DialogVisible(value) {
53
- if (value !== this._dialogVisible && value) {
54
- // do init stuff here as needed
55
- }
56
- this._dialogVisible = value;
57
- }
58
- OnCancel() {
59
- this.DialogVisible = false;
60
- this.DialogClosed.emit(false);
61
- }
62
- OnOK() {
63
- this.DialogVisible = false;
64
- this.DialogClosed.emit(true);
65
- }
66
- BubbleOnSelectedResourcesChanged(resources) {
67
- this.SelectedResources = resources;
68
- this.SelectedResourcesChanged.emit(resources);
69
- }
70
- ngOnInit() {
71
- if (!this.User) {
72
- throw new Error('User is a required property for the AvailableResourcesDialogComponent');
73
- }
74
- }
75
- }
76
- AvailableResourcesDialogComponent.ɵfac = function AvailableResourcesDialogComponent_Factory(t) { return new (t || AvailableResourcesDialogComponent)(); };
77
- AvailableResourcesDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AvailableResourcesDialogComponent, selectors: [["mj-available-resources-dialog"]], inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", DialogVisible: "DialogVisible", SelectedResources: "SelectedResources", ResourceExtraFilter: "ResourceExtraFilter", User: "User", ResourceTypeID: "ResourceTypeID", SelectionMode: "SelectionMode", ExtraColumns: "ExtraColumns" }, outputs: { DialogClosed: "DialogClosed", SelectedResourcesChanged: "SelectedResourcesChanged" }, decls: 1, vars: 1, consts: [[3, "width", "height", "title"], [3, "close", "width", "height", "title"], [3, "SelectionChanged", "User", "ResourceTypeID", "ResourceExtraFilter", "ExtraColumns", "SelectionMode", "SelectedResources"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function AvailableResourcesDialogComponent_Template(rf, ctx) { if (rf & 1) {
78
- i0.ɵɵtemplate(0, AvailableResourcesDialogComponent_Conditional_0_Template, 7, 9, "kendo-dialog", 0);
79
- } if (rf & 2) {
80
- i0.ɵɵconditional(ctx.DialogVisible ? 0 : -1);
81
- } }, dependencies: [i1.DialogComponent, i1.DialogActionsComponent, i2.ButtonComponent, i3.AvailableResourcesComponent] });
82
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AvailableResourcesDialogComponent, [{
83
- type: Component,
84
- args: [{ selector: 'mj-available-resources-dialog', template: "@if (DialogVisible) {\n <kendo-dialog\n [width]=\"DialogWidth\"\n [height]=\"DialogHeight\"\n [title]=\"DialogTitle\" \n (close)=\"OnCancel()\"\n >\n <mj-available-resources\n [User]=\"User\"\n [ResourceTypeID]=\"ResourceTypeID\"\n [ResourceExtraFilter]=\"ResourceExtraFilter\"\n [ExtraColumns]=\"ExtraColumns\"\n [SelectionMode]=\"SelectionMode\"\n [SelectedResources]=\"SelectedResources\"\n (SelectionChanged)=\"BubbleOnSelectedResourcesChanged($event)\"\n >\n </mj-available-resources>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"OnOK()\" themeColor=\"primary\">OK</button>\n <button kendoButton (click)=\"OnCancel()\">Cancel</button>\n </kendo-dialog-actions> \n </kendo-dialog> \n}" }]
85
- }], null, { DialogTitle: [{
86
- type: Input
87
- }], DialogWidth: [{
88
- type: Input
89
- }], DialogHeight: [{
90
- type: Input
91
- }], DialogVisible: [{
92
- type: Input
93
- }], DialogClosed: [{
94
- type: Output
95
- }], SelectedResourcesChanged: [{
96
- type: Output
97
- }], SelectedResources: [{
98
- type: Input
99
- }], ResourceExtraFilter: [{
100
- type: Input
101
- }], User: [{
102
- type: Input
103
- }], ResourceTypeID: [{
104
- type: Input
105
- }], SelectionMode: [{
106
- type: Input
107
- }], ExtraColumns: [{
108
- type: Input
109
- }] }); })();
110
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AvailableResourcesDialogComponent, { className: "AvailableResourcesDialogComponent", filePath: "src/lib/available-resources-dialog.component.ts", lineNumber: 12 }); })();
111
- //# sourceMappingURL=available-resources-dialog.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"available-resources-dialog.component.js","sourceRoot":"","sources":["../../src/lib/available-resources-dialog.component.ts","../../src/lib/available-resources-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAW,MAAM,e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AAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IA2BM,gCAAgC,CAAC,SAAyB;QAC/D,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;QACnC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IAEM,QAAQ;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QAC7F,CAAC;IACL,CAAC;;kHA5DU,iCAAiC;oFAAjC,iCAAiC;QCX9C,mGAAqB;;QAArB,4CAsBC;;iFDXY,iCAAiC;cAL7C,SAAS;2BACE,+BAA+B;gBAKhC,WAAW;kBAAnB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,YAAY;kBAApB,KAAK;YAEO,aAAa;kBAAzB,KAAK;YAuBI,YAAY;kBAArB,MAAM;YAEG,wBAAwB;kBAAjC,MAAM;YAME,iBAAiB;kBAAzB,KAAK;YACG,mBAAmB;kBAA3B,KAAK;YACG,IAAI;kBAAZ,KAAK;YAIG,cAAc;kBAAtB,KAAK;YACG,aAAa;kBAArB,KAAK;YAKG,YAAY;kBAApB,KAAK;;kFAhDK,iCAAiC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBA,qBA0Ba,yBAAyB;yCAAzB,yBAAyB;0CAAzB,yBAAyB;0CAAzB,yBAAyB;CAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MA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