@mahatisystems/mahati-ui-components 5.2.2 → 5.3.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/index.js +40 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -90
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -815,7 +815,7 @@ var FormContainer = function FormContainer(param) {
|
|
|
815
815
|
FormContainer.displayName = "FormContainer";
|
|
816
816
|
// src/components/Input.tsx
|
|
817
817
|
import React5 from "react";
|
|
818
|
-
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
818
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
819
819
|
var Input = React5.forwardRef(function(_0, _1) {
|
|
820
820
|
var _ref = [
|
|
821
821
|
_0,
|
|
@@ -832,14 +832,12 @@ var Input = React5.forwardRef(function(_0, _1) {
|
|
|
832
832
|
if (props.disabled) return;
|
|
833
833
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
834
834
|
};
|
|
835
|
-
return /* @__PURE__ */ jsxs4(
|
|
836
|
-
"data-testid": testId,
|
|
837
|
-
className: "flex flex-col w-full mb-4",
|
|
835
|
+
return /* @__PURE__ */ jsxs4(Fragment2, {
|
|
838
836
|
children: [
|
|
839
837
|
/* @__PURE__ */ jsx6("input", _object_spread({
|
|
840
838
|
ref: ref,
|
|
841
|
-
onChange: handleChange,
|
|
842
839
|
"data-testid": testId ? "".concat(testId, "-input") : void 0,
|
|
840
|
+
onChange: handleChange,
|
|
843
841
|
className: "\n w-full max-w-full min-w-0\n h-[44px]\n px-3\n text-base\n rounded-md\n border\n outline-none\n box-border\n transition-all duration-200\n\n ".concat(hasError ? "border-red-500 focus:border-red-600 focus:ring-2 focus:ring-red-100" : "border-[#D9D9D9] focus:border-blue-500 focus:ring-2 focus:ring-blue-100 hover:border-gray-400 focus:border-blue-500", "\n\n disabled:bg-gray-100\n disabled:text-gray-400\n disabled:border-gray-200\n disabled:cursor-not-allowed\n\n file:py-2 file:px-3 file:cursor-pointer\n\n placeholder:text-gray-400\n\n ").concat(className, "\n ")
|
|
844
842
|
}, props)),
|
|
845
843
|
hasError && errorMessage && /* @__PURE__ */ jsx6("span", {
|
|
@@ -859,7 +857,7 @@ import { createPortal } from "react-dom";
|
|
|
859
857
|
import { useState as useState3, useEffect as useEffect2, useRef } from "react";
|
|
860
858
|
import { HiOutlineClock, HiChevronDown, HiChevronLeft, HiChevronRight } from "react-icons/hi";
|
|
861
859
|
import { HiCalendarDays } from "react-icons/hi2";
|
|
862
|
-
import { Fragment as
|
|
860
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
863
861
|
var convertToDateString = function convertToDateString(date) {
|
|
864
862
|
if (!date) return "";
|
|
865
863
|
var year = date.year;
|
|
@@ -1960,7 +1958,7 @@ var Calendar = function Calendar(param) {
|
|
|
1960
1958
|
marginBottom: scale * 24,
|
|
1961
1959
|
width: "100%"
|
|
1962
1960
|
},
|
|
1963
|
-
children: enableRangeSelection ? /* @__PURE__ */ jsxs5(
|
|
1961
|
+
children: enableRangeSelection ? /* @__PURE__ */ jsxs5(Fragment3, {
|
|
1964
1962
|
children: [
|
|
1965
1963
|
/* @__PURE__ */ jsxs5("button", {
|
|
1966
1964
|
type: "button",
|
|
@@ -2030,7 +2028,7 @@ var Calendar = function Calendar(param) {
|
|
|
2030
2028
|
]
|
|
2031
2029
|
})
|
|
2032
2030
|
]
|
|
2033
|
-
}) : /* @__PURE__ */ jsxs5(
|
|
2031
|
+
}) : /* @__PURE__ */ jsxs5(Fragment3, {
|
|
2034
2032
|
children: [
|
|
2035
2033
|
/* @__PURE__ */ jsxs5("button", {
|
|
2036
2034
|
type: "button",
|
|
@@ -2162,7 +2160,7 @@ var Calendar = function Calendar(param) {
|
|
|
2162
2160
|
]
|
|
2163
2161
|
})
|
|
2164
2162
|
}),
|
|
2165
|
-
!showTimeSelector ? /* @__PURE__ */ jsxs5(
|
|
2163
|
+
!showTimeSelector ? /* @__PURE__ */ jsxs5(Fragment3, {
|
|
2166
2164
|
children: [
|
|
2167
2165
|
/* @__PURE__ */ jsx7("div", {
|
|
2168
2166
|
className: "grid grid-cols-7",
|
|
@@ -2235,7 +2233,7 @@ var Calendar = function Calendar(param) {
|
|
|
2235
2233
|
};
|
|
2236
2234
|
Calendar.displayName = "Calendar";
|
|
2237
2235
|
// src/components/Filter.tsx
|
|
2238
|
-
import { Fragment as
|
|
2236
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2239
2237
|
var DEFAULT_ACTIVITY_OPTIONS = [
|
|
2240
2238
|
{
|
|
2241
2239
|
label: "Select Activity",
|
|
@@ -2534,7 +2532,7 @@ var MahatiActivity = function MahatiActivity(param) {
|
|
|
2534
2532
|
return document.removeEventListener("mousedown", handler);
|
|
2535
2533
|
};
|
|
2536
2534
|
}, []);
|
|
2537
|
-
return /* @__PURE__ */ jsxs6(
|
|
2535
|
+
return /* @__PURE__ */ jsxs6(Fragment4, {
|
|
2538
2536
|
children: [
|
|
2539
2537
|
/* @__PURE__ */ jsxs6("div", {
|
|
2540
2538
|
"data-testid": testId ? "".concat(testId, "-trigger") : void 0,
|
|
@@ -2622,7 +2620,7 @@ var MahatiStatus = function MahatiStatus(param) {
|
|
|
2622
2620
|
return document.removeEventListener("mousedown", handler);
|
|
2623
2621
|
};
|
|
2624
2622
|
}, []);
|
|
2625
|
-
return /* @__PURE__ */ jsxs6(
|
|
2623
|
+
return /* @__PURE__ */ jsxs6(Fragment4, {
|
|
2626
2624
|
children: [
|
|
2627
2625
|
/* @__PURE__ */ jsxs6("div", {
|
|
2628
2626
|
"data-testid": testId ? "".concat(testId, "-trigger") : void 0,
|
|
@@ -2686,7 +2684,7 @@ MahatiStatus.displayName = "MahatiStatus";
|
|
|
2686
2684
|
MahatiSearch.displayName = "MahatiSearch";
|
|
2687
2685
|
// src/components/TabbedInterface.tsx
|
|
2688
2686
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
2689
|
-
import { Fragment as
|
|
2687
|
+
import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2690
2688
|
var getFontFamily = function getFontFamily(font) {
|
|
2691
2689
|
if (!font) return "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
2692
2690
|
var lower = font.toLowerCase().trim();
|
|
@@ -2762,7 +2760,7 @@ var TabbedInterface = function TabbedInterface(param) {
|
|
|
2762
2760
|
if (!draggableTabs) return;
|
|
2763
2761
|
setDraggingIndex(null);
|
|
2764
2762
|
};
|
|
2765
|
-
var headerButtons = /* @__PURE__ */ jsx9(
|
|
2763
|
+
var headerButtons = /* @__PURE__ */ jsx9(Fragment5, {
|
|
2766
2764
|
children: tabs.map(function(tab, index) {
|
|
2767
2765
|
var active = index === activeIndex;
|
|
2768
2766
|
var isDragging = draggableTabs && draggingIndex === index;
|
|
@@ -2951,7 +2949,7 @@ Dropdown.displayName = "Dropdown";
|
|
|
2951
2949
|
// src/components/TableWithTab.tsx
|
|
2952
2950
|
import React10, { useEffect as useEffect6, useState as useState7 } from "react";
|
|
2953
2951
|
import { XMarkIcon } from "@heroicons/react/24/outline";
|
|
2954
|
-
import { Fragment as
|
|
2952
|
+
import { Fragment as Fragment6, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2955
2953
|
var getFontFamily2 = function getFontFamily2(font) {
|
|
2956
2954
|
if (!font) return "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
2957
2955
|
var lower = font.toLowerCase().trim();
|
|
@@ -2972,7 +2970,7 @@ function renderCellValue(value) {
|
|
|
2972
2970
|
if (Array.isArray(value)) {
|
|
2973
2971
|
if (value.some(function(v) {
|
|
2974
2972
|
return React10.isValidElement(v);
|
|
2975
|
-
})) return /* @__PURE__ */ jsx11(
|
|
2973
|
+
})) return /* @__PURE__ */ jsx11(Fragment6, {
|
|
2976
2974
|
children: value
|
|
2977
2975
|
});
|
|
2978
2976
|
return value.join(", ");
|
|
@@ -3221,7 +3219,7 @@ TableWithTab.displayName = "TableWithTab";
|
|
|
3221
3219
|
// src/components/Table.tsx
|
|
3222
3220
|
import React11, { useState as useState8 } from "react";
|
|
3223
3221
|
import { ArrowDownOnSquareIcon, XMarkIcon as XMarkIcon2 } from "@heroicons/react/24/outline";
|
|
3224
|
-
import { Fragment as
|
|
3222
|
+
import { Fragment as Fragment7, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3225
3223
|
var Table = function Table(param) {
|
|
3226
3224
|
var headers = param.headers, data = param.data, page = param.page, setPage = param.setPage, limit = param.limit, setLimit = param.setLimit, totalCount = param.totalCount, highlightRowColor = param.highlightRowColor, actions = param.actions, paginationRequired = param.paginationRequired, _param_paginationPosition = param.paginationPosition, paginationPosition = _param_paginationPosition === void 0 ? "bottom-center" : _param_paginationPosition, onDownloadPDF = param.onDownloadPDF, onDownloadExcel = param.onDownloadExcel, _param_searchable = param.searchable, searchable = _param_searchable === void 0 ? false : _param_searchable, _param_searchTerm = param.searchTerm, searchTerm = _param_searchTerm === void 0 ? "" : _param_searchTerm, onResetSearch = param.onResetSearch, onSearch = param.onSearch, _param_searchModeOptions = param.searchModeOptions, searchModeOptions = _param_searchModeOptions === void 0 ? [
|
|
3227
3225
|
"includes",
|
|
@@ -3293,7 +3291,7 @@ var Table = function Table(param) {
|
|
|
3293
3291
|
if (Array.isArray(value)) {
|
|
3294
3292
|
if (value.some(function(item) {
|
|
3295
3293
|
return React11.isValidElement(item);
|
|
3296
|
-
})) return /* @__PURE__ */ jsx12(
|
|
3294
|
+
})) return /* @__PURE__ */ jsx12(Fragment7, {
|
|
3297
3295
|
children: value
|
|
3298
3296
|
});
|
|
3299
3297
|
return value.join(", ");
|
|
@@ -3313,7 +3311,7 @@ var Table = function Table(param) {
|
|
|
3313
3311
|
}
|
|
3314
3312
|
return String(value);
|
|
3315
3313
|
};
|
|
3316
|
-
return /* @__PURE__ */ jsxs10(
|
|
3314
|
+
return /* @__PURE__ */ jsxs10(Fragment7, {
|
|
3317
3315
|
children: [
|
|
3318
3316
|
(searchable || onDownloadExcel || onDownloadPDF) && /* @__PURE__ */ jsxs10("div", {
|
|
3319
3317
|
className: "mb-3 flex flex-wrap justify-between gap-3",
|
|
@@ -3484,7 +3482,7 @@ var Table = function Table(param) {
|
|
|
3484
3482
|
});
|
|
3485
3483
|
};
|
|
3486
3484
|
// src/components/MahatiChartAnalyticsWidget.tsx
|
|
3487
|
-
import { useMemo as useMemo3, useState as useState12 } from "react";
|
|
3485
|
+
import { useMemo as useMemo3, useState as useState12, useEffect as useEffect9 } from "react";
|
|
3488
3486
|
// src/components/ChartDropdown.tsx
|
|
3489
3487
|
import { useEffect as useEffect7, useMemo, useRef as useRef4, useState as useState9 } from "react";
|
|
3490
3488
|
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
@@ -5637,7 +5635,7 @@ var CalendarHeatmapChart = function CalendarHeatmapChart(param) {
|
|
|
5637
5635
|
};
|
|
5638
5636
|
CalendarHeatmapChart.displayName = "CalendarHeatmapChart";
|
|
5639
5637
|
// src/components/LollipopChart.tsx
|
|
5640
|
-
import { Fragment as
|
|
5638
|
+
import { Fragment as Fragment8, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5641
5639
|
var DEFAULT_COLORS = [
|
|
5642
5640
|
"rgba(37,99,235,1)",
|
|
5643
5641
|
"rgba(16,185,129,1)",
|
|
@@ -5718,7 +5716,7 @@ var LollipopChart = function LollipopChart(param) {
|
|
|
5718
5716
|
className: "flex-1 flex flex-col gap-4 py-4 min-h-[300px] relative overflow-visible",
|
|
5719
5717
|
children: /* @__PURE__ */ jsx20("div", {
|
|
5720
5718
|
className: "w-full overflow-x-visible lg:overflow-x-auto",
|
|
5721
|
-
children: orientation === "horizontal" ? /* @__PURE__ */ jsxs17(
|
|
5719
|
+
children: orientation === "horizontal" ? /* @__PURE__ */ jsxs17(Fragment8, {
|
|
5722
5720
|
children: [
|
|
5723
5721
|
/* @__PURE__ */ jsxs17("div", {
|
|
5724
5722
|
className: "flex flex-col gap-4 relative pl-[140px] w-full min-w-[800px] lg:min-w-0",
|
|
@@ -6101,7 +6099,7 @@ var ColumnChart = function ColumnChart(param) {
|
|
|
6101
6099
|
ColumnChart.displayName = "ColumnChart";
|
|
6102
6100
|
// src/components/KPIChart.tsx
|
|
6103
6101
|
import React16, { useMemo as useMemo2, useState as useState10, useRef as useRef5, useEffect as useEffect8 } from "react";
|
|
6104
|
-
import { Fragment as
|
|
6102
|
+
import { Fragment as Fragment9, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6105
6103
|
var createLinearPath = function createLinearPath(points) {
|
|
6106
6104
|
if (points.length === 0) return "";
|
|
6107
6105
|
if (points.length === 1) return "M ".concat(points[0].x, ",").concat(points[0].y);
|
|
@@ -6542,7 +6540,7 @@ var KPIChart = function KPIChart(param) {
|
|
|
6542
6540
|
transition: "d 0.4s ease-in-out, stroke 0.3s ease-in-out"
|
|
6543
6541
|
}
|
|
6544
6542
|
}),
|
|
6545
|
-
hoveredIndex !== null && points[hoveredIndex] && !isNaN(points[hoveredIndex].x) && /* @__PURE__ */ jsxs19(
|
|
6543
|
+
hoveredIndex !== null && points[hoveredIndex] && !isNaN(points[hoveredIndex].x) && /* @__PURE__ */ jsxs19(Fragment9, {
|
|
6546
6544
|
children: [
|
|
6547
6545
|
/* @__PURE__ */ jsx22("line", {
|
|
6548
6546
|
x1: points[hoveredIndex].x,
|
|
@@ -7153,7 +7151,7 @@ var StackBarChart = function StackBarChart(param) {
|
|
|
7153
7151
|
};
|
|
7154
7152
|
StackBarChart.displayName = "StackBarChart";
|
|
7155
7153
|
// src/components/MahatiChartAnalyticsWidget.tsx
|
|
7156
|
-
import { Fragment as
|
|
7154
|
+
import { Fragment as Fragment10, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
7157
7155
|
var assetSrc3 = function assetSrc3(m) {
|
|
7158
7156
|
if (typeof m === "string") return m;
|
|
7159
7157
|
var anyM = m;
|
|
@@ -7261,6 +7259,12 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7261
7259
|
var _useState12 = _sliced_to_array(useState12(initialChartType), 2), chartType = _useState12[0], setChartType = _useState12[1];
|
|
7262
7260
|
var _useState121 = _sliced_to_array(useState12("Project 1"), 2), selectedGanttProject = _useState121[0], setSelectedGanttProject = _useState121[1];
|
|
7263
7261
|
var _useState122 = _sliced_to_array(useState12("Project 1"), 2), selectedCalendarHeatmapProject = _useState122[0], setSelectedCalendarHeatmapProject = _useState122[1];
|
|
7262
|
+
var _useState123 = _sliced_to_array(useState12(selectedFilters), 2), localFilters = _useState123[0], setLocalFilters = _useState123[1];
|
|
7263
|
+
useEffect9(function() {
|
|
7264
|
+
setLocalFilters(selectedFilters);
|
|
7265
|
+
}, [
|
|
7266
|
+
selectedFilters
|
|
7267
|
+
]);
|
|
7264
7268
|
var currentFilters = useMemo3(function() {
|
|
7265
7269
|
if (chartFilters && chartFilters[chartType]) return chartFilters[chartType] || [];
|
|
7266
7270
|
return filters;
|
|
@@ -7299,8 +7303,8 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7299
7303
|
var currentGanttData = useMemo3(function() {
|
|
7300
7304
|
if (chartType === "gantt" && ganttData) {
|
|
7301
7305
|
var _ganttData_year;
|
|
7302
|
-
var year =
|
|
7303
|
-
var type =
|
|
7306
|
+
var year = localFilters["SelectYear"] || "2026";
|
|
7307
|
+
var type = localFilters["SelectType"] || "Development";
|
|
7304
7308
|
var baseData = (_ganttData_year = ganttData[year]) === null || _ganttData_year === void 0 ? void 0 : _ganttData_year[type];
|
|
7305
7309
|
if (!baseData) return void 0;
|
|
7306
7310
|
if (selectedGanttProject === "Project 2") {
|
|
@@ -7332,8 +7336,8 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7332
7336
|
]);
|
|
7333
7337
|
var currentHorizontalBarTopPerformer = useMemo3(function() {
|
|
7334
7338
|
if (chartType !== "horizontalbar" || !horizontalBarData) return void 0;
|
|
7335
|
-
var selectedYear =
|
|
7336
|
-
var selectedMonth =
|
|
7339
|
+
var selectedYear = localFilters["SelectYear"] || "2026";
|
|
7340
|
+
var selectedMonth = localFilters["SelectMonth"] || "January";
|
|
7337
7341
|
var yearData = horizontalBarData[selectedYear];
|
|
7338
7342
|
var monthData = yearData === null || yearData === void 0 ? void 0 : yearData[selectedMonth];
|
|
7339
7343
|
if (!monthData) return void 0;
|
|
@@ -7407,8 +7411,8 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7407
7411
|
}
|
|
7408
7412
|
};
|
|
7409
7413
|
if (chartType !== "calendarheatmap" || !calendarheatmapData) return empty;
|
|
7410
|
-
var year =
|
|
7411
|
-
var type =
|
|
7414
|
+
var year = localFilters["SelectYear"] || "2026";
|
|
7415
|
+
var type = localFilters["SelectType"] || "Development";
|
|
7412
7416
|
var project = selectedCalendarHeatmapProject;
|
|
7413
7417
|
if (!((_calendarheatmapData_project = calendarheatmapData[project]) === null || _calendarheatmapData_project === void 0 ? void 0 : (_calendarheatmapData_project_year = _calendarheatmapData_project[year]) === null || _calendarheatmapData_project_year === void 0 ? void 0 : _calendarheatmapData_project_year[type])) return empty;
|
|
7414
7418
|
var yearData = calendarheatmapData[project][year][type];
|
|
@@ -7521,9 +7525,9 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7521
7525
|
};
|
|
7522
7526
|
var currentBulletData = useMemo3(function() {
|
|
7523
7527
|
if (!bulletData) return null;
|
|
7524
|
-
var year =
|
|
7525
|
-
var month =
|
|
7526
|
-
var type =
|
|
7528
|
+
var year = localFilters.SelectYear || "2026";
|
|
7529
|
+
var month = localFilters.SelectMonth || "January";
|
|
7530
|
+
var type = localFilters.SelectType || "Sales";
|
|
7527
7531
|
var yearData = bulletData[year];
|
|
7528
7532
|
if (yearData) {
|
|
7529
7533
|
var typeData = yearData[type];
|
|
@@ -7808,9 +7812,10 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7808
7812
|
},
|
|
7809
7813
|
children: /* @__PURE__ */ jsx25(ChartDropdown, {
|
|
7810
7814
|
options: options,
|
|
7811
|
-
value:
|
|
7815
|
+
value: localFilters[filter.id],
|
|
7812
7816
|
onSelect: function onSelect(val) {
|
|
7813
|
-
|
|
7817
|
+
var updated = _object_spread_props(_object_spread({}, localFilters), _define_property({}, filter.id, String(val)));
|
|
7818
|
+
setLocalFilters(updated);
|
|
7814
7819
|
},
|
|
7815
7820
|
variant: "mahatiFilter",
|
|
7816
7821
|
label: filter.label
|
|
@@ -7820,7 +7825,8 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
7820
7825
|
/* @__PURE__ */ jsx25("button", {
|
|
7821
7826
|
type: "button",
|
|
7822
7827
|
onClick: function onClick() {
|
|
7823
|
-
|
|
7828
|
+
onApplyFilters === null || onApplyFilters === void 0 ? void 0 : onApplyFilters(localFilters);
|
|
7829
|
+
onFiltersChange(localFilters);
|
|
7824
7830
|
},
|
|
7825
7831
|
className: "w-[77px] h-[30px] rounded border border-[rgba(23,97,163,1)] bg-gradient-to-r from-[rgba(23,97,163,1)] to-[rgba(77,175,131,1)] text-white text-sm font-medium cursor-pointer transition-opacity hover:opacity-90",
|
|
7826
7832
|
children: "Apply"
|
|
@@ -8103,8 +8109,8 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
8103
8109
|
children: [
|
|
8104
8110
|
function() {
|
|
8105
8111
|
var _gaugeData_gauges, _gaugeData_sy_sm2, _gaugeData_sy;
|
|
8106
|
-
var sy =
|
|
8107
|
-
var sm2 =
|
|
8112
|
+
var sy = localFilters["SelectYear"] || "2026";
|
|
8113
|
+
var sm2 = localFilters["SelectMonth"] || "January";
|
|
8108
8114
|
var currentGauge = ((_gaugeData_gauges = gaugeData.gauges) === null || _gaugeData_gauges === void 0 ? void 0 : _gaugeData_gauges.length) > 0 ? gaugeData.gauges[0] : null;
|
|
8109
8115
|
if (((_gaugeData_sy = gaugeData[sy]) === null || _gaugeData_sy === void 0 ? void 0 : (_gaugeData_sy_sm2 = _gaugeData_sy[sm2]) === null || _gaugeData_sy_sm2 === void 0 ? void 0 : _gaugeData_sy_sm2.length) > 0) currentGauge = gaugeData[sy][sm2][0];
|
|
8110
8116
|
if (!currentGauge) return null;
|
|
@@ -8254,9 +8260,9 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
8254
8260
|
children: [
|
|
8255
8261
|
function() {
|
|
8256
8262
|
var _riskGaugeData_gauges, _riskGaugeData_sy_sm2_st, _riskGaugeData_sy_sm2, _riskGaugeData_sy;
|
|
8257
|
-
var sy =
|
|
8258
|
-
var sm2 =
|
|
8259
|
-
var st =
|
|
8263
|
+
var sy = localFilters["SelectYear"] || "2026";
|
|
8264
|
+
var sm2 = localFilters["SelectMonth"] || "January";
|
|
8265
|
+
var st = localFilters["SelectType"] || "Credit Score";
|
|
8260
8266
|
var currentRiskGauge = ((_riskGaugeData_gauges = riskGaugeData.gauges) === null || _riskGaugeData_gauges === void 0 ? void 0 : _riskGaugeData_gauges.length) > 0 ? riskGaugeData.gauges[0] : null;
|
|
8261
8267
|
if (((_riskGaugeData_sy = riskGaugeData[sy]) === null || _riskGaugeData_sy === void 0 ? void 0 : (_riskGaugeData_sy_sm2 = _riskGaugeData_sy[sm2]) === null || _riskGaugeData_sy_sm2 === void 0 ? void 0 : (_riskGaugeData_sy_sm2_st = _riskGaugeData_sy_sm2[st]) === null || _riskGaugeData_sy_sm2_st === void 0 ? void 0 : _riskGaugeData_sy_sm2_st.length) > 0) currentRiskGauge = riskGaugeData[sy][sm2][st][0];
|
|
8262
8268
|
if (!currentRiskGauge) return null;
|
|
@@ -8895,7 +8901,7 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
8895
8901
|
}).findIndex(function(i) {
|
|
8896
8902
|
return i.name === topPerformer.name;
|
|
8897
8903
|
}) + 1;
|
|
8898
|
-
return /* @__PURE__ */ jsxs22(
|
|
8904
|
+
return /* @__PURE__ */ jsxs22(Fragment10, {
|
|
8899
8905
|
children: [
|
|
8900
8906
|
/* @__PURE__ */ jsx25("div", {
|
|
8901
8907
|
className: "text-base font-semibold text-[rgba(23,97,163,1)] font-[Poppins,sans-serif] mb-5",
|
|
@@ -8975,9 +8981,9 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
8975
8981
|
function() {
|
|
8976
8982
|
var _columnChartData_sy_sm2, _columnChartData_sy, _columnChartData_prevYear_prevMonth, _columnChartData_prevYear;
|
|
8977
8983
|
if (!columnChartData) return null;
|
|
8978
|
-
var sy =
|
|
8979
|
-
var sm2 =
|
|
8980
|
-
var st =
|
|
8984
|
+
var sy = localFilters["SelectYear"] || "2026";
|
|
8985
|
+
var sm2 = localFilters["SelectMonth"] || "January";
|
|
8986
|
+
var st = localFilters["SelectType"] || "Category A";
|
|
8981
8987
|
var typeData = (columnChartData === null || columnChartData === void 0 ? void 0 : (_columnChartData_sy = columnChartData[sy]) === null || _columnChartData_sy === void 0 ? void 0 : (_columnChartData_sy_sm2 = _columnChartData_sy[sm2]) === null || _columnChartData_sy_sm2 === void 0 ? void 0 : _columnChartData_sy_sm2[st]) || [];
|
|
8982
8988
|
var currentTotal = typeData.reduce(function(sum, item) {
|
|
8983
8989
|
return sum + item.value;
|
|
@@ -9136,8 +9142,8 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
9136
9142
|
function() {
|
|
9137
9143
|
var _groupBarData_sy, _groupBarData_prevYear;
|
|
9138
9144
|
if (!groupBarData) return null;
|
|
9139
|
-
var sy =
|
|
9140
|
-
var sm2 =
|
|
9145
|
+
var sy = localFilters["SelectYear"] || "2026";
|
|
9146
|
+
var sm2 = localFilters["SelectMonth"] || "January";
|
|
9141
9147
|
var groups = (groupBarData === null || groupBarData === void 0 ? void 0 : (_groupBarData_sy = groupBarData[sy]) === null || _groupBarData_sy === void 0 ? void 0 : _groupBarData_sy[sm2]) || [];
|
|
9142
9148
|
if (!groups.length) return null;
|
|
9143
9149
|
var legends = groupBarData.legends || [];
|
|
@@ -9632,9 +9638,9 @@ var MahatiChartAnalyticsWidget = function MahatiChartAnalyticsWidget(param) {
|
|
|
9632
9638
|
function() {
|
|
9633
9639
|
var _currentFilters_, _currentFilters_1, _currentFilters_2, _currentFilters_3, _currentFilters_4, _currentFilters_5, _yearData_month;
|
|
9634
9640
|
var f0 = (_currentFilters_ = currentFilters[0]) === null || _currentFilters_ === void 0 ? void 0 : _currentFilters_.id, f1 = (_currentFilters_1 = currentFilters[1]) === null || _currentFilters_1 === void 0 ? void 0 : _currentFilters_1.id, f2 = (_currentFilters_2 = currentFilters[2]) === null || _currentFilters_2 === void 0 ? void 0 : _currentFilters_2.id;
|
|
9635
|
-
var year =
|
|
9636
|
-
var month =
|
|
9637
|
-
var category =
|
|
9641
|
+
var year = localFilters[f0] || ((_currentFilters_3 = currentFilters[0]) === null || _currentFilters_3 === void 0 ? void 0 : _currentFilters_3.options[0]) || "2026";
|
|
9642
|
+
var month = localFilters[f1] || ((_currentFilters_4 = currentFilters[1]) === null || _currentFilters_4 === void 0 ? void 0 : _currentFilters_4.options[0]) || "January";
|
|
9643
|
+
var category = localFilters[f2] || ((_currentFilters_5 = currentFilters[2]) === null || _currentFilters_5 === void 0 ? void 0 : _currentFilters_5.options[0]) || "Category A";
|
|
9638
9644
|
var yearData = (lollipopData === null || lollipopData === void 0 ? void 0 : lollipopData[year]) || {};
|
|
9639
9645
|
var catData = (yearData === null || yearData === void 0 ? void 0 : (_yearData_month = yearData[month]) === null || _yearData_month === void 0 ? void 0 : _yearData_month[category]) || [];
|
|
9640
9646
|
var bestItem = catData.length ? catData.reduce(function(max, i) {
|
|
@@ -10040,7 +10046,7 @@ var TopPerformerCard = function TopPerformerCard(param) {
|
|
|
10040
10046
|
};
|
|
10041
10047
|
// src/components/Tooltip.tsx
|
|
10042
10048
|
import React19, { useState as useState13 } from "react";
|
|
10043
|
-
import { Fragment as
|
|
10049
|
+
import { Fragment as Fragment11, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
10044
10050
|
var Tooltip2 = function Tooltip2(param) {
|
|
10045
10051
|
var text = param.text, _param_position = param.position, position = _param_position === void 0 ? "top" : _param_position, children = param.children, _param_variant = param.variant, variant = _param_variant === void 0 ? "default" : _param_variant, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, textColor = param.textColor, backgroundColor = param.backgroundColor, image = param.image, testId = param.testId, animation = param.animation;
|
|
10046
10052
|
var _useState13 = _sliced_to_array(useState13(false), 2), visible = _useState13[0], setVisible = _useState13[1];
|
|
@@ -10169,7 +10175,7 @@ var Tooltip2 = function Tooltip2(param) {
|
|
|
10169
10175
|
isActive: showAnimation
|
|
10170
10176
|
}, animation.props));
|
|
10171
10177
|
};
|
|
10172
|
-
if (!hasContent) return /* @__PURE__ */ jsx26(
|
|
10178
|
+
if (!hasContent) return /* @__PURE__ */ jsx26(Fragment11, {
|
|
10173
10179
|
children: children
|
|
10174
10180
|
});
|
|
10175
10181
|
var variantStyle = variant === "default" ? "bg-gradient-to-r from-[#1761A3] to-[#4DAF83] text-white text-[11px]" : "bg-white/95 text-gray-700 border border-gray-200 text-[13px]";
|
|
@@ -10231,7 +10237,7 @@ var Tooltip2 = function Tooltip2(param) {
|
|
|
10231
10237
|
};
|
|
10232
10238
|
Tooltip2.displayName = "Tooltip";
|
|
10233
10239
|
// src/components/ToastMessage.tsx
|
|
10234
|
-
import React20, { useEffect as
|
|
10240
|
+
import React20, { useEffect as useEffect10 } from "react";
|
|
10235
10241
|
import ReactDOM from "react-dom";
|
|
10236
10242
|
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10237
10243
|
var getStripGradient = function getStripGradient(type) {
|
|
@@ -10356,7 +10362,7 @@ var ToastMessage = React20.forwardRef(function(_0, _1) {
|
|
|
10356
10362
|
var backgroundClass = background === "transparent" ? "bg-white" : "";
|
|
10357
10363
|
var displayTitle = customTitle !== null && customTitle !== void 0 ? customTitle : type.charAt(0).toUpperCase() + type.slice(1);
|
|
10358
10364
|
var hasActions = action && action.length > 0;
|
|
10359
|
-
|
|
10365
|
+
useEffect10(function() {
|
|
10360
10366
|
if (!onClose) return;
|
|
10361
10367
|
if (duration <= 0) return;
|
|
10362
10368
|
var timer = setTimeout(onClose, duration);
|
|
@@ -10454,7 +10460,7 @@ var ToastMessage = React20.forwardRef(function(_0, _1) {
|
|
|
10454
10460
|
});
|
|
10455
10461
|
ToastMessage.displayName = "ToastMessage";
|
|
10456
10462
|
// src/components/ConfettiExplosion.tsx
|
|
10457
|
-
import { useState as useState14, useEffect as
|
|
10463
|
+
import { useState as useState14, useEffect as useEffect11, useRef as useRef6, useMemo as useMemo4 } from "react";
|
|
10458
10464
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
10459
10465
|
var ConfettiExplosion = function ConfettiExplosion(param) {
|
|
10460
10466
|
var testId = param.testId, isActive = param.isActive, _param_particleCount = param.particleCount, particleCount = _param_particleCount === void 0 ? 150 : _param_particleCount, _param_duration = param.duration, duration = _param_duration === void 0 ? 4e3 : _param_duration, _param_colors = param.colors, colors = _param_colors === void 0 ? [
|
|
@@ -10479,7 +10485,7 @@ var ConfettiExplosion = function ConfettiExplosion(param) {
|
|
|
10479
10485
|
}, [
|
|
10480
10486
|
JSON.stringify(colors)
|
|
10481
10487
|
]);
|
|
10482
|
-
|
|
10488
|
+
useEffect11(function() {
|
|
10483
10489
|
if (isActive) {
|
|
10484
10490
|
var newParticles = Array.from({
|
|
10485
10491
|
length: particleCount
|
|
@@ -10592,7 +10598,7 @@ var ConfettiExplosion = function ConfettiExplosion(param) {
|
|
|
10592
10598
|
};
|
|
10593
10599
|
ConfettiExplosion.displayName = "ConfettiExplosion";
|
|
10594
10600
|
// src/components/RealisticConfetti.tsx
|
|
10595
|
-
import { useState as useState15, useEffect as
|
|
10601
|
+
import { useState as useState15, useEffect as useEffect12, useRef as useRef7, useMemo as useMemo5 } from "react";
|
|
10596
10602
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
10597
10603
|
var RealisticConfetti = function RealisticConfetti(param) {
|
|
10598
10604
|
var testId = param.testId, isActive = param.isActive, _param_particleCount = param.particleCount, particleCount = _param_particleCount === void 0 ? 150 : _param_particleCount, _param_duration = param.duration, duration = _param_duration === void 0 ? 4e3 : _param_duration, _param_colors = param.colors, colors = _param_colors === void 0 ? [
|
|
@@ -10617,7 +10623,7 @@ var RealisticConfetti = function RealisticConfetti(param) {
|
|
|
10617
10623
|
}, [
|
|
10618
10624
|
JSON.stringify(colors)
|
|
10619
10625
|
]);
|
|
10620
|
-
|
|
10626
|
+
useEffect12(function() {
|
|
10621
10627
|
if (isActive) {
|
|
10622
10628
|
var newParticles = Array.from({
|
|
10623
10629
|
length: particleCount
|
|
@@ -10786,10 +10792,12 @@ var CircularSpinner = function CircularSpinner(param) {
|
|
|
10786
10792
|
left: offset,
|
|
10787
10793
|
opacity: opacity,
|
|
10788
10794
|
borderWidth: Math.max(2, ringSize / 12),
|
|
10795
|
+
borderColor: "rgba(0,0,0,0.1)",
|
|
10789
10796
|
borderTopColor: color,
|
|
10790
|
-
animation: "
|
|
10797
|
+
animation: "spin ".concat(speed + i * 0.3, "s linear infinite"),
|
|
10798
|
+
animationDelay: "".concat(i * 0.2, "s")
|
|
10791
10799
|
},
|
|
10792
|
-
className: "absolute border border-
|
|
10800
|
+
className: "absolute border border-solid rounded-full"
|
|
10793
10801
|
}, i);
|
|
10794
10802
|
}),
|
|
10795
10803
|
/* @__PURE__ */ jsx30(SrOnly, {
|
|
@@ -10936,16 +10944,16 @@ var CardWithLoading = function CardWithLoading(param) {
|
|
|
10936
10944
|
});
|
|
10937
10945
|
};
|
|
10938
10946
|
// src/components/NestedDropdown.tsx
|
|
10939
|
-
import { useEffect as
|
|
10947
|
+
import { useEffect as useEffect13, useRef as useRef8, useState as useState16 } from "react";
|
|
10940
10948
|
import { ChevronDown as ChevronDown4, X as X3, Loader2 } from "lucide-react";
|
|
10941
|
-
import { Fragment as
|
|
10949
|
+
import { Fragment as Fragment12, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10942
10950
|
function SearchableDropdown(param) {
|
|
10943
10951
|
var label = param.label, options = param.options, value = param.value, onChange = param.onChange, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "search here" : _param_placeholder, testId = param.testId;
|
|
10944
10952
|
var _find;
|
|
10945
10953
|
var _useState16 = _sliced_to_array(useState16(false), 2), open = _useState16[0], setOpen = _useState16[1];
|
|
10946
10954
|
var _useState161 = _sliced_to_array(useState16(""), 2), search = _useState161[0], setSearch = _useState161[1];
|
|
10947
10955
|
var ref = useRef8(null);
|
|
10948
|
-
|
|
10956
|
+
useEffect13(function() {
|
|
10949
10957
|
var h = function h(e) {
|
|
10950
10958
|
return ref.current && !ref.current.contains(e.target) && setOpen(false);
|
|
10951
10959
|
};
|
|
@@ -11040,7 +11048,7 @@ function MultiSelectDropdown(param) {
|
|
|
11040
11048
|
return v !== val;
|
|
11041
11049
|
}));
|
|
11042
11050
|
};
|
|
11043
|
-
|
|
11051
|
+
useEffect13(function() {
|
|
11044
11052
|
var handler = function handler(e) {
|
|
11045
11053
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
11046
11054
|
setOpen(false);
|
|
@@ -11166,7 +11174,7 @@ function CascadingDropdown(param) {
|
|
|
11166
11174
|
var _data_find, _level2_find;
|
|
11167
11175
|
var _useState16 = _sliced_to_array(useState16(false), 2), open = _useState16[0], setOpen = _useState16[1];
|
|
11168
11176
|
var ref = useRef8(null);
|
|
11169
|
-
|
|
11177
|
+
useEffect13(function() {
|
|
11170
11178
|
var handler = function handler(e) {
|
|
11171
11179
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
11172
11180
|
setOpen(false);
|
|
@@ -11271,7 +11279,7 @@ function GroupedDropdown(param) {
|
|
|
11271
11279
|
var _param_label = param.label, label = _param_label === void 0 ? "Grouped Dropdown" : _param_label, groups = param.groups, values = param.values, onChange = param.onChange, testId = param.testId;
|
|
11272
11280
|
var _useState16 = _sliced_to_array(useState16(false), 2), open = _useState16[0], setOpen = _useState16[1];
|
|
11273
11281
|
var ref = useRef8(null);
|
|
11274
|
-
|
|
11282
|
+
useEffect13(function() {
|
|
11275
11283
|
var handler = function handler(e) {
|
|
11276
11284
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
11277
11285
|
setOpen(false);
|
|
@@ -11398,7 +11406,7 @@ function AvatarDropdown(param) {
|
|
|
11398
11406
|
var _param_label = param.label, label = _param_label === void 0 ? "Select Avatar" : _param_label, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Choose user" : _param_placeholder, options = param.options, value = param.value, testId = param.testId, onChange = param.onChange;
|
|
11399
11407
|
var _useState16 = _sliced_to_array(useState16(false), 2), open = _useState16[0], setOpen = _useState16[1];
|
|
11400
11408
|
var ref = useRef8(null);
|
|
11401
|
-
|
|
11409
|
+
useEffect13(function() {
|
|
11402
11410
|
var handler = function handler(e) {
|
|
11403
11411
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
11404
11412
|
setOpen(false);
|
|
@@ -11431,7 +11439,7 @@ function AvatarDropdown(param) {
|
|
|
11431
11439
|
children: [
|
|
11432
11440
|
/* @__PURE__ */ jsx31("span", {
|
|
11433
11441
|
className: "flex items-center gap-[10px]",
|
|
11434
|
-
children: selected ? /* @__PURE__ */ jsxs26(
|
|
11442
|
+
children: selected ? /* @__PURE__ */ jsxs26(Fragment12, {
|
|
11435
11443
|
children: [
|
|
11436
11444
|
/* @__PURE__ */ jsx31("img", {
|
|
11437
11445
|
src: selected.image,
|
|
@@ -11488,7 +11496,7 @@ function AvatarMultiSelectDropdown(param) {
|
|
|
11488
11496
|
var _param_label = param.label, label = _param_label === void 0 ? "Avatar Multi Select" : _param_label, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Select users" : _param_placeholder, options = param.options, values = param.values, testId = param.testId, onChange = param.onChange;
|
|
11489
11497
|
var _useState16 = _sliced_to_array(useState16(false), 2), open = _useState16[0], setOpen = _useState16[1];
|
|
11490
11498
|
var ref = useRef8(null);
|
|
11491
|
-
|
|
11499
|
+
useEffect13(function() {
|
|
11492
11500
|
var handler = function handler(e) {
|
|
11493
11501
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
11494
11502
|
setOpen(false);
|
|
@@ -11615,7 +11623,7 @@ function AsyncDropdown(param) {
|
|
|
11615
11623
|
var _useState162 = _sliced_to_array(useState16([]), 2), options = _useState162[0], setOptions = _useState162[1];
|
|
11616
11624
|
var _useState163 = _sliced_to_array(useState16(false), 2), loading = _useState163[0], setLoading = _useState163[1];
|
|
11617
11625
|
var ref = useRef8(null);
|
|
11618
|
-
|
|
11626
|
+
useEffect13(function() {
|
|
11619
11627
|
var handler = function handler(e) {
|
|
11620
11628
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
11621
11629
|
setOpen(false);
|
|
@@ -11626,7 +11634,7 @@ function AsyncDropdown(param) {
|
|
|
11626
11634
|
return document.removeEventListener("mousedown", handler);
|
|
11627
11635
|
};
|
|
11628
11636
|
}, []);
|
|
11629
|
-
|
|
11637
|
+
useEffect13(function() {
|
|
11630
11638
|
if (!open) return;
|
|
11631
11639
|
setLoading(true);
|
|
11632
11640
|
loadOptions(search).then(setOptions).finally(function() {
|
|
@@ -11720,7 +11728,7 @@ function AsyncDropdown(param) {
|
|
|
11720
11728
|
});
|
|
11721
11729
|
}
|
|
11722
11730
|
// src/components/TextToAudio.tsx
|
|
11723
|
-
import { useEffect as
|
|
11731
|
+
import { useEffect as useEffect14, useRef as useRef9, useState as useState17 } from "react";
|
|
11724
11732
|
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
11725
11733
|
var ControlIcon = function ControlIcon(param) {
|
|
11726
11734
|
var src = param.src;
|
|
@@ -12021,23 +12029,23 @@ var TexttoAudio = function TexttoAudio(param) {
|
|
|
12021
12029
|
(_textAreaRef_current = textAreaRef.current) === null || _textAreaRef_current === void 0 ? void 0 : _textAreaRef_current.setSelectionRange(0, 0);
|
|
12022
12030
|
utteranceRef.current = null;
|
|
12023
12031
|
};
|
|
12024
|
-
|
|
12032
|
+
useEffect14(function() {
|
|
12025
12033
|
return function() {
|
|
12026
12034
|
window.speechSynthesis.cancel();
|
|
12027
12035
|
stopTimer();
|
|
12028
12036
|
};
|
|
12029
12037
|
}, []);
|
|
12030
|
-
|
|
12038
|
+
useEffect14(function() {
|
|
12031
12039
|
volumeRef.current = volume;
|
|
12032
12040
|
}, [
|
|
12033
12041
|
volume
|
|
12034
12042
|
]);
|
|
12035
|
-
|
|
12043
|
+
useEffect14(function() {
|
|
12036
12044
|
speedRef.current = speed;
|
|
12037
12045
|
}, [
|
|
12038
12046
|
speed
|
|
12039
12047
|
]);
|
|
12040
|
-
|
|
12048
|
+
useEffect14(function() {
|
|
12041
12049
|
if (!playing) return;
|
|
12042
12050
|
window.speechSynthesis.cancel();
|
|
12043
12051
|
stopTimer();
|
|
@@ -12045,7 +12053,7 @@ var TexttoAudio = function TexttoAudio(param) {
|
|
|
12045
12053
|
}, [
|
|
12046
12054
|
volume
|
|
12047
12055
|
]);
|
|
12048
|
-
|
|
12056
|
+
useEffect14(function() {
|
|
12049
12057
|
if (!text.trim()) {
|
|
12050
12058
|
setDuration(0);
|
|
12051
12059
|
setCurrentTime(0);
|
|
@@ -12059,7 +12067,7 @@ var TexttoAudio = function TexttoAudio(param) {
|
|
|
12059
12067
|
}, [
|
|
12060
12068
|
text
|
|
12061
12069
|
]);
|
|
12062
|
-
|
|
12070
|
+
useEffect14(function() {
|
|
12063
12071
|
if (!baseDurationRef.current) return;
|
|
12064
12072
|
var progress = duration === 0 ? 0 : currentTime / duration;
|
|
12065
12073
|
var newDuration = baseDurationRef.current / speed;
|
|
@@ -12074,7 +12082,7 @@ var TexttoAudio = function TexttoAudio(param) {
|
|
|
12074
12082
|
}, [
|
|
12075
12083
|
speed
|
|
12076
12084
|
]);
|
|
12077
|
-
|
|
12085
|
+
useEffect14(function() {
|
|
12078
12086
|
if (!autoPlayRef.current) return;
|
|
12079
12087
|
if (!text.trim()) return;
|
|
12080
12088
|
autoPlayRef.current = false;
|
|
@@ -12412,7 +12420,7 @@ var TexttoAudio = function TexttoAudio(param) {
|
|
|
12412
12420
|
});
|
|
12413
12421
|
};
|
|
12414
12422
|
// src/components/Notifications.tsx
|
|
12415
|
-
import { useEffect as
|
|
12423
|
+
import { useEffect as useEffect15, useRef as useRef10, useState as useState18 } from "react";
|
|
12416
12424
|
import { createPortal as createPortal2 } from "react-dom";
|
|
12417
12425
|
import { X as X4 } from "lucide-react";
|
|
12418
12426
|
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
@@ -12421,7 +12429,7 @@ var MahatiLocationAccessModal = function MahatiLocationAccessModal(param) {
|
|
|
12421
12429
|
var ref = useRef10(null);
|
|
12422
12430
|
var _useState18 = _sliced_to_array(useState18("prompt"), 2), status = _useState18[0], setStatus = _useState18[1];
|
|
12423
12431
|
var _useState181 = _sliced_to_array(useState18(null), 2), location = _useState181[0], setLocation = _useState181[1];
|
|
12424
|
-
|
|
12432
|
+
useEffect15(function() {
|
|
12425
12433
|
if (!navigator.permissions) return;
|
|
12426
12434
|
navigator.permissions.query({
|
|
12427
12435
|
name: "geolocation"
|
|
@@ -12432,7 +12440,7 @@ var MahatiLocationAccessModal = function MahatiLocationAccessModal(param) {
|
|
|
12432
12440
|
};
|
|
12433
12441
|
});
|
|
12434
12442
|
}, []);
|
|
12435
|
-
|
|
12443
|
+
useEffect15(function() {
|
|
12436
12444
|
if (status === "granted" && location) {
|
|
12437
12445
|
onAllow === null || onAllow === void 0 ? void 0 : onAllow(location.coords);
|
|
12438
12446
|
onClose();
|
|
@@ -12451,7 +12459,7 @@ var MahatiLocationAccessModal = function MahatiLocationAccessModal(param) {
|
|
|
12451
12459
|
enableHighAccuracy: true
|
|
12452
12460
|
});
|
|
12453
12461
|
};
|
|
12454
|
-
|
|
12462
|
+
useEffect15(function() {
|
|
12455
12463
|
if (!isOpen) return;
|
|
12456
12464
|
var h = function h(e) {
|
|
12457
12465
|
var _ref_current;
|
|
@@ -12561,7 +12569,7 @@ var MahatiCameraAccessModal = function MahatiCameraAccessModal(param) {
|
|
|
12561
12569
|
});
|
|
12562
12570
|
})();
|
|
12563
12571
|
};
|
|
12564
|
-
|
|
12572
|
+
useEffect15(function() {
|
|
12565
12573
|
if (!isOpen) return;
|
|
12566
12574
|
var handler = function handler(e) {
|
|
12567
12575
|
var _cardRef_current;
|
|
@@ -12677,7 +12685,7 @@ var MahatiMicrophoneAccessModal = function MahatiMicrophoneAccessModal(param) {
|
|
|
12677
12685
|
});
|
|
12678
12686
|
})();
|
|
12679
12687
|
};
|
|
12680
|
-
|
|
12688
|
+
useEffect15(function() {
|
|
12681
12689
|
if (!isOpen) return;
|
|
12682
12690
|
var handler = function handler(e) {
|
|
12683
12691
|
var _cardRef_current;
|
|
@@ -12808,7 +12816,7 @@ var MahatiPromotionModal = function MahatiPromotionModal(_0) {
|
|
|
12808
12816
|
]);
|
|
12809
12817
|
var ref = useRef10(null);
|
|
12810
12818
|
var _useState18 = _sliced_to_array(useState18(""), 2), email = _useState18[0], setEmail = _useState18[1];
|
|
12811
|
-
|
|
12819
|
+
useEffect15(function() {
|
|
12812
12820
|
if (!isOpen) return;
|
|
12813
12821
|
var handler = function handler(e) {
|
|
12814
12822
|
var _ref_current;
|
|
@@ -12828,7 +12836,7 @@ var MahatiPromotionModal = function MahatiPromotionModal(_0) {
|
|
|
12828
12836
|
var handleCta = function handleCta() {
|
|
12829
12837
|
onCtaClick === null || onCtaClick === void 0 ? void 0 : onCtaClick(email);
|
|
12830
12838
|
if (ctaLink) {
|
|
12831
|
-
openInNewTab ? window.open(ctaLink, "_blank") : window.location.
|
|
12839
|
+
openInNewTab ? window.open(ctaLink, "_blank") : window.location.assign(ctaLink);
|
|
12832
12840
|
}
|
|
12833
12841
|
onClose();
|
|
12834
12842
|
};
|
|
@@ -12851,7 +12859,7 @@ var MahatiPromotionModal = function MahatiPromotionModal(_0) {
|
|
|
12851
12859
|
var MahatiPromotionModalV2Modal = function MahatiPromotionModalV2Modal(param) {
|
|
12852
12860
|
var isOpen = param.isOpen, testId = param.testId, onClose = param.onClose, headerTitle = param.headerTitle, title = param.title, description = param.description, ctaText = param.ctaText, onCtaClick = param.onCtaClick, ctaLink = param.ctaLink, _param_openInNewTab = param.openInNewTab, openInNewTab = _param_openInNewTab === void 0 ? false : _param_openInNewTab, _param_showBadgeImage = param.showBadgeImage, showBadgeImage = _param_showBadgeImage === void 0 ? false : _param_showBadgeImage, badgeImageSrc = param.badgeImageSrc;
|
|
12853
12861
|
var ref = useRef10(null);
|
|
12854
|
-
|
|
12862
|
+
useEffect15(function() {
|
|
12855
12863
|
if (!isOpen) return;
|
|
12856
12864
|
var handler = function handler(e) {
|
|
12857
12865
|
var _ref_current;
|
|
@@ -12932,7 +12940,7 @@ var MahatiPromotionModalV2Modal = function MahatiPromotionModalV2Modal(param) {
|
|
|
12932
12940
|
var MahatiPromotionModalV3Modal = function MahatiPromotionModalV3Modal(param) {
|
|
12933
12941
|
var isOpen = param.isOpen, testId = param.testId, onClose = param.onClose, title = param.title, description = param.description, ctaText = param.ctaText, onCtaClick = param.onCtaClick, _param_secondaryText = param.secondaryText, secondaryText = _param_secondaryText === void 0 ? "Later" : _param_secondaryText, onSecondaryClick = param.onSecondaryClick, imageSrc = param.imageSrc, ctaLink = param.ctaLink, _param_openInNewTab = param.openInNewTab, openInNewTab = _param_openInNewTab === void 0 ? false : _param_openInNewTab;
|
|
12934
12942
|
var ref = useRef10(null);
|
|
12935
|
-
|
|
12943
|
+
useEffect15(function() {
|
|
12936
12944
|
if (!isOpen) return;
|
|
12937
12945
|
var handler = function handler(e) {
|
|
12938
12946
|
var _ref_current;
|