@posiwise/user-module 0.0.178 → 0.0.179
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/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import * as i37 from "@angular/router";
|
|
|
4
4
|
import { Router } from "@angular/router";
|
|
5
5
|
import { LazyLoadEvent, MenuItem } from "primeng/api";
|
|
6
6
|
import * as i38 from "@angular/forms";
|
|
7
|
-
import { NgControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
|
|
7
|
+
import { NgControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from "@angular/forms";
|
|
8
8
|
import * as i41 from "@angular-magic/ngx-gp-autocomplete";
|
|
9
9
|
import { NgxGpAutocompleteDirective } from "@angular-magic/ngx-gp-autocomplete";
|
|
10
10
|
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
@@ -253,7 +253,7 @@ interface CredentialData {
|
|
|
253
253
|
}
|
|
254
254
|
interface SubscriptionCredentialGroup {
|
|
255
255
|
credential_name: string;
|
|
256
|
-
credentials:
|
|
256
|
+
credentials: CredentialData[];
|
|
257
257
|
}
|
|
258
258
|
interface CardDetails {
|
|
259
259
|
card_number?: string;
|
|
@@ -385,58 +385,86 @@ interface CurrentItem {
|
|
|
385
385
|
api_access_token?: string;
|
|
386
386
|
masked?: string;
|
|
387
387
|
}
|
|
388
|
+
interface CredentialFormValue {
|
|
389
|
+
credential_id: number;
|
|
390
|
+
value: string;
|
|
391
|
+
id?: number;
|
|
392
|
+
}
|
|
393
|
+
declare function uniqueByName(credentials: CredentialData[]): CredentialData[];
|
|
394
|
+
declare function groupByCredentialName(credentialTypes: CredentialData[], stored: CredentialData[]): SubscriptionCredentialGroup[];
|
|
395
|
+
declare function credentialFormRow(credentialType: CredentialData, stored?: CredentialData): {
|
|
396
|
+
subscription_id: (number | (typeof Validators.required)[])[];
|
|
397
|
+
credential_id: number[];
|
|
398
|
+
field: string[];
|
|
399
|
+
description: string[];
|
|
400
|
+
value: (string | (typeof Validators.required)[])[];
|
|
401
|
+
id: number[];
|
|
402
|
+
};
|
|
403
|
+
declare function changedCredentials(rows: CredentialFormValue[]): CredentialFormValue[];
|
|
404
|
+
/** After a partly failed save, gives rows that did save their new id so a retry edits them. */
|
|
405
|
+
declare function applyStoredIds(rows: UntypedFormArray, stored: CredentialData[]): void;
|
|
406
|
+
declare class SubscriptionCredentialActionsService {
|
|
407
|
+
private readonly confirmDialog;
|
|
408
|
+
private readonly subscriptionService;
|
|
409
|
+
private readonly humanize;
|
|
410
|
+
constructor(confirmDialog: ConfirmDialogService, subscriptionService: SubscriptionService);
|
|
411
|
+
/** The subscription's stored values and the credential types it can configure, fetched together. */
|
|
412
|
+
load(subscriptionId: number): Observable<{
|
|
413
|
+
stored: CredentialData[];
|
|
414
|
+
types: CredentialData[];
|
|
415
|
+
}>;
|
|
416
|
+
storedCredentials(subscriptionId: number): Observable<CredentialData[]>;
|
|
417
|
+
/**
|
|
418
|
+
* Emits the saved responses once every changed value is saved, or [] when nothing changed.
|
|
419
|
+
* Every request runs to completion before a failure is reported: forkJoin would otherwise
|
|
420
|
+
* cancel the rest client-side while the server still saves them, and a retry would then
|
|
421
|
+
* create those rows again.
|
|
422
|
+
*/
|
|
423
|
+
saveChanged(rows: CredentialFormValue[], subscriptionId: number): Observable<unknown[]>;
|
|
424
|
+
/** Emits once every stored field of the integration is deleted; completes empty on cancel. */
|
|
425
|
+
confirmAndDelete(group: SubscriptionCredentialGroup, subscriptionId: number): Observable<void>;
|
|
426
|
+
private deleteAll;
|
|
427
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionCredentialActionsService, never>;
|
|
428
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
429
|
+
}
|
|
388
430
|
declare namespace subscription_credential_component_d_exports {
|
|
389
431
|
export { SubscriptionCredentialComponent };
|
|
390
432
|
}
|
|
391
433
|
export declare class SubscriptionCredentialComponent extends AppBaseComponent implements OnInit, OnDestroy {
|
|
392
434
|
private readonly fb;
|
|
393
|
-
private readonly
|
|
435
|
+
private readonly credentialActions;
|
|
394
436
|
private readonly cdr;
|
|
395
437
|
private credentialToEdit;
|
|
396
|
-
|
|
438
|
+
private credentialToDelete;
|
|
397
439
|
passwordValidationModalForEditCredential: PasswordValidationComponent;
|
|
398
440
|
passwordValidationModalForAddCredential: PasswordValidationComponent;
|
|
441
|
+
passwordValidationModalForDeleteCredential: PasswordValidationComponent;
|
|
399
442
|
form: UntypedFormGroup;
|
|
400
|
-
data: any[];
|
|
401
443
|
subscriptionId: number;
|
|
402
|
-
totalRecords: number;
|
|
403
444
|
allSubscriptionCredentials: CredentialData[];
|
|
404
445
|
availableCredentials: CredentialData[];
|
|
405
446
|
credentialsSelect: CredentialData[];
|
|
406
|
-
|
|
407
|
-
|
|
447
|
+
uniqueCredential: CredentialData[];
|
|
448
|
+
credentials: SubscriptionCredentialGroup[];
|
|
408
449
|
isEdit: boolean;
|
|
409
450
|
submitted: boolean;
|
|
410
451
|
buttonBusy: boolean;
|
|
411
452
|
isLoaded: boolean;
|
|
412
|
-
credentials: any[];
|
|
413
453
|
showForm: boolean;
|
|
414
|
-
|
|
415
|
-
credentialName: string;
|
|
416
|
-
credentialToReveal: any;
|
|
417
|
-
constructor(fb: UntypedFormBuilder, subscriptionService: SubscriptionService, injector: Injector, cdr: ChangeDetectorRef);
|
|
454
|
+
constructor(fb: UntypedFormBuilder, credentialActions: SubscriptionCredentialActionsService, injector: Injector, cdr: ChangeDetectorRef);
|
|
418
455
|
ngOnInit(): void;
|
|
419
456
|
get credentialsGroup(): UntypedFormArray;
|
|
420
|
-
/** Function to get all credentials */
|
|
421
457
|
private getAllCredentials;
|
|
422
|
-
/** Function to get available Credentials */
|
|
423
|
-
private getAllAvailableCredentials;
|
|
424
|
-
/** Function to get credential on select */
|
|
425
458
|
selectedOption(event: any): void;
|
|
426
|
-
/** Function to post credentials */
|
|
427
459
|
saveCredentials(): void;
|
|
428
|
-
revealCredentials(credential: any): void;
|
|
429
|
-
hideCredentials(): void;
|
|
430
|
-
showCredentials(): void;
|
|
431
|
-
/** Function to get form controls */
|
|
432
|
-
get f(): {
|
|
433
|
-
[key: string]: import("@angular/forms").AbstractControl<any, any, any>;
|
|
434
|
-
};
|
|
435
460
|
onCancel(): void;
|
|
436
461
|
openCredentialsForAdd(): void;
|
|
437
|
-
openCredentialsForEdit(
|
|
462
|
+
openCredentialsForEdit(credentialName: string): void;
|
|
463
|
+
openCredentialsForDelete(credential: SubscriptionCredentialGroup): void;
|
|
438
464
|
editCredentials(): void;
|
|
465
|
+
deleteCredentials(): void;
|
|
439
466
|
showEditForm(): void;
|
|
467
|
+
private notify;
|
|
440
468
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionCredentialComponent, never>;
|
|
441
469
|
static ɵcmp: i0.ɵɵComponentDeclaration<SubscriptionCredentialComponent, "pw-subscription-credential", never, {}, {}, never, never, false, never>;
|
|
442
470
|
}
|