Skip to content

Commit

Permalink
DataViews: Move the layouts into a dedicated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jul 11, 2024
1 parent 7113416 commit 239e1ee
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import ItemActions from './item-actions';
import SingleSelectionCheckbox from './single-selection-checkbox';
import { useHasAPossibleBulkAction } from './bulk-actions';
import type { Action, NormalizedField, ViewGridProps } from './types';
import type { SetSelection } from './private-types';
import ItemActions from '../../item-actions';
import SingleSelectionCheckbox from '../../single-selection-checkbox';
import { useHasAPossibleBulkAction } from '../../bulk-actions';
import type { Action, NormalizedField, ViewGridProps } from '../../types';
import type { SetSelection } from '../../private-types';

interface GridItemProps< Item > {
selection: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import {
/**
* Internal dependencies
*/
import ViewTable from './view-table';
import ViewGrid from './view-grid';
import ViewList from './view-list';
import { LAYOUT_GRID, LAYOUT_LIST, LAYOUT_TABLE } from './constants';
import type { View } from './types';
import ViewTable from './table';
import ViewGrid from './grid';
import ViewList from './list';
import { LAYOUT_GRID, LAYOUT_LIST, LAYOUT_TABLE } from '../constants';
import type { View } from '../types';

export const VIEW_LAYOUTS = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ import { useRegistry } from '@wordpress/data';
/**
* Internal dependencies
*/
import { unlock } from './lock-unlock';
import type { Action, NormalizedField, ViewListProps } from './types';

import { ActionsDropdownMenuGroup, ActionModal } from './item-actions';
import { unlock } from '../../lock-unlock';
import { ActionsDropdownMenuGroup, ActionModal } from '../../item-actions';
import type { Action, NormalizedField, ViewListProps } from '../../types';

interface ListViewItemProps< Item > {
actions: Action< Item >[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,29 @@ import {
/**
* Internal dependencies
*/
import SingleSelectionCheckbox from './single-selection-checkbox';
import { unlock } from './lock-unlock';
import ItemActions from './item-actions';
import { sanitizeOperators } from './utils';
import SingleSelectionCheckbox from '../../single-selection-checkbox';
import { unlock } from '../../lock-unlock';
import ItemActions from '../../item-actions';
import { sanitizeOperators } from '../../utils';
import {
SORTING_DIRECTIONS,
sortArrows,
sortLabels,
sortValues,
} from './constants';
} from '../../constants';
import {
useSomeItemHasAPossibleBulkAction,
useHasAPossibleBulkAction,
} from './bulk-actions';
} from '../../bulk-actions';
import type {
Action,
NormalizedField,
SortDirection,
ViewTable as ViewTableType,
ViewTableProps,
CombinedField,
} from './types';
import type { SetSelection } from './private-types';
} from '../../types';
import type { SetSelection } from '../../private-types';

const {
DropdownMenuV2: DropdownMenu,
Expand Down

0 comments on commit 239e1ee

Please sign in to comment.