carbon-addons-iot-react 2.149.1-next.2 → 2.150.0-next.0

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.150.0-next.0](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.149.1-next.2...v2.150.0-next.0) (2022-06-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **SuiteHeader:** Including workspaceId in the `GET /uiresources` API call to make sure that the app data returned by the api matches the selected workspace. ([d1e2d3b](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/d1e2d3bc60f0878f8364c3292804689bc56565e3))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.149.1-next.2](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.149.1-next.1...v2.149.1-next.2) (2022-05-31)
7
18
 
8
19
 
@@ -10,6 +10,8 @@ var useUiResources = function useUiResources(_ref) {
10
10
  lang = _ref$lang === void 0 ? 'en' : _ref$lang,
11
11
  _ref$surveyId = _ref.surveyId,
12
12
  surveyId = _ref$surveyId === void 0 ? null : _ref$surveyId,
13
+ _ref$workspaceId = _ref.workspaceId,
14
+ workspaceId = _ref$workspaceId === void 0 ? null : _ref$workspaceId,
13
15
  _ref$fetchApi = _ref.fetchApi,
14
16
  fetchApi = _ref$fetchApi === void 0 ? defaultFetchApi : _ref$fetchApi,
15
17
  _ref$isTest = _ref.isTest,
@@ -51,6 +53,7 @@ var useUiResources = function useUiResources(_ref) {
51
53
  baseApiUrl: baseApiUrl,
52
54
  lang: lang,
53
55
  surveyId: surveyId,
56
+ workspaceId: workspaceId,
54
57
  fetchApi: fetchApi,
55
58
  isTest: isTest
56
59
  });
@@ -77,7 +80,7 @@ var useUiResources = function useUiResources(_ref) {
77
80
  }
78
81
  }
79
82
  }, _callee, null, [[0, 8, 11, 14]]);
80
- })), [baseApiUrl, lang, surveyId, isTest, setIsLoading]); // eslint-disable-line react-hooks/exhaustive-deps
83
+ })), [baseApiUrl, lang, surveyId, workspaceId, isTest, setIsLoading]); // eslint-disable-line react-hooks/exhaustive-deps
81
84
 
82
85
  useEffect(function () {
83
86
  // load actual data
@@ -46,13 +46,13 @@ var defaultFetchApi = /*#__PURE__*/function () {
46
46
 
47
47
  var getUiResourcesData = /*#__PURE__*/function () {
48
48
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
49
- var baseApiUrl, _ref2$lang, lang, _ref2$surveyId, surveyId, _ref2$fetchApi, fetchApi, _ref2$isTest, isTest, api, langParam, surveyIdParam;
49
+ var baseApiUrl, _ref2$lang, lang, _ref2$surveyId, surveyId, _ref2$workspaceId, workspaceId, _ref2$fetchApi, fetchApi, _ref2$isTest, isTest, api, langParam, surveyIdParam, workspaceIdParam;
50
50
 
51
51
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
52
52
  while (1) {
53
53
  switch (_context2.prev = _context2.next) {
54
54
  case 0:
55
- baseApiUrl = _ref2.baseApiUrl, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, _ref2$surveyId = _ref2.surveyId, surveyId = _ref2$surveyId === void 0 ? null : _ref2$surveyId, _ref2$fetchApi = _ref2.fetchApi, fetchApi = _ref2$fetchApi === void 0 ? defaultFetchApi : _ref2$fetchApi, _ref2$isTest = _ref2.isTest, isTest = _ref2$isTest === void 0 ? false : _ref2$isTest;
55
+ baseApiUrl = _ref2.baseApiUrl, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, _ref2$surveyId = _ref2.surveyId, surveyId = _ref2$surveyId === void 0 ? null : _ref2$surveyId, _ref2$workspaceId = _ref2.workspaceId, workspaceId = _ref2$workspaceId === void 0 ? null : _ref2$workspaceId, _ref2$fetchApi = _ref2.fetchApi, fetchApi = _ref2$fetchApi === void 0 ? defaultFetchApi : _ref2$fetchApi, _ref2$isTest = _ref2.isTest, isTest = _ref2$isTest === void 0 ? false : _ref2$isTest;
56
56
 
57
57
  api = function api(method, path, body, headers) {
58
58
  return fetchApi(method, "".concat(baseApiUrl).concat(path), body, headers, isTest ? fixture[path.split('?')[0]] : null);
@@ -60,9 +60,10 @@ var getUiResourcesData = /*#__PURE__*/function () {
60
60
 
61
61
  langParam = "&lang=".concat(lang);
62
62
  surveyIdParam = surveyId ? "&surveyId=".concat(surveyId) : '';
63
- return _context2.abrupt("return", api('GET', "/uiresources?id=masthead".concat(langParam).concat(surveyIdParam)));
63
+ workspaceIdParam = workspaceId ? "&workspaceId=".concat(workspaceId) : '';
64
+ return _context2.abrupt("return", api('GET', "/uiresources?id=masthead".concat(langParam).concat(surveyIdParam).concat(workspaceIdParam)));
64
65
 
65
- case 5:
66
+ case 6:
66
67
  case "end":
67
68
  return _context2.stop();
68
69
  }
@@ -18,6 +18,8 @@ var useUiResources = function useUiResources(_ref) {
18
18
  lang = _ref$lang === void 0 ? 'en' : _ref$lang,
19
19
  _ref$surveyId = _ref.surveyId,
20
20
  surveyId = _ref$surveyId === void 0 ? null : _ref$surveyId,
21
+ _ref$workspaceId = _ref.workspaceId,
22
+ workspaceId = _ref$workspaceId === void 0 ? null : _ref$workspaceId,
21
23
  _ref$fetchApi = _ref.fetchApi,
22
24
  fetchApi = _ref$fetchApi === void 0 ? uiresources.defaultFetchApi : _ref$fetchApi,
23
25
  _ref$isTest = _ref.isTest,
@@ -59,6 +61,7 @@ var useUiResources = function useUiResources(_ref) {
59
61
  baseApiUrl: baseApiUrl,
60
62
  lang: lang,
61
63
  surveyId: surveyId,
64
+ workspaceId: workspaceId,
62
65
  fetchApi: fetchApi,
63
66
  isTest: isTest
64
67
  });
@@ -85,7 +88,7 @@ var useUiResources = function useUiResources(_ref) {
85
88
  }
86
89
  }
87
90
  }, _callee, null, [[0, 8, 11, 14]]);
88
- })), [baseApiUrl, lang, surveyId, isTest, setIsLoading]); // eslint-disable-line react-hooks/exhaustive-deps
91
+ })), [baseApiUrl, lang, surveyId, workspaceId, isTest, setIsLoading]); // eslint-disable-line react-hooks/exhaustive-deps
89
92
 
90
93
  React.useEffect(function () {
91
94
  // load actual data
@@ -55,13 +55,13 @@ var defaultFetchApi = /*#__PURE__*/function () {
55
55
 
56
56
  var getUiResourcesData = /*#__PURE__*/function () {
57
57
  var _ref3 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
58
- var baseApiUrl, _ref2$lang, lang, _ref2$surveyId, surveyId, _ref2$fetchApi, fetchApi, _ref2$isTest, isTest, api, langParam, surveyIdParam;
58
+ var baseApiUrl, _ref2$lang, lang, _ref2$surveyId, surveyId, _ref2$workspaceId, workspaceId, _ref2$fetchApi, fetchApi, _ref2$isTest, isTest, api, langParam, surveyIdParam, workspaceIdParam;
59
59
 
60
60
  return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
61
61
  while (1) {
62
62
  switch (_context2.prev = _context2.next) {
63
63
  case 0:
64
- baseApiUrl = _ref2.baseApiUrl, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, _ref2$surveyId = _ref2.surveyId, surveyId = _ref2$surveyId === void 0 ? null : _ref2$surveyId, _ref2$fetchApi = _ref2.fetchApi, fetchApi = _ref2$fetchApi === void 0 ? defaultFetchApi : _ref2$fetchApi, _ref2$isTest = _ref2.isTest, isTest = _ref2$isTest === void 0 ? false : _ref2$isTest;
64
+ baseApiUrl = _ref2.baseApiUrl, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, _ref2$surveyId = _ref2.surveyId, surveyId = _ref2$surveyId === void 0 ? null : _ref2$surveyId, _ref2$workspaceId = _ref2.workspaceId, workspaceId = _ref2$workspaceId === void 0 ? null : _ref2$workspaceId, _ref2$fetchApi = _ref2.fetchApi, fetchApi = _ref2$fetchApi === void 0 ? defaultFetchApi : _ref2$fetchApi, _ref2$isTest = _ref2.isTest, isTest = _ref2$isTest === void 0 ? false : _ref2$isTest;
65
65
 
66
66
  api = function api(method, path, body, headers) {
67
67
  return fetchApi(method, "".concat(baseApiUrl).concat(path), body, headers, isTest ? uiresources_fixture[path.split('?')[0]] : null);
@@ -69,9 +69,10 @@ var getUiResourcesData = /*#__PURE__*/function () {
69
69
 
70
70
  langParam = "&lang=".concat(lang);
71
71
  surveyIdParam = surveyId ? "&surveyId=".concat(surveyId) : '';
72
- return _context2.abrupt("return", api('GET', "/uiresources?id=masthead".concat(langParam).concat(surveyIdParam)));
72
+ workspaceIdParam = workspaceId ? "&workspaceId=".concat(workspaceId) : '';
73
+ return _context2.abrupt("return", api('GET', "/uiresources?id=masthead".concat(langParam).concat(surveyIdParam).concat(workspaceIdParam)));
73
74
 
74
- case 5:
75
+ case 6:
75
76
  case "end":
76
77
  return _context2.stop();
77
78
  }
package/package.json CHANGED
@@ -340,10 +340,10 @@
340
340
  "whatwg-fetch": "^3.0.0"
341
341
  },
342
342
  "sideEffects": false,
343
- "version": "2.149.1-next.2",
343
+ "version": "2.150.0-next.0",
344
344
  "resolutions": {
345
345
  "chokidar": "3.3.1",
346
346
  "react-grid-layout": "1.2.2"
347
347
  },
348
- "gitHead": "6373f5a17b3eeb8a1ac8e69e74bbddd6955f6c0a"
348
+ "gitHead": "b42d923b69f7cb63baa238feac2693277b6711d4"
349
349
  }
@@ -122058,13 +122058,13 @@
122058
122058
 
122059
122059
  var getUiResourcesData = /*#__PURE__*/function () {
122060
122060
  var _ref3 = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref2) {
122061
- var baseApiUrl, _ref2$lang, lang, _ref2$surveyId, surveyId, _ref2$fetchApi, fetchApi, _ref2$isTest, isTest, api, langParam, surveyIdParam;
122061
+ var baseApiUrl, _ref2$lang, lang, _ref2$surveyId, surveyId, _ref2$workspaceId, workspaceId, _ref2$fetchApi, fetchApi, _ref2$isTest, isTest, api, langParam, surveyIdParam, workspaceIdParam;
122062
122062
 
122063
122063
  return regenerator.wrap(function _callee2$(_context2) {
122064
122064
  while (1) {
122065
122065
  switch (_context2.prev = _context2.next) {
122066
122066
  case 0:
122067
- baseApiUrl = _ref2.baseApiUrl, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, _ref2$surveyId = _ref2.surveyId, surveyId = _ref2$surveyId === void 0 ? null : _ref2$surveyId, _ref2$fetchApi = _ref2.fetchApi, fetchApi = _ref2$fetchApi === void 0 ? defaultFetchApi : _ref2$fetchApi, _ref2$isTest = _ref2.isTest, isTest = _ref2$isTest === void 0 ? false : _ref2$isTest;
122067
+ baseApiUrl = _ref2.baseApiUrl, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, _ref2$surveyId = _ref2.surveyId, surveyId = _ref2$surveyId === void 0 ? null : _ref2$surveyId, _ref2$workspaceId = _ref2.workspaceId, workspaceId = _ref2$workspaceId === void 0 ? null : _ref2$workspaceId, _ref2$fetchApi = _ref2.fetchApi, fetchApi = _ref2$fetchApi === void 0 ? defaultFetchApi : _ref2$fetchApi, _ref2$isTest = _ref2.isTest, isTest = _ref2$isTest === void 0 ? false : _ref2$isTest;
122068
122068
 
122069
122069
  api = function api(method, path, body, headers) {
122070
122070
  return fetchApi(method, "".concat(baseApiUrl).concat(path), body, headers, isTest ? fixture[path.split('?')[0]] : null);
@@ -122072,9 +122072,10 @@
122072
122072
 
122073
122073
  langParam = "&lang=".concat(lang);
122074
122074
  surveyIdParam = surveyId ? "&surveyId=".concat(surveyId) : '';
122075
- return _context2.abrupt("return", api('GET', "/uiresources?id=masthead".concat(langParam).concat(surveyIdParam)));
122075
+ workspaceIdParam = workspaceId ? "&workspaceId=".concat(workspaceId) : '';
122076
+ return _context2.abrupt("return", api('GET', "/uiresources?id=masthead".concat(langParam).concat(surveyIdParam).concat(workspaceIdParam)));
122076
122077
 
122077
- case 5:
122078
+ case 6:
122078
122079
  case "end":
122079
122080
  return _context2.stop();
122080
122081
  }
@@ -122093,6 +122094,8 @@
122093
122094
  lang = _ref$lang === void 0 ? 'en' : _ref$lang,
122094
122095
  _ref$surveyId = _ref.surveyId,
122095
122096
  surveyId = _ref$surveyId === void 0 ? null : _ref$surveyId,
122097
+ _ref$workspaceId = _ref.workspaceId,
122098
+ workspaceId = _ref$workspaceId === void 0 ? null : _ref$workspaceId,
122096
122099
  _ref$fetchApi = _ref.fetchApi,
122097
122100
  fetchApi = _ref$fetchApi === void 0 ? defaultFetchApi : _ref$fetchApi,
122098
122101
  _ref$isTest = _ref.isTest,
@@ -122134,6 +122137,7 @@
122134
122137
  baseApiUrl: baseApiUrl,
122135
122138
  lang: lang,
122136
122139
  surveyId: surveyId,
122140
+ workspaceId: workspaceId,
122137
122141
  fetchApi: fetchApi,
122138
122142
  isTest: isTest
122139
122143
  });
@@ -122160,7 +122164,7 @@
122160
122164
  }
122161
122165
  }
122162
122166
  }, _callee, null, [[0, 8, 11, 14]]);
122163
- })), [baseApiUrl, lang, surveyId, isTest, setIsLoading]); // eslint-disable-line react-hooks/exhaustive-deps
122167
+ })), [baseApiUrl, lang, surveyId, workspaceId, isTest, setIsLoading]); // eslint-disable-line react-hooks/exhaustive-deps
122164
122168
 
122165
122169
  React$1.useEffect(function () {
122166
122170
  // load actual data