diff --git a/packages/dataviews/src/bulk-actions.js b/packages/dataviews/src/actions/bulk-actions.js similarity index 99% rename from packages/dataviews/src/bulk-actions.js rename to packages/dataviews/src/actions/bulk-actions.js index 9fd9f628286e0..48e999b80f2a5 100644 --- a/packages/dataviews/src/bulk-actions.js +++ b/packages/dataviews/src/actions/bulk-actions.js @@ -12,7 +12,7 @@ import { useMemo, useState, useCallback } from '@wordpress/element'; /** * Internal dependencies */ -import { unlock } from './lock-unlock'; +import { unlock } from '../lock-unlock'; const { DropdownMenuV2: DropdownMenu, diff --git a/packages/dataviews/src/item-actions.js b/packages/dataviews/src/actions/item-actions.js similarity index 99% rename from packages/dataviews/src/item-actions.js rename to packages/dataviews/src/actions/item-actions.js index ce4dd6abef056..b465998bd8fac 100644 --- a/packages/dataviews/src/item-actions.js +++ b/packages/dataviews/src/actions/item-actions.js @@ -14,7 +14,7 @@ import { moreVertical } from '@wordpress/icons'; /** * Internal dependencies */ -import { unlock } from './lock-unlock'; +import { unlock } from '../lock-unlock'; const { DropdownMenuV2: DropdownMenu, diff --git a/packages/dataviews/src/constants.js b/packages/dataviews/src/constants.js index b3d17d7fd1145..5d3e68ff4583c 100644 --- a/packages/dataviews/src/constants.js +++ b/packages/dataviews/src/constants.js @@ -12,9 +12,9 @@ import { /** * Internal dependencies */ -import ViewTable from './view-table'; -import ViewGrid from './view-grid'; -import ViewList from './view-list'; +import ViewTable from './layouts/table'; +import ViewGrid from './layouts/grid'; +import ViewList from './layouts/list'; // Field types. export const ENUMERATION_TYPE = 'enumeration'; diff --git a/packages/dataviews/src/dataviews.js b/packages/dataviews/src/dataviews.js index 64a70d46c7d12..9f8c2cb9770d9 100644 --- a/packages/dataviews/src/dataviews.js +++ b/packages/dataviews/src/dataviews.js @@ -13,9 +13,9 @@ import { useMemo, useState, useCallback, useEffect } from '@wordpress/element'; import Pagination from './pagination'; import ViewActions from './view-actions'; import Filters from './filters'; -import Search from './search'; +import Search from './filters/search'; import { VIEW_LAYOUTS, LAYOUT_TABLE } from './constants'; -import BulkActions from './bulk-actions'; +import BulkActions from './actions/bulk-actions'; const defaultGetItemId = ( item ) => item.id; const defaultOnSelectionChange = () => {}; diff --git a/packages/dataviews/src/add-filter.js b/packages/dataviews/src/filters/add-filter.js similarity index 97% rename from packages/dataviews/src/add-filter.js rename to packages/dataviews/src/filters/add-filter.js index 4f77a35c52d2e..b5d718942dff2 100644 --- a/packages/dataviews/src/add-filter.js +++ b/packages/dataviews/src/filters/add-filter.js @@ -12,9 +12,9 @@ import { Children, Fragment } from '@wordpress/element'; /** * Internal dependencies */ -import { unlock } from './lock-unlock'; -import { LAYOUT_LIST, OPERATORS } from './constants'; -import { DropdownMenuRadioItemCustom } from './dropdown-menu-helper'; +import { unlock } from '../lock-unlock'; +import { LAYOUT_LIST, OPERATORS } from '../constants'; +import { DropdownMenuRadioItemCustom } from '../dropdown-menu-helper'; const { DropdownMenuV2: DropdownMenu, diff --git a/packages/dataviews/src/filter-summary.js b/packages/dataviews/src/filters/filter-summary.js similarity index 96% rename from packages/dataviews/src/filter-summary.js rename to packages/dataviews/src/filters/filter-summary.js index 723fee5b3ee52..e5dd88d311243 100644 --- a/packages/dataviews/src/filter-summary.js +++ b/packages/dataviews/src/filters/filter-summary.js @@ -13,9 +13,9 @@ import { Children, Fragment } from '@wordpress/element'; /** * Internal dependencies */ -import { OPERATOR_IN, OPERATOR_NOT_IN, OPERATORS } from './constants'; -import { unlock } from './lock-unlock'; -import { DropdownMenuRadioItemCustom } from './dropdown-menu-helper'; +import { OPERATOR_IN, OPERATOR_NOT_IN, OPERATORS } from '../constants'; +import { unlock } from '../lock-unlock'; +import { DropdownMenuRadioItemCustom } from '../dropdown-menu-helper'; const { DropdownMenuV2: DropdownMenu, diff --git a/packages/dataviews/src/filters.js b/packages/dataviews/src/filters/index.js similarity index 98% rename from packages/dataviews/src/filters.js rename to packages/dataviews/src/filters/index.js index a101a07753990..9c7911c568410 100644 --- a/packages/dataviews/src/filters.js +++ b/packages/dataviews/src/filters/index.js @@ -14,7 +14,7 @@ import { OPERATOR_IN, OPERATOR_NOT_IN, LAYOUT_LIST, -} from './constants'; +} from '../constants'; const sanitizeOperators = ( field ) => { let operators = field.filterBy?.operators; diff --git a/packages/dataviews/src/reset-filters.js b/packages/dataviews/src/filters/reset-filters.js similarity index 100% rename from packages/dataviews/src/reset-filters.js rename to packages/dataviews/src/filters/reset-filters.js diff --git a/packages/dataviews/src/search.js b/packages/dataviews/src/filters/search.js similarity index 100% rename from packages/dataviews/src/search.js rename to packages/dataviews/src/filters/search.js diff --git a/packages/dataviews/src/view-grid.js b/packages/dataviews/src/layouts/grid.js similarity index 97% rename from packages/dataviews/src/view-grid.js rename to packages/dataviews/src/layouts/grid.js index c8cc3516e1cbb..4e8a64e0f3752 100644 --- a/packages/dataviews/src/view-grid.js +++ b/packages/dataviews/src/layouts/grid.js @@ -12,7 +12,7 @@ import { useAsyncList } from '@wordpress/compose'; /** * Internal dependencies */ -import ItemActions from './item-actions'; +import ItemActions from '../actions/item-actions'; export default function ViewGrid( { data, diff --git a/packages/dataviews/src/view-list.js b/packages/dataviews/src/layouts/list.js similarity index 100% rename from packages/dataviews/src/view-list.js rename to packages/dataviews/src/layouts/list.js diff --git a/packages/dataviews/src/view-table.js b/packages/dataviews/src/layouts/table.js similarity index 98% rename from packages/dataviews/src/view-table.js rename to packages/dataviews/src/layouts/table.js index 264662c19369d..c970de48818a7 100644 --- a/packages/dataviews/src/view-table.js +++ b/packages/dataviews/src/layouts/table.js @@ -28,10 +28,10 @@ import { /** * Internal dependencies */ -import { unlock } from './lock-unlock'; -import ItemActions from './item-actions'; -import { ENUMERATION_TYPE, OPERATORS, SORTING_DIRECTIONS } from './constants'; -import { DropdownMenuRadioItemCustom } from './dropdown-menu-helper'; +import { unlock } from '../lock-unlock'; +import ItemActions from '../actions/item-actions'; +import { ENUMERATION_TYPE, OPERATORS, SORTING_DIRECTIONS } from '../constants'; +import { DropdownMenuRadioItemCustom } from '../dropdown-menu-helper'; const { DropdownMenuV2: DropdownMenu,