@sutech_jp/raas-react-client 0.0.17 → 0.0.18
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.
|
@@ -31,10 +31,10 @@ exports.ReportPaperForm = void 0;
|
|
|
31
31
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
32
32
|
var react_1 = require("react");
|
|
33
33
|
var ReportPaperForm = function (_a) {
|
|
34
|
-
var url = _a.url, layoutId = _a.layoutId, data = _a.data, onDataUpdate = _a.onDataUpdate, customData = _a.customData, onCustomDataUpdate = _a.onCustomDataUpdate, onRender = _a.onRender, reportOptions = _a.reportOptions, layout = _a.layout, onLayoutUpdate = _a.onLayoutUpdate, _b = _a.editability, editability = _b === void 0 ? 'none' : _b, _c = _a.layoutEditable, layoutEditable = _c === void 0 ? false : _c, version = _a.version, _d = _a.width, width = _d === void 0 ? '100%' : _d,
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
34
|
+
var url = _a.url, layoutId = _a.layoutId, data = _a.data, onDataUpdate = _a.onDataUpdate, customData = _a.customData, onCustomDataUpdate = _a.onCustomDataUpdate, onRender = _a.onRender, reportOptions = _a.reportOptions, layout = _a.layout, onLayoutUpdate = _a.onLayoutUpdate, _b = _a.editability, editability = _b === void 0 ? 'none' : _b, _c = _a.layoutEditable, layoutEditable = _c === void 0 ? false : _c, version = _a.version, _d = _a.width, width = _d === void 0 ? '100%' : _d, _e = _a.height, height = _e === void 0 ? 0 : _e;
|
|
35
|
+
var _f = __read((0, react_1.useState)('unauthorized'), 2), formState = _f[0], setFormState = _f[1];
|
|
36
|
+
var _g = __read((0, react_1.useState)(), 2), contentHeight = _g[0], setContentHeight = _g[1];
|
|
37
|
+
var _h = __read((0, react_1.useState)(false), 2), layoutInitialized = _h[0], setLayoutInitialized = _h[1];
|
|
38
38
|
var iframe = (0, react_1.useRef)(null);
|
|
39
39
|
(0, react_1.useEffect)(function () {
|
|
40
40
|
var _a;
|
|
@@ -116,7 +116,7 @@ var ReportPaperForm = function (_a) {
|
|
|
116
116
|
}, [handleMessage]);
|
|
117
117
|
return ((0, jsx_runtime_1.jsx)("iframe", { ref: iframe, id: "paper-form", name: "paperForm", src: url, style: {
|
|
118
118
|
width: width,
|
|
119
|
-
height: height
|
|
119
|
+
height: height || "".concat(contentHeight ? contentHeight + 10 : 240, "px"),
|
|
120
120
|
border: 0,
|
|
121
121
|
} }));
|
|
122
122
|
};
|
|
@@ -19,14 +19,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
exports.useReportPaperForm = void 0;
|
|
20
20
|
var react_1 = require("react");
|
|
21
21
|
var useReportPaperForm = function (initialData, options) {
|
|
22
|
-
var _a
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
22
|
+
var _a, _b;
|
|
23
|
+
var _c = __read((0, react_1.useState)(initialData), 2), data = _c[0], setData = _c[1];
|
|
24
|
+
var _d = __read((0, react_1.useState)(initialData), 2), originalData = _d[0], setOriginalData = _d[1];
|
|
25
|
+
var _e = __read((0, react_1.useState)([]), 2), customData = _e[0], setCustomData = _e[1];
|
|
26
|
+
var _f = __read((0, react_1.useState)([]), 2), reportOptions = _f[0], setReportOptions = _f[1];
|
|
27
|
+
var _g = __read((0, react_1.useState)(), 2), layout = _g[0], setLayout = _g[1];
|
|
28
|
+
var _h = __read((0, react_1.useState)(0), 2), version = _h[0], setVersion = _h[1]; // flag to force update layout
|
|
29
|
+
var _j = __read((0, react_1.useState)(false), 2), dirty = _j[0], setDirty = _j[1];
|
|
30
|
+
var _k = __read((0, react_1.useState)(false), 2), hasRequiredBlank = _k[0], setHasRequiredBlank = _k[1];
|
|
30
31
|
var onInitialize = (0, react_1.useCallback)(function (data) {
|
|
31
32
|
setData(data);
|
|
32
33
|
setOriginalData(data);
|
|
@@ -76,8 +77,8 @@ var useReportPaperForm = function (initialData, options) {
|
|
|
76
77
|
onRender: onRender,
|
|
77
78
|
editability: (options === null || options === void 0 ? void 0 : options.editability) || 'none',
|
|
78
79
|
layoutEditable: (options === null || options === void 0 ? void 0 : options.layoutEditable) || false,
|
|
79
|
-
width: options === null || options === void 0 ? void 0 : options.width,
|
|
80
|
-
height: options === null || options === void 0 ? void 0 : options.height,
|
|
80
|
+
width: (_a = options === null || options === void 0 ? void 0 : options.width) !== null && _a !== void 0 ? _a : '100%',
|
|
81
|
+
height: (_b = options === null || options === void 0 ? void 0 : options.height) !== null && _b !== void 0 ? _b : 0,
|
|
81
82
|
version: version,
|
|
82
83
|
},
|
|
83
84
|
generatePdfArgs: {
|