@atlaskit/link-datasource 4.28.0 → 4.29.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 +14 -0
- package/compass.yml +3 -0
- package/dist/cjs/contexts/datasource-experience-id/index.js +3 -0
- package/dist/cjs/hooks/useDatasourceTableFlag.js +2 -1
- package/dist/cjs/state/index.js +2 -1
- package/dist/cjs/ui/issue-like-table/edit-type/index.js +1 -3
- package/dist/cjs/ui/issue-like-table/index.compiled.css +1 -0
- package/dist/cjs/ui/issue-like-table/index.js +2 -1
- package/dist/cjs/ui/issue-like-table/render-type/user/index.js +1 -8
- package/dist/es2019/contexts/datasource-experience-id/index.js +3 -0
- package/dist/es2019/hooks/useDatasourceTableFlag.js +2 -0
- package/dist/es2019/state/index.js +2 -0
- package/dist/es2019/ui/issue-like-table/edit-type/index.js +1 -2
- package/dist/es2019/ui/issue-like-table/index.compiled.css +1 -0
- package/dist/es2019/ui/issue-like-table/index.js +2 -1
- package/dist/es2019/ui/issue-like-table/render-type/user/index.js +1 -8
- package/dist/esm/contexts/datasource-experience-id/index.js +3 -0
- package/dist/esm/hooks/useDatasourceTableFlag.js +2 -0
- package/dist/esm/state/index.js +2 -0
- package/dist/esm/ui/issue-like-table/edit-type/index.js +1 -3
- package/dist/esm/ui/issue-like-table/index.compiled.css +1 -0
- package/dist/esm/ui/issue-like-table/index.js +2 -1
- package/dist/esm/ui/issue-like-table/render-type/user/index.js +1 -8
- package/examples-helpers/buildJiraIssuesTable.tsx +14 -12
- package/examples-helpers/useCommonTableProps.tsx +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.29.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d287c1d495c52`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d287c1d495c52) -
|
|
8
|
+
Minor fix for rich text and wrapped option
|
|
9
|
+
|
|
10
|
+
## 4.29.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`28247d8ce71cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/28247d8ce71cc) -
|
|
15
|
+
[ux] Clean up feature gate to enable assignee picker on link datasource
|
|
16
|
+
|
|
3
17
|
## 4.28.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/compass.yml
CHANGED
|
@@ -13,6 +13,9 @@ fields:
|
|
|
13
13
|
tier: 4
|
|
14
14
|
lifecycle: Active
|
|
15
15
|
links:
|
|
16
|
+
- name: Root Repository
|
|
17
|
+
type: REPOSITORY
|
|
18
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
16
19
|
- name: SignalFx - Link Datasource
|
|
17
20
|
type: DASHBOARD
|
|
18
21
|
url: 'https://atlassian.signalfx.com/#/dashboard/Gm8VEROA0AQ?groupId=Fcva05QA4AA&configId=Gm8VFYeAwAI&startTime=-31d&endTime=Now'
|
|
@@ -8,9 +8,12 @@ exports.useDatasourceExperienceId = exports.DatasourceExperienceIdProvider = voi
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _uuid = require("uuid");
|
|
10
10
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
12
|
+
|
|
11
13
|
var DatasourceExperienceIdContext = /*#__PURE__*/_react.default.createContext(undefined);
|
|
12
14
|
var DatasourceExperienceIdProvider = exports.DatasourceExperienceIdProvider = function DatasourceExperienceIdProvider(_ref) {
|
|
13
15
|
var children = _ref.children;
|
|
16
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
14
17
|
var value = (0, _react.useMemo)(function () {
|
|
15
18
|
return (0, _uuid.v4)();
|
|
16
19
|
}, []);
|
|
@@ -16,7 +16,7 @@ var _analytics = require("../analytics");
|
|
|
16
16
|
var _messages = require("../ui/issue-like-table/messages");
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
18
|
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; }
|
|
19
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
19
|
+
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) { (0, _defineProperty2.default)(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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
20
20
|
var getErrorReason = function getErrorReason(status) {
|
|
21
21
|
switch (status) {
|
|
22
22
|
case 403:
|
|
@@ -60,6 +60,7 @@ var useDatasourceTableFlag = exports.useDatasourceTableFlag = function useDataso
|
|
|
60
60
|
label: "Error",
|
|
61
61
|
color: "var(--ds-icon-danger, #C9372C)"
|
|
62
62
|
}),
|
|
63
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
63
64
|
id: (0, _uuid.default)(),
|
|
64
65
|
isAutoDismiss: true
|
|
65
66
|
}, options !== null && options !== void 0 && options.isFetchAction ? getFetchActionErrorMessage(args === null || args === void 0 ? void 0 : args.status) : getExecuteActionErrorMessage(args === null || args === void 0 ? void 0 : args.status)), args));
|
package/dist/cjs/state/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _reactSweetState = require("react-sweet-state");
|
|
13
13
|
var _uuid = require("uuid");
|
|
14
14
|
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; }
|
|
15
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
15
|
+
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) { (0, _defineProperty2.default)(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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
16
16
|
var getInitialState = function getInitialState() {
|
|
17
17
|
return {
|
|
18
18
|
items: {}
|
|
@@ -48,6 +48,7 @@ var actions = exports.actions = {
|
|
|
48
48
|
ids = _ref4[0],
|
|
49
49
|
itemMap = _ref4[1];
|
|
50
50
|
var ari = typeof ((_item$ari = item['ari']) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? item['ari'].data : undefined;
|
|
51
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
51
52
|
var id = ari !== null && ari !== void 0 ? ari : (0, _uuid.v4)();
|
|
52
53
|
return [[].concat((0, _toConsumableArray2.default)(ids), [id]), _objectSpread(_objectSpread({}, itemMap), {}, (0, _defineProperty2.default)({}, id, {
|
|
53
54
|
ari: ari,
|
|
@@ -5,12 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.toValueType = exports.isEditTypeSupported = exports.isEditTypeSelectable = exports.editType = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
11
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
12
|
var _icon = _interopRequireDefault(require("./icon"));
|
|
15
13
|
var _status = _interopRequireDefault(require("./status"));
|
|
16
14
|
var _text = _interopRequireDefault(require("./text"));
|
|
@@ -92,7 +90,7 @@ var editType = exports.editType = function editType(_ref) {
|
|
|
92
90
|
};
|
|
93
91
|
};
|
|
94
92
|
var isEditTypeSupported = exports.isEditTypeSupported = function isEditTypeSupported(type) {
|
|
95
|
-
var supportedEditType = ['string', 'status', 'icon'
|
|
93
|
+
var supportedEditType = ['string', 'status', 'icon', 'user'];
|
|
96
94
|
return supportedEditType.includes(type);
|
|
97
95
|
};
|
|
98
96
|
var isEditTypeSelectable = exports.isEditTypeSelectable = function isEditTypeSelectable(type) {
|
|
@@ -118,6 +118,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
|
|
|
118
118
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
119
119
|
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
120
120
|
._o5721q9c{white-space:nowrap}
|
|
121
|
+
._o5724jg8{white-space:normal}
|
|
121
122
|
._otyridpf{margin-bottom:0}
|
|
122
123
|
._ouxlbac2{background-position:0,0,100%,100%,top,0 52px,bottom,bottom}
|
|
123
124
|
._qmxj1c00{background-attachment:local,scroll,local,scroll,local,scroll,local,scroll}
|
|
@@ -67,6 +67,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
67
67
|
ColumnPickerHeader.displayName = 'ColumnPickerHeader';
|
|
68
68
|
}
|
|
69
69
|
var truncateStyles = null;
|
|
70
|
+
var wrappedStyles = null;
|
|
70
71
|
var tableContainerStyles = null;
|
|
71
72
|
|
|
72
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
@@ -580,7 +581,7 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
580
581
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
581
582
|
,
|
|
582
583
|
style: loadingRowStyle,
|
|
583
|
-
className: (0, _runtime.ax)([
|
|
584
|
+
className: (0, _runtime.ax)([wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? "_o5724jg8" : "_1bto1l2s _o5721q9c"])
|
|
584
585
|
}, content);
|
|
585
586
|
}));
|
|
586
587
|
}))));
|
|
@@ -16,7 +16,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
18
18
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
20
|
var _widthDetector = require("@atlaskit/width-detector");
|
|
22
21
|
var _messages = require("./messages");
|
|
@@ -60,13 +59,7 @@ var UserType = function UserType(_ref2) {
|
|
|
60
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
61
60
|
width = _useState2[0],
|
|
62
61
|
setWidth = _useState2[1];
|
|
63
|
-
|
|
64
|
-
if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync-assignee')) {
|
|
65
|
-
multipleUsers = users.length === 1;
|
|
66
|
-
} else {
|
|
67
|
-
multipleUsers = users.length <= 1;
|
|
68
|
-
}
|
|
69
|
-
if (multipleUsers) {
|
|
62
|
+
if (users.length === 1) {
|
|
70
63
|
var _ref3 = users[0] || {},
|
|
71
64
|
avatarSource = _ref3.avatarSource,
|
|
72
65
|
_ref3$avatarSize = _ref3.avatarSize,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { useContext, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
5
|
const DatasourceExperienceIdContext = /*#__PURE__*/React.createContext(undefined);
|
|
4
6
|
const DatasourceExperienceIdProvider = ({
|
|
5
7
|
children
|
|
6
8
|
}) => {
|
|
9
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
7
10
|
const value = useMemo(() => uuidv4(), []);
|
|
8
11
|
return /*#__PURE__*/React.createElement(DatasourceExperienceIdContext.Provider, {
|
|
9
12
|
value: value
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
4
|
import uuid from 'uuid';
|
|
4
5
|
import { useFlags } from '@atlaskit/flag';
|
|
5
6
|
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
@@ -50,6 +51,7 @@ export const useDatasourceTableFlag = options => {
|
|
|
50
51
|
label: "Error",
|
|
51
52
|
color: "var(--ds-icon-danger, #C9372C)"
|
|
52
53
|
}),
|
|
54
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
53
55
|
id: uuid(),
|
|
54
56
|
isAutoDismiss: true,
|
|
55
57
|
...(options !== null && options !== void 0 && options.isFetchAction ? getFetchActionErrorMessage(args === null || args === void 0 ? void 0 : args.status) : getExecuteActionErrorMessage(args === null || args === void 0 ? void 0 : args.status)),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createActionsHook, createContainer, createStateHook, createStore } from 'react-sweet-state';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
4
5
|
const getInitialState = () => ({
|
|
5
6
|
items: {}
|
|
@@ -39,6 +40,7 @@ export const actions = {
|
|
|
39
40
|
const [newItemIds, newItems] = items.reduce(([ids, itemMap], item) => {
|
|
40
41
|
var _item$ari, _oldItems$id;
|
|
41
42
|
const ari = typeof ((_item$ari = item['ari']) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? item['ari'].data : undefined;
|
|
43
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
42
44
|
const id = ari !== null && ari !== void 0 ? ari : uuidv4();
|
|
43
45
|
return [[...ids, id], {
|
|
44
46
|
...itemMap,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import IconEditType from './icon';
|
|
5
4
|
import StatusEditType from './status';
|
|
6
5
|
import TextEditType from './text';
|
|
@@ -77,7 +76,7 @@ export const editType = ({
|
|
|
77
76
|
};
|
|
78
77
|
};
|
|
79
78
|
export const isEditTypeSupported = type => {
|
|
80
|
-
const supportedEditType = ['string', 'status', 'icon',
|
|
79
|
+
const supportedEditType = ['string', 'status', 'icon', 'user'];
|
|
81
80
|
return supportedEditType.includes(type);
|
|
82
81
|
};
|
|
83
82
|
export const isEditTypeSelectable = type => {
|
|
@@ -119,6 +119,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
|
|
|
119
119
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
120
120
|
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
121
121
|
._o5721q9c{white-space:nowrap}
|
|
122
|
+
._o5724jg8{white-space:normal}
|
|
122
123
|
._otyridpf{margin-bottom:0}
|
|
123
124
|
._ouxlbac2{background-position:0,0,100%,100%,top,0 52px,bottom,bottom}
|
|
124
125
|
._qmxj1c00{background-attachment:local,scroll,local,scroll,local,scroll,local,scroll}
|
|
@@ -48,6 +48,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
48
48
|
ColumnPickerHeader.displayName = 'ColumnPickerHeader';
|
|
49
49
|
}
|
|
50
50
|
const truncateStyles = null;
|
|
51
|
+
const wrappedStyles = null;
|
|
51
52
|
const tableContainerStyles = null;
|
|
52
53
|
|
|
53
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
@@ -515,7 +516,7 @@ export const IssueLikeDataTableView = ({
|
|
|
515
516
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
516
517
|
,
|
|
517
518
|
style: loadingRowStyle,
|
|
518
|
-
className: ax([
|
|
519
|
+
className: ax([wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? "_o5724jg8" : "_1bto1l2s _o5721q9c"])
|
|
519
520
|
}, content);
|
|
520
521
|
}))))));
|
|
521
522
|
return /*#__PURE__*/React.createElement(FlagsProvider, null, view);
|
|
@@ -7,7 +7,6 @@ import React, { useState } from 'react';
|
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import Avatar from '@atlaskit/avatar';
|
|
9
9
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
12
11
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
13
12
|
import { userTypeMessages } from './messages';
|
|
@@ -47,13 +46,7 @@ const UserType = ({
|
|
|
47
46
|
users
|
|
48
47
|
}) => {
|
|
49
48
|
const [width, setWidth] = useState(null);
|
|
50
|
-
|
|
51
|
-
if (fg('platform-datasources-enable-two-way-sync-assignee')) {
|
|
52
|
-
multipleUsers = users.length === 1;
|
|
53
|
-
} else {
|
|
54
|
-
multipleUsers = users.length <= 1;
|
|
55
|
-
}
|
|
56
|
-
if (multipleUsers) {
|
|
49
|
+
if (users.length === 1) {
|
|
57
50
|
const {
|
|
58
51
|
avatarSource,
|
|
59
52
|
avatarSize = 'small',
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React, { useContext, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
2
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
5
|
var DatasourceExperienceIdContext = /*#__PURE__*/React.createContext(undefined);
|
|
4
6
|
var DatasourceExperienceIdProvider = function DatasourceExperienceIdProvider(_ref) {
|
|
5
7
|
var children = _ref.children;
|
|
8
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
9
|
var value = useMemo(function () {
|
|
7
10
|
return uuidv4();
|
|
8
11
|
}, []);
|
|
@@ -3,6 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
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; }
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
7
|
import uuid from 'uuid';
|
|
7
8
|
import { useFlags } from '@atlaskit/flag';
|
|
8
9
|
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
@@ -51,6 +52,7 @@ export var useDatasourceTableFlag = function useDatasourceTableFlag(options) {
|
|
|
51
52
|
label: "Error",
|
|
52
53
|
color: "var(--ds-icon-danger, #C9372C)"
|
|
53
54
|
}),
|
|
55
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
54
56
|
id: uuid(),
|
|
55
57
|
isAutoDismiss: true
|
|
56
58
|
}, options !== null && options !== void 0 && options.isFetchAction ? getFetchActionErrorMessage(args === null || args === void 0 ? void 0 : args.status) : getExecuteActionErrorMessage(args === null || args === void 0 ? void 0 : args.status)), args));
|
package/dist/esm/state/index.js
CHANGED
|
@@ -5,6 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
5
5
|
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; }
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { createActionsHook, createContainer, createStateHook, createStore } from 'react-sweet-state';
|
|
8
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
8
9
|
import { v4 as uuidv4 } from 'uuid';
|
|
9
10
|
var getInitialState = function getInitialState() {
|
|
10
11
|
return {
|
|
@@ -41,6 +42,7 @@ export var actions = {
|
|
|
41
42
|
ids = _ref4[0],
|
|
42
43
|
itemMap = _ref4[1];
|
|
43
44
|
var ari = typeof ((_item$ari = item['ari']) === null || _item$ari === void 0 ? void 0 : _item$ari.data) === 'string' ? item['ari'].data : undefined;
|
|
45
|
+
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
44
46
|
var id = ari !== null && ari !== void 0 ? ari : uuidv4();
|
|
45
47
|
return [[].concat(_toConsumableArray(ids), [id]), _objectSpread(_objectSpread({}, itemMap), {}, _defineProperty({}, id, {
|
|
46
48
|
ari: ari,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
5
4
|
var _excluded = ["value"];
|
|
6
5
|
import React from 'react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
6
|
import IconEditType from './icon';
|
|
9
7
|
import StatusEditType from './status';
|
|
10
8
|
import TextEditType from './text';
|
|
@@ -86,7 +84,7 @@ export var editType = function editType(_ref) {
|
|
|
86
84
|
};
|
|
87
85
|
};
|
|
88
86
|
export var isEditTypeSupported = function isEditTypeSupported(type) {
|
|
89
|
-
var supportedEditType = ['string', 'status', 'icon'
|
|
87
|
+
var supportedEditType = ['string', 'status', 'icon', 'user'];
|
|
90
88
|
return supportedEditType.includes(type);
|
|
91
89
|
};
|
|
92
90
|
export var isEditTypeSelectable = function isEditTypeSelectable(type) {
|
|
@@ -118,6 +118,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
|
|
|
118
118
|
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
119
119
|
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
120
120
|
._o5721q9c{white-space:nowrap}
|
|
121
|
+
._o5724jg8{white-space:normal}
|
|
121
122
|
._otyridpf{margin-bottom:0}
|
|
122
123
|
._ouxlbac2{background-position:0,0,100%,100%,top,0 52px,bottom,bottom}
|
|
123
124
|
._qmxj1c00{background-attachment:local,scroll,local,scroll,local,scroll,local,scroll}
|
|
@@ -60,6 +60,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
60
60
|
ColumnPickerHeader.displayName = 'ColumnPickerHeader';
|
|
61
61
|
}
|
|
62
62
|
var truncateStyles = null;
|
|
63
|
+
var wrappedStyles = null;
|
|
63
64
|
var tableContainerStyles = null;
|
|
64
65
|
|
|
65
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
@@ -573,7 +574,7 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
573
574
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
574
575
|
,
|
|
575
576
|
style: loadingRowStyle,
|
|
576
|
-
className: ax([
|
|
577
|
+
className: ax([wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? "_o5724jg8" : "_1bto1l2s _o5721q9c"])
|
|
577
578
|
}, content);
|
|
578
579
|
}));
|
|
579
580
|
}))));
|
|
@@ -10,7 +10,6 @@ import React, { useState } from 'react';
|
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import Avatar from '@atlaskit/avatar';
|
|
12
12
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
15
14
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
16
15
|
import { userTypeMessages } from './messages';
|
|
@@ -52,13 +51,7 @@ var UserType = function UserType(_ref2) {
|
|
|
52
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
53
52
|
width = _useState2[0],
|
|
54
53
|
setWidth = _useState2[1];
|
|
55
|
-
|
|
56
|
-
if (fg('platform-datasources-enable-two-way-sync-assignee')) {
|
|
57
|
-
multipleUsers = users.length === 1;
|
|
58
|
-
} else {
|
|
59
|
-
multipleUsers = users.length <= 1;
|
|
60
|
-
}
|
|
61
|
-
if (multipleUsers) {
|
|
54
|
+
if (users.length === 1) {
|
|
62
55
|
var _ref3 = users[0] || {},
|
|
63
56
|
avatarSource = _ref3.avatarSource,
|
|
64
57
|
_ref3$avatarSize = _ref3.avatarSize,
|
|
@@ -19,26 +19,28 @@ type JiraIssuesTableViewProps = {
|
|
|
19
19
|
*/
|
|
20
20
|
DatasourceTable?: typeof DataSourceTableViewNoSuspense | typeof DatasourceTableView;
|
|
21
21
|
mockDatasourceFetchRequest?: boolean;
|
|
22
|
-
} & Partial<
|
|
22
|
+
} & Partial<
|
|
23
|
+
Pick<DatasourceTableViewProps, 'parameters' | 'scrollableContainerHeight' | 'visibleColumnKeys'>
|
|
24
|
+
>;
|
|
23
25
|
|
|
24
26
|
const JiraIssuesTableView = ({
|
|
25
27
|
DatasourceTable = DataSourceTableViewNoSuspense,
|
|
26
28
|
...props
|
|
27
29
|
}: Omit<JiraIssuesTableViewProps, 'mockDatasourceFetchRequest'>) => {
|
|
28
30
|
const {
|
|
29
|
-
parameters: {
|
|
30
|
-
cloudId = 'some-cloud-id',
|
|
31
|
-
jql = 'some-jql',
|
|
32
|
-
} = {},
|
|
31
|
+
parameters: { cloudId = 'some-cloud-id', jql = 'some-jql' } = {},
|
|
33
32
|
scrollableContainerHeight,
|
|
34
33
|
visibleColumnKeys: initialVisibleColumnKeys,
|
|
35
|
-
} = props
|
|
36
|
-
|
|
37
|
-
const parameters = useMemo(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
const parameters = useMemo(
|
|
37
|
+
() => ({
|
|
38
|
+
cloudId,
|
|
39
|
+
jql,
|
|
40
|
+
}),
|
|
41
|
+
[cloudId, jql],
|
|
42
|
+
);
|
|
43
|
+
|
|
42
44
|
const {
|
|
43
45
|
visibleColumnKeys,
|
|
44
46
|
onVisibleColumnKeysChange,
|
|
@@ -8,7 +8,7 @@ import type { DatasourceTableViewProps } from '../src/ui/datasource-table-view/t
|
|
|
8
8
|
import type { ColumnSizesMap } from '../src/ui/issue-like-table/types';
|
|
9
9
|
|
|
10
10
|
export const useCommonTableProps = (
|
|
11
|
-
props: { defaultColumnCustomSizes?: ColumnSizesMap
|
|
11
|
+
props: { defaultColumnCustomSizes?: ColumnSizesMap; visibleColumnKeys?: string[] } = {},
|
|
12
12
|
): Required<
|
|
13
13
|
Pick<
|
|
14
14
|
DatasourceTableViewProps,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.29.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/layering": "^3.2.0",
|
|
65
65
|
"@atlaskit/link": "^3.2.0",
|
|
66
66
|
"@atlaskit/link-client-extension": "^6.0.0",
|
|
67
|
-
"@atlaskit/linking-common": "^9.
|
|
67
|
+
"@atlaskit/linking-common": "^9.8.0",
|
|
68
68
|
"@atlaskit/linking-types": "^14.1.0",
|
|
69
69
|
"@atlaskit/logo": "^19.9.0",
|
|
70
70
|
"@atlaskit/lozenge": "^13.0.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@atlaskit/primitives": "^16.1.0",
|
|
80
80
|
"@atlaskit/react-select": "^3.8.0",
|
|
81
81
|
"@atlaskit/select": "^21.3.0",
|
|
82
|
-
"@atlaskit/smart-card": "^43.
|
|
82
|
+
"@atlaskit/smart-card": "^43.6.0",
|
|
83
83
|
"@atlaskit/smart-user-picker": "^8.4.0",
|
|
84
84
|
"@atlaskit/spinner": "^19.0.0",
|
|
85
85
|
"@atlaskit/tag": "^14.1.0",
|
|
@@ -160,9 +160,6 @@
|
|
|
160
160
|
"add-disablesiteselector": {
|
|
161
161
|
"type": "boolean"
|
|
162
162
|
},
|
|
163
|
-
"platform-datasources-enable-two-way-sync-assignee": {
|
|
164
|
-
"type": "boolean"
|
|
165
|
-
},
|
|
166
163
|
"confluence-issue-terminology-refresh": {
|
|
167
164
|
"type": "boolean"
|
|
168
165
|
},
|