@atlaskit/inline-dialog
Advanced tools
Comparing version 13.0.0 to 13.0.1
# @atlaskit/inline-dialog | ||
## 13.0.1 | ||
### Patch Changes | ||
- [`db053b24d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/db053b24d8) - Update all the theme imports to be tree-shakable | ||
## 13.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -16,4 +16,5 @@ "use strict"; | ||
var _a = _this.props, isOpen = _a.isOpen, onClose = _a.onClose; | ||
if (event.defaultPrevented) | ||
if (event.defaultPrevented) { | ||
return; | ||
} | ||
var container = _this.containerRef; | ||
@@ -23,4 +24,5 @@ var trigger = _this.triggerRef; | ||
// exit if we click outside but on the trigger — it can handle the clicks itself | ||
if (trigger && trigger.contains(target)) | ||
if (trigger && trigger.contains(target)) { | ||
return; | ||
} | ||
// call onClose if the click originated from outside the dialog | ||
@@ -34,4 +36,5 @@ if (isOpen && container && !container.contains(target)) { | ||
InlineDialog.prototype.componentDidUpdate = function (prevProps) { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
if (!prevProps.isOpen && this.props.isOpen) { | ||
@@ -45,4 +48,5 @@ window.addEventListener('click', this.handleClickOutside, true); | ||
InlineDialog.prototype.componentDidMount = function () { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
if (this.props.isOpen) { | ||
@@ -53,4 +57,5 @@ window.addEventListener('click', this.handleClickOutside, true); | ||
InlineDialog.prototype.componentWillUnmount = function () { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
window.removeEventListener('click', this.handleClickOutside, true); | ||
@@ -57,0 +62,0 @@ }; |
{ | ||
"name": "@atlaskit/inline-dialog", | ||
"version": "13.0.0", | ||
"version": "13.0.1", | ||
"sideEffects": false | ||
} |
@@ -12,4 +12,5 @@ import React, { Component } from 'react'; | ||
const { isOpen, onClose } = this.props; | ||
if (event.defaultPrevented) | ||
if (event.defaultPrevented) { | ||
return; | ||
} | ||
const container = this.containerRef; | ||
@@ -19,4 +20,5 @@ const trigger = this.triggerRef; | ||
// exit if we click outside but on the trigger — it can handle the clicks itself | ||
if (trigger && trigger.contains(target)) | ||
if (trigger && trigger.contains(target)) { | ||
return; | ||
} | ||
// call onClose if the click originated from outside the dialog | ||
@@ -29,4 +31,5 @@ if (isOpen && container && !container.contains(target)) { | ||
componentDidUpdate(prevProps) { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
if (!prevProps.isOpen && this.props.isOpen) { | ||
@@ -40,4 +43,5 @@ window.addEventListener('click', this.handleClickOutside, true); | ||
componentDidMount() { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
if (this.props.isOpen) { | ||
@@ -48,4 +52,5 @@ window.addEventListener('click', this.handleClickOutside, true); | ||
componentWillUnmount() { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
window.removeEventListener('click', this.handleClickOutside, true); | ||
@@ -52,0 +57,0 @@ } |
{ | ||
"name": "@atlaskit/inline-dialog", | ||
"version": "13.0.0", | ||
"version": "13.0.1", | ||
"sideEffects": false | ||
} |
@@ -14,4 +14,5 @@ import { __extends } from "tslib"; | ||
var _a = _this.props, isOpen = _a.isOpen, onClose = _a.onClose; | ||
if (event.defaultPrevented) | ||
if (event.defaultPrevented) { | ||
return; | ||
} | ||
var container = _this.containerRef; | ||
@@ -21,4 +22,5 @@ var trigger = _this.triggerRef; | ||
// exit if we click outside but on the trigger — it can handle the clicks itself | ||
if (trigger && trigger.contains(target)) | ||
if (trigger && trigger.contains(target)) { | ||
return; | ||
} | ||
// call onClose if the click originated from outside the dialog | ||
@@ -32,4 +34,5 @@ if (isOpen && container && !container.contains(target)) { | ||
InlineDialog.prototype.componentDidUpdate = function (prevProps) { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
if (!prevProps.isOpen && this.props.isOpen) { | ||
@@ -43,4 +46,5 @@ window.addEventListener('click', this.handleClickOutside, true); | ||
InlineDialog.prototype.componentDidMount = function () { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
if (this.props.isOpen) { | ||
@@ -51,4 +55,5 @@ window.addEventListener('click', this.handleClickOutside, true); | ||
InlineDialog.prototype.componentWillUnmount = function () { | ||
if (typeof window === 'undefined') | ||
if (typeof window === 'undefined') { | ||
return; | ||
} | ||
window.removeEventListener('click', this.handleClickOutside, true); | ||
@@ -55,0 +60,0 @@ }; |
{ | ||
"name": "@atlaskit/inline-dialog", | ||
"version": "13.0.0", | ||
"version": "13.0.1", | ||
"sideEffects": false | ||
} |
{ | ||
"name": "@atlaskit/inline-dialog", | ||
"version": "13.0.0", | ||
"version": "13.0.1", | ||
"description": "An inline dialog is a pop-up container for small amounts of information. It can also contain controls.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
81198
599