aquasis-fe-components 2.2.0 → 2.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/aquasis-fe-components.js +13731 -13700
- package/dist/aquasis-fe-components.umd.cjs +174 -174
- package/dist/config/aquasisApiContext.d.ts +11 -0
- package/dist/helpers/cookies.d.ts +3 -0
- package/dist/helpers/index.d.ts +1 -3
- package/dist/helpers/storageKeyPrefix.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/lib/UserModal/index.d.ts +2 -0
- package/dist/reactQuery/index.d.ts +2 -2
- package/dist/services/appServices.d.ts +2 -2
- package/dist/services/releaseNoteServices.d.ts +3 -3
- package/dist/services/userServices.d.ts +1 -1
- package/dist/types/apiContext.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AquasisApiContextPatch } from '../types/apiContext';
|
|
2
|
+
/**
|
|
3
|
+
* Merges values into the current API context (e.g. after login or tenant switch).
|
|
4
|
+
*/
|
|
5
|
+
export declare function setAquasisApiContext(values: AquasisApiContextPatch): void;
|
|
6
|
+
/**
|
|
7
|
+
* Replaces the entire context. Prefer when resetting session.
|
|
8
|
+
*/
|
|
9
|
+
export declare function replaceAquasisApiContext(values: AquasisApiContextPatch): void;
|
|
10
|
+
export declare function getAquasisApiContext(): Readonly<AquasisApiContextPatch>;
|
|
11
|
+
export declare function clearAquasisApiContext(): void;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { RcFile } from 'antd/es/upload';
|
|
2
|
+
export { getCookie, removeCookie, setCookie } from './cookies';
|
|
2
3
|
export declare const getCurrTenantId: () => string;
|
|
3
4
|
export declare const getCurrAppId: () => string;
|
|
4
|
-
export declare function getCookie<T>(key: string): T;
|
|
5
|
-
export declare const setCookie: (key: string, value: any) => void;
|
|
6
|
-
export declare const removeCookie: (key: string) => void;
|
|
7
5
|
export declare const getBase64: (img: RcFile, callback: (url: string) => void) => void;
|
|
8
6
|
export declare const beforeUpload: (file: RcFile) => boolean;
|
|
9
7
|
export declare const formatBase642render: (base64url?: string) => string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,11 @@ import { ReleaseNoteComponent as ReleaseNote } from './lib/ReleaseNote/ReleaseNo
|
|
|
4
4
|
import { UserModalComponent as UserModal } from './lib/UserModal/UserModalConnector';
|
|
5
5
|
import { WhatsNewsComponent as WhatsNews } from './lib/WhatsNews/WhatsNewsConnector';
|
|
6
6
|
import { default as i18n } from './i18n';
|
|
7
|
+
export type * from './types/apiContext';
|
|
7
8
|
export type * from './types/app';
|
|
8
9
|
export type * from './types/helpdesk';
|
|
9
10
|
export type * from './types/user';
|
|
10
11
|
export type * from './types/whatsNews';
|
|
12
|
+
export { clearAquasisApiContext, getAquasisApiContext, replaceAquasisApiContext, setAquasisApiContext, } from './config/aquasisApiContext';
|
|
11
13
|
/** @deprecated ReleaseNote will be removed in the next major version. Use WhatsNews instead. */
|
|
12
14
|
export { Helpdesk, i18n, LanguageSwitcher, ReleaseNote, UserModal, WhatsNews };
|
|
@@ -5,6 +5,8 @@ export interface UserModalProps {
|
|
|
5
5
|
user: IUser;
|
|
6
6
|
/** Current application id from the host app (e.g. cookie); used to resolve the user's role for this app */
|
|
7
7
|
appId: string;
|
|
8
|
+
/** Base URL for the GA / auth HTTP API (same value used for roles and maintain user). */
|
|
9
|
+
gauApiUrl: string;
|
|
8
10
|
isLoading?: boolean;
|
|
9
11
|
onCancel: () => void;
|
|
10
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IApp, ILanguage, IRole } from '../types/app';
|
|
2
2
|
import { AxiosError } from 'axios';
|
|
3
|
-
export declare const useGetApps: () => import('@tanstack/react-query').UseQueryResult<IApp[], AxiosError<unknown, any>>;
|
|
4
|
-
export declare const useGetRoles: () => import('@tanstack/react-query').UseQueryResult<IRole[], AxiosError<unknown, any>>;
|
|
3
|
+
export declare const useGetApps: (gauApiUrl: string) => import('@tanstack/react-query').UseQueryResult<IApp[], AxiosError<unknown, any>>;
|
|
4
|
+
export declare const useGetRoles: (gauApiUrl: string) => import('@tanstack/react-query').UseQueryResult<IRole[], AxiosError<unknown, any>>;
|
|
5
5
|
export declare const useGetLanguages: (gauApiUrl: string) => import('@tanstack/react-query').UseQueryResult<ILanguage[], AxiosError<unknown, any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IApp, ILanguage, IRole } from '../types/app';
|
|
2
|
-
export declare const getApps: () => Promise<IApp[]>;
|
|
2
|
+
export declare const getApps: (gauApiUrl: string) => Promise<IApp[]>;
|
|
3
3
|
export declare const getLanguages: (gauApiUrl: string) => Promise<ILanguage[]>;
|
|
4
|
-
export declare const getRoles: () => Promise<IRole[]>;
|
|
4
|
+
export declare const getRoles: (gauApiUrl: string) => Promise<IRole[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GetReleaseNotePayload, IReleaseNote, ReleaseNotesPayload } from '../types/releaseNotes';
|
|
2
|
-
export declare const getReleases: (payload: GetReleaseNotePayload) => Promise<IReleaseNote[]>;
|
|
3
|
-
export declare const maintainReleaseNote: (payload: ReleaseNotesPayload) => Promise<any>;
|
|
4
|
-
export declare const applyDoNotShowAgain: (idRelease: number, userId: string) => Promise<any>;
|
|
2
|
+
export declare const getReleases: (gauApiUrl: string, payload: GetReleaseNotePayload) => Promise<IReleaseNote[]>;
|
|
3
|
+
export declare const maintainReleaseNote: (gauApiUrl: string, payload: ReleaseNotesPayload) => Promise<any>;
|
|
4
|
+
export declare const applyDoNotShowAgain: (gauApiUrl: string, idRelease: number, userId: string) => Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UserPayload } from '../types/user';
|
|
2
|
-
export declare const maintainUser: (payload: UserPayload) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
2
|
+
export declare const maintainUser: (gauApiUrl: string, payload: UserPayload) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explicit tenant/app identity for API requests and storage namespacing.
|
|
3
|
+
* Host applications should call setAquasisApiContext() at bootstrap instead of
|
|
4
|
+
* relying only on cookies for appId / tenantId / appName.
|
|
5
|
+
*/
|
|
6
|
+
export interface AquasisApiContext {
|
|
7
|
+
appId: string;
|
|
8
|
+
tenantId: string;
|
|
9
|
+
/** Namespaces localStorage keys; sent as AppName header when set */
|
|
10
|
+
appName: string;
|
|
11
|
+
}
|
|
12
|
+
export type AquasisApiContextPatch = Partial<AquasisApiContext>;
|