@atlaskit/link-datasource 1.10.3 → 1.11.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/analytics/constants.js +1 -1
  3. package/dist/cjs/analytics/types.js +1 -0
  4. package/dist/cjs/hooks/useObjectSchemas.js +23 -13
  5. package/dist/cjs/ui/assets-modal/modal/index.js +109 -16
  6. package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +5 -3
  7. package/dist/cjs/ui/assets-modal/search-container/index.js +4 -0
  8. package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +68 -23
  9. package/dist/cjs/ui/jira-issues-modal/modal/index.js +2 -1
  10. package/dist/es2019/analytics/constants.js +1 -1
  11. package/dist/es2019/analytics/types.js +1 -0
  12. package/dist/es2019/hooks/useObjectSchemas.js +9 -1
  13. package/dist/es2019/ui/assets-modal/modal/index.js +112 -15
  14. package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +5 -3
  15. package/dist/es2019/ui/assets-modal/search-container/index.js +5 -0
  16. package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +32 -5
  17. package/dist/es2019/ui/jira-issues-modal/modal/index.js +2 -1
  18. package/dist/esm/analytics/constants.js +1 -1
  19. package/dist/esm/analytics/types.js +1 -0
  20. package/dist/esm/hooks/useObjectSchemas.js +23 -13
  21. package/dist/esm/ui/assets-modal/modal/index.js +112 -19
  22. package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +5 -3
  23. package/dist/esm/ui/assets-modal/search-container/index.js +4 -0
  24. package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +65 -20
  25. package/dist/esm/ui/jira-issues-modal/modal/index.js +2 -1
  26. package/dist/types/analytics/generated/analytics.types.d.ts +7 -2
  27. package/dist/types/analytics/types.d.ts +2 -1
  28. package/dist/types/hooks/useObjectSchemas.d.ts +3 -1
  29. package/dist/types/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -0
  30. package/dist/types/ui/assets-modal/search-container/index.d.ts +1 -2
  31. package/dist/types/ui/assets-modal/types.d.ts +2 -1
  32. package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +7 -2
  33. package/dist/types-ts4.5/analytics/types.d.ts +2 -1
  34. package/dist/types-ts4.5/hooks/useObjectSchemas.d.ts +3 -1
  35. package/dist/types-ts4.5/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -0
  36. package/dist/types-ts4.5/ui/assets-modal/search-container/index.d.ts +1 -2
  37. package/dist/types-ts4.5/ui/assets-modal/types.d.ts +2 -1
  38. package/package.json +1 -1
  39. package/report.api.md +4 -1
  40. package/tmp/api-report-tmp.d.ts +1 -1
@@ -12,7 +12,8 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
12
12
  loadDatasourceDetails = props.loadDatasourceDetails,
13
13
  columns = props.columns,
14
14
  defaultVisibleColumnKeys = props.defaultVisibleColumnKeys,
15
- onVisibleColumnKeysChange = props.onVisibleColumnKeysChange;
15
+ onVisibleColumnKeysChange = props.onVisibleColumnKeysChange,
16
+ modalRenderInstanceId = props.modalRenderInstanceId;
16
17
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
17
18
  var issueLikeDataTableView = useMemo(function () {
18
19
  return /*#__PURE__*/React.createElement(IssueLikeDataTableView, {
@@ -24,9 +25,10 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
24
25
  visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
25
26
  onNextPage: onNextPage,
26
27
  onLoadDatasourceDetails: loadDatasourceDetails,
27
- onVisibleColumnKeysChange: onVisibleColumnKeysChange
28
+ onVisibleColumnKeysChange: onVisibleColumnKeysChange,
29
+ parentContainerRenderInstanceId: modalRenderInstanceId
28
30
  });
29
- }, [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys]);
31
+ }, [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys, modalRenderInstanceId]);
30
32
  if (status === 'rejected') {
31
33
  return /*#__PURE__*/React.createElement(ModalLoadingError, null);
32
34
  } else if (status === 'empty') {
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
  import { jsx } from '@emotion/react';
4
4
  import Form from '@atlaskit/form';
5
+ import { useDatasourceAnalyticsEvents } from '../../../analytics';
5
6
  import { AqlSearchInput } from './aql-search-input';
6
7
  import { AssetsObjectSchemaSelect } from './object-schema-select';
7
8
  import { FormContainer, FormRowContainer, SchemaSelectContainer } from './styled';
@@ -13,10 +14,13 @@ export var AssetsSearchContainer = function AssetsSearchContainer(props) {
13
14
  initialSearchData = props.initialSearchData,
14
15
  modalTitle = props.modalTitle,
15
16
  isSearching = props.isSearching;
17
+ var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
18
+ fireEvent = _useDatasourceAnalyti.fireEvent;
16
19
  var onFormSubmit = function onFormSubmit(searchFormValues) {
17
20
  var aql = searchFormValues.aql,
18
21
  objectSchema = searchFormValues.objectSchema;
19
22
  if (objectSchema) {
23
+ fireEvent('ui.aqlEditor.searched', {});
20
24
  // Pass the validated aql and object schema back to modal
21
25
  onSearch(aql, objectSchema.value);
22
26
  }
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
5
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
6
  var _excluded = ["onChange", "onFocus"];
6
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
@@ -8,18 +9,25 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
8
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
10
  /** @jsx jsx */
10
11
 
12
+ import { useEffect, useState } from 'react';
11
13
  import { jsx } from '@emotion/react';
12
14
  import debounce from 'debounce-promise';
13
15
  import { useIntl } from 'react-intl-next';
14
16
  import { Field } from '@atlaskit/form';
15
17
  import { AsyncSelect } from '@atlaskit/select';
16
18
  import { layers } from '@atlaskit/theme/constants';
19
+ import { useDatasourceAnalyticsEvents } from '../../../../analytics';
17
20
  import { useObjectSchemas } from '../../../../hooks/useObjectSchemas';
18
21
  import { objectSchemaKey } from '../../../../types/assets/types';
19
22
  import { FieldContainer } from '../styled';
20
23
  import { objectSchemaSelectMessages } from './messages';
21
24
  import { objectSchemaToSelectOption } from './utils';
22
25
  export var SEARCH_DEBOUNCE_MS = 350;
26
+ var mapObjectSchemasToOptions = function mapObjectSchemasToOptions(objectSchemas) {
27
+ return objectSchemas ? objectSchemas.map(function (objectSchema) {
28
+ return objectSchemaToSelectOption(objectSchema);
29
+ }) : [];
30
+ };
23
31
 
24
32
  /**
25
33
  * Rendering a `<Select>` in a `<Modal>` results in the select options getting cut off by the bottom of the modal and
@@ -40,34 +48,72 @@ export var AssetsObjectSchemaSelect = function AssetsObjectSchemaSelect(_ref) {
40
48
  workspaceId = _ref.workspaceId,
41
49
  _ref$classNamePrefix = _ref.classNamePrefix,
42
50
  classNamePrefix = _ref$classNamePrefix === void 0 ? 'assets-datasource-modal--object-schema-select' : _ref$classNamePrefix;
51
+ var _useState = useState(null),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ defaultOptions = _useState2[0],
54
+ setDefaultOptions = _useState2[1];
55
+ var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
56
+ fireEvent = _useDatasourceAnalyti.fireEvent;
43
57
  var _useIntl = useIntl(),
44
58
  formatMessage = _useIntl.formatMessage;
45
59
  var _useObjectSchemas = useObjectSchemas(workspaceId),
46
60
  fetchObjectSchemas = _useObjectSchemas.fetchObjectSchemas,
47
61
  objectSchemasLoading = _useObjectSchemas.objectSchemasLoading;
48
62
  var selectedObjectSchema = value ? objectSchemaToSelectOption(value) : undefined;
63
+ useEffect(function () {
64
+ var fetchInitialData = /*#__PURE__*/function () {
65
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
66
+ var _yield$fetchObjectSch, objectSchemas, totalObjectSchemas;
67
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
68
+ while (1) switch (_context.prev = _context.next) {
69
+ case 0:
70
+ _context.next = 2;
71
+ return fetchObjectSchemas('');
72
+ case 2:
73
+ _yield$fetchObjectSch = _context.sent;
74
+ objectSchemas = _yield$fetchObjectSch.objectSchemas;
75
+ totalObjectSchemas = _yield$fetchObjectSch.totalObjectSchemas;
76
+ // We only want to send modal ready event once after we've fetched the schema count
77
+ fireEvent('ui.modal.ready.datasource', {
78
+ schemasCount: totalObjectSchemas !== null && totalObjectSchemas !== void 0 ? totalObjectSchemas : 0,
79
+ instancesCount: null
80
+ });
81
+ setDefaultOptions(mapObjectSchemasToOptions(objectSchemas));
82
+ case 7:
83
+ case "end":
84
+ return _context.stop();
85
+ }
86
+ }, _callee);
87
+ }));
88
+ return function fetchInitialData() {
89
+ return _ref2.apply(this, arguments);
90
+ };
91
+ }();
92
+ if (defaultOptions === null) {
93
+ fetchInitialData();
94
+ }
95
+ // eslint-disable-next-line react-hooks/exhaustive-deps
96
+ }, []);
49
97
  var loadOptions = /*#__PURE__*/function () {
50
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(inputValue) {
51
- var objectSchemas, options;
52
- return _regeneratorRuntime.wrap(function _callee$(_context) {
53
- while (1) switch (_context.prev = _context.next) {
98
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(inputValue) {
99
+ var _yield$fetchObjectSch2, objectSchemas;
100
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
101
+ while (1) switch (_context2.prev = _context2.next) {
54
102
  case 0:
55
- _context.next = 2;
103
+ _context2.next = 2;
56
104
  return fetchObjectSchemas(inputValue);
57
105
  case 2:
58
- objectSchemas = _context.sent;
59
- options = objectSchemas ? objectSchemas.map(function (objectSchema) {
60
- return objectSchemaToSelectOption(objectSchema);
61
- }) : [];
62
- return _context.abrupt("return", options);
106
+ _yield$fetchObjectSch2 = _context2.sent;
107
+ objectSchemas = _yield$fetchObjectSch2.objectSchemas;
108
+ return _context2.abrupt("return", mapObjectSchemasToOptions(objectSchemas));
63
109
  case 5:
64
110
  case "end":
65
- return _context.stop();
111
+ return _context2.stop();
66
112
  }
67
- }, _callee);
113
+ }, _callee2);
68
114
  }));
69
115
  return function loadOptions(_x) {
70
- return _ref2.apply(this, arguments);
116
+ return _ref3.apply(this, arguments);
71
117
  };
72
118
  }();
73
119
  var debouncedLoadOptions = debounce(loadOptions, SEARCH_DEBOUNCE_MS);
@@ -83,17 +129,16 @@ export var AssetsObjectSchemaSelect = function AssetsObjectSchemaSelect(_ref) {
83
129
  validate: function validate(value) {
84
130
  return validateSchema(value);
85
131
  }
86
- }, function (_ref3) {
87
- var _ref3$fieldProps = _ref3.fieldProps,
88
- _onChange = _ref3$fieldProps.onChange,
89
- onFocus = _ref3$fieldProps.onFocus,
90
- restFieldProps = _objectWithoutProperties(_ref3$fieldProps, _excluded);
132
+ }, function (_ref4) {
133
+ var _ref4$fieldProps = _ref4.fieldProps,
134
+ _onChange = _ref4$fieldProps.onChange,
135
+ onFocus = _ref4$fieldProps.onFocus,
136
+ restFieldProps = _objectWithoutProperties(_ref4$fieldProps, _excluded);
91
137
  return jsx(AsyncSelect, _extends({
92
138
  autoFocus: true,
93
139
  classNamePrefix: classNamePrefix,
94
140
  isLoading: objectSchemasLoading,
95
- defaultOptions: true // setting to true causes the loadOptions to be called on mount
96
- ,
141
+ defaultOptions: defaultOptions !== null && defaultOptions !== void 0 ? defaultOptions : [],
97
142
  isSearchable: true,
98
143
  loadOptions: debouncedLoadOptions,
99
144
  placeholder: formatMessage(objectSchemaSelectMessages.placeholder),
@@ -216,7 +216,8 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
216
216
  });
217
217
  setAvailableSites(sortedAvailableSites);
218
218
  fireEvent('ui.modal.ready.datasource', {
219
- instancesCount: sortedAvailableSites.length
219
+ instancesCount: sortedAvailableSites.length,
220
+ schemasCount: null
220
221
  });
221
222
  case 6:
222
223
  case "end":
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::24da75a4acd4c592c9cfed50e9897853>>
6
+ * @codegen <<SignedSource::7e783b41141644b6a0df41de5ab456df>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -18,7 +18,8 @@ export type AnalyticsContextAttributesType = {
18
18
  };
19
19
  export type DatasourceModalDialogViewedAttributesType = {};
20
20
  export type ModalReadyDatasourceAttributesType = {
21
- instancesCount: number;
21
+ instancesCount: number | null;
22
+ schemasCount: number | null;
22
23
  };
23
24
  export type JqlEditorSearchedAttributesType = {};
24
25
  export type FormSubmittedBasicSearchAttributesType = {};
@@ -81,6 +82,7 @@ export type LinkViewedCountAttributesType = {
81
82
  totalItemCount: number;
82
83
  extensionKey: string | null;
83
84
  };
85
+ export type AqlEditorSearchedAttributesType = {};
84
86
  export type AnalyticsEventAttributes = {
85
87
  /**
86
88
  * Fires when user sees modal dialog. */
@@ -130,5 +132,8 @@ export type AnalyticsEventAttributes = {
130
132
  /**
131
133
  * Fired when the datasource results are displayed as link( smart-link) in count mode. */
132
134
  'ui.link.viewed.count': LinkViewedCountAttributesType;
135
+ /**
136
+ * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
137
+ 'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
133
138
  };
134
139
  export type EventKey = keyof AnalyticsEventAttributes;
@@ -5,7 +5,8 @@ export declare enum DatasourceAction {
5
5
  INSTANCE_UPDATED = "instance updated",
6
6
  QUERY_UPDATED = "query updated",
7
7
  DISPLAY_VIEW_CHANGED = "display view changed",
8
- NEXT_PAGE_SCROLLED = "next page scrolled"
8
+ NEXT_PAGE_SCROLLED = "next page scrolled",
9
+ SCHEMA_UPDATED = "schema updated"
9
10
  }
10
11
  export declare enum DatasourceDisplay {
11
12
  DATASOURCE_TABLE = "datasource_table",
@@ -1,8 +1,10 @@
1
1
  import { ObjectSchema } from '../types/assets/types';
2
+ export type FetchObjectSchemasDetails = Pick<UseObjectSchemasState, 'objectSchemas' | 'totalObjectSchemas'>;
2
3
  export type UseObjectSchemasState = {
3
4
  objectSchemasLoading: boolean;
4
5
  objectSchemasError: Error | undefined;
5
6
  objectSchemas: ObjectSchema[] | undefined;
6
- fetchObjectSchemas: (query: string) => Promise<ObjectSchema[] | undefined>;
7
+ totalObjectSchemas: number | undefined;
8
+ fetchObjectSchemas: (query: string) => Promise<FetchObjectSchemasDetails>;
7
9
  };
8
10
  export declare const useObjectSchemas: (workspaceId: string) => UseObjectSchemasState;
@@ -13,5 +13,6 @@ export interface RenderAssetsContentProps {
13
13
  columns: DatasourceResponseSchemaProperty[];
14
14
  defaultVisibleColumnKeys: string[];
15
15
  onVisibleColumnKeysChange: (visibleColumnKeys: string[]) => void;
16
+ modalRenderInstanceId: string;
16
17
  }
17
18
  export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => JSX.Element;
@@ -2,7 +2,7 @@
2
2
  /** @jsx jsx */
3
3
  import { jsx } from '@emotion/react';
4
4
  import type { ObjectSchema } from '../../../types/assets/types';
5
- type InitialSearchData = {
5
+ export type InitialSearchData = {
6
6
  objectSchema?: ObjectSchema;
7
7
  aql?: string;
8
8
  };
@@ -14,4 +14,3 @@ export interface SearchContainerProps {
14
14
  isSearching: boolean;
15
15
  }
16
16
  export declare const AssetsSearchContainer: (props: SearchContainerProps) => jsx.JSX.Element;
17
- export {};
@@ -1,3 +1,4 @@
1
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
1
2
  import { DatasourceAdf, DatasourceAdfView, InlineCardAdf } from '@atlaskit/linking-common/types';
2
3
  export interface AssetsDatasourceParameters {
3
4
  workspaceId: string;
@@ -19,5 +20,5 @@ export interface AssetsConfigModalProps {
19
20
  visibleColumnKeys?: string[];
20
21
  parameters?: AssetsDatasourceParameters;
21
22
  onCancel: () => void;
22
- onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf) => void;
23
+ onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf, analyticsEvent?: UIAnalyticsEvent) => void;
23
24
  }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::24da75a4acd4c592c9cfed50e9897853>>
6
+ * @codegen <<SignedSource::7e783b41141644b6a0df41de5ab456df>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -18,7 +18,8 @@ export type AnalyticsContextAttributesType = {
18
18
  };
19
19
  export type DatasourceModalDialogViewedAttributesType = {};
20
20
  export type ModalReadyDatasourceAttributesType = {
21
- instancesCount: number;
21
+ instancesCount: number | null;
22
+ schemasCount: number | null;
22
23
  };
23
24
  export type JqlEditorSearchedAttributesType = {};
24
25
  export type FormSubmittedBasicSearchAttributesType = {};
@@ -81,6 +82,7 @@ export type LinkViewedCountAttributesType = {
81
82
  totalItemCount: number;
82
83
  extensionKey: string | null;
83
84
  };
85
+ export type AqlEditorSearchedAttributesType = {};
84
86
  export type AnalyticsEventAttributes = {
85
87
  /**
86
88
  * Fires when user sees modal dialog. */
@@ -130,5 +132,8 @@ export type AnalyticsEventAttributes = {
130
132
  /**
131
133
  * Fired when the datasource results are displayed as link( smart-link) in count mode. */
132
134
  'ui.link.viewed.count': LinkViewedCountAttributesType;
135
+ /**
136
+ * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
137
+ 'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
133
138
  };
134
139
  export type EventKey = keyof AnalyticsEventAttributes;
@@ -5,7 +5,8 @@ export declare enum DatasourceAction {
5
5
  INSTANCE_UPDATED = "instance updated",
6
6
  QUERY_UPDATED = "query updated",
7
7
  DISPLAY_VIEW_CHANGED = "display view changed",
8
- NEXT_PAGE_SCROLLED = "next page scrolled"
8
+ NEXT_PAGE_SCROLLED = "next page scrolled",
9
+ SCHEMA_UPDATED = "schema updated"
9
10
  }
10
11
  export declare enum DatasourceDisplay {
11
12
  DATASOURCE_TABLE = "datasource_table",
@@ -1,8 +1,10 @@
1
1
  import { ObjectSchema } from '../types/assets/types';
2
+ export type FetchObjectSchemasDetails = Pick<UseObjectSchemasState, 'objectSchemas' | 'totalObjectSchemas'>;
2
3
  export type UseObjectSchemasState = {
3
4
  objectSchemasLoading: boolean;
4
5
  objectSchemasError: Error | undefined;
5
6
  objectSchemas: ObjectSchema[] | undefined;
6
- fetchObjectSchemas: (query: string) => Promise<ObjectSchema[] | undefined>;
7
+ totalObjectSchemas: number | undefined;
8
+ fetchObjectSchemas: (query: string) => Promise<FetchObjectSchemasDetails>;
7
9
  };
8
10
  export declare const useObjectSchemas: (workspaceId: string) => UseObjectSchemasState;
@@ -13,5 +13,6 @@ export interface RenderAssetsContentProps {
13
13
  columns: DatasourceResponseSchemaProperty[];
14
14
  defaultVisibleColumnKeys: string[];
15
15
  onVisibleColumnKeysChange: (visibleColumnKeys: string[]) => void;
16
+ modalRenderInstanceId: string;
16
17
  }
17
18
  export declare const RenderAssetsContent: (props: RenderAssetsContentProps) => JSX.Element;
@@ -2,7 +2,7 @@
2
2
  /** @jsx jsx */
3
3
  import { jsx } from '@emotion/react';
4
4
  import type { ObjectSchema } from '../../../types/assets/types';
5
- type InitialSearchData = {
5
+ export type InitialSearchData = {
6
6
  objectSchema?: ObjectSchema;
7
7
  aql?: string;
8
8
  };
@@ -14,4 +14,3 @@ export interface SearchContainerProps {
14
14
  isSearching: boolean;
15
15
  }
16
16
  export declare const AssetsSearchContainer: (props: SearchContainerProps) => jsx.JSX.Element;
17
- export {};
@@ -1,3 +1,4 @@
1
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
1
2
  import { DatasourceAdf, DatasourceAdfView, InlineCardAdf } from '@atlaskit/linking-common/types';
2
3
  export interface AssetsDatasourceParameters {
3
4
  workspaceId: string;
@@ -19,5 +20,5 @@ export interface AssetsConfigModalProps {
19
20
  visibleColumnKeys?: string[];
20
21
  parameters?: AssetsDatasourceParameters;
21
22
  onCancel: () => void;
22
- onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf) => void;
23
+ onInsert: (adf: InlineCardAdf | AssetsDatasourceAdf, analyticsEvent?: UIAnalyticsEvent) => void;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
package/report.api.md CHANGED
@@ -34,7 +34,10 @@ interface AssetsConfigModalProps {
34
34
  // (undocumented)
35
35
  onCancel: () => void;
36
36
  // (undocumented)
37
- onInsert: (adf: AssetsDatasourceAdf | InlineCardAdf) => void;
37
+ onInsert: (
38
+ adf: AssetsDatasourceAdf | InlineCardAdf,
39
+ analyticsEvent?: UIAnalyticsEvent,
40
+ ) => void;
38
41
  // (undocumented)
39
42
  parameters?: AssetsDatasourceParameters;
40
43
  // (undocumented)
@@ -22,7 +22,7 @@ interface AssetsConfigModalProps {
22
22
  // (undocumented)
23
23
  onCancel: () => void;
24
24
  // (undocumented)
25
- onInsert: (adf: AssetsDatasourceAdf | InlineCardAdf) => void;
25
+ onInsert: (adf: AssetsDatasourceAdf | InlineCardAdf, analyticsEvent?: UIAnalyticsEvent) => void;
26
26
  // (undocumented)
27
27
  parameters?: AssetsDatasourceParameters;
28
28
  // (undocumented)