-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9401a64
commit 8410e3b
Showing
17 changed files
with
65 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/twenty-front/src/modules/views/hooks/useResetCurrentView.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ectors/canPersistViewComponentSelector.ts → ...tates/selectors/canPersistViewSelector.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
packages/twenty-front/src/modules/views/states/selectors/canResetViewComponentSelector.ts
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
packages/twenty-front/src/modules/views/states/selectors/canResetViewSelector.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext'; | ||
import { selectorFamily } from 'recoil'; | ||
|
||
export const canResetViewSelector = selectorFamily({ | ||
key: 'canResetViewSelector', | ||
get: | ||
({ viewId }: { viewId: string }) => | ||
({ get }) => { | ||
return ( | ||
get(unsavedToUpsertViewFiltersComponentFamilyState(viewId)).length === | ||
0 && | ||
get(unsavedToUpsertViewFiltersComponentFamilyState(viewId)).length === | ||
0 && | ||
get(unsavedToUpsertViewFiltersComponentFamilyState(viewId)).length === | ||
0 && | ||
get(unsavedToUpsertViewFiltersComponentFamilyState(viewId)).length === 0 | ||
); | ||
}, | ||
instanceContext: ViewComponentInstanceContext, | ||
}); |
9 changes: 0 additions & 9 deletions
9
packages/twenty-front/src/modules/views/states/unsavedToDeleteViewFilterIdsComponentState.ts
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
packages/twenty-front/src/modules/views/states/unsavedToDeleteViewFilterIdsFamilyState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState'; | ||
|
||
// TODO: turn this into a family state per view id | ||
export const unsavedToDeleteViewFilterIdsFamilyState = | ||
createFamilyState<string[], string>({ | ||
key: 'unsavedToDeleteViewFilterIdsFamilyState', | ||
defaultValue: [], | ||
}); |
10 changes: 0 additions & 10 deletions
10
packages/twenty-front/src/modules/views/states/unsavedToDeleteViewSortIdsComponentState.ts
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
packages/twenty-front/src/modules/views/states/unsavedToDeleteViewSortIdsFamilyState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState'; | ||
|
||
export const unsavedToDeleteViewSortIdsFamilyState = | ||
createFamilyState<string[], string>({ | ||
key: 'unsavedToDeleteViewSortIdsFamilyState', | ||
defaultValue: [], | ||
}); |
11 changes: 0 additions & 11 deletions
11
packages/twenty-front/src/modules/views/states/unsavedToUpsertViewFiltersComponentState.ts
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
packages/twenty-front/src/modules/views/states/unsavedToUpsertViewFiltersFamilyState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { createFamilyState } from '@/ui/utilities/state/utils/createFamilyState'; | ||
import { ViewFilter } from '../types/ViewFilter'; | ||
|
||
export const unsavedToUpsertViewFiltersFamilyState = | ||
createFamilyState<ViewFilter[], string>({ | ||
key: 'unsavedToUpsertViewFiltersFamilyState', | ||
defaultValue: [], | ||
}); |
11 changes: 0 additions & 11 deletions
11
packages/twenty-front/src/modules/views/states/unsavedToUpsertViewSortsComponentState.ts
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
packages/twenty-front/src/modules/views/states/unsavedToUpsertViewSortsFamilyState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ViewSort } from '../types/ViewSort'; | ||
|
||
export const unsavedToUpsertViewSortsFamilyState = createFamilyState< | ||
ViewSort[], | ||
string | ||
>({ | ||
key: 'unsavedToUpsertViewSortsFamilyState', | ||
defaultValue: [], | ||
}); |