Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
Always import src files in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Aug 10, 2020
1 parent bfc7266 commit 7899b08
Show file tree
Hide file tree
Showing 155 changed files with 156 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { buildQueryContext, QueryFormData } from '@superset-ui/core';
import { buildQueryContext, QueryFormData } from '@superset-ui/core/src';

/**
* The buildQuery function is used to create an instance of QueryContext that's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { validateNonEmpty } from '@superset-ui/validator';
import { ControlPanelConfig } from '@superset-ui/chart-controls';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart';
import buildQuery from './buildQuery';
import controlPanel from './controlPanel';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-composition/src/ChartFrame.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { PureComponent } from 'react';
import { isDefined } from '@superset-ui/core';
import { isDefined } from '@superset-ui/core/src';

function checkNumber(input: unknown): input is number {
return isDefined(input) && typeof input === 'number';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-controls/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

// eslint-disable-next-line import/prefer-default-export
export const TIME_FILTER_LABELS = {
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-controls/src/sections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

// A few standard controls sections that are used internally.
// Not recommended for use in third-party plugins.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* control interface.
*/
import React from 'react';
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import {
getCategoricalSchemeRegistry,
getSequentialSchemeRegistry,
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart-controls/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* under the License.
*/
import React, { ReactNode, ReactText, ReactElement } from 'react';
import { QueryFormData } from '@superset-ui/core';
import { QueryFormData } from '@superset-ui/core/src';
import sharedControls from './shared-controls';
import sharedControlComponents from './shared-controls/components';

Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ requests from domains outside your `Apache Superset` instance:
configuration in the `@superset-ui` storybook.

```javascript
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/core/src';

SupersetClient.configure({
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart/src/clients/ChartClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SupersetClientClass,
QueryFormData,
Datasource,
} from '@superset-ui/core';
} from '@superset-ui/core/src';
import getChartBuildQueryRegistry from '../registries/ChartBuildQueryRegistrySingleton';
import getChartMetadataRegistry from '../registries/ChartMetadataRegistrySingleton';
import { QueryData } from '../types/QueryResponse';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
RequestConfig,
QueryFormData,
Datasource,
} from '@superset-ui/core';
} from '@superset-ui/core/src';
import ChartClient, { SliceIdAndOrFormData } from '../clients/ChartClient';
import { QueryData } from '../types/QueryResponse';

Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart/src/models/ChartPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentType } from 'react';
import { isRequired, Plugin, QueryFormData } from '@superset-ui/core';
import { isRequired, Plugin, QueryFormData } from '@superset-ui/core/src';
import ChartMetadata from './ChartMetadata';
import getChartMetadataRegistry from '../registries/ChartMetadataRegistrySingleton';
import getChartBuildQueryRegistry from '../registries/ChartBuildQueryRegistrySingleton';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart/src/models/ChartProps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSelector } from 'reselect';
import { convertKeysToCamelCase, Datasource } from '@superset-ui/core';
import { convertKeysToCamelCase, Datasource } from '@superset-ui/core/src';
import { HandlerFunction, PlainObject } from '../types/Base';
import { QueryData, DataRecordFilters } from '../types/QueryResponse';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Registry, makeSingleton, OverwritePolicy, QueryContext } from '@superset-ui/core';
import { Registry, makeSingleton, OverwritePolicy, QueryContext } from '@superset-ui/core/src';

// Ideally this would be <T extends QueryFormData>
type BuildQuery = (formData: any) => QueryContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Registry, makeSingleton, OverwritePolicy } from '@superset-ui/core';
import { Registry, makeSingleton, OverwritePolicy } from '@superset-ui/core/src';
import { ChartType } from '../models/ChartPlugin';

class ChartComponentRegistry extends Registry<ChartType> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Registry, makeSingleton } from '@superset-ui/core';
import { Registry, makeSingleton } from '@superset-ui/core/src';
import { ChartControlPanel } from '../models/ChartControlPanel';

class ChartControlPanelRegistry extends Registry<ChartControlPanel, ChartControlPanel> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Registry, makeSingleton, OverwritePolicy } from '@superset-ui/core';
import { Registry, makeSingleton, OverwritePolicy } from '@superset-ui/core/src';
import ChartMetadata from '../models/ChartMetadata';

class ChartMetadataRegistry extends Registry<ChartMetadata, ChartMetadata> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Registry, makeSingleton, OverwritePolicy } from '@superset-ui/core';
import { Registry, makeSingleton, OverwritePolicy } from '@superset-ui/core/src';
import { TransformProps } from '../types/TransformFunction';

class ChartTransformPropsRegistry extends Registry<TransformProps> {
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-chart/src/types/TransformFunction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QueryFormData, QueryContext } from '@superset-ui/core';
import { QueryFormData, QueryContext } from '@superset-ui/core/src';
import ChartProps from '../models/ChartProps';

export interface PlainProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-color/src/CategoricalColorScale.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-dupe-class-members */
import { ExtensibleFunction } from '@superset-ui/core';
import { ExtensibleFunction } from '@superset-ui/core/src';
import { scaleOrdinal, ScaleOrdinal } from 'd3-scale';
import { ColorsLookup } from './types';
import stringifyAndTrim from './stringifyAndTrim';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeSingleton } from '@superset-ui/core';
import { makeSingleton } from '@superset-ui/core/src';
import CategoricalScheme from './CategoricalScheme';
import ColorSchemeRegistry from './ColorSchemeRegistry';
import schemes from './colorSchemes/categorical/d3';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-color/src/ColorSchemeRegistry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RegistryWithDefaultKey, OverwritePolicy } from '@superset-ui/core';
import { RegistryWithDefaultKey, OverwritePolicy } from '@superset-ui/core/src';

export default class ColorSchemeRegistry<T> extends RegistryWithDefaultKey<T> {
constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeSingleton } from '@superset-ui/core';
import { makeSingleton } from '@superset-ui/core/src';
import ColorSchemeRegistry from './ColorSchemeRegistry';
import SequentialScheme from './SequentialScheme';
import schemes from './colorSchemes/sequential/d3';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Description
#### Example usage

```js
import { xxx } from '@superset-ui/core';
import { xxx } from '@superset-ui/core/src';
```

#### API
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-demo/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { jsxDecorator } from 'storybook-addon-jsx';
import categoricalD3 from '@superset-ui/color/esm/colorSchemes/categorical/d3';
import sequentialCommon from '@superset-ui/color/esm/colorSchemes/sequential/common';
import sequentialD3 from '@superset-ui/color/esm/colorSchemes/sequential/d3';
import { configure } from '@superset-ui/core';
import { configure } from '@superset-ui/core/src';
import { getCategoricalSchemeRegistry, getSequentialSchemeRegistry } from '@superset-ui/color';
import { getTimeFormatterRegistry, smartDateFormatter } from '@superset-ui/time-format';
import themeDecorator from "./themeDecorator"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react';
import { SupersetClient, Method } from '@superset-ui/core';
import { makeApi, SupersetApiError } from '@superset-ui/core';
import { SupersetClient, Method } from '@superset-ui/core/src';
import { makeApi, SupersetApiError } from '@superset-ui/core/src';
import ErrorMessage from './ErrorMessage';

export type Props = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { text, select } from '@storybook/addon-knobs';
import { SuperChart, ChartDataProvider } from '@superset-ui/chart';
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/core/src';
import Expandable from './Expandable';
import VerifyCORS, { renderError } from './VerifyCORS';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { text, select, withKnobs } from '@storybook/addon-knobs';

import { SuperChart, ChartDataProvider } from '@superset-ui/chart';
import { SupersetClient } from '@superset-ui/core';
import { SupersetClient } from '@superset-ui/core/src';
import { BigNumberChartPlugin as LegacyBigNumberPlugin } from '@superset-ui/legacy-preset-chart-big-number';
import LegacySankeyPlugin from '@superset-ui/legacy-plugin-chart-sankey';
import LegacySunburstPlugin from '@superset-ui/legacy-plugin-chart-sunburst';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-number-format/src/NumberFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExtensibleFunction, isRequired } from '@superset-ui/core';
import { ExtensibleFunction, isRequired } from '@superset-ui/core/src';
import { NumberFormatFunction } from './types';

export const PREVIEW_VALUE = 12345.432;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RegistryWithDefaultKey, OverwritePolicy } from '@superset-ui/core';
import { RegistryWithDefaultKey, OverwritePolicy } from '@superset-ui/core/src';
import createD3NumberFormatter from './factories/createD3NumberFormatter';
import createSmartNumberFormatter from './factories/createSmartNumberFormatter';
import NumberFormats from './NumberFormats';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeSingleton } from '@superset-ui/core';
import { makeSingleton } from '@superset-ui/core/src';
import NumberFormatterRegistry from './NumberFormatterRegistry';

const getInstance = makeSingleton(NumberFormatterRegistry);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { format as d3Format, formatLocale, FormatLocaleDefinition } from 'd3-format';
import { isRequired } from '@superset-ui/core';
import { isRequired } from '@superset-ui/core/src';
import NumberFormatter from '../NumberFormatter';
import { NumberFormatFunction } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-time-format/src/TimeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExtensibleFunction, isRequired } from '@superset-ui/core';
import { ExtensibleFunction, isRequired } from '@superset-ui/core/src';
import { TimeFormatFunction } from './types';
import stringifyTimeInput from './utils/stringifyTimeInput';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RegistryWithDefaultKey, OverwritePolicy } from '@superset-ui/core';
import { RegistryWithDefaultKey, OverwritePolicy } from '@superset-ui/core/src';
import TimeFormats, { LOCAL_PREFIX } from './TimeFormats';
import createD3TimeFormatter from './factories/createD3TimeFormatter';
import TimeFormatter from './TimeFormatter';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeSingleton } from '@superset-ui/core';
import { makeSingleton } from '@superset-ui/core/src';
import TimeFormatterRegistry from './TimeFormatterRegistry';
import TimeFormatter from './TimeFormatter';
import TimeFormatsForGranularity from './TimeFormatsForGranularity';
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-time-format/src/TimeRangeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExtensibleFunction } from '@superset-ui/core';
import { ExtensibleFunction } from '@superset-ui/core/src';
import { TimeRangeFormatFunction } from './types';

// Use type augmentation to indicate that
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { utcFormat, timeFormat, timeFormatLocale, TimeLocaleDefinition } from 'd3-time-format';
import { isRequired } from '@superset-ui/core';
import { isRequired } from '@superset-ui/core/src';
import TimeFormatter from '../TimeFormatter';
import { LOCAL_PREFIX } from '../TimeFormats';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

/**
* formerly called integer()
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-validator/src/legacyValidateNumber.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

/**
* formerly called numeric()
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-validator/src/validateInteger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

export default function validateInteger(v: unknown) {
if (
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-validator/src/validateNonEmpty.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

export default function validateNonEmpty(v: unknown) {
if (v === null || typeof v === 'undefined' || v === '' || (Array.isArray(v) && v.length === 0)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/superset-ui-validator/src/validateNumber.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

export default function validateInteger(v: unknown) {
if (
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-calendar/src/controlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { legacyValidateInteger } from '@superset-ui/validator';
import {
formatSelectOptions,
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-calendar/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart';
import transformProps from './transformProps';
import controlPanel from './controlPanel';
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-chord/src/controlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { validateNonEmpty } from '@superset-ui/validator';

export default {
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-chord/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { D3_FORMAT_OPTIONS, D3_FORMAT_DOCS } from '@superset-ui/chart-controls';

export default {
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-country-map/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-event-flow/src/EventFlow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { App } from '@data-ui/event-flow';
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';

const propTypes = {
data: PropTypes.array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { validateNonEmpty } from '@superset-ui/validator';
import {
ColumnOption,
Expand Down
2 changes: 1 addition & 1 deletion plugins/legacy-plugin-chart-event-flow/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { ChartMetadata, ChartPlugin } from '@superset-ui/chart';
import thumbnail from './images/thumbnail.png';
import controlPanel from './controlPanel';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { t } from '@superset-ui/core/src';
import { formatSelectOptions } from '@superset-ui/chart-controls';

export default {
Expand Down
Loading

0 comments on commit 7899b08

Please sign in to comment.