@leav/ui 0.3.6-df40eff → 0.3.6-e218b23

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 (335) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +8 -1
  3. package/dist/__mocks__/common/attribute.js.map +1 -1
  4. package/dist/__mocks__/common/form.d.ts +11 -5
  5. package/dist/__mocks__/common/form.js +18 -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 +2 -1
  10. package/dist/__mocks__/common/value.js.map +1 -1
  11. package/dist/_gqlTypes/index.d.ts +118 -40
  12. package/dist/_gqlTypes/index.js +96 -8
  13. package/dist/_gqlTypes/index.js.map +1 -1
  14. package/dist/_queries/records/getRecordColumnsValues.d.ts +4 -2
  15. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  16. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  17. package/dist/_queries/records/recordFormAttributeFragment.js +1 -0
  18. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  19. package/dist/_utils/interleaveElement.d.ts +1 -0
  20. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  21. package/dist/_utils/interleaveElement.js.map +1 -0
  22. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  23. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  24. package/dist/components/EditApplication/EditApplication.js +2 -2
  25. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  26. package/dist/components/EditApplication/_types.d.ts +2 -2
  27. package/dist/components/Explorer/DataView.d.ts +9 -1
  28. package/dist/components/Explorer/DataView.js +35 -16
  29. package/dist/components/Explorer/DataView.js.map +1 -1
  30. package/dist/components/Explorer/Explorer.d.ts +3 -1
  31. package/dist/components/Explorer/Explorer.js +45 -26
  32. package/dist/components/Explorer/Explorer.js.map +1 -1
  33. package/dist/components/Explorer/IdCard.d.ts +7 -0
  34. package/dist/components/Explorer/IdCard.js +15 -0
  35. package/dist/components/Explorer/IdCard.js.map +1 -0
  36. package/dist/components/Explorer/TableCell.d.ts +2 -1
  37. package/dist/components/Explorer/TableCell.js +123 -20
  38. package/dist/components/Explorer/TableCell.js.map +1 -1
  39. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  40. package/dist/components/Explorer/TableTagGroup.js +30 -0
  41. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  42. package/dist/components/Explorer/_queries/useExplorerData.d.ts +22 -4
  43. package/dist/components/Explorer/_queries/useExplorerData.js +93 -11
  44. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  45. package/dist/components/Explorer/_types.d.ts +28 -4
  46. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +2 -0
  47. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +37 -0
  48. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +1 -0
  49. package/dist/components/Explorer/index.d.ts +1 -3
  50. package/dist/components/Explorer/index.js +1 -3
  51. package/dist/components/Explorer/index.js.map +1 -1
  52. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +1 -1
  53. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +12 -5
  54. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  55. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
  56. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  57. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  58. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
  59. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
  60. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  61. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  62. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  63. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  64. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  65. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
  66. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  67. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  68. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  69. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  70. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  71. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +77 -0
  72. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  73. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  74. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  75. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  76. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  77. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +37 -0
  78. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  79. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  80. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +90 -0
  81. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  82. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  83. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +23 -0
  84. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  85. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  86. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  87. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  88. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  89. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +44 -0
  90. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  91. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +3 -0
  92. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +72 -0
  93. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +1 -0
  94. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  95. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +53 -0
  96. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  97. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +10 -0
  98. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +110 -0
  99. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  100. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  101. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  102. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  103. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  104. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  105. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
  106. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  107. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  108. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +3 -0
  109. package/dist/components/Explorer/{edit-settings/useOpenSettings.js → manage-view-settings/open-view-settings/useOpenViewSettings.js} +7 -5
  110. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  111. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  112. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +1 -1
  113. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.js +10 -10
  114. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  115. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  116. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
  117. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  118. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  119. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  120. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  121. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
  122. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +1 -5
  123. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  124. package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
  125. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  126. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
  127. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +13 -0
  128. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  129. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +138 -0
  130. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +194 -0
  131. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  132. package/dist/components/Explorer/nullValuesConditions.d.ts +1 -0
  133. package/dist/components/Explorer/nullValuesConditions.js +14 -0
  134. package/dist/components/Explorer/nullValuesConditions.js.map +1 -0
  135. package/dist/components/Explorer/useDeactivateAction.js +3 -2
  136. package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
  137. package/dist/components/Explorer/useEditAction.js +5 -3
  138. package/dist/components/Explorer/useEditAction.js.map +1 -1
  139. package/dist/components/Explorer/usePagination.d.ts +7 -0
  140. package/dist/components/Explorer/usePagination.js +25 -0
  141. package/dist/components/Explorer/usePagination.js.map +1 -0
  142. package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
  143. package/dist/components/Explorer/usePrimaryActions.js +4 -12
  144. package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
  145. package/dist/components/Explorer/useSearchInput.d.ts +10 -0
  146. package/dist/components/Explorer/useSearchInput.js +31 -0
  147. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  148. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  149. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  150. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  151. package/dist/components/Explorer/useViewSettingsReducer.d.ts +7 -0
  152. package/dist/components/Explorer/useViewSettingsReducer.js +60 -0
  153. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  154. package/dist/components/ExportModal/ExportModal.js +2 -2
  155. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  156. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  157. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  158. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  159. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  160. package/dist/components/RecordEdition/EditRecord/EditRecord.js +1 -1
  161. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  162. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +15 -2
  163. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  164. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +9 -20
  165. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  166. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  167. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  168. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  169. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  170. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  171. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  172. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +1 -1
  173. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  174. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  175. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  176. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  177. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  178. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  179. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  180. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  181. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
  182. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  183. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  184. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  185. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  186. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  187. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +147 -191
  188. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  189. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  190. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +10 -30
  191. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  192. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  193. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +38 -45
  194. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  195. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  196. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +31 -46
  197. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  198. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  199. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +9 -77
  200. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  201. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  202. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +29 -49
  203. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  204. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  205. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +34 -54
  206. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  207. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  208. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +48 -64
  209. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  210. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  211. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +30 -53
  212. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  213. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +16 -9
  214. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +66 -401
  215. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  216. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  217. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +45 -52
  218. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  219. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  220. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +15 -0
  221. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  222. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  223. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  224. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
  225. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  226. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  227. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +37 -0
  228. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  229. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  230. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  231. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  232. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  233. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  234. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  235. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
  236. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  237. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  238. package/dist/components/SelectTreeNode/index.js +1 -1
  239. package/dist/components/SelectTreeNode/index.js.map +1 -1
  240. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  241. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  242. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  243. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  244. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  245. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  246. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  247. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  248. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  249. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  250. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  251. package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
  252. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  253. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  254. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  255. package/dist/locales/en/shared.json +51 -13
  256. package/dist/locales/fr/shared.json +51 -13
  257. package/package.json +5 -2
  258. package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
  259. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
  260. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
  261. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  262. package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
  263. package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -89
  264. package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
  265. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  266. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  267. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  268. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  269. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  270. package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
  271. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  272. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
  273. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
  274. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
  275. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  276. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  277. package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
  278. package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -43
  279. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -58
  280. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
  281. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  282. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
  283. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  284. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  285. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  286. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  287. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  288. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  289. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  290. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
  291. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  292. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  293. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  294. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  295. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  296. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  297. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  298. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  299. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  300. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  301. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  302. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  303. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  304. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  305. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  306. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  307. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  308. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  309. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  310. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  311. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  312. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  313. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  314. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  315. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  316. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  317. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  318. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  319. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  320. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  321. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  322. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  323. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  324. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  325. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  326. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +0 -0
  327. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +0 -0
  328. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.d.ts +0 -0
  329. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +0 -0
  330. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  331. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  332. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  333. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
  334. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
  335. /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
@@ -1,138 +0,0 @@
1
- import { AnyPrimitive, IDateRangeValue, IKeyValue } from '@leav/utils';
2
- import { VersionFieldScope, FormElement, ICommonFieldsReducerState, StandardValueTypes } from '../../../../../components/RecordEdition/EditRecordContent/_types';
3
- import { RecordFormElementsValueStandardValue } from '../../../../../hooks/useGetRecordForm/useGetRecordForm';
4
- import { IRecordIdentityWhoAmI } from '../../../../../types/records';
5
- import { IValueVersion } from '../../../../../types/values';
6
- import { RecordFormAttributeStandardAttributeFragment, ValueDetailsValueFragment } from '../../../../../_gqlTypes';
7
- import { IRecordPropertyStandard } from '../../../../../_queries/records/getRecordPropertiesQuery';
8
- export type IdValue = string | null;
9
- export declare const newValueId = "__new__";
10
- export declare enum StandardFieldValueState {
11
- PRISTINE = "PRISTINE",
12
- DIRTY = "DIRTY"
13
- }
14
- export type StandardFieldReducerValues = IKeyValue<IStandardFieldValue>;
15
- export interface IStandardFieldValue {
16
- idValue: IdValue;
17
- index: number;
18
- value: IRecordPropertyStandard | null;
19
- displayValue: StandardValueTypes;
20
- editingValue: StandardValueTypes;
21
- originRawValue: StandardValueTypes;
22
- isEditing: boolean;
23
- error?: string;
24
- isErrorDisplayed: boolean;
25
- state: StandardFieldValueState;
26
- }
27
- interface IInheritedNotOverride {
28
- isInheritedValue: true;
29
- isInheritedOverrideValue: false;
30
- isInheritedNotOverrideValue: true;
31
- inheritedValue: RecordFormElementsValueStandardValue;
32
- }
33
- interface IInheritedOverride {
34
- isInheritedValue: true;
35
- isInheritedOverrideValue: true;
36
- isInheritedNotOverrideValue: false;
37
- inheritedValue: RecordFormElementsValueStandardValue;
38
- }
39
- interface INotInherited {
40
- isInheritedValue: false;
41
- isInheritedOverrideValue: false;
42
- isInheritedNotOverrideValue: false;
43
- inheritedValue: null;
44
- }
45
- export type InheritedFlags = INotInherited | IInheritedOverride | IInheritedNotOverride;
46
- interface ICalculatedNotOverride {
47
- isCalculatedValue: true;
48
- isCalculatedOverrideValue: false;
49
- isCalculatedNotOverrideValue: true;
50
- calculatedValue: RecordFormElementsValueStandardValue;
51
- }
52
- interface ICalculatedOverride {
53
- isCalculatedValue: true;
54
- isCalculatedOverrideValue: true;
55
- isCalculatedNotOverrideValue: false;
56
- calculatedValue: RecordFormElementsValueStandardValue;
57
- }
58
- interface INotCalculated {
59
- isCalculatedValue: false;
60
- isCalculatedOverrideValue: false;
61
- isCalculatedNotOverrideValue: false;
62
- calculatedValue: null;
63
- }
64
- export type CalculatedFlags = INotCalculated | ICalculatedOverride | ICalculatedNotOverride;
65
- export type IStandardFieldReducerState = ICommonFieldsReducerState<StandardFieldReducerValues, RecordFormAttributeStandardAttributeFragment> & {
66
- metadataEdit: boolean;
67
- } & InheritedFlags & CalculatedFlags;
68
- export declare enum StandardFieldReducerActionsTypes {
69
- ADD_VALUE = "ADD_VALUE",
70
- CHANGE_VALUE = "CHANGE_VALUE",
71
- FOCUS_FIELD = "FOCUS_FIELD",
72
- SET_ERROR = "SET_ERROR",
73
- SET_ERROR_DISPLAY = "SET_ERROR_DISPLAY",
74
- UNEDIT_FIELD = "UNEDIT_FIELD",
75
- CLOSE_ERROR = "CLOSE_ERROR",
76
- CLEAR_ERROR = "CLEAR_ERROR",
77
- UPDATE_AFTER_SUBMIT = "UPDATE_AFTER_SUBMIT",
78
- UPDATE_AFTER_DELETE = "UPDATE_AFTER_DELETE",
79
- CANCEL_EDITING = "CANCEL_EDITING",
80
- CHANGE_VERSION_SCOPE = "CHANGE_VERSION_SCOPE",
81
- REFRESH_VALUES = "REFRESH_VALUES"
82
- }
83
- export declare const virginValue: IStandardFieldValue;
84
- export type StandardFieldReducerValueActions = {
85
- type: StandardFieldReducerActionsTypes.ADD_VALUE;
86
- idValue?: IdValue;
87
- } | {
88
- type: StandardFieldReducerActionsTypes.CHANGE_VALUE;
89
- idValue: IdValue;
90
- value: AnyPrimitive | IDateRangeValue;
91
- } | {
92
- type: StandardFieldReducerActionsTypes.FOCUS_FIELD;
93
- idValue: IdValue;
94
- } | {
95
- type: StandardFieldReducerActionsTypes.SET_ERROR;
96
- idValue: IdValue;
97
- error: string;
98
- } | {
99
- type: StandardFieldReducerActionsTypes.UNEDIT_FIELD;
100
- idValue: IdValue;
101
- } | {
102
- type: StandardFieldReducerActionsTypes.SET_ERROR_DISPLAY;
103
- idValue: IdValue;
104
- displayError: boolean;
105
- } | {
106
- type: StandardFieldReducerActionsTypes.CLEAR_ERROR;
107
- idValue: IdValue;
108
- } | {
109
- type: StandardFieldReducerActionsTypes.UPDATE_AFTER_SUBMIT;
110
- idValue: IdValue;
111
- newValue: ValueDetailsValueFragment;
112
- } | {
113
- type: StandardFieldReducerActionsTypes.UPDATE_AFTER_DELETE;
114
- idValue?: IdValue;
115
- allDeleted?: boolean;
116
- } | {
117
- type: StandardFieldReducerActionsTypes.CANCEL_EDITING;
118
- idValue: IdValue;
119
- };
120
- export type StandardFieldReducerFieldActions = {
121
- type: StandardFieldReducerActionsTypes.CHANGE_VERSION_SCOPE;
122
- scope: VersionFieldScope;
123
- } | {
124
- type: StandardFieldReducerActionsTypes.REFRESH_VALUES;
125
- values: RecordFormElementsValueStandardValue[];
126
- formVersion: IValueVersion;
127
- };
128
- export type StandardFieldReducerAction = StandardFieldReducerValueActions | StandardFieldReducerFieldActions;
129
- export type StandardFieldDispatchFunc = (action: StandardFieldReducerAction) => void;
130
- export declare const computeInitialState: (params: {
131
- element: FormElement<unknown>;
132
- record: IRecordIdentityWhoAmI;
133
- isRecordReadOnly: boolean;
134
- metadataEdit: boolean;
135
- formVersion: IValueVersion;
136
- }) => IStandardFieldReducerState;
137
- declare const standardFieldReducer: (state: IStandardFieldReducerState, action: StandardFieldReducerAction) => IStandardFieldReducerState;
138
- export default standardFieldReducer;
@@ -1,361 +0,0 @@
1
- import isCurrentVersion from '../../../../../components/RecordEdition/EditRecordContent/helpers/isCurrentVersion';
2
- import { VersionFieldScope } from '../../../../../components/RecordEdition/EditRecordContent/_types';
3
- import { AttributeFormat } from '../../../../../_gqlTypes';
4
- import { arrayValueVersionToObject } from '../../../../../_utils';
5
- export const newValueId = '__new__';
6
- export var StandardFieldValueState;
7
- (function (StandardFieldValueState) {
8
- StandardFieldValueState["PRISTINE"] = "PRISTINE";
9
- StandardFieldValueState["DIRTY"] = "DIRTY";
10
- })(StandardFieldValueState || (StandardFieldValueState = {}));
11
- export var StandardFieldReducerActionsTypes;
12
- (function (StandardFieldReducerActionsTypes) {
13
- StandardFieldReducerActionsTypes["ADD_VALUE"] = "ADD_VALUE";
14
- StandardFieldReducerActionsTypes["CHANGE_VALUE"] = "CHANGE_VALUE";
15
- StandardFieldReducerActionsTypes["FOCUS_FIELD"] = "FOCUS_FIELD";
16
- StandardFieldReducerActionsTypes["SET_ERROR"] = "SET_ERROR";
17
- StandardFieldReducerActionsTypes["SET_ERROR_DISPLAY"] = "SET_ERROR_DISPLAY";
18
- StandardFieldReducerActionsTypes["UNEDIT_FIELD"] = "UNEDIT_FIELD";
19
- StandardFieldReducerActionsTypes["CLOSE_ERROR"] = "CLOSE_ERROR";
20
- StandardFieldReducerActionsTypes["CLEAR_ERROR"] = "CLEAR_ERROR";
21
- StandardFieldReducerActionsTypes["UPDATE_AFTER_SUBMIT"] = "UPDATE_AFTER_SUBMIT";
22
- StandardFieldReducerActionsTypes["UPDATE_AFTER_DELETE"] = "UPDATE_AFTER_DELETE";
23
- StandardFieldReducerActionsTypes["CANCEL_EDITING"] = "CANCEL_EDITING";
24
- StandardFieldReducerActionsTypes["CHANGE_VERSION_SCOPE"] = "CHANGE_VERSION_SCOPE";
25
- StandardFieldReducerActionsTypes["REFRESH_VALUES"] = "REFRESH_VALUES";
26
- })(StandardFieldReducerActionsTypes || (StandardFieldReducerActionsTypes = {}));
27
- export const virginValue = {
28
- idValue: null,
29
- index: 0,
30
- value: null,
31
- displayValue: '',
32
- editingValue: '',
33
- originRawValue: '',
34
- error: '',
35
- isErrorDisplayed: false,
36
- isEditing: false,
37
- state: StandardFieldValueState.PRISTINE
38
- };
39
- const _updateValueData = (action, state, newValueData) => {
40
- if (typeof action?.idValue === 'undefined' ||
41
- typeof state?.values?.[state.activeScope]?.values?.[action.idValue] === 'undefined') {
42
- return state;
43
- }
44
- const res = {
45
- ...state,
46
- values: {
47
- ...state.values,
48
- [state.activeScope]: {
49
- ...state.values[state.activeScope],
50
- values: {
51
- ...state.values[state.activeScope]?.values,
52
- [action.idValue]: {
53
- ...state.values[state.activeScope].values[action.idValue],
54
- ...newValueData
55
- }
56
- }
57
- }
58
- }
59
- };
60
- return res;
61
- };
62
- const getInheritedValue = (values) => values.filter(value => value.isInherited);
63
- const getCalculatedValue = (values) => values.filter(value => value.isCalculated);
64
- const getUserInputValue = (values) => values.filter(value => !value.isInherited && !value.isCalculated && value.raw_value !== null);
65
- /**
66
- * For given list of values, determine if there is inherited values, inherited/current version and default active scope
67
- */
68
- const _computeScopeAndValues = (params) => {
69
- const { attribute, values, formVersion } = params;
70
- // Get override or inhertied values
71
- const valuesToHandle = getUserInputValue(values);
72
- const preparedValues = valuesToHandle.length
73
- ? valuesToHandle.reduce((allValues, fieldValue, index) => ({
74
- ...allValues,
75
- [fieldValue?.id_value ?? null]: {
76
- ...virginValue,
77
- idValue: fieldValue?.id_value ?? null,
78
- index,
79
- value: fieldValue ?? null,
80
- displayValue: fieldValue?.value ?? '',
81
- editingValue: attribute.format === AttributeFormat.encrypted ? '' : (fieldValue?.raw_value ?? ''),
82
- originRawValue: attribute.format === AttributeFormat.encrypted ? '' : (fieldValue?.raw_value ?? '')
83
- }
84
- }), {})
85
- : {
86
- [newValueId]: {
87
- ...virginValue,
88
- idValue: newValueId
89
- }
90
- };
91
- const currentVersion = attribute?.versions_conf?.versionable
92
- ? attribute.versions_conf.profile.trees.reduce((relevantVersion, tree) => {
93
- if (formVersion?.[tree.id]) {
94
- relevantVersion[tree.id] = formVersion[tree.id];
95
- }
96
- return relevantVersion;
97
- }, {})
98
- : null;
99
- const hasVersionInheritedValues = attribute?.versions_conf?.versionable
100
- ? !isCurrentVersion(currentVersion, values?.[0]?.version ?? currentVersion)
101
- : false; // We assume that all values have the same version
102
- const inheritedVersion = hasVersionInheritedValues ? values?.[0]?.version : null;
103
- return {
104
- activeScope: hasVersionInheritedValues ? VersionFieldScope.INHERITED : VersionFieldScope.CURRENT,
105
- values: {
106
- [VersionFieldScope.CURRENT]: {
107
- version: currentVersion ?? null,
108
- values: hasVersionInheritedValues
109
- ? { [newValueId]: { ...virginValue, idValue: newValueId } }
110
- : preparedValues
111
- },
112
- [VersionFieldScope.INHERITED]: hasVersionInheritedValues
113
- ? { version: inheritedVersion ?? null, values: preparedValues }
114
- : null
115
- }
116
- };
117
- };
118
- const _computeInheritedFlags = (fieldValues) => {
119
- const inheritedValue = fieldValues.find(fieldValue => fieldValue.isInherited);
120
- const overrideValue = fieldValues.find(fieldValue => !fieldValue.isInherited && !fieldValue.isCalculated);
121
- if (inheritedValue === undefined) {
122
- return {
123
- inheritedValue: null,
124
- isInheritedValue: false,
125
- isInheritedOverrideValue: false,
126
- isInheritedNotOverrideValue: false
127
- };
128
- }
129
- const isInheritedValue = true;
130
- if (!overrideValue || overrideValue.value === null) {
131
- return {
132
- inheritedValue,
133
- isInheritedValue,
134
- isInheritedNotOverrideValue: true,
135
- isInheritedOverrideValue: false
136
- };
137
- }
138
- return {
139
- inheritedValue,
140
- isInheritedValue,
141
- isInheritedNotOverrideValue: false,
142
- isInheritedOverrideValue: true
143
- };
144
- };
145
- const _computeCalculatedFlags = (fieldValues) => {
146
- const calculatedValue = fieldValues.find(fieldValue => fieldValue.isCalculated);
147
- const overrideValue = fieldValues.find(fieldValue => !fieldValue.isCalculated && !fieldValue.isInherited);
148
- if (calculatedValue === undefined) {
149
- return {
150
- calculatedValue: null,
151
- isCalculatedValue: false,
152
- isCalculatedOverrideValue: false,
153
- isCalculatedNotOverrideValue: false
154
- };
155
- }
156
- const isCalculatedValue = true;
157
- if (!overrideValue || overrideValue.value === null) {
158
- return {
159
- calculatedValue,
160
- isCalculatedValue,
161
- isCalculatedNotOverrideValue: true,
162
- isCalculatedOverrideValue: false
163
- };
164
- }
165
- return {
166
- calculatedValue,
167
- isCalculatedValue,
168
- isCalculatedNotOverrideValue: false,
169
- isCalculatedOverrideValue: true
170
- };
171
- };
172
- export const computeInitialState = (params) => {
173
- const { element, record, metadataEdit, isRecordReadOnly, formVersion } = params;
174
- const attribute = element.attribute;
175
- const fieldValues = [...element.values];
176
- return {
177
- attribute,
178
- record,
179
- formElement: { ...element },
180
- isReadOnly: attribute?.readonly || isRecordReadOnly || !attribute?.permissions?.edit_value,
181
- metadataEdit,
182
- ..._computeScopeAndValues({ attribute, values: fieldValues, formVersion }),
183
- ..._computeInheritedFlags(fieldValues),
184
- ..._computeCalculatedFlags(fieldValues)
185
- };
186
- };
187
- const standardFieldReducer = (state, action) => {
188
- const _ensureOneValueIsPresent = (values) => {
189
- if (Object.keys(values).length) {
190
- return values;
191
- }
192
- return {
193
- [newValueId]: {
194
- ...virginValue,
195
- idValue: newValueId
196
- }
197
- };
198
- };
199
- switch (action.type) {
200
- case StandardFieldReducerActionsTypes.ADD_VALUE:
201
- return {
202
- ...state,
203
- values: {
204
- ...state.values,
205
- [state.activeScope]: {
206
- ...state.values[state.activeScope],
207
- values: {
208
- ...state.values[state.activeScope].values,
209
- [action.idValue ?? newValueId]: {
210
- ...virginValue,
211
- idValue: action.idValue ?? newValueId,
212
- index: Object.keys(state.values).length,
213
- isEditing: true
214
- }
215
- }
216
- }
217
- }
218
- };
219
- case StandardFieldReducerActionsTypes.CHANGE_VALUE:
220
- return _updateValueData(action, state, {
221
- editingValue: action.value,
222
- state: StandardFieldValueState.DIRTY
223
- });
224
- case StandardFieldReducerActionsTypes.FOCUS_FIELD:
225
- return _updateValueData(action, state, {
226
- isEditing: true
227
- });
228
- case StandardFieldReducerActionsTypes.SET_ERROR:
229
- return _updateValueData(action, state, {
230
- error: action.error,
231
- isErrorDisplayed: true,
232
- state: StandardFieldValueState.DIRTY
233
- });
234
- case StandardFieldReducerActionsTypes.CLEAR_ERROR:
235
- return _updateValueData(action, state, {
236
- error: '',
237
- isErrorDisplayed: false
238
- });
239
- case StandardFieldReducerActionsTypes.SET_ERROR_DISPLAY:
240
- return _updateValueData(action, state, {
241
- isErrorDisplayed: action.displayError
242
- });
243
- case StandardFieldReducerActionsTypes.UNEDIT_FIELD:
244
- return _updateValueData(action, state, {
245
- isEditing: false,
246
- isErrorDisplayed: false,
247
- error: '',
248
- state: StandardFieldValueState.PRISTINE
249
- });
250
- case StandardFieldReducerActionsTypes.UPDATE_AFTER_SUBMIT: {
251
- const newRawValue = state.attribute.format !== AttributeFormat.encrypted
252
- ? action.newValue.raw_value
253
- : state.values[state.activeScope].values?.[action.idValue]?.editingValue;
254
- const newValueVersion = action.newValue.version ? arrayValueVersionToObject(action.newValue.version) : null;
255
- const newValueData = {
256
- ...virginValue,
257
- idValue: action.newValue.id_value,
258
- value: {
259
- ...action.newValue,
260
- version: newValueVersion
261
- },
262
- displayValue: action.newValue.value,
263
- editingValue: newRawValue,
264
- originRawValue: newRawValue,
265
- version: newValueVersion
266
- };
267
- if (action.idValue !== newValueId) {
268
- return _updateValueData(action, {
269
- ...state,
270
- isInheritedOverrideValue: state.isInheritedValue ? true : state.isInheritedOverrideValue,
271
- isInheritedNotOverrideValue: state.isInheritedValue ? false : state.isInheritedNotOverrideValue,
272
- isCalculatedOverrideValue: state.isCalculatedValue ? true : state.isCalculatedOverrideValue,
273
- isCalculatedNotOverrideValue: state.isCalculatedValue
274
- ? false
275
- : state.isCalculatedNotOverrideValue
276
- }, newValueData);
277
- }
278
- const newState = {
279
- ...state
280
- };
281
- newState.isInheritedOverrideValue = state.isInheritedValue ? true : state.isInheritedOverrideValue;
282
- newState.isInheritedNotOverrideValue = state.isInheritedValue ? false : state.isInheritedNotOverrideValue;
283
- newState.isCalculatedOverrideValue = state.isCalculatedValue ? true : state.isCalculatedOverrideValue;
284
- newState.isCalculatedNotOverrideValue = state.isCalculatedValue
285
- ? false
286
- : state.isCalculatedNotOverrideValue;
287
- const newStateActiveValues = newState.values[newState.activeScope].values;
288
- // Delete new value placeholder, replace it with actual new value with proper ID
289
- const newValIndex = newStateActiveValues[newValueId]?.index;
290
- delete newStateActiveValues[newValueId];
291
- newStateActiveValues[action.newValue.id_value] = {
292
- ...newValueData,
293
- index: newValIndex ?? Object.keys(newState.values).length
294
- };
295
- return newState;
296
- }
297
- case StandardFieldReducerActionsTypes.UPDATE_AFTER_DELETE: {
298
- const newState = {
299
- ...state,
300
- isInheritedOverrideValue: state.isInheritedValue ? false : state.isInheritedOverrideValue,
301
- isInheritedNotOverrideValue: state.isInheritedValue ? true : state.isInheritedNotOverrideValue,
302
- isCalculatedOverrideValue: state.isCalculatedValue ? false : state.isCalculatedOverrideValue,
303
- isCalculatedNotOverrideValue: state.isCalculatedValue ? true : state.isCalculatedNotOverrideValue
304
- };
305
- const newStateActiveValues = newState.values[newState.activeScope].values;
306
- delete newStateActiveValues[action.idValue];
307
- if (action.allDeleted) {
308
- newState.values[newState.activeScope].values = _ensureOneValueIsPresent({});
309
- return newState;
310
- }
311
- newState.values[newState.activeScope].values = Object.values(_ensureOneValueIsPresent(newStateActiveValues)).reduce((values, value, index) => ({
312
- ...values,
313
- [value.idValue]: {
314
- ...value,
315
- index
316
- }
317
- }), {});
318
- return newState;
319
- }
320
- case StandardFieldReducerActionsTypes.CANCEL_EDITING: {
321
- if (action.idValue !== newValueId) {
322
- return _updateValueData(action, state, {
323
- editingValue: state.values[state.activeScope].values[action.idValue].originRawValue,
324
- isEditing: false,
325
- state: StandardFieldValueState.PRISTINE
326
- });
327
- }
328
- const newState = {
329
- ...state,
330
- isInheritedOverrideValue: state.isInheritedValue ? false : state.isInheritedOverrideValue,
331
- isInheritedNotOverrideValue: state.isInheritedValue ? true : state.isInheritedNotOverrideValue,
332
- isCalculatedOverrideValue: state.isCalculatedValue ? false : state.isCalculatedOverrideValue,
333
- isCalculatedNotOverrideValue: state.isCalculatedValue ? true : state.isCalculatedNotOverrideValue
334
- };
335
- delete newState.values[newState.activeScope].values[newValueId];
336
- newState.values[newState.activeScope].values = _ensureOneValueIsPresent(newState.values[newState.activeScope].values);
337
- return newState;
338
- }
339
- case StandardFieldReducerActionsTypes.CHANGE_VERSION_SCOPE: {
340
- return {
341
- ...state,
342
- activeScope: action.scope
343
- };
344
- }
345
- case StandardFieldReducerActionsTypes.REFRESH_VALUES: {
346
- const newScopeAndValues = _computeScopeAndValues({
347
- attribute: state.formElement.attribute,
348
- values: action.values,
349
- formVersion: action.formVersion
350
- });
351
- return {
352
- ...state,
353
- ...newScopeAndValues
354
- };
355
- }
356
- default:
357
- return state;
358
- }
359
- };
360
- export default standardFieldReducer;
361
- //# sourceMappingURL=standardFieldReducer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"standardFieldReducer.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.ts"],"names":[],"mappings":"AAIA,OAAO,gBAAgB,MAAM,yEAAyE,CAAC;AACvG,OAAO,EACH,iBAAiB,EAIpB,MAAM,uDAAuD,CAAC;AAI/D,OAAO,EACH,eAAe,EAIlB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,yBAAyB,EAAC,MAAM,YAAY,CAAC;AAGrD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;AAEpC,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,gDAAqB,CAAA;IACrB,0CAAe,CAAA;AACnB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAuED,MAAM,CAAN,IAAY,gCAcX;AAdD,WAAY,gCAAgC;IACxC,2DAAuB,CAAA;IACvB,iEAA6B,CAAA;IAC7B,+DAA2B,CAAA;IAC3B,2DAAuB,CAAA;IACvB,2EAAuC,CAAA;IACvC,iEAA6B,CAAA;IAC7B,+DAA2B,CAAA;IAC3B,+DAA2B,CAAA;IAC3B,+EAA2C,CAAA;IAC3C,+EAA2C,CAAA;IAC3C,qEAAiC,CAAA;IACjC,iFAA6C,CAAA;IAC7C,qEAAiC,CAAA;AACrC,CAAC,EAdW,gCAAgC,KAAhC,gCAAgC,QAc3C;AAED,MAAM,CAAC,MAAM,WAAW,GAAwB;IAC5C,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,IAAI;IACX,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,cAAc,EAAE,EAAE;IAClB,KAAK,EAAE,EAAE;IACT,gBAAgB,EAAE,KAAK;IACvB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,uBAAuB,CAAC,QAAQ;CAC1C,CAAC;AAgEF,MAAM,gBA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,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B;aACpG,CAAC;YAEF,OAAO,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAEhE,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,wBAAwB,CACnE,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,CAC/C,CAAC;YAEF,OAAO,QAAsC,CAAC;QAClD,CAAC;QACD,KAAK,gCAAgC,CAAC,oBAAoB,CAAC,CAAC,CAAC;YACzD,OAAO;gBACH,GAAG,KAAK;gBACR,WAAW,EAAE,MAAM,CAAC,KAAK;aAC5B,CAAC;QACN,CAAC;QACD,KAAK,gCAAgC,CAAC,cAAc,CAAC,CAAC,CAAC;YACnD,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;gBAC7C,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,SAAS;gBACtC,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,WAAW,EAAE,MAAM,CAAC,WAAW;aAClC,CAAC,CAAC;YAEH,OAAO;gBACH,GAAG,KAAK;gBACR,GAAG,iBAAiB;aACvB,CAAC;QACN,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,7 +0,0 @@
1
- import React, { Dispatch } from 'react';
2
- import { IStandardFieldReducerState, StandardFieldReducerValueActions } from './standardFieldReducer';
3
- export interface IStandardFieldReducerContext {
4
- state: IStandardFieldReducerState;
5
- dispatch: Dispatch<StandardFieldReducerValueActions>;
6
- }
7
- export declare const StandardFieldReducerContext: React.Context<IStandardFieldReducerContext>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"standardFieldReducerContext.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,KAAiB,MAAM,OAAO,CAAC;AAQtC,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAA+B;IACzF,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;CACjB,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const useStandardFieldReducer: () => import("./standardFieldReducerContext").IStandardFieldReducerContext;
@@ -1,7 +0,0 @@
1
- // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
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 { StandardFieldReducerContext } from './standardFieldReducerContext';
6
- export const useStandardFieldReducer = () => useContext(StandardFieldReducerContext);
7
- //# sourceMappingURL=useStandardFieldReducer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useStandardFieldReducer.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,EAAC,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { IStandardInputProps } from '../../../../../../../components/RecordEdition/EditRecordContent/_types';
2
- declare function CheckboxInput({ state, fieldValue, onSubmit }: IStandardInputProps): JSX.Element;
3
- export default CheckboxInput;
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx } 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 { Checkbox } from 'antd';
6
- function CheckboxInput({ state, fieldValue, onSubmit }) {
7
- const _handleCheckboxChange = (e) => {
8
- onSubmit(String(e.target.checked));
9
- };
10
- const { value } = fieldValue;
11
- return (_jsx(Checkbox, { className: "nested-input", disabled: state.isReadOnly, checked: !!value?.payload, indeterminate: typeof value?.payload !== 'boolean', onChange: _handleCheckboxChange }));
12
- }
13
- export default CheckboxInput;
14
- //# sourceMappingURL=CheckboxInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxInput.js","sourceRoot":"","sources":["../../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,MAAM,CAAC;AAI9B,SAAS,aAAa,CAAC,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAsB;IACrE,MAAM,qBAAqB,GAAG,CAAC,CAAsB,EAAE,EAAE;QACrD,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,MAAM,EAAC,KAAK,EAAC,GAAG,UAAU,CAAC;IAE3B,OAAO,CACH,KAAC,QAAQ,IACL,SAAS,EAAC,cAAc,EACxB,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EACzB,aAAa,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK,SAAS,EAClD,QAAQ,EAAE,qBAAqB,GACjC,CACL,CAAC;AACN,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -1,3 +0,0 @@
1
- import { IStandardInputProps } from '../../../../../../../components/RecordEdition/EditRecordContent/_types';
2
- declare function ColorInput({ state, fieldValue, onChange, onFocus }: IStandardInputProps): JSX.Element;
3
- export default ColorInput;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } 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 { ColorPicker } from 'antd';
6
- function ColorInput({ state, fieldValue, onChange, onFocus }) {
7
- const { editingValue } = fieldValue;
8
- const colorValue = '#' + editingValue.toString();
9
- const _handleColorChange = (value) => {
10
- onChange(value.toHex().toUpperCase());
11
- };
12
- const colorPickerStyle = {
13
- height: fieldValue.index ? '44px' : '54px',
14
- width: '100%',
15
- justifyContent: 'left',
16
- paddingTop: fieldValue.index ? '4px' : '14px',
17
- paddingLeft: '15px'
18
- };
19
- return (_jsx(ColorPicker, { showText: true, disabledAlpha: true, disabled: state.isReadOnly, value: colorValue, style: colorPickerStyle, open: fieldValue.isEditing, size: "small", onChangeComplete: _handleColorChange, onOpenChange: onFocus }));
20
- }
21
- export default ColorInput;
22
- //# sourceMappingURL=ColorInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ColorInput.js","sourceRoot":"","sources":["../../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,WAAW,EAAC,MAAM,MAAM,CAAC;AAIjC,SAAS,UAAU,CAAC,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAsB;IAC3E,MAAM,EAAC,YAAY,EAAC,GAAG,UAAU,CAAC;IAClC,MAAM,UAAU,GAAG,GAAG,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;IAEjD,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAE,EAAE;QACxC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1C,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAwB;QAC1C,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAC1C,KAAK,EAAE,MAAM;QACb,cAAc,EAAE,MAAM;QACtB,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM;QAC7C,WAAW,EAAE,MAAM;KACtB,CAAC;IAEF,OAAO,CACH,KAAC,WAAW,IACR,QAAQ,QACR,aAAa,QACb,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,UAAU,CAAC,SAAS,EAC1B,IAAI,EAAC,OAAO,EACZ,gBAAgB,EAAE,kBAAkB,EACpC,YAAY,EAAE,OAAO,GACvB,CACL,CAAC;AACN,CAAC;AAED,eAAe,UAAU,CAAC"}
@@ -1,3 +0,0 @@
1
- import { IStandardInputProps } from '../../../../../../../components/RecordEdition/EditRecordContent/_types';
2
- declare function DateInput({ state, fieldValue, onFocus, onSubmit, settings }: IStandardInputProps): JSX.Element;
3
- export default DateInput;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { DatePicker, Input } from 'antd';
3
- import dayjs from 'dayjs';
4
- import { themeVars } from '../../../../../../../antdTheme';
5
- import { useSharedTranslation } from '../../../../../../../hooks/useSharedTranslation';
6
- function DateInput({ state, fieldValue, onFocus, onSubmit, settings }) {
7
- const { editingValue } = fieldValue;
8
- const { i18n } = useSharedTranslation();
9
- const attribute = state.formElement.attribute;
10
- const isValuesListEnabled = !!attribute?.values_list?.enable;
11
- const isValuesListOpen = !!attribute?.values_list?.allowFreeEntry;
12
- const _handleDateChange = (selectedDate) => {
13
- const dateToSave = selectedDate ? String(selectedDate.unix()) : null;
14
- onSubmit(dateToSave);
15
- };
16
- const dateValue = editingValue ? dayjs(Number(editingValue) * 1000) : null;
17
- // If we have a values list, picker must be on top to keep list readable
18
- const pickerPosition = isValuesListEnabled ? 'topLeft' : null;
19
- return !isValuesListEnabled || isValuesListOpen ? (_jsx(DatePicker, { className: "field-wrapper", "data-testid": "datepicker", disabled: state.isReadOnly, picker: "date", onChange: _handleDateChange, value: dateValue, autoFocus: true, defaultOpen: true, showTime: !!settings.withTime, onOk: _handleDateChange, popupStyle: { background: themeVars.defaultBg }, style: { background: themeVars.defaultBg, width: '100%' }, allowClear: false, placement: pickerPosition })) : (_jsx(Input, { className: `field-wrapper ${editingValue ? 'has-value' : ''}`, value: editingValue ? new Intl.DateTimeFormat(i18n.language).format(new Date(Number(editingValue) * 1000)) : '', onFocus: onFocus, disabled: true, allowClear: true, autoFocus: true }, "editing"));
20
- }
21
- export default DateInput;
22
- //# sourceMappingURL=DateInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateInput.js","sourceRoot":"","sources":["../../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,UAAU,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE,SAAS,SAAS,CAAC,EAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAsB;IACpF,MAAM,EAAC,YAAY,EAAC,GAAG,UAAU,CAAC;IAClC,MAAM,EAAC,IAAI,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEtC,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,SAAyD,CAAC;IAC9F,MAAM,mBAAmB,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW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