Skip to content

Commit

Permalink
Merge pull request #8 from RickoNoNo3/dev
Browse files Browse the repository at this point in the history
Dev v1.4.2
  • Loading branch information
RickoNoNo3 authored May 19, 2022
2 parents e166887 + b106f79 commit a19998d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ type WinBoxPropType = {
width?: string | number,
fullscreen?: boolean, // a wrapper prop for fullscreen() method

onclose?: (force?: boolean) => boolean | undefined | void,
onclose?: (force: boolean) => boolean | undefined | void,
onmove?: (x: number, y: number) => any,
onresize?: (width: number, height: number) => any,
onblur?: () => any,
Expand Down
4 changes: 2 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export declare type WinBoxPropType = {
*
* see the following document for more detail about the argument and the return value.
* @see https://github.com/nextapps-de/winbox
* @param force whether you should not abort the winbox to close.
* @param force Whether you should not abort the winbox to close. If this is true, you MUST return false, or some problems will happen.
* @return noDefaultClose - true if the winbox does not need the default close process, for example, when it needs a confirmation to close instead of being closed suddenly.
*/
onclose?: (force?: boolean) => boolean | undefined | void;
onclose?: (force: boolean) => boolean | undefined | void;
onmove?: (x: number, y: number) => any;
onresize?: (width: number, height: number) => any;
onblur?: () => any;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ var WinBox = /** @class */ (function (_super) {
throw 'duplicated window id';
this.winBoxObj = new winbox_1.default(__assign(__assign({ width: 300, height: 200, top: 0, bottom: 0, left: 0, right: 0 }, this.props), { class: "".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ''), onclose: function (force) {
var _a, _b;
if ((_b = (_a = _this.props).onclose) === null || _b === void 0 ? void 0 : _b.call(_a, force)) {
if ((_b = (_a = _this.props).onclose) === null || _b === void 0 ? void 0 : _b.call(_a, force !== null && force !== void 0 ? force : false)) {
return true;
}
_this.handleClose(); // only when false, do close process.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-winbox",
"version": "1.4.1",
"version": "1.4.2",
"description": "The React component for WinBox.js. Full Reactful props and state. A window manager for React",
"private": false,
"homepage": "https://github.com/rickonono3/react-winbox",
Expand Down
9 changes: 9 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
yarn install
npm install
npm run build
git add .
git commit -m "publish from $(date +'%Y-%m-%d %H:%M:%S')"
npm version patch
npm publish
git push

0 comments on commit a19998d

Please sign in to comment.