nmrium 2.2.0 → 2.3.0
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/lib/component/1d/PredictionErrorsNotations.js +3 -3
- package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +2 -1
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.js +362 -0
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +2 -2
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/SVGTable.d.ts +5 -3
- package/lib/component/SVGTable.d.ts.map +1 -1
- package/lib/component/SVGTable.js +16 -16
- package/lib/component/SVGTable.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
- package/lib/component/context/SortSpectraContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +6 -9
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/Sections.d.ts.map +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/TabTitle.d.ts.map +1 -1
- package/lib/component/elements/TabTitle.js +2 -2
- package/lib/component/elements/TabTitle.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.js +10 -3
- package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
- package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +31 -110
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/units.d.ts +0 -28
- package/lib/component/elements/export/units.d.ts.map +1 -1
- package/lib/component/elements/export/units.js +0 -5
- package/lib/component/elements/export/units.js.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
- package/lib/component/elements/print/pageSize.d.ts +1 -1
- package/lib/component/elements/print/pageSize.d.ts.map +1 -1
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.js +1 -0
- package/lib/component/hooks/useTextMetrics.js.map +1 -1
- package/lib/component/main/NMRiumViewer.js +1 -1
- package/lib/component/main/NMRiumViewer.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +2 -2
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts +2 -2
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +43 -35
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +4 -3
- package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +5 -5
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +5 -5
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +5 -5
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +5 -5
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +5 -5
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +11 -11
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
- package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
- package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
- package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +1 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/signalsKinds.d.ts +1 -2
- package/lib/data/constants/signalsKinds.d.ts.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
- package/lib/data/matrixGeneration.d.ts.map +1 -1
- package/lib/data/matrixGeneration.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +30 -31
- package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
- package/src/component/1d/peaks/Peaks.tsx +5 -2
- package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
- package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
- package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
- package/src/component/1d/ranges/Ranges.tsx +2 -2
- package/src/component/1d-2d/FieldEdition.tsx +4 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
- package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +1 -2
- package/src/component/SVGTable.tsx +35 -33
- package/src/component/context/KeyModifierContext.tsx +1 -2
- package/src/component/context/LoggerContext.tsx +1 -7
- package/src/component/context/SortSpectraContext.tsx +1 -3
- package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
- package/src/component/elements/Button.tsx +1 -6
- package/src/component/elements/Sections.tsx +5 -3
- package/src/component/elements/TabTitle.tsx +7 -5
- package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
- package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
- package/src/component/elements/export/ExportOptionsModal.tsx +56 -276
- package/src/component/elements/export/units.ts +0 -6
- package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
- package/src/component/elements/print/pageSize.ts +1 -1
- package/src/component/hooks/useExport.tsx +1 -3
- package/src/component/hooks/usePanelPreferences.ts +4 -4
- package/src/component/hooks/useTextMetrics.ts +1 -0
- package/src/component/main/NMRiumViewer.tsx +1 -1
- package/src/component/modal/EditPeakShapeModal.tsx +2 -2
- package/src/component/modal/SaveAsModal.tsx +89 -82
- package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +3 -3
- package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
- package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
- package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +11 -11
- package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
- package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
- package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
- package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
- package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
- package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
- package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +1 -5
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
- package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
- package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
- package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
- package/src/component/reducer/actions/DomainActions.ts +1 -4
- package/src/component/reducer/actions/FiltersActions.ts +1 -2
- package/src/component/reducer/actions/LoadAction.ts +1 -3
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
- package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
- package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
- package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
- package/src/component/toolbar/ToolTypes.ts +2 -2
- package/src/component/utility/export.ts +1 -0
- package/src/data/PredictionManager.ts +4 -6
- package/src/data/constants/signalsKinds.ts +1 -1
- package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
- package/src/data/matrixGeneration.ts +1 -5
- package/src/versionInfo.ts +1 -1
- package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
- package/lib/component/1d/FloatingRanges.js +0 -263
- package/lib/component/1d/FloatingRanges.js.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
- package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
- package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/getModes.js +0 -11
- package/lib/component/elements/export/utilities/getModes.js.map +0 -1
- package/src/component/1d/FloatingRanges.tsx +0 -378
- package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
- package/src/component/elements/export/utilities/getModes.ts +0 -14
- /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SVGAttributes } from 'react';
|
|
2
|
-
import { createContext, useContext, useMemo } from 'react';
|
|
1
|
+
import type { ReactElement, SVGAttributes } from 'react';
|
|
2
|
+
import { createContext, isValidElement, useContext, useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
type CellTextProps = Omit<
|
|
5
5
|
SVGAttributes<SVGTextElement>,
|
|
@@ -15,7 +15,7 @@ interface StyleCell {
|
|
|
15
15
|
cellBoxProps?: CellBoxProps;
|
|
16
16
|
}
|
|
17
17
|
interface BaseSVGTableColumn<T> extends StyleCell {
|
|
18
|
-
header: string;
|
|
18
|
+
header: string | ReactElement;
|
|
19
19
|
width: number;
|
|
20
20
|
minWidth?: number;
|
|
21
21
|
rowSpanGroupKey?: keyof T;
|
|
@@ -27,7 +27,7 @@ interface AccessorKeyColumn<T> extends BaseSVGTableColumn<T> {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
interface AccessorFuncColumn<T> extends BaseSVGTableColumn<T> {
|
|
30
|
-
accessorFun: (row: T) => number | string;
|
|
30
|
+
accessorFun: (row: T & { index: number }) => number | string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export type SVGTableColumn<T> = AccessorKeyColumn<T> | AccessorFuncColumn<T>;
|
|
@@ -69,14 +69,14 @@ function mapColumns<T>(columns: Array<SVGTableColumn<T>>) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
interface FormatKeyOptions {
|
|
72
|
-
|
|
72
|
+
index: number;
|
|
73
73
|
columnKey: string;
|
|
74
74
|
groupKey: string;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
function formatKey(options: FormatKeyOptions) {
|
|
78
|
-
const {
|
|
79
|
-
return `GroupKey[${groupKey || null}]-ColumnKey[${columnKey}]-RowIndex[${
|
|
78
|
+
const { index, columnKey, groupKey } = options;
|
|
79
|
+
return `GroupKey[${groupKey || null}]-ColumnKey[${columnKey}]-RowIndex[${index}]`;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
function mapRowsSpan<T>(data: T[], columns: Array<InternalColumns<T>>) {
|
|
@@ -89,14 +89,14 @@ function mapRowsSpan<T>(data: T[], columns: Array<InternalColumns<T>>) {
|
|
|
89
89
|
let lastRowIndex = 0;
|
|
90
90
|
let lastGroupKey: string | null = null;
|
|
91
91
|
|
|
92
|
-
for (let
|
|
93
|
-
const row = data[
|
|
92
|
+
for (let index = 0; index < data.length; index++) {
|
|
93
|
+
const row = data[index];
|
|
94
94
|
const groupKey = String(row?.[col.rowSpanGroupKey] || '');
|
|
95
95
|
const key = col._columnOptions.key;
|
|
96
96
|
|
|
97
97
|
const value = isAccessorKeyColumn(col)
|
|
98
98
|
? (row as any)[col.accessorKey]
|
|
99
|
-
: col.accessorFun(row);
|
|
99
|
+
: col.accessorFun({ ...row, index });
|
|
100
100
|
|
|
101
101
|
if (
|
|
102
102
|
value === lastValue &&
|
|
@@ -107,16 +107,16 @@ function mapRowsSpan<T>(data: T[], columns: Array<InternalColumns<T>>) {
|
|
|
107
107
|
const prevKey = formatKey({
|
|
108
108
|
groupKey,
|
|
109
109
|
columnKey: key,
|
|
110
|
-
|
|
110
|
+
index: lastRowIndex,
|
|
111
111
|
});
|
|
112
112
|
rowSpanMap.set(prevKey, (rowSpanMap.get(prevKey) || 1) + 1);
|
|
113
|
-
skipColumns.add(formatKey({ groupKey, columnKey: key,
|
|
113
|
+
skipColumns.add(formatKey({ groupKey, columnKey: key, index }));
|
|
114
114
|
} else {
|
|
115
115
|
// Start a new rowspan
|
|
116
116
|
lastValue = value;
|
|
117
|
-
lastRowIndex =
|
|
117
|
+
lastRowIndex = index;
|
|
118
118
|
lastGroupKey = groupKey;
|
|
119
|
-
rowSpanMap.set(formatKey({ groupKey, columnKey: key,
|
|
119
|
+
rowSpanMap.set(formatKey({ groupKey, columnKey: key, index }), 1);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -170,11 +170,11 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
|
|
|
170
170
|
);
|
|
171
171
|
})}
|
|
172
172
|
|
|
173
|
-
{data.map((row,
|
|
173
|
+
{data.map((row, index) => {
|
|
174
174
|
return (
|
|
175
175
|
<g
|
|
176
|
-
key={
|
|
177
|
-
transform={`translate(0, ${rowHeight * (
|
|
176
|
+
key={index}
|
|
177
|
+
transform={`translate(0, ${rowHeight * (index + 1)})`}
|
|
178
178
|
>
|
|
179
179
|
{columns.map((col) => {
|
|
180
180
|
const {
|
|
@@ -187,7 +187,7 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
|
|
|
187
187
|
const cellKey = formatKey({
|
|
188
188
|
groupKey: String(groupKey),
|
|
189
189
|
columnKey,
|
|
190
|
-
|
|
190
|
+
index,
|
|
191
191
|
});
|
|
192
192
|
if (skipColumns.has(cellKey)) {
|
|
193
193
|
return null; // Skip merged row
|
|
@@ -199,7 +199,7 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
|
|
|
199
199
|
<ValueColumn
|
|
200
200
|
key={columnKey}
|
|
201
201
|
column={col}
|
|
202
|
-
row={row}
|
|
202
|
+
row={{ ...row, index }}
|
|
203
203
|
rowSpan={rowSpan}
|
|
204
204
|
cellBoxProps={cellBoxProps}
|
|
205
205
|
cellTextProps={cellTextProps}
|
|
@@ -220,11 +220,11 @@ interface BaseColumnProps<T> extends StyleCell {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
interface ColumnProps<T> extends BaseColumnProps<T> {
|
|
223
|
-
value: string | number;
|
|
223
|
+
value: string | number | ReactElement;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
interface ValueColumnProps<T> extends BaseColumnProps<T> {
|
|
227
|
-
row: T;
|
|
227
|
+
row: T & { index: number };
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
function ValueColumn<T>(props: ValueColumnProps<T>) {
|
|
@@ -250,10 +250,8 @@ function Column<T>(props: ColumnProps<T>) {
|
|
|
250
250
|
const { rowHeight } = tableOptions;
|
|
251
251
|
|
|
252
252
|
return (
|
|
253
|
-
<g>
|
|
253
|
+
<g transform={`translate(${x} 0)`}>
|
|
254
254
|
<rect
|
|
255
|
-
x={x}
|
|
256
|
-
y="0"
|
|
257
255
|
width={width}
|
|
258
256
|
height={rowHeight * rowSpan}
|
|
259
257
|
fill="white"
|
|
@@ -261,15 +259,19 @@ function Column<T>(props: ColumnProps<T>) {
|
|
|
261
259
|
strokeWidth="1"
|
|
262
260
|
{...cellBoxProps}
|
|
263
261
|
/>
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
262
|
+
{isValidElement(value) ? (
|
|
263
|
+
value
|
|
264
|
+
) : (
|
|
265
|
+
<text
|
|
266
|
+
x={width / 2}
|
|
267
|
+
y={(rowHeight * rowSpan) / 2}
|
|
268
|
+
fontSize="11"
|
|
269
|
+
dominantBaseline="middle"
|
|
270
|
+
{...cellTextProps}
|
|
271
|
+
>
|
|
272
|
+
{value}
|
|
273
|
+
</text>
|
|
274
|
+
)}
|
|
273
275
|
</g>
|
|
274
276
|
);
|
|
275
277
|
}
|
|
@@ -6,8 +6,7 @@ import { usePreferences } from './PreferencesContext.js';
|
|
|
6
6
|
type ModifiersKey = `shift[${boolean}]_ctrl[${boolean}]_alt[${boolean}]`;
|
|
7
7
|
|
|
8
8
|
type PrimaryKey =
|
|
9
|
-
| 'shift[
|
|
10
|
-
| 'shift[false]_ctrl[false]_alt[false]';
|
|
9
|
+
'shift[true]_ctrl[false]_alt[false]' | 'shift[false]_ctrl[false]_alt[false]';
|
|
11
10
|
|
|
12
11
|
function getPrimaryKey(invert: boolean): PrimaryKey {
|
|
13
12
|
if (invert) {
|
|
@@ -36,13 +36,7 @@ interface LoggerProviderProps {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export type LoggerType =
|
|
39
|
-
| '
|
|
40
|
-
| 'error'
|
|
41
|
-
| 'warn'
|
|
42
|
-
| 'info'
|
|
43
|
-
| 'debug'
|
|
44
|
-
| 'trace'
|
|
45
|
-
| 'silent';
|
|
39
|
+
'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
|
|
46
40
|
|
|
47
41
|
export const LOGGER_LEVELS = {
|
|
48
42
|
fatal: 60,
|
|
@@ -35,9 +35,7 @@ interface SortByPathOptions extends BaseSortOptions {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
type SortOptions =
|
|
38
|
-
|
|
|
39
|
-
| SortByReferenceOptions
|
|
40
|
-
| SortByReferenceIndexesOptions;
|
|
38
|
+
SortByPathOptions | SortByReferenceOptions | SortByReferenceIndexesOptions;
|
|
41
39
|
|
|
42
40
|
type SortFuncOptions = SortOptions & { activeSort?: string };
|
|
43
41
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { PopoverNextProps } from '@blueprintjs/core';
|
|
2
|
+
import { PopoverNext } from '@blueprintjs/core';
|
|
3
3
|
import type { Interpolation, Theme } from '@emotion/react';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import type { CSSProperties, MouseEvent } from 'react';
|
|
@@ -62,7 +62,7 @@ interface Position {
|
|
|
62
62
|
export interface ActionsButtonsPopoverProps
|
|
63
63
|
extends
|
|
64
64
|
Omit<
|
|
65
|
-
|
|
65
|
+
PopoverNextProps,
|
|
66
66
|
'interactionKind' | 'content' | 'modifiers' | 'renderTarget'
|
|
67
67
|
>,
|
|
68
68
|
Partial<Position> {
|
|
@@ -132,7 +132,7 @@ function getOffset(options: OffsetOptions): [number, number] {
|
|
|
132
132
|
function getPlacement(
|
|
133
133
|
anchorTo: AnchorTo,
|
|
134
134
|
anchorPlacement: AnchorPlacement,
|
|
135
|
-
):
|
|
135
|
+
): PopoverNextProps['placement'] {
|
|
136
136
|
switch (anchorTo) {
|
|
137
137
|
case 'cursor-x':
|
|
138
138
|
return `${anchorPlacement === 'start' ? 'top' : 'bottom'}-start`;
|
|
@@ -187,8 +187,10 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
187
187
|
const placement = getPlacement(anchorTo, anchorPlacement);
|
|
188
188
|
const offset = getOffset({ anchorTo, offsetX, offsetY, cursorPosition });
|
|
189
189
|
return (
|
|
190
|
-
<
|
|
191
|
-
|
|
190
|
+
<PopoverNext
|
|
191
|
+
lazy
|
|
192
|
+
arrow={false}
|
|
193
|
+
animation="minimal"
|
|
192
194
|
placement={placement}
|
|
193
195
|
popoverClassName="actions-buttons-popover"
|
|
194
196
|
interactionKind="hover"
|
|
@@ -206,16 +208,12 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
206
208
|
{children}
|
|
207
209
|
</Wrapper>
|
|
208
210
|
)}
|
|
209
|
-
|
|
211
|
+
middleware={{
|
|
210
212
|
offset: {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
options: {
|
|
214
|
-
offset,
|
|
215
|
-
},
|
|
213
|
+
crossAxis: offset[0],
|
|
214
|
+
mainAxis: offset[1],
|
|
216
215
|
},
|
|
217
|
-
|
|
218
|
-
flip: { enabled: autoFlip },
|
|
216
|
+
flip: autoFlip ? undefined : { mainAxis: false, crossAxis: false },
|
|
219
217
|
}}
|
|
220
218
|
content={
|
|
221
219
|
<Container style={contentStyle} flexDirection={direction} gap={space}>
|
|
@@ -24,12 +24,7 @@ interface BaseColor {
|
|
|
24
24
|
type Fill = 'clear' | 'outline' | 'solid';
|
|
25
25
|
|
|
26
26
|
type ColorTheme =
|
|
27
|
-
| '
|
|
28
|
-
| 'danger'
|
|
29
|
-
| 'warning'
|
|
30
|
-
| 'medium'
|
|
31
|
-
| 'light'
|
|
32
|
-
| 'secondary';
|
|
27
|
+
'success' | 'danger' | 'warning' | 'medium' | 'light' | 'secondary';
|
|
33
28
|
|
|
34
29
|
type ColorPalettes = Record<
|
|
35
30
|
ColorTheme,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { ElementDropTargetEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/adapter/element-adapter.js';
|
|
2
|
-
import type { ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types.js';
|
|
3
|
-
import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
4
1
|
import { Colors, Icon, Tag } from '@blueprintjs/core';
|
|
5
2
|
import styled from '@emotion/styled';
|
|
3
|
+
import type {
|
|
4
|
+
Edge,
|
|
5
|
+
ElementDragPayload,
|
|
6
|
+
ElementDropTargetEventBasePayload,
|
|
7
|
+
} from '@zakodium/pdnd-esm';
|
|
6
8
|
import {
|
|
7
9
|
attachClosestEdge,
|
|
8
10
|
combine,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonProps } from '@blueprintjs/core';
|
|
2
|
-
import { Button,
|
|
2
|
+
import { Button, PopoverNext } from '@blueprintjs/core';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import type { MouseEvent, ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -17,10 +17,12 @@ export function TabTitle(props: TabTitleProps) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
|
-
<
|
|
21
|
-
|
|
20
|
+
<PopoverNext
|
|
21
|
+
lazy
|
|
22
|
+
arrow={false}
|
|
23
|
+
animation="minimal"
|
|
22
24
|
popoverClassName="popover-tab"
|
|
23
|
-
|
|
25
|
+
placement="top-start"
|
|
24
26
|
interactionKind="hover"
|
|
25
27
|
enforceFocus={false}
|
|
26
28
|
disabled={typeof onDelete !== 'function'}
|
|
@@ -35,7 +37,7 @@ export function TabTitle(props: TabTitleProps) {
|
|
|
35
37
|
}
|
|
36
38
|
>
|
|
37
39
|
{children}
|
|
38
|
-
</
|
|
40
|
+
</PopoverNext>
|
|
39
41
|
);
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -29,6 +29,7 @@ interface CustomToolbarPopoverItemProps<T = object>
|
|
|
29
29
|
itemProps?: Omit<ToolbarItemProps, 'onClick' | 'disabled'>;
|
|
30
30
|
options: Array<ToolbarPopoverMenuItem<T> | ToolbarPopoverMenuDivider>;
|
|
31
31
|
onClick?: (data?: T) => void;
|
|
32
|
+
stopParentClick?: boolean;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export function ToolbarPopoverItem<T = object>(
|
|
@@ -36,7 +37,7 @@ export function ToolbarPopoverItem<T = object>(
|
|
|
36
37
|
) {
|
|
37
38
|
const {
|
|
38
39
|
options,
|
|
39
|
-
onClick:
|
|
40
|
+
onClick: onParentClick,
|
|
40
41
|
icon,
|
|
41
42
|
tooltip,
|
|
42
43
|
tooltipProps,
|
|
@@ -44,6 +45,7 @@ export function ToolbarPopoverItem<T = object>(
|
|
|
44
45
|
id,
|
|
45
46
|
itemProps,
|
|
46
47
|
disabled,
|
|
48
|
+
stopParentClick = false,
|
|
47
49
|
...otherPopoverItemProps
|
|
48
50
|
} = props;
|
|
49
51
|
|
|
@@ -68,6 +70,7 @@ export function ToolbarPopoverItem<T = object>(
|
|
|
68
70
|
tooltipProps,
|
|
69
71
|
disabled,
|
|
70
72
|
menuItemType,
|
|
73
|
+
onClick,
|
|
71
74
|
...otherOptions
|
|
72
75
|
} = option;
|
|
73
76
|
return (
|
|
@@ -102,7 +105,15 @@ export function ToolbarPopoverItem<T = object>(
|
|
|
102
105
|
text={text}
|
|
103
106
|
{...otherOptions}
|
|
104
107
|
disabled={disabled}
|
|
105
|
-
onClick={() =>
|
|
108
|
+
onClick={(e) => {
|
|
109
|
+
if (disabled) return;
|
|
110
|
+
|
|
111
|
+
onClick?.(e);
|
|
112
|
+
|
|
113
|
+
if (!stopParentClick) {
|
|
114
|
+
onParentClick?.(data);
|
|
115
|
+
}
|
|
116
|
+
}}
|
|
106
117
|
/>
|
|
107
118
|
</span>
|
|
108
119
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button,
|
|
1
|
+
import { Button, PopoverNext } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import type { CSSProperties, ReactNode } from 'react';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
@@ -59,12 +59,14 @@ function DropDownButton<T extends DropDownListItem>(
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
|
-
<
|
|
62
|
+
<PopoverNext
|
|
63
|
+
lazy
|
|
63
64
|
isOpen={open}
|
|
64
65
|
onClose={() => setOpen(false)}
|
|
65
66
|
className={className}
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
arrow={false}
|
|
68
|
+
animation="minimal"
|
|
69
|
+
placement="bottom"
|
|
68
70
|
content={
|
|
69
71
|
<DropDownList
|
|
70
72
|
data={data}
|
|
@@ -80,7 +82,7 @@ function DropDownButton<T extends DropDownListItem>(
|
|
|
80
82
|
>
|
|
81
83
|
{!item ? <FaEllipsisH /> : formatSelectedValue(item)}
|
|
82
84
|
</PopoverButton>
|
|
83
|
-
</
|
|
85
|
+
</PopoverNext>
|
|
84
86
|
);
|
|
85
87
|
}
|
|
86
88
|
|