@atlaskit/task-decision 17.10.3 → 17.10.5
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 +16 -0
- package/dist/cjs/components/DecisionItem.js +1 -2
- package/dist/cjs/components/DecisionList.js +2 -2
- package/dist/cjs/components/Item.js +1 -1
- package/dist/cjs/components/ResourcedTaskItem.js +19 -5
- package/dist/cjs/components/TaskItem.js +8 -4
- package/dist/cjs/components/TaskList.js +2 -2
- package/dist/cjs/components/styles.js +2 -3
- package/dist/es2019/components/DecisionItem.js +1 -2
- package/dist/es2019/components/ResourcedTaskItem.js +19 -3
- package/dist/es2019/components/TaskItem.js +7 -3
- package/dist/es2019/components/styles.js +2 -3
- package/dist/esm/components/DecisionItem.js +1 -2
- package/dist/esm/components/DecisionList.js +1 -1
- package/dist/esm/components/Item.js +1 -1
- package/dist/esm/components/ResourcedTaskItem.js +18 -4
- package/dist/esm/components/TaskItem.js +7 -3
- package/dist/esm/components/TaskList.js +1 -1
- package/dist/esm/components/styles.js +2 -3
- package/dist/types/components/ResourcedTaskItem.d.ts +5 -0
- package/dist/types/components/TaskItem.d.ts +3 -1
- package/dist/types-ts4.5/components/ResourcedTaskItem.d.ts +5 -0
- package/dist/types-ts4.5/components/TaskItem.d.ts +3 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/task-decision
|
|
2
2
|
|
|
3
|
+
## 17.10.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#142911](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142911)
|
|
8
|
+
[`f661df7842ec7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f661df7842ec7) -
|
|
9
|
+
[ux] [ED-24772] create request to edit component under feature toggle
|
|
10
|
+
|
|
11
|
+
## 17.10.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#141679](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141679)
|
|
16
|
+
[`b005c6bc8be60`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b005c6bc8be60) -
|
|
17
|
+
improve decision item on SSR
|
|
18
|
+
|
|
3
19
|
## 17.10.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _decision = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/decision"));
|
|
10
10
|
var _Item = _interopRequireDefault(require("./Item"));
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
11
|
/**
|
|
13
12
|
* @jsxRuntime classic
|
|
14
13
|
* @jsx jsx
|
|
@@ -23,7 +22,7 @@ var iconStyles = function iconStyles(showPlaceholder) {
|
|
|
23
22
|
width: '16px',
|
|
24
23
|
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
|
|
25
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
26
|
-
color: showPlaceholder ? "var(--ds-icon-subtle,
|
|
25
|
+
color: showPlaceholder ? "var(--ds-icon-subtle, #626F86)" : "var(--ds-icon-success, #22A06B)",
|
|
27
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
28
27
|
'> span': {
|
|
29
28
|
margin: "var(--ds-space-negative-100, -8px)"
|
|
@@ -15,8 +15,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _styles = require("./styles");
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
19
|
-
function _createSuper(
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
20
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
21
21
|
* @jsxRuntime classic
|
|
22
22
|
* @jsx jsx
|
|
@@ -16,7 +16,7 @@ var _react = require("react");
|
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _constants = require("@atlaskit/theme/constants");
|
|
18
18
|
var _styles = require("./styles");
|
|
19
|
-
function _createSuper(
|
|
19
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
20
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
21
21
|
* @jsxRuntime classic
|
|
22
22
|
* @jsx jsx
|
|
@@ -17,10 +17,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var _TaskItem = _interopRequireDefault(require("./TaskItem"));
|
|
18
18
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
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; }
|
|
22
22
|
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; }
|
|
23
|
-
function _createSuper(
|
|
23
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
24
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
25
|
var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
26
26
|
(0, _inherits2.default)(ResourcedTaskItem, _PureComponent);
|
|
@@ -39,7 +39,12 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
39
39
|
var _this$props = _this.props,
|
|
40
40
|
taskDecisionProvider = _this$props.taskDecisionProvider,
|
|
41
41
|
objectAri = _this$props.objectAri,
|
|
42
|
-
onChange = _this$props.onChange
|
|
42
|
+
onChange = _this$props.onChange,
|
|
43
|
+
disableOnChange = _this$props.disableOnChange;
|
|
44
|
+
if (disableOnChange) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
43
48
|
// Optimistically update the task
|
|
44
49
|
_this.setState({
|
|
45
50
|
isDone: isDone
|
|
@@ -68,6 +73,12 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
68
73
|
}
|
|
69
74
|
}
|
|
70
75
|
});
|
|
76
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleOnClick", function () {
|
|
77
|
+
var onClick = _this.props.onClick;
|
|
78
|
+
if (onClick) {
|
|
79
|
+
onClick();
|
|
80
|
+
}
|
|
81
|
+
});
|
|
71
82
|
_this.state = {
|
|
72
83
|
isDone: props.isDone
|
|
73
84
|
};
|
|
@@ -157,7 +168,8 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
157
168
|
disabled = _this$props3.disabled,
|
|
158
169
|
dataAttributes = _this$props3.dataAttributes,
|
|
159
170
|
isRenderer = _this$props3.isRenderer,
|
|
160
|
-
isFocused = _this$props3.isFocused
|
|
171
|
+
isFocused = _this$props3.isFocused,
|
|
172
|
+
inputRef = _this$props3.inputRef;
|
|
161
173
|
return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
162
174
|
data: {
|
|
163
175
|
objectAri: objectAri
|
|
@@ -168,12 +180,14 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
|
|
|
168
180
|
isFocused: isFocused,
|
|
169
181
|
taskId: taskId,
|
|
170
182
|
onChange: this.handleOnChange,
|
|
183
|
+
onClick: this.handleOnClick,
|
|
171
184
|
appearance: appearance,
|
|
172
185
|
contentRef: contentRef,
|
|
173
186
|
showPlaceholder: showPlaceholder,
|
|
174
187
|
placeholder: placeholder,
|
|
175
188
|
disabled: disabled,
|
|
176
|
-
dataAttributes: dataAttributes
|
|
189
|
+
dataAttributes: dataAttributes,
|
|
190
|
+
inputRef: inputRef
|
|
177
191
|
}, children));
|
|
178
192
|
}
|
|
179
193
|
}]);
|
|
@@ -14,7 +14,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
14
14
|
var _analytics = require("../analytics");
|
|
15
15
|
var _styles = require("./styles");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
/**
|
|
19
19
|
* @jsxRuntime classic
|
|
20
20
|
* @jsx jsx
|
|
@@ -39,7 +39,9 @@ var TaskItem = function TaskItem(props) {
|
|
|
39
39
|
dataAttributes = props.dataAttributes,
|
|
40
40
|
taskId = props.taskId,
|
|
41
41
|
onChange = props.onChange,
|
|
42
|
-
|
|
42
|
+
onClick = props.onClick,
|
|
43
|
+
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
44
|
+
inputRefFromProps = props.inputRef;
|
|
43
45
|
var checkBoxId = (0, _react.useMemo)(function () {
|
|
44
46
|
return getCheckBoxId(taskId);
|
|
45
47
|
}, [taskId]);
|
|
@@ -69,7 +71,8 @@ var TaskItem = function TaskItem(props) {
|
|
|
69
71
|
}
|
|
70
72
|
};
|
|
71
73
|
}, [handleOnChange]);
|
|
72
|
-
var
|
|
74
|
+
var defaultInputRef = (0, _react.useRef)(null);
|
|
75
|
+
var inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
|
|
73
76
|
var icon =
|
|
74
77
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
75
78
|
(0, _react2.jsx)("span", {
|
|
@@ -81,6 +84,7 @@ var TaskItem = function TaskItem(props) {
|
|
|
81
84
|
name: checkBoxId,
|
|
82
85
|
type: "checkbox",
|
|
83
86
|
onChange: handleOnChange,
|
|
87
|
+
onClick: onClick,
|
|
84
88
|
checked: !!isDone,
|
|
85
89
|
disabled: !!disabled,
|
|
86
90
|
suppressHydrationWarning: true,
|
|
@@ -99,7 +103,7 @@ var TaskItem = function TaskItem(props) {
|
|
|
99
103
|
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
|
|
100
104
|
}, 100);
|
|
101
105
|
}
|
|
102
|
-
}, [isFocused]);
|
|
106
|
+
}, [isFocused, inputRef]);
|
|
103
107
|
return (0, _react2.jsx)(_Item.default, {
|
|
104
108
|
appearance: appearance,
|
|
105
109
|
contentRef: contentRef,
|
|
@@ -16,8 +16,8 @@ var _react2 = require("@emotion/react");
|
|
|
16
16
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
17
17
|
var _styles = require("./styles");
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
20
|
-
function _createSuper(
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
22
22
|
* @jsxRuntime classic
|
|
23
23
|
* @jsx jsx
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.taskStyles = exports.taskListStyles = exports.placeholderStyles = exports.listStyles = exports.decisionStyles = exports.contentStyles = exports.checkboxStyles = void 0;
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
10
9
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
11
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
11
|
|
|
@@ -53,7 +52,7 @@ var decisionStyles = exports.decisionStyles = function decisionStyles() {
|
|
|
53
52
|
padding: "var(--ds-space-100, 8px)",
|
|
54
53
|
paddingLeft: "var(--ds-space-150, 12px)",
|
|
55
54
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
56
|
-
backgroundColor: "var(--ds-background-neutral,
|
|
55
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
57
56
|
position: 'relative',
|
|
58
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
59
58
|
'.decision-item': {
|
|
@@ -66,7 +65,7 @@ var placeholderStyles = exports.placeholderStyles = function placeholderStyles(o
|
|
|
66
65
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
67
66
|
margin: "0 0 0 ".concat(offset, "px"),
|
|
68
67
|
position: 'absolute',
|
|
69
|
-
color: "var(--ds-text-subtlest,
|
|
68
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
70
69
|
pointerEvents: 'none',
|
|
71
70
|
textOverflow: 'ellipsis',
|
|
72
71
|
overflow: 'hidden',
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
|
|
9
9
|
import Item from './Item';
|
|
10
|
-
import { G400, N100 } from '@atlaskit/theme/colors';
|
|
11
10
|
const iconStyles = showPlaceholder => {
|
|
12
11
|
return css({
|
|
13
12
|
flex: '0 0 16px',
|
|
@@ -15,7 +14,7 @@ const iconStyles = showPlaceholder => {
|
|
|
15
14
|
width: '16px',
|
|
16
15
|
margin: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-150, 12px)"} 0 0`,
|
|
17
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
|
-
color: showPlaceholder ?
|
|
17
|
+
color: showPlaceholder ? "var(--ds-icon-subtle, #626F86)" : "var(--ds-icon-success, #22A06B)",
|
|
19
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
19
|
'> span': {
|
|
21
20
|
margin: "var(--ds-space-negative-100, -8px)"
|
|
@@ -16,8 +16,13 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
16
16
|
const {
|
|
17
17
|
taskDecisionProvider,
|
|
18
18
|
objectAri,
|
|
19
|
-
onChange
|
|
19
|
+
onChange,
|
|
20
|
+
disableOnChange
|
|
20
21
|
} = this.props;
|
|
22
|
+
if (disableOnChange) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
// Optimistically update the task
|
|
22
27
|
this.setState({
|
|
23
28
|
isDone
|
|
@@ -46,6 +51,14 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
});
|
|
54
|
+
_defineProperty(this, "handleOnClick", () => {
|
|
55
|
+
const {
|
|
56
|
+
onClick
|
|
57
|
+
} = this.props;
|
|
58
|
+
if (onClick) {
|
|
59
|
+
onClick();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
49
62
|
this.state = {
|
|
50
63
|
isDone: props.isDone
|
|
51
64
|
};
|
|
@@ -126,7 +139,8 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
126
139
|
disabled,
|
|
127
140
|
dataAttributes,
|
|
128
141
|
isRenderer,
|
|
129
|
-
isFocused
|
|
142
|
+
isFocused,
|
|
143
|
+
inputRef
|
|
130
144
|
} = this.props;
|
|
131
145
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
132
146
|
data: {
|
|
@@ -138,12 +152,14 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
138
152
|
isFocused: isFocused,
|
|
139
153
|
taskId: taskId,
|
|
140
154
|
onChange: this.handleOnChange,
|
|
155
|
+
onClick: this.handleOnClick,
|
|
141
156
|
appearance: appearance,
|
|
142
157
|
contentRef: contentRef,
|
|
143
158
|
showPlaceholder: showPlaceholder,
|
|
144
159
|
placeholder: placeholder,
|
|
145
160
|
disabled: disabled,
|
|
146
|
-
dataAttributes: dataAttributes
|
|
161
|
+
dataAttributes: dataAttributes,
|
|
162
|
+
inputRef: inputRef
|
|
147
163
|
}, children));
|
|
148
164
|
}
|
|
149
165
|
}
|
|
@@ -26,7 +26,9 @@ const TaskItem = props => {
|
|
|
26
26
|
dataAttributes,
|
|
27
27
|
taskId,
|
|
28
28
|
onChange,
|
|
29
|
-
|
|
29
|
+
onClick,
|
|
30
|
+
createAnalyticsEvent,
|
|
31
|
+
inputRef: inputRefFromProps
|
|
30
32
|
} = props;
|
|
31
33
|
const checkBoxId = useMemo(() => getCheckBoxId(taskId), [taskId]);
|
|
32
34
|
const handleOnChange = useMemo(() => {
|
|
@@ -53,7 +55,8 @@ const TaskItem = props => {
|
|
|
53
55
|
handleOnChange(event);
|
|
54
56
|
}
|
|
55
57
|
}, [handleOnChange]);
|
|
56
|
-
const
|
|
58
|
+
const defaultInputRef = useRef(null);
|
|
59
|
+
const inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
|
|
57
60
|
const icon =
|
|
58
61
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
59
62
|
jsx("span", {
|
|
@@ -65,6 +68,7 @@ const TaskItem = props => {
|
|
|
65
68
|
name: checkBoxId,
|
|
66
69
|
type: "checkbox",
|
|
67
70
|
onChange: handleOnChange,
|
|
71
|
+
onClick: onClick,
|
|
68
72
|
checked: !!isDone,
|
|
69
73
|
disabled: !!disabled,
|
|
70
74
|
suppressHydrationWarning: true,
|
|
@@ -83,7 +87,7 @@ const TaskItem = props => {
|
|
|
83
87
|
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
|
|
84
88
|
}, 100);
|
|
85
89
|
}
|
|
86
|
-
}, [isFocused]);
|
|
90
|
+
}, [isFocused, inputRef]);
|
|
87
91
|
return jsx(Item, {
|
|
88
92
|
appearance: appearance,
|
|
89
93
|
contentRef: contentRef,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { N200, N20A } from '@atlaskit/theme/colors';
|
|
4
3
|
import checkboxTheme from './theme';
|
|
5
4
|
|
|
6
5
|
/*
|
|
@@ -45,7 +44,7 @@ export const decisionStyles = () => css({
|
|
|
45
44
|
padding: "var(--ds-space-100, 8px)",
|
|
46
45
|
paddingLeft: "var(--ds-space-150, 12px)",
|
|
47
46
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
48
|
-
backgroundColor:
|
|
47
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
49
48
|
position: 'relative',
|
|
50
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
50
|
'.decision-item': {
|
|
@@ -56,7 +55,7 @@ export const placeholderStyles = offset => css({
|
|
|
56
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
56
|
margin: `0 0 0 ${offset}px`,
|
|
58
57
|
position: 'absolute',
|
|
59
|
-
color:
|
|
58
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
60
59
|
pointerEvents: 'none',
|
|
61
60
|
textOverflow: 'ellipsis',
|
|
62
61
|
overflow: 'hidden',
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
|
|
9
9
|
import Item from './Item';
|
|
10
|
-
import { G400, N100 } from '@atlaskit/theme/colors';
|
|
11
10
|
var iconStyles = function iconStyles(showPlaceholder) {
|
|
12
11
|
return css({
|
|
13
12
|
flex: '0 0 16px',
|
|
@@ -15,7 +14,7 @@ var iconStyles = function iconStyles(showPlaceholder) {
|
|
|
15
14
|
width: '16px',
|
|
16
15
|
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-150, 12px)", " 0 0"),
|
|
17
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
|
-
color: showPlaceholder ? "var(--ds-icon-subtle,
|
|
17
|
+
color: showPlaceholder ? "var(--ds-icon-subtle, #626F86)" : "var(--ds-icon-success, #22A06B)",
|
|
19
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
19
|
'> span': {
|
|
21
20
|
margin: "var(--ds-space-negative-100, -8px)"
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
/**
|
|
9
9
|
* @jsxRuntime classic
|
|
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(
|
|
8
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
/**
|
|
11
11
|
* @jsxRuntime classic
|
|
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
|
-
function _createSuper(
|
|
10
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { PureComponent } from 'react';
|
|
@@ -30,7 +30,12 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
30
30
|
var _this$props = _this.props,
|
|
31
31
|
taskDecisionProvider = _this$props.taskDecisionProvider,
|
|
32
32
|
objectAri = _this$props.objectAri,
|
|
33
|
-
onChange = _this$props.onChange
|
|
33
|
+
onChange = _this$props.onChange,
|
|
34
|
+
disableOnChange = _this$props.disableOnChange;
|
|
35
|
+
if (disableOnChange) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
34
39
|
// Optimistically update the task
|
|
35
40
|
_this.setState({
|
|
36
41
|
isDone: isDone
|
|
@@ -59,6 +64,12 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
});
|
|
67
|
+
_defineProperty(_assertThisInitialized(_this), "handleOnClick", function () {
|
|
68
|
+
var onClick = _this.props.onClick;
|
|
69
|
+
if (onClick) {
|
|
70
|
+
onClick();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
62
73
|
_this.state = {
|
|
63
74
|
isDone: props.isDone
|
|
64
75
|
};
|
|
@@ -148,7 +159,8 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
148
159
|
disabled = _this$props3.disabled,
|
|
149
160
|
dataAttributes = _this$props3.dataAttributes,
|
|
150
161
|
isRenderer = _this$props3.isRenderer,
|
|
151
|
-
isFocused = _this$props3.isFocused
|
|
162
|
+
isFocused = _this$props3.isFocused,
|
|
163
|
+
inputRef = _this$props3.inputRef;
|
|
152
164
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
153
165
|
data: {
|
|
154
166
|
objectAri: objectAri
|
|
@@ -159,12 +171,14 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
159
171
|
isFocused: isFocused,
|
|
160
172
|
taskId: taskId,
|
|
161
173
|
onChange: this.handleOnChange,
|
|
174
|
+
onClick: this.handleOnClick,
|
|
162
175
|
appearance: appearance,
|
|
163
176
|
contentRef: contentRef,
|
|
164
177
|
showPlaceholder: showPlaceholder,
|
|
165
178
|
placeholder: placeholder,
|
|
166
179
|
disabled: disabled,
|
|
167
|
-
dataAttributes: dataAttributes
|
|
180
|
+
dataAttributes: dataAttributes,
|
|
181
|
+
inputRef: inputRef
|
|
168
182
|
}, children));
|
|
169
183
|
}
|
|
170
184
|
}]);
|
|
@@ -27,7 +27,9 @@ var TaskItem = function TaskItem(props) {
|
|
|
27
27
|
dataAttributes = props.dataAttributes,
|
|
28
28
|
taskId = props.taskId,
|
|
29
29
|
onChange = props.onChange,
|
|
30
|
-
|
|
30
|
+
onClick = props.onClick,
|
|
31
|
+
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
32
|
+
inputRefFromProps = props.inputRef;
|
|
31
33
|
var checkBoxId = useMemo(function () {
|
|
32
34
|
return getCheckBoxId(taskId);
|
|
33
35
|
}, [taskId]);
|
|
@@ -57,7 +59,8 @@ var TaskItem = function TaskItem(props) {
|
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
61
|
}, [handleOnChange]);
|
|
60
|
-
var
|
|
62
|
+
var defaultInputRef = useRef(null);
|
|
63
|
+
var inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
|
|
61
64
|
var icon =
|
|
62
65
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
66
|
jsx("span", {
|
|
@@ -69,6 +72,7 @@ var TaskItem = function TaskItem(props) {
|
|
|
69
72
|
name: checkBoxId,
|
|
70
73
|
type: "checkbox",
|
|
71
74
|
onChange: handleOnChange,
|
|
75
|
+
onClick: onClick,
|
|
72
76
|
checked: !!isDone,
|
|
73
77
|
disabled: !!disabled,
|
|
74
78
|
suppressHydrationWarning: true,
|
|
@@ -87,7 +91,7 @@ var TaskItem = function TaskItem(props) {
|
|
|
87
91
|
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.focus();
|
|
88
92
|
}, 100);
|
|
89
93
|
}
|
|
90
|
-
}, [isFocused]);
|
|
94
|
+
}, [isFocused, inputRef]);
|
|
91
95
|
return jsx(Item, {
|
|
92
96
|
appearance: appearance,
|
|
93
97
|
contentRef: contentRef,
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
/**
|
|
9
9
|
* @jsxRuntime classic
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { N200, N20A } from '@atlaskit/theme/colors';
|
|
4
3
|
import checkboxTheme from './theme';
|
|
5
4
|
|
|
6
5
|
/*
|
|
@@ -46,7 +45,7 @@ export var decisionStyles = function decisionStyles() {
|
|
|
46
45
|
padding: "var(--ds-space-100, 8px)",
|
|
47
46
|
paddingLeft: "var(--ds-space-150, 12px)",
|
|
48
47
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
49
|
-
backgroundColor: "var(--ds-background-neutral,
|
|
48
|
+
backgroundColor: "var(--ds-background-neutral, #091E420F)",
|
|
50
49
|
position: 'relative',
|
|
51
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
52
51
|
'.decision-item': {
|
|
@@ -59,7 +58,7 @@ export var placeholderStyles = function placeholderStyles(offset) {
|
|
|
59
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
60
59
|
margin: "0 0 0 ".concat(offset, "px"),
|
|
61
60
|
position: 'absolute',
|
|
62
|
-
color: "var(--ds-text-subtlest,
|
|
61
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
63
62
|
pointerEvents: 'none',
|
|
64
63
|
textOverflow: 'ellipsis',
|
|
65
64
|
overflow: 'hidden',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import { type Appearance, type ContentRef, type TaskDecisionProvider } from '../types';
|
|
3
4
|
export interface Props {
|
|
@@ -6,6 +7,7 @@ export interface Props {
|
|
|
6
7
|
isRenderer?: boolean;
|
|
7
8
|
isFocused?: boolean;
|
|
8
9
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
10
|
+
onClick?: () => void;
|
|
9
11
|
contentRef?: ContentRef;
|
|
10
12
|
children?: any;
|
|
11
13
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
@@ -17,6 +19,8 @@ export interface Props {
|
|
|
17
19
|
dataAttributes?: {
|
|
18
20
|
[key: string]: string | number;
|
|
19
21
|
};
|
|
22
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
23
|
+
disableOnChange?: boolean;
|
|
20
24
|
}
|
|
21
25
|
export interface State {
|
|
22
26
|
isDone?: boolean;
|
|
@@ -32,5 +36,6 @@ export default class ResourcedTaskItem extends PureComponent<Props, State> {
|
|
|
32
36
|
private unsubscribe;
|
|
33
37
|
private onUpdate;
|
|
34
38
|
private handleOnChange;
|
|
39
|
+
private handleOnClick;
|
|
35
40
|
render(): JSX.Element;
|
|
36
41
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { type RefObject } from 'react';
|
|
6
6
|
import { type Appearance, type ContentRef } from '../types';
|
|
7
7
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
8
8
|
export interface Props {
|
|
@@ -11,6 +11,7 @@ export interface Props {
|
|
|
11
11
|
isFocused?: boolean;
|
|
12
12
|
isRenderer?: boolean;
|
|
13
13
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
14
|
+
onClick?: () => void;
|
|
14
15
|
contentRef?: ContentRef;
|
|
15
16
|
children?: any;
|
|
16
17
|
placeholder?: string;
|
|
@@ -20,6 +21,7 @@ export interface Props {
|
|
|
20
21
|
dataAttributes?: {
|
|
21
22
|
[key: string]: string | number;
|
|
22
23
|
};
|
|
24
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
23
25
|
}
|
|
24
26
|
declare const _default: React.ForwardRefExoticComponent<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
25
27
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import { type Appearance, type ContentRef, type TaskDecisionProvider } from '../types';
|
|
3
4
|
export interface Props {
|
|
@@ -6,6 +7,7 @@ export interface Props {
|
|
|
6
7
|
isRenderer?: boolean;
|
|
7
8
|
isFocused?: boolean;
|
|
8
9
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
10
|
+
onClick?: () => void;
|
|
9
11
|
contentRef?: ContentRef;
|
|
10
12
|
children?: any;
|
|
11
13
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
@@ -17,6 +19,8 @@ export interface Props {
|
|
|
17
19
|
dataAttributes?: {
|
|
18
20
|
[key: string]: string | number;
|
|
19
21
|
};
|
|
22
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
23
|
+
disableOnChange?: boolean;
|
|
20
24
|
}
|
|
21
25
|
export interface State {
|
|
22
26
|
isDone?: boolean;
|
|
@@ -32,5 +36,6 @@ export default class ResourcedTaskItem extends PureComponent<Props, State> {
|
|
|
32
36
|
private unsubscribe;
|
|
33
37
|
private onUpdate;
|
|
34
38
|
private handleOnChange;
|
|
39
|
+
private handleOnClick;
|
|
35
40
|
render(): JSX.Element;
|
|
36
41
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { type RefObject } from 'react';
|
|
6
6
|
import { type Appearance, type ContentRef } from '../types';
|
|
7
7
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
8
8
|
export interface Props {
|
|
@@ -11,6 +11,7 @@ export interface Props {
|
|
|
11
11
|
isFocused?: boolean;
|
|
12
12
|
isRenderer?: boolean;
|
|
13
13
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
14
|
+
onClick?: () => void;
|
|
14
15
|
contentRef?: ContentRef;
|
|
15
16
|
children?: any;
|
|
16
17
|
placeholder?: string;
|
|
@@ -20,6 +21,7 @@ export interface Props {
|
|
|
20
21
|
dataAttributes?: {
|
|
21
22
|
[key: string]: string | number;
|
|
22
23
|
};
|
|
24
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
23
25
|
}
|
|
24
26
|
declare const _default: React.ForwardRefExoticComponent<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
25
27
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/task-decision",
|
|
3
|
-
"version": "17.10.
|
|
3
|
+
"version": "17.10.5",
|
|
4
4
|
"description": "Tasks and decisions react components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
},
|
|
31
31
|
"atlassian": {
|
|
32
32
|
"team": "Editor: AI",
|
|
33
|
-
"releaseModel": "continuous",
|
|
34
33
|
"website": {
|
|
35
34
|
"name": "Task Decision"
|
|
36
35
|
},
|
|
@@ -40,11 +39,11 @@
|
|
|
40
39
|
"access": "public"
|
|
41
40
|
},
|
|
42
41
|
"dependencies": {
|
|
43
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
42
|
+
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
44
43
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
45
|
-
"@atlaskit/icon": "^22.
|
|
44
|
+
"@atlaskit/icon": "^22.18.0",
|
|
46
45
|
"@atlaskit/theme": "^13.0.0",
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.60.0",
|
|
48
47
|
"@atlaskit/util-service-support": "^6.2.0",
|
|
49
48
|
"@babel/runtime": "^7.0.0",
|
|
50
49
|
"@emotion/react": "^11.7.1",
|