@depay/react-dialog-stack
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -74,2 +74,6 @@ import React from 'react'; | ||
if (props.setNavigate) { | ||
props.setNavigate(this.navigate.bind(this)); | ||
} | ||
this.state = { | ||
@@ -189,11 +193,11 @@ stack: [props.start], | ||
return ( | ||
React.createElement('div', { key: index, className: ['ReactDialogStack'].concat(stackState).join(' '), __self: this, __source: {fileName: _jsxFileName, lineNumber: 127}} | ||
, React.createElement('div', { className: "ReactDialogStackRow", __self: this, __source: {fileName: _jsxFileName, lineNumber: 128}} | ||
, React.createElement('div', { className: "ReactDialogStackCell", onClick: this.onClick.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 129}} | ||
React.createElement('div', { key: index, className: ['ReactDialogStack'].concat(stackState).join(' '), __self: this, __source: {fileName: _jsxFileName, lineNumber: 131}} | ||
, React.createElement('div', { className: "ReactDialogStackRow", __self: this, __source: {fileName: _jsxFileName, lineNumber: 132}} | ||
, React.createElement('div', { className: "ReactDialogStackCell", onClick: this.onClick.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 133}} | ||
, React.createElement(NavigateStackContext.Provider, { | ||
value: { navigate: this.navigate.bind(this), set: this.set.bind(this) }, __self: this, __source: {fileName: _jsxFileName, lineNumber: 130}} | ||
value: { navigate: this.navigate.bind(this), set: this.set.bind(this) }, __self: this, __source: {fileName: _jsxFileName, lineNumber: 134}} | ||
, React.createElement(CloseStackContext.Provider, { value: this.close.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 133}} | ||
, React.createElement(StackContext.Provider, { value: this.state.stack, __self: this, __source: {fileName: _jsxFileName, lineNumber: 134}} | ||
, React.createElement('div', { className: "ReactDialogAnimation", __self: this, __source: {fileName: _jsxFileName, lineNumber: 135}}, this.props.dialogs[route]) | ||
, React.createElement(CloseStackContext.Provider, { value: this.close.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 137}} | ||
, React.createElement(StackContext.Provider, { value: this.state.stack, __self: this, __source: {fileName: _jsxFileName, lineNumber: 138}} | ||
, React.createElement('div', { className: "ReactDialogAnimation", __self: this, __source: {fileName: _jsxFileName, lineNumber: 139}}, this.props.dialogs[route]) | ||
) | ||
@@ -241,5 +245,5 @@ ) | ||
container: this.props.container, | ||
background: this.props.background, __self: this, __source: {fileName: _jsxFileName, lineNumber: 173}} | ||
background: this.props.background, __self: this, __source: {fileName: _jsxFileName, lineNumber: 177}} | ||
, React.createElement('style', {__self: this, __source: {fileName: _jsxFileName, lineNumber: 180}}, ReactDialogStackStyle()) | ||
, React.createElement('style', {__self: this, __source: {fileName: _jsxFileName, lineNumber: 184}}, ReactDialogStackStyle()) | ||
, this.renderStack() | ||
@@ -246,0 +250,0 @@ ) |
@@ -80,2 +80,6 @@ (function (global, factory) { | ||
if (props.setNavigate) { | ||
props.setNavigate(this.navigate.bind(this)); | ||
} | ||
this.state = { | ||
@@ -195,11 +199,11 @@ stack: [props.start], | ||
return ( | ||
React__default['default'].createElement('div', { key: index, className: ['ReactDialogStack'].concat(stackState).join(' '), __self: this, __source: {fileName: _jsxFileName, lineNumber: 127}} | ||
, React__default['default'].createElement('div', { className: "ReactDialogStackRow", __self: this, __source: {fileName: _jsxFileName, lineNumber: 128}} | ||
, React__default['default'].createElement('div', { className: "ReactDialogStackCell", onClick: this.onClick.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 129}} | ||
React__default['default'].createElement('div', { key: index, className: ['ReactDialogStack'].concat(stackState).join(' '), __self: this, __source: {fileName: _jsxFileName, lineNumber: 131}} | ||
, React__default['default'].createElement('div', { className: "ReactDialogStackRow", __self: this, __source: {fileName: _jsxFileName, lineNumber: 132}} | ||
, React__default['default'].createElement('div', { className: "ReactDialogStackCell", onClick: this.onClick.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 133}} | ||
, React__default['default'].createElement(NavigateStackContext.Provider, { | ||
value: { navigate: this.navigate.bind(this), set: this.set.bind(this) }, __self: this, __source: {fileName: _jsxFileName, lineNumber: 130}} | ||
value: { navigate: this.navigate.bind(this), set: this.set.bind(this) }, __self: this, __source: {fileName: _jsxFileName, lineNumber: 134}} | ||
, React__default['default'].createElement(CloseStackContext.Provider, { value: this.close.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 133}} | ||
, React__default['default'].createElement(StackContext.Provider, { value: this.state.stack, __self: this, __source: {fileName: _jsxFileName, lineNumber: 134}} | ||
, React__default['default'].createElement('div', { className: "ReactDialogAnimation", __self: this, __source: {fileName: _jsxFileName, lineNumber: 135}}, this.props.dialogs[route]) | ||
, React__default['default'].createElement(CloseStackContext.Provider, { value: this.close.bind(this), __self: this, __source: {fileName: _jsxFileName, lineNumber: 137}} | ||
, React__default['default'].createElement(StackContext.Provider, { value: this.state.stack, __self: this, __source: {fileName: _jsxFileName, lineNumber: 138}} | ||
, React__default['default'].createElement('div', { className: "ReactDialogAnimation", __self: this, __source: {fileName: _jsxFileName, lineNumber: 139}}, this.props.dialogs[route]) | ||
) | ||
@@ -247,5 +251,5 @@ ) | ||
container: this.props.container, | ||
background: this.props.background, __self: this, __source: {fileName: _jsxFileName, lineNumber: 173}} | ||
background: this.props.background, __self: this, __source: {fileName: _jsxFileName, lineNumber: 177}} | ||
, React__default['default'].createElement('style', {__self: this, __source: {fileName: _jsxFileName, lineNumber: 180}}, ReactDialogStackStyle()) | ||
, React__default['default'].createElement('style', {__self: this, __source: {fileName: _jsxFileName, lineNumber: 184}}, ReactDialogStackStyle()) | ||
, this.renderStack() | ||
@@ -252,0 +256,0 @@ ) |
{ | ||
"name": "@depay/react-dialog-stack", | ||
"moduleName": "ReactDialogStack", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "A flexible dialog stack for react widgets.", | ||
@@ -6,0 +6,0 @@ "main": "./dist/umd/index.js", |
@@ -79,2 +79,22 @@ ## Quickstart | ||
`setNavigate (function)`: A function which will be called from the stack construtor to share the navigate function with the outside: | ||
```javascript | ||
const setNavigate = (navigator)=> { | ||
window.navigate = navigator | ||
} | ||
/*...*/ | ||
<ReactDialogStack | ||
close={this.close} | ||
setNavigate={setNavigate} | ||
open={this.state.showDialog} | ||
/> | ||
/*...*/ | ||
window.navigate('AnotherDialog') | ||
``` | ||
`document (Document)`: Allows to forward a different document where the dialog is supposed to live in (created through ReactDOM portal). | ||
@@ -81,0 +101,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22130
221
445
232
0