@sutech_jp/raas-react-client 0.1.36 → 0.1.37
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/types/webform.d.ts
CHANGED
|
@@ -16,3 +16,47 @@ export declare type CustomValidationResult = {
|
|
|
16
16
|
error: boolean;
|
|
17
17
|
message?: string;
|
|
18
18
|
};
|
|
19
|
+
export declare type ExtensionSchemaDef = {
|
|
20
|
+
container: ExtensionSchemaContainer;
|
|
21
|
+
properties: ExtensionSchemaProperty[];
|
|
22
|
+
};
|
|
23
|
+
export declare type ExtensionSchemaContainer = {
|
|
24
|
+
property: string;
|
|
25
|
+
caption: string;
|
|
26
|
+
};
|
|
27
|
+
export declare type ExtensionSchemaProperty = TextProperty | NumberProperty | DateProperty | DatetimeProperty | BooleanProperty;
|
|
28
|
+
export declare type PropertyBase = {
|
|
29
|
+
property: string;
|
|
30
|
+
caption: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare type TextProperty = {
|
|
34
|
+
type: 'text';
|
|
35
|
+
minLength?: number;
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
} & PropertyBase;
|
|
38
|
+
export declare type NumberProperty = {
|
|
39
|
+
type: 'number';
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
minAcceptEqual?: boolean;
|
|
43
|
+
maxAcceptEqual?: boolean;
|
|
44
|
+
precision?: number;
|
|
45
|
+
} & PropertyBase;
|
|
46
|
+
export declare type DateProperty = {
|
|
47
|
+
type: 'date';
|
|
48
|
+
min?: Date;
|
|
49
|
+
max?: Date;
|
|
50
|
+
minAcceptEqual?: boolean;
|
|
51
|
+
maxAcceptEqual?: boolean;
|
|
52
|
+
} & PropertyBase;
|
|
53
|
+
export declare type DatetimeProperty = {
|
|
54
|
+
type: 'datetime';
|
|
55
|
+
min?: Date;
|
|
56
|
+
max?: Date;
|
|
57
|
+
minAcceptEqual?: boolean;
|
|
58
|
+
maxAcceptEqual?: boolean;
|
|
59
|
+
} & PropertyBase;
|
|
60
|
+
export declare type BooleanProperty = {
|
|
61
|
+
type: 'boolean';
|
|
62
|
+
} & PropertyBase;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VFC } from 'react';
|
|
2
|
-
import { BusinessData, CustomValidationResult, ComponentOptions, ItemValue } from 'src/types/webform';
|
|
2
|
+
import { BusinessData, CustomValidationResult, ComponentOptions, ItemValue, ExtensionSchemaDef } from 'src/types/webform';
|
|
3
3
|
import { Session } from '../types';
|
|
4
4
|
import { ThemeOptions } from '../types/theme';
|
|
5
5
|
declare type Props = {
|
|
@@ -10,6 +10,7 @@ declare type Props = {
|
|
|
10
10
|
layoutId: number;
|
|
11
11
|
values?: BusinessData;
|
|
12
12
|
fileName?: string;
|
|
13
|
+
extensionSchemaDef?: ExtensionSchemaDef;
|
|
13
14
|
options?: ComponentOptions;
|
|
14
15
|
validate?: (property: string, rowIndex: number | undefined, value: ItemValue, values: BusinessData) => Promise<CustomValidationResult>;
|
|
15
16
|
validateAll?: (values: BusinessData) => Promise<CustomValidationResult[]>;
|
|
@@ -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, onChangeOperating = _a.onChangeOperating, 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, extensionSchemaDef = _a.extensionSchemaDef, 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);
|
|
@@ -106,6 +106,7 @@ var ReportWebForm = function (_a) {
|
|
|
106
106
|
layoutId: layoutId,
|
|
107
107
|
values: values,
|
|
108
108
|
fileName: fileName,
|
|
109
|
+
extensionSchemaDef: extensionSchemaDef,
|
|
109
110
|
options: options,
|
|
110
111
|
});
|
|
111
112
|
// 初期化完了状態にする
|
|
@@ -182,6 +183,7 @@ var ReportWebForm = function (_a) {
|
|
|
182
183
|
});
|
|
183
184
|
}); }, [
|
|
184
185
|
customStyles,
|
|
186
|
+
extensionSchemaDef,
|
|
185
187
|
fileName,
|
|
186
188
|
layoutId,
|
|
187
189
|
onBack,
|