@atlaskit/link-datasource 3.13.17 → 3.13.18
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 +12 -0
- package/dist/cjs/hooks/useLoadOptions.js +20 -9
- package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +4 -1
- package/dist/cjs/ui/issue-like-table/edit-type/index.js +9 -4
- package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +7 -1
- package/dist/cjs/ui/issue-like-table/edit-type/text/index.js +3 -1
- package/dist/cjs/ui/issue-like-table/edit-type/user/index.js +7 -1
- package/dist/cjs/ui/issue-like-table/index.js +6 -2
- package/dist/cjs/ui/issue-like-table/table-cell-content/index.js +5 -0
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +31 -2
- package/dist/cjs/ui/issue-like-table/table-cell-content/messages.js +14 -0
- package/dist/cjs/ui/issue-like-table/utils.js +21 -1
- package/dist/es2019/hooks/useLoadOptions.js +15 -4
- package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +4 -1
- package/dist/es2019/ui/issue-like-table/edit-type/index.js +9 -4
- package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +5 -1
- package/dist/es2019/ui/issue-like-table/edit-type/text/index.js +3 -1
- package/dist/es2019/ui/issue-like-table/edit-type/user/index.js +5 -1
- package/dist/es2019/ui/issue-like-table/index.js +7 -3
- package/dist/es2019/ui/issue-like-table/table-cell-content/index.js +5 -0
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +33 -3
- package/dist/es2019/ui/issue-like-table/table-cell-content/messages.js +8 -0
- package/dist/es2019/ui/issue-like-table/utils.js +18 -1
- package/dist/esm/hooks/useLoadOptions.js +21 -10
- package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +4 -1
- package/dist/esm/ui/issue-like-table/edit-type/index.js +9 -4
- package/dist/esm/ui/issue-like-table/edit-type/status/index.js +7 -1
- package/dist/esm/ui/issue-like-table/edit-type/text/index.js +3 -1
- package/dist/esm/ui/issue-like-table/edit-type/user/index.js +7 -1
- package/dist/esm/ui/issue-like-table/index.js +7 -3
- package/dist/esm/ui/issue-like-table/table-cell-content/index.js +5 -0
- package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +32 -3
- package/dist/esm/ui/issue-like-table/table-cell-content/messages.js +8 -0
- package/dist/esm/ui/issue-like-table/utils.js +19 -0
- package/dist/types/ui/issue-like-table/edit-type/icon/index.d.ts +1 -0
- package/dist/types/ui/issue-like-table/edit-type/index.d.ts +2 -1
- package/dist/types/ui/issue-like-table/edit-type/status/index.d.ts +1 -0
- package/dist/types/ui/issue-like-table/edit-type/text/index.d.ts +1 -0
- package/dist/types/ui/issue-like-table/edit-type/user/index.d.ts +1 -0
- package/dist/types/ui/issue-like-table/table-cell-content/index.d.ts +2 -1
- package/dist/types/ui/issue-like-table/table-cell-content/inline-edit.d.ts +2 -1
- package/dist/types/ui/issue-like-table/table-cell-content/messages.d.ts +7 -0
- package/dist/types/ui/issue-like-table/utils.d.ts +20 -0
- package/dist/types-ts4.5/ui/issue-like-table/edit-type/icon/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/issue-like-table/edit-type/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/issue-like-table/edit-type/status/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/issue-like-table/edit-type/text/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/issue-like-table/edit-type/user/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/inline-edit.d.ts +2 -1
- package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/issue-like-table/utils.d.ts +20 -0
- package/package.json +3 -3
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["aria-labelledby"];
|
|
1
3
|
import { DatasourceAction } from '../../analytics/types';
|
|
2
4
|
export var COLUMN_BASE_WIDTH = 8;
|
|
3
5
|
var COLUMN_MIN_WIDTH = COLUMN_BASE_WIDTH * 4;
|
|
@@ -52,4 +54,21 @@ export var getColumnAction = function getColumnAction(oldVisibleColumnKeys, newV
|
|
|
52
54
|
} else {
|
|
53
55
|
return DatasourceAction.COLUMN_REORDERED;
|
|
54
56
|
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Remove deprecated `aria-labelledby` prop from select component props.
|
|
61
|
+
*/
|
|
62
|
+
export var getCleanedSelectProps = function getCleanedSelectProps(props) {
|
|
63
|
+
// Component Field auto adds `aria-labelledby` prop, which is deprecated and should not be used - https://hello.jira.atlassian.cloud/browse/ENGHEALTH-14529
|
|
64
|
+
var removedLabelByProps = props['aria-labelledby'],
|
|
65
|
+
selectProps = _objectWithoutProperties(props, _excluded);
|
|
66
|
+
return selectProps;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create id for table header to be used as aria-labelledby on form fields.
|
|
71
|
+
*/
|
|
72
|
+
export var getFieldLabelById = function getFieldLabelById(fieldId) {
|
|
73
|
+
return "datasource-header-title-".concat(fieldId);
|
|
55
74
|
};
|
|
@@ -4,6 +4,7 @@ import { type ExecuteFetch } from '../../../../state/actions';
|
|
|
4
4
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
5
5
|
interface IconEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
6
6
|
currentValue: DatasourceTypeWithOnlyTypeValues<'icon'>;
|
|
7
|
+
labelId?: string;
|
|
7
8
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
8
9
|
executeFetch?: ExecuteFetch;
|
|
9
10
|
}
|
|
@@ -3,9 +3,10 @@ import type InlineEdit from '@atlaskit/inline-edit';
|
|
|
3
3
|
import type { DatasourceType } from '@atlaskit/linking-types';
|
|
4
4
|
import { type ExecuteFetch } from '../../../state/actions';
|
|
5
5
|
import { type DatasourceTypeWithOnlyValues } from '../types';
|
|
6
|
-
export declare const editType: ({ defaultValue, currentValue, setEditValues, executeFetch, }: {
|
|
6
|
+
export declare const editType: ({ defaultValue, currentValue, labelId, setEditValues, executeFetch, }: {
|
|
7
7
|
defaultValue: DatasourceTypeWithOnlyValues;
|
|
8
8
|
currentValue: DatasourceTypeWithOnlyValues;
|
|
9
|
+
labelId?: string | undefined;
|
|
9
10
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
10
11
|
executeFetch?: ExecuteFetch | undefined;
|
|
11
12
|
}) => Pick<React.ComponentProps<typeof InlineEdit>, 'defaultValue' | 'editView'>;
|
|
@@ -4,6 +4,7 @@ import type { ExecuteFetch } from '../../../../state/actions';
|
|
|
4
4
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
5
5
|
interface StatusEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
6
6
|
currentValue: DatasourceTypeWithOnlyTypeValues<'status'>;
|
|
7
|
+
labelId?: string;
|
|
7
8
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
8
9
|
executeFetch?: ExecuteFetch;
|
|
9
10
|
}
|
|
@@ -3,6 +3,7 @@ import { type FieldProps } from '@atlaskit/form';
|
|
|
3
3
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
4
4
|
interface TextEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
5
5
|
currentValue: DatasourceTypeWithOnlyTypeValues<'string'>;
|
|
6
|
+
labelId?: string;
|
|
6
7
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
7
8
|
}
|
|
8
9
|
declare const TextEditType: (props: TextEditTypeProps) => JSX.Element;
|
|
@@ -4,6 +4,7 @@ import type { ExecuteFetch } from '../../../../state/actions';
|
|
|
4
4
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
5
5
|
interface UserEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
6
6
|
currentValue: DatasourceTypeWithOnlyTypeValues<'user'>;
|
|
7
|
+
labelId?: string;
|
|
7
8
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
8
9
|
executeFetch?: ExecuteFetch;
|
|
9
10
|
}
|
|
@@ -4,11 +4,12 @@ import { type TableViewPropsRenderType } from '../types';
|
|
|
4
4
|
interface TableCellContentProps {
|
|
5
5
|
id: string;
|
|
6
6
|
columnKey: string;
|
|
7
|
+
columnTitle: string;
|
|
7
8
|
columnType: DatasourceType['type'];
|
|
8
9
|
/** Used to retrieve cell content from the store */
|
|
9
10
|
renderItem: TableViewPropsRenderType;
|
|
10
11
|
wrappedColumnKeys: string[] | undefined;
|
|
11
12
|
}
|
|
12
13
|
export declare const ReadOnlyCell: ({ id, columnType, wrappedColumnKeys, renderItem, columnKey, }: TableCellContentProps) => JSX.Element | null;
|
|
13
|
-
export declare const TableCellContent: ({ id, columnKey, columnType, renderItem, wrappedColumnKeys, }: TableCellContentProps) => JSX.Element;
|
|
14
|
+
export declare const TableCellContent: ({ id, columnKey, columnTitle, columnType, renderItem, wrappedColumnKeys, }: TableCellContentProps) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -5,10 +5,11 @@ export declare const InlineEditUFOExperience = "inline-edit-rendered";
|
|
|
5
5
|
interface InlineEditProps {
|
|
6
6
|
ari: string;
|
|
7
7
|
columnKey: string;
|
|
8
|
+
columnTitle: string;
|
|
8
9
|
readView: React.ReactNode;
|
|
9
10
|
datasourceTypeWithValues: DatasourceTypeWithOnlyValues;
|
|
10
11
|
execute: (value: string | number) => Promise<AtomicActionExecuteResponse>;
|
|
11
12
|
executeFetch?: <E>(inputs: any) => Promise<E>;
|
|
12
13
|
}
|
|
13
|
-
export declare const InlineEdit: ({ ari, execute, executeFetch, readView, columnKey, datasourceTypeWithValues, }: InlineEditProps) => JSX.Element;
|
|
14
|
+
export declare const InlineEdit: ({ ari, execute, executeFetch, readView, columnKey, columnTitle, datasourceTypeWithValues, }: InlineEditProps) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type FieldProps } from '@atlaskit/form';
|
|
2
3
|
import { DatasourceAction } from '../../analytics/types';
|
|
3
4
|
export declare const COLUMN_BASE_WIDTH = 8;
|
|
4
5
|
export type GetWidthCss = (arg: {
|
|
@@ -21,3 +22,22 @@ export declare const getWidthCss: GetWidthCss;
|
|
|
21
22
|
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
22
23
|
*/
|
|
23
24
|
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
25
|
+
/**
|
|
26
|
+
* Remove deprecated `aria-labelledby` prop from select component props.
|
|
27
|
+
*/
|
|
28
|
+
export declare const getCleanedSelectProps: (props: Omit<FieldProps<string>, 'value'>) => {
|
|
29
|
+
name: string;
|
|
30
|
+
id: string;
|
|
31
|
+
'aria-describedby'?: string | undefined;
|
|
32
|
+
'aria-invalid': "true" | "false";
|
|
33
|
+
onFocus: () => void;
|
|
34
|
+
onBlur: () => void;
|
|
35
|
+
onChange: (value: string | import("react").FormEvent<HTMLInputElement>) => void;
|
|
36
|
+
isDisabled: boolean;
|
|
37
|
+
isRequired: boolean;
|
|
38
|
+
isInvalid: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Create id for table header to be used as aria-labelledby on form fields.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getFieldLabelById: (fieldId: string) => string;
|
|
@@ -4,6 +4,7 @@ import { type ExecuteFetch } from '../../../../state/actions';
|
|
|
4
4
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
5
5
|
interface IconEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
6
6
|
currentValue: DatasourceTypeWithOnlyTypeValues<'icon'>;
|
|
7
|
+
labelId?: string;
|
|
7
8
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
8
9
|
executeFetch?: ExecuteFetch;
|
|
9
10
|
}
|
|
@@ -3,9 +3,10 @@ import type InlineEdit from '@atlaskit/inline-edit';
|
|
|
3
3
|
import type { DatasourceType } from '@atlaskit/linking-types';
|
|
4
4
|
import { type ExecuteFetch } from '../../../state/actions';
|
|
5
5
|
import { type DatasourceTypeWithOnlyValues } from '../types';
|
|
6
|
-
export declare const editType: ({ defaultValue, currentValue, setEditValues, executeFetch, }: {
|
|
6
|
+
export declare const editType: ({ defaultValue, currentValue, labelId, setEditValues, executeFetch, }: {
|
|
7
7
|
defaultValue: DatasourceTypeWithOnlyValues;
|
|
8
8
|
currentValue: DatasourceTypeWithOnlyValues;
|
|
9
|
+
labelId?: string | undefined;
|
|
9
10
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
10
11
|
executeFetch?: ExecuteFetch | undefined;
|
|
11
12
|
}) => Pick<React.ComponentProps<typeof InlineEdit>, 'defaultValue' | 'editView'>;
|
|
@@ -4,6 +4,7 @@ import type { ExecuteFetch } from '../../../../state/actions';
|
|
|
4
4
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
5
5
|
interface StatusEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
6
6
|
currentValue: DatasourceTypeWithOnlyTypeValues<'status'>;
|
|
7
|
+
labelId?: string;
|
|
7
8
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
8
9
|
executeFetch?: ExecuteFetch;
|
|
9
10
|
}
|
|
@@ -3,6 +3,7 @@ import { type FieldProps } from '@atlaskit/form';
|
|
|
3
3
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
4
4
|
interface TextEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
5
5
|
currentValue: DatasourceTypeWithOnlyTypeValues<'string'>;
|
|
6
|
+
labelId?: string;
|
|
6
7
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
7
8
|
}
|
|
8
9
|
declare const TextEditType: (props: TextEditTypeProps) => JSX.Element;
|
|
@@ -4,6 +4,7 @@ import type { ExecuteFetch } from '../../../../state/actions';
|
|
|
4
4
|
import type { DatasourceTypeWithOnlyTypeValues, DatasourceTypeWithOnlyValues } from '../../types';
|
|
5
5
|
interface UserEditTypeProps extends Omit<FieldProps<string>, 'value'> {
|
|
6
6
|
currentValue: DatasourceTypeWithOnlyTypeValues<'user'>;
|
|
7
|
+
labelId?: string;
|
|
7
8
|
setEditValues: React.Dispatch<React.SetStateAction<DatasourceTypeWithOnlyValues>>;
|
|
8
9
|
executeFetch?: ExecuteFetch;
|
|
9
10
|
}
|
|
@@ -4,11 +4,12 @@ import { type TableViewPropsRenderType } from '../types';
|
|
|
4
4
|
interface TableCellContentProps {
|
|
5
5
|
id: string;
|
|
6
6
|
columnKey: string;
|
|
7
|
+
columnTitle: string;
|
|
7
8
|
columnType: DatasourceType['type'];
|
|
8
9
|
/** Used to retrieve cell content from the store */
|
|
9
10
|
renderItem: TableViewPropsRenderType;
|
|
10
11
|
wrappedColumnKeys: string[] | undefined;
|
|
11
12
|
}
|
|
12
13
|
export declare const ReadOnlyCell: ({ id, columnType, wrappedColumnKeys, renderItem, columnKey, }: TableCellContentProps) => JSX.Element | null;
|
|
13
|
-
export declare const TableCellContent: ({ id, columnKey, columnType, renderItem, wrappedColumnKeys, }: TableCellContentProps) => JSX.Element;
|
|
14
|
+
export declare const TableCellContent: ({ id, columnKey, columnTitle, columnType, renderItem, wrappedColumnKeys, }: TableCellContentProps) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -5,10 +5,11 @@ export declare const InlineEditUFOExperience = "inline-edit-rendered";
|
|
|
5
5
|
interface InlineEditProps {
|
|
6
6
|
ari: string;
|
|
7
7
|
columnKey: string;
|
|
8
|
+
columnTitle: string;
|
|
8
9
|
readView: React.ReactNode;
|
|
9
10
|
datasourceTypeWithValues: DatasourceTypeWithOnlyValues;
|
|
10
11
|
execute: (value: string | number) => Promise<AtomicActionExecuteResponse>;
|
|
11
12
|
executeFetch?: <E>(inputs: any) => Promise<E>;
|
|
12
13
|
}
|
|
13
|
-
export declare const InlineEdit: ({ ari, execute, executeFetch, readView, columnKey, datasourceTypeWithValues, }: InlineEditProps) => JSX.Element;
|
|
14
|
+
export declare const InlineEdit: ({ ari, execute, executeFetch, readView, columnKey, columnTitle, datasourceTypeWithValues, }: InlineEditProps) => JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type FieldProps } from '@atlaskit/form';
|
|
2
3
|
import { DatasourceAction } from '../../analytics/types';
|
|
3
4
|
export declare const COLUMN_BASE_WIDTH = 8;
|
|
4
5
|
export type GetWidthCss = (arg: {
|
|
@@ -21,3 +22,22 @@ export declare const getWidthCss: GetWidthCss;
|
|
|
21
22
|
* The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
|
|
22
23
|
*/
|
|
23
24
|
export declare const getColumnAction: (oldVisibleColumnKeys: string[], newVisibleColumnKeys: string[]) => DatasourceAction;
|
|
25
|
+
/**
|
|
26
|
+
* Remove deprecated `aria-labelledby` prop from select component props.
|
|
27
|
+
*/
|
|
28
|
+
export declare const getCleanedSelectProps: (props: Omit<FieldProps<string>, 'value'>) => {
|
|
29
|
+
name: string;
|
|
30
|
+
id: string;
|
|
31
|
+
'aria-describedby'?: string | undefined;
|
|
32
|
+
'aria-invalid': "true" | "false";
|
|
33
|
+
onFocus: () => void;
|
|
34
|
+
onBlur: () => void;
|
|
35
|
+
onChange: (value: string | import("react").FormEvent<HTMLInputElement>) => void;
|
|
36
|
+
isDisabled: boolean;
|
|
37
|
+
isRequired: boolean;
|
|
38
|
+
isInvalid: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Create id for table header to be used as aria-labelledby on form fields.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getFieldLabelById: (fieldId: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.18",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
39
39
|
"@atlaskit/atlassian-context": "^0.0.2",
|
|
40
40
|
"@atlaskit/avatar": "^21.17.0",
|
|
41
|
-
"@atlaskit/avatar-group": "^10.
|
|
41
|
+
"@atlaskit/avatar-group": "^10.1.0",
|
|
42
42
|
"@atlaskit/badge": "^16.4.0",
|
|
43
43
|
"@atlaskit/button": "^20.3.0",
|
|
44
44
|
"@atlaskit/datetime-picker": "^15.9.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/link-client-extension": "^3.0.0",
|
|
61
61
|
"@atlaskit/linking-common": "^6.0.0",
|
|
62
62
|
"@atlaskit/linking-types": "^9.5.0",
|
|
63
|
-
"@atlaskit/logo": "^15.
|
|
63
|
+
"@atlaskit/logo": "^15.1.0",
|
|
64
64
|
"@atlaskit/lozenge": "^11.12.0",
|
|
65
65
|
"@atlaskit/modal-dialog": "^12.18.0",
|
|
66
66
|
"@atlaskit/outbound-auth-flow-client": "^3.4.5",
|