@atlaskit/link-picker 1.21.0 → 1.22.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.
- 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/conditional-spotlight-target-wrapper/index.js +17 -0
- package/dist/cjs/ui/link-picker/index.js +2 -1
- package/dist/cjs/ui/link-picker/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/cjs/ui/link-picker/text-input/index.js +7 -3
- 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/conditional-spotlight-target-wrapper/index.js +10 -0
- package/dist/es2019/ui/link-picker/index.js +2 -1
- package/dist/es2019/ui/link-picker/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/es2019/ui/link-picker/text-input/index.js +6 -2
- 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/conditional-spotlight-target-wrapper/index.js +9 -0
- package/dist/esm/ui/link-picker/index.js +2 -1
- package/dist/esm/ui/link-picker/link-search-list/use-track-results-shown/index.js +1 -1
- package/dist/esm/ui/link-picker/text-input/index.js +7 -3
- 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/ui/link-picker/conditional-spotlight-target-wrapper/index.d.ts +7 -0
- package/dist/types/ui/link-picker/text-input/index.d.ts +3 -2
- 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/dist/types-ts4.5/ui/link-picker/conditional-spotlight-target-wrapper/index.d.ts +7 -0
- package/dist/types-ts4.5/ui/link-picker/text-input/index.d.ts +3 -2
- package/package.json +8 -7
- 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.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ae5ac36af00`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae5ac36af00) - Updates analytics codegen to support screen events.
|
|
8
|
+
|
|
9
|
+
## 1.22.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`cd623c7a474`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cd623c7a474) - [ux] Wrap search input with conditional spotlight target for better onboarding
|
|
14
|
+
|
|
3
15
|
## 1.21.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");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConditionalSpotlightTargetWrapper = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _onboarding = require("@atlaskit/onboarding");
|
|
10
|
+
var ConditionalSpotlightTargetWrapper = function ConditionalSpotlightTargetWrapper(_ref) {
|
|
11
|
+
var spotlightTargetName = _ref.spotlightTargetName,
|
|
12
|
+
children = _ref.children;
|
|
13
|
+
return spotlightTargetName ? /*#__PURE__*/_react.default.createElement(_onboarding.SpotlightTarget, {
|
|
14
|
+
name: spotlightTargetName
|
|
15
|
+
}, children) : children;
|
|
16
|
+
};
|
|
17
|
+
exports.ConditionalSpotlightTargetWrapper = ConditionalSpotlightTargetWrapper;
|
|
@@ -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");
|
|
@@ -332,6 +332,7 @@ function LinkPicker(_ref) {
|
|
|
332
332
|
"aria-activedescendant": ariaActiveDescendant,
|
|
333
333
|
"aria-describedby": screenReaderDescriptionId,
|
|
334
334
|
error: invalidUrl ? intl.formatMessage(_messages.formMessages.linkInvalid) : null,
|
|
335
|
+
spotlightTargetName: "link-picker-search-field-spotlight-target",
|
|
335
336
|
onClear: handleUrlClear,
|
|
336
337
|
onKeyDown: handleKeyDown,
|
|
337
338
|
onChange: handleChangeUrl
|
|
@@ -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)(),
|
|
@@ -13,9 +13,10 @@ var _form = require("@atlaskit/form");
|
|
|
13
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
14
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
15
15
|
var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
|
|
16
|
+
var _conditionalSpotlightTargetWrapper = require("../conditional-spotlight-target-wrapper");
|
|
16
17
|
var _utils = require("../utils");
|
|
17
18
|
var _styled = require("./styled");
|
|
18
|
-
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error"];
|
|
19
|
+
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName"];
|
|
19
20
|
/** @jsx jsx */
|
|
20
21
|
var testIds = {
|
|
21
22
|
urlError: 'link-error',
|
|
@@ -32,6 +33,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
32
33
|
onClear = _ref.onClear,
|
|
33
34
|
clearLabel = _ref.clearLabel,
|
|
34
35
|
error = _ref.error,
|
|
36
|
+
spotlightTargetName = _ref.spotlightTargetName,
|
|
35
37
|
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
38
|
var inputRef = (0, _react.useRef)(null);
|
|
37
39
|
var handleRef = (0, _react.useCallback)(function (input) {
|
|
@@ -82,14 +84,16 @@ var TextInput = function TextInput(_ref) {
|
|
|
82
84
|
name: name
|
|
83
85
|
}, function (_ref2) {
|
|
84
86
|
var fieldProps = _ref2.fieldProps;
|
|
85
|
-
return (0, _react2.jsx)(
|
|
87
|
+
return (0, _react2.jsx)(_conditionalSpotlightTargetWrapper.ConditionalSpotlightTargetWrapper, {
|
|
88
|
+
spotlightTargetName: spotlightTargetName
|
|
89
|
+
}, (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_textfield.default, (0, _extends2.default)({}, fieldProps, restProps, {
|
|
86
90
|
onKeyDown: handleKeydown,
|
|
87
91
|
ref: handleRef,
|
|
88
92
|
elemAfterInput: clearText,
|
|
89
93
|
isInvalid: !!error
|
|
90
94
|
})), error && (0, _react2.jsx)(_form.ErrorMessage, {
|
|
91
95
|
testId: testIds.urlError
|
|
92
|
-
}, error));
|
|
96
|
+
}, error)));
|
|
93
97
|
}));
|
|
94
98
|
};
|
|
95
99
|
var _default = TextInput;
|
|
@@ -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';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
3
|
+
export const ConditionalSpotlightTargetWrapper = ({
|
|
4
|
+
spotlightTargetName,
|
|
5
|
+
children
|
|
6
|
+
}) => {
|
|
7
|
+
return spotlightTargetName ? /*#__PURE__*/React.createElement(SpotlightTarget, {
|
|
8
|
+
name: spotlightTargetName
|
|
9
|
+
}, children) : children;
|
|
10
|
+
};
|
|
@@ -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';
|
|
@@ -326,6 +326,7 @@ function LinkPicker({
|
|
|
326
326
|
"aria-activedescendant": ariaActiveDescendant,
|
|
327
327
|
"aria-describedby": screenReaderDescriptionId,
|
|
328
328
|
error: invalidUrl ? intl.formatMessage(formMessages.linkInvalid) : null,
|
|
329
|
+
spotlightTargetName: "link-picker-search-field-spotlight-target",
|
|
329
330
|
onClear: handleUrlClear,
|
|
330
331
|
onKeyDown: handleKeyDown,
|
|
331
332
|
onChange: handleChangeUrl
|
|
@@ -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 {
|
|
@@ -6,6 +6,7 @@ import { ErrorMessage, Field } from '@atlaskit/form';
|
|
|
6
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
7
|
import Textfield from '@atlaskit/textfield';
|
|
8
8
|
import Selectclear from '@atlaskit/icon/glyph/select-clear';
|
|
9
|
+
import { ConditionalSpotlightTargetWrapper } from '../conditional-spotlight-target-wrapper';
|
|
9
10
|
import { isRedoEvent, isUndoEvent } from '../utils';
|
|
10
11
|
import { clearTextButtonStyles, fieldStyles } from './styled';
|
|
11
12
|
export const testIds = {
|
|
@@ -22,6 +23,7 @@ const TextInput = ({
|
|
|
22
23
|
onClear,
|
|
23
24
|
clearLabel,
|
|
24
25
|
error,
|
|
26
|
+
spotlightTargetName,
|
|
25
27
|
...restProps
|
|
26
28
|
}) => {
|
|
27
29
|
const inputRef = useRef(null);
|
|
@@ -74,14 +76,16 @@ const TextInput = ({
|
|
|
74
76
|
}, ({
|
|
75
77
|
fieldProps
|
|
76
78
|
}) => {
|
|
77
|
-
return jsx(
|
|
79
|
+
return jsx(ConditionalSpotlightTargetWrapper, {
|
|
80
|
+
spotlightTargetName: spotlightTargetName
|
|
81
|
+
}, jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, restProps, {
|
|
78
82
|
onKeyDown: handleKeydown,
|
|
79
83
|
ref: handleRef,
|
|
80
84
|
elemAfterInput: clearText,
|
|
81
85
|
isInvalid: !!error
|
|
82
86
|
})), error && jsx(ErrorMessage, {
|
|
83
87
|
testId: testIds.urlError
|
|
84
|
-
}, error));
|
|
88
|
+
}, error)));
|
|
85
89
|
}));
|
|
86
90
|
};
|
|
87
91
|
export default TextInput;
|
|
@@ -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';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
3
|
+
export var ConditionalSpotlightTargetWrapper = function ConditionalSpotlightTargetWrapper(_ref) {
|
|
4
|
+
var spotlightTargetName = _ref.spotlightTargetName,
|
|
5
|
+
children = _ref.children;
|
|
6
|
+
return spotlightTargetName ? /*#__PURE__*/React.createElement(SpotlightTarget, {
|
|
7
|
+
name: spotlightTargetName
|
|
8
|
+
}, children) : children;
|
|
9
|
+
};
|
|
@@ -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';
|
|
@@ -321,6 +321,7 @@ function LinkPicker(_ref) {
|
|
|
321
321
|
"aria-activedescendant": ariaActiveDescendant,
|
|
322
322
|
"aria-describedby": screenReaderDescriptionId,
|
|
323
323
|
error: invalidUrl ? intl.formatMessage(formMessages.linkInvalid) : null,
|
|
324
|
+
spotlightTargetName: "link-picker-search-field-spotlight-target",
|
|
324
325
|
onClear: handleUrlClear,
|
|
325
326
|
onKeyDown: handleKeyDown,
|
|
326
327
|
onChange: handleChangeUrl
|
|
@@ -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(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error"];
|
|
3
|
+
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { useCallback, useRef, Fragment } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
@@ -8,6 +8,7 @@ import { ErrorMessage, Field } from '@atlaskit/form';
|
|
|
8
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
9
|
import Textfield from '@atlaskit/textfield';
|
|
10
10
|
import Selectclear from '@atlaskit/icon/glyph/select-clear';
|
|
11
|
+
import { ConditionalSpotlightTargetWrapper } from '../conditional-spotlight-target-wrapper';
|
|
11
12
|
import { isRedoEvent, isUndoEvent } from '../utils';
|
|
12
13
|
import { clearTextButtonStyles, fieldStyles } from './styled';
|
|
13
14
|
export var testIds = {
|
|
@@ -24,6 +25,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
24
25
|
onClear = _ref.onClear,
|
|
25
26
|
clearLabel = _ref.clearLabel,
|
|
26
27
|
error = _ref.error,
|
|
28
|
+
spotlightTargetName = _ref.spotlightTargetName,
|
|
27
29
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
28
30
|
var inputRef = useRef(null);
|
|
29
31
|
var handleRef = useCallback(function (input) {
|
|
@@ -74,14 +76,16 @@ var TextInput = function TextInput(_ref) {
|
|
|
74
76
|
name: name
|
|
75
77
|
}, function (_ref2) {
|
|
76
78
|
var fieldProps = _ref2.fieldProps;
|
|
77
|
-
return jsx(
|
|
79
|
+
return jsx(ConditionalSpotlightTargetWrapper, {
|
|
80
|
+
spotlightTargetName: spotlightTargetName
|
|
81
|
+
}, jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, restProps, {
|
|
78
82
|
onKeyDown: handleKeydown,
|
|
79
83
|
ref: handleRef,
|
|
80
84
|
elemAfterInput: clearText,
|
|
81
85
|
isInvalid: !!error
|
|
82
86
|
})), error && jsx(ErrorMessage, {
|
|
83
87
|
testId: testIds.urlError
|
|
84
|
-
}, error));
|
|
88
|
+
}, error)));
|
|
85
89
|
}));
|
|
86
90
|
};
|
|
87
91
|
export default TextInput;
|
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FunctionComponent } from 'react';
|
|
3
|
+
export interface ConditionalSpotlightTargetWrapperProps {
|
|
4
|
+
spotlightTargetName?: string;
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionalSpotlightTargetWrapper: FunctionComponent<ConditionalSpotlightTargetWrapperProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TextFieldProps } from '@atlaskit/textfield';
|
|
3
|
-
|
|
3
|
+
import { ConditionalSpotlightTargetWrapperProps } from '../conditional-spotlight-target-wrapper';
|
|
4
|
+
export type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & Pick<ConditionalSpotlightTargetWrapperProps, 'spotlightTargetName'> & {
|
|
4
5
|
name: string;
|
|
5
6
|
value: string;
|
|
6
7
|
label?: string;
|
|
@@ -14,5 +15,5 @@ export declare const testIds: {
|
|
|
14
15
|
urlError: string;
|
|
15
16
|
clearUrlButton: string;
|
|
16
17
|
};
|
|
17
|
-
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
|
+
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
19
|
export default TextInput;
|
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FunctionComponent } from 'react';
|
|
3
|
+
export interface ConditionalSpotlightTargetWrapperProps {
|
|
4
|
+
spotlightTargetName?: string;
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionalSpotlightTargetWrapper: FunctionComponent<ConditionalSpotlightTargetWrapperProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TextFieldProps } from '@atlaskit/textfield';
|
|
3
|
-
|
|
3
|
+
import { ConditionalSpotlightTargetWrapperProps } from '../conditional-spotlight-target-wrapper';
|
|
4
|
+
export type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & Pick<ConditionalSpotlightTargetWrapperProps, 'spotlightTargetName'> & {
|
|
4
5
|
name: string;
|
|
5
6
|
value: string;
|
|
6
7
|
label?: string;
|
|
@@ -14,5 +15,5 @@ export declare const testIds: {
|
|
|
14
15
|
urlError: string;
|
|
15
16
|
clearUrlButton: string;
|
|
16
17
|
};
|
|
17
|
-
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
|
+
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
19
|
export default TextInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,12 +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
|
+
"@atlaskit/onboarding": "^10.8.2",
|
|
48
49
|
"@atlaskit/spinner": "^15.5.0",
|
|
49
50
|
"@atlaskit/tabs": "^13.4.0",
|
|
50
|
-
"@atlaskit/textfield": "^5.
|
|
51
|
+
"@atlaskit/textfield": "^5.5.0",
|
|
51
52
|
"@atlaskit/theme": "^12.5.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
+
"@atlaskit/tokens": "^1.5.0",
|
|
53
54
|
"@atlaskit/tooltip": "^17.8.0",
|
|
54
55
|
"@atlaskit/ufo": "^0.2.0",
|
|
55
56
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
|
-
"@af/analytics-codegen": "^0.0
|
|
70
|
+
"@af/analytics-codegen": "^0.1.0",
|
|
70
71
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
71
72
|
"@atlaskit/docs": "*",
|
|
72
73
|
"@atlaskit/link-analytics": "^8.0.0",
|
|
@@ -79,8 +80,8 @@
|
|
|
79
80
|
"@atlaskit/webdriver-runner": "*",
|
|
80
81
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
81
82
|
"@atlassian/codegen": "^0.1.0",
|
|
82
|
-
"@atlassian/link-picker-atlassian-plugin": "^
|
|
83
|
-
"@atlassian/link-picker-plugins": "^
|
|
83
|
+
"@atlassian/link-picker-atlassian-plugin": "^32.1.0",
|
|
84
|
+
"@atlassian/link-picker-plugins": "^22.1.0",
|
|
84
85
|
"@atlassian/recent-work-client": "^1.8.0",
|
|
85
86
|
"@atlassian/search-provider": "^2.4.0",
|
|
86
87
|
"@testing-library/dom": "^8.17.1",
|
|
@@ -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;
|