@atlaskit/link-datasource 1.17.5 → 1.17.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.17.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#43358](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43358) [`d275736284c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d275736284c) - Add analytics event when basic filter dropdown menu is opened.
8
+ - [#43379](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43379) [`482c025520d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/482c025520d) - ED-20763 Upgrade ADF schema version to 33.2.3 for MBE nodes.
9
+
3
10
  ## 1.17.5
4
11
 
5
12
  ### Patch Changes
@@ -7,5 +7,5 @@ exports.packageMetaData = exports.EVENT_CHANNEL = void 0;
7
7
  var EVENT_CHANNEL = exports.EVENT_CHANNEL = 'media';
8
8
  var packageMetaData = exports.packageMetaData = {
9
9
  packageName: "@atlaskit/link-datasource",
10
- packageVersion: "1.17.5"
10
+ packageVersion: "1.17.6"
11
11
  };
@@ -17,6 +17,7 @@ var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
17
17
  var _reactIntlNext = require("react-intl-next");
18
18
  var _useDebounce = require("use-debounce");
19
19
  var _select = require("@atlaskit/select");
20
+ var _analytics = require("../../../../../analytics");
20
21
  var _useFilterOptions2 = require("../../hooks/useFilterOptions");
21
22
  var _menuList = _interopRequireDefault(require("../menu-list"));
22
23
  var _control = _interopRequireDefault(require("./control"));
@@ -45,6 +46,8 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
45
46
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
46
47
  var _useIntl = (0, _reactIntlNext.useIntl)(),
47
48
  formatMessage = _useIntl.formatMessage;
49
+ var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
50
+ fireEvent = _useDatasourceAnalyti.fireEvent;
48
51
  var _useState = (0, _react.useState)(''),
49
52
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
50
53
  searchTerm = _useState2[0],
@@ -161,6 +164,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
161
164
  sortOptionsOnPopupOpen();
162
165
  }
163
166
  }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
167
+ var handleMenuOpen = (0, _react.useCallback)(function () {
168
+ fireEvent('ui.dropdown.opened.basicSearchDropdown', {
169
+ filterType: filterType,
170
+ selectionCount: selectedOptions.length
171
+ });
172
+ }, [filterType, fireEvent, selectedOptions.length]);
164
173
  (0, _react.useEffect)(function () {
165
174
  if (status === 'resolved') {
166
175
  sortOptionsOnResolve();
@@ -235,6 +244,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
235
244
  formatOptionLabel: _formatOptionLabel.default,
236
245
  onChange: handleOptionSelection,
237
246
  onInputChange: handleInputChange,
247
+ onOpen: handleMenuOpen,
238
248
  target: function target(_ref3) {
239
249
  var isOpen = _ref3.isOpen,
240
250
  triggerProps = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
@@ -1,5 +1,5 @@
1
1
  export const EVENT_CHANNEL = 'media';
2
2
  export const packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.17.5"
4
+ packageVersion: "1.17.6"
5
5
  };
@@ -4,6 +4,7 @@ import isEqual from 'lodash/isEqual';
4
4
  import { useIntl } from 'react-intl-next';
5
5
  import { useDebouncedCallback } from 'use-debounce';
6
6
  import { CheckboxOption, PopupSelect } from '@atlaskit/select';
7
+ import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
7
8
  import { useFilterOptions } from '../../hooks/useFilterOptions';
8
9
  import CustomMenuList from '../menu-list';
9
10
  import CustomControl from './control';
@@ -26,6 +27,9 @@ const AsyncPopupSelect = ({
26
27
  const {
27
28
  formatMessage
28
29
  } = useIntl();
30
+ const {
31
+ fireEvent
32
+ } = useDatasourceAnalyticsEvents();
29
33
  const [searchTerm, setSearchTerm] = useState('');
30
34
  const [selectedOptions, setSelectedOptions] = useState(selection);
31
35
  const [sortedOptions, setSortedOptions] = useState([]);
@@ -111,6 +115,12 @@ const AsyncPopupSelect = ({
111
115
  sortOptionsOnPopupOpen();
112
116
  }
113
117
  }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
118
+ const handleMenuOpen = useCallback(() => {
119
+ fireEvent('ui.dropdown.opened.basicSearchDropdown', {
120
+ filterType,
121
+ selectionCount: selectedOptions.length
122
+ });
123
+ }, [filterType, fireEvent, selectedOptions.length]);
114
124
  useEffect(() => {
115
125
  if (status === 'resolved') {
116
126
  sortOptionsOnResolve();
@@ -185,6 +195,7 @@ const AsyncPopupSelect = ({
185
195
  formatOptionLabel: formatOptionLabel,
186
196
  onChange: handleOptionSelection,
187
197
  onInputChange: handleInputChange,
198
+ onOpen: handleMenuOpen,
188
199
  target: ({
189
200
  isOpen,
190
201
  ...triggerProps
@@ -1,5 +1,5 @@
1
1
  export var EVENT_CHANNEL = 'media';
2
2
  export var packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.17.5"
4
+ packageVersion: "1.17.6"
5
5
  };
@@ -10,6 +10,7 @@ import isEqual from 'lodash/isEqual';
10
10
  import { useIntl } from 'react-intl-next';
11
11
  import { useDebouncedCallback } from 'use-debounce';
12
12
  import { CheckboxOption, PopupSelect } from '@atlaskit/select';
13
+ import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
13
14
  import { useFilterOptions } from '../../hooks/useFilterOptions';
14
15
  import CustomMenuList from '../menu-list';
15
16
  import CustomControl from './control';
@@ -35,6 +36,8 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
35
36
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
36
37
  var _useIntl = useIntl(),
37
38
  formatMessage = _useIntl.formatMessage;
39
+ var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
40
+ fireEvent = _useDatasourceAnalyti.fireEvent;
38
41
  var _useState = useState(''),
39
42
  _useState2 = _slicedToArray(_useState, 2),
40
43
  searchTerm = _useState2[0],
@@ -151,6 +154,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
151
154
  sortOptionsOnPopupOpen();
152
155
  }
153
156
  }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
157
+ var handleMenuOpen = useCallback(function () {
158
+ fireEvent('ui.dropdown.opened.basicSearchDropdown', {
159
+ filterType: filterType,
160
+ selectionCount: selectedOptions.length
161
+ });
162
+ }, [filterType, fireEvent, selectedOptions.length]);
154
163
  useEffect(function () {
155
164
  if (status === 'resolved') {
156
165
  sortOptionsOnResolve();
@@ -225,6 +234,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
225
234
  formatOptionLabel: formatOptionLabel,
226
235
  onChange: handleOptionSelection,
227
236
  onInputChange: handleInputChange,
237
+ onOpen: handleMenuOpen,
228
238
  target: function target(_ref3) {
229
239
  var isOpen = _ref3.isOpen,
230
240
  triggerProps = _objectWithoutProperties(_ref3, _excluded);
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::d3722446f615a812f3e336474f9d8d3c>>
6
+ * @codegen <<SignedSource::f6b92bba98139798dca3a8fe75e32625>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -89,6 +89,10 @@ export type ErrorShownBasicSearchDropdownAttributesType = {
89
89
  filterType: 'project' | 'assignee' | 'issuetype' | 'status';
90
90
  reason: 'agg' | 'network' | 'unknown';
91
91
  };
92
+ export type DropdownOpenedBasicSearchDropdownAttributesType = {
93
+ filterType: 'project' | 'assignee' | 'issuetype' | 'status';
94
+ selectionCount: number;
95
+ };
92
96
  export type AqlEditorSearchedAttributesType = {};
93
97
  export type GetWorkspaceIdSuccessAttributesType = {};
94
98
  export type GetWorkspaceIdFailedAttributesType = {
@@ -161,6 +165,9 @@ export type AnalyticsEventAttributes = {
161
165
  /**
162
166
  * Fired when the basic filter search dropdown shows an error UI */
163
167
  'ui.error.shown.basicSearchDropdown': ErrorShownBasicSearchDropdownAttributesType;
168
+ /**
169
+ * Fired when the basic filter dropdown is opened */
170
+ 'ui.dropdown.opened.basicSearchDropdown': DropdownOpenedBasicSearchDropdownAttributesType;
164
171
  /**
165
172
  * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
166
173
  'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::d3722446f615a812f3e336474f9d8d3c>>
6
+ * @codegen <<SignedSource::f6b92bba98139798dca3a8fe75e32625>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -89,6 +89,10 @@ export type ErrorShownBasicSearchDropdownAttributesType = {
89
89
  filterType: 'project' | 'assignee' | 'issuetype' | 'status';
90
90
  reason: 'agg' | 'network' | 'unknown';
91
91
  };
92
+ export type DropdownOpenedBasicSearchDropdownAttributesType = {
93
+ filterType: 'project' | 'assignee' | 'issuetype' | 'status';
94
+ selectionCount: number;
95
+ };
92
96
  export type AqlEditorSearchedAttributesType = {};
93
97
  export type GetWorkspaceIdSuccessAttributesType = {};
94
98
  export type GetWorkspaceIdFailedAttributesType = {
@@ -161,6 +165,9 @@ export type AnalyticsEventAttributes = {
161
165
  /**
162
166
  * Fired when the basic filter search dropdown shows an error UI */
163
167
  'ui.error.shown.basicSearchDropdown': ErrorShownBasicSearchDropdownAttributesType;
168
+ /**
169
+ * Fired when the basic filter dropdown is opened */
170
+ 'ui.dropdown.opened.basicSearchDropdown': DropdownOpenedBasicSearchDropdownAttributesType;
164
171
  /**
165
172
  * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
166
173
  'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.17.5",
3
+ "version": "1.17.6",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "analytics:codegen": "yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource --output ./src/analytics/generated"
31
31
  },
32
32
  "dependencies": {
33
- "@atlaskit/adf-schema": "^32.0.0",
33
+ "@atlaskit/adf-schema": "^33.2.3",
34
34
  "@atlaskit/analytics-next": "^9.1.3",
35
35
  "@atlaskit/avatar": "^21.4.0",
36
36
  "@atlaskit/badge": "^15.1.16",