@atlaskit/link-datasource 4.34.6 → 4.34.8

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 (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/services/getAvailableSites.js +15 -13
  3. package/dist/cjs/ui/issue-like-table/render-type/link/index.js +2 -1
  4. package/dist/es2019/services/getAvailableSites.js +3 -1
  5. package/dist/es2019/ui/issue-like-table/render-type/link/index.js +2 -1
  6. package/dist/esm/services/getAvailableSites.js +15 -13
  7. package/dist/esm/ui/issue-like-table/render-type/link/index.js +2 -1
  8. package/dist/types/analytics/index.d.ts +2 -3
  9. package/dist/types/analytics/wrappers/render-failed/datasourceRenderFailedAnalyticsWrapper.d.ts +2 -1
  10. package/dist/types/services/cmdbService.d.ts +2 -2
  11. package/dist/types/state/actions/index.d.ts +6 -6
  12. package/dist/types/state/index.d.ts +4 -4
  13. package/dist/types/ui/assets-modal/modal/index.d.ts +7 -1
  14. package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +14 -6
  15. package/dist/types/ui/issue-like-table/index.d.ts +2 -1
  16. package/dist/types/ui/issue-like-table/render-type/icon/index.d.ts +1 -1
  17. package/dist/types/ui/issue-like-table/render-type/link/index.d.ts +2 -2
  18. package/dist/types/ui/issue-like-table/utils.d.ts +5 -4
  19. package/dist/types-ts4.5/analytics/index.d.ts +2 -7
  20. package/dist/types-ts4.5/analytics/wrappers/render-failed/datasourceRenderFailedAnalyticsWrapper.d.ts +2 -1
  21. package/dist/types-ts4.5/services/cmdbService.d.ts +2 -2
  22. package/dist/types-ts4.5/state/actions/index.d.ts +6 -6
  23. package/dist/types-ts4.5/state/index.d.ts +4 -4
  24. package/dist/types-ts4.5/ui/assets-modal/modal/index.d.ts +7 -1
  25. package/dist/types-ts4.5/ui/datasource-table-view/datasourceTableView.d.ts +14 -6
  26. package/dist/types-ts4.5/ui/issue-like-table/index.d.ts +2 -1
  27. package/dist/types-ts4.5/ui/issue-like-table/render-type/icon/index.d.ts +1 -1
  28. package/dist/types-ts4.5/ui/issue-like-table/render-type/link/index.d.ts +2 -2
  29. package/dist/types-ts4.5/ui/issue-like-table/utils.d.ts +5 -4
  30. package/examples-helpers/smartLinkCustomClient.ts +2 -2
  31. package/package.json +12 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 4.34.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7f6cbe29c21d8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7f6cbe29c21d8) -
8
+ Switch /gateway/api/v2/accessible-products endpoints to unit-compliant path
9
+ /gateway/api/experimental/v2/accessible-products behind the
10
+ `linking_platform_link_datasource_unit_compliant` feature gate
11
+ - Updated dependencies
12
+
13
+ ## 4.34.7
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 4.34.6
4
20
 
5
21
  ### Patch Changes
@@ -8,9 +8,10 @@ exports.getAccessibleProducts = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _hooks = require("@atlaskit/linking-common/hooks");
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var getAccessibleProducts = exports.getAccessibleProducts = /*#__PURE__*/function () {
12
13
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(product) {
13
- var requestConfig, response, res;
14
+ var requestConfig, endpoint, response, res;
14
15
  return _regenerator.default.wrap(function _callee$(_context) {
15
16
  while (1) switch (_context.prev = _context.next) {
16
17
  case 0:
@@ -26,34 +27,35 @@ var getAccessibleProducts = exports.getAccessibleProducts = /*#__PURE__*/functio
26
27
  productIds: product === 'confluence' ? ['confluence.ondemand'] : ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
27
28
  })
28
29
  };
29
- _context.next = 3;
30
- return fetch("/gateway/api/v2/accessible-products", requestConfig);
31
- case 3:
30
+ endpoint = (0, _platformFeatureFlags.fg)('linking_platform_link_datasource_unit_compliant') ? '/gateway/api/experimental/v2/accessible-products' : '/gateway/api/v2/accessible-products';
31
+ _context.next = 4;
32
+ return fetch(endpoint, requestConfig);
33
+ case 4:
32
34
  response = _context.sent;
33
35
  if (!response.ok) {
34
- _context.next = 9;
36
+ _context.next = 10;
35
37
  break;
36
38
  }
37
- _context.next = 7;
39
+ _context.next = 8;
38
40
  return response.json();
39
- case 7:
41
+ case 8:
40
42
  res = _context.sent;
41
43
  return _context.abrupt("return", (0, _hooks.mapAccessibleProductsToAvailableSites)(res.data));
42
- case 9:
44
+ case 10:
43
45
  _context.t0 = Error;
44
- _context.next = 12;
46
+ _context.next = 13;
45
47
  return response.text();
46
- case 12:
48
+ case 13:
47
49
  _context.t1 = _context.sent;
48
50
  if (_context.t1) {
49
- _context.next = 15;
51
+ _context.next = 16;
50
52
  break;
51
53
  }
52
54
  _context.t1 = 'Something went wrong';
53
- case 15:
55
+ case 16:
54
56
  _context.t2 = _context.t1;
55
57
  throw new _context.t0(_context.t2);
56
- case 17:
58
+ case 18:
57
59
  case "end":
58
60
  return _context.stop();
59
61
  }
@@ -65,4 +65,5 @@ var LinkRenderType = function LinkRenderType(_ref) {
65
65
  }
66
66
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, text ? anchor : /*#__PURE__*/_react.default.createElement(SmartCard, null), /*#__PURE__*/_react.default.createElement("br", null));
67
67
  };
68
- var _default = exports.default = /*#__PURE__*/_react.default.memo(LinkRenderType);
68
+ var _default_1 = /*#__PURE__*/_react.default.memo(LinkRenderType);
69
+ var _default = exports.default = _default_1;
@@ -1,4 +1,5 @@
1
1
  import { mapAccessibleProductsToAvailableSites } from '@atlaskit/linking-common/hooks';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  export const getAccessibleProducts = async product => {
3
4
  const requestConfig = {
4
5
  method: 'POST',
@@ -12,7 +13,8 @@ export const getAccessibleProducts = async product => {
12
13
  productIds: product === 'confluence' ? ['confluence.ondemand'] : ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
13
14
  })
14
15
  };
15
- const response = await fetch(`/gateway/api/v2/accessible-products`, requestConfig);
16
+ const endpoint = fg('linking_platform_link_datasource_unit_compliant') ? '/gateway/api/experimental/v2/accessible-products' : '/gateway/api/v2/accessible-products';
17
+ const response = await fetch(endpoint, requestConfig);
16
18
  if (response.ok) {
17
19
  const res = await response.json();
18
20
  return mapAccessibleProductsToAvailableSites(res.data);
@@ -52,4 +52,5 @@ const LinkRenderType = ({
52
52
  }
53
53
  return /*#__PURE__*/React.createElement(React.Fragment, null, text ? anchor : /*#__PURE__*/React.createElement(SmartCard, null), /*#__PURE__*/React.createElement("br", null));
54
54
  };
55
- export default /*#__PURE__*/React.memo(LinkRenderType);
55
+ const _default_1 = /*#__PURE__*/React.memo(LinkRenderType);
56
+ export default _default_1;
@@ -1,9 +1,10 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { mapAccessibleProductsToAvailableSites } from '@atlaskit/linking-common/hooks';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  export var getAccessibleProducts = /*#__PURE__*/function () {
5
6
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(product) {
6
- var requestConfig, response, res;
7
+ var requestConfig, endpoint, response, res;
7
8
  return _regeneratorRuntime.wrap(function _callee$(_context) {
8
9
  while (1) switch (_context.prev = _context.next) {
9
10
  case 0:
@@ -19,34 +20,35 @@ export var getAccessibleProducts = /*#__PURE__*/function () {
19
20
  productIds: product === 'confluence' ? ['confluence.ondemand'] : ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
20
21
  })
21
22
  };
22
- _context.next = 3;
23
- return fetch("/gateway/api/v2/accessible-products", requestConfig);
24
- case 3:
23
+ endpoint = fg('linking_platform_link_datasource_unit_compliant') ? '/gateway/api/experimental/v2/accessible-products' : '/gateway/api/v2/accessible-products';
24
+ _context.next = 4;
25
+ return fetch(endpoint, requestConfig);
26
+ case 4:
25
27
  response = _context.sent;
26
28
  if (!response.ok) {
27
- _context.next = 9;
29
+ _context.next = 10;
28
30
  break;
29
31
  }
30
- _context.next = 7;
32
+ _context.next = 8;
31
33
  return response.json();
32
- case 7:
34
+ case 8:
33
35
  res = _context.sent;
34
36
  return _context.abrupt("return", mapAccessibleProductsToAvailableSites(res.data));
35
- case 9:
37
+ case 10:
36
38
  _context.t0 = Error;
37
- _context.next = 12;
39
+ _context.next = 13;
38
40
  return response.text();
39
- case 12:
41
+ case 13:
40
42
  _context.t1 = _context.sent;
41
43
  if (_context.t1) {
42
- _context.next = 15;
44
+ _context.next = 16;
43
45
  break;
44
46
  }
45
47
  _context.t1 = 'Something went wrong';
46
- case 15:
48
+ case 16:
47
49
  _context.t2 = _context.t1;
48
50
  throw new _context.t0(_context.t2);
49
- case 17:
51
+ case 18:
50
52
  case "end":
51
53
  return _context.stop();
52
54
  }
@@ -56,4 +56,5 @@ var LinkRenderType = function LinkRenderType(_ref) {
56
56
  }
57
57
  return /*#__PURE__*/React.createElement(React.Fragment, null, text ? anchor : /*#__PURE__*/React.createElement(SmartCard, null), /*#__PURE__*/React.createElement("br", null));
58
58
  };
59
- export default /*#__PURE__*/React.memo(LinkRenderType);
59
+ var _default_1 = /*#__PURE__*/React.memo(LinkRenderType);
60
+ export default _default_1;
@@ -1,4 +1,3 @@
1
1
  export { EVENT_CHANNEL } from './constants';
2
- export declare const useDatasourceAnalyticsEvents: () => {
3
- fireEvent: <K extends import("./generated/analytics.types").EventKey>(eventKey: K, ...params: undefined extends import("./generated/analytics.types").AnalyticsEventAttributes[K] ? [param?: import("./generated/analytics.types").AnalyticsEventAttributes[K] | undefined] : [param: import("./generated/analytics.types").AnalyticsEventAttributes[K]]) => void;
4
- };
2
+ import { useAnalyticsEvents } from './generated/use-analytics-events';
3
+ export declare const useDatasourceAnalyticsEvents: () => ReturnType<typeof useAnalyticsEvents>;
@@ -1,2 +1,3 @@
1
- declare const DatasourceRenderFailedAnalyticsWrapper: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>;
1
+ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
2
+ declare const DatasourceRenderFailedAnalyticsWrapper: ForwardRefExoticComponent<Omit<any, "ref"> & RefAttributes<any>>;
2
3
  export default DatasourceRenderFailedAnalyticsWrapper;
@@ -1,11 +1,11 @@
1
1
  import { type EventKey } from '../analytics/generated/analytics.types';
2
2
  import type createEventPayload from '../analytics/generated/create-event-payload';
3
- import { type AqlValidateResponse, type FetchObjectSchemasResponse } from '../types/assets/types';
3
+ import { type AqlValidateResponse, type FetchObjectSchemasResponse, type ObjectSchema } from '../types/assets/types';
4
4
  type AnalyticsFireEvent = <K extends EventKey>(...params: Parameters<typeof createEventPayload<K>>) => void;
5
5
  export declare const getWorkspaceId: (fireEvent?: AnalyticsFireEvent) => Promise<string>;
6
6
  export declare const validateAql: (workspaceId: string, data: {
7
7
  qlQuery: string;
8
8
  }, fireEvent?: AnalyticsFireEvent) => Promise<AqlValidateResponse>;
9
- export declare const fetchObjectSchema: (workspaceId: string, schemaId: string, fireEvent?: AnalyticsFireEvent) => Promise<import("../types/assets/types").ObjectSchema>;
9
+ export declare const fetchObjectSchema: (workspaceId: string, schemaId: string, fireEvent?: AnalyticsFireEvent) => Promise<ObjectSchema>;
10
10
  export declare const fetchObjectSchemas: (workspaceId: string, query?: string, fireEvent?: AnalyticsFireEvent) => Promise<FetchObjectSchemasResponse>;
11
11
  export {};
@@ -1,4 +1,4 @@
1
- import { type Action } from 'react-sweet-state';
1
+ import { type Action, type BoundActions, type HookFunction, type Store } from 'react-sweet-state';
2
2
  import { useDatasourceClientExtension } from '@atlaskit/link-client-extension';
3
3
  import type { ActionsDiscoveryRequest, AtomicActionExecuteRequest, AtomicActionExecuteResponse, AtomicActionInterface } from '@atlaskit/linking-types';
4
4
  import { type DatasourceOperationFailedAttributesType, type EventKey } from '../../../src/analytics/generated/analytics.types';
@@ -72,7 +72,7 @@ interface UseDiscoverActionsProps {
72
72
  export declare const actions: {
73
73
  discoverActions: (captureError: AnalyticsCaptureError, fireEvent: AnalyticsFireEvent, api: Client, request: ActionsDiscoveryRequest) => Action<ActionsStoreState>;
74
74
  };
75
- export declare const ActionsStore: import("react-sweet-state").Store<ActionsStoreState, {
75
+ export declare const ActionsStore: Store<ActionsStoreState, {
76
76
  discoverActions: (captureError: AnalyticsCaptureError, fireEvent: AnalyticsFireEvent, api: Client, request: ActionsDiscoveryRequest) => Action<ActionsStoreState>;
77
77
  }>;
78
78
  export declare const useDiscoverActions: ({ captureError, fireEvent }: UseDiscoverActionsProps) => {
@@ -81,15 +81,15 @@ export declare const useDiscoverActions: ({ captureError, fireEvent }: UseDiscov
81
81
  /**
82
82
  * Retrieves the action schema for a given ARI + fieldKey + integrationKey
83
83
  */
84
- export declare const useAtomicUpdateActionSchema: import("react-sweet-state").HookFunction<{
84
+ export declare const useAtomicUpdateActionSchema: HookFunction<{
85
85
  schema?: undefined;
86
86
  fetchSchema?: undefined;
87
87
  } | {
88
- schema: Pick<AtomicActionInterface, "actionKey" | "type" | "description"> & {
88
+ schema: Pick<AtomicActionInterface, "type" | "description" | "actionKey"> & {
89
89
  fetchAction?: Pick<AtomicActionInterface, "actionKey" | "type" | "inputs">;
90
90
  };
91
- fetchSchema: Pick<AtomicActionInterface, "actionKey" | "type" | "inputs"> | undefined;
92
- }, import("react-sweet-state").BoundActions<ActionsStoreState, {
91
+ fetchSchema: Pick<AtomicActionInterface, "type" | "inputs" | "actionKey"> | undefined;
92
+ }, BoundActions<ActionsStoreState, {
93
93
  discoverActions: (captureError: AnalyticsCaptureError, fireEvent: AnalyticsFireEvent, api: Client, request: ActionsDiscoveryRequest) => Action<ActionsStoreState>;
94
94
  }>, {
95
95
  ari: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type Action } from 'react-sweet-state';
2
+ import { type Action, type BoundActions, type HookActionsFunction, type HookStateFunction, type Store as StoreType } from 'react-sweet-state';
3
3
  import type { DatasourceDataResponseItem } from '@atlaskit/linking-types';
4
4
  type UniqueIdentifier = string;
5
5
  export interface DatasourceItem {
@@ -15,14 +15,14 @@ export declare const actions: {
15
15
  onUpdateItem: (id: string, data: DatasourceDataResponseItem) => Action<State, void, void>;
16
16
  onAddItems: (items: DatasourceDataResponseItem[], integrationKey: string | undefined, entityType: string | undefined) => Action<State, void, string[]>;
17
17
  };
18
- export declare const Store: import("react-sweet-state").Store<State, {
18
+ export declare const Store: StoreType<State, {
19
19
  onUpdateItem: (id: string, data: DatasourceDataResponseItem) => Action<State, void, void>;
20
20
  onAddItems: (items: DatasourceDataResponseItem[], integrationKey: string | undefined, entityType: string | undefined) => Action<State, void, string[]>;
21
21
  }>;
22
- export declare const useDatasourceItem: import("react-sweet-state").HookStateFunction<DatasourceItem | undefined, {
22
+ export declare const useDatasourceItem: HookStateFunction<DatasourceItem | undefined, {
23
23
  id: string;
24
24
  }>;
25
- export declare const useDatasourceActions: import("react-sweet-state").HookActionsFunction<import("react-sweet-state").BoundActions<State, {
25
+ export declare const useDatasourceActions: HookActionsFunction<BoundActions<State, {
26
26
  onUpdateItem: (id: string, data: DatasourceDataResponseItem) => Action<State, void, void>;
27
27
  onAddItems: (items: DatasourceDataResponseItem[], integrationKey: string | undefined, entityType: string | undefined) => Action<State, void, string[]>;
28
28
  }>>;
@@ -1,2 +1,8 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
6
+ import { type WithContextProps } from '@atlaskit/analytics-next';
1
7
  import { type AssetsConfigModalProps } from '../types';
2
- export declare const AssetsConfigModal: import("react").ForwardRefExoticComponent<AssetsConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
8
+ export declare const AssetsConfigModal: ForwardRefExoticComponent<AssetsConfigModalProps & WithContextProps & RefAttributes<any>>;
@@ -1,10 +1,18 @@
1
- export declare const DatasourceTableView: import("react").ForwardRefExoticComponent<{
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
6
+ import { type WithContextProps } from '@atlaskit/analytics-next';
7
+ import type { DatasourceParameters } from '@atlaskit/linking-types';
8
+ import type { IssueLikeDataTableViewProps } from '../issue-like-table/types';
9
+ export declare const DatasourceTableView: ForwardRefExoticComponent<{
2
10
  datasourceId: string;
3
- parameters: import("@atlaskit/linking-types").DatasourceParameters;
11
+ parameters: DatasourceParameters;
4
12
  url?: string;
5
- } & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange" | "scrollableContainerHeight">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
6
- export declare const DataSourceTableViewNoSuspense: import("react").ForwardRefExoticComponent<{
13
+ } & Partial<Pick<IssueLikeDataTableViewProps, "visibleColumnKeys" | "onVisibleColumnKeysChange" | "wrappedColumnKeys" | "onWrappedColumnChange" | "onColumnResize" | "columnCustomSizes" | "scrollableContainerHeight">> & WithContextProps & RefAttributes<any>>;
14
+ export declare const DataSourceTableViewNoSuspense: ForwardRefExoticComponent<{
7
15
  datasourceId: string;
8
- parameters: import("@atlaskit/linking-types").DatasourceParameters;
16
+ parameters: DatasourceParameters;
9
17
  url?: string;
10
- } & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange" | "scrollableContainerHeight">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
18
+ } & Partial<Pick<IssueLikeDataTableViewProps, "visibleColumnKeys" | "onVisibleColumnKeysChange" | "wrappedColumnKeys" | "onWrappedColumnChange" | "onColumnResize" | "columnCustomSizes" | "scrollableContainerHeight">> & WithContextProps & RefAttributes<any>>;
@@ -1,5 +1,6 @@
1
1
  import { type DatasourceResponseSchemaProperty } from '@atlaskit/linking-types/datasource';
2
+ import { type Props } from './empty-state';
2
3
  import { type IssueLikeDataTableViewProps } from './types';
3
4
  export declare const getOrderedColumns: (columns: DatasourceResponseSchemaProperty[], visibleColumnKeys: string[]) => DatasourceResponseSchemaProperty[];
4
5
  export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, itemIds, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, status, hasNextPage, scrollableContainerHeight, extensionKey, }: IssueLikeDataTableViewProps) => JSX.Element;
5
- export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => JSX.Element;
6
+ export declare const EmptyState: ({ isCompact, testId }: Props) => JSX.Element;
@@ -4,6 +4,6 @@ interface IconProps extends Icon {
4
4
  testId?: string;
5
5
  }
6
6
  export declare const ICON_TYPE_TEST_ID = "link-datasource-render-type--icon";
7
- export declare const ICON_TYPE_TEXT_TEST_ID = "link-datasource-render-type--icon-text";
7
+ export declare const ICON_TYPE_TEXT_TEST_ID: "link-datasource-render-type--icon-text";
8
8
  declare const IconRenderType: ({ label, text, source, testId, }: IconProps) => React.JSX.Element;
9
9
  export default IconRenderType;
@@ -4,5 +4,5 @@ interface LinkProps extends Link {
4
4
  testId?: string;
5
5
  }
6
6
  export declare const LINK_TYPE_TEST_ID = "link-datasource-render-type--link";
7
- declare const _default: React.MemoExoticComponent<({ style, url, text, testId, }: LinkProps) => React.JSX.Element | null>;
8
- export default _default;
7
+ declare const _default_1: React.MemoExoticComponent<({ style, url, text, testId, }: LinkProps) => React.JSX.Element | null>;
8
+ export default _default_1;
@@ -1,3 +1,4 @@
1
+ import type { FormEvent } from 'react';
1
2
  import { type FieldProps } from '@atlaskit/form';
2
3
  import { DatasourceAction } from '../../analytics/types';
3
4
  export declare const COLUMN_BASE_WIDTH = 8;
@@ -27,13 +28,13 @@ export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibl
27
28
  export declare const getCleanedSelectProps: (props: Omit<FieldProps<string>, "value">) => {
28
29
  name: string;
29
30
  id: string;
30
- 'aria-describedby'?: string | undefined;
31
- 'aria-invalid': "true" | "false";
31
+ "aria-describedby"?: string | undefined;
32
+ "aria-invalid": "true" | "false";
32
33
  onFocus: () => void;
33
34
  onBlur: () => void;
34
- onChange: (value: string | import("react").FormEvent<HTMLInputElement>) => void;
35
- isDisabled: boolean;
35
+ onChange: (value: string | FormEvent<HTMLInputElement>) => void;
36
36
  isRequired: boolean;
37
+ isDisabled: boolean;
37
38
  isInvalid: boolean;
38
39
  };
39
40
  /**
@@ -1,8 +1,3 @@
1
1
  export { EVENT_CHANNEL } from './constants';
2
- export declare const useDatasourceAnalyticsEvents: () => {
3
- fireEvent: <K extends import("./generated/analytics.types").EventKey>(eventKey: K, ...params: undefined extends import("./generated/analytics.types").AnalyticsEventAttributes[K] ? [
4
- param?: import("./generated/analytics.types").AnalyticsEventAttributes[K] | undefined
5
- ] : [
6
- param: import("./generated/analytics.types").AnalyticsEventAttributes[K]
7
- ]) => void;
8
- };
2
+ import { useAnalyticsEvents } from './generated/use-analytics-events';
3
+ export declare const useDatasourceAnalyticsEvents: () => ReturnType<typeof useAnalyticsEvents>;
@@ -1,2 +1,3 @@
1
- declare const DatasourceRenderFailedAnalyticsWrapper: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>;
1
+ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
2
+ declare const DatasourceRenderFailedAnalyticsWrapper: ForwardRefExoticComponent<Omit<any, "ref"> & RefAttributes<any>>;
2
3
  export default DatasourceRenderFailedAnalyticsWrapper;
@@ -1,11 +1,11 @@
1
1
  import { type EventKey } from '../analytics/generated/analytics.types';
2
2
  import type createEventPayload from '../analytics/generated/create-event-payload';
3
- import { type AqlValidateResponse, type FetchObjectSchemasResponse } from '../types/assets/types';
3
+ import { type AqlValidateResponse, type FetchObjectSchemasResponse, type ObjectSchema } from '../types/assets/types';
4
4
  type AnalyticsFireEvent = <K extends EventKey>(...params: Parameters<typeof createEventPayload<K>>) => void;
5
5
  export declare const getWorkspaceId: (fireEvent?: AnalyticsFireEvent) => Promise<string>;
6
6
  export declare const validateAql: (workspaceId: string, data: {
7
7
  qlQuery: string;
8
8
  }, fireEvent?: AnalyticsFireEvent) => Promise<AqlValidateResponse>;
9
- export declare const fetchObjectSchema: (workspaceId: string, schemaId: string, fireEvent?: AnalyticsFireEvent) => Promise<import("../types/assets/types").ObjectSchema>;
9
+ export declare const fetchObjectSchema: (workspaceId: string, schemaId: string, fireEvent?: AnalyticsFireEvent) => Promise<ObjectSchema>;
10
10
  export declare const fetchObjectSchemas: (workspaceId: string, query?: string, fireEvent?: AnalyticsFireEvent) => Promise<FetchObjectSchemasResponse>;
11
11
  export {};
@@ -1,4 +1,4 @@
1
- import { type Action } from 'react-sweet-state';
1
+ import { type Action, type BoundActions, type HookFunction, type Store } from 'react-sweet-state';
2
2
  import { useDatasourceClientExtension } from '@atlaskit/link-client-extension';
3
3
  import type { ActionsDiscoveryRequest, AtomicActionExecuteRequest, AtomicActionExecuteResponse, AtomicActionInterface } from '@atlaskit/linking-types';
4
4
  import { type DatasourceOperationFailedAttributesType, type EventKey } from '../../../src/analytics/generated/analytics.types';
@@ -72,7 +72,7 @@ interface UseDiscoverActionsProps {
72
72
  export declare const actions: {
73
73
  discoverActions: (captureError: AnalyticsCaptureError, fireEvent: AnalyticsFireEvent, api: Client, request: ActionsDiscoveryRequest) => Action<ActionsStoreState>;
74
74
  };
75
- export declare const ActionsStore: import("react-sweet-state").Store<ActionsStoreState, {
75
+ export declare const ActionsStore: Store<ActionsStoreState, {
76
76
  discoverActions: (captureError: AnalyticsCaptureError, fireEvent: AnalyticsFireEvent, api: Client, request: ActionsDiscoveryRequest) => Action<ActionsStoreState>;
77
77
  }>;
78
78
  export declare const useDiscoverActions: ({ captureError, fireEvent }: UseDiscoverActionsProps) => {
@@ -81,15 +81,15 @@ export declare const useDiscoverActions: ({ captureError, fireEvent }: UseDiscov
81
81
  /**
82
82
  * Retrieves the action schema for a given ARI + fieldKey + integrationKey
83
83
  */
84
- export declare const useAtomicUpdateActionSchema: import("react-sweet-state").HookFunction<{
84
+ export declare const useAtomicUpdateActionSchema: HookFunction<{
85
85
  schema?: undefined;
86
86
  fetchSchema?: undefined;
87
87
  } | {
88
- schema: Pick<AtomicActionInterface, "actionKey" | "type" | "description"> & {
88
+ schema: Pick<AtomicActionInterface, "type" | "description" | "actionKey"> & {
89
89
  fetchAction?: Pick<AtomicActionInterface, "actionKey" | "type" | "inputs">;
90
90
  };
91
- fetchSchema: Pick<AtomicActionInterface, "actionKey" | "type" | "inputs"> | undefined;
92
- }, import("react-sweet-state").BoundActions<ActionsStoreState, {
91
+ fetchSchema: Pick<AtomicActionInterface, "type" | "inputs" | "actionKey"> | undefined;
92
+ }, BoundActions<ActionsStoreState, {
93
93
  discoverActions: (captureError: AnalyticsCaptureError, fireEvent: AnalyticsFireEvent, api: Client, request: ActionsDiscoveryRequest) => Action<ActionsStoreState>;
94
94
  }>, {
95
95
  ari: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type Action } from 'react-sweet-state';
2
+ import { type Action, type BoundActions, type HookActionsFunction, type HookStateFunction, type Store as StoreType } from 'react-sweet-state';
3
3
  import type { DatasourceDataResponseItem } from '@atlaskit/linking-types';
4
4
  type UniqueIdentifier = string;
5
5
  export interface DatasourceItem {
@@ -15,14 +15,14 @@ export declare const actions: {
15
15
  onUpdateItem: (id: string, data: DatasourceDataResponseItem) => Action<State, void, void>;
16
16
  onAddItems: (items: DatasourceDataResponseItem[], integrationKey: string | undefined, entityType: string | undefined) => Action<State, void, string[]>;
17
17
  };
18
- export declare const Store: import("react-sweet-state").Store<State, {
18
+ export declare const Store: StoreType<State, {
19
19
  onUpdateItem: (id: string, data: DatasourceDataResponseItem) => Action<State, void, void>;
20
20
  onAddItems: (items: DatasourceDataResponseItem[], integrationKey: string | undefined, entityType: string | undefined) => Action<State, void, string[]>;
21
21
  }>;
22
- export declare const useDatasourceItem: import("react-sweet-state").HookStateFunction<DatasourceItem | undefined, {
22
+ export declare const useDatasourceItem: HookStateFunction<DatasourceItem | undefined, {
23
23
  id: string;
24
24
  }>;
25
- export declare const useDatasourceActions: import("react-sweet-state").HookActionsFunction<import("react-sweet-state").BoundActions<State, {
25
+ export declare const useDatasourceActions: HookActionsFunction<BoundActions<State, {
26
26
  onUpdateItem: (id: string, data: DatasourceDataResponseItem) => Action<State, void, void>;
27
27
  onAddItems: (items: DatasourceDataResponseItem[], integrationKey: string | undefined, entityType: string | undefined) => Action<State, void, string[]>;
28
28
  }>>;
@@ -1,2 +1,8 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
6
+ import { type WithContextProps } from '@atlaskit/analytics-next';
1
7
  import { type AssetsConfigModalProps } from '../types';
2
- export declare const AssetsConfigModal: import("react").ForwardRefExoticComponent<AssetsConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
8
+ export declare const AssetsConfigModal: ForwardRefExoticComponent<AssetsConfigModalProps & WithContextProps & RefAttributes<any>>;
@@ -1,10 +1,18 @@
1
- export declare const DatasourceTableView: import("react").ForwardRefExoticComponent<{
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
6
+ import { type WithContextProps } from '@atlaskit/analytics-next';
7
+ import type { DatasourceParameters } from '@atlaskit/linking-types';
8
+ import type { IssueLikeDataTableViewProps } from '../issue-like-table/types';
9
+ export declare const DatasourceTableView: ForwardRefExoticComponent<{
2
10
  datasourceId: string;
3
- parameters: import("@atlaskit/linking-types").DatasourceParameters;
11
+ parameters: DatasourceParameters;
4
12
  url?: string;
5
- } & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange" | "scrollableContainerHeight">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
6
- export declare const DataSourceTableViewNoSuspense: import("react").ForwardRefExoticComponent<{
13
+ } & Partial<Pick<IssueLikeDataTableViewProps, "visibleColumnKeys" | "onVisibleColumnKeysChange" | "wrappedColumnKeys" | "onWrappedColumnChange" | "onColumnResize" | "columnCustomSizes" | "scrollableContainerHeight">> & WithContextProps & RefAttributes<any>>;
14
+ export declare const DataSourceTableViewNoSuspense: ForwardRefExoticComponent<{
7
15
  datasourceId: string;
8
- parameters: import("@atlaskit/linking-types").DatasourceParameters;
16
+ parameters: DatasourceParameters;
9
17
  url?: string;
10
- } & Partial<Pick<import("../issue-like-table/types").IssueLikeDataTableViewProps, "visibleColumnKeys" | "wrappedColumnKeys" | "columnCustomSizes" | "onColumnResize" | "onVisibleColumnKeysChange" | "onWrappedColumnChange" | "scrollableContainerHeight">> & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
18
+ } & Partial<Pick<IssueLikeDataTableViewProps, "visibleColumnKeys" | "onVisibleColumnKeysChange" | "wrappedColumnKeys" | "onWrappedColumnChange" | "onColumnResize" | "columnCustomSizes" | "scrollableContainerHeight">> & WithContextProps & RefAttributes<any>>;
@@ -1,5 +1,6 @@
1
1
  import { type DatasourceResponseSchemaProperty } from '@atlaskit/linking-types/datasource';
2
+ import { type Props } from './empty-state';
2
3
  import { type IssueLikeDataTableViewProps } from './types';
3
4
  export declare const getOrderedColumns: (columns: DatasourceResponseSchemaProperty[], visibleColumnKeys: string[]) => DatasourceResponseSchemaProperty[];
4
5
  export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, itemIds, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, columnCustomSizes, onColumnResize, wrappedColumnKeys, onWrappedColumnChange, status, hasNextPage, scrollableContainerHeight, extensionKey, }: IssueLikeDataTableViewProps) => JSX.Element;
5
- export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => JSX.Element;
6
+ export declare const EmptyState: ({ isCompact, testId }: Props) => JSX.Element;
@@ -4,6 +4,6 @@ interface IconProps extends Icon {
4
4
  testId?: string;
5
5
  }
6
6
  export declare const ICON_TYPE_TEST_ID = "link-datasource-render-type--icon";
7
- export declare const ICON_TYPE_TEXT_TEST_ID = "link-datasource-render-type--icon-text";
7
+ export declare const ICON_TYPE_TEXT_TEST_ID: "link-datasource-render-type--icon-text";
8
8
  declare const IconRenderType: ({ label, text, source, testId, }: IconProps) => React.JSX.Element;
9
9
  export default IconRenderType;
@@ -4,5 +4,5 @@ interface LinkProps extends Link {
4
4
  testId?: string;
5
5
  }
6
6
  export declare const LINK_TYPE_TEST_ID = "link-datasource-render-type--link";
7
- declare const _default: React.MemoExoticComponent<({ style, url, text, testId, }: LinkProps) => React.JSX.Element | null>;
8
- export default _default;
7
+ declare const _default_1: React.MemoExoticComponent<({ style, url, text, testId, }: LinkProps) => React.JSX.Element | null>;
8
+ export default _default_1;
@@ -1,3 +1,4 @@
1
+ import type { FormEvent } from 'react';
1
2
  import { type FieldProps } from '@atlaskit/form';
2
3
  import { DatasourceAction } from '../../analytics/types';
3
4
  export declare const COLUMN_BASE_WIDTH = 8;
@@ -27,13 +28,13 @@ export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibl
27
28
  export declare const getCleanedSelectProps: (props: Omit<FieldProps<string>, "value">) => {
28
29
  name: string;
29
30
  id: string;
30
- 'aria-describedby'?: string | undefined;
31
- 'aria-invalid': "true" | "false";
31
+ "aria-describedby"?: string | undefined;
32
+ "aria-invalid": "true" | "false";
32
33
  onFocus: () => void;
33
34
  onBlur: () => void;
34
- onChange: (value: string | import("react").FormEvent<HTMLInputElement>) => void;
35
- isDisabled: boolean;
35
+ onChange: (value: string | FormEvent<HTMLInputElement>) => void;
36
36
  isRequired: boolean;
37
+ isDisabled: boolean;
37
38
  isInvalid: boolean;
38
39
  };
39
40
  /**
@@ -42,8 +42,8 @@ const mockedFetch = (url: string): Promise<JsonLd.Response> => {
42
42
  };
43
43
 
44
44
  class SmartLinkClient extends CardClient {
45
- prefetchData = mockedFetch;
46
- fetchData = mockedFetch;
45
+ prefetchData: (url: string) => Promise<JsonLd.Response> = mockedFetch;
46
+ fetchData: (url: string) => Promise<JsonLd.Response> = mockedFetch;
47
47
  }
48
48
 
49
49
  export default SmartLinkClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "4.34.6",
3
+ "version": "4.34.8",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,11 +39,11 @@
39
39
  "@atlaskit/adf-schema": "^52.4.0",
40
40
  "@atlaskit/afm-i18n-platform-linking-platform-link-datasource": "2.7.0",
41
41
  "@atlaskit/analytics-next": "^11.2.0",
42
- "@atlaskit/atlassian-context": "^0.7.0",
42
+ "@atlaskit/atlassian-context": "^0.8.0",
43
43
  "@atlaskit/avatar": "^25.11.0",
44
44
  "@atlaskit/avatar-group": "^12.5.0",
45
45
  "@atlaskit/badge": "^18.4.0",
46
- "@atlaskit/button": "^23.10.0",
46
+ "@atlaskit/button": "^23.11.0",
47
47
  "@atlaskit/css": "^0.19.0",
48
48
  "@atlaskit/datetime-picker": "^17.6.0",
49
49
  "@atlaskit/dropdown-menu": "^16.8.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/feature-gate-js-client": "^5.5.0",
53
53
  "@atlaskit/flag": "^17.9.0",
54
54
  "@atlaskit/form": "^15.5.0",
55
- "@atlaskit/heading": "^5.3.0",
55
+ "@atlaskit/heading": "^5.4.0",
56
56
  "@atlaskit/icon": "^34.0.0",
57
57
  "@atlaskit/icon-object": "^7.5.0",
58
58
  "@atlaskit/image": "^3.0.0",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/jql-editor": "^5.14.0",
63
63
  "@atlaskit/jql-editor-autocomplete-rest": "^3.1.0",
64
64
  "@atlaskit/layering": "^3.6.0",
65
- "@atlaskit/link": "^3.3.0",
65
+ "@atlaskit/link": "^3.4.0",
66
66
  "@atlaskit/link-client-extension": "^6.0.0",
67
67
  "@atlaskit/link-provider": "^4.3.0",
68
68
  "@atlaskit/linking-common": "^9.11.0",
@@ -80,11 +80,11 @@
80
80
  "@atlaskit/primitives": "^18.1.0",
81
81
  "@atlaskit/react-select": "^3.14.0",
82
82
  "@atlaskit/select": "^21.10.0",
83
- "@atlaskit/smart-card": "^43.30.0",
83
+ "@atlaskit/smart-card": "^43.31.0",
84
84
  "@atlaskit/smart-user-picker": "^9.2.0",
85
- "@atlaskit/spinner": "^19.0.0",
86
- "@atlaskit/tag": "^14.6.0",
87
- "@atlaskit/textfield": "^8.2.0",
85
+ "@atlaskit/spinner": "^19.1.0",
86
+ "@atlaskit/tag": "^14.7.0",
87
+ "@atlaskit/textfield": "^8.3.0",
88
88
  "@atlaskit/theme": "^22.0.0",
89
89
  "@atlaskit/tokens": "^11.4.0",
90
90
  "@atlaskit/tooltip": "^21.1.0",
@@ -184,6 +184,9 @@
184
184
  },
185
185
  "platform_navx_sllv_j2ws_dropdown_for_single_row": {
186
186
  "type": "boolean"
187
+ },
188
+ "linking_platform_link_datasource_unit_compliant": {
189
+ "type": "boolean"
187
190
  }
188
191
  },
189
192
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/9c893299-a527-4457-9b46-f3bc4c828766"