@atlaskit/link-datasource 1.16.5 → 1.17.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 (32) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/analytics/constants.js +1 -1
  3. package/dist/cjs/hooks/useAssetsClient.js +7 -4
  4. package/dist/cjs/hooks/useDatasourceTableState.js +83 -52
  5. package/dist/cjs/hooks/useValidateAqlText.js +5 -2
  6. package/dist/cjs/services/cmdbService.js +50 -35
  7. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +58 -15
  8. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +26 -3
  9. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/index.js +6 -3
  10. package/dist/es2019/analytics/constants.js +1 -1
  11. package/dist/es2019/hooks/useAssetsClient.js +8 -4
  12. package/dist/es2019/hooks/useDatasourceTableState.js +40 -12
  13. package/dist/es2019/hooks/useValidateAqlText.js +6 -2
  14. package/dist/es2019/services/cmdbService.js +27 -12
  15. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +41 -16
  16. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +23 -3
  17. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/index.js +5 -3
  18. package/dist/esm/analytics/constants.js +1 -1
  19. package/dist/esm/hooks/useAssetsClient.js +7 -4
  20. package/dist/esm/hooks/useDatasourceTableState.js +83 -52
  21. package/dist/esm/hooks/useValidateAqlText.js +5 -2
  22. package/dist/esm/services/cmdbService.js +50 -35
  23. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +59 -16
  24. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +26 -3
  25. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/index.js +7 -4
  26. package/dist/types/analytics/generated/analytics.types.d.ts +41 -1
  27. package/dist/types/services/cmdbService.d.ts +8 -4
  28. package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts +2 -1
  29. package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +41 -1
  30. package/dist/types-ts4.5/services/cmdbService.d.ts +8 -4
  31. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts +2 -1
  32. package/package.json +5 -4
@@ -1,10 +1,11 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
4
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
5
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
6
  var _excluded = ["isOpen"];
6
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
- import React, { useCallback, useEffect, useRef, useState } from 'react';
8
+ import React, { useCallback, useEffect, useState } from 'react';
8
9
  import { useIntl } from 'react-intl-next';
9
10
  import { useDebouncedCallback } from 'use-debounce';
10
11
  import { CheckboxOption, PopupSelect } from '@atlaskit/select';
@@ -31,7 +32,6 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
31
32
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
32
33
  var _useIntl = useIntl(),
33
34
  formatMessage = _useIntl.formatMessage;
34
- var pickerRef = useRef(null);
35
35
  var _useState = useState(''),
36
36
  _useState2 = _slicedToArray(_useState, 2),
37
37
  searchTerm = _useState2[0],
@@ -40,6 +40,10 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
40
40
  _useState4 = _slicedToArray(_useState3, 2),
41
41
  selectedOptions = _useState4[0],
42
42
  setSelectedOptions = _useState4[1];
43
+ var _useState5 = useState(selectedOptions),
44
+ _useState6 = _slicedToArray(_useState5, 2),
45
+ sortedOptions = _useState6[0],
46
+ setSortedOptions = _useState6[1];
43
47
  var _useFilterOptions = useFilterOptions({
44
48
  filterType: filterType,
45
49
  cloudId: cloudId
@@ -80,14 +84,46 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
80
84
  setSelectedOptions(newValue);
81
85
  onSelectionChange(newValue);
82
86
  };
83
- var handleOpenPopup = useCallback(function () {
84
- if (status === 'empty' || status === 'rejected') {
85
- // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
86
- fetchFilterOptions({
87
- searchString: searchTerm
87
+ var sortOptionsOnPopupOpen = useCallback(function () {
88
+ if (selectedOptions.length === 0) {
89
+ setSortedOptions(filterOptions);
90
+ return;
91
+ }
92
+ var nonSelectedOptions = filterOptions.filter(function (option) {
93
+ return !selectedOptions.find(function (selectedOption) {
94
+ return selectedOption.value === option.value;
95
+ });
96
+ });
97
+ var newOptions = [].concat(_toConsumableArray(selectedOptions), _toConsumableArray(nonSelectedOptions));
98
+ setSortedOptions(newOptions);
99
+ }, [selectedOptions, filterOptions]);
100
+ var sortOptionsOnResolve = useCallback(function () {
101
+ var newOptions = filterOptions.filter(function (option) {
102
+ return !sortedOptions.find(function (sortedOption) {
103
+ return sortedOption.value === option.value;
104
+ });
105
+ });
106
+ var shouldSetSortOptions = false;
107
+ if (sortedOptions.length !== filterOptions.length) {
108
+ shouldSetSortOptions = true;
109
+ } else {
110
+ sortedOptions.forEach(function (sortedOption) {
111
+ if (!filterOptions.some(function (filterOption) {
112
+ return filterOption.value === sortedOption.value;
113
+ })) {
114
+ shouldSetSortOptions = true;
115
+ }
88
116
  });
89
117
  }
90
- }, [fetchFilterOptions, searchTerm, status]);
118
+ if (shouldSetSortOptions) {
119
+ var sortedOptionsFiltered = sortedOptions.filter(function (sortedOption) {
120
+ return filterOptions.some(function (filterOption) {
121
+ return filterOption.value === sortedOption.value;
122
+ });
123
+ });
124
+ setSortedOptions([].concat(_toConsumableArray(sortedOptionsFiltered), _toConsumableArray(newOptions)));
125
+ }
126
+ }, [filterOptions, sortedOptions]);
91
127
  var handleShowMore = useCallback(function () {
92
128
  if (pageCursor) {
93
129
  fetchFilterOptions({
@@ -96,28 +132,34 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
96
132
  });
97
133
  }
98
134
  }, [fetchFilterOptions, pageCursor, searchTerm]);
135
+ var handleOpenPopup = useCallback(function () {
136
+ if (status === 'empty' || status === 'rejected') {
137
+ // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
138
+ fetchFilterOptions({
139
+ searchString: searchTerm
140
+ });
141
+ } else if (status === 'resolved') {
142
+ sortOptionsOnPopupOpen();
143
+ }
144
+ }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
99
145
  useEffect(function () {
100
146
  if (status === 'resolved') {
101
- var _pickerRef$current;
102
- // necessary to refocus the search input after the loading state
103
- pickerRef === null || pickerRef === void 0 || (_pickerRef$current = pickerRef.current) === null || _pickerRef$current === void 0 || (_pickerRef$current = _pickerRef$current.selectRef) === null || _pickerRef$current === void 0 || (_pickerRef$current = _pickerRef$current.inputRef) === null || _pickerRef$current === void 0 || _pickerRef$current.focus();
147
+ sortOptionsOnResolve();
104
148
  }
105
- }, [status]);
149
+ }, [sortOptionsOnResolve, status]);
106
150
  var filterOptionsLength = filterOptions.length;
107
151
  var isError = status === 'rejected';
108
152
  var isLoading = status === 'loading' || status === 'empty';
109
153
  var isLoadingMore = status === 'loadingMore';
110
154
  var isEmpty = status === 'resolved' && filterOptionsLength === 0;
155
+ var popupSelectOptions = isLoading || isError ? [] : sortedOptions; // if not set to [], then on loading, no loading UI will be shown
111
156
  var areAllResultsLoaded = filterOptions.length === totalCount;
112
157
  var shouldShowFooter = (status === 'resolved' || isLoadingMore) && filterOptions.length > 0; // footer should not disappear when there is an inline spinner for loading more data
113
158
  var shouldDisplayShowMoreButton = status === 'resolved' && !!pageCursor && !areAllResultsLoaded;
114
- var options = isLoading || isError ? [] : filterOptions; // if not set to [], for eg: on loading, no loading UI will be shown
115
-
116
159
  return /*#__PURE__*/React.createElement(PopupSelect, {
117
160
  isMulti: true,
118
161
  maxMenuWidth: 300,
119
162
  minMenuWidth: 300,
120
- ref: pickerRef,
121
163
  testId: "jlol-basic-filter-popup-select",
122
164
  inputId: "jlol-basic-filter-popup-select--input"
123
165
  /*
@@ -153,7 +195,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
153
195
  IndicatorSeparator: undefined // disables the | separator between search input and icon
154
196
  },
155
197
 
156
- options: options,
198
+ options: popupSelectOptions,
157
199
  value: selectedOptions,
158
200
  filterOption: noFilterOptions,
159
201
  formatOptionLabel: formatOptionLabel,
@@ -164,6 +206,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
164
206
  triggerProps = _objectWithoutProperties(_ref3, _excluded);
165
207
  return /*#__PURE__*/React.createElement(PopupTrigger, _extends({}, triggerProps, {
166
208
  filterType: filterType,
209
+ selectedOptions: selectedOptions,
167
210
  isSelected: isOpen,
168
211
  onClick: handleOpenPopup,
169
212
  isDisabled: isDisabled
@@ -1,23 +1,46 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
1
2
  import React, { forwardRef } from 'react';
2
3
  import { FormattedMessage } from 'react-intl-next';
4
+ import Badge from '@atlaskit/badge';
3
5
  import Button from '@atlaskit/button/standard-button';
4
6
  import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
7
+ import { Box, Flex, xcss } from '@atlaskit/primitives';
5
8
  import { asyncPopupSelectMessages } from './messages';
9
+ var triggerButtonLabelStyles = xcss({
10
+ textOverflow: 'ellipsis',
11
+ overflow: 'hidden',
12
+ maxWidth: '150px'
13
+ });
14
+ var badgeStyles = xcss({
15
+ marginLeft: 'space.050'
16
+ });
6
17
  var PopupTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
18
  var filterType = _ref.filterType,
8
19
  isSelected = _ref.isSelected,
9
20
  isDisabled = _ref.isDisabled,
10
- onClick = _ref.onClick;
21
+ onClick = _ref.onClick,
22
+ selectedOptions = _ref.selectedOptions;
23
+ var _ref2 = selectedOptions || [],
24
+ _ref3 = _slicedToArray(_ref2, 1),
25
+ firstOption = _ref3[0];
26
+ var hasOptions = selectedOptions && selectedOptions.length > 0;
11
27
  return /*#__PURE__*/React.createElement(Button, {
12
28
  ref: ref,
13
29
  appearance: "default",
14
- isSelected: isSelected,
30
+ isSelected: isSelected || hasOptions,
15
31
  isDisabled: isDisabled,
16
32
  onClick: onClick,
17
33
  testId: "jlol-basic-filter-".concat(filterType, "-trigger"),
18
34
  iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, {
19
35
  label: ""
20
36
  })
21
- }, /*#__PURE__*/React.createElement(FormattedMessage, asyncPopupSelectMessages["".concat(filterType, "Label")]));
37
+ }, /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Box, {
38
+ xcss: triggerButtonLabelStyles
39
+ }, /*#__PURE__*/React.createElement(FormattedMessage, asyncPopupSelectMessages["".concat(filterType, "Label")]), firstOption && /*#__PURE__*/React.createElement(React.Fragment, null, ": ", firstOption.label)), selectedOptions && selectedOptions.length > 1 && /*#__PURE__*/React.createElement(Flex, {
40
+ xcss: badgeStyles,
41
+ alignItems: "center"
42
+ }, /*#__PURE__*/React.createElement(Badge, {
43
+ appearance: "primary"
44
+ }, "+", selectedOptions.length - 1))));
22
45
  });
23
46
  export default PopupTrigger;
@@ -1,5 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useEffect, useState } from 'react';
2
+ import React, { useCallback, useEffect, useState } from 'react';
3
3
  import { Flex, xcss } from '@atlaskit/primitives';
4
4
  import { isValidJql } from '../utils';
5
5
  import AsyncPopupSelect from './async-popup-select';
@@ -11,14 +11,17 @@ var BasicFilterContainer = function BasicFilterContainer(_ref) {
11
11
  var jql = _ref.jql,
12
12
  cloudId = _ref.cloudId;
13
13
  var _useState = useState([]),
14
- _useState2 = _slicedToArray(_useState, 1),
15
- selection = _useState2[0];
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ selection = _useState2[0],
16
+ setSelection = _useState2[1];
16
17
  useEffect(function () {
17
18
  if (isValidJql(jql)) {
18
19
  // hydrate hook call goes in here
19
20
  }
20
21
  }, [jql]);
21
- var handleSelectionChange = function handleSelectionChange() {};
22
+ var handleSelectionChange = useCallback(function (options) {
23
+ setSelection(options);
24
+ }, [setSelection]);
22
25
  return /*#__PURE__*/React.createElement(Flex, {
23
26
  xcss: basicFilterContainerStyles,
24
27
  gap: "space.100",
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::ddaee20abebe8b4891d75f243120dce8>>
6
+ * @codegen <<SignedSource::d3722446f615a812f3e336474f9d8d3c>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -90,6 +90,22 @@ export type ErrorShownBasicSearchDropdownAttributesType = {
90
90
  reason: 'agg' | 'network' | 'unknown';
91
91
  };
92
92
  export type AqlEditorSearchedAttributesType = {};
93
+ export type GetWorkspaceIdSuccessAttributesType = {};
94
+ export type GetWorkspaceIdFailedAttributesType = {
95
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
96
+ };
97
+ export type ValidateAqlSuccessAttributesType = {};
98
+ export type ValidateAqlFailedAttributesType = {
99
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
100
+ };
101
+ export type ObjectSchemaSuccessAttributesType = {};
102
+ export type ObjectSchemaFailedAttributesType = {
103
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
104
+ };
105
+ export type ObjectSchemasSuccessAttributesType = {};
106
+ export type ObjectSchemasFailedAttributesType = {
107
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
108
+ };
93
109
  export type AnalyticsEventAttributes = {
94
110
  /**
95
111
  * Fires when user sees modal dialog. */
@@ -148,5 +164,29 @@ export type AnalyticsEventAttributes = {
148
164
  /**
149
165
  * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
150
166
  'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
167
+ /**
168
+ * Fired when fetching a workspace Id is successful. */
169
+ 'operational.getWorkspaceId.success': GetWorkspaceIdSuccessAttributesType;
170
+ /**
171
+ * Fired when fetching a workspace Id fails. */
172
+ 'operational.getWorkspaceId.failed': GetWorkspaceIdFailedAttributesType;
173
+ /**
174
+ * Fired when making a request to validateAQL is successful. */
175
+ 'operational.validateAql.success': ValidateAqlSuccessAttributesType;
176
+ /**
177
+ * Fired when making a request to validateAQL fails. */
178
+ 'operational.validateAql.failed': ValidateAqlFailedAttributesType;
179
+ /**
180
+ * Fired when fetching an object schema is successful. */
181
+ 'operational.objectSchema.success': ObjectSchemaSuccessAttributesType;
182
+ /**
183
+ * Fired when fetching an object schema fails. */
184
+ 'operational.objectSchema.failed': ObjectSchemaFailedAttributesType;
185
+ /**
186
+ * Fired when fetching object schemas is successful. */
187
+ 'operational.objectSchemas.success': ObjectSchemasSuccessAttributesType;
188
+ /**
189
+ * Fired when fetching object schemas fails. */
190
+ 'operational.objectSchemas.failed': ObjectSchemasFailedAttributesType;
151
191
  };
152
192
  export type EventKey = keyof AnalyticsEventAttributes;
@@ -1,7 +1,11 @@
1
+ import { EventKey } from '../analytics/generated/analytics.types';
2
+ import createEventPayload from '../analytics/generated/create-event-payload';
1
3
  import { AqlValidateResponse, FetchObjectSchemasResponse } from '../types/assets/types';
2
- export declare const getWorkspaceId: () => Promise<string>;
4
+ type AnalyticsFireEvent = <K extends EventKey>(...params: Parameters<typeof createEventPayload<K>>) => void;
5
+ export declare const getWorkspaceId: (fireEvent?: AnalyticsFireEvent) => Promise<string>;
3
6
  export declare const validateAql: (workspaceId: string, data: {
4
7
  qlQuery: string;
5
- }) => Promise<AqlValidateResponse>;
6
- export declare const fetchObjectSchema: (workspaceId: string, schemaId: string) => Promise<import("../types/assets/types").ObjectSchema>;
7
- export declare const fetchObjectSchemas: (workspaceId: string, query?: string) => Promise<FetchObjectSchemasResponse>;
8
+ }, fireEvent?: AnalyticsFireEvent) => Promise<AqlValidateResponse>;
9
+ export declare const fetchObjectSchema: (workspaceId: string, schemaId: string, fireEvent?: AnalyticsFireEvent) => Promise<import("../types/assets/types").ObjectSchema>;
10
+ export declare const fetchObjectSchemas: (workspaceId: string, query?: string, fireEvent?: AnalyticsFireEvent) => Promise<FetchObjectSchemasResponse>;
11
+ export {};
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { BasicFilterFieldType } from '../../types';
2
+ import { BasicFilterFieldType, SelectOption } from '../../types';
3
3
  export interface PopupTriggerProps {
4
4
  filterType: BasicFilterFieldType;
5
+ selectedOptions?: ReadonlyArray<SelectOption>;
5
6
  isSelected?: boolean;
6
7
  isDisabled?: boolean;
7
8
  onClick?: () => void;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::ddaee20abebe8b4891d75f243120dce8>>
6
+ * @codegen <<SignedSource::d3722446f615a812f3e336474f9d8d3c>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -90,6 +90,22 @@ export type ErrorShownBasicSearchDropdownAttributesType = {
90
90
  reason: 'agg' | 'network' | 'unknown';
91
91
  };
92
92
  export type AqlEditorSearchedAttributesType = {};
93
+ export type GetWorkspaceIdSuccessAttributesType = {};
94
+ export type GetWorkspaceIdFailedAttributesType = {
95
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
96
+ };
97
+ export type ValidateAqlSuccessAttributesType = {};
98
+ export type ValidateAqlFailedAttributesType = {
99
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
100
+ };
101
+ export type ObjectSchemaSuccessAttributesType = {};
102
+ export type ObjectSchemaFailedAttributesType = {
103
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
104
+ };
105
+ export type ObjectSchemasSuccessAttributesType = {};
106
+ export type ObjectSchemasFailedAttributesType = {
107
+ statusCodeGroup: '1xx' | '3xx' | '4xx' | '5xx' | 'unknown';
108
+ };
93
109
  export type AnalyticsEventAttributes = {
94
110
  /**
95
111
  * Fires when user sees modal dialog. */
@@ -148,5 +164,29 @@ export type AnalyticsEventAttributes = {
148
164
  /**
149
165
  * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
150
166
  'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
167
+ /**
168
+ * Fired when fetching a workspace Id is successful. */
169
+ 'operational.getWorkspaceId.success': GetWorkspaceIdSuccessAttributesType;
170
+ /**
171
+ * Fired when fetching a workspace Id fails. */
172
+ 'operational.getWorkspaceId.failed': GetWorkspaceIdFailedAttributesType;
173
+ /**
174
+ * Fired when making a request to validateAQL is successful. */
175
+ 'operational.validateAql.success': ValidateAqlSuccessAttributesType;
176
+ /**
177
+ * Fired when making a request to validateAQL fails. */
178
+ 'operational.validateAql.failed': ValidateAqlFailedAttributesType;
179
+ /**
180
+ * Fired when fetching an object schema is successful. */
181
+ 'operational.objectSchema.success': ObjectSchemaSuccessAttributesType;
182
+ /**
183
+ * Fired when fetching an object schema fails. */
184
+ 'operational.objectSchema.failed': ObjectSchemaFailedAttributesType;
185
+ /**
186
+ * Fired when fetching object schemas is successful. */
187
+ 'operational.objectSchemas.success': ObjectSchemasSuccessAttributesType;
188
+ /**
189
+ * Fired when fetching object schemas fails. */
190
+ 'operational.objectSchemas.failed': ObjectSchemasFailedAttributesType;
151
191
  };
152
192
  export type EventKey = keyof AnalyticsEventAttributes;
@@ -1,7 +1,11 @@
1
+ import { EventKey } from '../analytics/generated/analytics.types';
2
+ import createEventPayload from '../analytics/generated/create-event-payload';
1
3
  import { AqlValidateResponse, FetchObjectSchemasResponse } from '../types/assets/types';
2
- export declare const getWorkspaceId: () => Promise<string>;
4
+ type AnalyticsFireEvent = <K extends EventKey>(...params: Parameters<typeof createEventPayload<K>>) => void;
5
+ export declare const getWorkspaceId: (fireEvent?: AnalyticsFireEvent) => Promise<string>;
3
6
  export declare const validateAql: (workspaceId: string, data: {
4
7
  qlQuery: string;
5
- }) => Promise<AqlValidateResponse>;
6
- export declare const fetchObjectSchema: (workspaceId: string, schemaId: string) => Promise<import("../types/assets/types").ObjectSchema>;
7
- export declare const fetchObjectSchemas: (workspaceId: string, query?: string) => Promise<FetchObjectSchemasResponse>;
8
+ }, fireEvent?: AnalyticsFireEvent) => Promise<AqlValidateResponse>;
9
+ export declare const fetchObjectSchema: (workspaceId: string, schemaId: string, fireEvent?: AnalyticsFireEvent) => Promise<import("../types/assets/types").ObjectSchema>;
10
+ export declare const fetchObjectSchemas: (workspaceId: string, query?: string, fireEvent?: AnalyticsFireEvent) => Promise<FetchObjectSchemasResponse>;
11
+ export {};
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { BasicFilterFieldType } from '../../types';
2
+ import { BasicFilterFieldType, SelectOption } from '../../types';
3
3
  export interface PopupTriggerProps {
4
4
  filterType: BasicFilterFieldType;
5
+ selectedOptions?: ReadonlyArray<SelectOption>;
5
6
  isSelected?: boolean;
6
7
  isDisabled?: boolean;
7
8
  onClick?: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.16.5",
3
+ "version": "1.17.1",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,6 +33,7 @@
33
33
  "@atlaskit/adf-schema": "^32.0.0",
34
34
  "@atlaskit/analytics-next": "^9.1.3",
35
35
  "@atlaskit/avatar": "^21.4.0",
36
+ "@atlaskit/badge": "^15.1.16",
36
37
  "@atlaskit/button": "^16.16.0",
37
38
  "@atlaskit/editor-prosemirror": "1.1.0",
38
39
  "@atlaskit/empty-state": "^7.5.0",
@@ -46,7 +47,7 @@
46
47
  "@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
47
48
  "@atlaskit/link-client-extension": "^1.8.0",
48
49
  "@atlaskit/linking-common": "^4.18.0",
49
- "@atlaskit/linking-types": "^8.4.0",
50
+ "@atlaskit/linking-types": "^8.5.0",
50
51
  "@atlaskit/lozenge": "^11.4.0",
51
52
  "@atlaskit/modal-dialog": "^12.8.0",
52
53
  "@atlaskit/platform-feature-flags": "^0.2.4",
@@ -58,11 +59,11 @@
58
59
  "@atlaskit/select": "^16.7.0",
59
60
  "@atlaskit/smart-card": "^26.42.0",
60
61
  "@atlaskit/spinner": "^15.6.0",
61
- "@atlaskit/tag": "^11.6.0",
62
+ "@atlaskit/tag": "^12.0.0",
62
63
  "@atlaskit/textfield": "5.6.8",
63
64
  "@atlaskit/theme": "^12.6.0",
64
65
  "@atlaskit/tokens": "^1.28.0",
65
- "@atlaskit/tooltip": "^17.8.0",
66
+ "@atlaskit/tooltip": "^18.0.0",
66
67
  "@atlaskit/ufo": "^0.2.4",
67
68
  "@atlassianlabs/jql-editor": "^2.0.1",
68
69
  "@babel/runtime": "^7.0.0",