@leav/ui 0.3.5-7c2bdc0 → 0.3.6-0a4efa6
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.
- package/dist/__mocks__/common/attribute.js +0 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +4 -4
- package/dist/__mocks__/common/form.js +2 -0
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/library.d.ts +31 -31
- package/dist/__mocks__/common/value.js +2 -2
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
- package/dist/__mocks__/react-i18next.d.ts +9 -9
- package/dist/__mocks__/react-i18next.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +668 -595
- package/dist/_gqlTypes/index.js +51 -5
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +0 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +1 -1
- package/dist/_queries/records/getFileDataQuery.d.ts +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +2 -2
- package/dist/_queries/records/getRecordPropertiesQuery.d.ts +24 -14
- package/dist/_queries/records/getRecordPropertiesQuery.js +10 -4
- package/dist/_queries/records/getRecordPropertiesQuery.js.map +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.d.ts +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
- package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
- package/dist/_queries/values/valueDetailsFragment.js +8 -5
- package/dist/_queries/values/valueDetailsFragment.js.map +1 -1
- package/dist/_utils/__mocks__/isDevEnv.d.ts +1 -0
- package/dist/_utils/__mocks__/{isDevelopmentHelper.js → isDevEnv.js} +2 -2
- package/dist/_utils/__mocks__/isDevEnv.js.map +1 -0
- package/dist/_utils/getFiltersFromRequest.js +1 -1
- package/dist/_utils/getFiltersFromRequest.js.map +1 -1
- package/dist/_utils/getRequestFromFilter.js.map +1 -1
- package/dist/_utils/index.d.ts +1 -1
- package/dist/_utils/index.js +1 -1
- package/dist/_utils/index.js.map +1 -1
- package/dist/_utils/isDevEnv.d.ts +1 -0
- package/dist/_utils/{isDevelopmentHelper.js → isDevEnv.js} +2 -2
- package/dist/_utils/isDevEnv.js.map +1 -0
- package/dist/_utils/typeguards.d.ts +2 -0
- package/dist/_utils/typeguards.js +2 -0
- package/dist/_utils/typeguards.js.map +1 -0
- package/dist/antdTheme/index.js +1 -1
- package/dist/antdTheme/index.js.map +1 -1
- package/dist/antdTheme/types.d.ts +1 -1
- package/dist/components/AttributePicker/AttributePicker.d.ts +0 -1
- package/dist/components/AttributePicker/AttributesList/AttributesList.d.ts +0 -1
- package/dist/components/AttributePicker/AttributesList/AttributesList.js.map +1 -1
- package/dist/components/AttributesSelectionList/Attribute/Attribute.d.ts +0 -1
- package/dist/components/AttributesSelectionList/AttributesSelectionList.d.ts +0 -1
- package/dist/components/AttributesSelectionList/AttributesSelectionList.js.map +1 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.d.ts +0 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.d.ts +0 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js.map +1 -1
- package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.d.ts +1 -1
- package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.d.ts +0 -1
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.d.ts +1 -1
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js.map +1 -1
- package/dist/components/AttributesSelectionList/sharedComponents.d.ts +302 -305
- package/dist/components/BasicButton/BasicButton.d.ts +0 -1
- package/dist/components/CreateDirectory/CreateDirectory.d.ts +0 -1
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.d.ts +0 -1
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js.map +1 -1
- package/dist/components/Dimmer/Dimmer.d.ts +0 -1
- package/dist/components/EditApplication/EditApplication.d.ts +0 -1
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfo.d.ts +0 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfo.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.d.ts +0 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/ModuleSelector/ModuleSelector.d.ts +0 -1
- package/dist/components/EditApplication/_types.d.ts +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttribute.d.ts +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttribute.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.d.ts +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.d.ts +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttributeModal.d.ts +0 -1
- package/dist/components/EditAttributeModal/EditAttributeModal.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibrary.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibrary.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributeCell/AttributeCell.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.d.ts +1 -2
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/EditLibraryAttributes.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/EditLibraryAttributes.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryIndexation/EditLibraryIndexation.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfo.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfo.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/EditLibraryInfoForm.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/EditLibraryInfoForm.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditLibraryPreviewsSettings.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/SizesEditor/SizesEditor.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/SizesEditor/SizesEditor.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/PreviewsSettingsList.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/PreviewsSettingsList.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibraryModal.d.ts +0 -1
- package/dist/components/EditLibraryModal/EditLibraryModal.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTree.d.ts +0 -1
- package/dist/components/EditTreeModal/EditTree/EditTree.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfo.d.ts +0 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfo.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.d.ts +1 -2
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js.map +1 -1
- package/dist/components/EditTreeModal/EditTreeModal.d.ts +0 -1
- package/dist/components/EditTreeModal/EditTreeModal.js.map +1 -1
- package/dist/components/EntityCard/EntityCard.d.ts +0 -1
- package/dist/components/EntityCard/EntityCard.js.map +1 -1
- package/dist/components/EntityPreview/EntityPreview.js.map +1 -1
- package/dist/components/EntityPreview/EntityPreviewList/EntityPreviewList.d.ts +0 -1
- package/dist/components/EntityPreview/EntityPreviewList/EntityPreviewList.js.map +1 -1
- package/dist/components/EntityPreview/EntityPreviewList/SimplisticEntityPreview/SimplisticEntityPreview.d.ts +0 -1
- package/dist/components/EntityPreview/EntityPreviewTile/EntityPreviewTile.d.ts +0 -1
- package/dist/components/EntityPreview/EntityPreviewTile/EntityPreviewTile.js.map +1 -1
- package/dist/components/EntityPreview/_types.d.ts +0 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +0 -1
- package/dist/components/Explorer/DataView.d.ts +9 -0
- package/dist/components/Explorer/DataView.js +53 -0
- package/dist/components/Explorer/DataView.js.map +1 -0
- package/dist/components/Explorer/Explorer.d.ts +9 -0
- package/dist/components/Explorer/Explorer.js +14 -0
- package/dist/components/Explorer/Explorer.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +1 -0
- package/dist/{hooks/useRefreshToken → components/Explorer}/index.js +1 -1
- package/dist/components/Explorer/index.js.map +1 -0
- package/dist/components/Explorer/tsconfig.json +6 -0
- package/dist/components/Explorer/types.d.ts +13 -0
- package/dist/components/Explorer/types.js +2 -0
- package/dist/components/Explorer/types.js.map +1 -0
- package/dist/components/Explorer/useDeactivateAction.d.ts +9 -0
- package/dist/components/Explorer/useDeactivateAction.js +41 -0
- package/dist/components/Explorer/useDeactivateAction.js.map +1 -0
- package/dist/components/Explorer/useEditAction.d.ts +9 -0
- package/dist/components/Explorer/useEditAction.js +41 -0
- package/dist/components/Explorer/useEditAction.js.map +1 -0
- package/dist/components/Explorer/useExplorerData.d.ts +5 -0
- package/dist/components/Explorer/useExplorerData.js +21 -0
- package/dist/components/Explorer/useExplorerData.js.map +1 -0
- package/dist/components/ExportModal/ExportModal.d.ts +0 -1
- package/dist/components/ExportModal/ExportModal.js.map +1 -1
- package/dist/components/FloatingMenu/FloatingMenu.d.ts +0 -1
- package/dist/components/FloatingMenu/_types.d.ts +1 -2
- package/dist/components/ImageLoading/ImageLoading.d.ts +0 -1
- package/dist/components/ImageMissing/ImageMissing.d.ts +0 -1
- package/dist/components/ImportModal/ImportModal.d.ts +0 -1
- package/dist/components/ImportModal/ImportModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportKeysSelector/ImportKeysSelector.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportKeysSelector/ImportKeysSelector.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportMappingRowTitle/ImportMappingRowTitle.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportScheduleModal/ImportScheduleModal.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportSheetSettings/ImportSheetSettings.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalDoneStep/ImportModalDoneStep.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalProcessingStep/ImportModalProcessingStep.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.d.ts +0 -1
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js.map +1 -1
- package/dist/components/ImportModal/importReducer/ImportReducerContext.d.ts +0 -1
- package/dist/components/ImportModal/importReducer/importReducer.d.ts +1 -1
- package/dist/components/ImportModal/importReducer/importReducer.js.map +1 -1
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +1 -1
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.d.ts +0 -1
- package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.d.ts +0 -1
- package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +4 -4
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.d.ts +0 -3
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +4 -14
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.d.ts +2 -0
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.js +16 -0
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.js.map +1 -0
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.d.ts +0 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js.map +1 -1
- package/dist/components/LibraryItemsList/IconViewType/IconViewType.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsList.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js +3 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.d.ts +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.d.ts +6 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.d.ts +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.d.ts +0 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.d.ts +0 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.d.ts +0 -1
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.d.ts +0 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/SearchItems/SearchItems.d.ts +0 -1
- package/dist/components/LibraryItemsList/Sidebar/Sidebar.d.ts +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.d.ts +0 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +2 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js.map +1 -1
- package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.d.ts +0 -1
- package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.d.ts +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.d.ts +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.d.ts +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.d.ts +0 -1
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +2 -2
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.d.ts +0 -1
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js.map +1 -1
- package/dist/components/LibraryItemsList/manageItems.js.map +1 -1
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.d.ts +0 -1
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.d.ts +1 -5
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js +1 -5
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js.map +1 -1
- package/dist/components/LibraryItemsList/shared/shared.utils.d.ts +4 -0
- package/dist/components/LibraryItemsList/shared/shared.utils.js +9 -0
- package/dist/components/LibraryItemsList/shared/shared.utils.js.map +1 -0
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.d.ts +0 -1
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js.map +1 -1
- package/dist/components/LibraryPicker/LibraryPicker.d.ts +0 -1
- package/dist/components/List/List.d.ts +0 -1
- package/dist/components/List/List.js.map +1 -1
- package/dist/components/Loading/Loading.d.ts +0 -1
- package/dist/components/RecordCard/RecordCard.d.ts +0 -1
- package/dist/components/RecordCard/_types.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +2 -2
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/ValuesVersionSummary/ValuesVersionSummary.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecord/ValuesVersionSummary/ValuesVersionSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordBtn/EditRecordBtn.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +15 -15
- package/dist/components/RecordEdition/EditRecordContent/_types.js +5 -5
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +38 -26
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/isCurrentVersion/isCurrentVersion.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useDeleteValueMutation.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useSaveValueMutation.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteDeleteValueMutation.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRecordEditionContext.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.d.ts +4 -4
- package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.js +8 -8
- package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +30 -11
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +70 -17
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +7 -0
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js +9 -0
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +7 -0
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.d.ts +2 -3
- package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/DeleteAllValuesBtn/DeleteAllValuesBtn.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/DeleteValueBtn/DeleteValueBtn.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/InheritedFieldLabel/InheritedFieldLabel.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/NoValue/NoValue.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/UpdatedFieldIcon/UpdatedFieldIcon.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +2 -8
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.d.ts +4 -5
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js +8 -8
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator/ValuesVersionIndicator.d.ts +2 -3
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator/ValuesVersionIndicator.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionIndicator/ValuesVersionIndicator.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/ErrorField/ErrorField.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +11 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +10 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +58 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +15 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +76 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +38 -11
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +15 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +91 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +37 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +42 -15
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +49 -10
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/{DSInputPasswordWrapper.d.ts → DSRichTextWrapper.d.ts} +4 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +82 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +3 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +22 -27
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +13 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +82 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +7 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +45 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +137 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js +5 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TextBlock/TextBlock.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/index.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +1 -2
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +96 -99
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.d.ts +0 -1
- package/dist/components/RecordEdition/_types.d.ts +2 -2
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +2 -2
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/RecordEdition/hooks/useCreateCancelConfirm/useCreateCancelConfirm.d.ts +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModal.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/AudioFile/AudioFile.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/AudioFile/AudioFile.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/DocumentFile/DocumentFile.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/DocumentFile/DocumentFile.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalSidebar/FileModalSidebar.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/ImageFile/ImageFile.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/ImageFile/ImageFile.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/NoDisplayFile/NoDisplayFile.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/NoDisplayFile/NoDisplayFile.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/VideoFile/VideoFile.d.ts +0 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/VideoFile/VideoFile.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/RecordPreviewWithModal.js.map +1 -1
- package/dist/components/SearchModal/SearchModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +0 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +0 -1
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.d.ts +6 -6
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js +2 -2
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js.map +1 -1
- package/dist/components/SubmitStateNotifier/SubmitStateNotifier.d.ts +0 -1
- package/dist/components/SubmitStateNotifier/SubmitStateNotifier.js.map +1 -1
- package/dist/components/SubmitStateNotifier/_types.d.ts +1 -1
- package/dist/components/TreePicker/TreePicker.d.ts +0 -1
- package/dist/components/TreePicker/TreesList/TreesList.d.ts +0 -1
- package/dist/components/TreePicker/TreesList/TreesList.js.map +1 -1
- package/dist/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.d.ts +0 -1
- package/dist/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.d.ts +0 -1
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/ValuesVersionConfigurator.d.ts +0 -1
- package/dist/components/ValuesVersionConfigurator/ValuesVersionConfigurator.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.d.ts +0 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/contexts/EditRecordModalContext/EditRecordModalContext.d.ts +5 -0
- package/dist/contexts/EditRecordModalContext/EditRecordModalContext.js +7 -0
- package/dist/contexts/EditRecordModalContext/EditRecordModalContext.js.map +1 -0
- package/dist/contexts/EditRecordModalContext/EditRecordModalProvider.d.ts +2 -0
- package/dist/{components/LibraryItemsList/LibraryItemsListTable/EditRecordModalContext.js → contexts/EditRecordModalContext/EditRecordModalProvider.js} +6 -9
- package/dist/contexts/EditRecordModalContext/EditRecordModalProvider.js.map +1 -0
- package/dist/contexts/EditRecordModalContext/index.d.ts +2 -0
- package/dist/contexts/EditRecordModalContext/index.js +6 -0
- package/dist/contexts/EditRecordModalContext/index.js.map +1 -0
- package/dist/contexts/EditRecordModalContext/tsconfig.json +6 -0
- package/dist/contexts/EditRecordModalContext/useEditRecordModalContext.d.ts +1 -0
- package/dist/contexts/EditRecordModalContext/useEditRecordModalContext.js +7 -0
- package/dist/contexts/EditRecordModalContext/useEditRecordModalContext.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useAppLang/useAppLang.js.map +1 -1
- package/dist/hooks/useAuth/useAuth.js +1 -1
- package/dist/hooks/useAuth/useAuth.js.map +1 -1
- package/dist/hooks/useCanEditRecord/useCanEditRecord.js.map +1 -1
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +1 -1
- package/dist/hooks/useGetPreparedFileData/useGetPreparedFileData.js.map +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +6 -6
- package/dist/hooks/useGetRecordUpdatesSubscription/useGetRecordUpdatesSubscription.d.ts +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.d.ts +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
- package/dist/hooks/useLang/useLang.d.ts +1 -1
- package/dist/hooks/useLang/useLang.js +2 -2
- package/dist/hooks/useLang/useLang.js.map +1 -1
- package/dist/hooks/useLibraryVersionTrees/useLibraryVersionTrees.d.ts +1 -1
- package/dist/hooks/useLibraryVersionTrees/useLibraryVersionTrees.js.map +1 -1
- package/dist/hooks/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLoginChecker/index.d.ts +1 -0
- package/dist/hooks/useLoginChecker/index.js +5 -0
- package/dist/hooks/{useRefreshToken → useLoginChecker}/index.js.map +1 -1
- package/dist/hooks/useLoginChecker/useLoginChecker.d.ts +3 -0
- package/dist/hooks/useLoginChecker/useLoginChecker.js +17 -0
- package/dist/hooks/useLoginChecker/useLoginChecker.js.map +1 -0
- package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.js.map +1 -1
- package/dist/hooks/useRedirectToLogin/index.d.ts +1 -0
- package/dist/hooks/useRedirectToLogin/index.js +5 -0
- package/dist/hooks/useRedirectToLogin/index.js.map +1 -0
- package/dist/hooks/useRedirectToLogin/useRedirectToLogin.d.ts +3 -0
- package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js +15 -0
- package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js.map +1 -0
- package/dist/hooks/useRefreshFieldValues/useRefreshFieldValues.js +7 -2
- package/dist/hooks/useRefreshFieldValues/useRefreshFieldValues.js.map +1 -1
- package/dist/hooks/useSharedTranslation/__mocks__/useSharedTranslation.d.ts +1 -1
- package/dist/hooks/useSharedTranslation/useSharedTranslation.js.map +1 -1
- package/dist/hooks/useUser/useUser.js.map +1 -1
- package/dist/hooks/useValuesCacheUpdate/useValuesCacheUpdate.d.ts +1 -1
- package/dist/hooks/useValuesCacheUpdate/useValuesCacheUpdate.js.map +1 -1
- package/dist/locales/en/shared.json +7 -0
- package/dist/locales/fr/shared.json +7 -0
- package/dist/testing/MockedLangContextProvider/MockedLangContextProvider.d.ts +0 -1
- package/dist/testing/MockedUserContextProvider/MockedUserContextProvider.d.ts +0 -1
- package/dist/types/misc.d.ts +2 -2
- package/dist/types/scalars.d.ts +1 -1
- package/dist/types/search.d.ts +4 -4
- package/package.json +6 -5
- package/dist/_utils/__mocks__/isDevelopmentHelper.d.ts +0 -1
- package/dist/_utils/__mocks__/isDevelopmentHelper.js.map +0 -1
- package/dist/_utils/isDevelopmentHelper.d.ts +0 -1
- package/dist/_utils/isDevelopmentHelper.js.map +0 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/EditRecordModalContext.d.ts +0 -7
- package/dist/components/LibraryItemsList/LibraryItemsListTable/EditRecordModalContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputPasswordWrapper.js +0 -63
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputPasswordWrapper.js.map +0 -1
- package/dist/hooks/useRefreshToken/index.d.ts +0 -1
- package/dist/hooks/useRefreshToken/useRefreshToken.d.ts +0 -3
- package/dist/hooks/useRefreshToken/useRefreshToken.js +0 -27
- package/dist/hooks/useRefreshToken/useRefreshToken.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitColorPicker } from 'aristid-ds';
|
|
6
|
+
import { useEffect, useRef, useState } from 'react';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
9
|
+
import { useLang } from '../../../../../../hooks';
|
|
10
|
+
import { localizedTranslation } from '@leav/utils';
|
|
11
|
+
import { useValueDetailsButton } from '../../../shared/ValueDetailsBtn/useValueDetailsButton';
|
|
12
|
+
const KitColorPickerStyled = styled(KitColorPicker) `
|
|
13
|
+
.ant-color-picker-trigger-text {
|
|
14
|
+
color: ${({ $shouldHighlightColor }) => $shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'var(--general-utilities-text-primary)'};
|
|
15
|
+
|
|
16
|
+
svg {
|
|
17
|
+
color: var(--general-utilities-text-primary);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export const DSColorPickerWrapper = ({ value, state, attribute, fieldValue, onChange, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
22
|
+
const { t } = useSharedTranslation();
|
|
23
|
+
const { lang: availableLang } = useLang();
|
|
24
|
+
const [hasChanged, setHasChanged] = useState(false);
|
|
25
|
+
const [currentColor, setCurrentColor] = useState();
|
|
26
|
+
const [currentHex, setCurrentHex] = useState(value ?? '');
|
|
27
|
+
const colorPickerRef = useRef(null);
|
|
28
|
+
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
29
|
+
value: fieldValue?.value,
|
|
30
|
+
attribute
|
|
31
|
+
});
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (fieldValue.isEditing) {
|
|
34
|
+
colorPickerRef.current.focus();
|
|
35
|
+
}
|
|
36
|
+
}, [fieldValue.isEditing]);
|
|
37
|
+
const _handleOnOpenChange = (open) => {
|
|
38
|
+
if (!open) {
|
|
39
|
+
if (!hasChanged) {
|
|
40
|
+
handleBlur();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
handleSubmit(currentColor.toHex(), state.attribute.id);
|
|
44
|
+
onChange(currentColor, currentHex);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const _handleOnChange = (color, hex) => {
|
|
48
|
+
setHasChanged(true);
|
|
49
|
+
setCurrentHex(hex);
|
|
50
|
+
setCurrentColor(color);
|
|
51
|
+
onChange(color, hex);
|
|
52
|
+
};
|
|
53
|
+
const _handleOnClear = () => {
|
|
54
|
+
setHasChanged(false);
|
|
55
|
+
if (state.isInheritedValue) {
|
|
56
|
+
onChange(undefined, state.inheritedValue.raw_value);
|
|
57
|
+
}
|
|
58
|
+
else if (state.isCalculatedValue) {
|
|
59
|
+
onChange(undefined, state.calculatedValue.raw_value);
|
|
60
|
+
}
|
|
61
|
+
onChange(null, '');
|
|
62
|
+
handleSubmit('', state.attribute.id);
|
|
63
|
+
};
|
|
64
|
+
const _getHelper = () => {
|
|
65
|
+
if (state.isInheritedOverrideValue) {
|
|
66
|
+
return t('record_edition.inherited_input_helper', { inheritedValue: state.inheritedValue.raw_value });
|
|
67
|
+
}
|
|
68
|
+
else if (state.isCalculatedOverrideValue) {
|
|
69
|
+
return t('record_edition.calculated_input_helper', { calculatedValue: state.calculatedValue.raw_value });
|
|
70
|
+
}
|
|
71
|
+
return;
|
|
72
|
+
};
|
|
73
|
+
const label = localizedTranslation(state.formElement.settings.label, availableLang);
|
|
74
|
+
return (_jsx(KitColorPickerStyled, { ref: colorPickerRef, value: currentHex, "aria-label": label, label: label, helper: _getHelper(), required: state.formElement.settings.required, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, disabled: state.isReadOnly, disabledAlpha: true, showText: true, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onOpenChange: _handleOnOpenChange, onChange: _handleOnChange, onClear: _handleOnClear, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=DSColorPickerWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSColorPickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAMrE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uDAAuD,CAAC;AAY5F,MAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAkC;;iBAEpE,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CACjC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,uCAAuC;;;;;;CAMhH,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAkD,CAAC,EAChF,KAAK,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,4BAA4B,GAAG,KAAK,EACvC,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,IAAI,EAA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,IAAI,EAC5E,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,aAAa,QACb,QAAQ,QACR,UAAU,EAAE,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EACrF,YAAY,EAAE,mBAAmB,EACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,cAAc,2BAEnB,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,CAAC,GAE9F,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,8 +7,9 @@ interface IDSDatePickerWrapperProps extends IProvidedByAntFormItem<DatePickerPro
|
|
|
7
7
|
state: IStandardFieldReducerState;
|
|
8
8
|
attribute: RecordFormAttributeFragment;
|
|
9
9
|
fieldValue: IStandardFieldValue;
|
|
10
|
-
shouldShowValueDetailsButton?: boolean;
|
|
11
10
|
handleSubmit: (value: StandardValueTypes, id?: string) => void;
|
|
11
|
+
handleBlur: () => void;
|
|
12
|
+
shouldShowValueDetailsButton?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const DSDatePickerWrapper: FunctionComponent<IDSDatePickerWrapperProps>;
|
|
14
15
|
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
2
5
|
import { KitDatePicker } from 'aristid-ds';
|
|
6
|
+
import { useEffect, useRef } from 'react';
|
|
3
7
|
import { Form } from 'antd';
|
|
4
8
|
import dayjs from 'dayjs';
|
|
5
9
|
import styled from 'styled-components';
|
|
@@ -10,18 +14,32 @@ import { localizedTranslation } from '@leav/utils';
|
|
|
10
14
|
const KitDatePickerStyled = styled(KitDatePicker) `
|
|
11
15
|
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
12
16
|
`;
|
|
13
|
-
export const DSDatePickerWrapper = ({ value, onChange, state, attribute, fieldValue, shouldShowValueDetailsButton = false
|
|
17
|
+
export const DSDatePickerWrapper = ({ value, onChange, handleBlur, state, attribute, fieldValue, handleSubmit, shouldShowValueDetailsButton = false }) => {
|
|
14
18
|
const { t } = useSharedTranslation();
|
|
15
19
|
const { lang: availableLangs } = useLang();
|
|
16
20
|
const { errors } = Form.Item.useStatus();
|
|
17
|
-
const { onValueDetailsButtonClick
|
|
21
|
+
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
18
22
|
value: fieldValue?.value,
|
|
19
23
|
attribute
|
|
20
24
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
25
|
+
const inputRef = useRef(null);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (fieldValue.isEditing && inputRef.current) {
|
|
28
|
+
inputRef.current.nativeElement.click(); // To automatically open the date picker
|
|
29
|
+
}
|
|
30
|
+
}, [fieldValue.isEditing]);
|
|
31
|
+
const _resetToInheritedOrCalculatedValue = () => {
|
|
32
|
+
if (state.isInheritedValue) {
|
|
23
33
|
onChange(dayjs.unix(Number(state.inheritedValue.raw_value)), state.inheritedValue.raw_value);
|
|
24
|
-
|
|
34
|
+
}
|
|
35
|
+
else if (state.isCalculatedValue) {
|
|
36
|
+
onChange(dayjs.unix(Number(state.calculatedValue.raw_value)), state.calculatedValue.raw_value);
|
|
37
|
+
}
|
|
38
|
+
handleSubmit('', state.attribute.id);
|
|
39
|
+
};
|
|
40
|
+
const _handleDateChange = (datePickerDate, ...antOnChangeParams) => {
|
|
41
|
+
if ((state.isInheritedValue || state.isCalculatedValue) && datePickerDate === null) {
|
|
42
|
+
_resetToInheritedOrCalculatedValue();
|
|
25
43
|
return;
|
|
26
44
|
}
|
|
27
45
|
onChange(datePickerDate, ...antOnChangeParams);
|
|
@@ -30,16 +48,25 @@ export const DSDatePickerWrapper = ({ value, onChange, state, attribute, fieldVa
|
|
|
30
48
|
return;
|
|
31
49
|
}
|
|
32
50
|
let dateToSave = null;
|
|
33
|
-
if (datePickerDate
|
|
51
|
+
if (!!datePickerDate) {
|
|
34
52
|
dateToSave = String(datePickerDate.unix());
|
|
35
53
|
}
|
|
36
54
|
handleSubmit(dateToSave, state.attribute.id);
|
|
37
55
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
const _getHelper = () => {
|
|
57
|
+
if (state.isInheritedOverrideValue) {
|
|
58
|
+
return t('record_edition.inherited_input_helper', {
|
|
41
59
|
inheritedValue: state.inheritedValue.value
|
|
42
|
-
})
|
|
43
|
-
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
else if (state.isCalculatedOverrideValue) {
|
|
63
|
+
return t('record_edition.calculated_input_helper', {
|
|
64
|
+
calculatedValue: state.calculatedValue.value
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
};
|
|
69
|
+
const label = localizedTranslation(state.formElement.settings.label, availableLangs);
|
|
70
|
+
return (_jsx(KitDatePickerStyled, { ref: inputRef, value: value, onChange: _handleDateChange, label: label, required: state.formElement.settings.required, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, status: errors.length > 0 ? 'error' : undefined, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, helper: _getHelper(), onBlur: handleBlur, "$shouldHighlightColor": state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue }));
|
|
44
71
|
};
|
|
45
72
|
//# sourceMappingURL=DSDatePickerWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSDatePickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"DSDatePickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAK3D,OAAO,EAAC,IAAI,EAAc,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,qBAAqB,EAAC,MAAM,6FAA6F,CAAC;AAClI,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAUjD,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAkC;aACtE,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS,CAAC;CAClH,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAiD,CAAC,EAC9E,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,4BAA4B,GAAG,KAAK,EACvC,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,IAAI,EAAE,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IACzC,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;IACvC,MAAM,EAAC,yBAAyB,EAAC,GAAG,qBAAqB,CAAC;QACtD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EAC/C,WAAW,EAAE,4BAA4B,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,EAC5E,MAAM,EAAE,UAAU,EAAE,EACpB,MAAM,EAAE,UAAU,2BACK,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,GAChG,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { IStandardFieldReducerState, IStandardFieldValue } from '../../../reducers/standardFieldReducer/standardFieldReducer';
|
|
3
|
+
import { InputProps } from 'antd';
|
|
4
|
+
import { IProvidedByAntFormItem } from '../../../../../../components/RecordEdition/EditRecordContent/_types';
|
|
5
|
+
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
+
interface IDSInputEncryptedWrapper extends IProvidedByAntFormItem<InputProps> {
|
|
7
|
+
state: IStandardFieldReducerState;
|
|
8
|
+
attribute: RecordFormAttributeFragment;
|
|
9
|
+
fieldValue: IStandardFieldValue;
|
|
10
|
+
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
+
handleBlur: () => void;
|
|
12
|
+
shouldShowValueDetailsButton?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const DSInputEncryptedWrapper: FunctionComponent<IDSInputEncryptedWrapper>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitInput } from 'aristid-ds';
|
|
6
|
+
import { useEffect, useRef, useState } from 'react';
|
|
7
|
+
import { Form } from 'antd';
|
|
8
|
+
import styled from 'styled-components';
|
|
9
|
+
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
10
|
+
import { useValueDetailsButton } from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton';
|
|
11
|
+
import { useLang } from '../../../../../../hooks';
|
|
12
|
+
import { localizedTranslation } from '@leav/utils';
|
|
13
|
+
const KitInputPasswordStyled = styled(KitInput.Password) `
|
|
14
|
+
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
15
|
+
|
|
16
|
+
.kit-input-wrapper-helper {
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
export const DSInputEncryptedWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
23
|
+
const { t } = useSharedTranslation();
|
|
24
|
+
const { errors } = Form.Item.useStatus();
|
|
25
|
+
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
26
|
+
value: fieldValue?.value,
|
|
27
|
+
attribute
|
|
28
|
+
});
|
|
29
|
+
const [hasChanged, setHasChanged] = useState(false);
|
|
30
|
+
const { lang: availableLang } = useLang();
|
|
31
|
+
const inputRef = useRef(null);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (fieldValue.isEditing && inputRef.current) {
|
|
34
|
+
inputRef.current.focus();
|
|
35
|
+
}
|
|
36
|
+
}, [fieldValue.isEditing]);
|
|
37
|
+
const _resetToInheritedOrCalculatedValue = () => {
|
|
38
|
+
setHasChanged(false);
|
|
39
|
+
if (state.isInheritedValue) {
|
|
40
|
+
onChange(state.inheritedValue.raw_value);
|
|
41
|
+
}
|
|
42
|
+
else if (state.isCalculatedValue) {
|
|
43
|
+
onChange(state.calculatedValue.raw_value);
|
|
44
|
+
}
|
|
45
|
+
handleSubmit('', state.attribute.id);
|
|
46
|
+
};
|
|
47
|
+
const _handleOnBlur = (event) => {
|
|
48
|
+
if (!hasChanged) {
|
|
49
|
+
handleBlur();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const valueToSubmit = event.target.value;
|
|
53
|
+
if (valueToSubmit === '' && (state.isInheritedValue || state.isCalculatedValue)) {
|
|
54
|
+
_resetToInheritedOrCalculatedValue();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (!state.isInheritedValue && !state.isCalculatedValue) {
|
|
58
|
+
handleSubmit(valueToSubmit, state.attribute.id);
|
|
59
|
+
}
|
|
60
|
+
onChange(event);
|
|
61
|
+
};
|
|
62
|
+
const _handleOnChange = (event) => {
|
|
63
|
+
setHasChanged(true);
|
|
64
|
+
const inputValue = event.target.value;
|
|
65
|
+
if ((state.isInheritedValue || state.isCalculatedValue) && inputValue === '' && event.type === 'click') {
|
|
66
|
+
_resetToInheritedOrCalculatedValue();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
onChange(event);
|
|
70
|
+
};
|
|
71
|
+
const _getHelper = () => {
|
|
72
|
+
if (state.isInheritedOverrideValue) {
|
|
73
|
+
return t('record_edition.inherited_input_helper', {
|
|
74
|
+
inheritedValue: state.inheritedValue.raw_value
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else if (state.isCalculatedOverrideValue) {
|
|
78
|
+
return t('record_edition.calculated_input_helper', {
|
|
79
|
+
calculatedValue: state.calculatedValue.raw_value
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return;
|
|
83
|
+
};
|
|
84
|
+
const label = localizedTranslation(state.formElement.settings.label, availableLang);
|
|
85
|
+
return (_jsx(KitInputPasswordStyled
|
|
86
|
+
// @ts-expect-error - ref is not a valid prop for Input.Password but works at runtime
|
|
87
|
+
, {
|
|
88
|
+
// @ts-expect-error - ref is not a valid prop for Input.Password but works at runtime
|
|
89
|
+
ref: inputRef, autoComplete: "new-password", "data-testid": "kit-input-password", label: label, required: state.formElement.settings.required, status: errors.length > 0 ? 'error' : undefined, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, helper: _getHelper(), value: value, disabled: state.isReadOnly, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onBlur: _handleOnBlur, onChange: _handleOnChange, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=DSInputEncryptedWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSInputEncryptedWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAA6C,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAK9F,OAAO,EAAC,IAAI,EAAa,MAAM,MAAM,CAAC;AAEtC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,qBAAqB,EAAC,MAAM,6FAA6F,CAAC;AAElI,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAWjD,MAAM,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAkC;aAC7E,CAAC,EAAC,qBAAqB,EAAC,EAAE,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,SAAS,CAAC;;;;;;;CAOlH,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAgD,CAAC,EACjF,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,4BAA4B,GAA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,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAEpF,OAAO,CACH,KAAC,sBAAsB;IACnB,qFAAqF;;QAArF,qFAAqF;QACrF,GAAG,EAAE,QAAQ,EACb,YAAY,EAAC,cAAc,iBACf,oBAAoB,EAChC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAC7C,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAC/C,WAAW,EAAE,4BAA4B,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,EAC5E,MAAM,EAAE,UAAU,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,UAAU,EAAE,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EACrF,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,eAAe,2BAErB,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,CAAC,GAE9F,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,8 +7,9 @@ interface IDSInputWrapperProps extends IProvidedByAntFormItem<InputNumberProps>
|
|
|
7
7
|
state: IStandardFieldReducerState;
|
|
8
8
|
attribute: RecordFormAttributeFragment;
|
|
9
9
|
fieldValue: IStandardFieldValue;
|
|
10
|
-
shouldShowValueDetailsButton?: boolean;
|
|
11
10
|
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
+
handleBlur: () => void;
|
|
12
|
+
shouldShowValueDetailsButton?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const DSInputNumberWrapper: FunctionComponent<IDSInputWrapperProps>;
|
|
14
15
|
export {};
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
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
5
|
import { KitInputNumber } from 'aristid-ds';
|
|
6
|
-
import { useState } from 'react';
|
|
6
|
+
import { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
8
|
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
9
9
|
import styled from 'styled-components';
|
|
@@ -15,30 +15,45 @@ const KitInputNumberStyled = styled(KitInputNumber) `
|
|
|
15
15
|
color: ${({ $shouldHighlightColor }) => $shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial'};
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
|
-
export const DSInputNumberWrapper = ({ value, onChange, state, attribute, fieldValue, shouldShowValueDetailsButton = false
|
|
18
|
+
export const DSInputNumberWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
19
19
|
if (!onChange) {
|
|
20
20
|
throw Error('DSInputNumberWrapper should be used inside a antd Form.Item');
|
|
21
21
|
}
|
|
22
22
|
const { t } = useSharedTranslation();
|
|
23
23
|
const { lang } = useLang();
|
|
24
24
|
const { errors } = Form.Item.useStatus();
|
|
25
|
-
const { onValueDetailsButtonClick
|
|
25
|
+
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
26
26
|
value: fieldValue?.value,
|
|
27
27
|
attribute
|
|
28
28
|
});
|
|
29
29
|
const [hasChanged, setHasChanged] = useState(false);
|
|
30
|
-
const
|
|
30
|
+
const inputRef = useRef(null);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (fieldValue.isEditing && inputRef.current) {
|
|
33
|
+
inputRef.current.focus(); // To automatically open the date picker
|
|
34
|
+
}
|
|
35
|
+
}, [fieldValue.isEditing]);
|
|
36
|
+
const _resetToInheritedOrCalculatedValue = () => {
|
|
31
37
|
setHasChanged(false);
|
|
32
|
-
|
|
38
|
+
if (state.isInheritedValue) {
|
|
39
|
+
onChange(state.inheritedValue.raw_value);
|
|
40
|
+
}
|
|
41
|
+
else if (state.isCalculatedValue) {
|
|
42
|
+
onChange(state.calculatedValue.raw_value);
|
|
43
|
+
}
|
|
33
44
|
handleSubmit('', state.attribute.id);
|
|
34
45
|
};
|
|
35
46
|
const _handleOnBlur = (event) => {
|
|
47
|
+
if (!hasChanged) {
|
|
48
|
+
handleBlur();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
36
51
|
const valueToSubmit = event.target.value;
|
|
37
|
-
if (valueToSubmit === '' && state.isInheritedValue) {
|
|
38
|
-
|
|
52
|
+
if (valueToSubmit === '' && (state.isInheritedValue || state.isCalculatedValue)) {
|
|
53
|
+
_resetToInheritedOrCalculatedValue();
|
|
39
54
|
return;
|
|
40
55
|
}
|
|
41
|
-
if (hasChanged || !state.isInheritedValue) {
|
|
56
|
+
if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
|
|
42
57
|
handleSubmit(valueToSubmit, state.attribute.id);
|
|
43
58
|
}
|
|
44
59
|
onChange(valueToSubmit);
|
|
@@ -47,11 +62,20 @@ export const DSInputNumberWrapper = ({ value, onChange, state, attribute, fieldV
|
|
|
47
62
|
setHasChanged(true);
|
|
48
63
|
onChange(inputValue);
|
|
49
64
|
};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
65
|
+
const _getHelper = () => {
|
|
66
|
+
if (state.isInheritedOverrideValue) {
|
|
67
|
+
return t('record_edition.inherited_input_helper', {
|
|
53
68
|
inheritedValue: state.inheritedValue.raw_value
|
|
54
|
-
})
|
|
55
|
-
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else if (state.isCalculatedOverrideValue) {
|
|
72
|
+
return t('record_edition.calculated_input_helper', {
|
|
73
|
+
calculatedValue: state.calculatedValue.raw_value
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return;
|
|
77
|
+
};
|
|
78
|
+
const label = localizedTranslation(state.formElement.settings.label, lang);
|
|
79
|
+
return (_jsx(KitInputNumberStyled, { ref: inputRef, required: state.formElement.settings.required, label: label, onInfoClick: shouldShowValueDetailsButton ? onValueDetailsButtonClick : null, status: errors.length > 0 ? 'error' : undefined, helper: _getHelper(), value: value, onChange: _handleOnChange, disabled: state.isReadOnly, onBlur: _handleOnBlur, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
56
80
|
};
|
|
57
81
|
//# sourceMappingURL=DSInputNumberWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSInputNumberWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAuD,QAAQ,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DSInputNumberWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAuD,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAKxG,OAAO,EAAC,IAAI,EAA2B,MAAM,MAAM,CAAC;AAEpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,qBAAqB,EAAC,MAAM,6FAA6F,CAAC;AAElI,OAAO,EAAC,oBAAoB,EAA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E,KAAK,CAAC,cAAc,CAAC,SAAS;aACjD,CAAC,CAAC;QACP,CAAC;aAAM,IAAI,KAAK,CAAC,yBAAyB,EAAE,CAAC;YACzC,OAAO,CAAC,CAAC,wCAAwC,EAAE;gBAC/C,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC,SAAS;aACnD,CAAC,CAAC;QACP,CAAC;QACD,OAAO;IACX,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE3E,OAAO,CACH,KAAC,oBAAoB,IACjB,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAC7C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,4BAA4B,CAAC,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,KAAK,EACZ,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,MAAM,EAAE,aAAa,2BAEjB,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,CAAC,GAE9F,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,8 +7,9 @@ interface IDSInputWrapperProps extends IProvidedByAntFormItem<InputProps> {
|
|
|
7
7
|
state: IStandardFieldReducerState;
|
|
8
8
|
attribute: RecordFormAttributeFragment;
|
|
9
9
|
fieldValue: IStandardFieldValue;
|
|
10
|
-
shouldShowValueDetailsButton?: boolean;
|
|
11
10
|
handleSubmit: (value: string, id?: string) => void;
|
|
11
|
+
handleBlur: () => void;
|
|
12
|
+
shouldShowValueDetailsButton?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const DSInputWrapper: FunctionComponent<IDSInputWrapperProps>;
|
|
14
15
|
export {};
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
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
5
|
import { KitInput } from 'aristid-ds';
|
|
6
|
-
import { useState } from 'react';
|
|
6
|
+
import { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
@@ -13,27 +13,42 @@ import { localizedTranslation } from '@leav/utils';
|
|
|
13
13
|
const KitInputStyled = styled(KitInput) `
|
|
14
14
|
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
15
15
|
`;
|
|
16
|
-
export const DSInputWrapper = ({ value, onChange, state, attribute, fieldValue, shouldShowValueDetailsButton = false
|
|
16
|
+
export const DSInputWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
17
17
|
const { t } = useSharedTranslation();
|
|
18
18
|
const { errors } = Form.Item.useStatus();
|
|
19
|
-
const { onValueDetailsButtonClick
|
|
19
|
+
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
20
20
|
value: fieldValue?.value,
|
|
21
21
|
attribute
|
|
22
22
|
});
|
|
23
23
|
const [hasChanged, setHasChanged] = useState(false);
|
|
24
24
|
const { lang: availableLang } = useLang();
|
|
25
|
-
const
|
|
25
|
+
const inputRef = useRef(null);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (fieldValue.isEditing && inputRef.current) {
|
|
28
|
+
inputRef.current.focus();
|
|
29
|
+
}
|
|
30
|
+
}, [fieldValue.isEditing]);
|
|
31
|
+
const _resetToInheritedOrCalculatedValue = () => {
|
|
26
32
|
setHasChanged(false);
|
|
27
|
-
|
|
33
|
+
if (state.isInheritedValue) {
|
|
34
|
+
onChange(state.inheritedValue.raw_value);
|
|
35
|
+
}
|
|
36
|
+
else if (state.isCalculatedValue) {
|
|
37
|
+
onChange(state.calculatedValue.raw_value);
|
|
38
|
+
}
|
|
28
39
|
handleSubmit('', state.attribute.id);
|
|
29
40
|
};
|
|
30
41
|
const _handleOnBlur = (event) => {
|
|
42
|
+
if (!hasChanged) {
|
|
43
|
+
handleBlur();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
31
46
|
const valueToSubmit = event.target.value;
|
|
32
|
-
if (valueToSubmit === '' && state.isInheritedValue) {
|
|
33
|
-
|
|
47
|
+
if (valueToSubmit === '' && (state.isInheritedValue || state.isCalculatedValue)) {
|
|
48
|
+
_resetToInheritedOrCalculatedValue();
|
|
34
49
|
return;
|
|
35
50
|
}
|
|
36
|
-
if (hasChanged || !state.isInheritedValue) {
|
|
51
|
+
if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
|
|
37
52
|
handleSubmit(valueToSubmit, state.attribute.id);
|
|
38
53
|
}
|
|
39
54
|
onChange(event);
|
|
@@ -41,17 +56,29 @@ export const DSInputWrapper = ({ value, onChange, state, attribute, fieldValue,
|
|
|
41
56
|
const _handleOnChange = (event) => {
|
|
42
57
|
setHasChanged(true);
|
|
43
58
|
const inputValue = event.target.value;
|
|
44
|
-
if (state.isInheritedValue && inputValue === '' && event.type === 'click') {
|
|
45
|
-
|
|
59
|
+
if ((state.isInheritedValue || state.isCalculatedValue) && inputValue === '' && event.type === 'click') {
|
|
60
|
+
_resetToInheritedOrCalculatedValue();
|
|
46
61
|
return;
|
|
47
62
|
}
|
|
63
|
+
if (inputValue === '' && event.type === 'click') {
|
|
64
|
+
handleSubmit(inputValue, state.attribute.id);
|
|
65
|
+
}
|
|
48
66
|
onChange(event);
|
|
49
67
|
};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
68
|
+
const _getHelper = () => {
|
|
69
|
+
if (state.isInheritedOverrideValue) {
|
|
70
|
+
return t('record_edition.inherited_input_helper', {
|
|
53
71
|
inheritedValue: state.inheritedValue.raw_value
|
|
54
|
-
})
|
|
55
|
-
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else if (state.isCalculatedOverrideValue) {
|
|
75
|
+
return t('record_edition.calculated_input_helper', {
|
|
76
|
+
calculatedValue: state.calculatedValue.raw_value
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return;
|
|
80
|
+
};
|
|
81
|
+
const label = localizedTranslation(state.formElement.settings.label, availableLang);
|
|
82
|
+
return (_jsx(KitInputStyled, { 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, allowClear: !state.isInheritedNotOverrideValue && !state.isCalculatedNotOverrideValue, onBlur: _handleOnBlur, onChange: _handleOnChange, "$shouldHighlightColor": !hasChanged && (state.isInheritedNotOverrideValue || state.isCalculatedNotOverrideValue) }));
|
|
56
83
|
};
|
|
57
84
|
//# sourceMappingURL=DSInputWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSInputWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"DSInputWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EA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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,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,UAAU,EAC1B,UAAU,EAAE,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EACrF,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,eAAe,2BAErB,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,2BAA2B,IAAI,KAAK,CAAC,4BAA4B,CAAC,GAE9F,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,8 +7,9 @@ interface IDSRangePickerWrapperProps extends IProvidedByAntFormItem<RangePickerP
|
|
|
7
7
|
state: IStandardFieldReducerState;
|
|
8
8
|
attribute: RecordFormAttributeFragment;
|
|
9
9
|
fieldValue: IStandardFieldValue;
|
|
10
|
-
shouldShowValueDetailsButton?: boolean;
|
|
11
10
|
handleSubmit: (value: StandardValueTypes, id?: string) => void;
|
|
11
|
+
handleBlur: () => void;
|
|
12
|
+
shouldShowValueDetailsButton?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const DSRangePickerWrapper: FunctionComponent<IDSRangePickerWrapperProps>;
|
|
14
15
|
export {};
|