@leav/ui 0.3.6-4d50dfd → 0.3.6-530c9f4
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.d.ts +1 -0
- package/dist/__mocks__/common/attribute.js +9 -2
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +12 -5
- package/dist/__mocks__/common/form.js +33 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/record.d.ts +13 -2
- package/dist/__mocks__/common/record.js.map +1 -1
- package/dist/__mocks__/common/value.js +3 -2
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/__mocks__/common/view.js +7 -5
- package/dist/__mocks__/common/view.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +607 -104
- package/dist/_gqlTypes/index.js +366 -55
- 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/attributes/getAttributesByLib.js +7 -5
- package/dist/_queries/attributes/getAttributesByLib.js.map +1 -1
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
- package/dist/_queries/records/createRecordMutation.js +2 -3
- package/dist/_queries/records/createRecordMutation.js.map +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
- package/dist/_queries/records/getRecordColumnsValues.js +4 -1
- package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
- package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +3 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_queries/views/saveViewMutation.js +1 -1
- package/dist/_queries/views/viewDetailsFragment.js +14 -11
- package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
- package/dist/_utils/attributeType.d.ts +3 -0
- package/dist/_utils/attributeType.js +7 -0
- package/dist/_utils/attributeType.js.map +1 -0
- package/dist/_utils/index.js +6 -3
- package/dist/_utils/index.js.map +1 -1
- package/dist/_utils/interleaveElement.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
- package/dist/_utils/interleaveElement.js.map +1 -0
- package/dist/antdTheme/index.d.ts +0 -3
- package/dist/antdTheme/index.js +3 -42
- package/dist/antdTheme/index.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.js +2 -2
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.js.map +1 -1
- package/dist/components/EditApplication/_types.d.ts +2 -2
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js +2 -5
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.d.ts +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +16 -2
- package/dist/components/Explorer/DataView.js +104 -50
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +12 -4
- package/dist/components/Explorer/Explorer.js +103 -26
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
- package/dist/components/Explorer/ExplorerTitle.js +28 -11
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.d.ts +5 -0
- package/dist/components/Explorer/ExplorerToolbar.js +49 -0
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
- package/dist/components/Explorer/IdCard.d.ts +7 -0
- package/dist/components/Explorer/IdCard.js +15 -0
- package/dist/components/Explorer/IdCard.js.map +1 -0
- package/dist/components/Explorer/TableCell.d.ts +8 -0
- package/dist/components/Explorer/TableCell.js +152 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
- package/dist/components/Explorer/TableTagGroup.js +30 -0
- package/dist/components/Explorer/TableTagGroup.js.map +1 -0
- package/dist/components/Explorer/_constants.d.ts +5 -0
- package/dist/components/Explorer/_constants.js +18 -0
- package/dist/components/Explorer/_constants.js.map +1 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +4 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +29 -5
- package/dist/components/Explorer/_queries/useExplorerData.js +92 -15
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +97 -5
- package/dist/components/Explorer/_types.js +7 -1
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/{useEditAction.d.ts → actions-item/useEditItemAction.d.ts} +4 -4
- package/dist/components/Explorer/{useEditAction.js → actions-item/useEditItemAction.js} +15 -13
- package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.d.ts +23 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js +109 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.d.ts +27 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +71 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useMassActions.d.ts +28 -0
- package/dist/components/Explorer/actions-mass/useMassActions.js +111 -0
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -0
- package/dist/components/Explorer/{useCreateAction.d.ts → actions-primary/useCreatePrimaryAction.d.ts} +9 -5
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +75 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +17 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +38 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.d.ts +12 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js +25 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
- package/dist/components/Explorer/conditionsHelper.js +16 -0
- package/dist/components/Explorer/conditionsHelper.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +1 -5
- package/dist/components/Explorer/index.js +1 -5
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/link-item/LinkModal.d.ts +7 -0
- package/dist/components/Explorer/link-item/LinkModal.js +73 -0
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.d.ts +24 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js +57 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js.map +1 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.d.ts +2 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.js +74 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +2 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +19 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +13 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +67 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +17 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +93 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +55 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +88 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +40 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +41 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js +79 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +13 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js +2 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +12 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +108 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/index.js +11 -0
- package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +3 -1
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +3 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +8 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +4 -3
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +4 -4
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +12 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +64 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +2 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +36 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js +40 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js +24 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +24 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +51 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +20 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +48 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +111 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
- package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
- package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +2 -6
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +35 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +175 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +281 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/useColumnWidth.d.ts +8 -0
- package/dist/components/Explorer/useColumnWidth.js +49 -0
- package/dist/components/Explorer/useColumnWidth.js.map +1 -0
- package/dist/components/Explorer/useLoadView.d.ts +3 -0
- package/dist/components/Explorer/useLoadView.js +79 -0
- package/dist/components/Explorer/useLoadView.js.map +1 -0
- package/dist/components/Explorer/usePagination.d.ts +7 -0
- package/dist/components/Explorer/usePagination.js +25 -0
- package/dist/components/Explorer/usePagination.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +16 -0
- package/dist/components/Explorer/useSearchInput.js +39 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -0
- package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
- package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
- package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
- package/dist/components/Explorer/useViewSettingsReducer.js +130 -0
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
- package/dist/components/ExportModal/ExportModal.js +2 -2
- package/dist/components/ExportModal/ExportModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js +1 -2
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js.map +1 -1
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +5 -10
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +82 -76
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +17 -4
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +17 -22
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +28 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js +1 -7
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +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 +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +16 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +203 -186
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +77 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +37 -46
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +14 -74
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +33 -49
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +33 -60
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +51 -64
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -56
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +16 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +56 -402
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +15 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +56 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.d.ts +7 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js +9 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/AttributeDetails → AttributeSummary}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +25 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +53 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails → Breacrumb}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +48 -6
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +3 -282
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +28 -61
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +8 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +73 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/TreeValuePath → ValuesSummary}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.js.map +1 -0
- package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.d.ts +1 -1
- package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.js +2 -2
- package/dist/components/RecordEdition/EditRecordSkeleton/EditRecordSkeleton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.d.ts +2 -0
- package/dist/components/RecordEdition/{EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → EditRecordSkeleton}/index.js +2 -1
- package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +12 -10
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +15 -13
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/RecordEdition/index.d.ts +1 -0
- package/dist/components/RecordEdition/index.js +1 -0
- package/dist/components/RecordEdition/index.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
- package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +129 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
- package/dist/components/SelectTreeNode/index.d.ts +1 -1
- package/dist/components/SelectTreeNode/index.js +1 -1
- package/dist/components/SelectTreeNode/index.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
- package/dist/components/SelectTreeNodeModal/index.js +1 -2
- package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +1 -1
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo → hooks/useDebouncedValue}/index.js +1 -2
- package/dist/hooks/useDebouncedValue/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata → hooks/useExecuteSaveViewMutation}/index.js +1 -2
- package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
- package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +8 -7
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.d.ts +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +2 -2
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
- package/dist/locales/en/shared.json +108 -18
- package/dist/locales/fr/shared.json +110 -20
- package/dist/types/views.d.ts +4 -4
- package/package.json +9 -4
- package/dist/components/Explorer/edit-settings/ColumnItem.js +0 -62
- package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -76
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
- package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js +0 -12
- package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
- package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -42
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -53
- package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
- package/dist/components/Explorer/useCreateAction.js +0 -40
- package/dist/components/Explorer/useCreateAction.js.map +0 -1
- package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
- package/dist/components/Explorer/useDeactivateAction.js +0 -51
- package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
- package/dist/components/Explorer/useEditAction.js.map +0 -1
- package/dist/components/Explorer/usePrimaryActions.d.ts +0 -20
- package/dist/components/Explorer/usePrimaryActions.js +0 -29
- package/dist/components/Explorer/usePrimaryActions.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.d.ts +0 -6
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js +0 -56
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js +0 -41
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.d.ts +0 -10
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +0 -63
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js +0 -76
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.d.ts +0 -11
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js +0 -43
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.js.map +0 -1
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSInputWrapperProps extends IProvidedByAntFormItem<InputNumberProps> {
|
|
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 DSInputNumberWrapper: FunctionComponent<IDSInputWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { KitInputNumberProps } from 'aristid-ds/dist/Kit/DataEntry/InputNumber/types';
|
|
4
|
+
export declare const DSInputNumberWrapper: FunctionComponent<IStandFieldValueContentProps<KitInputNumberProps>>;
|
|
@@ -3,79 +3,63 @@ 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 {
|
|
6
|
+
import { useRef, useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
|
-
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
9
8
|
import styled from 'styled-components';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useLang } from '../../../../../../hooks';
|
|
9
|
+
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
10
|
+
import { EMPTY_INITIAL_VALUE_STRING } from '../../../antdUtils';
|
|
13
11
|
const KitInputNumberStyled = styled(KitInputNumber) `
|
|
14
|
-
|
|
15
|
-
color: ${({ $shouldHighlightColor }) => $shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial'};
|
|
16
|
-
}
|
|
12
|
+
width: 100%;
|
|
17
13
|
`;
|
|
18
|
-
export const DSInputNumberWrapper = ({ value,
|
|
14
|
+
export const DSInputNumberWrapper = ({ value, presentationValue, isLastValueOfMultivalues, removeLastValueOfMultivalues, onChange, attribute, handleSubmit, readonly, calculatedFlags, inheritedFlags, setActiveValue }) => {
|
|
19
15
|
if (!onChange) {
|
|
20
16
|
throw Error('DSInputNumberWrapper should be used inside a antd Form.Item');
|
|
21
17
|
}
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const { errors } = Form.Item.useStatus();
|
|
25
|
-
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
26
|
-
value: fieldValue?.value,
|
|
27
|
-
attribute
|
|
28
|
-
});
|
|
18
|
+
const isNewValueOfMultivalues = isLastValueOfMultivalues && value === EMPTY_INITIAL_VALUE_STRING;
|
|
19
|
+
const focusedDefaultValue = attribute.multiple_values ? isNewValueOfMultivalues : false;
|
|
29
20
|
const [hasChanged, setHasChanged] = useState(false);
|
|
21
|
+
const [isFocused, setIsFocused] = useState(focusedDefaultValue);
|
|
30
22
|
const inputRef = useRef(null);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, [fieldValue.isEditing]);
|
|
36
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
23
|
+
const { errors } = Form.Item.useStatus();
|
|
24
|
+
const { t } = useSharedTranslation();
|
|
25
|
+
const isErrors = errors.length > 0;
|
|
26
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
37
27
|
setHasChanged(false);
|
|
38
|
-
if (
|
|
39
|
-
onChange(
|
|
28
|
+
if (inheritedFlags.isInheritedValue) {
|
|
29
|
+
onChange(inheritedFlags.inheritedValue.raw_payload);
|
|
40
30
|
}
|
|
41
|
-
else if (
|
|
42
|
-
onChange(
|
|
31
|
+
else if (calculatedFlags.isCalculatedValue) {
|
|
32
|
+
onChange(calculatedFlags.calculatedValue.raw_payload);
|
|
43
33
|
}
|
|
44
|
-
handleSubmit(
|
|
34
|
+
await handleSubmit(null, attribute.id);
|
|
45
35
|
};
|
|
46
|
-
const
|
|
36
|
+
const _handleFocus = () => {
|
|
37
|
+
setIsFocused(true);
|
|
38
|
+
setActiveValue();
|
|
39
|
+
};
|
|
40
|
+
const _handleOnBlur = async (event) => {
|
|
41
|
+
setHasChanged(false);
|
|
42
|
+
const valueToSubmit = event.target.value;
|
|
47
43
|
if (!hasChanged) {
|
|
48
|
-
|
|
44
|
+
onChange(valueToSubmit);
|
|
45
|
+
setIsFocused(false);
|
|
46
|
+
if (isNewValueOfMultivalues) {
|
|
47
|
+
removeLastValueOfMultivalues();
|
|
48
|
+
}
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
if (valueToSubmit === '' && (state.isInheritedValue || state.isCalculatedValue)) {
|
|
51
|
+
if (valueToSubmit === '' && (inheritedFlags.isInheritedValue || calculatedFlags.isCalculatedValue)) {
|
|
53
52
|
_resetToInheritedOrCalculatedValue();
|
|
54
53
|
return;
|
|
55
54
|
}
|
|
56
|
-
if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
|
|
57
|
-
handleSubmit(valueToSubmit, state.attribute.id);
|
|
58
|
-
}
|
|
59
55
|
onChange(valueToSubmit);
|
|
56
|
+
await handleSubmit(valueToSubmit, attribute.id);
|
|
57
|
+
setIsFocused(false);
|
|
60
58
|
};
|
|
61
59
|
const _handleOnChange = inputValue => {
|
|
62
60
|
setHasChanged(true);
|
|
63
61
|
onChange(inputValue);
|
|
64
62
|
};
|
|
65
|
-
|
|
66
|
-
if (state.isInheritedOverrideValue) {
|
|
67
|
-
return t('record_edition.inherited_input_helper', {
|
|
68
|
-
inheritedValue: state.inheritedValue.raw_value
|
|
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) }));
|
|
63
|
+
return (_jsx(KitInputNumberStyled, { ref: inputRef, id: attribute.id, autoFocus: isFocused, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, value: value, formatter: v => (isFocused || isErrors || !presentationValue ? `${v}` : `${presentationValue}`), disabled: readonly, onChange: _handleOnChange, onFocus: _handleFocus, onBlur: _handleOnBlur, placeholder: t('record_edition.placeholder.enter_a_number') }));
|
|
80
64
|
};
|
|
81
65
|
//# 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,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAuD,
|
|
1
|
+
{"version":3,"file":"DSInputNumberWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAuD,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAC,IAAI,EAAS,MAAM,MAAM,CAAC;AAClC,OAAO,MAAM,MAAM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SAAS,CAAC,EAAE,EAChB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAChD,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACtC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,iBAAiB,EAAE,CAAC,EAC/F,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,CAAC,CAAC,2CAA2C,CAAC,GAC7D,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSInputWrapperProps 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 DSInputWrapper: FunctionComponent<IDSInputWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { IKitInput } from 'aristid-ds/dist/Kit/DataEntry/Input/types';
|
|
4
|
+
export declare const DSInputWrapper: FunctionComponent<IStandFieldValueContentProps<IKitInput>>;
|
|
@@ -3,85 +3,58 @@ 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 {
|
|
6
|
+
import { useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
|
-
import styled from 'styled-components';
|
|
9
8
|
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { localizedTranslation } from '@leav/utils';
|
|
13
|
-
const KitInputStyled = styled(KitInput) `
|
|
14
|
-
color: ${({ $shouldHighlightColor }) => ($shouldHighlightColor ? 'var(--general-colors-primary-400)' : 'initial')};
|
|
15
|
-
`;
|
|
16
|
-
export const DSInputWrapper = ({ value, onChange, state, attribute, fieldValue, handleSubmit, handleBlur, shouldShowValueDetailsButton = false }) => {
|
|
9
|
+
import { EMPTY_INITIAL_VALUE_STRING } from '../../../antdUtils';
|
|
10
|
+
export const DSInputWrapper = ({ value, presentationValue, isLastValueOfMultivalues, removeLastValueOfMultivalues, onChange, attribute, readonly, handleSubmit, calculatedFlags, inheritedFlags, setActiveValue }) => {
|
|
17
11
|
if (!onChange) {
|
|
18
12
|
throw Error('DSInputWrapper should be used inside a antd Form.Item');
|
|
19
13
|
}
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const { onValueDetailsButtonClick } = useValueDetailsButton({
|
|
23
|
-
value: fieldValue?.value,
|
|
24
|
-
attribute
|
|
25
|
-
});
|
|
14
|
+
const isNewValueOfMultivalues = isLastValueOfMultivalues && value === EMPTY_INITIAL_VALUE_STRING;
|
|
15
|
+
const focusedDefaultValue = attribute.multiple_values ? isNewValueOfMultivalues : false;
|
|
26
16
|
const [hasChanged, setHasChanged] = useState(false);
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
setHasChanged(false);
|
|
36
|
-
if (state.isInheritedValue) {
|
|
37
|
-
onChange(state.inheritedValue.raw_value);
|
|
17
|
+
const [isFocused, setIsFocused] = useState(focusedDefaultValue);
|
|
18
|
+
const { errors } = Form.Item.useStatus();
|
|
19
|
+
const { t } = useSharedTranslation();
|
|
20
|
+
const isErrors = errors.length > 0;
|
|
21
|
+
const valueToDisplay = isFocused || isErrors || !presentationValue ? value : presentationValue;
|
|
22
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
23
|
+
if (inheritedFlags.isInheritedValue) {
|
|
24
|
+
onChange(inheritedFlags.inheritedValue.raw_payload);
|
|
38
25
|
}
|
|
39
|
-
else if (
|
|
40
|
-
onChange(
|
|
26
|
+
else if (calculatedFlags.isCalculatedValue) {
|
|
27
|
+
onChange(calculatedFlags.calculatedValue.raw_payload);
|
|
41
28
|
}
|
|
42
|
-
handleSubmit(
|
|
29
|
+
await handleSubmit(null, attribute.id);
|
|
30
|
+
};
|
|
31
|
+
const _handleOnFocus = () => {
|
|
32
|
+
setIsFocused(true);
|
|
33
|
+
setActiveValue();
|
|
43
34
|
};
|
|
44
|
-
const _handleOnBlur = (event) => {
|
|
35
|
+
const _handleOnBlur = async (event) => {
|
|
36
|
+
setHasChanged(false);
|
|
45
37
|
if (!hasChanged) {
|
|
46
|
-
|
|
38
|
+
onChange(event);
|
|
39
|
+
setIsFocused(false);
|
|
40
|
+
if (isNewValueOfMultivalues) {
|
|
41
|
+
removeLastValueOfMultivalues();
|
|
42
|
+
}
|
|
47
43
|
return;
|
|
48
44
|
}
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
45
|
+
const inputValue = event.target.value;
|
|
46
|
+
if (inputValue === '' && (inheritedFlags.isInheritedValue || calculatedFlags.isCalculatedValue)) {
|
|
51
47
|
_resetToInheritedOrCalculatedValue();
|
|
52
48
|
return;
|
|
53
49
|
}
|
|
54
|
-
if (hasChanged || (!state.isInheritedValue && !state.isCalculatedValue)) {
|
|
55
|
-
handleSubmit(valueToSubmit, state.attribute.id);
|
|
56
|
-
}
|
|
57
50
|
onChange(event);
|
|
51
|
+
await handleSubmit(inputValue, attribute.id);
|
|
52
|
+
setIsFocused(false);
|
|
58
53
|
};
|
|
59
|
-
const _handleOnChange = (event) => {
|
|
54
|
+
const _handleOnChange = async (event) => {
|
|
60
55
|
setHasChanged(true);
|
|
61
|
-
const inputValue = event.target.value;
|
|
62
|
-
if ((state.isInheritedValue || state.isCalculatedValue) && inputValue === '' && event.type === 'click') {
|
|
63
|
-
_resetToInheritedOrCalculatedValue();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (inputValue === '' && event.type === 'click') {
|
|
67
|
-
handleSubmit(inputValue, state.attribute.id);
|
|
68
|
-
}
|
|
69
56
|
onChange(event);
|
|
70
57
|
};
|
|
71
|
-
|
|
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(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) }));
|
|
58
|
+
return (_jsx(KitInput, { id: attribute.id, autoFocus: isFocused, disabled: readonly, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, value: valueToDisplay, allowClear: !!value && !attribute.multiple_values, onChange: _handleOnChange, onFocus: _handleOnFocus, onBlur: _handleOnBlur, placeholder: t('record_edition.placeholder.enter_a_text'), maxLength: attribute.character_limit ?? undefined, showCount: true }));
|
|
86
59
|
};
|
|
87
60
|
//# 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,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAA6C,
|
|
1
|
+
{"version":3,"file":"DSInputWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAA6C,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;AAE9D,MAAM,CAAC,MAAM,cAAc,GAA+D,CAAC,EACvF,KAAK,EACL,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACjB,EAAE,EAAE;IACD,IAAI,CAAC,QAAQ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,EAAE,aAAa,EACrB,WAAW,EAAE,CAAC,CAAC,yCAAyC,CAAC,EACzD,SAAS,EAAE,SAAS,CAAC,eAAe,IAAI,SAAS,EACjD,SAAS,SACX,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSRangePickerWrapperProps extends IProvidedByAntFormItem<RangePickerProps> {
|
|
7
|
-
state: IStandardFieldReducerState;
|
|
8
|
-
attribute: RecordFormAttributeFragment;
|
|
9
|
-
fieldValue: IStandardFieldValue;
|
|
10
|
-
handleSubmit: (value: StandardValueTypes, id?: string) => void;
|
|
11
|
-
handleBlur: () => void;
|
|
12
|
-
shouldShowValueDetailsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const DSRangePickerWrapper: FunctionComponent<IDSRangePickerWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { IKitRangePicker } from 'aristid-ds/dist/Kit/DataEntry/DatePicker/types';
|
|
4
|
+
export declare const DSRangePickerWrapper: FunctionComponent<IStandFieldValueContentProps<IKitRangePicker>>;
|
|
@@ -3,52 +3,55 @@ 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 { KitDatePicker } from 'aristid-ds';
|
|
6
|
-
import { useEffect, useRef } from 'react';
|
|
6
|
+
import { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { Form } from 'antd';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
import styled from 'styled-components';
|
|
10
|
-
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
11
|
-
import { useValueDetailsButton } from '../../../../../../components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton';
|
|
12
|
-
import { useLang } from '../../../../../../hooks';
|
|
13
|
-
import { localizedTranslation } from '@leav/utils';
|
|
14
10
|
import { setDateToUTCNoon } from '../../../../../../_utils';
|
|
11
|
+
import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
|
|
12
|
+
import { EMPTY_INITIAL_VALUE_UNDEFINED } from '../../../antdUtils';
|
|
15
13
|
const KitDatePickerRangePickerStyled = styled(KitDatePicker.RangePicker) `
|
|
16
|
-
|
|
14
|
+
${({ $shouldUsePresentationLayout }) => $shouldUsePresentationLayout &&
|
|
15
|
+
` &.ant-picker.ant-picker-range {
|
|
16
|
+
div:nth-child(n+3) {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`}
|
|
17
21
|
`;
|
|
18
|
-
export const DSRangePickerWrapper = ({ value,
|
|
22
|
+
export const DSRangePickerWrapper = ({ value, presentationValue, isLastValueOfMultivalues, removeLastValueOfMultivalues, onChange, attribute, handleSubmit, readonly, calculatedFlags, inheritedFlags, setActiveValue }) => {
|
|
19
23
|
if (!onChange) {
|
|
20
24
|
throw Error('DSRangePickerWrapper should be used inside a antd Form.Item');
|
|
21
25
|
}
|
|
22
|
-
const
|
|
23
|
-
const
|
|
26
|
+
const isNewValueOfMultivalues = isLastValueOfMultivalues && value === EMPTY_INITIAL_VALUE_UNDEFINED;
|
|
27
|
+
const focusedDefaultValue = attribute.multiple_values ? isNewValueOfMultivalues : false;
|
|
28
|
+
const hasChangedRef = useRef(false);
|
|
29
|
+
const [isFocused, setIsFocused] = useState(focusedDefaultValue);
|
|
24
30
|
const { errors } = Form.Item.useStatus();
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}, [fieldValue.isEditing]);
|
|
35
|
-
const _resetToInheritedOrCalculatedValue = () => {
|
|
36
|
-
if (state.isInheritedValue) {
|
|
31
|
+
const { t } = useSharedTranslation();
|
|
32
|
+
const isErrors = errors.length > 0;
|
|
33
|
+
// we slow down the css so that presentationValue does not flash before being hidden
|
|
34
|
+
const [usePresentationLayout, setUsePresentationLayout] = useState(false);
|
|
35
|
+
useEffect(() => setUsePresentationLayout(!isFocused && !isErrors), [isFocused, isErrors]);
|
|
36
|
+
const _resetToInheritedOrCalculatedValue = async () => {
|
|
37
|
+
hasChangedRef.current = false;
|
|
38
|
+
if (inheritedFlags.isInheritedValue) {
|
|
37
39
|
onChange([
|
|
38
|
-
dayjs.unix(Number(
|
|
39
|
-
dayjs.unix(Number(
|
|
40
|
-
],
|
|
40
|
+
dayjs.unix(Number(inheritedFlags.inheritedValue.raw_payload.from)),
|
|
41
|
+
dayjs.unix(Number(inheritedFlags.inheritedValue.raw_payload.to))
|
|
42
|
+
], inheritedFlags.inheritedValue.raw_payload);
|
|
41
43
|
}
|
|
42
|
-
else if (
|
|
44
|
+
else if (calculatedFlags.isCalculatedValue) {
|
|
43
45
|
onChange([
|
|
44
|
-
dayjs.unix(Number(
|
|
45
|
-
dayjs.unix(Number(
|
|
46
|
-
],
|
|
46
|
+
dayjs.unix(Number(calculatedFlags.calculatedValue.raw_payload.from)),
|
|
47
|
+
dayjs.unix(Number(calculatedFlags.calculatedValue.raw_payload.to))
|
|
48
|
+
], calculatedFlags.calculatedValue.raw_payload);
|
|
47
49
|
}
|
|
48
|
-
handleSubmit(
|
|
50
|
+
await handleSubmit(null, attribute.id);
|
|
49
51
|
};
|
|
50
|
-
const _handleDateChange = (rangePickerDates, ...antOnChangeParams) => {
|
|
51
|
-
|
|
52
|
+
const _handleDateChange = async (rangePickerDates, ...antOnChangeParams) => {
|
|
53
|
+
hasChangedRef.current = true;
|
|
54
|
+
if ((inheritedFlags.isInheritedValue || calculatedFlags.isCalculatedValue) && rangePickerDates === null) {
|
|
52
55
|
_resetToInheritedOrCalculatedValue();
|
|
53
56
|
return;
|
|
54
57
|
}
|
|
@@ -56,47 +59,31 @@ export const DSRangePickerWrapper = ({ value, onChange, state, attribute, fieldV
|
|
|
56
59
|
rangePickerDates = [setDateToUTCNoon(rangePickerDates[0]), setDateToUTCNoon(rangePickerDates[1])];
|
|
57
60
|
}
|
|
58
61
|
onChange(rangePickerDates, ...antOnChangeParams);
|
|
59
|
-
|
|
60
|
-
if (state.formElement.settings.required && rangePickerDates === null) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const datesToSave = { from: null, to: null };
|
|
62
|
+
let datesToSave = null;
|
|
64
63
|
if (rangePickerDates !== null) {
|
|
65
64
|
const [dateFrom, dateTo] = rangePickerDates;
|
|
66
|
-
datesToSave
|
|
67
|
-
datesToSave.to = String(dateTo.unix());
|
|
65
|
+
datesToSave = JSON.stringify({ from: dateFrom.unix(), to: dateTo.unix() });
|
|
68
66
|
}
|
|
69
|
-
handleSubmit(datesToSave,
|
|
67
|
+
await handleSubmit(datesToSave, attribute.id);
|
|
70
68
|
};
|
|
71
69
|
const _handleOpenChange = (open) => {
|
|
72
70
|
if (!open) {
|
|
73
|
-
|
|
71
|
+
setIsFocused(false);
|
|
72
|
+
if (!hasChangedRef.current && isNewValueOfMultivalues) {
|
|
73
|
+
removeLastValueOfMultivalues();
|
|
74
|
+
}
|
|
74
75
|
}
|
|
75
76
|
};
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
inheritedValue: t('record_edition.date_range_from_to', {
|
|
80
|
-
from: state.inheritedValue.value.from,
|
|
81
|
-
to: state.inheritedValue.value.to
|
|
82
|
-
})
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
else if (state.isCalculatedOverrideValue) {
|
|
86
|
-
return t('record_edition.calculated_input_helper', {
|
|
87
|
-
calculatedValue: t('record_edition.date_range_from_to', {
|
|
88
|
-
from: state.calculatedValue.value.from,
|
|
89
|
-
to: state.calculatedValue.value.to
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
return;
|
|
77
|
+
const _handleOnFocus = () => {
|
|
78
|
+
setIsFocused(true);
|
|
79
|
+
setActiveValue();
|
|
94
80
|
};
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
, {
|
|
99
|
-
|
|
100
|
-
|
|
81
|
+
const placeholderToDisplay = isFocused
|
|
82
|
+
? [t('record_edition.placeholder.start_date'), t('record_edition.placeholder.end_date')]
|
|
83
|
+
: [t('record_edition.placeholder.enter_a_period'), ''];
|
|
84
|
+
return (_jsx(KitDatePickerRangePickerStyled, { id: attribute.id, autoFocus: isFocused, open: attribute.multiple_values ? isFocused : undefined, value: value, format: !isFocused && !isErrors && !!presentationValue ? () => presentationValue : undefined, disabled: readonly, allowClear: !!value &&
|
|
85
|
+
!attribute.multiple_values &&
|
|
86
|
+
!inheritedFlags.isInheritedNotOverrideValue &&
|
|
87
|
+
!calculatedFlags.isCalculatedNotOverrideValue, helper: isErrors ? String(errors[0]) : undefined, status: isErrors ? 'error' : undefined, onFocus: _handleOnFocus, onChange: _handleDateChange, onOpenChange: _handleOpenChange, placeholder: placeholderToDisplay, "$shouldUsePresentationLayout": usePresentationLayout }));
|
|
101
88
|
};
|
|
102
89
|
//# sourceMappingURL=DSRangePickerWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSRangePickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DSRangePickerWrapper.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordCont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
import {
|
|
4
|
-
|
|
5
|
-
import { RecordFormAttributeFragment } from '../../../../../../_gqlTypes';
|
|
6
|
-
interface IDSRichTextWrapperProps 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 DSRichTextWrapper: FunctionComponent<IDSRichTextWrapperProps>;
|
|
15
|
-
export {};
|
|
2
|
+
import { IStandFieldValueContentProps } from './_types';
|
|
3
|
+
import { KitRichTextProps } from 'aristid-ds/dist/Kit/DataEntry/RichText/types';
|
|
4
|
+
export declare const DSRichTextWrapper: FunctionComponent<IStandFieldValueContentProps<KitRichTextProps>>;
|