@fluxo-dev/shell-reporting 0.0.37 → 0.0.39
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/index.esm.js +0 -2
- package/index.esm2.js +112 -49
- package/package.json +2 -2
- package/reports-manager.esm.js +0 -2
package/index.esm.js
CHANGED
|
@@ -6,7 +6,5 @@ import '@mantine/core';
|
|
|
6
6
|
import '@mantine/dates';
|
|
7
7
|
import '@mantine/notifications';
|
|
8
8
|
import '@fluxo-dev/ui-components';
|
|
9
|
-
import 'devexpress-reporting/dx-reportdesigner';
|
|
10
9
|
import 'react-router-dom';
|
|
11
|
-
import 'devexpress-reporting/dx-webdocumentviewer';
|
|
12
10
|
import 'devextreme/localization';
|
package/index.esm2.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { EmbeddedModule, FluxoClientSys } from '@fluxo-dev/api-client-base';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { lazy, Suspense, forwardRef, createElement as createElement$2, useState, useEffect, useCallback, useRef } from 'react';
|
|
4
|
-
import { Stack, TextInput, NumberInput, Switch, Loader, Select, Box, Group, Text, Divider, Button, Center, Modal } from '@mantine/core';
|
|
4
|
+
import { Stack, TextInput, NumberInput, Switch, Loader, Select, Box, Group, Text, Divider, Button, Center, LoadingOverlay, Modal } from '@mantine/core';
|
|
5
5
|
import { DatePickerInput } from '@mantine/dates';
|
|
6
6
|
import { showNotification } from '@mantine/notifications';
|
|
7
7
|
import { NoData, ShellPage } from '@fluxo-dev/ui-components';
|
|
8
|
-
import { DxReportDesigner } from 'devexpress-reporting/dx-reportdesigner';
|
|
9
8
|
import { useParams } from 'react-router-dom';
|
|
10
|
-
import { DxReportViewer } from 'devexpress-reporting/dx-webdocumentviewer';
|
|
11
9
|
import { locale } from 'devextreme/localization';
|
|
12
10
|
|
|
13
11
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -4944,20 +4942,51 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
4944
4942
|
];
|
|
4945
4943
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
4946
4944
|
|
|
4945
|
+
/******************************************************************************
|
|
4946
|
+
Copyright (c) Microsoft Corporation.
|
|
4947
|
+
|
|
4948
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4949
|
+
purpose with or without fee is hereby granted.
|
|
4950
|
+
|
|
4951
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4952
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4953
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4954
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4955
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4956
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4957
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
4958
|
+
***************************************************************************** */
|
|
4959
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
4960
|
+
|
|
4961
|
+
|
|
4962
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
4963
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4964
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4965
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4966
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4967
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4968
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4969
|
+
});
|
|
4970
|
+
}
|
|
4971
|
+
|
|
4972
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
4973
|
+
var e = new Error(message);
|
|
4974
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
4975
|
+
};
|
|
4976
|
+
|
|
4947
4977
|
const ReportDesigner = props => {
|
|
4948
|
-
var _a, _b;
|
|
4949
4978
|
const {
|
|
4950
4979
|
id
|
|
4951
4980
|
} = useParams();
|
|
4952
4981
|
const [report, setReport] = useState();
|
|
4953
4982
|
const designerRef = useRef(null);
|
|
4954
4983
|
const [designerLoaded, setDesignerLoaded] = useState(false);
|
|
4984
|
+
const [designerInstance, setDesignerInstance] = useState(null);
|
|
4955
4985
|
const requestOptions = {
|
|
4956
4986
|
host: FluxoClientSys.Instance.clientConfig.fluxoInstanceUrl.replace('/api', ''),
|
|
4957
4987
|
getDesignerModelAction: "/DXXRD/GetDesignerModel"
|
|
4958
4988
|
};
|
|
4959
4989
|
useEffect(() => {
|
|
4960
|
-
//loadMessages(itMessages);
|
|
4961
4990
|
locale('it');
|
|
4962
4991
|
}, []);
|
|
4963
4992
|
useEffect(() => {
|
|
@@ -4967,55 +4996,89 @@ const ReportDesigner = props => {
|
|
|
4967
4996
|
});
|
|
4968
4997
|
}, [id]);
|
|
4969
4998
|
useEffect(() => {
|
|
4970
|
-
if (!report) return;
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4999
|
+
if (!report || !(designerRef === null || designerRef === void 0 ? void 0 : designerRef.current)) return;
|
|
5000
|
+
const loadDesigner = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
5001
|
+
setDesignerLoaded(false);
|
|
5002
|
+
try {
|
|
5003
|
+
let designer;
|
|
5004
|
+
if (props.mode === 'designer') {
|
|
5005
|
+
const {
|
|
5006
|
+
DxReportDesigner
|
|
5007
|
+
} = yield import('devexpress-reporting/dx-reportdesigner');
|
|
5008
|
+
designer = new DxReportDesigner(designerRef.current, {
|
|
5009
|
+
reportUrl: report.id.toString(),
|
|
5010
|
+
requestOptions
|
|
5011
|
+
});
|
|
5012
|
+
} else {
|
|
5013
|
+
const {
|
|
5014
|
+
DxReportViewer
|
|
5015
|
+
} = yield import('devexpress-reporting/dx-webdocumentviewer');
|
|
5016
|
+
designer = new DxReportViewer(designerRef.current, {
|
|
5017
|
+
reportUrl: report.id.toString() + '?' + props.reportParameters,
|
|
5018
|
+
requestOptions: {
|
|
5019
|
+
host: FluxoClientSys.Instance.clientConfig.fluxoInstanceUrl.replace('/api', '/'),
|
|
5020
|
+
invokeAction: "DXXRDV"
|
|
5021
|
+
}
|
|
5022
|
+
});
|
|
5023
|
+
}
|
|
5024
|
+
if (designer) {
|
|
5025
|
+
designer.render();
|
|
5026
|
+
setDesignerInstance(designer);
|
|
5027
|
+
setTimeout(() => setDesignerLoaded(true), 2000);
|
|
5028
|
+
}
|
|
5029
|
+
} catch (error) {
|
|
5030
|
+
console.error('Error loading designer:', error);
|
|
4981
5031
|
}
|
|
4982
5032
|
});
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
5033
|
+
loadDesigner();
|
|
5034
|
+
return () => {
|
|
5035
|
+
if (designerInstance) {
|
|
5036
|
+
designerInstance.dispose();
|
|
5037
|
+
}
|
|
5038
|
+
};
|
|
4988
5039
|
}, [designerRef, report]);
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5040
|
+
const renderContent = () => {
|
|
5041
|
+
if (props.mode === 'viewer') {
|
|
5042
|
+
return jsxs(Box, {
|
|
5043
|
+
pos: 'relative',
|
|
5044
|
+
children: [jsx(LoadingOverlay, {
|
|
5045
|
+
visible: !designerLoaded
|
|
5046
|
+
}), jsx("div", {
|
|
5047
|
+
style: {
|
|
5048
|
+
width: "100%",
|
|
5049
|
+
height: "calc(100vh - 38px)",
|
|
5050
|
+
marginTop: -16
|
|
5051
|
+
},
|
|
5052
|
+
children: jsx("div", {
|
|
5053
|
+
ref: designerRef
|
|
5054
|
+
})
|
|
5055
|
+
})]
|
|
5056
|
+
});
|
|
5057
|
+
}
|
|
5058
|
+
return jsx(ShellPage, {
|
|
5003
5059
|
headerProps: {
|
|
5004
|
-
title:
|
|
5005
|
-
subtitle:
|
|
5006
|
-
backButtonTo:
|
|
5060
|
+
title: 'Report Designer',
|
|
5061
|
+
subtitle: report === null || report === void 0 ? void 0 : report.name,
|
|
5062
|
+
backButtonTo: '/fluxo/reporting/reports'
|
|
5007
5063
|
},
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5064
|
+
withoutPadding: true,
|
|
5065
|
+
children: jsxs(Box, {
|
|
5066
|
+
pos: 'relative',
|
|
5067
|
+
children: [jsx(LoadingOverlay, {
|
|
5068
|
+
visible: !designerLoaded
|
|
5069
|
+
}), jsx("div", {
|
|
5070
|
+
style: {
|
|
5071
|
+
width: "100%",
|
|
5072
|
+
height: "calc(100vh - 151px)"
|
|
5073
|
+
},
|
|
5074
|
+
children: jsx("div", {
|
|
5075
|
+
ref: designerRef
|
|
5076
|
+
})
|
|
5077
|
+
})]
|
|
5078
|
+
})
|
|
5079
|
+
});
|
|
5080
|
+
};
|
|
5081
|
+
return renderContent();
|
|
5019
5082
|
};
|
|
5020
5083
|
|
|
5021
5084
|
var reportDesigner = /*#__PURE__*/Object.freeze({
|
package/package.json
CHANGED
package/reports-manager.esm.js
CHANGED
|
@@ -7,8 +7,6 @@ import { FluxoClientSys } from '@fluxo-dev/api-client-base';
|
|
|
7
7
|
import { useNavigate } from 'react-router-dom';
|
|
8
8
|
import { showNotification } from '@mantine/notifications';
|
|
9
9
|
import '@mantine/dates';
|
|
10
|
-
import 'devexpress-reporting/dx-reportdesigner';
|
|
11
|
-
import 'devexpress-reporting/dx-webdocumentviewer';
|
|
12
10
|
import 'devextreme/localization';
|
|
13
11
|
|
|
14
12
|
/**
|