From 48f62b14fcea0e0d22c156299033e0834061d3f5 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Fri, 21 Feb 2025 12:07:30 -0700 Subject: [PATCH] move utils around --- web/package-lock.json | 176 +++++++++--------- web/package.json | 12 +- .../api/buster_rest/chats/queryRequests.ts | 2 +- .../dataset_groups/queryRequests.ts | 2 +- .../useSocketQueryEmitOn.tsx | 2 +- .../ChatItemsContainer.tsx | 2 +- .../app/app/new-user/_NewUserController.tsx | 2 +- .../api-keys/ApiKeyListItem.tsx | 2 +- .../[datasourceId]/_DatasourceForm.tsx | 2 +- .../[datasourceId]/_forms/PostgresForm.tsx | 2 +- .../[datasourceId]/_forms/SnowflakeForm.tsx | 2 +- .../(restricted-width)/profile/page.tsx | 2 +- .../app/auth/_LoginComponents/LoginForm.tsx | 2 +- .../reset-password-email/_ResetEmailForm.tsx | 2 +- .../features/Modals/AddTypeModal.tsx | 2 +- .../features/Modals/NewCollectionModal.tsx | 2 +- .../features/NewChatModal/NewChatModal.tsx | 2 +- .../SuggestedPromptsContainer.tsx | 2 +- .../ShareMenu/ShareMenuContentBody.tsx | 2 +- .../ShareMenu/ShareMenuContentPublish.tsx | 2 +- .../useXAxisTickOptions.ts | 2 +- .../useEChartsTheme/buster_light_theme.ts | 2 +- .../BarChartSeriesBuilder.tsx | 2 +- .../useSeriesOptions/ComboChartBuilder.tsx | 2 +- .../LineChartSeriesBuilder.ts | 2 +- .../PieChartSeriesBuilder.tsx | 4 +- .../hooks/useSeriesOptions/useGoalLines.ts | 2 +- .../hooks/useSeriesOptions/useTrendlines.ts | 2 +- .../useTooltipOptions/BusterEChartTooltip.tsx | 2 +- .../OutLabelsStyle.ts | 2 +- .../BusterChartJS/helpers/datalabelHelper.ts | 2 +- .../pieChartOptions.ts | 6 +- .../hooks/useGoalLines/useGoalLines.ts | 2 +- .../BusterChartJSTooltip.tsx | 2 +- .../useOptions/useTooltipOptions.ts/helper.ts | 2 +- .../scatterTooltipHelper.ts | 2 +- .../useTooltipOptions.tsx | 2 +- .../hooks/useOptions/useXAxis.ts | 2 +- .../useSeriesOptions/comboSeriesBuilder.ts | 2 +- .../useSeriesOptions/lineSeriesBuilder.ts | 2 +- .../useSeriesOptions/scatterSeriesBuilder.ts | 6 +- .../hooks/useTrendlines/useTrendlines.ts | 2 +- .../legendHeadlineHelpers.ts | 6 +- .../charts/MetricChart/BusterMetricChart.tsx | 2 +- .../ui/charts/TableChart/BusterTableChart.tsx | 2 +- .../datasetHelpers_BarLinePie.ts | 2 +- .../useDataTrendlineOptions.ts | 2 +- ...ns.spec.tsx => useDatasetOptions.test.tsx} | 0 .../ui/charts/commonHelpers/axisHelper.ts | 2 +- .../ui/charts/commonHelpers/labelHelpers.ts | 2 +- .../ui/charts/commonHelpers/useXAxisTitle.ts | 2 +- .../ui/charts/commonHelpers/useY2AxisTitle.ts | 2 +- .../ui/charts/commonHelpers/useYAxisTitle.ts | 2 +- .../components/ui/image/BusterUserAvatar.tsx | 2 +- .../components/ui/list/useCreateListByDate.ts | 2 +- .../ui/select/AppSelectColorPalette.tsx | 4 +- .../ui/select/AppSelectTagInput.tsx | 2 +- .../ui/table/AppDataGrid/helpers.ts | 2 +- .../Chats/ChatProvider/useChatIndividual.ts | 2 +- .../NewChatProvider/useAutoAppendThought.ts | 2 +- .../NewChatProvider/useChatStreamMessage.ts | 2 +- .../useCollectionCreate.ts | 2 +- .../createDefaultColumnFormats.ts | 2 +- ...pec.ts => messageAutoChartHandler.test.ts} | 0 .../context/Metrics/helpers/metricHelpers.ts | 2 +- .../Metrics/helpers/saveToServerHelpers.ts | 2 +- .../Supabase/SupabaseContextProvider.tsx | 2 +- web/src/context/Users/useInviteUser.ts | 2 +- .../CollectionIndividualContent.tsx | 2 +- .../CollectionIndividualHeader.tsx | 2 +- .../CollectionsListContent.tsx | 2 +- .../DashboardListContent.tsx | 2 +- .../DatasetListContent.tsx | 2 +- .../EditTrendline/EditTrendline.tsx | 2 +- .../EditTrendline/EditTrendlineColumnId.tsx | 2 +- .../EditTrendline/EditTrendlineOption.tsx | 2 +- .../ChartIcons/ChartIcon_AreaRelative.tsx | 2 +- .../EditDateFormat.tsx | 2 +- .../EditLabelStyle.tsx | 2 +- .../SelectAxisDropdownContent.tsx | 2 +- .../SelectAxisColumnContent/dateConfig.ts | 2 +- .../SelectAxisDragContainer/useErrorZones.ts | 2 +- .../SelectAxis/SelectAxisItemLabel.tsx | 2 +- .../XAxisSettingContent.tsx | 2 +- .../Y2AxisSettingContent.tsx | 2 +- .../YAxisSettingContent.tsx | 2 +- .../SelectChartType/SelectChartType.tsx | 2 +- .../StylingMetric/EditDerivedHeader.tsx | 2 +- .../StylingMetric/EditMetricField.tsx | 2 +- .../StylingMetric/EditMetricType.tsx | 2 +- .../StylingMetric/helpers.tsx | 2 +- .../MetricViewChart/MetricViewChart.tsx | 2 +- .../MetricItemsContainer.tsx | 2 +- .../TermIndividualContent.tsx | 2 +- .../TermIndividualContentSider.tsx | 2 +- .../TermsListController/TermsListContent.tsx | 2 +- .../ChatContent/ChatInput/ChatInput.tsx | 6 +- web/src/{utils => lib}/array.ts | 0 web/src/{utils => lib}/canvas.ts | 0 web/src/{utils => lib}/chat.ts | 0 web/src/{utils => lib}/colors.ts | 0 .../columnFormatter.test.ts} | 0 web/src/{utils => lib}/columnFormatter.ts | 0 web/src/{utils => lib}/data.ts | 0 web/src/{utils => lib}/date.ts | 0 web/src/{utils => lib}/element.tsx | 0 web/src/{utils => lib}/email.ts | 0 web/src/{utils => lib}/exportUtils.tsx | 0 web/src/{utils => lib}/imageGeneration.tsx | 0 web/src/{utils => lib}/index.ts | 0 web/src/{utils => lib}/language.ts | 0 web/src/{utils => lib}/math.ts | 0 web/src/{utils => lib}/messages.ts | 0 web/src/{utils => lib}/numbers.ts | 0 web/src/{utils => lib}/objects.ts | 0 web/src/{utils => lib}/regression.ts | 0 web/src/{utils => lib}/text.ts | 0 web/src/{utils => lib}/timeout.ts | 0 web/src/{utils => lib}/url.ts | 0 web/tsconfig.json | 2 +- 120 files changed, 198 insertions(+), 198 deletions(-) rename web/src/components/ui/charts/chartHooks/useDatasetOptions/{useDatasetOptions.spec.tsx => useDatasetOptions.test.tsx} (100%) rename web/src/context/Metrics/helpers/messageAutoChartHandler/{messageAutoChartHandler.spec.ts => messageAutoChartHandler.test.ts} (100%) rename web/src/{utils => lib}/array.ts (100%) rename web/src/{utils => lib}/canvas.ts (100%) rename web/src/{utils => lib}/chat.ts (100%) rename web/src/{utils => lib}/colors.ts (100%) rename web/src/{utils/columnFormatter.spec.ts => lib/columnFormatter.test.ts} (100%) rename web/src/{utils => lib}/columnFormatter.ts (100%) rename web/src/{utils => lib}/data.ts (100%) rename web/src/{utils => lib}/date.ts (100%) rename web/src/{utils => lib}/element.tsx (100%) rename web/src/{utils => lib}/email.ts (100%) rename web/src/{utils => lib}/exportUtils.tsx (100%) rename web/src/{utils => lib}/imageGeneration.tsx (100%) rename web/src/{utils => lib}/index.ts (100%) rename web/src/{utils => lib}/language.ts (100%) rename web/src/{utils => lib}/math.ts (100%) rename web/src/{utils => lib}/messages.ts (100%) rename web/src/{utils => lib}/numbers.ts (100%) rename web/src/{utils => lib}/objects.ts (100%) rename web/src/{utils => lib}/regression.ts (100%) rename web/src/{utils => lib}/text.ts (100%) rename web/src/{utils => lib}/timeout.ts (100%) rename web/src/{utils => lib}/url.ts (100%) diff --git a/web/package-lock.json b/web/package-lock.json index adb4c91d0..e9caa22cd 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -21,14 +21,14 @@ "@supabase/auth-helpers-react": "^0.5.0", "@supabase/ssr": "^0.5.2", "@supabase/supabase-js": "^2.48.1", - "@tanstack/react-query": "^5.66.7", + "@tanstack/react-query": "^5.66.9", "@vercel/speed-insights": "^1.2.0", "ahooks": "^3.8.4", "antd": "5.23.3", "antd-style": "^3.7.1", "axios": "^1.7.9", "canvas-confetti": "^1.9.3", - "chart.js": "^4.4.7", + "chart.js": "^4.4.8", "chartjs": "^0.3.24", "chartjs-adapter-dayjs-4": "^1.0.4", "chartjs-chart-geo": "^4.3.4", @@ -52,7 +52,7 @@ "echarts-stat": "^1.2.0", "email-validator": "^2.0.4", "font-color-contrast": "^11.1.0", - "framer-motion": "^12.4.4", + "framer-motion": "^12.4.7", "html2canvas": "^1.4.1", "js-cookie": "^3.0.5", "jspdf": "^2.5.2", @@ -89,11 +89,11 @@ "split-pane-react": "^0.1.3", "tailwind-merge": "^3.0.1", "utility-types": "^3.11.0", - "uuid": "^11.0.5", + "uuid": "^11.1.0", "virtua": "^0.40.0" }, "devDependencies": { - "@tailwindcss/postcss": "^4.0.7", + "@tailwindcss/postcss": "^4.0.8", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@testing-library/user-event": "^14.6.1", @@ -121,7 +121,7 @@ "monaco-editor-webpack-plugin": "^7.1.0", "postcss": "8.5.3", "sass": "^1.83.4", - "tailwindcss": "^4.0.7", + "tailwindcss": "^4.0.8", "ts-jest": "^29.2.5", "typescript": "^5" }, @@ -3824,54 +3824,44 @@ } }, "node_modules/@tailwindcss/node": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.0.7.tgz", - "integrity": "sha512-dkFXufkbRB2mu3FPsW5xLAUWJyexpJA+/VtQj18k3SUiJVLdpgzBd1v1gRRcIpEJj7K5KpxBKfOXlZxT3ZZRuA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.0.8.tgz", + "integrity": "sha512-FKArQpbrbwv08TNT0k7ejYXpF+R8knZFAatNc0acOxbgeqLzwb86r+P3LGOjIeI3Idqe9CVkZrh4GlsJLJKkkw==", "dev": true, "license": "MIT", "dependencies": { "enhanced-resolve": "^5.18.1", "jiti": "^2.4.2", - "tailwindcss": "4.0.7" - } - }, - "node_modules/@tailwindcss/node/node_modules/jiti": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" + "tailwindcss": "4.0.8" } }, "node_modules/@tailwindcss/oxide": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.7.tgz", - "integrity": "sha512-yr6w5YMgjy+B+zkJiJtIYGXW+HNYOPfRPtSs+aqLnKwdEzNrGv4ZuJh9hYJ3mcA+HMq/K1rtFV+KsEr65S558g==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.8.tgz", + "integrity": "sha512-KfMcuAu/Iw+DcV1e8twrFyr2yN8/ZDC/odIGta4wuuJOGkrkHZbvJvRNIbQNhGh7erZTYV6Ie0IeD6WC9Y8Hcw==", "dev": true, "license": "MIT", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.0.7", - "@tailwindcss/oxide-darwin-arm64": "4.0.7", - "@tailwindcss/oxide-darwin-x64": "4.0.7", - "@tailwindcss/oxide-freebsd-x64": "4.0.7", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.7", - "@tailwindcss/oxide-linux-arm64-gnu": "4.0.7", - "@tailwindcss/oxide-linux-arm64-musl": "4.0.7", - "@tailwindcss/oxide-linux-x64-gnu": "4.0.7", - "@tailwindcss/oxide-linux-x64-musl": "4.0.7", - "@tailwindcss/oxide-win32-arm64-msvc": "4.0.7", - "@tailwindcss/oxide-win32-x64-msvc": "4.0.7" + "@tailwindcss/oxide-android-arm64": "4.0.8", + "@tailwindcss/oxide-darwin-arm64": "4.0.8", + "@tailwindcss/oxide-darwin-x64": "4.0.8", + "@tailwindcss/oxide-freebsd-x64": "4.0.8", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.8", + "@tailwindcss/oxide-linux-arm64-gnu": "4.0.8", + "@tailwindcss/oxide-linux-arm64-musl": "4.0.8", + "@tailwindcss/oxide-linux-x64-gnu": "4.0.8", + "@tailwindcss/oxide-linux-x64-musl": "4.0.8", + "@tailwindcss/oxide-win32-arm64-msvc": "4.0.8", + "@tailwindcss/oxide-win32-x64-msvc": "4.0.8" } }, "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.7.tgz", - "integrity": "sha512-5iQXXcAeOHBZy8ASfHFm1k0O/9wR2E3tKh6+P+ilZZbQiMgu+qrnfpBWYPc3FPuQdWiWb73069WT5D+CAfx/tg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.8.tgz", + "integrity": "sha512-We7K79+Sm4mwJHk26Yzu/GAj7C7myemm7PeXvpgMxyxO70SSFSL3uCcqFbz9JA5M5UPkrl7N9fkBe/Y0iazqpA==", "cpu": [ "arm64" ], @@ -3886,9 +3876,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.7.tgz", - "integrity": "sha512-7yGZtEc5IgVYylqK/2B0yVqoofk4UAbkn1ygNpIJZyrOhbymsfr8uUFCueTu2fUxmAYIfMZ8waWo2dLg/NgLgg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.8.tgz", + "integrity": "sha512-Lv9Isi2EwkCTG1sRHNDi0uRNN1UGFdEThUAGFrydRmQZnraGLMjN8gahzg2FFnOizDl7LB2TykLUuiw833DSNg==", "cpu": [ "arm64" ], @@ -3903,9 +3893,9 @@ } }, "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.7.tgz", - "integrity": "sha512-tPQDV20fBjb26yWbPqT1ZSoDChomMCiXTKn4jupMSoMCFyU7+OJvIY1ryjqBuY622dEBJ8LnCDDWsnj1lX9nNQ==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.8.tgz", + "integrity": "sha512-fWfywfYIlSWtKoqWTjukTHLWV3ARaBRjXCC2Eo0l6KVpaqGY4c2y8snUjp1xpxUtpqwMvCvFWFaleMoz1Vhzlw==", "cpu": [ "x64" ], @@ -3920,9 +3910,9 @@ } }, "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.7.tgz", - "integrity": "sha512-sZqJpTyTZiknU9LLHuByg5GKTW+u3FqM7q7myequAXxKOpAFiOfXpY710FuMY+gjzSapyRbDXJlsTQtCyiTo5w==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.8.tgz", + "integrity": "sha512-SO+dyvjJV9G94bnmq2288Ke0BIdvrbSbvtPLaQdqjqHR83v5L2fWADyFO+1oecHo9Owsk8MxcXh1agGVPIKIqw==", "cpu": [ "x64" ], @@ -3937,9 +3927,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.7.tgz", - "integrity": "sha512-PBgvULgeSswjd8cbZ91gdIcIDMdc3TUHV5XemEpxlqt9M8KoydJzkuB/Dt910jYdofOIaTWRL6adG9nJICvU4A==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.8.tgz", + "integrity": "sha512-ZSHggWiEblQNV69V0qUK5vuAtHP+I+S2eGrKGJ5lPgwgJeAd6GjLsVBN+Mqn2SPVfYM3BOpS9jX/zVg9RWQVDQ==", "cpu": [ "arm" ], @@ -3954,9 +3944,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.7.tgz", - "integrity": "sha512-By/a2yeh+e9b+C67F88ndSwVJl2A3tcUDb29FbedDi+DZ4Mr07Oqw9Y1DrDrtHIDhIZ3bmmiL1dkH2YxrtV+zw==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.8.tgz", + "integrity": "sha512-xWpr6M0OZLDNsr7+bQz+3X7zcnDJZJ1N9gtBWCtfhkEtDjjxYEp+Lr5L5nc/yXlL4MyCHnn0uonGVXy3fhxaVA==", "cpu": [ "arm64" ], @@ -3971,9 +3961,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.7.tgz", - "integrity": "sha512-WHYs3cpPEJb/ccyT20NOzopYQkl7JKncNBUbb77YFlwlXMVJLLV3nrXQKhr7DmZxz2ZXqjyUwsj2rdzd9stYdw==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.8.tgz", + "integrity": "sha512-5tz2IL7LN58ssGEq7h/staD7pu/izF/KeMWdlJ86WDe2Ah46LF3ET6ZGKTr5eZMrnEA0M9cVFuSPprKRHNgjeg==", "cpu": [ "arm64" ], @@ -3988,9 +3978,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.7.tgz", - "integrity": "sha512-7bP1UyuX9kFxbOwkeIJhBZNevKYPXB6xZI37v09fqi6rqRJR8elybwjMUHm54GVP+UTtJ14ueB1K54Dy1tIO6w==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.8.tgz", + "integrity": "sha512-KSzMkhyrxAQyY2o194NKVKU9j/c+NFSoMvnHWFaNHKi3P1lb+Vq1UC19tLHrmxSkKapcMMu69D7+G1+FVGNDXQ==", "cpu": [ "x64" ], @@ -4005,9 +3995,9 @@ } }, "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.7.tgz", - "integrity": "sha512-gBQIV8nL/LuhARNGeroqzXymMzzW5wQzqlteVqOVoqwEfpHOP3GMird5pGFbnpY+NP0fOlsZGrxxOPQ4W/84bQ==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.8.tgz", + "integrity": "sha512-yFYKG5UtHTRimjtqxUWXBgI4Tc6NJe3USjRIVdlTczpLRxq/SFwgzGl5JbatCxgSRDPBFwRrNPxq+ukfQFGdrw==", "cpu": [ "x64" ], @@ -4022,9 +4012,9 @@ } }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.7.tgz", - "integrity": "sha512-aH530NFfx0kpQpvYMfWoeG03zGnRCMVlQG8do/5XeahYydz+6SIBxA1tl/cyITSJyWZHyVt6GVNkXeAD30v0Xg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.8.tgz", + "integrity": "sha512-tndGujmCSba85cRCnQzXgpA2jx5gXimyspsUYae5jlPyLRG0RjXbDshFKOheVXU4TLflo7FSG8EHCBJ0EHTKdQ==", "cpu": [ "arm64" ], @@ -4039,9 +4029,9 @@ } }, "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.7.tgz", - "integrity": "sha512-8Cva6bbJN7ZJx320k7vxGGdU0ewmpfS5A4PudyzUuofdi8MgeINuiiWiPQ0VZCda/GX88K6qp+6UpDZNVr8HMQ==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.8.tgz", + "integrity": "sha512-T77jroAc0p4EHVVgTUiNeFn6Nj3jtD3IeNId2X+0k+N1XxfNipy81BEkYErpKLiOkNhpNFjPee8/ZVas29b2OQ==", "cpu": [ "x64" ], @@ -4056,18 +4046,18 @@ } }, "node_modules/@tailwindcss/postcss": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.0.7.tgz", - "integrity": "sha512-zXcKs1uGssVDlnsQ+iwrkul5GPKvsXPynGCuk/eXLx3DVhHlQKMpA6tXN2oO28x2ki1xRBTfadKiHy2taVvp7g==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.0.8.tgz", + "integrity": "sha512-SUwlrXjn1ycmUbA0o0n3Y0LqlXqxN5R8HR+ti+OBbRS79wl2seDmiypEs3xJCuQXe07ol81s1AmRMitBmPveJA==", "dev": true, "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", - "@tailwindcss/node": "4.0.7", - "@tailwindcss/oxide": "4.0.7", + "@tailwindcss/node": "4.0.8", + "@tailwindcss/oxide": "4.0.8", "lightningcss": "^1.29.1", "postcss": "^8.4.41", - "tailwindcss": "4.0.7" + "tailwindcss": "4.0.8" } }, "node_modules/@tanstack/query-core": { @@ -4081,9 +4071,9 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.66.7", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.66.7.tgz", - "integrity": "sha512-qd3q/tUpF2K1xItfPZddk1k/8pSXnovg41XyCqJgPoyYEirMBtB0sVEVVQ/CsAOngzgWtBPXimVf4q4kM9uO6A==", + "version": "5.66.9", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.66.9.tgz", + "integrity": "sha512-NRI02PHJsP5y2gAuWKP+awamTIBFBSKMnO6UVzi03GTclmHHHInH5UzVgzi5tpu4+FmGfsdT7Umqegobtsp23A==", "license": "MIT", "dependencies": { "@tanstack/query-core": "5.66.4" @@ -6454,9 +6444,9 @@ } }, "node_modules/chart.js": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", - "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.8.tgz", + "integrity": "sha512-IkGZlVpXP+83QpMm4uxEiGqSI7jFizwVtF3+n5Pc3k7sMO+tkd0qxh2OzLhenM0K80xtmAONWGBn082EiBQSDA==", "license": "MIT", "dependencies": { "@kurkle/color": "^0.3.0" @@ -9369,9 +9359,9 @@ } }, "node_modules/framer-motion": { - "version": "12.4.5", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.4.5.tgz", - "integrity": "sha512-9+8wglyIJFeUpVg4U8Ohvoo5x7zmvRqawWXhEUThcYdwL/5A1/OkLvQo68Zz5taUE11HKG/Ex+LPaN2+fMkRdA==", + "version": "12.4.7", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.4.7.tgz", + "integrity": "sha512-VhrcbtcAMXfxlrjeHPpWVu2+mkcoR31e02aNSR7OUS/hZAciKa8q6o3YN2mA1h+jjscRsSyKvX6E1CiY/7OLMw==", "license": "MIT", "dependencies": { "motion-dom": "^12.4.5", @@ -12096,6 +12086,16 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/jose": { "version": "4.15.9", "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.9.tgz", @@ -18081,9 +18081,9 @@ } }, "node_modules/tailwindcss": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.7.tgz", - "integrity": "sha512-yH5bPPyapavo7L+547h3c4jcBXcrKwybQRjwdEIVAd9iXRvy/3T1CC6XSQEgZtRySjKfqvo3Cc0ZF1DTheuIdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.8.tgz", + "integrity": "sha512-Me7N5CKR+D2A1xdWA5t5+kjjT7bwnxZOE6/yDI/ixJdJokszsn2n++mdU5yJwrsTpqFX2B9ZNMBJDwcqk9C9lw==", "dev": true, "license": "MIT" }, @@ -19386,9 +19386,9 @@ } }, "node_modules/uuid": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.5.tgz", - "integrity": "sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/web/package.json b/web/package.json index 1b9bba938..2b8d601fc 100644 --- a/web/package.json +++ b/web/package.json @@ -28,14 +28,14 @@ "@supabase/auth-helpers-react": "^0.5.0", "@supabase/ssr": "^0.5.2", "@supabase/supabase-js": "^2.48.1", - "@tanstack/react-query": "^5.66.7", + "@tanstack/react-query": "^5.66.9", "@vercel/speed-insights": "^1.2.0", "ahooks": "^3.8.4", "antd": "5.23.3", "antd-style": "^3.7.1", "axios": "^1.7.9", "canvas-confetti": "^1.9.3", - "chart.js": "^4.4.7", + "chart.js": "^4.4.8", "chartjs": "^0.3.24", "chartjs-adapter-dayjs-4": "^1.0.4", "chartjs-chart-geo": "^4.3.4", @@ -59,7 +59,7 @@ "echarts-stat": "^1.2.0", "email-validator": "^2.0.4", "font-color-contrast": "^11.1.0", - "framer-motion": "^12.4.4", + "framer-motion": "^12.4.7", "html2canvas": "^1.4.1", "js-cookie": "^3.0.5", "jspdf": "^2.5.2", @@ -96,11 +96,11 @@ "split-pane-react": "^0.1.3", "tailwind-merge": "^3.0.1", "utility-types": "^3.11.0", - "uuid": "^11.0.5", + "uuid": "^11.1.0", "virtua": "^0.40.0" }, "devDependencies": { - "@tailwindcss/postcss": "^4.0.7", + "@tailwindcss/postcss": "^4.0.8", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@testing-library/user-event": "^14.6.1", @@ -128,7 +128,7 @@ "monaco-editor-webpack-plugin": "^7.1.0", "postcss": "8.5.3", "sass": "^1.83.4", - "tailwindcss": "^4.0.7", + "tailwindcss": "^4.0.8", "ts-jest": "^29.2.5", "typescript": "^5" }, diff --git a/web/src/api/buster_rest/chats/queryRequests.ts b/web/src/api/buster_rest/chats/queryRequests.ts index 5c53f82f7..754206393 100644 --- a/web/src/api/buster_rest/chats/queryRequests.ts +++ b/web/src/api/buster_rest/chats/queryRequests.ts @@ -4,7 +4,7 @@ import { QueryClient } from '@tanstack/react-query'; import { getListChats, getListChats_server, getChat, getChat_server } from './requests'; import type { BusterChatListItem } from '@/api/asset_interfaces'; import { queryKeys } from '@/api/query_keys'; -import { updateChatToIChat } from '@/utils/chat'; +import { updateChatToIChat } from '@/lib/chat'; export const useGetListChats = (params?: Parameters[0]) => { const queryFn = useMemoizedFn((): Promise => { diff --git a/web/src/api/buster_rest/dataset_groups/queryRequests.ts b/web/src/api/buster_rest/dataset_groups/queryRequests.ts index aa586a6b9..71cdc2f28 100644 --- a/web/src/api/buster_rest/dataset_groups/queryRequests.ts +++ b/web/src/api/buster_rest/dataset_groups/queryRequests.ts @@ -23,7 +23,7 @@ import type { GetDatasetGroupPermissionGroupsResponse, GetDatasetGroupUsersResponse } from '../../asset_interfaces'; -import { timeout } from '@/utils'; +import { timeout } from '@/lib'; import { queryKeys } from '@/api/query_keys'; export const useListDatasetGroups = () => { diff --git a/web/src/api/buster_socket_query/useSocketQueryEmitOn.tsx b/web/src/api/buster_socket_query/useSocketQueryEmitOn.tsx index be41f0eee..c86a4d1f2 100644 --- a/web/src/api/buster_socket_query/useSocketQueryEmitOn.tsx +++ b/web/src/api/buster_socket_query/useSocketQueryEmitOn.tsx @@ -11,7 +11,7 @@ import type { InferBusterSocketResponseData } from './types'; import { useBusterWebSocket } from '@/context/BusterWebSocket'; import { useEffect, useMemo, useRef } from 'react'; import { useSocketQueryOn } from './useSocketQueryOn'; -import { timeout } from '@/utils'; +import { timeout } from '@/lib'; import { useMemoizedFn } from 'ahooks'; export const useSocketQueryEmitOn = < diff --git a/web/src/app/app/chats/_ChatsListContainer/ChatItemsContainer.tsx b/web/src/app/app/chats/_ChatsListContainer/ChatItemsContainer.tsx index 38be33b13..f768a6121 100644 --- a/web/src/app/app/chats/_ChatsListContainer/ChatItemsContainer.tsx +++ b/web/src/app/app/chats/_ChatsListContainer/ChatItemsContainer.tsx @@ -1,5 +1,5 @@ import { ShareAssetType, VerificationStatus, BusterChatListItem } from '@/api/asset_interfaces'; -import { makeHumanReadble, formatDate } from '@/utils'; +import { makeHumanReadble, formatDate } from '@/lib'; import React, { memo, useMemo, useRef, useState } from 'react'; import { StatusBadgeIndicator, getShareStatus } from '../../../../components/features/Lists'; import { BusterUserAvatar, Text } from '@/components/ui'; diff --git a/web/src/app/app/new-user/_NewUserController.tsx b/web/src/app/app/new-user/_NewUserController.tsx index 88996031f..f776cf8bd 100644 --- a/web/src/app/app/new-user/_NewUserController.tsx +++ b/web/src/app/app/new-user/_NewUserController.tsx @@ -5,7 +5,7 @@ import { Button, Input } from 'antd'; import { Title, Text } from '@/components/ui'; import { AnimatePresence, motion } from 'framer-motion'; import { useUserConfigContextSelector } from '@/context/Users'; -import { inputHasText } from '@/utils'; +import { inputHasText } from '@/lib'; import { useMemoizedFn } from 'ahooks'; import { useAppLayoutContextSelector } from '@/context/BusterAppLayout'; import { BusterAppRoutes } from '@/routes/busterRoutes/busterAppRoutes'; diff --git a/web/src/app/app/settings/(restricted-width)/api-keys/ApiKeyListItem.tsx b/web/src/app/app/settings/(restricted-width)/api-keys/ApiKeyListItem.tsx index 273200590..b31571b94 100644 --- a/web/src/app/app/settings/(restricted-width)/api-keys/ApiKeyListItem.tsx +++ b/web/src/app/app/settings/(restricted-width)/api-keys/ApiKeyListItem.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { Button } from 'antd'; import type { BusterApiKeyListItem } from '@/api/asset_interfaces'; import { AppMaterialIcons } from '@/components/ui'; -import { formatDate } from '@/utils/date'; +import { formatDate } from '@/lib/date'; import { Text } from '@/components/ui'; import { useMemoizedFn } from 'ahooks'; diff --git a/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_DatasourceForm.tsx b/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_DatasourceForm.tsx index db3a4f5cb..60cace430 100644 --- a/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_DatasourceForm.tsx +++ b/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_DatasourceForm.tsx @@ -4,7 +4,7 @@ import type { DataSource } from '@/api/asset_interfaces'; import { AppMaterialIcons, PulseLoader } from '@/components/ui'; import { AppDataSourceIcon } from '@/components/ui'; import { useAntToken } from '@/styles/useAntToken'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { Button, Divider, Dropdown, MenuProps } from 'antd'; import React from 'react'; import { DataSourceFormContent } from './_DatasourceFormContent'; diff --git a/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/PostgresForm.tsx b/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/PostgresForm.tsx index a01254347..5c6ebf6e4 100644 --- a/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/PostgresForm.tsx +++ b/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/PostgresForm.tsx @@ -4,7 +4,7 @@ import { Form, Input, InputNumber, Select } from 'antd'; import { useKeyPress } from 'ahooks'; import { AppSelectTagInput } from '@/components/ui/select/AppSelectTagInput'; import { FormWrapper, FormWrapperHandle } from './FormWrapper'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { DatasourceCreateCredentials, PostgresCreateCredentials diff --git a/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/SnowflakeForm.tsx b/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/SnowflakeForm.tsx index fc62f7139..754682a1d 100644 --- a/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/SnowflakeForm.tsx +++ b/web/src/app/app/settings/(restricted-width)/datasources/(admin-restricted-space)/[datasourceId]/_forms/SnowflakeForm.tsx @@ -8,7 +8,7 @@ import type { DataSource } from '@/api/asset_interfaces'; import { AppSelectTagInput } from '@/components/ui/select/AppSelectTagInput'; import { Form, Input } from 'antd'; import { RuleObject } from 'antd/es/form'; -import { makeHumanReadble } from '@/utils'; +import { makeHumanReadble } from '@/lib'; export const SnowflakeForm: React.FC<{ dataSource?: DataSource; diff --git a/web/src/app/app/settings/(restricted-width)/profile/page.tsx b/web/src/app/app/settings/(restricted-width)/profile/page.tsx index 4106096e0..49c110792 100644 --- a/web/src/app/app/settings/(restricted-width)/profile/page.tsx +++ b/web/src/app/app/settings/(restricted-width)/profile/page.tsx @@ -4,7 +4,7 @@ import React from 'react'; import { SettingsPageHeader } from '../../_components/SettingsPageHeader'; import { useUserConfigContextSelector } from '@/context/Users'; import { createStyles } from 'antd-style'; -import { formatDate } from '@/utils/date'; +import { formatDate } from '@/lib/date'; import { Text, Title } from '@/components/ui'; import { BusterUserAvatar } from '@/components/ui'; import { Card } from 'antd'; diff --git a/web/src/app/auth/_LoginComponents/LoginForm.tsx b/web/src/app/auth/_LoginComponents/LoginForm.tsx index a439e3327..bfb7ea211 100644 --- a/web/src/app/auth/_LoginComponents/LoginForm.tsx +++ b/web/src/app/auth/_LoginComponents/LoginForm.tsx @@ -3,7 +3,7 @@ import React, { useMemo, useState } from 'react'; import { Button, Divider, Input, Result } from 'antd'; import { User } from '@supabase/auth-js'; -import { inputHasText, isValidEmail } from '@/utils'; +import { inputHasText, isValidEmail } from '@/lib'; import { useKeyPress, useMemoizedFn } from 'ahooks'; import Link from 'next/link'; import { BusterRoutes, createBusterRoute } from '@/routes/busterRoutes'; diff --git a/web/src/app/auth/reset-password-email/_ResetEmailForm.tsx b/web/src/app/auth/reset-password-email/_ResetEmailForm.tsx index 5fc087ead..954d3fe59 100644 --- a/web/src/app/auth/reset-password-email/_ResetEmailForm.tsx +++ b/web/src/app/auth/reset-password-email/_ResetEmailForm.tsx @@ -1,7 +1,7 @@ 'use client'; import { createBusterRoute, BusterRoutes } from '@/routes'; -import { isValidEmail, timeout } from '@/utils'; +import { isValidEmail, timeout } from '@/lib'; import { Button, Input, Result } from 'antd'; import Link from 'next/link'; import React, { useState } from 'react'; diff --git a/web/src/components/features/Modals/AddTypeModal.tsx b/web/src/components/features/Modals/AddTypeModal.tsx index adf08b6ce..7b9cd810d 100644 --- a/web/src/components/features/Modals/AddTypeModal.tsx +++ b/web/src/components/features/Modals/AddTypeModal.tsx @@ -3,7 +3,7 @@ import { Modal, Button, Divider, Input, InputRef } from 'antd'; import { AppMaterialIcons, AppSegmented, asset_typeToIcon, Text } from '@/components/ui'; import { BusterList, BusterListColumn, BusterListRow } from '@/components/ui/list'; import { useMemoizedFn, useThrottleFn } from 'ahooks'; -import { boldHighlights, formatDate } from '@/utils'; +import { boldHighlights, formatDate } from '@/lib'; import { type BusterDashboardResponse, type BusterSearchResult, diff --git a/web/src/components/features/Modals/NewCollectionModal.tsx b/web/src/components/features/Modals/NewCollectionModal.tsx index cfbee7857..e059e9dee 100644 --- a/web/src/components/features/Modals/NewCollectionModal.tsx +++ b/web/src/components/features/Modals/NewCollectionModal.tsx @@ -6,7 +6,7 @@ import { AppModal } from '@/components/ui'; import { useBusterCollectionIndividualContextSelector } from '@/context/Collections'; import { useAppLayoutContextSelector } from '@/context/BusterAppLayout'; import { BusterRoutes } from '@/routes'; -import { inputHasText } from '@/utils'; +import { inputHasText } from '@/lib'; import { useMemoizedFn } from 'ahooks'; export const NewCollectionModal: React.FC<{ diff --git a/web/src/components/features/NewChatModal/NewChatModal.tsx b/web/src/components/features/NewChatModal/NewChatModal.tsx index cb87cb3de..d12808d6b 100644 --- a/web/src/components/features/NewChatModal/NewChatModal.tsx +++ b/web/src/components/features/NewChatModal/NewChatModal.tsx @@ -4,7 +4,7 @@ import { AppMaterialIcons } from '@/components/ui'; import { useMemoizedFn, useMount, useThrottleFn } from 'ahooks'; import { useAntToken } from '@/styles/useAntToken'; import { useBusterNewChatContextSelector } from '@/context/Chats'; -import { inputHasText, timeout } from '@/utils'; +import { inputHasText, timeout } from '@/lib'; import { useBusterSearchContextSelector } from '@/context/Search'; import type { BusterSearchResult } from '@/api/asset_interfaces'; import { useBusterNotifications } from '@/context/BusterNotifications'; diff --git a/web/src/components/features/NewChatModal/SuggestedPromptsContainer.tsx b/web/src/components/features/NewChatModal/SuggestedPromptsContainer.tsx index 10b5f179c..2edef6d70 100644 --- a/web/src/components/features/NewChatModal/SuggestedPromptsContainer.tsx +++ b/web/src/components/features/NewChatModal/SuggestedPromptsContainer.tsx @@ -1,6 +1,6 @@ import type { BusterSearchResult } from '@/api/asset_interfaces'; import { CircleSpinnerLoader } from '@/components/ui'; -import { boldHighlights } from '@/utils/element'; +import { boldHighlights } from '@/lib/element'; import { createStyles } from 'antd-style'; import React, { useEffect } from 'react'; import { motion } from 'framer-motion'; diff --git a/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx b/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx index 80e769b3a..7bf60e861 100644 --- a/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx +++ b/web/src/components/features/ShareMenu/ShareMenuContentBody.tsx @@ -18,7 +18,7 @@ import { useBusterDashboardContextSelector } from '@/context/Dashboards'; import { useBusterCollectionIndividualContextSelector } from '@/context/Collections'; import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; import { useStyles } from './useStyles'; -import { inputHasText } from '@/utils/text'; +import { inputHasText } from '@/lib/text'; export const ShareMenuContentBody: React.FC<{ selectedOptions: ShareMenuTopBarOptions; diff --git a/web/src/components/features/ShareMenu/ShareMenuContentPublish.tsx b/web/src/components/features/ShareMenu/ShareMenuContentPublish.tsx index 0924866b8..08d48e9e8 100644 --- a/web/src/components/features/ShareMenu/ShareMenuContentPublish.tsx +++ b/web/src/components/features/ShareMenu/ShareMenuContentPublish.tsx @@ -5,7 +5,7 @@ import { Button, Divider, DatePicker, Input, Space, Switch } from 'antd'; import { AppMaterialIcons, PulseLoader } from '@/components/ui'; import { useMemoizedFn } from 'ahooks'; import { createStyles } from 'antd-style'; -import { createDayjsDate } from '@/utils/date'; +import { createDayjsDate } from '@/lib/date'; import { useBusterDashboardContextSelector } from '@/context/Dashboards'; import { BusterRoutes, createBusterRoute } from '@/routes'; import { useBusterCollectionIndividualContextSelector } from '@/context/Collections'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useAxisAndTickOptions/useXAxisTickOptions.ts b/web/src/components/ui/charts/BusterChartE/hooks/useAxisAndTickOptions/useXAxisTickOptions.ts index 5fab110b6..16a88f5a3 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useAxisAndTickOptions/useXAxisTickOptions.ts +++ b/web/src/components/ui/charts/BusterChartE/hooks/useAxisAndTickOptions/useXAxisTickOptions.ts @@ -6,7 +6,7 @@ import { } from '@/components/ui/charts/interfaces'; import type { SingleAxisComponentOption } from 'echarts'; import React, { useMemo } from 'react'; -import { isNumericColumnType, isNumericColumnStyle } from '@/utils'; +import { isNumericColumnType, isNumericColumnStyle } from '@/lib'; import { formatXAxisLabel } from '@/components/ui/charts/commonHelpers'; export const useXAxisTickOptions = ({ diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useEChartsTheme/buster_light_theme.ts b/web/src/components/ui/charts/BusterChartE/hooks/useEChartsTheme/buster_light_theme.ts index 6fa661bb9..ec26e685f 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useEChartsTheme/buster_light_theme.ts +++ b/web/src/components/ui/charts/BusterChartE/hooks/useEChartsTheme/buster_light_theme.ts @@ -1,4 +1,4 @@ -import { determineFontColorContrast } from '@/utils'; +import { determineFontColorContrast } from '@/lib'; import { DEFAULT_CHART_THEME } from '../../../configColors'; import { busterAppStyleConfig } from '@/styles/busterAntDStyleConfig'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/BarChartSeriesBuilder.tsx b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/BarChartSeriesBuilder.tsx index 8d0c6f3e3..39c7cfaa8 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/BarChartSeriesBuilder.tsx +++ b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/BarChartSeriesBuilder.tsx @@ -8,7 +8,7 @@ import { } from '../../../interfaces'; import { getYAxisColumnNames, seriesNameGenerator } from './helpers'; import { DEFAULT_BAR_ROUNDNESS } from '@/api/asset_interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { labelContrastFormatter } from '../useEChartsTheme/buster_light_theme'; import { yAxisSimilar } from '@/components/ui/charts/commonHelpers'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/ComboChartBuilder.tsx b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/ComboChartBuilder.tsx index 0c05d8f15..a0ad278e8 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/ComboChartBuilder.tsx +++ b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/ComboChartBuilder.tsx @@ -10,7 +10,7 @@ import { BarAndLineAxis, ChartEncodes, ComboChartAxis } from '../../../interface import { ColumnSettings } from '../../../interfaces'; import { getYAxisColumnNames, seriesNameGenerator } from './helpers'; import { DEFAULT_COLUMN_SETTINGS } from '@/api/asset_interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { createGradient } from './LineChartSeriesBuilder'; const columnVisualizationToSeriesType: Record< diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/LineChartSeriesBuilder.ts b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/LineChartSeriesBuilder.ts index c678909b5..939b56684 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/LineChartSeriesBuilder.ts +++ b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/LineChartSeriesBuilder.ts @@ -11,7 +11,7 @@ import { ColumnLabelFormat } from '../../../interfaces'; import isEmpty from 'lodash/isEmpty'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { graphic } from 'echarts'; import set from 'lodash/set'; import { getYAxisColumnNames, seriesNameGenerator } from './helpers'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/PieChartSeriesBuilder.tsx b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/PieChartSeriesBuilder.tsx index c45509442..817ab597a 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/PieChartSeriesBuilder.tsx +++ b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/PieChartSeriesBuilder.tsx @@ -6,8 +6,8 @@ import { PieChartAxis } from '../../../interfaces'; import { busterAppStyleConfig } from '@/styles/busterAntDStyleConfig'; -import { DataFrameOperations } from '@/utils/math'; -import { formatLabel } from '@/utils'; +import { DataFrameOperations } from '@/lib/math'; +import { formatLabel } from '@/lib'; import { DatasetOption, extractFieldsFromChain } from '../../../chartHooks'; import busterLightTheme, { labelContrastFormatter } from '../useEChartsTheme/buster_light_theme'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useGoalLines.ts b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useGoalLines.ts index 71c83e19b..d657c4904 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useGoalLines.ts +++ b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useGoalLines.ts @@ -3,7 +3,7 @@ import { ColumnLabelFormat, IColumnLabelFormat } from '@/components/ui/charts/interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import type { SeriesOption, MarkLineComponentOption } from 'echarts'; import { useMemo } from 'react'; import { extractFieldsFromChain } from '../../../chartHooks'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useTrendlines.ts b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useTrendlines.ts index aa258f261..67bb298cb 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useTrendlines.ts +++ b/web/src/components/ui/charts/BusterChartE/hooks/useSeriesOptions/useTrendlines.ts @@ -11,7 +11,7 @@ import { IColumnLabelFormat, Trendline } from '@/components/ui/charts/interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { DATASET_IDS } from '../../../chartHooks'; import type { TrendlineDataset } from '../../../chartHooks'; import busterLightTheme from '../useEChartsTheme/buster_light_theme'; diff --git a/web/src/components/ui/charts/BusterChartE/hooks/useTooltipOptions/BusterEChartTooltip.tsx b/web/src/components/ui/charts/BusterChartE/hooks/useTooltipOptions/BusterEChartTooltip.tsx index b4112b7fe..e46230e11 100644 --- a/web/src/components/ui/charts/BusterChartE/hooks/useTooltipOptions/BusterEChartTooltip.tsx +++ b/web/src/components/ui/charts/BusterChartE/hooks/useTooltipOptions/BusterEChartTooltip.tsx @@ -3,7 +3,7 @@ import { formatChartLabelDelimiter, formatChartValueDelimiter } from '../../../c import React, { useMemo } from 'react'; import { TooltipFormatterParams } from './interfaces'; import { busterAppStyleConfig } from '@/styles'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { appendToKeyValueChain, extractFieldsFromChain } from '../../../chartHooks'; import last from 'lodash/last'; import type { ITooltipItem } from '../../../BusterChartTooltip/interfaces'; diff --git a/web/src/components/ui/charts/BusterChartJS/core/plugins/chartjs-plugin-pie-outlabels/OutLabelsStyle.ts b/web/src/components/ui/charts/BusterChartJS/core/plugins/chartjs-plugin-pie-outlabels/OutLabelsStyle.ts index 5c546cdec..eb4fbabfd 100644 --- a/web/src/components/ui/charts/BusterChartJS/core/plugins/chartjs-plugin-pie-outlabels/OutLabelsStyle.ts +++ b/web/src/components/ui/charts/BusterChartJS/core/plugins/chartjs-plugin-pie-outlabels/OutLabelsStyle.ts @@ -3,7 +3,7 @@ import { FontOptions, OutLabelsOptions } from './OutLabelsOptions'; import OutLabelsContext from './OutLabelsContext'; import { ChartArea, FontSpec } from 'chart.js'; import { defaults } from 'chart.js'; -import { determineFontColorContrast } from '@/utils'; +import { determineFontColorContrast } from '@/lib'; // Same as options but we make sure we have defaults // diff --git a/web/src/components/ui/charts/BusterChartJS/helpers/datalabelHelper.ts b/web/src/components/ui/charts/BusterChartJS/helpers/datalabelHelper.ts index cda242839..d9d7893d7 100644 --- a/web/src/components/ui/charts/BusterChartJS/helpers/datalabelHelper.ts +++ b/web/src/components/ui/charts/BusterChartJS/helpers/datalabelHelper.ts @@ -1,4 +1,4 @@ -import { determineFontColorContrast, formatLabel } from '@/utils'; +import { determineFontColorContrast, formatLabel } from '@/lib'; import type { Context } from 'chartjs-plugin-datalabels'; import { formatChartLabelDelimiter } from '../../commonHelpers'; import { extractFieldsFromChain, appendToKeyValueChain } from '../../chartHooks'; diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/pieChartOptions.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/pieChartOptions.ts index 836c4977f..382d90863 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/pieChartOptions.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/pieChartOptions.ts @@ -4,8 +4,8 @@ import type { ChartType as ChartJSChartType } from 'chart.js'; import type { DeepPartial } from 'utility-types'; import type { PluginChartOptions } from 'chart.js'; import { AnnotationPluginOptions } from 'chartjs-plugin-annotation'; -import { ArrayOperations } from '@/utils/math'; -import { formatLabel } from '@/utils/columnFormatter'; +import { ArrayOperations } from '@/lib/math'; +import { formatLabel } from '@/lib/columnFormatter'; import { busterAppStyleConfig } from '@/styles/busterAntDStyleConfig'; import { getPieInnerLabelTitle } from '../../../commonHelpers'; import { ChartJSOrUndefined } from '../../core/types'; @@ -14,7 +14,7 @@ import { BusterChartProps, ColumnLabelFormat } from '@/components/ui/charts/interfaces'; -import { determineFontColorContrast } from '@/utils/colors'; +import { determineFontColorContrast } from '@/lib/colors'; import { Context } from 'chartjs-plugin-datalabels'; const token = busterAppStyleConfig.token!; diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useGoalLines/useGoalLines.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useGoalLines/useGoalLines.ts index 5b5c826f9..69f729a0f 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useGoalLines/useGoalLines.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useGoalLines/useGoalLines.ts @@ -8,7 +8,7 @@ import { AnnotationOptions, AnnotationPluginOptions } from 'chartjs-plugin-annot import { useMemo } from 'react'; import { ChartOptions, PluginChartOptions } from 'chart.js'; import { busterAppStyleConfig } from '@/styles/busterAntDStyleConfig'; -import { formatLabel } from '@/utils/columnFormatter'; +import { formatLabel } from '@/lib/columnFormatter'; import { yAxisSimilar } from '@/components/ui/charts/commonHelpers'; import { extractFieldsFromChain } from '@/components/ui/charts/chartHooks'; import { defaultLabelOptionConfig } from '../useChartSpecificOptions/labelOptionConfig'; diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/BusterChartJSTooltip.tsx b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/BusterChartJSTooltip.tsx index d77215234..0b30bc22d 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/BusterChartJSTooltip.tsx +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/BusterChartJSTooltip.tsx @@ -5,7 +5,7 @@ import type { Chart, TooltipItem, ChartType as ChartJSChartType } from 'chart.js import type { ITooltipItem } from '@/components/ui/charts/BusterChartTooltip/interfaces'; import { barAndLineTooltipHelper } from './barAndLineTooltipHelper'; import { pieTooltipHelper } from './pieTooltipHelper'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { scatterTooltipHelper } from './scatterTooltipHelper'; export const BusterChartJSTooltip: React.FC<{ diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/helper.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/helper.ts index e2b0a7392..9b892033d 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/helper.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/helper.ts @@ -1,6 +1,6 @@ import { extractFieldsFromChain } from '@/components/ui/charts/chartHooks'; import type { BusterChartProps } from '@/components/ui/charts/interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import type { Chart } from 'chart.js'; export const getPercentage = ( diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/scatterTooltipHelper.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/scatterTooltipHelper.ts index fd60fec82..a1653b062 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/scatterTooltipHelper.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/scatterTooltipHelper.ts @@ -3,7 +3,7 @@ import { BusterChartConfigProps } from '@/components/ui/charts/interfaces'; import type { ChartDataset, TooltipItem, ChartTypeRegistry } from 'chart.js'; import { appendToKeyValueChain, extractFieldsFromChain } from '@/components/ui/charts/chartHooks'; import { formatChartLabel } from '../../../helpers'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; export const scatterTooltipHelper = ( datasets: ChartDataset[], diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/useTooltipOptions.tsx b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/useTooltipOptions.tsx index b5f8058f2..55cf0cccf 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/useTooltipOptions.tsx +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useTooltipOptions.ts/useTooltipOptions.tsx @@ -14,7 +14,7 @@ import { BusterChartJSTooltip } from './BusterChartJSTooltip'; import { busterAppStyleConfig } from '@/styles'; import { DatasetOption, extractFieldsFromChain } from '@/components/ui/charts/chartHooks'; import React from 'react'; -import { isNumericColumnType } from '@/utils'; +import { isNumericColumnType } from '@/lib'; const token = busterAppStyleConfig.token!; diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useXAxis.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useXAxis.ts index 8362b1280..09c367ec6 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useXAxis.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useOptions/useXAxis.ts @@ -13,7 +13,7 @@ import { DeepPartial } from 'utility-types'; import type { ScaleChartOptions, Scale, GridLineOptions } from 'chart.js'; import { useXAxisTitle } from '@/components/ui/charts/commonHelpers/useXAxisTitle'; import { useIsStacked } from './useIsStacked'; -import { formatLabel, isNumericColumnType } from '@/utils'; +import { formatLabel, isNumericColumnType } from '@/lib'; import isDate from 'lodash/isDate'; export const useXAxis = ({ diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/comboSeriesBuilder.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/comboSeriesBuilder.ts index d2dde1256..f59894d14 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/comboSeriesBuilder.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/comboSeriesBuilder.ts @@ -4,7 +4,7 @@ import { SeriesBuilderProps } from './interfaces'; import { extractFieldsFromChain } from '@/components/ui/charts/chartHooks'; import { DEFAULT_COLUMN_SETTINGS, ENABLED_DOTS_ON_LINE_SIZE } from '@/api/asset_interfaces'; import { barBuilder } from './barSeriesBuilder'; -import { createDayjsDate } from '@/utils/date'; +import { createDayjsDate } from '@/lib/date'; import { formatChartLabelDelimiter } from '@/components/ui/charts/commonHelpers'; import { lineBuilder } from './lineSeriesBuilder'; import { ColumnSettings } from '@/components/ui/charts/interfaces'; diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/lineSeriesBuilder.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/lineSeriesBuilder.ts index 763cd56c1..db2f8701e 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/lineSeriesBuilder.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/lineSeriesBuilder.ts @@ -4,7 +4,7 @@ import type { ChartProps } from '../../core'; import { SeriesBuilderProps } from './interfaces'; import { LabelBuilderProps } from './useSeriesOptions'; import { formatChartLabelDelimiter } from '../../../commonHelpers'; -import { addOpacityToColor, createDayjsDate } from '@/utils'; +import { addOpacityToColor, createDayjsDate } from '@/lib'; import { defaultLabelOptionConfig } from '../useChartSpecificOptions/labelOptionConfig'; import { DEFAULT_COLUMN_SETTINGS } from '@/api/asset_interfaces'; import type { ColumnSettings } from '@/components/ui/charts/interfaces'; diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/scatterSeriesBuilder.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/scatterSeriesBuilder.ts index 6a20a0b62..30e08b520 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/scatterSeriesBuilder.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/scatterSeriesBuilder.ts @@ -3,9 +3,9 @@ import { LabelBuilderProps } from './useSeriesOptions'; import { SeriesBuilderProps } from './interfaces'; import { ScriptableContext } from 'chart.js'; import { DEFAULT_CHART_CONFIG } from '@/api/asset_interfaces'; -import { addOpacityToColor } from '@/utils/colors'; -import { isDateColumnType } from '@/utils/messages'; -import { createDayjsDate } from '@/utils/date'; +import { addOpacityToColor } from '@/lib/colors'; +import { isDateColumnType } from '@/lib/messages'; +import { createDayjsDate } from '@/lib/date'; export const scatterSeriesBuilder_data = ({ selectedDataset, diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useTrendlines/useTrendlines.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useTrendlines/useTrendlines.ts index 175ee80de..cf3dc6f03 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useTrendlines/useTrendlines.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useTrendlines/useTrendlines.ts @@ -7,7 +7,7 @@ import type { import { AnnotationOptions, AnnotationPluginOptions } from 'chartjs-plugin-annotation'; import { useMemo } from 'react'; import { defaultLabelOptionConfig } from '../useChartSpecificOptions/labelOptionConfig'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { ChartProps } from '../../core'; import { TypeToLabel } from './config'; diff --git a/web/src/components/ui/charts/BusterChartLegend/legendHeadlineHelpers.ts b/web/src/components/ui/charts/BusterChartLegend/legendHeadlineHelpers.ts index e504ed2b1..45b99da0c 100644 --- a/web/src/components/ui/charts/BusterChartLegend/legendHeadlineHelpers.ts +++ b/web/src/components/ui/charts/BusterChartLegend/legendHeadlineHelpers.ts @@ -1,9 +1,9 @@ import { BusterChartLegendItem } from '@/components/ui/charts/BusterChartLegend'; import { BusterChartProps, ShowLegendHeadline } from '@/components/ui/charts/interfaces'; -import { DataFrameOperations } from '@/utils/math'; -import { formatLabel } from '@/utils/columnFormatter'; +import { DataFrameOperations } from '@/lib/math'; +import { formatLabel } from '@/lib/columnFormatter'; import { DatasetOption, extractFieldsFromChain } from '../chartHooks'; -import { createDayjsDate, getBestDateFormat } from '@/utils/date'; +import { createDayjsDate, getBestDateFormat } from '@/lib/date'; import type { IBusterMetricChartConfig } from '@/api/asset_interfaces'; export const addLegendHeadlines = ( diff --git a/web/src/components/ui/charts/MetricChart/BusterMetricChart.tsx b/web/src/components/ui/charts/MetricChart/BusterMetricChart.tsx index fd523026f..100de7608 100644 --- a/web/src/components/ui/charts/MetricChart/BusterMetricChart.tsx +++ b/web/src/components/ui/charts/MetricChart/BusterMetricChart.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from 'react'; import { useMount } from 'ahooks'; -import { formatLabel, JsonDataFrameOperationsSingle, timeout } from '@/utils'; +import { formatLabel, JsonDataFrameOperationsSingle, timeout } from '@/lib'; import { motion, AnimatePresence } from 'framer-motion'; import { Title } from '@/components/ui'; import { ColumnLabelFormat, MetricChartProps } from '../interfaces'; diff --git a/web/src/components/ui/charts/TableChart/BusterTableChart.tsx b/web/src/components/ui/charts/TableChart/BusterTableChart.tsx index 3f7523bb0..709918d76 100644 --- a/web/src/components/ui/charts/TableChart/BusterTableChart.tsx +++ b/web/src/components/ui/charts/TableChart/BusterTableChart.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from 'react'; import { BusterTableChartConfig } from './interfaces'; import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; -import { formatLabel } from '@/utils/columnFormatter'; +import { formatLabel } from '@/lib/columnFormatter'; import isEqual from 'lodash/isEqual'; import type { BusterChartPropsBase } from '../interfaces'; import { type IBusterMetricChartConfig, DEFAULT_CHART_CONFIG } from '@/api/asset_interfaces'; diff --git a/web/src/components/ui/charts/chartHooks/useDatasetOptions/datasetHelpers_BarLinePie.ts b/web/src/components/ui/charts/chartHooks/useDatasetOptions/datasetHelpers_BarLinePie.ts index 89fe2ab0e..aeaf43dd3 100644 --- a/web/src/components/ui/charts/chartHooks/useDatasetOptions/datasetHelpers_BarLinePie.ts +++ b/web/src/components/ui/charts/chartHooks/useDatasetOptions/datasetHelpers_BarLinePie.ts @@ -1,7 +1,7 @@ 'use client'; import { BusterChartProps, ChartType, BarSortBy, ColumnLabelFormat } from '../../interfaces'; -import { createDayjsDate } from '@/utils/date'; +import { createDayjsDate } from '@/lib/date'; import { extractFieldsFromChain, appendToKeyValueChain } from './groupingHelpers'; import { DATASET_IDS, GROUPING_SEPARATOR } from './config'; import { DatasetOption } from './interfaces'; diff --git a/web/src/components/ui/charts/chartHooks/useDatasetOptions/useDataTrendlineOptions.ts b/web/src/components/ui/charts/chartHooks/useDatasetOptions/useDataTrendlineOptions.ts index bf0909458..ec13f7222 100644 --- a/web/src/components/ui/charts/chartHooks/useDatasetOptions/useDataTrendlineOptions.ts +++ b/web/src/components/ui/charts/chartHooks/useDatasetOptions/useDataTrendlineOptions.ts @@ -17,7 +17,7 @@ import { createDayjsDate, DataFrameOperations, calculateLinearSlopeByDate -} from '@/utils'; +} from '@/lib'; import { extractFieldsFromChain } from './groupingHelpers'; import last from 'lodash/last'; import { DatasetOption } from './interfaces'; diff --git a/web/src/components/ui/charts/chartHooks/useDatasetOptions/useDatasetOptions.spec.tsx b/web/src/components/ui/charts/chartHooks/useDatasetOptions/useDatasetOptions.test.tsx similarity index 100% rename from web/src/components/ui/charts/chartHooks/useDatasetOptions/useDatasetOptions.spec.tsx rename to web/src/components/ui/charts/chartHooks/useDatasetOptions/useDatasetOptions.test.tsx diff --git a/web/src/components/ui/charts/commonHelpers/axisHelper.ts b/web/src/components/ui/charts/commonHelpers/axisHelper.ts index 73dad04c9..6cbcb97a2 100644 --- a/web/src/components/ui/charts/commonHelpers/axisHelper.ts +++ b/web/src/components/ui/charts/commonHelpers/axisHelper.ts @@ -1,4 +1,4 @@ -import { formatLabel } from '@/utils/columnFormatter'; +import { formatLabel } from '@/lib/columnFormatter'; import pick from 'lodash/pick'; import isEqual from 'lodash/isEqual'; import isNumber from 'lodash/isNumber'; diff --git a/web/src/components/ui/charts/commonHelpers/labelHelpers.ts b/web/src/components/ui/charts/commonHelpers/labelHelpers.ts index 2f3076996..c24978a92 100644 --- a/web/src/components/ui/charts/commonHelpers/labelHelpers.ts +++ b/web/src/components/ui/charts/commonHelpers/labelHelpers.ts @@ -1,4 +1,4 @@ -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import isEmpty from 'lodash/isEmpty'; import type { ColumnLabelFormat } from '../interfaces'; import { extractFieldsFromChain } from '../chartHooks'; diff --git a/web/src/components/ui/charts/commonHelpers/useXAxisTitle.ts b/web/src/components/ui/charts/commonHelpers/useXAxisTitle.ts index 2a1ea9a4d..de750f900 100644 --- a/web/src/components/ui/charts/commonHelpers/useXAxisTitle.ts +++ b/web/src/components/ui/charts/commonHelpers/useXAxisTitle.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; import { BusterChartConfigProps, ChartEncodes } from '../interfaces'; -import { formatLabel } from '@/utils/columnFormatter'; +import { formatLabel } from '@/lib/columnFormatter'; import { AXIS_TITLE_SEPARATOR } from './axisHelper'; import { truncateWithEllipsis } from './titleHelpers'; diff --git a/web/src/components/ui/charts/commonHelpers/useY2AxisTitle.ts b/web/src/components/ui/charts/commonHelpers/useY2AxisTitle.ts index ce9064575..fa5f106a8 100644 --- a/web/src/components/ui/charts/commonHelpers/useY2AxisTitle.ts +++ b/web/src/components/ui/charts/commonHelpers/useY2AxisTitle.ts @@ -1,4 +1,4 @@ -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { useMemo } from 'react'; import { AXIS_TITLE_SEPARATOR } from '@/components/ui/charts/commonHelpers/axisHelper'; import { BusterChartConfigProps } from '../interfaces'; diff --git a/web/src/components/ui/charts/commonHelpers/useYAxisTitle.ts b/web/src/components/ui/charts/commonHelpers/useYAxisTitle.ts index 935c5dc92..ee3ee2487 100644 --- a/web/src/components/ui/charts/commonHelpers/useYAxisTitle.ts +++ b/web/src/components/ui/charts/commonHelpers/useYAxisTitle.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react'; import { BusterChartConfigProps, ChartEncodes } from '../interfaces'; -import { formatLabel } from '@/utils/columnFormatter'; +import { formatLabel } from '@/lib/columnFormatter'; import { AXIS_TITLE_SEPARATOR } from '@/components/ui/charts/commonHelpers/axisHelper'; import { truncateWithEllipsis } from './titleHelpers'; diff --git a/web/src/components/ui/image/BusterUserAvatar.tsx b/web/src/components/ui/image/BusterUserAvatar.tsx index 8326f66aa..dd07d46c9 100644 --- a/web/src/components/ui/image/BusterUserAvatar.tsx +++ b/web/src/components/ui/image/BusterUserAvatar.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from 'react'; import { Avatar, AvatarProps } from 'antd'; -import { getFirstTwoCapitalizedLetters } from '@/utils/text'; +import { getFirstTwoCapitalizedLetters } from '@/lib/text'; import { AppTooltip } from '../tooltip'; import type { GroupProps } from 'antd/es/avatar'; import { useBusterStylesContext } from '@/context/BusterStyles/BusterStyles'; diff --git a/web/src/components/ui/list/useCreateListByDate.ts b/web/src/components/ui/list/useCreateListByDate.ts index d6388cc35..7cb766ee7 100644 --- a/web/src/components/ui/list/useCreateListByDate.ts +++ b/web/src/components/ui/list/useCreateListByDate.ts @@ -1,4 +1,4 @@ -import { getNow, isDateAfter, isDateBefore, isDateSame } from '@/utils/date'; +import { getNow, isDateAfter, isDateBefore, isDateSame } from '@/lib/date'; import { useMemo } from 'react'; type ListItem = { diff --git a/web/src/components/ui/select/AppSelectColorPalette.tsx b/web/src/components/ui/select/AppSelectColorPalette.tsx index ea7e77b8d..f6c76aae5 100644 --- a/web/src/components/ui/select/AppSelectColorPalette.tsx +++ b/web/src/components/ui/select/AppSelectColorPalette.tsx @@ -2,7 +2,7 @@ import React, { useMemo, useRef, useState } from 'react'; import { Button, Divider, Popover, Select } from 'antd'; import { CircleSpinnerLoaderContainer } from '../loaders/CircleSpinnerLoaderContainer'; -import { timeout } from '@/utils'; +import { timeout } from '@/lib'; import { useMemoizedFn, useMount } from 'ahooks'; import { createStyles } from 'antd-style'; import isEqual from 'lodash/isEqual'; @@ -12,7 +12,7 @@ const NewColorThemeModal = dynamic(() => import('./NewColorThemeModal'), { ssr: false, loading: () => (
diff --git a/web/src/components/ui/select/AppSelectTagInput.tsx b/web/src/components/ui/select/AppSelectTagInput.tsx index 08a6ae1d2..3423b8fd7 100644 --- a/web/src/components/ui/select/AppSelectTagInput.tsx +++ b/web/src/components/ui/select/AppSelectTagInput.tsx @@ -3,7 +3,7 @@ import { ConfigProvider, Select, Tag } from 'antd'; import type { SelectProps } from 'antd'; import type { CustomTagProps } from 'rc-select/lib/BaseSelect'; import { createStyles } from 'antd-style'; -import { getPredictableItemBasedOnText } from '@/utils'; +import { getPredictableItemBasedOnText } from '@/lib'; import { AppMaterialIcons } from '../icons'; import { useMemoizedFn } from 'ahooks'; diff --git a/web/src/components/ui/table/AppDataGrid/helpers.ts b/web/src/components/ui/table/AppDataGrid/helpers.ts index 27093ba04..4c1e03e15 100644 --- a/web/src/components/ui/table/AppDataGrid/helpers.ts +++ b/web/src/components/ui/table/AppDataGrid/helpers.ts @@ -1,6 +1,6 @@ import set from 'lodash/set'; import clamp from 'lodash/clamp'; -import { makeHumanReadble } from '@/utils/text'; +import { makeHumanReadble } from '@/lib/text'; export const MAX_WIDTH = 950; export const MIN_WIDTH = 100; diff --git a/web/src/context/Chats/ChatProvider/useChatIndividual.ts b/web/src/context/Chats/ChatProvider/useChatIndividual.ts index 019aa0af4..158428e15 100644 --- a/web/src/context/Chats/ChatProvider/useChatIndividual.ts +++ b/web/src/context/Chats/ChatProvider/useChatIndividual.ts @@ -1,4 +1,4 @@ -import { updateChatToIChat } from '@/utils/chat'; +import { updateChatToIChat } from '@/lib/chat'; import { useSocketQueryEmitOn } from '@/api/buster_socket_query'; import { queryKeys } from '@/api/query_keys'; import { useQueryClient } from '@tanstack/react-query'; diff --git a/web/src/context/Chats/NewChatProvider/useAutoAppendThought.ts b/web/src/context/Chats/NewChatProvider/useAutoAppendThought.ts index 744102d12..a726a81a1 100644 --- a/web/src/context/Chats/NewChatProvider/useAutoAppendThought.ts +++ b/web/src/context/Chats/NewChatProvider/useAutoAppendThought.ts @@ -6,7 +6,7 @@ import { useMemoizedFn } from 'ahooks'; import sample from 'lodash/sample'; import last from 'lodash/last'; import { useBusterChatContextSelector } from '../ChatProvider'; -import { timeout } from '@/utils'; +import { timeout } from '@/lib'; import random from 'lodash/random'; export const useAutoAppendThought = () => { diff --git a/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts b/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts index 35ea98111..d51ab1fb6 100644 --- a/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts +++ b/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts @@ -6,7 +6,7 @@ import { ChatEvent_GeneratingResponseMessage, ChatEvent_GeneratingTitle } from '@/api/buster_socket/chats'; -import { updateChatToIChat } from '@/utils/chat'; +import { updateChatToIChat } from '@/lib/chat'; import { useAutoAppendThought } from './useAutoAppendThought'; import { useAppLayoutContextSelector } from '@/context/BusterAppLayout'; import { BusterRoutes } from '@/routes'; diff --git a/web/src/context/Collections/CollectionIndividualProvider/useCollectionCreate.ts b/web/src/context/Collections/CollectionIndividualProvider/useCollectionCreate.ts index 10e0526a9..17109f4d3 100644 --- a/web/src/context/Collections/CollectionIndividualProvider/useCollectionCreate.ts +++ b/web/src/context/Collections/CollectionIndividualProvider/useCollectionCreate.ts @@ -1,6 +1,6 @@ import { useBusterNotifications } from '@/context/BusterNotifications'; import { useSocketQueryMutation } from '@/api/buster_socket_query'; -import { timeout } from '@/utils'; +import { timeout } from '@/lib'; import { useMemoizedFn } from 'ahooks'; import { queryKeys } from '@/api/query_keys'; diff --git a/web/src/context/Metrics/helpers/messageAutoChartHandler/createDefaultColumnFormats.ts b/web/src/context/Metrics/helpers/messageAutoChartHandler/createDefaultColumnFormats.ts index fe4af1c3a..cda9d4a25 100644 --- a/web/src/context/Metrics/helpers/messageAutoChartHandler/createDefaultColumnFormats.ts +++ b/web/src/context/Metrics/helpers/messageAutoChartHandler/createDefaultColumnFormats.ts @@ -5,7 +5,7 @@ import { type SimplifiedColumnType } from '@/api/asset_interfaces'; import type { ColumnLabelFormat, IColumnLabelFormat } from '@/components/ui/charts'; -import { isDateColumnType, isNumericColumnType, simplifyColumnType } from '@/utils/messages'; +import { isDateColumnType, isNumericColumnType, simplifyColumnType } from '@/lib/messages'; export const createDefaultColumnLabelFormats = ( columnLabelFormats: Record | undefined, diff --git a/web/src/context/Metrics/helpers/messageAutoChartHandler/messageAutoChartHandler.spec.ts b/web/src/context/Metrics/helpers/messageAutoChartHandler/messageAutoChartHandler.test.ts similarity index 100% rename from web/src/context/Metrics/helpers/messageAutoChartHandler/messageAutoChartHandler.spec.ts rename to web/src/context/Metrics/helpers/messageAutoChartHandler/messageAutoChartHandler.test.ts diff --git a/web/src/context/Metrics/helpers/metricHelpers.ts b/web/src/context/Metrics/helpers/metricHelpers.ts index 690bcc9f8..b3e959efb 100644 --- a/web/src/context/Metrics/helpers/metricHelpers.ts +++ b/web/src/context/Metrics/helpers/metricHelpers.ts @@ -1,6 +1,6 @@ import isEmpty from 'lodash/isEmpty'; import { IBusterMetric } from '../interfaces'; -import { isNumericColumnType } from '@/utils'; +import { isNumericColumnType } from '@/lib'; import { BusterChartConfigProps } from '@/components/ui/charts'; import { defaultIBusterMetric } from '../config'; import { BusterMetricData } from '@/context/MetricData'; diff --git a/web/src/context/Metrics/helpers/saveToServerHelpers.ts b/web/src/context/Metrics/helpers/saveToServerHelpers.ts index 198d98d0d..e17dce2a7 100644 --- a/web/src/context/Metrics/helpers/saveToServerHelpers.ts +++ b/web/src/context/Metrics/helpers/saveToServerHelpers.ts @@ -5,7 +5,7 @@ import { DEFAULT_COLUMN_SETTINGS, IBusterMetricChartConfig } from '@/api/asset_interfaces'; -import { getChangedValues } from '@/utils/objects'; +import { getChangedValues } from '@/lib/objects'; import { IBusterMetric } from '../interfaces'; import isEqual from 'lodash/isEqual'; import { diff --git a/web/src/context/Supabase/SupabaseContextProvider.tsx b/web/src/context/Supabase/SupabaseContextProvider.tsx index 1add85ed9..4289e6927 100644 --- a/web/src/context/Supabase/SupabaseContextProvider.tsx +++ b/web/src/context/Supabase/SupabaseContextProvider.tsx @@ -4,7 +4,7 @@ import React, { PropsWithChildren, useLayoutEffect, useRef, useState } from 'rea import { UseSupabaseContextType } from './useSupabaseContext'; import { useMemoizedFn } from 'ahooks'; import { User } from '@supabase/supabase-js'; -import { millisecondsFromUnixTimestamp } from '@/utils'; +import { millisecondsFromUnixTimestamp } from '@/lib'; import { createContext, useContextSelector, diff --git a/web/src/context/Users/useInviteUser.ts b/web/src/context/Users/useInviteUser.ts index bf8d4e53f..ba216f5fb 100644 --- a/web/src/context/Users/useInviteUser.ts +++ b/web/src/context/Users/useInviteUser.ts @@ -1,5 +1,5 @@ import { useMemoizedFn } from 'ahooks'; -import { timeout } from '@/utils'; +import { timeout } from '@/lib'; import { useBusterNotifications } from '../BusterNotifications'; import { inviteUser as inviteUserRest } from '@/api/buster_rest'; diff --git a/web/src/controllers/CollectionIndividualController/CollectionIndividualContent.tsx b/web/src/controllers/CollectionIndividualController/CollectionIndividualContent.tsx index a0533ec01..9a1b3b059 100644 --- a/web/src/controllers/CollectionIndividualController/CollectionIndividualContent.tsx +++ b/web/src/controllers/CollectionIndividualController/CollectionIndividualContent.tsx @@ -7,7 +7,7 @@ import { import React, { useMemo, useState } from 'react'; import { AppMaterialIcons, BusterUserAvatar } from '@/components/ui'; import { createBusterRoute, BusterRoutes } from '@/routes'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { BusterCollection, BusterCollectionItemAsset, diff --git a/web/src/controllers/CollectionIndividualController/CollectionIndividualHeader.tsx b/web/src/controllers/CollectionIndividualController/CollectionIndividualHeader.tsx index 06c98257d..dfa4b8ef0 100644 --- a/web/src/controllers/CollectionIndividualController/CollectionIndividualHeader.tsx +++ b/web/src/controllers/CollectionIndividualController/CollectionIndividualHeader.tsx @@ -18,7 +18,7 @@ import { Text } from '@/components/ui'; import { useAntToken } from '@/styles/useAntToken'; import { useMemoizedFn } from 'ahooks'; import { BreadcrumbSeperator } from '@/components/ui/breadcrumb'; -import { measureTextWidth } from '@/utils/canvas'; +import { measureTextWidth } from '@/lib/canvas'; export const CollectionsIndividualHeader: React.FC<{ openAddTypeModal: boolean; diff --git a/web/src/controllers/CollectionListController/CollectionsListContent.tsx b/web/src/controllers/CollectionListController/CollectionsListContent.tsx index a29d9232b..709f566b6 100644 --- a/web/src/controllers/CollectionListController/CollectionsListContent.tsx +++ b/web/src/controllers/CollectionListController/CollectionsListContent.tsx @@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react'; import { AppContent, BusterUserAvatar } from '@/components/ui'; -import { formatDate, makeHumanReadble } from '@/utils'; +import { formatDate, makeHumanReadble } from '@/lib'; import { BusterRoutes, createBusterRoute } from '@/routes'; import { useBusterCollectionListContextSelector } from '@/context/Collections'; import { diff --git a/web/src/controllers/DashboardListController/DashboardListContent.tsx b/web/src/controllers/DashboardListController/DashboardListContent.tsx index 23c724f71..8481890ac 100644 --- a/web/src/controllers/DashboardListController/DashboardListContent.tsx +++ b/web/src/controllers/DashboardListController/DashboardListContent.tsx @@ -4,7 +4,7 @@ import React, { useMemo, useState } from 'react'; import { AppContent } from '@/components/ui/layout/AppContent'; import { useBusterDashboardContextSelector } from '@/context/Dashboards'; import { BusterUserAvatar } from '@/components/ui'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { BusterList, BusterListColumn, BusterListRow } from '@/components/ui/list'; import { BusterRoutes, createBusterRoute } from '@/routes'; import { getShareStatus } from '@/components/features/Lists'; diff --git a/web/src/controllers/DatasetsListController/DatasetListContent.tsx b/web/src/controllers/DatasetsListController/DatasetListContent.tsx index a68e532c9..eea3999d6 100644 --- a/web/src/controllers/DatasetsListController/DatasetListContent.tsx +++ b/web/src/controllers/DatasetsListController/DatasetListContent.tsx @@ -3,7 +3,7 @@ import React, { useState, useMemo } from 'react'; import { AppContent } from '@/components/ui/layout/AppContent'; import { BusterUserAvatar } from '@/components/ui'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { BusterList, BusterListColumn, BusterListRow } from '@/components/ui/list'; import { BusterRoutes, createBusterRoute } from '@/routes'; import type { BusterDatasetListItem } from '@/api/asset_interfaces'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendline.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendline.tsx index 60f783b94..e7578e9a3 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendline.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendline.tsx @@ -8,7 +8,7 @@ import { Button, Divider } from 'antd'; import { AppMaterialIcons } from '@/components/ui'; import { AnimatePresence, motion } from 'framer-motion'; import { CollapseDelete } from '../../Common/CollapseDelete'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { ColumnMetaData } from '@/api/asset_interfaces'; import { TrendlineColumnId } from './EditTrendlineColumnId'; import { TrendlineColorPicker } from './EditTrendlineColorPicker'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineColumnId.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineColumnId.tsx index 0125de378..2e764a946 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineColumnId.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineColumnId.tsx @@ -1,5 +1,5 @@ import type { ColumnMetaData, IBusterMetricChartConfig } from '@/api/asset_interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { Select } from 'antd'; import React, { useMemo } from 'react'; import { LabelAndInput } from '../../Common'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineOption.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineOption.tsx index b8141bcd1..5e3c4b1f1 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineOption.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppStyling/EditTrendline/EditTrendlineOption.tsx @@ -5,7 +5,7 @@ import { LoopTrendline } from './EditTrendline'; import React, { useMemo } from 'react'; import type { ChartType, Trendline } from '@/components/ui/charts'; import { IBusterMetricChartConfig } from '@/api/asset_interfaces'; -import { isDateColumnType, isNumericColumnType } from '@/utils'; +import { isDateColumnType, isNumericColumnType } from '@/lib'; import { AppMaterialIcons, AppTooltip } from '@/components/ui'; export const EditTrendlineOption = React.memo( diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/ChartIcons/ChartIcon_AreaRelative.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/ChartIcons/ChartIcon_AreaRelative.tsx index 1c049ae2b..879c10ba2 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/ChartIcons/ChartIcon_AreaRelative.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/ChartIcons/ChartIcon_AreaRelative.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from 'react'; import { DEFAULT_CHART_COLORS, DISABLED_CHART_COLORS } from '../config'; -import { addOpacityToColor } from '@/utils/colors'; +import { addOpacityToColor } from '@/lib/colors'; export const ChartIcon_AreaRelative: React.FC<{ colors?: string[]; disabled?: boolean }> = ({ colors: colorsProp = DEFAULT_CHART_COLORS, diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditDateFormat.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditDateFormat.tsx index ba38cd3c6..351c9e9bd 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditDateFormat.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditDateFormat.tsx @@ -9,7 +9,7 @@ import { getDefaultQuarterOptions } from './dateConfig'; import first from 'lodash/last'; -import { formatDate, getNow } from '@/utils/date'; +import { formatDate, getNow } from '@/lib/date'; import { useMemoizedFn } from 'ahooks'; export const EditDateFormat: React.FC<{ diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditLabelStyle.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditLabelStyle.tsx index dffd70381..606b993a4 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditLabelStyle.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/EditLabelStyle.tsx @@ -5,7 +5,7 @@ import { AppSegmented } from '@/components/ui'; import { ColumnTypeIcon } from '../config'; import { useEditAppSegmented } from './useEditAppSegmented'; import { createStyles } from 'antd-style'; -import { isDateColumnType, isNumericColumnType } from '@/utils'; +import { isDateColumnType, isNumericColumnType } from '@/lib'; export const EditLabelStyle: React.FC<{ onUpdateColumnConfig: (columnLabelFormat: Partial) => void; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx index 5b3705164..0ca96378e 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx @@ -3,7 +3,7 @@ import type { IColumnLabelFormat } from '@/components/ui/charts/interfaces/colum import { useMemoizedFn } from 'ahooks'; import React, { useMemo } from 'react'; import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { EditTitle } from './EditTitle'; import { EditDisplayAs } from './EditDisplayAs'; import { BarAndLineAxis, ChartEncodes, ChartType, ColumnSettings } from '@/components/ui/charts'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/dateConfig.ts b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/dateConfig.ts index 1ae04b062..c5e33baed 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/dateConfig.ts +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/dateConfig.ts @@ -1,4 +1,4 @@ -import { getNow, formatDate } from '@/utils'; +import { getNow, formatDate } from '@/lib'; export const getDefaultDateOptions = (now: Date) => { return [ diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/useErrorZones.ts b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/useErrorZones.ts index b6fa0b6df..991c65635 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/useErrorZones.ts +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/useErrorZones.ts @@ -5,7 +5,7 @@ import { DropZoneInternal } from './interfaces'; import { useSelectAxisContextSelector } from '../useSelectAxisContext'; import { ChartType, IColumnLabelFormat } from '@/components/ui/charts'; import { Active } from '@dnd-kit/core'; -import { isNumericColumnStyle, isNumericColumnType } from '@/utils'; +import { isNumericColumnStyle, isNumericColumnType } from '@/lib'; interface ZoneError { error: boolean; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx index fac99526f..f017b142c 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisItemLabel.tsx @@ -1,5 +1,5 @@ import { IColumnLabelFormat } from '@/components/ui/charts'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import React, { useMemo } from 'react'; import { Text } from '@/components/ui'; import { createStyles } from 'antd-style'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/XAxisSettingContent.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/XAxisSettingContent.tsx index 654abf3df..3192888ea 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/XAxisSettingContent.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/XAxisSettingContent.tsx @@ -2,7 +2,7 @@ import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; import React, { useMemo } from 'react'; import { useSelectAxisContextSelector } from '../useSelectAxisContext'; import { ColumnLabelFormat } from '@/components/ui/charts'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { useMemoizedFn } from 'ahooks'; import { IBusterMetricChartConfig } from '@/api/asset_interfaces'; import { EditShowAxisTitle } from './EditShowAxisTitle'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/Y2AxisSettingContent.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/Y2AxisSettingContent.tsx index 8fcc80b24..56f1729c0 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/Y2AxisSettingContent.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/Y2AxisSettingContent.tsx @@ -4,7 +4,7 @@ import { SelectAxisContainerId } from '../config'; import { EditShowAxisTitle } from './EditShowAxisTitle'; import type { ColumnLabelFormat, ComboChartAxis } from '@/components/ui/charts/interfaces'; import { AXIS_TITLE_SEPARATOR } from '@/components/ui/charts/commonHelpers'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { useMemoizedFn } from 'ahooks'; import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; import { EditShowAxisLabel } from './EditShowAxisLabel'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/YAxisSettingContent.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/YAxisSettingContent.tsx index 1fd08758c..2385088ef 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/YAxisSettingContent.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisSettingsContent/YAxisSettingContent.tsx @@ -3,7 +3,7 @@ import { useSelectAxisContextSelector } from '../useSelectAxisContext'; import { SelectAxisContainerId } from '../config'; import { EditShowAxisTitle } from './EditShowAxisTitle'; import type { ColumnLabelFormat } from '@/components/ui/charts/interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { useMemoizedFn } from 'ahooks'; import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; import { EditShowAxisLabel } from './EditShowAxisLabel'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx index 0b70bafcd..34adfde02 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectChartType/SelectChartType.tsx @@ -11,7 +11,7 @@ import { } from './SelectedChartTypeMethod'; import { useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; import { useMemoizedFn } from 'ahooks'; -import { addOpacityToColor, NUMBER_TYPES } from '@/utils'; +import { addOpacityToColor, NUMBER_TYPES } from '@/lib'; export interface SelectChartTypeProps { selectedChartType: ChartType; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditDerivedHeader.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditDerivedHeader.tsx index e5a551555..1181df299 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditDerivedHeader.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditDerivedHeader.tsx @@ -1,7 +1,7 @@ import type { IBusterMetricChartConfig, ColumnMetaData } from '@/api/asset_interfaces'; import { AppPopover, AppMaterialIcons } from '@/components/ui'; import type { IColumnLabelFormat, DerivedMetricTitle } from '@/components/ui/charts'; -import { formatLabel, isNumericColumnType, isNumericColumnStyle } from '@/utils'; +import { formatLabel, isNumericColumnType, isNumericColumnStyle } from '@/lib'; import { useMemoizedFn } from 'ahooks'; import { Input, Button, Divider, Switch, Select } from 'antd'; import { createStyles } from 'antd-style'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricField.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricField.tsx index d2d5e29f1..b5dda1cd9 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricField.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricField.tsx @@ -1,5 +1,5 @@ import { IBusterMetricChartConfig } from '@/api/asset_interfaces'; -import { isNumericColumnStyle, isNumericColumnType } from '@/utils'; +import { isNumericColumnStyle, isNumericColumnType } from '@/lib'; import React, { useMemo } from 'react'; import { LabelAndInput } from '../../Common'; import { Button, Select } from 'antd'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricType.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricType.tsx index 62051c968..09ed748da 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricType.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/EditMetricType.tsx @@ -4,7 +4,7 @@ import { IBusterMetricChartConfig } from '@/api/asset_interfaces'; import { LabelAndInput } from '../../Common'; import last from 'lodash/last'; import { useMemoizedFn } from 'ahooks'; -import { isNumericColumnStyle, isNumericColumnType } from '@/utils'; +import { isNumericColumnStyle, isNumericColumnType } from '@/lib'; import { ColumnLabelFormat } from '@/components/ui/charts'; export const AGGREGATE_OPTIONS: { diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/helpers.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/helpers.tsx index cc44897cb..a7fe8ac8e 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/helpers.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/StylingMetric/helpers.tsx @@ -1,5 +1,5 @@ import { ColumnMetaData, IBusterMetricChartConfig } from '@/api/asset_interfaces'; -import { formatLabel } from '@/utils'; +import { formatLabel } from '@/lib'; import { ColumnTypeIcon } from '../SelectAxis/config'; export const createColumnFieldOptions = ( diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx index aed7521d2..a9d58e55c 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricViewChart.tsx @@ -4,7 +4,7 @@ import { MetricViewChartContent } from './MetricViewChartContent'; import { MetricViewChartHeader } from './MetricViewChartHeader'; import { useMetricIndividual, useBusterMetricsIndividualContextSelector } from '@/context/Metrics'; import { useMemoizedFn } from 'ahooks'; -import { inputHasText } from '@/utils/text'; +import { inputHasText } from '@/lib/text'; import { MetricChartEvaluation } from './MetricChartEvaluation'; import { ChartType } from '@/components/ui/charts/interfaces/enum'; import { AnimatePresence, motion } from 'framer-motion'; diff --git a/web/src/controllers/MetricListContainer/MetricItemsContainer.tsx b/web/src/controllers/MetricListContainer/MetricItemsContainer.tsx index a25ae71fe..3345ff90f 100644 --- a/web/src/controllers/MetricListContainer/MetricItemsContainer.tsx +++ b/web/src/controllers/MetricListContainer/MetricItemsContainer.tsx @@ -1,5 +1,5 @@ import { ShareAssetType, VerificationStatus, BusterMetricListItem } from '@/api/asset_interfaces'; -import { makeHumanReadble, formatDate } from '@/utils'; +import { makeHumanReadble, formatDate } from '@/lib'; import React, { memo, useMemo, useRef, useState } from 'react'; import { StatusBadgeIndicator, getShareStatus } from '@/components/features/Lists'; import { BusterUserAvatar, Text } from '@/components/ui'; diff --git a/web/src/controllers/TermIndividualController/TermIndividualContent.tsx b/web/src/controllers/TermIndividualController/TermIndividualContent.tsx index e4089b314..8f30f23bd 100644 --- a/web/src/controllers/TermIndividualController/TermIndividualContent.tsx +++ b/web/src/controllers/TermIndividualController/TermIndividualContent.tsx @@ -5,7 +5,7 @@ import { AppContent } from '@/components/ui/layout/AppContent'; import { useBusterTermsIndividualContextSelector, useBusterTermsIndividual } from '@/context/Terms'; import { Dropdown, Input } from 'antd'; import { useDebounceFn } from 'ahooks'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { AppMaterialIcons, EditableTitle } from '@/components/ui'; import { useAntToken } from '@/styles/useAntToken'; import { AppCodeEditor } from '@/components/ui/inputs/AppCodeEditor'; diff --git a/web/src/controllers/TermIndividualController/TermIndividualContentSider.tsx b/web/src/controllers/TermIndividualController/TermIndividualContentSider.tsx index 4132a6c02..57d458c0d 100644 --- a/web/src/controllers/TermIndividualController/TermIndividualContentSider.tsx +++ b/web/src/controllers/TermIndividualController/TermIndividualContentSider.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useBusterTermsIndividualContextSelector, useBusterTermsIndividual } from '@/context/Terms'; import { BusterUserAvatar } from '@/components/ui'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { Text } from '@/components/ui'; import { DatasetList } from './TermDatasetSelect'; diff --git a/web/src/controllers/TermsListController/TermsListContent.tsx b/web/src/controllers/TermsListController/TermsListContent.tsx index 327c29a7a..555b94fe2 100644 --- a/web/src/controllers/TermsListController/TermsListContent.tsx +++ b/web/src/controllers/TermsListController/TermsListContent.tsx @@ -3,7 +3,7 @@ import React, { useMemo, useState } from 'react'; import { AppContent } from '@/components/ui/layout/AppContent'; import { BusterUserAvatar } from '@/components/ui'; -import { formatDate } from '@/utils'; +import { formatDate } from '@/lib'; import { ListEmptyStateWithButton, BusterList, diff --git a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/ChatInput.tsx b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/ChatInput.tsx index 0c6fb75ab..4095732c7 100644 --- a/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/ChatInput.tsx +++ b/web/src/layouts/ChatLayout/ChatContainer/ChatContent/ChatInput/ChatInput.tsx @@ -2,7 +2,7 @@ import React, { useMemo, useRef, useState } from 'react'; import { Input } from 'antd'; import { createStyles } from 'antd-style'; import { useMemoizedFn } from 'ahooks'; -import { inputHasText } from '@/utils'; +import { inputHasText } from '@/lib'; import { AIWarning } from './AIWarning'; import { SubmitButton } from './SubmitButton'; import { useChatInputFlow } from './useChatInputFlow'; @@ -67,7 +67,7 @@ export const ChatInput: React.FC<{}> = React.memo(({}) => { variant="borderless" onBlur={onBlurInput} onFocus={onFocusInput} - className="inline-block w-full pb-2! pl-3.5! pr-9! pt-2! align-middle" + className="inline-block w-full pt-2! pr-9! pb-2! pl-3.5! align-middle" placeholder="Ask a follow up..." value={inputValue} autoFocus={true} @@ -77,7 +77,7 @@ export const ChatInput: React.FC<{}> = React.memo(({}) => { autoSize={autoSize} /> -
+