@atlaskit/task-decision 19.1.2 → 19.1.3
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 +8 -0
- package/afm-cc/tsconfig.json +0 -9
- package/afm-jira/tsconfig.json +0 -9
- package/afm-post-office/tsconfig.json +0 -9
- package/dist/cjs/components/DecisionItem.js +13 -27
- package/dist/cjs/components/DecisionList.js +22 -22
- package/dist/cjs/components/Item.js +39 -39
- package/dist/cjs/components/ResourcedTaskItem.js +0 -23
- package/dist/cjs/components/TaskItem.js +21 -22
- package/dist/cjs/components/TaskList.js +24 -26
- package/dist/cjs/index.js +25 -12
- package/dist/es2019/components/DecisionItem.js +10 -26
- package/dist/es2019/components/DecisionList.js +23 -27
- package/dist/es2019/components/Item.js +30 -40
- package/dist/es2019/components/ResourcedTaskItem.js +2 -25
- package/dist/es2019/components/TaskItem.js +18 -18
- package/dist/es2019/components/TaskList.js +24 -28
- package/dist/es2019/index.js +4 -13
- package/dist/esm/components/DecisionItem.js +10 -26
- package/dist/esm/components/DecisionList.js +22 -26
- package/dist/esm/components/Item.js +34 -40
- package/dist/esm/components/ResourcedTaskItem.js +2 -25
- package/dist/esm/components/TaskItem.js +21 -18
- package/dist/esm/components/TaskList.js +23 -27
- package/dist/esm/index.js +4 -13
- package/dist/types/components/DecisionItem.d.ts +2 -6
- package/dist/types/components/DecisionList.d.ts +1 -2
- package/dist/types/components/Item.d.ts +2 -3
- package/dist/types/components/TaskList.d.ts +1 -2
- package/dist/types/index.d.ts +4 -5
- package/dist/types-ts4.5/components/DecisionItem.d.ts +2 -6
- package/dist/types-ts4.5/components/DecisionList.d.ts +1 -2
- package/dist/types-ts4.5/components/Item.d.ts +2 -3
- package/dist/types-ts4.5/components/TaskList.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +4 -5
- package/package.json +2 -13
- package/dist/cjs/components/compiled/DecisionItem.js +0 -45
- package/dist/cjs/components/compiled/DecisionList.js +0 -62
- package/dist/cjs/components/compiled/Item.js +0 -101
- package/dist/cjs/components/compiled/TaskItem.js +0 -134
- package/dist/cjs/components/compiled/TaskList.js +0 -68
- package/dist/cjs/components/styles.js +0 -234
- package/dist/cjs/components/theme.js +0 -67
- package/dist/es2019/components/compiled/DecisionItem.js +0 -36
- package/dist/es2019/components/compiled/DecisionList.js +0 -40
- package/dist/es2019/components/compiled/Item.js +0 -70
- package/dist/es2019/components/compiled/TaskItem.js +0 -117
- package/dist/es2019/components/compiled/TaskList.js +0 -46
- package/dist/es2019/components/styles.js +0 -221
- package/dist/es2019/components/theme.js +0 -61
- package/dist/esm/components/compiled/DecisionItem.js +0 -35
- package/dist/esm/components/compiled/DecisionList.js +0 -53
- package/dist/esm/components/compiled/Item.js +0 -92
- package/dist/esm/components/compiled/TaskItem.js +0 -126
- package/dist/esm/components/compiled/TaskList.js +0 -60
- package/dist/esm/components/styles.js +0 -227
- package/dist/esm/components/theme.js +0 -61
- package/dist/types/components/compiled/DecisionItem.d.ts +0 -14
- package/dist/types/components/compiled/DecisionList.d.ts +0 -11
- package/dist/types/components/compiled/Item.d.ts +0 -25
- package/dist/types/components/compiled/TaskItem.d.ts +0 -27
- package/dist/types/components/compiled/TaskList.d.ts +0 -8
- package/dist/types/components/styles.d.ts +0 -12
- package/dist/types/components/theme.d.ts +0 -61
- package/dist/types-ts4.5/components/compiled/DecisionItem.d.ts +0 -14
- package/dist/types-ts4.5/components/compiled/DecisionList.d.ts +0 -11
- package/dist/types-ts4.5/components/compiled/Item.d.ts +0 -25
- package/dist/types-ts4.5/components/compiled/TaskItem.d.ts +0 -27
- package/dist/types-ts4.5/components/compiled/TaskList.d.ts +0 -8
- package/dist/types-ts4.5/components/styles.d.ts +0 -12
- package/dist/types-ts4.5/components/theme.d.ts +0 -61
- /package/dist/cjs/components/{compiled/DecisionItem.compiled.css → DecisionItem.compiled.css} +0 -0
- /package/dist/cjs/components/{compiled/DecisionList.compiled.css → DecisionList.compiled.css} +0 -0
- /package/dist/cjs/components/{compiled/Item.compiled.css → Item.compiled.css} +0 -0
- /package/dist/cjs/components/{compiled/TaskItem.compiled.css → TaskItem.compiled.css} +0 -0
- /package/dist/cjs/components/{compiled/TaskList.compiled.css → TaskList.compiled.css} +0 -0
- /package/dist/es2019/components/{compiled/DecisionItem.compiled.css → DecisionItem.compiled.css} +0 -0
- /package/dist/es2019/components/{compiled/DecisionList.compiled.css → DecisionList.compiled.css} +0 -0
- /package/dist/es2019/components/{compiled/Item.compiled.css → Item.compiled.css} +0 -0
- /package/dist/es2019/components/{compiled/TaskItem.compiled.css → TaskItem.compiled.css} +0 -0
- /package/dist/es2019/components/{compiled/TaskList.compiled.css → TaskList.compiled.css} +0 -0
- /package/dist/esm/components/{compiled/DecisionItem.compiled.css → DecisionItem.compiled.css} +0 -0
- /package/dist/esm/components/{compiled/DecisionList.compiled.css → DecisionList.compiled.css} +0 -0
- /package/dist/esm/components/{compiled/Item.compiled.css → Item.compiled.css} +0 -0
- /package/dist/esm/components/{compiled/TaskItem.compiled.css → TaskItem.compiled.css} +0 -0
- /package/dist/esm/components/{compiled/TaskList.compiled.css → TaskList.compiled.css} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Item.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -5,19 +6,17 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import "./Item.compiled.css";
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
|
-
/**
|
|
11
|
-
* @jsxRuntime classic
|
|
12
|
-
* @jsx jsx
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
14
|
import { PureComponent } from 'react';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
var placeholderStyles = null;
|
|
16
|
+
var placeholderTaskStyles = null;
|
|
17
|
+
var decisionStyles = null;
|
|
18
|
+
var contentStyles = null;
|
|
19
|
+
var taskStyles = null;
|
|
21
20
|
var Item = /*#__PURE__*/function (_PureComponent) {
|
|
22
21
|
function Item() {
|
|
23
22
|
_classCallCheck(this, Item);
|
|
@@ -35,17 +34,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
35
34
|
if (!showPlaceholder || !placeholder || children) {
|
|
36
35
|
return null;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
// TODO: Migrate away from gridSize
|
|
40
|
-
// Recommendation: Replace gridSize with 8
|
|
41
|
-
var offset = gridSize() * (itemType === 'TASK' ? 3 : 3.5);
|
|
42
|
-
return jsx("span", {
|
|
37
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
43
38
|
"data-testid": "task-decision-item-placeholder",
|
|
44
|
-
"data-component": "placeholder"
|
|
45
|
-
|
|
46
|
-
,
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
"data-component": "placeholder",
|
|
40
|
+
contentEditable: false,
|
|
41
|
+
className: ax(["_18s81hzh _1reo15vq _18m915vq _kqswstnw _syaz131l _lcxvglyw _1bto1l2s _o5721q9c _p12f1dza", itemType === 'TASK' && "_18s815t0"]),
|
|
42
|
+
style: {
|
|
43
|
+
"--_tptct2": ix("0 0 0 calc(".concat("var(--ds-space-100, 8px)", " * 3.5)")),
|
|
44
|
+
"--_1yfnyhr": ix("0 0 0 calc(".concat("var(--ds-space-100, 8px)", " * 3)"))
|
|
45
|
+
}
|
|
49
46
|
}, placeholder);
|
|
50
47
|
}
|
|
51
48
|
}, {
|
|
@@ -59,29 +56,26 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
59
56
|
checkBoxId = _this$props2.checkBoxId,
|
|
60
57
|
dataAttributes = _this$props2.dataAttributes;
|
|
61
58
|
if (itemType === 'TASK') {
|
|
62
|
-
return (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, dataAttributes), children))
|
|
72
|
-
);
|
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
id: "".concat(checkBoxId, "-wrapper"),
|
|
61
|
+
className: ax(["_1e0c1txw _2lx2vrvc _kqswh2mm"])
|
|
62
|
+
}, icon, this.renderPlaceholder(), /*#__PURE__*/React.createElement("div", _extends({
|
|
63
|
+
"data-component": "content",
|
|
64
|
+
ref: contentRef
|
|
65
|
+
}, dataAttributes, {
|
|
66
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _16jlkb7n _1o9zkb7n _i0dl1wug _slp31hna _1ul9idpf"])
|
|
67
|
+
}), children));
|
|
73
68
|
} else if (itemType === 'DECISION') {
|
|
74
|
-
return
|
|
75
|
-
"data-testid": "elements-decision-item"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"data-decision-wrapper": "true"
|
|
80
|
-
}, icon, this.renderPlaceholder(), jsx("div", _extends({
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
"data-testid": "elements-decision-item",
|
|
71
|
+
"data-decision-wrapper": "true",
|
|
72
|
+
className: ax(["_2rkosqtm _1e0c1txw _2lx2vrvc _19pku2gc _2hwxidpf _otyridpf _18u0idpf _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvutpp _bfhkm7j4 _kqswh2mm _14hd1wug"])
|
|
73
|
+
}, icon, this.renderPlaceholder(), /*#__PURE__*/React.createElement("div", _extends({
|
|
81
74
|
"data-component": "content",
|
|
82
|
-
css: contentStyles,
|
|
83
75
|
ref: contentRef
|
|
84
|
-
}, dataAttributes
|
|
76
|
+
}, dataAttributes, {
|
|
77
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _16jlkb7n _1o9zkb7n _i0dl1wug _slp31hna _1ul9idpf"])
|
|
78
|
+
}), children));
|
|
85
79
|
}
|
|
86
80
|
return null;
|
|
87
81
|
}
|
|
@@ -10,10 +10,8 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { PureComponent } from 'react';
|
|
13
|
-
import
|
|
14
|
-
import CompiledTaskItem from './compiled/TaskItem';
|
|
13
|
+
import TaskItem from './TaskItem';
|
|
15
14
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
15
|
var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
18
16
|
function ResourcedTaskItem(props) {
|
|
19
17
|
var _this;
|
|
@@ -161,32 +159,11 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
161
159
|
isRenderer = _this$props3.isRenderer,
|
|
162
160
|
isFocused = _this$props3.isFocused,
|
|
163
161
|
inputRef = _this$props3.inputRef;
|
|
164
|
-
if (fg('platform_editor_css_migrate_stage_1')) {
|
|
165
|
-
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
166
|
-
data: {
|
|
167
|
-
objectAri: objectAri
|
|
168
|
-
}
|
|
169
|
-
}, /*#__PURE__*/React.createElement(CompiledTaskItem, {
|
|
170
|
-
isDone: isDone,
|
|
171
|
-
isRenderer: isRenderer,
|
|
172
|
-
isFocused: isFocused,
|
|
173
|
-
taskId: taskId,
|
|
174
|
-
onChange: this.handleOnChange,
|
|
175
|
-
onClick: this.handleOnClick,
|
|
176
|
-
appearance: appearance,
|
|
177
|
-
contentRef: contentRef,
|
|
178
|
-
showPlaceholder: showPlaceholder,
|
|
179
|
-
placeholder: placeholder,
|
|
180
|
-
disabled: disabled,
|
|
181
|
-
dataAttributes: dataAttributes,
|
|
182
|
-
inputRef: inputRef
|
|
183
|
-
}, children));
|
|
184
|
-
}
|
|
185
162
|
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
186
163
|
data: {
|
|
187
164
|
objectAri: objectAri
|
|
188
165
|
}
|
|
189
|
-
}, /*#__PURE__*/React.createElement(
|
|
166
|
+
}, /*#__PURE__*/React.createElement(TaskItem, {
|
|
190
167
|
isDone: isDone,
|
|
191
168
|
isRenderer: isRenderer,
|
|
192
169
|
isFocused: isFocused,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
/* TaskItem.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
3
|
+
import "./TaskItem.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
import React, { useMemo, useRef } from 'react';
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
6
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
10
7
|
import { Icon } from '@atlaskit/icon/base-new';
|
|
11
8
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
@@ -14,13 +11,19 @@ import CheckboxCheckedIcon from '@atlaskit/icon/core/checkbox-checked';
|
|
|
14
11
|
import Item from './Item';
|
|
15
12
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
16
13
|
import { createAndFireEventInElementsChannel } from '../analytics';
|
|
17
|
-
import { checkboxStyles } from './styles';
|
|
18
14
|
var CheckboxUncheckedIcon = function CheckboxUncheckedIcon(props) {
|
|
19
|
-
return
|
|
15
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
20
16
|
dangerouslySetGlyph: "<rect width=\"12.5\" height=\"12.5\" x=\"1.75\" y=\"1.75\" stroke=\"currentcolor\" stroke-width=\"1.5\" rx=\"1.25\"/>",
|
|
21
17
|
type: 'core'
|
|
22
18
|
}, props));
|
|
23
19
|
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* References packages/design-system/checkbox/src/checkbox.tsx
|
|
23
|
+
* To be used until mobile editor does not require legacy themed() API anymore,
|
|
24
|
+
* which will allow migration to use @atlaskit/checkbox instead
|
|
25
|
+
*/
|
|
26
|
+
var checkboxStyles = null;
|
|
24
27
|
var taskCount = 0;
|
|
25
28
|
var getCheckBoxId = function getCheckBoxId(localId) {
|
|
26
29
|
return "".concat(localId, "-").concat(taskCount++);
|
|
@@ -29,7 +32,6 @@ var TaskItem = function TaskItem(props) {
|
|
|
29
32
|
var appearance = props.appearance,
|
|
30
33
|
isDone = props.isDone,
|
|
31
34
|
isFocused = props.isFocused,
|
|
32
|
-
isRenderer = props.isRenderer,
|
|
33
35
|
contentRef = props.contentRef,
|
|
34
36
|
children = props.children,
|
|
35
37
|
placeholder = props.placeholder,
|
|
@@ -72,12 +74,13 @@ var TaskItem = function TaskItem(props) {
|
|
|
72
74
|
}, [handleOnChange]);
|
|
73
75
|
var defaultInputRef = useRef(null);
|
|
74
76
|
var inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
|
|
75
|
-
var icon =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
var icon = /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
contentEditable: false,
|
|
79
|
+
className: ax(["_16jlidpf _1o9zidpf _i0dl1tcg _1bsb1tcg _4t3i1tcg _kqswh2mm _1wpzv2br _1snx1r31 _1746glyw _dx3f1o36 _1h5xidpf _sqizidpf _fs2cidpf _1smcidpf _oezm15vq _1l0615vq _1abj1mn3 _18a711so _16np1elr _a27kkb7n _q3p7usvi _qhqx1nu9 _10cr1ssb _zfav1ssb _m7eu1ooe _l9o0n7od _1efjn7od _1u2istnw _32ro1j9a _1wn015vq _den512j9 _zh8l1b66 _g5w3stnw _whhepxbi _1stbpxbi _18tob3bt _1awt1ule _haf81ssb _ra781ssb _cr751ooe _1q8r7vkz _9l2s7vkz _1mh7kb7n _s3uktlke _1davidpf _8bo8stnw _psnc1ssb _4k421ssb _1rvv1ooe _13vl73ad _1t711tcg _1nuz1tcg _cs4qstnw _9j2j1ssb _1mwj1ssb _19l51ooe _12yy1d5g _1miy1elr _1umo18hz _tpz25w2r _k6dg18hz _1qduewfl _q8ft1fvw _1y9t5w2r _ut031fvw _gi9hr01l _1qp6muej _wxkgr01l _wo245w2r _c8dpmuej _d2dcsyzs _1eulsyzs _1bc7syzs _16fmsyzs _bhkusyzs _czfesyzs _1gxgsyzs _19w0syzs _1x1y1lg7"]),
|
|
80
|
+
style: {
|
|
81
|
+
"--_toyvsf": ix("2px solid ".concat("var(--ds-border-focused, #388BFF)"))
|
|
82
|
+
}
|
|
83
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
81
84
|
id: checkBoxId,
|
|
82
85
|
"aria-labelledby": "".concat(checkBoxId, "-wrapper"),
|
|
83
86
|
name: checkBoxId,
|
|
@@ -89,9 +92,9 @@ var TaskItem = function TaskItem(props) {
|
|
|
89
92
|
suppressHydrationWarning: true,
|
|
90
93
|
onKeyPress: handleOnKeyPress,
|
|
91
94
|
ref: inputRef
|
|
92
|
-
}), isDone ?
|
|
95
|
+
}), isDone ? /*#__PURE__*/React.createElement(CheckboxCheckedIcon, {
|
|
93
96
|
label: ""
|
|
94
|
-
}) :
|
|
97
|
+
}) : /*#__PURE__*/React.createElement(CheckboxUncheckedIcon, {
|
|
95
98
|
label: ""
|
|
96
99
|
}));
|
|
97
100
|
React.useEffect(function () {
|
|
@@ -105,7 +108,7 @@ var TaskItem = function TaskItem(props) {
|
|
|
105
108
|
}, 100);
|
|
106
109
|
}
|
|
107
110
|
}, [isFocused, inputRef]);
|
|
108
|
-
return
|
|
111
|
+
return /*#__PURE__*/React.createElement(Item, {
|
|
109
112
|
appearance: appearance,
|
|
110
113
|
contentRef: contentRef,
|
|
111
114
|
icon: icon,
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
+
/* TaskList.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
6
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import "./TaskList.compiled.css";
|
|
8
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
|
-
/**
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
11
|
import React from 'react';
|
|
13
12
|
import { PureComponent } from 'react';
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
-
import { jsx } from '@emotion/react';
|
|
16
13
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
17
|
-
|
|
14
|
+
var listStyles = null;
|
|
15
|
+
var taskListStyles = null;
|
|
18
16
|
var TaskList = /*#__PURE__*/function (_PureComponent) {
|
|
19
17
|
function TaskList() {
|
|
20
18
|
_classCallCheck(this, TaskList);
|
|
@@ -38,26 +36,24 @@ var TaskList = /*#__PURE__*/function (_PureComponent) {
|
|
|
38
36
|
// and action items, which all share the common `<li>` element.
|
|
39
37
|
// The value of `data-task-local-id` should be discarded upon paste, with a
|
|
40
38
|
// a new uuid generated by the editor for the cloned content.
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}))
|
|
60
|
-
);
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
"data-task-list-local-id": "",
|
|
41
|
+
className: ax(["_2mzuglyw _19bvidpf"])
|
|
42
|
+
}, React.Children.map(children, function (child, idx) {
|
|
43
|
+
var _ref = child.props,
|
|
44
|
+
localId = _ref.localId;
|
|
45
|
+
return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
|
|
46
|
+
data: {
|
|
47
|
+
listLocalId: listId,
|
|
48
|
+
listSize: listSize,
|
|
49
|
+
position: idx
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
key: idx,
|
|
53
|
+
"data-task-local-id": localId || '',
|
|
54
|
+
className: ax(["_19pk1b66"])
|
|
55
|
+
}, child));
|
|
56
|
+
}));
|
|
61
57
|
}
|
|
62
58
|
}]);
|
|
63
59
|
}(PureComponent);
|
package/dist/esm/index.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import EmotionDecisionList from './components/DecisionList';
|
|
4
|
-
import CompiledDecisionList from './components/compiled/DecisionList';
|
|
1
|
+
import DecisionItem from './components/DecisionItem';
|
|
2
|
+
import DecisionList from './components/DecisionList';
|
|
5
3
|
import ResourcedTaskItem from './components/ResourcedTaskItem';
|
|
6
4
|
import TaskDecisionResource from './api/TaskDecisionResource';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import EmotionTaskList from './components/TaskList';
|
|
10
|
-
import CompiledTaskList from './components/compiled/TaskList';
|
|
11
|
-
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
12
|
-
var DecisionItem = componentWithFG('platform_editor_css_migrate_stage_1', CompiledDecisionItem, EmotionDecisionItem);
|
|
13
|
-
var DecisionList = componentWithFG('platform_editor_css_migrate_stage_1', CompiledDecisionList, EmotionDecisionList);
|
|
14
|
-
var TaskItem = componentWithFG('platform_editor_css_migrate_stage_1', CompiledTaskItem, EmotionTaskItem);
|
|
15
|
-
var TaskList = componentWithFG('platform_editor_css_migrate_stage_1', CompiledTaskList, EmotionTaskList);
|
|
5
|
+
import TaskItem from './components/TaskItem';
|
|
6
|
+
import TaskList from './components/TaskList';
|
|
16
7
|
export { PubSubSpecialEventType } from './types';
|
|
17
8
|
export { DecisionItem, DecisionList, ResourcedTaskItem, TaskDecisionResource, TaskItem, TaskList };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import { type Appearance, type ContentRef } from '../types';
|
|
7
3
|
export interface Props {
|
|
8
4
|
children?: any;
|
|
@@ -14,5 +10,5 @@ export interface Props {
|
|
|
14
10
|
[key: string]: string | number;
|
|
15
11
|
};
|
|
16
12
|
}
|
|
17
|
-
declare const DecisionItem: ({ appearance, children, contentRef, placeholder, showPlaceholder, dataAttributes, }: Props) =>
|
|
13
|
+
declare const DecisionItem: ({ appearance, children, contentRef, placeholder, showPlaceholder, dataAttributes, }: Props) => JSX.Element;
|
|
18
14
|
export default DecisionItem;
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { PureComponent, type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
export interface Props {
|
|
8
7
|
children?: ReactNode;
|
|
9
8
|
}
|
|
10
9
|
export default class DecisionList extends PureComponent<Props, {}> {
|
|
11
|
-
render():
|
|
10
|
+
render(): JSX.Element | null;
|
|
12
11
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import { type Appearance, type ContentRef, type TaskType, type DecisionType } from '../types';
|
|
8
7
|
export interface Props {
|
|
9
8
|
icon: JSX.Element;
|
|
@@ -21,6 +20,6 @@ export interface Props {
|
|
|
21
20
|
export default class Item extends PureComponent<Props, {}> {
|
|
22
21
|
static defaultProps: Partial<Props>;
|
|
23
22
|
private renderPlaceholder;
|
|
24
|
-
renderMessageAppearance():
|
|
25
|
-
render():
|
|
23
|
+
renderMessageAppearance(): JSX.Element | null;
|
|
24
|
+
render(): JSX.Element | null;
|
|
26
25
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { PureComponent, type ReactNode } from 'react';
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
export interface Props {
|
|
4
3
|
listId?: string;
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
}
|
|
7
6
|
export default class TaskList extends PureComponent<Props, {}> {
|
|
8
|
-
render():
|
|
7
|
+
render(): JSX.Element | null;
|
|
9
8
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import DecisionItem from './components/DecisionItem';
|
|
2
|
+
import DecisionList from './components/DecisionList';
|
|
2
3
|
import ResourcedTaskItem from './components/ResourcedTaskItem';
|
|
3
4
|
import TaskDecisionResource from './api/TaskDecisionResource';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const TaskItem: import("react").FC<Omit<Omit<import("./components/compiled/TaskItem").Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>, "ref"> & Omit<Omit<import("./components/TaskItem").Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<any>>;
|
|
7
|
-
declare const TaskList: import("react").FC<import("./components/compiled/TaskList").Props & import("./components/TaskList").Props>;
|
|
5
|
+
import TaskItem from './components/TaskItem';
|
|
6
|
+
import TaskList from './components/TaskList';
|
|
8
7
|
export { PubSubSpecialEventType } from './types';
|
|
9
8
|
export type { Appearance, ARI, AVI, BaseItem, ContentRef, Cursor, Decision, DecisionState, DecisionStatus, DecisionType, Handler, Item, Meta, ObjectKey, OnUpdate, PubSubClient, PubSubOnEvent, RecentUpdateContext, RecentUpdatesId, RecentUpdatesListener, RenderDocument, RendererContext, ServiceDecision, ServiceDecisionResponse, ServiceItem, ServiceTask, ServiceTaskState, Task, TaskDecisionProvider, TaskDecisionResourceConfig, TaskState, TaskType, UserId, } from './types';
|
|
10
9
|
export { DecisionItem, DecisionList, ResourcedTaskItem, TaskDecisionResource, TaskItem, TaskList };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import { type Appearance, type ContentRef } from '../types';
|
|
7
3
|
export interface Props {
|
|
8
4
|
children?: any;
|
|
@@ -14,5 +10,5 @@ export interface Props {
|
|
|
14
10
|
[key: string]: string | number;
|
|
15
11
|
};
|
|
16
12
|
}
|
|
17
|
-
declare const DecisionItem: ({ appearance, children, contentRef, placeholder, showPlaceholder, dataAttributes, }: Props) =>
|
|
13
|
+
declare const DecisionItem: ({ appearance, children, contentRef, placeholder, showPlaceholder, dataAttributes, }: Props) => JSX.Element;
|
|
18
14
|
export default DecisionItem;
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { PureComponent, type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
export interface Props {
|
|
8
7
|
children?: ReactNode;
|
|
9
8
|
}
|
|
10
9
|
export default class DecisionList extends PureComponent<Props, {}> {
|
|
11
|
-
render():
|
|
10
|
+
render(): JSX.Element | null;
|
|
12
11
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { PureComponent } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import { type Appearance, type ContentRef, type TaskType, type DecisionType } from '../types';
|
|
8
7
|
export interface Props {
|
|
9
8
|
icon: JSX.Element;
|
|
@@ -21,6 +20,6 @@ export interface Props {
|
|
|
21
20
|
export default class Item extends PureComponent<Props, {}> {
|
|
22
21
|
static defaultProps: Partial<Props>;
|
|
23
22
|
private renderPlaceholder;
|
|
24
|
-
renderMessageAppearance():
|
|
25
|
-
render():
|
|
23
|
+
renderMessageAppearance(): JSX.Element | null;
|
|
24
|
+
render(): JSX.Element | null;
|
|
26
25
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { PureComponent, type ReactNode } from 'react';
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
export interface Props {
|
|
4
3
|
listId?: string;
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
}
|
|
7
6
|
export default class TaskList extends PureComponent<Props, {}> {
|
|
8
|
-
render():
|
|
7
|
+
render(): JSX.Element | null;
|
|
9
8
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import DecisionItem from './components/DecisionItem';
|
|
2
|
+
import DecisionList from './components/DecisionList';
|
|
2
3
|
import ResourcedTaskItem from './components/ResourcedTaskItem';
|
|
3
4
|
import TaskDecisionResource from './api/TaskDecisionResource';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const TaskItem: import("react").FC<Omit<Omit<import("./components/compiled/TaskItem").Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>, "ref"> & Omit<Omit<import("./components/TaskItem").Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & import("react").RefAttributes<any>, "ref"> & import("react").RefAttributes<any>>;
|
|
7
|
-
declare const TaskList: import("react").FC<import("./components/compiled/TaskList").Props & import("./components/TaskList").Props>;
|
|
5
|
+
import TaskItem from './components/TaskItem';
|
|
6
|
+
import TaskList from './components/TaskList';
|
|
8
7
|
export { PubSubSpecialEventType } from './types';
|
|
9
8
|
export type { Appearance, ARI, AVI, BaseItem, ContentRef, Cursor, Decision, DecisionState, DecisionStatus, DecisionType, Handler, Item, Meta, ObjectKey, OnUpdate, PubSubClient, PubSubOnEvent, RecentUpdateContext, RecentUpdatesId, RecentUpdatesListener, RenderDocument, RendererContext, ServiceDecision, ServiceDecisionResponse, ServiceItem, ServiceTask, ServiceTaskState, Task, TaskDecisionProvider, TaskDecisionResourceConfig, TaskState, TaskType, UserId, } from './types';
|
|
10
9
|
export { DecisionItem, DecisionList, ResourcedTaskItem, TaskDecisionResource, TaskItem, TaskList };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/task-decision",
|
|
3
|
-
"version": "19.1.
|
|
3
|
+
"version": "19.1.3",
|
|
4
4
|
"description": "Tasks and decisions react components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,15 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
45
45
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
46
|
-
"@atlaskit/icon": "^25.
|
|
47
|
-
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
49
|
-
"@atlaskit/theme": "^18.0.0",
|
|
46
|
+
"@atlaskit/icon": "^25.3.0",
|
|
50
47
|
"@atlaskit/tokens": "^4.5.0",
|
|
51
48
|
"@atlaskit/util-service-support": "^6.3.0",
|
|
52
49
|
"@babel/runtime": "^7.0.0",
|
|
53
50
|
"@compiled/react": "^0.18.3",
|
|
54
|
-
"@emotion/react": "^11.7.1",
|
|
55
51
|
"uuid": "^3.1.0"
|
|
56
52
|
},
|
|
57
53
|
"peerDependencies": {
|
|
@@ -65,8 +61,6 @@
|
|
|
65
61
|
"@atlaskit/elements-test-helpers": "^0.9.0",
|
|
66
62
|
"@atlaskit/ssr": "^0.4.0",
|
|
67
63
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
68
|
-
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
69
|
-
"@emotion/jest": "^11.8.0",
|
|
70
64
|
"@testing-library/react": "^13.4.0",
|
|
71
65
|
"@testing-library/user-event": "^14.4.3",
|
|
72
66
|
"@types/url-search-params": "^0.10.0",
|
|
@@ -90,10 +84,5 @@
|
|
|
90
84
|
"compiled"
|
|
91
85
|
]
|
|
92
86
|
}
|
|
93
|
-
},
|
|
94
|
-
"platform-feature-flags": {
|
|
95
|
-
"platform_editor_css_migrate_stage_1": {
|
|
96
|
-
"type": "boolean"
|
|
97
|
-
}
|
|
98
87
|
}
|
|
99
88
|
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/* DecisionItem.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.default = void 0;
|
|
10
|
-
require("./DecisionItem.compiled.css");
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _runtime = require("@compiled/react/runtime");
|
|
13
|
-
var _decisionEditorDecision = _interopRequireDefault(require("@atlaskit/icon/core/migration/decision--editor-decision"));
|
|
14
|
-
var _Item = _interopRequireDefault(require("./Item"));
|
|
15
|
-
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); }
|
|
16
|
-
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; }
|
|
17
|
-
var iconStyles = null;
|
|
18
|
-
var iconStylesWithPlaceholder = null;
|
|
19
|
-
var DecisionItem = function DecisionItem(_ref) {
|
|
20
|
-
var appearance = _ref.appearance,
|
|
21
|
-
children = _ref.children,
|
|
22
|
-
contentRef = _ref.contentRef,
|
|
23
|
-
placeholder = _ref.placeholder,
|
|
24
|
-
showPlaceholder = _ref.showPlaceholder,
|
|
25
|
-
dataAttributes = _ref.dataAttributes;
|
|
26
|
-
var icon = /*#__PURE__*/React.createElement("span", {
|
|
27
|
-
contentEditable: false,
|
|
28
|
-
className: (0, _runtime.ax)(["_16jlidpf _1o9zidpf _i0dlexct _4t3i7vkz _1bsb7vkz _19pk1b66 _2hwxutpp _otyridpf _18u0idpf _syaz1yjp _1e0c1txw _4cvr1h6o _1bah1h6o", showPlaceholder && "_syaz1oju"])
|
|
29
|
-
}, /*#__PURE__*/React.createElement(_decisionEditorDecision.default, {
|
|
30
|
-
label: "Decision",
|
|
31
|
-
spacing: "spacious",
|
|
32
|
-
color: "currentColor",
|
|
33
|
-
LEGACY_size: "large"
|
|
34
|
-
}));
|
|
35
|
-
return /*#__PURE__*/React.createElement(_Item.default, {
|
|
36
|
-
appearance: appearance,
|
|
37
|
-
contentRef: contentRef,
|
|
38
|
-
icon: icon,
|
|
39
|
-
placeholder: placeholder,
|
|
40
|
-
showPlaceholder: showPlaceholder,
|
|
41
|
-
itemType: "DECISION",
|
|
42
|
-
dataAttributes: dataAttributes
|
|
43
|
-
}, children);
|
|
44
|
-
};
|
|
45
|
-
var _default = exports.default = DecisionItem;
|