@atlaskit/link-create 2.2.0 → 2.3.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#107796](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107796)
8
+ [`15f419051682`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15f419051682) -
9
+ Fire screen viewed analytics event for Inline Create
10
+
11
+ ### Patch Changes
12
+
13
+ - [#107877](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107877)
14
+ [`3f82794369ce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f82794369ce) -
15
+ Internal changes to types. No expected functional changes.
16
+
3
17
  ## 2.2.0
4
18
 
5
19
  ### Minor Changes
@@ -3,15 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.PACKAGE_DATA = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MAX_WIDTH_IN_PX = exports.COMPONENT_NAME = exports.ANALYTICS_CHANNEL = void 0;
6
+ exports.SCREEN_ID = exports.PACKAGE_DATA = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = exports.DEFAULT_TEST_ID = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MAX_WIDTH_IN_PX = exports.COMPONENT_NAME = exports.ANALYTICS_CHANNEL = void 0;
7
7
  var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
8
8
  var COMPONENT_NAME = exports.COMPONENT_NAME = 'linkCreate';
9
+ var SCREEN_ID = exports.SCREEN_ID = 'linkCreateScreen';
10
+ var DEFAULT_TEST_ID = exports.DEFAULT_TEST_ID = 'link-create';
9
11
  var CREATE_FORM_MAX_WIDTH_IN_PX = exports.CREATE_FORM_MAX_WIDTH_IN_PX = '480';
10
12
  var CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
11
13
  var LINK_CREATE_FORM_POST_CREATE_FIELD = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
12
14
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
13
15
  packageName: "@atlaskit/link-create" || '',
14
- packageVersion: "2.2.0" || '',
16
+ packageVersion: "2.3.0" || '',
15
17
  component: COMPONENT_NAME,
16
18
  componentName: COMPONENT_NAME
17
19
  };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.InlineAnalytics = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _analyticsNext = require("@atlaskit/analytics-next");
10
+ var _components = require("../../..//common/utils/analytics/components");
11
+ var InlineAnalytics = exports.InlineAnalytics = function InlineAnalytics(_ref) {
12
+ var screen = _ref.screen,
13
+ children = _ref.children;
14
+ return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
15
+ data: {
16
+ source: screen,
17
+ component: 'inline-create'
18
+ }
19
+ }, /*#__PURE__*/_react.default.createElement(_components.ScreenViewedEvent, {
20
+ screen: screen
21
+ }), children);
22
+ };
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.TEST_ID = void 0;
7
+ exports.default = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
@@ -12,6 +12,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
12
12
  var _react = require("react");
13
13
  var _react2 = require("@emotion/react");
14
14
  var _primitives = require("@atlaskit/primitives");
15
+ var _constants = require("../../common/constants");
15
16
  var _confirmDismissDialog = require("../../common/ui/confirm-dismiss-dialog");
16
17
  var _editModal = require("../../common/ui/edit-modal");
17
18
  var _errorBoundary = require("../../common/ui/error-boundary");
@@ -21,12 +22,9 @@ var _editPostCreateContext = require("../../controllers/edit-post-create-context
21
22
  var _exitWarningModalContext = require("../../controllers/exit-warning-modal-context");
22
23
  var _formContext = require("../../controllers/form-context");
23
24
  var _pluginContext = require("../../controllers/plugin-context");
25
+ var _inlineAnalytics = require("./inline-analytics");
24
26
  /** @jsx jsx */
25
27
 
26
- var TEST_ID = exports.TEST_ID = 'link-create';
27
- // todo: EDM-10075 trigger the screen.viewed_linkCreateScreen event when inline-create is mounted
28
- // const SCREEN_ID = 'linkCreateScreen';
29
-
30
28
  var InlineCreateContent = function InlineCreateContent(_ref) {
31
29
  var onCreate = _ref.onCreate,
32
30
  onFailure = _ref.onFailure,
@@ -34,7 +32,8 @@ var InlineCreateContent = function InlineCreateContent(_ref) {
34
32
  onComplete = _ref.onComplete,
35
33
  plugins = _ref.plugins,
36
34
  entityKey = _ref.entityKey,
37
- testId = _ref.testId;
35
+ _ref$testId = _ref.testId,
36
+ testId = _ref$testId === void 0 ? _constants.DEFAULT_TEST_ID : _ref$testId;
38
37
  var _useExitWarningModal = (0, _exitWarningModalContext.useExitWarningModal)(),
39
38
  getShouldShowWarning = _useExitWarningModal.getShouldShowWarning;
40
39
  var _useState = (0, _react.useState)(false),
@@ -59,12 +58,14 @@ var InlineCreateContent = function InlineCreateContent(_ref) {
59
58
  onCreate: onCreate,
60
59
  onFailure: onFailure,
61
60
  onCancel: handleCancel
62
- }, (0, _react2.jsx)(_errorBoundary.ErrorBoundary, null, (0, _react2.jsx)(_primitives.Box, {
61
+ }, (0, _react2.jsx)(_errorBoundary.ErrorBoundary, null, (0, _react2.jsx)(_inlineAnalytics.InlineAnalytics, {
62
+ screen: _constants.SCREEN_ID
63
+ }, (0, _react2.jsx)(_primitives.Box, {
63
64
  testId: testId
64
65
  }, (0, _react2.jsx)(_linkCreateContent.LinkCreateContent, {
65
66
  plugins: plugins,
66
67
  entityKey: entityKey
67
- }))), onComplete && (0, _react2.jsx)(_editModal.EditModal, {
68
+ })))), onComplete && (0, _react2.jsx)(_editModal.EditModal, {
68
69
  onClose: onComplete,
69
70
  editViewPayload: editViewPayload,
70
71
  activePlugin: activePlugin
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.TEST_ID = void 0;
7
+ exports.default = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
@@ -29,8 +29,6 @@ var _pluginContext = require("../../controllers/plugin-context");
29
29
  var _messages = require("./messages");
30
30
  /** @jsx jsx */
31
31
 
32
- var TEST_ID = exports.TEST_ID = 'link-create';
33
- var SCREEN_ID = 'linkCreateScreen';
34
32
  var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
35
33
  var active = _ref.active,
36
34
  modalTitle = _ref.modalTitle,
@@ -41,7 +39,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
41
39
  onOpenComplete = _ref.onOpenComplete,
42
40
  onCloseComplete = _ref.onCloseComplete,
43
41
  _ref$testId = _ref.testId,
44
- testId = _ref$testId === void 0 ? TEST_ID : _ref$testId,
42
+ testId = _ref$testId === void 0 ? _constants.DEFAULT_TEST_ID : _ref$testId,
45
43
  plugins = _ref.plugins,
46
44
  entityKey = _ref.entityKey,
47
45
  modalHero = _ref.modalHero;
@@ -72,7 +70,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
72
70
  onCancel: handleCancel
73
71
  }, (0, _react2.jsx)(_modalDialog.ModalTransition, null, active && (0, _react2.jsx)(_ModalDialog.Modal, {
74
72
  testId: "link-create-modal",
75
- screen: SCREEN_ID,
73
+ screen: _constants.SCREEN_ID,
76
74
  onClose: handleCancel,
77
75
  shouldScrollInViewport: true,
78
76
  onOpenComplete: onOpenComplete,
@@ -1,11 +1,13 @@
1
1
  export const ANALYTICS_CHANNEL = 'media';
2
2
  export const COMPONENT_NAME = 'linkCreate';
3
+ export const SCREEN_ID = 'linkCreateScreen';
4
+ export const DEFAULT_TEST_ID = 'link-create';
3
5
  export const CREATE_FORM_MAX_WIDTH_IN_PX = '480';
4
6
  export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
5
7
  export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
6
8
  export const PACKAGE_DATA = {
7
9
  packageName: "@atlaskit/link-create" || '',
8
- packageVersion: "2.2.0" || '',
10
+ packageVersion: "2.3.0" || '',
9
11
  component: COMPONENT_NAME,
10
12
  componentName: COMPONENT_NAME
11
13
  };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
3
+ import { ScreenViewedEvent } from '../../..//common/utils/analytics/components';
4
+ export const InlineAnalytics = ({
5
+ screen,
6
+ children
7
+ }) => /*#__PURE__*/React.createElement(AnalyticsContext, {
8
+ data: {
9
+ source: screen,
10
+ component: 'inline-create'
11
+ }
12
+ }, /*#__PURE__*/React.createElement(ScreenViewedEvent, {
13
+ screen: screen
14
+ }), children);
@@ -3,21 +3,17 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import { useCallback, useState } from 'react';
4
4
  import { jsx } from '@emotion/react';
5
5
  import { Box } from '@atlaskit/primitives';
6
+ import { DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
6
7
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
7
8
  import { EditModal } from '../../common/ui/edit-modal';
8
9
  import { ErrorBoundary } from '../../common/ui/error-boundary';
9
10
  import { LinkCreateContent } from '../../common/ui/link-create-content';
10
- import { LinkCreateCallbackProvider
11
- // useLinkCreateCallback,
12
- } from '../../controllers/callback-context';
11
+ import { LinkCreateCallbackProvider } from '../../controllers/callback-context';
13
12
  import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../controllers/edit-post-create-context';
14
13
  import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers/exit-warning-modal-context';
15
14
  import { FormContextProvider } from '../../controllers/form-context';
16
15
  import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
17
- export const TEST_ID = 'link-create';
18
- // todo: EDM-10075 trigger the screen.viewed_linkCreateScreen event when inline-create is mounted
19
- // const SCREEN_ID = 'linkCreateScreen';
20
-
16
+ import { InlineAnalytics } from './inline-analytics';
21
17
  const InlineCreateContent = ({
22
18
  onCreate,
23
19
  onFailure,
@@ -25,7 +21,7 @@ const InlineCreateContent = ({
25
21
  onComplete,
26
22
  plugins,
27
23
  entityKey,
28
- testId
24
+ testId = DEFAULT_TEST_ID
29
25
  }) => {
30
26
  const {
31
27
  getShouldShowWarning
@@ -49,12 +45,14 @@ const InlineCreateContent = ({
49
45
  onCreate: onCreate,
50
46
  onFailure: onFailure,
51
47
  onCancel: handleCancel
52
- }, jsx(ErrorBoundary, null, jsx(Box, {
48
+ }, jsx(ErrorBoundary, null, jsx(InlineAnalytics, {
49
+ screen: SCREEN_ID
50
+ }, jsx(Box, {
53
51
  testId: testId
54
52
  }, jsx(LinkCreateContent, {
55
53
  plugins: plugins,
56
54
  entityKey: entityKey
57
- }))), onComplete && jsx(EditModal, {
55
+ })))), onComplete && jsx(EditModal, {
58
56
  onClose: onComplete,
59
57
  editViewPayload: editViewPayload,
60
58
  activePlugin: activePlugin
@@ -5,7 +5,7 @@ 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
7
  import { Box } from '@atlaskit/primitives';
8
- import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../common/constants';
8
+ import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
9
9
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
10
10
  import { EditModal } from '../../common/ui/edit-modal';
11
11
  import { ErrorBoundary } from '../../common/ui/error-boundary';
@@ -18,8 +18,6 @@ import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers
18
18
  import { FormContextProvider } from '../../controllers/form-context';
19
19
  import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
20
20
  import { messages } from './messages';
21
- export const TEST_ID = 'link-create';
22
- const SCREEN_ID = 'linkCreateScreen';
23
21
  const LinkCreateWithModal = ({
24
22
  active,
25
23
  modalTitle,
@@ -29,7 +27,7 @@ const LinkCreateWithModal = ({
29
27
  onComplete,
30
28
  onOpenComplete,
31
29
  onCloseComplete,
32
- testId = TEST_ID,
30
+ testId = DEFAULT_TEST_ID,
33
31
  plugins,
34
32
  entityKey,
35
33
  modalHero
@@ -1,11 +1,13 @@
1
1
  export var ANALYTICS_CHANNEL = 'media';
2
2
  export var COMPONENT_NAME = 'linkCreate';
3
+ export var SCREEN_ID = 'linkCreateScreen';
4
+ export var DEFAULT_TEST_ID = 'link-create';
3
5
  export var CREATE_FORM_MAX_WIDTH_IN_PX = '480';
4
6
  export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
5
7
  export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
6
8
  export var PACKAGE_DATA = {
7
9
  packageName: "@atlaskit/link-create" || '',
8
- packageVersion: "2.2.0" || '',
10
+ packageVersion: "2.3.0" || '',
9
11
  component: COMPONENT_NAME,
10
12
  componentName: COMPONENT_NAME
11
13
  };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
3
+ import { ScreenViewedEvent } from '../../..//common/utils/analytics/components';
4
+ export var InlineAnalytics = function InlineAnalytics(_ref) {
5
+ var screen = _ref.screen,
6
+ children = _ref.children;
7
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
8
+ data: {
9
+ source: screen,
10
+ component: 'inline-create'
11
+ }
12
+ }, /*#__PURE__*/React.createElement(ScreenViewedEvent, {
13
+ screen: screen
14
+ }), children);
15
+ };
@@ -6,21 +6,17 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import { useCallback, useState } from 'react';
7
7
  import { jsx } from '@emotion/react';
8
8
  import { Box } from '@atlaskit/primitives';
9
+ import { DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
9
10
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
10
11
  import { EditModal } from '../../common/ui/edit-modal';
11
12
  import { ErrorBoundary } from '../../common/ui/error-boundary';
12
13
  import { LinkCreateContent } from '../../common/ui/link-create-content';
13
- import { LinkCreateCallbackProvider
14
- // useLinkCreateCallback,
15
- } from '../../controllers/callback-context';
14
+ import { LinkCreateCallbackProvider } from '../../controllers/callback-context';
16
15
  import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../controllers/edit-post-create-context';
17
16
  import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers/exit-warning-modal-context';
18
17
  import { FormContextProvider } from '../../controllers/form-context';
19
18
  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
-
19
+ import { InlineAnalytics } from './inline-analytics';
24
20
  var InlineCreateContent = function InlineCreateContent(_ref) {
25
21
  var onCreate = _ref.onCreate,
26
22
  onFailure = _ref.onFailure,
@@ -28,7 +24,8 @@ var InlineCreateContent = function InlineCreateContent(_ref) {
28
24
  onComplete = _ref.onComplete,
29
25
  plugins = _ref.plugins,
30
26
  entityKey = _ref.entityKey,
31
- testId = _ref.testId;
27
+ _ref$testId = _ref.testId,
28
+ testId = _ref$testId === void 0 ? DEFAULT_TEST_ID : _ref$testId;
32
29
  var _useExitWarningModal = useExitWarningModal(),
33
30
  getShouldShowWarning = _useExitWarningModal.getShouldShowWarning;
34
31
  var _useState = useState(false),
@@ -53,12 +50,14 @@ var InlineCreateContent = function InlineCreateContent(_ref) {
53
50
  onCreate: onCreate,
54
51
  onFailure: onFailure,
55
52
  onCancel: handleCancel
56
- }, jsx(ErrorBoundary, null, jsx(Box, {
53
+ }, jsx(ErrorBoundary, null, jsx(InlineAnalytics, {
54
+ screen: SCREEN_ID
55
+ }, jsx(Box, {
57
56
  testId: testId
58
57
  }, jsx(LinkCreateContent, {
59
58
  plugins: plugins,
60
59
  entityKey: entityKey
61
- }))), onComplete && jsx(EditModal, {
60
+ })))), onComplete && jsx(EditModal, {
62
61
  onClose: onComplete,
63
62
  editViewPayload: editViewPayload,
64
63
  activePlugin: activePlugin
@@ -8,7 +8,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
- import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../common/constants';
11
+ import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
12
12
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
13
13
  import { EditModal } from '../../common/ui/edit-modal';
14
14
  import { ErrorBoundary } from '../../common/ui/error-boundary';
@@ -21,8 +21,6 @@ import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers
21
21
  import { FormContextProvider } from '../../controllers/form-context';
22
22
  import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
23
23
  import { messages } from './messages';
24
- export var TEST_ID = 'link-create';
25
- var SCREEN_ID = 'linkCreateScreen';
26
24
  var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
27
25
  var active = _ref.active,
28
26
  modalTitle = _ref.modalTitle,
@@ -33,7 +31,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
33
31
  onOpenComplete = _ref.onOpenComplete,
34
32
  onCloseComplete = _ref.onCloseComplete,
35
33
  _ref$testId = _ref.testId,
36
- testId = _ref$testId === void 0 ? TEST_ID : _ref$testId,
34
+ testId = _ref$testId === void 0 ? DEFAULT_TEST_ID : _ref$testId,
37
35
  plugins = _ref.plugins,
38
36
  entityKey = _ref.entityKey,
39
37
  modalHero = _ref.modalHero;
@@ -1,6 +1,8 @@
1
1
  import type { PackageMetaDataType } from './utils/analytics/analytics.codegen';
2
2
  export declare const ANALYTICS_CHANNEL = "media";
3
3
  export declare const COMPONENT_NAME = "linkCreate";
4
+ export declare const SCREEN_ID = "linkCreateScreen";
5
+ export declare const DEFAULT_TEST_ID = "link-create";
4
6
  export declare const CREATE_FORM_MAX_WIDTH_IN_PX = "480";
5
7
  export declare const CREATE_FORM_MIN_HEIGHT_IN_PX = "200";
6
8
  export declare const LINK_CREATE_FORM_POST_CREATE_FIELD = "__post_create__";
@@ -7,5 +7,5 @@ type ErrorBoundaryModalProps = {
7
7
  active?: boolean;
8
8
  onClose?: () => void;
9
9
  };
10
- export declare const ErrorBoundaryModal: React.FC<ErrorBoundaryModalProps>;
10
+ export declare const ErrorBoundaryModal: ({ active, onClose }: ErrorBoundaryModalProps) => JSX.Element;
11
11
  export {};
@@ -0,0 +1,9 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { AnalyticsEventAttributes } from '../../../common/utils/analytics/analytics.codegen';
3
+ type InlineAnalyticsProps = {
4
+ screen: keyof {
5
+ [Key in keyof AnalyticsEventAttributes as Key extends `screen.${infer ScreenName}.viewed` ? ScreenName : never]: any;
6
+ };
7
+ };
8
+ export declare const InlineAnalytics: ({ screen, children }: PropsWithChildren<InlineAnalyticsProps>) => JSX.Element;
9
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { LinkCreateProps } from '../../common/types';
3
- export declare const TEST_ID = "link-create";
4
3
  declare const InlineCreate: (props: LinkCreateProps) => jsx.JSX.Element;
5
4
  export default InlineCreate;
@@ -1,5 +1,4 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { LinkCreateWithModalProps } from '../../common/types';
3
- export declare const TEST_ID = "link-create";
4
3
  declare const LinkCreateModal: (props: LinkCreateWithModalProps) => jsx.JSX.Element;
5
4
  export default LinkCreateModal;
@@ -1,6 +1,8 @@
1
1
  import type { PackageMetaDataType } from './utils/analytics/analytics.codegen';
2
2
  export declare const ANALYTICS_CHANNEL = "media";
3
3
  export declare const COMPONENT_NAME = "linkCreate";
4
+ export declare const SCREEN_ID = "linkCreateScreen";
5
+ export declare const DEFAULT_TEST_ID = "link-create";
4
6
  export declare const CREATE_FORM_MAX_WIDTH_IN_PX = "480";
5
7
  export declare const CREATE_FORM_MIN_HEIGHT_IN_PX = "200";
6
8
  export declare const LINK_CREATE_FORM_POST_CREATE_FIELD = "__post_create__";
@@ -7,5 +7,5 @@ type ErrorBoundaryModalProps = {
7
7
  active?: boolean;
8
8
  onClose?: () => void;
9
9
  };
10
- export declare const ErrorBoundaryModal: React.FC<ErrorBoundaryModalProps>;
10
+ export declare const ErrorBoundaryModal: ({ active, onClose }: ErrorBoundaryModalProps) => JSX.Element;
11
11
  export {};
@@ -0,0 +1,9 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { AnalyticsEventAttributes } from '../../../common/utils/analytics/analytics.codegen';
3
+ type InlineAnalyticsProps = {
4
+ screen: keyof {
5
+ [Key in keyof AnalyticsEventAttributes as Key extends `screen.${infer ScreenName}.viewed` ? ScreenName : never]: any;
6
+ };
7
+ };
8
+ export declare const InlineAnalytics: ({ screen, children }: PropsWithChildren<InlineAnalyticsProps>) => JSX.Element;
9
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { LinkCreateProps } from '../../common/types';
3
- export declare const TEST_ID = "link-create";
4
3
  declare const InlineCreate: (props: LinkCreateProps) => jsx.JSX.Element;
5
4
  export default InlineCreate;
@@ -1,5 +1,4 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { LinkCreateWithModalProps } from '../../common/types';
3
- export declare const TEST_ID = "link-create";
4
3
  declare const LinkCreateModal: (props: LinkCreateWithModalProps) => jsx.JSX.Element;
5
4
  export default LinkCreateModal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",