@algorithm-shift/design-system 1.2.994 → 1.2.996
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/index.css +56 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +274 -148
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +284 -158
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -8
package/dist/index.js
CHANGED
|
@@ -2126,7 +2126,8 @@ function LazySelectDropdown({
|
|
|
2126
2126
|
errorMessage,
|
|
2127
2127
|
axiosInstance,
|
|
2128
2128
|
enableAddNewOption = false,
|
|
2129
|
-
enforceStrictQueryParams = false
|
|
2129
|
+
enforceStrictQueryParams = false,
|
|
2130
|
+
...props
|
|
2130
2131
|
}) {
|
|
2131
2132
|
const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
|
|
2132
2133
|
const [searchTerm, setSearchTerm] = (0, import_react21.useState)("");
|
|
@@ -2252,7 +2253,10 @@ function LazySelectDropdown({
|
|
|
2252
2253
|
top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
|
|
2253
2254
|
left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
|
|
2254
2255
|
},
|
|
2255
|
-
children: loading &&
|
|
2256
|
+
children: props.loading && !loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
|
|
2258
|
+
"Loading..."
|
|
2259
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
|
|
2256
2260
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
|
|
2257
2261
|
"Loading..."
|
|
2258
2262
|
] }) : lazyOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
@@ -2290,7 +2294,7 @@ function LazySelectDropdown({
|
|
|
2290
2294
|
children: `Add "${searchTerm}"`
|
|
2291
2295
|
}
|
|
2292
2296
|
)
|
|
2293
|
-
] })
|
|
2297
|
+
] }) })
|
|
2294
2298
|
}
|
|
2295
2299
|
) })
|
|
2296
2300
|
] });
|
|
@@ -3276,6 +3280,7 @@ function LazyMultiSelectDropdown({
|
|
|
3276
3280
|
}) {
|
|
3277
3281
|
const [isOpen, setIsOpen] = (0, import_react29.useState)(false);
|
|
3278
3282
|
const [searchTerm, setSearchTerm] = (0, import_react29.useState)("");
|
|
3283
|
+
const [selectedDetails, setSelectedDetails] = (0, import_react29.useState)({});
|
|
3279
3284
|
const dropdownRef = (0, import_react29.useRef)(null);
|
|
3280
3285
|
const observerTarget = (0, import_react29.useRef)(null);
|
|
3281
3286
|
const ensureUnique = (arr) => {
|
|
@@ -3327,8 +3332,28 @@ function LazyMultiSelectDropdown({
|
|
|
3327
3332
|
}
|
|
3328
3333
|
};
|
|
3329
3334
|
const selectedOptions = (0, import_react29.useMemo)(() => {
|
|
3330
|
-
return
|
|
3331
|
-
|
|
3335
|
+
return normalizedValue.map((id2) => {
|
|
3336
|
+
const fromLazy = lazyOptions.find((opt) => opt.value === id2);
|
|
3337
|
+
if (fromLazy) return fromLazy;
|
|
3338
|
+
if (selectedDetails[id2]) return selectedDetails[id2];
|
|
3339
|
+
return { value: id2, label: id2 };
|
|
3340
|
+
});
|
|
3341
|
+
}, [normalizedValue, lazyOptions, selectedDetails]);
|
|
3342
|
+
(0, import_react29.useEffect)(() => {
|
|
3343
|
+
const newDetails = { ...selectedDetails };
|
|
3344
|
+
normalizedValue.forEach((id2) => {
|
|
3345
|
+
const option = lazyOptions.find((opt) => opt.value === id2);
|
|
3346
|
+
if (option && !newDetails[id2]) {
|
|
3347
|
+
newDetails[id2] = option;
|
|
3348
|
+
}
|
|
3349
|
+
});
|
|
3350
|
+
Object.keys(newDetails).forEach((key) => {
|
|
3351
|
+
if (!normalizedValue.includes(key)) {
|
|
3352
|
+
delete newDetails[key];
|
|
3353
|
+
}
|
|
3354
|
+
});
|
|
3355
|
+
setSelectedDetails(newDetails);
|
|
3356
|
+
}, [normalizedValue, lazyOptions]);
|
|
3332
3357
|
(0, import_react29.useEffect)(() => {
|
|
3333
3358
|
const handleClick = (e) => {
|
|
3334
3359
|
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
@@ -3354,7 +3379,7 @@ function LazyMultiSelectDropdown({
|
|
|
3354
3379
|
setSearchTerm(term);
|
|
3355
3380
|
search(term);
|
|
3356
3381
|
};
|
|
3357
|
-
const toggleSelect = (val) => {
|
|
3382
|
+
const toggleSelect = (0, import_react29.useCallback)((val) => {
|
|
3358
3383
|
let updated;
|
|
3359
3384
|
if (normalizedValue.includes(val)) {
|
|
3360
3385
|
updated = normalizedValue.filter((v) => v !== val);
|
|
@@ -3362,14 +3387,18 @@ function LazyMultiSelectDropdown({
|
|
|
3362
3387
|
updated = ensureUnique([...normalizedValue, val]);
|
|
3363
3388
|
}
|
|
3364
3389
|
onChange?.(convertOutput(updated), id);
|
|
3365
|
-
};
|
|
3390
|
+
}, [normalizedValue, onChange, id, convertOutput]);
|
|
3366
3391
|
const removeTag = (val) => {
|
|
3367
3392
|
const updated = normalizedValue.filter((v) => v !== val);
|
|
3368
3393
|
onChange?.(convertOutput(updated), id);
|
|
3369
3394
|
};
|
|
3370
3395
|
const handleFocus = () => {
|
|
3371
|
-
if (!disabled)
|
|
3372
|
-
|
|
3396
|
+
if (!disabled) {
|
|
3397
|
+
setIsOpen(true);
|
|
3398
|
+
if (lazyOptions.length === 0) {
|
|
3399
|
+
loadPage(1, "");
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3373
3402
|
};
|
|
3374
3403
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref: dropdownRef, className: "relative w-full", children: [
|
|
3375
3404
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
@@ -4006,9 +4035,9 @@ function DataTable({
|
|
|
4006
4035
|
setLocalPageSize(newSize);
|
|
4007
4036
|
};
|
|
4008
4037
|
const pageSizeOptions = React10.useMemo(() => {
|
|
4009
|
-
const options = [10, 20, 50, 100].filter((size) => size < totalRecords);
|
|
4038
|
+
const options = [5, 10, 20, 50, 100].filter((size) => size < totalRecords);
|
|
4010
4039
|
if (options.length === 0) {
|
|
4011
|
-
options.push(
|
|
4040
|
+
options.push(5);
|
|
4012
4041
|
}
|
|
4013
4042
|
return options;
|
|
4014
4043
|
}, [totalRecords]);
|
|
@@ -5162,7 +5191,59 @@ var Tabs_default = Tabs;
|
|
|
5162
5191
|
|
|
5163
5192
|
// src/components/Navigation/Stages/Stages.tsx
|
|
5164
5193
|
var import_react33 = __toESM(require("react"));
|
|
5194
|
+
|
|
5195
|
+
// src/components/ui/tooltip.tsx
|
|
5196
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
5165
5197
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5198
|
+
function TooltipProvider({
|
|
5199
|
+
delayDuration = 0,
|
|
5200
|
+
...props
|
|
5201
|
+
}) {
|
|
5202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5203
|
+
TooltipPrimitive.Provider,
|
|
5204
|
+
{
|
|
5205
|
+
"data-slot": "tooltip-provider",
|
|
5206
|
+
delayDuration,
|
|
5207
|
+
...props
|
|
5208
|
+
}
|
|
5209
|
+
);
|
|
5210
|
+
}
|
|
5211
|
+
function Tooltip({
|
|
5212
|
+
...props
|
|
5213
|
+
}) {
|
|
5214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
5215
|
+
}
|
|
5216
|
+
function TooltipTrigger({
|
|
5217
|
+
...props
|
|
5218
|
+
}) {
|
|
5219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
5220
|
+
}
|
|
5221
|
+
function TooltipContent({
|
|
5222
|
+
className,
|
|
5223
|
+
sideOffset = 0,
|
|
5224
|
+
children,
|
|
5225
|
+
...props
|
|
5226
|
+
}) {
|
|
5227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
5228
|
+
TooltipPrimitive.Content,
|
|
5229
|
+
{
|
|
5230
|
+
"data-slot": "tooltip-content",
|
|
5231
|
+
sideOffset,
|
|
5232
|
+
className: cn(
|
|
5233
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
5234
|
+
className
|
|
5235
|
+
),
|
|
5236
|
+
...props,
|
|
5237
|
+
children: [
|
|
5238
|
+
children,
|
|
5239
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
5240
|
+
]
|
|
5241
|
+
}
|
|
5242
|
+
) });
|
|
5243
|
+
}
|
|
5244
|
+
|
|
5245
|
+
// src/components/Navigation/Stages/Stages.tsx
|
|
5246
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5166
5247
|
var StagesComponent = ({
|
|
5167
5248
|
stages,
|
|
5168
5249
|
isShowBtn,
|
|
@@ -5180,6 +5261,8 @@ var StagesComponent = ({
|
|
|
5180
5261
|
}) => {
|
|
5181
5262
|
const [activeStage, setActiveStage] = (0, import_react33.useState)("");
|
|
5182
5263
|
const [isCompleted, setIsCompleted] = (0, import_react33.useState)(false);
|
|
5264
|
+
const [activeChildStage, setActiveChildStage] = (0, import_react33.useState)(null);
|
|
5265
|
+
const [activeRootStage, setActiveRootStage] = (0, import_react33.useState)(null);
|
|
5183
5266
|
(0, import_react33.useEffect)(() => {
|
|
5184
5267
|
if (currentStage) {
|
|
5185
5268
|
setActiveStage(currentStage);
|
|
@@ -5190,6 +5273,9 @@ var StagesComponent = ({
|
|
|
5190
5273
|
const updateStage = (stageKey) => {
|
|
5191
5274
|
setActiveStage(stageKey);
|
|
5192
5275
|
onStageChange?.(stageKey);
|
|
5276
|
+
const { activeRoot, activeChild } = findStageContext(stages, stageKey);
|
|
5277
|
+
setActiveRootStage(activeRoot);
|
|
5278
|
+
setActiveChildStage(activeChild);
|
|
5193
5279
|
};
|
|
5194
5280
|
const nextStage = () => {
|
|
5195
5281
|
if (!stages || stages.length === 0) return;
|
|
@@ -5215,9 +5301,41 @@ var StagesComponent = ({
|
|
|
5215
5301
|
onStageChange?.(stageKey);
|
|
5216
5302
|
}
|
|
5217
5303
|
};
|
|
5218
|
-
const
|
|
5304
|
+
const findStageContext = (nodes, curr, root = null) => {
|
|
5305
|
+
if (!nodes || nodes.length === 0) {
|
|
5306
|
+
return { activeRoot: null, activeChild: null };
|
|
5307
|
+
}
|
|
5308
|
+
if (!Array.isArray(nodes)) {
|
|
5309
|
+
return { activeRoot: null, activeChild: null };
|
|
5310
|
+
}
|
|
5311
|
+
for (const node of nodes) {
|
|
5312
|
+
const currentRoot = root ?? node;
|
|
5313
|
+
if (node?.[dataKey] === curr) {
|
|
5314
|
+
return {
|
|
5315
|
+
activeRoot: root ?? node,
|
|
5316
|
+
activeChild: node
|
|
5317
|
+
};
|
|
5318
|
+
}
|
|
5319
|
+
const result = findStageContext(node?.children, curr, currentRoot);
|
|
5320
|
+
if (result.activeChild) {
|
|
5321
|
+
return result;
|
|
5322
|
+
}
|
|
5323
|
+
}
|
|
5324
|
+
return { activeRoot: null, activeChild: null };
|
|
5325
|
+
};
|
|
5326
|
+
(0, import_react33.useEffect)(() => {
|
|
5327
|
+
if (!currentStage || !Array.isArray(stages)) {
|
|
5328
|
+
setActiveRootStage(null);
|
|
5329
|
+
setActiveChildStage(null);
|
|
5330
|
+
return;
|
|
5331
|
+
}
|
|
5332
|
+
const { activeRoot, activeChild } = findStageContext(stages, currentStage);
|
|
5333
|
+
setActiveRootStage(activeRoot);
|
|
5334
|
+
setActiveChildStage(activeChild);
|
|
5335
|
+
}, [currentStage, stages]);
|
|
5336
|
+
const isAllStagesCompleted = isCompleted || activeRootStage?.[dataKey] === lastStage;
|
|
5219
5337
|
const disabled = isAllStagesCompleted || loading || saving;
|
|
5220
|
-
return /* @__PURE__ */ (0,
|
|
5338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5221
5339
|
"div",
|
|
5222
5340
|
{
|
|
5223
5341
|
className: `
|
|
@@ -5227,8 +5345,8 @@ var StagesComponent = ({
|
|
|
5227
5345
|
${isMobile ? "p-3 sm:p-4" : "p-2"}
|
|
5228
5346
|
`,
|
|
5229
5347
|
children: [
|
|
5230
|
-
/* @__PURE__ */ (0,
|
|
5231
|
-
/* @__PURE__ */ (0,
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex items-center flex-shrink-0 order-1 lg:order-1", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
5349
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5232
5350
|
"div",
|
|
5233
5351
|
{
|
|
5234
5352
|
className: `
|
|
@@ -5236,7 +5354,7 @@ var StagesComponent = ({
|
|
|
5236
5354
|
flex-wrap gap-2 sm:gap-2 lg:gap-3 w-full lg:w-auto
|
|
5237
5355
|
${isMobile ? "order-2 mt-2 lg:mt-0" : "order-2"}
|
|
5238
5356
|
`,
|
|
5239
|
-
children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ (0,
|
|
5357
|
+
children: loading ? Array(6).fill(null).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5240
5358
|
"button",
|
|
5241
5359
|
{
|
|
5242
5360
|
className: `
|
|
@@ -5250,41 +5368,49 @@ var StagesComponent = ({
|
|
|
5250
5368
|
disabled: true
|
|
5251
5369
|
},
|
|
5252
5370
|
index
|
|
5253
|
-
)) : stages?.length > 0 && stages?.map((stage, index) => {
|
|
5371
|
+
)) : (stages || [])?.length > 0 && stages?.map((stage, index) => {
|
|
5254
5372
|
const currentIndex = stages.findIndex((s) => s[dataKey] === activeStage);
|
|
5255
5373
|
const isCompletedStage = isAllStagesCompleted || index <= currentIndex;
|
|
5256
5374
|
const isActive = !isAllStagesCompleted && index === currentIndex;
|
|
5257
|
-
|
|
5258
|
-
|
|
5375
|
+
let stageColor = !stage.isSuccess ? "bg-red-50 text-red-700 border-2 border-red-700" : "bg-green-50 text-green-700 border-2 border-green-700";
|
|
5376
|
+
let stageLabel = stage[dataLabel];
|
|
5377
|
+
if (stage[dataKey] !== activeChildStage?.[dataKey] && activeRootStage?.[dataKey] === stage[dataKey]) {
|
|
5378
|
+
stageLabel = activeChildStage?.[dataLabel] || stageLabel;
|
|
5379
|
+
stageColor = activeChildStage?.isSuccess ? "bg-green-50 text-green-700 border-2 border-green-700" : "bg-red-50 text-red-700 border-2 border-red-700";
|
|
5380
|
+
}
|
|
5381
|
+
const stageKey = typeof stage[dataKey] === "string" ? stage[dataKey] : JSON.stringify(stage[dataKey]);
|
|
5382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Tooltip, { delayDuration: 500, disableHoverableContent: true, children: [
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5259
5384
|
"button",
|
|
5260
5385
|
{
|
|
5261
5386
|
className: `
|
|
5262
5387
|
min-w-[70px] sm:min-w-[80px] w-full sm:w-auto px-3 sm:px-4 py-1.5 sm:py-2
|
|
5263
5388
|
rounded-full text-xs sm:text-sm font-medium transition-colors duration-200
|
|
5264
|
-
whitespace-normal sm:whitespace-nowrap flex-shrink-0
|
|
5265
|
-
${isActive ? "bg-green-700 text-white shadow-md" : isCompletedStage ?
|
|
5389
|
+
whitespace-normal sm:whitespace-nowrap flex-shrink-0 max-w-[150px] text-ellipsis overflow-hidden
|
|
5390
|
+
${isActive ? "bg-green-700 text-white shadow-md" : isCompletedStage ? stageColor : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}
|
|
5266
5391
|
${isMobile ? "flex-1 text-center py-2.5" : ""}
|
|
5267
5392
|
`,
|
|
5268
5393
|
onClick: () => {
|
|
5269
5394
|
if (isAllStagesCompleted) return;
|
|
5270
5395
|
onStageClick(stage[dataKey]);
|
|
5271
5396
|
},
|
|
5272
|
-
children:
|
|
5397
|
+
children: stageLabel
|
|
5273
5398
|
}
|
|
5274
|
-
),
|
|
5275
|
-
|
|
5276
|
-
|
|
5399
|
+
) }),
|
|
5400
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TooltipContent, { className: "max-w-[400px] p-3 text-xs text-muted-foreground space-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("b", { children: stageLabel }) }) }),
|
|
5401
|
+
!isMobile && index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "hidden sm:flex sm:flex-shrink-0 w-3 h-px bg-gray-300 sm:w-4" })
|
|
5402
|
+
] }, stageKey) }, stageKey);
|
|
5277
5403
|
})
|
|
5278
5404
|
}
|
|
5279
5405
|
),
|
|
5280
|
-
isShowBtn && /* @__PURE__ */ (0,
|
|
5406
|
+
isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5281
5407
|
"div",
|
|
5282
5408
|
{
|
|
5283
5409
|
className: `
|
|
5284
5410
|
flex items-center flex-shrink-0 w-full lg:w-auto
|
|
5285
5411
|
${isMobile ? "order-3 mt-3 lg:mt-0" : "order-3"}
|
|
5286
5412
|
`,
|
|
5287
|
-
children: /* @__PURE__ */ (0,
|
|
5413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5288
5414
|
"button",
|
|
5289
5415
|
{
|
|
5290
5416
|
className: `
|
|
@@ -5306,20 +5432,20 @@ var StagesComponent = ({
|
|
|
5306
5432
|
var Stages_default = StagesComponent;
|
|
5307
5433
|
|
|
5308
5434
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
5309
|
-
var
|
|
5435
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5310
5436
|
var Spacer = ({ className, style }) => {
|
|
5311
|
-
return /* @__PURE__ */ (0,
|
|
5437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `${className}`, style });
|
|
5312
5438
|
};
|
|
5313
5439
|
var Spacer_default = Spacer;
|
|
5314
5440
|
|
|
5315
5441
|
// src/components/Navigation/Profile/Profile.tsx
|
|
5316
|
-
var
|
|
5442
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5317
5443
|
|
|
5318
5444
|
// src/components/Navigation/Notification/Notification.tsx
|
|
5319
|
-
var
|
|
5445
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5320
5446
|
|
|
5321
5447
|
// src/components/Navigation/Logo/Logo.tsx
|
|
5322
|
-
var
|
|
5448
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5323
5449
|
|
|
5324
5450
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
5325
5451
|
var import_react34 = require("react");
|
|
@@ -5331,8 +5457,8 @@ var import_navigation3 = require("next/navigation");
|
|
|
5331
5457
|
// src/components/ui/avatar.tsx
|
|
5332
5458
|
var React12 = __toESM(require("react"));
|
|
5333
5459
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
|
|
5334
|
-
var
|
|
5335
|
-
var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5460
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5461
|
+
var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5336
5462
|
AvatarPrimitive.Root,
|
|
5337
5463
|
{
|
|
5338
5464
|
ref,
|
|
@@ -5344,7 +5470,7 @@ var Avatar = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
5344
5470
|
}
|
|
5345
5471
|
));
|
|
5346
5472
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
5347
|
-
var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5473
|
+
var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5348
5474
|
AvatarPrimitive.Image,
|
|
5349
5475
|
{
|
|
5350
5476
|
ref,
|
|
@@ -5353,7 +5479,7 @@ var AvatarImage = React12.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5353
5479
|
}
|
|
5354
5480
|
));
|
|
5355
5481
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
5356
|
-
var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5482
|
+
var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5357
5483
|
AvatarPrimitive.Fallback,
|
|
5358
5484
|
{
|
|
5359
5485
|
ref,
|
|
@@ -5367,7 +5493,7 @@ var AvatarFallback = React12.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
5367
5493
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
5368
5494
|
|
|
5369
5495
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
5370
|
-
var
|
|
5496
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5371
5497
|
function Navbar({
|
|
5372
5498
|
style,
|
|
5373
5499
|
badgeType,
|
|
@@ -5425,9 +5551,9 @@ function Navbar({
|
|
|
5425
5551
|
}
|
|
5426
5552
|
return list;
|
|
5427
5553
|
}, [source, navList, list]);
|
|
5428
|
-
const RenderSearchInput = () => /* @__PURE__ */ (0,
|
|
5429
|
-
/* @__PURE__ */ (0,
|
|
5430
|
-
/* @__PURE__ */ (0,
|
|
5554
|
+
const RenderSearchInput = () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-1 px-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
|
|
5556
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5431
5557
|
Input,
|
|
5432
5558
|
{
|
|
5433
5559
|
placeholder: "Search",
|
|
@@ -5443,23 +5569,23 @@ function Navbar({
|
|
|
5443
5569
|
}
|
|
5444
5570
|
)
|
|
5445
5571
|
] }) });
|
|
5446
|
-
return /* @__PURE__ */ (0,
|
|
5447
|
-
/* @__PURE__ */ (0,
|
|
5572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
5573
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5448
5574
|
"nav",
|
|
5449
5575
|
{
|
|
5450
5576
|
className: "w-full min-h-[75px] border-b border-gray-200 dark:border-gray-800 dark:bg-gray-800 bg-white shadow-sm",
|
|
5451
5577
|
style,
|
|
5452
|
-
children: /* @__PURE__ */ (0,
|
|
5453
|
-
/* @__PURE__ */ (0,
|
|
5578
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
|
|
5579
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5454
5580
|
import_link4.default,
|
|
5455
5581
|
{
|
|
5456
5582
|
href: "/",
|
|
5457
5583
|
onClick: (e) => handleBuilderExit(e, "/"),
|
|
5458
5584
|
className: "flex items-center space-x-2",
|
|
5459
|
-
children: imageUrl ? /* @__PURE__ */ (0,
|
|
5585
|
+
children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_image2.default, { src: imageUrl, alt: altText, width: 180, height: 40 }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
|
|
5460
5586
|
}
|
|
5461
5587
|
),
|
|
5462
|
-
isDesktop && /* @__PURE__ */ (0,
|
|
5588
|
+
isDesktop && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "hidden md:flex items-center space-x-6", children: formattedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5463
5589
|
import_link4.default,
|
|
5464
5590
|
{
|
|
5465
5591
|
href: item.url,
|
|
@@ -5469,23 +5595,23 @@ function Navbar({
|
|
|
5469
5595
|
},
|
|
5470
5596
|
item.id
|
|
5471
5597
|
)) }),
|
|
5472
|
-
/* @__PURE__ */ (0,
|
|
5473
|
-
(isDesktop || isTablet) && /* @__PURE__ */ (0,
|
|
5474
|
-
/* @__PURE__ */ (0,
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
5476
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0,
|
|
5598
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
5599
|
+
(isDesktop || isTablet) && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(RenderSearchInput, {}),
|
|
5600
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-md", children: [
|
|
5601
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Bell, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" }) }),
|
|
5602
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "absolute -top-1 -right-1 h-4 w-4 flex items-center justify-center bg-red-500 rounded-full text-white text-[10px]", children: badgeCount }) : !hideBadgeWhenZero && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full" })
|
|
5477
5603
|
] }),
|
|
5478
|
-
/* @__PURE__ */ (0,
|
|
5479
|
-
/* @__PURE__ */ (0,
|
|
5480
|
-
!isMobile && showName && /* @__PURE__ */ (0,
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5482
|
-
(isMobile || isTablet) && /* @__PURE__ */ (0,
|
|
5604
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(DropdownMenu, { children: [
|
|
5605
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
5606
|
+
!isMobile && showName && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h4", { className: "text-gray-900 dark:text-gray-300 text-sm", children: userName }),
|
|
5607
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Avatar, { className: "h-8 w-8", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(AvatarImage, { src: "/images/appbuilder/toolset/profile.svg", alt: "profile" }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-green-700 text-white h-full w-full rounded-full flex items-center justify-center text-xs", children: getInitials(userName) }) }),
|
|
5608
|
+
(isMobile || isTablet) && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react18.Menu, { className: "h-6 w-6" }) })
|
|
5483
5609
|
] }) }),
|
|
5484
|
-
/* @__PURE__ */ (0,
|
|
5485
|
-
profileMenu.map((item) => /* @__PURE__ */ (0,
|
|
5486
|
-
(isMobile || isTablet) && /* @__PURE__ */ (0,
|
|
5487
|
-
/* @__PURE__ */ (0,
|
|
5488
|
-
formattedMenu.map((item) => /* @__PURE__ */ (0,
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
|
|
5611
|
+
profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_link4.default, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id)),
|
|
5612
|
+
(isMobile || isTablet) && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
5613
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DropdownMenuSeparator, {}),
|
|
5614
|
+
formattedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_link4.default, { href: item.url, onClick: (e) => handleBuilderExit(e, item.url), children: item.header }) }, item.id))
|
|
5489
5615
|
] })
|
|
5490
5616
|
] })
|
|
5491
5617
|
] })
|
|
@@ -5493,7 +5619,7 @@ function Navbar({
|
|
|
5493
5619
|
] })
|
|
5494
5620
|
}
|
|
5495
5621
|
),
|
|
5496
|
-
isMobile && /* @__PURE__ */ (0,
|
|
5622
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "p-3", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(RenderSearchInput, {}) })
|
|
5497
5623
|
] });
|
|
5498
5624
|
}
|
|
5499
5625
|
|
|
@@ -5501,7 +5627,7 @@ function Navbar({
|
|
|
5501
5627
|
var import_react35 = __toESM(require("react"));
|
|
5502
5628
|
var import_axios3 = __toESM(require("axios"));
|
|
5503
5629
|
var import_recharts = require("recharts");
|
|
5504
|
-
var
|
|
5630
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5505
5631
|
var getRandomColor = () => {
|
|
5506
5632
|
const palette = [
|
|
5507
5633
|
"#2563eb",
|
|
@@ -5628,27 +5754,27 @@ var ChartComponent = ({
|
|
|
5628
5754
|
const chartType = props.chartType || "bar";
|
|
5629
5755
|
const legendsPosition = ["middle", "bottom"].includes(props.legendsPosition) ? props.legendsPosition : "top";
|
|
5630
5756
|
if (effectiveLoading || data.length === 0) {
|
|
5631
|
-
return /* @__PURE__ */ (0,
|
|
5757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5632
5758
|
"div",
|
|
5633
5759
|
{
|
|
5634
5760
|
className: `relative flex flex-col w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
|
|
5635
5761
|
style,
|
|
5636
5762
|
children: [
|
|
5637
|
-
/* @__PURE__ */ (0,
|
|
5638
|
-
/* @__PURE__ */ (0,
|
|
5639
|
-
/* @__PURE__ */ (0,
|
|
5763
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "inline-flex items-center space-x-2 bg-white/90 px-6 py-2.5 rounded-xl backdrop-blur-sm border border-gray-200 shadow-lg", children: [
|
|
5764
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "w-5 h-5 border-2 border-gray-400 border-t-blue-500 rounded-full animate-spin" }),
|
|
5765
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-sm font-medium text-gray-700 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
|
|
5640
5766
|
] }) }),
|
|
5641
|
-
/* @__PURE__ */ (0,
|
|
5642
|
-
/* @__PURE__ */ (0,
|
|
5767
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex-1 relative w-full h-full min-h-[240px] md:min-h-[320px] bg-white/80 rounded-lg border border-gray-200/50 shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute bottom-0 left-4 right-4 flex gap-2 h-[200px] md:h-[280px] justify-center items-end", children: [...Array(20)].map((_, idx) => {
|
|
5643
5769
|
const randomHeight = `${Math.floor(Math.random() * 76) + 20}%`;
|
|
5644
|
-
return /* @__PURE__ */ (0,
|
|
5770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5645
5771
|
"div",
|
|
5646
5772
|
{
|
|
5647
5773
|
className: `relative w-10 md:w-12 flex-1 max-w-[48px] rounded-t-lg bg-gradient-to-t from-gray-100 via-gray-200 to-transparent shadow-lg border border-gray-200/50 animate-slide-up stagger-${idx} overflow-hidden`,
|
|
5648
5774
|
style: { height: randomHeight, animationDelay: `${idx * 0.08}s` },
|
|
5649
5775
|
children: [
|
|
5650
|
-
/* @__PURE__ */ (0,
|
|
5651
|
-
/* @__PURE__ */ (0,
|
|
5776
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-white/40 via-transparent to-white/40 animate-shimmer-bar" }),
|
|
5777
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute bottom-1 left-1/2 w-4 h-1 rounded-full transform -translate-x-1/2 blur-sm" })
|
|
5652
5778
|
]
|
|
5653
5779
|
},
|
|
5654
5780
|
`bar-${idx}`
|
|
@@ -5658,9 +5784,9 @@ var ChartComponent = ({
|
|
|
5658
5784
|
}
|
|
5659
5785
|
);
|
|
5660
5786
|
}
|
|
5661
|
-
return /* @__PURE__ */ (0,
|
|
5662
|
-
isPaginationEnabled && rawMeta && /* @__PURE__ */ (0,
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
5787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `${className} h-[450px]`, style, children: [
|
|
5788
|
+
isPaginationEnabled && rawMeta && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center justify-between mb-4 px-2", children: [
|
|
5789
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "text-sm text-gray-600 hidden sm:block", children: [
|
|
5664
5790
|
"Page ",
|
|
5665
5791
|
rawMeta.page,
|
|
5666
5792
|
" of ",
|
|
@@ -5669,52 +5795,52 @@ var ChartComponent = ({
|
|
|
5669
5795
|
rawMeta.total.toLocaleString(),
|
|
5670
5796
|
" total records)"
|
|
5671
5797
|
] }),
|
|
5672
|
-
/* @__PURE__ */ (0,
|
|
5673
|
-
/* @__PURE__ */ (0,
|
|
5798
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center space-x-2 sm:hidden w-full justify-center", children: [
|
|
5799
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5674
5800
|
"button",
|
|
5675
5801
|
{
|
|
5676
5802
|
onClick: () => handlePageChange(currentPage - 1),
|
|
5677
5803
|
disabled: currentPage === 1 || localLoading,
|
|
5678
5804
|
className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
|
|
5679
|
-
children: /* @__PURE__ */ (0,
|
|
5805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: "\u2190 Prev" })
|
|
5680
5806
|
}
|
|
5681
5807
|
),
|
|
5682
|
-
/* @__PURE__ */ (0,
|
|
5683
|
-
/* @__PURE__ */ (0,
|
|
5808
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "px-2 py-2 text-xs font-semibold text-gray-700 min-w-[36px] text-center flex-shrink-0", children: currentPage }),
|
|
5809
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5684
5810
|
"button",
|
|
5685
5811
|
{
|
|
5686
5812
|
onClick: () => handlePageChange(currentPage + 1),
|
|
5687
5813
|
disabled: currentPage >= rawMeta.pages || localLoading,
|
|
5688
5814
|
className: "flex-1 px-3 py-2 text-xs font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center space-x-1 min-w-0",
|
|
5689
|
-
children: /* @__PURE__ */ (0,
|
|
5815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: "Next \u2192" })
|
|
5690
5816
|
}
|
|
5691
5817
|
)
|
|
5692
5818
|
] }),
|
|
5693
|
-
/* @__PURE__ */ (0,
|
|
5694
|
-
/* @__PURE__ */ (0,
|
|
5819
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center space-x-2 hidden sm:flex", children: [
|
|
5820
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5695
5821
|
"button",
|
|
5696
5822
|
{
|
|
5697
5823
|
onClick: () => handlePageChange(currentPage - 1),
|
|
5698
5824
|
disabled: currentPage === 1 || localLoading,
|
|
5699
5825
|
className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
|
|
5700
|
-
children: /* @__PURE__ */ (0,
|
|
5826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: "\u2190 Prev" })
|
|
5701
5827
|
}
|
|
5702
5828
|
),
|
|
5703
|
-
/* @__PURE__ */ (0,
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5829
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "px-3 py-1 text-sm font-medium text-gray-700", children: currentPage }),
|
|
5830
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5705
5831
|
"button",
|
|
5706
5832
|
{
|
|
5707
5833
|
onClick: () => handlePageChange(currentPage + 1),
|
|
5708
5834
|
disabled: currentPage >= rawMeta.pages || localLoading,
|
|
5709
5835
|
className: "px-3 py-1.5 text-sm font-medium rounded-lg border bg-white shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center space-x-1",
|
|
5710
|
-
children: /* @__PURE__ */ (0,
|
|
5836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: "Next \u2192" })
|
|
5711
5837
|
}
|
|
5712
5838
|
)
|
|
5713
5839
|
] })
|
|
5714
5840
|
] }),
|
|
5715
|
-
/* @__PURE__ */ (0,
|
|
5716
|
-
/* @__PURE__ */ (0,
|
|
5717
|
-
/* @__PURE__ */ (0,
|
|
5841
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_recharts.BarChart, { data, children: [
|
|
5842
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
5843
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5718
5844
|
import_recharts.XAxis,
|
|
5719
5845
|
{
|
|
5720
5846
|
dataKey: dataLabel,
|
|
@@ -5732,7 +5858,7 @@ var ChartComponent = ({
|
|
|
5732
5858
|
className: "hidden sm:block"
|
|
5733
5859
|
}
|
|
5734
5860
|
),
|
|
5735
|
-
/* @__PURE__ */ (0,
|
|
5861
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5736
5862
|
import_recharts.YAxis,
|
|
5737
5863
|
{
|
|
5738
5864
|
tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
|
|
@@ -5745,9 +5871,9 @@ var ChartComponent = ({
|
|
|
5745
5871
|
width: 60
|
|
5746
5872
|
}
|
|
5747
5873
|
),
|
|
5748
|
-
/* @__PURE__ */ (0,
|
|
5749
|
-
/* @__PURE__ */ (0,
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5874
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts.Tooltip, { formatter: (value) => [`${value}`, "Count"] }),
|
|
5875
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
5876
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5751
5877
|
import_recharts.Bar,
|
|
5752
5878
|
{
|
|
5753
5879
|
dataKey,
|
|
@@ -5755,13 +5881,13 @@ var ChartComponent = ({
|
|
|
5755
5881
|
isAnimationActive: false
|
|
5756
5882
|
}
|
|
5757
5883
|
)
|
|
5758
|
-
] }) : /* @__PURE__ */ (0,
|
|
5759
|
-
/* @__PURE__ */ (0,
|
|
5760
|
-
/* @__PURE__ */ (0,
|
|
5761
|
-
/* @__PURE__ */ (0,
|
|
5884
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_recharts.AreaChart, { data, children: [
|
|
5885
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
5886
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
5887
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
5762
5888
|
] }) }),
|
|
5763
|
-
/* @__PURE__ */ (0,
|
|
5764
|
-
/* @__PURE__ */ (0,
|
|
5889
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
|
|
5890
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5765
5891
|
import_recharts.XAxis,
|
|
5766
5892
|
{
|
|
5767
5893
|
dataKey: dataLabel,
|
|
@@ -5775,7 +5901,7 @@ var ChartComponent = ({
|
|
|
5775
5901
|
}
|
|
5776
5902
|
}
|
|
5777
5903
|
),
|
|
5778
|
-
/* @__PURE__ */ (0,
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5779
5905
|
import_recharts.YAxis,
|
|
5780
5906
|
{
|
|
5781
5907
|
tickFormatter: (value) => `${(value / 1e3).toFixed(0)}k`,
|
|
@@ -5788,8 +5914,8 @@ var ChartComponent = ({
|
|
|
5788
5914
|
width: 60
|
|
5789
5915
|
}
|
|
5790
5916
|
),
|
|
5791
|
-
/* @__PURE__ */ (0,
|
|
5792
|
-
/* @__PURE__ */ (0,
|
|
5917
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
|
|
5918
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5793
5919
|
import_recharts.Area,
|
|
5794
5920
|
{
|
|
5795
5921
|
type: "monotone",
|
|
@@ -5809,7 +5935,7 @@ var BarChart_default = import_react35.default.memo(ChartComponent);
|
|
|
5809
5935
|
var import_react36 = __toESM(require("react"));
|
|
5810
5936
|
var import_axios4 = __toESM(require("axios"));
|
|
5811
5937
|
var import_recharts2 = require("recharts");
|
|
5812
|
-
var
|
|
5938
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5813
5939
|
var getRandomColor2 = () => {
|
|
5814
5940
|
const palette = [
|
|
5815
5941
|
"#2563eb",
|
|
@@ -5978,32 +6104,32 @@ var DonutChart = ({
|
|
|
5978
6104
|
}, []);
|
|
5979
6105
|
const renderLegends = (0, import_react36.useMemo)(() => {
|
|
5980
6106
|
if (!showLegends) return null;
|
|
5981
|
-
return /* @__PURE__ */ (0,
|
|
6107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-4 w-full max-w-4xl", children: chartData.map((d, index) => {
|
|
5982
6108
|
const actualValue = data.find(
|
|
5983
6109
|
(item) => item[dataLabel] === d[dataLabel]
|
|
5984
6110
|
)?.[dataKey] ?? d[dataKey];
|
|
5985
6111
|
const displayValue = actualValue >= 1e3 ? `${(actualValue / 1e3).toFixed(0)}k` : actualValue.toLocaleString();
|
|
5986
|
-
return /* @__PURE__ */ (0,
|
|
6112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5987
6113
|
"div",
|
|
5988
6114
|
{
|
|
5989
6115
|
className: "flex items-center space-x-2 rounded-lg border border-gray-200/50 px-3 py-1.5 w-[48%] sm:w-[32%] md:w-auto bg-white/80 backdrop-blur-sm shadow-sm hover:shadow-md transition-all",
|
|
5990
6116
|
children: [
|
|
5991
|
-
/* @__PURE__ */ (0,
|
|
6117
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5992
6118
|
"span",
|
|
5993
6119
|
{
|
|
5994
6120
|
className: "inline-block w-[12px] h-[12px] rounded-full shrink-0 border-2 border-white/50",
|
|
5995
6121
|
style: { backgroundColor: d.color }
|
|
5996
6122
|
}
|
|
5997
6123
|
),
|
|
5998
|
-
/* @__PURE__ */ (0,
|
|
5999
|
-
/* @__PURE__ */ (0,
|
|
6000
|
-
/* @__PURE__ */ (0,
|
|
6001
|
-
/* @__PURE__ */ (0,
|
|
6002
|
-
/* @__PURE__ */ (0,
|
|
6124
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
6125
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-gray-900 text-[11px] md:text-[13px] font-semibold block truncate leading-tight", children: d[dataLabel] }),
|
|
6126
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-1 text-xs text-gray-600 font-medium", children: [
|
|
6127
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: displayValue }),
|
|
6128
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { children: [
|
|
6003
6129
|
(actualValue / total * 100).toFixed(1),
|
|
6004
6130
|
"%"
|
|
6005
6131
|
] }),
|
|
6006
|
-
d.isBoosted && /* @__PURE__ */ (0,
|
|
6132
|
+
d.isBoosted && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[9px] px-1 py-0.5 bg-blue-100 text-blue-700 rounded-full", children: "min" })
|
|
6007
6133
|
] })
|
|
6008
6134
|
] })
|
|
6009
6135
|
]
|
|
@@ -6014,26 +6140,26 @@ var DonutChart = ({
|
|
|
6014
6140
|
}, [chartData, data, dataLabel, dataKey, total, showLegends]);
|
|
6015
6141
|
if (!mounted) return null;
|
|
6016
6142
|
if (effectiveLoading || data.length === 0) {
|
|
6017
|
-
return /* @__PURE__ */ (0,
|
|
6143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6018
6144
|
"div",
|
|
6019
6145
|
{
|
|
6020
6146
|
className: `relative flex flex-col items-center w-full h-[300px] md:h-[400px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl p-6 ${className}`,
|
|
6021
6147
|
style,
|
|
6022
6148
|
children: [
|
|
6023
|
-
/* @__PURE__ */ (0,
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6026
|
-
/* @__PURE__ */ (0,
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-white/60 to-transparent animate-shimmer rounded-xl" }),
|
|
6150
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-6 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "inline-flex items-center space-x-2 bg-white/80 px-6 py-2 rounded-full backdrop-blur-sm border border-gray-200 shadow-lg", children: [
|
|
6151
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-5 h-5 border-2 border-gray-300 border-t-blue-400 rounded-full animate-spin" }),
|
|
6152
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm font-medium text-gray-600 bg-gradient-to-r from-gray-300 bg-clip-text animate-pulse", children: "Loading chart data..." })
|
|
6027
6153
|
] }) }),
|
|
6028
|
-
/* @__PURE__ */ (0,
|
|
6154
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex flex-wrap justify-center gap-3 mt-8 w-full max-w-4xl", children: [...Array(18)].map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6029
6155
|
"div",
|
|
6030
6156
|
{
|
|
6031
6157
|
className: `h-10 w-[48%] sm:w-[32%] md:w-32 rounded-xl bg-gradient-to-r from-gray-200 via-gray-300/50 to-gray-200 p-3 flex items-center space-x-3 animate-slide-up stagger-${idx} shadow-sm border border-gray-200/50`,
|
|
6032
6158
|
children: [
|
|
6033
|
-
/* @__PURE__ */ (0,
|
|
6034
|
-
/* @__PURE__ */ (0,
|
|
6035
|
-
/* @__PURE__ */ (0,
|
|
6036
|
-
/* @__PURE__ */ (0,
|
|
6159
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-4 h-4 rounded-full bg-gradient-to-r from-blue-300 to-purple-300 animate-pulse" }),
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex-1 space-y-1", children: [
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "h-3 w-20 bg-gray-300 rounded animate-pulse" }),
|
|
6162
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "h-2.5 w-16 bg-gray-200/60 rounded animate-pulse-delayed" })
|
|
6037
6163
|
] })
|
|
6038
6164
|
]
|
|
6039
6165
|
},
|
|
@@ -6046,10 +6172,10 @@ var DonutChart = ({
|
|
|
6046
6172
|
const { inner, outer } = getDynamicRadius();
|
|
6047
6173
|
const innerRadius = inner;
|
|
6048
6174
|
const outerRadius = outer;
|
|
6049
|
-
return /* @__PURE__ */ (0,
|
|
6050
|
-
/* @__PURE__ */ (0,
|
|
6051
|
-
/* @__PURE__ */ (0,
|
|
6052
|
-
/* @__PURE__ */ (0,
|
|
6175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `relative flex flex-col items-center ${className}`, style, children: [
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "relative w-full md:w-[75%] h-[280px] md:h-[380px] flex items-center justify-center mb-2", children: [
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_recharts2.PieChart, { children: [
|
|
6178
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6053
6179
|
import_recharts2.Pie,
|
|
6054
6180
|
{
|
|
6055
6181
|
data: chartData,
|
|
@@ -6062,7 +6188,7 @@ var DonutChart = ({
|
|
|
6062
6188
|
isAnimationActive: true,
|
|
6063
6189
|
animationDuration: 800,
|
|
6064
6190
|
minAngle: 3,
|
|
6065
|
-
children: chartData.map((entry, index) => /* @__PURE__ */ (0,
|
|
6191
|
+
children: chartData.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6066
6192
|
import_recharts2.Cell,
|
|
6067
6193
|
{
|
|
6068
6194
|
fill: entry.color,
|
|
@@ -6073,7 +6199,7 @@ var DonutChart = ({
|
|
|
6073
6199
|
))
|
|
6074
6200
|
}
|
|
6075
6201
|
),
|
|
6076
|
-
/* @__PURE__ */ (0,
|
|
6202
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6077
6203
|
import_recharts2.Tooltip,
|
|
6078
6204
|
{
|
|
6079
6205
|
formatter: (value, name, payload) => {
|
|
@@ -6096,9 +6222,9 @@ var DonutChart = ({
|
|
|
6096
6222
|
}
|
|
6097
6223
|
)
|
|
6098
6224
|
] }) }),
|
|
6099
|
-
total > 0 && /* @__PURE__ */ (0,
|
|
6225
|
+
total > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none ${forceMobile ? "text-xl px-2" : "text-3xl px-4"} font-bold bg-white/90 backdrop-blur-sm rounded-full py-1 shadow-lg`, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "text-[#1f2937] leading-tight", children: [
|
|
6100
6226
|
formattedTotal,
|
|
6101
|
-
/* @__PURE__ */ (0,
|
|
6227
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm md:text-base font-normal text-gray-600 block md:inline-block md:ml-1", children: "total" })
|
|
6102
6228
|
] }) })
|
|
6103
6229
|
] }),
|
|
6104
6230
|
renderLegends
|
|
@@ -6107,10 +6233,10 @@ var DonutChart = ({
|
|
|
6107
6233
|
var PieChart_default = import_react36.default.memo(DonutChart);
|
|
6108
6234
|
|
|
6109
6235
|
// src/components/Blocks/EmailComposer.tsx
|
|
6110
|
-
var
|
|
6236
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6111
6237
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
6112
|
-
return /* @__PURE__ */ (0,
|
|
6113
|
-
/* @__PURE__ */ (0,
|
|
6238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
|
|
6239
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6114
6240
|
"input",
|
|
6115
6241
|
{
|
|
6116
6242
|
type: "email",
|
|
@@ -6119,8 +6245,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6119
6245
|
required: true
|
|
6120
6246
|
}
|
|
6121
6247
|
) }),
|
|
6122
|
-
/* @__PURE__ */ (0,
|
|
6123
|
-
/* @__PURE__ */ (0,
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6124
6250
|
"input",
|
|
6125
6251
|
{
|
|
6126
6252
|
type: "email",
|
|
@@ -6131,7 +6257,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6131
6257
|
required: true
|
|
6132
6258
|
}
|
|
6133
6259
|
),
|
|
6134
|
-
!showCc && /* @__PURE__ */ (0,
|
|
6260
|
+
!showCc && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6135
6261
|
"button",
|
|
6136
6262
|
{
|
|
6137
6263
|
onClick: () => setShowCc?.(true),
|
|
@@ -6139,7 +6265,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6139
6265
|
children: "Cc"
|
|
6140
6266
|
}
|
|
6141
6267
|
),
|
|
6142
|
-
!showBcc && /* @__PURE__ */ (0,
|
|
6268
|
+
!showBcc && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6143
6269
|
"button",
|
|
6144
6270
|
{
|
|
6145
6271
|
onClick: () => setShowBcc?.(true),
|
|
@@ -6148,7 +6274,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6148
6274
|
}
|
|
6149
6275
|
)
|
|
6150
6276
|
] }) }),
|
|
6151
|
-
showCc && /* @__PURE__ */ (0,
|
|
6277
|
+
showCc && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6152
6278
|
"input",
|
|
6153
6279
|
{
|
|
6154
6280
|
type: "text",
|
|
@@ -6158,7 +6284,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6158
6284
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
6159
6285
|
}
|
|
6160
6286
|
) }),
|
|
6161
|
-
showBcc && /* @__PURE__ */ (0,
|
|
6287
|
+
showBcc && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6162
6288
|
"input",
|
|
6163
6289
|
{
|
|
6164
6290
|
type: "text",
|
|
@@ -6168,7 +6294,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6168
6294
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
6169
6295
|
}
|
|
6170
6296
|
) }),
|
|
6171
|
-
/* @__PURE__ */ (0,
|
|
6297
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6172
6298
|
"input",
|
|
6173
6299
|
{
|
|
6174
6300
|
type: "text",
|
|
@@ -6178,11 +6304,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6178
6304
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
6179
6305
|
}
|
|
6180
6306
|
) }),
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6182
|
-
/* @__PURE__ */ (0,
|
|
6183
|
-
/* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6307
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(MyEditor, { value: body, onChange: setBody }) }),
|
|
6308
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
6309
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
6310
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
6311
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
6186
6312
|
] })
|
|
6187
6313
|
] }) });
|
|
6188
6314
|
}
|
|
@@ -6190,10 +6316,10 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
6190
6316
|
// src/components/ui/sonner.tsx
|
|
6191
6317
|
var import_next_themes = require("next-themes");
|
|
6192
6318
|
var import_sonner2 = require("sonner");
|
|
6193
|
-
var
|
|
6319
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6194
6320
|
var Toaster = ({ ...props }) => {
|
|
6195
6321
|
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
6196
|
-
return /* @__PURE__ */ (0,
|
|
6322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6197
6323
|
import_sonner2.Toaster,
|
|
6198
6324
|
{
|
|
6199
6325
|
theme,
|