@atlaskit/link-create 5.3.3 → 6.0.1

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/async-select/package.json +1 -8
  3. package/callback-context/package.json +1 -8
  4. package/create-field/package.json +1 -8
  5. package/create-form/package.json +1 -8
  6. package/dist/cjs/common/constants.js +1 -1
  7. package/dist/es2019/common/constants.js +1 -1
  8. package/dist/esm/common/constants.js +1 -1
  9. package/dist/types/entry-points/callback-context.d.ts +1 -1
  10. package/dist/types/index.d.ts +1 -1
  11. package/exit-warning-modal/package.json +1 -8
  12. package/final-form/package.json +1 -8
  13. package/form-loader/package.json +1 -8
  14. package/form-spy/package.json +1 -8
  15. package/icons/package.json +1 -8
  16. package/inline-create/package.json +1 -8
  17. package/modal-create/package.json +1 -8
  18. package/package.json +27 -35
  19. package/select/package.json +1 -8
  20. package/text-field/package.json +1 -8
  21. package/types/package.json +1 -8
  22. package/user-picker/package.json +1 -8
  23. package/dist/types-ts4.5/common/constants.d.ts +0 -12
  24. package/dist/types-ts4.5/common/messages.d.ts +0 -7
  25. package/dist/types-ts4.5/common/types.d.ts +0 -152
  26. package/dist/types-ts4.5/common/ui/Button/index.d.ts +0 -10
  27. package/dist/types-ts4.5/common/ui/ModalDialog/index.d.ts +0 -13
  28. package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/main.d.ts +0 -7
  29. package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/messages.d.ts +0 -7
  30. package/dist/types-ts4.5/common/ui/edit-modal/index.d.ts +0 -11
  31. package/dist/types-ts4.5/common/ui/error-boundary/error-boundary-base/index.d.ts +0 -18
  32. package/dist/types-ts4.5/common/ui/error-boundary/index.d.ts +0 -6
  33. package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +0 -10
  34. package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/index.d.ts +0 -2
  35. package/dist/types-ts4.5/common/ui/error-boundary-ui/index.d.ts +0 -4
  36. package/dist/types-ts4.5/common/ui/error-boundary-ui/messages.d.ts +0 -7
  37. package/dist/types-ts4.5/common/ui/experience-tracker/index.d.ts +0 -22
  38. package/dist/types-ts4.5/common/ui/icon/index.d.ts +0 -13
  39. package/dist/types-ts4.5/common/ui/icon/messages.d.ts +0 -12
  40. package/dist/types-ts4.5/common/ui/link-create-content/index.d.ts +0 -8
  41. package/dist/types-ts4.5/common/ui/message/index.d.ts +0 -14
  42. package/dist/types-ts4.5/common/ui/modal-hero/index.d.ts +0 -6
  43. package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +0 -75
  44. package/dist/types-ts4.5/common/utils/analytics/components.d.ts +0 -7
  45. package/dist/types-ts4.5/common/utils/analytics/context.d.ts +0 -29
  46. package/dist/types-ts4.5/common/utils/errors/index.d.ts +0 -10
  47. package/dist/types-ts4.5/common/utils/form/index.d.ts +0 -7
  48. package/dist/types-ts4.5/common/utils/locale/fetch-messages-for-locale.d.ts +0 -2
  49. package/dist/types-ts4.5/controllers/callback-context/main.d.ts +0 -19
  50. package/dist/types-ts4.5/controllers/create-field/main.d.ts +0 -6
  51. package/dist/types-ts4.5/controllers/create-field/types.d.ts +0 -28
  52. package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +0 -32
  53. package/dist/types-ts4.5/controllers/exit-warning-modal-context/index.d.ts +0 -14
  54. package/dist/types-ts4.5/controllers/form-context/main.d.ts +0 -19
  55. package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +0 -21
  56. package/dist/types-ts4.5/entry-points/async-select.d.ts +0 -1
  57. package/dist/types-ts4.5/entry-points/callback-context.d.ts +0 -1
  58. package/dist/types-ts4.5/entry-points/create-field.d.ts +0 -1
  59. package/dist/types-ts4.5/entry-points/create-form.d.ts +0 -2
  60. package/dist/types-ts4.5/entry-points/exit-warning-modal.d.ts +0 -1
  61. package/dist/types-ts4.5/entry-points/final-form.d.ts +0 -1
  62. package/dist/types-ts4.5/entry-points/form-loader.d.ts +0 -1
  63. package/dist/types-ts4.5/entry-points/form-spy.d.ts +0 -1
  64. package/dist/types-ts4.5/entry-points/icons.d.ts +0 -1
  65. package/dist/types-ts4.5/entry-points/inline-create.d.ts +0 -1
  66. package/dist/types-ts4.5/entry-points/modal-create.d.ts +0 -1
  67. package/dist/types-ts4.5/entry-points/select.d.ts +0 -2
  68. package/dist/types-ts4.5/entry-points/text-field.d.ts +0 -1
  69. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  70. package/dist/types-ts4.5/entry-points/user-picker.d.ts +0 -1
  71. package/dist/types-ts4.5/i18n/cs.d.ts +0 -23
  72. package/dist/types-ts4.5/i18n/da.d.ts +0 -23
  73. package/dist/types-ts4.5/i18n/de.d.ts +0 -23
  74. package/dist/types-ts4.5/i18n/en.d.ts +0 -23
  75. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -23
  76. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -23
  77. package/dist/types-ts4.5/i18n/es.d.ts +0 -23
  78. package/dist/types-ts4.5/i18n/fi.d.ts +0 -23
  79. package/dist/types-ts4.5/i18n/fr.d.ts +0 -23
  80. package/dist/types-ts4.5/i18n/hr.d.ts +0 -23
  81. package/dist/types-ts4.5/i18n/hu.d.ts +0 -23
  82. package/dist/types-ts4.5/i18n/it.d.ts +0 -23
  83. package/dist/types-ts4.5/i18n/ja.d.ts +0 -23
  84. package/dist/types-ts4.5/i18n/ko.d.ts +0 -23
  85. package/dist/types-ts4.5/i18n/nb.d.ts +0 -23
  86. package/dist/types-ts4.5/i18n/nl.d.ts +0 -23
  87. package/dist/types-ts4.5/i18n/pl.d.ts +0 -23
  88. package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -23
  89. package/dist/types-ts4.5/i18n/ru.d.ts +0 -23
  90. package/dist/types-ts4.5/i18n/sk.d.ts +0 -23
  91. package/dist/types-ts4.5/i18n/sl.d.ts +0 -23
  92. package/dist/types-ts4.5/i18n/sr_RS.d.ts +0 -23
  93. package/dist/types-ts4.5/i18n/sr_YR.d.ts +0 -23
  94. package/dist/types-ts4.5/i18n/sv.d.ts +0 -23
  95. package/dist/types-ts4.5/i18n/th.d.ts +0 -23
  96. package/dist/types-ts4.5/i18n/tr.d.ts +0 -23
  97. package/dist/types-ts4.5/i18n/uk.d.ts +0 -23
  98. package/dist/types-ts4.5/i18n/vi.d.ts +0 -23
  99. package/dist/types-ts4.5/i18n/zh.d.ts +0 -23
  100. package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -23
  101. package/dist/types-ts4.5/index.d.ts +0 -35
  102. package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +0 -10
  103. package/dist/types-ts4.5/ui/create-form/async-select/types.d.ts +0 -23
  104. package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/index.d.ts +0 -2
  105. package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/messages.d.ts +0 -7
  106. package/dist/types-ts4.5/ui/create-form/form-footer/main.d.ts +0 -11
  107. package/dist/types-ts4.5/ui/create-form/form-footer/messages.d.ts +0 -12
  108. package/dist/types-ts4.5/ui/create-form/form-footer/submit-button/index.d.ts +0 -2
  109. package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +0 -6
  110. package/dist/types-ts4.5/ui/create-form/form-spy/index.d.ts +0 -12
  111. package/dist/types-ts4.5/ui/create-form/main.d.ts +0 -55
  112. package/dist/types-ts4.5/ui/create-form/select/main.d.ts +0 -19
  113. package/dist/types-ts4.5/ui/create-form/select/messages.d.ts +0 -7
  114. package/dist/types-ts4.5/ui/create-form/select/types.d.ts +0 -27
  115. package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +0 -9
  116. package/dist/types-ts4.5/ui/create-form/textfield/types.d.ts +0 -14
  117. package/dist/types-ts4.5/ui/create-form/types.d.ts +0 -6
  118. package/dist/types-ts4.5/ui/create-form/user-picker/main.d.ts +0 -6
  119. package/dist/types-ts4.5/ui/create-form/user-picker/types.d.ts +0 -23
  120. package/dist/types-ts4.5/ui/create-form/utils/index.d.ts +0 -13
  121. package/dist/types-ts4.5/ui/inline-create/index.d.ts +0 -4
  122. package/dist/types-ts4.5/ui/inline-create/inline-analytics/index.d.ts +0 -9
  123. package/dist/types-ts4.5/ui/inline-create/main.d.ts +0 -4
  124. package/dist/types-ts4.5/ui/modal-create/index.d.ts +0 -4
  125. package/dist/types-ts4.5/ui/modal-create/main.d.ts +0 -4
  126. package/dist/types-ts4.5/ui/modal-create/messages.d.ts +0 -7
@@ -1,6 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react';
2
- type ErrorBoundaryProps = PropsWithChildren<{
3
- errorComponent?: JSX.Element;
4
- }>;
5
- export declare const ErrorBoundary: ({ children, errorComponent, }: ErrorBoundaryProps) => React.JSX.Element;
6
- export {};
@@ -1,10 +0,0 @@
1
- /**
2
- * ErrorBoundaryModal props are the same as those passed to LinkCreate, which
3
- * are used to control its active state
4
- */
5
- type ErrorBoundaryModalProps = {
6
- active?: boolean;
7
- onClose?: () => void;
8
- };
9
- export declare const ErrorBoundaryModal: ({ active, onClose }: ErrorBoundaryModalProps) => JSX.Element;
10
- export {};
@@ -1,2 +0,0 @@
1
- declare const ErrorSVG: () => JSX.Element;
2
- export default ErrorSVG;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const CONTACT_SUPPORT_LINK = "https://support.atlassian.com/contact/";
3
- export declare const CONTACT_SUPPORT_LINK_FEDRAMP = "https://gcs.atlassian-us-gov-mod.net/servicedesk/customer/portals";
4
- export declare const ErrorBoundaryUI: () => React.JSX.Element;
@@ -1,7 +0,0 @@
1
- type MessageKeys = 'description';
2
- declare const message: Record<MessageKeys, {
3
- id: string;
4
- defaultMessage: string;
5
- description?: string;
6
- }>;
7
- export default message;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- export type ExperienceProps = {
3
- children: React.ReactNode;
4
- };
5
- type ExperienceContextValue = {
6
- /**
7
- * Mark the experience as successful.
8
- */
9
- success: () => void;
10
- /**
11
- * Mark the experience as failed.
12
- * Sends an analytics event to track experience as failed.
13
- */
14
- failure: (error: unknown) => void;
15
- };
16
- /**
17
- * Experience provider that simply keeps track of the state of the experience.
18
- * Fires an operational event when experience state changes to FAILED.
19
- */
20
- export declare const Experience: ({ children }: ExperienceProps) => React.JSX.Element;
21
- export declare const useExperience: () => ExperienceContextValue;
22
- export {};
@@ -1,13 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
- type UrlIconProps = {
7
- url?: string;
8
- children?: React.ReactNode;
9
- };
10
- export declare const UrlIcon: ({ url, children }: UrlIconProps) => JSX.Element;
11
- export declare const PageIcon: () => JSX.Element;
12
- export declare const LiveDocIcon: () => JSX.Element;
13
- export {};
@@ -1,12 +0,0 @@
1
- export declare const iconLabelMessages: {
2
- pageIconLabel: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- liveDocIconLabel: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- };
@@ -1,8 +0,0 @@
1
- import React from '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) => React.JSX.Element;
8
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- type MessageAppearance = 'default' | 'error' | 'valid';
7
- type MessageProps = {
8
- id?: string;
9
- appearance?: MessageAppearance;
10
- testId?: string;
11
- children: ReactNode;
12
- };
13
- export declare const Message: ({ children, appearance, id, testId, }: MessageProps) => JSX.Element;
14
- export {};
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- type ModalHeroProps = {
3
- hero?: React.ReactNode;
4
- };
5
- export declare const ModalHero: ({ hero }: ModalHeroProps) => React.JSX.Element | null;
6
- export {};
@@ -1,75 +0,0 @@
1
- /**
2
- * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- *
4
- * Generates Typescript types for analytics events from analytics.spec.yaml
5
- *
6
- * @codegen <<SignedSource::af3c25c127bdcca927adcfc972a0d6cb>>
7
- * @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
8
- */
9
- export type PackageMetaDataType = {
10
- packageName: string;
11
- packageVersion: string;
12
- component: 'linkCreate';
13
- componentName: 'linkCreate';
14
- };
15
- export type LinkCreateAnalyticsContextType = {
16
- triggeredFrom: string;
17
- objectName: string;
18
- appearance: 'modal' | 'popup';
19
- };
20
- export type LinkCreateScreenViewedAttributesType = {};
21
- export type LinkCreateEditScreenViewedAttributesType = {};
22
- export type LinkCreateExitWarningScreenViewedAttributesType = {};
23
- export type ButtonClickedCreateAttributesType = {};
24
- export type ButtonClickedEditAttributesType = {};
25
- export type ButtonClickedCancelAttributesType = {};
26
- export type ButtonClickedConfirmAttributesType = {};
27
- export type ModalDialogClosedLinkCreateAttributesType = {};
28
- export type ModalDialogOpenedLinkCreateAttributesType = {};
29
- export type LinkCreateUnhandledErrorCaughtAttributesType = {
30
- browserInfo: string;
31
- error: string;
32
- componentStack?: string | null;
33
- };
34
- export type ObjectCreatedLinkCreateAttributesType = {
35
- objectId: string;
36
- objectType: string;
37
- };
38
- export type ObjectCreateFailedLinkCreateAttributesType = {
39
- failureType: string;
40
- };
41
- export type LinkCreateExperienceFailedAttributesType = {
42
- errorType?: string | null;
43
- errorMessage?: string | null;
44
- experienceStatus: 'SUCCEEDED' | 'FAILED';
45
- previousExperienceStatus: 'STARTED' | 'SUCCEEDED' | 'FAILED';
46
- path?: string | null;
47
- status?: number | null;
48
- traceId?: string | null;
49
- isSLOFailure: boolean;
50
- };
51
- export type AnalyticsEventAttributes = {
52
- 'screen.linkCreateScreen.viewed': LinkCreateScreenViewedAttributesType;
53
- 'screen.linkCreateEditScreen.viewed': LinkCreateEditScreenViewedAttributesType;
54
- 'screen.linkCreateExitWarningScreen.viewed': LinkCreateExitWarningScreenViewedAttributesType;
55
- 'ui.button.clicked.create': ButtonClickedCreateAttributesType;
56
- 'ui.button.clicked.edit': ButtonClickedEditAttributesType;
57
- 'ui.button.clicked.cancel': ButtonClickedCancelAttributesType;
58
- 'ui.button.clicked.confirm': ButtonClickedConfirmAttributesType;
59
- 'ui.modalDialog.closed.linkCreate': ModalDialogClosedLinkCreateAttributesType;
60
- 'ui.modalDialog.opened.linkCreate': ModalDialogOpenedLinkCreateAttributesType;
61
- 'operational.linkCreate.unhandledErrorCaught': LinkCreateUnhandledErrorCaughtAttributesType;
62
- 'track.object.created.linkCreate': ObjectCreatedLinkCreateAttributesType;
63
- 'track.object.createFailed.linkCreate': ObjectCreateFailedLinkCreateAttributesType;
64
- 'operational.linkCreateExperience.failed': LinkCreateExperienceFailedAttributesType;
65
- };
66
- type CreateEventPayloadResult<K extends keyof AnalyticsEventAttributes> = {
67
- eventType: string;
68
- action: string;
69
- attributes: AnalyticsEventAttributes[K];
70
- name?: string;
71
- actionSubject?: string;
72
- actionSubjectId?: string;
73
- };
74
- declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): CreateEventPayloadResult<K>;
75
- export default createEventPayload;
@@ -1,7 +0,0 @@
1
- import { type AnalyticsEventAttributes } from './analytics.codegen';
2
- export type ScreenViewedEventProps = {
3
- screen: keyof {
4
- [Key in keyof AnalyticsEventAttributes as Key extends `screen.${infer ScreenName}.viewed` ? ScreenName : never]: any;
5
- };
6
- };
7
- export declare const ScreenViewedEvent: ({ screen }: ScreenViewedEventProps) => null;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { type LinkCreateProps } from '../../types';
3
- import { type LinkCreateAnalyticsContextType } from './analytics.codegen';
4
- export type TrackAttribute = <K extends keyof LinkCreateAnalyticsContextType>(attribute: K, value: LinkCreateAnalyticsContextType[K]) => void;
5
- interface AnalyticsContextType {
6
- /**
7
- * Update a single attribute in the analytics context
8
- */
9
- trackAttribute: TrackAttribute;
10
- /**
11
- * Update a set of attributes in the analytics context
12
- */
13
- trackAttributes: (attributes: Partial<LinkCreateAnalyticsContextType>) => void;
14
- /**
15
- * Retrieve the current set of attributes
16
- * Can be used by components to derive/compute new attributes for specific events
17
- */
18
- getAttributes: () => LinkCreateAnalyticsContextType;
19
- }
20
- /**
21
- * Hook that exposes the context-level attribute getters and setters.
22
- */
23
- export declare const useLinkCreateAnalytics: () => AnalyticsContextType;
24
- /**
25
- * Wraps a component with the analytics context + listener to update events with contextual-level attributes.
26
- * Should be implemented once at the root of the link create.
27
- */
28
- export declare function withLinkCreateAnalyticsContext<P extends Pick<LinkCreateProps, 'groupKey' | 'entityKey' | 'triggeredFrom'>>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
29
- export {};
@@ -1,10 +0,0 @@
1
- export declare const getNetworkFields: (error: unknown) => {
2
- traceId: string | null;
3
- status: number;
4
- path: string;
5
- } | {
6
- traceId: null;
7
- status: null;
8
- path: null;
9
- };
10
- export declare const getErrorType: (error: unknown) => string;
@@ -1,7 +0,0 @@
1
- import { type FieldMetaState } from 'react-final-form';
2
- /**
3
- * This function checks if there have been changes since last submit
4
- * to let a Field know if it should hide the error message until
5
- * the next submit, or if it returns to the previous error state
6
- */
7
- export declare const shouldShowValidationErrors: (meta: FieldMetaState<any>) => boolean;
@@ -1,2 +0,0 @@
1
- import { type I18NMessages } from '@atlaskit/intl-messages-provider';
2
- export declare const fetchMessagesForLocale: (locale: string) => Promise<I18NMessages | undefined>;
@@ -1,19 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react';
2
- import { type CreatePayload } from '../../common/types';
3
- interface LinkCreateCallbackProviderProps {
4
- /**
5
- * This callback for when the resource has been successfully created.
6
- */
7
- onCreate?: (result: CreatePayload) => Promise<void> | void;
8
- /**
9
- * This callback for any errors
10
- */
11
- onFailure?: (error: unknown) => void;
12
- /**
13
- * This callback for when the form was manually discarded by user
14
- */
15
- onCancel?: () => void;
16
- }
17
- declare const LinkCreateCallbackProvider: ({ children, onCreate, onFailure, onCancel, }: PropsWithChildren<LinkCreateCallbackProviderProps>) => React.JSX.Element;
18
- declare const useLinkCreateCallback: () => LinkCreateCallbackProviderProps;
19
- export { LinkCreateCallbackProvider, useLinkCreateCallback };
@@ -1,6 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type CreateFieldProps } from './types';
6
- export declare const CreateField: ({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps) => JSX.Element;
@@ -1,28 +0,0 @@
1
- import { type FieldInputProps } from 'react-final-form';
2
- import { type Validator } from '../../common/types';
3
- type FieldProps = FieldInputProps<any, HTMLElement> & {
4
- fieldId: string;
5
- isInvalid: boolean;
6
- isRequired?: boolean;
7
- /** ID to reference an error message for the field */
8
- 'aria-errormessage'?: string;
9
- /** ID to refer to description for field */
10
- 'aria-describedby'?: string;
11
- };
12
- export type CreateFieldProps = {
13
- id?: string;
14
- /** Name passed to the <Field>.*/
15
- name: string;
16
- label?: string;
17
- /**
18
- * Optional text below the textfield explaining any requirements for a valid value.
19
- * eg. "Must be 4 or more letters"
20
- */
21
- validationHelpText?: string;
22
- /** Validators for this field */
23
- validators?: Validator[];
24
- isRequired?: boolean;
25
- testId: string;
26
- children: (fieldProps: FieldProps) => React.ReactNode;
27
- };
28
- export {};
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { type CreatePayload } from '../../common/types';
3
- type EditPostCreateModalContextValue = {
4
- /**
5
- * The created object that is current being editted in the post-create flow
6
- */
7
- editViewPayload?: CreatePayload | undefined;
8
- /**
9
- * Sets the object to be editted in the post-create edit flow
10
- */
11
- setEditViewPayload: (payload?: CreatePayload) => void;
12
- /**
13
- * Callback to tell link create to trigger post-create edit flow after
14
- * an object is created
15
- */
16
- enableEditView: (enable: boolean) => void;
17
- /**
18
- * Returns whether or not the edit view should be activated on next object creation
19
- */
20
- shouldActivateEditView: () => boolean;
21
- };
22
- type EditPostCreateModalProviderProps = {
23
- /**
24
- * The value of the top-level link create props that indicates control
25
- * of whether the experience should be currently active
26
- */
27
- active: boolean;
28
- children: React.ReactNode | ((value: EditPostCreateModalContextValue) => React.ReactNode);
29
- };
30
- export declare const EditPostCreateModalProvider: ({ active, children, }: EditPostCreateModalProviderProps) => React.JSX.Element;
31
- export declare const useEditPostCreateModal: () => EditPostCreateModalContextValue;
32
- export {};
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- type ExitWarningModalContextValue = {
3
- getShouldShowWarning: () => boolean;
4
- setShouldShowWarning: (show: boolean) => void;
5
- showExitWarning: boolean;
6
- setShowExitWarning: React.Dispatch<React.SetStateAction<boolean>>;
7
- withExitWarning: (callback?: () => void) => () => boolean;
8
- };
9
- export declare const ExitWarningModalProvider: ({ children, }: {
10
- children: React.ReactNode;
11
- }) => React.JSX.Element;
12
- export declare const useExitWarningModal: () => ExitWarningModalContextValue;
13
- export declare const useWithExitWarning: () => ((callback?: () => void) => () => boolean);
14
- export {};
@@ -1,19 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react';
2
- import { type LinkCreateProps } from '../../common/types';
3
- interface FormContextType {
4
- setFormErrorMessage: (errorMessage?: string) => void;
5
- formErrorMessage?: string;
6
- /**
7
- * Callback that updates link create to tell it that it should/should not open the current plugins
8
- * edit view after creation. Should be `undefined` if the plugin does not provide an edit view, or if `onComplete`
9
- * is not defined as a prop at the `LinkCreate` props level
10
- */
11
- enableEditView?: ((editButtonClicked: boolean) => void) | undefined;
12
- }
13
- export declare const FormContext: React.Context<FormContextType>;
14
- declare const FormContextProvider: ({ enableEditView, children, }: PropsWithChildren<{
15
- enableEditView?: (editButtonClicked: boolean) => void;
16
- }>) => React.JSX.Element;
17
- declare const useFormContext: () => FormContextType;
18
- export { FormContextProvider, useFormContext };
19
- export declare const withLinkCreateFormContext: <P extends LinkCreateProps>(WrappedComponent: React.ComponentType<P>) => (props: P) => React.JSX.Element;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { type LinkCreatePlugin } from '../../common/types';
3
- type LinkCreatePluginsContextValue = {
4
- activePlugin: LinkCreatePlugin | null;
5
- } | null;
6
- type LinkCreatePluginsProviderProps = {
7
- /**
8
- * The list of plugins provided as a prop to Link Create component
9
- */
10
- plugins: LinkCreatePlugin[];
11
- /**
12
- * The entity key as provided as prop to link create which controls the initially active plugin
13
- */
14
- entityKey: string;
15
- children: React.ReactNode | ((value: LinkCreatePluginsContextValue) => React.ReactNode);
16
- };
17
- export declare const LinkCreatePluginsProvider: ({ plugins, entityKey: propEntityKey, children, }: LinkCreatePluginsProviderProps) => React.JSX.Element;
18
- export declare const useLinkCreatePlugins: () => {
19
- activePlugin: LinkCreatePlugin | null;
20
- };
21
- export {};
@@ -1 +0,0 @@
1
- export { AsyncSelect } from '../ui/create-form/async-select/main';
@@ -1 +0,0 @@
1
- export { LinkCreateCallbackProvider, useLinkCreateCallback } from '../controllers/callback-context/main';
@@ -1 +0,0 @@
1
- export { CreateField } from '../controllers/create-field/main';
@@ -1,2 +0,0 @@
1
- export { CreateForm } from '../ui/create-form/main';
2
- export type { CreateFormProps } from '../ui/create-form/main';
@@ -1 +0,0 @@
1
- export { ExitWarningModalProvider as LinkCreateExitWarningProvider, useWithExitWarning, } from '../controllers/exit-warning-modal-context';
@@ -1 +0,0 @@
1
- export { FORM_ERROR } from 'final-form';
@@ -1 +0,0 @@
1
- export { CreateFormLoader } from '../ui/create-form/form-loader/main';
@@ -1 +0,0 @@
1
- export { FormSpy } from '../ui/create-form/form-spy';
@@ -1 +0,0 @@
1
- export { PageIcon, UrlIcon, LiveDocIcon } from '../common/ui/icon';
@@ -1 +0,0 @@
1
- export { default as InlineCreate } from '../ui/inline-create';
@@ -1 +0,0 @@
1
- export { default } from '../ui/modal-create';
@@ -1,2 +0,0 @@
1
- export { Select, SiteSelect } from '../ui/create-form/select/main';
2
- export type { SitePickerOptionType } from '../ui/create-form/select/types';
@@ -1 +0,0 @@
1
- export { TextField } from '../ui/create-form/textfield/main';
@@ -1 +0,0 @@
1
- export type { CreatePayload, EditViewProps, LinkCreatePlugin, LinkCreateProps, LinkCreateWithModalProps, Validator, ValidatorMap, } from '../common/types';
@@ -1 +0,0 @@
1
- export { UserPicker } from '../ui/create-form/user-picker/main';
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;
@@ -1,23 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by Traduki 2.0.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- declare const _default: {
8
- 'link-create.live-doc-icon-label': string;
9
- 'link-create.page-icon-label': string;
10
- 'link-create.unknown-error.description': string;
11
- 'link-create.unknown-error.heading': string;
12
- 'linkCreate.CreateConfluencePage.form.site.label': string;
13
- 'linkCreate.confirm-dismiss-dialog.modal.cancel-button-label': string;
14
- 'linkCreate.confirm-dismiss-dialog.modal.confirm-button-label': string;
15
- 'linkCreate.confirm-dismiss-dialog.modal.description': string;
16
- 'linkCreate.confirm-dismiss-dialog.modal.title': string;
17
- 'linkCreate.createForm.button.close': string;
18
- 'linkCreate.createForm.button.create': string;
19
- 'linkCreate.createForm.button.createAndOpen': string;
20
- 'linkCreate.form.requiredField.instruction': string;
21
- 'linkCreate.modal.heading': string;
22
- };
23
- export default _default;