analytica-frontend-lib 1.2.17 → 1.2.18
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 +17 -11
- package/dist/AlertManager/index.js.map +1 -1
- package/dist/AlertManager/index.mjs +17 -11
- 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/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +343 -356
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +114 -127
- 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,
|
|
@@ -5467,6 +5464,7 @@ var MessageStep = ({
|
|
|
5467
5464
|
const handleRemoveFile = () => {
|
|
5468
5465
|
setImage(null);
|
|
5469
5466
|
};
|
|
5467
|
+
const isImageFile = image instanceof File;
|
|
5470
5468
|
return /* @__PURE__ */ jsxs19("section", { className: "flex flex-col gap-4", children: [
|
|
5471
5469
|
/* @__PURE__ */ jsx24(
|
|
5472
5470
|
Input_default,
|
|
@@ -5492,7 +5490,7 @@ var MessageStep = ({
|
|
|
5492
5490
|
allowImageAttachment && /* @__PURE__ */ jsx24(
|
|
5493
5491
|
ImageUpload,
|
|
5494
5492
|
{
|
|
5495
|
-
selectedFile: image,
|
|
5493
|
+
selectedFile: isImageFile ? image : null,
|
|
5496
5494
|
onFileSelect: handleFileSelect,
|
|
5497
5495
|
onRemoveFile: handleRemoveFile
|
|
5498
5496
|
}
|
|
@@ -5696,7 +5694,7 @@ var DateStep = ({
|
|
|
5696
5694
|
// src/components/AlertManager/AlertSteps/PreviewStep.tsx
|
|
5697
5695
|
import { useMemo as useMemo5, useEffect as useEffect11 } from "react";
|
|
5698
5696
|
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5699
|
-
var PreviewStep = () => {
|
|
5697
|
+
var PreviewStep = ({ imageLink, defaultImage }) => {
|
|
5700
5698
|
const title = useAlertFormStore((state) => state.title);
|
|
5701
5699
|
const message = useAlertFormStore((state) => state.message);
|
|
5702
5700
|
const image = useAlertFormStore((state) => state.image);
|
|
@@ -5707,17 +5705,21 @@ var PreviewStep = () => {
|
|
|
5707
5705
|
if (image instanceof File) {
|
|
5708
5706
|
return globalThis.window.URL.createObjectURL(image);
|
|
5709
5707
|
}
|
|
5708
|
+
if (typeof image === "string") {
|
|
5709
|
+
return image;
|
|
5710
|
+
}
|
|
5710
5711
|
return void 0;
|
|
5711
5712
|
}, [image]);
|
|
5712
5713
|
useEffect11(() => {
|
|
5713
5714
|
return () => {
|
|
5714
|
-
if (
|
|
5715
|
+
if (globalThis.window !== void 0 && imageUrl && image instanceof File) {
|
|
5715
5716
|
URL.revokeObjectURL(imageUrl);
|
|
5716
5717
|
}
|
|
5717
5718
|
};
|
|
5718
|
-
}, [imageUrl]);
|
|
5719
|
+
}, [imageUrl, image]);
|
|
5720
|
+
const finalImageUrl = imageLink || imageUrl || defaultImage || void 0;
|
|
5719
5721
|
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:
|
|
5722
|
+
finalImageUrl && /* @__PURE__ */ jsx27("img", { src: finalImageUrl, alt: title || "Imagem do alerta" }),
|
|
5721
5723
|
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center text-center gap-3", children: [
|
|
5722
5724
|
/* @__PURE__ */ jsx27(Text_default, { size: "lg", weight: "semibold", children: title || "Nenhum T\xEDtulo de Alerta" }),
|
|
5723
5725
|
/* @__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 +5813,9 @@ var StepWrapper = ({ children }) => /* @__PURE__ */ jsx28("div", { children });
|
|
|
5811
5813
|
var AlertsManager = ({
|
|
5812
5814
|
config,
|
|
5813
5815
|
isOpen = false,
|
|
5814
|
-
onClose
|
|
5816
|
+
onClose,
|
|
5817
|
+
imageLink,
|
|
5818
|
+
defaultImage
|
|
5815
5819
|
}) => {
|
|
5816
5820
|
const [isModalOpen, setIsModalOpen] = useState13(isOpen);
|
|
5817
5821
|
const [currentStep, setCurrentStep] = useState13(0);
|
|
@@ -5970,7 +5974,7 @@ var AlertsManager = ({
|
|
|
5970
5974
|
}
|
|
5971
5975
|
) });
|
|
5972
5976
|
case 3:
|
|
5973
|
-
return /* @__PURE__ */ jsx28(StepWrapper, { children: /* @__PURE__ */ jsx28(PreviewStep, {}) });
|
|
5977
|
+
return /* @__PURE__ */ jsx28(StepWrapper, { children: /* @__PURE__ */ jsx28(PreviewStep, { imageLink, defaultImage }) });
|
|
5974
5978
|
default:
|
|
5975
5979
|
return null;
|
|
5976
5980
|
}
|
|
@@ -5981,7 +5985,9 @@ var AlertsManager = ({
|
|
|
5981
5985
|
labels,
|
|
5982
5986
|
behavior,
|
|
5983
5987
|
handleNext2,
|
|
5984
|
-
handlePrevious
|
|
5988
|
+
handlePrevious,
|
|
5989
|
+
imageLink,
|
|
5990
|
+
defaultImage
|
|
5985
5991
|
]);
|
|
5986
5992
|
const isFirstStep = currentStep === 0;
|
|
5987
5993
|
const isLastStep = currentStep === steps.length - 1;
|