Skip to content

Commit 7aa2372

Browse files
authored
DataViews: Clean up the forked packages (#104584)
* Dataviews: Clean up the forked packages * Dataviews: Point to @wordpress/dataviews package * Dataviews: Replace @automattic/dataviews with @wordpress/dataviews * Bump to next versions * Revert "Bump to next versions" This reverts commit 926bf1e. * Try to bump @wordpress/dataviews version only
1 parent ebe7cb9 commit 7aa2372

145 files changed

Lines changed: 81 additions & 16638 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/design-system-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@wordpress/base-styles": "^5.23.0",
3030
"@wordpress/browserslist-config": "^6.23.0",
3131
"@wordpress/components": "^29.9.0",
32-
"@wordpress/dataviews": "^4.19.0",
32+
"@wordpress/dataviews": "^5.0.1-next.719a03cbe.0",
3333
"docusaurus-plugin-sass": "^0.2.6",
3434
"prism-react-renderer": "^2.4.1",
3535
"react": "^18.3.1",

client/dashboard/.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ module.exports = {
4040
'!@automattic/components/src/breadcrumbs',
4141
'!@automattic/components/src/breadcrumbs/types',
4242
'!@automattic/calypso-analytics',
43-
'!@automattic/dataviews',
4443
'!@automattic/number-formatters',
4544
'!@automattic/ui',
4645
'!@automattic/viewport',

client/dashboard/app/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@import '@wordpress/base-styles/variables';
2-
@import '@automattic/dataviews/build-style/style.css';
2+
@import '@wordpress/dataviews/build-style/style.css';
33

44
// Should be implemented differently once v2 is not loaded via the v1 stack
55
// I'm tempted to even just replace all this with a display:none on the logo

client/dashboard/components/required-select/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { SelectControl } from '@wordpress/components';
22
import { useCallback } from '@wordpress/element';
3-
import type { DataFormControlProps } from '@automattic/dataviews';
3+
import type { DataFormControlProps } from '@wordpress/dataviews';
44

5-
// A verbatim copy of @automattic/dataviews/src/dataform-controls/select.tsx,
5+
// A verbatim copy of @wordpress/dataviews/src/dataform-controls/select.tsx,
66
// but without the first placeholder option.
77
export default function RequiredSelect< Item >( {
88
data,

client/dashboard/domains/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { DataViews, filterSortAndPaginate, View } from '@automattic/dataviews';
21
import { useQuery } from '@tanstack/react-query';
32
import { Button } from '@wordpress/components';
3+
import { DataViews, filterSortAndPaginate, View } from '@wordpress/dataviews';
44
import { dateI18n } from '@wordpress/date';
55
import { __ } from '@wordpress/i18n';
66
import { useState } from 'react';

client/dashboard/emails/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { DataViews, filterSortAndPaginate } from '@automattic/dataviews';
21
import { useQuery } from '@tanstack/react-query';
32
import { useNavigate } from '@tanstack/react-router';
43
import { Button, ExternalLink, Notice } from '@wordpress/components';
4+
import { DataViews, filterSortAndPaginate } from '@wordpress/dataviews';
55
import { __ } from '@wordpress/i18n';
66
import { useState, useMemo } from 'react';
77
import { emailsQuery } from '../app/queries/emails';
88
import DataViewsCard from '../components/dataviews-card';
99
import { PageHeader } from '../components/page-header';
1010
import PageLayout from '../components/page-layout';
1111
import type { Email } from '../data/types';
12-
import type { View } from '@automattic/dataviews';
12+
import type { View } from '@wordpress/dataviews';
1313

1414
const fields = [
1515
{

client/dashboard/me/profile/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { DataForm } from '@automattic/dataviews';
21
import { useMutation, useQuery } from '@tanstack/react-query';
32
import {
43
Button,
@@ -14,6 +13,7 @@ import {
1413
ExternalLink,
1514
TextControl,
1615
} from '@wordpress/components';
16+
import { DataForm } from '@wordpress/dataviews';
1717
import { createInterpolateElement, useMemo } from '@wordpress/element';
1818
import { __, sprintf } from '@wordpress/i18n';
1919
import { useState } from 'react';
@@ -23,7 +23,7 @@ import { PageHeader } from '../../components/page-header';
2323
import PageLayout from '../../components/page-layout';
2424
import EditGravatar from '../edit-gravatar';
2525
import type { UserProfile } from '../../data/types';
26-
import type { Field } from '@automattic/dataviews';
26+
import type { Field } from '@wordpress/dataviews';
2727

2828
import './style.scss';
2929

client/dashboard/sites/actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { lazy, Suspense } from 'react';
66
import { isP2, isSelfHostedJetpackConnected } from '../utils/site-types';
77
import { canManageSite } from './features';
88
import type { Site } from '../data/types';
9-
import type { Action } from '@automattic/dataviews';
109
import type { AnyRouter } from '@tanstack/react-router';
10+
import type { Action } from '@wordpress/dataviews';
1111

1212
const SiteLeaveContentInfo = lazy( () => import( './site-leave-modal/content-info' ) );
1313
const SiteRestoreContentInfo = lazy( () => import( './site-restore-modal/content-info' ) );

client/dashboard/sites/fields.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from './site-fields';
1919
import SiteIcon from './site-icon';
2020
import type { Site } from '../data/types';
21-
import type { Field, Operator } from '@automattic/dataviews';
21+
import type { Field, Operator } from '@wordpress/dataviews';
2222

2323
const DEFAULT_FIELDS: Field< Site >[] = [
2424
{

client/dashboard/sites/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { DataViews, filterSortAndPaginate } from '@automattic/dataviews';
21
import { useQuery, useSuspenseQuery, useMutation } from '@tanstack/react-query';
32
import { useNavigate, useRouter } from '@tanstack/react-router';
43
import { Button, Modal } from '@wordpress/components';
4+
import { DataViews, filterSortAndPaginate } from '@wordpress/dataviews';
55
import { __ } from '@wordpress/i18n';
66
import { useState } from 'react';
77
import { useAnalytics } from '../app/analytics';
@@ -20,7 +20,7 @@ import { SitesNotices } from './notices';
2020
import { getView, mergeViews, DEFAULT_LAYOUTS, recordViewChanges } from './views';
2121
import type { ViewPreferences, ViewSearchParams } from './views';
2222
import type { FetchSitesOptions, Site } from '../data/types';
23-
import type { View, Filter } from '@automattic/dataviews';
23+
import type { View, Filter } from '@wordpress/dataviews';
2424

2525
const getFetchSitesOptions = ( view: View, isRestoringAccount: boolean ): FetchSitesOptions => {
2626
const filters = view.filters ?? [];

0 commit comments

Comments
 (0)