@sutech_jp/raas-react-client 0.1.31 → 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.
@@ -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
- requiredMark?: ReactNode;
10
- showReportOutputButton?: boolean;
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, title = _a.title, layoutId = _a.layoutId, values = _a.values, fileName = _a.fileName, options = _a.options, validate = _a.validate, onChange = _a.onChange, onGenerate = _a.onGenerate;
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
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sutech_jp/raas-react-client",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "react client for raas produced by SuTech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",