@atlaskit/link-picker 1.22.0 → 1.22.2
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 +12 -0
- package/dist/cjs/common/analytics/input-field-tracking.js +1 -1
- package/dist/cjs/common/utils/analytics/analytics.codegen.js +42 -0
- package/dist/cjs/services/use-plugins/index.js +1 -1
- package/dist/cjs/ui/error-boundary/index.js +1 -1
- package/dist/cjs/ui/link-picker/index.js +1 -1
- package/dist/cjs/ui/link-picker/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/cjs/ui/link-picker/track-mount/index.js +1 -1
- package/dist/cjs/ui/link-picker/track-tab-viewed/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/analytics/input-field-tracking.js +1 -1
- package/dist/es2019/common/utils/analytics/analytics.codegen.js +28 -0
- package/dist/es2019/services/use-plugins/index.js +1 -1
- package/dist/es2019/ui/error-boundary/index.js +1 -1
- package/dist/es2019/ui/link-picker/index.js +1 -1
- package/dist/es2019/ui/link-picker/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/es2019/ui/link-picker/track-mount/index.js +1 -1
- package/dist/es2019/ui/link-picker/track-tab-viewed/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/analytics/input-field-tracking.js +1 -1
- package/dist/esm/common/utils/analytics/analytics.codegen.js +34 -0
- package/dist/esm/services/use-plugins/index.js +1 -1
- package/dist/esm/ui/error-boundary/index.js +1 -1
- package/dist/esm/ui/link-picker/index.js +1 -1
- package/dist/esm/ui/link-picker/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/esm/ui/link-picker/track-mount/index.js +1 -1
- package/dist/esm/ui/link-picker/track-tab-viewed/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/common/analytics/context.d.ts +1 -1
- package/dist/types/common/analytics/input-field-tracking.d.ts +1 -1
- package/dist/{types-ts4.5 → types/common/utils/analytics}/analytics.codegen.d.ts +10 -2
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/common/analytics/context.d.ts +1 -1
- package/dist/types-ts4.5/common/analytics/input-field-tracking.d.ts +1 -1
- package/dist/{types → types-ts4.5/common/utils/analytics}/analytics.codegen.d.ts +10 -2
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/package.json +6 -10
- package/dist/cjs/analytics.codegen.js +0 -27
- package/dist/es2019/analytics.codegen.js +0 -20
- package/dist/esm/analytics.codegen.js +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.22.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
|
|
8
|
+
|
|
9
|
+
## 1.22.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`ae5ac36af00`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae5ac36af00) - Updates analytics codegen to support screen events.
|
|
14
|
+
|
|
3
15
|
## 1.22.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -12,7 +12,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
14
14
|
var _constants = require("../constants");
|
|
15
|
-
var _analytics = _interopRequireDefault(require("../../analytics.codegen"));
|
|
15
|
+
var _analytics = _interopRequireDefault(require("../../common/utils/analytics/analytics.codegen"));
|
|
16
16
|
var _2 = require(".");
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
/**
|
|
10
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
11
|
+
*
|
|
12
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
13
|
+
*
|
|
14
|
+
* @codegen <<SignedSource::e7a81d0d46e015c9728ae9557b47040f>>
|
|
15
|
+
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
function createEventPayload(eventKey, attributes) {
|
|
19
|
+
var _eventKey$split = eventKey.split('.'),
|
|
20
|
+
_eventKey$split2 = (0, _slicedToArray2.default)(_eventKey$split, 4),
|
|
21
|
+
eventType = _eventKey$split2[0],
|
|
22
|
+
actionSubject = _eventKey$split2[1],
|
|
23
|
+
action = _eventKey$split2[2],
|
|
24
|
+
actionSubjectId = _eventKey$split2[3];
|
|
25
|
+
if (eventType === 'screen') {
|
|
26
|
+
return {
|
|
27
|
+
eventType: eventType,
|
|
28
|
+
name: actionSubject,
|
|
29
|
+
action: 'viewed',
|
|
30
|
+
attributes: attributes
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
eventType: eventType,
|
|
35
|
+
actionSubject: actionSubject,
|
|
36
|
+
actionSubjectId: actionSubjectId,
|
|
37
|
+
action: action,
|
|
38
|
+
attributes: attributes
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
var _default = createEventPayload;
|
|
42
|
+
exports.default = _default;
|
|
@@ -12,7 +12,7 @@ var _react = require("react");
|
|
|
12
12
|
var _convertToError = require("@atlaskit/frontend-utilities/convert-to-error");
|
|
13
13
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
14
14
|
var _linkPicker = require("../../ui/link-picker");
|
|
15
|
-
var _analytics = _interopRequireDefault(require("../../analytics.codegen"));
|
|
15
|
+
var _analytics = _interopRequireDefault(require("../../common/utils/analytics/analytics.codegen"));
|
|
16
16
|
var _constants = require("../../common/constants");
|
|
17
17
|
var _utils = require("./utils");
|
|
18
18
|
var _reducer = require("./reducer");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
11
|
-
var _analytics = _interopRequireDefault(require("../../analytics.codegen"));
|
|
11
|
+
var _analytics = _interopRequireDefault(require("../../common/utils/analytics/analytics.codegen"));
|
|
12
12
|
var _constants = require("../../common/constants");
|
|
13
13
|
var _experiences = require("../../common/analytics/experiences");
|
|
14
14
|
var _sessionProvider = require("../../controllers/session-provider");
|
|
@@ -16,7 +16,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
16
16
|
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
17
17
|
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
18
18
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
19
|
-
var _analytics = _interopRequireDefault(require("../../analytics.codegen"));
|
|
19
|
+
var _analytics = _interopRequireDefault(require("../../common/utils/analytics/analytics.codegen"));
|
|
20
20
|
var _constants = require("../../common/constants");
|
|
21
21
|
var _analytics2 = require("../../common/analytics");
|
|
22
22
|
var _url2 = require("@atlaskit/linking-common/url");
|
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _useDebounce3 = require("use-debounce");
|
|
11
11
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
12
12
|
var _constants = require("../../../../common/constants");
|
|
13
|
-
var _analytics = _interopRequireDefault(require("../../../../analytics.codegen"));
|
|
13
|
+
var _analytics = _interopRequireDefault(require("../../../../common/utils/analytics/analytics.codegen"));
|
|
14
14
|
var DEBOUNCE_MS = 400;
|
|
15
15
|
var useTrackResultsShown = function useTrackResultsShown(isLoading, items, hasSearchTerm) {
|
|
16
16
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
10
|
var _experiences = require("../../../common/analytics/experiences");
|
|
11
|
-
var _analytics = _interopRequireDefault(require("../../../analytics.codegen"));
|
|
11
|
+
var _analytics = _interopRequireDefault(require("../../../common/utils/analytics/analytics.codegen"));
|
|
12
12
|
var _constants = require("../../../common/constants");
|
|
13
13
|
var _sessionProvider = require("../../../controllers/session-provider");
|
|
14
14
|
/** @jsx jsx */
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
|
-
var _analytics = _interopRequireDefault(require("../../../analytics.codegen"));
|
|
10
|
+
var _analytics = _interopRequireDefault(require("../../../common/utils/analytics/analytics.codegen"));
|
|
11
11
|
var _constants = require("../../../common/constants");
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useRef } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { ANALYTICS_CHANNEL } from '../constants';
|
|
5
|
-
import createEventPayload from '../../analytics.codegen';
|
|
5
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
6
6
|
import { useLinkPickerAnalytics } from '.';
|
|
7
7
|
const isEventWithInputType = e => {
|
|
8
8
|
return typeof e === 'object' && e !== null && 'inputType' in e;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::e7a81d0d46e015c9728ae9557b47040f>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
function createEventPayload(eventKey, attributes) {
|
|
11
|
+
const [eventType, actionSubject, action, actionSubjectId] = eventKey.split('.');
|
|
12
|
+
if (eventType === 'screen') {
|
|
13
|
+
return {
|
|
14
|
+
eventType,
|
|
15
|
+
name: actionSubject,
|
|
16
|
+
action: 'viewed',
|
|
17
|
+
attributes: attributes
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
eventType,
|
|
22
|
+
actionSubject,
|
|
23
|
+
actionSubjectId,
|
|
24
|
+
action,
|
|
25
|
+
attributes: attributes
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export default createEventPayload;
|
|
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useState, useCallback } from 'react';
|
|
|
2
2
|
import { convertToError } from '@atlaskit/frontend-utilities/convert-to-error';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { RECENT_SEARCH_LIST_SIZE } from '../../ui/link-picker';
|
|
5
|
-
import createEventPayload from '../../analytics.codegen';
|
|
5
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
6
6
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
7
7
|
import { CancellationError, resolvePluginUpdates } from './utils';
|
|
8
8
|
import { usePluginReducer } from './reducer';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
-
import createEventPayload from '../../analytics.codegen';
|
|
3
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
4
4
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
5
5
|
import { failUfoExperience, ufoExperience } from '../../common/analytics/experiences';
|
|
6
6
|
import { useLinkPickerSessionId } from '../../controllers/session-provider';
|
|
@@ -7,7 +7,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
7
7
|
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
8
8
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
9
9
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
10
|
-
import createEventPayload from '../../analytics.codegen';
|
|
10
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
11
11
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
12
12
|
import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
|
|
13
13
|
import { normalizeUrl, isSafeUrl } from '@atlaskit/linking-common/url';
|
|
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef } from 'react';
|
|
|
2
2
|
import { useDebounce } from 'use-debounce';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { ANALYTICS_CHANNEL } from '../../../../common/constants';
|
|
5
|
-
import createEventPayload from '../../../../analytics.codegen';
|
|
5
|
+
import createEventPayload from '../../../../common/utils/analytics/analytics.codegen';
|
|
6
6
|
const DEBOUNCE_MS = 400;
|
|
7
7
|
export const useTrackResultsShown = (isLoading, items, hasSearchTerm) => {
|
|
8
8
|
const {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useLayoutEffect } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { succeedUfoExperience, ufoExperience } from '../../../common/analytics/experiences';
|
|
5
|
-
import createEventPayload from '../../../analytics.codegen';
|
|
5
|
+
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
6
6
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
7
7
|
import { useLinkPickerSessionId } from '../../../controllers/session-provider';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useLayoutEffect } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
-
import createEventPayload from '../../../analytics.codegen';
|
|
4
|
+
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
5
5
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
6
6
|
function TrackTabViewed({
|
|
7
7
|
activePlugin
|
package/dist/es2019/version.json
CHANGED
|
@@ -4,7 +4,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
4
4
|
import React, { useCallback, useRef } from 'react';
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
6
|
import { ANALYTICS_CHANNEL } from '../constants';
|
|
7
|
-
import createEventPayload from '../../analytics.codegen';
|
|
7
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
8
8
|
import { useLinkPickerAnalytics } from '.';
|
|
9
9
|
var isEventWithInputType = function isEventWithInputType(e) {
|
|
10
10
|
return _typeof(e) === 'object' && e !== null && 'inputType' in e;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/**
|
|
3
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
4
|
+
*
|
|
5
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
6
|
+
*
|
|
7
|
+
* @codegen <<SignedSource::e7a81d0d46e015c9728ae9557b47040f>>
|
|
8
|
+
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
function createEventPayload(eventKey, attributes) {
|
|
12
|
+
var _eventKey$split = eventKey.split('.'),
|
|
13
|
+
_eventKey$split2 = _slicedToArray(_eventKey$split, 4),
|
|
14
|
+
eventType = _eventKey$split2[0],
|
|
15
|
+
actionSubject = _eventKey$split2[1],
|
|
16
|
+
action = _eventKey$split2[2],
|
|
17
|
+
actionSubjectId = _eventKey$split2[3];
|
|
18
|
+
if (eventType === 'screen') {
|
|
19
|
+
return {
|
|
20
|
+
eventType: eventType,
|
|
21
|
+
name: actionSubject,
|
|
22
|
+
action: 'viewed',
|
|
23
|
+
attributes: attributes
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
eventType: eventType,
|
|
28
|
+
actionSubject: actionSubject,
|
|
29
|
+
actionSubjectId: actionSubjectId,
|
|
30
|
+
action: action,
|
|
31
|
+
attributes: attributes
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export default createEventPayload;
|
|
@@ -5,7 +5,7 @@ import { useEffect, useMemo, useState, useCallback } from 'react';
|
|
|
5
5
|
import { convertToError } from '@atlaskit/frontend-utilities/convert-to-error';
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import { RECENT_SEARCH_LIST_SIZE } from '../../ui/link-picker';
|
|
8
|
-
import createEventPayload from '../../analytics.codegen';
|
|
8
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
9
9
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
10
10
|
import { CancellationError, resolvePluginUpdates } from './utils';
|
|
11
11
|
import { usePluginReducer } from './reducer';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
-
import createEventPayload from '../../analytics.codegen';
|
|
3
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
4
4
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
5
5
|
import { failUfoExperience, ufoExperience } from '../../common/analytics/experiences';
|
|
6
6
|
import { useLinkPickerSessionId } from '../../controllers/session-provider';
|
|
@@ -11,7 +11,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
11
11
|
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
12
12
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
13
13
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
14
|
-
import createEventPayload from '../../analytics.codegen';
|
|
14
|
+
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
15
15
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
16
16
|
import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
|
|
17
17
|
import { normalizeUrl, isSafeUrl } from '@atlaskit/linking-common/url';
|
|
@@ -3,7 +3,7 @@ import { useEffect, useMemo, useRef } from 'react';
|
|
|
3
3
|
import { useDebounce } from 'use-debounce';
|
|
4
4
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
5
|
import { ANALYTICS_CHANNEL } from '../../../../common/constants';
|
|
6
|
-
import createEventPayload from '../../../../analytics.codegen';
|
|
6
|
+
import createEventPayload from '../../../../common/utils/analytics/analytics.codegen';
|
|
7
7
|
var DEBOUNCE_MS = 400;
|
|
8
8
|
export var useTrackResultsShown = function useTrackResultsShown(isLoading, items, hasSearchTerm) {
|
|
9
9
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useLayoutEffect } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { succeedUfoExperience, ufoExperience } from '../../../common/analytics/experiences';
|
|
5
|
-
import createEventPayload from '../../../analytics.codegen';
|
|
5
|
+
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
6
6
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
7
7
|
import { useLinkPickerSessionId } from '../../../controllers/session-provider';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useLayoutEffect } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
-
import createEventPayload from '../../../analytics.codegen';
|
|
4
|
+
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
5
5
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
6
6
|
function TrackTabViewed(_ref) {
|
|
7
7
|
var activePlugin = _ref.activePlugin;
|
package/dist/esm/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LinkPickerAnalyticsContextType } from '
|
|
2
|
+
import { LinkPickerAnalyticsContextType } from '../utils/analytics/analytics.codegen';
|
|
3
3
|
import { LinkPickerProps } from '../../';
|
|
4
4
|
type AnalyticsContextAttributesType = LinkPickerAnalyticsContextType;
|
|
5
5
|
export type TrackAttribute = <K extends keyof LinkPickerAnalyticsContextType>(attribute: K, value: AnalyticsContextAttributesType[K]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
|
|
2
|
+
import { LinkPickerAnalyticsContextType } from '../../common/utils/analytics/analytics.codegen';
|
|
3
3
|
type InputFields = 'link' | 'displayText';
|
|
4
4
|
/**
|
|
5
5
|
* Wraps an input field and connects it to the link picker analytics context to provide a baseline of analytics tracking
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e7a81d0d46e015c9728ae9557b47040f>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -55,9 +55,17 @@ type AnalyticsEventAttributes = {
|
|
|
55
55
|
};
|
|
56
56
|
declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): {
|
|
57
57
|
eventType: string;
|
|
58
|
-
|
|
58
|
+
name: string;
|
|
59
59
|
action: string;
|
|
60
|
+
attributes: AnalyticsEventAttributes[K];
|
|
61
|
+
actionSubject?: undefined;
|
|
62
|
+
actionSubjectId?: undefined;
|
|
63
|
+
} | {
|
|
64
|
+
eventType: string;
|
|
65
|
+
actionSubject: string;
|
|
60
66
|
actionSubjectId: string;
|
|
67
|
+
action: string;
|
|
61
68
|
attributes: AnalyticsEventAttributes[K];
|
|
69
|
+
name?: undefined;
|
|
62
70
|
};
|
|
63
71
|
export default createEventPayload;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PackageMetaDataType } from '../analytics.codegen';
|
|
2
|
+
import { PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
|
|
3
3
|
import { LinkPickerProps } from './link-picker';
|
|
4
4
|
export declare const testIds: {
|
|
5
5
|
linkPickerRoot: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LinkPickerAnalyticsContextType } from '
|
|
2
|
+
import { LinkPickerAnalyticsContextType } from '../utils/analytics/analytics.codegen';
|
|
3
3
|
import { LinkPickerProps } from '../../';
|
|
4
4
|
type AnalyticsContextAttributesType = LinkPickerAnalyticsContextType;
|
|
5
5
|
export type TrackAttribute = <K extends keyof LinkPickerAnalyticsContextType>(attribute: K, value: AnalyticsContextAttributesType[K]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { LinkPickerAnalyticsContextType } from '../../analytics.codegen';
|
|
2
|
+
import { LinkPickerAnalyticsContextType } from '../../common/utils/analytics/analytics.codegen';
|
|
3
3
|
type InputFields = 'link' | 'displayText';
|
|
4
4
|
/**
|
|
5
5
|
* Wraps an input field and connects it to the link picker analytics context to provide a baseline of analytics tracking
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e7a81d0d46e015c9728ae9557b47040f>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -55,9 +55,17 @@ type AnalyticsEventAttributes = {
|
|
|
55
55
|
};
|
|
56
56
|
declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): {
|
|
57
57
|
eventType: string;
|
|
58
|
-
|
|
58
|
+
name: string;
|
|
59
59
|
action: string;
|
|
60
|
+
attributes: AnalyticsEventAttributes[K];
|
|
61
|
+
actionSubject?: undefined;
|
|
62
|
+
actionSubjectId?: undefined;
|
|
63
|
+
} | {
|
|
64
|
+
eventType: string;
|
|
65
|
+
actionSubject: string;
|
|
60
66
|
actionSubjectId: string;
|
|
67
|
+
action: string;
|
|
61
68
|
attributes: AnalyticsEventAttributes[K];
|
|
69
|
+
name?: undefined;
|
|
62
70
|
};
|
|
63
71
|
export default createEventPayload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PackageMetaDataType } from '../analytics.codegen';
|
|
2
|
+
import { PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
|
|
3
3
|
import { LinkPickerProps } from './link-picker';
|
|
4
4
|
export declare const testIds: {
|
|
5
5
|
linkPickerRoot: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@atlaskit/form": "^8.11.0",
|
|
45
45
|
"@atlaskit/frontend-utilities": "^2.6.0",
|
|
46
46
|
"@atlaskit/icon": "^21.12.0",
|
|
47
|
-
"@atlaskit/linking-common": "^2.
|
|
47
|
+
"@atlaskit/linking-common": "^2.13.0",
|
|
48
48
|
"@atlaskit/onboarding": "^10.8.2",
|
|
49
49
|
"@atlaskit/spinner": "^15.5.0",
|
|
50
50
|
"@atlaskit/tabs": "^13.4.0",
|
|
51
51
|
"@atlaskit/textfield": "^5.5.0",
|
|
52
52
|
"@atlaskit/theme": "^12.5.0",
|
|
53
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
+
"@atlaskit/tokens": "^1.5.0",
|
|
54
54
|
"@atlaskit/tooltip": "^17.8.0",
|
|
55
55
|
"@atlaskit/ufo": "^0.2.0",
|
|
56
56
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
@@ -67,23 +67,19 @@
|
|
|
67
67
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@af/analytics-codegen": "^0.0
|
|
71
|
-
"@atlaskit/activity-provider": "^2.4.0",
|
|
70
|
+
"@af/analytics-codegen": "^0.1.0",
|
|
72
71
|
"@atlaskit/docs": "*",
|
|
73
72
|
"@atlaskit/link-analytics": "^8.0.0",
|
|
74
73
|
"@atlaskit/link-provider": "^1.6.0",
|
|
75
74
|
"@atlaskit/link-test-helpers": "^4.0.0",
|
|
76
75
|
"@atlaskit/popup": "^1.6.0",
|
|
77
|
-
"@atlaskit/ssr": "*",
|
|
78
76
|
"@atlaskit/toggle": "^12.6.0",
|
|
79
77
|
"@atlaskit/visual-regression": "*",
|
|
80
78
|
"@atlaskit/webdriver-runner": "*",
|
|
81
79
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
82
|
-
"@atlassian/
|
|
83
|
-
"@atlassian/link-picker-
|
|
84
|
-
"@atlassian/link-picker-plugins": "^22.0.0",
|
|
80
|
+
"@atlassian/link-picker-atlassian-plugin": "^32.1.0",
|
|
81
|
+
"@atlassian/link-picker-plugins": "^22.1.0",
|
|
85
82
|
"@atlassian/recent-work-client": "^1.8.0",
|
|
86
|
-
"@atlassian/search-provider": "^2.4.0",
|
|
87
83
|
"@testing-library/dom": "^8.17.1",
|
|
88
84
|
"@testing-library/jest-dom": "^5.16.5",
|
|
89
85
|
"@testing-library/react": "^12.1.5",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
*
|
|
10
|
-
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
11
|
-
*
|
|
12
|
-
* @codegen <<SignedSource::254da005ee62004d45537995770eba56>>
|
|
13
|
-
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
function createEventPayload(eventKey, attributes) {
|
|
17
|
-
var event = eventKey.split('.');
|
|
18
|
-
return {
|
|
19
|
-
eventType: event[0],
|
|
20
|
-
actionSubject: event[1],
|
|
21
|
-
action: event[2],
|
|
22
|
-
actionSubjectId: event[3],
|
|
23
|
-
attributes: attributes
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
var _default = createEventPayload;
|
|
27
|
-
exports.default = _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
*
|
|
4
|
-
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
-
*
|
|
6
|
-
* @codegen <<SignedSource::254da005ee62004d45537995770eba56>>
|
|
7
|
-
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
function createEventPayload(eventKey, attributes) {
|
|
11
|
-
const event = eventKey.split('.');
|
|
12
|
-
return {
|
|
13
|
-
eventType: event[0],
|
|
14
|
-
actionSubject: event[1],
|
|
15
|
-
action: event[2],
|
|
16
|
-
actionSubjectId: event[3],
|
|
17
|
-
attributes: attributes
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export default createEventPayload;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
*
|
|
4
|
-
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
-
*
|
|
6
|
-
* @codegen <<SignedSource::254da005ee62004d45537995770eba56>>
|
|
7
|
-
* @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
function createEventPayload(eventKey, attributes) {
|
|
11
|
-
var event = eventKey.split('.');
|
|
12
|
-
return {
|
|
13
|
-
eventType: event[0],
|
|
14
|
-
actionSubject: event[1],
|
|
15
|
-
action: event[2],
|
|
16
|
-
actionSubjectId: event[3],
|
|
17
|
-
attributes: attributes
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export default createEventPayload;
|