@memberjunction/ng-credentials 0.0.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/credentials.module.d.ts +21 -0
- package/dist/lib/credentials.module.d.ts.map +1 -0
- package/dist/lib/credentials.module.js +86 -0
- package/dist/lib/credentials.module.js.map +1 -0
- package/dist/lib/dialogs/credential-dialog.component.d.ts +68 -0
- package/dist/lib/dialogs/credential-dialog.component.d.ts.map +1 -0
- package/dist/lib/dialogs/credential-dialog.component.js +188 -0
- package/dist/lib/dialogs/credential-dialog.component.js.map +1 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.d.ts +44 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.js +237 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.js.map +1 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.d.ts +96 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.js +533 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.js.map +1 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts +56 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js +278 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js.map +1 -0
- package/dist/lib/services/credential-dialog.service.d.ts +89 -0
- package/dist/lib/services/credential-dialog.service.d.ts.map +1 -0
- package/dist/lib/services/credential-dialog.service.js +166 -0
- package/dist/lib/services/credential-dialog.service.js.map +1 -0
- package/dist/public-api.d.ts +15 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +19 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +43 -6
- package/README.md +0 -45
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Credential Dialog Service
|
|
3
|
+
*
|
|
4
|
+
* A service that provides easy programmatic access to credential dialogs.
|
|
5
|
+
* Use this service to open credential creation/editing dialogs from anywhere
|
|
6
|
+
* in your application without needing to include the component in your template.
|
|
7
|
+
*/
|
|
8
|
+
import { Injectable } from '@angular/core';
|
|
9
|
+
import { RunView } from '@memberjunction/core';
|
|
10
|
+
import { Subject, firstValueFrom } from 'rxjs';
|
|
11
|
+
import { CredentialDialogComponent } from '../dialogs/credential-dialog.component';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
/**
|
|
14
|
+
* Service for programmatically opening credential dialogs.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // Inject the service
|
|
19
|
+
* constructor(private credentialDialog: CredentialDialogService) {}
|
|
20
|
+
*
|
|
21
|
+
* // Open dialog to create a new credential
|
|
22
|
+
* async createCredential() {
|
|
23
|
+
* const result = await this.credentialDialog.openDialog(this.viewContainerRef);
|
|
24
|
+
* if (result.success && result.credential) {
|
|
25
|
+
* console.log('Created credential:', result.credential.Name);
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* // Open dialog with pre-selected type
|
|
30
|
+
* async createApiKey() {
|
|
31
|
+
* const result = await this.credentialDialog.openDialog(this.viewContainerRef, {
|
|
32
|
+
* preselectedTypeId: 'api-key-type-id'
|
|
33
|
+
* });
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* // Edit an existing credential
|
|
37
|
+
* async editCredential(credential: CredentialEntity) {
|
|
38
|
+
* const result = await this.credentialDialog.openDialog(this.viewContainerRef, {
|
|
39
|
+
* credential
|
|
40
|
+
* });
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class CredentialDialogService {
|
|
45
|
+
_credentialTypes = null;
|
|
46
|
+
_credentialTypesLoading = false;
|
|
47
|
+
_credentialTypesLoadPromise = null;
|
|
48
|
+
/**
|
|
49
|
+
* Opens a credential dialog and returns a promise that resolves when the dialog closes.
|
|
50
|
+
*
|
|
51
|
+
* @param viewContainerRef - The ViewContainerRef to attach the dialog to
|
|
52
|
+
* @param options - Optional configuration for the dialog
|
|
53
|
+
* @returns Promise resolving to the dialog result
|
|
54
|
+
*/
|
|
55
|
+
async openDialog(viewContainerRef, options) {
|
|
56
|
+
// Pre-load credential types
|
|
57
|
+
await this.loadCredentialTypes();
|
|
58
|
+
// Create the dialog component dynamically
|
|
59
|
+
const componentRef = viewContainerRef.createComponent(CredentialDialogComponent);
|
|
60
|
+
const instance = componentRef.instance;
|
|
61
|
+
// Set up the result handling
|
|
62
|
+
const resultSubject = new Subject();
|
|
63
|
+
instance.close.subscribe((result) => {
|
|
64
|
+
resultSubject.next(result);
|
|
65
|
+
resultSubject.complete();
|
|
66
|
+
componentRef.destroy();
|
|
67
|
+
});
|
|
68
|
+
// Open the dialog
|
|
69
|
+
await instance.open(options);
|
|
70
|
+
// Wait for the result
|
|
71
|
+
return firstValueFrom(resultSubject);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Opens a dialog to create a new credential with optional pre-selections.
|
|
75
|
+
* Convenience method that wraps openDialog with create-specific defaults.
|
|
76
|
+
*
|
|
77
|
+
* @param viewContainerRef - The ViewContainerRef to attach the dialog to
|
|
78
|
+
* @param preselectedTypeId - Optional credential type to pre-select
|
|
79
|
+
* @param preselectedCategoryId - Optional category to pre-select
|
|
80
|
+
* @returns Promise resolving to the dialog result
|
|
81
|
+
*/
|
|
82
|
+
async createCredential(viewContainerRef, preselectedTypeId, preselectedCategoryId) {
|
|
83
|
+
return this.openDialog(viewContainerRef, {
|
|
84
|
+
credential: null,
|
|
85
|
+
preselectedTypeId,
|
|
86
|
+
preselectedCategoryId,
|
|
87
|
+
title: 'Create Credential'
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Opens a dialog to edit an existing credential.
|
|
92
|
+
* Convenience method that wraps openDialog with edit-specific defaults.
|
|
93
|
+
*
|
|
94
|
+
* @param viewContainerRef - The ViewContainerRef to attach the dialog to
|
|
95
|
+
* @param credential - The credential to edit
|
|
96
|
+
* @returns Promise resolving to the dialog result
|
|
97
|
+
*/
|
|
98
|
+
async editCredential(viewContainerRef, credential) {
|
|
99
|
+
return this.openDialog(viewContainerRef, {
|
|
100
|
+
credential,
|
|
101
|
+
title: `Edit Credential: ${credential.Name}`
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Gets cached credential types or loads them if not cached.
|
|
106
|
+
* Types are cached to avoid repeated database calls.
|
|
107
|
+
*/
|
|
108
|
+
async getCredentialTypes() {
|
|
109
|
+
return this.loadCredentialTypes();
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Clears the cached credential types.
|
|
113
|
+
* Call this if you need to refresh the list after adding new types.
|
|
114
|
+
*/
|
|
115
|
+
clearCache() {
|
|
116
|
+
this._credentialTypes = null;
|
|
117
|
+
this._credentialTypesLoadPromise = null;
|
|
118
|
+
}
|
|
119
|
+
async loadCredentialTypes() {
|
|
120
|
+
// Return cached types if available
|
|
121
|
+
if (this._credentialTypes) {
|
|
122
|
+
return this._credentialTypes;
|
|
123
|
+
}
|
|
124
|
+
// Return existing load promise if already loading
|
|
125
|
+
if (this._credentialTypesLoadPromise) {
|
|
126
|
+
return this._credentialTypesLoadPromise;
|
|
127
|
+
}
|
|
128
|
+
// Start loading
|
|
129
|
+
this._credentialTypesLoadPromise = this.doLoadCredentialTypes();
|
|
130
|
+
try {
|
|
131
|
+
this._credentialTypes = await this._credentialTypesLoadPromise;
|
|
132
|
+
return this._credentialTypes;
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
this._credentialTypesLoadPromise = null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async doLoadCredentialTypes() {
|
|
139
|
+
try {
|
|
140
|
+
const rv = new RunView();
|
|
141
|
+
const result = await rv.RunView({
|
|
142
|
+
EntityName: 'MJ: Credential Types',
|
|
143
|
+
OrderBy: 'Category, Name',
|
|
144
|
+
ResultType: 'entity_object'
|
|
145
|
+
});
|
|
146
|
+
if (result.Success) {
|
|
147
|
+
return result.Results;
|
|
148
|
+
}
|
|
149
|
+
console.error('Failed to load credential types:', result.ErrorMessage);
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
console.error('Error loading credential types:', error);
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CredentialDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
158
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CredentialDialogService, providedIn: 'root' });
|
|
159
|
+
}
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CredentialDialogService, decorators: [{
|
|
161
|
+
type: Injectable,
|
|
162
|
+
args: [{
|
|
163
|
+
providedIn: 'root'
|
|
164
|
+
}]
|
|
165
|
+
}] });
|
|
166
|
+
//# sourceMappingURL=credential-dialog.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-dialog.service.js","sourceRoot":"","sources":["../../../src/lib/services/credential-dialog.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAwC,MAAM,eAAe,CAAC;AAEjF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAc,cAAc,EAAE,MAAM,MAAM,CAAC;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,OAAO,CAAC;YAC1B,CAAC;YAED,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;YACvE,OAAO,EAAE,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;YACxD,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC;wGAzIQ,uBAAuB;4GAAvB,uBAAuB,cAFpB,MAAM;;4FAET,uBAAuB;kBAHnC,UAAU;mBAAC;oBACR,UAAU,EAAE,MAAM;iBACrB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public API Surface for @memberjunction/ng-credentials
|
|
3
|
+
*
|
|
4
|
+
* This package provides reusable Angular components for credential management:
|
|
5
|
+
* - Panel components for embedding in existing UIs
|
|
6
|
+
* - Dialog components for modal credential editing
|
|
7
|
+
* - Service for programmatic dialog access
|
|
8
|
+
*/
|
|
9
|
+
export * from './lib/credentials.module';
|
|
10
|
+
export * from './lib/panels/credential-edit-panel/credential-edit-panel.component';
|
|
11
|
+
export * from './lib/panels/credential-type-edit-panel/credential-type-edit-panel.component';
|
|
12
|
+
export * from './lib/panels/credential-category-edit-panel/credential-category-edit-panel.component';
|
|
13
|
+
export * from './lib/dialogs/credential-dialog.component';
|
|
14
|
+
export * from './lib/services/credential-dialog.service';
|
|
15
|
+
//# sourceMappingURL=public-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,0BAA0B,CAAC;AAGzC,cAAc,oEAAoE,CAAC;AACnF,cAAc,8EAA8E,CAAC;AAC7F,cAAc,sFAAsF,CAAC;AAGrG,cAAc,2CAA2C,CAAC;AAG1D,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public API Surface for @memberjunction/ng-credentials
|
|
3
|
+
*
|
|
4
|
+
* This package provides reusable Angular components for credential management:
|
|
5
|
+
* - Panel components for embedding in existing UIs
|
|
6
|
+
* - Dialog components for modal credential editing
|
|
7
|
+
* - Service for programmatic dialog access
|
|
8
|
+
*/
|
|
9
|
+
// Module
|
|
10
|
+
export * from './lib/credentials.module';
|
|
11
|
+
// Panel components
|
|
12
|
+
export * from './lib/panels/credential-edit-panel/credential-edit-panel.component';
|
|
13
|
+
export * from './lib/panels/credential-type-edit-panel/credential-type-edit-panel.component';
|
|
14
|
+
export * from './lib/panels/credential-category-edit-panel/credential-category-edit-panel.component';
|
|
15
|
+
// Dialog components
|
|
16
|
+
export * from './lib/dialogs/credential-dialog.component';
|
|
17
|
+
// Services
|
|
18
|
+
export * from './lib/services/credential-dialog.service';
|
|
19
|
+
//# sourceMappingURL=public-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,SAAS;AACT,cAAc,0BAA0B,CAAC;AAEzC,mBAAmB;AACnB,cAAc,oEAAoE,CAAC;AACnF,cAAc,8EAA8E,CAAC;AAC7F,cAAc,sFAAsF,CAAC;AAErG,oBAAoB;AACpB,cAAc,2CAA2C,CAAC;AAE1D,WAAW;AACX,cAAc,0CAA0C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-credentials",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.4.0",
|
|
4
|
+
"description": "MemberJunction: Angular components for credential management - panels and dialogs for creating and editing credentials",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "ngc"
|
|
13
|
+
},
|
|
5
14
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
15
|
+
"memberjunction",
|
|
16
|
+
"credentials",
|
|
17
|
+
"angular",
|
|
18
|
+
"authentication"
|
|
19
|
+
],
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@angular/compiler": "18.2.14",
|
|
24
|
+
"@angular/compiler-cli": "18.2.14"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@angular/common": "18.2.14",
|
|
28
|
+
"@angular/core": "18.2.14",
|
|
29
|
+
"@angular/forms": "18.2.14",
|
|
30
|
+
"@progress/kendo-angular-dialog": "16.2.0",
|
|
31
|
+
"@progress/kendo-angular-buttons": "16.2.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@memberjunction/core": "3.4.0",
|
|
35
|
+
"@memberjunction/core-entities": "3.4.0",
|
|
36
|
+
"@memberjunction/global": "3.4.0",
|
|
37
|
+
"@memberjunction/ng-notifications": "3.4.0",
|
|
38
|
+
"@memberjunction/ng-shared-generic": "3.4.0",
|
|
39
|
+
"tslib": "^2.3.0",
|
|
40
|
+
"rxjs": "^7.8.1"
|
|
41
|
+
},
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "https://github.com/MemberJunction/MJ"
|
|
46
|
+
}
|
|
10
47
|
}
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# @memberjunction/ng-credentials
|
|
2
|
-
|
|
3
|
-
## ⚠️ IMPORTANT NOTICE ⚠️
|
|
4
|
-
|
|
5
|
-
**This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
|
|
6
|
-
|
|
7
|
-
This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
This package exists to:
|
|
12
|
-
1. Configure OIDC trusted publishing for the package name `@memberjunction/ng-credentials`
|
|
13
|
-
2. Enable secure, token-less publishing from CI/CD workflows
|
|
14
|
-
3. Establish provenance for packages published under this name
|
|
15
|
-
|
|
16
|
-
## What is OIDC Trusted Publishing?
|
|
17
|
-
|
|
18
|
-
OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
|
|
19
|
-
|
|
20
|
-
## Setup Instructions
|
|
21
|
-
|
|
22
|
-
To properly configure OIDC trusted publishing for this package:
|
|
23
|
-
|
|
24
|
-
1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
|
|
25
|
-
2. Configure the trusted publisher (e.g., GitHub Actions)
|
|
26
|
-
3. Specify the repository and workflow that should be allowed to publish
|
|
27
|
-
4. Use the configured workflow to publish your actual package
|
|
28
|
-
|
|
29
|
-
## DO NOT USE THIS PACKAGE
|
|
30
|
-
|
|
31
|
-
This package is a placeholder for OIDC configuration only. It:
|
|
32
|
-
- Contains no executable code
|
|
33
|
-
- Provides no functionality
|
|
34
|
-
- Should not be installed as a dependency
|
|
35
|
-
- Exists only for administrative purposes
|
|
36
|
-
|
|
37
|
-
## More Information
|
|
38
|
-
|
|
39
|
-
For more details about npm's trusted publishing feature, see:
|
|
40
|
-
- [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
|
|
41
|
-
- [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
**Maintained for OIDC setup purposes only**
|