@atlaskit/link-create 2.3.0 → 2.5.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 +24 -0
- package/LICENSE.md +6 -8
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/common/ui/error-boundary-modal/index.js +1 -0
- package/dist/cjs/common/ui/error-boundary-ui/error-svg/index.js +1 -0
- package/dist/cjs/controllers/create-field/main.js +1 -1
- package/dist/cjs/controllers/exit-warning-modal-context/index.js +41 -4
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/ui/create-form/async-select/main.js +1 -0
- package/dist/cjs/ui/create-form/form-footer/main.js +1 -0
- package/dist/cjs/ui/create-form/form-loader/main.js +2 -0
- package/dist/cjs/ui/create-form/main.js +2 -1
- package/dist/cjs/ui/create-form/select/main.js +1 -0
- package/dist/cjs/ui/create-form/textfield/main.js +1 -0
- package/dist/cjs/ui/create-form/user-picker/main.js +2 -1
- package/dist/cjs/ui/inline-create/index.js +3 -7
- package/dist/cjs/ui/inline-create/main.js +19 -29
- package/dist/cjs/ui/modal-create/index.js +2 -0
- package/dist/cjs/ui/modal-create/main.js +9 -17
- package/dist/es2019/common/constants.js +1 -1
- package/dist/es2019/common/ui/error-boundary-modal/index.js +1 -0
- package/dist/es2019/common/ui/error-boundary-ui/error-svg/index.js +1 -0
- package/dist/es2019/controllers/create-field/main.js +1 -0
- package/dist/es2019/controllers/exit-warning-modal-context/index.js +30 -4
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/ui/create-form/async-select/main.js +2 -0
- package/dist/es2019/ui/create-form/form-footer/main.js +1 -0
- package/dist/es2019/ui/create-form/form-loader/main.js +2 -0
- package/dist/es2019/ui/create-form/main.js +3 -0
- package/dist/es2019/ui/create-form/select/main.js +1 -0
- package/dist/es2019/ui/create-form/textfield/main.js +1 -0
- package/dist/es2019/ui/create-form/user-picker/main.js +2 -1
- package/dist/es2019/ui/inline-create/index.js +3 -7
- package/dist/es2019/ui/inline-create/main.js +9 -15
- package/dist/es2019/ui/modal-create/index.js +2 -0
- package/dist/es2019/ui/modal-create/main.js +9 -13
- package/dist/esm/common/constants.js +1 -1
- package/dist/esm/common/ui/error-boundary-modal/index.js +1 -0
- package/dist/esm/common/ui/error-boundary-ui/error-svg/index.js +1 -0
- package/dist/esm/controllers/create-field/main.js +1 -0
- package/dist/esm/controllers/exit-warning-modal-context/index.js +40 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/ui/create-form/async-select/main.js +2 -0
- package/dist/esm/ui/create-form/form-footer/main.js +1 -0
- package/dist/esm/ui/create-form/form-loader/main.js +2 -0
- package/dist/esm/ui/create-form/main.js +3 -0
- package/dist/esm/ui/create-form/select/main.js +1 -0
- package/dist/esm/ui/create-form/textfield/main.js +1 -0
- package/dist/esm/ui/create-form/user-picker/main.js +2 -1
- package/dist/esm/ui/inline-create/index.js +3 -7
- package/dist/esm/ui/inline-create/main.js +10 -20
- package/dist/esm/ui/modal-create/index.js +2 -0
- package/dist/esm/ui/modal-create/main.js +10 -18
- package/dist/types/controllers/exit-warning-modal-context/index.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/inline-create/main.d.ts +1 -0
- package/dist/types-ts4.5/controllers/exit-warning-modal-context/index.d.ts +4 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/inline-create/main.d.ts +1 -0
- package/package.json +120 -118
- package/report.api.md +103 -111
package/package.json
CHANGED
|
@@ -1,119 +1,121 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
2
|
+
"name": "@atlaskit/link-create",
|
|
3
|
+
"version": "2.5.0",
|
|
4
|
+
"description": "The driver component of meta creation flow",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Linking Platform",
|
|
12
|
+
"inPublicMirror": false,
|
|
13
|
+
"releaseModel": "continuous",
|
|
14
|
+
"productPushConsumption": [
|
|
15
|
+
"jira"
|
|
16
|
+
],
|
|
17
|
+
"website": {
|
|
18
|
+
"name": "LinkCreate"
|
|
19
|
+
},
|
|
20
|
+
"i18n": true
|
|
21
|
+
},
|
|
22
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
23
|
+
"main": "dist/cjs/index.js",
|
|
24
|
+
"module": "dist/esm/index.js",
|
|
25
|
+
"module:es2019": "dist/es2019/index.js",
|
|
26
|
+
"types": "dist/types/index.d.ts",
|
|
27
|
+
"typesVersions": {
|
|
28
|
+
">=4.5 <4.9": {
|
|
29
|
+
"*": [
|
|
30
|
+
"dist/types-ts4.5/*",
|
|
31
|
+
"dist/types-ts4.5/index.d.ts"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"atlaskit:src": "src/index.ts",
|
|
37
|
+
"af:exports": {
|
|
38
|
+
".": "./src/index.ts"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@atlaskit/analytics-next": "^9.3.0",
|
|
42
|
+
"@atlaskit/button": "^17.17.0",
|
|
43
|
+
"@atlaskit/empty-state": "^7.8.0",
|
|
44
|
+
"@atlaskit/form": "^10.4.0",
|
|
45
|
+
"@atlaskit/icon": "^22.4.0",
|
|
46
|
+
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
47
|
+
"@atlaskit/linking-common": "^5.7.0",
|
|
48
|
+
"@atlaskit/modal-dialog": "^12.14.0",
|
|
49
|
+
"@atlaskit/primitives": "^7.4.0",
|
|
50
|
+
"@atlaskit/select": "^17.11.0",
|
|
51
|
+
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
52
|
+
"@atlaskit/spinner": "^16.2.0",
|
|
53
|
+
"@atlaskit/textfield": "^6.4.0",
|
|
54
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
55
|
+
"@babel/runtime": "^7.0.0",
|
|
56
|
+
"@emotion/react": "^11.7.1",
|
|
57
|
+
"debounce-promise": "^3.1.2",
|
|
58
|
+
"final-form": "^4.20.3",
|
|
59
|
+
"react-final-form": "^6.5.3"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"react": "^16.8.0",
|
|
63
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@af/integration-testing": "*",
|
|
67
|
+
"@af/visual-regression": "*",
|
|
68
|
+
"@atlaskit/drawer": "^7.11.0",
|
|
69
|
+
"@atlaskit/link-test-helpers": "^7.0.0",
|
|
70
|
+
"@atlaskit/visual-regression": "*",
|
|
71
|
+
"@atlassian/feature-flags-test-utils": "*",
|
|
72
|
+
"@testing-library/react": "^12.1.5",
|
|
73
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
74
|
+
"@testing-library/user-event": "^14.4.3",
|
|
75
|
+
"@types/debounce-promise": "^3.1.2",
|
|
76
|
+
"fetch-mock": "^8.0.0",
|
|
77
|
+
"react-dom": "^16.8.0",
|
|
78
|
+
"typescript": "~5.4.2",
|
|
79
|
+
"wait-for-expect": "^1.2.0"
|
|
80
|
+
},
|
|
81
|
+
"scripts": {
|
|
82
|
+
"codegen-analytics": "yarn run ts-analytics-codegen --command='yarn workspace @atlaskit/link-create run codegen-analytics'"
|
|
83
|
+
},
|
|
84
|
+
"techstack": {
|
|
85
|
+
"@atlassian/frontend": {
|
|
86
|
+
"code-structure": [
|
|
87
|
+
"tangerine-next"
|
|
88
|
+
],
|
|
89
|
+
"import-structure": [
|
|
90
|
+
"atlassian-conventions"
|
|
91
|
+
],
|
|
92
|
+
"circular-dependencies": [
|
|
93
|
+
"file-and-folder-level"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"@repo/internal": {
|
|
97
|
+
"dom-events": "use-bind-event-listener",
|
|
98
|
+
"analytics": [
|
|
99
|
+
"analytics-next"
|
|
100
|
+
],
|
|
101
|
+
"theming": [
|
|
102
|
+
"react-context",
|
|
103
|
+
"tokens"
|
|
104
|
+
],
|
|
105
|
+
"ui-components": [
|
|
106
|
+
"lite-mode"
|
|
107
|
+
],
|
|
108
|
+
"deprecation": [
|
|
109
|
+
"no-deprecated-imports"
|
|
110
|
+
],
|
|
111
|
+
"styling": [
|
|
112
|
+
"static",
|
|
113
|
+
"emotion"
|
|
114
|
+
],
|
|
115
|
+
"imports": [
|
|
116
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"platform-feature-flags": {}
|
|
121
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/link-create"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -32,85 +33,76 @@ import { TextFieldProps as TextFieldProps_2 } from '@atlaskit/textfield';
|
|
|
32
33
|
|
|
33
34
|
// @public
|
|
34
35
|
export function AsyncSelect<T = OptionType>({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
id,
|
|
37
|
+
name,
|
|
38
|
+
label,
|
|
39
|
+
isRequired,
|
|
40
|
+
validators,
|
|
41
|
+
validationHelpText,
|
|
42
|
+
testId,
|
|
43
|
+
defaultOption: propsDefaultValue,
|
|
44
|
+
loadOptions: loadOptionsFn,
|
|
45
|
+
...restProps
|
|
45
46
|
}: AsyncSelectProps<T>): jsx.JSX.Element;
|
|
46
47
|
|
|
47
48
|
// @public (undocumented)
|
|
48
|
-
type AsyncSelectProps<T = OptionType> = Omit<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
isRequired?: boolean;
|
|
57
|
-
validators?: Validator[];
|
|
58
|
-
loadOptions?: (inputValue: string) => Promise<GroupType<T>[] | T[]>;
|
|
49
|
+
type AsyncSelectProps<T = OptionType> = Omit<AsyncSelectProps_2<T>, 'loadOptions'> & {
|
|
50
|
+
name: string;
|
|
51
|
+
label: string;
|
|
52
|
+
validationHelpText?: string;
|
|
53
|
+
testId?: string;
|
|
54
|
+
isRequired?: boolean;
|
|
55
|
+
validators?: Validator[];
|
|
56
|
+
loadOptions?: (inputValue: string) => Promise<GroupType<T>[] | T[]>;
|
|
59
57
|
};
|
|
60
58
|
|
|
61
59
|
// @public (undocumented)
|
|
62
|
-
const ComposedLinkCreate: MemoExoticComponent<
|
|
63
|
-
(props: LinkCreateWithModalProps) => jsx.JSX.Element
|
|
64
|
-
>;
|
|
60
|
+
const ComposedLinkCreate: MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
|
|
65
61
|
export default ComposedLinkCreate;
|
|
66
62
|
|
|
67
63
|
// @public (undocumented)
|
|
68
64
|
export const CreateForm: <FormData_1 extends Record<string, any> = {}>({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
children,
|
|
66
|
+
testId,
|
|
67
|
+
onSubmit,
|
|
68
|
+
onCancel,
|
|
69
|
+
isLoading,
|
|
70
|
+
hideFooter,
|
|
71
|
+
initialValues,
|
|
76
72
|
}: CreateFormProps<FormData_1>) => jsx.JSX.Element;
|
|
77
73
|
|
|
78
74
|
// @public
|
|
79
|
-
export function CreateFormLoader({
|
|
80
|
-
size,
|
|
81
|
-
}: Partial<SpinnerProps>): jsx.JSX.Element;
|
|
75
|
+
export function CreateFormLoader({ size }: Partial<SpinnerProps>): jsx.JSX.Element;
|
|
82
76
|
|
|
83
77
|
// @public (undocumented)
|
|
84
78
|
export interface CreateFormProps<FormData> {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
) => Errors | Promise<Errors | void> | void;
|
|
93
|
-
testId?: string;
|
|
79
|
+
children: ReactNode;
|
|
80
|
+
hideFooter?: boolean;
|
|
81
|
+
initialValues?: DisallowReservedFields<FormData>;
|
|
82
|
+
isLoading?: boolean;
|
|
83
|
+
onCancel?: () => void;
|
|
84
|
+
onSubmit: (data: OmitReservedFields<FormData>) => Errors | Promise<Errors | void> | void;
|
|
85
|
+
testId?: string;
|
|
94
86
|
}
|
|
95
87
|
|
|
96
88
|
// @public
|
|
97
89
|
export type CreatePayload = {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
url: string;
|
|
91
|
+
ari?: string | undefined;
|
|
92
|
+
objectId: string;
|
|
93
|
+
objectType: string;
|
|
94
|
+
data?: Record<string, unknown>;
|
|
103
95
|
};
|
|
104
96
|
|
|
105
97
|
// @public (undocumented)
|
|
106
98
|
type DisallowReservedFields<T> = T & {
|
|
107
|
-
|
|
99
|
+
[Field in (typeof RESERVED_FIELDS)[number]]?: never;
|
|
108
100
|
};
|
|
109
101
|
|
|
110
102
|
// @public (undocumented)
|
|
111
103
|
export type EditViewProps = {
|
|
112
|
-
|
|
113
|
-
|
|
104
|
+
payload: CreatePayload;
|
|
105
|
+
onClose: () => void;
|
|
114
106
|
};
|
|
115
107
|
|
|
116
108
|
// @public (undocumented)
|
|
@@ -120,19 +112,19 @@ export { FORM_ERROR };
|
|
|
120
112
|
|
|
121
113
|
// @public
|
|
122
114
|
export const FormSpy: <T extends Record<string, unknown>>({
|
|
123
|
-
|
|
115
|
+
children,
|
|
124
116
|
}: FormSpyProps<T>) => JSX.Element;
|
|
125
117
|
|
|
126
118
|
// @public (undocumented)
|
|
127
119
|
type FormSpyProps<T> = {
|
|
128
|
-
|
|
120
|
+
children: ({ values }: { values: T }) => React_2.ReactNode;
|
|
129
121
|
};
|
|
130
122
|
|
|
131
123
|
// @public (undocumented)
|
|
132
124
|
interface Group {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
125
|
+
icon: string;
|
|
126
|
+
key: string;
|
|
127
|
+
label: string;
|
|
136
128
|
}
|
|
137
129
|
|
|
138
130
|
// @public (undocumented)
|
|
@@ -140,41 +132,41 @@ export const LinkCreateCallbackProvider: React_2.FC<LinkCreateCallbackProviderPr
|
|
|
140
132
|
|
|
141
133
|
// @public (undocumented)
|
|
142
134
|
interface LinkCreateCallbackProviderProps {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
135
|
+
onCancel?: () => void;
|
|
136
|
+
onCreate?: (result: CreatePayload) => Promise<void> | void;
|
|
137
|
+
onFailure?: (error: unknown) => void;
|
|
146
138
|
}
|
|
147
139
|
|
|
148
140
|
// @public (undocumented)
|
|
149
141
|
export interface LinkCreatePlugin {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
142
|
+
editView?: ({ payload, onClose }: EditViewProps) => JSX.Element;
|
|
143
|
+
form: ReactNode;
|
|
144
|
+
group: Group;
|
|
145
|
+
icon: string;
|
|
146
|
+
key: string;
|
|
147
|
+
label: string;
|
|
156
148
|
}
|
|
157
149
|
|
|
158
150
|
// @public (undocumented)
|
|
159
151
|
export interface LinkCreateProps {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
152
|
+
entityKey: string;
|
|
153
|
+
groupKey?: string;
|
|
154
|
+
onCancel?: () => void;
|
|
155
|
+
onComplete?: () => void;
|
|
156
|
+
onCreate?: (payload: CreatePayload) => Promise<void> | void;
|
|
157
|
+
onFailure?: (error: unknown) => void;
|
|
158
|
+
// (undocumented)
|
|
159
|
+
plugins: LinkCreatePlugin[];
|
|
160
|
+
testId?: string;
|
|
161
|
+
triggeredFrom?: string;
|
|
170
162
|
}
|
|
171
163
|
|
|
172
164
|
// @public (undocumented)
|
|
173
165
|
export interface LinkCreateWithModalProps
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
166
|
+
extends LinkCreateProps,
|
|
167
|
+
Partial<Pick<ModalDialogProps, 'onCloseComplete' | 'onOpenComplete'>> {
|
|
168
|
+
active?: boolean;
|
|
169
|
+
modalTitle?: string;
|
|
178
170
|
}
|
|
179
171
|
|
|
180
172
|
// @public (undocumented)
|
|
@@ -185,49 +177,49 @@ const RESERVED_FIELDS: readonly ['__post_create__'];
|
|
|
185
177
|
|
|
186
178
|
// @public (undocumented)
|
|
187
179
|
type ReservedFields = {
|
|
188
|
-
|
|
180
|
+
[Field in (typeof RESERVED_FIELDS)[number]]?: unknown;
|
|
189
181
|
};
|
|
190
182
|
|
|
191
183
|
// @public
|
|
192
184
|
export function Select<T = OptionType>({
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
185
|
+
id,
|
|
186
|
+
name,
|
|
187
|
+
label,
|
|
188
|
+
isRequired,
|
|
189
|
+
validators,
|
|
190
|
+
validationHelpText,
|
|
191
|
+
testId,
|
|
192
|
+
...restProps
|
|
201
193
|
}: SelectProps<T>): jsx.JSX.Element;
|
|
202
194
|
|
|
203
195
|
// @public (undocumented)
|
|
204
196
|
type SelectProps<T = OptionType> = SelectProps_2<T> & {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
197
|
+
name: string;
|
|
198
|
+
label: string;
|
|
199
|
+
validationHelpText?: string;
|
|
200
|
+
testId?: string;
|
|
201
|
+
isRequired?: boolean;
|
|
202
|
+
validators?: Validator[];
|
|
211
203
|
};
|
|
212
204
|
|
|
213
205
|
// @public
|
|
214
206
|
export function TextField({
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
207
|
+
id,
|
|
208
|
+
name,
|
|
209
|
+
label,
|
|
210
|
+
isRequired,
|
|
211
|
+
validators,
|
|
212
|
+
validationHelpText,
|
|
213
|
+
testId,
|
|
214
|
+
...restProps
|
|
223
215
|
}: TextFieldProps): jsx.JSX.Element;
|
|
224
216
|
|
|
225
217
|
// @public (undocumented)
|
|
226
218
|
type TextFieldProps = Omit<TextFieldProps_2, 'name'> & {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
name: string;
|
|
220
|
+
label?: string;
|
|
221
|
+
validationHelpText?: string;
|
|
222
|
+
validators?: Validator[];
|
|
231
223
|
};
|
|
232
224
|
|
|
233
225
|
// @public (undocumented)
|
|
@@ -235,8 +227,8 @@ export const useLinkCreateCallback: () => LinkCreateCallbackProviderProps;
|
|
|
235
227
|
|
|
236
228
|
// @public (undocumented)
|
|
237
229
|
export type Validator = {
|
|
238
|
-
|
|
239
|
-
|
|
230
|
+
isValid: (val: unknown) => boolean;
|
|
231
|
+
errorMessage: string;
|
|
240
232
|
};
|
|
241
233
|
|
|
242
234
|
// @public
|
|
@@ -253,8 +245,8 @@ export type ValidatorMap = Record<string, Validator[]>;
|
|
|
253
245
|
|
|
254
246
|
```json
|
|
255
247
|
{
|
|
256
|
-
|
|
257
|
-
|
|
248
|
+
"react": "^16.8.0",
|
|
249
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
258
250
|
}
|
|
259
251
|
```
|
|
260
252
|
|