@yomotech/view-toolkit 1.0.19 → 1.0.28
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
|
@@ -81,10 +81,12 @@ declare class UtilityService {
|
|
|
81
81
|
authorizationBaseUrl: any;
|
|
82
82
|
accessTokenEndpoint: any;
|
|
83
83
|
redirectUrl: any;
|
|
84
|
-
scope:
|
|
84
|
+
scope: string;
|
|
85
85
|
responseType: any;
|
|
86
86
|
pkceEnabled: any;
|
|
87
87
|
};
|
|
88
|
+
/** OAuth scope as the space separated string the OAuth2 plugin expects. */
|
|
89
|
+
private oauthScope;
|
|
88
90
|
setupStripePaymentForm(environment: any, form: any, onCardChange: (message: string) => void): Promise<void>;
|
|
89
91
|
formData(form: any, environment: any, cartInfo: any): Promise<void>;
|
|
90
92
|
normalizeDatesForStorage(obj: any): any;
|
|
@@ -510,6 +512,9 @@ declare class CardComponent {
|
|
|
510
512
|
showButtonIcon(button: any): boolean;
|
|
511
513
|
showButtonCaption(button: any): boolean;
|
|
512
514
|
getScope(scope: any): string;
|
|
515
|
+
getMediaSource(layout: any, record: any): string;
|
|
516
|
+
getMediaLabel(layout: any): string;
|
|
517
|
+
getMediaKind(layout: any, record: any): 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
513
518
|
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
514
519
|
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "vl-card", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "mobileDisplay": { "alias": "mobileDisplay"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "paginationMode": { "alias": "paginationMode"; "required": false; }; "paginationLoading": { "alias": "paginationLoading"; "required": false; }; }, { "cardButtonClick": "cardButtonClick"; "cardHeaderButtonClick": "cardHeaderButtonClick"; "linkDetails": "linkDetails"; "imageDetails": "imageDetails"; "onPageSizeChange": "onPageSizeChange"; "onPageChange": "onPageChange"; "cardDataChange": "cardDataChange"; }, never, never, true, never>;
|
|
515
520
|
}
|
|
@@ -566,6 +571,10 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
|
|
|
566
571
|
timeChangeEvent(formField: any, event: any): void;
|
|
567
572
|
autocompChangeEvent(event: any, formfield: any): void;
|
|
568
573
|
autocompFocusOutEvent(event: any, formfield: any): void;
|
|
574
|
+
private getMediaProperty;
|
|
575
|
+
getMediaSource(field: any): string;
|
|
576
|
+
getMediaLabel(field: any): string;
|
|
577
|
+
getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
569
578
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
570
579
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "vl-form", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "creditCardError": { "alias": "creditCardError"; "required": false; }; "form": { "alias": "form"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; }, { "formButtonClick": "formButtonClick"; "checkBoxChangeEvent": "checkBoxChangeEvent"; }, never, never, true, never>;
|
|
571
580
|
}
|
|
@@ -671,6 +680,10 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
|
|
|
671
680
|
clearColumnFilter(column: any): void;
|
|
672
681
|
private hasFilterValue;
|
|
673
682
|
private matchesColumnFilter;
|
|
683
|
+
isMediaColumn(col: any): boolean;
|
|
684
|
+
getMediaSource(col: any, data: any): string;
|
|
685
|
+
getMediaLabel(col: any): string;
|
|
686
|
+
getMediaKind(col: any, data: any): 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
674
687
|
static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
|
|
675
688
|
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "vl-grid", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "tableitemInfo": { "alias": "tableitemInfo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isTableDataLoad": { "alias": "isTableDataLoad"; "required": false; }; "currenTableOptions": { "alias": "currenTableOptions"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; }, { "onPageChange": "onPageChange"; "onPageSizeChange": "onPageSizeChange"; "onGridScroll": "onGridScroll"; "showGridLink": "showGridLink"; "gridButtonClick": "gridButtonClick"; "gridIncreamentClick": "gridIncreamentClick"; "gridDecreamentClick": "gridDecreamentClick"; "gridImgClick": "gridImgClick"; }, never, never, true, never>;
|
|
676
689
|
}
|
|
@@ -792,6 +805,15 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
792
805
|
invokeFormBtnClick(option: any, propertySchema: any, form: NgForm): void;
|
|
793
806
|
checkValidty(form: NgForm): boolean;
|
|
794
807
|
onCancel(): void;
|
|
808
|
+
private getMediaProperty;
|
|
809
|
+
getMediaSource(field: any): string;
|
|
810
|
+
getMediaLabel(field: any): string;
|
|
811
|
+
getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
812
|
+
sharedErrorsVisible: boolean;
|
|
813
|
+
sharedProperty(field: any): any;
|
|
814
|
+
usesSharedField(field: any): boolean;
|
|
815
|
+
private initializeSharedDefaults;
|
|
816
|
+
onSharedFieldChange(field: any, value: any): void;
|
|
795
817
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModelComponent, never>;
|
|
796
818
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModelComponent, "vl-model", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "modalItemInfo": { "alias": "modalItemInfo"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "setFormDataHandler": { "alias": "setFormDataHandler"; "required": false; }; }, {}, never, never, true, never>;
|
|
797
819
|
}
|
|
@@ -827,6 +849,61 @@ declare class PaginationComponent implements OnInit {
|
|
|
827
849
|
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "vl-pagination", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; }, { "pageSizeChange": "pageSizeChange"; "onGoToPage": "onGoToPage"; }, never, never, true, never>;
|
|
828
850
|
}
|
|
829
851
|
|
|
852
|
+
/** What a project's login configuration has to say about its identity provider. */
|
|
853
|
+
interface OidcProvider {
|
|
854
|
+
/** e.g. https://keycloak-poc.wilken.de/realms/p5, https://integrator-1772139.okta.com/oauth2/default */
|
|
855
|
+
issuer: string;
|
|
856
|
+
clientId: string;
|
|
857
|
+
redirectUri: string;
|
|
858
|
+
/** Space separated string or array; default "openid profile email". */
|
|
859
|
+
scope?: string | string[];
|
|
860
|
+
/** Ask for offline_access (refresh token that outlives the browser session). */
|
|
861
|
+
offlineAccess?: boolean;
|
|
862
|
+
}
|
|
863
|
+
interface OidcTokens {
|
|
864
|
+
access_token: string;
|
|
865
|
+
refresh_token?: string;
|
|
866
|
+
id_token?: string;
|
|
867
|
+
expires_in?: number;
|
|
868
|
+
token_type?: string;
|
|
869
|
+
issuer?: string;
|
|
870
|
+
}
|
|
871
|
+
/** Result of a refresh: new tokens, 'refused' (sign in again) or null (no answer - keep the sign-in). */
|
|
872
|
+
type OidcRefresh = OidcTokens | 'refused' | null;
|
|
873
|
+
declare class MobileOidcService {
|
|
874
|
+
private discoveries;
|
|
875
|
+
/** The issuer's discovery document, fetched once per issuer. */
|
|
876
|
+
discover(issuer: string): Promise<any>;
|
|
877
|
+
/**
|
|
878
|
+
* Signs in through the system browser (authorization code + PKCE). With offlineAccess the scope
|
|
879
|
+
* gets offline_access; if the provider refuses it the login is repeated without it. After a
|
|
880
|
+
* logout the provider is asked for the password again (prompt=login).
|
|
881
|
+
*/
|
|
882
|
+
login(provider: OidcProvider): Promise<OidcTokens | null>;
|
|
883
|
+
/** New tokens from the refresh token (grant_type=refresh_token, public client - no secret). */
|
|
884
|
+
refresh(provider: OidcProvider, stored: OidcTokens | any): Promise<OidcRefresh>;
|
|
885
|
+
/** The user's claims from the provider's userinfo endpoint; null when the token is refused. */
|
|
886
|
+
userInfo(provider: OidcProvider, accessToken: string): Promise<any | null>;
|
|
887
|
+
/**
|
|
888
|
+
* The same logout for every provider, without a browser window: the provider session is ended
|
|
889
|
+
* where the provider allows it from the app (Keycloak: logout endpoint with the refresh token),
|
|
890
|
+
* refresh and access token are revoked, the saved sign-in is removed and the app restarts. The
|
|
891
|
+
* next login asks for the password. When the project requires a login, the restarted app shows
|
|
892
|
+
* its loader until the sign-in window opens.
|
|
893
|
+
*/
|
|
894
|
+
signOut(provider: OidcProvider | null, stored: OidcTokens | any, storageKey: string, removeStored: (key: string) => Promise<void>, options: {
|
|
895
|
+
loginRequired: boolean;
|
|
896
|
+
}): Promise<void>;
|
|
897
|
+
/** Scope as the space separated string the OAuth2 plugin expects. */
|
|
898
|
+
scopeOf(scope: string | string[] | undefined): string;
|
|
899
|
+
private withOfflineAccess;
|
|
900
|
+
private post;
|
|
901
|
+
private flag;
|
|
902
|
+
private setFlag;
|
|
903
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MobileOidcService, never>;
|
|
904
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MobileOidcService>;
|
|
905
|
+
}
|
|
906
|
+
|
|
830
907
|
interface MobileAuthTokens {
|
|
831
908
|
access_token: string;
|
|
832
909
|
refresh_token?: string;
|
|
@@ -839,15 +916,12 @@ declare class MobileKeycloakService {
|
|
|
839
916
|
private http;
|
|
840
917
|
private utilityService;
|
|
841
918
|
private platform;
|
|
919
|
+
private oidc;
|
|
842
920
|
private tokens;
|
|
843
|
-
constructor(config: ConfigService, http: HttpClient, utilityService: UtilityService, platform: Platform);
|
|
921
|
+
constructor(config: ConfigService, http: HttpClient, utilityService: UtilityService, platform: Platform, oidc: MobileOidcService);
|
|
922
|
+
/** The Keycloak realm as an OIDC provider, from login.mobile of the project. */
|
|
923
|
+
private provider;
|
|
844
924
|
login(): Promise<any>;
|
|
845
|
-
/** The configured scope plus offline_access, without duplicating it. */
|
|
846
|
-
private withOfflineAccess;
|
|
847
|
-
/**
|
|
848
|
-
* New tokens from the refresh token (grant_type=refresh_token). Returns them in the stored token
|
|
849
|
-
* shape, or null when Keycloak refuses - then the caller falls back to the login.
|
|
850
|
-
*/
|
|
851
925
|
refreshTokens(stored: MobileAuthTokens | any): Promise<any | null>;
|
|
852
926
|
getUserInfo(accessToken: any, issuer: any): Promise<any>;
|
|
853
927
|
getAccessToken(): string | null;
|
|
@@ -1085,6 +1159,29 @@ declare class AppVersionResetService {
|
|
|
1085
1159
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppVersionResetService>;
|
|
1086
1160
|
}
|
|
1087
1161
|
|
|
1162
|
+
type MobileOktaTokens = OidcTokens;
|
|
1163
|
+
type MobileOktaRefresh = OidcRefresh;
|
|
1164
|
+
declare class MobileOktaService {
|
|
1165
|
+
private utilityService;
|
|
1166
|
+
private oidc;
|
|
1167
|
+
constructor(utilityService: UtilityService, oidc: MobileOidcService);
|
|
1168
|
+
/**
|
|
1169
|
+
* The Okta authorization server as an OIDC provider, from login.mobile of the project. The issuer
|
|
1170
|
+
* is login.mobile.issuer, else login.web.issuer, else derived from the authorize URL
|
|
1171
|
+
* (https://…/oauth2/default/v1/authorize → https://…/oauth2/default).
|
|
1172
|
+
*/
|
|
1173
|
+
provider(environment: any): OidcProvider;
|
|
1174
|
+
login(environment: any): Promise<MobileOktaTokens | null>;
|
|
1175
|
+
refreshTokens(environment: any, stored: MobileOktaTokens | any): Promise<MobileOktaRefresh>;
|
|
1176
|
+
/**
|
|
1177
|
+
* Logout with the shared flow. login.required decides where the restarted app goes: true → the
|
|
1178
|
+
* loader until the sign-in opens, otherwise (default for Okta) the start page, signed out.
|
|
1179
|
+
*/
|
|
1180
|
+
signOut(environment: any, stored: MobileOktaTokens | any): Promise<void>;
|
|
1181
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MobileOktaService, never>;
|
|
1182
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MobileOktaService>;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1088
1185
|
/** True in the native app on iOS (iPhone and iPad) and Android; false in a browser. */
|
|
1089
1186
|
declare function isNativeMobile(): boolean;
|
|
1090
1187
|
/**
|
|
@@ -1211,5 +1308,5 @@ declare class RemoteListService {
|
|
|
1211
1308
|
static ɵprov: i0.ɵɵInjectableDeclaration<RemoteListService>;
|
|
1212
1309
|
}
|
|
1213
1310
|
|
|
1214
|
-
export { AppVersionResetService, CardComponent, ConfigService, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MobileKeycloakService, ModelComponent, NetworkLogService, NotificationService, PaginationComponent, PlaceholderPipe, REQUEST_STAGES, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, SIDE_DOCK_CLASS, SideMenuComponent, UtilityService, ViewToolkitModule, isNativeMobile, isNativePhone, normalizeCustomKeyboardType, resolveCustomKeyboardType, resolvePlaceholder, sideDockWidth, stagedRequest };
|
|
1215
|
-
export type { CustomKeyboardTarget, CustomKeyboardType, MobileAuthTokens, RequestTimeoutMessages };
|
|
1311
|
+
export { AppVersionResetService, CardComponent, ConfigService, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, PaginationComponent, PlaceholderPipe, REQUEST_STAGES, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, SIDE_DOCK_CLASS, SideMenuComponent, UtilityService, ViewToolkitModule, isNativeMobile, isNativePhone, normalizeCustomKeyboardType, resolveCustomKeyboardType, resolvePlaceholder, sideDockWidth, stagedRequest };
|
|
1312
|
+
export type { CustomKeyboardTarget, CustomKeyboardType, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, OidcProvider, OidcRefresh, OidcTokens, RequestTimeoutMessages };
|