@atlaskit/link-create 5.3.2 → 6.0.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.
Files changed (251) 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/cjs/entry-points/async-select.js +2 -2
  8. package/dist/cjs/entry-points/callback-context.js +3 -3
  9. package/dist/cjs/entry-points/create-field.js +2 -2
  10. package/dist/cjs/entry-points/form-loader.js +2 -2
  11. package/dist/cjs/entry-points/select.js +3 -3
  12. package/dist/cjs/entry-points/text-field.js +2 -2
  13. package/dist/cjs/entry-points/user-picker.js +2 -2
  14. package/dist/cjs/index.js +25 -18
  15. package/dist/cjs/ui/create-form/async-select/main.js +6 -6
  16. package/dist/cjs/ui/create-form/form-footer/edit-button/index.js +2 -2
  17. package/dist/cjs/ui/create-form/main.js +8 -8
  18. package/dist/cjs/ui/create-form/select/main.js +2 -2
  19. package/dist/cjs/ui/create-form/textfield/main.js +2 -2
  20. package/dist/cjs/ui/create-form/user-picker/main.js +2 -2
  21. package/dist/cjs/ui/inline-create/index.js +2 -2
  22. package/dist/cjs/ui/inline-create/main.js +6 -6
  23. package/dist/cjs/ui/modal-create/index.js +2 -2
  24. package/dist/cjs/ui/modal-create/main.js +6 -6
  25. package/dist/es2019/common/constants.js +1 -1
  26. package/dist/es2019/entry-points/async-select.js +1 -1
  27. package/dist/es2019/entry-points/callback-context.js +1 -1
  28. package/dist/es2019/entry-points/create-field.js +1 -1
  29. package/dist/es2019/entry-points/form-loader.js +1 -1
  30. package/dist/es2019/entry-points/select.js +1 -1
  31. package/dist/es2019/entry-points/text-field.js +1 -1
  32. package/dist/es2019/entry-points/user-picker.js +1 -1
  33. package/dist/es2019/index.js +12 -11
  34. package/dist/es2019/ui/create-form/async-select/main.js +3 -3
  35. package/dist/es2019/ui/create-form/form-footer/edit-button/index.js +1 -1
  36. package/dist/es2019/ui/create-form/main.js +4 -4
  37. package/dist/es2019/ui/create-form/select/main.js +1 -1
  38. package/dist/es2019/ui/create-form/textfield/main.js +1 -1
  39. package/dist/es2019/ui/create-form/user-picker/main.js +1 -1
  40. package/dist/es2019/ui/inline-create/index.js +1 -1
  41. package/dist/es2019/ui/inline-create/main.js +3 -3
  42. package/dist/es2019/ui/modal-create/index.js +1 -1
  43. package/dist/es2019/ui/modal-create/main.js +3 -3
  44. package/dist/esm/common/constants.js +1 -1
  45. package/dist/esm/entry-points/async-select.js +1 -1
  46. package/dist/esm/entry-points/callback-context.js +1 -1
  47. package/dist/esm/entry-points/create-field.js +1 -1
  48. package/dist/esm/entry-points/form-loader.js +1 -1
  49. package/dist/esm/entry-points/select.js +1 -1
  50. package/dist/esm/entry-points/text-field.js +1 -1
  51. package/dist/esm/entry-points/user-picker.js +1 -1
  52. package/dist/esm/index.js +12 -11
  53. package/dist/esm/ui/create-form/async-select/main.js +3 -3
  54. package/dist/esm/ui/create-form/form-footer/edit-button/index.js +1 -1
  55. package/dist/esm/ui/create-form/main.js +4 -4
  56. package/dist/esm/ui/create-form/select/main.js +1 -1
  57. package/dist/esm/ui/create-form/textfield/main.js +1 -1
  58. package/dist/esm/ui/create-form/user-picker/main.js +1 -1
  59. package/dist/esm/ui/inline-create/index.js +1 -1
  60. package/dist/esm/ui/inline-create/main.js +3 -3
  61. package/dist/esm/ui/modal-create/index.js +1 -1
  62. package/dist/esm/ui/modal-create/main.js +3 -3
  63. package/dist/types/entry-points/async-select.d.ts +1 -1
  64. package/dist/types/entry-points/callback-context.d.ts +1 -1
  65. package/dist/types/entry-points/create-field.d.ts +1 -1
  66. package/dist/types/entry-points/form-loader.d.ts +1 -1
  67. package/dist/types/entry-points/select.d.ts +2 -2
  68. package/dist/types/entry-points/text-field.d.ts +1 -1
  69. package/dist/types/entry-points/user-picker.d.ts +1 -1
  70. package/dist/types/index.d.ts +13 -12
  71. package/exit-warning-modal/package.json +1 -8
  72. package/final-form/package.json +1 -8
  73. package/form-loader/package.json +1 -8
  74. package/form-spy/package.json +1 -8
  75. package/icons/package.json +1 -8
  76. package/inline-create/package.json +1 -8
  77. package/modal-create/package.json +1 -8
  78. package/package.json +25 -33
  79. package/select/package.json +1 -8
  80. package/text-field/package.json +1 -8
  81. package/types/package.json +1 -8
  82. package/user-picker/package.json +1 -8
  83. package/dist/cjs/common/ui/confirm-dismiss-dialog/index.js +0 -12
  84. package/dist/cjs/common/utils/analytics/index.js +0 -18
  85. package/dist/cjs/controllers/callback-context/index.js +0 -18
  86. package/dist/cjs/controllers/create-field/index.js +0 -12
  87. package/dist/cjs/controllers/form-context/index.js +0 -24
  88. package/dist/cjs/ui/create-form/async-select/index.js +0 -12
  89. package/dist/cjs/ui/create-form/form-footer/index.js +0 -12
  90. package/dist/cjs/ui/create-form/form-loader/index.js +0 -12
  91. package/dist/cjs/ui/create-form/index.js +0 -47
  92. package/dist/cjs/ui/create-form/select/index.js +0 -18
  93. package/dist/cjs/ui/create-form/textfield/index.js +0 -12
  94. package/dist/cjs/ui/create-form/user-picker/index.js +0 -12
  95. package/dist/cjs/ui/index.js +0 -75
  96. package/dist/es2019/common/ui/confirm-dismiss-dialog/index.js +0 -1
  97. package/dist/es2019/common/utils/analytics/index.js +0 -1
  98. package/dist/es2019/controllers/callback-context/index.js +0 -1
  99. package/dist/es2019/controllers/create-field/index.js +0 -1
  100. package/dist/es2019/controllers/form-context/index.js +0 -1
  101. package/dist/es2019/ui/create-form/async-select/index.js +0 -1
  102. package/dist/es2019/ui/create-form/form-footer/index.js +0 -1
  103. package/dist/es2019/ui/create-form/form-loader/index.js +0 -1
  104. package/dist/es2019/ui/create-form/index.js +0 -6
  105. package/dist/es2019/ui/create-form/select/index.js +0 -1
  106. package/dist/es2019/ui/create-form/textfield/index.js +0 -1
  107. package/dist/es2019/ui/create-form/user-picker/index.js +0 -1
  108. package/dist/es2019/ui/index.js +0 -9
  109. package/dist/esm/common/ui/confirm-dismiss-dialog/index.js +0 -1
  110. package/dist/esm/common/utils/analytics/index.js +0 -1
  111. package/dist/esm/controllers/callback-context/index.js +0 -1
  112. package/dist/esm/controllers/create-field/index.js +0 -1
  113. package/dist/esm/controllers/form-context/index.js +0 -1
  114. package/dist/esm/ui/create-form/async-select/index.js +0 -1
  115. package/dist/esm/ui/create-form/form-footer/index.js +0 -1
  116. package/dist/esm/ui/create-form/form-loader/index.js +0 -1
  117. package/dist/esm/ui/create-form/index.js +0 -6
  118. package/dist/esm/ui/create-form/select/index.js +0 -1
  119. package/dist/esm/ui/create-form/textfield/index.js +0 -1
  120. package/dist/esm/ui/create-form/user-picker/index.js +0 -1
  121. package/dist/esm/ui/index.js +0 -9
  122. package/dist/types/common/ui/confirm-dismiss-dialog/index.d.ts +0 -2
  123. package/dist/types/common/utils/analytics/index.d.ts +0 -1
  124. package/dist/types/controllers/callback-context/index.d.ts +0 -1
  125. package/dist/types/controllers/create-field/index.d.ts +0 -1
  126. package/dist/types/controllers/form-context/index.d.ts +0 -1
  127. package/dist/types/ui/create-form/async-select/index.d.ts +0 -1
  128. package/dist/types/ui/create-form/form-footer/index.d.ts +0 -1
  129. package/dist/types/ui/create-form/form-loader/index.d.ts +0 -1
  130. package/dist/types/ui/create-form/index.d.ts +0 -6
  131. package/dist/types/ui/create-form/select/index.d.ts +0 -2
  132. package/dist/types/ui/create-form/textfield/index.d.ts +0 -1
  133. package/dist/types/ui/create-form/user-picker/index.d.ts +0 -1
  134. package/dist/types/ui/index.d.ts +0 -11
  135. package/dist/types-ts4.5/common/constants.d.ts +0 -12
  136. package/dist/types-ts4.5/common/messages.d.ts +0 -7
  137. package/dist/types-ts4.5/common/types.d.ts +0 -152
  138. package/dist/types-ts4.5/common/ui/Button/index.d.ts +0 -10
  139. package/dist/types-ts4.5/common/ui/ModalDialog/index.d.ts +0 -13
  140. package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/index.d.ts +0 -2
  141. package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/main.d.ts +0 -7
  142. package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/messages.d.ts +0 -7
  143. package/dist/types-ts4.5/common/ui/edit-modal/index.d.ts +0 -11
  144. package/dist/types-ts4.5/common/ui/error-boundary/error-boundary-base/index.d.ts +0 -18
  145. package/dist/types-ts4.5/common/ui/error-boundary/index.d.ts +0 -6
  146. package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +0 -10
  147. package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/index.d.ts +0 -2
  148. package/dist/types-ts4.5/common/ui/error-boundary-ui/index.d.ts +0 -4
  149. package/dist/types-ts4.5/common/ui/error-boundary-ui/messages.d.ts +0 -7
  150. package/dist/types-ts4.5/common/ui/experience-tracker/index.d.ts +0 -22
  151. package/dist/types-ts4.5/common/ui/icon/index.d.ts +0 -13
  152. package/dist/types-ts4.5/common/ui/icon/messages.d.ts +0 -12
  153. package/dist/types-ts4.5/common/ui/link-create-content/index.d.ts +0 -8
  154. package/dist/types-ts4.5/common/ui/message/index.d.ts +0 -14
  155. package/dist/types-ts4.5/common/ui/modal-hero/index.d.ts +0 -6
  156. package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +0 -75
  157. package/dist/types-ts4.5/common/utils/analytics/components.d.ts +0 -7
  158. package/dist/types-ts4.5/common/utils/analytics/context.d.ts +0 -29
  159. package/dist/types-ts4.5/common/utils/analytics/index.d.ts +0 -1
  160. package/dist/types-ts4.5/common/utils/errors/index.d.ts +0 -10
  161. package/dist/types-ts4.5/common/utils/form/index.d.ts +0 -7
  162. package/dist/types-ts4.5/common/utils/locale/fetch-messages-for-locale.d.ts +0 -2
  163. package/dist/types-ts4.5/controllers/callback-context/index.d.ts +0 -1
  164. package/dist/types-ts4.5/controllers/callback-context/main.d.ts +0 -19
  165. package/dist/types-ts4.5/controllers/create-field/index.d.ts +0 -1
  166. package/dist/types-ts4.5/controllers/create-field/main.d.ts +0 -6
  167. package/dist/types-ts4.5/controllers/create-field/types.d.ts +0 -28
  168. package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +0 -32
  169. package/dist/types-ts4.5/controllers/exit-warning-modal-context/index.d.ts +0 -14
  170. package/dist/types-ts4.5/controllers/form-context/index.d.ts +0 -1
  171. package/dist/types-ts4.5/controllers/form-context/main.d.ts +0 -19
  172. package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +0 -21
  173. package/dist/types-ts4.5/entry-points/async-select.d.ts +0 -1
  174. package/dist/types-ts4.5/entry-points/callback-context.d.ts +0 -1
  175. package/dist/types-ts4.5/entry-points/create-field.d.ts +0 -1
  176. package/dist/types-ts4.5/entry-points/create-form.d.ts +0 -2
  177. package/dist/types-ts4.5/entry-points/exit-warning-modal.d.ts +0 -1
  178. package/dist/types-ts4.5/entry-points/final-form.d.ts +0 -1
  179. package/dist/types-ts4.5/entry-points/form-loader.d.ts +0 -1
  180. package/dist/types-ts4.5/entry-points/form-spy.d.ts +0 -1
  181. package/dist/types-ts4.5/entry-points/icons.d.ts +0 -1
  182. package/dist/types-ts4.5/entry-points/inline-create.d.ts +0 -1
  183. package/dist/types-ts4.5/entry-points/modal-create.d.ts +0 -1
  184. package/dist/types-ts4.5/entry-points/select.d.ts +0 -2
  185. package/dist/types-ts4.5/entry-points/text-field.d.ts +0 -1
  186. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  187. package/dist/types-ts4.5/entry-points/user-picker.d.ts +0 -1
  188. package/dist/types-ts4.5/i18n/cs.d.ts +0 -23
  189. package/dist/types-ts4.5/i18n/da.d.ts +0 -23
  190. package/dist/types-ts4.5/i18n/de.d.ts +0 -23
  191. package/dist/types-ts4.5/i18n/en.d.ts +0 -23
  192. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -23
  193. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -23
  194. package/dist/types-ts4.5/i18n/es.d.ts +0 -23
  195. package/dist/types-ts4.5/i18n/fi.d.ts +0 -23
  196. package/dist/types-ts4.5/i18n/fr.d.ts +0 -23
  197. package/dist/types-ts4.5/i18n/hr.d.ts +0 -23
  198. package/dist/types-ts4.5/i18n/hu.d.ts +0 -23
  199. package/dist/types-ts4.5/i18n/it.d.ts +0 -23
  200. package/dist/types-ts4.5/i18n/ja.d.ts +0 -23
  201. package/dist/types-ts4.5/i18n/ko.d.ts +0 -23
  202. package/dist/types-ts4.5/i18n/nb.d.ts +0 -23
  203. package/dist/types-ts4.5/i18n/nl.d.ts +0 -23
  204. package/dist/types-ts4.5/i18n/pl.d.ts +0 -23
  205. package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -23
  206. package/dist/types-ts4.5/i18n/ru.d.ts +0 -23
  207. package/dist/types-ts4.5/i18n/sk.d.ts +0 -23
  208. package/dist/types-ts4.5/i18n/sl.d.ts +0 -23
  209. package/dist/types-ts4.5/i18n/sr_RS.d.ts +0 -23
  210. package/dist/types-ts4.5/i18n/sr_YR.d.ts +0 -23
  211. package/dist/types-ts4.5/i18n/sv.d.ts +0 -23
  212. package/dist/types-ts4.5/i18n/th.d.ts +0 -23
  213. package/dist/types-ts4.5/i18n/tr.d.ts +0 -23
  214. package/dist/types-ts4.5/i18n/uk.d.ts +0 -23
  215. package/dist/types-ts4.5/i18n/vi.d.ts +0 -23
  216. package/dist/types-ts4.5/i18n/zh.d.ts +0 -23
  217. package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -23
  218. package/dist/types-ts4.5/index.d.ts +0 -34
  219. package/dist/types-ts4.5/ui/create-form/async-select/index.d.ts +0 -1
  220. package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +0 -10
  221. package/dist/types-ts4.5/ui/create-form/async-select/types.d.ts +0 -23
  222. package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/index.d.ts +0 -2
  223. package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/messages.d.ts +0 -7
  224. package/dist/types-ts4.5/ui/create-form/form-footer/index.d.ts +0 -1
  225. package/dist/types-ts4.5/ui/create-form/form-footer/main.d.ts +0 -11
  226. package/dist/types-ts4.5/ui/create-form/form-footer/messages.d.ts +0 -12
  227. package/dist/types-ts4.5/ui/create-form/form-footer/submit-button/index.d.ts +0 -2
  228. package/dist/types-ts4.5/ui/create-form/form-loader/index.d.ts +0 -1
  229. package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +0 -6
  230. package/dist/types-ts4.5/ui/create-form/form-spy/index.d.ts +0 -12
  231. package/dist/types-ts4.5/ui/create-form/index.d.ts +0 -6
  232. package/dist/types-ts4.5/ui/create-form/main.d.ts +0 -55
  233. package/dist/types-ts4.5/ui/create-form/select/index.d.ts +0 -2
  234. package/dist/types-ts4.5/ui/create-form/select/main.d.ts +0 -19
  235. package/dist/types-ts4.5/ui/create-form/select/messages.d.ts +0 -7
  236. package/dist/types-ts4.5/ui/create-form/select/types.d.ts +0 -27
  237. package/dist/types-ts4.5/ui/create-form/textfield/index.d.ts +0 -1
  238. package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +0 -9
  239. package/dist/types-ts4.5/ui/create-form/textfield/types.d.ts +0 -14
  240. package/dist/types-ts4.5/ui/create-form/types.d.ts +0 -6
  241. package/dist/types-ts4.5/ui/create-form/user-picker/index.d.ts +0 -1
  242. package/dist/types-ts4.5/ui/create-form/user-picker/main.d.ts +0 -6
  243. package/dist/types-ts4.5/ui/create-form/user-picker/types.d.ts +0 -23
  244. package/dist/types-ts4.5/ui/create-form/utils/index.d.ts +0 -13
  245. package/dist/types-ts4.5/ui/index.d.ts +0 -11
  246. package/dist/types-ts4.5/ui/inline-create/index.d.ts +0 -4
  247. package/dist/types-ts4.5/ui/inline-create/inline-analytics/index.d.ts +0 -9
  248. package/dist/types-ts4.5/ui/inline-create/main.d.ts +0 -4
  249. package/dist/types-ts4.5/ui/modal-create/index.d.ts +0 -4
  250. package/dist/types-ts4.5/ui/modal-create/main.d.ts +0 -4
  251. package/dist/types-ts4.5/ui/modal-create/messages.d.ts +0 -7
@@ -1,11 +0,0 @@
1
- export { default as InlineCreate } from './inline-create';
2
- export { default } from './modal-create';
3
- export { TextField } from './create-form/textfield';
4
- export { AsyncSelect } from './create-form/async-select';
5
- export { CreateFormLoader } from './create-form/form-loader';
6
- export { FormSpy } from './create-form/form-spy';
7
- export { CreateForm } from './create-form/main';
8
- export type { CreateFormProps } from './create-form/main';
9
- export { Select, SiteSelect } from './create-form/select';
10
- export type { SitePickerOptionType } from './create-form/select';
11
- export { UserPicker } from './create-form/user-picker';
@@ -1,12 +0,0 @@
1
- import type { PackageMetaDataType } from './utils/analytics/analytics.codegen';
2
- export declare const ANALYTICS_CHANNEL = "media";
3
- export declare const COMPONENT_NAME = "linkCreate";
4
- export declare const SCREEN_ID = "linkCreateScreen";
5
- export declare const DEFAULT_TEST_ID = "link-create";
6
- export declare const CREATE_FORM_MAX_WIDTH_IN_PX = "480";
7
- /**
8
- * @deprecated Remove on FF clean up platform_bandicoots-link-create-css
9
- */
10
- export declare const CREATE_FORM_MIN_HEIGHT_IN_PX = "200";
11
- export declare const LINK_CREATE_FORM_POST_CREATE_FIELD = "__post_create__";
12
- export declare const PACKAGE_DATA: PackageMetaDataType;
@@ -1,7 +0,0 @@
1
- type MessageKeys = 'genericErrorMessage' | 'requiredFieldInstruction';
2
- declare const message: Record<MessageKeys, {
3
- id: string;
4
- defaultMessage: string;
5
- description?: string;
6
- }>;
7
- export default message;
@@ -1,152 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type ModalDialogProps } from '@atlaskit/modal-dialog';
3
- /** Map of field names to a list of validators for that field */
4
- export type ValidatorMap = Record<string, Validator[]>;
5
- export type Validator = {
6
- /** Return true when the given input is valid */
7
- isValid: (val: unknown) => boolean;
8
- /** An error message is used to tell a user that the field input is invalid. For example, an error message could be 'Invalid username, needs to be more than 4 characters'. */
9
- errorMessage: string;
10
- };
11
- export interface Group {
12
- /**
13
- * A label to display for the Group
14
- */
15
- label: string;
16
- /**
17
- * An icon to display for the Group
18
- */
19
- icon: string;
20
- /**
21
- * A unique key for the Group
22
- */
23
- key: string;
24
- }
25
- export type EditViewProps = {
26
- /**
27
- * The payload returned from the create function
28
- */
29
- payload: CreatePayload;
30
- /**
31
- * Function for the plugin to call when it signals to be closed
32
- */
33
- onClose: () => void;
34
- };
35
- export interface LinkCreatePlugin<Key = string> {
36
- /**
37
- * The Group that this plugin entity belongs to
38
- */
39
- group: Group;
40
- /**
41
- * A label to display for the plugin entity
42
- */
43
- label: string;
44
- /**
45
- * An icon to display for the plugin entity
46
- */
47
- icon: string;
48
- /**
49
- * A unique key for the plugin entity
50
- */
51
- key: Key;
52
- /**
53
- * A renderer function to render the form
54
- */
55
- form: ReactNode;
56
- /**
57
- * The post create edit view to be rendered after edit button is clicked.
58
- */
59
- editView?: ({ payload, onClose }: EditViewProps) => JSX.Element;
60
- }
61
- /** The object that is returned on successful callback of create function*/
62
- export type CreatePayload = {
63
- /** The url to the resource created by the create plugin */
64
- url: string;
65
- /** The url to be opened on create if this is different from `url` created*/
66
- linkToOpen?: string;
67
- /**
68
- * ARI of the created resource.
69
- * https://developer.atlassian.com/platform/atlassian-resource-identifier/spec/ari-latest/
70
- *
71
- * It should be returned but it's not required to be on the Jira side:
72
- * https://stash.atlassian.com/projects/JIRACLOUD/repos/jira-frontend/browse/src/packages/issue-create/issue-create-embed/src/ui/index.tsx
73
- * https://stash.atlassian.com/projects/JIRACLOUD/repos/jira-frontend/pull-requests/103587/overview?commentId=5778323
74
- */
75
- ari?: string | undefined;
76
- /** The object identifier for the resource created by the create plugin (for analytics) */
77
- objectId: string;
78
- /** The type of object created (for analytics) */
79
- objectType: string;
80
- /** The raw object returned from the create plugin */
81
- data?: Record<string, unknown>;
82
- };
83
- export interface LinkCreateProps {
84
- /**
85
- * A `testId` prop is provided for specified elements, which is a unique
86
- * string that appears as a data attribute `data-testid` in the rendered code,
87
- * serving as a hook for automated tests */
88
- testId?: string;
89
- plugins: LinkCreatePlugin[];
90
- /**
91
- * The initial group key for create. If this is provided, it will jump
92
- * directly to the entity selection screen
93
- */
94
- groupKey?: string;
95
- /**
96
- * The initial entity name for create. If this is provided, it will jump
97
- * directly to the entity creation form.
98
- * Note: it will be non-optional for now and can move to optional when we have
99
- * the meta creation flow built.
100
- */
101
- entityKey: string;
102
- /**
103
- * This callback for when the resource has been successfully created.
104
- */
105
- onCreate?: (payload: CreatePayload) => Promise<void> | void;
106
- /**
107
- * This callback for when the LinkCreate experience has successfully been completed.
108
- * Note: this callback is one of the requirements to enable the LinkCreate
109
- * post-create edit functionality
110
- */
111
- onComplete?: () => void;
112
- /**
113
- * This callback for any errors
114
- */
115
- onFailure?: (error: unknown) => void;
116
- /**
117
- * This callback for when the form was manually discarded by user
118
- */
119
- onCancel?: () => void;
120
- /**
121
- * This value tells where the linkCreate was triggered from. And it's for
122
- * analytic purpose only.
123
- * Default: unknown
124
- */
125
- triggeredFrom?: string;
126
- }
127
- export interface LinkCreateWithModalProps extends LinkCreateProps {
128
- /**
129
- * This value controls whether the Create Modal should be active or hidden
130
- * Default: false
131
- */
132
- active?: boolean;
133
- /**
134
- * A title for the LinkCreate with Modal component
135
- * Default: Create new
136
- */
137
- modalTitle?: string;
138
- /**
139
- * A ReactNode to be displayed in the modal hero section
140
- */
141
- modalHero?: ReactNode;
142
- /**
143
- * Callback function called when the final link create experience dialog has finished closing.
144
- * @see {@link https://atlassian.design/components/modal-dialog/code#ModalWrapper-onCloseComplete}
145
- */
146
- onCloseComplete?: ModalDialogProps['onCloseComplete'];
147
- /**
148
- * Callback function called when the link create experience dialog has finished opening.
149
- * @see {@link https://atlassian.design/components/modal-dialog/code#ModalWrapper-onOpenComplete}
150
- */
151
- onOpenComplete?: ModalDialogProps['onOpenComplete'];
152
- }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import AkButton from '@atlaskit/button/new';
3
- import { type AnalyticsEventAttributes } from '../../../common/utils/analytics/analytics.codegen';
4
- type ButtonProps = React.ComponentProps<typeof AkButton> & {
5
- actionSubjectId: keyof {
6
- [Key in keyof AnalyticsEventAttributes as Key extends `ui.button.clicked.${infer ActionSubjectId}` ? ActionSubjectId : never]: any;
7
- };
8
- };
9
- export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, 'ref'> & React.RefAttributes<HTMLButtonElement>>;
10
- export {};
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import ModalDialog from '@atlaskit/modal-dialog';
3
- import { type AnalyticsEventAttributes } from '../../utils/analytics/analytics.codegen';
4
- type ModalProps = React.ComponentProps<typeof ModalDialog> & {
5
- screen: keyof {
6
- [Key in keyof AnalyticsEventAttributes as Key extends `screen.${infer ScreenName}.viewed` ? ScreenName : never]: any;
7
- };
8
- };
9
- /**
10
- * AkModal component with built-in analytics for screen event + open + close events + source context
11
- */
12
- export declare const Modal: ({ screen, children, ...props }: ModalProps) => React.JSX.Element;
13
- export {};
@@ -1,2 +0,0 @@
1
- export { ConfirmDismissDialog } from './main';
2
- export type { ConfirmDismissDialogProps } from './main';
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export type ConfirmDismissDialogProps = {
3
- active: boolean;
4
- onClose: () => void;
5
- onCancel?: () => void;
6
- };
7
- export declare const ConfirmDismissDialog: ({ active, onClose, onCancel, }: ConfirmDismissDialogProps) => React.JSX.Element;
@@ -1,7 +0,0 @@
1
- type MessageKeys = 'title' | 'cancelButtonLabel' | 'confirmButtonLabel' | 'description';
2
- declare const message: Record<MessageKeys, {
3
- id: string;
4
- defaultMessage: string;
5
- description?: string;
6
- }>;
7
- export default message;
@@ -1,11 +0,0 @@
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) => React.JSX.Element;
11
- export {};
@@ -1,18 +0,0 @@
1
- import { Component, type ErrorInfo, type ReactNode } from 'react';
2
- export type ErrorBoundaryErrorInfo = {
3
- componentStack: string;
4
- };
5
- type BaseErrorBoundaryState = {
6
- hasError: boolean;
7
- };
8
- interface BaseErrorBoundaryProps {
9
- children: ReactNode;
10
- errorComponent?: JSX.Element;
11
- onError?: (error: Error, info?: ErrorInfo) => void;
12
- }
13
- export declare class BaseErrorBoundary extends Component<BaseErrorBoundaryProps, BaseErrorBoundaryState> {
14
- constructor(props: BaseErrorBoundaryProps);
15
- componentDidCatch(error: Error, info?: ErrorInfo): void;
16
- render(): string | number | boolean | Iterable<ReactNode> | JSX.Element | null | undefined;
17
- }
18
- export {};
@@ -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 +0,0 @@
1
- export { useLinkCreateAnalytics, withLinkCreateAnalyticsContext } from './context';
@@ -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 +0,0 @@
1
- export { LinkCreateCallbackProvider, useLinkCreateCallback } from './main';
@@ -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 +0,0 @@
1
- export { CreateField } from './main';
@@ -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 +0,0 @@
1
- export { FormContextProvider, useFormContext, withLinkCreateFormContext } from './main';