@atlaskit/link-create 1.10.0 → 1.11.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 (62) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/analytics.spec.yaml +29 -3
  3. package/dist/cjs/common/messages.js +14 -0
  4. package/dist/cjs/common/ui/error-boundary-ui/index.js +4 -3
  5. package/dist/cjs/common/ui/error-boundary-ui/messages.js +0 -5
  6. package/dist/cjs/common/utils/analytics/analytics.codegen.js +1 -1
  7. package/dist/cjs/common/utils/errors/index.js +39 -0
  8. package/dist/cjs/controllers/callback-context/main.js +23 -7
  9. package/dist/cjs/controllers/experience-tracker/index.js +85 -0
  10. package/dist/cjs/index.js +7 -0
  11. package/dist/cjs/ui/create-form/async-select/main.js +62 -20
  12. package/dist/cjs/ui/create-form/main.js +62 -7
  13. package/dist/cjs/ui/link-create/error-boundary/index.js +14 -9
  14. package/dist/cjs/ui/link-create/main.js +5 -3
  15. package/dist/cjs/ui/main.js +9 -9
  16. package/dist/es2019/common/messages.js +8 -0
  17. package/dist/es2019/common/ui/error-boundary-ui/index.js +2 -1
  18. package/dist/es2019/common/ui/error-boundary-ui/messages.js +0 -5
  19. package/dist/es2019/common/utils/analytics/analytics.codegen.js +1 -1
  20. package/dist/es2019/common/utils/errors/index.js +31 -0
  21. package/dist/es2019/controllers/callback-context/main.js +19 -3
  22. package/dist/es2019/controllers/experience-tracker/index.js +75 -0
  23. package/dist/es2019/index.js +1 -0
  24. package/dist/es2019/ui/create-form/async-select/main.js +32 -1
  25. package/dist/es2019/ui/create-form/main.js +47 -3
  26. package/dist/es2019/ui/link-create/error-boundary/index.js +14 -9
  27. package/dist/es2019/ui/link-create/main.js +5 -3
  28. package/dist/es2019/ui/main.js +10 -9
  29. package/dist/esm/common/messages.js +8 -0
  30. package/dist/esm/common/ui/error-boundary-ui/index.js +2 -1
  31. package/dist/esm/common/ui/error-boundary-ui/messages.js +0 -5
  32. package/dist/esm/common/utils/analytics/analytics.codegen.js +1 -1
  33. package/dist/esm/common/utils/errors/index.js +32 -0
  34. package/dist/esm/controllers/callback-context/main.js +23 -7
  35. package/dist/esm/controllers/experience-tracker/index.js +75 -0
  36. package/dist/esm/index.js +1 -0
  37. package/dist/esm/ui/create-form/async-select/main.js +62 -20
  38. package/dist/esm/ui/create-form/main.js +62 -7
  39. package/dist/esm/ui/link-create/error-boundary/index.js +14 -9
  40. package/dist/esm/ui/link-create/main.js +5 -3
  41. package/dist/esm/ui/main.js +10 -10
  42. package/dist/types/common/messages.d.ts +8 -0
  43. package/dist/types/common/ui/error-boundary-ui/messages.d.ts +0 -5
  44. package/dist/types/common/utils/analytics/analytics.codegen.d.ts +11 -2
  45. package/dist/types/common/utils/errors/index.d.ts +10 -0
  46. package/dist/types/controllers/callback-context/main.d.ts +1 -1
  47. package/dist/types/controllers/experience-tracker/index.d.ts +22 -0
  48. package/dist/types/index.d.ts +1 -0
  49. package/dist/types/ui/create-form/async-select/main.d.ts +1 -1
  50. package/dist/types/ui/create-form/main.d.ts +18 -1
  51. package/dist/types-ts4.5/common/messages.d.ts +8 -0
  52. package/dist/types-ts4.5/common/ui/error-boundary-ui/messages.d.ts +0 -5
  53. package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +11 -2
  54. package/dist/types-ts4.5/common/utils/errors/index.d.ts +10 -0
  55. package/dist/types-ts4.5/controllers/callback-context/main.d.ts +1 -1
  56. package/dist/types-ts4.5/controllers/experience-tracker/index.d.ts +22 -0
  57. package/dist/types-ts4.5/index.d.ts +1 -0
  58. package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +1 -1
  59. package/dist/types-ts4.5/ui/create-form/main.d.ts +18 -1
  60. package/package.json +8 -4
  61. package/report.api.md +11 -8
  62. package/tmp/api-report-tmp.d.ts +0 -187
@@ -1,187 +0,0 @@
1
- ## API Report File for "@atlaskit/link-create"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import { AsyncSelectProps as AsyncSelectProps_2 } from '@atlaskit/select';
10
- import { GroupType } from '@atlaskit/select';
11
- import { jsx } from '@emotion/react';
12
- import { MemoExoticComponent } from 'react';
13
- import { ModalDialogProps } from '@atlaskit/modal-dialog';
14
- import { OptionType } from '@atlaskit/select';
15
- import { default as React_2 } from 'react';
16
- import { ReactNode } from 'react';
17
- import { SelectProps as SelectProps_2 } from '@atlaskit/select';
18
- import { SpinnerProps } from '@atlaskit/spinner';
19
- import { TextFieldProps as TextFieldProps_2 } from '@atlaskit/textfield';
20
-
21
- // @public
22
- export function AsyncSelect<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, defaultOption: propsDefaultValue, loadOptions, ...restProps }: AsyncSelectProps<T>): jsx.JSX.Element;
23
-
24
- // @public (undocumented)
25
- type AsyncSelectProps<T = OptionType> = Omit<AsyncSelectProps_2<T>, 'loadOptions'> & {
26
- name: string;
27
- label: string;
28
- validationHelpText?: string;
29
- testId?: string;
30
- isRequired?: boolean;
31
- validators?: Validator[];
32
- loadOptions?: (inputValue: string) => Promise<GroupType<T>[] | T[]>;
33
- };
34
-
35
- // @public (undocumented)
36
- const ComposedLinkCreate: MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
37
- export default ComposedLinkCreate;
38
-
39
- // @public (undocumented)
40
- export const CreateForm: <FormData_1 extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, initialValues, }: CreateFormProps<FormData_1>) => jsx.JSX.Element;
41
-
42
- // @public
43
- export function CreateFormLoader({ size }: Partial<SpinnerProps>): jsx.JSX.Element;
44
-
45
- // @public (undocumented)
46
- export interface CreateFormProps<FormData> {
47
- // (undocumented)
48
- children: ReactNode;
49
- hideFooter?: boolean;
50
- initialValues?: DisallowReservedFields<FormData>;
51
- // (undocumented)
52
- isLoading?: boolean;
53
- // (undocumented)
54
- onCancel?: () => void;
55
- // (undocumented)
56
- onSubmit: (data: OmitReservedFields<FormData>) => void;
57
- // (undocumented)
58
- testId?: string;
59
- }
60
-
61
- // @public
62
- export type CreatePayload = {
63
- url: string;
64
- ari?: string | undefined;
65
- objectId: string;
66
- objectType: string;
67
- data?: Record<string, unknown>;
68
- };
69
-
70
- // @public (undocumented)
71
- type DisallowReservedFields<T> = T & {
72
- [Field in (typeof RESERVED_FIELDS)[number]]?: never;
73
- };
74
-
75
- // @public (undocumented)
76
- export type EditViewProps = {
77
- payload: CreatePayload;
78
- onClose: () => void;
79
- };
80
-
81
- // @public
82
- export const FormSpy: <T extends Record<string, unknown>>({ children, }: FormSpyProps<T>) => JSX.Element;
83
-
84
- // @public (undocumented)
85
- type FormSpyProps<T> = {
86
- children: ({ values }: {
87
- values: T;
88
- }) => React_2.ReactNode;
89
- };
90
-
91
- // @public (undocumented)
92
- interface Group {
93
- icon: string;
94
- key: string;
95
- label: string;
96
- }
97
-
98
- // @public (undocumented)
99
- export const LinkCreateCallbackProvider: React_2.FC<LinkCreateCallbackProviderProps>;
100
-
101
- // @public (undocumented)
102
- interface LinkCreateCallbackProviderProps {
103
- onCancel?: () => void;
104
- onCreate?: (result: CreatePayload) => Promise<void> | void;
105
- onFailure?: (error: Error) => void;
106
- }
107
-
108
- // @public (undocumented)
109
- export interface LinkCreatePlugin {
110
- editView?: ({ payload, onClose }: EditViewProps) => JSX.Element;
111
- form: ReactNode;
112
- group: Group;
113
- icon: string;
114
- key: string;
115
- label: string;
116
- }
117
-
118
- // @public (undocumented)
119
- export interface LinkCreateProps {
120
- entityKey: string;
121
- groupKey?: string;
122
- onCancel?: () => void;
123
- onComplete?: () => void;
124
- onCreate?: (payload: CreatePayload) => Promise<void> | void;
125
- onFailure?: (error: unknown) => void;
126
- // (undocumented)
127
- plugins: LinkCreatePlugin[];
128
- testId?: string;
129
- triggeredFrom?: string;
130
- }
131
-
132
- // @public (undocumented)
133
- export interface LinkCreateWithModalProps extends LinkCreateProps, Partial<Pick<ModalDialogProps, 'onCloseComplete' | 'onOpenComplete'>> {
134
- active?: boolean;
135
- modalTitle?: string;
136
- }
137
-
138
- // @public (undocumented)
139
- type OmitReservedFields<T> = Omit<T, keyof ReservedFields>;
140
-
141
- // @public (undocumented)
142
- const RESERVED_FIELDS: readonly ["__post_create__"];
143
-
144
- // @public (undocumented)
145
- type ReservedFields = {
146
- [Field in (typeof RESERVED_FIELDS)[number]]?: unknown;
147
- };
148
-
149
- // @public
150
- export function Select<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: SelectProps<T>): jsx.JSX.Element;
151
-
152
- // @public (undocumented)
153
- type SelectProps<T = OptionType> = SelectProps_2<T> & {
154
- name: string;
155
- label: string;
156
- validationHelpText?: string;
157
- testId?: string;
158
- isRequired?: boolean;
159
- validators?: Validator[];
160
- };
161
-
162
- // @public
163
- export function TextField({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: TextFieldProps): jsx.JSX.Element;
164
-
165
- // @public (undocumented)
166
- type TextFieldProps = Omit<TextFieldProps_2, 'name'> & {
167
- name: string;
168
- label?: string;
169
- validationHelpText?: string;
170
- validators?: Validator[];
171
- };
172
-
173
- // @public (undocumented)
174
- export const useLinkCreateCallback: () => LinkCreateCallbackProviderProps;
175
-
176
- // @public (undocumented)
177
- export type Validator = {
178
- isValid: (val: unknown) => boolean;
179
- errorMessage: string;
180
- };
181
-
182
- // @public
183
- export type ValidatorMap = Record<string, Validator[]>;
184
-
185
- // (No @packageDocumentation comment for this package)
186
-
187
- ```