@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
|
@@ -4,11 +4,19 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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 _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React, { useContext, useMemo } from 'react';
|
|
7
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
9
10
|
import { useExperience } from '../../common/ui/experience-tracker';
|
|
10
11
|
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
11
|
-
import { getErrorType } from '../../common/utils/errors';
|
|
12
|
+
import { getErrorType, getNetworkFields } from '../../common/utils/errors';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The value exposed through context. This differs from the provider's own props: internal callers
|
|
16
|
+
* may additionally supply a `LinkCreateFailureContext` identifying which operation failed, which is
|
|
17
|
+
* recorded in analytics but never forwarded to the consumer's `onFailure` prop.
|
|
18
|
+
*/
|
|
19
|
+
|
|
12
20
|
var LinkCreateCallbackContext = /*#__PURE__*/React.createContext({});
|
|
13
21
|
var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
14
22
|
var children = _ref.children,
|
|
@@ -58,13 +66,20 @@ var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
|
58
66
|
var handleFailure = useMemo(function () {
|
|
59
67
|
return {
|
|
60
68
|
onFailure: function () {
|
|
61
|
-
var _onFailure2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(error) {
|
|
69
|
+
var _onFailure2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(error, context) {
|
|
70
|
+
var _context$operation;
|
|
71
|
+
var _getNetworkFields, status, traceId;
|
|
62
72
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
63
73
|
while (1) switch (_context2.prev = _context2.next) {
|
|
64
74
|
case 0:
|
|
65
|
-
|
|
75
|
+
_getNetworkFields = getNetworkFields(error), status = _getNetworkFields.status, traceId = _getNetworkFields.traceId;
|
|
76
|
+
createAnalyticsEvent(createEventPayload('track.object.createFailed.linkCreate', _objectSpread({
|
|
66
77
|
failureType: getErrorType(error)
|
|
67
|
-
}
|
|
78
|
+
}, fg('platform_link_create_event_tracking') ? {
|
|
79
|
+
operation: (_context$operation = context === null || context === void 0 ? void 0 : context.operation) !== null && _context$operation !== void 0 ? _context$operation : null,
|
|
80
|
+
status: status,
|
|
81
|
+
traceId: traceId
|
|
82
|
+
} : {}))).fire(ANALYTICS_CHANNEL);
|
|
68
83
|
experience === null || experience === void 0 || experience.failure(error);
|
|
69
84
|
_onFailure && _onFailure(error);
|
|
70
85
|
case 1:
|
|
@@ -73,7 +88,7 @@ var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
|
73
88
|
}
|
|
74
89
|
}, _callee2);
|
|
75
90
|
}));
|
|
76
|
-
function onFailure(_x2) {
|
|
91
|
+
function onFailure(_x2, _x3) {
|
|
77
92
|
return _onFailure2.apply(this, arguments);
|
|
78
93
|
}
|
|
79
94
|
return onFailure;
|
|
@@ -6,7 +6,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
8
|
import { Field } from 'react-final-form';
|
|
9
|
-
import { Label
|
|
9
|
+
import { Label } from '@atlaskit/form/label/default';
|
|
10
|
+
import { RequiredAsterisk } from '@atlaskit/form/required-asterisk';
|
|
10
11
|
import { Message } from '../../common/ui/message';
|
|
11
12
|
import { shouldShowValidationErrors } from '../../common/utils/form';
|
|
12
13
|
var fieldWrapperStyles = null;
|
|
@@ -9,7 +9,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
9
9
|
import debounce from 'debounce-promise';
|
|
10
10
|
import { useForm } from 'react-final-form';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
|
-
import
|
|
12
|
+
import AkAsyncSelect from '@atlaskit/select/async-select';
|
|
13
13
|
import messages from '../../../common/messages';
|
|
14
14
|
import { useLinkCreateCallback } from '../../../controllers/callback-context/main';
|
|
15
15
|
import { CreateField } from '../../../controllers/create-field/main';
|
|
@@ -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 var EditButton = function 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 var SubmitButton = function SubmitButton() {
|
|
13
11
|
var intl = useIntl();
|
|
@@ -14,7 +14,7 @@ import { useCallback } from 'react';
|
|
|
14
14
|
import { FORM_ERROR } from 'final-form';
|
|
15
15
|
import { Form, FormSpy } from 'react-final-form';
|
|
16
16
|
import { useIntl } from 'react-intl';
|
|
17
|
-
import { RequiredAsterisk } from '@atlaskit/form';
|
|
17
|
+
import { RequiredAsterisk } from '@atlaskit/form/required-asterisk';
|
|
18
18
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
19
19
|
import { LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
|
|
20
20
|
import messages from '../../common/messages';
|
|
@@ -10,7 +10,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
12
|
import { Inline } from '@atlaskit/primitives/compiled';
|
|
13
|
-
import AkSelect
|
|
13
|
+
import AkSelect from '@atlaskit/select/default';
|
|
14
|
+
import { components } from '@atlaskit/react-select/components';
|
|
14
15
|
import { layers } from '@atlaskit/theme/constants';
|
|
15
16
|
import { UrlIcon } from '../../../common/ui/icon';
|
|
16
17
|
import { CreateField } from '../../../controllers/create-field/main';
|
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["id", "name", "label", "isRequired", "validators", "validationHelpText", "testId"],
|
|
4
4
|
_excluded2 = ["fieldId"];
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import AkTextfield from '@atlaskit/textfield';
|
|
6
|
+
import AkTextfield from '@atlaskit/textfield/text-field';
|
|
7
7
|
import { CreateField } from '../../../controllers/create-field/main';
|
|
8
8
|
export var TEST_ID = 'link-create-text-field';
|
|
9
9
|
|
|
@@ -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 var InlineAnalytics = function InlineAnalytics(_ref) {
|
|
5
5
|
var screen = _ref.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';
|
|
@@ -3,7 +3,10 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useLayoutEffect, useRef } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import
|
|
6
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
7
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
8
|
+
import ModalTitle from '@atlaskit/modal-dialog/modal-title';
|
|
9
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
7
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
11
|
import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
|
|
9
12
|
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog/main';
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { ModalDialogProps } from '@atlaskit/modal-dialog/types';
|
|
3
|
+
/**
|
|
4
|
+
* Identifies which Link Create operation failed.
|
|
5
|
+
*
|
|
6
|
+
* This is a controlled vocabulary used for analytics only. It must never contain
|
|
7
|
+
* user-generated content, URLs, or tenant identifiers.
|
|
8
|
+
*/
|
|
9
|
+
export type LinkCreateOperation = 'fetch-space' | 'fetch-page' | 'load-default-values' | 'create-page' | 'create-whiteboard';
|
|
10
|
+
/** Additional, non-identifying context describing a Link Create failure. */
|
|
11
|
+
export type LinkCreateFailureContext = {
|
|
12
|
+
/** Which operation was being performed when the failure occurred. */
|
|
13
|
+
operation: LinkCreateOperation;
|
|
14
|
+
};
|
|
3
15
|
/** Map of field names to a list of validators for that field */
|
|
4
16
|
export type ValidatorMap = Record<string, Validator[]>;
|
|
5
17
|
export type Validator = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import AkButton from '@atlaskit/button/
|
|
2
|
+
import AkButton from '@atlaskit/button/default/button';
|
|
3
3
|
import { type AnalyticsEventAttributes } from '../../../common/utils/analytics/analytics.codegen';
|
|
4
4
|
type ButtonProps = React.ComponentProps<typeof AkButton> & {
|
|
5
5
|
actionSubjectId: keyof {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ModalDialog from '@atlaskit/modal-dialog';
|
|
2
|
+
import ModalDialog from '@atlaskit/modal-dialog/modal-dialog';
|
|
3
3
|
import { type AnalyticsEventAttributes } from '../../utils/analytics/analytics.codegen';
|
|
4
4
|
type ModalProps = React.ComponentProps<typeof ModalDialog> & {
|
|
5
5
|
screen: keyof {
|
|
@@ -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
|
export type PackageMetaDataType = {
|
|
@@ -37,6 +37,9 @@ export type ObjectCreatedLinkCreateAttributesType = {
|
|
|
37
37
|
};
|
|
38
38
|
export type ObjectCreateFailedLinkCreateAttributesType = {
|
|
39
39
|
failureType: string;
|
|
40
|
+
operation?: string | null;
|
|
41
|
+
status?: number | null;
|
|
42
|
+
traceId?: string | null;
|
|
40
43
|
};
|
|
41
44
|
export type LinkCreateExperienceFailedAttributesType = {
|
|
42
45
|
errorType?: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
import { type CreatePayload } from '../../common/types';
|
|
2
|
+
import { type CreatePayload, type LinkCreateFailureContext } from '../../common/types';
|
|
3
3
|
interface LinkCreateCallbackProviderProps {
|
|
4
4
|
/**
|
|
5
5
|
* This callback for when the resource has been successfully created.
|
|
@@ -14,6 +14,14 @@ interface LinkCreateCallbackProviderProps {
|
|
|
14
14
|
*/
|
|
15
15
|
onCancel?: () => void;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* The value exposed through context. This differs from the provider's own props: internal callers
|
|
19
|
+
* may additionally supply a `LinkCreateFailureContext` identifying which operation failed, which is
|
|
20
|
+
* recorded in analytics but never forwarded to the consumer's `onFailure` prop.
|
|
21
|
+
*/
|
|
22
|
+
type LinkCreateCallbackContextValue = Omit<LinkCreateCallbackProviderProps, 'onFailure'> & {
|
|
23
|
+
onFailure?: (error: unknown, context?: LinkCreateFailureContext) => void;
|
|
24
|
+
};
|
|
17
25
|
declare const LinkCreateCallbackProvider: ({ children, onCreate, onFailure, onCancel, }: PropsWithChildren<LinkCreateCallbackProviderProps>) => React.JSX.Element;
|
|
18
|
-
declare const useLinkCreateCallback: () =>
|
|
26
|
+
declare const useLinkCreateCallback: () => LinkCreateCallbackContextValue;
|
|
19
27
|
export { LinkCreateCallbackProvider, useLinkCreateCallback };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AsyncSelectProps as AKAsyncSelectProps, GroupType, OptionType } from '@atlaskit/select/types';
|
|
2
2
|
import { type Validator } from '../../../common/types';
|
|
3
3
|
export type AsyncSelectProps<T = OptionType> = Omit<AKAsyncSelectProps<T>, 'loadOptions'> & {
|
|
4
4
|
/** Name passed to the <Field> */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { OptionProps, OptionType, SingleValueProps } from '@atlaskit/select/types';
|
|
3
3
|
import { type SelectProps, type SitePickerOptionType } from './types';
|
|
4
4
|
export declare const TEST_ID = "link-create-select";
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SelectProps as AKSelectProps, OptionType } from '@atlaskit/select/types';
|
|
2
2
|
import { type Validator } from '../../../common/types';
|
|
3
3
|
export type SelectProps<T = OptionType> = AKSelectProps<T> & {
|
|
4
4
|
/** Name passed to the <Field> */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TextfieldProps as AKTextFieldProps } from '@atlaskit/textfield/types';
|
|
2
2
|
import { type Validator } from '../../../common/types';
|
|
3
3
|
export type TextFieldProps = Omit<AKTextFieldProps, 'name'> & {
|
|
4
4
|
/** Name passed to the <Field>.*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-create",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "The driver component of meta creation flow",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,28 +34,29 @@
|
|
|
34
34
|
"@atlaskit/afm-i18n-platform-linking-platform-link-create": "2.201.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^12.3.0",
|
|
36
36
|
"@atlaskit/atlassian-context": "^1.1.0",
|
|
37
|
-
"@atlaskit/button": "^25.
|
|
37
|
+
"@atlaskit/button": "^25.2.0",
|
|
38
38
|
"@atlaskit/css": "^1.0.0",
|
|
39
|
-
"@atlaskit/empty-state": "^12.
|
|
40
|
-
"@atlaskit/form": "^17.
|
|
41
|
-
"@atlaskit/icon": "^37.
|
|
42
|
-
"@atlaskit/icon-file-type": "^8.
|
|
39
|
+
"@atlaskit/empty-state": "^12.1.0",
|
|
40
|
+
"@atlaskit/form": "^17.1.0",
|
|
41
|
+
"@atlaskit/icon": "^37.5.0",
|
|
42
|
+
"@atlaskit/icon-file-type": "^8.2.0",
|
|
43
43
|
"@atlaskit/intl-messages-provider": "^4.2.0",
|
|
44
|
-
"@atlaskit/link": "^5.
|
|
45
|
-
"@atlaskit/linking-common": "^
|
|
46
|
-
"@atlaskit/modal-dialog": "^16.
|
|
47
|
-
"@atlaskit/object": "^2.
|
|
44
|
+
"@atlaskit/link": "^5.1.0",
|
|
45
|
+
"@atlaskit/linking-common": "^12.0.0",
|
|
46
|
+
"@atlaskit/modal-dialog": "^16.5.0",
|
|
47
|
+
"@atlaskit/object": "^2.3.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
49
|
-
"@atlaskit/primitives": "^22.
|
|
49
|
+
"@atlaskit/primitives": "^22.4.0",
|
|
50
50
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
51
|
-
"@atlaskit/select": "^
|
|
51
|
+
"@atlaskit/react-select": "^4.8.0",
|
|
52
|
+
"@atlaskit/select": "^22.8.0",
|
|
52
53
|
"@atlaskit/smart-user-picker": "^11.5.0",
|
|
53
|
-
"@atlaskit/spinner": "^20.
|
|
54
|
-
"@atlaskit/textfield": "^10.
|
|
55
|
-
"@atlaskit/theme": "^28.
|
|
56
|
-
"@atlaskit/tokens": "^16.
|
|
54
|
+
"@atlaskit/spinner": "^20.3.0",
|
|
55
|
+
"@atlaskit/textfield": "^10.1.0",
|
|
56
|
+
"@atlaskit/theme": "^28.1.0",
|
|
57
|
+
"@atlaskit/tokens": "^16.8.0",
|
|
57
58
|
"@babel/runtime": "^7.0.0",
|
|
58
|
-
"@compiled/react": "^1.0.
|
|
59
|
+
"@compiled/react": "^1.0.2",
|
|
59
60
|
"debounce-promise": "^3.1.2",
|
|
60
61
|
"final-form": "^4.20.3",
|
|
61
62
|
"react-final-form": "^6.5.3"
|
|
@@ -68,10 +69,11 @@
|
|
|
68
69
|
"@af/accessibility-testing": "workspace:^",
|
|
69
70
|
"@af/integration-testing": "workspace:^",
|
|
70
71
|
"@af/visual-regression": "workspace:^",
|
|
71
|
-
"@atlaskit/drawer": "^14.
|
|
72
|
-
"@atlaskit/link-
|
|
73
|
-
"@atlaskit/
|
|
74
|
-
"@
|
|
72
|
+
"@atlaskit/drawer": "^14.2.0",
|
|
73
|
+
"@atlaskit/link-picker": "^6.5.0",
|
|
74
|
+
"@atlaskit/link-test-helpers": "^11.1.0",
|
|
75
|
+
"@atlaskit/popup": "^6.2.0",
|
|
76
|
+
"@atlassian/a11y-jest-testing": "^0.16.0",
|
|
75
77
|
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
76
78
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
77
79
|
"@testing-library/react": "^16.3.0",
|
|
@@ -122,6 +124,10 @@
|
|
|
122
124
|
]
|
|
123
125
|
}
|
|
124
126
|
},
|
|
125
|
-
"platform-feature-flags": {
|
|
127
|
+
"platform-feature-flags": {
|
|
128
|
+
"platform_link_create_event_tracking": {
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
126
132
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/5ebc0bfb-9b6d-4ec0-adbe-e4d5e88ace44"
|
|
127
133
|
}
|