@atlaskit/task-decision 19.0.4 → 19.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/task-decision
2
2
 
3
+ ## 19.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#128971](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128971)
8
+ [`35475657b7efd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/35475657b7efd) -
9
+ fix cycle import issue for ResourcedTaskItem
10
+
11
+ ## 19.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#126262](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/126262)
16
+ [`c48dfdc45873d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c48dfdc45873d) -
17
+ FIX: fixes issue where unchecked TaskItems do not render correctly
18
+
3
19
  ## 19.0.4
4
20
 
5
21
  ### Patch Changes
@@ -26,6 +26,9 @@
26
26
  {
27
27
  "path": "../../../design-system/icon/afm-cc/tsconfig.json"
28
28
  },
29
+ {
30
+ "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
31
+ },
29
32
  {
30
33
  "path": "../../../platform/feature-flags-react/afm-cc/tsconfig.json"
31
34
  },
@@ -26,6 +26,9 @@
26
26
  {
27
27
  "path": "../../../design-system/icon/afm-jira/tsconfig.json"
28
28
  },
29
+ {
30
+ "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
31
+ },
29
32
  {
30
33
  "path": "../../../platform/feature-flags-react/afm-jira/tsconfig.json"
31
34
  },
@@ -26,6 +26,9 @@
26
26
  {
27
27
  "path": "../../../design-system/icon/afm-post-office/tsconfig.json"
28
28
  },
29
+ {
30
+ "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
31
+ },
29
32
  {
30
33
  "path": "../../../platform/feature-flags-react/afm-post-office/tsconfig.json"
31
34
  },
@@ -13,8 +13,10 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
13
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireWildcard(require("react"));
16
- var _ = require("../");
16
+ var _TaskItem = _interopRequireDefault(require("./TaskItem"));
17
+ var _TaskItem2 = _interopRequireDefault(require("./compiled/TaskItem"));
17
18
  var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
21
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
22
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -168,11 +170,32 @@ var ResourcedTaskItem = exports.default = /*#__PURE__*/function (_PureComponent)
168
170
  isRenderer = _this$props3.isRenderer,
169
171
  isFocused = _this$props3.isFocused,
170
172
  inputRef = _this$props3.inputRef;
173
+ if ((0, _platformFeatureFlags.fg)('platform_editor_css_migrate_stage_1')) {
174
+ return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
175
+ data: {
176
+ objectAri: objectAri
177
+ }
178
+ }, /*#__PURE__*/_react.default.createElement(_TaskItem2.default, {
179
+ isDone: isDone,
180
+ isRenderer: isRenderer,
181
+ isFocused: isFocused,
182
+ taskId: taskId,
183
+ onChange: this.handleOnChange,
184
+ onClick: this.handleOnClick,
185
+ appearance: appearance,
186
+ contentRef: contentRef,
187
+ showPlaceholder: showPlaceholder,
188
+ placeholder: placeholder,
189
+ disabled: disabled,
190
+ dataAttributes: dataAttributes,
191
+ inputRef: inputRef
192
+ }, children));
193
+ }
171
194
  return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
172
195
  data: {
173
196
  objectAri: objectAri
174
197
  }
175
- }, /*#__PURE__*/_react.default.createElement(_.TaskItem, {
198
+ }, /*#__PURE__*/_react.default.createElement(_TaskItem.default, {
176
199
  isDone: isDone,
177
200
  isRenderer: isRenderer,
178
201
  isFocused: isFocused,
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _react2 = require("@emotion/react");
12
+ var _baseNew = require("@atlaskit/icon/base-new");
11
13
  var _checkboxChecked = _interopRequireDefault(require("@atlaskit/icon/core/checkbox-checked"));
12
- var _checkboxUnchecked = _interopRequireDefault(require("@atlaskit/icon/core/checkbox-unchecked"));
13
14
  var _Item = _interopRequireDefault(require("./Item"));
14
15
  var _analyticsNext = require("@atlaskit/analytics-next");
15
16
  var _analytics = require("../analytics");
@@ -23,6 +24,16 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
23
24
 
24
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
26
 
27
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
28
+
29
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
30
+
31
+ var CheckboxUncheckedIcon = function CheckboxUncheckedIcon(props) {
32
+ return (0, _react2.jsx)(_baseNew.Icon, (0, _extends2.default)({
33
+ dangerouslySetGlyph: "<rect width=\"12.5\" height=\"12.5\" x=\"1.75\" y=\"1.75\" stroke=\"currentcolor\" stroke-width=\"1.5\" rx=\"1.25\"/>",
34
+ type: 'core'
35
+ }, props));
36
+ };
26
37
  var taskCount = 0;
27
38
  var getCheckBoxId = function getCheckBoxId(localId) {
28
39
  return "".concat(localId, "-").concat(taskCount++);
@@ -93,7 +104,7 @@ var TaskItem = function TaskItem(props) {
93
104
  ref: inputRef
94
105
  }), isDone ? (0, _react2.jsx)(_checkboxChecked.default, {
95
106
  label: ""
96
- }) : (0, _react2.jsx)(_checkboxUnchecked.default, {
107
+ }) : (0, _react2.jsx)(CheckboxUncheckedIcon, {
97
108
  label: ""
98
109
  }));
99
110
  _react.default.useEffect(function () {
@@ -9,14 +9,24 @@ Object.defineProperty(exports, "__esModule", {
9
9
  exports.default = void 0;
10
10
  require("./TaskItem.compiled.css");
11
11
  var _runtime = require("@compiled/react/runtime");
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
13
  var _react = _interopRequireWildcard(require("react"));
14
+ var _baseNew = require("@atlaskit/icon/base-new");
13
15
  var _checkboxChecked = _interopRequireDefault(require("@atlaskit/icon/core/checkbox-checked"));
14
- var _checkboxUnchecked = _interopRequireDefault(require("@atlaskit/icon/core/checkbox-unchecked"));
15
16
  var _Item = _interopRequireDefault(require("./Item"));
16
17
  var _analyticsNext = require("@atlaskit/analytics-next");
17
18
  var _analytics = require("../../analytics");
18
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
22
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
23
+ var CheckboxUncheckedIcon = function CheckboxUncheckedIcon(props) {
24
+ return /*#__PURE__*/_react.default.createElement(_baseNew.Icon, (0, _extends2.default)({
25
+ dangerouslySetGlyph: "<rect width=\"12.5\" height=\"12.5\" x=\"1.75\" y=\"1.75\" stroke=\"currentcolor\" stroke-width=\"1.5\" rx=\"1.25\"/>",
26
+ type: 'core'
27
+ }, props));
28
+ };
29
+
20
30
  /**
21
31
  * References packages/design-system/checkbox/src/checkbox.tsx
22
32
  * To be used until mobile editor does not require legacy themed() API anymore,
@@ -93,7 +103,7 @@ var TaskItem = function TaskItem(props) {
93
103
  ref: inputRef
94
104
  }), isDone ? /*#__PURE__*/_react.default.createElement(_checkboxChecked.default, {
95
105
  label: ""
96
- }) : /*#__PURE__*/_react.default.createElement(_checkboxUnchecked.default, {
106
+ }) : /*#__PURE__*/_react.default.createElement(CheckboxUncheckedIcon, {
97
107
  label: ""
98
108
  }));
99
109
  _react.default.useEffect(function () {
@@ -1,8 +1,10 @@
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 '../';
4
+ import EmotionTaskItem from './TaskItem';
5
+ import CompiledTaskItem from './compiled/TaskItem';
5
6
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
6
8
  export default class ResourcedTaskItem extends PureComponent {
7
9
  constructor(props) {
8
10
  super(props);
@@ -142,11 +144,32 @@ export default class ResourcedTaskItem extends PureComponent {
142
144
  isFocused,
143
145
  inputRef
144
146
  } = this.props;
147
+ if (fg('platform_editor_css_migrate_stage_1')) {
148
+ return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
149
+ data: {
150
+ objectAri
151
+ }
152
+ }, /*#__PURE__*/React.createElement(CompiledTaskItem, {
153
+ isDone: isDone,
154
+ isRenderer: isRenderer,
155
+ isFocused: isFocused,
156
+ taskId: taskId,
157
+ onChange: this.handleOnChange,
158
+ onClick: this.handleOnClick,
159
+ appearance: appearance,
160
+ contentRef: contentRef,
161
+ showPlaceholder: showPlaceholder,
162
+ placeholder: placeholder,
163
+ disabled: disabled,
164
+ dataAttributes: dataAttributes,
165
+ inputRef: inputRef
166
+ }, children));
167
+ }
145
168
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
146
169
  data: {
147
170
  objectAri
148
171
  }
149
- }, /*#__PURE__*/React.createElement(TaskItem, {
172
+ }, /*#__PURE__*/React.createElement(EmotionTaskItem, {
150
173
  isDone: isDone,
151
174
  isRenderer: isRenderer,
152
175
  isFocused: isFocused,
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
@@ -5,12 +6,19 @@
5
6
  import React, { useMemo, useRef } from 'react';
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
8
  import { jsx } from '@emotion/react';
9
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
10
+ import { Icon } from '@atlaskit/icon/base-new';
11
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
12
+
8
13
  import CheckboxCheckedIcon from '@atlaskit/icon/core/checkbox-checked';
9
- import CheckboxUncheckedIcon from '@atlaskit/icon/core/checkbox-unchecked';
10
14
  import Item from './Item';
11
15
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
12
16
  import { createAndFireEventInElementsChannel } from '../analytics';
13
17
  import { checkboxStyles } from './styles';
18
+ const CheckboxUncheckedIcon = props => jsx(Icon, _extends({
19
+ dangerouslySetGlyph: `<rect width="12.5" height="12.5" x="1.75" y="1.75" stroke="currentcolor" stroke-width="1.5" rx="1.25"/>`,
20
+ type: 'core'
21
+ }, props));
14
22
  let taskCount = 0;
15
23
  const getCheckBoxId = localId => `${localId}-${taskCount++}`;
16
24
  const TaskItem = props => {
@@ -1,12 +1,21 @@
1
1
  /* TaskItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  import "./TaskItem.compiled.css";
3
4
  import { ax, ix } from "@compiled/react/runtime";
4
5
  import React, { useMemo, useRef } from 'react';
6
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
7
+ import { Icon } from '@atlaskit/icon/base-new';
8
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
9
+
5
10
  import CheckboxCheckedIcon from '@atlaskit/icon/core/checkbox-checked';
6
- import CheckboxUncheckedIcon from '@atlaskit/icon/core/checkbox-unchecked';
7
11
  import Item from './Item';
8
12
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
9
13
  import { createAndFireEventInElementsChannel } from '../../analytics';
14
+ const CheckboxUncheckedIcon = props => /*#__PURE__*/React.createElement(Icon, _extends({
15
+ dangerouslySetGlyph: `<rect width="12.5" height="12.5" x="1.75" y="1.75" stroke="currentcolor" stroke-width="1.5" rx="1.25"/>`,
16
+ type: 'core'
17
+ }, props));
18
+
10
19
  /**
11
20
  * References packages/design-system/checkbox/src/checkbox.tsx
12
21
  * To be used until mobile editor does not require legacy themed() API anymore,
@@ -10,8 +10,10 @@ 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 '../';
13
+ import EmotionTaskItem from './TaskItem';
14
+ import CompiledTaskItem from './compiled/TaskItem';
14
15
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
15
17
  var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
16
18
  function ResourcedTaskItem(props) {
17
19
  var _this;
@@ -159,11 +161,32 @@ var ResourcedTaskItem = /*#__PURE__*/function (_PureComponent) {
159
161
  isRenderer = _this$props3.isRenderer,
160
162
  isFocused = _this$props3.isFocused,
161
163
  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
+ }
162
185
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
163
186
  data: {
164
187
  objectAri: objectAri
165
188
  }
166
- }, /*#__PURE__*/React.createElement(TaskItem, {
189
+ }, /*#__PURE__*/React.createElement(EmotionTaskItem, {
167
190
  isDone: isDone,
168
191
  isRenderer: isRenderer,
169
192
  isFocused: isFocused,
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
@@ -5,12 +6,21 @@
5
6
  import React, { useMemo, useRef } from 'react';
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
8
  import { jsx } from '@emotion/react';
9
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
10
+ import { Icon } from '@atlaskit/icon/base-new';
11
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
12
+
8
13
  import CheckboxCheckedIcon from '@atlaskit/icon/core/checkbox-checked';
9
- import CheckboxUncheckedIcon from '@atlaskit/icon/core/checkbox-unchecked';
10
14
  import Item from './Item';
11
15
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
12
16
  import { createAndFireEventInElementsChannel } from '../analytics';
13
17
  import { checkboxStyles } from './styles';
18
+ var CheckboxUncheckedIcon = function CheckboxUncheckedIcon(props) {
19
+ return jsx(Icon, _extends({
20
+ dangerouslySetGlyph: "<rect width=\"12.5\" height=\"12.5\" x=\"1.75\" y=\"1.75\" stroke=\"currentcolor\" stroke-width=\"1.5\" rx=\"1.25\"/>",
21
+ type: 'core'
22
+ }, props));
23
+ };
14
24
  var taskCount = 0;
15
25
  var getCheckBoxId = function getCheckBoxId(localId) {
16
26
  return "".concat(localId, "-").concat(taskCount++);
@@ -1,12 +1,23 @@
1
1
  /* TaskItem.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  import "./TaskItem.compiled.css";
3
4
  import { ax, ix } from "@compiled/react/runtime";
4
5
  import React, { useMemo, useRef } from 'react';
6
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
7
+ import { Icon } from '@atlaskit/icon/base-new';
8
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
9
+
5
10
  import CheckboxCheckedIcon from '@atlaskit/icon/core/checkbox-checked';
6
- import CheckboxUncheckedIcon from '@atlaskit/icon/core/checkbox-unchecked';
7
11
  import Item from './Item';
8
12
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
9
13
  import { createAndFireEventInElementsChannel } from '../../analytics';
14
+ var CheckboxUncheckedIcon = function CheckboxUncheckedIcon(props) {
15
+ return /*#__PURE__*/React.createElement(Icon, _extends({
16
+ dangerouslySetGlyph: "<rect width=\"12.5\" height=\"12.5\" x=\"1.75\" y=\"1.75\" stroke=\"currentcolor\" stroke-width=\"1.5\" rx=\"1.25\"/>",
17
+ type: 'core'
18
+ }, props));
19
+ };
20
+
10
21
  /**
11
22
  * References packages/design-system/checkbox/src/checkbox.tsx
12
23
  * To be used until mobile editor does not require legacy themed() API anymore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "19.0.4",
3
+ "version": "19.1.1",
4
4
  "description": "Tasks and decisions react components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -44,9 +44,10 @@
44
44
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
45
45
  "@atlaskit/analytics-next": "^11.0.0",
46
46
  "@atlaskit/icon": "^25.0.0",
47
+ "@atlaskit/platform-feature-flags": "^1.1.0",
47
48
  "@atlaskit/platform-feature-flags-react": "^0.1.0",
48
49
  "@atlaskit/theme": "^18.0.0",
49
- "@atlaskit/tokens": "^4.4.0",
50
+ "@atlaskit/tokens": "^4.5.0",
50
51
  "@atlaskit/util-service-support": "^6.3.0",
51
52
  "@babel/runtime": "^7.0.0",
52
53
  "@compiled/react": "^0.18.2",