@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.
- package/CHANGELOG.md +35 -0
- package/async-select/package.json +1 -8
- package/callback-context/package.json +1 -8
- package/create-field/package.json +1 -8
- package/create-form/package.json +1 -8
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/entry-points/async-select.js +2 -2
- package/dist/cjs/entry-points/callback-context.js +3 -3
- package/dist/cjs/entry-points/create-field.js +2 -2
- package/dist/cjs/entry-points/form-loader.js +2 -2
- package/dist/cjs/entry-points/select.js +3 -3
- package/dist/cjs/entry-points/text-field.js +2 -2
- package/dist/cjs/entry-points/user-picker.js +2 -2
- package/dist/cjs/index.js +25 -18
- package/dist/cjs/ui/create-form/async-select/main.js +6 -6
- package/dist/cjs/ui/create-form/form-footer/edit-button/index.js +2 -2
- package/dist/cjs/ui/create-form/main.js +8 -8
- package/dist/cjs/ui/create-form/select/main.js +2 -2
- package/dist/cjs/ui/create-form/textfield/main.js +2 -2
- package/dist/cjs/ui/create-form/user-picker/main.js +2 -2
- package/dist/cjs/ui/inline-create/index.js +2 -2
- package/dist/cjs/ui/inline-create/main.js +6 -6
- package/dist/cjs/ui/modal-create/index.js +2 -2
- package/dist/cjs/ui/modal-create/main.js +6 -6
- package/dist/es2019/common/constants.js +1 -1
- package/dist/es2019/entry-points/async-select.js +1 -1
- package/dist/es2019/entry-points/callback-context.js +1 -1
- package/dist/es2019/entry-points/create-field.js +1 -1
- package/dist/es2019/entry-points/form-loader.js +1 -1
- package/dist/es2019/entry-points/select.js +1 -1
- package/dist/es2019/entry-points/text-field.js +1 -1
- package/dist/es2019/entry-points/user-picker.js +1 -1
- package/dist/es2019/index.js +12 -11
- package/dist/es2019/ui/create-form/async-select/main.js +3 -3
- package/dist/es2019/ui/create-form/form-footer/edit-button/index.js +1 -1
- package/dist/es2019/ui/create-form/main.js +4 -4
- package/dist/es2019/ui/create-form/select/main.js +1 -1
- package/dist/es2019/ui/create-form/textfield/main.js +1 -1
- package/dist/es2019/ui/create-form/user-picker/main.js +1 -1
- package/dist/es2019/ui/inline-create/index.js +1 -1
- package/dist/es2019/ui/inline-create/main.js +3 -3
- package/dist/es2019/ui/modal-create/index.js +1 -1
- package/dist/es2019/ui/modal-create/main.js +3 -3
- package/dist/esm/common/constants.js +1 -1
- package/dist/esm/entry-points/async-select.js +1 -1
- package/dist/esm/entry-points/callback-context.js +1 -1
- package/dist/esm/entry-points/create-field.js +1 -1
- package/dist/esm/entry-points/form-loader.js +1 -1
- package/dist/esm/entry-points/select.js +1 -1
- package/dist/esm/entry-points/text-field.js +1 -1
- package/dist/esm/entry-points/user-picker.js +1 -1
- package/dist/esm/index.js +12 -11
- package/dist/esm/ui/create-form/async-select/main.js +3 -3
- package/dist/esm/ui/create-form/form-footer/edit-button/index.js +1 -1
- package/dist/esm/ui/create-form/main.js +4 -4
- package/dist/esm/ui/create-form/select/main.js +1 -1
- package/dist/esm/ui/create-form/textfield/main.js +1 -1
- package/dist/esm/ui/create-form/user-picker/main.js +1 -1
- package/dist/esm/ui/inline-create/index.js +1 -1
- package/dist/esm/ui/inline-create/main.js +3 -3
- package/dist/esm/ui/modal-create/index.js +1 -1
- package/dist/esm/ui/modal-create/main.js +3 -3
- package/dist/types/entry-points/async-select.d.ts +1 -1
- package/dist/types/entry-points/callback-context.d.ts +1 -1
- package/dist/types/entry-points/create-field.d.ts +1 -1
- package/dist/types/entry-points/form-loader.d.ts +1 -1
- package/dist/types/entry-points/select.d.ts +2 -2
- package/dist/types/entry-points/text-field.d.ts +1 -1
- package/dist/types/entry-points/user-picker.d.ts +1 -1
- package/dist/types/index.d.ts +13 -12
- package/exit-warning-modal/package.json +1 -8
- package/final-form/package.json +1 -8
- package/form-loader/package.json +1 -8
- package/form-spy/package.json +1 -8
- package/icons/package.json +1 -8
- package/inline-create/package.json +1 -8
- package/modal-create/package.json +1 -8
- package/package.json +25 -33
- package/select/package.json +1 -8
- package/text-field/package.json +1 -8
- package/types/package.json +1 -8
- package/user-picker/package.json +1 -8
- package/dist/cjs/common/ui/confirm-dismiss-dialog/index.js +0 -12
- package/dist/cjs/common/utils/analytics/index.js +0 -18
- package/dist/cjs/controllers/callback-context/index.js +0 -18
- package/dist/cjs/controllers/create-field/index.js +0 -12
- package/dist/cjs/controllers/form-context/index.js +0 -24
- package/dist/cjs/ui/create-form/async-select/index.js +0 -12
- package/dist/cjs/ui/create-form/form-footer/index.js +0 -12
- package/dist/cjs/ui/create-form/form-loader/index.js +0 -12
- package/dist/cjs/ui/create-form/index.js +0 -47
- package/dist/cjs/ui/create-form/select/index.js +0 -18
- package/dist/cjs/ui/create-form/textfield/index.js +0 -12
- package/dist/cjs/ui/create-form/user-picker/index.js +0 -12
- package/dist/cjs/ui/index.js +0 -75
- package/dist/es2019/common/ui/confirm-dismiss-dialog/index.js +0 -1
- package/dist/es2019/common/utils/analytics/index.js +0 -1
- package/dist/es2019/controllers/callback-context/index.js +0 -1
- package/dist/es2019/controllers/create-field/index.js +0 -1
- package/dist/es2019/controllers/form-context/index.js +0 -1
- package/dist/es2019/ui/create-form/async-select/index.js +0 -1
- package/dist/es2019/ui/create-form/form-footer/index.js +0 -1
- package/dist/es2019/ui/create-form/form-loader/index.js +0 -1
- package/dist/es2019/ui/create-form/index.js +0 -6
- package/dist/es2019/ui/create-form/select/index.js +0 -1
- package/dist/es2019/ui/create-form/textfield/index.js +0 -1
- package/dist/es2019/ui/create-form/user-picker/index.js +0 -1
- package/dist/es2019/ui/index.js +0 -9
- package/dist/esm/common/ui/confirm-dismiss-dialog/index.js +0 -1
- package/dist/esm/common/utils/analytics/index.js +0 -1
- package/dist/esm/controllers/callback-context/index.js +0 -1
- package/dist/esm/controllers/create-field/index.js +0 -1
- package/dist/esm/controllers/form-context/index.js +0 -1
- package/dist/esm/ui/create-form/async-select/index.js +0 -1
- package/dist/esm/ui/create-form/form-footer/index.js +0 -1
- package/dist/esm/ui/create-form/form-loader/index.js +0 -1
- package/dist/esm/ui/create-form/index.js +0 -6
- package/dist/esm/ui/create-form/select/index.js +0 -1
- package/dist/esm/ui/create-form/textfield/index.js +0 -1
- package/dist/esm/ui/create-form/user-picker/index.js +0 -1
- package/dist/esm/ui/index.js +0 -9
- package/dist/types/common/ui/confirm-dismiss-dialog/index.d.ts +0 -2
- package/dist/types/common/utils/analytics/index.d.ts +0 -1
- package/dist/types/controllers/callback-context/index.d.ts +0 -1
- package/dist/types/controllers/create-field/index.d.ts +0 -1
- package/dist/types/controllers/form-context/index.d.ts +0 -1
- package/dist/types/ui/create-form/async-select/index.d.ts +0 -1
- package/dist/types/ui/create-form/form-footer/index.d.ts +0 -1
- package/dist/types/ui/create-form/form-loader/index.d.ts +0 -1
- package/dist/types/ui/create-form/index.d.ts +0 -6
- package/dist/types/ui/create-form/select/index.d.ts +0 -2
- package/dist/types/ui/create-form/textfield/index.d.ts +0 -1
- package/dist/types/ui/create-form/user-picker/index.d.ts +0 -1
- package/dist/types/ui/index.d.ts +0 -11
- package/dist/types-ts4.5/common/constants.d.ts +0 -12
- package/dist/types-ts4.5/common/messages.d.ts +0 -7
- package/dist/types-ts4.5/common/types.d.ts +0 -152
- package/dist/types-ts4.5/common/ui/Button/index.d.ts +0 -10
- package/dist/types-ts4.5/common/ui/ModalDialog/index.d.ts +0 -13
- package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/index.d.ts +0 -2
- package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/main.d.ts +0 -7
- package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/messages.d.ts +0 -7
- package/dist/types-ts4.5/common/ui/edit-modal/index.d.ts +0 -11
- package/dist/types-ts4.5/common/ui/error-boundary/error-boundary-base/index.d.ts +0 -18
- package/dist/types-ts4.5/common/ui/error-boundary/index.d.ts +0 -6
- package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +0 -10
- package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/index.d.ts +0 -2
- package/dist/types-ts4.5/common/ui/error-boundary-ui/index.d.ts +0 -4
- package/dist/types-ts4.5/common/ui/error-boundary-ui/messages.d.ts +0 -7
- package/dist/types-ts4.5/common/ui/experience-tracker/index.d.ts +0 -22
- package/dist/types-ts4.5/common/ui/icon/index.d.ts +0 -13
- package/dist/types-ts4.5/common/ui/icon/messages.d.ts +0 -12
- package/dist/types-ts4.5/common/ui/link-create-content/index.d.ts +0 -8
- package/dist/types-ts4.5/common/ui/message/index.d.ts +0 -14
- package/dist/types-ts4.5/common/ui/modal-hero/index.d.ts +0 -6
- package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +0 -75
- package/dist/types-ts4.5/common/utils/analytics/components.d.ts +0 -7
- package/dist/types-ts4.5/common/utils/analytics/context.d.ts +0 -29
- package/dist/types-ts4.5/common/utils/analytics/index.d.ts +0 -1
- package/dist/types-ts4.5/common/utils/errors/index.d.ts +0 -10
- package/dist/types-ts4.5/common/utils/form/index.d.ts +0 -7
- package/dist/types-ts4.5/common/utils/locale/fetch-messages-for-locale.d.ts +0 -2
- package/dist/types-ts4.5/controllers/callback-context/index.d.ts +0 -1
- package/dist/types-ts4.5/controllers/callback-context/main.d.ts +0 -19
- package/dist/types-ts4.5/controllers/create-field/index.d.ts +0 -1
- package/dist/types-ts4.5/controllers/create-field/main.d.ts +0 -6
- package/dist/types-ts4.5/controllers/create-field/types.d.ts +0 -28
- package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +0 -32
- package/dist/types-ts4.5/controllers/exit-warning-modal-context/index.d.ts +0 -14
- package/dist/types-ts4.5/controllers/form-context/index.d.ts +0 -1
- package/dist/types-ts4.5/controllers/form-context/main.d.ts +0 -19
- package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +0 -21
- package/dist/types-ts4.5/entry-points/async-select.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/callback-context.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/create-field.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/create-form.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/exit-warning-modal.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/final-form.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/form-loader.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/form-spy.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/icons.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/inline-create.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/modal-create.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/select.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/text-field.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/user-picker.d.ts +0 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -23
- package/dist/types-ts4.5/i18n/da.d.ts +0 -23
- package/dist/types-ts4.5/i18n/de.d.ts +0 -23
- package/dist/types-ts4.5/i18n/en.d.ts +0 -23
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -23
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -23
- package/dist/types-ts4.5/i18n/es.d.ts +0 -23
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -23
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -23
- package/dist/types-ts4.5/i18n/hr.d.ts +0 -23
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -23
- package/dist/types-ts4.5/i18n/it.d.ts +0 -23
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -23
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -23
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -23
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -23
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -23
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -23
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -23
- package/dist/types-ts4.5/i18n/sk.d.ts +0 -23
- package/dist/types-ts4.5/i18n/sl.d.ts +0 -23
- package/dist/types-ts4.5/i18n/sr_RS.d.ts +0 -23
- package/dist/types-ts4.5/i18n/sr_YR.d.ts +0 -23
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -23
- package/dist/types-ts4.5/i18n/th.d.ts +0 -23
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -23
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -23
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -23
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -23
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -23
- package/dist/types-ts4.5/index.d.ts +0 -34
- package/dist/types-ts4.5/ui/create-form/async-select/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +0 -10
- package/dist/types-ts4.5/ui/create-form/async-select/types.d.ts +0 -23
- package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/create-form/form-footer/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/create-form/form-footer/main.d.ts +0 -11
- package/dist/types-ts4.5/ui/create-form/form-footer/messages.d.ts +0 -12
- package/dist/types-ts4.5/ui/create-form/form-footer/submit-button/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/create-form/form-loader/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +0 -6
- package/dist/types-ts4.5/ui/create-form/form-spy/index.d.ts +0 -12
- package/dist/types-ts4.5/ui/create-form/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/create-form/main.d.ts +0 -55
- package/dist/types-ts4.5/ui/create-form/select/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/create-form/select/main.d.ts +0 -19
- package/dist/types-ts4.5/ui/create-form/select/messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/create-form/select/types.d.ts +0 -27
- package/dist/types-ts4.5/ui/create-form/textfield/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +0 -9
- package/dist/types-ts4.5/ui/create-form/textfield/types.d.ts +0 -14
- package/dist/types-ts4.5/ui/create-form/types.d.ts +0 -6
- package/dist/types-ts4.5/ui/create-form/user-picker/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/create-form/user-picker/main.d.ts +0 -6
- package/dist/types-ts4.5/ui/create-form/user-picker/types.d.ts +0 -23
- package/dist/types-ts4.5/ui/create-form/utils/index.d.ts +0 -13
- package/dist/types-ts4.5/ui/index.d.ts +0 -11
- package/dist/types-ts4.5/ui/inline-create/index.d.ts +0 -4
- package/dist/types-ts4.5/ui/inline-create/inline-analytics/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/inline-create/main.d.ts +0 -4
- package/dist/types-ts4.5/ui/modal-create/index.d.ts +0 -4
- package/dist/types-ts4.5/ui/modal-create/main.d.ts +0 -4
- package/dist/types-ts4.5/ui/modal-create/messages.d.ts +0 -7
package/dist/types/ui/index.d.ts
DELETED
|
@@ -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,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,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,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,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,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,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,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,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,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 +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,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';
|