Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useForm refactor: resource for route to useForm #416

Merged
merged 5 commits into from
May 4, 2021

Conversation

mhrrmk
Copy link
Contributor

@mhrrmk mhrrmk commented May 3, 2021

Test me! 'MASTER'
Link to REFACTOR-FORM-HOOKS2

@refine-bot
Copy link
Contributor

Hello from PR Helper

Is your PR ready for review and processing? Mark the PR ready by including #pr-ready in a comment.

If you still have work to do, even after marking this ready. Put the PR on hold by including #pr-onhold in a comment.

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2021

Jest Coverage

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 76.28 50.85 55.15 75.78
File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 76.28 50.85 55.15 75.78
_core/src/components 100 100 0 100
_ index.ts 100 100 0 100
_core/src/components/authenticated 30 100 0 37.5
_ index.tsx 30 100 0 37.5 8-15
_core/src/components/buttons 100 100 50 100
_ index.ts 100 100 50 100
_core/src/components/buttons/clone 94.12 0 50 94.12
_ index.tsx 94.12 0 50 94.12 28
_core/src/components/buttons/create 92.86 0 50 92.86
_ index.tsx 92.86 0 50 92.86 23
_core/src/components/buttons/delete 92.31 50 33.33 91.67
_ index.tsx 92.31 50 33.33 91.67 58-60
_core/src/components/buttons/edit 94.44 75 50 94.44
_ index.tsx 94.44 75 50 94.44 35
_core/src/components/buttons/export 61.67 18.75 66.67 58.82
_ index.tsx 61.67 18.75 66.67 58.82 49,55-91,96
_core/src/components/buttons/import 74.42 41.67 42.86 72.97
_ index.tsx 74.42 41.67 42.86 72.97 43,48-65
_core/src/components/buttons/list 93.33 100 50 93.33
_ index.tsx 93.33 100 50 93.33 27
_core/src/components/buttons/refresh 95.24 75 50 94.74
_ index.tsx 95.24 75 50 94.74 41
_core/src/components/buttons/save 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/buttons/show 94.12 37.5 50 94.12
_ index.tsx 94.12 37.5 50 94.12 32
_core/src/components/containers 100 100 0 100
_ index.ts 100 100 0 100
_core/src/components/containers/admin 95.83 28.57 50 95.12
_ index.tsx 95.83 28.57 50 95.12 82,106
_core/src/components/containers/resource 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/containers/routeProvider 13.21 0 0 14.29
_ index.tsx 13.21 0 0 14.29 26-174
_core/src/components/crud 100 100 0 100
_ index.ts 100 100 0 100
_core/src/components/crud/create 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/crud/edit 95.45 92.86 50 95.45
_ index.tsx 95.45 92.86 50 95.45 66
_core/src/components/crud/list 95.83 80 100 95.83
_ index.tsx 95.83 80 100 95.83 41
_core/src/components/crud/show 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/fields 100 100 9.09 100
_ index.ts 100 100 9.09 100
_core/src/components/fields/boolean 100 83.33 100 100
_ index.tsx 100 83.33 100 100 20,22
_core/src/components/fields/date 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/fields/email 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/fields/file 100 75 100 100
_ index.tsx 100 75 100 100 14
_core/src/components/fields/image 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/fields/markdown 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/fields/number 100 80 100 100
_ index.tsx 100 80 100 100 34
_core/src/components/fields/richtext 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/fields/tag 100 75 100 100
_ index.tsx 100 75 100 100 9
_core/src/components/fields/text 57.14 100 0 80
_ index.tsx 57.14 100 0 80 12
_core/src/components/fields/url 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/layoutWrapper 83.33 50 66.67 83.33
_ index.tsx 83.33 50 66.67 83.33 32-39,44
_core/src/components/layoutWrapper/components 100 100 85.71 100
_ index.ts 100 100 85.71 100
_core/src/components/layoutWrapper/components/error 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/layoutWrapper/components/footer 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/layoutWrapper/components/header 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/layoutWrapper/components/layout 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/layoutWrapper/components/offLayoutArea 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/layoutWrapper/components/sider 84.85 66.67 57.14 89.29
_ index.tsx 84.85 66.67 57.14 89.29 38-39,56
_core/src/components/layoutWrapper/components/title 66.67 100 0 100
_ index.tsx 66.67 100 0 100
_core/src/components/notification 77.78 50 66.67 77.78
_ index.tsx 77.78 50 66.67 77.78 20,30-35,65-70
_core/src/components/notification/components 100 100 100 100
_ index.ts 100 100 100 100
_core/src/components/notification/components/notificationProgress 100 75 100 100
_ index.tsx 100 75 100 100 17
_core/src/components/pages 100 100 50 100
_ index.tsx 100 100 50 100
_core/src/components/pages/login 31.25 100 0 31.25
_ index.tsx 31.25 100 0 31.25 14-34
_core/src/components/pages/ready 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/components/table 100 100 100 100
_ index.ts 100 100 100 100
_core/src/components/table/components 100 100 0 100
_ index.ts 100 100 0 100
_core/src/components/table/components/filterDropdown 15.63 0 0 16.67
_ index.tsx 15.63 0 0 16.67 10-64
_core/src/contexts/admin 96.15 100 50 94.44
_ index.tsx 96.15 100 50 94.44 17
_core/src/contexts/auth 8.89 0 0 11.76
_ index.tsx 8.89 0 0 11.76 6-12,19-59
_core/src/contexts/components 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/contexts/data 62.96 100 16.67 62.96
_ index.tsx 62.96 100 16.67 62.96 7-16
_core/src/contexts/notification 87.88 75 77.78 86.21
_ actionTypes.ts 100 100 100 100
_ index.ts 100 100 100 100
_ notificationContext.tsx 83.33 66.67 60 80.95 11,27-29,39
_core/src/contexts/resource 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/contexts/translation 90 100 75 90
_ index.tsx 90 100 75 90 9
_core/src/definitions 100 100 100 100
_ index.ts 100 100 100 100
_core/src/definitions/config 100 100 100 100
_ index.ts 100 100 100 100
_core/src/definitions/helpers 100 100 50 100
_ index.ts 100 100 50 100
_core/src/definitions/helpers/importCSVMapper 100 100 100 100
_ index.ts 100 100 100 100
_core/src/definitions/helpers/userFriendlySeconds 100 100 100 100
_ index.ts 100 100 100 100
_core/src/definitions/render 88.89 75 100 88.89
_ index.tsx 88.89 75 100 88.89 15
_core/src/definitions/table 68.85 34.21 63.64 66.04
_ index.ts 68.85 34.21 63.64 66.04 23,43-53,111-125,132-137
_core/src/definitions/upload 11.11 0 0 11.76
_ index.ts 11.11 0 0 11.76 12-22,31-51
_core/src/hooks 69.49 10 42.86 73.21
_ index.ts 100 100 100 100
_ useFileUploadState.ts 17.65 0 0 21.43 5-17,21-30
_ useListResourceQueries.ts 85.19 50 66.67 85.19 11,27,46,51
_core/src/hooks/admin 100 100 100 100
_ index.ts 100 100 100 100
_ useMutationMode.ts 100 100 100 100
_ useSyncWithLocation.ts 100 100 100 100
_core/src/hooks/admin/useWarnAboutChange 100 100 100 100
_ index.ts 100 100 100 100
_core/src/hooks/auth 42.25 0 0 40.98
_ index.ts 100 100 0 100
_ useAuthenticated.ts 36.36 0 0 36.36 24-35
_ useGetIdentity.ts 28.57 0 0 33.33 29-60
_ useLogin.ts 38.46 100 0 38.46 21-39
_ useLogout.ts 36.36 0 0 40 17-26
_ usePermissions.ts 25 100 0 30 28-48
_core/src/hooks/data 64.79 35.87 60.34 64.84
_ index.ts 100 100 80 100
_ useApiUrl.ts 100 100 100 100
_ useCreate.ts 83.33 100 60 82.61 55-61
_ useCreateMany.tsx 85.71 100 60 85 49-53
_ useDelete.ts 50.7 30.3 54.55 53.13 59,75-101,113-150,160-168,201-204
_ useDeleteMany.ts 23.81 0 0 23.81 25-73
_ useList.ts 100 100 100 100
_ useMany.ts 85.71 0 66.67 85.71 30-32
_ useOne.ts 78.57 0 66.67 78.57 28-32
_ useUpdate.ts 50.68 34.48 54.55 52.31 57,74-100,109-144,159-167,181
_ useUpdateMany.ts 91.67 50 100 90.91 27
_core/src/hooks/fields 100 100 100 100
_ index.ts 100 100 100 100
_core/src/hooks/fields/useCheckboxGroup 96.55 62.5 100 95.45
_ index.ts 96.55 62.5 100 95.45 37
_core/src/hooks/fields/useRadioGroup 100 50 100 100
_ index.ts 100 50 100 100 28-29
_core/src/hooks/fields/useSelect 93.75 62.5 85.71 92
_ index.ts 93.75 62.5 85.71 92 49,97
_core/src/hooks/form 90.48 40 33.33 86.67
_ index.ts 100 100 20 100
_ useForm.ts 86.67 40 100 82.61 99-103,107
_core/src/hooks/form/useCloneForm 100 88.24 100 100
_ index.ts 100 100 100 100
_ useCloneForm.ts 100 88.24 100 100 56
_core/src/hooks/form/useCreateForm 63.04 25 22.22 61.9
_ index.ts 100 100 100 100
_ useCreateForm.ts 61.36 25 12.5 60.98 89-108,116-117,122-125,131
_core/src/hooks/form/useDrawerForm 65.22 37.1 42.86 60.98
_ index.ts 100 100 0 100
_ useDrawerForm.ts 63.64 37.1 50 60 59-61,69-71,80-81,107-123
_core/src/hooks/form/useEditForm 69.44 54.55 33.33 68.18
_ index.ts 100 100 100 100
_ useEditForm.ts 68.57 54.55 27.27 67.69 135-167,176-177,182-185,191
_core/src/hooks/form/useModalForm 68.18 43.48 42.86 65.85
_ index.ts 100 100 0 100
_ useModalForm.ts 66.67 43.48 50 65 72-74,82-85,94-95,123-137
_core/src/hooks/form/useStepsForm 45.45 0 0 40
_ index.ts 100 100 0 100
_ useStepsForm.ts 33.33 0 0 33.33 18-31
_core/src/hooks/navigation 100 87.5 100 100
_ index.ts 100 87.5 100 100 44-48
_core/src/hooks/notification 100 100 100 100
_ index.ts 100 100 100 100
_ useNotification.ts 100 100 100 100
_core/src/hooks/notification/useCancelNotification 100 100 100 100
_ index.tsx 100 100 100 100
_core/src/hooks/redirection 100 100 100 100
_ index.ts 100 100 100 100
_core/src/hooks/resource 100 100 100 100
_ index.ts 100 100 100 100
_core/src/hooks/resource/useResource 100 100 100 100
_ index.ts 100 100 100 100
_core/src/hooks/resource/useResourceWithRoute 90.91 50 100 90
_ index.ts 90.91 50 100 90 12
_core/src/hooks/show 100 100 100 100
_ index.ts 100 100 100 100
_ useShow.ts 100 100 100 100
_core/src/hooks/table 100 100 100 100
_ index.ts 100 100 100 100
_core/src/hooks/table/useEditableTable 83.33 50 42.86 87.5
_ index.ts 100 100 0 100
_ useEditableTable.ts 81.25 50 50 86.67 17,22
_core/src/hooks/table/useTable 75 61.76 66.67 69.81
_ index.ts 100 100 100 100
_ useTable.ts 74.19 61.76 50 69.23 48,60-73,108-121
_core/src/hooks/translate 100 75 100 100
_ index.ts 100 100 100 100
_ useGetLocale.ts 100 100 100 100
_ useSetLocale.ts 100 100 100 100
_ useTranslate.ts 100 75 100 100 9
_core/src/hooks/util 11.63 0 0 12.9
_ index.ts 100 100 0 100
_ useBase64Upload.ts 7.32 0 0 10 12-62
_core/test 97.67 90 92.86 97.56
_ dataMocks.ts 92.86 100 90.91 92.86 34
_ index.tsx 100 90 100 100 65
_json-server/src 88.31 63.83 77.78 86.57
_ index.ts 88.31 63.83 77.78 86.57 9-18,47-49,102-103,163
_json-server/test/create 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/deleteMany 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/deleteOne 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/getList 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/getMany 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/getOne 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/update 100 100 100 100
_ index.mock.ts 100 100 100 100
_json-server/test/updateMany 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/src 81.32 53.7 78.57 82.05
_ index.ts 81.32 53.7 78.57 82.05 23-32,50-61,97,173-178,216
_nestjsx-crud/test/create 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/deleteMany 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/deleteOne 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/getList 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/getMany 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/getOne 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/update 100 100 100 100
_ index.mock.ts 100 100 100 100
_nestjsx-crud/test/updateMany 100 100 100 100
_ index.mock.ts 100 100 100 100
_strapi/src 87.18 60.42 81.48 85.07
_ dataProvider.ts 87.18 60.42 81.48 85.07 9-18,36-39,121-122,158
_strapi/src/helpers 100 100 100 100
_ auth.ts 100 100 100 100
_strapi/test/auth 100 100 100 100
_ index.mock.ts 100 100 100 100
_strapi/test/dataProvider 100 100 100 100
_ index.mock.ts 100 100 100 100

@omeraplak omeraplak linked an issue May 4, 2021 that may be closed by this pull request
@mhrrmk mhrrmk added the pr-ready label May 4, 2021
@omeraplak omeraplak merged commit a7d00ce into master May 4, 2021
@omeraplak omeraplak deleted the refactor-form-hooks2 branch May 4, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

form hook'ları resource name'i de dışarıdan alabilsin
4 participants