@leav/ui 0.0.1-alpha-2 → 0.0.1-alpha-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (687) hide show
  1. package/dist/libs/ui/tsconfig.tsbuildinfo +1 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -0
  3. package/package.json +5 -1
  4. package/apollo.apiKey.js.example +0 -7
  5. package/codegen.ts +0 -48
  6. package/graphql_codegen.ts +0 -19
  7. package/jest.config.js +0 -21
  8. package/scripts/createComponent.js +0 -79
  9. package/setupTests.ts +0 -21
  10. package/src/__mocks__/common/application.ts +0 -30
  11. package/src/__mocks__/common/attribute.ts +0 -164
  12. package/src/__mocks__/common/filter.ts +0 -41
  13. package/src/__mocks__/common/form.tsx +0 -291
  14. package/src/__mocks__/common/import.ts +0 -31
  15. package/src/__mocks__/common/label.ts +0 -7
  16. package/src/__mocks__/common/library.ts +0 -111
  17. package/src/__mocks__/common/mockSearchContextProvider.tsx +0 -23
  18. package/src/__mocks__/common/record.ts +0 -27
  19. package/src/__mocks__/common/tree.ts +0 -33
  20. package/src/__mocks__/common/treeElements.ts +0 -73
  21. package/src/__mocks__/common/value.ts +0 -48
  22. package/src/__mocks__/common/versionProfile.ts +0 -10
  23. package/src/__mocks__/common/view.ts +0 -28
  24. package/src/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.ts +0 -66
  25. package/src/__mocks__/mockQuery/mockGetRecordsFromLibraryQuery.ts +0 -42
  26. package/src/__mocks__/mockQuery/mockGetViewListQuery.ts +0 -52
  27. package/src/__mocks__/react-i18next.js +0 -73
  28. package/src/_gqlTypes/index.ts +0 -3853
  29. package/src/_queries/applications/applicationDetailsFragment.ts +0 -27
  30. package/src/_queries/applications/checkApplicationExistence.ts +0 -12
  31. package/src/_queries/applications/getApplicationDetails.ts +0 -16
  32. package/src/_queries/applications/getApplicationsModulesQuery.ts +0 -14
  33. package/src/_queries/applications/saveApplicationMutation.ts +0 -14
  34. package/src/_queries/attributes/attributeDetailsFragment.ts +0 -57
  35. package/src/_queries/attributes/checkAttributeExistenceQuery.ts +0 -12
  36. package/src/_queries/attributes/deleteAttributeMutation.ts +0 -12
  37. package/src/_queries/attributes/getAttributeByIdQuery.ts +0 -16
  38. package/src/_queries/attributes/getAttributeWithEmbeddedFields.ts +0 -32
  39. package/src/_queries/attributes/getAttributesByLib.ts +0 -48
  40. package/src/_queries/attributes/getAttributesQuery.ts +0 -19
  41. package/src/_queries/attributes/getVersionProfilesQuery.ts +0 -15
  42. package/src/_queries/attributes/getVersionableAttributesByLibrary.ts +0 -24
  43. package/src/_queries/attributes/saveAttributeMutation.ts +0 -14
  44. package/src/_queries/export/exportQuery.ts +0 -10
  45. package/src/_queries/files/createDirectory.ts +0 -14
  46. package/src/_queries/files/forcePreviewsGenerationMutation.ts +0 -22
  47. package/src/_queries/files/getDirectoryDataQuery.ts +0 -53
  48. package/src/_queries/files/getUploadUpdates.ts +0 -23
  49. package/src/_queries/files/uploadMutation.ts +0 -18
  50. package/src/_queries/import/importExcel.ts +0 -11
  51. package/src/_queries/libraries/checkLibraryExistenceQuery.ts +0 -12
  52. package/src/_queries/libraries/deleteLibraryMutation.ts +0 -12
  53. package/src/_queries/libraries/getLibrariesQuery.ts +0 -29
  54. package/src/_queries/libraries/getLibraryByIdQuery.ts +0 -16
  55. package/src/_queries/libraries/getLibraryDetailExtendQuery.ts +0 -259
  56. package/src/_queries/libraries/getLibraryPermissionsQuery.ts +0 -20
  57. package/src/_queries/libraries/getLibraryPreviewsSettingsQuery.ts +0 -29
  58. package/src/_queries/libraries/libraryDetailsFragment.ts +0 -87
  59. package/src/_queries/libraries/saveLibraryMutation.ts +0 -14
  60. package/src/_queries/permissions/isAllowedQuery.ts +0 -18
  61. package/src/_queries/records/createRecordMutation.ts +0 -26
  62. package/src/_queries/records/deactivateRecordsMutation.ts +0 -15
  63. package/src/_queries/records/doesFileExistAsChild.ts +0 -10
  64. package/src/_queries/records/getFileDataQuery.ts +0 -77
  65. package/src/_queries/records/getRecordColumnsValues.ts +0 -90
  66. package/src/_queries/records/getRecordFormQuery.ts +0 -62
  67. package/src/_queries/records/getRecordPropertiesQuery.ts +0 -165
  68. package/src/_queries/records/getRecordUpdatesSubscription.ts +0 -31
  69. package/src/_queries/records/getRecordsFromLibraryQuery.ts +0 -137
  70. package/src/_queries/records/indexRecordsMutation.ts +0 -10
  71. package/src/_queries/records/recordFormAttributeFragment.ts +0 -94
  72. package/src/_queries/tasks/cancelTaskMutation.ts +0 -10
  73. package/src/_queries/trees/checkTreeExistenceQuery.ts +0 -12
  74. package/src/_queries/trees/deleteTreeMutation.ts +0 -12
  75. package/src/_queries/trees/getTreeByIdQuery.ts +0 -16
  76. package/src/_queries/trees/getTreeLibraries.ts +0 -30
  77. package/src/_queries/trees/getTreesQuery.ts +0 -18
  78. package/src/_queries/trees/saveTreeMutation.ts +0 -14
  79. package/src/_queries/trees/treeDetailsFragment.ts +0 -24
  80. package/src/_queries/trees/treeNodeChildrenQuery.ts +0 -48
  81. package/src/_queries/userData/getUserData.ts +0 -13
  82. package/src/_queries/userData/saveUserData.ts +0 -13
  83. package/src/_queries/values/deleteValueMutation.ts +0 -14
  84. package/src/_queries/values/saveValueBatchMutation.ts +0 -34
  85. package/src/_queries/values/valueDetailsFragment.ts +0 -76
  86. package/src/_queries/values/valuesVersionFragment.ts +0 -23
  87. package/src/_queries/views/deleteViewMutation.ts +0 -23
  88. package/src/_queries/views/getViewById.ts +0 -16
  89. package/src/_queries/views/getViewsListQuery.ts +0 -17
  90. package/src/_queries/views/saveViewMutation.ts +0 -16
  91. package/src/_queries/views/viewDetailsFragment.ts +0 -59
  92. package/src/_tests/testUtils.tsx +0 -46
  93. package/src/_utils/getFiltersFromRequest.ts +0 -136
  94. package/src/_utils/getRequestFromFilter.ts +0 -61
  95. package/src/_utils/index.ts +0 -189
  96. package/src/antdTheme/index.ts +0 -108
  97. package/src/antdTheme/types.ts +0 -5
  98. package/src/components/AttributePicker/AttributePicker.test.tsx +0 -286
  99. package/src/components/AttributePicker/AttributePicker.tsx +0 -71
  100. package/src/components/AttributePicker/AttributesList/AttributesList.tsx +0 -330
  101. package/src/components/AttributePicker/AttributesList/index.ts +0 -4
  102. package/src/components/AttributePicker/index.ts +0 -4
  103. package/src/components/AttributesSelectionList/Attribute/Attribute.tsx +0 -67
  104. package/src/components/AttributesSelectionList/Attribute/index.ts +0 -5
  105. package/src/components/AttributesSelectionList/AttributesSelectionList.test.tsx +0 -115
  106. package/src/components/AttributesSelectionList/AttributesSelectionList.tsx +0 -132
  107. package/src/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.tsx +0 -69
  108. package/src/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.ts +0 -5
  109. package/src/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.tsx +0 -96
  110. package/src/components/AttributesSelectionList/SelectedAttributesList/index.ts +0 -5
  111. package/src/components/AttributesSelectionList/_types.ts +0 -16
  112. package/src/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.ts +0 -11
  113. package/src/components/AttributesSelectionList/index.ts +0 -5
  114. package/src/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.ts +0 -10
  115. package/src/components/AttributesSelectionList/reducer/attributesSelectionListReducer.test.tsx +0 -202
  116. package/src/components/AttributesSelectionList/reducer/attributesSelectionListReducer.tsx +0 -118
  117. package/src/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.ts +0 -16
  118. package/src/components/AttributesSelectionList/sharedComponents.tsx +0 -18
  119. package/src/components/BasicButton/BasicButton.test.tsx +0 -14
  120. package/src/components/BasicButton/BasicButton.tsx +0 -36
  121. package/src/components/BasicButton/index.ts +0 -4
  122. package/src/components/CreateDirectory/CreateDirectory.test.tsx +0 -291
  123. package/src/components/CreateDirectory/CreateDirectory.tsx +0 -222
  124. package/src/components/CreateDirectory/index.ts +0 -4
  125. package/src/components/DeactivateRecordsModal/DeactivateRecordsModal.test.tsx +0 -147
  126. package/src/components/DeactivateRecordsModal/DeactivateRecordsModal.tsx +0 -78
  127. package/src/components/DeactivateRecordsModal/index.ts +0 -4
  128. package/src/components/Dimmer/Dimmer.test.tsx +0 -21
  129. package/src/components/Dimmer/Dimmer.tsx +0 -27
  130. package/src/components/Dimmer/index.ts +0 -5
  131. package/src/components/EditApplication/EditApplication.test.tsx +0 -315
  132. package/src/components/EditApplication/EditApplication.tsx +0 -64
  133. package/src/components/EditApplication/EditApplicationInfo/EditApplicationInfo.tsx +0 -166
  134. package/src/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.tsx +0 -316
  135. package/src/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/ModuleSelector/ModuleSelector.tsx +0 -51
  136. package/src/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/ModuleSelector/index.ts +0 -5
  137. package/src/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/index.ts +0 -5
  138. package/src/components/EditApplication/EditApplicationInfo/index.ts +0 -4
  139. package/src/components/EditApplication/_types.ts +0 -12
  140. package/src/components/EditApplication/index.ts +0 -5
  141. package/src/components/EditAttributeModal/EditAttribute/EditAttribute.tsx +0 -68
  142. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.tsx +0 -188
  143. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.tsx +0 -382
  144. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedLibraryForm/LinkedLibraryForm.tsx +0 -88
  145. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedLibraryForm/index.ts +0 -4
  146. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedTreeForm/LinkedTreeForm.tsx +0 -84
  147. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedTreeForm/index.ts +0 -4
  148. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/ValuesVersionsForm/ValuesVersionsForm.tsx +0 -100
  149. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/ValuesVersionsForm/index.ts +0 -4
  150. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/index.ts +0 -4
  151. package/src/components/EditAttributeModal/EditAttribute/EditAttributeInfo/index.ts +0 -4
  152. package/src/components/EditAttributeModal/EditAttribute/index.ts +0 -4
  153. package/src/components/EditAttributeModal/EditAttributeModal.test.tsx +0 -335
  154. package/src/components/EditAttributeModal/EditAttributeModal.tsx +0 -178
  155. package/src/components/EditAttributeModal/index.ts +0 -4
  156. package/src/components/EditLibraryModal/EditLibrary/EditLibrary.tsx +0 -119
  157. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributeCell/AttributeCell.tsx +0 -61
  158. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributeCell/index.ts +0 -4
  159. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.tsx +0 -273
  160. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.tsx +0 -52
  161. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/index.ts +0 -4
  162. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/index.ts +0 -4
  163. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/EditLibraryAttributes.test.tsx +0 -116
  164. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/EditLibraryAttributes.tsx +0 -56
  165. package/src/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/index.ts +0 -4
  166. package/src/components/EditLibraryModal/EditLibrary/EditLibraryIndexation/EditLibraryIndexation.tsx +0 -134
  167. package/src/components/EditLibraryModal/EditLibrary/EditLibraryIndexation/index.ts +0 -4
  168. package/src/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfo.tsx +0 -159
  169. package/src/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/EditLibraryInfoForm.tsx +0 -306
  170. package/src/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/index.ts +0 -4
  171. package/src/components/EditLibraryModal/EditLibrary/EditLibraryInfo/index.ts +0 -4
  172. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditLibraryPreviewsSettings.test.tsx +0 -85
  173. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditLibraryPreviewsSettings.tsx +0 -51
  174. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.test.tsx +0 -76
  175. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.tsx +0 -180
  176. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/SizesEditor/SizesEditor.tsx +0 -182
  177. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/SizesEditor/index.ts +0 -4
  178. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/index.ts +0 -4
  179. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/PreviewsSettingsList.tsx +0 -241
  180. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/index.ts +0 -4
  181. package/src/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/index.ts +0 -4
  182. package/src/components/EditLibraryModal/EditLibrary/index.ts +0 -4
  183. package/src/components/EditLibraryModal/EditLibraryModal.test.tsx +0 -346
  184. package/src/components/EditLibraryModal/EditLibraryModal.tsx +0 -178
  185. package/src/components/EditLibraryModal/index.ts +0 -4
  186. package/src/components/EditTreeModal/EditTree/EditTree.tsx +0 -68
  187. package/src/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfo.tsx +0 -171
  188. package/src/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.tsx +0 -216
  189. package/src/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.tsx +0 -239
  190. package/src/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/index.ts +0 -4
  191. package/src/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/index.ts +0 -4
  192. package/src/components/EditTreeModal/EditTree/EditTreeInfo/index.ts +0 -4
  193. package/src/components/EditTreeModal/EditTree/index.ts +0 -4
  194. package/src/components/EditTreeModal/EditTreeModal.test.tsx +0 -516
  195. package/src/components/EditTreeModal/EditTreeModal.tsx +0 -167
  196. package/src/components/EditTreeModal/index.ts +0 -4
  197. package/src/components/EntityCard/EntityCard.test.tsx +0 -50
  198. package/src/components/EntityCard/EntityCard.tsx +0 -177
  199. package/src/components/EntityCard/_types.ts +0 -9
  200. package/src/components/EntityCard/index.ts +0 -5
  201. package/src/components/EntityPreview/EntityPreview.test.tsx +0 -50
  202. package/src/components/EntityPreview/EntityPreview.tsx +0 -17
  203. package/src/components/EntityPreview/EntityPreviewList/EntityPreviewList.tsx +0 -106
  204. package/src/components/EntityPreview/EntityPreviewList/SimplisticEntityPreview/SimplisticEntityPreview.tsx +0 -34
  205. package/src/components/EntityPreview/EntityPreviewList/SimplisticEntityPreview/index.ts +0 -5
  206. package/src/components/EntityPreview/EntityPreviewList/index.ts +0 -5
  207. package/src/components/EntityPreview/EntityPreviewTile/EntityPreviewTile.tsx +0 -105
  208. package/src/components/EntityPreview/EntityPreviewTile/index.ts +0 -5
  209. package/src/components/EntityPreview/_types.ts +0 -25
  210. package/src/components/EntityPreview/index.ts +0 -5
  211. package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +0 -43
  212. package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -46
  213. package/src/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.tsx +0 -59
  214. package/src/components/ErrorBoundary/ErrorBoundaryContent/index.ts +0 -5
  215. package/src/components/ErrorBoundary/index.ts +0 -4
  216. package/src/components/ErrorDisplay/ErrorDisplay.test.tsx +0 -15
  217. package/src/components/ErrorDisplay/ErrorDisplay.tsx +0 -67
  218. package/src/components/ErrorDisplay/index.ts +0 -4
  219. package/src/components/ErrorMessage/ErrorMessage.test.tsx +0 -30
  220. package/src/components/ErrorMessage/ErrorMessage.tsx +0 -45
  221. package/src/components/ErrorMessage/index.ts +0 -5
  222. package/src/components/ExportModal/ExportModal.test.tsx +0 -44
  223. package/src/components/ExportModal/ExportModal.tsx +0 -205
  224. package/src/components/ExportModal/index.ts +0 -4
  225. package/src/components/FieldsGroup/FieldsGroup.test.tsx +0 -18
  226. package/src/components/FieldsGroup/FieldsGroup.tsx +0 -43
  227. package/src/components/FieldsGroup/index.ts +0 -5
  228. package/src/components/FloatingMenu/FloatingMenu.test.tsx +0 -81
  229. package/src/components/FloatingMenu/FloatingMenu.tsx +0 -94
  230. package/src/components/FloatingMenu/_types.ts +0 -20
  231. package/src/components/FloatingMenu/index.ts +0 -5
  232. package/src/components/ImageLoading/ImageLoading.tsx +0 -32
  233. package/src/components/ImageLoading/index.ts +0 -4
  234. package/src/components/ImageMissing/ImageMissing.tsx +0 -38
  235. package/src/components/ImageMissing/index.ts +0 -4
  236. package/src/components/ImportModal/ImportModal.tsx +0 -287
  237. package/src/components/ImportModal/ImportModalConfigStep/ImportKeysSelector/ImportKeysSelector.tsx +0 -60
  238. package/src/components/ImportModal/ImportModalConfigStep/ImportKeysSelector/index.ts +0 -5
  239. package/src/components/ImportModal/ImportModalConfigStep/ImportMappingRowTitle/ImportMappingRowTitle.tsx +0 -37
  240. package/src/components/ImportModal/ImportModalConfigStep/ImportMappingRowTitle/index.ts +0 -5
  241. package/src/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.tsx +0 -298
  242. package/src/components/ImportModal/ImportModalConfigStep/ImportScheduleModal/ImportScheduleModal.tsx +0 -52
  243. package/src/components/ImportModal/ImportModalConfigStep/ImportScheduleModal/index.ts +0 -5
  244. package/src/components/ImportModal/ImportModalConfigStep/ImportSheetSettings/ImportSheetSettings.tsx +0 -155
  245. package/src/components/ImportModal/ImportModalConfigStep/ImportSheetSettings/index.ts +0 -5
  246. package/src/components/ImportModal/ImportModalConfigStep/index.ts +0 -5
  247. package/src/components/ImportModal/ImportModalDoneStep/ImportModalDoneStep.tsx +0 -28
  248. package/src/components/ImportModal/ImportModalDoneStep/index.ts +0 -5
  249. package/src/components/ImportModal/ImportModalProcessingStep/ImportModalProcessingStep.tsx +0 -17
  250. package/src/components/ImportModal/ImportModalProcessingStep/index.ts +0 -5
  251. package/src/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.tsx +0 -212
  252. package/src/components/ImportModal/ImportModalSelectFileStep/index.ts +0 -5
  253. package/src/components/ImportModal/_types.ts +0 -44
  254. package/src/components/ImportModal/importReducer/ImportReducerContext.ts +0 -17
  255. package/src/components/ImportModal/importReducer/importReducer.test.ts +0 -125
  256. package/src/components/ImportModal/importReducer/importReducer.ts +0 -171
  257. package/src/components/ImportModal/importReducer/index.ts +0 -5
  258. package/src/components/ImportModal/index.ts +0 -4
  259. package/src/components/LibraryItemsList/DisplayOptions/DisplayOptions.tsx +0 -121
  260. package/src/components/LibraryItemsList/DisplayOptions/index.ts +0 -5
  261. package/src/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.test.tsx +0 -29
  262. package/src/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.tsx +0 -23
  263. package/src/components/LibraryItemsList/DisplayTypeSelector/index.ts +0 -5
  264. package/src/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.tsx +0 -341
  265. package/src/components/LibraryItemsList/FiltersDropdown/index.ts +0 -5
  266. package/src/components/LibraryItemsList/FiltersPanel/Filter/Filter.test.tsx +0 -75
  267. package/src/components/LibraryItemsList/FiltersPanel/Filter/Filter.tsx +0 -544
  268. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.tsx +0 -134
  269. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.ts +0 -5
  270. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.test.tsx +0 -38
  271. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.tsx +0 -23
  272. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.ts +0 -5
  273. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.test.tsx +0 -14
  274. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.tsx +0 -43
  275. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.ts +0 -5
  276. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.test.tsx +0 -14
  277. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.tsx +0 -36
  278. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.ts +0 -5
  279. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.test.tsx +0 -14
  280. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.tsx +0 -50
  281. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.ts +0 -5
  282. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.test.tsx +0 -16
  283. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.tsx +0 -52
  284. package/src/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.ts +0 -5
  285. package/src/components/LibraryItemsList/FiltersPanel/Filter/index.ts +0 -5
  286. package/src/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.tsx +0 -27
  287. package/src/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.ts +0 -5
  288. package/src/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.test.tsx +0 -23
  289. package/src/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.tsx +0 -54
  290. package/src/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.ts +0 -5
  291. package/src/components/LibraryItemsList/FiltersPanel/FiltersOptions.tsx +0 -192
  292. package/src/components/LibraryItemsList/FiltersPanel/FiltersPanel.tsx +0 -190
  293. package/src/components/LibraryItemsList/FiltersPanel/index.ts +0 -5
  294. package/src/components/LibraryItemsList/FiltersPanel/mustHideValue.ts +0 -19
  295. package/src/components/LibraryItemsList/IconViewType/IconViewType.tsx +0 -24
  296. package/src/components/LibraryItemsList/IconViewType/index.ts +0 -5
  297. package/src/components/LibraryItemsList/LibraryItemsList.test.tsx +0 -107
  298. package/src/components/LibraryItemsList/LibraryItemsList.tsx +0 -55
  299. package/src/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.tsx +0 -288
  300. package/src/components/LibraryItemsList/LibraryItemsListContent/index.ts +0 -5
  301. package/src/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.tsx +0 -106
  302. package/src/components/LibraryItemsList/LibraryItemsListEmpty/index.ts +0 -5
  303. package/src/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.test.tsx +0 -20
  304. package/src/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.tsx +0 -36
  305. package/src/components/LibraryItemsList/LibraryItemsListPagination/index.ts +0 -5
  306. package/src/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.test.tsx +0 -39
  307. package/src/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.tsx +0 -70
  308. package/src/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.ts +0 -6
  309. package/src/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.test.tsx +0 -48
  310. package/src/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.tsx +0 -93
  311. package/src/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.ts +0 -5
  312. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.tsx +0 -88
  313. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.ts +0 -5
  314. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.test.tsx +0 -75
  315. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.tsx +0 -78
  316. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.test.tsx +0 -38
  317. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.tsx +0 -91
  318. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.ts +0 -5
  319. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.test.tsx +0 -13
  320. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.tsx +0 -46
  321. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.ts +0 -5
  322. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.tsx +0 -33
  323. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.tsx +0 -117
  324. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.ts +0 -5
  325. package/src/components/LibraryItemsList/LibraryItemsListTable/Cell/index.ts +0 -5
  326. package/src/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.css +0 -3
  327. package/src/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.test.tsx +0 -45
  328. package/src/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.tsx +0 -144
  329. package/src/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.ts +0 -5
  330. package/src/components/LibraryItemsList/LibraryItemsListTable/Header/Header.test.tsx +0 -73
  331. package/src/components/LibraryItemsList/LibraryItemsListTable/Header/Header.tsx +0 -197
  332. package/src/components/LibraryItemsList/LibraryItemsListTable/Header/index.ts +0 -5
  333. package/src/components/LibraryItemsList/LibraryItemsListTable/Table.test.tsx +0 -39
  334. package/src/components/LibraryItemsList/LibraryItemsListTable/Table.tsx +0 -328
  335. package/src/components/LibraryItemsList/LibraryItemsListTable/index.ts +0 -5
  336. package/src/components/LibraryItemsList/MenuItemList/MenuItemList.test.tsx +0 -75
  337. package/src/components/LibraryItemsList/MenuItemList/MenuItemList.tsx +0 -104
  338. package/src/components/LibraryItemsList/MenuItemList/index.ts +0 -5
  339. package/src/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.test.tsx +0 -29
  340. package/src/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.tsx +0 -107
  341. package/src/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.ts +0 -5
  342. package/src/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.test.tsx +0 -18
  343. package/src/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.tsx +0 -182
  344. package/src/components/LibraryItemsList/MenuItemListSelected/index.ts +0 -5
  345. package/src/components/LibraryItemsList/MenuSelection/MenuSelection.test.tsx +0 -16
  346. package/src/components/LibraryItemsList/MenuSelection/MenuSelection.tsx +0 -74
  347. package/src/components/LibraryItemsList/MenuSelection/index.ts +0 -5
  348. package/src/components/LibraryItemsList/MenuView/MenuView.test.tsx +0 -20
  349. package/src/components/LibraryItemsList/MenuView/MenuView.tsx +0 -248
  350. package/src/components/LibraryItemsList/MenuView/index.ts +0 -5
  351. package/src/components/LibraryItemsList/SearchItems/SearchItems.test.tsx +0 -20
  352. package/src/components/LibraryItemsList/SearchItems/SearchItems.tsx +0 -37
  353. package/src/components/LibraryItemsList/SearchItems/index.ts +0 -5
  354. package/src/components/LibraryItemsList/Sidebar/Sidebar.test.tsx +0 -66
  355. package/src/components/LibraryItemsList/Sidebar/Sidebar.tsx +0 -71
  356. package/src/components/LibraryItemsList/Sidebar/index.ts +0 -5
  357. package/src/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.test.tsx +0 -40
  358. package/src/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.tsx +0 -322
  359. package/src/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.ts +0 -5
  360. package/src/components/LibraryItemsList/TileDisplay/TileDisplay.test.tsx +0 -50
  361. package/src/components/LibraryItemsList/TileDisplay/TileDisplay.tsx +0 -75
  362. package/src/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.ts +0 -13
  363. package/src/components/LibraryItemsList/TileDisplay/index.ts +0 -5
  364. package/src/components/LibraryItemsList/VersionsPanel/VersionsPanel.test.tsx +0 -24
  365. package/src/components/LibraryItemsList/VersionsPanel/VersionsPanel.tsx +0 -85
  366. package/src/components/LibraryItemsList/VersionsPanel/index.ts +0 -5
  367. package/src/components/LibraryItemsList/ViewPanel/EditView/EditView.test.tsx +0 -41
  368. package/src/components/LibraryItemsList/ViewPanel/EditView/EditView.tsx +0 -176
  369. package/src/components/LibraryItemsList/ViewPanel/EditView/index.ts +0 -5
  370. package/src/components/LibraryItemsList/ViewPanel/View/View.test.tsx +0 -36
  371. package/src/components/LibraryItemsList/ViewPanel/View/View.tsx +0 -262
  372. package/src/components/LibraryItemsList/ViewPanel/View/index.ts +0 -5
  373. package/src/components/LibraryItemsList/ViewPanel/ViewPanel.test.tsx +0 -143
  374. package/src/components/LibraryItemsList/ViewPanel/ViewPanel.tsx +0 -299
  375. package/src/components/LibraryItemsList/ViewPanel/index.ts +0 -5
  376. package/src/components/LibraryItemsList/constants.ts +0 -24
  377. package/src/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.ts +0 -18
  378. package/src/components/LibraryItemsList/helpers/displayTypeToPreviewSize.ts +0 -15
  379. package/src/components/LibraryItemsList/helpers/extractAttributesFromLibrary.ts +0 -86
  380. package/src/components/LibraryItemsList/helpers/getFieldFromKey.ts +0 -50
  381. package/src/components/LibraryItemsList/helpers/getFieldsFromView.ts +0 -23
  382. package/src/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.ts +0 -14
  383. package/src/components/LibraryItemsList/helpers/getSortFieldByAttributeType.ts +0 -16
  384. package/src/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.test.tsx +0 -146
  385. package/src/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.tsx +0 -118
  386. package/src/components/LibraryItemsList/hooks/useSearchReducer/_types.ts +0 -80
  387. package/src/components/LibraryItemsList/hooks/useSearchReducer/index.ts +0 -6
  388. package/src/components/LibraryItemsList/hooks/useSearchReducer/searchContext.ts +0 -11
  389. package/src/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.test.ts +0 -380
  390. package/src/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.ts +0 -302
  391. package/src/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.ts +0 -9
  392. package/src/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.ts +0 -54
  393. package/src/components/LibraryItemsList/index.ts +0 -4
  394. package/src/components/LibraryItemsList/manageItems.test.ts +0 -367
  395. package/src/components/LibraryItemsList/manageItems.ts +0 -124
  396. package/src/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.test.tsx +0 -49
  397. package/src/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.tsx +0 -53
  398. package/src/components/LibraryItemsList/shared/DeactivateRecordBtn/index.ts +0 -5
  399. package/src/components/LibraryItemsList/shared/SelectCellsBtn.tsx +0 -50
  400. package/src/components/LibraryPicker/LibrariesList/LibrariesList.tsx +0 -211
  401. package/src/components/LibraryPicker/LibrariesList/index.ts +0 -4
  402. package/src/components/LibraryPicker/LibraryPicker.test.tsx +0 -207
  403. package/src/components/LibraryPicker/LibraryPicker.tsx +0 -62
  404. package/src/components/LibraryPicker/index.ts +0 -4
  405. package/src/components/List/List.test.tsx +0 -66
  406. package/src/components/List/List.tsx +0 -95
  407. package/src/components/List/index.ts +0 -5
  408. package/src/components/Loading/Loading.tsx +0 -23
  409. package/src/components/Loading/index.ts +0 -4
  410. package/src/components/RecordCard/RecordCard.test.tsx +0 -40
  411. package/src/components/RecordCard/RecordCard.tsx +0 -64
  412. package/src/components/RecordCard/_types.ts +0 -19
  413. package/src/components/RecordCard/index.ts +0 -5
  414. package/src/components/RecordEdition/EditRecord/EditRecord.test.tsx +0 -137
  415. package/src/components/RecordEdition/EditRecord/EditRecord.tsx +0 -140
  416. package/src/components/RecordEdition/EditRecord/EditRecordSkeleton.tsx +0 -29
  417. package/src/components/RecordEdition/EditRecord/_types.ts +0 -154
  418. package/src/components/RecordEdition/EditRecord/helpers/extractFormElements/extractFormElements.test.tsx +0 -115
  419. package/src/components/RecordEdition/EditRecord/helpers/extractFormElements/extractFormElements.tsx +0 -26
  420. package/src/components/RecordEdition/EditRecord/helpers/extractFormElements/index.ts +0 -5
  421. package/src/components/RecordEdition/EditRecord/helpers/getActiveFieldValues/getActiveFieldValues.ts +0 -8
  422. package/src/components/RecordEdition/EditRecord/helpers/getActiveFieldValues/index.ts +0 -4
  423. package/src/components/RecordEdition/EditRecord/helpers/isCurrentVersion/index.ts +0 -4
  424. package/src/components/RecordEdition/EditRecord/helpers/isCurrentVersion/isCurrentVersion.test.ts +0 -87
  425. package/src/components/RecordEdition/EditRecord/helpers/isCurrentVersion/isCurrentVersion.ts +0 -27
  426. package/src/components/RecordEdition/EditRecord/hooks/__mocks__/useDeleteValueMutation.ts +0 -8
  427. package/src/components/RecordEdition/EditRecord/hooks/__mocks__/useSaveValueMutation.ts +0 -8
  428. package/src/components/RecordEdition/EditRecord/hooks/helpers/getPropertyCacheFieldName.ts +0 -4
  429. package/src/components/RecordEdition/EditRecord/hooks/useExecuteDeleteValueMutation.ts +0 -50
  430. package/src/components/RecordEdition/EditRecord/hooks/useExecuteSaveValueBatchMutation.ts +0 -75
  431. package/src/components/RecordEdition/EditRecord/hooks/useRecordEditionContext.ts +0 -9
  432. package/src/components/RecordEdition/EditRecord/hooks/useSaveValueBatchMutation.test.ts +0 -134
  433. package/src/components/RecordEdition/EditRecord/index.ts +0 -5
  434. package/src/components/RecordEdition/EditRecord/reducers/linkFieldReducer/index.ts +0 -5
  435. package/src/components/RecordEdition/EditRecord/reducers/linkFieldReducer/linkFieldReducer.test.ts +0 -173
  436. package/src/components/RecordEdition/EditRecord/reducers/linkFieldReducer/linkFieldReducer.ts +0 -205
  437. package/src/components/RecordEdition/EditRecord/reducers/standardFieldReducer/index.ts +0 -5
  438. package/src/components/RecordEdition/EditRecord/reducers/standardFieldReducer/standardFieldReducer.test.ts +0 -473
  439. package/src/components/RecordEdition/EditRecord/reducers/standardFieldReducer/standardFieldReducer.ts +0 -434
  440. package/src/components/RecordEdition/EditRecord/shared/AddValueBtn/AddValueBtn.test.tsx +0 -27
  441. package/src/components/RecordEdition/EditRecord/shared/AddValueBtn/AddValueBtn.tsx +0 -36
  442. package/src/components/RecordEdition/EditRecord/shared/AddValueBtn/index.ts +0 -5
  443. package/src/components/RecordEdition/EditRecord/shared/DeleteAllValuesBtn/DeleteAllValuesBtn.test.tsx +0 -25
  444. package/src/components/RecordEdition/EditRecord/shared/DeleteAllValuesBtn/DeleteAllValuesBtn.tsx +0 -48
  445. package/src/components/RecordEdition/EditRecord/shared/DeleteAllValuesBtn/index.ts +0 -5
  446. package/src/components/RecordEdition/EditRecord/shared/DeleteValueBtn/DeleteValueBtn.test.tsx +0 -26
  447. package/src/components/RecordEdition/EditRecord/shared/DeleteValueBtn/DeleteValueBtn.tsx +0 -40
  448. package/src/components/RecordEdition/EditRecord/shared/DeleteValueBtn/index.ts +0 -5
  449. package/src/components/RecordEdition/EditRecord/shared/FieldFooter/FieldFooter.test.tsx +0 -17
  450. package/src/components/RecordEdition/EditRecord/shared/FieldFooter/FieldFooter.tsx +0 -42
  451. package/src/components/RecordEdition/EditRecord/shared/FieldFooter/index.ts +0 -5
  452. package/src/components/RecordEdition/EditRecord/shared/InheritedFieldLabel/InheritedFieldLabel.test.tsx +0 -28
  453. package/src/components/RecordEdition/EditRecord/shared/InheritedFieldLabel/InheritedFieldLabel.tsx +0 -33
  454. package/src/components/RecordEdition/EditRecord/shared/InheritedFieldLabel/index.ts +0 -5
  455. package/src/components/RecordEdition/EditRecord/shared/NoValue/NoValue.test.tsx +0 -29
  456. package/src/components/RecordEdition/EditRecord/shared/NoValue/NoValue.tsx +0 -56
  457. package/src/components/RecordEdition/EditRecord/shared/NoValue/index.ts +0 -5
  458. package/src/components/RecordEdition/EditRecord/shared/UpdatedFieldIcon/UpdatedFieldIcon.tsx +0 -18
  459. package/src/components/RecordEdition/EditRecord/shared/UpdatedFieldIcon/index.ts +0 -5
  460. package/src/components/RecordEdition/EditRecord/shared/ValueDetailsBtn/ValueDetailsBtn.test.tsx +0 -54
  461. package/src/components/RecordEdition/EditRecord/shared/ValueDetailsBtn/ValueDetailsBtn.tsx +0 -45
  462. package/src/components/RecordEdition/EditRecord/shared/ValueDetailsBtn/index.ts +0 -5
  463. package/src/components/RecordEdition/EditRecord/shared/ValuesVersionBtn/ValuesVersionBtn.test.tsx +0 -49
  464. package/src/components/RecordEdition/EditRecord/shared/ValuesVersionBtn/ValuesVersionBtn.tsx +0 -104
  465. package/src/components/RecordEdition/EditRecord/shared/ValuesVersionBtn/index.ts +0 -5
  466. package/src/components/RecordEdition/EditRecord/shared/ValuesVersionIndicator/ValuesVersionIndicator.tsx +0 -42
  467. package/src/components/RecordEdition/EditRecord/shared/ValuesVersionIndicator/index.ts +0 -5
  468. package/src/components/RecordEdition/EditRecord/uiElements/Container/Container.test.tsx +0 -35
  469. package/src/components/RecordEdition/EditRecord/uiElements/Container/Container.tsx +0 -37
  470. package/src/components/RecordEdition/EditRecord/uiElements/Container/index.ts +0 -5
  471. package/src/components/RecordEdition/EditRecord/uiElements/ErrorField/ErrorField.test.tsx +0 -35
  472. package/src/components/RecordEdition/EditRecord/uiElements/ErrorField/ErrorField.tsx +0 -82
  473. package/src/components/RecordEdition/EditRecord/uiElements/ErrorField/index.ts +0 -5
  474. package/src/components/RecordEdition/EditRecord/uiElements/FormDivider/FormDivider.test.tsx +0 -25
  475. package/src/components/RecordEdition/EditRecord/uiElements/FormDivider/FormDivider.tsx +0 -14
  476. package/src/components/RecordEdition/EditRecord/uiElements/FormDivider/index.ts +0 -5
  477. package/src/components/RecordEdition/EditRecord/uiElements/FormTabs/FormTabs.test.tsx +0 -35
  478. package/src/components/RecordEdition/EditRecord/uiElements/FormTabs/FormTabs.tsx +0 -50
  479. package/src/components/RecordEdition/EditRecord/uiElements/FormTabs/index.ts +0 -5
  480. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.tsx +0 -60
  481. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/FloatingMenuHandler/index.ts +0 -5
  482. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/LinkField.test.tsx +0 -593
  483. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/LinkField.tsx +0 -494
  484. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.tsx +0 -16
  485. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/RecordIdentityCell/index.ts +0 -5
  486. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.tsx +0 -83
  487. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/ValuesAdd/QuickSearch/index.ts +0 -5
  488. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/ValuesAdd/ValuesAdd.tsx +0 -419
  489. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/ValuesAdd/index.ts +0 -5
  490. package/src/components/RecordEdition/EditRecord/uiElements/LinkField/index.ts +0 -5
  491. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardField.test.tsx +0 -627
  492. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardField.tsx +0 -320
  493. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.tsx +0 -26
  494. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.tsx +0 -38
  495. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.tsx +0 -62
  496. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/DateRangeInput.tsx +0 -67
  497. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.tsx +0 -34
  498. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.tsx +0 -53
  499. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.tsx +0 -67
  500. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.tsx +0 -44
  501. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/StandardFieldValue.tsx +0 -629
  502. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.tsx +0 -79
  503. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/ValuesList/index.ts +0 -5
  504. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/StandardFieldValue/index.ts +0 -5
  505. package/src/components/RecordEdition/EditRecord/uiElements/StandardField/index.ts +0 -5
  506. package/src/components/RecordEdition/EditRecord/uiElements/TextBlock/TextBlock.test.tsx +0 -15
  507. package/src/components/RecordEdition/EditRecord/uiElements/TextBlock/TextBlock.tsx +0 -13
  508. package/src/components/RecordEdition/EditRecord/uiElements/TextBlock/index.ts +0 -5
  509. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/TreeField.test.tsx +0 -249
  510. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/TreeField.tsx +0 -349
  511. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/TreeFieldValue/TreeFieldValue.tsx +0 -68
  512. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/TreeFieldValue/index.ts +0 -5
  513. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/ValuesAdd/ValuesAdd.tsx +0 -198
  514. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/ValuesAdd/index.ts +0 -5
  515. package/src/components/RecordEdition/EditRecord/uiElements/TreeField/index.ts +0 -5
  516. package/src/components/RecordEdition/EditRecord/uiElements/index.tsx +0 -27
  517. package/src/components/RecordEdition/EditRecordBtn/EditRecordBtn.test.tsx +0 -30
  518. package/src/components/RecordEdition/EditRecordBtn/EditRecordBtn.tsx +0 -52
  519. package/src/components/RecordEdition/EditRecordBtn/index.ts +0 -5
  520. package/src/components/RecordEdition/EditRecordModal/EditRecordModal.test.tsx +0 -84
  521. package/src/components/RecordEdition/EditRecordModal/EditRecordModal.tsx +0 -531
  522. package/src/components/RecordEdition/EditRecordModal/EditRecordModalHeader/EditRecordModalHeader.tsx +0 -93
  523. package/src/components/RecordEdition/EditRecordModal/EditRecordModalHeader/index.ts +0 -5
  524. package/src/components/RecordEdition/EditRecordModal/ValuesVersionSummary/ValuesVersionSummary.tsx +0 -57
  525. package/src/components/RecordEdition/EditRecordModal/ValuesVersionSummary/index.ts +0 -5
  526. package/src/components/RecordEdition/EditRecordModal/creationErrorContext.ts +0 -12
  527. package/src/components/RecordEdition/EditRecordModal/index.ts +0 -5
  528. package/src/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.test.tsx +0 -159
  529. package/src/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.tsx +0 -33
  530. package/src/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.test.tsx +0 -36
  531. package/src/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.tsx +0 -46
  532. package/src/components/RecordEdition/EditRecordSidebar/PropertiesList/index.ts +0 -5
  533. package/src/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.test.tsx +0 -50
  534. package/src/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.tsx +0 -107
  535. package/src/components/RecordEdition/EditRecordSidebar/RecordSummary/index.ts +0 -5
  536. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.tsx +0 -75
  537. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.ts +0 -5
  538. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.tsx +0 -56
  539. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.ts +0 -5
  540. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.tsx +0 -109
  541. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.tsx +0 -106
  542. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.ts +0 -5
  543. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.tsx +0 -96
  544. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.ts +0 -5
  545. package/src/components/RecordEdition/EditRecordSidebar/ValueDetails/index.ts +0 -5
  546. package/src/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.tsx +0 -91
  547. package/src/components/RecordEdition/EditRecordSidebar/ValuesVersions/index.ts +0 -5
  548. package/src/components/RecordEdition/EditRecordSidebar/index.ts +0 -5
  549. package/src/components/RecordEdition/editRecordModalReducer/editRecordModalReducer.test.ts +0 -174
  550. package/src/components/RecordEdition/editRecordModalReducer/editRecordModalReducer.ts +0 -155
  551. package/src/components/RecordEdition/editRecordModalReducer/editRecordModalReducerContext.ts +0 -15
  552. package/src/components/RecordEdition/editRecordModalReducer/index.ts +0 -5
  553. package/src/components/RecordEdition/editRecordModalReducer/useEditRecordModalReducer.ts +0 -7
  554. package/src/components/RecordEdition/index.ts +0 -4
  555. package/src/components/RecordPreviewWithModal/FileModal/FileModal.test.tsx +0 -357
  556. package/src/components/RecordPreviewWithModal/FileModal/FileModal.tsx +0 -71
  557. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/AudioFile/AudioFile.tsx +0 -27
  558. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/AudioFile/index.ts +0 -5
  559. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/DocumentFile/DocumentFile.tsx +0 -44
  560. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/DocumentFile/index.ts +0 -5
  561. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.tsx +0 -103
  562. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalSidebar/FileModalSidebar.tsx +0 -127
  563. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalSidebar/index.ts +0 -5
  564. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/ImageFile/ImageFile.tsx +0 -52
  565. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/ImageFile/index.ts +0 -5
  566. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/NoDisplayFile/NoDisplayFile.tsx +0 -79
  567. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/NoDisplayFile/index.ts +0 -5
  568. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/VideoFile/VideoFile.tsx +0 -33
  569. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/VideoFile/index.ts +0 -5
  570. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/_types.ts +0 -11
  571. package/src/components/RecordPreviewWithModal/FileModal/FileModalContent/index.ts +0 -5
  572. package/src/components/RecordPreviewWithModal/FileModal/_constants.ts +0 -5
  573. package/src/components/RecordPreviewWithModal/FileModal/index.ts +0 -5
  574. package/src/components/RecordPreviewWithModal/RecordPreviewWithModal.test.tsx +0 -48
  575. package/src/components/RecordPreviewWithModal/RecordPreviewWithModal.tsx +0 -84
  576. package/src/components/RecordPreviewWithModal/index.ts +0 -4
  577. package/src/components/SearchModal/SearchModal.test.tsx +0 -38
  578. package/src/components/SearchModal/SearchModal.tsx +0 -85
  579. package/src/components/SearchModal/index.ts +0 -4
  580. package/src/components/SelectTreeNode/SelectTreeNode.test.tsx +0 -100
  581. package/src/components/SelectTreeNode/SelectTreeNode.tsx +0 -232
  582. package/src/components/SelectTreeNode/index.ts +0 -4
  583. package/src/components/SelectTreeNodeModal/SelectTreeNodeModal.test.tsx +0 -35
  584. package/src/components/SelectTreeNodeModal/SelectTreeNodeModal.tsx +0 -75
  585. package/src/components/SelectTreeNodeModal/index.ts +0 -5
  586. package/src/components/SimpleErrorBoundary/SimpleErrorBoundary.test.tsx +0 -24
  587. package/src/components/SimpleErrorBoundary/SimpleErrorBoundary.tsx +0 -39
  588. package/src/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.tsx +0 -41
  589. package/src/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/index.ts +0 -5
  590. package/src/components/SimpleErrorBoundary/index.ts +0 -4
  591. package/src/components/SubmitStateNotifier/SubmitStateNotifier.test.tsx +0 -13
  592. package/src/components/SubmitStateNotifier/SubmitStateNotifier.tsx +0 -83
  593. package/src/components/SubmitStateNotifier/_types.ts +0 -4
  594. package/src/components/SubmitStateNotifier/index.ts +0 -5
  595. package/src/components/TreePicker/TreePicker.test.tsx +0 -208
  596. package/src/components/TreePicker/TreePicker.tsx +0 -60
  597. package/src/components/TreePicker/TreesList/TreesList.tsx +0 -208
  598. package/src/components/TreePicker/TreesList/index.ts +0 -4
  599. package/src/components/TreePicker/index.ts +0 -4
  600. package/src/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.test.tsx +0 -161
  601. package/src/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.tsx +0 -146
  602. package/src/components/TriggerPreviewsGenerationModal/index.ts +0 -2
  603. package/src/components/UploadFiles/UploadFiles.test.tsx +0 -200
  604. package/src/components/UploadFiles/UploadFiles.tsx +0 -406
  605. package/src/components/UploadFiles/index.ts +0 -4
  606. package/src/components/ValuesVersionConfigurator/ValuesVersionConfigurator.test.tsx +0 -106
  607. package/src/components/ValuesVersionConfigurator/ValuesVersionConfigurator.tsx +0 -72
  608. package/src/components/ValuesVersionConfigurator/VersionTree/VersionTree.tsx +0 -125
  609. package/src/components/ValuesVersionConfigurator/VersionTree/index.ts +0 -5
  610. package/src/components/ValuesVersionConfigurator/index.ts +0 -5
  611. package/src/components/index.ts +0 -40
  612. package/src/constants.ts +0 -52
  613. package/src/contexts/LangContext/LangContext.tsx +0 -9
  614. package/src/contexts/LangContext/_types.ts +0 -9
  615. package/src/contexts/LangContext/index.ts +0 -5
  616. package/src/contexts/UserContext/UserContext.ts +0 -7
  617. package/src/contexts/UserContext/index.ts +0 -2
  618. package/src/contexts/UserContext/types.ts +0 -11
  619. package/src/contexts/index.ts +0 -5
  620. package/src/gqlFragments/index.ts +0 -4
  621. package/src/gqlFragments/recordIdentityFragment.ts +0 -21
  622. package/src/gqlPossibleTypes/index.ts +0 -28
  623. package/src/hooks/index.ts +0 -17
  624. package/src/hooks/useAntdLocale/index.ts +0 -4
  625. package/src/hooks/useAntdLocale/useAntdLocale.ts +0 -17
  626. package/src/hooks/useAppLang/index.ts +0 -4
  627. package/src/hooks/useAppLang/useAppLang.tsx +0 -39
  628. package/src/hooks/useAuth/index.ts +0 -4
  629. package/src/hooks/useAuth/useAuth.ts +0 -23
  630. package/src/hooks/useCanEditRecord/index.ts +0 -1
  631. package/src/hooks/useCanEditRecord/useCanEditRecord.test.tsx +0 -195
  632. package/src/hooks/useCanEditRecord/useCanEditRecord.ts +0 -71
  633. package/src/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.ts +0 -54
  634. package/src/hooks/useExecuteDeleteViewMutation/useExecuteDeleteViewMutation.ts +0 -29
  635. package/src/hooks/useGetLibraryDetailExtendedQuery/useGetLibraryDetailExtendedQuery.ts +0 -30
  636. package/src/hooks/useGetPreparedFileData/useGetPreparedFileData.ts +0 -54
  637. package/src/hooks/useGetRecordForm/index.ts +0 -5
  638. package/src/hooks/useGetRecordForm/useGetRecordForm.test.tsx +0 -159
  639. package/src/hooks/useGetRecordForm/useGetRecordForm.ts +0 -153
  640. package/src/hooks/useGetRecordUpdatesSubscription/index.ts +0 -4
  641. package/src/hooks/useGetRecordUpdatesSubscription/useGetRecordUpdatesSubscription.ts +0 -21
  642. package/src/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.ts +0 -82
  643. package/src/hooks/useLang/__mocks__/index.ts +0 -5
  644. package/src/hooks/useLang/__mocks__/useLang.tsx +0 -13
  645. package/src/hooks/useLang/index.ts +0 -5
  646. package/src/hooks/useLang/useLang.test.tsx +0 -34
  647. package/src/hooks/useLang/useLang.tsx +0 -17
  648. package/src/hooks/useLibraryVersionTrees/index.ts +0 -4
  649. package/src/hooks/useLibraryVersionTrees/useLibraryVersionTrees.test.tsx +0 -95
  650. package/src/hooks/useLibraryVersionTrees/useLibraryVersionTrees.ts +0 -35
  651. package/src/hooks/useLocalStorage/index.ts +0 -4
  652. package/src/hooks/useLocalStorage/useLocalStorage.ts +0 -23
  653. package/src/hooks/useRecordsConsultationHistory/index.ts +0 -5
  654. package/src/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.ts +0 -38
  655. package/src/hooks/useRefreshFieldValues/index.ts +0 -4
  656. package/src/hooks/useRefreshFieldValues/useRefreshFieldValues.test.tsx +0 -75
  657. package/src/hooks/useRefreshFieldValues/useRefreshFieldValues.ts +0 -63
  658. package/src/hooks/useRefreshToken/index.ts +0 -4
  659. package/src/hooks/useRefreshToken/useRefreshToken.ts +0 -34
  660. package/src/hooks/useSharedTranslation/__mocks__/index.ts +0 -4
  661. package/src/hooks/useSharedTranslation/__mocks__/useSharedTranslation.ts +0 -21
  662. package/src/hooks/useSharedTranslation/index.ts +0 -4
  663. package/src/hooks/useSharedTranslation/useSharedTranslation.ts +0 -45
  664. package/src/hooks/useUser/index.ts +0 -1
  665. package/src/hooks/useUser/useUser.test.tsx +0 -28
  666. package/src/hooks/useUser/useUser.ts +0 -15
  667. package/src/hooks/useValuesCacheUpdate/index.ts +0 -4
  668. package/src/hooks/useValuesCacheUpdate/useValuesCacheUpdate.ts +0 -56
  669. package/src/index.ts +0 -12
  670. package/src/locales/en/shared.json +0 -576
  671. package/src/locales/fr/shared.json +0 -578
  672. package/src/testing/MockedLangContextProvider/MockedLangContextProvider.tsx +0 -17
  673. package/src/testing/MockedLangContextProvider/index.ts +0 -5
  674. package/src/testing/MockedUserContextProvider/MockedUserContextProvider.tsx +0 -27
  675. package/src/testing/MockedUserContextProvider/index.ts +0 -5
  676. package/src/testing/index.ts +0 -4
  677. package/src/types/attributes.ts +0 -23
  678. package/src/types/index.ts +0 -8
  679. package/src/types/misc.ts +0 -3
  680. package/src/types/records.ts +0 -32
  681. package/src/types/scalars.ts +0 -4
  682. package/src/types/search.ts +0 -207
  683. package/src/types/trees.ts +0 -20
  684. package/src/types/values.ts +0 -8
  685. package/src/types/views.ts +0 -39
  686. package/tsconfig.build.json +0 -21
  687. package/tsconfig.json +0 -20
@@ -1,380 +0,0 @@
1
- // Copyright LEAV Solutions 2017
2
- // This file is released under LGPL V3
3
- // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
- import {AttributeConditionFilter, FilterType, SidebarContentType} from '_ui/types/search';
5
- import {AttributeType, SortOrder} from '_ui/_gqlTypes';
6
- import {mockAttributeSimple} from '_ui/__mocks__/common/attribute';
7
- import {mockLibrarySimple} from '_ui/__mocks__/common/library';
8
- import {mockRecord} from '_ui/__mocks__/common/record';
9
- import searchReducer, {initialSearchState, SearchActionTypes} from './searchReducer';
10
-
11
- describe('searchReducer', () => {
12
- test('UPDATE_RESULT', async () => {
13
- const newState = searchReducer(
14
- {...initialSearchState, loading: true},
15
- {
16
- type: SearchActionTypes.UPDATE_RESULT,
17
- records: [
18
- {
19
- whoAmI: {
20
- ...mockRecord,
21
- id: '123456',
22
- label: 'My record'
23
- },
24
- index: 0,
25
- fields: []
26
- }
27
- ],
28
- totalCount: 42
29
- }
30
- );
31
-
32
- expect(newState.records).toHaveLength(1);
33
- expect(newState.records[0].whoAmI.id).toBe('123456');
34
- expect(newState.totalCount).toBe(42);
35
- expect(newState.loading).toBe(false);
36
- });
37
-
38
- test('SET_PAGINATION', async () => {
39
- const newState = searchReducer(
40
- {...initialSearchState},
41
- {
42
- type: SearchActionTypes.SET_PAGINATION,
43
- page: 2
44
- }
45
- );
46
-
47
- expect(newState.pagination).toBe(2);
48
- });
49
-
50
- test('SET_OFFSET', async () => {
51
- const newState = searchReducer(
52
- {...initialSearchState},
53
- {
54
- type: SearchActionTypes.SET_OFFSET,
55
- offset: 50
56
- }
57
- );
58
-
59
- expect(newState.offset).toBe(50);
60
- });
61
-
62
- test('SET_LOADING', async () => {
63
- const newState = searchReducer(
64
- {...initialSearchState},
65
- {
66
- type: SearchActionTypes.SET_LOADING,
67
- loading: true
68
- }
69
- );
70
-
71
- expect(newState.loading).toBe(true);
72
- });
73
-
74
- test('SET_SORT', async () => {
75
- const newState = searchReducer(
76
- {...initialSearchState},
77
- {
78
- type: SearchActionTypes.SET_SORT,
79
- sort: {
80
- order: SortOrder.desc,
81
- field: 'label'
82
- }
83
- }
84
- );
85
-
86
- expect(newState.sort).toEqual({
87
- order: SortOrder.desc,
88
- field: 'label'
89
- });
90
- });
91
-
92
- test('CANCEL_SORT', async () => {
93
- const newState = searchReducer(
94
- {...initialSearchState},
95
- {
96
- type: SearchActionTypes.CANCEL_SORT
97
- }
98
- );
99
-
100
- expect(newState.sort).toBe(undefined);
101
- });
102
-
103
- test('SET_ATTRIBUTES', async () => {
104
- const newState = searchReducer(
105
- {...initialSearchState},
106
- {
107
- type: SearchActionTypes.SET_ATTRIBUTES,
108
- attributes: [{...mockAttributeSimple, isLink: false, isMultiple: false, library: mockLibrarySimple.id}]
109
- }
110
- );
111
-
112
- expect(newState.attributes.length).toBe(1);
113
- expect(newState.attributes[0].id).toBe(mockAttributeSimple.id);
114
- });
115
-
116
- test('SET_FIELDS', async () => {
117
- const newState = searchReducer(
118
- {...initialSearchState},
119
- {
120
- type: SearchActionTypes.SET_FIELDS,
121
- fields: [
122
- {
123
- id: 'field',
124
- type: AttributeType.simple,
125
- library: 'test',
126
- label: 'my field',
127
- key: '123456'
128
- }
129
- ]
130
- }
131
- );
132
-
133
- expect(newState.fields.length).toBe(1);
134
- expect(newState.fields[0].id).toBe('field');
135
- });
136
-
137
- test('SET_FULLTEXT', async () => {
138
- const newState = searchReducer(
139
- {...initialSearchState},
140
- {
141
- type: SearchActionTypes.SET_FULLTEXT,
142
- fullText: 'test'
143
- }
144
- );
145
-
146
- expect(newState.fullText).toBe('test');
147
- });
148
-
149
- test('SET_FILTERS', async () => {
150
- const filter = {
151
- type: FilterType.ATTRIBUTE,
152
- index: 1,
153
- key: '1',
154
- value: {value: 'test'},
155
- active: true,
156
- condition: AttributeConditionFilter.EQUAL
157
- // FIXME: missing attribute
158
- };
159
-
160
- const newState = searchReducer(
161
- {...initialSearchState},
162
- {
163
- type: SearchActionTypes.SET_FILTERS,
164
- filters: [filter]
165
- }
166
- );
167
-
168
- expect(newState.filters).toEqual(expect.arrayContaining([expect.objectContaining(filter)]));
169
- });
170
-
171
- test('RESET_FILTERS', async () => {
172
- const newState = searchReducer({...initialSearchState}, {type: SearchActionTypes.RESET_FILTERS});
173
-
174
- expect(newState.filters).toHaveLength(0);
175
- expect(newState.loading).toBe(true);
176
- });
177
-
178
- test('DISABLE_FILTERS', async () => {
179
- const filter = {
180
- type: FilterType.ATTRIBUTE,
181
- index: 1,
182
- key: '1',
183
- value: {value: 'test'},
184
- active: true,
185
- condition: AttributeConditionFilter.EQUAL
186
- };
187
-
188
- const newState = searchReducer(
189
- {...initialSearchState, filters: [filter]},
190
- {type: SearchActionTypes.DISABLE_FILTERS}
191
- );
192
-
193
- expect(newState.filters).toHaveLength(1);
194
- expect(newState.filters[0].active).toBe(false);
195
- expect(newState.loading).toBe(true);
196
- });
197
-
198
- test('ENABLE_FILTERS', async () => {
199
- const filter = {
200
- type: FilterType.ATTRIBUTE,
201
- index: 1,
202
- key: '1',
203
- value: {value: 'test'},
204
- active: false,
205
- condition: AttributeConditionFilter.EQUAL
206
- };
207
-
208
- const newState = searchReducer(
209
- {...initialSearchState, filters: [filter]},
210
- {type: SearchActionTypes.ENABLE_FILTERS}
211
- );
212
-
213
- expect(newState.filters).toHaveLength(1);
214
- expect(newState.filters[0].active).toBe(true);
215
- expect(newState.loading).toBe(true);
216
- });
217
-
218
- test('APPLY_FILTERS', async () => {
219
- const filter = {
220
- type: FilterType.ATTRIBUTE,
221
- index: 1,
222
- key: 'id',
223
- value: {value: 'test'},
224
- active: true,
225
- condition: AttributeConditionFilter.EQUAL
226
- };
227
-
228
- const newState = searchReducer(
229
- {...initialSearchState, filters: [filter]},
230
- {type: SearchActionTypes.APPLY_FILTERS}
231
- );
232
-
233
- expect(newState.filters).toHaveLength(1);
234
- expect(newState.loading).toBe(true);
235
- });
236
-
237
- test('SET_VALUES_VERSIONS', async () => {
238
- const valuesVersions = {
239
- my_tree: {
240
- label: 'My node',
241
- id: '123456'
242
- }
243
- };
244
-
245
- const newState = searchReducer(
246
- {
247
- ...initialSearchState,
248
- valuesVersions: {
249
- some_tree: {
250
- label: 'Some node',
251
- id: '987654'
252
- }
253
- }
254
- },
255
- {
256
- type: SearchActionTypes.SET_VALUES_VERSIONS,
257
- valuesVersions
258
- }
259
- );
260
-
261
- expect(Object.keys(newState.valuesVersions)).toHaveLength(2);
262
- expect(newState.valuesVersions.my_tree.id).toBe('123456');
263
- expect(newState.valuesVersions.some_tree.id).toBe('987654');
264
- });
265
-
266
- test('TOGGLE_TRANSPARENCY', () => {
267
- const newState = searchReducer(initialSearchState, {type: SearchActionTypes.TOGGLE_TRANSPARENCY});
268
- expect(newState.showTransparency).toBe(true);
269
-
270
- const newState2 = searchReducer(newState, {type: SearchActionTypes.TOGGLE_TRANSPARENCY});
271
- expect(newState2.showTransparency).toBe(false);
272
- });
273
-
274
- test('TOGGLE_SIDEBAR', () => {
275
- const newState = searchReducer(initialSearchState, {type: SearchActionTypes.TOGGLE_SIDEBAR});
276
- expect(newState.sideBar.visible).toBe(true);
277
-
278
- const newState2 = searchReducer(newState, {type: SearchActionTypes.TOGGLE_SIDEBAR});
279
- expect(newState2.sideBar.visible).toBe(false);
280
- });
281
-
282
- test('SET_SIDEBAR', () => {
283
- const newState = searchReducer(initialSearchState, {
284
- type: SearchActionTypes.SET_SIDEBAR,
285
- sidebarType: SidebarContentType.view,
286
- visible: true
287
- });
288
-
289
- expect(newState.sideBar.type).toBe(SidebarContentType.view);
290
- expect(newState.sideBar.visible).toBe(true);
291
- });
292
-
293
- test('SET_SELECTION', () => {
294
- const newState = searchReducer(initialSearchState, {
295
- type: SearchActionTypes.SET_SELECTION,
296
- selected: [{id: '123456', label: 'My record', library: 'test_lib'}]
297
- });
298
- expect(newState.selection.selected).toEqual([{id: '123456', label: 'My record', library: 'test_lib'}]);
299
-
300
- const newStateWithAllSelected = searchReducer(
301
- {...initialSearchState, selection: {selected: [], allSelected: true}},
302
- {
303
- type: SearchActionTypes.SET_SELECTION,
304
- selected: [{id: '123456', label: 'My record', library: 'test_lib'}]
305
- }
306
- );
307
- expect(newStateWithAllSelected.selection.selected).toEqual([
308
- {id: '123456', label: 'My record', library: 'test_lib'}
309
- ]);
310
- expect(newStateWithAllSelected.selection.allSelected).toBe(false);
311
- });
312
-
313
- test('TOGGLE_RECORD_SELECTION', async () => {
314
- const newState = searchReducer(
315
- {
316
- ...initialSearchState,
317
- selection: {
318
- selected: [
319
- {id: '1', label: 'My record 1', library: 'test_lib'},
320
- {id: '2', label: 'My record 2', library: 'test_lib'},
321
- {id: '3', label: 'My record 3', library: 'test_lib'}
322
- ],
323
- allSelected: false
324
- }
325
- },
326
- {
327
- type: SearchActionTypes.TOGGLE_RECORD_SELECTION,
328
- record: {id: '2', label: 'My record', library: 'test_lib'}
329
- }
330
- );
331
- expect(newState.selection.selected).toEqual([
332
- {id: '1', label: 'My record 1', library: 'test_lib'},
333
- {id: '3', label: 'My record 3', library: 'test_lib'}
334
- ]);
335
-
336
- const newState2 = searchReducer(newState, {
337
- type: SearchActionTypes.TOGGLE_RECORD_SELECTION,
338
- record: {id: '2', label: 'My record 2', library: 'test_lib'}
339
- });
340
- expect(newState2.selection.selected).toEqual([
341
- {id: '1', label: 'My record 1', library: 'test_lib'},
342
- {id: '3', label: 'My record 3', library: 'test_lib'},
343
- {id: '2', label: 'My record 2', library: 'test_lib'}
344
- ]);
345
- });
346
-
347
- test('SELECT_ALL', () => {
348
- const newState = searchReducer(initialSearchState, {type: SearchActionTypes.SELECT_ALL});
349
- expect(newState.selection.allSelected).toBe(true);
350
-
351
- const newStateWithSelection = searchReducer(
352
- {
353
- ...initialSearchState,
354
- selection: {selected: [{id: '123456', label: 'My record', library: 'test_lib'}], allSelected: false}
355
- },
356
- {type: SearchActionTypes.SELECT_ALL}
357
- );
358
- expect(newStateWithSelection.selection.selected).toEqual([]);
359
- expect(newStateWithSelection.selection.allSelected).toBe(true);
360
- });
361
-
362
- test('CLEAR_SELECTION', () => {
363
- const newState = searchReducer(
364
- {
365
- ...initialSearchState,
366
- selection: {
367
- selected: [
368
- {id: '1', label: 'My record 1', library: 'test_lib'},
369
- {id: '2', label: 'My record 2', library: 'test_lib'},
370
- {id: '3', label: 'My record 3', library: 'test_lib'}
371
- ],
372
- allSelected: false
373
- }
374
- },
375
- {type: SearchActionTypes.CLEAR_SELECTION}
376
- );
377
- expect(newState.selection.selected).toEqual([]);
378
- expect(newState.selection.allSelected).toBe(false);
379
- });
380
- });
@@ -1,302 +0,0 @@
1
- // Copyright LEAV Solutions 2017
2
- // This file is released under LGPL V3
3
- // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
- import {ApolloError} from '@apollo/client';
5
- import getFieldsFromView from '_ui/components/LibraryItemsList/helpers/getFieldsFromView';
6
- import {IAttribute, IField, IFilter, ISelectedRecord, SearchMode, SidebarContentType} from '_ui/types/search';
7
- import {IValueVersion} from '_ui/types/values';
8
- import {IView, IViewDisplay} from '_ui/types/views';
9
- import {ViewSizes, ViewTypes} from '_ui/_gqlTypes';
10
- import {defaultView, viewSettingsField} from '../../constants';
11
- import {ISearchRecord, ISearchSort, ISearchState} from './_types';
12
-
13
- export enum SearchActionTypes {
14
- UPDATE_RESULT = 'UPDATE_RESULT',
15
- SET_ERROR = 'SET_ERROR',
16
- SET_PAGINATION = 'SET_PAGINATION',
17
- SET_OFFSET = 'SET_OFFSET',
18
- SET_LOADING = 'SET_LOADING',
19
- SET_SORT = 'SET_SORT',
20
- CANCEL_SORT = 'CANCEL_SORT',
21
- SET_ATTRIBUTES = 'SET_ATTRIBUTES',
22
- SET_FIELDS = 'SET_FIELDS',
23
- SET_FULLTEXT = 'SET_FULLTEXT',
24
- SET_FILTERS = 'SET_FILTERS',
25
- SET_VIEW_RELOAD = 'SET_VIEW_RELOAD',
26
- SET_VIEW_SYNC = 'SET_VIEW_SYNC',
27
- CHANGE_VIEW = 'CHANGE_VIEW',
28
- SET_USER_VIEWS_ORDER = 'SET_USER_VIEWS_ORDER',
29
- SET_SHARED_VIEWS_ORDER = 'SET_SHARED_VIEWS_ORDER',
30
- SET_DISPLAY = 'SET_DISPLAY',
31
- RESET_FILTERS = 'RESET_FILTERS',
32
- DISABLE_FILTERS = 'DISABLE_FILTERS',
33
- ENABLE_FILTERS = 'ENABLE_FILTERS',
34
- APPLY_FILTERS = 'APPLY_FILTERS',
35
- SET_VALUES_VERSIONS = 'SET_VALUES_VERSIONS',
36
- TOGGLE_TRANSPARENCY = 'TOGGLE_TRANSPARENCY',
37
- TOGGLE_SIDEBAR = 'TOGGLE_SIDEBAR',
38
- SET_SIDEBAR = 'SET_SIDEBAR',
39
- SET_SELECTION = 'SET_SELECTION',
40
- TOGGLE_RECORD_SELECTION = 'TOGGLE_RECORD_SELECTION',
41
- SELECT_ALL = 'SELECT_ALL',
42
- CLEAR_SELECTION = 'CLEAR_SELECTION'
43
- }
44
-
45
- interface ISearchResult {
46
- type: SearchActionTypes.UPDATE_RESULT;
47
- records: ISearchRecord[];
48
- totalCount: number;
49
- }
50
-
51
- interface ISearchResultError {
52
- type: SearchActionTypes.UPDATE_RESULT;
53
- error: ApolloError;
54
- }
55
-
56
- export type SearchAction =
57
- | ({type: SearchActionTypes.UPDATE_RESULT} & (ISearchResult | ISearchResultError))
58
- | {type: SearchActionTypes.SET_PAGINATION; page: number}
59
- | {type: SearchActionTypes.SET_OFFSET; offset: number}
60
- | {type: SearchActionTypes.SET_LOADING; loading: boolean}
61
- | {type: SearchActionTypes.SET_SORT; sort: ISearchSort}
62
- | {type: SearchActionTypes.CANCEL_SORT}
63
- | {type: SearchActionTypes.SET_ATTRIBUTES; attributes: IAttribute[]}
64
- | {type: SearchActionTypes.SET_FIELDS; fields: IField[]}
65
- | {type: SearchActionTypes.SET_FULLTEXT; fullText: string}
66
- | {type: SearchActionTypes.SET_FILTERS; filters: IFilter[]}
67
- | {type: SearchActionTypes.SET_VIEW_RELOAD; reload: boolean}
68
- | {type: SearchActionTypes.SET_VIEW_SYNC; sync: boolean}
69
- | {type: SearchActionTypes.CHANGE_VIEW; view: IView}
70
- | {type: SearchActionTypes.SET_DISPLAY; display: IViewDisplay}
71
- | {type: SearchActionTypes.SET_USER_VIEWS_ORDER; userViewsOrder: string[]}
72
- | {type: SearchActionTypes.SET_SHARED_VIEWS_ORDER; sharedViewsOrder: string[]}
73
- | {type: SearchActionTypes.RESET_FILTERS}
74
- | {type: SearchActionTypes.DISABLE_FILTERS}
75
- | {type: SearchActionTypes.ENABLE_FILTERS}
76
- | {type: SearchActionTypes.APPLY_FILTERS}
77
- | {type: SearchActionTypes.SET_VALUES_VERSIONS; valuesVersions: IValueVersion}
78
- | {type: SearchActionTypes.TOGGLE_TRANSPARENCY}
79
- | {type: SearchActionTypes.TOGGLE_SIDEBAR}
80
- | {type: SearchActionTypes.SET_SIDEBAR; sidebarType: SidebarContentType; visible: boolean}
81
- | {type: SearchActionTypes.SET_SELECTION; selected: ISelectedRecord[]}
82
- | {type: SearchActionTypes.TOGGLE_RECORD_SELECTION; record: ISelectedRecord}
83
- | {type: SearchActionTypes.SELECT_ALL}
84
- | {type: SearchActionTypes.CLEAR_SELECTION};
85
-
86
- export const initialSearchState: ISearchState = {
87
- library: null,
88
- records: [],
89
- totalCount: 0,
90
- loading: false,
91
- pagination: 20,
92
- offset: 0,
93
- attributes: [],
94
- trees: [],
95
- fields: [],
96
- fullText: '',
97
- filters: [],
98
- display: {type: ViewTypes.list, size: ViewSizes.MEDIUM},
99
- view: {current: defaultView, reload: false, sync: true},
100
- userViewsOrder: [],
101
- sharedViewsOrder: [],
102
- valuesVersions: {},
103
- lang: null,
104
- sideBar: {
105
- visible: false,
106
- type: SidebarContentType.filters
107
- },
108
- selection: {
109
- selected: [],
110
- allSelected: false
111
- },
112
- showTransparency: false,
113
- mode: SearchMode.search
114
- };
115
-
116
- const checkSync = (
117
- state: ISearchState,
118
- toCheck: {sort: boolean; filters: boolean; display: boolean; fields: boolean; valuesVersions: boolean}
119
- ): boolean => {
120
- let sync = true;
121
-
122
- if (toCheck.sort) {
123
- sync =
124
- state.sort?.field === state.view?.current?.sort?.field &&
125
- state.sort?.order === state.view?.current?.sort?.order;
126
- }
127
-
128
- if (toCheck.filters) {
129
- sync = sync && JSON.stringify(state.view.current?.filters) === JSON.stringify(state.filters);
130
- }
131
-
132
- if (toCheck.display) {
133
- sync =
134
- sync &&
135
- state.display.type === state.view.current?.display?.type &&
136
- state.display.size === state.view.current?.display?.size;
137
- }
138
-
139
- if (toCheck.fields) {
140
- const viewFieldsKeys: string[] = !!state.view.current?.settings?.find(s => s.name === viewSettingsField)
141
- ? state.view.current?.settings.find(s => s.name === viewSettingsField).value
142
- : [];
143
-
144
- sync = sync && state.fields.map(f => f.id).join('.') === viewFieldsKeys.join('.');
145
- }
146
-
147
- return sync;
148
- };
149
-
150
- const searchReducer = (state: ISearchState, action: SearchAction): ISearchState => {
151
- let sync = checkSync(state, {
152
- sort: action.type !== SearchActionTypes.SET_SORT,
153
- filters: action.type !== SearchActionTypes.SET_FILTERS,
154
- display: action.type !== SearchActionTypes.SET_DISPLAY,
155
- fields: action.type !== SearchActionTypes.SET_FIELDS,
156
- valuesVersions: action.type !== SearchActionTypes.SET_VALUES_VERSIONS
157
- });
158
-
159
- switch (action.type) {
160
- case SearchActionTypes.UPDATE_RESULT: {
161
- return {
162
- ...state,
163
- records: (action as ISearchResult).records ?? [],
164
- totalCount: (action as ISearchResult).totalCount ?? 0,
165
- error: (action as ISearchResultError).error,
166
- loading: false
167
- };
168
- }
169
- case SearchActionTypes.SET_PAGINATION:
170
- return {...state, pagination: action.page, loading: true};
171
- case SearchActionTypes.SET_OFFSET:
172
- return {...state, offset: action.offset, loading: true};
173
- case SearchActionTypes.SET_LOADING:
174
- return {...state, loading: action.loading};
175
- case SearchActionTypes.SET_SORT:
176
- sync =
177
- sync &&
178
- state.view.current.sort?.field === action.sort.field &&
179
- state.view.current.sort?.order === action.sort.order;
180
-
181
- return {...state, sort: action.sort, view: {...state.view, sync}};
182
- case SearchActionTypes.CANCEL_SORT:
183
- const {sort, ...newState} = state;
184
-
185
- sync = sync && typeof state.view.current.sort === 'undefined';
186
-
187
- return {...newState, view: {...state.view, sync}, loading: true};
188
- case SearchActionTypes.SET_ATTRIBUTES:
189
- return {...state, attributes: action.attributes};
190
- case SearchActionTypes.SET_FIELDS:
191
- const viewFieldsKeys: IField[] = !!state.view.current.settings?.find(s => s.name === viewSettingsField)
192
- ? state.view.current?.settings.find(s => s.name === viewSettingsField).value
193
- : [];
194
-
195
- sync = sync && action.fields.map(f => f.id).join('.') === viewFieldsKeys.join('.');
196
-
197
- return {...state, fields: action.fields, view: {...state.view, sync}, loading: true};
198
- case SearchActionTypes.SET_FULLTEXT:
199
- return {...state, fullText: action.fullText};
200
- case SearchActionTypes.SET_FILTERS:
201
- sync = sync && JSON.stringify(state.view.current.filters) === JSON.stringify(action.filters);
202
- return {...state, filters: action.filters, view: {...state.view, sync}};
203
- case SearchActionTypes.CHANGE_VIEW:
204
- return {
205
- ...state,
206
- view: {
207
- current: action.view,
208
- reload: true,
209
- sync: true
210
- },
211
- fields: getFieldsFromView(action.view, state.library, state.lang),
212
- filters: action.view.filters,
213
- sort: action.view.sort,
214
- display: action.view.display,
215
- valuesVersions: action.view.valuesVersions
216
- };
217
- case SearchActionTypes.SET_VIEW_RELOAD:
218
- return {...state, view: {...state.view, reload: action.reload}};
219
- case SearchActionTypes.SET_VIEW_SYNC:
220
- return {...state, view: {...state.view, sync: action.sync}};
221
- case SearchActionTypes.SET_DISPLAY:
222
- sync =
223
- sync &&
224
- action.display.type === state.view.current.display.type &&
225
- action.display.size === state.view.current.display.size;
226
- return {...state, display: action.display, view: {...state.view, sync}};
227
- case SearchActionTypes.SET_USER_VIEWS_ORDER:
228
- return {...state, userViewsOrder: action.userViewsOrder};
229
- case SearchActionTypes.SET_SHARED_VIEWS_ORDER:
230
- return {...state, sharedViewsOrder: action.sharedViewsOrder};
231
- case SearchActionTypes.RESET_FILTERS:
232
- return {...state, filters: [], loading: true};
233
- case SearchActionTypes.DISABLE_FILTERS:
234
- return {
235
- ...state,
236
- filters: state.filters.map(f => ({...f, active: false})),
237
- loading: true
238
- };
239
- case SearchActionTypes.ENABLE_FILTERS:
240
- return {
241
- ...state,
242
- filters: state.filters.map(f => ({...f, active: true})),
243
- loading: true
244
- };
245
- case SearchActionTypes.APPLY_FILTERS:
246
- // Reset pagination when applying filters as this may lead to unexpected behavior
247
- // if new filters return less results
248
- return {
249
- ...state,
250
- offset: 0,
251
- loading: true
252
- };
253
- case SearchActionTypes.SET_VALUES_VERSIONS: {
254
- sync = sync && JSON.stringify(state.view.current.valuesVersions) === JSON.stringify(action.valuesVersions);
255
- return {
256
- ...state,
257
- view: {...state.view, sync},
258
- valuesVersions: {...state.valuesVersions, ...action.valuesVersions}
259
- };
260
- }
261
- case SearchActionTypes.TOGGLE_TRANSPARENCY:
262
- return {...state, showTransparency: !state.showTransparency};
263
- case SearchActionTypes.TOGGLE_SIDEBAR:
264
- return {...state, sideBar: {...state.sideBar, visible: !state.sideBar.visible}};
265
- case SearchActionTypes.SET_SIDEBAR:
266
- return {...state, sideBar: {...state.sideBar, type: action.sidebarType, visible: action.visible}};
267
- case SearchActionTypes.SET_SELECTION:
268
- return {...state, selection: {...state.selection, selected: action.selected, allSelected: false}};
269
- case SearchActionTypes.TOGGLE_RECORD_SELECTION:
270
- const currentlySelected = state.selection.selected.findIndex(s => s.id === action.record.id) > -1;
271
-
272
- return {
273
- ...state,
274
- selection: {
275
- ...state.selection,
276
- selected: currentlySelected
277
- ? state.selection.selected.filter(s => s.id !== action.record.id)
278
- : [...state.selection.selected, action.record]
279
- }
280
- };
281
- case SearchActionTypes.SELECT_ALL:
282
- return {
283
- ...state,
284
- selection: {
285
- selected: [],
286
- allSelected: true
287
- }
288
- };
289
- case SearchActionTypes.CLEAR_SELECTION:
290
- return {
291
- ...state,
292
- selection: {
293
- selected: [],
294
- allSelected: false
295
- }
296
- };
297
- default:
298
- return state;
299
- }
300
- };
301
-
302
- export default searchReducer;
@@ -1,9 +0,0 @@
1
- // Copyright LEAV Solutions 2017
2
- // This file is released under LGPL V3
3
- // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
- import {useContext} from 'react';
5
- import {SearchContext} from './searchContext';
6
-
7
- const useSearchReducer = () => useContext(SearchContext);
8
-
9
- export default useSearchReducer;