@sutech_jp/raas-react-client 0.1.35 → 0.1.36
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.
|
@@ -15,6 +15,7 @@ declare type Props = {
|
|
|
15
15
|
validateAll?: (values: BusinessData) => Promise<CustomValidationResult[]>;
|
|
16
16
|
onChange?: (property: string, rowIndex: number | undefined, value: ItemValue, values: BusinessData) => void;
|
|
17
17
|
onGenerate?: (logId: string) => void;
|
|
18
|
+
onChangeOperating?: (operating: boolean) => void;
|
|
18
19
|
onBack?: () => void;
|
|
19
20
|
};
|
|
20
21
|
export declare const ReportWebForm: VFC<Props>;
|
|
@@ -57,7 +57,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
57
57
|
var react_1 = require("react");
|
|
58
58
|
var targetOrigin_1 = require("../util/targetOrigin");
|
|
59
59
|
var ReportWebForm = function (_a) {
|
|
60
|
-
var session = _a.session, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, customStyles = _a.customStyles, layoutId = _a.layoutId, values = _a.values, fileName = _a.fileName, options = _a.options, validate = _a.validate, validateAll = _a.validateAll, onChange = _a.onChange, onGenerate = _a.onGenerate, onBack = _a.onBack;
|
|
60
|
+
var session = _a.session, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, customStyles = _a.customStyles, layoutId = _a.layoutId, values = _a.values, fileName = _a.fileName, options = _a.options, validate = _a.validate, validateAll = _a.validateAll, onChange = _a.onChange, onGenerate = _a.onGenerate, onChangeOperating = _a.onChangeOperating, onBack = _a.onBack;
|
|
61
61
|
var _d = __read((0, react_1.useState)(false), 2), initialized = _d[0], setInitialized = _d[1];
|
|
62
62
|
var prevInitialized = (0, react_1.useRef)(false);
|
|
63
63
|
var iframe = (0, react_1.useRef)(null);
|
|
@@ -87,7 +87,7 @@ var ReportWebForm = function (_a) {
|
|
|
87
87
|
prevInitialized.current = initialized;
|
|
88
88
|
}, [initialized, values, sendMessage]);
|
|
89
89
|
var handleMessage = (0, react_1.useCallback)(function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
90
|
-
var message, from, action, _a, property, rowIndex, value, values_1, result_1, result, values_2, results, _b, property, rowIndex, value, values_3, logId;
|
|
90
|
+
var message, from, action, _a, property, rowIndex, value, values_1, result_1, result, values_2, results, _b, property, rowIndex, value, values_3, logId, operating;
|
|
91
91
|
return __generator(this, function (_c) {
|
|
92
92
|
switch (_c.label) {
|
|
93
93
|
case 0:
|
|
@@ -163,6 +163,13 @@ var ReportWebForm = function (_a) {
|
|
|
163
163
|
logId = message.payload;
|
|
164
164
|
onGenerate(logId);
|
|
165
165
|
}
|
|
166
|
+
else if (action === 'onChangeOperating') {
|
|
167
|
+
if (!onChangeOperating) {
|
|
168
|
+
return [2 /*return*/];
|
|
169
|
+
}
|
|
170
|
+
operating = message.payload;
|
|
171
|
+
onChangeOperating(operating);
|
|
172
|
+
}
|
|
166
173
|
else if (action === 'onBack') {
|
|
167
174
|
if (!onBack) {
|
|
168
175
|
return [2 /*return*/];
|
|
@@ -179,6 +186,7 @@ var ReportWebForm = function (_a) {
|
|
|
179
186
|
layoutId,
|
|
180
187
|
onBack,
|
|
181
188
|
onChange,
|
|
189
|
+
onChangeOperating,
|
|
182
190
|
onGenerate,
|
|
183
191
|
options,
|
|
184
192
|
sendMessage,
|