@atlaskit/inline-dialog 14.2.0 → 14.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/inline-dialog
2
2
 
3
+ ## 14.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#113051](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113051)
8
+ [`8fb8ca26fb173`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8fb8ca26fb173) -
9
+ Integrate layering in inline dialog
10
+ - Updated dependencies
11
+
3
12
  ## 14.2.0
4
13
 
5
14
  ### Minor Changes
@@ -26,31 +26,56 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
26
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
27
 
28
28
  var packageName = "@atlaskit/inline-dialog";
29
- var packageVersion = "14.2.0";
29
+ var packageVersion = "14.2.1";
30
30
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
31
31
  if (!node) {
32
32
  return false;
33
33
  }
34
34
  return node.classList && node.classList.contains('atlaskit-portal-container') || checkIsChildOfPortal(node.parentElement);
35
35
  };
36
- var InlineDialog = exports.InlineDialogWithoutAnalytics = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
37
- var _ref$isOpen = _ref.isOpen,
38
- isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
39
- _ref$onContentBlur = _ref.onContentBlur,
40
- onContentBlur = _ref$onContentBlur === void 0 ? _noop.default : _ref$onContentBlur,
41
- _ref$onContentClick = _ref.onContentClick,
42
- onContentClick = _ref$onContentClick === void 0 ? _noop.default : _ref$onContentClick,
43
- _ref$onContentFocus = _ref.onContentFocus,
44
- onContentFocus = _ref$onContentFocus === void 0 ? _noop.default : _ref$onContentFocus,
45
- _ref$onClose = _ref.onClose,
46
- onClose = _ref$onClose === void 0 ? _noop.default : _ref$onClose,
47
- _ref$placement = _ref.placement,
48
- placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
49
- _ref$strategy = _ref.strategy,
50
- strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
36
+ var InlineDialogWithLayering = function InlineDialogWithLayering(_ref) {
37
+ var isOpen = _ref.isOpen,
38
+ onContentBlur = _ref.onContentBlur,
39
+ onContentClick = _ref.onContentClick,
40
+ onContentFocus = _ref.onContentFocus,
41
+ onClose = _ref.onClose,
42
+ placement = _ref.placement,
43
+ strategy = _ref.strategy,
51
44
  testId = _ref.testId,
52
45
  content = _ref.content,
53
46
  children = _ref.children;
47
+ return (0, _react2.jsx)(_layering.UNSAFE_LAYERING, {
48
+ isDisabled: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.inline-message-layering_wfp1p') ? !isOpen : true
49
+ }, (0, _react2.jsx)(InlineDialog, {
50
+ isOpen: isOpen,
51
+ onContentBlur: onContentBlur,
52
+ onContentClick: onContentClick,
53
+ onContentFocus: onContentFocus,
54
+ onClose: onClose,
55
+ placement: placement,
56
+ strategy: strategy,
57
+ testId: testId,
58
+ content: content
59
+ }, children));
60
+ };
61
+ var InlineDialog = exports.InlineDialogWithoutAnalytics = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref2) {
62
+ var _ref2$isOpen = _ref2.isOpen,
63
+ isOpen = _ref2$isOpen === void 0 ? false : _ref2$isOpen,
64
+ _ref2$onContentBlur = _ref2.onContentBlur,
65
+ onContentBlur = _ref2$onContentBlur === void 0 ? _noop.default : _ref2$onContentBlur,
66
+ _ref2$onContentClick = _ref2.onContentClick,
67
+ onContentClick = _ref2$onContentClick === void 0 ? _noop.default : _ref2$onContentClick,
68
+ _ref2$onContentFocus = _ref2.onContentFocus,
69
+ onContentFocus = _ref2$onContentFocus === void 0 ? _noop.default : _ref2$onContentFocus,
70
+ _ref2$onClose = _ref2.onClose,
71
+ onClose = _ref2$onClose === void 0 ? _noop.default : _ref2$onClose,
72
+ _ref2$placement = _ref2.placement,
73
+ placement = _ref2$placement === void 0 ? 'bottom-start' : _ref2$placement,
74
+ _ref2$strategy = _ref2.strategy,
75
+ strategy = _ref2$strategy === void 0 ? 'fixed' : _ref2$strategy,
76
+ testId = _ref2.testId,
77
+ content = _ref2.content,
78
+ children = _ref2.children;
54
79
  var containerRef = (0, _react.useRef)(null);
55
80
  var triggerRef = (0, _react.useRef)(null);
56
81
  // we put this into a ref to avoid handleCloseRequest having this as a dependency
@@ -145,9 +170,9 @@ var InlineDialog = exports.InlineDialogWithoutAnalytics = /*#__PURE__*/(0, _reac
145
170
  var popper = isOpen ? (0, _react2.jsx)(_popper.Popper, {
146
171
  placement: placement,
147
172
  strategy: strategy
148
- }, function (_ref2) {
149
- var _ref3 = _ref2.ref,
150
- style = _ref2.style;
173
+ }, function (_ref3) {
174
+ var _ref4 = _ref3.ref,
175
+ style = _ref3.style;
151
176
  return (0, _react2.jsx)(_container.Container, {
152
177
  onBlur: onContentBlur,
153
178
  onFocus: onContentFocus,
@@ -155,10 +180,10 @@ var InlineDialog = exports.InlineDialogWithoutAnalytics = /*#__PURE__*/(0, _reac
155
180
  ref: function ref(node) {
156
181
  if (node) {
157
182
  containerRef.current = node;
158
- if (typeof _ref3 === 'function') {
159
- _ref3(node);
183
+ if (typeof _ref4 === 'function') {
184
+ _ref4(node);
160
185
  } else {
161
- _ref3.current = node;
186
+ _ref4.current = node;
162
187
  }
163
188
  }
164
189
  }
@@ -168,8 +193,8 @@ var InlineDialog = exports.InlineDialogWithoutAnalytics = /*#__PURE__*/(0, _reac
168
193
  testId: testId
169
194
  }, content);
170
195
  }) : null;
171
- return (0, _react2.jsx)(_popper.Manager, null, (0, _react2.jsx)(_popper.Reference, null, function (_ref4) {
172
- var ref = _ref4.ref;
196
+ return (0, _react2.jsx)(_popper.Manager, null, (0, _react2.jsx)(_popper.Reference, null, function (_ref5) {
197
+ var ref = _ref5.ref;
173
198
  return (0, _react2.jsx)(_reactNodeResolver.default, {
174
199
  innerRef: function innerRef(node) {
175
200
  triggerRef.current = node;
@@ -198,4 +223,4 @@ var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
198
223
  packageVersion: packageVersion
199
224
  }
200
225
  })
201
- })(InlineDialog));
226
+ })(InlineDialogWithLayering));
@@ -10,18 +10,44 @@ import { bind } from 'bind-event-listener';
10
10
  import NodeResolver from 'react-node-resolver';
11
11
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
12
12
  import noop from '@atlaskit/ds-lib/noop';
13
- import { UNSAFE_useLayering } from '@atlaskit/layering';
13
+ import { UNSAFE_LAYERING, UNSAFE_useLayering } from '@atlaskit/layering';
14
14
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
15
  import { Manager, Popper, Reference } from '@atlaskit/popper';
16
16
  import { Container } from './styled/container';
17
17
  const packageName = "@atlaskit/inline-dialog";
18
- const packageVersion = "14.2.0";
18
+ const packageVersion = "14.2.1";
19
19
  const checkIsChildOfPortal = node => {
20
20
  if (!node) {
21
21
  return false;
22
22
  }
23
23
  return node.classList && node.classList.contains('atlaskit-portal-container') || checkIsChildOfPortal(node.parentElement);
24
24
  };
25
+ const InlineDialogWithLayering = ({
26
+ isOpen,
27
+ onContentBlur,
28
+ onContentClick,
29
+ onContentFocus,
30
+ onClose,
31
+ placement,
32
+ strategy,
33
+ testId,
34
+ content,
35
+ children
36
+ }) => {
37
+ return jsx(UNSAFE_LAYERING, {
38
+ isDisabled: getBooleanFF('platform.design-system-team.inline-message-layering_wfp1p') ? !isOpen : true
39
+ }, jsx(InlineDialog, {
40
+ isOpen: isOpen,
41
+ onContentBlur: onContentBlur,
42
+ onContentClick: onContentClick,
43
+ onContentFocus: onContentFocus,
44
+ onClose: onClose,
45
+ placement: placement,
46
+ strategy: strategy,
47
+ testId: testId,
48
+ content: content
49
+ }, children));
50
+ };
25
51
  const InlineDialog = /*#__PURE__*/memo(function InlineDialog({
26
52
  isOpen = false,
27
53
  onContentBlur = noop,
@@ -183,4 +209,4 @@ export default withAnalyticsContext({
183
209
  packageVersion
184
210
  }
185
211
  })
186
- })(InlineDialog));
212
+ })(InlineDialogWithLayering));
@@ -10,36 +10,61 @@ import { bind } from 'bind-event-listener';
10
10
  import NodeResolver from 'react-node-resolver';
11
11
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
12
12
  import noop from '@atlaskit/ds-lib/noop';
13
- import { UNSAFE_useLayering } from '@atlaskit/layering';
13
+ import { UNSAFE_LAYERING, UNSAFE_useLayering } from '@atlaskit/layering';
14
14
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
15
  import { Manager, Popper, Reference } from '@atlaskit/popper';
16
16
  import { Container } from './styled/container';
17
17
  var packageName = "@atlaskit/inline-dialog";
18
- var packageVersion = "14.2.0";
18
+ var packageVersion = "14.2.1";
19
19
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
20
20
  if (!node) {
21
21
  return false;
22
22
  }
23
23
  return node.classList && node.classList.contains('atlaskit-portal-container') || checkIsChildOfPortal(node.parentElement);
24
24
  };
25
- var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
26
- var _ref$isOpen = _ref.isOpen,
27
- isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
28
- _ref$onContentBlur = _ref.onContentBlur,
29
- onContentBlur = _ref$onContentBlur === void 0 ? noop : _ref$onContentBlur,
30
- _ref$onContentClick = _ref.onContentClick,
31
- onContentClick = _ref$onContentClick === void 0 ? noop : _ref$onContentClick,
32
- _ref$onContentFocus = _ref.onContentFocus,
33
- onContentFocus = _ref$onContentFocus === void 0 ? noop : _ref$onContentFocus,
34
- _ref$onClose = _ref.onClose,
35
- onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
36
- _ref$placement = _ref.placement,
37
- placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
38
- _ref$strategy = _ref.strategy,
39
- strategy = _ref$strategy === void 0 ? 'fixed' : _ref$strategy,
25
+ var InlineDialogWithLayering = function InlineDialogWithLayering(_ref) {
26
+ var isOpen = _ref.isOpen,
27
+ onContentBlur = _ref.onContentBlur,
28
+ onContentClick = _ref.onContentClick,
29
+ onContentFocus = _ref.onContentFocus,
30
+ onClose = _ref.onClose,
31
+ placement = _ref.placement,
32
+ strategy = _ref.strategy,
40
33
  testId = _ref.testId,
41
34
  content = _ref.content,
42
35
  children = _ref.children;
36
+ return jsx(UNSAFE_LAYERING, {
37
+ isDisabled: getBooleanFF('platform.design-system-team.inline-message-layering_wfp1p') ? !isOpen : true
38
+ }, jsx(InlineDialog, {
39
+ isOpen: isOpen,
40
+ onContentBlur: onContentBlur,
41
+ onContentClick: onContentClick,
42
+ onContentFocus: onContentFocus,
43
+ onClose: onClose,
44
+ placement: placement,
45
+ strategy: strategy,
46
+ testId: testId,
47
+ content: content
48
+ }, children));
49
+ };
50
+ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref2) {
51
+ var _ref2$isOpen = _ref2.isOpen,
52
+ isOpen = _ref2$isOpen === void 0 ? false : _ref2$isOpen,
53
+ _ref2$onContentBlur = _ref2.onContentBlur,
54
+ onContentBlur = _ref2$onContentBlur === void 0 ? noop : _ref2$onContentBlur,
55
+ _ref2$onContentClick = _ref2.onContentClick,
56
+ onContentClick = _ref2$onContentClick === void 0 ? noop : _ref2$onContentClick,
57
+ _ref2$onContentFocus = _ref2.onContentFocus,
58
+ onContentFocus = _ref2$onContentFocus === void 0 ? noop : _ref2$onContentFocus,
59
+ _ref2$onClose = _ref2.onClose,
60
+ onClose = _ref2$onClose === void 0 ? noop : _ref2$onClose,
61
+ _ref2$placement = _ref2.placement,
62
+ placement = _ref2$placement === void 0 ? 'bottom-start' : _ref2$placement,
63
+ _ref2$strategy = _ref2.strategy,
64
+ strategy = _ref2$strategy === void 0 ? 'fixed' : _ref2$strategy,
65
+ testId = _ref2.testId,
66
+ content = _ref2.content,
67
+ children = _ref2.children;
43
68
  var containerRef = useRef(null);
44
69
  var triggerRef = useRef(null);
45
70
  // we put this into a ref to avoid handleCloseRequest having this as a dependency
@@ -134,9 +159,9 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
134
159
  var popper = isOpen ? jsx(Popper, {
135
160
  placement: placement,
136
161
  strategy: strategy
137
- }, function (_ref2) {
138
- var _ref3 = _ref2.ref,
139
- style = _ref2.style;
162
+ }, function (_ref3) {
163
+ var _ref4 = _ref3.ref,
164
+ style = _ref3.style;
140
165
  return jsx(Container, {
141
166
  onBlur: onContentBlur,
142
167
  onFocus: onContentFocus,
@@ -144,10 +169,10 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
144
169
  ref: function ref(node) {
145
170
  if (node) {
146
171
  containerRef.current = node;
147
- if (typeof _ref3 === 'function') {
148
- _ref3(node);
172
+ if (typeof _ref4 === 'function') {
173
+ _ref4(node);
149
174
  } else {
150
- _ref3.current = node;
175
+ _ref4.current = node;
151
176
  }
152
177
  }
153
178
  }
@@ -157,8 +182,8 @@ var InlineDialog = /*#__PURE__*/memo(function InlineDialog(_ref) {
157
182
  testId: testId
158
183
  }, content);
159
184
  }) : null;
160
- return jsx(Manager, null, jsx(Reference, null, function (_ref4) {
161
- var ref = _ref4.ref;
185
+ return jsx(Manager, null, jsx(Reference, null, function (_ref5) {
186
+ var ref = _ref5.ref;
162
187
  return jsx(NodeResolver, {
163
188
  innerRef: function innerRef(node) {
164
189
  triggerRef.current = node;
@@ -188,4 +213,4 @@ export default withAnalyticsContext({
188
213
  packageVersion: packageVersion
189
214
  }
190
215
  })
191
- })(InlineDialog));
216
+ })(InlineDialogWithLayering));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "14.2.0",
3
+ "version": "14.2.1",
4
4
  "description": "An inline dialog is a pop-up container for small amounts of information. It can also contain controls.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/layering": "^0.3.0",
47
47
  "@atlaskit/platform-feature-flags": "^0.2.0",
48
48
  "@atlaskit/popper": "^6.1.0",
49
- "@atlaskit/theme": "^12.10.0",
49
+ "@atlaskit/theme": "^12.11.0",
50
50
  "@atlaskit/tokens": "^1.51.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",
@@ -60,8 +60,8 @@
60
60
  "@af/accessibility-testing": "*",
61
61
  "@af/integration-testing": "*",
62
62
  "@af/visual-regression": "*",
63
- "@atlaskit/button": "^17.17.0",
64
- "@atlaskit/datetime-picker": "^13.5.0",
63
+ "@atlaskit/button": "^17.22.0",
64
+ "@atlaskit/datetime-picker": "^13.6.0",
65
65
  "@atlaskit/docs": "*",
66
66
  "@atlaskit/modal-dialog": "^12.14.0",
67
67
  "@atlaskit/section-message": "^6.5.0",