@atlaskit/editor-plugin-tasks-and-decisions 2.3.4 → 2.4.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,28 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#128347](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128347)
14
+ [`e33566cebd5d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e33566cebd5d1) -
15
+ [ED-24175] bump @atlaskit/adf-schema to 40.8.1 and @atlassian/adf-schema-json to 1.22.0 to
16
+ promotecodeblocks & media in quotes, and nested expands in expands to full schema, and allow
17
+ quotes in panels and decisions in lists in stage0 schema, and a validator spec change
18
+
19
+ ### Patch Changes
20
+
21
+ - [#128191](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128191)
22
+ [`abee764bebfe9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/abee764bebfe9) -
23
+ updated tests in line with unit test helper, task toDOM matched
24
+ - Updated dependencies
25
+
3
26
  ## 2.3.4
4
27
 
5
28
  ### Patch Changes
@@ -11,8 +11,10 @@ var _react = require("@emotion/react");
11
11
  var _adfSchema = require("@atlaskit/adf-schema");
12
12
  var _analytics = require("@atlaskit/editor-common/analytics");
13
13
  var _indentation = require("@atlaskit/editor-common/indentation");
14
+ var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
14
15
  var _messages = require("@atlaskit/editor-common/messages");
15
16
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
17
+ var _styles = require("@atlaskit/editor-common/styles");
16
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
19
  var _commands = require("./commands");
18
20
  var _helpers = require("./pm-plugins/helpers");
@@ -42,15 +44,53 @@ var taskItemSpecWithFixedToDOM = exports.taskItemSpecWithFixedToDOM = function t
42
44
  toDOM: function toDOM(node) {
43
45
  var checked = node.attrs.state === 'DONE';
44
46
  var inputAttrs = {
47
+ name: node.attrs.localId,
48
+ id: node.attrs.localId,
45
49
  type: 'checkbox'
46
50
  };
47
51
  if (checked) {
48
52
  inputAttrs.checked = 'true';
49
53
  }
50
- // TODO: Align styling with `@atlaskit/task-decision`
51
54
  return ['div', {
52
- style: 'display: flex;'
53
- }, ['input', inputAttrs], ['div', 0]];
55
+ class: _styles.TaskDecisionSharedCssClassName.TASK_CONTAINER,
56
+ style: (0, _lazyNodeView.convertToInlineCss)({
57
+ listStyleType: 'none',
58
+ lineHeight: '24px',
59
+ minWidth: '48px',
60
+ position: 'relative'
61
+ })
62
+ }, ['div', {
63
+ style: (0, _lazyNodeView.convertToInlineCss)({
64
+ display: 'flex'
65
+ })
66
+ }, ['span', {
67
+ contenteditable: 'false',
68
+ style: (0, _lazyNodeView.convertToInlineCss)({
69
+ width: '24px',
70
+ height: '24px',
71
+ lineHeight: '24px',
72
+ display: 'grid',
73
+ placeContent: 'center center'
74
+ })
75
+ }, ['input', _objectSpread(_objectSpread({}, inputAttrs), {}, {
76
+ style: (0, _lazyNodeView.convertToInlineCss)({
77
+ width: '13px',
78
+ height: '13px',
79
+ margin: '1px 0 0 0',
80
+ padding: 0,
81
+ accentColor: "var(--ds-background-selected-bold, #0C66E4)"
82
+ })
83
+ })]], ['div', {
84
+ 'data-component': 'content'
85
+ }, ['div', {
86
+ class: _styles.TaskDecisionSharedCssClassName.TASK_ITEM,
87
+ style: (0, _lazyNodeView.convertToInlineCss)({
88
+ display: 'block',
89
+ fontSize: '16px',
90
+ fontFamily: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
91
+ color: "var(--ds-text, #172B4D)"
92
+ })
93
+ }, 0]]]];
54
94
  }
55
95
  });
56
96
  };
@@ -7,8 +7,10 @@ import { css, jsx } from '@emotion/react';
7
7
  import { decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
8
8
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
10
+ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
10
11
  import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
11
12
  import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
13
+ import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
12
14
  import { fg } from '@atlaskit/platform-feature-flags';
13
15
  import { getListTypes, insertTaskDecisionAction, insertTaskDecisionCommand } from './commands';
14
16
  import { getCurrentIndentLevel, getTaskItemIndex, isInsideTask } from './pm-plugins/helpers';
@@ -32,15 +34,54 @@ export const taskItemSpecWithFixedToDOM = () => {
32
34
  toDOM: node => {
33
35
  const checked = node.attrs.state === 'DONE';
34
36
  const inputAttrs = {
37
+ name: node.attrs.localId,
38
+ id: node.attrs.localId,
35
39
  type: 'checkbox'
36
40
  };
37
41
  if (checked) {
38
42
  inputAttrs.checked = 'true';
39
43
  }
40
- // TODO: Align styling with `@atlaskit/task-decision`
41
44
  return ['div', {
42
- style: 'display: flex;'
43
- }, ['input', inputAttrs], ['div', 0]];
45
+ class: TaskDecisionSharedCssClassName.TASK_CONTAINER,
46
+ style: convertToInlineCss({
47
+ listStyleType: 'none',
48
+ lineHeight: '24px',
49
+ minWidth: '48px',
50
+ position: 'relative'
51
+ })
52
+ }, ['div', {
53
+ style: convertToInlineCss({
54
+ display: 'flex'
55
+ })
56
+ }, ['span', {
57
+ contenteditable: 'false',
58
+ style: convertToInlineCss({
59
+ width: '24px',
60
+ height: '24px',
61
+ lineHeight: '24px',
62
+ display: 'grid',
63
+ placeContent: 'center center'
64
+ })
65
+ }, ['input', {
66
+ ...inputAttrs,
67
+ style: convertToInlineCss({
68
+ width: '13px',
69
+ height: '13px',
70
+ margin: '1px 0 0 0',
71
+ padding: 0,
72
+ accentColor: "var(--ds-background-selected-bold, #0C66E4)"
73
+ })
74
+ }]], ['div', {
75
+ 'data-component': 'content'
76
+ }, ['div', {
77
+ class: TaskDecisionSharedCssClassName.TASK_ITEM,
78
+ style: convertToInlineCss({
79
+ display: 'block',
80
+ fontSize: '16px',
81
+ fontFamily: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
82
+ color: "var(--ds-text, #172B4D)"
83
+ })
84
+ }, 0]]]];
44
85
  }
45
86
  };
46
87
  };
@@ -10,8 +10,10 @@ import { css, jsx } from '@emotion/react';
10
10
  import { decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
11
11
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
12
12
  import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
13
+ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
13
14
  import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
14
15
  import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
16
+ import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
15
17
  import { fg } from '@atlaskit/platform-feature-flags';
16
18
  import { getListTypes, insertTaskDecisionAction, insertTaskDecisionCommand } from './commands';
17
19
  import { getCurrentIndentLevel, getTaskItemIndex, isInsideTask } from './pm-plugins/helpers';
@@ -34,15 +36,53 @@ export var taskItemSpecWithFixedToDOM = function taskItemSpecWithFixedToDOM() {
34
36
  toDOM: function toDOM(node) {
35
37
  var checked = node.attrs.state === 'DONE';
36
38
  var inputAttrs = {
39
+ name: node.attrs.localId,
40
+ id: node.attrs.localId,
37
41
  type: 'checkbox'
38
42
  };
39
43
  if (checked) {
40
44
  inputAttrs.checked = 'true';
41
45
  }
42
- // TODO: Align styling with `@atlaskit/task-decision`
43
46
  return ['div', {
44
- style: 'display: flex;'
45
- }, ['input', inputAttrs], ['div', 0]];
47
+ class: TaskDecisionSharedCssClassName.TASK_CONTAINER,
48
+ style: convertToInlineCss({
49
+ listStyleType: 'none',
50
+ lineHeight: '24px',
51
+ minWidth: '48px',
52
+ position: 'relative'
53
+ })
54
+ }, ['div', {
55
+ style: convertToInlineCss({
56
+ display: 'flex'
57
+ })
58
+ }, ['span', {
59
+ contenteditable: 'false',
60
+ style: convertToInlineCss({
61
+ width: '24px',
62
+ height: '24px',
63
+ lineHeight: '24px',
64
+ display: 'grid',
65
+ placeContent: 'center center'
66
+ })
67
+ }, ['input', _objectSpread(_objectSpread({}, inputAttrs), {}, {
68
+ style: convertToInlineCss({
69
+ width: '13px',
70
+ height: '13px',
71
+ margin: '1px 0 0 0',
72
+ padding: 0,
73
+ accentColor: "var(--ds-background-selected-bold, #0C66E4)"
74
+ })
75
+ })]], ['div', {
76
+ 'data-component': 'content'
77
+ }, ['div', {
78
+ class: TaskDecisionSharedCssClassName.TASK_ITEM,
79
+ style: convertToInlineCss({
80
+ display: 'block',
81
+ fontSize: '16px',
82
+ fontFamily: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
83
+ color: "var(--ds-text, #172B4D)"
84
+ })
85
+ }, 0]]]];
46
86
  }
47
87
  });
48
88
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "2.3.4",
3
+ "version": "2.4.1",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,19 +33,19 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/adf-schema": "^40.3.0",
37
- "@atlaskit/analytics-namespaced-context": "^6.10.0",
38
- "@atlaskit/analytics-next": "^10.0.0",
39
- "@atlaskit/editor-common": "^87.5.0",
40
- "@atlaskit/editor-plugin-analytics": "^1.6.0",
41
- "@atlaskit/editor-plugin-context-identifier": "^1.2.0",
42
- "@atlaskit/editor-plugin-type-ahead": "^1.6.0",
36
+ "@atlaskit/adf-schema": "^40.8.1",
37
+ "@atlaskit/analytics-namespaced-context": "^6.11.0",
38
+ "@atlaskit/analytics-next": "^10.1.0",
39
+ "@atlaskit/editor-common": "^88.0.0",
40
+ "@atlaskit/editor-plugin-analytics": "^1.8.0",
41
+ "@atlaskit/editor-plugin-context-identifier": "^1.3.0",
42
+ "@atlaskit/editor-plugin-type-ahead": "^1.8.0",
43
43
  "@atlaskit/editor-prosemirror": "5.0.1",
44
- "@atlaskit/icon": "^22.10.0",
44
+ "@atlaskit/icon": "^22.14.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.3.0",
46
46
  "@atlaskit/prosemirror-input-rules": "^3.2.0",
47
47
  "@atlaskit/task-decision": "^17.10.0",
48
- "@atlaskit/tokens": "^1.56.0",
48
+ "@atlaskit/tokens": "^1.59.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1"
51
51
  },