devexpress-reporting-react 24.1.2-beta → 24.1.3
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/README.md +1 -1
- package/core/options-manager.js +1 -2
- package/dx-report-designer/DxReportDesigner.js +4 -3
- package/dx-report-designer/index.d.ts +4 -3
- package/dx-report-designer/index.js +4 -3
- package/dx-report-designer/options/Callbacks.d.ts +34 -33
- package/dx-report-designer/options/Callbacks.js +2 -1
- package/dx-report-designer/options/DesignerModelSettings.js +2 -2
- package/dx-report-designer/options/ParameterEditingSettings.d.ts +2 -2
- package/dx-report-designer/options/ParameterEditingSettings.js +4 -4
- package/dx-report-designer/options/RequestOptions.d.ts +8 -0
- package/dx-report-designer/options/{RequestSettings.js → RequestOptions.js} +4 -4
- package/dx-report-viewer/DxReportViewer.d.ts +6 -2
- package/dx-report-viewer/DxReportViewer.js +30 -14
- package/dx-report-viewer/components/analytics/Actions/Actions.js +5 -8
- package/dx-report-viewer/components/analytics/Designer/Designer.js +2 -3
- package/dx-report-viewer/components/analytics/Properties/CollectionEditor/CollectionEditor.js +1 -1
- package/dx-report-viewer/components/analytics/Properties/Editors/EditorBase/EditorBase.js +1 -2
- package/dx-report-viewer/components/analytics/Properties/Editors/SelectBox/SelectBoxEditor.js +5 -8
- package/dx-report-viewer/components/analytics/Properties/Editors/editorHooks.js +1 -1
- package/dx-report-viewer/components/analytics/TabPanel/TabPanel.js +1 -1
- package/dx-report-viewer/components/analytics/Widgets/Treelist/Treelist.js +2 -4
- package/dx-report-viewer/components/core/LazyTemplate/LazyTemplate.js +2 -4
- package/dx-report-viewer/components/core/Template/Template.js +2 -4
- package/dx-report-viewer/components/core/TemplateEngineProvider/TemplateEngineProvider.js +1 -1
- package/dx-report-viewer/components/reporting/DocumentMap/DocumentMap.js +2 -3
- package/dx-report-viewer/components/reporting/Editing/CharacterComb/CharacterComb.js +10 -3
- package/dx-report-viewer/components/reporting/Editing/ExportTool/ExportTool.js +1 -1
- package/dx-report-viewer/components/reporting/Editing/TextField/Container/EditingFieldContainer.js +1 -12
- package/dx-report-viewer/components/reporting/Mobile/Actions/MobileActionsExport/MobileActionsExport.js +1 -1
- package/dx-report-viewer/components/reporting/Mobile/Gallery/MobileGallery.js +4 -2
- package/dx-report-viewer/components/reporting/Mobile/Parameters/MobileParametersDateRange/MobileParametersDateRange.js +1 -1
- package/dx-report-viewer/components/reporting/Mobile/Parameters/MobileParametersPopup/MobileParametersPopup.js +1 -2
- package/dx-report-viewer/components/reporting/Mobile/Search/MobileSearch.js +1 -1
- package/dx-report-viewer/components/reporting/ParametersPanel/DateRange/DateRange/DateRange.js +1 -1
- package/dx-report-viewer/components/reporting/ParametersPanel/DateRange/Mobile/DateRangeMobile.js +1 -2
- package/dx-report-viewer/components/reporting/ParametersPanel/DateRange/PopupContainer/PopupContainer.js +1 -2
- package/dx-report-viewer/components/reporting/ParametersPanel/Editor/Editor/Editor.js +1 -2
- package/dx-report-viewer/components/reporting/ParametersPanel/MultiValue/MultiValue/MultiValue.js +5 -6
- package/dx-report-viewer/components/reporting/ReportPreview/Breadcrumbs/Breadcrumbs.js +6 -3
- package/dx-report-viewer/components/reporting/ReportPreview/BrickClickable/BrickClickable.js +2 -2
- package/dx-report-viewer/components/reporting/ReportPreview/ProgressBar/ProgressBar.js +1 -1
- package/dx-report-viewer/components/reporting/ReportPreview/Surface/Surface.js +1 -2
- package/dx-report-viewer/components/reporting/Search/Search.js +1 -2
- package/dx-report-viewer/components/reporting/Toolbar/Pager/Pager.js +5 -2
- package/dx-report-viewer/components/reporting/Widgets/PictureEditor/Painter/Painter.js +5 -7
- package/dx-report-viewer/components/reporting/Widgets/PictureEditor/PictureEditor.js +3 -5
- package/dx-report-viewer/core/processStyles.d.ts +1 -0
- package/dx-report-viewer/core/processStyles.js +9 -0
- package/dx-report-viewer/core/template-engine.js +1 -1
- package/dx-report-viewer/hooks/dxEllipsisEditor.js +1 -1
- package/dx-report-viewer/hooks/dxMutationObserver.d.ts +1 -1
- package/dx-report-viewer/hooks/dxMutationObserver.js +2 -2
- package/dx-report-viewer/hooks/dxResizable.js +3 -3
- package/dx-report-viewer/index.d.ts +4 -3
- package/dx-report-viewer/index.js +2 -2
- package/dx-report-viewer/options/RequestOptions.d.ts +8 -0
- package/dx-report-viewer/options/{RequestSettings.js → RequestOptions.js} +5 -5
- package/package.json +4 -4
- package/dx-report-designer/options/RequestSettings.d.ts +0 -8
- package/dx-report-viewer/options/RequestSettings.d.ts +0 -8
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Take a look at the [DevExpress Reporting web demos]
|
|
|
23
23
|
|
|
24
24
|
## License
|
|
25
25
|
|
|
26
|
-
A commercial license for DevExpress
|
|
26
|
+
A [commercial license](https://www.devexpress.com/support/eulas/) for the DevExpress Reporting Web UI components (Document Viewer, Report Designer) is required to use this package. Please review [the Reporting section on this page](https://www.devexpress.com/subscriptions/reporting/web/#Pricing) to determine which subscription includes a license for the Web UI components you plan to use in your application.
|
|
27
27
|
|
|
28
28
|
## Support
|
|
29
29
|
|
package/core/options-manager.js
CHANGED
|
@@ -8,8 +8,7 @@ const getComponentOptions = (props, propTypes, defaultProps) => {
|
|
|
8
8
|
}, {});
|
|
9
9
|
};
|
|
10
10
|
const getControlOptions = (props, propTypes, defaultProps, validChildComponents) => {
|
|
11
|
-
|
|
12
|
-
const controlOptions = (_a = getComponentOptions(props, propTypes, defaultProps)) !== null && _a !== void 0 ? _a : {};
|
|
11
|
+
const controlOptions = getComponentOptions(props, propTypes, defaultProps) ?? {};
|
|
13
12
|
const childReactElements = React.Children.toArray(props.children)
|
|
14
13
|
.filter(x => React.isValidElement(x));
|
|
15
14
|
validChildComponents && Object.keys(validChildComponents).forEach(optionsComponentkey => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Callbacks from './options/Callbacks';
|
|
4
|
-
import
|
|
4
|
+
import RequestOptions from './options/RequestOptions';
|
|
5
5
|
import DesignerModelSettings from './options/DesignerModelSettings';
|
|
6
6
|
import OptionsManager from '../core/options-manager';
|
|
7
7
|
import { validChildComponents as designerModelSettingsValidChildren } from './options/DesignerModelSettings';
|
|
@@ -9,7 +9,7 @@ import { JSReportDesignerBinding } from 'devexpress-reporting/dx-reportdesigner'
|
|
|
9
9
|
import * as ko from 'knockout';
|
|
10
10
|
const validChildComponents = {
|
|
11
11
|
'callbacks': { component: Callbacks },
|
|
12
|
-
'requestOptions': { component:
|
|
12
|
+
'requestOptions': { component: RequestOptions },
|
|
13
13
|
'designerModelSettings': { component: DesignerModelSettings, children: designerModelSettingsValidChildren },
|
|
14
14
|
};
|
|
15
15
|
const DxReportDesigner = (props) => {
|
|
@@ -21,7 +21,7 @@ const DxReportDesigner = (props) => {
|
|
|
21
21
|
const binding = new JSReportDesignerBinding(options, OptionsManager.getEventRaiser(callbacks, () => binding.sender));
|
|
22
22
|
binding.applyBindings(designerRef.current);
|
|
23
23
|
return () => {
|
|
24
|
-
ko.cleanNode(designerRef.current);
|
|
24
|
+
designerRef.current && ko.cleanNode(designerRef.current);
|
|
25
25
|
};
|
|
26
26
|
}, [props]);
|
|
27
27
|
return (React.createElement("div", { ref: designerRef, className: props.cssClass, style: { width: props.width || DxReportDesignerDefaultProps.width, height: props.height || DxReportDesignerDefaultProps.height } },
|
|
@@ -33,6 +33,7 @@ DxReportDesigner.propTypes = {
|
|
|
33
33
|
width: PropTypes.string,
|
|
34
34
|
cssClass: PropTypes.string,
|
|
35
35
|
developmentMode: PropTypes.bool,
|
|
36
|
+
reportUrl: PropTypes.string,
|
|
36
37
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
37
38
|
};
|
|
38
39
|
const DxReportDesignerDefaultProps = {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import DxReportDesigner from './DxReportDesigner';
|
|
2
2
|
import Callbacks from './options/Callbacks';
|
|
3
|
-
import
|
|
3
|
+
import DataSourceSettings from './options/DataSourceSettings';
|
|
4
4
|
import DesignerModelSettings from './options/DesignerModelSettings';
|
|
5
5
|
import PreviewSettings from './options/PreviewSettings';
|
|
6
|
-
import
|
|
6
|
+
import RequestOptions from './options/RequestOptions';
|
|
7
7
|
import WizardSettings from './options/WizardSettings';
|
|
8
|
-
|
|
8
|
+
import ParameterEditingSettings from './options/ParameterEditingSettings';
|
|
9
|
+
export { Callbacks, DataSourceSettings, DesignerModelSettings, PreviewSettings, RequestOptions, WizardSettings, ParameterEditingSettings, DxReportDesigner };
|
|
9
10
|
export default DxReportDesigner;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import DxReportDesigner from './DxReportDesigner';
|
|
2
2
|
import Callbacks from './options/Callbacks';
|
|
3
|
-
import
|
|
3
|
+
import DataSourceSettings from './options/DataSourceSettings';
|
|
4
4
|
import DesignerModelSettings from './options/DesignerModelSettings';
|
|
5
5
|
import PreviewSettings from './options/PreviewSettings';
|
|
6
|
-
import
|
|
6
|
+
import RequestOptions from './options/RequestOptions';
|
|
7
7
|
import WizardSettings from './options/WizardSettings';
|
|
8
|
-
|
|
8
|
+
import ParameterEditingSettings from './options/ParameterEditingSettings';
|
|
9
|
+
export { Callbacks, DataSourceSettings, DesignerModelSettings, PreviewSettings, RequestOptions, WizardSettings, ParameterEditingSettings, DxReportDesigner };
|
|
9
10
|
export default DxReportDesigner;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
type CallbacksPropsType = {
|
|
3
|
-
CustomizeElements?: () => void;
|
|
4
|
-
ExitDesigner?: () => void;
|
|
5
|
-
ReportSaving?: () => void;
|
|
6
|
-
ReportSaved?: () => void;
|
|
7
|
-
ReportOpened?: () => void;
|
|
8
|
-
ReportOpening?: () => void;
|
|
9
|
-
TabChanged?: () => void;
|
|
10
|
-
ReportTabClosing?: () => void;
|
|
11
|
-
ReportTabClosed?: () => void;
|
|
12
|
-
ComponentAdded?: () => void;
|
|
13
|
-
CustomizeParameterEditors?: () => void;
|
|
14
|
-
|
|
15
|
-
CustomizeSaveDialog?: () => void;
|
|
16
|
-
CustomizeSaveAsDialog?: () => void;
|
|
17
|
-
CustomizeOpenDialog?: () => void;
|
|
18
|
-
CustomizeToolbox?: () => void;
|
|
19
|
-
CustomizeFieldListActions?: () => void;
|
|
20
|
-
CustomizeMenuActions?: () => void;
|
|
21
|
-
CustomizeLocalization?: () => void;
|
|
22
|
-
OnInitializing?: () => void;
|
|
23
|
-
BeforeRender?: () => void;
|
|
24
|
-
OnServerError?: () => void;
|
|
25
|
-
CustomizeWizard?: () => void;
|
|
26
|
-
PreviewClick?: () => void;
|
|
27
|
-
PreviewCustomizeElements?: () => void;
|
|
28
|
-
PreviewCustomizeMenuActions?: () => void;
|
|
29
|
-
PreviewEditingFieldChanged?: () => void;
|
|
30
|
-
PreviewDocumentReady?: () => void;
|
|
31
|
-
PreviewParametersReset?: () => void;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
CustomizeElements?: (args: any) => void;
|
|
4
|
+
ExitDesigner?: (args: any) => void;
|
|
5
|
+
ReportSaving?: (args: any) => void;
|
|
6
|
+
ReportSaved?: (args: any) => void;
|
|
7
|
+
ReportOpened?: (args: any) => void;
|
|
8
|
+
ReportOpening?: (args: any) => void;
|
|
9
|
+
TabChanged?: (args: any) => void;
|
|
10
|
+
ReportTabClosing?: (args: any) => void;
|
|
11
|
+
ReportTabClosed?: (args: any) => void;
|
|
12
|
+
ComponentAdded?: (args: any) => void;
|
|
13
|
+
CustomizeParameterEditors?: (args: any) => void;
|
|
14
|
+
CustomizeParameterProperties?: (args: any) => void;
|
|
15
|
+
CustomizeSaveDialog?: (args: any) => void;
|
|
16
|
+
CustomizeSaveAsDialog?: (args: any) => void;
|
|
17
|
+
CustomizeOpenDialog?: (args: any) => void;
|
|
18
|
+
CustomizeToolbox?: (args: any) => void;
|
|
19
|
+
CustomizeFieldListActions?: (args: any) => void;
|
|
20
|
+
CustomizeMenuActions?: (args: any) => void;
|
|
21
|
+
CustomizeLocalization?: (args: any) => void;
|
|
22
|
+
OnInitializing?: (args: any) => void;
|
|
23
|
+
BeforeRender?: (args: any) => void;
|
|
24
|
+
OnServerError?: (args: any) => void;
|
|
25
|
+
CustomizeWizard?: (args: any) => void;
|
|
26
|
+
PreviewClick?: (args: any) => void;
|
|
27
|
+
PreviewCustomizeElements?: (args: any) => void;
|
|
28
|
+
PreviewCustomizeMenuActions?: (args: any) => void;
|
|
29
|
+
PreviewEditingFieldChanged?: (args: any) => void;
|
|
30
|
+
PreviewDocumentReady?: (args: any) => void;
|
|
31
|
+
PreviewParametersReset?: (args: any) => void;
|
|
32
|
+
PreviewCustomizeParameterLookUpSource?: (args: any) => void;
|
|
33
|
+
PreviewParametersInitialized?: (args: any) => void;
|
|
34
|
+
PreviewCustomizeExportOptions?: (args: any) => void;
|
|
35
|
+
PreviewParametersSubmitted?: (args: any) => void;
|
|
36
|
+
PreviewOnExport?: (args: any) => void;
|
|
36
37
|
};
|
|
37
38
|
declare const Callbacks: FunctionComponent<CallbacksPropsType>;
|
|
38
39
|
export default Callbacks;
|
|
@@ -13,7 +13,7 @@ Callbacks.propTypes = {
|
|
|
13
13
|
ReportTabClosed: PropTypes.func,
|
|
14
14
|
ComponentAdded: PropTypes.func,
|
|
15
15
|
CustomizeParameterEditors: PropTypes.func,
|
|
16
|
-
|
|
16
|
+
CustomizeParameterProperties: PropTypes.func,
|
|
17
17
|
CustomizeSaveDialog: PropTypes.func,
|
|
18
18
|
CustomizeSaveAsDialog: PropTypes.func,
|
|
19
19
|
CustomizeOpenDialog: PropTypes.func,
|
|
@@ -31,6 +31,7 @@ Callbacks.propTypes = {
|
|
|
31
31
|
PreviewEditingFieldChanged: PropTypes.func,
|
|
32
32
|
PreviewDocumentReady: PropTypes.func,
|
|
33
33
|
PreviewParametersReset: PropTypes.func,
|
|
34
|
+
PreviewCustomizeParameterLookUpSource: PropTypes.func,
|
|
34
35
|
PreviewParametersInitialized: PropTypes.func,
|
|
35
36
|
PreviewCustomizeExportOptions: PropTypes.func,
|
|
36
37
|
PreviewParametersSubmitted: PropTypes.func,
|
|
@@ -3,12 +3,12 @@ import PreviewSettings from './PreviewSettings';
|
|
|
3
3
|
import WizardSettings from './WizardSettings';
|
|
4
4
|
import DataSourceSettings from './DataSourceSettings';
|
|
5
5
|
import { validChildComponents as reportPreviewValidChildrenComponents } from './PreviewSettings';
|
|
6
|
-
import
|
|
6
|
+
import ParameterEditingSettings from './ParameterEditingSettings';
|
|
7
7
|
export const validChildComponents = {
|
|
8
8
|
'reportPreviewSettings': { component: PreviewSettings, children: reportPreviewValidChildrenComponents },
|
|
9
9
|
'wizardSettings': { component: WizardSettings },
|
|
10
10
|
'dataSourceSettings': { component: DataSourceSettings },
|
|
11
|
-
'parameterEditingSettings': { component:
|
|
11
|
+
'parameterEditingSettings': { component: ParameterEditingSettings },
|
|
12
12
|
};
|
|
13
13
|
const DesignerModelSettings = () => null;
|
|
14
14
|
DesignerModelSettings.displayName = 'DxReportDesignerDesignerModelSettings';
|
|
@@ -6,5 +6,5 @@ type ParameterEditingSettingsPropsType = {
|
|
|
6
6
|
allowEditParameterGroups?: boolean;
|
|
7
7
|
allowEditParameterSeparators?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const
|
|
10
|
-
export default
|
|
9
|
+
declare const ParameterEditingSettings: FunctionComponent<ParameterEditingSettingsPropsType>;
|
|
10
|
+
export default ParameterEditingSettings;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const ParameterEditingSettings = () => null;
|
|
3
|
+
ParameterEditingSettings.displayName = 'DxReportDesignerParameterEditingSettings';
|
|
4
|
+
ParameterEditingSettings.propTypes = {
|
|
5
5
|
allowReorderParameters: PropTypes.bool,
|
|
6
6
|
allowEditParameterCollection: PropTypes.bool,
|
|
7
7
|
allowEditProperties: PropTypes.bool,
|
|
8
8
|
allowEditParameterGroups: PropTypes.bool,
|
|
9
9
|
allowEditParameterSeparators: PropTypes.bool,
|
|
10
10
|
};
|
|
11
|
-
export default
|
|
11
|
+
export default ParameterEditingSettings;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export type RequestOptionsPropsType = {
|
|
3
|
+
getDesignerModelAction: string;
|
|
4
|
+
getLocalizationAction?: string;
|
|
5
|
+
host: string;
|
|
6
|
+
};
|
|
7
|
+
declare const RequestOptions: FunctionComponent<RequestOptionsPropsType>;
|
|
8
|
+
export default RequestOptions;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const RequestOptions = () => null;
|
|
3
|
+
RequestOptions.displayName = 'DxReportDesignerRequestOptions';
|
|
4
|
+
RequestOptions.propTypes = {
|
|
5
5
|
getDesignerModelAction: PropTypes.string.isRequired,
|
|
6
6
|
getLocalizationAction: PropTypes.string,
|
|
7
7
|
host: PropTypes.string.isRequired
|
|
8
8
|
};
|
|
9
|
-
export default
|
|
9
|
+
export default RequestOptions;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { JSReportViewer } from 'devexpress-reporting/viewer/binding/jsReportViewer';
|
|
2
3
|
import { TemplateEngine } from './core/template-engine';
|
|
3
4
|
import '@devexpress/analytics-core/dx-analytics-core-svg-templates';
|
|
4
5
|
import 'devexpress-reporting/dx-reporting-svg-templates';
|
|
5
|
-
type
|
|
6
|
+
export type DxReportViewerProps = {
|
|
6
7
|
height?: string;
|
|
7
8
|
width?: string;
|
|
8
9
|
cssClass?: string;
|
|
@@ -15,5 +16,8 @@ type DxReportViewerPropsType = {
|
|
|
15
16
|
developmentMode?: boolean;
|
|
16
17
|
children?: React.ReactNode;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
export type DxReportViewerRef = {
|
|
20
|
+
instance: () => JSReportViewer;
|
|
21
|
+
};
|
|
22
|
+
declare const DxReportViewer: React.ForwardRefExoticComponent<DxReportViewerProps & React.RefAttributes<DxReportViewerRef>>;
|
|
19
23
|
export default DxReportViewer;
|
|
@@ -5,7 +5,7 @@ import ExportSettings from './options/ExportSettings';
|
|
|
5
5
|
import MobileModeSettings from './options/MobileModeSettings';
|
|
6
6
|
import ProgressBarSettings from './options/ProgressBarSettings';
|
|
7
7
|
import RemoteSettings from './options/RemoteSettings';
|
|
8
|
-
import
|
|
8
|
+
import RequestOptions from './options/RequestOptions';
|
|
9
9
|
import SearchSettings from './options/SearchSettings';
|
|
10
10
|
import TabPanelSettings from './options/TabPanelSettings';
|
|
11
11
|
import OptionsManager from '../core/options-manager';
|
|
@@ -23,26 +23,38 @@ const validChildComponents = {
|
|
|
23
23
|
'mobileModeSettings': { component: MobileModeSettings },
|
|
24
24
|
'progressBarSettings': { component: ProgressBarSettings },
|
|
25
25
|
'remoteSettings': { component: RemoteSettings },
|
|
26
|
-
'requestOptions': { component:
|
|
26
|
+
'requestOptions': { component: RequestOptions },
|
|
27
27
|
'searchSettings': { component: SearchSettings },
|
|
28
28
|
'tabPanelSettings': { component: TabPanelSettings },
|
|
29
29
|
};
|
|
30
|
-
const DxReportViewer = (props) => {
|
|
30
|
+
const DxReportViewer = React.forwardRef(({ reportUrl, ...props }, ref) => {
|
|
31
31
|
const viewerRef = React.useRef(null);
|
|
32
32
|
const [viewModel, setViewModel] = React.useState(null);
|
|
33
|
+
const [viewerBinding, setViewerBinding] = React.useState(null);
|
|
34
|
+
React.useImperativeHandle(ref, () => ({
|
|
35
|
+
instance() {
|
|
36
|
+
return viewerBinding?.sender;
|
|
37
|
+
}
|
|
38
|
+
}), [viewerBinding]);
|
|
33
39
|
viewModelGeneratorSettings.ensureChangesImmutable = false;
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
if (viewerBinding && viewModel) {
|
|
42
|
+
viewerBinding.sender.OpenReport(reportUrl);
|
|
43
|
+
setViewModel({ ...viewModel });
|
|
44
|
+
}
|
|
45
|
+
}, [reportUrl]);
|
|
34
46
|
React.useEffect(() => {
|
|
35
47
|
let disposeViewModelSubscription;
|
|
36
48
|
const updateViewModel = (model) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
setViewModel(Object.assign({}, viewModel));
|
|
49
|
+
const viewModel = model.GetPreviewModel()?.getViewModel();
|
|
50
|
+
setViewModel({ ...viewModel });
|
|
40
51
|
disposeViewModelSubscription && disposeViewModelSubscription();
|
|
41
|
-
disposeViewModelSubscription =
|
|
52
|
+
disposeViewModelSubscription = viewModel?._viewModelEvents?.on(ViewModelChangedEvent, () => setViewModel({ ...viewModel }));
|
|
42
53
|
};
|
|
43
|
-
const controlOptions = OptionsManager.getControlOptions(props, DxReportViewer.propTypes, DxReportViewerDefaultProps, validChildComponents);
|
|
44
|
-
const binding = new JSReportViewerBinding(
|
|
54
|
+
const controlOptions = OptionsManager.getControlOptions({ ...props, reportUrl }, DxReportViewer.propTypes, DxReportViewerDefaultProps, validChildComponents);
|
|
55
|
+
const binding = new JSReportViewerBinding({ ...controlOptions, callbacks: {} }, OptionsManager.getEventRaiser(controlOptions.callbacks, () => binding.sender), false);
|
|
45
56
|
binding.applyBindings(viewerRef.current);
|
|
57
|
+
setViewerBinding(binding);
|
|
46
58
|
const model = binding.sender;
|
|
47
59
|
updateViewModel(model);
|
|
48
60
|
const disposeModelSubscription = model.events.on('propertyChanged', (args) => {
|
|
@@ -51,16 +63,20 @@ const DxReportViewer = (props) => {
|
|
|
51
63
|
}
|
|
52
64
|
});
|
|
53
65
|
return () => {
|
|
54
|
-
binding.dispose();
|
|
55
66
|
disposeModelSubscription && disposeModelSubscription();
|
|
56
67
|
disposeViewModelSubscription && disposeViewModelSubscription();
|
|
68
|
+
setViewModel(null);
|
|
69
|
+
setViewerBinding(null);
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
binding && binding.dispose();
|
|
72
|
+
});
|
|
57
73
|
};
|
|
58
|
-
}, [
|
|
74
|
+
}, []);
|
|
59
75
|
return (React.createElement(TemplateEngineProvider, { templateEngine: props.templateEngine },
|
|
60
|
-
React.createElement(AccessibilitySettingsProvider, { value: { accessibilityCompliant: viewModel
|
|
61
|
-
React.createElement("div", { ref: viewerRef, className: props.cssClass, style: { width: props.width || DxReportViewerDefaultProps.width, height: DxReportViewerDefaultProps.height } },
|
|
76
|
+
React.createElement(AccessibilitySettingsProvider, { value: { accessibilityCompliant: !!viewModel?.accessibilityCompliant } },
|
|
77
|
+
React.createElement("div", { ref: viewerRef, className: props.cssClass, style: { width: props.width || DxReportViewerDefaultProps.width, height: props.height || DxReportViewerDefaultProps.height } },
|
|
62
78
|
React.createElement("div", { className: "dx-designer" }, !!viewModel && React.createElement(Template, { template: "dx-designer", data: viewModel }))))));
|
|
63
|
-
};
|
|
79
|
+
});
|
|
64
80
|
DxReportViewer.displayName = 'DxReportViewer';
|
|
65
81
|
DxReportViewer.propTypes = {
|
|
66
82
|
height: PropTypes.string,
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Template from '../../core/Template';
|
|
3
|
-
const DefaultAction = ({ action }) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
React.createElement(Template, { template: action.image.templateName, data: null })),
|
|
9
|
-
React.createElement("div", { className: "dxrd-toolbar-item-separator dxd-toolbar-separator-color dxd-border-secondary", hidden: !action.hasSeparator }))));
|
|
10
|
-
};
|
|
3
|
+
const DefaultAction = ({ action }) => (React.createElement("div", { style: { display: action.visible ? '' : 'none' }, className: `dxrd-toolbar-item ${action.actionClass}` },
|
|
4
|
+
React.createElement("div", { role: "button", className: "dx-accessibility-toolbar-item dx-accessibility-focus-border-accented", "aria-label": action.block?.attr['aria-label'], "aria-disabled": action.block?.attr['aria-disabled'], "aria-pressed": action.block?.attr['aria-pressed'] },
|
|
5
|
+
React.createElement("div", { className: action.image.class, title: action.displayText, onClick: action.click },
|
|
6
|
+
React.createElement(Template, { template: action.image.templateName, data: null })),
|
|
7
|
+
React.createElement("div", { className: "dxrd-toolbar-item-separator dxd-toolbar-separator-color dxd-border-secondary", hidden: !action.hasSeparator }))));
|
|
11
8
|
const Action = ({ action }) => {
|
|
12
9
|
if (!action.templateName)
|
|
13
10
|
return React.createElement(DefaultAction, { action: action });
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Template from '../../core/Template';
|
|
3
3
|
const Designer = ({ data }) => {
|
|
4
|
-
var _a, _b;
|
|
5
4
|
const rootElt = React.useRef();
|
|
6
5
|
const [surfaceClassName, setSurfaceClassName] = React.useState('');
|
|
7
6
|
React.useEffect(() => {
|
|
@@ -10,8 +9,8 @@ const Designer = ({ data }) => {
|
|
|
10
9
|
}
|
|
11
10
|
}, [data, rootElt.current, setSurfaceClassName]);
|
|
12
11
|
return (React.createElement("div", { ref: rootElt, tabIndex: -1, className: `dx-designer-viewport ${surfaceClassName} ${data.accessibilityCompliant ? 'dx-accessibility' : ''}` },
|
|
13
|
-
React.createElement("div", { className: `dxrd-designer-wrapper dx-editors dxd-surface-back-color dxd-scrollbar-color ${data.rtl ? 'dx-rtl' : 'dx-ltr'} ${data.rootStyle}`, hidden: data.designMode && data.designMode() },
|
|
14
|
-
React.createElement("div", null,
|
|
12
|
+
React.createElement("div", { className: `dxrd-designer-wrapper dx-editors dxd-surface-back-color dxd-scrollbar-color ${data.rtl ? 'dx-rtl' : 'dx-ltr'} ${data.rootStyle}`, hidden: data.designMode && data.designMode() }, data.parts?.map(part => React.createElement(Template, { key: part.id, template: part.templateName, data: part.viewModel || part.model }))),
|
|
13
|
+
React.createElement("div", null, data.addOns?.map(addon => React.createElement(Template, { key: addon.id, template: addon.templateName, data: addon.model }))),
|
|
15
14
|
React.createElement("div", { id: "dxrd-designer-last-focus-item-blank", className: "dxrd-visually-hidden", tabIndex: -1 })));
|
|
16
15
|
};
|
|
17
16
|
export default Designer;
|
package/dx-report-viewer/components/analytics/Properties/CollectionEditor/CollectionEditor.js
CHANGED
|
@@ -34,7 +34,7 @@ const CollectionEditorWrapper = ({ data, contentTemplate }) => {
|
|
|
34
34
|
setViewModel(editorViewModel);
|
|
35
35
|
return () => {
|
|
36
36
|
subscription && subscription();
|
|
37
|
-
editorModel
|
|
37
|
+
editorModel?.dispose();
|
|
38
38
|
setViewModel(null);
|
|
39
39
|
};
|
|
40
40
|
}, []);
|
|
@@ -9,9 +9,8 @@ React.createElement("div", null,
|
|
|
9
9
|
React.createElement(Template, { className: `dx-collapsing-image dxrd-display-inline-block ${!data.collapsed ? 'dx-image-expanded' : ''}`, template: "dxrd-svg-collapsed" }),
|
|
10
10
|
React.createElement("div", { className: "dx-group-header-font", title: data.displayName, "data-bind": data.textToSearch ? `searchHighlighting: { text: displayName, textToSearch: ${data.textToSearch} }` : undefined }, !data.textToSearch ? data.displayName : undefined)));
|
|
11
11
|
const EditorLabel = ({ data }) => {
|
|
12
|
-
var _a;
|
|
13
12
|
const buttonWithTemplateRef = React.useRef();
|
|
14
|
-
useDxButtonWithTemplate(buttonWithTemplateRef, { onClick:
|
|
13
|
+
useDxButtonWithTemplate(buttonWithTemplateRef, { onClick: data.editorDescriptionAddon?.data.onClick, icon: 'dxrd-svg-tabs-description_info' });
|
|
15
14
|
return (React.createElement(React.Fragment, null,
|
|
16
15
|
React.createElement("label", { className: `propertygrid-editor-displayName ${data.isRequired ? ' dx-field-label-required' : ''}`, title: data.displayName, htmlFor: data.editorInputId, style: { fontWeight: data.isPropertyModified ? 'Bold' : '' }, "data-bind": data.textToSearch ? `searchHighlighting: { text: displayName, textToSearch: ${data.textToSearch} }` : undefined }, !data.textToSearch ? data.displayName : undefined),
|
|
17
16
|
data.editorDescriptionAddon && React.createElement("div", { className: "propertygrid-editor-description", ref: buttonWithTemplateRef })));
|
package/dx-report-viewer/components/analytics/Properties/Editors/SelectBox/SelectBoxEditor.js
CHANGED
|
@@ -7,14 +7,11 @@ export const SelectBoxEditorBase = (getEditorOptions) => ({ data }) => {
|
|
|
7
7
|
const selectBoxRef = React.useRef();
|
|
8
8
|
const args = {
|
|
9
9
|
getEditorOptions,
|
|
10
|
-
getPrivateWidgetOptions: () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
encodeNoDataText: true,
|
|
16
|
-
});
|
|
17
|
-
},
|
|
10
|
+
getPrivateWidgetOptions: () => ({
|
|
11
|
+
allowClearing: data.editorOptions?.allowClearing,
|
|
12
|
+
displayCustomValue: true,
|
|
13
|
+
encodeNoDataText: true,
|
|
14
|
+
}),
|
|
18
15
|
};
|
|
19
16
|
const options = useEditorOptions(selectBoxRef, data, args);
|
|
20
17
|
const dropDownOptions = useDropDownOptions(selectBoxRef, ({ container }) => ({ container }));
|
|
@@ -25,7 +25,7 @@ const useEditorExtendedOptions = (ref, data, getPrivateWidgetOptions) => {
|
|
|
25
25
|
}, [data.extendedOptions]);
|
|
26
26
|
};
|
|
27
27
|
const onPropertyChanged = (expectedWidgetOptions, widgetOptionsState, setWidgetOptionsState) => {
|
|
28
|
-
const nextWidgetState =
|
|
28
|
+
const nextWidgetState = { ...widgetOptionsState };
|
|
29
29
|
for (const name in expectedWidgetOptions) {
|
|
30
30
|
if (typeof expectedWidgetOptions[name] !== 'function' && expectedWidgetOptions[name] !== widgetOptionsState[name]) {
|
|
31
31
|
if (Array.isArray(expectedWidgetOptions[name])) {
|
|
@@ -21,7 +21,7 @@ const TabPanel = ({ data }) => {
|
|
|
21
21
|
const TabPanelItem = ({ tab }) => {
|
|
22
22
|
const btnRef = React.useRef(null);
|
|
23
23
|
useDxAction(btnRef, tab.click, tab);
|
|
24
|
-
return (React.createElement("div", { ref: btnRef, role: "button", className: `dxrd-tab-item dx-accessibility-rightpanel-button dxd-side-panel-tab-back-color dxd-back-highlighted dx-accessibility-focus-border-accented ${tab.css.class}`, title: tab.text, "aria-label": tab.text, "aria-expanded": tab.active, hidden: !tab.visible },
|
|
24
|
+
return (React.createElement("div", { ref: btnRef, role: "button", className: `dxrd-tab-item dx-accessibility-rightpanel-button dxd-side-panel-tab-back-color dxd-back-highlighted dx-accessibility-focus-border-accented ${tab.css.class}`, title: tab.text, "aria-label": tab.text, "aria-expanded": !tab.collapsed && tab.active ? 'true' : 'false', hidden: !tab.visible },
|
|
25
25
|
React.createElement("div", { className: `dxrd-image-padding ${tab.image.class}` },
|
|
26
26
|
React.createElement(Template, { template: tab.image.templateName }))));
|
|
27
27
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import TreelistGroup from './TreelistGroup';
|
|
4
3
|
import { initTreeListBinding } from '@devexpress/analytics-core/widgets/treelist/_binding';
|
|
5
|
-
const Treelist = (
|
|
6
|
-
var { options } = _a, delegatedProps = __rest(_a, ["options"]);
|
|
4
|
+
const Treelist = ({ options, ...delegatedProps }) => {
|
|
7
5
|
const htmlRef = React.useRef();
|
|
8
6
|
const [viewModel, setViewModel] = React.useState();
|
|
9
7
|
React.useEffect(() => {
|
|
@@ -15,6 +13,6 @@ const Treelist = (_a) => {
|
|
|
15
13
|
createChildContext: (vm) => setViewModel(vm),
|
|
16
14
|
});
|
|
17
15
|
}, [options, htmlRef.current]);
|
|
18
|
-
return React.createElement("div",
|
|
16
|
+
return React.createElement("div", { ref: htmlRef, ...delegatedProps }, viewModel ? React.createElement(TreelistGroup, { data: viewModel }) : null);
|
|
19
17
|
};
|
|
20
18
|
export default Treelist;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { globalResolver } from '@devexpress/analytics-core/property-grid/internal/_codeResolver';
|
|
4
3
|
import Template from '../Template';
|
|
5
|
-
const LazyTemplate = (
|
|
6
|
-
var { template, data, resolver, isResolved } = _a, delegatedProps = __rest(_a, ["template", "data", "resolver", "isResolved"]);
|
|
4
|
+
const LazyTemplate = ({ template, data, resolver, isResolved, ...delegatedProps }) => {
|
|
7
5
|
const [isReady, setIsReady] = React.useState(false);
|
|
8
6
|
React.useEffect(() => {
|
|
9
7
|
let isDisposed = false;
|
|
@@ -21,6 +19,6 @@ const LazyTemplate = (_a) => {
|
|
|
21
19
|
}, []);
|
|
22
20
|
if (!isReady)
|
|
23
21
|
return null;
|
|
24
|
-
return React.createElement(Template,
|
|
22
|
+
return React.createElement(Template, { template: template, data: data, ...delegatedProps });
|
|
25
23
|
};
|
|
26
24
|
export default LazyTemplate;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { SvgTemplatesEngine } from '@devexpress/analytics-core/property-grid/widgets/internal/_svgTemplateEngine';
|
|
4
3
|
import { getTemplate } from '@devexpress/analytics-core/property-grid/widgets/templateUtils';
|
|
5
4
|
import { TemplateEngineContext } from '../TemplateEngineProvider/TemplateEngineProvider';
|
|
6
|
-
const Template = (
|
|
7
|
-
var { template, data } = _a, delegatedProps = __rest(_a, ["template", "data"]);
|
|
5
|
+
const Template = ({ template, data, ...delegatedProps }) => {
|
|
8
6
|
const templateEngine = React.useContext(TemplateEngineContext);
|
|
9
7
|
const component = templateEngine.getTemplate(template);
|
|
10
8
|
if (!!component) {
|
|
11
9
|
return React.createElement(component, { data });
|
|
12
10
|
}
|
|
13
11
|
else if (!!SvgTemplatesEngine.getExistingTemplate(template)) {
|
|
14
|
-
return React.createElement("div",
|
|
12
|
+
return React.createElement("div", { ...delegatedProps, dangerouslySetInnerHTML: { __html: getTemplate(template) } });
|
|
15
13
|
}
|
|
16
14
|
else {
|
|
17
15
|
console.log(`${template} is not found`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TemplateEngine } from '../../../core/template-engine';
|
|
3
3
|
export const TemplateEngineContext = React.createContext(null);
|
|
4
|
-
const TemplateEngineProvider = ({ templateEngine, children }) => (React.createElement(TemplateEngineContext.Provider, { value: templateEngine
|
|
4
|
+
const TemplateEngineProvider = ({ templateEngine, children }) => (React.createElement(TemplateEngineContext.Provider, { value: templateEngine ?? new TemplateEngine() }, children));
|
|
5
5
|
export default TemplateEngineProvider;
|
|
@@ -9,9 +9,8 @@ const DocumentMap = ({ data }) => {
|
|
|
9
9
|
const htmlRef = React.useRef();
|
|
10
10
|
const [viewModel, setViewModel] = React.useState();
|
|
11
11
|
React.useEffect(() => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
setViewModel((_b = data.model) === null || _b === void 0 ? void 0 : _b.getViewModel());
|
|
12
|
+
htmlRef.current = scrollViewRef.current?.instance().element();
|
|
13
|
+
setViewModel(data.model?.getViewModel());
|
|
15
14
|
}, []);
|
|
16
15
|
useDxMutationObserver(htmlRef, data.keyboardHelper);
|
|
17
16
|
return (React.createElement("div", { className: "dxrd-preview-document-map dxrd-height-100 dxrd-overflow-hidden", hidden: !(data.active && data.visible) },
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import dxZoom from '../../../../hooks/dxZoom';
|
|
3
|
+
import { processStyles } from '../../../../core/processStyles';
|
|
3
4
|
const CharacterComb = ({ data }) => {
|
|
4
5
|
const zoomRef = dxZoom(data.zoom);
|
|
5
|
-
|
|
6
|
+
const [value, setValue] = React.useState(data.field.editorValue.toString());
|
|
7
|
+
const handleValueChanged = event => {
|
|
8
|
+
const newValue = event.target.value;
|
|
9
|
+
setValue(newValue);
|
|
10
|
+
data.field.editorValue = newValue;
|
|
11
|
+
};
|
|
12
|
+
return (React.createElement("div", { ref: zoomRef, style: processStyles(data.containerStyle), onClick: event => data.activateEditor(data, event.nativeEvent), className: `dxrp-editing-field-charactercomb dx-accessibility-editing-field-item dx-accessibility-border-accented ${data.active ? 'active' : ''} ${data.field.readOnly ? 'readOnly' : ''}` },
|
|
6
13
|
(!data.active || data.field.readOnly) &&
|
|
7
|
-
data.cells.map((cell, index) => (React.createElement("div", { key: index, className: "dxrp-editing-field-charactercomb-cell", style: cell.style }, cell.text))),
|
|
14
|
+
data.cells.map((cell, index) => (React.createElement("div", { key: index, className: "dxrp-editing-field-charactercomb-cell", style: processStyles(cell.style) }, cell.text))),
|
|
8
15
|
data.active && !data.field.readOnly &&
|
|
9
|
-
React.createElement("textarea", { className: "dxrp-editing-field-text dxrd-background-white", value:
|
|
16
|
+
React.createElement("textarea", { className: "dxrp-editing-field-text dxrd-background-white", value: value, onChange: handleValueChanged, style: processStyles(data.textStyle), onBlur: () => data.hideEditor(true), onKeyUp: event => data.keypressAction(data, event.nativeEvent) })));
|
|
10
17
|
};
|
|
11
18
|
export default CharacterComb;
|
|
@@ -15,7 +15,7 @@ const ExportTool = ({ data }) => {
|
|
|
15
15
|
return (React.createElement("div", { ref: elementRef },
|
|
16
16
|
React.createElement("div", { className: "dxrd-visually-hidden" },
|
|
17
17
|
React.createElement("form", { action: "data.exportActionUri", method: "post" }, data.exportFormData.map(item => (React.createElement("input", { key: item.name, name: item.name, value: item.value }))))),
|
|
18
|
-
React.createElement(Popup, { width: data.popupOptions.width, height: data.popupOptions.height, title: data.popupOptions.title, visible: data.popupOptions.visible, showCloseButton: true, onHidden: () => data.popupOptions.onHidden(), toolbarItems: data.popupOptions.toolbarItems, wrapperAttr: data.popupOptions.wrapperAttr, container: popupOptions
|
|
18
|
+
React.createElement(Popup, { width: data.popupOptions.width, height: data.popupOptions.height, title: data.popupOptions.title, visible: data.popupOptions.visible, showCloseButton: true, onHidden: () => data.popupOptions.onHidden(), toolbarItems: data.popupOptions.toolbarItems, wrapperAttr: data.popupOptions.wrapperAttr, container: popupOptions?.container, position: popupOptions?.position },
|
|
19
19
|
React.createElement("div", { className: "dxrd-print-dialog-content" },
|
|
20
20
|
React.createElement("div", null, data.printingTexts.caption),
|
|
21
21
|
React.createElement("p", null),
|
package/dx-report-viewer/components/reporting/Editing/TextField/Container/EditingFieldContainer.js
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Template from '../../../../core/Template';
|
|
3
3
|
import dxZoom from '../../../../../hooks/dxZoom';
|
|
4
|
-
|
|
5
|
-
const updateKey = (obj, key, newKey) => {
|
|
6
|
-
if (obj[key]) {
|
|
7
|
-
obj[newKey] = obj[key];
|
|
8
|
-
delete obj[key];
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const newStyles = Object.assign({}, styles);
|
|
12
|
-
updateKey(newStyles, 'line-height', 'lineHeight');
|
|
13
|
-
updateKey(newStyles, 'border-color', 'borderColor');
|
|
14
|
-
return newStyles;
|
|
15
|
-
};
|
|
4
|
+
import { processStyles } from '../../../../../core/processStyles';
|
|
16
5
|
const EditingFieldContainer = ({ data }) => {
|
|
17
6
|
const zoomRef = dxZoom(data.zoom);
|
|
18
7
|
return (React.createElement("div", { ref: zoomRef, style: processStyles(data.containerStyle), className: `dxrp-editing-field-container dx-accessibility-editing-field-item dx-accessibility-border-accented ${data.active ? 'active' : ''} ${data.field.readOnly ? 'readonly' : ''}` },
|
|
@@ -4,6 +4,6 @@ import useDxParentContainer from '../../hooks/mobileParentContainer';
|
|
|
4
4
|
const MobileActionsExport = ({ data }) => {
|
|
5
5
|
const [ref, parentContainer] = useDxParentContainer();
|
|
6
6
|
const renderContent = () => (React.createElement("div", null, data.items.map(item => React.createElement("div", { key: item.text, className: "dxrd-menu-export-item", onClick: item.action }, item.text))));
|
|
7
|
-
return (React.createElement(Popover, { ref: ref, className: "dxrd-menu-export-popover", wrapperAttr: { class: 'dxrd-menu-export-popover' }, width: "266px", height: "266px", visible: data.visible, target: ".dxrdp-mobile-action.dxrd-image-export-to", container: parentContainer, contentRender: renderContent }));
|
|
7
|
+
return (React.createElement(Popover, { ref: ref, className: "dxrd-menu-export-popover", wrapperAttr: { class: 'dxrd-menu-export-popover' }, width: "266px", height: "266px", visible: data.visible, target: ".dxrdp-mobile-action.dxrd-image-export-to", container: parentContainer, onHidden: data.hide, contentRender: renderContent }));
|
|
8
8
|
};
|
|
9
9
|
export default MobileActionsExport;
|
|
@@ -10,7 +10,7 @@ const renderGalleryItem = () => (item) => (React.createElement(ScrollView, { cla
|
|
|
10
10
|
React.createElement("div", { className: "dxrd-gallery-blocks", style: {
|
|
11
11
|
width: item.gallery.contentSize ? item.gallery.contentSize.width + 'px' : undefined,
|
|
12
12
|
height: item.gallery.contentSize ? item.gallery.contentSize.height + +'px' : undefined
|
|
13
|
-
} }, item.blocks.filter(block => block.page).map(block => (React.createElement("div", { className: `dxrd-gallery-block ${block.classSet}`, style: {
|
|
13
|
+
} }, item.blocks.filter(block => block.page).map(block => (React.createElement("div", { key: block.page.unifier, className: `dxrd-gallery-block ${block.classSet}`, style: {
|
|
14
14
|
left: block.position.left + 'px',
|
|
15
15
|
right: block.position.right + 'px',
|
|
16
16
|
top: block.position.top + 'px',
|
|
@@ -35,7 +35,9 @@ const MobileGallery = ({ data, slideOptions, gallery }) => {
|
|
|
35
35
|
const widget = galleryRef.current.instance();
|
|
36
36
|
widget.option('gallery', gallery || data.gallery);
|
|
37
37
|
widget.option('slideOptions', slideOptions || data.slideOptions);
|
|
38
|
-
new dxGalleryExtender(widget)
|
|
38
|
+
const extender = new dxGalleryExtender(widget);
|
|
39
|
+
extender.extend(widget.element());
|
|
40
|
+
return () => extender.dispose();
|
|
39
41
|
}, []);
|
|
40
42
|
return (React.createElement(Gallery, { className: "dxrd-mobile-gallery", ref: galleryRef, dataSource: data.gallery.items, animationEnabled: data.gallery.animationEnabled, disabled: data.zoomUpdating, width: "100%", height: "100%", showIndicator: false, loop: true, onSelectionChanged: data.onSlide, onOptionChanged: data.gallery.onOptionChanged, itemRender: renderGalleryItem() }));
|
|
41
43
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import DateRange from '../../../ParametersPanel/DateRange/DateRange';
|
|
3
|
-
const MobileParametersDateRange = ({ data }) => (React.createElement(DateRange, { data:
|
|
3
|
+
const MobileParametersDateRange = ({ data }) => (React.createElement(DateRange, { data: { ...data, isMobile: true } }));
|
|
4
4
|
export default MobileParametersDateRange;
|
|
@@ -8,9 +8,8 @@ const MobileParametersPopup = ({ data }) => {
|
|
|
8
8
|
const [ref, parentContainer] = useDxParentContainer();
|
|
9
9
|
const forceRerender = useDxForceRerender();
|
|
10
10
|
React.useEffect(() => {
|
|
11
|
-
var _a;
|
|
12
11
|
const eventHolder = data;
|
|
13
|
-
return
|
|
12
|
+
return eventHolder._viewModelEvents?.on(ViewModelChangedEvent, forceRerender);
|
|
14
13
|
}, []);
|
|
15
14
|
const renderContent = () => {
|
|
16
15
|
if (!data.visible)
|
|
@@ -8,6 +8,6 @@ const MobileSearch = ({ data }) => {
|
|
|
8
8
|
React.createElement("div", { className: "dxrdp-taptosearch", hidden: data.editorVisible, onClick: event => data.focusEditor(data, event) },
|
|
9
9
|
React.createElement("div", { className: "dxrdp-taptosearch-text" }, data.tapToSearchText)),
|
|
10
10
|
React.createElement("div", { className: "dxrdp-search-panel", hidden: !data.editorVisible },
|
|
11
|
-
React.createElement(TextBox, { className: "dxrdp-search-editor",
|
|
11
|
+
React.createElement(TextBox, { className: "dxrdp-search-editor", onValueChanged: event => data.onSearchTextChanged(event), onEnterKey: data.startSearch })))));
|
|
12
12
|
};
|
|
13
13
|
export default MobileSearch;
|
package/dx-report-viewer/components/reporting/ParametersPanel/DateRange/DateRange/DateRange.js
CHANGED
|
@@ -17,7 +17,7 @@ const DateRangeWrapper = ({ data }) => {
|
|
|
17
17
|
setViewModel(vm);
|
|
18
18
|
return () => {
|
|
19
19
|
subscription && subscription();
|
|
20
|
-
editor
|
|
20
|
+
editor?.dispose();
|
|
21
21
|
};
|
|
22
22
|
}, []);
|
|
23
23
|
return (React.createElement("div", { ref: dateRangeEditorRef, className: "dxrv-daterange-editor" }, viewModel && React.createElement(DateRange, { viewModel: viewModel })));
|
package/dx-report-viewer/components/reporting/ParametersPanel/DateRange/Mobile/DateRangeMobile.js
CHANGED
|
@@ -7,9 +7,8 @@ import { ViewModelChangedEvent } from '@devexpress/analytics-core/serializer/nat
|
|
|
7
7
|
const DateRangeMobile = ({ data }) => {
|
|
8
8
|
const forceRerender = useDxForceRerender();
|
|
9
9
|
React.useEffect(() => {
|
|
10
|
-
var _a;
|
|
11
10
|
const eventHolder = data.popupModel;
|
|
12
|
-
return
|
|
11
|
+
return eventHolder._viewModelEvents?.on(ViewModelChangedEvent, forceRerender);
|
|
13
12
|
}, []);
|
|
14
13
|
return (React.createElement("div", { className: "dxrv-preview-date-range-mobile" },
|
|
15
14
|
React.createElement("div", { className: "dx-fieldset" },
|
|
@@ -20,8 +20,7 @@ const DateRangePopupContainer = ({ data }) => {
|
|
|
20
20
|
const scrollViewRef = React.useRef();
|
|
21
21
|
const predefinedRangesRef = React.useRef();
|
|
22
22
|
React.useEffect(() => {
|
|
23
|
-
|
|
24
|
-
predefinedRangesRef.current = (_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.instance().element();
|
|
23
|
+
predefinedRangesRef.current = scrollViewRef.current?.instance().element();
|
|
25
24
|
}, []);
|
|
26
25
|
useDxMutationObserver(predefinedRangesRef, data.predefinedRanges.accessibilityKeyboardHelper);
|
|
27
26
|
return (React.createElement(Popup, { width: popupOptions.width, height: popupOptions.height, wrapperAttr: popupOptions.wrapperAttr, position: popupOptions.position, container: popupOptions.container, showTitle: popupOptions.showTitle, showCloseButton: popupOptions.showCloseButton, hideOnOutsideClick: popupOptions.hideOnOutsideClick, onHidden: popupOptions.onHidden, animation: popupOptions.animation, shading: popupOptions.shading, visible: popupOptions.visible },
|
|
@@ -16,13 +16,12 @@ const EditorLabel = ({ data }) => {
|
|
|
16
16
|
!data.isComplexEditor && React.createElement("label", { className: `propertygrid-editor-displayName ${data.isRequired ? 'dx-field-label-required' : ''}`, title: data.displayName, htmlFor: data.editorInputId, style: { fontWeight: data.isPropertyModified ? 'Bold' : '' }, "data-bind": data.textToSearch ? 'searchHighlighting: { text: displayName, textToSearch: textToSearch }' : undefined }, !data.textToSearch && data.displayName)));
|
|
17
17
|
};
|
|
18
18
|
const PropertyEditor = ({ data }) => {
|
|
19
|
-
var _a;
|
|
20
19
|
const accordionRef = React.useRef();
|
|
21
20
|
useDxAccordion(accordionRef, data);
|
|
22
21
|
const treeItemCssClasses = ['dx-field'];
|
|
23
22
|
data.isComplexEditor && treeItemCssClasses.push('dxrd-accessibility-accordion-trigger');
|
|
24
23
|
data.isComplexEditor && treeItemCssClasses.push('dx-accessibility-focus-border-accented');
|
|
25
|
-
|
|
24
|
+
data.editorOptions?.hasVerticalLabel && treeItemCssClasses.push('dxrd-vertical-label');
|
|
26
25
|
const isResolved = (newVal) => data.setIsRendered(newVal);
|
|
27
26
|
return (React.createElement("div", { className: "dx-editor", hidden: !data.visible },
|
|
28
27
|
React.createElement("div", { className: "dx-group", ref: accordionRef },
|
package/dx-report-viewer/components/reporting/ParametersPanel/MultiValue/MultiValue/MultiValue.js
CHANGED
|
@@ -34,13 +34,12 @@ const MultiValue = ({ data }) => {
|
|
|
34
34
|
}
|
|
35
35
|
}));
|
|
36
36
|
const validatorOptions = useValidatorOptions(data);
|
|
37
|
-
if (value !== options.value) {
|
|
38
|
-
setValue(options.value);
|
|
39
|
-
}
|
|
40
37
|
React.useEffect(() => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const model = data.getModel()?.value;
|
|
39
|
+
if (value !== options.value) {
|
|
40
|
+
setValue(options.value);
|
|
41
|
+
}
|
|
42
|
+
return model?.events.on('valueChanged', () => setValue(model.value));
|
|
44
43
|
}, []);
|
|
45
44
|
return (React.createElement(TagBox, { ref: tagBoxRef, dataSource: options.dataSource, searchEnabled: options.searchEnabled, useItemTextAsTitle: options.useItemTextAsTitle, searchExpr: options.searchExpr, value: value, displayExpr: options.displayExpr, valueExpr: options.valueExpr, multiline: options.multiline, showSelectionControls: options.showSelectionControls, onValueChanged: options.onValueChanged, onMultiTagPreparing: options.onMultiTagPreparing, inputAttr: options.inputAttr, disabled: options.disabled, selectAllText: options.selectAllText, placeholder: options.placeholder, maxDisplayedTags: options.maxDisplayedTags, showMultiTagOnly: options.showMultiTagOnly, dropDownOptions: dropDownOptions, selectAllMode: options.selectAllMode }, !!data.validationRules && React.createElement(Validator, { validationRules: validatorOptions.validationRules })));
|
|
46
45
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Template from '../../../core/Template';
|
|
3
|
+
import useDxMutationObserver from '../../../../hooks/dxMutationObserver';
|
|
3
4
|
const ClickableCrumb = ({ item, handleClick }) => (React.createElement(React.Fragment, null,
|
|
4
|
-
React.createElement("a", { className: "breadcrump-link breadcrumb-item dxd-text-accented", onClick: handleClick },
|
|
5
|
+
React.createElement("a", { className: "breadcrump-link breadcrumb-item dxd-text-accented dx-accessibility-border-accented", onClick: handleClick },
|
|
5
6
|
React.createElement("span", null, item.displayText)),
|
|
6
7
|
React.createElement(Template, { className: "breadcrumb-item-seperator", template: "dxrd-svg-preview-breadcrumbs_seperator" })));
|
|
7
|
-
const CurrentCrumb = ({ item }) => (React.createElement("a", { className: "breadcrumb-item dxd-text-primary" },
|
|
8
|
+
const CurrentCrumb = ({ item }) => (React.createElement("a", { className: "breadcrumb-item dxd-text-primary dx-accessibility-border-accented", "aria-current": "location" },
|
|
8
9
|
React.createElement("span", null, item.displayText)));
|
|
9
10
|
const Breadcrumbs = ({ data }) => {
|
|
10
11
|
if (data.listItems.length <= 1)
|
|
11
12
|
return null;
|
|
12
|
-
|
|
13
|
+
const dxMutationObserverRef = React.useRef();
|
|
14
|
+
useDxMutationObserver(dxMutationObserverRef, data.keyboardHelper);
|
|
15
|
+
return (React.createElement("div", { className: "breadcrumbs-wrapper", ref: dxMutationObserverRef, "aria-label": "Breadcrumbs", role: "navigation" }, data.listItems.map((item, index) => data.listItems.length === (index + 1)
|
|
13
16
|
? React.createElement(CurrentCrumb, { key: index, item: item })
|
|
14
17
|
: React.createElement(ClickableCrumb, { key: index, item: item, handleClick: () => data.onClick(item.position) }))));
|
|
15
18
|
};
|
package/dx-report-viewer/components/reporting/ReportPreview/BrickClickable/BrickClickable.js
CHANGED
|
@@ -4,8 +4,8 @@ const BrickClickable = ({ data }) => {
|
|
|
4
4
|
const navigationBrickClasses = ['dxrd-report-preview-brick-navigation'];
|
|
5
5
|
drillDownKey && navigationBrickClasses.push('dxrdp-navigation-brick-drill-down');
|
|
6
6
|
sortData && navigationBrickClasses.push('dxrdp-navigation-brick-sorting');
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
sortData?.order === 1 && navigationBrickClasses.push('dxrdp-navigation-brick-sorting-desc');
|
|
8
|
+
sortData?.order === 2 && navigationBrickClasses.push('dxrdp-navigation-brick-sorting-asc');
|
|
9
9
|
return (React.createElement("div", { className: `dxrd-report-preview-brick ${data.active ? 'dxrd-report-preview-brick-selected' : ''} ${!data.bricks ? 'dxrd-report-preview-brick-selectable' : ''}`, style: { top: data.topP, left: data.leftP, right: data.rightP, height: data.heightP, width: data.widthP }, onClick: e => { data.onClick(e); e.stopPropagation(); } }, data.navigation && React.createElement("div", { className: navigationBrickClasses.join(' ') })));
|
|
10
10
|
};
|
|
11
11
|
export default BrickClickable;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import useDxMutationObserver from '../../../../hooks/dxMutationObserver';
|
|
3
3
|
const ProgressBar = ({ data }) => {
|
|
4
4
|
const mutationObserverRef = React.useRef();
|
|
5
|
-
useDxMutationObserver(mutationObserverRef, data
|
|
5
|
+
useDxMutationObserver(mutationObserverRef, data?.progressBarAccessibilityKeyboardHelper);
|
|
6
6
|
const handleCancelButtonClick = () => data.cancelButton.action && data.cancelButton.action();
|
|
7
7
|
return (React.createElement("div", { role: "dialog", className: `dxrd-preview-progress dxd-popup-back-color dxd-back-primary2 dxd-border-primary ${data.cssClasses}`, hidden: !data.visible, ref: mutationObserverRef },
|
|
8
8
|
React.createElement("div", { className: "dxrd-preview-progress-text dxd-text-primary" }, data.text),
|
|
@@ -20,10 +20,9 @@ const MultiPageItem = ({ page }) => {
|
|
|
20
20
|
React.createElement(Template, { template: "dxrd-preview-page", data: page })));
|
|
21
21
|
};
|
|
22
22
|
const Surface = ({ data }) => {
|
|
23
|
-
var _a;
|
|
24
23
|
const clipboardMessage = getLocalization('Clipboard', 'ASPxReportsStringId.WebDocumentViewer_AriaClipboard');
|
|
25
24
|
const autoFitRef = React.useRef();
|
|
26
|
-
useDxAutoFit(autoFitRef,
|
|
25
|
+
useDxAutoFit(autoFitRef, data.currentPage?.autoFitOptions);
|
|
27
26
|
const dxMutationObserverRef = React.useRef();
|
|
28
27
|
useDxMutationObserver(dxMutationObserverRef, data.previewBrickKeyboardHelper);
|
|
29
28
|
return (React.createElement(React.Fragment, null,
|
|
@@ -14,8 +14,7 @@ const SearchResultItem = ({ item }) => {
|
|
|
14
14
|
const SearchComponent = ({ data }) => {
|
|
15
15
|
const viewModel = data.model.getViewModel();
|
|
16
16
|
React.useEffect(() => {
|
|
17
|
-
|
|
18
|
-
const disposeCallback = (_a = viewModel._viewModelEvents) === null || _a === void 0 ? void 0 : _a.on(ViewModelChangedEvent, (args) => {
|
|
17
|
+
const disposeCallback = viewModel._viewModelEvents?.on(ViewModelChangedEvent, (args) => {
|
|
19
18
|
data._viewModelEvents.call(ViewModelChangedEvent, args);
|
|
20
19
|
});
|
|
21
20
|
return () => disposeCallback();
|
|
@@ -4,11 +4,14 @@ const ToolbarPager = ({ data }) => {
|
|
|
4
4
|
const [dropDownOptions, setDropDownOptions] = React.useState();
|
|
5
5
|
const htmlRef = React.useRef(null);
|
|
6
6
|
React.useEffect(() => {
|
|
7
|
-
setDropDownOptions(
|
|
7
|
+
setDropDownOptions({
|
|
8
|
+
container: data.getPopupContainer(htmlRef.current),
|
|
9
|
+
...data.widget.dropDownOptions,
|
|
10
|
+
});
|
|
8
11
|
}, [data.widget.dropDownOptions]);
|
|
9
12
|
return (React.createElement("div", { ref: htmlRef, className: "dxrd-preview-pager dxrd-toolbar-item", hidden: !data.visible },
|
|
10
13
|
React.createElement("div", { className: "dx-accessibility-toolbar-item dx-accessibility-focus-border-accented" },
|
|
11
|
-
React.createElement(SelectBox, { className: "dxrd-preview-pager-selectbox", dataSource: data.widget.dataSource, onValueChanged: data.widget.onValueChanged, value: data.widget.value,
|
|
14
|
+
React.createElement(SelectBox, { className: "dxrd-preview-pager-selectbox", dataSource: data.widget.dataSource, onValueChanged: data.widget.onValueChanged, value: data.widget.value, displayExpr: data.widget.displayExpr, useItemTextAsTitle: true, itemTemplate: data.widget.itemTemplate, searchMode: data.widget.searchMode, searchEnabled: data.widget.searchEnabled, searchTimeout: data.widget.searchTimeout, disabled: data.disabled, dropDownOptions: dropDownOptions, tabIndex: -1, inputAttr: data.widget.inputAttr })),
|
|
12
15
|
React.createElement("div", { className: "dxrd-toolbar-item-separator dxd-toolbar-separator-color dxd-border-secondary", hidden: !data.hasSeparator })));
|
|
13
16
|
};
|
|
14
17
|
export default ToolbarPager;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import dxZoom from '../../../../../hooks/dxZoom';
|
|
4
3
|
import { Painter } from 'devexpress-reporting/viewer/widgets/pictureEditor/_painter';
|
|
5
|
-
const PainterComponent = (
|
|
6
|
-
var { options, className } = _a, delegatedProps = __rest(_a, ["options", "className"]);
|
|
4
|
+
const PainterComponent = ({ options, className, ...delegatedProps }) => {
|
|
7
5
|
const ref = React.useRef();
|
|
8
6
|
const [model, setModel] = React.useState();
|
|
9
|
-
const canvasRef = dxZoom(model
|
|
7
|
+
const canvasRef = dxZoom(model?.scale);
|
|
10
8
|
React.useLayoutEffect(() => {
|
|
11
9
|
const painter = new Painter(ref.current, options);
|
|
12
10
|
options.setPainter(painter);
|
|
13
11
|
setModel(painter);
|
|
14
12
|
return () => {
|
|
15
|
-
painter
|
|
16
|
-
options
|
|
13
|
+
painter?.dispose();
|
|
14
|
+
options?.setPainter(null);
|
|
17
15
|
};
|
|
18
16
|
}, []);
|
|
19
|
-
return (React.createElement("div",
|
|
17
|
+
return (React.createElement("div", { ref: ref, className: `dx-painter ${className}`, ...delegatedProps },
|
|
20
18
|
React.createElement("canvas", { ref: canvasRef })));
|
|
21
19
|
};
|
|
22
20
|
export default PainterComponent;
|
|
@@ -13,11 +13,10 @@ const PictureEditor = ({ options, className }) => {
|
|
|
13
13
|
const forceRerender = useDxForceRerender();
|
|
14
14
|
const canvasRef = dxZoom(zoomScale);
|
|
15
15
|
React.useEffect(() => {
|
|
16
|
-
var _a;
|
|
17
16
|
const pictureEditorFieldModel = options.getModel();
|
|
18
17
|
const pictureEditorModel = new PictureEditorModel(pictureEditorFieldModel, pictureEditingRef.current, forceRerender);
|
|
19
18
|
const data = pictureEditorModel.getViewModel();
|
|
20
|
-
|
|
19
|
+
data.painter._viewModelEvents?.on(ViewModelChangedEvent, arg => {
|
|
21
20
|
if (arg.propertyName === 'scale')
|
|
22
21
|
setZoomScale(arg.newValue);
|
|
23
22
|
});
|
|
@@ -47,9 +46,8 @@ const PictureEditor = ({ options, className }) => {
|
|
|
47
46
|
}, []);
|
|
48
47
|
const renderContent = () => {
|
|
49
48
|
const popupContentRerender = useDxForceRerender();
|
|
50
|
-
return (React.createElement("div", { className: `dx-picture-editing-toolbar ${className}` }, pictureEditorViewModel
|
|
51
|
-
|
|
52
|
-
(_b = (_a = action.templateOptions) === null || _a === void 0 ? void 0 : _a._viewModelEvents) === null || _b === void 0 ? void 0 : _b.on(ViewModelChangedEvent, popupContentRerender);
|
|
49
|
+
return (React.createElement("div", { className: `dx-picture-editing-toolbar ${className}` }, pictureEditorViewModel?.actions.map(action => {
|
|
50
|
+
action.templateOptions?._viewModelEvents?.on(ViewModelChangedEvent, popupContentRerender);
|
|
53
51
|
return (React.createElement("div", { key: action.id },
|
|
54
52
|
React.createElement("div", { className: "dx-picture-editing-toolbar-item", onClick: event => action.action(action, event.nativeEvent), title: action.title },
|
|
55
53
|
React.createElement(Template, { className: "dx-picture-editing-toolbar-item-icon", template: action.icon })),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const processStyles: (styles: any) => {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const toCamelCase = style => style.replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
2
|
+
export const processStyles = styles => {
|
|
3
|
+
const newStyles = {};
|
|
4
|
+
for (const style in styles) {
|
|
5
|
+
const reactStyle = toCamelCase(style);
|
|
6
|
+
newStyles[reactStyle] = styles[style];
|
|
7
|
+
}
|
|
8
|
+
return newStyles;
|
|
9
|
+
};
|
|
@@ -2,7 +2,7 @@ import { analyticsTemplates } from '../components/analytics/_templates';
|
|
|
2
2
|
import { reportingTemplates } from '../components/reporting/_templates';
|
|
3
3
|
export class TemplateEngine {
|
|
4
4
|
constructor() {
|
|
5
|
-
this._templates =
|
|
5
|
+
this._templates = { ...analyticsTemplates, ...reportingTemplates };
|
|
6
6
|
}
|
|
7
7
|
getTemplate(templateName) {
|
|
8
8
|
return this._templates[templateName];
|
|
@@ -7,7 +7,7 @@ const useDxEllipsisEditor = (options) => {
|
|
|
7
7
|
const editorInstance = new dxEllipsisEditor(ref.current, options);
|
|
8
8
|
setEditor(editorInstance);
|
|
9
9
|
return () => {
|
|
10
|
-
editorInstance
|
|
10
|
+
editorInstance?.dispose();
|
|
11
11
|
setEditor(null);
|
|
12
12
|
};
|
|
13
13
|
}, []);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IMutationObserverArgs } from '@devexpress/analytics-core/
|
|
2
|
+
import { IMutationObserverArgs } from '@devexpress/analytics-core/accessibility/_keyboardHelperBase';
|
|
3
3
|
declare const useDxMutationObserver: (ref: React.MutableRefObject<HTMLElement>, args: IMutationObserverArgs) => void;
|
|
4
4
|
export default useDxMutationObserver;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { accesibilitySettingsContext } from '../components/core/AccessibilitySettingsProvider';
|
|
3
|
-
import { initializeMutationObserver } from '@devexpress/analytics-core/
|
|
3
|
+
import { initializeMutationObserver } from '@devexpress/analytics-core/accessibility/_dxMutationObserver';
|
|
4
4
|
const useDxMutationObserver = (ref, args) => {
|
|
5
5
|
const accesibilitySetting = React.useContext(accesibilitySettingsContext);
|
|
6
6
|
React.useEffect(() => {
|
|
7
|
-
if (args && ref.current)
|
|
7
|
+
if (args && !args.isDisposing && ref.current)
|
|
8
8
|
return initializeMutationObserver(ref.current, args, accesibilitySetting.accessibilityCompliant);
|
|
9
9
|
return () => { };
|
|
10
10
|
}, [args, accesibilitySetting, ref.current]);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { initializeBaseResizableOptions, initializeResize } from '@devexpress/analytics-core/core/internal/_resizable';
|
|
3
3
|
const useDxResizable = (ref, options) => {
|
|
4
|
-
const [subscription, setSubscription] = React.useState(
|
|
4
|
+
const [subscription, setSubscription] = React.useState();
|
|
5
5
|
React.useEffect(() => {
|
|
6
6
|
if (!subscription && options) {
|
|
7
|
-
setSubscription(initializeResize(ref.current, initializeBaseResizableOptions(options)));
|
|
7
|
+
setSubscription(() => initializeResize(ref.current, initializeBaseResizableOptions(options)));
|
|
8
8
|
}
|
|
9
9
|
return () => {
|
|
10
10
|
subscription && subscription();
|
|
11
11
|
setSubscription(undefined);
|
|
12
12
|
};
|
|
13
|
-
}, [options
|
|
13
|
+
}, [options]);
|
|
14
14
|
};
|
|
15
15
|
export default useDxResizable;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import DxReportViewer from './DxReportViewer';
|
|
1
|
+
import DxReportViewer, { DxReportViewerProps, DxReportViewerRef } from './DxReportViewer';
|
|
2
2
|
import Callbacks from './options/Callbacks';
|
|
3
3
|
import ExportSettings from './options/ExportSettings';
|
|
4
4
|
import MobileModeSettings from './options/MobileModeSettings';
|
|
5
5
|
import ProgressBarSettings from './options/ProgressBarSettings';
|
|
6
6
|
import RemoteSettings from './options/RemoteSettings';
|
|
7
|
-
import
|
|
7
|
+
import RequestOptions from './options/RequestOptions';
|
|
8
8
|
import SearchSettings from './options/SearchSettings';
|
|
9
9
|
import TabPanelSettings from './options/TabPanelSettings';
|
|
10
10
|
import { TemplateEngine } from './core/template-engine';
|
|
11
|
-
export { Callbacks, ExportSettings, MobileModeSettings, ProgressBarSettings, RemoteSettings,
|
|
11
|
+
export { Callbacks, ExportSettings, MobileModeSettings, ProgressBarSettings, RemoteSettings, RequestOptions, SearchSettings, TabPanelSettings, DxReportViewer, TemplateEngine };
|
|
12
|
+
export type { DxReportViewerProps, DxReportViewerRef };
|
|
12
13
|
export default DxReportViewer;
|
|
@@ -4,9 +4,9 @@ import ExportSettings from './options/ExportSettings';
|
|
|
4
4
|
import MobileModeSettings from './options/MobileModeSettings';
|
|
5
5
|
import ProgressBarSettings from './options/ProgressBarSettings';
|
|
6
6
|
import RemoteSettings from './options/RemoteSettings';
|
|
7
|
-
import
|
|
7
|
+
import RequestOptions from './options/RequestOptions';
|
|
8
8
|
import SearchSettings from './options/SearchSettings';
|
|
9
9
|
import TabPanelSettings from './options/TabPanelSettings';
|
|
10
10
|
import { TemplateEngine } from './core/template-engine';
|
|
11
|
-
export { Callbacks, ExportSettings, MobileModeSettings, ProgressBarSettings, RemoteSettings,
|
|
11
|
+
export { Callbacks, ExportSettings, MobileModeSettings, ProgressBarSettings, RemoteSettings, RequestOptions, SearchSettings, TabPanelSettings, DxReportViewer, TemplateEngine };
|
|
12
12
|
export default DxReportViewer;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const RequestOptions = () => null;
|
|
3
|
+
RequestOptions.displayName = 'DxReportViewerRequestOptions';
|
|
4
|
+
RequestOptions.propTypes = {
|
|
5
5
|
invokeAction: PropTypes.string.isRequired,
|
|
6
6
|
getLocalizationAction: PropTypes.string,
|
|
7
7
|
host: PropTypes.string.isRequired,
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
RequestOptions.defaultProps = {
|
|
10
10
|
invokeAction: '/DXXRDV',
|
|
11
11
|
};
|
|
12
|
-
export default
|
|
12
|
+
export default RequestOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devexpress-reporting-react",
|
|
3
|
-
"version": "24.1.
|
|
3
|
+
"version": "24.1.3",
|
|
4
4
|
"homepage": "https://www.devexpress.com/",
|
|
5
5
|
"bugs": "https://www.devexpress.com/support/",
|
|
6
6
|
"author": "Developer Express Inc.",
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
"main": "./index.js",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"prop-types": "^15.8.1",
|
|
19
|
-
"devexpress-reporting": "24.1.
|
|
19
|
+
"devexpress-reporting": "24.1.3"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@types/react": "^18.0.28",
|
|
23
23
|
"@types/react-dom": "^18.0.28",
|
|
24
|
-
"devextreme-react": "24.1.
|
|
24
|
+
"devextreme-react": "24.1.3",
|
|
25
25
|
"react": "^18.0.28",
|
|
26
26
|
"react-dom": "^18.0.28"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"shx": "^0.3.4",
|
|
30
30
|
"typescript": "~5.0.4",
|
|
31
|
-
"@devexpress/analytics-core": "24.1.
|
|
31
|
+
"@devexpress/analytics-core": "24.1.3"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prebuild": "npx shx rm -rf dist && npx shx mkdir dist && npx shx cp README.md dist/ && npx shx cp package.json dist/",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
export type RequestSettingsPropsType = {
|
|
3
|
-
getDesignerModelAction: string;
|
|
4
|
-
getLocalizationAction?: string;
|
|
5
|
-
host: string;
|
|
6
|
-
};
|
|
7
|
-
declare const RequestSettings: FunctionComponent<RequestSettingsPropsType>;
|
|
8
|
-
export default RequestSettings;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
type RequestSettingsPropsType = {
|
|
3
|
-
invokeAction: string;
|
|
4
|
-
getLocalizationAction?: string;
|
|
5
|
-
host: string;
|
|
6
|
-
};
|
|
7
|
-
declare const RequestSettings: FunctionComponent<RequestSettingsPropsType>;
|
|
8
|
-
export default RequestSettings;
|