@leav/ui 0.3.6-df40eff → 0.3.6-e0c1773

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 (529) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +9 -1
  3. package/dist/__mocks__/common/attribute.js.map +1 -1
  4. package/dist/__mocks__/common/form.d.ts +12 -5
  5. package/dist/__mocks__/common/form.js +33 -2
  6. package/dist/__mocks__/common/form.js.map +1 -1
  7. package/dist/__mocks__/common/record.d.ts +13 -2
  8. package/dist/__mocks__/common/record.js.map +1 -1
  9. package/dist/__mocks__/common/value.js +3 -2
  10. package/dist/__mocks__/common/value.js.map +1 -1
  11. package/dist/__mocks__/common/view.js +7 -5
  12. package/dist/__mocks__/common/view.js.map +1 -1
  13. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
  14. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
  15. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
  16. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
  17. package/dist/_gqlTypes/index.d.ts +552 -104
  18. package/dist/_gqlTypes/index.js +325 -52
  19. package/dist/_gqlTypes/index.js.map +1 -1
  20. package/dist/_queries/attributes/getAttributesByLib.js +7 -5
  21. package/dist/_queries/attributes/getAttributesByLib.js.map +1 -1
  22. package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
  23. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
  24. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
  25. package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
  26. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  27. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  28. package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
  29. package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
  30. package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
  31. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  32. package/dist/_queries/views/saveViewMutation.js +1 -1
  33. package/dist/_queries/views/viewDetailsFragment.js +14 -11
  34. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  35. package/dist/_utils/attributeType.d.ts +3 -0
  36. package/dist/_utils/attributeType.js +7 -0
  37. package/dist/_utils/attributeType.js.map +1 -0
  38. package/dist/_utils/index.js +5 -2
  39. package/dist/_utils/index.js.map +1 -1
  40. package/dist/_utils/interleaveElement.d.ts +1 -0
  41. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  42. package/dist/_utils/interleaveElement.js.map +1 -0
  43. package/dist/antdTheme/index.d.ts +0 -3
  44. package/dist/antdTheme/index.js +3 -42
  45. package/dist/antdTheme/index.js.map +1 -1
  46. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  47. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  48. package/dist/components/EditApplication/EditApplication.js +2 -2
  49. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  50. package/dist/components/EditApplication/_types.d.ts +2 -2
  51. package/dist/components/Explorer/DataView.d.ts +14 -1
  52. package/dist/components/Explorer/DataView.js +96 -29
  53. package/dist/components/Explorer/DataView.js.map +1 -1
  54. package/dist/components/Explorer/Explorer.d.ts +9 -4
  55. package/dist/components/Explorer/Explorer.js +93 -31
  56. package/dist/components/Explorer/Explorer.js.map +1 -1
  57. package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
  58. package/dist/components/Explorer/ExplorerTitle.js +28 -11
  59. package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
  60. package/dist/components/Explorer/ExplorerToolbar.d.ts +5 -0
  61. package/dist/components/Explorer/ExplorerToolbar.js +45 -0
  62. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
  63. package/dist/components/Explorer/IdCard.d.ts +7 -0
  64. package/dist/components/Explorer/IdCard.js +15 -0
  65. package/dist/components/Explorer/IdCard.js.map +1 -0
  66. package/dist/components/Explorer/TableCell.d.ts +2 -1
  67. package/dist/components/Explorer/TableCell.js +132 -20
  68. package/dist/components/Explorer/TableCell.js.map +1 -1
  69. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  70. package/dist/components/Explorer/TableTagGroup.js +30 -0
  71. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  72. package/dist/components/Explorer/_constants.d.ts +5 -0
  73. package/dist/components/Explorer/_constants.js +18 -0
  74. package/dist/components/Explorer/_constants.js.map +1 -0
  75. package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +4 -0
  76. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -0
  77. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
  78. package/dist/components/Explorer/_queries/useExplorerData.d.ts +29 -5
  79. package/dist/components/Explorer/_queries/useExplorerData.js +92 -15
  80. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  81. package/dist/components/Explorer/_types.d.ts +82 -4
  82. package/dist/components/Explorer/_types.js +7 -1
  83. package/dist/components/Explorer/_types.js.map +1 -1
  84. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  85. package/dist/components/Explorer/conditionsHelper.js +16 -0
  86. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  87. package/dist/components/Explorer/index.d.ts +1 -3
  88. package/dist/components/Explorer/index.js +1 -3
  89. package/dist/components/Explorer/index.js.map +1 -1
  90. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +1 -1
  91. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +12 -5
  92. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  93. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +6 -0
  94. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  95. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  96. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +13 -0
  97. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +67 -0
  98. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  99. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  100. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  101. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  102. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  103. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
  104. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  105. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  106. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  107. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  108. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  109. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +88 -0
  110. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  111. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  112. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  113. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  114. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  115. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
  116. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  117. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  118. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  119. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  120. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  121. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  122. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  123. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  124. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  125. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  126. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  127. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  128. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  129. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  130. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  131. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  132. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  133. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +35 -0
  134. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  135. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.d.ts +7 -0
  136. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +40 -0
  137. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
  138. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  139. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  140. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  141. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.d.ts +3 -0
  142. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js +79 -0
  143. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
  144. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  145. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
  146. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  147. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  148. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
  149. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  150. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +10 -0
  151. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js +2 -0
  152. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +1 -0
  153. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +12 -0
  154. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +108 -0
  155. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  156. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  157. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  158. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  159. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +1 -0
  160. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  161. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  162. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
  163. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  164. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  165. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
  166. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
  167. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  168. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  169. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +2 -1
  170. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +77 -0
  171. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  172. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  173. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +113 -0
  174. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  175. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  176. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  177. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  178. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
  179. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +1 -5
  180. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  181. package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
  182. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  183. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
  184. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +25 -0
  185. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  186. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +159 -0
  187. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +232 -0
  188. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  189. package/dist/components/Explorer/useColumnWidth.d.ts +6 -0
  190. package/dist/components/Explorer/useColumnWidth.js +48 -0
  191. package/dist/components/Explorer/useColumnWidth.js.map +1 -0
  192. package/dist/components/Explorer/useCreateAction.d.ts +4 -2
  193. package/dist/components/Explorer/useCreateAction.js +35 -2
  194. package/dist/components/Explorer/useCreateAction.js.map +1 -1
  195. package/dist/components/Explorer/useDeactivateMassAction.d.ts +27 -0
  196. package/dist/components/Explorer/useDeactivateMassAction.js +71 -0
  197. package/dist/components/Explorer/useDeactivateMassAction.js.map +1 -0
  198. package/dist/components/Explorer/useEditAction.js +8 -6
  199. package/dist/components/Explorer/useEditAction.js.map +1 -1
  200. package/dist/components/Explorer/useMassActions.d.ts +28 -0
  201. package/dist/components/Explorer/useMassActions.js +111 -0
  202. package/dist/components/Explorer/useMassActions.js.map +1 -0
  203. package/dist/components/Explorer/usePagination.d.ts +7 -0
  204. package/dist/components/Explorer/usePagination.js +25 -0
  205. package/dist/components/Explorer/usePagination.js.map +1 -0
  206. package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
  207. package/dist/components/Explorer/usePrimaryActions.js +16 -17
  208. package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
  209. package/dist/components/Explorer/useRemoveAction.d.ts +23 -0
  210. package/dist/components/Explorer/useRemoveAction.js +109 -0
  211. package/dist/components/Explorer/useRemoveAction.js.map +1 -0
  212. package/dist/components/Explorer/useSearchInput.d.ts +16 -0
  213. package/dist/components/Explorer/useSearchInput.js +39 -0
  214. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  215. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  216. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  217. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  218. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  219. package/dist/components/Explorer/useViewSettingsReducer.js +208 -0
  220. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  221. package/dist/components/ExportModal/ExportModal.js +2 -2
  222. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  223. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  224. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  225. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  226. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  227. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  228. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  229. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
  230. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
  231. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  232. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  233. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
  234. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  235. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  236. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  237. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  238. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  239. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  240. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  241. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  242. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  243. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  244. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  245. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  246. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  247. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  248. package/dist/components/RecordEdition/EditRecord/EditRecord.js +77 -75
  249. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  250. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +17 -4
  251. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  252. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +10 -21
  253. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  254. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  255. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  256. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  257. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  258. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  259. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  260. package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js.map +1 -1
  261. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js +1 -7
  262. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js.map +1 -1
  263. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  264. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  265. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  266. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  270. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  271. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  272. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  273. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  274. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  275. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +16 -0
  276. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  277. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  278. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  279. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  280. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  281. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +201 -186
  282. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  283. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  284. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
  285. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  286. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  287. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +79 -45
  288. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  289. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  290. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +37 -46
  291. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  292. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  293. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +14 -74
  294. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  295. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  296. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +33 -49
  297. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  298. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  299. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +33 -60
  300. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  301. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  302. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +52 -64
  303. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  304. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  305. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -56
  306. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  307. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +16 -9
  308. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +56 -402
  309. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  310. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  311. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
  312. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  313. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  314. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +15 -0
  315. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  316. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  317. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  318. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +56 -0
  319. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  320. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  321. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
  322. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  323. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -7
  324. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  325. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  326. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  327. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
  328. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  329. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
  330. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  331. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  332. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.d.ts +7 -0
  333. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js +9 -0
  334. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js.map +1 -0
  335. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.d.ts +2 -0
  336. package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/AttributeDetails → AttributeSummary}/index.js +2 -2
  337. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.js.map +1 -0
  338. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.d.ts +2 -0
  339. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +25 -0
  340. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js.map +1 -0
  341. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.d.ts +3 -0
  342. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +53 -0
  343. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -0
  344. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.d.ts +2 -0
  345. package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails → Breacrumb}/index.js +2 -2
  346. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.js.map +1 -0
  347. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  348. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +41 -6
  349. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  350. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  351. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  352. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  353. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  354. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  355. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  356. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  357. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  358. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  359. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
  360. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
  361. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  362. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +8 -0
  363. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +66 -0
  364. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -0
  365. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.d.ts +2 -0
  366. package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/TreeValuePath → ValuesSummary}/index.js +2 -2
  367. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.js.map +1 -0
  368. package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.d.ts +1 -1
  369. package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.js +2 -2
  370. package/dist/components/RecordEdition/EditRecordSkeleton/EditRecordSkeleton.js.map +1 -0
  371. package/dist/components/RecordEdition/EditRecordSkeleton/index.d.ts +2 -0
  372. package/dist/components/RecordEdition/{EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → EditRecordSkeleton}/index.js +2 -1
  373. package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
  374. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +12 -10
  375. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +15 -13
  376. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
  377. package/dist/components/RecordEdition/index.d.ts +1 -0
  378. package/dist/components/RecordEdition/index.js +1 -0
  379. package/dist/components/RecordEdition/index.js.map +1 -1
  380. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  381. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  382. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  383. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  384. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +129 -0
  385. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  386. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  387. package/dist/components/SelectTreeNode/index.js +1 -1
  388. package/dist/components/SelectTreeNode/index.js.map +1 -1
  389. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  390. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  391. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  392. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  393. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  394. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  395. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  396. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  397. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  398. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  399. package/dist/constants.d.ts +3 -0
  400. package/dist/constants.js +3 -0
  401. package/dist/constants.js.map +1 -1
  402. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  403. package/dist/{components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo → hooks/useDebouncedValue}/index.js +1 -2
  404. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  405. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  406. package/dist/{components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata → hooks/useExecuteSaveViewMutation}/index.js +1 -2
  407. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  408. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  409. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
  410. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  411. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  412. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  413. package/dist/locales/en/shared.json +93 -17
  414. package/dist/locales/fr/shared.json +95 -19
  415. package/dist/types/views.d.ts +4 -4
  416. package/package.json +5 -2
  417. package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
  418. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
  419. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
  420. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  421. package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
  422. package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -89
  423. package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
  424. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  425. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  426. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  427. package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
  428. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  429. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  430. package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
  431. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  432. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
  433. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
  434. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
  435. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  436. package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
  437. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  438. package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
  439. package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -43
  440. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -58
  441. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
  442. package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
  443. package/dist/components/Explorer/useDeactivateAction.js +0 -51
  444. package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
  445. package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.js.map +0 -1
  446. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  447. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
  448. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  449. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  450. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  451. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  452. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  453. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  454. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  455. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
  456. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  457. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
  458. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
  459. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
  460. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  461. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  462. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  463. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  464. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  465. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  466. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  467. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  468. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  469. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  470. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  471. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  472. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  473. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  474. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  475. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  476. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  477. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  478. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  479. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  480. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  481. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  482. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  483. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  484. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  485. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  486. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  487. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  488. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  489. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  490. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  491. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  492. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  493. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  494. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.d.ts +0 -6
  495. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js +0 -56
  496. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js.map +0 -1
  497. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.d.ts +0 -2
  498. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.js.map +0 -1
  499. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.d.ts +0 -8
  500. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js +0 -41
  501. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js.map +0 -1
  502. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.d.ts +0 -2
  503. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.js.map +0 -1
  504. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.d.ts +0 -10
  505. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +0 -63
  506. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +0 -1
  507. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.d.ts +0 -2
  508. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js +0 -76
  509. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js.map +0 -1
  510. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.d.ts +0 -2
  511. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.js.map +0 -1
  512. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.d.ts +0 -11
  513. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js +0 -43
  514. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js.map +0 -1
  515. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.d.ts +0 -2
  516. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.js.map +0 -1
  517. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.d.ts +0 -2
  518. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.js.map +0 -1
  519. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  520. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
  521. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +0 -0
  522. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.d.ts +0 -0
  523. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +0 -0
  524. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  525. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  526. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  527. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
  528. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
  529. /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
@@ -2,84 +2,61 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
- import { useEffect, useRef, useState } from 'react';
5
+ import { useState } from 'react';
6
6
  import { Form } from 'antd';
7
- import styled from 'styled-components';
8
- import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
9
- import { useValueDetailsButton } from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton';
10
- import { useLang } from '../../../../../../hooks';
11
- import { localizedTranslation } from '@leav/utils';
12
7
  import { KitRichText } from 'aristid-ds';
13
- const KitRichTextStyled = styled(KitRichText) `
14
- color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
15
- `;
8
+ import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
9
+ import { EMPTY_INITIAL_VALUE_STRING } from '../../../antdUtils';
16
10
  const isEmptyValue = value => !value || value === '<p></p>';
17
- export const DSRichTextWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
11
+ export const DSRichTextWrapper = ({ value, presentationValue, isLastValueOfMultivalues, removeLastValueOfMultivalues, onChange, attribute, readonly, handleSubmit, calculatedFlags, inheritedFlags, setActiveValue }) => {
18
12
  if (!onChange) {
19
13
  throw Error('DSRichTextWrapper should be used inside a antd Form.Item');
20
14
  }
21
- const { t } = useSharedTranslation();
22
- const { errors } = Form.Item.useStatus();
23
- const { onValueDetailsButtonClick } = useValueDetailsButton({
24
- value: fieldValue?.value,
25
- attribute
26
- });
15
+ const isNewValueOfMultivalues = isLastValueOfMultivalues && value === EMPTY_INITIAL_VALUE_STRING;
16
+ const focusedDefaultValue = attribute.multiple_values ? isNewValueOfMultivalues : false;
27
17
  const [hasChanged, setHasChanged] = useState(false);
28
- const { lang: availableLang } = useLang();
29
- const inputRef = useRef(null);
30
- useEffect(() => {
31
- if (fieldValue.isEditing && inputRef.current) {
32
- inputRef.current.children[0].focus();
33
- }
34
- }, [fieldValue.isEditing]);
35
- const _resetToInheritedOrCalculatedValue = () => {
18
+ const [isFocused, setIsFocused] = useState(focusedDefaultValue);
19
+ const { errors } = Form.Item.useStatus();
20
+ const { t } = useSharedTranslation();
21
+ const isErrors = errors.length > 0;
22
+ const valueToDisplay = isFocused || isErrors || !presentationValue ? value : presentationValue;
23
+ const _resetToInheritedOrCalculatedValue = async () => {
36
24
  setHasChanged(false);
37
- if (state.isInheritedValue) {
38
- onChange(state.inheritedValue.raw_value);
25
+ if (inheritedFlags.isInheritedValue) {
26
+ onChange(inheritedFlags.inheritedValue.raw_payload);
39
27
  }
40
- else if (state.isCalculatedValue) {
41
- onChange(state.calculatedValue.raw_value);
28
+ else if (calculatedFlags.isCalculatedValue) {
29
+ onChange(calculatedFlags.calculatedValue.raw_payload);
42
30
  }
43
- handleSubmit('', state.attribute.id);
31
+ await handleSubmit(null, attribute.id);
32
+ };
33
+ const _handleFocus = () => {
34
+ setIsFocused(true);
35
+ setActiveValue();
44
36
  };
45
- const _handleOnBlur = inputValue => {
37
+ const _handleOnBlur = async (inputValue) => {
38
+ setHasChanged(false);
39
+ const valueToSubmit = isEmptyValue(inputValue) ? null : inputValue;
46
40
  if (!hasChanged) {
47
- handleBlur();
41
+ onChange(valueToSubmit);
42
+ setIsFocused(false);
43
+ if (isNewValueOfMultivalues) {
44
+ removeLastValueOfMultivalues();
45
+ }
48
46
  return;
49
47
  }
50
- const valueToSubmit = isEmptyValue(inputValue) ? '' : inputValue;
51
- if (valueToSubmit === '' && (state.isInheritedValue || state.isCalculatedValue)) {
48
+ if (valueToSubmit === null && (inheritedFlags.isInheritedValue || calculatedFlags.isCalculatedValue)) {
52
49
  _resetToInheritedOrCalculatedValue();
53
50
  return;
54
51
  }
55
- if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
56
- handleSubmit(valueToSubmit, state.attribute.id);
57
- }
58
52
  onChange(valueToSubmit);
59
- return;
53
+ await handleSubmit(valueToSubmit, attribute.id);
54
+ setIsFocused(false);
60
55
  };
61
56
  const _handleOnChange = inputValue => {
62
57
  setHasChanged(true);
63
- if (state.isInheritedValue && isEmptyValue(inputValue)) {
64
- _resetToInheritedOrCalculatedValue();
65
- return;
66
- }
67
58
  onChange(inputValue);
68
59
  };
69
- const _getHelper = () => {
70
- if (state.isInheritedOverrideValue) {
71
- return t('record_edition.inherited_input_helper', {
72
- inheritedValue: state.inheritedValue.raw_value
73
- });
74
- }
75
- else if (state.isCalculatedOverrideValue) {
76
- return t('record_edition.calculated_input_helper', {
77
- calculatedValue: state.calculatedValue.raw_value
78
- });
79
- }
80
- return;
81
- };
82
- const label = localizedTranslation(state.formElement.settings.label, availableLang);
83
- return (_jsx(KitRichTextStyled, { ref: inputRef, required: state.formElement.settings.required, label: label, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, status: errors.length > 0 ? 'error' : undefined, helper: _getHelper(), value: value, disabled: state.isReadOnly, onChange: _handleOnChange, onBlur: _handleOnBlur, "$shouldHighlightColor": (!hasChanged && state.isInheritedNotOverrideValue) || state.isCalculatedNotOverrideValue }));
60
+ return (_jsx(KitRichText, { id: attribute.id, autoFocus: isFocused, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, value: valueToDisplay, disabled: readonly, onChange: _handleOnChange, onFocus: _handleFocus, onBlur: _handleOnBlur, placeholder: t('record_edition.placeholder.enter_a_text') }));
84
61
  };
85
62
  //# sourceMappingURL=DSRichTextWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSRichTextWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.tsx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AAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,EAC5E,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAC/C,MAAM,EAAE,UAAU,EAAE,EACpB,KAAK,EAAE,KAAe,EACtB,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,aAAa,2BAEjB,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC,2BAA2B,CAAC,IAAI,KAAK,CAAC,4BAA4B,GAE9F,CACL,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"DSRichTextWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;AAE9D,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,SAAS,CAAC;AAE5D,MAAM,CAAC,MAAM,iBAAiB,GAAsE,CAAC,EACjG,KAAK,EACL,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACjB,EAAE,EAAE;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC5E,CAAC;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AACN,CAAC,CAAC"}
@@ -1,13 +1,20 @@
1
1
  import { AnyPrimitive } from '@leav/utils';
2
- import { VersionFieldScope } from '../../../../../../components/RecordEdition/EditRecordContent/_types';
3
- import { IdValue, IStandardFieldReducerState, IStandardFieldValue, StandardFieldDispatchFunc } from '../../../reducers/standardFieldReducer/standardFieldReducer';
2
+ import { FormListFieldData } from 'antd';
3
+ import { ISubmitMultipleResult } from '../../../../../../components/RecordEdition/EditRecordContent/_types';
4
+ import { RecordFormAttributeStandardAttributeFragment } from '../../../../../../_gqlTypes';
5
+ import { CalculatedFlags, InheritedFlags } from '../calculatedInheritedFlags';
4
6
  interface IStandardFieldValueProps {
5
- value: IStandardFieldValue;
6
- state: IStandardFieldReducerState;
7
- dispatch: StandardFieldDispatchFunc;
8
- onSubmit: (idValue: IdValue, value: AnyPrimitive) => Promise<void>;
9
- onDelete: (idValue: IdValue) => void;
10
- onScopeChange: (scope: VersionFieldScope) => void;
7
+ presentationValue: string;
8
+ handleSubmit: (value: AnyPrimitive | null) => Promise<void | ISubmitMultipleResult>;
9
+ attribute: RecordFormAttributeStandardAttributeFragment;
10
+ label: string;
11
+ readonly: boolean;
12
+ calculatedFlags: CalculatedFlags;
13
+ inheritedFlags: InheritedFlags;
14
+ listField?: FormListFieldData;
15
+ removeLastValueOfMultivalues?: () => void;
16
+ isLastValueOfMultivalues?: boolean;
17
+ setActiveValue: () => void;
11
18
  }
12
- declare function StandardFieldValue({ value: fieldValue, onSubmit, onDelete, onScopeChange, state, dispatch }: IStandardFieldValueProps): JSX.Element;
19
+ declare function StandardFieldValue({ presentationValue, handleSubmit, attribute, label, readonly, calculatedFlags, inheritedFlags, listField, removeLastValueOfMultivalues, setActiveValue, isLastValueOfMultivalues }: IStandardFieldValueProps): JSX.Element;
13
20
  export default StandardFieldValue;
@@ -1,405 +1,17 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
- // This file is released under LGPL V3
4
- // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
- import { CloseOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
6
- import { localizedTranslation } from '@leav/utils';
7
- import { Button, Input, Popover, Space, theme } from 'antd';
8
- import moment from 'moment';
9
- import React, { useEffect, useRef } from 'react';
10
- import styled from 'styled-components';
11
- import { themeVars } from '../../../../../../antdTheme';
12
- import { FloatingMenu } from '../../../../../../components';
13
- import Dimmer from '../../../../../../components/Dimmer';
14
- import DeleteValueBtn from '../../../../../../components/RecordEdition/EditRecordContent/shared/DeleteValueBtn';
15
- import InheritedFieldLabel from '../../../../../../components/RecordEdition/EditRecordContent/shared/InheritedFieldLabel';
16
- import UpdatedFieldIcon from '../../../../../../components/RecordEdition/EditRecordContent/shared/UpdatedFieldIcon';
17
- import ValueDetailsBtn from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn';
18
- import ValuesVersionBtn from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn';
19
- import ValuesVersionIndicator from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator';
20
- import { VersionFieldScope } from '../../../../../../components/RecordEdition/EditRecordContent/_types';
21
- import { EditRecordReducerActionsTypes } from '../../../../../../components/RecordEdition/editRecordReducer/editRecordReducer';
22
- import { useEditRecordReducer } from '../../../../../../components/RecordEdition/editRecordReducer/useEditRecordReducer';
23
- import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Form } from 'antd';
24
3
  import { AttributeFormat } from '../../../../../../_gqlTypes';
25
- import { stringifyDateRangeValue } from '../../../../../../_utils';
26
- import { newValueId, StandardFieldReducerActionsTypes, StandardFieldValueState } from '../../../reducers/standardFieldReducer/standardFieldReducer';
27
- import ColorInput from './Inputs/ColorInput';
28
- import TextInput from './Inputs/TextInput';
29
- import ValuesList from './ValuesList';
30
- import { useLang } from '../../../../../../hooks';
31
- import { StandardFieldValueDisplayHandler } from './StandardFieldValueDisplayHandler';
32
- const ErrorMessage = styled.div `
33
- color: ${themeVars.errorColor};
34
- font-weight: bold;
35
- `;
36
- const FormWrapper = styled.div `
37
- position: relative;
38
- z-index: ${p => (p.$isEditing ? 2 : 0)};
39
- `;
40
- const InputWrapper = styled.div `
41
- position: relative;
42
-
43
- && input {
44
- background: ${themeVars.defaultBg};
45
- transition: none;
46
- border-radius: 0;
47
- line-height: 2.5em;
48
- padding-left: 17px;
49
- }
50
-
51
- ${FormWrapper}:not(:last-child) & input:not(:hover) {
52
- border-bottom: none;
53
- }
54
-
55
- ${FormWrapper}:first-child & input {
56
- border-top-left-radius: 5px;
57
- border-top-right-radius: 5px;
58
- }
59
-
60
- ${FormWrapper}:last-child & input {
61
- border-bottom-left-radius: 5px;
62
- border-bottom-right-radius: 5px;
63
- }
64
-
65
- &.editing input {
66
- border-radius: 5px;
67
- }
68
-
69
- &.editing .field-wrapper,
70
- &.editing .nested-input {
71
- z-index: 0;
72
- }
73
-
74
- &.format-boolean label {
75
- margin-right: 1em;
76
- }
77
-
78
- &:not(.format-boolean) label {
79
- position: absolute;
80
- left: 11px;
81
- top: calc(50% - 0.9em);
82
- font-size: 1.1em;
83
- background: transparent;
84
- padding: 0 0.5em;
85
- color: ${themeVars.secondaryTextColor};
86
- transition: all 0.2s ease;
87
- transition-property: left, top, font-size;
88
- z-index: 1;
89
- white-space: nowrap;
90
- text-overflow: ellipsis;
91
- overflow: hidden;
92
- width: 100%;
93
- }
94
-
95
- &:not(.format-boolean):not(.editing):not(.has-value) label {
96
- padding-right: 3rem;
97
- }
98
-
99
- input:disabled {
100
- background: ${themeVars.defaultBg};
101
- }
102
-
103
- &.has-value:not(.format-boolean) label,
104
- &.editing:not(.format-boolean) label {
105
- top: 0px;
106
- font-size: 0.9em;
107
- background: transparent;
108
- text-shadow: 0px 0px 4px #fff;
109
- z-index: 2;
110
- border-radius: 5px;
111
- }
112
-
113
- ${FormWrapper}.first-value &.has-value:not(.format-boolean) input:not(:first-child),
114
- ${FormWrapper}.first-value &.editing:not(.format-boolean) input:not(:only-child),
115
- ${FormWrapper}.first-value &.editing.format-date_range input,
116
- ${FormWrapper}.first-value &.editing.format-date_range .ant-picker-range-separator {
117
- padding-top: 1em;
118
- }
119
-
120
- &:not(.has-value):not(.editing):not(.format-boolean) input {
121
- padding: 9px 0;
122
- }
123
-
124
- &:not(:hover) .floating-menu {
125
- display: none;
126
- }
127
-
128
- .floating-menu {
129
- top: 50%;
130
- transform: translateY(-50%);
131
- }
132
- `;
133
- const ActionsWrapper = styled.div `
134
- position: absolute;
135
- display: flex;
136
- width: 100%;
137
- flex-direction: column;
138
- `;
139
- const ButtonsWrapper = styled.div `
140
- display: flex;
141
- margin: 0.5em 0;
142
- justify-content: flex-end;
143
-
144
- & > button {
145
- margin-left: 0.5em;
146
- }
147
- `;
148
- const RichTextEditorInput = React.lazy(() => import('./Inputs/RichTextEditorInput'));
149
- const inputComponentByFormat = {
150
- [AttributeFormat.text]: null,
151
- [AttributeFormat.date]: null,
152
- [AttributeFormat.date_range]: null,
153
- [AttributeFormat.boolean]: null,
154
- [AttributeFormat.numeric]: null,
155
- [AttributeFormat.encrypted]: null,
156
- [AttributeFormat.extended]: TextInput,
157
- [AttributeFormat.color]: ColorInput,
158
- [AttributeFormat.rich_text]: RichTextEditorInput
159
- };
160
- function StandardFieldValue({ value: fieldValue, onSubmit, onDelete, onScopeChange, state, dispatch }) {
161
- const { t, i18n } = useSharedTranslation();
162
- const { token } = theme.useToken();
163
- const { lang: availableLangs } = useLang();
164
- const actionsWrapperRef = useRef();
165
- const inputRef = useRef();
166
- const { state: editRecordState, dispatch: editRecordDispatch } = useEditRecordReducer();
167
- const attribute = state.formElement.attribute;
4
+ import { DSListSelect } from './ValuesList/DSListSelect';
5
+ import { DSInputWrapper } from './DSInputWrapper';
6
+ import { DSDatePickerWrapper } from './DSDatePickerWrapper';
7
+ import { DSRangePickerWrapper } from './DSRangePickerWrapper';
8
+ import { DSInputNumberWrapper } from './DSInputNumberWrapper';
9
+ import { DSInputEncryptedWrapper } from './DSInputEncryptedWrapper';
10
+ import { DSBooleanWrapper } from './DSBooleanWrapper';
11
+ import { DSRichTextWrapper } from './DSRichTextWrapper';
12
+ import { DSColorPickerWrapper } from './DSColorPickerWrapper';
13
+ function StandardFieldValue({ presentationValue, handleSubmit, attribute, label, readonly, calculatedFlags, inheritedFlags, listField, removeLastValueOfMultivalues, setActiveValue, isLastValueOfMultivalues = false }) {
168
14
  const isValuesListEnabled = !!attribute?.values_list?.enable;
169
- const isValuesListOpen = !!attribute?.values_list?.allowFreeEntry;
170
- // Scroll to input when editing field
171
- useEffect(() => {
172
- if (fieldValue.isEditing) {
173
- actionsWrapperRef?.current?.scrollIntoView({ block: 'nearest' });
174
- }
175
- }, [fieldValue.isEditing]);
176
- // Cancel value editing if value details panel is closed
177
- useEffect(() => {
178
- if (editRecordState.activeValue === null && fieldValue.isEditing) {
179
- dispatch({
180
- type: StandardFieldReducerActionsTypes.CANCEL_EDITING,
181
- idValue: fieldValue.idValue
182
- });
183
- }
184
- }, [editRecordState.activeValue]);
185
- useEffect(() => {
186
- if (fieldValue.isEditing) {
187
- editRecordDispatch({
188
- type: EditRecordReducerActionsTypes.SET_EDITING_VALUE,
189
- value: fieldValue.editingValue
190
- });
191
- }
192
- }, [fieldValue.isEditing, fieldValue.editingValue]);
193
- const _handleSubmit = async (valueToSave, id) => {
194
- if (valueToSave === '') {
195
- return _handleDelete();
196
- }
197
- const convertedValue = typeof valueToSave === 'object' ? JSON.stringify(valueToSave) : valueToSave;
198
- await onSubmit(fieldValue.idValue, convertedValue);
199
- };
200
- const _handlePressEnter = async () => {
201
- if (!isValuesListEnabled) {
202
- return _handleSubmit(fieldValue.editingValue);
203
- }
204
- const valuesList = _getFilteredValuesList();
205
- if (!valuesList.length) {
206
- return;
207
- }
208
- return _handleSubmit(valuesList[0].value);
209
- };
210
- const _handleDelete = async () => {
211
- if (fieldValue.idValue === newValueId) {
212
- return _handleCancel();
213
- }
214
- await onDelete(fieldValue.idValue);
215
- };
216
- const _handleFocus = () => {
217
- if (state.isReadOnly || fieldValue.isEditing || attribute.format === AttributeFormat.boolean) {
218
- return;
219
- }
220
- dispatch({
221
- type: StandardFieldReducerActionsTypes.FOCUS_FIELD,
222
- idValue: fieldValue.idValue
223
- });
224
- if (!state.metadataEdit) {
225
- editRecordDispatch({
226
- type: EditRecordReducerActionsTypes.SET_ACTIVE_VALUE,
227
- value: { value: fieldValue.value, editingValue: fieldValue.editingValue, attribute }
228
- });
229
- }
230
- };
231
- const _handleValueChange = (value) => {
232
- dispatch({
233
- type: StandardFieldReducerActionsTypes.CHANGE_VALUE,
234
- idValue: fieldValue.idValue,
235
- value
236
- });
237
- };
238
- const _handleCloseError = () => dispatch({
239
- type: StandardFieldReducerActionsTypes.SET_ERROR_DISPLAY,
240
- displayError: false,
241
- idValue: fieldValue.idValue
242
- });
243
- const _handleCancel = () => {
244
- dispatch({
245
- type: StandardFieldReducerActionsTypes.CANCEL_EDITING,
246
- idValue: fieldValue.idValue
247
- });
248
- if (!state.metadataEdit) {
249
- editRecordDispatch({
250
- type: EditRecordReducerActionsTypes.SET_ACTIVE_VALUE,
251
- value: null
252
- });
253
- }
254
- };
255
- const _handleClickSubmit = () => {
256
- _handleSubmit(fieldValue.editingValue);
257
- };
258
- const _handleValueCopy = (value) => {
259
- inputRef?.current?.focus();
260
- _handleValueChange(value);
261
- };
262
- const _getInput = () => {
263
- let inputStyle = {};
264
- if (!fieldValue.isEditing &&
265
- attribute.format !== AttributeFormat.boolean &&
266
- attribute.format !== AttributeFormat.rich_text) {
267
- let displayedValue = String(fieldValue.displayValue);
268
- let prefixValue;
269
- if (attribute.format === AttributeFormat.color &&
270
- (fieldValue.value === null || fieldValue.value.payload === null)) {
271
- fieldValue.value = null;
272
- }
273
- const hasValue = fieldValue.value !== null;
274
- if (hasValue) {
275
- switch (attribute.format) {
276
- case AttributeFormat.encrypted:
277
- displayedValue = '•••••••••';
278
- break;
279
- case AttributeFormat.date:
280
- if (!isNaN(fieldValue.displayValue)) {
281
- displayedValue = new Intl.DateTimeFormat(i18n.language).format(new Date(Number(displayedValue) * 1000));
282
- }
283
- break;
284
- case AttributeFormat.color:
285
- prefixValue = _getColorDisplay();
286
- displayedValue = '#' + displayedValue;
287
- inputStyle = {
288
- paddingLeft: '39px'
289
- };
290
- }
291
- }
292
- return (_jsxs(_Fragment, { children: [prefixValue, _jsx(Input, { style: inputStyle, className: hasValue ? 'has-value' : '', value: displayedValue, onFocus: _handleFocus, disabled: state.isReadOnly }, "display")] }));
293
- }
294
- const InputComponent = inputComponentByFormat[attribute.format];
295
- // This should never happen, unless we have some bad settings in DB
296
- if (!InputComponent) {
297
- return _jsx("div", { children: t('record_edition.invalid_format') });
298
- }
299
- return (_jsx(InputComponent, { state: state, fieldValue: fieldValue, onChange: _handleValueChange, onFocus: _handleFocus, onSubmit: _handleSubmit, onPressEnter: _handlePressEnter, settings: state.formElement.settings, inputRef: inputRef }));
300
- };
301
- const _getColorDisplay = () => {
302
- const colorValue = '#' + String(fieldValue.displayValue);
303
- const colorPickerStyle = {
304
- width: '16px',
305
- height: '16px',
306
- borderRadius: '2px',
307
- backgroundColor: colorValue,
308
- marginTop: fieldValue.index ? '15px' : '25px',
309
- marginLeft: '5px'
310
- };
311
- return _jsx("label", { style: colorPickerStyle });
312
- };
313
- const _getFilteredValuesList = () => {
314
- let values = [];
315
- if (isValuesListEnabled) {
316
- if (attribute.format === AttributeFormat.date_range) {
317
- const valuesList = attribute?.values_list?.dateRangeValues ?? [];
318
- values = valuesList
319
- .filter(val => fieldValue.state === StandardFieldValueState.PRISTINE || !fieldValue.editingValue)
320
- .map(v => {
321
- const rangeValue = {
322
- from: moment(Number(v.from) * 1000).format('L'),
323
- to: moment(Number(v.to) * 1000).format('L')
324
- };
325
- return {
326
- value: stringifyDateRangeValue(rangeValue, t),
327
- rawValue: { from: v.from, to: v.to }
328
- };
329
- });
330
- }
331
- else {
332
- const valuesList = attribute?.values_list?.values ?? [];
333
- values = valuesList
334
- .filter(val => fieldValue.state === StandardFieldValueState.PRISTINE ||
335
- !fieldValue.editingValue ||
336
- attribute.format === AttributeFormat.date ||
337
- val.match(new RegExp(String(fieldValue.editingValue), 'i')))
338
- .map(v => ({ value: v, rawValue: v }));
339
- }
340
- }
341
- const hydratedValues = values.map(value => ({
342
- ...value,
343
- isNewValue: false,
344
- canCopy: isValuesListOpen &&
345
- attribute.format !== AttributeFormat.date &&
346
- attribute.format !== AttributeFormat.date_range
347
- }));
348
- // Display current value on top of values list as "new value". Don't do that for date range attribute as it
349
- // doesn't make much sense
350
- if (isValuesListOpen &&
351
- String(fieldValue.editingValue) &&
352
- attribute.format !== AttributeFormat.date_range &&
353
- !(attribute?.values_list?.values ?? []).some(v => v === fieldValue.editingValue)) {
354
- hydratedValues.unshift({
355
- value: String(fieldValue.editingValue),
356
- rawValue: String(fieldValue.editingValue),
357
- isNewValue: true,
358
- canCopy: false
359
- });
360
- }
361
- return hydratedValues;
362
- };
363
- const errorContent = (_jsx(ErrorMessage, { children: _jsxs(Space, { size: "small", children: [_jsx(ExclamationCircleOutlined, {}), fieldValue.error, _jsx(Button, { onClick: _handleCloseError, size: "small", icon: _jsx(CloseOutlined, {}), style: { border: 'none' } })] }) }));
364
- const isErrorVisible = fieldValue.isErrorDisplayed;
365
- const wrapperClasses = `
366
- ${attribute.format ? `format-${attribute.format}` : ''}
367
- ${fieldValue?.value?.payload ? 'has-value' : ''}
368
- ${fieldValue.isEditing ? 'editing' : ''}
369
- `;
370
- const canDeleteValue = !state.isReadOnly && fieldValue.idValue !== newValueId && attribute.format !== AttributeFormat.boolean;
371
- const valuesList = _getFilteredValuesList();
372
- const valueActions = [];
373
- if (!fieldValue.isEditing) {
374
- valueActions.push({
375
- button: _jsx(ValueDetailsBtn, { value: fieldValue.value, attribute: attribute, shape: "circle" })
376
- });
377
- }
378
- const hasMultipleValuesDisplay = attribute.multiple_values && !!Object.keys(state.values[state.activeScope].values).length;
379
- if (attribute?.versions_conf?.versionable) {
380
- const versions = {
381
- [VersionFieldScope.CURRENT]: state.values[VersionFieldScope.CURRENT]?.version ?? null,
382
- [VersionFieldScope.INHERITED]: state.values[VersionFieldScope.INHERITED]?.version ?? null
383
- };
384
- if (!hasMultipleValuesDisplay) {
385
- valueActions.push({
386
- title: t('values_version.title'),
387
- button: (_jsx(ValuesVersionBtn, { versions: versions, activeScope: state.activeScope, onScopeChange: onScopeChange }))
388
- });
389
- }
390
- }
391
- if (canDeleteValue && !fieldValue.isEditing && fieldValue.displayValue) {
392
- valueActions.push({
393
- title: t('global.delete'),
394
- button: _jsx(DeleteValueBtn, { onDelete: _handleDelete, shape: "circle" })
395
- });
396
- }
397
- const valuesVersionIndicatorStyle = {
398
- top: '1px',
399
- left: '1px',
400
- bottom: hasMultipleValuesDisplay ? '0' : '1px',
401
- borderRadius: hasMultipleValuesDisplay ? 'none' : token.borderRadius
402
- };
403
15
  const attributeFormatsWithDS = [
404
16
  AttributeFormat.text,
405
17
  AttributeFormat.date_range,
@@ -410,8 +22,50 @@ function StandardFieldValue({ value: fieldValue, onSubmit, onDelete, onScopeChan
410
22
  AttributeFormat.rich_text,
411
23
  AttributeFormat.color
412
24
  ];
413
- const attributeFormatsWithoutDS = [AttributeFormat.extended];
414
- return (_jsxs(_Fragment, { children: [attributeFormatsWithDS.includes(attribute.format) && (_jsx(StandardFieldValueDisplayHandler, { state: state, attribute: attribute, fieldValue: fieldValue, handleSubmit: _handleSubmit })), attributeFormatsWithoutDS.includes(attribute.format) && (_jsxs(_Fragment, { children: [fieldValue.isEditing && _jsx(Dimmer, { onClick: _handleCancel }), _jsxs(FormWrapper, { "$isEditing": fieldValue.isEditing, className: fieldValue.index === 0 ? 'first-value' : '', children: [_jsx(Popover, { placement: "topLeft", open: isErrorVisible, content: errorContent, children: _jsxs(InputWrapper, { "$isEditing": fieldValue.isEditing, className: wrapperClasses, "data-testid": "input-wrapper", children: [_jsx(ValuesVersionIndicator, { activeScope: state.activeScope, style: valuesVersionIndicatorStyle }), !fieldValue.index && (_jsxs("label", { className: "attribute-label", onClick: _handleFocus, children: [localizedTranslation(state.formElement.settings.label, availableLangs), editRecordState.externalUpdate.updatedValues[attribute?.id] && (_jsx(UpdatedFieldIcon, {})), state.activeScope === VersionFieldScope.INHERITED && (_jsx(InheritedFieldLabel, { version: state.values[VersionFieldScope.INHERITED].version }))] })), _getInput(), !state.metadataEdit && _jsx(FloatingMenu, { actions: valueActions })] }) }), _jsxs(ActionsWrapper, { ref: actionsWrapperRef, children: [fieldValue.isEditing && attribute?.values_list?.enable && (_jsx(ValuesList, { attribute: attribute, valuesList: valuesList, onValueSelect: _handleSubmit, onValueCopy: _handleValueCopy })), fieldValue.isEditing && (_jsxs(ButtonsWrapper, { children: [_jsx(Button, { size: "small", onClick: _handleCancel, style: { background: '#FFF' }, children: t('global.cancel') }), (!isValuesListEnabled || isValuesListOpen) && (_jsx(Button, { type: "primary", size: "small", onClick: _handleClickSubmit, children: t('global.submit') }))] }))] })] })] }))] }));
25
+ const commonProps = {
26
+ handleSubmit,
27
+ attribute,
28
+ presentationValue,
29
+ isLastValueOfMultivalues,
30
+ removeLastValueOfMultivalues,
31
+ readonly,
32
+ label,
33
+ calculatedFlags,
34
+ inheritedFlags,
35
+ setActiveValue
36
+ };
37
+ let valueContent;
38
+ if (isValuesListEnabled) {
39
+ valueContent = _jsx(DSListSelect, { ...commonProps });
40
+ }
41
+ else {
42
+ switch (attribute.format) {
43
+ case AttributeFormat.text:
44
+ valueContent = _jsx(DSInputWrapper, { ...commonProps });
45
+ break;
46
+ case AttributeFormat.date:
47
+ valueContent = _jsx(DSDatePickerWrapper, { ...commonProps });
48
+ break;
49
+ case AttributeFormat.date_range:
50
+ valueContent = _jsx(DSRangePickerWrapper, { ...commonProps });
51
+ break;
52
+ case AttributeFormat.numeric:
53
+ valueContent = _jsx(DSInputNumberWrapper, { ...commonProps });
54
+ break;
55
+ case AttributeFormat.encrypted:
56
+ valueContent = _jsx(DSInputEncryptedWrapper, { ...commonProps });
57
+ break;
58
+ case AttributeFormat.boolean:
59
+ valueContent = _jsx(DSBooleanWrapper, { ...commonProps });
60
+ break;
61
+ case AttributeFormat.rich_text:
62
+ valueContent = _jsx(DSRichTextWrapper, { ...commonProps });
63
+ break;
64
+ case AttributeFormat.color:
65
+ valueContent = _jsx(DSColorPickerWrapper, { ...commonProps });
66
+ }
67
+ }
68
+ return (attributeFormatsWithDS.includes(attribute.format) && (_jsx(Form.Item, { name: attribute.id, ...listField, noStyle: true, children: valueContent })));
415
69
  }
416
70
  export default StandardFieldValue;
417
71
  //# sourceMappingURL=StandardFieldValue.js.map