@atlaskit/link-create 2.0.0 → 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 +343 -337
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/ui/index.js +11 -4
- package/dist/cjs/ui/{main.js → inline-create/index.js} +11 -17
- 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 +36 -39
- 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 +1 -1
- 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 +1 -1
- package/dist/es2019/index.js +4 -1
- 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/{main.js → modal-create/index.js} +8 -14
- package/dist/es2019/ui/{link-create → modal-create}/main.js +19 -19
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/index.js +4 -1
- 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/{main.js → modal-create/index.js} +8 -14
- package/dist/esm/ui/{link-create → modal-create}/main.js +38 -41
- package/dist/types/common/constants.d.ts +2 -0
- package/dist/types/common/ui/Button/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/common/ui/link-create-content/index.d.ts +8 -0
- 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/ui/Button/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/common/ui/link-create-content/index.d.ts +8 -0
- 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/package.json +5 -7
- package/dist/cjs/ui/link-create/index.js +0 -13
- package/dist/es2019/ui/link-create/index.js +0 -1
- package/dist/esm/ui/link-create/index.js +0 -1
- 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/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.d.ts +0 -0
- /package/dist/types/{ui/link-create → common/ui}/error-boundary/index.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/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create → common/ui}/error-boundary/index.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
|
@@ -3,50 +3,40 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/** @jsx jsx */
|
|
6
|
-
import {
|
|
6
|
+
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import { useIntl } from 'react-intl-next';
|
|
9
9
|
import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
10
10
|
import { Box } from '@atlaskit/primitives';
|
|
11
11
|
import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../common/constants';
|
|
12
|
+
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
13
|
+
import { EditModal } from '../../common/ui/edit-modal';
|
|
14
|
+
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
15
|
+
import { LinkCreateContent } from '../../common/ui/link-create-content';
|
|
16
|
+
import { ModalHero } from '../../common/ui/modal-hero';
|
|
12
17
|
import { Modal } from '../../common/ui/ModalDialog';
|
|
13
18
|
import { LinkCreateCallbackProvider } from '../../controllers/callback-context';
|
|
14
|
-
import { EditPostCreateModalProvider } from '../../controllers/edit-post-create-context';
|
|
19
|
+
import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../controllers/edit-post-create-context';
|
|
15
20
|
import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers/exit-warning-modal-context';
|
|
16
21
|
import { FormContextProvider } from '../../controllers/form-context';
|
|
17
|
-
import { LinkCreatePluginsProvider } from '../../controllers/plugin-context';
|
|
18
|
-
import { ConfirmDismissDialog } from './confirm-dismiss-dialog';
|
|
19
|
-
import { EditModal } from './edit-modal';
|
|
20
|
-
import { ErrorBoundary } from './error-boundary';
|
|
22
|
+
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
21
23
|
import { messages } from './messages';
|
|
22
|
-
import { ModalHero } from './modal-hero';
|
|
23
24
|
export var TEST_ID = 'link-create';
|
|
24
25
|
var SCREEN_ID = 'linkCreateScreen';
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onCreate = _ref2.onCreate,
|
|
40
|
-
onFailure = _ref2.onFailure,
|
|
41
|
-
onCancel = _ref2.onCancel,
|
|
42
|
-
onComplete = _ref2.onComplete,
|
|
43
|
-
onOpenComplete = _ref2.onOpenComplete,
|
|
44
|
-
onCloseComplete = _ref2.onCloseComplete,
|
|
45
|
-
_ref2$testId = _ref2.testId,
|
|
46
|
-
testId = _ref2$testId === void 0 ? TEST_ID : _ref2$testId,
|
|
47
|
-
plugins = _ref2.plugins,
|
|
48
|
-
entityKey = _ref2.entityKey,
|
|
49
|
-
modalHero = _ref2.modalHero;
|
|
26
|
+
var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
27
|
+
var active = _ref.active,
|
|
28
|
+
modalTitle = _ref.modalTitle,
|
|
29
|
+
onCreate = _ref.onCreate,
|
|
30
|
+
onFailure = _ref.onFailure,
|
|
31
|
+
onCancel = _ref.onCancel,
|
|
32
|
+
onComplete = _ref.onComplete,
|
|
33
|
+
onOpenComplete = _ref.onOpenComplete,
|
|
34
|
+
onCloseComplete = _ref.onCloseComplete,
|
|
35
|
+
_ref$testId = _ref.testId,
|
|
36
|
+
testId = _ref$testId === void 0 ? TEST_ID : _ref$testId,
|
|
37
|
+
plugins = _ref.plugins,
|
|
38
|
+
entityKey = _ref.entityKey,
|
|
39
|
+
modalHero = _ref.modalHero;
|
|
50
40
|
var intl = useIntl();
|
|
51
41
|
var _useExitWarningModal = useExitWarningModal(),
|
|
52
42
|
getShouldShowWarning = _useExitWarningModal.getShouldShowWarning;
|
|
@@ -54,6 +44,10 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref2) {
|
|
|
54
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
55
45
|
showExitWarning = _useState2[0],
|
|
56
46
|
setShowExitWarning = _useState2[1];
|
|
47
|
+
var _useEditPostCreateMod = useEditPostCreateModal(),
|
|
48
|
+
editViewPayload = _useEditPostCreateMod.editViewPayload;
|
|
49
|
+
var _useLinkCreatePlugins = useLinkCreatePlugins(),
|
|
50
|
+
activePlugin = _useLinkCreatePlugins.activePlugin;
|
|
57
51
|
var handleCancel = useCallback(function () {
|
|
58
52
|
if (getShouldShowWarning() && !showExitWarning) {
|
|
59
53
|
setShowExitWarning(true);
|
|
@@ -85,10 +79,13 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref2) {
|
|
|
85
79
|
entityKey: entityKey
|
|
86
80
|
})))))), onComplete && jsx(EditModal, {
|
|
87
81
|
onCloseComplete: onCloseComplete,
|
|
88
|
-
onClose: onComplete
|
|
82
|
+
onClose: onComplete,
|
|
83
|
+
editViewPayload: editViewPayload,
|
|
84
|
+
activePlugin: activePlugin
|
|
89
85
|
}), jsx(ConfirmDismissDialog, {
|
|
90
86
|
active: showExitWarning,
|
|
91
|
-
onClose: handleCloseExitWarning
|
|
87
|
+
onClose: handleCloseExitWarning,
|
|
88
|
+
onCancel: onCancel
|
|
92
89
|
}));
|
|
93
90
|
};
|
|
94
91
|
var LinkCreateModal = function LinkCreateModal(props) {
|
|
@@ -107,18 +104,18 @@ var LinkCreateModal = function LinkCreateModal(props) {
|
|
|
107
104
|
}, function (pluginsProvider) {
|
|
108
105
|
return jsx(EditPostCreateModalProvider, {
|
|
109
106
|
active: !!props.active
|
|
110
|
-
}, function (
|
|
107
|
+
}, function (_ref2) {
|
|
111
108
|
var _pluginsProvider$acti;
|
|
112
|
-
var setEditViewPayload =
|
|
113
|
-
editViewPayload =
|
|
114
|
-
shouldActivateEditView =
|
|
115
|
-
enableEditView =
|
|
109
|
+
var setEditViewPayload = _ref2.setEditViewPayload,
|
|
110
|
+
editViewPayload = _ref2.editViewPayload,
|
|
111
|
+
shouldActivateEditView = _ref2.shouldActivateEditView,
|
|
112
|
+
enableEditView = _ref2.enableEditView;
|
|
116
113
|
return jsx(FormContextProvider, {
|
|
117
114
|
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
|
|
118
115
|
}, jsx(ExitWarningModalProvider, null, jsx(LinkCreateWithModal, _extends({}, props, {
|
|
119
116
|
active: props.active && !editViewPayload,
|
|
120
117
|
onCreate: ( /*#__PURE__*/function () {
|
|
121
|
-
var
|
|
118
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(payload) {
|
|
122
119
|
var _props$onCreate;
|
|
123
120
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
124
121
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -143,7 +140,7 @@ var LinkCreateModal = function LinkCreateModal(props) {
|
|
|
143
140
|
}, _callee);
|
|
144
141
|
}));
|
|
145
142
|
return function (_x) {
|
|
146
|
-
return
|
|
143
|
+
return _ref3.apply(this, arguments);
|
|
147
144
|
};
|
|
148
145
|
}()),
|
|
149
146
|
onCloseComplete: function onCloseComplete() {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { PackageMetaDataType } from './utils/analytics/analytics.codegen';
|
|
1
2
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
2
3
|
export declare const COMPONENT_NAME = "linkCreate";
|
|
3
4
|
export declare const CREATE_FORM_MAX_WIDTH_IN_PX = "480";
|
|
4
5
|
export declare const CREATE_FORM_MIN_HEIGHT_IN_PX = "200";
|
|
5
6
|
export declare const LINK_CREATE_FORM_POST_CREATE_FIELD = "__post_create__";
|
|
7
|
+
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { type AnalyticsEventAttributes } from '../../../common/utils/analytics/analytics.codegen';
|
|
3
3
|
export declare const Button: React.ForwardRefExoticComponent<Pick<import("@atlaskit/button").ButtonProps & React.RefAttributes<HTMLElement> & {
|
|
4
4
|
actionSubjectId: "create" | "edit" | "cancel" | "confirm";
|
|
5
|
-
}, "key" | keyof import("@atlaskit/button").ButtonProps
|
|
5
|
+
}, "actionSubjectId" | "key" | keyof import("@atlaskit/button").ButtonProps> & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type ConfirmDismissDialogProps = {
|
|
3
|
+
active: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const ConfirmDismissDialog: ({ active, onClose, onCancel, }: ConfirmDismissDialogProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CreatePayload, type LinkCreatePlugin } from '../../types';
|
|
3
|
+
import { Modal } from '../ModalDialog';
|
|
4
|
+
type EditModalProps = {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onCloseComplete?: React.ComponentProps<typeof Modal>['onCloseComplete'];
|
|
7
|
+
editViewPayload?: CreatePayload;
|
|
8
|
+
activePlugin?: LinkCreatePlugin<string> | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const EditModal: ({ onClose, onCloseComplete, editViewPayload, activePlugin, }: EditModalProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { LinkCreatePlugin } from '../../types';
|
|
3
|
+
type LinkCreateContentProps = {
|
|
4
|
+
plugins: LinkCreatePlugin[];
|
|
5
|
+
entityKey: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const LinkCreateContent: ({ plugins, entityKey, }: LinkCreateContentProps) => JSX.Element;
|
|
8
|
+
export {};
|
package/dist/types/ui/index.d.ts
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,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { LinkCreateWithModalProps } from '../../common/types';
|
|
4
|
+
declare const ComposedLinkCreate: import("react").MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
|
|
5
|
+
export default ComposedLinkCreate;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { type LinkCreateWithModalProps } from '../../common/types';
|
|
4
|
+
declare const ComposedLinkCreate: import("react").MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
|
|
5
|
+
export default ComposedLinkCreate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import {
|
|
2
|
+
import type { LinkCreateWithModalProps } from '../../common/types';
|
|
3
3
|
export declare const TEST_ID = "link-create";
|
|
4
4
|
declare const LinkCreateModal: (props: LinkCreateWithModalProps) => jsx.JSX.Element;
|
|
5
5
|
export default LinkCreateModal;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { PackageMetaDataType } from './utils/analytics/analytics.codegen';
|
|
1
2
|
export declare const ANALYTICS_CHANNEL = "media";
|
|
2
3
|
export declare const COMPONENT_NAME = "linkCreate";
|
|
3
4
|
export declare const CREATE_FORM_MAX_WIDTH_IN_PX = "480";
|
|
4
5
|
export declare const CREATE_FORM_MIN_HEIGHT_IN_PX = "200";
|
|
5
6
|
export declare const LINK_CREATE_FORM_POST_CREATE_FIELD = "__post_create__";
|
|
7
|
+
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { type AnalyticsEventAttributes } from '../../../common/utils/analytics/analytics.codegen';
|
|
3
3
|
export declare const Button: React.ForwardRefExoticComponent<Pick<import("@atlaskit/button").ButtonProps & React.RefAttributes<HTMLElement> & {
|
|
4
4
|
actionSubjectId: "create" | "edit" | "cancel" | "confirm";
|
|
5
|
-
}, "key" | keyof import("@atlaskit/button").ButtonProps
|
|
5
|
+
}, "actionSubjectId" | "key" | keyof import("@atlaskit/button").ButtonProps> & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type ConfirmDismissDialogProps = {
|
|
3
|
+
active: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const ConfirmDismissDialog: ({ active, onClose, onCancel, }: ConfirmDismissDialogProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CreatePayload, type LinkCreatePlugin } from '../../types';
|
|
3
|
+
import { Modal } from '../ModalDialog';
|
|
4
|
+
type EditModalProps = {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onCloseComplete?: React.ComponentProps<typeof Modal>['onCloseComplete'];
|
|
7
|
+
editViewPayload?: CreatePayload;
|
|
8
|
+
activePlugin?: LinkCreatePlugin<string> | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const EditModal: ({ onClose, onCloseComplete, editViewPayload, activePlugin, }: EditModalProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { LinkCreatePlugin } from '../../types';
|
|
3
|
+
type LinkCreateContentProps = {
|
|
4
|
+
plugins: LinkCreatePlugin[];
|
|
5
|
+
entityKey: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const LinkCreateContent: ({ plugins, entityKey, }: LinkCreateContentProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -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';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
4
|
-
import { type PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
|
|
5
|
-
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
3
|
+
import type { LinkCreateWithModalProps } from '../../common/types';
|
|
6
4
|
declare const ComposedLinkCreate: import("react").MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
|
|
7
5
|
export default ComposedLinkCreate;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import { type LinkCreateWithModalProps } from '
|
|
4
|
-
import { type PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
|
|
5
|
-
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
3
|
+
import { type LinkCreateWithModalProps } from '../../common/types';
|
|
6
4
|
declare const ComposedLinkCreate: import("react").MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
|
|
7
5
|
export default ComposedLinkCreate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import {
|
|
2
|
+
import type { LinkCreateWithModalProps } from '../../common/types';
|
|
3
3
|
export declare const TEST_ID = "link-create";
|
|
4
4
|
declare const LinkCreateModal: (props: LinkCreateWithModalProps) => jsx.JSX.Element;
|
|
5
5
|
export default LinkCreateModal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-create",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The driver component of meta creation flow",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
42
|
-
"@atlaskit/button": "^17.
|
|
42
|
+
"@atlaskit/button": "^17.17.0",
|
|
43
43
|
"@atlaskit/empty-state": "^7.8.0",
|
|
44
|
-
"@atlaskit/form": "^10.
|
|
44
|
+
"@atlaskit/form": "^10.3.0",
|
|
45
45
|
"@atlaskit/icon": "^22.3.0",
|
|
46
46
|
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
47
47
|
"@atlaskit/linking-common": "^5.7.0",
|
|
48
48
|
"@atlaskit/modal-dialog": "^12.13.0",
|
|
49
|
-
"@atlaskit/primitives": "^6.
|
|
50
|
-
"@atlaskit/select": "^17.
|
|
49
|
+
"@atlaskit/primitives": "^6.4.0",
|
|
50
|
+
"@atlaskit/select": "^17.10.0",
|
|
51
51
|
"@atlaskit/spinner": "^16.1.0",
|
|
52
52
|
"@atlaskit/textfield": "^6.3.0",
|
|
53
53
|
"@atlaskit/tokens": "^1.49.0",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"@af/visual-regression": "*",
|
|
67
67
|
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
68
68
|
"@atlaskit/visual-regression": "*",
|
|
69
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
70
69
|
"@atlassian/feature-flags-test-utils": "*",
|
|
71
70
|
"@testing-library/react": "^12.1.5",
|
|
72
71
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -115,6 +114,5 @@
|
|
|
115
114
|
]
|
|
116
115
|
}
|
|
117
116
|
},
|
|
118
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
|
|
119
117
|
"platform-feature-flags": {}
|
|
120
118
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "default", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _main.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var _main = _interopRequireDefault(require("./main"));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './main';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './main';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Modal } from '../../../common/ui/ModalDialog';
|
|
3
|
-
type EditModalProps = {
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
onCloseComplete?: React.ComponentProps<typeof Modal>['onCloseComplete'];
|
|
6
|
-
};
|
|
7
|
-
export declare const EditModal: ({ onClose, onCloseComplete }: EditModalProps) => JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './main';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Modal } from '../../../common/ui/ModalDialog';
|
|
3
|
-
type EditModalProps = {
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
onCloseComplete?: React.ComponentProps<typeof Modal>['onCloseComplete'];
|
|
6
|
-
};
|
|
7
|
-
export declare const EditModal: ({ onClose, onCloseComplete }: EditModalProps) => JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './main';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/es2019/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types-ts4.5/{ui/link-create → common/ui}/error-boundary/error-boundary-base/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|