@atlaskit/link-datasource 1.22.3 → 1.22.4

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,11 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.22.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#71047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71047) [`931a7edba41e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/931a7edba41e) - update window.location usage to be compatible with SSR
8
+
3
9
  ## 1.22.3
4
10
 
5
11
  ### Patch Changes
@@ -199,7 +199,10 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
199
199
  return jiraSite.cloudId === cloudId;
200
200
  });
201
201
  } else {
202
- var currentlyLoggedInSiteUrl = window.location.origin;
202
+ var currentlyLoggedInSiteUrl;
203
+ if (typeof window.location !== 'undefined') {
204
+ currentlyLoggedInSiteUrl = window.location.origin;
205
+ }
203
206
  return (availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(function (jiraSite) {
204
207
  return jiraSite.url === currentlyLoggedInSiteUrl;
205
208
  })) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
@@ -161,7 +161,10 @@ export const PlainJiraIssuesConfigModal = props => {
161
161
  if (cloudId) {
162
162
  return availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(jiraSite => jiraSite.cloudId === cloudId);
163
163
  } else {
164
- const currentlyLoggedInSiteUrl = window.location.origin;
164
+ let currentlyLoggedInSiteUrl;
165
+ if (typeof window.location !== 'undefined') {
166
+ currentlyLoggedInSiteUrl = window.location.origin;
167
+ }
165
168
  return (availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(jiraSite => jiraSite.url === currentlyLoggedInSiteUrl)) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
166
169
  }
167
170
  }, [availableSites, cloudId]);
@@ -190,7 +190,10 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
190
190
  return jiraSite.cloudId === cloudId;
191
191
  });
192
192
  } else {
193
- var currentlyLoggedInSiteUrl = window.location.origin;
193
+ var currentlyLoggedInSiteUrl;
194
+ if (typeof window.location !== 'undefined') {
195
+ currentlyLoggedInSiteUrl = window.location.origin;
196
+ }
194
197
  return (availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(function (jiraSite) {
195
198
  return jiraSite.url === currentlyLoggedInSiteUrl;
196
199
  })) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.22.3",
3
+ "version": "1.22.4",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,12 +61,12 @@
61
61
  "@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.18.0",
62
62
  "@atlaskit/primitives": "^2.0.0",
63
63
  "@atlaskit/select": "^17.0.3",
64
- "@atlaskit/smart-card": "^26.46.0",
64
+ "@atlaskit/smart-card": "^26.47.0",
65
65
  "@atlaskit/spinner": "^16.0.0",
66
66
  "@atlaskit/tag": "^12.0.0",
67
67
  "@atlaskit/textfield": "6.0.0",
68
68
  "@atlaskit/theme": "^12.6.0",
69
- "@atlaskit/tokens": "^1.35.0",
69
+ "@atlaskit/tokens": "^1.36.0",
70
70
  "@atlaskit/tooltip": "^18.1.0",
71
71
  "@atlaskit/ufo": "^0.2.4",
72
72
  "@atlaskit/width-detector": "^4.1.7",