@atlaskit/onboarding 14.4.2 → 14.4.3

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,12 @@
1
1
  # @atlaskit/onboarding
2
2
 
3
+ ## 14.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b64b505de466e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b64b505de466e) -
8
+ fix: Resolve `this` binding issue that caused new `checkVisibility` function to throw an error
9
+
3
10
  ## 14.4.2
4
11
 
5
12
  ### Patch Changes
@@ -20,9 +20,9 @@ function useSpotlight() {
20
20
  return !!targetRef.current[target];
21
21
  }, []);
22
22
  var checkVisibility = (0, _react.useCallback)(function (target) {
23
- var _targetRef$current$ta;
24
- return ((_targetRef$current$ta = targetRef.current[target]) === null || _targetRef$current$ta === void 0 ? void 0 : _targetRef$current$ta.checkVisibility) || function () {
25
- return false;
23
+ return function (options) {
24
+ var _targetRef$current$ta, _targetRef$current$ta2, _targetRef$current$ta3;
25
+ return (_targetRef$current$ta = (_targetRef$current$ta2 = targetRef.current[target]) === null || _targetRef$current$ta2 === void 0 || (_targetRef$current$ta3 = _targetRef$current$ta2.checkVisibility) === null || _targetRef$current$ta3 === void 0 ? void 0 : _targetRef$current$ta3.call(_targetRef$current$ta2, options)) !== null && _targetRef$current$ta !== void 0 ? _targetRef$current$ta : false;
26
26
  };
27
27
  }, []);
28
28
  return (0, _react.useMemo)(function () {
@@ -13,9 +13,9 @@ export default function useSpotlight() {
13
13
  targetRef.current = targets;
14
14
  }, [targets]);
15
15
  const isTargetRendered = useCallback(target => !!targetRef.current[target], []);
16
- const checkVisibility = useCallback(target => {
17
- var _targetRef$current$ta;
18
- return ((_targetRef$current$ta = targetRef.current[target]) === null || _targetRef$current$ta === void 0 ? void 0 : _targetRef$current$ta.checkVisibility) || (() => false);
16
+ const checkVisibility = useCallback(target => options => {
17
+ var _targetRef$current$ta, _targetRef$current$ta2, _targetRef$current$ta3;
18
+ return (_targetRef$current$ta = (_targetRef$current$ta2 = targetRef.current[target]) === null || _targetRef$current$ta2 === void 0 ? void 0 : (_targetRef$current$ta3 = _targetRef$current$ta2.checkVisibility) === null || _targetRef$current$ta3 === void 0 ? void 0 : _targetRef$current$ta3.call(_targetRef$current$ta2, options)) !== null && _targetRef$current$ta !== void 0 ? _targetRef$current$ta : false;
19
19
  }, []);
20
20
  return useMemo(() => ({
21
21
  isTargetRendered,
@@ -15,9 +15,9 @@ export default function useSpotlight() {
15
15
  return !!targetRef.current[target];
16
16
  }, []);
17
17
  var checkVisibility = useCallback(function (target) {
18
- var _targetRef$current$ta;
19
- return ((_targetRef$current$ta = targetRef.current[target]) === null || _targetRef$current$ta === void 0 ? void 0 : _targetRef$current$ta.checkVisibility) || function () {
20
- return false;
18
+ return function (options) {
19
+ var _targetRef$current$ta, _targetRef$current$ta2, _targetRef$current$ta3;
20
+ return (_targetRef$current$ta = (_targetRef$current$ta2 = targetRef.current[target]) === null || _targetRef$current$ta2 === void 0 || (_targetRef$current$ta3 = _targetRef$current$ta2.checkVisibility) === null || _targetRef$current$ta3 === void 0 ? void 0 : _targetRef$current$ta3.call(_targetRef$current$ta2, options)) !== null && _targetRef$current$ta !== void 0 ? _targetRef$current$ta : false;
21
21
  };
22
22
  }, []);
23
23
  return useMemo(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/onboarding",
3
- "version": "14.4.2",
3
+ "version": "14.4.3",
4
4
  "description": "An onboarding spotlight introduces new features to users through focused messages or multi-step tours.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -77,7 +77,7 @@
77
77
  "@af/accessibility-testing": "workspace:^",
78
78
  "@af/integration-testing": "workspace:^",
79
79
  "@af/visual-regression": "workspace:^",
80
- "@atlaskit/theme": "^20.0.0",
80
+ "@atlaskit/theme": "^21.0.0",
81
81
  "@atlassian/ssr-tests": "^0.3.0",
82
82
  "@testing-library/react": "^13.4.0",
83
83
  "@testing-library/react-hooks": "^8.0.1",