mirror of
https://github.com/apache/superset.git
synced 2026-04-25 19:14:27 +00:00
chore: TypeScript Configuration Modernization and Cleanup (#35159)
This commit is contained in:
committed by
GitHub
parent
a889ae75fc
commit
6cb3ef9f5d
@@ -16,8 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import { Metric } from '@superset-ui/chart-controls';
|
||||
import {
|
||||
ChartProps,
|
||||
@@ -27,6 +25,8 @@ import {
|
||||
SimpleAdhocFilter,
|
||||
ensureIsArray,
|
||||
} from '@superset-ui/core';
|
||||
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
|
||||
import 'dayjs/plugin/utc';
|
||||
import {
|
||||
getComparisonFontSize,
|
||||
getHeaderFontSize,
|
||||
@@ -35,8 +35,6 @@ import {
|
||||
|
||||
import { getOriginalLabel } from '../utils';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
export const parseMetricValue = (metricValue: number | string | null) => {
|
||||
if (typeof metricValue === 'string') {
|
||||
const dateObject = dayjs.utc(metricValue, undefined, true);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import utc from 'dayjs/plugin/utc';
|
||||
import {
|
||||
getTimeFormatter,
|
||||
@@ -29,6 +28,7 @@ import {
|
||||
SMART_DATE_ID,
|
||||
TimeGranularity,
|
||||
} from '@superset-ui/core';
|
||||
import { extendedDayjs as dayjs } from '@superset-ui/core/utils/dates';
|
||||
|
||||
dayjs.extend(utc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user