@atlaskit/task-decision 17.2.4 → 17.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/api/TaskDecisionResource.js +3 -3
- package/dist/cjs/api/TaskDecisionUtils.js +8 -5
- package/dist/cjs/components/ResourcedTaskItem.js +5 -3
- package/dist/cjs/components/TaskItem.js +11 -6
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/styled/DecisionItem.js +1 -1
- package/dist/cjs/styled/Item.js +1 -1
- package/dist/cjs/styled/ListWrapper.js +1 -1
- package/dist/cjs/styled/TaskItem.js +15 -4
- package/dist/cjs/type-helpers.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ResourcedTaskItem.js +3 -1
- package/dist/es2019/components/TaskItem.js +12 -6
- package/dist/es2019/styled/DecisionItem.js +2 -2
- package/dist/es2019/styled/TaskItem.js +19 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/api/TaskDecisionResource.js +2 -2
- package/dist/esm/api/TaskDecisionUtils.js +6 -4
- package/dist/esm/components/ResourcedTaskItem.js +5 -3
- package/dist/esm/components/TaskItem.js +12 -6
- package/dist/esm/styled/DecisionItem.js +2 -2
- package/dist/esm/styled/TaskItem.js +10 -5
- package/dist/esm/version.json +1 -1
- package/dist/types/components/ResourcedTaskItem.d.ts +1 -0
- package/dist/types/components/TaskItem.d.ts +3 -1
- package/dist/types/styled/TaskItem.d.ts +6 -2
- package/dist/types/types.d.ts +1 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/task-decision
|
|
2
2
|
|
|
3
|
+
## 17.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`053b9d1b25e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/053b9d1b25e) - AK-729: an empty label was removed from action item component
|
|
8
|
+
|
|
9
|
+
## 17.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`57f3b255fb2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/57f3b255fb2) - [ux] AK-608: Action items are keyboard accessible
|
|
14
|
+
|
|
15
|
+
## 17.3.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - AK-735 Update decision icon color
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 17.2.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.fabricElementsChannel = exports.createAndFireEventInElementsChannel = void 0;
|
|
7
7
|
|
|
8
8
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
9
9
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.
|
|
8
|
+
exports.default = exports.RecentUpdates = exports.ItemStateManager = exports.DECISION_STATE_CHANGED_FPS_EVENT = exports.DECISION_EDITED_FPS_EVENT = exports.DECISION_DELETED_FPS_EVENT = exports.DECISION_CREATED_FPS_EVENT = exports.DECISION_ARCHIVED_FPS_EVENT = exports.ACTION_STATE_CHANGED_FPS_EVENT = exports.ACTION_EDITED_FPS_EVENT = exports.ACTION_DELETED_FPS_EVENT = exports.ACTION_DECISION_FPS_EVENTS = exports.ACTION_CREATED_FPS_EVENT = exports.ACTION_ARCHIVED_FPS_EVENT = void 0;
|
|
9
9
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
|
|
@@ -23,9 +23,9 @@ var _types = require("../types");
|
|
|
23
23
|
|
|
24
24
|
var _typeHelpers = require("../type-helpers");
|
|
25
25
|
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
27
|
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
29
|
|
|
30
30
|
var ACTION_CREATED_FPS_EVENT = 'avi:task-decision-service:created:action';
|
|
31
31
|
exports.ACTION_CREATED_FPS_EVENT = ACTION_CREATED_FPS_EVENT;
|
|
@@ -5,22 +5,25 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.findIndex = exports.
|
|
8
|
+
exports.findIndex = exports.convertServiceTaskToTask = exports.convertServiceTaskStateToBaseItem = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
var _excluded = ["creationDate", "lastUpdateDate", "creatorId", "lastUpdaterId"],
|
|
15
|
+
_excluded2 = ["lastUpdateDate"];
|
|
15
16
|
|
|
16
|
-
function
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
|
|
19
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
20
|
|
|
18
21
|
var convertServiceTaskToTask = function convertServiceTaskToTask(serviceTask) {
|
|
19
22
|
var creationDate = serviceTask.creationDate,
|
|
20
23
|
lastUpdateDate = serviceTask.lastUpdateDate,
|
|
21
24
|
creatorId = serviceTask.creatorId,
|
|
22
25
|
lastUpdaterId = serviceTask.lastUpdaterId,
|
|
23
|
-
other = (0, _objectWithoutProperties2.default)(serviceTask,
|
|
26
|
+
other = (0, _objectWithoutProperties2.default)(serviceTask, _excluded);
|
|
24
27
|
return _objectSpread({
|
|
25
28
|
creationDate: creationDate && new Date(creationDate) || undefined,
|
|
26
29
|
lastUpdateDate: new Date(lastUpdateDate),
|
|
@@ -33,7 +36,7 @@ exports.convertServiceTaskToTask = convertServiceTaskToTask;
|
|
|
33
36
|
|
|
34
37
|
var convertServiceTaskStateToBaseItem = function convertServiceTaskStateToBaseItem(serviceTaskInfo) {
|
|
35
38
|
var lastUpdateDate = serviceTaskInfo.lastUpdateDate,
|
|
36
|
-
other = (0, _objectWithoutProperties2.default)(serviceTaskInfo,
|
|
39
|
+
other = (0, _objectWithoutProperties2.default)(serviceTaskInfo, _excluded2);
|
|
37
40
|
return _objectSpread({
|
|
38
41
|
type: 'TASK',
|
|
39
42
|
lastUpdateDate: new Date(lastUpdateDate)
|
|
@@ -33,9 +33,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
37
|
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
39
|
|
|
40
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
41
41
|
|
|
@@ -186,13 +186,15 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
186
186
|
placeholder = _this$props3.placeholder,
|
|
187
187
|
taskId = _this$props3.taskId,
|
|
188
188
|
disabled = _this$props3.disabled,
|
|
189
|
-
dataAttributes = _this$props3.dataAttributes
|
|
189
|
+
dataAttributes = _this$props3.dataAttributes,
|
|
190
|
+
isRenderer = _this$props3.isRenderer;
|
|
190
191
|
return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
|
|
191
192
|
data: {
|
|
192
193
|
objectAri: objectAri
|
|
193
194
|
}
|
|
194
195
|
}, /*#__PURE__*/_react.default.createElement(_TaskItem.default, {
|
|
195
196
|
isDone: isDone,
|
|
197
|
+
isRenderer: isRenderer,
|
|
196
198
|
taskId: taskId,
|
|
197
199
|
onChange: this.handleOnChange,
|
|
198
200
|
appearance: appearance,
|
|
@@ -82,6 +82,11 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
82
82
|
})(createAnalyticsEvent);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleOnKeyPress", function (event) {
|
|
86
|
+
if (event.key === 'Enter') {
|
|
87
|
+
_this.handleOnChange(event);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
85
90
|
_this.checkBoxId = getCheckBoxId(props.taskId);
|
|
86
91
|
return _this;
|
|
87
92
|
}
|
|
@@ -99,6 +104,7 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
99
104
|
var _this$props2 = this.props,
|
|
100
105
|
appearance = _this$props2.appearance,
|
|
101
106
|
isDone = _this$props2.isDone,
|
|
107
|
+
isRenderer = _this$props2.isRenderer,
|
|
102
108
|
contentRef = _this$props2.contentRef,
|
|
103
109
|
children = _this$props2.children,
|
|
104
110
|
placeholder = _this$props2.placeholder,
|
|
@@ -107,7 +113,8 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
107
113
|
dataAttributes = _this$props2.dataAttributes;
|
|
108
114
|
|
|
109
115
|
var icon = /*#__PURE__*/_react.default.createElement(_TaskItem.CheckBoxWrapper, {
|
|
110
|
-
contentEditable: false
|
|
116
|
+
contentEditable: false,
|
|
117
|
+
isRenderer: isRenderer
|
|
111
118
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
112
119
|
id: this.checkBoxId,
|
|
113
120
|
"aria-labelledby": "".concat(this.checkBoxId, "-wrapper"),
|
|
@@ -116,11 +123,9 @@ var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
116
123
|
onChange: this.handleOnChange,
|
|
117
124
|
checked: !!isDone,
|
|
118
125
|
disabled: !!disabled,
|
|
119
|
-
suppressHydrationWarning: true
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
suppressHydrationWarning: true
|
|
123
|
-
}));
|
|
126
|
+
suppressHydrationWarning: true,
|
|
127
|
+
onKeyPress: this.handleOnKeyPress
|
|
128
|
+
}), /*#__PURE__*/_react.default.createElement("div", null));
|
|
124
129
|
|
|
125
130
|
return /*#__PURE__*/_react.default.createElement(_Item.default, {
|
|
126
131
|
appearance: appearance,
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,12 @@ Object.defineProperty(exports, "DecisionList", {
|
|
|
17
17
|
return _DecisionList.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
+
Object.defineProperty(exports, "PubSubSpecialEventType", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _types.PubSubSpecialEventType;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
20
26
|
Object.defineProperty(exports, "ResourcedTaskItem", {
|
|
21
27
|
enumerable: true,
|
|
22
28
|
get: function get() {
|
|
@@ -41,12 +47,6 @@ Object.defineProperty(exports, "TaskList", {
|
|
|
41
47
|
return _TaskList.default;
|
|
42
48
|
}
|
|
43
49
|
});
|
|
44
|
-
Object.defineProperty(exports, "PubSubSpecialEventType", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function get() {
|
|
47
|
-
return _types.PubSubSpecialEventType;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
50
|
|
|
51
51
|
var _DecisionItem = _interopRequireDefault(require("./components/DecisionItem"));
|
|
52
52
|
|
|
@@ -21,7 +21,7 @@ var _templateObject;
|
|
|
21
21
|
|
|
22
22
|
var EditorIconWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n height: 16px;\n width: 16px;\n color: ", ";\n margin: 4px ", "px 0 0;\n\n > span {\n margin: -8px;\n }\n"])), function (props) {
|
|
23
23
|
return props.showPlaceholder ? _colors.N100 : (0, _components.themed)({
|
|
24
|
-
light: _colors.
|
|
24
|
+
light: _colors.G400,
|
|
25
25
|
dark: _colors.G200
|
|
26
26
|
});
|
|
27
27
|
}, (0, _constants.gridSize)() * 1.5);
|
package/dist/cjs/styled/Item.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.TaskWrapper = exports.ParticipantWrapper = exports.DecisionWrapper = exports.ContentWrapper = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.TaskListWrapper = exports.DecisionListWrapper = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
@@ -9,7 +11,7 @@ exports.CheckBoxWrapper = void 0;
|
|
|
9
11
|
|
|
10
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
13
|
|
|
12
|
-
var _styledComponents =
|
|
14
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
15
|
|
|
14
16
|
var _components = require("@atlaskit/theme/components");
|
|
15
17
|
|
|
@@ -17,15 +19,24 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
17
19
|
|
|
18
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
21
|
|
|
20
|
-
var _templateObject;
|
|
22
|
+
var _templateObject, _templateObject2;
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
var CheckBoxWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", "\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", "\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", "\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), (0, _constants.gridSize)(), (0, _components.themed)({
|
|
23
29
|
light: _colors.N0,
|
|
24
30
|
dark: _colors.DN100
|
|
25
31
|
}), (0, _components.themed)({
|
|
26
32
|
light: _colors.N90,
|
|
27
33
|
dark: _colors.DN200
|
|
28
|
-
}), (
|
|
34
|
+
}), function (props) {
|
|
35
|
+
return props.isRenderer ? (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n outline: 2px solid ", ";\n "])), (0, _components.themed)({
|
|
36
|
+
light: _colors.B300,
|
|
37
|
+
dark: _colors.B75
|
|
38
|
+
})) : '';
|
|
39
|
+
}, (0, _components.themed)({
|
|
29
40
|
light: _colors.N30,
|
|
30
41
|
dark: _colors.B75
|
|
31
42
|
}));
|
package/dist/cjs/type-helpers.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.toggleTaskState = exports.
|
|
6
|
+
exports.toggleTaskState = exports.toObjectKey = exports.objectKeyToString = exports.isTask = exports.isDecision = void 0;
|
|
7
7
|
|
|
8
8
|
var isDecision = function isDecision(item) {
|
|
9
9
|
return !!(item && item.type === 'DECISION');
|
package/dist/cjs/version.json
CHANGED
|
@@ -137,7 +137,8 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
137
137
|
placeholder,
|
|
138
138
|
taskId,
|
|
139
139
|
disabled,
|
|
140
|
-
dataAttributes
|
|
140
|
+
dataAttributes,
|
|
141
|
+
isRenderer
|
|
141
142
|
} = this.props;
|
|
142
143
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
143
144
|
data: {
|
|
@@ -145,6 +146,7 @@ export default class ResourcedTaskItem extends PureComponent {
|
|
|
145
146
|
}
|
|
146
147
|
}, /*#__PURE__*/React.createElement(TaskItem, {
|
|
147
148
|
isDone: isDone,
|
|
149
|
+
isRenderer: isRenderer,
|
|
148
150
|
taskId: taskId,
|
|
149
151
|
onChange: this.handleOnChange,
|
|
150
152
|
appearance: appearance,
|
|
@@ -40,6 +40,12 @@ export class TaskItem extends PureComponent {
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
_defineProperty(this, "handleOnKeyPress", event => {
|
|
44
|
+
if (event.key === 'Enter') {
|
|
45
|
+
this.handleOnChange(event);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
43
49
|
this.checkBoxId = getCheckBoxId(props.taskId);
|
|
44
50
|
}
|
|
45
51
|
|
|
@@ -53,6 +59,7 @@ export class TaskItem extends PureComponent {
|
|
|
53
59
|
const {
|
|
54
60
|
appearance,
|
|
55
61
|
isDone,
|
|
62
|
+
isRenderer,
|
|
56
63
|
contentRef,
|
|
57
64
|
children,
|
|
58
65
|
placeholder,
|
|
@@ -61,7 +68,8 @@ export class TaskItem extends PureComponent {
|
|
|
61
68
|
dataAttributes
|
|
62
69
|
} = this.props;
|
|
63
70
|
const icon = /*#__PURE__*/React.createElement(CheckBoxWrapper, {
|
|
64
|
-
contentEditable: false
|
|
71
|
+
contentEditable: false,
|
|
72
|
+
isRenderer: isRenderer
|
|
65
73
|
}, /*#__PURE__*/React.createElement("input", {
|
|
66
74
|
id: this.checkBoxId,
|
|
67
75
|
"aria-labelledby": `${this.checkBoxId}-wrapper`,
|
|
@@ -70,11 +78,9 @@ export class TaskItem extends PureComponent {
|
|
|
70
78
|
onChange: this.handleOnChange,
|
|
71
79
|
checked: !!isDone,
|
|
72
80
|
disabled: !!disabled,
|
|
73
|
-
suppressHydrationWarning: true
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
suppressHydrationWarning: true
|
|
77
|
-
}));
|
|
81
|
+
suppressHydrationWarning: true,
|
|
82
|
+
onKeyPress: this.handleOnKeyPress
|
|
83
|
+
}), /*#__PURE__*/React.createElement("div", null));
|
|
78
84
|
return /*#__PURE__*/React.createElement(Item, {
|
|
79
85
|
appearance: appearance,
|
|
80
86
|
contentRef: contentRef,
|
|
@@ -3,13 +3,13 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
|
|
|
3
3
|
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { N100,
|
|
6
|
+
import { N100, G400, G200 } from '@atlaskit/theme/colors';
|
|
7
7
|
export const EditorIconWrapper = styled.span`
|
|
8
8
|
flex: 0 0 16px;
|
|
9
9
|
height: 16px;
|
|
10
10
|
width: 16px;
|
|
11
11
|
color: ${props => props.showPlaceholder ? N100 : themed({
|
|
12
|
-
light:
|
|
12
|
+
light: G400,
|
|
13
13
|
dark: G200
|
|
14
14
|
})};
|
|
15
15
|
margin: 4px ${gridSize() * 1.5}px 0 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import styled from 'styled-components'; // @ts-ignore: unused variable
|
|
1
|
+
import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
|
|
4
4
|
import { themed } from '@atlaskit/theme/components';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { N0, DN100, DN200, N30, N90, B75 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
|
|
7
7
|
export const CheckBoxWrapper = styled.span`
|
|
8
8
|
flex: 0 0 16px;
|
|
9
9
|
width: 16px;
|
|
@@ -13,6 +13,10 @@ export const CheckBoxWrapper = styled.span`
|
|
|
13
13
|
margin: 4px ${gridSize()}px 0 0;
|
|
14
14
|
|
|
15
15
|
& > input[type='checkbox'] {
|
|
16
|
+
width: 16px;
|
|
17
|
+
height: 16px;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
cursor: pointer;
|
|
16
20
|
position: absolute;
|
|
17
21
|
outline: none;
|
|
18
22
|
margin: 0;
|
|
@@ -21,7 +25,7 @@ export const CheckBoxWrapper = styled.span`
|
|
|
21
25
|
top: 50%;
|
|
22
26
|
transform: translateY(-50%);
|
|
23
27
|
|
|
24
|
-
+
|
|
28
|
+
+ div {
|
|
25
29
|
box-sizing: border-box;
|
|
26
30
|
display: block;
|
|
27
31
|
position: relative;
|
|
@@ -52,27 +56,34 @@ export const CheckBoxWrapper = styled.span`
|
|
|
52
56
|
transform: translate(-50%, -50%);
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
|
-
&:
|
|
59
|
+
&:focus-visible + div:after {
|
|
60
|
+
${props => props.isRenderer ? css`
|
|
61
|
+
outline: 2px solid ${themed({
|
|
62
|
+
light: B300,
|
|
63
|
+
dark: B75
|
|
64
|
+
})};
|
|
65
|
+
` : ''}
|
|
66
|
+
}
|
|
67
|
+
&:not([disabled]):hover + div::after {
|
|
56
68
|
background: ${themed({
|
|
57
69
|
light: N30,
|
|
58
70
|
dark: B75
|
|
59
71
|
})}
|
|
60
72
|
transition: border 0.2s ease-in-out;
|
|
61
73
|
}
|
|
62
|
-
&[disabled] +
|
|
74
|
+
&[disabled] + div {
|
|
63
75
|
opacity: 0.5;
|
|
64
76
|
cursor: default;
|
|
65
77
|
}
|
|
66
78
|
&:checked {
|
|
67
|
-
+
|
|
79
|
+
+ div::after {
|
|
68
80
|
background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
|
|
69
81
|
no-repeat 0 0;
|
|
70
82
|
background-size: 16px;
|
|
71
83
|
border: 0;
|
|
72
84
|
border-color: transparent;
|
|
73
|
-
border-radius: 0; /* FS-1392 */
|
|
74
85
|
}
|
|
75
|
-
&:not([disabled]) +
|
|
86
|
+
&:not([disabled]):hover + div::after {
|
|
76
87
|
background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)
|
|
77
88
|
no-repeat 0 0;
|
|
78
89
|
background-size: 16px;
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,9 +2,9 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
|
|
9
9
|
import uuid from 'uuid';
|
|
10
10
|
import { utils } from '@atlaskit/util-service-support';
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["creationDate", "lastUpdateDate", "creatorId", "lastUpdaterId"],
|
|
4
|
+
_excluded2 = ["lastUpdateDate"];
|
|
3
5
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
7
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
9
|
|
|
8
10
|
export var convertServiceTaskToTask = function convertServiceTaskToTask(serviceTask) {
|
|
9
11
|
var creationDate = serviceTask.creationDate,
|
|
10
12
|
lastUpdateDate = serviceTask.lastUpdateDate,
|
|
11
13
|
creatorId = serviceTask.creatorId,
|
|
12
14
|
lastUpdaterId = serviceTask.lastUpdaterId,
|
|
13
|
-
other = _objectWithoutProperties(serviceTask,
|
|
15
|
+
other = _objectWithoutProperties(serviceTask, _excluded);
|
|
14
16
|
|
|
15
17
|
return _objectSpread({
|
|
16
18
|
creationDate: creationDate && new Date(creationDate) || undefined,
|
|
@@ -21,7 +23,7 @@ export var convertServiceTaskToTask = function convertServiceTaskToTask(serviceT
|
|
|
21
23
|
};
|
|
22
24
|
export var convertServiceTaskStateToBaseItem = function convertServiceTaskStateToBaseItem(serviceTaskInfo) {
|
|
23
25
|
var lastUpdateDate = serviceTaskInfo.lastUpdateDate,
|
|
24
|
-
other = _objectWithoutProperties(serviceTaskInfo,
|
|
26
|
+
other = _objectWithoutProperties(serviceTaskInfo, _excluded2);
|
|
25
27
|
|
|
26
28
|
return _objectSpread({
|
|
27
29
|
type: 'TASK',
|
|
@@ -6,9 +6,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
10
|
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
12
|
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
14
|
|
|
@@ -169,13 +169,15 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
169
169
|
placeholder = _this$props3.placeholder,
|
|
170
170
|
taskId = _this$props3.taskId,
|
|
171
171
|
disabled = _this$props3.disabled,
|
|
172
|
-
dataAttributes = _this$props3.dataAttributes
|
|
172
|
+
dataAttributes = _this$props3.dataAttributes,
|
|
173
|
+
isRenderer = _this$props3.isRenderer;
|
|
173
174
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
174
175
|
data: {
|
|
175
176
|
objectAri: objectAri
|
|
176
177
|
}
|
|
177
178
|
}, /*#__PURE__*/React.createElement(TaskItem, {
|
|
178
179
|
isDone: isDone,
|
|
180
|
+
isRenderer: isRenderer,
|
|
179
181
|
taskId: taskId,
|
|
180
182
|
onChange: this.handleOnChange,
|
|
181
183
|
appearance: appearance,
|
|
@@ -60,6 +60,12 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
+
_defineProperty(_assertThisInitialized(_this), "handleOnKeyPress", function (event) {
|
|
64
|
+
if (event.key === 'Enter') {
|
|
65
|
+
_this.handleOnChange(event);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
63
69
|
_this.checkBoxId = getCheckBoxId(props.taskId);
|
|
64
70
|
return _this;
|
|
65
71
|
}
|
|
@@ -77,6 +83,7 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
77
83
|
var _this$props2 = this.props,
|
|
78
84
|
appearance = _this$props2.appearance,
|
|
79
85
|
isDone = _this$props2.isDone,
|
|
86
|
+
isRenderer = _this$props2.isRenderer,
|
|
80
87
|
contentRef = _this$props2.contentRef,
|
|
81
88
|
children = _this$props2.children,
|
|
82
89
|
placeholder = _this$props2.placeholder,
|
|
@@ -84,7 +91,8 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
84
91
|
disabled = _this$props2.disabled,
|
|
85
92
|
dataAttributes = _this$props2.dataAttributes;
|
|
86
93
|
var icon = /*#__PURE__*/React.createElement(CheckBoxWrapper, {
|
|
87
|
-
contentEditable: false
|
|
94
|
+
contentEditable: false,
|
|
95
|
+
isRenderer: isRenderer
|
|
88
96
|
}, /*#__PURE__*/React.createElement("input", {
|
|
89
97
|
id: this.checkBoxId,
|
|
90
98
|
"aria-labelledby": "".concat(this.checkBoxId, "-wrapper"),
|
|
@@ -93,11 +101,9 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
93
101
|
onChange: this.handleOnChange,
|
|
94
102
|
checked: !!isDone,
|
|
95
103
|
disabled: !!disabled,
|
|
96
|
-
suppressHydrationWarning: true
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
suppressHydrationWarning: true
|
|
100
|
-
}));
|
|
104
|
+
suppressHydrationWarning: true,
|
|
105
|
+
onKeyPress: this.handleOnKeyPress
|
|
106
|
+
}), /*#__PURE__*/React.createElement("div", null));
|
|
101
107
|
return /*#__PURE__*/React.createElement(Item, {
|
|
102
108
|
appearance: appearance,
|
|
103
109
|
contentRef: contentRef,
|
|
@@ -7,10 +7,10 @@ import styled from 'styled-components'; // @ts-ignore: unused variable
|
|
|
7
7
|
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
|
-
import { N100,
|
|
10
|
+
import { N100, G400, G200 } from '@atlaskit/theme/colors';
|
|
11
11
|
export var EditorIconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n height: 16px;\n width: 16px;\n color: ", ";\n margin: 4px ", "px 0 0;\n\n > span {\n margin: -8px;\n }\n"])), function (props) {
|
|
12
12
|
return props.showPlaceholder ? N100 : themed({
|
|
13
|
-
light:
|
|
13
|
+
light: G400,
|
|
14
14
|
dark: G200
|
|
15
15
|
});
|
|
16
16
|
}, gridSize() * 1.5);
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject;
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
|
-
import styled from 'styled-components'; // @ts-ignore: unused variable
|
|
5
|
+
import styled, { css } from 'styled-components'; // @ts-ignore: unused variable
|
|
6
6
|
// prettier-ignore
|
|
7
7
|
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
|
-
import { N0, DN100, DN200, N30, N90, B75 } from '@atlaskit/theme/colors';
|
|
11
|
-
export var CheckBoxWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n +
|
|
10
|
+
import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
|
|
11
|
+
export var CheckBoxWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", "\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", "\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", "\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), gridSize(), themed({
|
|
12
12
|
light: N0,
|
|
13
13
|
dark: DN100
|
|
14
14
|
}), themed({
|
|
15
15
|
light: N90,
|
|
16
16
|
dark: DN200
|
|
17
|
-
}),
|
|
17
|
+
}), function (props) {
|
|
18
|
+
return props.isRenderer ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n outline: 2px solid ", ";\n "])), themed({
|
|
19
|
+
light: B300,
|
|
20
|
+
dark: B75
|
|
21
|
+
})) : '';
|
|
22
|
+
}, themed({
|
|
18
23
|
light: N30,
|
|
19
24
|
dark: B75
|
|
20
25
|
}));
|
package/dist/esm/version.json
CHANGED
|
@@ -5,6 +5,7 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
taskId: string;
|
|
7
7
|
isDone?: boolean;
|
|
8
|
+
isRenderer?: boolean;
|
|
8
9
|
onChange?: (taskId: string, isChecked: boolean) => void;
|
|
9
10
|
contentRef?: ContentRef;
|
|
10
11
|
children?: any;
|
|
@@ -22,7 +23,8 @@ export declare class TaskItem extends PureComponent<Props & WithAnalyticsEventsP
|
|
|
22
23
|
constructor(props: Props & WithAnalyticsEventsProps);
|
|
23
24
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
24
25
|
handleOnChange: (_evt: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
26
|
+
handleOnKeyPress: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
25
27
|
render(): JSX.Element;
|
|
26
28
|
}
|
|
27
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "disabled">, never> & Partial<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "disabled">, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "disabled">> & Partial<Pick<Partial<Props>, never>> & React.RefAttributes<any>>;
|
|
29
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "isRenderer" | "disabled">, never> & Partial<Pick<Pick<Props & WithAnalyticsEventsProps, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "isRenderer" | "disabled">, "placeholder" | "children" | "onChange" | "showPlaceholder" | "appearance" | "contentRef" | "dataAttributes" | "taskId" | "isDone" | "isRenderer" | "disabled">> & Partial<Pick<Partial<Props>, never>> & React.RefAttributes<any>>;
|
|
28
30
|
export default _default;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { HTMLAttributes,
|
|
2
|
-
export declare const CheckBoxWrapper:
|
|
1
|
+
import { HTMLAttributes, ClassAttributes } from 'react';
|
|
2
|
+
export declare const CheckBoxWrapper: import("styled-components").StyledComponentClass<ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & {
|
|
3
|
+
isRenderer: boolean | undefined;
|
|
4
|
+
}, any, ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
+
isRenderer: boolean | undefined;
|
|
6
|
+
}>;
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/task-decision",
|
|
3
|
-
"version": "17.2
|
|
3
|
+
"version": "17.3.2",
|
|
4
4
|
"description": "Tasks and decisions react components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
29
|
+
"@atlaskit/analytics-namespaced-context": "^6.4.0",
|
|
30
30
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
31
|
-
"@atlaskit/icon": "^21.
|
|
32
|
-
"@atlaskit/theme": "^12.
|
|
33
|
-
"@atlaskit/util-service-support": "^6.
|
|
31
|
+
"@atlaskit/icon": "^21.10.0",
|
|
32
|
+
"@atlaskit/theme": "^12.1.0",
|
|
33
|
+
"@atlaskit/util-service-support": "^6.1.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0",
|
|
35
35
|
"uuid": "^3.1.0"
|
|
36
36
|
},
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"url-search-params": "^0.10.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
44
|
+
"@atlaskit/analytics-listeners": "^8.2.0",
|
|
45
45
|
"@atlaskit/avatar": "^20.5.0",
|
|
46
46
|
"@atlaskit/docs": "*",
|
|
47
|
-
"@atlaskit/editor-common": "^
|
|
47
|
+
"@atlaskit/editor-common": "^65.0.0",
|
|
48
48
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
49
|
-
"@atlaskit/renderer": "^
|
|
50
|
-
"@atlaskit/util-data-test": "^17.
|
|
49
|
+
"@atlaskit/renderer": "^92.0.0",
|
|
50
|
+
"@atlaskit/util-data-test": "^17.2.0",
|
|
51
51
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
52
52
|
"@types/url-search-params": "^0.10.0",
|
|
53
53
|
"date-fns": "^2.17.0",
|