@atlaskit/inline-edit 13.4.1 → 13.5.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.
- package/CHANGELOG.md +22 -1
- package/README.md +2 -1
- package/__perf__/default.tsx +10 -10
- package/__perf__/inline-edit.tsx +31 -36
- package/__perf__/inline-text-field.tsx +9 -9
- package/codemods/12.0.0-lite-mode.ts +4 -4
- package/codemods/__tests__/12.0.0-lite-mode.tsx +21 -21
- package/codemods/__tests__/add-comments-when-validate-found.ts +14 -14
- package/codemods/__tests__/lift-InlineEditStateless-to-default.ts +35 -35
- package/codemods/__tests__/lift-InlineEditableTextField-to-its-entry-point.tsx +21 -21
- package/codemods/__tests__/spread-errorMessage-out-of-fieldProps.tsx +28 -28
- package/codemods/migrates/add-comments-when-validate-found.ts +13 -23
- package/codemods/migrates/lift-InlineEditStateless-to-default.ts +43 -57
- package/codemods/migrates/lift-InlineEditableTextField-to-its-entry-point.ts +29 -42
- package/codemods/migrates/spread-errorMessage-out-of-fieldProps.ts +45 -63
- package/codemods/migrates/utils.ts +62 -70
- package/dist/cjs/inline-edit.js +4 -2
- package/dist/cjs/inline-editable-textfield.js +8 -1
- package/dist/cjs/internal/buttons.js +10 -3
- package/dist/cjs/internal/read-view.js +9 -4
- package/dist/es2019/inline-edit.js +6 -1
- package/dist/es2019/inline-editable-textfield.js +9 -1
- package/dist/es2019/internal/buttons.js +9 -3
- package/dist/es2019/internal/read-view.js +9 -3
- package/dist/esm/inline-edit.js +6 -1
- package/dist/esm/inline-editable-textfield.js +9 -1
- package/dist/esm/internal/buttons.js +9 -3
- package/dist/esm/internal/read-view.js +9 -3
- package/dist/types/internal/buttons.d.ts +3 -0
- package/dist/types/internal/read-view.d.ts +3 -0
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/internal/buttons.d.ts +3 -0
- package/dist/types-ts4.5/internal/read-view.d.ts +3 -0
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/extract-react-types/inline-editable-textfield-props.tsx +2 -4
- package/package.json +109 -109
- package/report.api.md +32 -37
package/package.json
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
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
|
-
}
|
|
2
|
+
"name": "@atlaskit/inline-edit",
|
|
3
|
+
"version": "13.5.1",
|
|
4
|
+
"description": "An inline edit displays a custom input component that switches between reading and editing on the same page.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"atlaskit:src": "src/index.ts",
|
|
25
|
+
"homepage": "https://atlassian.design/components/inline-edit/",
|
|
26
|
+
"atlassian": {
|
|
27
|
+
"team": "Design System Team",
|
|
28
|
+
"releaseModel": "continuous",
|
|
29
|
+
"productPushConsumption": [
|
|
30
|
+
"jira"
|
|
31
|
+
],
|
|
32
|
+
"website": {
|
|
33
|
+
"name": "Inline edit",
|
|
34
|
+
"category": "Components"
|
|
35
|
+
},
|
|
36
|
+
"runReact18": true
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@atlaskit/analytics-next": "^9.3.0",
|
|
40
|
+
"@atlaskit/button": "^17.22.0",
|
|
41
|
+
"@atlaskit/codemod-utils": "^4.2.0",
|
|
42
|
+
"@atlaskit/form": "^10.4.0",
|
|
43
|
+
"@atlaskit/icon": "^22.4.0",
|
|
44
|
+
"@atlaskit/inline-dialog": "^14.2.0",
|
|
45
|
+
"@atlaskit/primitives": "^7.4.0",
|
|
46
|
+
"@atlaskit/textfield": "^6.4.0",
|
|
47
|
+
"@atlaskit/theme": "^12.10.0",
|
|
48
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
49
|
+
"@atlaskit/visually-hidden": "^1.4.0",
|
|
50
|
+
"@babel/runtime": "^7.0.0",
|
|
51
|
+
"@emotion/react": "^11.7.1"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@af/accessibility-testing": "*",
|
|
58
|
+
"@af/integration-testing": "*",
|
|
59
|
+
"@atlaskit/datetime-picker": "^13.6.0",
|
|
60
|
+
"@atlaskit/docs": "*",
|
|
61
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
62
|
+
"@atlaskit/section-message": "^6.5.0",
|
|
63
|
+
"@atlaskit/select": "^17.11.0",
|
|
64
|
+
"@atlaskit/ssr": "*",
|
|
65
|
+
"@atlaskit/tag": "^12.3.0",
|
|
66
|
+
"@atlaskit/tag-group": "^10.4.0",
|
|
67
|
+
"@atlaskit/textarea": "^5.5.0",
|
|
68
|
+
"@atlaskit/visual-regression": "*",
|
|
69
|
+
"@emotion/styled": "^11.0.0",
|
|
70
|
+
"@testing-library/dom": "^8.17.1",
|
|
71
|
+
"@testing-library/react": "^12.1.5",
|
|
72
|
+
"ast-types": "^0.13.3",
|
|
73
|
+
"jscodeshift": "^0.13.0",
|
|
74
|
+
"react-dom": "^16.8.0",
|
|
75
|
+
"react-select-event": "^5.5.0",
|
|
76
|
+
"storybook-addon-performance": "^0.16.0",
|
|
77
|
+
"typescript": "~5.4.2",
|
|
78
|
+
"wait-for-expect": "^1.2.0"
|
|
79
|
+
},
|
|
80
|
+
"keywords": [
|
|
81
|
+
"atlaskit",
|
|
82
|
+
"react",
|
|
83
|
+
"ui"
|
|
84
|
+
],
|
|
85
|
+
"techstack": {
|
|
86
|
+
"@atlassian/frontend": {
|
|
87
|
+
"import-structure": "atlassian-conventions"
|
|
88
|
+
},
|
|
89
|
+
"@repo/internal": {
|
|
90
|
+
"dom-events": "use-bind-event-listener",
|
|
91
|
+
"ui-components": "lite-mode",
|
|
92
|
+
"analytics": "analytics-next",
|
|
93
|
+
"design-tokens": [
|
|
94
|
+
"color",
|
|
95
|
+
"spacing"
|
|
96
|
+
],
|
|
97
|
+
"deprecation": "no-deprecated-imports",
|
|
98
|
+
"styling": [
|
|
99
|
+
"emotion",
|
|
100
|
+
"static"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"af:exports": {
|
|
105
|
+
"./inline-edit": "./src/entry-points/inline-edit.ts",
|
|
106
|
+
"./inline-editable-textfield": "./src/entry-points/inline-editable-textfield.ts",
|
|
107
|
+
"./types": "./src/entry-points/types.ts",
|
|
108
|
+
".": "./src/index.ts"
|
|
109
|
+
}
|
|
110
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/inline-edit"
|
|
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
|
|
@@ -22,60 +23,54 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
22
23
|
|
|
23
24
|
// @public (undocumented)
|
|
24
25
|
interface CommonProps {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
value: any,
|
|
39
|
-
formState: {},
|
|
40
|
-
fieldState: {},
|
|
41
|
-
) => Promise<string | void> | string | void;
|
|
26
|
+
analyticsContext?: Record<string, any>;
|
|
27
|
+
cancelButtonLabel?: string;
|
|
28
|
+
confirmButtonLabel?: string;
|
|
29
|
+
defaultValue: any;
|
|
30
|
+
editButtonLabel?: string;
|
|
31
|
+
hideActionButtons?: boolean;
|
|
32
|
+
isRequired?: boolean;
|
|
33
|
+
keepEditViewOpenOnBlur?: boolean;
|
|
34
|
+
label?: string;
|
|
35
|
+
onCancel?: () => void;
|
|
36
|
+
readViewFitContainerWidth?: boolean;
|
|
37
|
+
startWithEditViewOpen?: boolean;
|
|
38
|
+
validate?: (value: any, formState: {}, fieldState: {}) => Promise<string | void> | string | void;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
// @public (undocumented)
|
|
45
42
|
interface ExtendedFieldProps<FieldValue> extends FieldProps<FieldValue> {
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
// (undocumented)
|
|
44
|
+
errorMessage?: string | undefined;
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
// @public (undocumented)
|
|
51
48
|
const InlineEdit: <FieldValue extends unknown = string>(
|
|
52
|
-
|
|
49
|
+
props: InlineEditProps<FieldValue>,
|
|
53
50
|
) => jsx.JSX.Element;
|
|
54
51
|
export default InlineEdit;
|
|
55
52
|
|
|
56
53
|
// @public (undocumented)
|
|
57
|
-
export const InlineEditableTextfield: (
|
|
58
|
-
props: InlineEditableTextfieldProps,
|
|
59
|
-
) => jsx.JSX.Element;
|
|
54
|
+
export const InlineEditableTextfield: (props: InlineEditableTextfieldProps) => jsx.JSX.Element;
|
|
60
55
|
|
|
61
56
|
// @public (undocumented)
|
|
62
57
|
export interface InlineEditableTextfieldProps extends CommonProps {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
isCompact?: boolean;
|
|
59
|
+
onConfirm: (value: string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
60
|
+
placeholder: string;
|
|
61
|
+
testId?: string;
|
|
67
62
|
}
|
|
68
63
|
|
|
69
64
|
// @public (undocumented)
|
|
70
65
|
export interface InlineEditProps<FieldValue> extends CommonProps {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
editView: (
|
|
67
|
+
fieldProps: ExtendedFieldProps<FieldValue>,
|
|
68
|
+
ref: React_2.RefObject<any>,
|
|
69
|
+
) => React_2.ReactNode;
|
|
70
|
+
isEditing?: boolean;
|
|
71
|
+
onConfirm: (value: any, analyticsEvent: UIAnalyticsEvent) => void;
|
|
72
|
+
onEdit?: () => void;
|
|
73
|
+
readView: () => React_2.ReactNode;
|
|
79
74
|
}
|
|
80
75
|
|
|
81
76
|
// (No @packageDocumentation comment for this package)
|
|
@@ -89,7 +84,7 @@ export interface InlineEditProps<FieldValue> extends CommonProps {
|
|
|
89
84
|
|
|
90
85
|
```json
|
|
91
86
|
{
|
|
92
|
-
|
|
87
|
+
"react": "^16.8.0"
|
|
93
88
|
}
|
|
94
89
|
```
|
|
95
90
|
|