analytica-frontend-lib 1.1.0 → 1.1.1
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/Menu/index.d.mts +27 -1
- package/dist/Menu/index.d.ts +27 -1
- package/dist/Menu/index.js +42 -0
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +43 -1
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/index.css +9 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -7
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +9 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6233,7 +6233,8 @@ import {
|
|
|
6233
6233
|
isValidElement as isValidElement5,
|
|
6234
6234
|
Children as Children5,
|
|
6235
6235
|
cloneElement as cloneElement5,
|
|
6236
|
-
useState as useState12
|
|
6236
|
+
useState as useState12,
|
|
6237
|
+
useCallback
|
|
6237
6238
|
} from "react";
|
|
6238
6239
|
import { CaretLeft as CaretLeft2, CaretRight as CaretRight3 } from "phosphor-react";
|
|
6239
6240
|
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
@@ -6516,6 +6517,46 @@ var injectStore5 = (children, store) => Children5.map(children, (child) => {
|
|
|
6516
6517
|
...typedChild.props.children ? { children: injectStore5(typedChild.props.children, store) } : {}
|
|
6517
6518
|
});
|
|
6518
6519
|
});
|
|
6520
|
+
var Breadcrumb = forwardRef17(
|
|
6521
|
+
({ currentPage, parentPageName, onBackClick, className, ...props }, ref) => {
|
|
6522
|
+
const handleBackToParent = useCallback(() => {
|
|
6523
|
+
onBackClick();
|
|
6524
|
+
}, [onBackClick]);
|
|
6525
|
+
const breadcrumbClassName = `bg-transparent shadow-none !px-0 py-4 !-ml-2 ${typeof className === "string" ? className : ""}`;
|
|
6526
|
+
return /* @__PURE__ */ jsx33("div", { ref, ...props, children: /* @__PURE__ */ jsx33(
|
|
6527
|
+
Menu,
|
|
6528
|
+
{
|
|
6529
|
+
variant: "breadcrumb",
|
|
6530
|
+
defaultValue: "",
|
|
6531
|
+
className: breadcrumbClassName,
|
|
6532
|
+
children: /* @__PURE__ */ jsxs27(MenuContent, { variant: "breadcrumb", children: [
|
|
6533
|
+
/* @__PURE__ */ jsx33(
|
|
6534
|
+
MenuItem,
|
|
6535
|
+
{
|
|
6536
|
+
variant: "breadcrumb",
|
|
6537
|
+
value: parentPageName.toLowerCase(),
|
|
6538
|
+
onClick: handleBackToParent,
|
|
6539
|
+
separator: true,
|
|
6540
|
+
className: "text-text-600 underline cursor-pointer hover:text-text-950",
|
|
6541
|
+
children: parentPageName
|
|
6542
|
+
}
|
|
6543
|
+
),
|
|
6544
|
+
/* @__PURE__ */ jsx33(
|
|
6545
|
+
MenuItem,
|
|
6546
|
+
{
|
|
6547
|
+
variant: "breadcrumb",
|
|
6548
|
+
value: currentPage.toLowerCase(),
|
|
6549
|
+
className: "text-text-950 font-bold",
|
|
6550
|
+
disabled: true,
|
|
6551
|
+
children: currentPage
|
|
6552
|
+
}
|
|
6553
|
+
)
|
|
6554
|
+
] })
|
|
6555
|
+
}
|
|
6556
|
+
) });
|
|
6557
|
+
}
|
|
6558
|
+
);
|
|
6559
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
6519
6560
|
var Menu_default = Menu;
|
|
6520
6561
|
|
|
6521
6562
|
// src/components/Skeleton/Skeleton.tsx
|
|
@@ -6777,7 +6818,7 @@ import {
|
|
|
6777
6818
|
useContext,
|
|
6778
6819
|
useEffect as useEffect11,
|
|
6779
6820
|
useState as useState13,
|
|
6780
|
-
useCallback,
|
|
6821
|
+
useCallback as useCallback2,
|
|
6781
6822
|
useMemo as useMemo4
|
|
6782
6823
|
} from "react";
|
|
6783
6824
|
import { useLocation, Navigate } from "react-router-dom";
|
|
@@ -6797,7 +6838,7 @@ var AuthProvider = ({
|
|
|
6797
6838
|
isLoading: true,
|
|
6798
6839
|
...initialAuthState
|
|
6799
6840
|
});
|
|
6800
|
-
const checkAuth =
|
|
6841
|
+
const checkAuth = useCallback2(async () => {
|
|
6801
6842
|
try {
|
|
6802
6843
|
setAuthState((prev) => ({ ...prev, isLoading: true }));
|
|
6803
6844
|
if (!checkAuthFn) {
|
|
@@ -6828,7 +6869,7 @@ var AuthProvider = ({
|
|
|
6828
6869
|
return false;
|
|
6829
6870
|
}
|
|
6830
6871
|
}, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
|
|
6831
|
-
const signOut =
|
|
6872
|
+
const signOut = useCallback2(() => {
|
|
6832
6873
|
if (signOutFn) {
|
|
6833
6874
|
signOutFn();
|
|
6834
6875
|
}
|
|
@@ -7075,7 +7116,7 @@ import {
|
|
|
7075
7116
|
useMemo as useMemo6,
|
|
7076
7117
|
useId as useId10,
|
|
7077
7118
|
useState as useState14,
|
|
7078
|
-
useCallback as
|
|
7119
|
+
useCallback as useCallback3,
|
|
7079
7120
|
useRef as useRef9
|
|
7080
7121
|
} from "react";
|
|
7081
7122
|
|
|
@@ -7787,7 +7828,7 @@ var QuizMultipleChoice = ({
|
|
|
7787
7828
|
}
|
|
7788
7829
|
return prevSelectedValuesRef.current;
|
|
7789
7830
|
}, [selectedValues, currentQuestion?.id]);
|
|
7790
|
-
const handleSelectedValues =
|
|
7831
|
+
const handleSelectedValues = useCallback3(
|
|
7791
7832
|
(values) => {
|
|
7792
7833
|
if (currentQuestion) {
|
|
7793
7834
|
selectMultipleAnswer(currentQuestion.id, values);
|
|
@@ -7845,7 +7886,7 @@ var QuizDissertative = ({
|
|
|
7845
7886
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
7846
7887
|
}
|
|
7847
7888
|
};
|
|
7848
|
-
const adjustTextareaHeight =
|
|
7889
|
+
const adjustTextareaHeight = useCallback3(() => {
|
|
7849
7890
|
if (textareaRef.current) {
|
|
7850
7891
|
textareaRef.current.style.height = "auto";
|
|
7851
7892
|
const scrollHeight = textareaRef.current.scrollHeight;
|
|
@@ -8950,6 +8991,7 @@ export {
|
|
|
8950
8991
|
AlternativesList,
|
|
8951
8992
|
AuthProvider,
|
|
8952
8993
|
Badge_default as Badge,
|
|
8994
|
+
Breadcrumb,
|
|
8953
8995
|
Button_default as Button,
|
|
8954
8996
|
Calendar_default as Calendar,
|
|
8955
8997
|
CardAccordation,
|