@atlaskit/link-create 6.3.6 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/analytics.spec.yaml +19 -0
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/common/ui/Button/index.js +6 -5
- package/dist/cjs/common/ui/ModalDialog/index.js +5 -4
- package/dist/cjs/common/ui/confirm-dismiss-dialog/main.js +9 -5
- package/dist/cjs/common/ui/edit-modal/index.js +2 -2
- package/dist/cjs/common/ui/error-boundary/index.js +2 -2
- package/dist/cjs/common/ui/error-boundary-modal/index.js +7 -6
- package/dist/cjs/common/ui/error-boundary-ui/index.js +2 -2
- package/dist/cjs/common/ui/experience-tracker/index.js +2 -2
- package/dist/cjs/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/cjs/common/utils/analytics/components.js +2 -2
- package/dist/cjs/common/utils/analytics/context.js +2 -2
- package/dist/cjs/controllers/callback-context/main.js +20 -6
- package/dist/cjs/controllers/create-field/main.js +6 -5
- package/dist/cjs/ui/create-form/async-select/main.js +2 -2
- package/dist/cjs/ui/create-form/form-footer/edit-button/index.js +2 -4
- package/dist/cjs/ui/create-form/form-footer/main.js +2 -2
- package/dist/cjs/ui/create-form/form-footer/submit-button/index.js +2 -6
- package/dist/cjs/ui/create-form/form-loader/main.js +1 -1
- package/dist/cjs/ui/create-form/main.js +2 -2
- package/dist/cjs/ui/create-form/select/main.js +5 -6
- package/dist/cjs/ui/create-form/textfield/main.js +2 -2
- package/dist/cjs/ui/inline-create/index.js +2 -2
- package/dist/cjs/ui/inline-create/inline-analytics/index.js +2 -2
- package/dist/cjs/ui/modal-create/index.js +2 -2
- package/dist/cjs/ui/modal-create/main.js +7 -4
- package/dist/es2019/common/constants.js +1 -1
- package/dist/es2019/common/ui/Button/index.js +3 -2
- package/dist/es2019/common/ui/ModalDialog/index.js +3 -2
- package/dist/es2019/common/ui/confirm-dismiss-dialog/main.js +6 -2
- package/dist/es2019/common/ui/edit-modal/index.js +1 -1
- package/dist/es2019/common/ui/error-boundary/index.js +1 -1
- package/dist/es2019/common/ui/error-boundary-modal/index.js +4 -1
- package/dist/es2019/common/ui/error-boundary-ui/index.js +2 -2
- package/dist/es2019/common/ui/experience-tracker/index.js +1 -1
- package/dist/es2019/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/es2019/common/utils/analytics/components.js +1 -1
- package/dist/es2019/common/utils/analytics/context.js +1 -1
- package/dist/es2019/controllers/callback-context/main.js +22 -4
- package/dist/es2019/controllers/create-field/main.js +2 -1
- package/dist/es2019/ui/create-form/async-select/main.js +1 -2
- package/dist/es2019/ui/create-form/form-footer/edit-button/index.js +1 -2
- package/dist/es2019/ui/create-form/form-footer/main.js +1 -1
- package/dist/es2019/ui/create-form/form-footer/submit-button/index.js +1 -3
- package/dist/es2019/ui/create-form/form-loader/main.js +1 -1
- package/dist/es2019/ui/create-form/main.js +1 -1
- package/dist/es2019/ui/create-form/select/main.js +2 -1
- package/dist/es2019/ui/create-form/textfield/main.js +1 -1
- package/dist/es2019/ui/inline-create/index.js +1 -1
- package/dist/es2019/ui/inline-create/inline-analytics/index.js +1 -1
- package/dist/es2019/ui/modal-create/index.js +1 -1
- package/dist/es2019/ui/modal-create/main.js +4 -1
- package/dist/esm/common/constants.js +1 -1
- package/dist/esm/common/ui/Button/index.js +3 -2
- package/dist/esm/common/ui/ModalDialog/index.js +3 -2
- package/dist/esm/common/ui/confirm-dismiss-dialog/main.js +6 -2
- package/dist/esm/common/ui/edit-modal/index.js +1 -1
- package/dist/esm/common/ui/error-boundary/index.js +1 -1
- package/dist/esm/common/ui/error-boundary-modal/index.js +4 -1
- package/dist/esm/common/ui/error-boundary-ui/index.js +2 -2
- package/dist/esm/common/ui/experience-tracker/index.js +1 -1
- package/dist/esm/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/esm/common/utils/analytics/components.js +1 -1
- package/dist/esm/common/utils/analytics/context.js +1 -1
- package/dist/esm/controllers/callback-context/main.js +21 -6
- package/dist/esm/controllers/create-field/main.js +2 -1
- package/dist/esm/ui/create-form/async-select/main.js +1 -1
- package/dist/esm/ui/create-form/form-footer/edit-button/index.js +1 -2
- package/dist/esm/ui/create-form/form-footer/main.js +1 -1
- package/dist/esm/ui/create-form/form-footer/submit-button/index.js +1 -3
- package/dist/esm/ui/create-form/form-loader/main.js +1 -1
- package/dist/esm/ui/create-form/main.js +1 -1
- package/dist/esm/ui/create-form/select/main.js +2 -1
- package/dist/esm/ui/create-form/textfield/main.js +1 -1
- package/dist/esm/ui/inline-create/index.js +1 -1
- package/dist/esm/ui/inline-create/inline-analytics/index.js +1 -1
- package/dist/esm/ui/modal-create/index.js +1 -1
- package/dist/esm/ui/modal-create/main.js +4 -1
- package/dist/types/common/types.d.ts +13 -1
- package/dist/types/common/ui/Button/index.d.ts +1 -1
- package/dist/types/common/ui/ModalDialog/index.d.ts +1 -1
- package/dist/types/common/utils/analytics/analytics.codegen.d.ts +4 -1
- package/dist/types/controllers/callback-context/main.d.ts +10 -2
- package/dist/types/ui/create-form/async-select/main.d.ts +1 -1
- package/dist/types/ui/create-form/async-select/types.d.ts +1 -1
- package/dist/types/ui/create-form/form-loader/main.d.ts +1 -1
- package/dist/types/ui/create-form/select/main.d.ts +1 -1
- package/dist/types/ui/create-form/select/types.d.ts +1 -1
- package/dist/types/ui/create-form/textfield/types.d.ts +1 -1
- package/package.json +28 -22
- package/link-create.docs.tsx +0 -351
|
@@ -8,7 +8,7 @@ exports.TextField = exports.TEST_ID = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
12
12
|
var _main = require("../../../controllers/create-field/main");
|
|
13
13
|
var _excluded = ["id", "name", "label", "isRequired", "validators", "validationHelpText", "testId"],
|
|
14
14
|
_excluded2 = ["fieldId"];
|
|
@@ -41,7 +41,7 @@ var TextField = exports.TextField = function TextField(_ref) {
|
|
|
41
41
|
}, function (_ref2) {
|
|
42
42
|
var fieldId = _ref2.fieldId,
|
|
43
43
|
fieldProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
44
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_textField.default, (0, _extends2.default)({
|
|
45
45
|
id: fieldId,
|
|
46
46
|
"aria-label": label !== null && label !== void 0 ? label : name
|
|
47
47
|
}, fieldProps, restProps));
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _AnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsContext"));
|
|
11
11
|
var _main = _interopRequireDefault(require("@atlaskit/intl-messages-provider/main"));
|
|
12
12
|
var _constants = require("../../common/constants");
|
|
13
13
|
var _errorBoundary = require("../../common/ui/error-boundary");
|
|
@@ -21,7 +21,7 @@ var LinkCreateWithAnalyticsContext = (0, _context.withLinkCreateAnalyticsContext
|
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement(_experienceTracker.Experience, null, /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, null, /*#__PURE__*/_react.default.createElement(_main2.default, props)));
|
|
22
22
|
}));
|
|
23
23
|
var ComposedLinkCreate = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_AnalyticsContext.default, {
|
|
25
25
|
data: _constants.PACKAGE_DATA
|
|
26
26
|
}, /*#__PURE__*/_react.default.createElement(_main.default, {
|
|
27
27
|
defaultMessages: _en.default,
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.InlineAnalytics = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _AnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsContext"));
|
|
10
10
|
var _components = require("../../..//common/utils/analytics/components");
|
|
11
11
|
var InlineAnalytics = exports.InlineAnalytics = function InlineAnalytics(_ref) {
|
|
12
12
|
var screen = _ref.screen,
|
|
13
13
|
children = _ref.children;
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_AnalyticsContext.default, {
|
|
15
15
|
data: {
|
|
16
16
|
source: screen,
|
|
17
17
|
component: 'inline-create'
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
10
|
+
var _AnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsContext"));
|
|
11
11
|
var _main = _interopRequireDefault(require("@atlaskit/intl-messages-provider/main"));
|
|
12
12
|
var _constants = require("../../common/constants");
|
|
13
13
|
var _errorBoundary = require("../../common/ui/error-boundary");
|
|
@@ -27,7 +27,7 @@ var LinkCreateWithAnalyticsContext = (0, _context.withLinkCreateAnalyticsContext
|
|
|
27
27
|
}, /*#__PURE__*/_react.default.createElement(_main2.default, props)));
|
|
28
28
|
}));
|
|
29
29
|
var ComposedLinkCreate = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_AnalyticsContext.default, {
|
|
31
31
|
data: _constants.PACKAGE_DATA
|
|
32
32
|
}, /*#__PURE__*/_react.default.createElement(_main.default, {
|
|
33
33
|
defaultMessages: _en.default,
|
|
@@ -11,7 +11,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
|
-
var
|
|
14
|
+
var _modalBody = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-body"));
|
|
15
|
+
var _modalHeader = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-header"));
|
|
16
|
+
var _modalTitle = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-title"));
|
|
17
|
+
var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
|
|
15
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
19
|
var _constants = require("../../common/constants");
|
|
17
20
|
var _main = require("../../common/ui/confirm-dismiss-dialog/main");
|
|
@@ -57,7 +60,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
|
57
60
|
onCreate: onCreate,
|
|
58
61
|
onFailure: onFailure,
|
|
59
62
|
onCancel: withExitWarning(onCancel)
|
|
60
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(_modalTransition.default, null, active && /*#__PURE__*/_react.default.createElement(_ModalDialog.Modal, {
|
|
61
64
|
testId: "link-create-modal",
|
|
62
65
|
screen: _constants.SCREEN_ID,
|
|
63
66
|
onClose: withExitWarning(onCancel),
|
|
@@ -67,9 +70,9 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
|
67
70
|
width: "".concat(_constants.CREATE_FORM_MAX_WIDTH_IN_PX, "px")
|
|
68
71
|
}, /*#__PURE__*/_react.default.createElement(_modalHero.ModalHero, {
|
|
69
72
|
hero: modalHero
|
|
70
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
73
|
+
}), /*#__PURE__*/_react.default.createElement(_modalHeader.default, {
|
|
71
74
|
hasCloseButton: true
|
|
72
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_modalTitle.default, null, modalTitle || intl.formatMessage(_messages.messages.heading))), /*#__PURE__*/_react.default.createElement(_modalBody.default, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
73
76
|
testId: testId
|
|
74
77
|
}, /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, null, /*#__PURE__*/_react.default.createElement(_linkCreateContent.LinkCreateContent, {
|
|
75
78
|
plugins: plugins,
|
|
@@ -10,7 +10,7 @@ export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
|
|
|
10
10
|
export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
|
|
11
11
|
export const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/link-create" || '',
|
|
13
|
-
packageVersion: "6.
|
|
13
|
+
packageVersion: "6.4.0" || '',
|
|
14
14
|
component: COMPONENT_NAME,
|
|
15
15
|
componentName: COMPONENT_NAME
|
|
16
16
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
4
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
5
|
+
import AkButton from '@atlaskit/button/default/button';
|
|
5
6
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
6
7
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
7
8
|
export const Button = /*#__PURE__*/forwardRef(({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
3
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
4
|
+
import ModalDialog from '@atlaskit/modal-dialog/modal-dialog';
|
|
4
5
|
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
5
6
|
import createEventPayload from '../../utils/analytics/analytics.codegen';
|
|
6
7
|
import { ScreenViewedEvent } from '../../utils/analytics/components';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
4
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
5
|
+
import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
|
|
6
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
7
|
+
import ModalTitle from '@atlaskit/modal-dialog/modal-title';
|
|
8
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
5
9
|
import { Button } from '../Button';
|
|
6
10
|
import { Modal } from '../ModalDialog';
|
|
7
11
|
import messages from './messages';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
3
3
|
import { Modal } from '../ModalDialog';
|
|
4
4
|
const SCREEN = 'linkCreateEditScreen';
|
|
5
5
|
export const EditModal = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
4
4
|
import { ErrorBoundaryUI } from '../../../common/ui/error-boundary-ui';
|
|
5
5
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Modal
|
|
2
|
+
import Modal from '@atlaskit/modal-dialog/modal-dialog';
|
|
3
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
4
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
5
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
3
6
|
import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../constants';
|
|
4
7
|
import { ErrorBoundaryUI } from '../error-boundary-ui';
|
|
5
8
|
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import { isFedRamp } from '@atlaskit/atlassian-context/is-fedramp';
|
|
5
|
-
import EmptyState from '@atlaskit/empty-state';
|
|
6
|
-
import Link from '@atlaskit/link';
|
|
5
|
+
import EmptyState from '@atlaskit/empty-state/empty-state';
|
|
6
|
+
import Link from '@atlaskit/link/link';
|
|
7
7
|
import commonMessages from '../../messages';
|
|
8
8
|
import ErrorSVG from './error-svg';
|
|
9
9
|
import messages from './messages';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useMemo, useRef } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { captureException } from '@atlaskit/linking-common/sentry';
|
|
4
4
|
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
5
5
|
import createEventPayload from '../../utils/analytics/analytics.codegen';
|
|
@@ -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::ab46b9594ace5e515376a9aa203f040c>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
4
4
|
import createEventPayload from './analytics.codegen';
|
|
5
5
|
export const ScreenViewedEvent = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useContext, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AnalyticsListener from '@atlaskit/analytics-next/AnalyticsListener';
|
|
3
3
|
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
4
4
|
const UNKNOWN = 'unknown';
|
|
5
5
|
const DEFAULT_CONTEXT_ATTRIBUTES = {
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import React, { useContext, useMemo } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
4
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
4
5
|
import { useExperience } from '../../common/ui/experience-tracker';
|
|
5
6
|
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
6
|
-
import { getErrorType } from '../../common/utils/errors';
|
|
7
|
+
import { getErrorType, getNetworkFields } from '../../common/utils/errors';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The value exposed through context. This differs from the provider's own props: internal callers
|
|
11
|
+
* may additionally supply a `LinkCreateFailureContext` identifying which operation failed, which is
|
|
12
|
+
* recorded in analytics but never forwarded to the consumer's `onFailure` prop.
|
|
13
|
+
*/
|
|
14
|
+
|
|
7
15
|
const LinkCreateCallbackContext = /*#__PURE__*/React.createContext({});
|
|
8
16
|
const LinkCreateCallbackProvider = ({
|
|
9
17
|
children,
|
|
@@ -36,9 +44,19 @@ const LinkCreateCallbackProvider = ({
|
|
|
36
44
|
}
|
|
37
45
|
}), [createAnalyticsEvent, onCreate, experience]);
|
|
38
46
|
const handleFailure = useMemo(() => ({
|
|
39
|
-
onFailure: async error => {
|
|
47
|
+
onFailure: async (error, context) => {
|
|
48
|
+
var _context$operation;
|
|
49
|
+
const {
|
|
50
|
+
status,
|
|
51
|
+
traceId
|
|
52
|
+
} = getNetworkFields(error);
|
|
40
53
|
createAnalyticsEvent(createEventPayload('track.object.createFailed.linkCreate', {
|
|
41
|
-
failureType: getErrorType(error)
|
|
54
|
+
failureType: getErrorType(error),
|
|
55
|
+
...(fg('platform_link_create_event_tracking') ? {
|
|
56
|
+
operation: (_context$operation = context === null || context === void 0 ? void 0 : context.operation) !== null && _context$operation !== void 0 ? _context$operation : null,
|
|
57
|
+
status,
|
|
58
|
+
traceId
|
|
59
|
+
} : {})
|
|
42
60
|
})).fire(ANALYTICS_CHANNEL);
|
|
43
61
|
experience === null || experience === void 0 ? void 0 : experience.failure(error);
|
|
44
62
|
onFailure && onFailure(error);
|
|
@@ -3,7 +3,8 @@ import "./main.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Field } from 'react-final-form';
|
|
6
|
-
import { Label
|
|
6
|
+
import { Label } from '@atlaskit/form/label/default';
|
|
7
|
+
import { RequiredAsterisk } from '@atlaskit/form/required-asterisk';
|
|
7
8
|
import { Message } from '../../common/ui/message';
|
|
8
9
|
import { shouldShowValidationErrors } from '../../common/utils/form';
|
|
9
10
|
const fieldWrapperStyles = null;
|
|
@@ -3,7 +3,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import debounce from 'debounce-promise';
|
|
4
4
|
import { useForm } from 'react-final-form';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import
|
|
6
|
+
import AkAsyncSelect from '@atlaskit/select/async-select';
|
|
7
7
|
import messages from '../../../common/messages';
|
|
8
8
|
import { useLinkCreateCallback } from '../../../controllers/callback-context/main';
|
|
9
9
|
import { CreateField } from '../../../controllers/create-field/main';
|
|
@@ -24,7 +24,6 @@ export function AsyncSelect({
|
|
|
24
24
|
validators,
|
|
25
25
|
validationHelpText,
|
|
26
26
|
testId = TEST_ID,
|
|
27
|
-
//@ts-ignore react-select unsupported props
|
|
28
27
|
defaultOption: propsDefaultValue,
|
|
29
28
|
loadOptions: loadOptionsFn,
|
|
30
29
|
...restProps
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useForm, useFormState } from 'react-final-form';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
5
5
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
6
6
|
import { ANALYTICS_CHANNEL, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../../../common/constants';
|
|
7
7
|
import createEventPayload from '../../../../common/utils/analytics/analytics.codegen';
|
|
8
8
|
import { useFormContext } from '../../../../controllers/form-context/main';
|
|
9
|
-
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
10
9
|
import { FormSpy } from '../../form-spy';
|
|
11
10
|
import { messages } from './messages';
|
|
12
11
|
export const EditButton = () => {
|
|
@@ -3,7 +3,7 @@ import "./main.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import
|
|
6
|
+
import ButtonGroup from '@atlaskit/button/button-group';
|
|
7
7
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
8
8
|
import { Button } from '../../../common/ui/Button';
|
|
9
9
|
import { EditButton } from './edit-button';
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useForm, useFormState } from 'react-final-form';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
5
5
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
6
6
|
import { ANALYTICS_CHANNEL, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../../../common/constants';
|
|
7
7
|
import createEventPayload from '../../../../common/utils/analytics/analytics.codegen';
|
|
8
|
-
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
9
8
|
import { FormSpy } from '../../form-spy';
|
|
10
|
-
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
11
9
|
import { messages } from '../messages';
|
|
12
10
|
export const SubmitButton = () => {
|
|
13
11
|
const intl = useIntl();
|
|
@@ -6,7 +6,7 @@ import { useCallback } from 'react';
|
|
|
6
6
|
import { FORM_ERROR } from 'final-form';
|
|
7
7
|
import { Form, FormSpy } from 'react-final-form';
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
|
-
import { RequiredAsterisk } from '@atlaskit/form';
|
|
9
|
+
import { RequiredAsterisk } from '@atlaskit/form/required-asterisk';
|
|
10
10
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import { LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
|
|
12
12
|
import messages from '../../common/messages';
|
|
@@ -2,7 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import { Inline } from '@atlaskit/primitives/compiled';
|
|
5
|
-
import AkSelect
|
|
5
|
+
import AkSelect from '@atlaskit/select/default';
|
|
6
|
+
import { components } from '@atlaskit/react-select/components';
|
|
6
7
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
8
|
import { UrlIcon } from '../../../common/ui/icon';
|
|
8
9
|
import { CreateField } from '../../../controllers/create-field/main';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import AkTextfield from '@atlaskit/textfield';
|
|
3
|
+
import AkTextfield from '@atlaskit/textfield/text-field';
|
|
4
4
|
import { CreateField } from '../../../controllers/create-field/main';
|
|
5
5
|
export const TEST_ID = 'link-create-text-field';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
3
3
|
import IntlMessagesProvider from '@atlaskit/intl-messages-provider/main';
|
|
4
4
|
import { PACKAGE_DATA } from '../../common/constants';
|
|
5
5
|
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
3
3
|
import { ScreenViewedEvent } from '../../..//common/utils/analytics/components';
|
|
4
4
|
export const InlineAnalytics = ({
|
|
5
5
|
screen,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
3
3
|
import IntlMessagesProvider from '@atlaskit/intl-messages-provider/main';
|
|
4
4
|
import { PACKAGE_DATA } from '../../common/constants';
|
|
5
5
|
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import
|
|
4
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
5
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
6
|
+
import ModalTitle from '@atlaskit/modal-dialog/modal-title';
|
|
7
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
5
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
9
|
import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
|
|
7
10
|
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog/main';
|
|
@@ -10,7 +10,7 @@ export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
|
|
|
10
10
|
export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
|
|
11
11
|
export var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/link-create" || '',
|
|
13
|
-
packageVersion: "6.
|
|
13
|
+
packageVersion: "6.4.0" || '',
|
|
14
14
|
component: COMPONENT_NAME,
|
|
15
15
|
componentName: COMPONENT_NAME
|
|
16
16
|
};
|
|
@@ -2,8 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["actionSubjectId"];
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
|
|
6
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
7
|
+
import AkButton from '@atlaskit/button/default/button';
|
|
7
8
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
8
9
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
9
10
|
export var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["screen", "children"];
|
|
3
3
|
import React, { useEffect } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
5
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
6
|
+
import ModalDialog from '@atlaskit/modal-dialog/modal-dialog';
|
|
6
7
|
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
7
8
|
import createEventPayload from '../../utils/analytics/analytics.codegen';
|
|
8
9
|
import { ScreenViewedEvent } from '../../utils/analytics/components';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
|
|
4
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
5
|
+
import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
|
|
6
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
7
|
+
import ModalTitle from '@atlaskit/modal-dialog/modal-title';
|
|
8
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
5
9
|
import { Button } from '../Button';
|
|
6
10
|
import { Modal } from '../ModalDialog';
|
|
7
11
|
import messages from './messages';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
3
3
|
import { Modal } from '../ModalDialog';
|
|
4
4
|
var SCREEN = 'linkCreateEditScreen';
|
|
5
5
|
export var EditModal = function EditModal(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
4
4
|
import { ErrorBoundaryUI } from '../../../common/ui/error-boundary-ui';
|
|
5
5
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Modal
|
|
2
|
+
import Modal from '@atlaskit/modal-dialog/modal-dialog';
|
|
3
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
4
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
5
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
3
6
|
import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../constants';
|
|
4
7
|
import { ErrorBoundaryUI } from '../error-boundary-ui';
|
|
5
8
|
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import { isFedRamp } from '@atlaskit/atlassian-context/is-fedramp';
|
|
5
|
-
import EmptyState from '@atlaskit/empty-state';
|
|
6
|
-
import Link from '@atlaskit/link';
|
|
5
|
+
import EmptyState from '@atlaskit/empty-state/empty-state';
|
|
6
|
+
import Link from '@atlaskit/link/link';
|
|
7
7
|
import commonMessages from '../../messages';
|
|
8
8
|
import ErrorSVG from './error-svg';
|
|
9
9
|
import messages from './messages';
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React, { createContext, useContext, useMemo, useRef } from 'react';
|
|
5
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
6
6
|
import { captureException } from '@atlaskit/linking-common/sentry';
|
|
7
7
|
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
8
8
|
import createEventPayload from '../../utils/analytics/analytics.codegen';
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
*
|
|
5
5
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
6
6
|
*
|
|
7
|
-
* @codegen <<SignedSource::
|
|
7
|
+
* @codegen <<SignedSource::ab46b9594ace5e515376a9aa203f040c>>
|
|
8
8
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
4
4
|
import createEventPayload from './analytics.codegen';
|
|
5
5
|
export var ScreenViewedEvent = function ScreenViewedEvent(_ref) {
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React, { useCallback, useContext, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import
|
|
6
|
+
import AnalyticsListener from '@atlaskit/analytics-next/AnalyticsListener';
|
|
7
7
|
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
8
8
|
var UNKNOWN = 'unknown';
|
|
9
9
|
var DEFAULT_CONTEXT_ATTRIBUTES = {
|