@atlaskit/link-datasource 5.4.4 → 5.5.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/common/utils/locale/fetch-messages-for-locale.js +16 -18
  3. package/dist/cjs/hooks/useAssetsClient.js +41 -41
  4. package/dist/cjs/hooks/useDatasourceTableState.js +50 -49
  5. package/dist/cjs/hooks/useLoadOptions.js +8 -8
  6. package/dist/cjs/hooks/useObjectSchemas.js +17 -17
  7. package/dist/cjs/hooks/useValidateAqlText.js +15 -15
  8. package/dist/cjs/services/cmdbService.js +43 -43
  9. package/dist/cjs/services/getAvailableSites.js +19 -19
  10. package/dist/cjs/services/makeGetJqlAutocompleteData.js +19 -19
  11. package/dist/cjs/services/makeGetJqlSuggestionsData.js +17 -17
  12. package/dist/cjs/services/useAvailableSites.js +4 -4
  13. package/dist/cjs/services/useBasicFilterAGG.js +1 -1
  14. package/dist/cjs/state/actions/index.js +11 -11
  15. package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +13 -13
  16. package/dist/cjs/ui/common/error-state/provider-auth-required.js +13 -12
  17. package/dist/cjs/ui/common/modal/popup-select/index.js +1 -1
  18. package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +2 -2
  19. package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +2 -2
  20. package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useBasicFilterHydration.js +12 -12
  21. package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +4 -4
  22. package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +19 -19
  23. package/dist/cjs/ui/issue-like-table/drag-column-preview.compiled.css +1 -1
  24. package/dist/cjs/ui/issue-like-table/drag-column-preview.js +1 -1
  25. package/dist/cjs/ui/issue-like-table/index.js +14 -13
  26. package/dist/cjs/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +25 -23
  27. package/dist/cjs/ui/jira-issues-modal/basic-filters/hooks/useHydrateJqlQuery.js +13 -13
  28. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -2
  29. package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +2 -2
  30. package/dist/es2019/ui/issue-like-table/drag-column-preview.compiled.css +1 -1
  31. package/dist/es2019/ui/issue-like-table/drag-column-preview.js +1 -1
  32. package/dist/esm/common/utils/locale/fetch-messages-for-locale.js +15 -17
  33. package/dist/esm/hooks/useAssetsClient.js +41 -41
  34. package/dist/esm/hooks/useDatasourceTableState.js +50 -49
  35. package/dist/esm/hooks/useLoadOptions.js +8 -8
  36. package/dist/esm/hooks/useObjectSchemas.js +17 -17
  37. package/dist/esm/hooks/useValidateAqlText.js +15 -15
  38. package/dist/esm/services/cmdbService.js +43 -43
  39. package/dist/esm/services/getAvailableSites.js +19 -19
  40. package/dist/esm/services/makeGetJqlAutocompleteData.js +19 -19
  41. package/dist/esm/services/makeGetJqlSuggestionsData.js +17 -17
  42. package/dist/esm/services/useAvailableSites.js +4 -4
  43. package/dist/esm/services/useBasicFilterAGG.js +1 -1
  44. package/dist/esm/state/actions/index.js +11 -11
  45. package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +12 -12
  46. package/dist/esm/ui/common/error-state/provider-auth-required.js +12 -11
  47. package/dist/esm/ui/common/modal/popup-select/index.js +1 -1
  48. package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/messages.js +2 -2
  49. package/dist/esm/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +2 -2
  50. package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useBasicFilterHydration.js +12 -12
  51. package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +4 -4
  52. package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +19 -19
  53. package/dist/esm/ui/issue-like-table/drag-column-preview.compiled.css +1 -1
  54. package/dist/esm/ui/issue-like-table/drag-column-preview.js +1 -1
  55. package/dist/esm/ui/issue-like-table/index.js +13 -12
  56. package/dist/esm/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +25 -23
  57. package/dist/esm/ui/jira-issues-modal/basic-filters/hooks/useHydrateJqlQuery.js +13 -13
  58. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -2
  59. package/link-datasource.docs.tsx +6 -3
  60. package/package.json +13 -13
@@ -58,31 +58,33 @@ export var useFilterOptions = function useFilterOptions(_ref) {
58
58
  response,
59
59
  mappedResponse,
60
60
  mappedTotalCount,
61
- _args = arguments;
62
- return _regeneratorRuntime.wrap(function _callee$(_context) {
61
+ _args = arguments,
62
+ _t,
63
+ _t2;
64
+ return _regeneratorRuntime.wrap(function (_context) {
63
65
  while (1) switch (_context.prev = _context.next) {
64
66
  case 0:
65
67
  _ref4 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, pageCursor = _ref4.pageCursor, searchString = _ref4.searchString;
66
68
  if (cloudId) {
67
- _context.next = 3;
69
+ _context.next = 1;
68
70
  break;
69
71
  }
70
72
  return _context.abrupt("return");
71
- case 3:
73
+ case 1:
72
74
  isNewSearch = !pageCursor;
73
75
  isRequestLikeInitialSearch = !pageCursor && !searchString;
74
76
  initialResponseData = initialData.current;
75
77
  isNewSearch ? setStatus('loading') : setStatus('loadingMore');
76
- _context.prev = 7;
78
+ _context.prev = 2;
77
79
  if (!(isRequestLikeInitialSearch && initialResponseData)) {
78
- _context.next = 12;
80
+ _context.next = 3;
79
81
  break;
80
82
  }
81
- _context.t0 = initialResponseData;
82
- _context.next = 15;
83
+ _t = initialResponseData;
84
+ _context.next = 5;
83
85
  break;
84
- case 12:
85
- _context.next = 14;
86
+ case 3:
87
+ _context.next = 4;
86
88
  return getFieldValues({
87
89
  cloudId: cloudId,
88
90
  jql: '',
@@ -91,18 +93,18 @@ export var useFilterOptions = function useFilterOptions(_ref) {
91
93
  searchString: searchString,
92
94
  pageCursor: pageCursor
93
95
  });
94
- case 14:
95
- _context.t0 = _context.sent;
96
- case 15:
97
- response = _context.t0;
96
+ case 4:
97
+ _t = _context.sent;
98
+ case 5:
99
+ response = _t;
98
100
  if (!(response.errors && response.errors.length > 0)) {
99
- _context.next = 20;
101
+ _context.next = 6;
100
102
  break;
101
103
  }
102
104
  setStatus('rejected');
103
105
  setErrors(response.errors);
104
106
  return _context.abrupt("return");
105
- case 20:
107
+ case 6:
106
108
  mappedResponse = mapFieldValuesToFilterOptions(_objectSpread(_objectSpread({}, response), {}, {
107
109
  siteUrl: siteUrl
108
110
  }));
@@ -137,18 +139,18 @@ export var useFilterOptions = function useFilterOptions(_ref) {
137
139
  setTotalCount(mappedTotalCount);
138
140
  setNextPageCursor(mapFieldValuesToPageCursor(response));
139
141
  setStatus('resolved');
140
- _context.next = 33;
142
+ _context.next = 8;
141
143
  break;
142
- case 29:
143
- _context.prev = 29;
144
- _context.t1 = _context["catch"](7);
144
+ case 7:
145
+ _context.prev = 7;
146
+ _t2 = _context["catch"](2);
145
147
  setStatus('rejected');
146
- setErrors([_context.t1]);
147
- case 33:
148
+ setErrors([_t2]);
149
+ case 8:
148
150
  case "end":
149
151
  return _context.stop();
150
152
  }
151
- }, _callee, null, [[7, 29]]);
153
+ }, _callee, null, [[2, 7]]);
152
154
  })), [cloudId, filterOptions, filterType, formatMessage, getFieldValues, siteUrl]);
153
155
  useEffect(function () {
154
156
  if (status !== 'rejected' && errors.length !== 0) {
@@ -33,24 +33,24 @@ export var useHydrateJqlQuery = function useHydrateJqlQuery(cloudId, jql) {
33
33
  var _useBasicFilterAGG = useBasicFilterAGG(),
34
34
  getHydratedJQL = _useBasicFilterAGG.getHydratedJQL;
35
35
  var fetchHydratedJqlOptions = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
36
- var response, _mapHydrateResponseDa, mappedHydratedAssigneeValue, restOfMappedHydratedResponse, _extractValuesFromNon, text, summary, key, extractedAssigneeValue, _ref2, _ref3, textFieldValue, mappedValues;
37
- return _regeneratorRuntime.wrap(function _callee$(_context) {
36
+ var response, _mapHydrateResponseDa, mappedHydratedAssigneeValue, restOfMappedHydratedResponse, _extractValuesFromNon, text, summary, key, extractedAssigneeValue, _ref2, _ref3, textFieldValue, mappedValues, _t;
37
+ return _regeneratorRuntime.wrap(function (_context) {
38
38
  while (1) switch (_context.prev = _context.next) {
39
39
  case 0:
40
40
  _context.prev = 0;
41
41
  setStatus('loading');
42
- _context.next = 4;
42
+ _context.next = 1;
43
43
  return getHydratedJQL(cloudId, jql);
44
- case 4:
44
+ case 1:
45
45
  response = _context.sent;
46
46
  if (!(response.errors && response.errors.length > 0)) {
47
- _context.next = 9;
47
+ _context.next = 2;
48
48
  break;
49
49
  }
50
50
  setStatus('rejected');
51
51
  setErrors(response.errors);
52
52
  return _context.abrupt("return");
53
- case 9:
53
+ case 2:
54
54
  _mapHydrateResponseDa = mapHydrateResponseData(response), mappedHydratedAssigneeValue = _mapHydrateResponseDa.assignee, restOfMappedHydratedResponse = _objectWithoutProperties(_mapHydrateResponseDa, _excluded);
55
55
  /**
56
56
  * Hydrate logic does not return text field, hence we parse and extract value from jql
@@ -68,18 +68,18 @@ export var useHydrateJqlQuery = function useHydrateJqlQuery(cloudId, jql) {
68
68
  } : {});
69
69
  setHydratedOptions(mappedValues);
70
70
  setStatus('resolved');
71
- _context.next = 21;
71
+ _context.next = 4;
72
72
  break;
73
- case 17:
74
- _context.prev = 17;
75
- _context.t0 = _context["catch"](0);
76
- setErrors([_context.t0]);
73
+ case 3:
74
+ _context.prev = 3;
75
+ _t = _context["catch"](0);
76
+ setErrors([_t]);
77
77
  setStatus('rejected');
78
- case 21:
78
+ case 4:
79
79
  case "end":
80
80
  return _context.stop();
81
81
  }
82
- }, _callee, null, [[0, 17]]);
82
+ }, _callee, null, [[0, 3]]);
83
83
  })), [cloudId, formatMessage, getHydratedJQL, jql]);
84
84
  useEffect(function () {
85
85
  if (status !== 'rejected' && errors.length !== 0) {
@@ -51,12 +51,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
51
51
  handleDebouncedFetchFilterOptions = _useDebouncedCallback2[0];
52
52
  var handleInputChange = useCallback( /*#__PURE__*/function () {
53
53
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(newSearchTerm) {
54
- return _regeneratorRuntime.wrap(function _callee$(_context) {
54
+ return _regeneratorRuntime.wrap(function (_context) {
55
55
  while (1) switch (_context.prev = _context.next) {
56
56
  case 0:
57
57
  setSearchTerm(newSearchTerm);
58
58
  handleDebouncedFetchFilterOptions(newSearchTerm);
59
- case 2:
59
+ case 1:
60
60
  case "end":
61
61
  return _context.stop();
62
62
  }
@@ -41,7 +41,7 @@ const documentation: StructuredContentSource = {
41
41
  'ConfluenceSearchConfigModal for configuring a Confluence search datasource.',
42
42
  source: path.resolve(
43
43
  packagePath,
44
- './docs/examples/basic-confluence-search-config-modal.tsx',
44
+ './examples/content/basic-confluence-search-config-modal.tsx',
45
45
  ),
46
46
  },
47
47
  ],
@@ -71,7 +71,10 @@ const documentation: StructuredContentSource = {
71
71
  {
72
72
  name: 'Jira issues config modal',
73
73
  description: 'JiraIssuesConfigModal for configuring a Jira issues datasource.',
74
- source: path.resolve(packagePath, './docs/examples/basic-jira-issues-config-modal.tsx'),
74
+ source: path.resolve(
75
+ packagePath,
76
+ './examples/content/basic-jira-issues-config-modal.tsx',
77
+ ),
75
78
  },
76
79
  {
77
80
  name: 'Jira issues table',
@@ -105,7 +108,7 @@ const documentation: StructuredContentSource = {
105
108
  {
106
109
  name: 'Assets config modal',
107
110
  description: 'AssetsConfigModal for configuring an Assets datasource.',
108
- source: path.resolve(packagePath, './docs/examples/basic-assets-config-modal.tsx'),
111
+ source: path.resolve(packagePath, './examples/content/basic-assets-config-modal.tsx'),
109
112
  },
110
113
  ],
111
114
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "5.4.4",
3
+ "version": "5.5.1",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,7 +43,7 @@
43
43
  "ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.{svg,png}"
44
44
  },
45
45
  "dependencies": {
46
- "@atlaskit/adf-schema": "^52.14.0",
46
+ "@atlaskit/adf-schema": "^52.15.0",
47
47
  "@atlaskit/afm-i18n-platform-linking-platform-link-datasource": "2.7.0",
48
48
  "@atlaskit/analytics-next": "^11.2.0",
49
49
  "@atlaskit/atlassian-context": "^0.9.0",
@@ -52,15 +52,15 @@
52
52
  "@atlaskit/badge": "^18.6.0",
53
53
  "@atlaskit/button": "^23.11.0",
54
54
  "@atlaskit/css": "^0.19.0",
55
- "@atlaskit/datetime-picker": "^17.8.0",
56
- "@atlaskit/dropdown-menu": "^16.9.0",
55
+ "@atlaskit/datetime-picker": "^17.9.0",
56
+ "@atlaskit/dropdown-menu": "^16.10.0",
57
57
  "@atlaskit/editor-prosemirror": "^7.3.0",
58
58
  "@atlaskit/empty-state": "^10.2.0",
59
59
  "@atlaskit/feature-gate-js-client": "^5.7.0",
60
60
  "@atlaskit/flag": "^17.12.0",
61
61
  "@atlaskit/form": "^15.5.0",
62
62
  "@atlaskit/heading": "^5.4.0",
63
- "@atlaskit/icon": "^35.1.0",
63
+ "@atlaskit/icon": "^35.3.0",
64
64
  "@atlaskit/image": "^3.0.0",
65
65
  "@atlaskit/inline-edit": "^15.6.0",
66
66
  "@atlaskit/intl-messages-provider": "^3.3.0",
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/link": "^3.4.0",
72
72
  "@atlaskit/link-client-extension": "^6.1.0",
73
73
  "@atlaskit/link-provider": "^4.4.0",
74
- "@atlaskit/linking-common": "^9.11.0",
74
+ "@atlaskit/linking-common": "^9.12.0",
75
75
  "@atlaskit/linking-types": "^14.4.0",
76
76
  "@atlaskit/logo": "^20.1.0",
77
77
  "@atlaskit/lozenge": "^13.8.0",
@@ -79,7 +79,7 @@
79
79
  "@atlaskit/object": "^1.0.0",
80
80
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
81
81
  "@atlaskit/platform-feature-flags": "^1.1.0",
82
- "@atlaskit/popup": "^4.21.0",
82
+ "@atlaskit/popup": "^4.23.0",
83
83
  "@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
84
84
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
85
85
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^2.0.0",
@@ -87,17 +87,17 @@
87
87
  "@atlaskit/primitives": "^19.0.0",
88
88
  "@atlaskit/react-select": "^3.16.0",
89
89
  "@atlaskit/select": "^21.12.0",
90
- "@atlaskit/smart-card": "^44.16.0",
91
- "@atlaskit/smart-user-picker": "^10.1.0",
90
+ "@atlaskit/smart-card": "^44.18.0",
91
+ "@atlaskit/smart-user-picker": "^10.2.0",
92
92
  "@atlaskit/spinner": "^19.1.0",
93
93
  "@atlaskit/tag": "^14.14.0",
94
94
  "@atlaskit/textfield": "^8.3.0",
95
95
  "@atlaskit/theme": "^25.0.0",
96
- "@atlaskit/tokens": "^13.0.0",
97
- "@atlaskit/tooltip": "^22.3.0",
96
+ "@atlaskit/tokens": "^13.1.0",
97
+ "@atlaskit/tooltip": "^22.5.0",
98
98
  "@atlaskit/ufo": "^0.5.0",
99
99
  "@atlaskit/width-detector": "^5.1.0",
100
- "@atlassian/assets-workspace-host": "^0.4.0",
100
+ "@atlassian/assets-workspace-host": "^0.5.0",
101
101
  "@babel/runtime": "^7.0.0",
102
102
  "@compiled/react": "^0.20.0",
103
103
  "@types/dompurify": "^2.2.3",
@@ -119,7 +119,7 @@
119
119
  "@af/integration-testing": "workspace:^",
120
120
  "@af/visual-regression": "workspace:^",
121
121
  "@atlaskit/json-ld-types": "^1.5.0",
122
- "@atlaskit/link-test-helpers": "^10.3.0",
122
+ "@atlaskit/link-test-helpers": "^10.4.0",
123
123
  "@atlaskit/ssr": "workspace:^",
124
124
  "@atlassian/a11y-jest-testing": "^0.11.0",
125
125
  "@atlassian/a11y-playwright-testing": "^0.10.0",