@atlaskit/link-create 1.15.9 → 2.1.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 +357 -310
- package/CONTRIBUTING.md +3 -0
- package/dist/cjs/common/constants.js +8 -2
- package/dist/cjs/{ui/link-create → common/ui}/confirm-dismiss-dialog/main.js +4 -6
- package/dist/cjs/{ui/link-create → common/ui}/edit-modal/index.js +4 -8
- package/dist/cjs/{ui/link-create → common/ui}/error-boundary/index.js +6 -15
- package/dist/cjs/{controllers → common/ui}/experience-tracker/index.js +3 -3
- package/dist/cjs/common/ui/link-create-content/index.js +21 -0
- package/dist/cjs/{ui/link-create → common/ui}/modal-hero/index.js +1 -3
- package/dist/cjs/controllers/callback-context/main.js +8 -15
- package/dist/cjs/ui/create-form/async-select/main.js +2 -5
- package/dist/cjs/ui/create-form/main.js +3 -4
- package/dist/cjs/ui/index.js +11 -4
- package/dist/cjs/ui/inline-create/index.js +38 -0
- package/dist/cjs/ui/inline-create/main.js +125 -0
- package/dist/cjs/ui/modal-create/index.js +38 -0
- package/dist/cjs/ui/{link-create → modal-create}/main.js +45 -81
- package/dist/es2019/common/constants.js +7 -1
- package/dist/es2019/{ui/link-create → common/ui}/confirm-dismiss-dialog/main.js +4 -7
- package/dist/es2019/{ui/link-create → common/ui}/edit-modal/index.js +4 -10
- package/dist/es2019/{ui/link-create → common/ui}/error-boundary/index.js +6 -15
- package/dist/es2019/{controllers → common/ui}/experience-tracker/index.js +3 -3
- package/dist/es2019/common/ui/link-create-content/index.js +11 -0
- package/dist/es2019/{ui/link-create → common/ui}/modal-hero/index.js +1 -3
- package/dist/es2019/controllers/callback-context/main.js +8 -15
- package/dist/es2019/index.js +4 -1
- package/dist/es2019/ui/create-form/async-select/main.js +2 -5
- package/dist/es2019/ui/create-form/main.js +3 -4
- package/dist/es2019/ui/index.js +2 -1
- package/dist/es2019/ui/inline-create/index.js +30 -0
- package/dist/es2019/ui/inline-create/main.js +100 -0
- package/dist/es2019/ui/modal-create/index.js +30 -0
- package/dist/es2019/ui/{link-create → modal-create}/main.js +22 -40
- package/dist/esm/common/constants.js +7 -1
- package/dist/esm/{ui/link-create → common/ui}/confirm-dismiss-dialog/main.js +4 -6
- package/dist/esm/{ui/link-create → common/ui}/edit-modal/index.js +4 -8
- package/dist/esm/{ui/link-create → common/ui}/error-boundary/index.js +6 -15
- package/dist/esm/{controllers → common/ui}/experience-tracker/index.js +3 -3
- package/dist/esm/common/ui/link-create-content/index.js +12 -0
- package/dist/esm/{ui/link-create → common/ui}/modal-hero/index.js +1 -3
- package/dist/esm/controllers/callback-context/main.js +8 -15
- package/dist/esm/index.js +4 -1
- package/dist/esm/ui/create-form/async-select/main.js +2 -5
- package/dist/esm/ui/create-form/main.js +3 -4
- package/dist/esm/ui/index.js +2 -1
- package/dist/esm/ui/inline-create/index.js +30 -0
- package/dist/esm/ui/inline-create/main.js +119 -0
- package/dist/esm/ui/modal-create/index.js +30 -0
- package/dist/esm/ui/{link-create → modal-create}/main.js +48 -84
- package/dist/types/common/constants.d.ts +2 -0
- package/dist/types/common/types.d.ts +2 -2
- package/dist/types/common/ui/Button/index.d.ts +2 -2
- package/dist/types/common/ui/ModalDialog/index.d.ts +1 -1
- package/dist/types/common/ui/confirm-dismiss-dialog/main.d.ts +7 -0
- package/dist/types/common/ui/edit-modal/index.d.ts +11 -0
- package/dist/types/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.d.ts +1 -1
- package/dist/types/{ui/link-create → common/ui}/error-boundary/index.d.ts +1 -1
- package/dist/types/common/ui/link-create-content/index.d.ts +8 -0
- package/dist/types/common/utils/analytics/components.d.ts +1 -1
- package/dist/types/common/utils/analytics/context.d.ts +2 -2
- package/dist/types/common/utils/form/index.d.ts +1 -1
- package/dist/types/common/utils/locale/fetch-messages-for-locale.d.ts +1 -1
- package/dist/types/controllers/callback-context/main.d.ts +2 -2
- package/dist/types/controllers/create-field/main.d.ts +1 -1
- package/dist/types/controllers/create-field/types.d.ts +2 -2
- package/dist/types/controllers/edit-post-create-context/index.d.ts +1 -1
- package/dist/types/controllers/form-context/main.d.ts +2 -2
- package/dist/types/controllers/plugin-context/index.d.ts +1 -1
- package/dist/types/ui/create-form/async-select/main.d.ts +2 -2
- package/dist/types/ui/create-form/async-select/types.d.ts +2 -2
- package/dist/types/ui/create-form/form-loader/main.d.ts +1 -1
- package/dist/types/ui/create-form/main.d.ts +1 -1
- package/dist/types/ui/create-form/select/main.d.ts +2 -2
- package/dist/types/ui/create-form/select/types.d.ts +2 -2
- package/dist/types/ui/create-form/textfield/main.d.ts +1 -1
- package/dist/types/ui/create-form/textfield/types.d.ts +2 -2
- package/dist/types/ui/create-form/utils/index.d.ts +1 -1
- package/dist/types/ui/index.d.ts +2 -1
- package/dist/types/ui/inline-create/index.d.ts +5 -0
- package/dist/types/ui/inline-create/main.d.ts +5 -0
- package/dist/types/ui/modal-create/index.d.ts +5 -0
- package/dist/{types-ts4.5/ui/link-create → types/ui/modal-create}/main.d.ts +1 -1
- package/dist/types-ts4.5/common/constants.d.ts +2 -0
- package/dist/types-ts4.5/common/types.d.ts +2 -2
- package/dist/types-ts4.5/common/ui/Button/index.d.ts +2 -2
- package/dist/types-ts4.5/common/ui/ModalDialog/index.d.ts +1 -1
- package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/main.d.ts +7 -0
- package/dist/types-ts4.5/common/ui/edit-modal/index.d.ts +11 -0
- package/dist/types-ts4.5/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.d.ts +1 -1
- package/dist/types-ts4.5/{ui/link-create → common/ui}/error-boundary/index.d.ts +1 -1
- package/dist/types-ts4.5/common/ui/link-create-content/index.d.ts +8 -0
- package/dist/types-ts4.5/common/utils/analytics/components.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/analytics/context.d.ts +2 -2
- package/dist/types-ts4.5/common/utils/form/index.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/locale/fetch-messages-for-locale.d.ts +1 -1
- package/dist/types-ts4.5/controllers/callback-context/main.d.ts +2 -2
- package/dist/types-ts4.5/controllers/create-field/main.d.ts +1 -1
- package/dist/types-ts4.5/controllers/create-field/types.d.ts +2 -2
- package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +1 -1
- package/dist/types-ts4.5/controllers/form-context/main.d.ts +2 -2
- package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +2 -2
- package/dist/types-ts4.5/ui/create-form/async-select/types.d.ts +2 -2
- package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/main.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/select/main.d.ts +2 -2
- package/dist/types-ts4.5/ui/create-form/select/types.d.ts +2 -2
- package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/textfield/types.d.ts +2 -2
- package/dist/types-ts4.5/ui/create-form/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/{main.d.ts → inline-create/index.d.ts} +1 -3
- package/dist/types-ts4.5/ui/inline-create/main.d.ts +5 -0
- package/dist/{types/ui/main.d.ts → types-ts4.5/ui/modal-create/index.d.ts} +1 -3
- package/dist/{types/ui/link-create → types-ts4.5/ui/modal-create}/main.d.ts +1 -1
- package/example-helpers/mock-plugin-form.tsx +2 -2
- package/package.json +9 -19
- package/dist/cjs/ui/link-create/index.js +0 -13
- package/dist/cjs/ui/main.js +0 -46
- package/dist/es2019/ui/link-create/index.js +0 -1
- package/dist/es2019/ui/main.js +0 -38
- package/dist/esm/ui/link-create/index.js +0 -1
- package/dist/esm/ui/main.js +0 -38
- package/dist/types/ui/link-create/confirm-dismiss-dialog/main.d.ts +0 -6
- package/dist/types/ui/link-create/edit-modal/index.d.ts +0 -8
- package/dist/types/ui/link-create/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-create/confirm-dismiss-dialog/main.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-create/edit-modal/index.d.ts +0 -8
- package/dist/types-ts4.5/ui/link-create/index.d.ts +0 -1
- /package/dist/cjs/{ui/link-create → common/ui}/confirm-dismiss-dialog/index.js +0 -0
- /package/dist/cjs/{ui/link-create → common/ui}/confirm-dismiss-dialog/messages.js +0 -0
- /package/dist/cjs/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.js +0 -0
- /package/dist/cjs/ui/{link-create → modal-create}/messages.js +0 -0
- /package/dist/es2019/{ui/link-create → common/ui}/confirm-dismiss-dialog/index.js +0 -0
- /package/dist/es2019/{ui/link-create → common/ui}/confirm-dismiss-dialog/messages.js +0 -0
- /package/dist/es2019/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.js +0 -0
- /package/dist/es2019/ui/{link-create → modal-create}/messages.js +0 -0
- /package/dist/esm/{ui/link-create → common/ui}/confirm-dismiss-dialog/index.js +0 -0
- /package/dist/esm/{ui/link-create → common/ui}/confirm-dismiss-dialog/messages.js +0 -0
- /package/dist/esm/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.js +0 -0
- /package/dist/esm/ui/{link-create → modal-create}/messages.js +0 -0
- /package/dist/types/{ui/link-create → common/ui}/confirm-dismiss-dialog/index.d.ts +0 -0
- /package/dist/types/{ui/link-create → common/ui}/confirm-dismiss-dialog/messages.d.ts +0 -0
- /package/dist/types/{controllers → common/ui}/experience-tracker/index.d.ts +0 -0
- /package/dist/types/{ui/link-create → common/ui}/modal-hero/index.d.ts +0 -0
- /package/dist/types/ui/{link-create → modal-create}/messages.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create → common/ui}/confirm-dismiss-dialog/index.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create → common/ui}/confirm-dismiss-dialog/messages.d.ts +0 -0
- /package/dist/types-ts4.5/{controllers → common/ui}/experience-tracker/index.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create → common/ui}/modal-hero/index.d.ts +0 -0
- /package/dist/types-ts4.5/ui/{link-create → modal-create}/messages.d.ts +0 -0
|
@@ -1,35 +1,25 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import {
|
|
3
|
+
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { Box } from '@atlaskit/primitives';
|
|
9
8
|
import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../common/constants';
|
|
9
|
+
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
10
|
+
import { EditModal } from '../../common/ui/edit-modal';
|
|
11
|
+
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
12
|
+
import { LinkCreateContent } from '../../common/ui/link-create-content';
|
|
13
|
+
import { ModalHero } from '../../common/ui/modal-hero';
|
|
10
14
|
import { Modal } from '../../common/ui/ModalDialog';
|
|
11
15
|
import { LinkCreateCallbackProvider } from '../../controllers/callback-context';
|
|
12
|
-
import { EditPostCreateModalProvider } from '../../controllers/edit-post-create-context';
|
|
16
|
+
import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../controllers/edit-post-create-context';
|
|
13
17
|
import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers/exit-warning-modal-context';
|
|
14
|
-
import { FormContextProvider
|
|
15
|
-
import { LinkCreatePluginsProvider } from '../../controllers/plugin-context';
|
|
16
|
-
import { ConfirmDismissDialog } from './confirm-dismiss-dialog';
|
|
17
|
-
import { EditModal } from './edit-modal';
|
|
18
|
-
import { ErrorBoundary } from './error-boundary';
|
|
18
|
+
import { FormContextProvider } from '../../controllers/form-context';
|
|
19
|
+
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
19
20
|
import { messages } from './messages';
|
|
20
|
-
import { ModalHero } from './modal-hero';
|
|
21
21
|
export const TEST_ID = 'link-create';
|
|
22
22
|
const SCREEN_ID = 'linkCreateScreen';
|
|
23
|
-
const LinkCreateContent = ({
|
|
24
|
-
plugins,
|
|
25
|
-
entityKey
|
|
26
|
-
}) => {
|
|
27
|
-
const chosenOne = plugins.find(plugin => plugin.key === entityKey);
|
|
28
|
-
if (!chosenOne) {
|
|
29
|
-
throw new Error('Make sure you specified a valid entityKey');
|
|
30
|
-
}
|
|
31
|
-
return jsx(Fragment, null, chosenOne.form);
|
|
32
|
-
};
|
|
33
23
|
const LinkCreateWithModal = ({
|
|
34
24
|
active,
|
|
35
25
|
modalTitle,
|
|
@@ -45,27 +35,16 @@ const LinkCreateWithModal = ({
|
|
|
45
35
|
modalHero
|
|
46
36
|
}) => {
|
|
47
37
|
const intl = useIntl();
|
|
48
|
-
const {
|
|
49
|
-
setFormErrorMessage
|
|
50
|
-
} = useFormContext();
|
|
51
|
-
const handleCreate = useCallback(async result => {
|
|
52
|
-
// Reset the form error message
|
|
53
|
-
setFormErrorMessage(undefined);
|
|
54
|
-
if (onCreate) {
|
|
55
|
-
await onCreate(result);
|
|
56
|
-
}
|
|
57
|
-
}, [onCreate, setFormErrorMessage]);
|
|
58
|
-
const handleFailure = useCallback(error => {
|
|
59
|
-
// Set the form error message
|
|
60
|
-
if (error instanceof Error) {
|
|
61
|
-
setFormErrorMessage(error.message);
|
|
62
|
-
}
|
|
63
|
-
onFailure && onFailure(error);
|
|
64
|
-
}, [onFailure, setFormErrorMessage]);
|
|
65
38
|
const {
|
|
66
39
|
getShouldShowWarning
|
|
67
40
|
} = useExitWarningModal();
|
|
68
41
|
const [showExitWarning, setShowExitWarning] = useState(false);
|
|
42
|
+
const {
|
|
43
|
+
editViewPayload
|
|
44
|
+
} = useEditPostCreateModal();
|
|
45
|
+
const {
|
|
46
|
+
activePlugin
|
|
47
|
+
} = useLinkCreatePlugins();
|
|
69
48
|
const handleCancel = useCallback(() => {
|
|
70
49
|
if (getShouldShowWarning() && !showExitWarning) {
|
|
71
50
|
setShowExitWarning(true);
|
|
@@ -75,8 +54,8 @@ const LinkCreateWithModal = ({
|
|
|
75
54
|
}, [onCancel, getShouldShowWarning, showExitWarning]);
|
|
76
55
|
const handleCloseExitWarning = useCallback(() => setShowExitWarning(false), []);
|
|
77
56
|
return jsx(LinkCreateCallbackProvider, {
|
|
78
|
-
onCreate:
|
|
79
|
-
onFailure:
|
|
57
|
+
onCreate: onCreate,
|
|
58
|
+
onFailure: onFailure,
|
|
80
59
|
onCancel: handleCancel
|
|
81
60
|
}, jsx(ModalTransition, null, active && jsx(Modal, {
|
|
82
61
|
testId: "link-create-modal",
|
|
@@ -95,10 +74,13 @@ const LinkCreateWithModal = ({
|
|
|
95
74
|
entityKey: entityKey
|
|
96
75
|
})))))), onComplete && jsx(EditModal, {
|
|
97
76
|
onCloseComplete: onCloseComplete,
|
|
98
|
-
onClose: onComplete
|
|
77
|
+
onClose: onComplete,
|
|
78
|
+
editViewPayload: editViewPayload,
|
|
79
|
+
activePlugin: activePlugin
|
|
99
80
|
}), jsx(ConfirmDismissDialog, {
|
|
100
81
|
active: showExitWarning,
|
|
101
|
-
onClose: handleCloseExitWarning
|
|
82
|
+
onClose: handleCloseExitWarning,
|
|
83
|
+
onCancel: onCancel
|
|
102
84
|
}));
|
|
103
85
|
};
|
|
104
86
|
const LinkCreateModal = props => {
|
|
@@ -2,4 +2,10 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export var COMPONENT_NAME = 'linkCreate';
|
|
3
3
|
export var CREATE_FORM_MAX_WIDTH_IN_PX = '480';
|
|
4
4
|
export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
|
|
5
|
-
export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
|
|
5
|
+
export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
|
|
6
|
+
export var PACKAGE_DATA = {
|
|
7
|
+
packageName: "@atlaskit/link-create" || '',
|
|
8
|
+
packageVersion: "2.1.0" || '',
|
|
9
|
+
component: COMPONENT_NAME,
|
|
10
|
+
componentName: COMPONENT_NAME
|
|
11
|
+
};
|
|
@@ -2,9 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
4
|
import { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { Button } from '
|
|
6
|
-
import { Modal } from '
|
|
7
|
-
import { useLinkCreateCallback } from '../../../controllers/callback-context';
|
|
5
|
+
import { Button } from '../Button';
|
|
6
|
+
import { Modal } from '../ModalDialog';
|
|
8
7
|
import messages from './messages';
|
|
9
8
|
var screen = 'linkCreateExitWarningScreen';
|
|
10
9
|
var context = {
|
|
@@ -13,10 +12,9 @@ var context = {
|
|
|
13
12
|
};
|
|
14
13
|
export var ConfirmDismissDialog = function ConfirmDismissDialog(_ref) {
|
|
15
14
|
var active = _ref.active,
|
|
16
|
-
onClose = _ref.onClose
|
|
15
|
+
onClose = _ref.onClose,
|
|
16
|
+
onCancel = _ref.onCancel;
|
|
17
17
|
var intl = useIntl();
|
|
18
|
-
var _useLinkCreateCallbac = useLinkCreateCallback(),
|
|
19
|
-
onCancel = _useLinkCreateCallbac.onCancel;
|
|
20
18
|
var onCancelDismiss = function onCancelDismiss() {
|
|
21
19
|
return onClose();
|
|
22
20
|
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ModalTransition } from '@atlaskit/modal-dialog';
|
|
3
|
-
import { Modal } from '
|
|
4
|
-
import { useEditPostCreateModal } from '../../../controllers/edit-post-create-context';
|
|
5
|
-
import { useLinkCreatePlugins } from '../../../controllers/plugin-context';
|
|
3
|
+
import { Modal } from '../ModalDialog';
|
|
6
4
|
var SCREEN = 'linkCreateEditScreen';
|
|
7
5
|
export var EditModal = function EditModal(_ref) {
|
|
8
6
|
var _activePlugin$editVie;
|
|
9
7
|
var onClose = _ref.onClose,
|
|
10
|
-
onCloseComplete = _ref.onCloseComplete
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _useLinkCreatePlugins = useLinkCreatePlugins(),
|
|
14
|
-
activePlugin = _useLinkCreatePlugins.activePlugin;
|
|
8
|
+
onCloseComplete = _ref.onCloseComplete,
|
|
9
|
+
editViewPayload = _ref.editViewPayload,
|
|
10
|
+
activePlugin = _ref.activePlugin;
|
|
15
11
|
return /*#__PURE__*/React.createElement(ModalTransition, null, !!editViewPayload && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
16
12
|
testId: "link-create-edit-modal",
|
|
17
13
|
screen: SCREEN,
|
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
-
import { captureException } from '@atlaskit/linking-common/sentry';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
6
4
|
import { ErrorBoundaryUI } from '../../../common/ui/error-boundary-ui';
|
|
7
5
|
import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
|
|
8
|
-
import { useExperience } from '
|
|
6
|
+
import { useExperience } from '../experience-tracker';
|
|
9
7
|
import { BaseErrorBoundary } from './error-boundary-base';
|
|
10
8
|
export var ErrorBoundary = function ErrorBoundary(_ref) {
|
|
11
9
|
var children = _ref.children,
|
|
12
10
|
errorComponent = _ref.errorComponent;
|
|
13
11
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
14
12
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
15
|
-
var experience =
|
|
16
|
-
|
|
17
|
-
useExperience() : null;
|
|
18
|
-
var handleError = useCallback(function (error, info) {
|
|
13
|
+
var experience = useExperience();
|
|
14
|
+
var handleError = useCallback(function (error) {
|
|
19
15
|
var _window;
|
|
20
|
-
if (!getBooleanFF('platform.linking-platform.link-create.better-observability')) {
|
|
21
|
-
// Capture exception to Sentry
|
|
22
|
-
captureException(error, 'link-create');
|
|
23
|
-
}
|
|
24
16
|
createAnalyticsEvent(createEventPayload('operational.linkCreate.unhandledErrorCaught', {
|
|
25
17
|
browserInfo: ((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) || 'unknown',
|
|
26
18
|
error: error.name,
|
|
27
19
|
componentStack: 'unknown'
|
|
28
20
|
})).fire(ANALYTICS_CHANNEL);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
21
|
+
|
|
22
|
+
// Track experience as failed for SLO
|
|
23
|
+
experience === null || experience === void 0 || experience.failure(error);
|
|
33
24
|
}, [createAnalyticsEvent, experience]);
|
|
34
25
|
return /*#__PURE__*/React.createElement(BaseErrorBoundary, {
|
|
35
26
|
onError: handleError,
|
|
@@ -4,9 +4,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React, { createContext, useContext, useMemo, useRef } from 'react';
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
6
|
import { captureException } from '@atlaskit/linking-common/sentry';
|
|
7
|
-
import { ANALYTICS_CHANNEL } from '../../
|
|
8
|
-
import createEventPayload from '../../
|
|
9
|
-
import { getErrorType, getNetworkFields } from '../../
|
|
7
|
+
import { ANALYTICS_CHANNEL } from '../../constants';
|
|
8
|
+
import createEventPayload from '../../utils/analytics/analytics.codegen';
|
|
9
|
+
import { getErrorType, getNetworkFields } from '../../utils/errors';
|
|
10
10
|
var ExperienceContext = /*#__PURE__*/createContext({
|
|
11
11
|
success: function success() {},
|
|
12
12
|
failure: function failure() {}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
export var LinkCreateContent = function LinkCreateContent(_ref) {
|
|
3
|
+
var plugins = _ref.plugins,
|
|
4
|
+
entityKey = _ref.entityKey;
|
|
5
|
+
var chosenOne = plugins.find(function (plugin) {
|
|
6
|
+
return plugin.key === entityKey;
|
|
7
|
+
});
|
|
8
|
+
if (!chosenOne) {
|
|
9
|
+
throw new Error('Make sure you specified a valid entityKey');
|
|
10
|
+
}
|
|
11
|
+
return /*#__PURE__*/React.createElement(Fragment, null, chosenOne.form);
|
|
12
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import { Stack } from '@atlaskit/primitives';
|
|
3
|
-
|
|
4
|
-
// eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
|
|
5
|
-
import { ErrorBoundary } from '../error-boundary';
|
|
3
|
+
import { ErrorBoundary } from '../../../common/ui/error-boundary';
|
|
6
4
|
var ErrorComponent = function ErrorComponent() {
|
|
7
5
|
// when there's an error, render nothing but report the issue
|
|
8
6
|
return /*#__PURE__*/React.createElement(Fragment, null, null);
|
|
@@ -5,11 +5,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React, { useContext, useMemo } from 'react';
|
|
7
7
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
9
|
+
import { useExperience } from '../../common/ui/experience-tracker';
|
|
10
10
|
import createEventPayload from '../../common/utils/analytics/analytics.codegen';
|
|
11
11
|
import { getErrorType } from '../../common/utils/errors';
|
|
12
|
-
import { useExperience } from '../experience-tracker';
|
|
13
12
|
var LinkCreateCallbackContext = /*#__PURE__*/React.createContext({});
|
|
14
13
|
var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
15
14
|
var children = _ref.children,
|
|
@@ -18,9 +17,7 @@ var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
|
18
17
|
onCancel = _ref.onCancel;
|
|
19
18
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
20
19
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
21
|
-
var experience =
|
|
22
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
23
|
-
useExperience() : null;
|
|
20
|
+
var experience = useExperience();
|
|
24
21
|
var handleCreate = useMemo(function () {
|
|
25
22
|
return {
|
|
26
23
|
onCreate: function () {
|
|
@@ -29,13 +26,11 @@ var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
|
29
26
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30
27
|
while (1) switch (_context.prev = _context.next) {
|
|
31
28
|
case 0:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
experience === null || experience === void 0 || experience.success();
|
|
38
|
-
}
|
|
29
|
+
/**
|
|
30
|
+
* We consider the experience successful once we have
|
|
31
|
+
* successfully created an object
|
|
32
|
+
*/
|
|
33
|
+
experience === null || experience === void 0 || experience.success();
|
|
39
34
|
objectId = result.objectId, objectType = result.objectType;
|
|
40
35
|
createAnalyticsEvent(createEventPayload('track.object.created.linkCreate', {
|
|
41
36
|
objectId: objectId,
|
|
@@ -70,9 +65,7 @@ var LinkCreateCallbackProvider = function LinkCreateCallbackProvider(_ref) {
|
|
|
70
65
|
createAnalyticsEvent(createEventPayload('track.object.createFailed.linkCreate', {
|
|
71
66
|
failureType: getErrorType(error)
|
|
72
67
|
})).fire(ANALYTICS_CHANNEL);
|
|
73
|
-
|
|
74
|
-
experience === null || experience === void 0 || experience.failure(error);
|
|
75
|
-
}
|
|
68
|
+
experience === null || experience === void 0 || experience.failure(error);
|
|
76
69
|
_onFailure && _onFailure(error);
|
|
77
70
|
case 3:
|
|
78
71
|
case "end":
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export { default, TextField, CreateForm, Select, AsyncSelect, CreateFormLoader, FormSpy
|
|
1
|
+
export { default, TextField, CreateForm, Select, AsyncSelect, CreateFormLoader, FormSpy
|
|
2
|
+
// todo: EDM-10077 - export this once inline-create is tested/ready
|
|
3
|
+
//InlineCreate,
|
|
4
|
+
} from './ui/index';
|
|
2
5
|
export { useLinkCreateCallback, LinkCreateCallbackProvider } from './controllers/callback-context';
|
|
3
6
|
export { FORM_ERROR } from 'final-form';
|
|
@@ -11,7 +11,6 @@ import { jsx } from '@emotion/react';
|
|
|
11
11
|
import debounce from 'debounce-promise';
|
|
12
12
|
import { useForm } from 'react-final-form';
|
|
13
13
|
import { useIntl } from 'react-intl-next';
|
|
14
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { AsyncSelect as AkAsyncSelect } from '@atlaskit/select';
|
|
16
15
|
import messages from '../../../common/messages';
|
|
17
16
|
import { useLinkCreateCallback } from '../../../controllers/callback-context';
|
|
@@ -60,9 +59,7 @@ export function AsyncSelect(_ref) {
|
|
|
60
59
|
/**
|
|
61
60
|
* This binds experience to fail if async fetch ever fails to load
|
|
62
61
|
*/
|
|
63
|
-
var loadOptions =
|
|
64
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
65
|
-
useMemo(function () {
|
|
62
|
+
var loadOptions = useMemo(function () {
|
|
66
63
|
if (loadOptionsFn) {
|
|
67
64
|
return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
68
65
|
var _args = arguments;
|
|
@@ -87,7 +84,7 @@ export function AsyncSelect(_ref) {
|
|
|
87
84
|
}, _callee, null, [[0, 6]]);
|
|
88
85
|
}));
|
|
89
86
|
}
|
|
90
|
-
}, [intl, onFailure, loadOptionsFn, setFormErrorMessage])
|
|
87
|
+
}, [intl, onFailure, loadOptionsFn, setFormErrorMessage]);
|
|
91
88
|
useEffect(function () {
|
|
92
89
|
var current = true;
|
|
93
90
|
var fetch = /*#__PURE__*/function () {
|
|
@@ -13,7 +13,6 @@ import { FORM_ERROR } from 'final-form';
|
|
|
13
13
|
import { Form, FormSpy } from 'react-final-form';
|
|
14
14
|
import { useIntl } from 'react-intl-next';
|
|
15
15
|
import { RequiredAsterisk } from '@atlaskit/form';
|
|
16
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { Box } from '@atlaskit/primitives';
|
|
18
17
|
import { CREATE_FORM_MAX_WIDTH_IN_PX, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
|
|
19
18
|
import messages from '../../common/messages';
|
|
@@ -117,7 +116,7 @@ export var CreateForm = function CreateForm(_ref) {
|
|
|
117
116
|
return jsx(CreateFormLoader, null);
|
|
118
117
|
}
|
|
119
118
|
return jsx(Form, {
|
|
120
|
-
onSubmit:
|
|
119
|
+
onSubmit: handleSubmitWithErrorHandling,
|
|
121
120
|
initialValues: initialValues,
|
|
122
121
|
mutators: {
|
|
123
122
|
setField: function setField(args, state, tools) {
|
|
@@ -149,7 +148,7 @@ export var CreateForm = function CreateForm(_ref) {
|
|
|
149
148
|
});
|
|
150
149
|
setShouldShowWarning(isModified);
|
|
151
150
|
}
|
|
152
|
-
}),
|
|
151
|
+
}), jsx("p", {
|
|
153
152
|
"aria-hidden": "true"
|
|
154
153
|
}, intl.formatMessage(messages.requiredFieldInstruction), ' ', jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
|
|
155
154
|
/**
|
|
@@ -158,7 +157,7 @@ export var CreateForm = function CreateForm(_ref) {
|
|
|
158
157
|
* default to the `formErrorMessage` that we sometimes use with our own
|
|
159
158
|
* "form context" (only currently used for AsyncSelect field reporting failed loading)
|
|
160
159
|
*/, {
|
|
161
|
-
formErrorMessage:
|
|
160
|
+
formErrorMessage: submitError || formErrorMessage,
|
|
162
161
|
handleCancel: handleCancel,
|
|
163
162
|
testId: testId
|
|
164
163
|
}));
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default } from './
|
|
1
|
+
export { default } from './modal-create';
|
|
2
|
+
export { default as InlineCreate } from './inline-create';
|
|
2
3
|
export { TextField } from './create-form/textfield';
|
|
3
4
|
export { CreateForm } from './create-form/main';
|
|
4
5
|
export { CreateFormLoader } from './create-form/form-loader';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
6
|
+
import { PACKAGE_DATA } from '../../common/constants';
|
|
7
|
+
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
8
|
+
import { ErrorBoundaryModal } from '../../common/ui/error-boundary-modal';
|
|
9
|
+
import { Experience } from '../../common/ui/experience-tracker';
|
|
10
|
+
import { withLinkCreateAnalyticsContext } from '../../common/utils/analytics';
|
|
11
|
+
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
12
|
+
import i18nEN from '../../i18n/en';
|
|
13
|
+
import InlineCreate from './main';
|
|
14
|
+
var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(function (props) {
|
|
15
|
+
return jsx(Experience, null, jsx(ErrorBoundary, {
|
|
16
|
+
errorComponent: jsx(ErrorBoundaryModal, {
|
|
17
|
+
active: props.active,
|
|
18
|
+
onClose: props.onCancel
|
|
19
|
+
})
|
|
20
|
+
}, jsx(InlineCreate, props)));
|
|
21
|
+
}));
|
|
22
|
+
var ComposedLinkCreate = /*#__PURE__*/memo(function (props) {
|
|
23
|
+
return jsx(AnalyticsContext, {
|
|
24
|
+
data: PACKAGE_DATA
|
|
25
|
+
}, jsx(IntlMessagesProvider, {
|
|
26
|
+
defaultMessages: i18nEN,
|
|
27
|
+
loaderFn: fetchMessagesForLocale
|
|
28
|
+
}, jsx(LinkCreateWithAnalyticsContext, props)));
|
|
29
|
+
});
|
|
30
|
+
export default ComposedLinkCreate;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { useCallback, useState } from 'react';
|
|
7
|
+
import { jsx } from '@emotion/react';
|
|
8
|
+
import { Box } from '@atlaskit/primitives';
|
|
9
|
+
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
10
|
+
import { EditModal } from '../../common/ui/edit-modal';
|
|
11
|
+
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
12
|
+
import { LinkCreateContent } from '../../common/ui/link-create-content';
|
|
13
|
+
import { LinkCreateCallbackProvider
|
|
14
|
+
// useLinkCreateCallback,
|
|
15
|
+
} from '../../controllers/callback-context';
|
|
16
|
+
import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../controllers/edit-post-create-context';
|
|
17
|
+
import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers/exit-warning-modal-context';
|
|
18
|
+
import { FormContextProvider } from '../../controllers/form-context';
|
|
19
|
+
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
20
|
+
export var TEST_ID = 'link-create';
|
|
21
|
+
// todo: EDM-10075 trigger the screen.viewed_linkCreateScreen event when inline-create is mounted
|
|
22
|
+
// const SCREEN_ID = 'linkCreateScreen';
|
|
23
|
+
|
|
24
|
+
var InlineCreateContent = function InlineCreateContent(_ref) {
|
|
25
|
+
var onCreate = _ref.onCreate,
|
|
26
|
+
onFailure = _ref.onFailure,
|
|
27
|
+
onCancel = _ref.onCancel,
|
|
28
|
+
onComplete = _ref.onComplete,
|
|
29
|
+
plugins = _ref.plugins,
|
|
30
|
+
entityKey = _ref.entityKey,
|
|
31
|
+
testId = _ref.testId;
|
|
32
|
+
var _useExitWarningModal = useExitWarningModal(),
|
|
33
|
+
getShouldShowWarning = _useExitWarningModal.getShouldShowWarning;
|
|
34
|
+
var _useState = useState(false),
|
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
+
showExitWarning = _useState2[0],
|
|
37
|
+
setShowExitWarning = _useState2[1];
|
|
38
|
+
var _useEditPostCreateMod = useEditPostCreateModal(),
|
|
39
|
+
editViewPayload = _useEditPostCreateMod.editViewPayload;
|
|
40
|
+
var _useLinkCreatePlugins = useLinkCreatePlugins(),
|
|
41
|
+
activePlugin = _useLinkCreatePlugins.activePlugin;
|
|
42
|
+
var handleCancel = useCallback(function () {
|
|
43
|
+
if (getShouldShowWarning() && !showExitWarning) {
|
|
44
|
+
setShowExitWarning(true);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
|
48
|
+
}, [onCancel, getShouldShowWarning, showExitWarning]);
|
|
49
|
+
var handleCloseExitWarning = useCallback(function () {
|
|
50
|
+
return setShowExitWarning(false);
|
|
51
|
+
}, []);
|
|
52
|
+
return jsx(LinkCreateCallbackProvider, {
|
|
53
|
+
onCreate: onCreate,
|
|
54
|
+
onFailure: onFailure,
|
|
55
|
+
onCancel: handleCancel
|
|
56
|
+
}, jsx(ErrorBoundary, null, jsx(Box, {
|
|
57
|
+
testId: testId
|
|
58
|
+
}, jsx(LinkCreateContent, {
|
|
59
|
+
plugins: plugins,
|
|
60
|
+
entityKey: entityKey
|
|
61
|
+
}))), onComplete && jsx(EditModal, {
|
|
62
|
+
onClose: onComplete,
|
|
63
|
+
editViewPayload: editViewPayload,
|
|
64
|
+
activePlugin: activePlugin
|
|
65
|
+
}), jsx(ConfirmDismissDialog, {
|
|
66
|
+
active: showExitWarning,
|
|
67
|
+
onClose: handleCloseExitWarning,
|
|
68
|
+
onCancel: onCancel
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
var InlineCreate = function InlineCreate(props) {
|
|
72
|
+
return jsx(LinkCreatePluginsProvider, {
|
|
73
|
+
plugins: props.plugins,
|
|
74
|
+
entityKey: props.entityKey
|
|
75
|
+
}, function (pluginsProvider) {
|
|
76
|
+
return jsx(EditPostCreateModalProvider, {
|
|
77
|
+
active: true
|
|
78
|
+
}, function (_ref2) {
|
|
79
|
+
var _pluginsProvider$acti;
|
|
80
|
+
var setEditViewPayload = _ref2.setEditViewPayload,
|
|
81
|
+
shouldActivateEditView = _ref2.shouldActivateEditView,
|
|
82
|
+
enableEditView = _ref2.enableEditView;
|
|
83
|
+
return jsx(FormContextProvider, {
|
|
84
|
+
enableEditView: pluginsProvider !== null && pluginsProvider !== void 0 && (_pluginsProvider$acti = pluginsProvider.activePlugin) !== null && _pluginsProvider$acti !== void 0 && _pluginsProvider$acti.editView && props !== null && props !== void 0 && props.onComplete ? enableEditView : undefined
|
|
85
|
+
}, jsx(ExitWarningModalProvider, null, jsx(InlineCreateContent, _extends({}, props, {
|
|
86
|
+
onCreate: ( /*#__PURE__*/function () {
|
|
87
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(payload) {
|
|
88
|
+
var _props$onCreate;
|
|
89
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
90
|
+
while (1) switch (_context.prev = _context.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
_context.next = 2;
|
|
93
|
+
return (_props$onCreate = props.onCreate) === null || _props$onCreate === void 0 ? void 0 : _props$onCreate.call(props, payload);
|
|
94
|
+
case 2:
|
|
95
|
+
// if onComplete exists then there is an edit flow
|
|
96
|
+
if (props.onComplete) {
|
|
97
|
+
if (shouldActivateEditView()) {
|
|
98
|
+
//edit button is pressed
|
|
99
|
+
setEditViewPayload(payload);
|
|
100
|
+
} else {
|
|
101
|
+
//create button is pressed
|
|
102
|
+
props.onComplete();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
case 3:
|
|
106
|
+
case "end":
|
|
107
|
+
return _context.stop();
|
|
108
|
+
}
|
|
109
|
+
}, _callee);
|
|
110
|
+
}));
|
|
111
|
+
return function (_x) {
|
|
112
|
+
return _ref3.apply(this, arguments);
|
|
113
|
+
};
|
|
114
|
+
}())
|
|
115
|
+
}))));
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
export default InlineCreate;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
6
|
+
import { PACKAGE_DATA } from '../../common/constants';
|
|
7
|
+
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
8
|
+
import { ErrorBoundaryModal } from '../../common/ui/error-boundary-modal';
|
|
9
|
+
import { Experience } from '../../common/ui/experience-tracker';
|
|
10
|
+
import { withLinkCreateAnalyticsContext } from '../../common/utils/analytics';
|
|
11
|
+
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
12
|
+
import i18nEN from '../../i18n/en';
|
|
13
|
+
import LinkCreate from './main';
|
|
14
|
+
var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(function (props) {
|
|
15
|
+
return jsx(Experience, null, jsx(ErrorBoundary, {
|
|
16
|
+
errorComponent: jsx(ErrorBoundaryModal, {
|
|
17
|
+
active: props.active,
|
|
18
|
+
onClose: props.onCancel
|
|
19
|
+
})
|
|
20
|
+
}, jsx(LinkCreate, props)));
|
|
21
|
+
}));
|
|
22
|
+
var ComposedLinkCreate = /*#__PURE__*/memo(function (props) {
|
|
23
|
+
return jsx(AnalyticsContext, {
|
|
24
|
+
data: PACKAGE_DATA
|
|
25
|
+
}, jsx(IntlMessagesProvider, {
|
|
26
|
+
defaultMessages: i18nEN,
|
|
27
|
+
loaderFn: fetchMessagesForLocale
|
|
28
|
+
}, jsx(LinkCreateWithAnalyticsContext, props)));
|
|
29
|
+
});
|
|
30
|
+
export default ComposedLinkCreate;
|