@atlaskit/link-datasource 3.13.17 → 3.14.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/hooks/useDatasourceTableFlag.js +3 -2
  3. package/dist/cjs/hooks/useLoadOptions.js +20 -9
  4. package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +4 -1
  5. package/dist/cjs/ui/issue-like-table/edit-type/index.js +9 -4
  6. package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +7 -1
  7. package/dist/cjs/ui/issue-like-table/edit-type/text/index.js +3 -1
  8. package/dist/cjs/ui/issue-like-table/edit-type/user/index.js +7 -1
  9. package/dist/cjs/ui/issue-like-table/index.js +6 -2
  10. package/dist/cjs/ui/issue-like-table/table-cell-content/index.js +5 -0
  11. package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +31 -2
  12. package/dist/cjs/ui/issue-like-table/table-cell-content/messages.js +14 -0
  13. package/dist/cjs/ui/issue-like-table/utils.js +21 -1
  14. package/dist/es2019/hooks/useDatasourceTableFlag.js +3 -2
  15. package/dist/es2019/hooks/useLoadOptions.js +15 -4
  16. package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +4 -1
  17. package/dist/es2019/ui/issue-like-table/edit-type/index.js +9 -4
  18. package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +5 -1
  19. package/dist/es2019/ui/issue-like-table/edit-type/text/index.js +3 -1
  20. package/dist/es2019/ui/issue-like-table/edit-type/user/index.js +5 -1
  21. package/dist/es2019/ui/issue-like-table/index.js +7 -3
  22. package/dist/es2019/ui/issue-like-table/table-cell-content/index.js +5 -0
  23. package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +33 -3
  24. package/dist/es2019/ui/issue-like-table/table-cell-content/messages.js +8 -0
  25. package/dist/es2019/ui/issue-like-table/utils.js +18 -1
  26. package/dist/esm/hooks/useDatasourceTableFlag.js +3 -2
  27. package/dist/esm/hooks/useLoadOptions.js +21 -10
  28. package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +4 -1
  29. package/dist/esm/ui/issue-like-table/edit-type/index.js +9 -4
  30. package/dist/esm/ui/issue-like-table/edit-type/status/index.js +7 -1
  31. package/dist/esm/ui/issue-like-table/edit-type/text/index.js +3 -1
  32. package/dist/esm/ui/issue-like-table/edit-type/user/index.js +7 -1
  33. package/dist/esm/ui/issue-like-table/index.js +7 -3
  34. package/dist/esm/ui/issue-like-table/table-cell-content/index.js +5 -0
  35. package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +32 -3
  36. package/dist/esm/ui/issue-like-table/table-cell-content/messages.js +8 -0
  37. package/dist/esm/ui/issue-like-table/utils.js +19 -0
  38. package/dist/types/ui/issue-like-table/edit-type/icon/index.d.ts +1 -0
  39. package/dist/types/ui/issue-like-table/edit-type/index.d.ts +2 -1
  40. package/dist/types/ui/issue-like-table/edit-type/status/index.d.ts +1 -0
  41. package/dist/types/ui/issue-like-table/edit-type/text/index.d.ts +1 -0
  42. package/dist/types/ui/issue-like-table/edit-type/user/index.d.ts +1 -0
  43. package/dist/types/ui/issue-like-table/table-cell-content/index.d.ts +2 -1
  44. package/dist/types/ui/issue-like-table/table-cell-content/inline-edit.d.ts +2 -1
  45. package/dist/types/ui/issue-like-table/table-cell-content/messages.d.ts +7 -0
  46. package/dist/types/ui/issue-like-table/utils.d.ts +20 -0
  47. package/dist/types-ts4.5/ui/issue-like-table/edit-type/icon/index.d.ts +1 -0
  48. package/dist/types-ts4.5/ui/issue-like-table/edit-type/index.d.ts +2 -1
  49. package/dist/types-ts4.5/ui/issue-like-table/edit-type/status/index.d.ts +1 -0
  50. package/dist/types-ts4.5/ui/issue-like-table/edit-type/text/index.d.ts +1 -0
  51. package/dist/types-ts4.5/ui/issue-like-table/edit-type/user/index.d.ts +1 -0
  52. package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/index.d.ts +2 -1
  53. package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/inline-edit.d.ts +2 -1
  54. package/dist/types-ts4.5/ui/issue-like-table/table-cell-content/messages.d.ts +7 -0
  55. package/dist/types-ts4.5/ui/issue-like-table/utils.d.ts +20 -0
  56. package/package.json +8 -8
@@ -75,6 +75,7 @@ var InlineEditableCell = function InlineEditableCell(_ref3) {
75
75
  var ari = _ref3.ari,
76
76
  values = _ref3.values,
77
77
  columnKey = _ref3.columnKey,
78
+ columnTitle = _ref3.columnTitle,
78
79
  renderItem = _ref3.renderItem,
79
80
  integrationKey = _ref3.integrationKey,
80
81
  wrappedColumnKeys = _ref3.wrappedColumnKeys;
@@ -114,6 +115,7 @@ var InlineEditableCell = function InlineEditableCell(_ref3) {
114
115
  executeFetch: executeFetch,
115
116
  readView: readView,
116
117
  columnKey: columnKey,
118
+ columnTitle: columnTitle,
117
119
  datasourceTypeWithValues: values
118
120
  });
119
121
  };
@@ -133,6 +135,7 @@ var toDatasourceTypeWithValues = function toDatasourceTypeWithValues(_ref4) {
133
135
  export var TableCellContent = function TableCellContent(_ref5) {
134
136
  var id = _ref5.id,
135
137
  columnKey = _ref5.columnKey,
138
+ columnTitle = _ref5.columnTitle,
136
139
  columnType = _ref5.columnType,
137
140
  renderItem = _ref5.renderItem,
138
141
  wrappedColumnKeys = _ref5.wrappedColumnKeys;
@@ -148,6 +151,7 @@ export var TableCellContent = function TableCellContent(_ref5) {
148
151
  return /*#__PURE__*/React.createElement(InlineEditableCell, {
149
152
  ari: ari,
150
153
  columnKey: columnKey,
154
+ columnTitle: columnTitle,
151
155
  renderItem: renderItem,
152
156
  integrationKey: integrationKey,
153
157
  values: toDatasourceTypeWithValues({
@@ -167,6 +171,7 @@ export var TableCellContent = function TableCellContent(_ref5) {
167
171
  }, /*#__PURE__*/React.createElement(ReadOnlyCell, {
168
172
  id: id,
169
173
  columnKey: columnKey,
174
+ columnTitle: columnTitle,
170
175
  columnType: columnType,
171
176
  wrappedColumnKeys: wrappedColumnKeys,
172
177
  renderItem: renderItem
@@ -4,7 +4,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
- import React, { useCallback, useState } from 'react';
7
+ import React, { useCallback, useMemo, useState } from 'react';
8
+ import { useIntl } from 'react-intl-next';
8
9
  import AKInlineEdit from '@atlaskit/inline-edit';
9
10
  import { Box, xcss } from '@atlaskit/primitives';
10
11
  import { useSmartLinkReload } from '@atlaskit/smart-card/hooks';
@@ -15,6 +16,8 @@ import { useDatasourceTableFlag } from '../../../hooks/useDatasourceTableFlag';
15
16
  import { useDatasourceActions, useDatasourceItem } from '../../../state';
16
17
  import { editType } from '../edit-type';
17
18
  import { EmptyAvatar } from '../shared-components/avatar';
19
+ import { getFieldLabelById } from '../utils';
20
+ import { tableCellMessages } from './messages';
18
21
  export var InlineEditUFOExperience = 'inline-edit-rendered';
19
22
  var editContainerStyles = xcss({
20
23
  marginBlockStart: 'space.negative.100'
@@ -33,6 +36,21 @@ var getBackendUpdateValue = function getBackendUpdateValue(typedNewValue) {
33
36
  }
34
37
  throw new Error("Datasource 2 way sync Backend update value not implemented for type ".concat(typedNewValue.type));
35
38
  };
39
+ var getCurrentFieldLabel = function getCurrentFieldLabel(typedNewValue) {
40
+ var _typedNewValue$values4, _typedNewValue$values5, _typedNewValue$values6;
41
+ switch (typedNewValue.type) {
42
+ case 'string':
43
+ return typedNewValue.values[0] || '';
44
+ case 'status':
45
+ return ((_typedNewValue$values4 = typedNewValue.values[0]) === null || _typedNewValue$values4 === void 0 ? void 0 : _typedNewValue$values4.text) || '';
46
+ case 'user':
47
+ return ((_typedNewValue$values5 = typedNewValue.values[0]) === null || _typedNewValue$values5 === void 0 ? void 0 : _typedNewValue$values5.displayName) || '';
48
+ case 'icon':
49
+ return ((_typedNewValue$values6 = typedNewValue.values[0]) === null || _typedNewValue$values6 === void 0 ? void 0 : _typedNewValue$values6.text) || '';
50
+ default:
51
+ return '';
52
+ }
53
+ };
36
54
  var mapUpdatedItem = function mapUpdatedItem(existingItem, columnKey, newValue) {
37
55
  switch (newValue.type) {
38
56
  case 'string':
@@ -73,6 +91,7 @@ export var InlineEdit = function InlineEdit(_ref) {
73
91
  executeFetch = _ref.executeFetch,
74
92
  readView = _ref.readView,
75
93
  columnKey = _ref.columnKey,
94
+ columnTitle = _ref.columnTitle,
76
95
  datasourceTypeWithValues = _ref.datasourceTypeWithValues;
77
96
  var _useState = useState(false),
78
97
  _useState2 = _slicedToArray(_useState, 2),
@@ -143,13 +162,22 @@ export var InlineEdit = function InlineEdit(_ref) {
143
162
  });
144
163
  }
145
164
  }, [columnKey, entityType, fireEvent, integrationKey]);
165
+ var _useIntl = useIntl(),
166
+ formatMessage = _useIntl.formatMessage;
167
+ var editButtonLabel = useMemo(function () {
168
+ return formatMessage(tableCellMessages.editButtonLabel, {
169
+ fieldName: columnTitle,
170
+ fieldValue: getCurrentFieldLabel(editValues)
171
+ });
172
+ }, [columnTitle, formatMessage, editValues]);
146
173
  return /*#__PURE__*/React.createElement(Box, {
147
174
  xcss: editContainerStyles
148
175
  }, /*#__PURE__*/React.createElement(AKInlineEdit, _extends({}, editType({
149
176
  defaultValue: datasourceTypeWithValues,
150
177
  currentValue: editValues,
151
178
  setEditValues: setEditValues,
152
- executeFetch: executeFetch
179
+ executeFetch: executeFetch,
180
+ labelId: getFieldLabelById(columnKey)
153
181
  }), {
154
182
  hideActionButtons: true,
155
183
  readView: editableRenderType({
@@ -162,7 +190,8 @@ export var InlineEdit = function InlineEdit(_ref) {
162
190
  onCancel: onCancelEdit,
163
191
  onConfirm: function onConfirm() {
164
192
  return onCommitUpdate(editValues);
165
- }
193
+ },
194
+ editButtonLabel: editButtonLabel
166
195
  })));
167
196
  };
168
197
 
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var tableCellMessages = defineMessages({
3
+ editButtonLabel: {
4
+ id: 'linkDataSource.issue-line-table.edit-button-label.non-final',
5
+ description: 'Label of inline editable field, used mostly for screen readers. This label is used to describe the field that is editable and can be changed. e.g John Doe, Assignee field',
6
+ defaultMessage: '{fieldValue}, {fieldName} field'
7
+ }
8
+ });
@@ -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 {};
@@ -0,0 +1,7 @@
1
+ export declare const tableCellMessages: {
2
+ editButtonLabel: {
3
+ id: string;
4
+ description: string;
5
+ defaultMessage: string;
6
+ };
7
+ };
@@ -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 {};
@@ -0,0 +1,7 @@
1
+ export declare const tableCellMessages: {
2
+ editButtonLabel: {
3
+ id: string;
4
+ description: string;
5
+ defaultMessage: string;
6
+ };
7
+ };
@@ -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.17",
3
+ "version": "3.14.0",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,10 +35,10 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@atlaskit/adf-schema": "^46.1.0",
38
- "@atlaskit/analytics-next": "^10.1.0",
38
+ "@atlaskit/analytics-next": "^10.2.0",
39
39
  "@atlaskit/atlassian-context": "^0.0.2",
40
40
  "@atlaskit/avatar": "^21.17.0",
41
- "@atlaskit/avatar-group": "^10.0.0",
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",
@@ -48,19 +48,19 @@
48
48
  "@atlaskit/flag": "^15.8.0",
49
49
  "@atlaskit/form": "^10.6.0",
50
50
  "@atlaskit/heading": "^4.0.0",
51
- "@atlaskit/icon": "^23.0.0",
51
+ "@atlaskit/icon": "^23.1.0",
52
52
  "@atlaskit/icon-object": "^6.9.0",
53
53
  "@atlaskit/image": "^1.3.0",
54
54
  "@atlaskit/inline-edit": "^13.7.0",
55
55
  "@atlaskit/intl-messages-provider": "^1.0.0",
56
56
  "@atlaskit/jql-ast": "^3.3.0",
57
- "@atlaskit/jql-editor": "^4.11.0",
57
+ "@atlaskit/jql-editor": "^4.12.0",
58
58
  "@atlaskit/jql-editor-autocomplete-rest": "^2.1.0",
59
59
  "@atlaskit/layering": "^0.8.0",
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.0.0",
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",
@@ -73,7 +73,7 @@
73
73
  "@atlaskit/primitives": "^13.3.0",
74
74
  "@atlaskit/react-select": "^1.5.0",
75
75
  "@atlaskit/select": "^18.8.0",
76
- "@atlaskit/smart-card": "^32.5.0",
76
+ "@atlaskit/smart-card": "^32.7.0",
77
77
  "@atlaskit/smart-user-picker": "6.11.2",
78
78
  "@atlaskit/spinner": "^16.3.0",
79
79
  "@atlaskit/tag": "^12.6.0",
@@ -101,7 +101,7 @@
101
101
  "devDependencies": {
102
102
  "@af/integration-testing": "*",
103
103
  "@af/visual-regression": "*",
104
- "@atlaskit/link-provider": "^1.17.0",
104
+ "@atlaskit/link-provider": "^1.18.0",
105
105
  "@atlaskit/link-test-helpers": "^7.5.0",
106
106
  "@atlaskit/ssr": "*",
107
107
  "@atlaskit/visual-regression": "*",