Skip to content

Commit 2bc9bb4

Browse files
authored
Merge pull request #36962 from BerriAI/litellm_shadcn_daterange_type_0814
refactor(ui): declare DateRangePickerValue locally instead of importing it from tremor
2 parents 387ad0b + fe61fa1 commit 2bc9bb4

14 files changed

Lines changed: 19 additions & 52 deletions

File tree

ui/litellm-dashboard/eslint-suppressions.json

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@
140140
"local/filename-pascal-case": {
141141
"count": 1
142142
},
143-
"no-restricted-imports": {
144-
"count": 1
145-
},
146143
"react-hooks/purity": {
147144
"count": 1
148145
},
@@ -301,11 +298,6 @@
301298
"count": 3
302299
}
303300
},
304-
"src/app/(dashboard)/guardrails-monitor/_components/GuardrailsMonitorView.tsx": {
305-
"no-restricted-imports": {
306-
"count": 1
307-
}
308-
},
309301
"src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.tsx": {
310302
"no-nested-ternary": {
311303
"count": 5
@@ -1484,9 +1476,6 @@
14841476
"src/app/(dashboard)/usage/_components/components/EntityUsage/EntityUsage.tsx": {
14851477
"local/no-complex-jsx-arrow": {
14861478
"count": 2
1487-
},
1488-
"no-restricted-imports": {
1489-
"count": 1
14901479
}
14911480
},
14921481
"src/app/(dashboard)/usage/_components/components/UsageAIChatPanel.tsx": {
@@ -1507,9 +1496,6 @@
15071496
"no-nested-ternary": {
15081497
"count": 1
15091498
},
1510-
"no-restricted-imports": {
1511-
"count": 1
1512-
},
15131499
"react-hooks/purity": {
15141500
"count": 1
15151501
},
@@ -1736,32 +1722,9 @@
17361722
"count": 1
17371723
}
17381724
},
1739-
"src/components/EntityUsageExport/ExportSummary.tsx": {
1740-
"no-restricted-imports": {
1741-
"count": 1
1742-
}
1743-
},
1744-
"src/components/EntityUsageExport/UsageExportHeader.tsx": {
1745-
"no-restricted-imports": {
1746-
"count": 1
1747-
}
1748-
},
1749-
"src/components/EntityUsageExport/types.ts": {
1750-
"no-restricted-imports": {
1751-
"count": 1
1752-
}
1753-
},
1754-
"src/components/EntityUsageExport/utils.test.ts": {
1755-
"no-restricted-imports": {
1756-
"count": 1
1757-
}
1758-
},
17591725
"src/components/EntityUsageExport/utils.ts": {
17601726
"max-params": {
17611727
"count": 3
1762-
},
1763-
"no-restricted-imports": {
1764-
"count": 1
17651728
}
17661729
},
17671730
"src/components/GuardrailSettingsView.tsx": {
@@ -3222,9 +3185,6 @@
32223185
"local/filename-pascal-case": {
32233186
"count": 1
32243187
},
3225-
"no-restricted-imports": {
3226-
"count": 1
3227-
},
32283188
"react-hooks/set-state-in-effect": {
32293189
"count": 1
32303190
}

ui/litellm-dashboard/src/app/(dashboard)/caching/_components/cache_dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DateRangePickerValue } from "@tremor/react";
1+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
22
import React, { useEffect, useState } from "react";
33
import NotificationsManager from "@/components/molecules/notifications_manager";
44
import UsageDatePicker from "@/components/shared/usage_date_picker";

ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsMonitorView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DateRangePickerValue } from "@tremor/react";
1+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
22
import React, { useCallback, useMemo, useState } from "react";
33
import { formatDate } from "@/components/networking";
44
import AdvancedDatePicker from "@/components/shared/advanced_date_picker";

ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/EntityUsage/EntityUsage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { MoneyCell } from "@/components/shared/table_cells";
1414
import { Card as ShadcnCard, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
1515
import { hasCapability, type Capability } from "@/utils/capabilities";
1616
import { formatNumberWithCommas } from "@/utils/dataUtils";
17-
import type { DateRangePickerValue } from "@tremor/react";
17+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
1818
import { ChevronDown, ChevronRight, ExternalLink, Info, Loader2 } from "lucide-react";
1919
import type { ColumnDef } from "@tanstack/react-table";
2020
import { Alert, AlertDescription } from "@/components/shared/Alert";

ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsagePageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { ChevronDown, ChevronRight, Download, ExternalLink, Info, Loader2, Sparkles, X } from "lucide-react";
10-
import type { DateRangePickerValue } from "@tremor/react";
10+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
1111
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
1212

1313
import { BarChart } from "@/components/shared/charts";

ui/litellm-dashboard/src/components/EntityUsageExport/ExportSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import type { DateRangePickerValue } from "@tremor/react";
2+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
33

44
interface ExportSummaryProps {
55
dateRange: DateRangePickerValue;

ui/litellm-dashboard/src/components/EntityUsageExport/UsageExportHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DateRangePickerValue } from "@tremor/react";
1+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
22
import { Download } from "lucide-react";
33
import React, { useState } from "react";
44
import { Button } from "@/components/ui/button";

ui/litellm-dashboard/src/components/EntityUsageExport/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DateRangePickerValue } from "@tremor/react";
1+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
22
import type { Team } from "@/components/key_team_helpers/key_list";
33

44
export type ExportFormat = "csv" | "json";

ui/litellm-dashboard/src/components/EntityUsageExport/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DateRangePickerValue } from "@tremor/react";
1+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
22
import Papa from "papaparse";
33
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
44
import type { EntitySpendData, ExportScope } from "./types";

ui/litellm-dashboard/src/components/EntityUsageExport/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { formatNumberWithCommas } from "@/utils/dataUtils";
2-
import type { DateRangePickerValue } from "@tremor/react";
2+
import type { DateRangePickerValue } from "@/components/shared/date_picker_types";
33
import Papa from "papaparse";
44
import type { EntityBreakdown, EntitySpendData, EntityType, ExportMetadata, ExportScope } from "./types";
55

0 commit comments

Comments
 (0)