@atlaskit/task-decision 17.12.2 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/constants/package.json +3 -1
  4. package/dist/cjs/components/ResourcedTaskItem.js +2 -2
  5. package/dist/cjs/components/compiled/DecisionItem.compiled.css +14 -0
  6. package/dist/cjs/components/compiled/DecisionItem.js +45 -0
  7. package/dist/cjs/components/compiled/DecisionList.compiled.css +2 -0
  8. package/dist/cjs/components/compiled/DecisionList.js +62 -0
  9. package/dist/cjs/components/compiled/Item.compiled.css +30 -0
  10. package/dist/cjs/components/compiled/Item.js +101 -0
  11. package/dist/cjs/components/compiled/TaskItem.compiled.css +73 -0
  12. package/dist/cjs/components/compiled/TaskItem.js +134 -0
  13. package/dist/cjs/components/compiled/TaskList.compiled.css +3 -0
  14. package/dist/cjs/components/compiled/TaskList.js +68 -0
  15. package/dist/cjs/index.js +12 -25
  16. package/dist/es2019/components/ResourcedTaskItem.js +1 -1
  17. package/dist/es2019/components/compiled/DecisionItem.compiled.css +14 -0
  18. package/dist/es2019/components/compiled/DecisionItem.js +36 -0
  19. package/dist/es2019/components/compiled/DecisionList.compiled.css +2 -0
  20. package/dist/es2019/components/compiled/DecisionList.js +40 -0
  21. package/dist/es2019/components/compiled/Item.compiled.css +30 -0
  22. package/dist/es2019/components/compiled/Item.js +70 -0
  23. package/dist/es2019/components/compiled/TaskItem.compiled.css +73 -0
  24. package/dist/es2019/components/compiled/TaskItem.js +108 -0
  25. package/dist/es2019/components/compiled/TaskList.compiled.css +3 -0
  26. package/dist/es2019/components/compiled/TaskList.js +46 -0
  27. package/dist/es2019/index.js +13 -4
  28. package/dist/esm/components/ResourcedTaskItem.js +1 -1
  29. package/dist/esm/components/compiled/DecisionItem.compiled.css +14 -0
  30. package/dist/esm/components/compiled/DecisionItem.js +35 -0
  31. package/dist/esm/components/compiled/DecisionList.compiled.css +2 -0
  32. package/dist/esm/components/compiled/DecisionList.js +53 -0
  33. package/dist/esm/components/compiled/Item.compiled.css +30 -0
  34. package/dist/esm/components/compiled/Item.js +92 -0
  35. package/dist/esm/components/compiled/TaskItem.compiled.css +73 -0
  36. package/dist/esm/components/compiled/TaskItem.js +126 -0
  37. package/dist/esm/components/compiled/TaskList.compiled.css +3 -0
  38. package/dist/esm/components/compiled/TaskList.js +60 -0
  39. package/dist/esm/index.js +13 -4
  40. package/dist/types/components/compiled/DecisionItem.d.ts +14 -0
  41. package/dist/types/components/compiled/DecisionList.d.ts +11 -0
  42. package/dist/types/components/compiled/Item.d.ts +25 -0
  43. package/dist/types/components/compiled/TaskItem.d.ts +27 -0
  44. package/dist/types/components/compiled/TaskList.d.ts +8 -0
  45. package/dist/types/index.d.ts +5 -4
  46. package/dist/types-ts4.5/components/compiled/DecisionItem.d.ts +14 -0
  47. package/dist/types-ts4.5/components/compiled/DecisionList.d.ts +11 -0
  48. package/dist/types-ts4.5/components/compiled/Item.d.ts +25 -0
  49. package/dist/types-ts4.5/components/compiled/TaskItem.d.ts +27 -0
  50. package/dist/types-ts4.5/components/compiled/TaskList.d.ts +8 -0
  51. package/dist/types-ts4.5/index.d.ts +5 -4
  52. package/package.json +16 -3
  53. package/type-helpers/package.json +3 -1
  54. package/types/package.json +3 -1
package/dist/cjs/index.js CHANGED
@@ -4,18 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "DecisionItem", {
8
- enumerable: true,
9
- get: function get() {
10
- return _DecisionItem.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "DecisionList", {
14
- enumerable: true,
15
- get: function get() {
16
- return _DecisionList.default;
17
- }
18
- });
7
+ exports.DecisionList = exports.DecisionItem = void 0;
19
8
  Object.defineProperty(exports, "PubSubSpecialEventType", {
20
9
  enumerable: true,
21
10
  get: function get() {
@@ -34,22 +23,20 @@ Object.defineProperty(exports, "TaskDecisionResource", {
34
23
  return _TaskDecisionResource.default;
35
24
  }
36
25
  });
37
- Object.defineProperty(exports, "TaskItem", {
38
- enumerable: true,
39
- get: function get() {
40
- return _TaskItem.default;
41
- }
42
- });
43
- Object.defineProperty(exports, "TaskList", {
44
- enumerable: true,
45
- get: function get() {
46
- return _TaskList.default;
47
- }
48
- });
26
+ exports.TaskList = exports.TaskItem = void 0;
49
27
  var _DecisionItem = _interopRequireDefault(require("./components/DecisionItem"));
28
+ var _DecisionItem2 = _interopRequireDefault(require("./components/compiled/DecisionItem"));
50
29
  var _DecisionList = _interopRequireDefault(require("./components/DecisionList"));
30
+ var _DecisionList2 = _interopRequireDefault(require("./components/compiled/DecisionList"));
51
31
  var _ResourcedTaskItem = _interopRequireDefault(require("./components/ResourcedTaskItem"));
52
32
  var _TaskDecisionResource = _interopRequireDefault(require("./api/TaskDecisionResource"));
53
33
  var _TaskItem = _interopRequireDefault(require("./components/TaskItem"));
34
+ var _TaskItem2 = _interopRequireDefault(require("./components/compiled/TaskItem"));
54
35
  var _TaskList = _interopRequireDefault(require("./components/TaskList"));
55
- var _types = require("./types");
36
+ var _TaskList2 = _interopRequireDefault(require("./components/compiled/TaskList"));
37
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
38
+ var _types = require("./types");
39
+ var DecisionItem = exports.DecisionItem = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_css_migrate_stage_1', _DecisionItem2.default, _DecisionItem.default);
40
+ var DecisionList = exports.DecisionList = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_css_migrate_stage_1', _DecisionList2.default, _DecisionList.default);
41
+ var TaskItem = exports.TaskItem = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_css_migrate_stage_1', _TaskItem2.default, _TaskItem.default);
42
+ var TaskList = exports.TaskList = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_css_migrate_stage_1', _TaskList2.default, _TaskList.default);
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { PureComponent } from 'react';
4
- import TaskItem from './TaskItem';
4
+ import { TaskItem } from '../';
5
5
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
6
6
  export default class ResourcedTaskItem extends PureComponent {
7
7
  constructor(props) {
@@ -0,0 +1,14 @@
1
+ ._16jlidpf{flex-grow:0}
2
+ ._18u0idpf{margin-left:0}
3
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
4
+ ._1bah1h6o{justify-content:center}
5
+ ._1bsb7vkz{width:1pc}
6
+ ._1e0c1txw{display:flex}
7
+ ._1o9zidpf{flex-shrink:0}
8
+ ._2hwxutpp{margin-right:var(--ds-space-150,9pt)}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._4t3i7vkz{height:1pc}
11
+ ._i0dlexct{flex-basis:16px}
12
+ ._otyridpf{margin-bottom:0}
13
+ ._syaz1oju{color:var(--ds-icon-subtle,#626f86)}
14
+ ._syaz1yjp{color:var(--ds-icon-success,#22a06b)}
@@ -0,0 +1,36 @@
1
+ /* DecisionItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./DecisionItem.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import DecisionIcon from '@atlaskit/icon/core/migration/decision--editor-decision';
6
+ import Item from './Item';
7
+ const iconStyles = null;
8
+ const iconStylesWithPlaceholder = null;
9
+ const DecisionItem = ({
10
+ appearance,
11
+ children,
12
+ contentRef,
13
+ placeholder,
14
+ showPlaceholder,
15
+ dataAttributes
16
+ }) => {
17
+ const icon = /*#__PURE__*/React.createElement("span", {
18
+ contentEditable: false,
19
+ className: ax(["_16jlidpf _1o9zidpf _i0dlexct _4t3i7vkz _1bsb7vkz _19pk1b66 _2hwxutpp _otyridpf _18u0idpf _syaz1yjp _1e0c1txw _4cvr1h6o _1bah1h6o", showPlaceholder && "_syaz1oju"])
20
+ }, /*#__PURE__*/React.createElement(DecisionIcon, {
21
+ label: "Decision",
22
+ spacing: "spacious",
23
+ color: "currentColor",
24
+ LEGACY_size: "large"
25
+ }));
26
+ return /*#__PURE__*/React.createElement(Item, {
27
+ appearance: appearance,
28
+ contentRef: contentRef,
29
+ icon: icon,
30
+ placeholder: placeholder,
31
+ showPlaceholder: showPlaceholder,
32
+ itemType: "DECISION",
33
+ dataAttributes: dataAttributes
34
+ }, children);
35
+ };
36
+ export default DecisionItem;
@@ -0,0 +1,2 @@
1
+ ._1braglyw._1braglyw{list-style-type:none}
2
+ ._1yxxidpf._1yxxidpf{padding-left:0}
@@ -0,0 +1,40 @@
1
+ /* DecisionList.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./DecisionList.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { PureComponent } from 'react';
5
+ /*
6
+ Increasing specificity with double ampersand to ensure these rules take
7
+ priority over the global styles applied to 'ol' elements.
8
+ */
9
+ const listStyles = null;
10
+ export default class DecisionList extends PureComponent {
11
+ render() {
12
+ const {
13
+ children
14
+ } = this.props;
15
+ if (!children) {
16
+ return null;
17
+ }
18
+
19
+ // Data attributes are required for copy and paste from rendered content
20
+ // to the editor to preserve the decision.
21
+ // This allows the editor to differentiate between numbered and ordered lists,
22
+ // and action items, which all share the common `<li>` element.
23
+ // The value of `data-decision-local-id` should be discarded upon paste, with a
24
+ // a new uuid generated by the editor for the cloned content.
25
+ return /*#__PURE__*/React.createElement("ol", {
26
+ "data-decision-list-local-id": "",
27
+ "data-node-type": "decisionList",
28
+ className: ax(["_1braglyw _1yxxidpf"])
29
+ }, React.Children.map(children, (child, idx) => {
30
+ const {
31
+ localId
32
+ } = child.props;
33
+ return /*#__PURE__*/React.createElement("li", {
34
+ key: idx,
35
+ "data-decision-local-id": localId || '',
36
+ "data-decision-state": "DECIDED"
37
+ }, child);
38
+ }));
39
+ }
40
+ }
@@ -0,0 +1,30 @@
1
+
2
+ ._2rkosqtm{border-radius:var(--ds-border-radius-100,3px)}._14hd1wug .decision-item{cursor:auto}
3
+ ._16jlkb7n{flex-grow:1}
4
+ ._18m915vq{overflow-y:hidden}
5
+ ._18u0hwpb{margin-left:calc(var(--ds-space-100, 8px)*3)}
6
+ ._18u0idpf{margin-left:0}
7
+ ._18u0tu8f{margin-left:calc(var(--ds-space-100, 8px)*3.5)}
8
+ ._19bvutpp{padding-left:var(--ds-space-150,9pt)}
9
+ ._19pkidpf{margin-top:0}
10
+ ._19pku2gc{margin-top:var(--ds-space-100,8px)}
11
+ ._1bto1l2s{text-overflow:ellipsis}
12
+ ._1e0c1txw{display:flex}
13
+ ._1o9zkb7n{flex-shrink:1}
14
+ ._1reo15vq{overflow-x:hidden}
15
+ ._1ul9idpf{min-width:0}
16
+ ._2hwxidpf{margin-right:0}
17
+ ._2lx2vrvc{flex-direction:row}
18
+ ._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
19
+ ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
20
+ ._i0dl1wug{flex-basis:auto}
21
+ ._kqswh2mm{position:relative}
22
+ ._kqswstnw{position:absolute}
23
+ ._lcxvglyw{pointer-events:none}
24
+ ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
25
+ ._o5721q9c{white-space:nowrap}
26
+ ._otyridpf{margin-bottom:0}
27
+ ._p12f1dza{max-width:calc(100% - 50px)}
28
+ ._slp31hna{word-wrap:break-word}
29
+ ._syaz131l{color:var(--ds-text-subtlest,#626f86)}
30
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -0,0 +1,70 @@
1
+ /* Item.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import "./Item.compiled.css";
5
+ import * as React from 'react';
6
+ import { ax, ix } from "@compiled/react/runtime";
7
+ import { PureComponent } from 'react';
8
+ const placeholderStyles = null;
9
+ const placeholderTaskStyles = null;
10
+ const decisionStyles = null;
11
+ const contentStyles = null;
12
+ const taskStyles = null;
13
+ export default class Item extends PureComponent {
14
+ renderPlaceholder() {
15
+ const {
16
+ children,
17
+ placeholder,
18
+ showPlaceholder,
19
+ itemType
20
+ } = this.props;
21
+ if (!showPlaceholder || !placeholder || children) {
22
+ return null;
23
+ }
24
+ return /*#__PURE__*/React.createElement("span", {
25
+ "data-testid": "task-decision-item-placeholder",
26
+ "data-component": "placeholder",
27
+ contentEditable: false,
28
+ className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0tu8f _1reo15vq _18m915vq _kqswstnw _syaz131l _lcxvglyw _1bto1l2s _o5721q9c _p12f1dza", itemType === 'TASK' && "_19pkidpf _2hwxidpf _otyridpf _18u0hwpb"])
29
+ }, placeholder);
30
+ }
31
+ renderMessageAppearance() {
32
+ const {
33
+ contentRef,
34
+ children,
35
+ icon,
36
+ itemType,
37
+ checkBoxId,
38
+ dataAttributes
39
+ } = this.props;
40
+ if (itemType === 'TASK') {
41
+ return /*#__PURE__*/React.createElement("div", {
42
+ id: `${checkBoxId}-wrapper`,
43
+ className: ax(["_1e0c1txw _2lx2vrvc _kqswh2mm"])
44
+ }, icon, this.renderPlaceholder(), /*#__PURE__*/React.createElement("div", _extends({
45
+ "data-component": "content",
46
+ ref: contentRef
47
+ }, dataAttributes, {
48
+ className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _16jlkb7n _1o9zkb7n _i0dl1wug _slp31hna _1ul9idpf"])
49
+ }), children));
50
+ } else if (itemType === 'DECISION') {
51
+ return /*#__PURE__*/React.createElement("div", {
52
+ "data-testid": "elements-decision-item",
53
+ "data-decision-wrapper": "true",
54
+ className: ax(["_2rkosqtm _1e0c1txw _2lx2vrvc _19pku2gc _2hwxidpf _otyridpf _18u0idpf _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvutpp _bfhkm7j4 _kqswh2mm _14hd1wug"])
55
+ }, icon, this.renderPlaceholder(), /*#__PURE__*/React.createElement("div", _extends({
56
+ "data-component": "content",
57
+ ref: contentRef
58
+ }, dataAttributes, {
59
+ className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _16jlkb7n _1o9zkb7n _i0dl1wug _slp31hna _1ul9idpf"])
60
+ }), children));
61
+ }
62
+ return null;
63
+ }
64
+ render() {
65
+ return this.renderMessageAppearance();
66
+ }
67
+ }
68
+ _defineProperty(Item, "defaultProps", {
69
+ appearance: 'inline'
70
+ });
@@ -0,0 +1,73 @@
1
+
2
+ ._18a711so>input[type=checkbox]+span>svg rect:first-of-type{transition:stroke .2s ease-in-out}
3
+ ._1abj1mn3>input[type=checkbox]+span>svg{transition:color .2s ease-in-out,fill .2s ease-in-out}
4
+ ._den51ekn>input[type=checkbox]:focus+span:after{border:2px solid var(--ds-border-focused,#4c9aff)}
5
+ ._zh8l1b66>input[type=checkbox]:focus+span:after{border-radius:var(--ds-space-050,4px)}._10cr1ssb>input[type=checkbox]+span>svg{top:50%}
6
+ ._12yy10ko>input[type=checkbox]:hover+span>svg{color:var(--ds-background-input-hovered,#ebecf0)}
7
+ ._13vl73ad>input[type=checkbox][disabled]{cursor:default}
8
+ ._16jlidpf{flex-grow:0}
9
+ ._16np1fmg>input[type=checkbox]+span>svg rect:first-of-type{stroke:var(--ds-border-input,#7a869a)}
10
+ ._1746glyw>input[type=checkbox]{outline-style:none}
11
+ ._18tob3bt>input[type=checkbox]:focus+span:after{content:""}
12
+ ._19l51ooe>input[type=checkbox]+span{transform:translate(-50%,-50%)}
13
+ ._1awt1ule>input[type=checkbox]:focus+span:after{display:block}
14
+ ._1bsb1tcg{width:24px}
15
+ ._1davidpf>input[type=checkbox]{opacity:0}
16
+ ._1efjn7od>input[type=checkbox]+span>svg{max-height:unset}
17
+ ._1h5xidpf>input[type=checkbox]{margin-top:0}
18
+ ._1l0615vq>input[type=checkbox]+span>svg{overflow-y:hidden}
19
+ ._1mh7kb7n>input[type=checkbox]{z-index:1}
20
+ ._1miy1fmg>input[type=checkbox]:hover+span>svg rect:first-of-type{stroke:var(--ds-border-input,#7a869a)}
21
+ ._1mwj1ssb>input[type=checkbox]+span{left:50%}
22
+ ._1nuz1tcg>input[type=checkbox]+span{height:24px}
23
+ ._1o9zidpf{flex-shrink:0}
24
+ ._1q8r7vkz>input[type=checkbox]{width:1pc}
25
+ ._1qduewfl>input[type=checkbox]:checked+span>svg path:first-of-type{visibility:visible}
26
+ ._1qp6unzk>input[type=checkbox]:active+span>svg rect:first-of-type{stroke:var(--ds-border,#deebff)}
27
+ ._1rvv1ooe>input[type=checkbox]{transform:translate(-50%,-50%)}
28
+ ._1smcidpf>input[type=checkbox]{margin-left:0}
29
+ ._1snx1r31>input[type=checkbox]{outline-color:currentColor}
30
+ ._1stbpxbi>input[type=checkbox]:focus+span:after{height:var(--ds-space-200,1pc)}
31
+ ._1t711tcg>input[type=checkbox]+span{width:24px}
32
+ ._1u2istnw>input[type=checkbox]+span>svg{position:absolute}
33
+ ._1umohh5a>input[type=checkbox]:checked:hover+span>svg{color:var(--ds-background-selected-bold-hovered,#0065ff)}
34
+ ._1wn015vq>input[type=checkbox]+span>svg path:first-of-type{visibility:hidden}
35
+ ._1wpzv2br{align-self:start}
36
+ ._1x1y15t7>input[type=checkbox]:disabled:checked+span>svg{fill:var(--ds-icon-disabled,#a5adba)}
37
+ ._1y9t1qbb>input[type=checkbox]:checked+span>svg{fill:var(--ds-icon-inverse,#fafbfc)}
38
+ ._32romag2>input[type=checkbox]+span>svg{color:var(--ds-background-input,#fafbfc)}
39
+ ._4k421ssb>input[type=checkbox]{left:50%}
40
+ ._4t3i1tcg{height:24px}
41
+ ._8bo8stnw>input[type=checkbox]{position:absolute}
42
+ ._9j2j1ssb>input[type=checkbox]+span{top:50%}
43
+ ._9l2s7vkz>input[type=checkbox]{height:1pc}
44
+ ._a27kkb7n>input[type=checkbox]+span>svg rect:first-of-type{stroke-width:1}
45
+ ._bhku1y1w>input[type=checkbox]:disabled+span>svg rect:first-of-type, ._czfe1y1w>input[type=checkbox]:disabled:active+span>svg rect:first-of-type, ._1gxg1y1w>input[type=checkbox]:disabled:focus+span>svg rect:first-of-type, ._19w01y1w>input[type=checkbox]:disabled:hover+span>svg rect:first-of-type{stroke:var(--ds-background-disabled,#f4f5f7)}
46
+ ._c8dpunzk>input[type=checkbox]:checked:active+span>svg rect:first-of-type{stroke:var(--ds-border,#deebff)}
47
+ ._cr751ooe>input[type=checkbox]:focus+span:after{transform:translate(-50%,-50%)}
48
+ ._cs4qstnw>input[type=checkbox]+span{position:absolute}
49
+ ._d2dc1y1w>input[type=checkbox]:disabled+span>svg, ._1eul1y1w>input[type=checkbox]:disabled:active+span>svg, ._1bc71y1w>input[type=checkbox]:disabled:focus+span>svg, ._16fm1y1w>input[type=checkbox]:disabled:hover+span>svg{color:var(--ds-background-disabled,#f4f5f7)}
50
+ ._dx3f1o36>input[type=checkbox]{outline-width:medium}
51
+ ._fs2cidpf>input[type=checkbox]{margin-bottom:0}
52
+ ._g5w3stnw>input[type=checkbox]:focus+span:after{position:absolute}
53
+ ._gi9h11d3>input[type=checkbox]:active+span>svg{color:var(--ds-background-input-pressed,#deebff)}
54
+ ._haf81ssb>input[type=checkbox]:focus+span:after{top:50%}
55
+ ._i0dl1tcg{flex-basis:24px}
56
+ ._k6dghh5a>input[type=checkbox]:checked:hover+span>svg rect:first-of-type{stroke:var(--ds-background-selected-bold-hovered,#0065ff)}
57
+ ._kqswh2mm{position:relative}
58
+ ._l9o0n7od>input[type=checkbox]+span>svg{max-width:unset}
59
+ ._m7eu1ooe>input[type=checkbox]+span>svg{transform:translate(-50%,-50%)}
60
+ ._oezm15vq>input[type=checkbox]+span>svg{overflow-x:hidden}
61
+ ._psnc1ssb>input[type=checkbox]{top:50%}
62
+ ._q3p7usvi>input[type=checkbox]+span>svg{box-sizing:border-box}
63
+ ._q8ftzyvw>input[type=checkbox]:checked+span>svg{color:var(--ds-background-selected-bold,#0052cc)}
64
+ ._qhqx1nu9>input[type=checkbox]+span>svg{display:inline}
65
+ ._ra781ssb>input[type=checkbox]:focus+span:after{left:50%}
66
+ ._s3uktlke>input[type=checkbox]{cursor:pointer}
67
+ ._sqizidpf>input[type=checkbox]{margin-right:0}
68
+ ._tpz21qbb>input[type=checkbox]:checked:hover+span>svg{fill:var(--ds-icon-inverse,#fafbfc)}
69
+ ._ut03zyvw>input[type=checkbox]:checked+span>svg rect:first-of-type{stroke:var(--ds-background-selected-bold,#0052cc)}
70
+ ._whhepxbi>input[type=checkbox]:focus+span:after{width:var(--ds-space-200,1pc)}
71
+ ._wo241dzn>input[type=checkbox]:checked:active+span>svg{fill:var(--ds-icon-inverse,#0052cc)}
72
+ ._wxkg11d3>input[type=checkbox]:checked:active+span>svg{color:var(--ds-background-input-pressed,#deebff)}
73
+ ._zfav1ssb>input[type=checkbox]+span>svg{left:50%}
@@ -0,0 +1,108 @@
1
+ /* TaskItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./TaskItem.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { useMemo, useRef } from 'react';
5
+ import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
6
+ import Item from './Item';
7
+ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
8
+ import { createAndFireEventInElementsChannel } from '../../analytics';
9
+ import { B100, B300, B400, B50, N10, N100, N20, N30, N70 } from '@atlaskit/theme/colors';
10
+
11
+ /**
12
+ * References packages/design-system/checkbox/src/checkbox.tsx
13
+ * To be used until mobile editor does not require legacy themed() API anymore,
14
+ * which will allow migration to use @atlaskit/checkbox instead
15
+ */
16
+ const checkboxStyles = null;
17
+ let taskCount = 0;
18
+ const getCheckBoxId = localId => `${localId}-${taskCount++}`;
19
+ const TaskItem = props => {
20
+ const {
21
+ appearance,
22
+ isDone,
23
+ isFocused,
24
+ contentRef,
25
+ children,
26
+ placeholder,
27
+ showPlaceholder,
28
+ disabled,
29
+ dataAttributes,
30
+ taskId,
31
+ onChange,
32
+ onClick,
33
+ createAnalyticsEvent,
34
+ inputRef: inputRefFromProps
35
+ } = props;
36
+ const checkBoxId = useMemo(() => getCheckBoxId(taskId), [taskId]);
37
+ const handleOnChange = useMemo(() => {
38
+ return _evt => {
39
+ const newIsDone = !isDone;
40
+ if (onChange) {
41
+ onChange(taskId, newIsDone);
42
+ }
43
+ const action = newIsDone ? 'checked' : 'unchecked';
44
+ if (createAnalyticsEvent) {
45
+ createAndFireEventInElementsChannel({
46
+ action,
47
+ actionSubject: 'action',
48
+ eventType: 'ui',
49
+ attributes: {
50
+ localId: taskId
51
+ }
52
+ })(createAnalyticsEvent);
53
+ }
54
+ };
55
+ }, [onChange, taskId, isDone, createAnalyticsEvent]);
56
+ const handleOnKeyPress = useMemo(() => event => {
57
+ if (event.key === 'Enter') {
58
+ handleOnChange(event);
59
+ }
60
+ }, [handleOnChange]);
61
+ const defaultInputRef = useRef(null);
62
+ const inputRef = inputRefFromProps !== null && inputRefFromProps !== void 0 ? inputRefFromProps : defaultInputRef;
63
+ const icon = /*#__PURE__*/React.createElement("span", {
64
+ contentEditable: false,
65
+ className: ax(["_16jlidpf _1o9zidpf _i0dl1tcg _1bsb1tcg _4t3i1tcg _kqswh2mm _1wpzv2br _1snx1r31 _1746glyw _dx3f1o36 _1h5xidpf _sqizidpf _fs2cidpf _1smcidpf _oezm15vq _1l0615vq _1abj1mn3 _18a711so _16np1fmg _a27kkb7n _q3p7usvi _qhqx1nu9 _10cr1ssb _zfav1ssb _m7eu1ooe _l9o0n7od _1efjn7od _1u2istnw _32romag2 _1wn015vq _den51ekn _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 _12yy10ko _1miy1fmg _1umohh5a _tpz21qbb _k6dghh5a _1qduewfl _q8ftzyvw _1y9t1qbb _ut03zyvw _gi9h11d3 _1qp6unzk _wxkg11d3 _wo241dzn _c8dpunzk _d2dc1y1w _1eul1y1w _1bc71y1w _16fm1y1w _bhku1y1w _czfe1y1w _1gxg1y1w _19w01y1w _1x1y15t7"])
66
+ }, /*#__PURE__*/React.createElement("input", {
67
+ id: checkBoxId,
68
+ "aria-labelledby": `${checkBoxId}-wrapper`,
69
+ name: checkBoxId,
70
+ type: "checkbox",
71
+ onChange: handleOnChange,
72
+ onClick: onClick,
73
+ checked: !!isDone,
74
+ disabled: !!disabled,
75
+ suppressHydrationWarning: true,
76
+ onKeyPress: handleOnKeyPress,
77
+ ref: inputRef
78
+ }), /*#__PURE__*/React.createElement(CheckboxIcon, {
79
+ label: "",
80
+ isFacadeDisabled: true
81
+ }));
82
+ React.useEffect(() => {
83
+ if (isFocused && inputRef.current) {
84
+ var _inputRef$current, _inputRef$current2;
85
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
86
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
87
+ setTimeout(() => {
88
+ var _inputRef$current3;
89
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
90
+ }, 100);
91
+ }
92
+ }, [isFocused, inputRef]);
93
+ return /*#__PURE__*/React.createElement(Item, {
94
+ appearance: appearance,
95
+ contentRef: contentRef,
96
+ icon: icon,
97
+ placeholder: placeholder,
98
+ showPlaceholder: showPlaceholder,
99
+ itemType: "TASK",
100
+ dataAttributes: dataAttributes,
101
+ checkBoxId: checkBoxId
102
+ }, children);
103
+ };
104
+
105
+ // This is to ensure that the "type" is exported, as it gets lost and not exported along with TaskItem after
106
+ // going through the high order component.
107
+
108
+ export default withAnalyticsEvents()(TaskItem);
@@ -0,0 +1,3 @@
1
+ ._19bvidpf{padding-left:0}
2
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
3
+ ._2mzuglyw{list-style-type:none}
@@ -0,0 +1,46 @@
1
+ /* TaskList.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./TaskList.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { PureComponent } from 'react';
6
+ import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
7
+ const listStyles = null;
8
+ const taskListStyles = null;
9
+ export default class TaskList extends PureComponent {
10
+ render() {
11
+ const {
12
+ listId,
13
+ children
14
+ } = this.props;
15
+ const listSize = React.Children.count(children);
16
+ if (!children) {
17
+ return null;
18
+ }
19
+
20
+ // Data attributes are required for copy and paste from rendered content
21
+ // to the editor to preserve the task.
22
+ // This allows the editor to differentiate between numbered and ordered lists,
23
+ // and action items, which all share the common `<li>` element.
24
+ // The value of `data-task-local-id` should be discarded upon paste, with a
25
+ // a new uuid generated by the editor for the cloned content.
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ "data-task-list-local-id": "",
28
+ className: ax(["_2mzuglyw _19bvidpf"])
29
+ }, React.Children.map(children, (child, idx) => {
30
+ const {
31
+ localId
32
+ } = child.props;
33
+ return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
34
+ data: {
35
+ listLocalId: listId,
36
+ listSize,
37
+ position: idx
38
+ }
39
+ }, /*#__PURE__*/React.createElement("div", {
40
+ key: idx,
41
+ "data-task-local-id": localId || '',
42
+ className: ax(["_19pk1b66"])
43
+ }, child));
44
+ }));
45
+ }
46
+ }
@@ -1,8 +1,17 @@
1
- import DecisionItem from './components/DecisionItem';
2
- import DecisionList from './components/DecisionList';
1
+ import EmotionDecisionItem from './components/DecisionItem';
2
+ import CompiledDecisionItem from './components/compiled/DecisionItem';
3
+ import EmotionDecisionList from './components/DecisionList';
4
+ import CompiledDecisionList from './components/compiled/DecisionList';
3
5
  import ResourcedTaskItem from './components/ResourcedTaskItem';
4
6
  import TaskDecisionResource from './api/TaskDecisionResource';
5
- import TaskItem from './components/TaskItem';
6
- import TaskList from './components/TaskList';
7
+ import EmotionTaskItem from './components/TaskItem';
8
+ import CompiledTaskItem from './components/compiled/TaskItem';
9
+ import EmotionTaskList from './components/TaskList';
10
+ import CompiledTaskList from './components/compiled/TaskList';
11
+ import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
12
+ const DecisionItem = componentWithFG('platform_editor_css_migrate_stage_1', CompiledDecisionItem, EmotionDecisionItem);
13
+ const DecisionList = componentWithFG('platform_editor_css_migrate_stage_1', CompiledDecisionList, EmotionDecisionList);
14
+ const TaskItem = componentWithFG('platform_editor_css_migrate_stage_1', CompiledTaskItem, EmotionTaskItem);
15
+ const TaskList = componentWithFG('platform_editor_css_migrate_stage_1', CompiledTaskList, EmotionTaskList);
7
16
  export { PubSubSpecialEventType } from './types';
8
17
  export { DecisionItem, DecisionList, ResourcedTaskItem, TaskDecisionResource, TaskItem, TaskList };
@@ -10,7 +10,7 @@ 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 TaskItem from './TaskItem';
13
+ import { TaskItem } from '../';
14
14
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
15
15
  var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
16
16
  function ResourcedTaskItem(props) {
@@ -0,0 +1,14 @@
1
+ ._16jlidpf{flex-grow:0}
2
+ ._18u0idpf{margin-left:0}
3
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
4
+ ._1bah1h6o{justify-content:center}
5
+ ._1bsb7vkz{width:1pc}
6
+ ._1e0c1txw{display:flex}
7
+ ._1o9zidpf{flex-shrink:0}
8
+ ._2hwxutpp{margin-right:var(--ds-space-150,9pt)}
9
+ ._4cvr1h6o{align-items:center}
10
+ ._4t3i7vkz{height:1pc}
11
+ ._i0dlexct{flex-basis:16px}
12
+ ._otyridpf{margin-bottom:0}
13
+ ._syaz1oju{color:var(--ds-icon-subtle,#626f86)}
14
+ ._syaz1yjp{color:var(--ds-icon-success,#22a06b)}
@@ -0,0 +1,35 @@
1
+ /* DecisionItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./DecisionItem.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import DecisionIcon from '@atlaskit/icon/core/migration/decision--editor-decision';
6
+ import Item from './Item';
7
+ var iconStyles = null;
8
+ var iconStylesWithPlaceholder = null;
9
+ var DecisionItem = function DecisionItem(_ref) {
10
+ var appearance = _ref.appearance,
11
+ children = _ref.children,
12
+ contentRef = _ref.contentRef,
13
+ placeholder = _ref.placeholder,
14
+ showPlaceholder = _ref.showPlaceholder,
15
+ dataAttributes = _ref.dataAttributes;
16
+ var icon = /*#__PURE__*/React.createElement("span", {
17
+ contentEditable: false,
18
+ className: ax(["_16jlidpf _1o9zidpf _i0dlexct _4t3i7vkz _1bsb7vkz _19pk1b66 _2hwxutpp _otyridpf _18u0idpf _syaz1yjp _1e0c1txw _4cvr1h6o _1bah1h6o", showPlaceholder && "_syaz1oju"])
19
+ }, /*#__PURE__*/React.createElement(DecisionIcon, {
20
+ label: "Decision",
21
+ spacing: "spacious",
22
+ color: "currentColor",
23
+ LEGACY_size: "large"
24
+ }));
25
+ return /*#__PURE__*/React.createElement(Item, {
26
+ appearance: appearance,
27
+ contentRef: contentRef,
28
+ icon: icon,
29
+ placeholder: placeholder,
30
+ showPlaceholder: showPlaceholder,
31
+ itemType: "DECISION",
32
+ dataAttributes: dataAttributes
33
+ }, children);
34
+ };
35
+ export default DecisionItem;
@@ -0,0 +1,2 @@
1
+ ._1braglyw._1braglyw{list-style-type:none}
2
+ ._1yxxidpf._1yxxidpf{padding-left:0}
@@ -0,0 +1,53 @@
1
+ /* DecisionList.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
7
+ import "./DecisionList.compiled.css";
8
+ import { ax, ix } from "@compiled/react/runtime";
9
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
+ import React, { PureComponent } from 'react';
12
+ /*
13
+ Increasing specificity with double ampersand to ensure these rules take
14
+ priority over the global styles applied to 'ol' elements.
15
+ */
16
+ var listStyles = null;
17
+ var DecisionList = /*#__PURE__*/function (_PureComponent) {
18
+ function DecisionList() {
19
+ _classCallCheck(this, DecisionList);
20
+ return _callSuper(this, DecisionList, arguments);
21
+ }
22
+ _inherits(DecisionList, _PureComponent);
23
+ return _createClass(DecisionList, [{
24
+ key: "render",
25
+ value: function render() {
26
+ var children = this.props.children;
27
+ if (!children) {
28
+ return null;
29
+ }
30
+
31
+ // Data attributes are required for copy and paste from rendered content
32
+ // to the editor to preserve the decision.
33
+ // This allows the editor to differentiate between numbered and ordered lists,
34
+ // and action items, which all share the common `<li>` element.
35
+ // The value of `data-decision-local-id` should be discarded upon paste, with a
36
+ // a new uuid generated by the editor for the cloned content.
37
+ return /*#__PURE__*/React.createElement("ol", {
38
+ "data-decision-list-local-id": "",
39
+ "data-node-type": "decisionList",
40
+ className: ax(["_1braglyw _1yxxidpf"])
41
+ }, React.Children.map(children, function (child, idx) {
42
+ var _ref = child.props,
43
+ localId = _ref.localId;
44
+ return /*#__PURE__*/React.createElement("li", {
45
+ key: idx,
46
+ "data-decision-local-id": localId || '',
47
+ "data-decision-state": "DECIDED"
48
+ }, child);
49
+ }));
50
+ }
51
+ }]);
52
+ }(PureComponent);
53
+ export { DecisionList as default };