@sutech_jp/raas-react-client 0.0.35 → 0.0.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.
@@ -1,8 +1,7 @@
1
1
  import { VFC } from 'react';
2
- import { Session } from '../types';
3
2
  import { ThemeOptions } from '../types/theme';
4
3
  declare type Props = {
5
- session: Session | undefined;
4
+ url: string;
6
5
  data?: Record<string, any>;
7
6
  width?: string | number;
8
7
  height?: string | number;
@@ -4,7 +4,7 @@ exports.ReportDesigner = void 0;
4
4
  var jsx_runtime_1 = require("react/jsx-runtime");
5
5
  var react_1 = require("react");
6
6
  var ReportDesigner = function (_a) {
7
- 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;
7
+ var url = _a.url, 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
8
  var iframe = (0, react_1.useRef)(null);
9
9
  var handleMessage = (0, react_1.useCallback)(function (e) {
10
10
  var _a;
@@ -33,6 +33,6 @@ var ReportDesigner = function (_a) {
33
33
  window.addEventListener('message', handleMessage);
34
34
  return function () { return window.removeEventListener('message', handleMessage); };
35
35
  }, [handleMessage]);
36
- return (0, jsx_runtime_1.jsx)("iframe", { ref: iframe, id: "designer", src: session === null || session === void 0 ? void 0 : session.newUrl, style: { width: width, height: height, border: 0 } });
36
+ return (0, jsx_runtime_1.jsx)("iframe", { ref: iframe, id: "designer", src: url, style: { width: width, height: height, border: 0 } });
37
37
  };
38
38
  exports.ReportDesigner = ReportDesigner;
@@ -1,4 +1,4 @@
1
- import { CustomData, Layout, PaperFormArgs, ReportOptions, UserEditability } from '../types';
1
+ import { CustomData, Layout, PaperFormArgs, ReportOptions, Session, UserEditability } from '../types';
2
2
  declare type Ret<D> = {
3
3
  dirty: boolean;
4
4
  originalData: D;
@@ -20,4 +20,5 @@ declare type Options = {
20
20
  height?: string | number;
21
21
  };
22
22
  export declare const useReportPaperForm: <D>(initialData: D, options?: Options) => Ret<D>;
23
+ export declare const createLocalSession: (url: string, application: string) => Session;
23
24
  export {};
@@ -16,7 +16,7 @@ var __read = (this && this.__read) || function (o, n) {
16
16
  return ar;
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.useReportPaperForm = void 0;
19
+ exports.createLocalSession = exports.useReportPaperForm = void 0;
20
20
  var react_1 = require("react");
21
21
  var useReportPaperForm = function (initialData, options) {
22
22
  var _a, _b;
@@ -90,3 +90,8 @@ var useReportPaperForm = function (initialData, options) {
90
90
  };
91
91
  };
92
92
  exports.useReportPaperForm = useReportPaperForm;
93
+ //いずれ廃棄
94
+ var createLocalSession = function (url, application) {
95
+ return { url: url, newUrl: url, application: application };
96
+ };
97
+ exports.createLocalSession = createLocalSession;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sutech_jp/raas-react-client",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "react client for raas produced by SuTech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",