@topconsultnpm/sdkui-react 6.22.0-t1 → 6.22.0-t2
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/components/NewComponents/ContextMenu/TMContextMenu.js +1 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +45 -43
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +1 -1
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +67 -60
- package/lib/components/base/Styled.d.ts +92 -76
- package/lib/components/base/TMButton.d.ts +13 -0
- package/lib/components/base/TMButton.js +137 -5
- package/lib/components/base/TMDataGrid.d.ts +2 -0
- package/lib/components/base/TMDataGrid.js +260 -8
- package/lib/components/base/TMDataGridExportForm.js +39 -30
- package/lib/components/base/TMEditorBase.d.ts +2 -0
- package/lib/components/base/TMFileManager.js +5 -3
- package/lib/components/base/TMFileManagerDataGridView.js +11 -2
- package/lib/components/base/TMFileManagerThumbnailItems.js +19 -9
- package/lib/components/base/TMFileManagerUtils.d.ts +6 -6
- package/lib/components/base/TMFileManagerUtils.js +37 -1
- package/lib/components/base/TMModal.d.ts +11 -0
- package/lib/components/base/TMModal.js +47 -13
- package/lib/components/base/TMPanel.d.ts +6 -0
- package/lib/components/base/TMPanel.js +138 -25
- package/lib/components/base/TMPopUp.js +3 -0
- package/lib/components/base/TMTooltip.d.ts +2 -1
- package/lib/components/base/TMTooltip.js +24 -8
- package/lib/components/base/TMTreeView.d.ts +13 -7
- package/lib/components/base/TMTreeView.js +108 -67
- package/lib/components/choosers/TMDcmtTypeChooser.js +4 -3
- package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
- package/lib/components/choosers/TMDistinctValues.js +149 -142
- package/lib/components/choosers/TMMetadataChooser.js +1 -1
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +13 -0
- package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
- package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
- package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
- package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
- package/lib/components/choosers/TMSelectedValuesSummary.js +91 -0
- package/lib/components/editors/TMDateBox.d.ts +16 -1
- package/lib/components/editors/TMDateBox.js +90 -22
- package/lib/components/editors/TMDropDown.d.ts +3 -0
- package/lib/components/editors/TMDropDown.js +197 -5
- package/lib/components/editors/TMEditorStyled.d.ts +20 -42
- package/lib/components/editors/TMMetadataEditor.d.ts +5 -1
- package/lib/components/editors/TMMetadataEditor.js +27 -23
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +23 -15
- package/lib/components/editors/TMTextBox.d.ts +2 -0
- package/lib/components/editors/TMTextBox.js +30 -19
- package/lib/components/features/archive/TMArchive.js +17 -3
- package/lib/components/features/documents/TMBatchUpdateForm.js +19 -5
- package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
- package/lib/components/features/documents/TMDcmtBlog.js +4 -4
- package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
- package/lib/components/features/documents/TMDcmtForm.js +232 -53
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +11 -0
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +77 -7
- package/lib/components/features/documents/TMDcmtIcon.js +5 -3
- package/lib/components/features/documents/TMDcmtPreview.d.ts +7 -5
- package/lib/components/features/documents/TMDcmtPreview.js +10 -6
- package/lib/components/features/documents/TMMasterDetailDcmts.js +95 -33
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +20 -0
- package/lib/components/features/documents/TMMasterInfoFields.js +186 -0
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +30 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +46 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +323 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +14 -1
- package/lib/components/features/documents/TMRelationViewer.js +82 -52
- package/lib/components/features/search/TMSearch.js +103 -24
- package/lib/components/features/search/TMSearchQueryEditor.js +5 -3
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +14 -4
- package/lib/components/features/search/TMSearchQueryPanel.js +152 -57
- package/lib/components/features/search/TMSearchResult.d.ts +16 -0
- package/lib/components/features/search/TMSearchResult.js +438 -145
- package/lib/components/features/search/TMTreeSelector.js +109 -64
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +10 -0
- package/lib/components/features/workflow/TMWorkflowPopup.js +8 -4
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
- package/lib/components/grids/TMBlogAttachments.js +13 -2
- package/lib/components/grids/TMBlogHeader.js +5 -1
- package/lib/components/grids/TMBlogsPost.d.ts +2 -0
- package/lib/components/grids/TMBlogsPost.js +31 -4
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +14 -3
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +24 -14
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +4 -5
- package/lib/components/layout/panelManager/TMPanelWrapper.js +2 -2
- package/lib/components/layout/panelManager/types.d.ts +3 -0
- package/lib/components/layout/panelManager/utils.js +13 -11
- package/lib/components/query/TMQueryEditor.d.ts +14 -10
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.js +30 -20
- package/lib/components/viewers/TMMidViewer.js +5 -2
- package/lib/components/viewers/TMTidViewer.js +86 -25
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/devextreme-license.d.ts +1 -0
- package/lib/devextreme-license.js +3 -0
- package/lib/helper/Globalization.d.ts +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +110 -0
- package/lib/helper/SDKUI_Globals.js +151 -0
- package/lib/helper/SDKUI_Localizator.d.ts +55 -0
- package/lib/helper/SDKUI_Localizator.js +550 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +2 -0
- package/lib/helper/TMAppUpdatedModal.js +134 -0
- package/lib/helper/TMIcons.d.ts +1 -0
- package/lib/helper/TMIcons.js +3 -0
- package/lib/helper/TMUtils.d.ts +51 -4
- package/lib/helper/TMUtils.js +272 -11
- package/lib/helper/dataGridSearchHelper.d.ts +28 -0
- package/lib/helper/dataGridSearchHelper.js +51 -0
- package/lib/helper/dcmtsHelper.d.ts +20 -0
- package/lib/helper/dcmtsHelper.js +58 -1
- package/lib/helper/helpers.d.ts +23 -1
- package/lib/helper/helpers.js +57 -1
- package/lib/helper/index.d.ts +2 -0
- package/lib/helper/index.js +2 -0
- package/lib/helper/queryHelper.d.ts +6 -1
- package/lib/helper/queryHelper.js +8 -3
- package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
- package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
- package/lib/hooks/useArchiveListForm.d.ts +39 -0
- package/lib/hooks/useArchiveListForm.js +46 -0
- package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
- package/lib/hooks/useCaseFlowApprove.js +157 -0
- package/lib/hooks/useDataUserIdItem.d.ts +1 -0
- package/lib/hooks/useDataUserIdItem.js +1 -0
- package/lib/hooks/useDocumentOperations.d.ts +4 -0
- package/lib/hooks/useDocumentOperations.js +52 -10
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +113 -0
- package/lib/hooks/useMultiMasterDetailDcmts.js +760 -0
- package/lib/hooks/useRelatedDocuments.d.ts +1 -0
- package/lib/hooks/useRelatedDocuments.js +22 -27
- package/lib/hooks/useShowDossiersV5.d.ts +12 -0
- package/lib/hooks/useShowDossiersV5.js +37 -0
- package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
- package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
- package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
- package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
- package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
- package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
- package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
- package/lib/hooks/useTMDistinctValuesSource.js +105 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -2
- package/lib/services/caseflow/CaseFlowService.d.ts +236 -0
- package/lib/services/caseflow/CaseFlowService.js +693 -0
- package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
- package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
- package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
- package/lib/services/caseflow/caseFlowNameCache.js +116 -0
- package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
- package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +4 -0
- package/lib/services/platform_services.d.ts +1 -1
- package/package.json +9 -5
|
@@ -1,102 +1,118 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ResultTypes } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
import { TMColors } from '../../utils/theme';
|
|
4
|
-
export declare const StyledDivHorizontal: import("styled-components/dist/types").IStyledComponentBase<"web",
|
|
5
|
-
|
|
4
|
+
export declare const StyledDivHorizontal: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
5
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
6
|
+
}> & string;
|
|
7
|
+
export declare const StyledMultiViewPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
8
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
9
|
+
}, {
|
|
6
10
|
$isVisible: boolean;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const StyledToolbarForm: import("styled-components/dist/types").IStyledComponentBase<"web",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare const StyledParagraph: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "style"> & {
|
|
13
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
14
|
+
}> & string;
|
|
15
|
+
export declare const StyledToolbarForm: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
16
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
17
|
+
}> & string;
|
|
18
|
+
export declare const ReferencesContainer: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
19
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
20
|
+
}> & string;
|
|
21
|
+
export declare const StyledReferenceButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
22
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
23
|
+
}, {
|
|
16
24
|
$bgColor?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const StyledPanelPage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$background?: string;
|
|
22
|
-
$withMenu?: boolean;
|
|
23
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$padding" | "$isOpen" | "$background" | "$withMenu"> & {
|
|
25
|
+
}>> & string;
|
|
26
|
+
export declare const StyledPanelPage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
27
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
28
|
+
}, {
|
|
24
29
|
$isOpen?: boolean;
|
|
25
30
|
$padding?: string;
|
|
26
31
|
$background?: string;
|
|
27
32
|
$withMenu?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export declare const StyledClickableIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
33
|
+
}>> & string;
|
|
34
|
+
export declare const StyledClickableIconWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
35
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
36
|
+
}, {
|
|
30
37
|
$disabled?: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
}>> & string;
|
|
39
|
+
export declare const StyledOffCanvasPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
40
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
41
|
+
}, {
|
|
35
42
|
$isOpen: boolean;
|
|
36
43
|
$width?: string;
|
|
37
44
|
$mobileHeight?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, never>>> & string;
|
|
43
|
-
export declare const StyledOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$isOpen"> & {
|
|
44
|
-
$isOpen: boolean;
|
|
45
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$isOpen"> & {
|
|
45
|
+
}>> & string;
|
|
46
|
+
export declare const StyledOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
47
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
48
|
+
}, {
|
|
46
49
|
$isOpen: boolean;
|
|
47
|
-
}
|
|
48
|
-
export declare const StyledModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web",
|
|
49
|
-
|
|
50
|
+
}>> & string;
|
|
51
|
+
export declare const StyledModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
52
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
53
|
+
}> & string;
|
|
54
|
+
export declare const StyledResultTypeContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
55
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
56
|
+
}, {
|
|
50
57
|
$resultType: ResultTypes;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export declare const StyledTooltipItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
$marginTop?: string;
|
|
59
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color" | "$fontSize" | "$marginTop"> & {
|
|
58
|
+
}>> & string;
|
|
59
|
+
export declare const StyledTooltipSeparatorItem: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "style"> & {
|
|
60
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
61
|
+
}> & string;
|
|
62
|
+
export declare const StyledTooltipItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
63
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
64
|
+
}, {
|
|
60
65
|
$color?: TMColors;
|
|
61
66
|
$fontSize?: string;
|
|
62
67
|
$marginTop?: string;
|
|
63
|
-
}
|
|
64
|
-
export declare const StyledTooltipContainer: import("styled-components/dist/types").IStyledComponentBase<"web",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
}>> & string;
|
|
69
|
+
export declare const StyledTooltipContainer: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
70
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
71
|
+
}> & string;
|
|
72
|
+
export declare const StyledDraggableDiv: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
73
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
74
|
+
}> & string;
|
|
75
|
+
export declare const StyledBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
76
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
77
|
+
}, {
|
|
69
78
|
$backgroundColor: string;
|
|
70
|
-
}
|
|
71
|
-
export declare const StyledDxGridGroupHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
72
|
-
|
|
73
|
-
},
|
|
79
|
+
}>> & string;
|
|
80
|
+
export declare const StyledDxGridGroupHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
81
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
82
|
+
}, {
|
|
74
83
|
$backgroundColor?: string;
|
|
75
|
-
}
|
|
84
|
+
}>> & string;
|
|
76
85
|
export declare const cellRenderObjectIcon: (icon: any) => React.JSX.Element;
|
|
77
|
-
export declare const StyledChartOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
86
|
+
export declare const StyledChartOverlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
87
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
88
|
+
}, {
|
|
78
89
|
$backgroundColor?: string;
|
|
79
|
-
}
|
|
90
|
+
}>> & string;
|
|
91
|
+
export declare const StyledBtnLoadChart: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
92
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
93
|
+
}, {
|
|
80
94
|
$backgroundColor?: string;
|
|
81
|
-
}
|
|
82
|
-
export declare const
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
export declare const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
export declare const
|
|
95
|
+
}>> & string;
|
|
96
|
+
export declare const StyledFormButtonsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
97
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
98
|
+
}> & string;
|
|
99
|
+
export declare const StyledToolbarCardContainer: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
100
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
101
|
+
}> & string;
|
|
102
|
+
export declare const StyledSpinner: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
103
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
104
|
+
}> & string;
|
|
105
|
+
export declare const StyledLoadingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
106
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
107
|
+
}> & string;
|
|
108
|
+
export declare const StyledAnimatedComponentScaleColor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
109
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
110
|
+
}, {
|
|
92
111
|
$delay?: string;
|
|
93
112
|
$scale?: number;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
export declare const StyledAnimatedComponentOpacity: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$delay"> & {
|
|
99
|
-
$delay?: string;
|
|
100
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$delay"> & {
|
|
113
|
+
}>> & string;
|
|
114
|
+
export declare const StyledAnimatedComponentOpacity: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
115
|
+
style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
116
|
+
}, {
|
|
101
117
|
$delay?: string;
|
|
102
|
-
}
|
|
118
|
+
}>> & string;
|
|
@@ -3,6 +3,17 @@ import { ITMEditorBase } from './TMEditorBase';
|
|
|
3
3
|
export type ButtonColors = 'error' | 'warning' | 'success' | 'info' | 'primary' | 'secondary' | 'tertiary' | 'standard' | 'primaryOutline' | 'secondaryOutline' | 'tertiaryOutline' | 'errorOutline' | 'warningOutline' | 'successOutline' | 'infoOutline';
|
|
4
4
|
export type ButtonStyle = 'normal' | 'toolbar' | 'icon' | 'text' | 'advanced';
|
|
5
5
|
export type AdvancedButtonType = 'success' | 'error' | 'tertiary' | 'primary';
|
|
6
|
+
/** Azione secondaria mostrata nel dropdown "split button" (freccia a destra) */
|
|
7
|
+
export interface ITMButtonSecondaryAction {
|
|
8
|
+
/** Etichetta mostrata nella voce di menu */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Icona opzionale a sinistra della voce */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Callback al click della voce */
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
/** Disabilita la singola voce */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
6
17
|
export interface ITMButton extends ITMEditorBase {
|
|
7
18
|
color?: ButtonColors;
|
|
8
19
|
btnStyle?: ButtonStyle;
|
|
@@ -17,6 +28,8 @@ export interface ITMButton extends ITMEditorBase {
|
|
|
17
28
|
showTooltip?: boolean;
|
|
18
29
|
onClick?: VoidFunction;
|
|
19
30
|
onMouseDown?: (e: any) => any;
|
|
31
|
+
/** Azioni secondarie: se valorizzate, il bottone mostra una freccia a destra che apre un dropdown con queste azioni */
|
|
32
|
+
secondaryActions?: ITMButtonSecondaryAction[];
|
|
20
33
|
}
|
|
21
34
|
declare const TMButton: React.ForwardRefExoticComponent<ITMButton & React.RefAttributes<HTMLButtonElement>>;
|
|
22
35
|
export default TMButton;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState, forwardRef } from 'react';
|
|
2
|
+
import { useState, forwardRef, useRef, useEffect } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
|
-
import { getColor } from '../../helper';
|
|
5
|
+
import { getColor, IconChevronDown } from '../../helper';
|
|
5
6
|
import { FontSize, TMColors } from '../../utils/theme';
|
|
6
7
|
import TMTooltip from './TMTooltip';
|
|
7
8
|
const StyledNormalButton = styled.button.withConfig({ shouldForwardProp: prop => !['text'].includes(prop) }) `
|
|
@@ -149,10 +150,132 @@ const StyledAdvancedButtonText = styled.div `
|
|
|
149
150
|
border-top-right-radius: 10px;
|
|
150
151
|
border-bottom-right-radius: 10px;
|
|
151
152
|
padding: 5px;
|
|
153
|
+
padding-right: ${props => props.$reserveArrow ? '26px' : '5px'};
|
|
154
|
+
`;
|
|
155
|
+
const StyledSplitContainer = styled.div `
|
|
156
|
+
display: inline-flex;
|
|
157
|
+
align-items: stretch;
|
|
158
|
+
position: relative;
|
|
159
|
+
`;
|
|
160
|
+
const StyledSplitArrow = styled.button `
|
|
161
|
+
position: absolute;
|
|
162
|
+
right: 4px;
|
|
163
|
+
top: 50%;
|
|
164
|
+
transform: translateY(-50%);
|
|
165
|
+
z-index: 2;
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
width: 20px;
|
|
170
|
+
height: 20px;
|
|
171
|
+
padding: 0;
|
|
172
|
+
border: none;
|
|
173
|
+
border-radius: 6px;
|
|
174
|
+
cursor: ${props => props.$isDisabled ? 'default' : 'pointer'};
|
|
175
|
+
color: white;
|
|
176
|
+
background-color: rgba(255, 255, 255, 0.22);
|
|
177
|
+
transition: background-color ease 150ms;
|
|
178
|
+
&:hover { background-color: ${props => props.$isDisabled ? 'rgba(255, 255, 255, 0.22)' : 'rgba(255, 255, 255, 0.38)'}; }
|
|
179
|
+
& svg {
|
|
180
|
+
transition: transform ease 150ms;
|
|
181
|
+
transform: rotate(${props => props.$isOpen ? '180deg' : '0deg'});
|
|
182
|
+
}
|
|
183
|
+
`;
|
|
184
|
+
const StyledDropdown = styled.div `
|
|
185
|
+
position: fixed;
|
|
186
|
+
left: ${props => props.$left}px;
|
|
187
|
+
top: ${props => props.$top}px;
|
|
188
|
+
transform: translateY(-100%);
|
|
189
|
+
transform-origin: bottom left;
|
|
190
|
+
min-width: ${props => props.$minWidth}px;
|
|
191
|
+
background: #ffffff;
|
|
192
|
+
border-radius: 14px;
|
|
193
|
+
box-shadow: 0 10px 30px rgba(20, 40, 80, 0.20);
|
|
194
|
+
border: 1px solid rgba(74, 150, 210, 0.18);
|
|
195
|
+
padding: 5px;
|
|
196
|
+
z-index: 100000;
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
gap: 2px;
|
|
200
|
+
animation: tmSplitDropdownIn cubic-bezier(0.2, 0.8, 0.2, 1) 150ms;
|
|
201
|
+
@keyframes tmSplitDropdownIn {
|
|
202
|
+
from { opacity: 0; transform: translateY(calc(-100% + 8px)); }
|
|
203
|
+
to { opacity: 1; transform: translateY(-100%); }
|
|
204
|
+
}
|
|
205
|
+
`;
|
|
206
|
+
const StyledDropdownItem = styled.button `
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
gap: 9px;
|
|
210
|
+
width: 100%;
|
|
211
|
+
padding: 5px 9px;
|
|
212
|
+
border: none;
|
|
213
|
+
border-radius: 8px;
|
|
214
|
+
background: transparent;
|
|
215
|
+
text-align: left;
|
|
216
|
+
font-size: ${FontSize.defaultFontSize};
|
|
217
|
+
font-weight: 500;
|
|
218
|
+
color: ${props => props.$disabled ? '#b4b4b4' : '#2c3e50'};
|
|
219
|
+
cursor: ${props => props.$disabled ? 'default' : 'pointer'};
|
|
220
|
+
transition: background ease 150ms, color ease 150ms;
|
|
221
|
+
&:hover {
|
|
222
|
+
background: ${props => props.$disabled ? 'transparent' : 'linear-gradient(135deg, rgba(74, 150, 210, 0.16) 0%, rgba(37, 89, 165, 0.16) 100%)'};
|
|
223
|
+
color: ${props => props.$disabled ? '#b4b4b4' : '#2559A5'};
|
|
224
|
+
}
|
|
225
|
+
& > .tm-split-item-icon {
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
width: 22px;
|
|
230
|
+
height: 22px;
|
|
231
|
+
flex-shrink: 0;
|
|
232
|
+
border-radius: 6px;
|
|
233
|
+
background: rgba(74, 150, 210, 0.14);
|
|
234
|
+
color: #4A96D2;
|
|
235
|
+
transition: background ease 150ms, color ease 150ms;
|
|
236
|
+
}
|
|
237
|
+
&:hover > .tm-split-item-icon {
|
|
238
|
+
background: ${props => props.$disabled ? 'rgba(74, 150, 210, 0.14)' : '#4A96D2'};
|
|
239
|
+
color: ${props => props.$disabled ? '#4A96D2' : '#ffffff'};
|
|
240
|
+
}
|
|
152
241
|
`;
|
|
153
242
|
const TMButton = forwardRef((props, ref) => {
|
|
154
|
-
const { width, height, keyGesture, btnStyle = 'normal', advancedColor, advancedType = 'primary', color = 'primary', fontSize = FontSize.defaultFontSize, disabled = false, showTooltip = true, caption, icon, description, padding, elementStyle, onClick = () => { }, onMouseDown = () => { } } = props;
|
|
243
|
+
const { width, height, keyGesture, btnStyle = 'normal', advancedColor, advancedType = 'primary', color = 'primary', fontSize = FontSize.defaultFontSize, disabled = false, showTooltip = true, caption, icon, description, padding, elementStyle, onClick = () => { }, onMouseDown = () => { }, secondaryActions } = props;
|
|
155
244
|
const [isHovered, setIsHovered] = useState(false);
|
|
245
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
246
|
+
const [dropdownPos, setDropdownPos] = useState({ left: 0, top: 0, minWidth: 200 });
|
|
247
|
+
const splitContainerRef = useRef(null);
|
|
248
|
+
const dropdownRef = useRef(null);
|
|
249
|
+
const hasSecondaryActions = !!secondaryActions && secondaryActions.length > 0;
|
|
250
|
+
useEffect(() => {
|
|
251
|
+
if (!isDropdownOpen)
|
|
252
|
+
return;
|
|
253
|
+
const handlePointerDown = (e) => {
|
|
254
|
+
const target = e.target;
|
|
255
|
+
if (splitContainerRef.current?.contains(target) || dropdownRef.current?.contains(target))
|
|
256
|
+
return;
|
|
257
|
+
setIsDropdownOpen(false);
|
|
258
|
+
};
|
|
259
|
+
const handleKeyDown = (e) => { if (e.key === 'Escape')
|
|
260
|
+
setIsDropdownOpen(false); };
|
|
261
|
+
document.addEventListener('mousedown', handlePointerDown);
|
|
262
|
+
document.addEventListener('touchstart', handlePointerDown);
|
|
263
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
264
|
+
return () => {
|
|
265
|
+
document.removeEventListener('mousedown', handlePointerDown);
|
|
266
|
+
document.removeEventListener('touchstart', handlePointerDown);
|
|
267
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
268
|
+
};
|
|
269
|
+
}, [isDropdownOpen]);
|
|
270
|
+
const toggleDropdown = () => {
|
|
271
|
+
if (disabled)
|
|
272
|
+
return;
|
|
273
|
+
if (!isDropdownOpen && splitContainerRef.current) {
|
|
274
|
+
const rect = splitContainerRef.current.getBoundingClientRect();
|
|
275
|
+
setDropdownPos({ left: rect.left, top: rect.top - 6, minWidth: Math.max(rect.width, 200) });
|
|
276
|
+
}
|
|
277
|
+
setIsDropdownOpen(prev => !prev);
|
|
278
|
+
};
|
|
156
279
|
const renderedButton = () => {
|
|
157
280
|
if (btnStyle === 'normal') {
|
|
158
281
|
return (_jsx(StyledNormalButton, { ref: ref, width: width, height: height, color: color, caption: caption, disabled: disabled, fontSize: fontSize, onClick: onClick, onMouseDown: (e) => !disabled && onMouseDown?.(e), children: caption }));
|
|
@@ -164,7 +287,7 @@ const TMButton = forwardRef((props, ref) => {
|
|
|
164
287
|
return (_jsx(StyledIconButton, { ref: ref, color: color, caption: caption, disabled: disabled, fontSize: fontSize, padding: padding, onClick: onClick, onMouseDown: (e) => !disabled && onMouseDown?.(e), children: icon }));
|
|
165
288
|
}
|
|
166
289
|
else if (btnStyle === 'advanced') {
|
|
167
|
-
return (_jsxs(StyledAdvancedButton, { ref: ref, "$width": width ?? '90px', "$height": height ?? '30px', onMouseOver: () => !disabled && setIsHovered(true), onMouseOut: () => setIsHovered(false), "$isDisabled": disabled, "$isPrimaryOutline": advancedType === 'primary' && (advancedColor === 'primaryOutline' || color === 'primaryOutline'), onClick: () => !disabled && onClick?.(), onMouseDown: (e) => !disabled && onMouseDown?.(e), children: [_jsx(StyledAdvancedButtonIcon, { "$color": advancedColor, "$isVisible": isHovered, "$isDisabled": disabled, "$type": advancedType, children: icon }), _jsx(StyledAdvancedButtonText, { "$color": advancedColor, "$isDisabled": disabled, "$type": advancedType, children: caption })] }));
|
|
290
|
+
return (_jsxs(StyledAdvancedButton, { ref: ref, "$width": width ?? '90px', "$height": height ?? '30px', onMouseOver: () => !disabled && setIsHovered(true), onMouseOut: () => setIsHovered(false), "$isDisabled": disabled, "$isPrimaryOutline": advancedType === 'primary' && (advancedColor === 'primaryOutline' || color === 'primaryOutline'), onClick: () => !disabled && onClick?.(), onMouseDown: (e) => !disabled && onMouseDown?.(e), children: [_jsx(StyledAdvancedButtonIcon, { "$color": advancedColor, "$isVisible": isHovered, "$isDisabled": disabled, "$type": advancedType, children: icon }), _jsx(StyledAdvancedButtonText, { "$color": advancedColor, "$isDisabled": disabled, "$type": advancedType, "$reserveArrow": hasSecondaryActions, children: caption })] }));
|
|
168
291
|
}
|
|
169
292
|
else {
|
|
170
293
|
return (_jsx(StyledTextButton, { ref: ref, color: color, caption: caption, disabled: disabled, fontSize: fontSize, onClick: onClick, onMouseDown: (e) => !disabled && onMouseDown?.(e), children: caption }));
|
|
@@ -175,6 +298,15 @@ const TMButton = forwardRef((props, ref) => {
|
|
|
175
298
|
_jsxs(_Fragment, { children: [caption &&
|
|
176
299
|
_jsx(StyledButtonTooltipHeader, { "$description": description, children: _jsx(StyledButtonTooltipItem, { "$color": color, children: caption }) }), description && _jsx(StyledButtonTooltipItem, { children: description })] }));
|
|
177
300
|
};
|
|
178
|
-
|
|
301
|
+
const buttonWithTooltip = showTooltip
|
|
302
|
+
? _jsx(TMTooltip, { hideAfterDelay: true, content: renderTooltip(), children: renderedButton() })
|
|
303
|
+
: renderedButton();
|
|
304
|
+
const renderSplitButton = () => (_jsxs(StyledSplitContainer, { ref: splitContainerRef, children: [buttonWithTooltip, _jsx(StyledSplitArrow, { type: 'button', "$isDisabled": disabled, "$isOpen": isDropdownOpen, "aria-haspopup": 'menu', "aria-expanded": isDropdownOpen, onClick: (e) => { e.stopPropagation(); toggleDropdown(); }, onMouseDown: (e) => e.stopPropagation(), children: _jsx(IconChevronDown, { fontSize: 14 }) }), isDropdownOpen && createPortal(_jsx(StyledDropdown, { ref: dropdownRef, role: 'menu', "$left": dropdownPos.left, "$top": dropdownPos.top, "$minWidth": dropdownPos.minWidth, children: secondaryActions.map((action, idx) => (_jsxs(StyledDropdownItem, { type: 'button', role: 'menuitem', "$disabled": action.disabled, disabled: action.disabled, onClick: () => {
|
|
305
|
+
if (action.disabled)
|
|
306
|
+
return;
|
|
307
|
+
setIsDropdownOpen(false);
|
|
308
|
+
action.onClick?.();
|
|
309
|
+
}, children: [action.icon && _jsx("span", { className: 'tm-split-item-icon', children: action.icon }), _jsx("span", { children: action.name })] }, `${action.name}-${idx}`))) }), document.body)] }));
|
|
310
|
+
return (_jsx("div", { style: elementStyle, children: hasSecondaryActions ? renderSplitButton() : buttonWithTooltip }));
|
|
179
311
|
});
|
|
180
312
|
export default TMButton;
|
|
@@ -46,6 +46,8 @@ export interface TMDataGridProps<T> extends IDataGridOptions {
|
|
|
46
46
|
showSearchPanel?: boolean;
|
|
47
47
|
/** Show the group panel */
|
|
48
48
|
showGroupPanel?: boolean;
|
|
49
|
+
/** Rende il paginatore compatto (meno alto, font e pulsanti ridotti, page numbers sostituiti da "pagina / totale"): utile quando la griglia è dentro pannelli bassi */
|
|
50
|
+
compactPager?: boolean;
|
|
49
51
|
/** Counter configuration */
|
|
50
52
|
counterConfig?: ITMCounterContainerProps;
|
|
51
53
|
/** Master Detail */
|