@sutech_jp/raas-react-client 0.1.30 → 0.1.32
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/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export { useReportPaperForm, createLocalSession } from './form/useReportPaperFor
|
|
|
5
5
|
export { ReportLayoutGallery } from './gallery/ReportLayoutGallery';
|
|
6
6
|
export { ReportTenantInfo } from './tenantInfo/ReportTenantInfo';
|
|
7
7
|
export { ReportOrganizer } from './organizer/ReportOrganizer';
|
|
8
|
+
export { ReportWebForm } from './webform/ReportWebForm';
|
|
8
9
|
export * from './types';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ReportOrganizer = exports.ReportTenantInfo = exports.ReportLayoutGallery = exports.createLocalSession = exports.useReportPaperForm = exports.ReportPaperForm = exports.ReportDesigner = exports.ReportConfig = void 0;
|
|
17
|
+
exports.ReportWebForm = exports.ReportOrganizer = exports.ReportTenantInfo = exports.ReportLayoutGallery = exports.createLocalSession = exports.useReportPaperForm = exports.ReportPaperForm = exports.ReportDesigner = exports.ReportConfig = void 0;
|
|
18
18
|
var ReportConfig_1 = require("./config/ReportConfig");
|
|
19
19
|
Object.defineProperty(exports, "ReportConfig", { enumerable: true, get: function () { return ReportConfig_1.ReportConfig; } });
|
|
20
20
|
var ReportDesigner_1 = require("./designer/ReportDesigner");
|
|
@@ -30,4 +30,6 @@ var ReportTenantInfo_1 = require("./tenantInfo/ReportTenantInfo");
|
|
|
30
30
|
Object.defineProperty(exports, "ReportTenantInfo", { enumerable: true, get: function () { return ReportTenantInfo_1.ReportTenantInfo; } });
|
|
31
31
|
var ReportOrganizer_1 = require("./organizer/ReportOrganizer");
|
|
32
32
|
Object.defineProperty(exports, "ReportOrganizer", { enumerable: true, get: function () { return ReportOrganizer_1.ReportOrganizer; } });
|
|
33
|
+
var ReportWebForm_1 = require("./webform/ReportWebForm");
|
|
34
|
+
Object.defineProperty(exports, "ReportWebForm", { enumerable: true, get: function () { return ReportWebForm_1.ReportWebForm; } });
|
|
33
35
|
__exportStar(require("./types"), exports);
|
package/dist/types/webform.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
export declare type ItemValue = string | number | boolean | Date | null;
|
|
3
2
|
export declare type ObjectValue = {
|
|
4
3
|
[key: string]: ItemValue | ObjectValue | ArrayValue;
|
|
@@ -6,8 +5,10 @@ export declare type ObjectValue = {
|
|
|
6
5
|
export declare type ArrayValue = ObjectValue[];
|
|
7
6
|
export declare type BusinessData = ObjectValue;
|
|
8
7
|
export declare type ComponentOptions = {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
title?: string;
|
|
9
|
+
requiredIndicator?: 'simple' | 'filled' | 'outlined';
|
|
10
|
+
showReportGenerationButton?: boolean;
|
|
11
|
+
showBackButton?: boolean;
|
|
11
12
|
};
|
|
12
13
|
export declare type CustomValidationResult = {
|
|
13
14
|
error: boolean;
|
|
@@ -7,7 +7,6 @@ declare type Props = {
|
|
|
7
7
|
width?: string | number;
|
|
8
8
|
height?: string | number;
|
|
9
9
|
customStyles?: ThemeOptions;
|
|
10
|
-
title?: string;
|
|
11
10
|
layoutId: number;
|
|
12
11
|
values?: BusinessData;
|
|
13
12
|
fileName?: string;
|
|
@@ -15,6 +14,7 @@ declare type Props = {
|
|
|
15
14
|
validate?: (property: string, rowIndex: number | undefined, value: ItemValue, values: BusinessData) => Promise<CustomValidationResult>;
|
|
16
15
|
onChange?: (property: string, rowIndex: number | undefined, value: ItemValue, values: BusinessData) => void;
|
|
17
16
|
onGenerate?: (logId: string) => void;
|
|
17
|
+
onBack?: () => void;
|
|
18
18
|
};
|
|
19
19
|
export declare const ReportWebForm: VFC<Props>;
|
|
20
20
|
export {};
|
|
@@ -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,
|
|
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, onChange = _a.onChange, onGenerate = _a.onGenerate, 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);
|
|
@@ -103,7 +103,6 @@ var ReportWebForm = function (_a) {
|
|
|
103
103
|
if (!(action === 'onAuthorized')) return [3 /*break*/, 1];
|
|
104
104
|
sendMessage('onShow', {
|
|
105
105
|
customStyles: customStyles,
|
|
106
|
-
title: title,
|
|
107
106
|
layoutId: layoutId,
|
|
108
107
|
values: values,
|
|
109
108
|
fileName: fileName,
|
|
@@ -141,6 +140,12 @@ var ReportWebForm = function (_a) {
|
|
|
141
140
|
logId = message.payload;
|
|
142
141
|
onGenerate(logId);
|
|
143
142
|
}
|
|
143
|
+
else if (action === 'onBack') {
|
|
144
|
+
if (!onBack) {
|
|
145
|
+
return [2 /*return*/];
|
|
146
|
+
}
|
|
147
|
+
onBack();
|
|
148
|
+
}
|
|
144
149
|
_c.label = 4;
|
|
145
150
|
case 4: return [2 /*return*/];
|
|
146
151
|
}
|
|
@@ -149,12 +154,12 @@ var ReportWebForm = function (_a) {
|
|
|
149
154
|
customStyles,
|
|
150
155
|
fileName,
|
|
151
156
|
layoutId,
|
|
157
|
+
onBack,
|
|
152
158
|
onChange,
|
|
153
159
|
onGenerate,
|
|
154
160
|
options,
|
|
155
161
|
sendMessage,
|
|
156
162
|
session === null || session === void 0 ? void 0 : session.newUrl,
|
|
157
|
-
title,
|
|
158
163
|
validate,
|
|
159
164
|
values,
|
|
160
165
|
]);
|