analytica-frontend-lib 1.2.17 → 1.2.19
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/AlertManager/index.d.mts +6 -2
- package/dist/AlertManager/index.d.ts +6 -2
- package/dist/AlertManager/index.js +66 -16
- package/dist/AlertManager/index.js.map +1 -1
- package/dist/AlertManager/index.mjs +66 -16
- package/dist/AlertManager/index.mjs.map +1 -1
- package/dist/AlertManagerView/index.d.mts +8 -3
- package/dist/AlertManagerView/index.d.ts +8 -3
- package/dist/AlertManagerView/index.js +4 -24
- package/dist/AlertManagerView/index.js.map +1 -1
- package/dist/AlertManagerView/index.mjs +4 -26
- package/dist/AlertManagerView/index.mjs.map +1 -1
- package/dist/DropdownMenu/index.d.mts +7 -1
- package/dist/DropdownMenu/index.d.ts +7 -1
- package/dist/DropdownMenu/index.js +51 -5
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +50 -5
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/NotificationCard/index.js +49 -5
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +49 -5
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/Search/index.js +49 -5
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs +49 -5
- package/dist/Search/index.mjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +394 -361
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -132
- package/dist/index.mjs.map +1 -1
- package/dist/{types-DMycdI4U.d.mts → types-BXzeefgf.d.mts} +1 -1
- package/dist/{types-DMycdI4U.d.ts → types-BXzeefgf.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/notification-TD7ZFRLL.png +0 -0
|
@@ -1426,9 +1426,6 @@ var Divider = ({
|
|
|
1426
1426
|
};
|
|
1427
1427
|
var Divider_default = Divider;
|
|
1428
1428
|
|
|
1429
|
-
// src/assets/img/notification.png
|
|
1430
|
-
var notification_default = "../notification-TD7ZFRLL.png";
|
|
1431
|
-
|
|
1432
1429
|
// src/components/TextArea/TextArea.tsx
|
|
1433
1430
|
import {
|
|
1434
1431
|
forwardRef as forwardRef3,
|
|
@@ -2323,10 +2320,13 @@ var ProfileMenuHeader = forwardRef5(({ className, name, email, photoUrl, store:
|
|
|
2323
2320
|
{
|
|
2324
2321
|
ref,
|
|
2325
2322
|
"data-component": "ProfileMenuHeader",
|
|
2326
|
-
className: cn(
|
|
2323
|
+
className: cn(
|
|
2324
|
+
"flex flex-row gap-4 items-center min-w-[280px]",
|
|
2325
|
+
className
|
|
2326
|
+
),
|
|
2327
2327
|
...props,
|
|
2328
2328
|
children: [
|
|
2329
|
-
/* @__PURE__ */ jsx13("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden", children: photoUrl ? /* @__PURE__ */ jsx13(
|
|
2329
|
+
/* @__PURE__ */ jsx13("span", { className: "w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center overflow-hidden flex-shrink-0", children: photoUrl ? /* @__PURE__ */ jsx13(
|
|
2330
2330
|
"img",
|
|
2331
2331
|
{
|
|
2332
2332
|
src: photoUrl,
|
|
@@ -2334,15 +2334,56 @@ var ProfileMenuHeader = forwardRef5(({ className, name, email, photoUrl, store:
|
|
|
2334
2334
|
className: "w-full h-full object-cover"
|
|
2335
2335
|
}
|
|
2336
2336
|
) : /* @__PURE__ */ jsx13(User, { size: 34, className: "text-primary-800" }) }),
|
|
2337
|
-
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col ", children: [
|
|
2338
|
-
/* @__PURE__ */ jsx13(
|
|
2339
|
-
|
|
2337
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col min-w-0", children: [
|
|
2338
|
+
/* @__PURE__ */ jsx13(
|
|
2339
|
+
Text_default,
|
|
2340
|
+
{
|
|
2341
|
+
size: "xl",
|
|
2342
|
+
weight: "bold",
|
|
2343
|
+
color: "text-text-950",
|
|
2344
|
+
className: "truncate",
|
|
2345
|
+
children: name
|
|
2346
|
+
}
|
|
2347
|
+
),
|
|
2348
|
+
/* @__PURE__ */ jsx13(Text_default, { size: "md", color: "text-text-600", className: "truncate", children: email })
|
|
2340
2349
|
] })
|
|
2341
2350
|
]
|
|
2342
2351
|
}
|
|
2343
2352
|
);
|
|
2344
2353
|
});
|
|
2345
2354
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
2355
|
+
var ProfileMenuInfo = forwardRef5(
|
|
2356
|
+
({
|
|
2357
|
+
className,
|
|
2358
|
+
schoolName,
|
|
2359
|
+
classYearName,
|
|
2360
|
+
schoolYearName,
|
|
2361
|
+
store: _store,
|
|
2362
|
+
...props
|
|
2363
|
+
}, ref) => {
|
|
2364
|
+
return /* @__PURE__ */ jsxs10(
|
|
2365
|
+
"div",
|
|
2366
|
+
{
|
|
2367
|
+
ref,
|
|
2368
|
+
"data-component": "ProfileMenuInfo",
|
|
2369
|
+
className: cn("flex flex-row gap-4 items-center", className),
|
|
2370
|
+
...props,
|
|
2371
|
+
children: [
|
|
2372
|
+
/* @__PURE__ */ jsx13("span", { className: "w-16 h-16" }),
|
|
2373
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col ", children: [
|
|
2374
|
+
/* @__PURE__ */ jsx13(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
|
|
2375
|
+
/* @__PURE__ */ jsxs10("span", { className: "flex flex-row items-center gap-2", children: [
|
|
2376
|
+
/* @__PURE__ */ jsx13(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
|
|
2377
|
+
/* @__PURE__ */ jsx13("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
|
|
2378
|
+
/* @__PURE__ */ jsx13(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
|
|
2379
|
+
] })
|
|
2380
|
+
] })
|
|
2381
|
+
]
|
|
2382
|
+
}
|
|
2383
|
+
);
|
|
2384
|
+
}
|
|
2385
|
+
);
|
|
2386
|
+
ProfileMenuInfo.displayName = "ProfileMenuInfo";
|
|
2346
2387
|
var ProfileToggleTheme = ({
|
|
2347
2388
|
store: externalStore,
|
|
2348
2389
|
...props
|
|
@@ -5467,6 +5508,7 @@ var MessageStep = ({
|
|
|
5467
5508
|
const handleRemoveFile = () => {
|
|
5468
5509
|
setImage(null);
|
|
5469
5510
|
};
|
|
5511
|
+
const isImageFile = image instanceof File;
|
|
5470
5512
|
return /* @__PURE__ */ jsxs19("section", { className: "flex flex-col gap-4", children: [
|
|
5471
5513
|
/* @__PURE__ */ jsx24(
|
|
5472
5514
|
Input_default,
|
|
@@ -5492,7 +5534,7 @@ var MessageStep = ({
|
|
|
5492
5534
|
allowImageAttachment && /* @__PURE__ */ jsx24(
|
|
5493
5535
|
ImageUpload,
|
|
5494
5536
|
{
|
|
5495
|
-
selectedFile: image,
|
|
5537
|
+
selectedFile: isImageFile ? image : null,
|
|
5496
5538
|
onFileSelect: handleFileSelect,
|
|
5497
5539
|
onRemoveFile: handleRemoveFile
|
|
5498
5540
|
}
|
|
@@ -5696,7 +5738,7 @@ var DateStep = ({
|
|
|
5696
5738
|
// src/components/AlertManager/AlertSteps/PreviewStep.tsx
|
|
5697
5739
|
import { useMemo as useMemo5, useEffect as useEffect11 } from "react";
|
|
5698
5740
|
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5699
|
-
var PreviewStep = () => {
|
|
5741
|
+
var PreviewStep = ({ imageLink, defaultImage }) => {
|
|
5700
5742
|
const title = useAlertFormStore((state) => state.title);
|
|
5701
5743
|
const message = useAlertFormStore((state) => state.message);
|
|
5702
5744
|
const image = useAlertFormStore((state) => state.image);
|
|
@@ -5707,17 +5749,21 @@ var PreviewStep = () => {
|
|
|
5707
5749
|
if (image instanceof File) {
|
|
5708
5750
|
return globalThis.window.URL.createObjectURL(image);
|
|
5709
5751
|
}
|
|
5752
|
+
if (typeof image === "string") {
|
|
5753
|
+
return image;
|
|
5754
|
+
}
|
|
5710
5755
|
return void 0;
|
|
5711
5756
|
}, [image]);
|
|
5712
5757
|
useEffect11(() => {
|
|
5713
5758
|
return () => {
|
|
5714
|
-
if (
|
|
5759
|
+
if (globalThis.window !== void 0 && imageUrl && image instanceof File) {
|
|
5715
5760
|
URL.revokeObjectURL(imageUrl);
|
|
5716
5761
|
}
|
|
5717
5762
|
};
|
|
5718
|
-
}, [imageUrl]);
|
|
5763
|
+
}, [imageUrl, image]);
|
|
5764
|
+
const finalImageUrl = imageLink || imageUrl || defaultImage || void 0;
|
|
5719
5765
|
return /* @__PURE__ */ jsx27("section", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs22("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl", children: [
|
|
5720
|
-
/* @__PURE__ */ jsx27("img", { src:
|
|
5766
|
+
finalImageUrl && /* @__PURE__ */ jsx27("img", { src: finalImageUrl, alt: title || "Imagem do alerta" }),
|
|
5721
5767
|
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center text-center gap-3", children: [
|
|
5722
5768
|
/* @__PURE__ */ jsx27(Text_default, { size: "lg", weight: "semibold", children: title || "Nenhum T\xEDtulo de Alerta" }),
|
|
5723
5769
|
/* @__PURE__ */ jsx27(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: message || "Aqui aparecer\xE1 a mensagem do alerta definido pelo usu\xE1rio" })
|
|
@@ -5811,7 +5857,9 @@ var StepWrapper = ({ children }) => /* @__PURE__ */ jsx28("div", { children });
|
|
|
5811
5857
|
var AlertsManager = ({
|
|
5812
5858
|
config,
|
|
5813
5859
|
isOpen = false,
|
|
5814
|
-
onClose
|
|
5860
|
+
onClose,
|
|
5861
|
+
imageLink,
|
|
5862
|
+
defaultImage
|
|
5815
5863
|
}) => {
|
|
5816
5864
|
const [isModalOpen, setIsModalOpen] = useState13(isOpen);
|
|
5817
5865
|
const [currentStep, setCurrentStep] = useState13(0);
|
|
@@ -5970,7 +6018,7 @@ var AlertsManager = ({
|
|
|
5970
6018
|
}
|
|
5971
6019
|
) });
|
|
5972
6020
|
case 3:
|
|
5973
|
-
return /* @__PURE__ */ jsx28(StepWrapper, { children: /* @__PURE__ */ jsx28(PreviewStep, {}) });
|
|
6021
|
+
return /* @__PURE__ */ jsx28(StepWrapper, { children: /* @__PURE__ */ jsx28(PreviewStep, { imageLink, defaultImage }) });
|
|
5974
6022
|
default:
|
|
5975
6023
|
return null;
|
|
5976
6024
|
}
|
|
@@ -5981,7 +6029,9 @@ var AlertsManager = ({
|
|
|
5981
6029
|
labels,
|
|
5982
6030
|
behavior,
|
|
5983
6031
|
handleNext2,
|
|
5984
|
-
handlePrevious
|
|
6032
|
+
handlePrevious,
|
|
6033
|
+
imageLink,
|
|
6034
|
+
defaultImage
|
|
5985
6035
|
]);
|
|
5986
6036
|
const isFirstStep = currentStep === 0;
|
|
5987
6037
|
const isLastStep = currentStep === steps.length - 1;
|