@sutech_jp/raas-react-client 0.0.39 → 0.0.41

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.
@@ -6,6 +6,7 @@ declare type LayoutGalleryProps = {
6
6
  width?: string | number;
7
7
  height?: string | number;
8
8
  customStyles?: ThemeOptions;
9
+ deletable?: boolean;
9
10
  onSelectLayout?: (layoutId?: number) => void;
10
11
  onEditLayout?: (layoutId: number) => void;
11
12
  onCreateLayout?: () => void;
@@ -4,7 +4,7 @@ exports.ReportLayoutGallery = void 0;
4
4
  var jsx_runtime_1 = require("react/jsx-runtime");
5
5
  var react_1 = require("react");
6
6
  var ReportLayoutGallery = function (_a) {
7
- 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, onSelectLayout = _a.onSelectLayout, onEditLayout = _a.onEditLayout, onCreateLayout = _a.onCreateLayout;
7
+ 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, _d = _a.deletable, deletable = _d === void 0 ? false : _d, onSelectLayout = _a.onSelectLayout, onEditLayout = _a.onEditLayout, onCreateLayout = _a.onCreateLayout;
8
8
  var iframe = (0, react_1.useRef)(null);
9
9
  var handleMessage = (0, react_1.useCallback)(function (e) {
10
10
  var _a, _b, _c, _d, _e;
@@ -33,11 +33,12 @@ var ReportLayoutGallery = function (_a) {
33
33
  selectable: onSelectLayout !== undefined,
34
34
  creatable: onCreateLayout !== undefined,
35
35
  editable: onEditLayout !== undefined,
36
+ deletable: deletable,
36
37
  customStyles: customStyles,
37
38
  },
38
39
  }, '*');
39
40
  }
40
- }, [customStyles, onCreateLayout, onEditLayout, onSelectLayout]);
41
+ }, [customStyles, deletable, onCreateLayout, onEditLayout, onSelectLayout]);
41
42
  (0, react_1.useEffect)(function () {
42
43
  window.addEventListener('message', handleMessage);
43
44
  return function () { return window.removeEventListener('message', handleMessage); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sutech_jp/raas-react-client",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "description": "react client for raas produced by SuTech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",