analytica-frontend-lib 1.1.64 → 1.1.65
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/NotificationCard/index.d.mts +1 -1
- package/dist/NotificationCard/index.d.ts +1 -1
- package/dist/NotificationCard/index.js +23 -2
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +21 -1
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/{NotificationCard-4GgB0Nsf.d.mts → NotificationCard-DMdkuVEr.d.mts} +7 -2
- package/dist/{NotificationCard-4GgB0Nsf.d.ts → NotificationCard-DMdkuVEr.d.ts} +7 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for notification system
|
|
@@ -200,6 +200,11 @@ interface NotificationApiClient {
|
|
|
200
200
|
}>;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Synchronizes notification state when dropdown closes externally
|
|
205
|
+
* This ensures the notification icon state matches the dropdown state
|
|
206
|
+
*/
|
|
207
|
+
declare const syncNotificationState: (open: boolean, isNotificationActive: boolean, setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>, key?: string) => void;
|
|
203
208
|
interface NotificationItem extends Omit<Notification, 'createdAt'> {
|
|
204
209
|
time: string;
|
|
205
210
|
createdAt: string | Date;
|
|
@@ -414,4 +419,4 @@ declare const NotificationCard: (props: NotificationCardProps) => react_jsx_runt
|
|
|
414
419
|
*/
|
|
415
420
|
declare const LegacyNotificationCard: (props: LegacyNotificationCardProps) => react_jsx_runtime.JSX.Element;
|
|
416
421
|
|
|
417
|
-
export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j };
|
|
422
|
+
export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j, syncNotificationState as s };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for notification system
|
|
@@ -200,6 +200,11 @@ interface NotificationApiClient {
|
|
|
200
200
|
}>;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Synchronizes notification state when dropdown closes externally
|
|
205
|
+
* This ensures the notification icon state matches the dropdown state
|
|
206
|
+
*/
|
|
207
|
+
declare const syncNotificationState: (open: boolean, isNotificationActive: boolean, setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>, key?: string) => void;
|
|
203
208
|
interface NotificationItem extends Omit<Notification, 'createdAt'> {
|
|
204
209
|
time: string;
|
|
205
210
|
createdAt: string | Date;
|
|
@@ -414,4 +419,4 @@ declare const NotificationCard: (props: NotificationCardProps) => react_jsx_runt
|
|
|
414
419
|
*/
|
|
415
420
|
declare const LegacyNotificationCard: (props: LegacyNotificationCardProps) => react_jsx_runtime.JSX.Element;
|
|
416
421
|
|
|
417
|
-
export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j };
|
|
422
|
+
export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j, syncNotificationState as s };
|
package/dist/index.d.mts
CHANGED
|
@@ -52,8 +52,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
52
52
|
import { Question } from './Quiz/useQuizStore/index.mjs';
|
|
53
53
|
export { ANSWER_STATUS, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, QUIZ_TYPE, QuestionResult, QuizInterface, QuizState, SUBTYPE_ENUM, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.mjs';
|
|
54
54
|
export { default as LoadingModal } from './LoadingModal/index.mjs';
|
|
55
|
-
import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-
|
|
56
|
-
export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse } from './NotificationCard-
|
|
55
|
+
import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-DMdkuVEr.mjs';
|
|
56
|
+
export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse, s as syncNotificationState } from './NotificationCard-DMdkuVEr.mjs';
|
|
57
57
|
export { ThemeToggle } from './ThemeToggle/index.mjs';
|
|
58
58
|
import 'clsx';
|
|
59
59
|
|
package/dist/index.d.ts
CHANGED
|
@@ -52,8 +52,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
52
52
|
import { Question } from './Quiz/useQuizStore/index.js';
|
|
53
53
|
export { ANSWER_STATUS, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, QUIZ_TYPE, QuestionResult, QuizInterface, QuizState, SUBTYPE_ENUM, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.js';
|
|
54
54
|
export { default as LoadingModal } from './LoadingModal/index.js';
|
|
55
|
-
import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-
|
|
56
|
-
export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse } from './NotificationCard-
|
|
55
|
+
import { N as NotificationApiClient, a as Notification, F as FetchNotificationsParams, b as NotificationGroup, c as NotificationEntityType, d as NotificationType } from './NotificationCard-DMdkuVEr.js';
|
|
56
|
+
export { B as BackendNotification, g as BackendNotificationsResponse, e as NotificationCard, f as NotificationItem, h as NotificationsResponse, s as syncNotificationState } from './NotificationCard-DMdkuVEr.js';
|
|
57
57
|
export { ThemeToggle } from './ThemeToggle/index.js';
|
|
58
58
|
import 'clsx';
|
|
59
59
|
|
package/dist/index.js
CHANGED
|
@@ -151,6 +151,7 @@ __export(src_exports, {
|
|
|
151
151
|
getSubjectIcon: () => getSubjectIcon,
|
|
152
152
|
getSubjectInfo: () => getSubjectInfo,
|
|
153
153
|
getSubjectName: () => getSubjectName,
|
|
154
|
+
syncNotificationState: () => syncNotificationState,
|
|
154
155
|
useApiConfig: () => useApiConfig,
|
|
155
156
|
useAuth: () => useAuth,
|
|
156
157
|
useAuthGuard: () => useAuthGuard,
|
|
@@ -11325,6 +11326,11 @@ var mock_content_default = "./mock-content-K2CDVG6P.png";
|
|
|
11325
11326
|
|
|
11326
11327
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
11327
11328
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
11329
|
+
var syncNotificationState = (open, isNotificationActive, setActiveStates, key = "notifications") => {
|
|
11330
|
+
if (!open && isNotificationActive) {
|
|
11331
|
+
setActiveStates((prev) => ({ ...prev, [key]: false }));
|
|
11332
|
+
}
|
|
11333
|
+
};
|
|
11328
11334
|
var NotificationEmpty = ({
|
|
11329
11335
|
emptyStateImage,
|
|
11330
11336
|
emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
|
|
@@ -11661,6 +11667,20 @@ var NotificationCenter = ({
|
|
|
11661
11667
|
) })
|
|
11662
11668
|
] })
|
|
11663
11669
|
}
|
|
11670
|
+
),
|
|
11671
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11672
|
+
Modal_default,
|
|
11673
|
+
{
|
|
11674
|
+
isOpen: globalNotificationModal.isOpen,
|
|
11675
|
+
onClose: () => setGlobalNotificationModal({ isOpen: false, notification: null }),
|
|
11676
|
+
title: globalNotificationModal.notification?.title || "",
|
|
11677
|
+
variant: "activity",
|
|
11678
|
+
description: globalNotificationModal.notification?.message,
|
|
11679
|
+
image: emptyStateImage || mock_content_default,
|
|
11680
|
+
actionLink: globalNotificationModal.notification?.actionLink || void 0,
|
|
11681
|
+
actionLabel: "Ver mais",
|
|
11682
|
+
size: "lg"
|
|
11683
|
+
}
|
|
11664
11684
|
)
|
|
11665
11685
|
] });
|
|
11666
11686
|
}
|
|
@@ -12039,6 +12059,7 @@ var createNotificationsHook = (apiClient) => {
|
|
|
12039
12059
|
getSubjectIcon,
|
|
12040
12060
|
getSubjectInfo,
|
|
12041
12061
|
getSubjectName,
|
|
12062
|
+
syncNotificationState,
|
|
12042
12063
|
useApiConfig,
|
|
12043
12064
|
useAuth,
|
|
12044
12065
|
useAuthGuard,
|