Skip to content

Commit

Permalink
[ONL-7918] migrate sort direction enum
Browse files Browse the repository at this point in the history
  • Loading branch information
raulwwq0 committed Sep 21, 2023
1 parent 8cb54b6 commit 7439bb1
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/ec-smart-table/ec-smart-table.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mount } from '@vue/test-utils';
import { h, markRaw } from 'vue';

import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import EcSmartTable from './ec-smart-table.vue';

describe('EcSmartTable', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ec-smart-table/ec-smart-table.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
computed, markRaw, onBeforeUnmount, ref,
} from 'vue';

import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import * as SortDirectionCycle from '../../enums/sort-direction-cycle';
import EcDateRangeFilter from '../ec-date-range-filter';
import EcIcon from '../ec-icon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ec-smart-table/ec-smart-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ import {
import useEcPagination from '../../composables/use-ec-pagination';
import useEcSorting from '../../composables/use-ec-sorting';
import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import * as SortDirectionCycle from '../../enums/sort-direction-cycle';
import EcLoading from '../ec-loading';
import EcSmartTableHeading from '../ec-smart-table-heading';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ec-table-head/ec-table-head.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mount } from '@vue/test-utils';

import { withMockedConsole } from '../../../tests/utils/console';
import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import EcTableHead from './ec-table-head.vue';

describe('EcTableHead', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ec-table/ec-table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils';
import { defineComponent, h } from 'vue';

import { withMockedConsole } from '../../../tests/utils/console';
import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import EcTable from './ec-table.vue';

function mountEcTable(props, mountOpts) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ec-table/ec-table.story.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { action } from '@storybook/addon-actions';

import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import EcIcon from '../ec-icon/ec-icon.vue';
import EcOptionCard from '../ec-option-card';
import EcTable from './ec-table.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/composables/use-ec-sorting/use-ec-sorting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ref, unref } from 'vue';

import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import * as SortDirectionCycle from '../../enums/sort-direction-cycle';

export default function useEcSorting({
Expand Down
2 changes: 1 addition & 1 deletion src/composables/use-ec-sorting/use-ec-sorting.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as SortDirection from '../../enums/sort-direction';
import { SortDirection } from '../../enums/sort-direction';
import * as SortDirectionCycle from '../../enums/sort-direction-cycle';
import useEcSorting from './use-ec-sorting';

Expand Down
2 changes: 1 addition & 1 deletion src/enums/sort-direction-cycle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as SortDirection from './sort-direction';
import { SortDirection } from './sort-direction';

export const LOWEST_FIRST = [SortDirection.ASC, SortDirection.DESC];
export const HIGHEST_FIRST = [SortDirection.DESC, SortDirection.ASC];
2 changes: 0 additions & 2 deletions src/enums/sort-direction.js

This file was deleted.

4 changes: 4 additions & 0 deletions src/enums/sort-direction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export enum SortDirection {
ASC = 'asc',
DESC = 'desc',
}
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as SortDirection from './enums/sort-direction';
import { SortDirection } from './enums/sort-direction';
import * as SortDirectionCycle from './enums/sort-direction-cycle';
import * as TooltipPlacement from './enums/tooltip-placement';

Expand Down

0 comments on commit 7439bb1

Please sign in to comment.