@sutech_jp/raas-react-client 0.0.47 → 0.1.26
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/config/ReportConfig.d.ts +2 -2
- package/dist/designer/ReportDesigner.d.ts +3 -1
- package/dist/designer/ReportDesigner.js +8 -3
- package/dist/form/ReportPaperForm.d.ts +1 -1
- package/dist/form/ReportPaperForm.js +5 -21
- package/dist/form/useReportPaperForm.d.ts +2 -0
- package/dist/form/useReportPaperForm.js +17 -28
- package/dist/gallery/ReportLayoutGallery.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/organizer/ReportOrganizer.d.ts +15 -0
- package/dist/organizer/ReportOrganizer.js +49 -0
- package/dist/tenantInfo/ReportTenantInfo.d.ts +2 -2
- package/dist/types/index.d.ts +29 -3
- package/package.json +9 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VFC } from 'react';
|
|
2
2
|
import { Session } from '../types';
|
|
3
3
|
import { ThemeOptions } from '../types/theme';
|
|
4
|
-
declare type
|
|
4
|
+
declare type Props = {
|
|
5
5
|
session: Session | undefined;
|
|
6
6
|
width?: string | number;
|
|
7
7
|
height?: string | number;
|
|
@@ -9,5 +9,5 @@ declare type ReportConfigProps = {
|
|
|
9
9
|
toolbarPosition?: 'top' | 'bottom';
|
|
10
10
|
customStyles?: ThemeOptions;
|
|
11
11
|
};
|
|
12
|
-
export declare const ReportConfig: VFC<
|
|
12
|
+
export declare const ReportConfig: VFC<Props>;
|
|
13
13
|
export {};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { VFC } from 'react';
|
|
2
|
-
import { Session } from '../types';
|
|
2
|
+
import { DesignerOptions, Session } from '../types';
|
|
3
3
|
import { ThemeOptions } from '../types/theme';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
session: Session | undefined;
|
|
6
6
|
data?: Record<string, any>;
|
|
7
7
|
width?: string | number;
|
|
8
8
|
height?: string | number;
|
|
9
|
+
options?: DesignerOptions;
|
|
9
10
|
customStyles?: ThemeOptions;
|
|
10
11
|
onBack: () => void;
|
|
12
|
+
onChangeOperating?: (operating: boolean) => void;
|
|
11
13
|
};
|
|
12
14
|
export declare const ReportDesigner: VFC<Props>;
|
|
13
15
|
export {};
|
|
@@ -5,10 +5,10 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
var react_1 = require("react");
|
|
6
6
|
var targetOrigin_1 = require("../util/targetOrigin");
|
|
7
7
|
var ReportDesigner = function (_a) {
|
|
8
|
-
var session = _a.session, data = _a.data, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, customStyles = _a.customStyles, onBack = _a.onBack;
|
|
8
|
+
var session = _a.session, data = _a.data, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, options = _a.options, customStyles = _a.customStyles, onBack = _a.onBack, onChangeOperating = _a.onChangeOperating;
|
|
9
9
|
var iframe = (0, react_1.useRef)(null);
|
|
10
10
|
var handleMessage = (0, react_1.useCallback)(function (e) {
|
|
11
|
-
var _a;
|
|
11
|
+
var _a, _b;
|
|
12
12
|
if ((0, targetOrigin_1.getTargetOrigin)(session === null || session === void 0 ? void 0 : session.newUrl) !== '*' && e.origin !== (0, targetOrigin_1.getTargetOrigin)(session === null || session === void 0 ? void 0 : session.newUrl)) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
@@ -27,12 +27,17 @@ var ReportDesigner = function (_a) {
|
|
|
27
27
|
action: 'onRender',
|
|
28
28
|
data: data,
|
|
29
29
|
customStyles: customStyles,
|
|
30
|
+
options: options,
|
|
30
31
|
}, (0, targetOrigin_1.getTargetOrigin)(session === null || session === void 0 ? void 0 : session.newUrl));
|
|
31
32
|
}
|
|
32
33
|
else if (action === 'onBack') {
|
|
33
34
|
onBack();
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
else if (action === 'onChangeOperating') {
|
|
37
|
+
var operating = (_b = message === null || message === void 0 ? void 0 : message.operating) !== null && _b !== void 0 ? _b : false;
|
|
38
|
+
onChangeOperating && onChangeOperating(operating);
|
|
39
|
+
}
|
|
40
|
+
}, [customStyles, data, onBack, onChangeOperating, options, session === null || session === void 0 ? void 0 : session.newUrl]);
|
|
36
41
|
(0, react_1.useEffect)(function () {
|
|
37
42
|
window.addEventListener('message', handleMessage);
|
|
38
43
|
return function () { return window.removeEventListener('message', handleMessage); };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { ReportPaperFormProps } from '../types';
|
|
3
|
-
export declare const ReportPaperForm: <D>({ session, layoutId, data, onDataUpdate, customData,
|
|
3
|
+
export declare const ReportPaperForm: <D>({ session, layoutId, data, onDataUpdate, customData, onRender, reportOptions, layout, onLayoutUpdate, editability, layoutEditable, downloadable, version, width, height, customStyles, }: ReportPaperFormProps<D>) => ReactElement;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __read = (this && this.__read) || function (o, n) {
|
|
14
3
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
4
|
if (!m) return o;
|
|
@@ -32,7 +21,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
32
21
|
var react_1 = require("react");
|
|
33
22
|
var targetOrigin_1 = require("../util/targetOrigin");
|
|
34
23
|
var ReportPaperForm = function (_a) {
|
|
35
|
-
var session = _a.session, layoutId = _a.layoutId, data = _a.data, onDataUpdate = _a.onDataUpdate, customData = _a.customData,
|
|
24
|
+
var session = _a.session, layoutId = _a.layoutId, data = _a.data, onDataUpdate = _a.onDataUpdate, customData = _a.customData, 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, _d = _a.downloadable, downloadable = _d === void 0 ? false : _d, version = _a.version, _e = _a.width, width = _e === void 0 ? '100%' : _e, _f = _a.height, height = _f === void 0 ? 0 : _f, customStyles = _a.customStyles;
|
|
36
25
|
var _g = __read((0, react_1.useState)('unauthorized'), 2), formState = _g[0], setFormState = _g[1];
|
|
37
26
|
var _h = __read((0, react_1.useState)(), 2), contentHeight = _h[0], setContentHeight = _h[1];
|
|
38
27
|
var _j = __read((0, react_1.useState)(false), 2), layoutInitialized = _j[0], setLayoutInitialized = _j[1];
|
|
@@ -97,15 +86,10 @@ var ReportPaperForm = function (_a) {
|
|
|
97
86
|
if (onRender)
|
|
98
87
|
onRender((message === null || message === void 0 ? void 0 : message.hasRequiredBlank) || false);
|
|
99
88
|
}
|
|
100
|
-
else if (action === '
|
|
101
|
-
var
|
|
89
|
+
else if (action === 'onDataUpdate') {
|
|
90
|
+
var businessData = message.businessData, customData_1 = message.customData, options = message.options;
|
|
102
91
|
if (onDataUpdate)
|
|
103
|
-
onDataUpdate(
|
|
104
|
-
}
|
|
105
|
-
else if (action === 'onCustomDataUpdate') {
|
|
106
|
-
var customData_1 = message.customData, options = message.options;
|
|
107
|
-
if (onCustomDataUpdate)
|
|
108
|
-
onCustomDataUpdate(customData_1, options);
|
|
92
|
+
onDataUpdate(businessData, customData_1, options);
|
|
109
93
|
}
|
|
110
94
|
else if (action === 'onEditLayout') {
|
|
111
95
|
var layout_1 = message.layout;
|
|
@@ -115,7 +99,7 @@ var ReportPaperForm = function (_a) {
|
|
|
115
99
|
else if (action === 'onChangeContentHeight') {
|
|
116
100
|
setContentHeight(message === null || message === void 0 ? void 0 : message.contentHeight);
|
|
117
101
|
}
|
|
118
|
-
}, [session, onRender, onDataUpdate,
|
|
102
|
+
}, [session, onRender, onDataUpdate, onLayoutUpdate]);
|
|
119
103
|
(0, react_1.useEffect)(function () {
|
|
120
104
|
window.addEventListener('message', handleMessage);
|
|
121
105
|
return function () { return window.removeEventListener('message', handleMessage); };
|
|
@@ -20,6 +20,8 @@ declare type Options = {
|
|
|
20
20
|
width?: string | number;
|
|
21
21
|
height?: string | number;
|
|
22
22
|
};
|
|
23
|
+
/** @ignore */
|
|
23
24
|
export declare const useReportPaperForm: <D>(initialData: D, options?: Options) => Ret<D>;
|
|
25
|
+
/** @ignore */
|
|
24
26
|
export declare const createLocalSession: (url: string, application: string) => Session;
|
|
25
27
|
export {};
|
|
@@ -18,41 +18,30 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.createLocalSession = exports.useReportPaperForm = void 0;
|
|
20
20
|
var react_1 = require("react");
|
|
21
|
+
/** @ignore */
|
|
21
22
|
var useReportPaperForm = function (initialData, options) {
|
|
22
23
|
var _a, _b;
|
|
23
|
-
var _c = __read((0, react_1.useState)(initialData), 2),
|
|
24
|
+
var _c = __read((0, react_1.useState)({ data: initialData, customData: [], reportOptions: [] }), 2), reportData = _c[0], setReportData = _c[1];
|
|
24
25
|
var _d = __read((0, react_1.useState)(initialData), 2), originalData = _d[0], setOriginalData = _d[1];
|
|
25
|
-
var _e = __read((0, react_1.useState)(
|
|
26
|
-
var _f = __read((0, react_1.useState)(
|
|
27
|
-
var _g = __read((0, react_1.useState)(), 2),
|
|
28
|
-
var _h = __read((0, react_1.useState)(
|
|
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];
|
|
26
|
+
var _e = __read((0, react_1.useState)(), 2), layout = _e[0], setLayout = _e[1];
|
|
27
|
+
var _f = __read((0, react_1.useState)(0), 2), version = _f[0], setVersion = _f[1]; // flag to force update layout
|
|
28
|
+
var _g = __read((0, react_1.useState)(false), 2), dirty = _g[0], setDirty = _g[1];
|
|
29
|
+
var _h = __read((0, react_1.useState)(false), 2), hasRequiredBlank = _h[0], setHasRequiredBlank = _h[1];
|
|
31
30
|
var onInitialize = (0, react_1.useCallback)(function (data) {
|
|
32
|
-
|
|
31
|
+
setReportData({ data: data, customData: [], reportOptions: [] });
|
|
33
32
|
setOriginalData(data);
|
|
34
|
-
setCustomData([]);
|
|
35
|
-
setReportOptions([]);
|
|
36
33
|
setLayout(undefined);
|
|
37
34
|
setDirty(false);
|
|
38
35
|
setVersion(function (v) { return v + 1; });
|
|
39
36
|
}, []);
|
|
40
37
|
var onReset = (0, react_1.useCallback)(function () {
|
|
41
|
-
|
|
42
|
-
setCustomData([]);
|
|
43
|
-
setReportOptions([]);
|
|
38
|
+
setReportData({ data: originalData, customData: [], reportOptions: [] });
|
|
44
39
|
setLayout(undefined);
|
|
45
40
|
setDirty(false);
|
|
46
41
|
setVersion(function (v) { return v + 1; });
|
|
47
42
|
}, [originalData]);
|
|
48
|
-
var onDataUpdate = (0, react_1.useCallback)(function (data, options) {
|
|
49
|
-
|
|
50
|
-
setReportOptions(options);
|
|
51
|
-
setDirty(true);
|
|
52
|
-
}, []);
|
|
53
|
-
var onCustomDataUpdate = (0, react_1.useCallback)(function (customData, options) {
|
|
54
|
-
setCustomData(customData);
|
|
55
|
-
setReportOptions(options);
|
|
43
|
+
var onDataUpdate = (0, react_1.useCallback)(function (data, customData, options) {
|
|
44
|
+
setReportData({ data: data, customData: customData, reportOptions: options });
|
|
56
45
|
setDirty(true);
|
|
57
46
|
}, []);
|
|
58
47
|
var onLayoutUpdate = (0, react_1.useCallback)(function (layout) {
|
|
@@ -67,11 +56,10 @@ var useReportPaperForm = function (initialData, options) {
|
|
|
67
56
|
onInitialize: onInitialize,
|
|
68
57
|
onReset: onReset,
|
|
69
58
|
paperFormArgs: {
|
|
70
|
-
data: data,
|
|
59
|
+
data: reportData.data,
|
|
60
|
+
customData: reportData.customData,
|
|
61
|
+
reportOptions: reportData.reportOptions,
|
|
71
62
|
onDataUpdate: onDataUpdate,
|
|
72
|
-
customData: customData,
|
|
73
|
-
onCustomDataUpdate: onCustomDataUpdate,
|
|
74
|
-
reportOptions: reportOptions,
|
|
75
63
|
layout: layout,
|
|
76
64
|
onLayoutUpdate: onLayoutUpdate,
|
|
77
65
|
onRender: onRender,
|
|
@@ -83,15 +71,16 @@ var useReportPaperForm = function (initialData, options) {
|
|
|
83
71
|
version: version,
|
|
84
72
|
},
|
|
85
73
|
generatePdfArgs: {
|
|
86
|
-
data: data,
|
|
87
|
-
customData: customData,
|
|
88
|
-
options: reportOptions,
|
|
74
|
+
data: reportData.data,
|
|
75
|
+
customData: reportData.customData,
|
|
76
|
+
options: reportData.reportOptions,
|
|
89
77
|
layout: layout,
|
|
90
78
|
},
|
|
91
79
|
};
|
|
92
80
|
};
|
|
93
81
|
exports.useReportPaperForm = useReportPaperForm;
|
|
94
82
|
//いずれ廃棄
|
|
83
|
+
/** @ignore */
|
|
95
84
|
var createLocalSession = function (url, application) {
|
|
96
85
|
return { url: url, newUrl: url, application: application };
|
|
97
86
|
};
|
|
@@ -2,7 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { Session } from '../types';
|
|
3
3
|
import { ThemeOptions } from '../types/theme';
|
|
4
4
|
declare type Mode = 'config' | 'operation';
|
|
5
|
-
declare type
|
|
5
|
+
declare type Props = {
|
|
6
6
|
session: Session | undefined;
|
|
7
7
|
width?: string | number;
|
|
8
8
|
height?: string | number;
|
|
@@ -13,5 +13,5 @@ declare type LayoutGalleryProps = {
|
|
|
13
13
|
onEditLayout?: (layoutId: number) => void;
|
|
14
14
|
onCreateLayout?: () => void;
|
|
15
15
|
};
|
|
16
|
-
export declare const ReportLayoutGallery: FC<
|
|
16
|
+
export declare const ReportLayoutGallery: FC<Props>;
|
|
17
17
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export { ReportPaperForm } from './form/ReportPaperForm';
|
|
|
4
4
|
export { useReportPaperForm, createLocalSession } from './form/useReportPaperForm';
|
|
5
5
|
export { ReportLayoutGallery } from './gallery/ReportLayoutGallery';
|
|
6
6
|
export { ReportTenantInfo } from './tenantInfo/ReportTenantInfo';
|
|
7
|
+
export { ReportOrganizer } from './organizer/ReportOrganizer';
|
|
7
8
|
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.ReportTenantInfo = exports.ReportLayoutGallery = exports.createLocalSession = exports.useReportPaperForm = exports.ReportPaperForm = exports.ReportDesigner = exports.ReportConfig = void 0;
|
|
17
|
+
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");
|
|
@@ -28,4 +28,6 @@ var ReportLayoutGallery_1 = require("./gallery/ReportLayoutGallery");
|
|
|
28
28
|
Object.defineProperty(exports, "ReportLayoutGallery", { enumerable: true, get: function () { return ReportLayoutGallery_1.ReportLayoutGallery; } });
|
|
29
29
|
var ReportTenantInfo_1 = require("./tenantInfo/ReportTenantInfo");
|
|
30
30
|
Object.defineProperty(exports, "ReportTenantInfo", { enumerable: true, get: function () { return ReportTenantInfo_1.ReportTenantInfo; } });
|
|
31
|
+
var ReportOrganizer_1 = require("./organizer/ReportOrganizer");
|
|
32
|
+
Object.defineProperty(exports, "ReportOrganizer", { enumerable: true, get: function () { return ReportOrganizer_1.ReportOrganizer; } });
|
|
31
33
|
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VFC } from 'react';
|
|
2
|
+
import { OrganizerEntryPoint, OrganizerOptions, OrganizerResult, Session } from '../types';
|
|
3
|
+
import { ThemeOptions } from '../types/theme';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
session: Session | undefined;
|
|
6
|
+
width?: string | number;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
customStyles?: ThemeOptions;
|
|
9
|
+
options?: OrganizerOptions;
|
|
10
|
+
entry?: OrganizerEntryPoint;
|
|
11
|
+
onPerform?: (result: OrganizerResult) => void;
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const ReportOrganizer: VFC<Props>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReportOrganizer = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var targetOrigin_1 = require("../util/targetOrigin");
|
|
7
|
+
var ReportOrganizer = function (_a) {
|
|
8
|
+
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, options = _a.options, entry = _a.entry, onPerform = _a.onPerform, onCancel = _a.onCancel;
|
|
9
|
+
var iframe = (0, react_1.useRef)(null);
|
|
10
|
+
var handleMessage = (0, react_1.useCallback)(function (e) {
|
|
11
|
+
var _a;
|
|
12
|
+
if ((0, targetOrigin_1.getTargetOrigin)(session === null || session === void 0 ? void 0 : session.newUrl) !== '*' && e.origin !== (0, targetOrigin_1.getTargetOrigin)(session === null || session === void 0 ? void 0 : session.newUrl)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
var message = e.data;
|
|
16
|
+
var from = message === null || message === void 0 ? void 0 : message.from;
|
|
17
|
+
var action = message === null || message === void 0 ? void 0 : message.action;
|
|
18
|
+
if (from !== 'organizer') {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (action === 'onAuthorized') {
|
|
22
|
+
var iframeWindow = (_a = iframe.current) === null || _a === void 0 ? void 0 : _a.contentWindow;
|
|
23
|
+
if (!iframeWindow)
|
|
24
|
+
return;
|
|
25
|
+
iframeWindow.postMessage({
|
|
26
|
+
from: 'organizerClient',
|
|
27
|
+
action: 'onShow',
|
|
28
|
+
props: {
|
|
29
|
+
customStyles: customStyles,
|
|
30
|
+
options: options,
|
|
31
|
+
entry: entry,
|
|
32
|
+
},
|
|
33
|
+
}, (0, targetOrigin_1.getTargetOrigin)(session === null || session === void 0 ? void 0 : session.newUrl));
|
|
34
|
+
}
|
|
35
|
+
else if (action === 'onPerform') {
|
|
36
|
+
var payload = message.payload;
|
|
37
|
+
onPerform && onPerform(payload);
|
|
38
|
+
}
|
|
39
|
+
else if (action === 'onCancel') {
|
|
40
|
+
onCancel && onCancel();
|
|
41
|
+
}
|
|
42
|
+
}, [customStyles, entry, onCancel, onPerform, options, session === null || session === void 0 ? void 0 : session.newUrl]);
|
|
43
|
+
(0, react_1.useEffect)(function () {
|
|
44
|
+
window.addEventListener('message', handleMessage);
|
|
45
|
+
return function () { return window.removeEventListener('message', handleMessage); };
|
|
46
|
+
}, [handleMessage]);
|
|
47
|
+
return (0, jsx_runtime_1.jsx)("iframe", { ref: iframe, id: "organizer", src: session === null || session === void 0 ? void 0 : session.newUrl, style: { width: width, height: height, border: 0 } });
|
|
48
|
+
};
|
|
49
|
+
exports.ReportOrganizer = ReportOrganizer;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { VFC } from 'react';
|
|
2
2
|
import { Session } from '../types';
|
|
3
3
|
import { ThemeOptions } from '../types/theme';
|
|
4
|
-
declare type
|
|
4
|
+
declare type Props = {
|
|
5
5
|
session: Session | undefined;
|
|
6
6
|
width?: string | number;
|
|
7
7
|
height?: string | number;
|
|
8
8
|
customStyles?: ThemeOptions;
|
|
9
9
|
};
|
|
10
|
-
export declare const ReportTenantInfo: VFC<
|
|
10
|
+
export declare const ReportTenantInfo: VFC<Props>;
|
|
11
11
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import { ThemeOptions } from './theme';
|
|
2
|
+
export { ThemeOptions, PaletteOptions, TypographyOptions, ColorOptions, Grayscale, TypographyVariants } from './theme';
|
|
2
3
|
export declare type Layout = any;
|
|
3
4
|
export declare type CustomData = any[];
|
|
4
5
|
export declare type ReportOptions = any[];
|
|
5
6
|
export declare type UserEditability = 'all' | 'customDataOnly' | 'none';
|
|
6
7
|
export declare type FormState = 'unauthorized' | 'authorized';
|
|
8
|
+
export declare type PageSize = 'a3' | 'a4' | 'a5' | 'b3' | 'b4' | 'b5';
|
|
9
|
+
export declare type OrganizerEntryPoint = 'default' | 'rename' | 'separation';
|
|
10
|
+
export declare type OrganizerResult = {
|
|
11
|
+
id: number;
|
|
12
|
+
};
|
|
13
|
+
export declare type OrganizerOptions = {
|
|
14
|
+
rename?: OrganizerRenameOptions;
|
|
15
|
+
separation?: OrganizerSeparationOptions;
|
|
16
|
+
ownOnly?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare type OrganizerRenameOptions = {
|
|
19
|
+
enable?: boolean;
|
|
20
|
+
enableFileName?: boolean;
|
|
21
|
+
defaultFileNamePattern?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare type OrganizerSeparationOptions = {
|
|
24
|
+
enable?: boolean;
|
|
25
|
+
enableStamp?: boolean;
|
|
26
|
+
enableMask?: boolean;
|
|
27
|
+
enableFileName?: boolean;
|
|
28
|
+
defaultFileNamePattern?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare type DesignerOptions = {
|
|
31
|
+
disablePreviewByLog?: boolean;
|
|
32
|
+
ownOnlyPreviewByLog?: boolean;
|
|
33
|
+
pageSizes?: Array<PageSize>;
|
|
34
|
+
};
|
|
7
35
|
declare type LayoutEditable = {
|
|
8
36
|
layoutEditable: true;
|
|
9
37
|
layout: Layout;
|
|
@@ -16,9 +44,8 @@ declare type LayoutNotEditable = {
|
|
|
16
44
|
};
|
|
17
45
|
export declare type PaperFormArgs<D> = {
|
|
18
46
|
data: D;
|
|
19
|
-
onDataUpdate?: (data: D, reportOptions: ReportOptions) => void;
|
|
47
|
+
onDataUpdate?: (data: D, customData: CustomData, reportOptions: ReportOptions) => void;
|
|
20
48
|
customData?: CustomData;
|
|
21
|
-
onCustomDataUpdate?: (customData: CustomData, reportOptions: ReportOptions) => void;
|
|
22
49
|
onRender?: (hasRequiredBlank: boolean) => void;
|
|
23
50
|
reportOptions?: ReportOptions;
|
|
24
51
|
editability?: UserEditability;
|
|
@@ -37,4 +64,3 @@ export declare type Session = {
|
|
|
37
64
|
url: string;
|
|
38
65
|
newUrl: string;
|
|
39
66
|
};
|
|
40
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sutech_jp/raas-react-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "react client for raas produced by SuTech",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/",
|
|
8
9
|
"access": "public"
|
|
9
10
|
},
|
|
10
11
|
"author": "sutech",
|
|
@@ -14,17 +15,17 @@
|
|
|
14
15
|
"watch": "tsc -w",
|
|
15
16
|
"build": "rimraf dist&&tsc",
|
|
16
17
|
"postbuild": "cpy 'api.json' '../dist' --cwd=src",
|
|
17
|
-
"prepublishOnly": "npm run build
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
18
19
|
"lint:fix": "eslint --fix \"./{src,test}/**/*.{tsx,ts,js,json}\" --ignore-path .gitignore",
|
|
19
20
|
"format": "prettier --write \"./{src,test}/**/*.{tsx,ts,js,json}\" --ignore-path .gitignore",
|
|
20
|
-
"precommit": "npm run format && npm run lint:fix"
|
|
21
|
+
"precommit": "npm run format && npm run lint:fix",
|
|
22
|
+
"doc": "npx typedoc src/index.ts --out dist/docs --name \"Raas : raas-react-client\" --customFooterHtml \"©Copyright 2024 SuTech Co., Ltd. All Rights Reserved\" --plugin typedoc-plugin-missing-exports --excludeExternals --placeInternalsInOwningModule --sort kind --sort source-order --includeVersion"
|
|
21
23
|
},
|
|
22
24
|
"husky": {
|
|
23
25
|
"hooks": {
|
|
24
26
|
"pre-commit": "npm run precommit"
|
|
25
27
|
}
|
|
26
28
|
},
|
|
27
|
-
"dependencies": {},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@testing-library/dom": "^8.11.1",
|
|
30
31
|
"@testing-library/jest-dom": "^5.15.1",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"prettier": "^2.2.1",
|
|
49
50
|
"rimraf": "^3.0.2",
|
|
50
51
|
"ts-jest": "^27.0.7",
|
|
52
|
+
"typedoc": "^0.26.10",
|
|
51
53
|
"typescript": "^4.4.3"
|
|
52
54
|
},
|
|
53
55
|
"peerDependencies": {
|
|
@@ -59,5 +61,8 @@
|
|
|
59
61
|
"@types/react": {
|
|
60
62
|
"optional": true
|
|
61
63
|
}
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"typedoc-plugin-missing-exports": "^3.0.2"
|
|
62
67
|
}
|
|
63
68
|
}
|