@atlaskit/link-create 1.5.0 → 1.6.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 +14 -0
- package/analytics.spec.yaml +14 -0
- package/dist/cjs/common/ui/Button/index.js +37 -0
- package/dist/cjs/common/ui/error-boundary-modal/index.js +30 -0
- package/dist/cjs/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/cjs/common/utils/analytics/components.js +20 -0
- package/dist/cjs/controllers/edit-post-create-context/index.js +14 -3
- package/dist/cjs/controllers/plugin-context/index.js +1 -1
- package/dist/cjs/ui/create-form/main.js +24 -6
- package/dist/cjs/ui/link-create/confirm-dismiss-dialog/main.js +18 -5
- package/dist/cjs/ui/link-create/edit-modal/index.js +12 -3
- package/dist/cjs/ui/link-create/error-boundary/error-boundary-base/index.js +4 -7
- package/dist/cjs/ui/link-create/error-boundary/index.js +4 -3
- package/dist/cjs/ui/link-create/main.js +53 -6
- package/dist/cjs/ui/main.js +12 -1
- package/dist/es2019/common/ui/Button/index.js +27 -0
- package/dist/es2019/common/ui/error-boundary-modal/index.js +22 -0
- package/dist/es2019/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/es2019/common/utils/analytics/components.js +15 -0
- package/dist/es2019/controllers/edit-post-create-context/index.js +11 -4
- package/dist/es2019/controllers/plugin-context/index.js +1 -1
- package/dist/es2019/ui/create-form/main.js +20 -3
- package/dist/es2019/ui/link-create/confirm-dismiss-dialog/main.js +17 -4
- package/dist/es2019/ui/link-create/edit-modal/index.js +13 -3
- package/dist/es2019/ui/link-create/error-boundary/error-boundary-base/index.js +4 -4
- package/dist/es2019/ui/link-create/error-boundary/index.js +4 -3
- package/dist/es2019/ui/link-create/main.js +38 -6
- package/dist/es2019/ui/main.js +12 -1
- package/dist/esm/common/ui/Button/index.js +27 -0
- package/dist/esm/common/ui/error-boundary-modal/index.js +21 -0
- package/dist/esm/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/esm/common/utils/analytics/components.js +13 -0
- package/dist/esm/controllers/edit-post-create-context/index.js +15 -4
- package/dist/esm/controllers/plugin-context/index.js +1 -1
- package/dist/esm/ui/create-form/main.js +24 -5
- package/dist/esm/ui/link-create/confirm-dismiss-dialog/main.js +17 -4
- package/dist/esm/ui/link-create/edit-modal/index.js +12 -3
- package/dist/esm/ui/link-create/error-boundary/error-boundary-base/index.js +4 -4
- package/dist/esm/ui/link-create/error-boundary/index.js +4 -3
- package/dist/esm/ui/link-create/main.js +54 -7
- package/dist/esm/ui/main.js +12 -1
- package/dist/types/common/types.d.ts +14 -0
- package/dist/types/common/ui/Button/index.d.ts +5 -0
- package/dist/types/common/ui/error-boundary-modal/index.d.ts +11 -0
- package/dist/types/common/utils/analytics/analytics.codegen.d.ts +6 -2
- package/dist/types/common/utils/analytics/components.d.ts +8 -0
- package/dist/types/controllers/edit-post-create-context/index.d.ts +23 -3
- package/dist/types/controllers/plugin-context/index.d.ts +4 -1
- package/dist/types/ui/create-form/main.d.ts +18 -2
- package/dist/types/ui/link-create/edit-modal/index.d.ts +8 -4
- package/dist/types/ui/link-create/error-boundary/error-boundary-base/index.d.ts +3 -3
- package/dist/types/ui/link-create/error-boundary/index.d.ts +5 -1
- package/dist/types/ui/link-create/main.d.ts +3 -3
- package/dist/types-ts4.5/common/types.d.ts +14 -0
- package/dist/types-ts4.5/common/ui/Button/index.d.ts +5 -0
- package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +11 -0
- package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +6 -2
- package/dist/types-ts4.5/common/utils/analytics/components.d.ts +8 -0
- package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +23 -3
- package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +4 -1
- package/dist/types-ts4.5/ui/create-form/main.d.ts +20 -2
- package/dist/types-ts4.5/ui/link-create/edit-modal/index.d.ts +8 -4
- package/dist/types-ts4.5/ui/link-create/error-boundary/error-boundary-base/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/link-create/error-boundary/index.d.ts +5 -1
- package/dist/types-ts4.5/ui/link-create/main.d.ts +3 -3
- package/package.json +6 -3
- package/report.api.md +25 -4
- package/tmp/api-report-tmp.d.ts +25 -4
- /package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js +0 -0
- /package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.js +0 -0
- /package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js +0 -0
- /package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js +0 -0
- /package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.js +0 -0
- /package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js +0 -0
- /package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js +0 -0
- /package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.js +0 -0
- /package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js +0 -0
- /package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.d.ts +0 -0
- /package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.d.ts +0 -0
- /package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.d.ts +0 -0
package/report.api.md
CHANGED
|
@@ -83,16 +83,14 @@ export function CreateFormLoader({
|
|
|
83
83
|
export interface CreateFormProps<FormData> {
|
|
84
84
|
// (undocumented)
|
|
85
85
|
children: ReactNode;
|
|
86
|
-
// (undocumented)
|
|
87
86
|
hideFooter?: boolean;
|
|
88
|
-
|
|
89
|
-
initialValues?: FormData;
|
|
87
|
+
initialValues?: DisallowReservedFields<FormData>;
|
|
90
88
|
// (undocumented)
|
|
91
89
|
isLoading?: boolean;
|
|
92
90
|
// (undocumented)
|
|
93
91
|
onCancel?: () => void;
|
|
94
92
|
// (undocumented)
|
|
95
|
-
onSubmit: (data: FormData) => void;
|
|
93
|
+
onSubmit: (data: OmitReservedFields<FormData>) => void;
|
|
96
94
|
// (undocumented)
|
|
97
95
|
testId?: string;
|
|
98
96
|
}
|
|
@@ -106,6 +104,17 @@ export type CreatePayload = {
|
|
|
106
104
|
data?: Record<string, unknown>;
|
|
107
105
|
};
|
|
108
106
|
|
|
107
|
+
// @public (undocumented)
|
|
108
|
+
type DisallowReservedFields<T> = T & {
|
|
109
|
+
[Field in (typeof RESERVED_FIELDS)[number]]?: never;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// @public (undocumented)
|
|
113
|
+
type EditViewProps = {
|
|
114
|
+
payload: CreatePayload;
|
|
115
|
+
onClose: () => void;
|
|
116
|
+
};
|
|
117
|
+
|
|
109
118
|
// @public
|
|
110
119
|
export const FormSpy: <T extends Record<string, unknown>>({
|
|
111
120
|
children,
|
|
@@ -135,6 +144,7 @@ interface LinkCreateCallbackProviderProps {
|
|
|
135
144
|
|
|
136
145
|
// @public (undocumented)
|
|
137
146
|
export interface LinkCreatePlugin {
|
|
147
|
+
editView?: ({ payload, onClose }: EditViewProps) => JSX.Element;
|
|
138
148
|
form: ReactNode;
|
|
139
149
|
group: Group;
|
|
140
150
|
icon: string;
|
|
@@ -163,6 +173,17 @@ export interface LinkCreateWithModalProps
|
|
|
163
173
|
modalTitle?: string;
|
|
164
174
|
}
|
|
165
175
|
|
|
176
|
+
// @public (undocumented)
|
|
177
|
+
type OmitReservedFields<T> = Omit<T, keyof ReservedFields>;
|
|
178
|
+
|
|
179
|
+
// @public (undocumented)
|
|
180
|
+
const RESERVED_FIELDS: readonly ['__post_create__'];
|
|
181
|
+
|
|
182
|
+
// @public (undocumented)
|
|
183
|
+
type ReservedFields = {
|
|
184
|
+
[Field in (typeof RESERVED_FIELDS)[number]]?: unknown;
|
|
185
|
+
};
|
|
186
|
+
|
|
166
187
|
// @public
|
|
167
188
|
export function Select<T = OptionType>({
|
|
168
189
|
id,
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -46,16 +46,14 @@ export function CreateFormLoader({ size }: Partial<SpinnerProps>): jsx.JSX.Eleme
|
|
|
46
46
|
export interface CreateFormProps<FormData> {
|
|
47
47
|
// (undocumented)
|
|
48
48
|
children: ReactNode;
|
|
49
|
-
// (undocumented)
|
|
50
49
|
hideFooter?: boolean;
|
|
51
|
-
|
|
52
|
-
initialValues?: FormData;
|
|
50
|
+
initialValues?: DisallowReservedFields<FormData>;
|
|
53
51
|
// (undocumented)
|
|
54
52
|
isLoading?: boolean;
|
|
55
53
|
// (undocumented)
|
|
56
54
|
onCancel?: () => void;
|
|
57
55
|
// (undocumented)
|
|
58
|
-
onSubmit: (data: FormData) => void;
|
|
56
|
+
onSubmit: (data: OmitReservedFields<FormData>) => void;
|
|
59
57
|
// (undocumented)
|
|
60
58
|
testId?: string;
|
|
61
59
|
}
|
|
@@ -69,6 +67,17 @@ export type CreatePayload = {
|
|
|
69
67
|
data?: Record<string, unknown>;
|
|
70
68
|
};
|
|
71
69
|
|
|
70
|
+
// @public (undocumented)
|
|
71
|
+
type DisallowReservedFields<T> = T & {
|
|
72
|
+
[Field in (typeof RESERVED_FIELDS)[number]]?: never;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// @public (undocumented)
|
|
76
|
+
type EditViewProps = {
|
|
77
|
+
payload: CreatePayload;
|
|
78
|
+
onClose: () => void;
|
|
79
|
+
};
|
|
80
|
+
|
|
72
81
|
// @public
|
|
73
82
|
export const FormSpy: <T extends Record<string, unknown>>({ children, }: FormSpyProps<T>) => JSX.Element;
|
|
74
83
|
|
|
@@ -98,6 +107,7 @@ interface LinkCreateCallbackProviderProps {
|
|
|
98
107
|
|
|
99
108
|
// @public (undocumented)
|
|
100
109
|
export interface LinkCreatePlugin {
|
|
110
|
+
editView?: ({ payload, onClose }: EditViewProps) => JSX.Element;
|
|
101
111
|
form: ReactNode;
|
|
102
112
|
group: Group;
|
|
103
113
|
icon: string;
|
|
@@ -124,6 +134,17 @@ export interface LinkCreateWithModalProps extends LinkCreateProps, Partial<Pick<
|
|
|
124
134
|
modalTitle?: string;
|
|
125
135
|
}
|
|
126
136
|
|
|
137
|
+
// @public (undocumented)
|
|
138
|
+
type OmitReservedFields<T> = Omit<T, keyof ReservedFields>;
|
|
139
|
+
|
|
140
|
+
// @public (undocumented)
|
|
141
|
+
const RESERVED_FIELDS: readonly ["__post_create__"];
|
|
142
|
+
|
|
143
|
+
// @public (undocumented)
|
|
144
|
+
type ReservedFields = {
|
|
145
|
+
[Field in (typeof RESERVED_FIELDS)[number]]?: unknown;
|
|
146
|
+
};
|
|
147
|
+
|
|
127
148
|
// @public
|
|
128
149
|
export function Select<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: SelectProps<T>): jsx.JSX.Element;
|
|
129
150
|
|
/package/dist/cjs/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/es2019/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.js
RENAMED
|
File without changes
|
/package/dist/esm/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/error-svg/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.d.ts
RENAMED
|
File without changes
|
/package/dist/types/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/messages.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types-ts4.5/{ui/link-create/error-boundary → common/ui}/error-boundary-ui/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|