2282 Rename components to use the new naming convention part 1 (#2293)
renaming in progress
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { useFilteredSearchPeopleQuery } from '@/people/hooks/useFilteredSearchPeopleQuery';
|
||||
import { FilterDropdownEntitySearchSelect } from '@/ui/data/filter/components/FilterDropdownEntitySearchSelect';
|
||||
import { useFilter } from '@/ui/data/filter/hooks/useFilter';
|
||||
import { FilterDropdownEntitySearchSelect } from '@/ui/object/filter/components/FilterDropdownEntitySearchSelect';
|
||||
import { useFilter } from '@/ui/object/filter/hooks/useFilter';
|
||||
|
||||
export const FilterDropdownPeopleSearchSelect = () => {
|
||||
const { filterDropdownSearchInput, filterDropdownSelectedEntityId } =
|
||||
|
||||
@ -4,9 +4,9 @@ import {
|
||||
useGetPeopleQuery,
|
||||
} from '~/generated/graphql';
|
||||
|
||||
import { useSetPeopleDataTable } from '../hooks/useSetPeopleDataTable';
|
||||
import { useSetPeopleRecordTable } from '../hooks/useSetPeopleRecordTable';
|
||||
|
||||
export const PeopleDataTableDataEffect = ({
|
||||
export const PeopleRecordTableDataEffect = ({
|
||||
orderBy = [
|
||||
{
|
||||
createdAt: SortOrder.Desc,
|
||||
@ -17,14 +17,14 @@ export const PeopleDataTableDataEffect = ({
|
||||
orderBy?: PersonOrderByWithRelationInput[];
|
||||
whereFilters?: any;
|
||||
}) => {
|
||||
const setPeopleDataTable = useSetPeopleDataTable();
|
||||
const setPeopleRecordTable = useSetPeopleRecordTable();
|
||||
|
||||
useGetPeopleQuery({
|
||||
variables: { orderBy, where: whereFilters },
|
||||
onCompleted: (data) => {
|
||||
const people = data.people ?? [];
|
||||
|
||||
setPeopleDataTable(people);
|
||||
setPeopleRecordTable(people);
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,14 +1,3 @@
|
||||
import { ColumnDefinition } from '@/ui/data/data-table/types/ColumnDefinition';
|
||||
import {
|
||||
FieldDateMetadata,
|
||||
FieldDoubleTextChipMetadata,
|
||||
FieldEmailMetadata,
|
||||
FieldMetadata,
|
||||
FieldPhoneMetadata,
|
||||
FieldRelationMetadata,
|
||||
FieldTextMetadata,
|
||||
FieldURLMetadata,
|
||||
} from '@/ui/data/field/types/FieldMetadata';
|
||||
import {
|
||||
IconBrandLinkedin,
|
||||
IconBrandX,
|
||||
@ -21,6 +10,17 @@ import {
|
||||
IconUser,
|
||||
} from '@/ui/display/icon/index';
|
||||
import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';
|
||||
import {
|
||||
FieldDateMetadata,
|
||||
FieldDoubleTextChipMetadata,
|
||||
FieldEmailMetadata,
|
||||
FieldMetadata,
|
||||
FieldPhoneMetadata,
|
||||
FieldRelationMetadata,
|
||||
FieldTextMetadata,
|
||||
FieldURLMetadata,
|
||||
} from '@/ui/object/field/types/FieldMetadata';
|
||||
import { ColumnDefinition } from '@/ui/object/record-table/types/ColumnDefinition';
|
||||
import { Company } from '~/generated/graphql';
|
||||
import { getLogoUrlFromDomainName } from '~/utils';
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
|
||||
import { FieldRecoilScopeContext } from '@/ui/data/inline-cell/states/recoil-scope-contexts/FieldRecoilScopeContext';
|
||||
import { EntityTitleDoubleTextInput } from '@/ui/input/components/EntityTitleDoubleTextInput';
|
||||
import { FieldRecoilScopeContext } from '@/ui/object/record-inline-cell/states/recoil-scope-contexts/FieldRecoilScopeContext';
|
||||
import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';
|
||||
import { Person, useUpdateOnePersonMutation } from '~/generated/graphql';
|
||||
|
||||
|
||||
@ -5,8 +5,8 @@ import {
|
||||
ActivityTargetableEntity,
|
||||
ActivityTargetableEntityType,
|
||||
} from '@/activities/types/ActivityTargetableEntity';
|
||||
import { selectedRowIdsSelector } from '@/ui/data/data-table/states/selectors/selectedRowIdsSelector';
|
||||
import { entityFieldsFamilyState } from '@/ui/data/field/states/entityFieldsFamilyState';
|
||||
import { entityFieldsFamilyState } from '@/ui/object/field/states/entityFieldsFamilyState';
|
||||
import { selectedRowIdsSelector } from '@/ui/object/record-table/states/selectors/selectedRowIdsSelector';
|
||||
import { ActivityType, Person } from '~/generated/graphql';
|
||||
|
||||
export const useCreateActivityForPeople = () => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
|
||||
import { entityFieldsFamilyState } from '@/ui/data/field/states/entityFieldsFamilyState';
|
||||
import { entityFieldsFamilyState } from '@/ui/object/field/states/entityFieldsFamilyState';
|
||||
import { useGetPersonQuery } from '~/generated/graphql';
|
||||
|
||||
export const usePersonQuery = (id: string) => {
|
||||
|
||||
@ -2,9 +2,6 @@ import { getOperationName } from '@apollo/client/utilities';
|
||||
import { useRecoilCallback, useSetRecoilState } from 'recoil';
|
||||
|
||||
import { useFavorites } from '@/favorites/hooks/useFavorites';
|
||||
import { useResetTableRowSelection } from '@/ui/data/data-table/hooks/useResetTableRowSelection';
|
||||
import { selectedRowIdsSelector } from '@/ui/data/data-table/states/selectors/selectedRowIdsSelector';
|
||||
import { tableRowIdsState } from '@/ui/data/data-table/states/tableRowIdsState';
|
||||
import {
|
||||
IconCheckbox,
|
||||
IconHeart,
|
||||
@ -14,6 +11,9 @@ import {
|
||||
} from '@/ui/display/icon';
|
||||
import { actionBarEntriesState } from '@/ui/navigation/action-bar/states/actionBarEntriesState';
|
||||
import { contextMenuEntriesState } from '@/ui/navigation/context-menu/states/contextMenuEntriesState';
|
||||
import { useResetTableRowSelection } from '@/ui/object/record-table/hooks/useResetTableRowSelection';
|
||||
import { selectedRowIdsSelector } from '@/ui/object/record-table/states/selectors/selectedRowIdsSelector';
|
||||
import { tableRowIdsState } from '@/ui/object/record-table/states/tableRowIdsState';
|
||||
import {
|
||||
ActivityType,
|
||||
useDeleteManyPersonMutation,
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { useRecoilCallback } from 'recoil';
|
||||
|
||||
import { useResetTableRowSelection } from '@/ui/data/data-table/hooks/useResetTableRowSelection';
|
||||
import { isFetchingDataTableDataState } from '@/ui/data/data-table/states/isFetchingDataTableDataState';
|
||||
import { numberOfTableRowsState } from '@/ui/data/data-table/states/numberOfTableRowsState';
|
||||
import { tableRowIdsState } from '@/ui/data/data-table/states/tableRowIdsState';
|
||||
import { useResetTableRowSelection } from '@/ui/object/record-table/hooks/useResetTableRowSelection';
|
||||
import { isFetchingRecordTableDataState } from '@/ui/object/record-table/states/isFetchingRecordTableDataState';
|
||||
import { numberOfTableRowsState } from '@/ui/object/record-table/states/numberOfTableRowsState';
|
||||
import { tableRowIdsState } from '@/ui/object/record-table/states/tableRowIdsState';
|
||||
import { currentPageLocationState } from '@/ui/utilities/loading-state/states/currentPageLocationState';
|
||||
import { GetPeopleQuery } from '~/generated/graphql';
|
||||
|
||||
@ -17,7 +17,7 @@ import { peopleLinkedinUrlFamilyState } from '../states/peopleLinkedinUrlFamilyS
|
||||
import { peopleNameCellFamilyState } from '../states/peopleNamesFamilyState';
|
||||
import { peoplePhoneFamilyState } from '../states/peoplePhoneFamilyState';
|
||||
|
||||
export const useSetPeopleDataTable = () => {
|
||||
export const useSetPeopleRecordTable = () => {
|
||||
const resetTableRowSelection = useResetTableRowSelection();
|
||||
|
||||
const currentLocation = useLocation().pathname;
|
||||
@ -122,7 +122,7 @@ export const useSetPeopleDataTable = () => {
|
||||
|
||||
set(currentPageLocationState, currentLocation);
|
||||
|
||||
set(isFetchingDataTableDataState, false);
|
||||
set(isFetchingRecordTableDataState, false);
|
||||
},
|
||||
[currentLocation, resetTableRowSelection],
|
||||
);
|
||||
@ -5,14 +5,14 @@ import { peopleAvailableFieldDefinitions } from '@/people/constants/peopleAvaila
|
||||
import { getPeopleOptimisticEffectDefinition } from '@/people/graphql/optimistic-effect-definitions/getPeopleOptimisticEffectDefinition';
|
||||
import { usePersonTableContextMenuEntries } from '@/people/hooks/usePersonTableContextMenuEntries';
|
||||
import { useSpreadsheetPersonImport } from '@/people/hooks/useSpreadsheetPersonImport';
|
||||
import { DataTable } from '@/ui/data/data-table/components/DataTable';
|
||||
import { DataTableEffect } from '@/ui/data/data-table/components/DataTableEffect';
|
||||
import { TableContext } from '@/ui/data/data-table/contexts/TableContext';
|
||||
import { useUpsertDataTableItem } from '@/ui/data/data-table/hooks/useUpsertDataTableItem';
|
||||
import { TableOptionsDropdown } from '@/ui/data/data-table/options/components/TableOptionsDropdown';
|
||||
import { tableColumnsScopedState } from '@/ui/data/data-table/states/tableColumnsScopedState';
|
||||
import { tableFiltersScopedState } from '@/ui/data/data-table/states/tableFiltersScopedState';
|
||||
import { tableSortsScopedState } from '@/ui/data/data-table/states/tableSortsScopedState';
|
||||
import { RecordTable } from '@/ui/object/record-table/components/RecordTable';
|
||||
import { RecordTableEffect } from '@/ui/object/record-table/components/RecordTableEffect';
|
||||
import { TableContext } from '@/ui/object/record-table/contexts/TableContext';
|
||||
import { useUpsertRecordTableItem } from '@/ui/object/record-table/hooks/useUpsertRecordTableItem';
|
||||
import { TableOptionsDropdown } from '@/ui/object/record-table/options/components/TableOptionsDropdown';
|
||||
import { tableColumnsScopedState } from '@/ui/object/record-table/states/tableColumnsScopedState';
|
||||
import { tableFiltersScopedState } from '@/ui/object/record-table/states/tableFiltersScopedState';
|
||||
import { tableSortsScopedState } from '@/ui/object/record-table/states/tableSortsScopedState';
|
||||
import { ViewBar } from '@/views/components/ViewBar';
|
||||
import { useViewFields } from '@/views/hooks/internal/useViewFields';
|
||||
import { useView } from '@/views/hooks/useView';
|
||||
@ -45,7 +45,7 @@ export const PersonTable = () => {
|
||||
const setTableSorts = useSetRecoilState(tableSortsScopedState(tableScopeId));
|
||||
|
||||
const [updateEntityMutation] = useUpdateOnePersonMutation();
|
||||
const upsertDataTableItem = useUpsertDataTableItem();
|
||||
const upsertRecordTableItem = useUpsertRecordTableItem();
|
||||
|
||||
const { persistViewFields } = useViewFields(viewScopeId);
|
||||
const { setCurrentViewFields } = useView({
|
||||
@ -62,7 +62,7 @@ export const PersonTable = () => {
|
||||
if (!data.updateOnePerson) {
|
||||
return;
|
||||
}
|
||||
upsertDataTableItem(data.updateOnePerson);
|
||||
upsertRecordTableItem(data.updateOnePerson);
|
||||
},
|
||||
});
|
||||
};
|
||||
@ -108,7 +108,7 @@ export const PersonTable = () => {
|
||||
optionsDropdownScopeId="table-dropdown-option"
|
||||
/>
|
||||
<PersonTableEffect />
|
||||
<DataTableEffect
|
||||
<RecordTableEffect
|
||||
getRequestResultKey="people"
|
||||
useGetRequest={useGetPeopleQuery}
|
||||
getRequestOptimisticEffectDefinition={
|
||||
@ -119,7 +119,7 @@ export const PersonTable = () => {
|
||||
setContextMenuEntries={setContextMenuEntries}
|
||||
setActionBarEntries={setActionBarEntries}
|
||||
/>
|
||||
<DataTable
|
||||
<RecordTable
|
||||
updateEntityMutation={({
|
||||
variables,
|
||||
}: {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { peopleAvailableFieldDefinitions } from '@/people/constants/peopleAvailableFieldDefinitions';
|
||||
import { availableTableColumnsScopedState } from '@/ui/data/data-table/states/availableTableColumnsScopedState';
|
||||
import { TableRecoilScopeContext } from '@/ui/data/data-table/states/recoil-scope-contexts/TableRecoilScopeContext';
|
||||
import { tableColumnsScopedState } from '@/ui/data/data-table/states/tableColumnsScopedState';
|
||||
import { availableTableColumnsScopedState } from '@/ui/object/record-table/states/availableTableColumnsScopedState';
|
||||
import { TableRecoilScopeContext } from '@/ui/object/record-table/states/recoil-scope-contexts/TableRecoilScopeContext';
|
||||
import { tableColumnsScopedState } from '@/ui/object/record-table/states/tableColumnsScopedState';
|
||||
import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState';
|
||||
import { useView } from '@/views/hooks/useView';
|
||||
import { ViewType } from '@/views/types/ViewType';
|
||||
|
||||
Reference in New Issue
Block a user