aquasis-fe-components 3.2.2-alpha.a → 3.2.3

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.
@@ -1,6 +1,11 @@
1
1
  export { getCookie, removeCookie, setCookie } from './cookies';
2
2
  export declare const getCurrTenantId: () => string;
3
3
  export declare const getCurrAppId: () => string;
4
+ /**
5
+ * Optional `appId` read **only** from component props (never from cookies or context).
6
+ * Use for role UI: returns `undefined` when the prop is missing, null, or only whitespace — do not show the user role.
7
+ */
8
+ export declare function normalizeOptionalAppId(value: string | undefined | null): string | undefined;
4
9
  export declare const getBase64: (img: File | Blob, callback: (url: string) => void) => void;
5
10
  export declare const beforeUpload: (file: File) => boolean;
6
11
  export declare const formatBase642render: (base64url?: string) => string | undefined;
@@ -3,7 +3,10 @@ import { FC } from 'react';
3
3
  export interface UserModalProps {
4
4
  isOpen: boolean;
5
5
  user: IUser;
6
- /** When set, loads roles and shows the user role for this app in the modal title. */
6
+ /**
7
+ * Optional application id **from props only** (never from cookies or context).
8
+ * When `undefined` or blank after trim, the user role is not shown in the title and roles are not fetched for that display.
9
+ */
7
10
  appId?: string;
8
11
  /** Base URL for the GA / auth HTTP API (same value used for maintain user). */
9
12
  gauApiUrl: string;
@@ -12,6 +12,10 @@ export type ProfileEmbeddedUserModalProps = {
12
12
  isOpen: boolean;
13
13
  user: IUser;
14
14
  gauApiUrl: string;
15
+ /**
16
+ * Optional application id **from props only** (same contract as `UserModal`).
17
+ * When `undefined` or blank, do not show the user role in the modal title.
18
+ */
15
19
  appId?: string;
16
20
  isLoading?: boolean;
17
21
  onCancel: () => void;
@@ -23,7 +27,8 @@ export type ProfileChipProps = {
23
27
  */
24
28
  gauApiUrl: string;
25
29
  /**
26
- * Current application id (optional). When set to a non-empty string, shows the role **`Tag`** on the chip. Passed through to **`UserModal`**; the modal also uses **`getCurrAppId()`** when **`appId`** is omitted so the header role can still resolve.
30
+ * Optional application id **from props only** (never from cookies or context).
31
+ * When `undefined` or only whitespace, the role **`Tag`** is not shown on the chip and **`UserModal`** gets no `appId` for the title role.
27
32
  */
28
33
  appId?: string;
29
34
  /** Called after a successful `POST /api/logout` (optional; use for redirect or local session cleanup). */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aquasis-fe-components",
3
3
  "private": false,
4
- "version": "3.2.2-alpha.a",
4
+ "version": "3.2.3",
5
5
  "type": "module",
6
6
  "license": "ISC",
7
7
  "author": "Ewerton Souza",