@atlaskit/task-decision 17.4.2 → 17.4.5

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,23 @@
1
1
  # @atlaskit/task-decision
2
2
 
3
+ ## 17.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
8
+
9
+ ## 17.4.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`bffe28af76b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bffe28af76b) - ED-14764: Modified CSS display attribute for checkboxes in action items slightly to address the problem seen in firefox where the cursor does not move to the previous item using the up arrow key. No appearance changes to the component as a result of this modification.
14
+
15
+ ## 17.4.3
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 17.4.2
4
22
 
5
23
  ### Patch Changes
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/constants.js",
4
4
  "module": "../dist/esm/constants.js",
5
5
  "module:es2019": "../dist/es2019/constants.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/constants.d.ts"
7
8
  }
@@ -27,7 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
27
 
28
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
- var CheckBoxWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", ";\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", ";\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", ";\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), (0, _constants.gridSize)(), (0, _components.themed)({
30
+ var CheckBoxWrapper = _styledComponents.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: inline;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", ";\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", ";\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", ";\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), (0, _constants.gridSize)(), (0, _components.themed)({
31
31
  light: (0, _tokens.token)('color.background.input', _colors.N0),
32
32
  dark: (0, _tokens.token)('color.background.input', _colors.DN100)
33
33
  }), (0, _components.themed)({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.4.2",
3
+ "version": "17.4.5",
4
4
  "sideEffects": false
5
5
  }
@@ -28,8 +28,7 @@ export const CheckBoxWrapper = styled.span`
28
28
 
29
29
  + div {
30
30
  box-sizing: border-box;
31
- display: block;
32
- position: relative;
31
+ display: inline;
33
32
  width: 100%;
34
33
  cursor: pointer;
35
34
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.4.2",
3
+ "version": "17.4.5",
4
4
  "sideEffects": false
5
5
  }
@@ -9,7 +9,7 @@ import { themed } from '@atlaskit/theme/components';
9
9
  import { gridSize } from '@atlaskit/theme/constants';
10
10
  import { N0, DN100, DN200, N30, N90, B75, B300 } from '@atlaskit/theme/colors';
11
11
  import { token } from '@atlaskit/tokens';
12
- export var CheckBoxWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: block;\n position: relative;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", ";\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", ";\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", ";\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), gridSize(), themed({
12
+ export var CheckBoxWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n position: relative;\n align-self: start;\n margin: 4px ", "px 0 0;\n\n & > input[type='checkbox'] {\n width: 16px;\n height: 16px;\n z-index: 1;\n cursor: pointer;\n position: absolute;\n outline: none;\n margin: 0;\n opacity: 0;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n\n + div {\n box-sizing: border-box;\n display: inline;\n width: 100%;\n cursor: pointer;\n\n &::after {\n background: ", ";\n background-size: 16px;\n border-radius: 3px;\n border-style: solid;\n border-width: 1px;\n border-color: ", ";\n box-sizing: border-box;\n content: '';\n height: 16px;\n left: 50%;\n position: absolute;\n transition: border-color 0.2s ease-in-out;\n top: 8px;\n width: 16px;\n transform: translate(-50%, -50%);\n }\n }\n &:focus-visible + div:after {\n ", "\n }\n &:not([disabled]):hover + div::after {\n background: ", ";\n transition: border 0.2s ease-in-out;\n }\n &[disabled] + div {\n opacity: 0.5;\n cursor: default;\n }\n &:checked {\n + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDA1MkNDIj48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n border: 0;\n border-color: transparent;\n }\n &:not([disabled]):hover + div::after {\n background: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPg0KICA8cmVjdCB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDc0N0E2Ij48L3JlY3Q+DQogIDxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik05LjM3NCA0LjkxNEw1LjQ1NiA4LjgzMmEuNzY5Ljc2OSAwIDAgMS0xLjA4OCAwTDIuNjI2IDcuMDkxYS43NjkuNzY5IDAgMSAxIDEuMDg4LTEuMDg5TDQuOTEyIDcuMmwzLjM3NC0zLjM3NGEuNzY5Ljc2OSAwIDEgMSAxLjA4OCAxLjA4OCI+PC9wYXRoPg0KPC9zdmc+)\n no-repeat 0 0;\n background-size: 16px;\n }\n }\n }\n"])), gridSize(), themed({
13
13
  light: token('color.background.input', N0),
14
14
  dark: token('color.background.input', DN100)
15
15
  }), themed({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.4.2",
3
+ "version": "17.4.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/task-decision",
3
- "version": "17.4.2",
3
+ "version": "17.4.5",
4
4
  "description": "Tasks and decisions react components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,11 +26,11 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@atlaskit/analytics-namespaced-context": "^6.4.0",
29
+ "@atlaskit/analytics-namespaced-context": "^6.5.0",
30
30
  "@atlaskit/analytics-next": "^8.2.0",
31
31
  "@atlaskit/icon": "^21.10.0",
32
32
  "@atlaskit/theme": "^12.1.0",
33
- "@atlaskit/tokens": "^0.9.0",
33
+ "@atlaskit/tokens": "^0.10.0",
34
34
  "@atlaskit/util-service-support": "^6.1.0",
35
35
  "@babel/runtime": "^7.0.0",
36
36
  "uuid": "^3.1.0"
@@ -42,13 +42,13 @@
42
42
  "url-search-params": "^0.10.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@atlaskit/analytics-listeners": "^8.2.0",
46
- "@atlaskit/avatar": "^20.5.0",
45
+ "@atlaskit/analytics-listeners": "^8.3.0",
46
+ "@atlaskit/avatar": "^21.0.0",
47
47
  "@atlaskit/docs": "*",
48
- "@atlaskit/editor-common": "^66.0.0",
48
+ "@atlaskit/editor-common": "^69.1.0",
49
49
  "@atlaskit/elements-test-helpers": "^0.7.0",
50
- "@atlaskit/renderer": "^93.0.0",
51
- "@atlaskit/util-data-test": "^17.2.0",
50
+ "@atlaskit/renderer": "^101.0.0",
51
+ "@atlaskit/util-data-test": "^17.5.0",
52
52
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
53
53
  "@types/url-search-params": "^0.10.0",
54
54
  "date-fns": "^2.17.0",
@@ -57,7 +57,7 @@
57
57
  "fetch-mock": "^8.0.0",
58
58
  "react": "^16.8.0",
59
59
  "sinon": "^2.2.0",
60
- "typescript": "4.2.4",
60
+ "typescript": "4.3.5",
61
61
  "url-search-params": "^0.10.0"
62
62
  },
63
63
  "techstack": {
package/report.api.md ADDED
@@ -0,0 +1,334 @@
1
+ ## API Report File for "@atlaskit/task-decision"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ /// <reference types="react" />
7
+
8
+ import { PureComponent } from 'react';
9
+ import { default as React_2 } from 'react';
10
+ import { ReactNode } from 'react';
11
+ import { ServiceConfig } from '@atlaskit/util-service-support';
12
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
13
+
14
+ export declare type Appearance = 'inline';
15
+
16
+ /**
17
+ * Same as PubSub client types (don't want a direct dep though)
18
+ */
19
+ export declare type ARI = string;
20
+
21
+ export declare type AVI = string;
22
+
23
+ export declare interface BaseItem<S> extends ObjectKey {
24
+ state: S;
25
+ lastUpdateDate: Date;
26
+ type: DecisionType | TaskType;
27
+ }
28
+
29
+ export declare interface ContentRef {
30
+ (ref: HTMLElement | null): void;
31
+ }
32
+
33
+ export declare type Cursor = string;
34
+
35
+ export declare interface Decision extends BaseItem<DecisionState> {
36
+ creationDate?: Date;
37
+ creator?: UserId;
38
+ lastUpdater?: UserId;
39
+ lastUpdateDate: Date;
40
+ participants?: UserId[];
41
+ status: DecisionStatus;
42
+ type: DecisionType;
43
+ }
44
+
45
+ export declare class DecisionItem extends PureComponent<Props, {}> {
46
+ static defaultProps: Partial<Props>;
47
+ render(): JSX.Element;
48
+ }
49
+
50
+ export declare class DecisionList extends PureComponent<Props_2, {}> {
51
+ render(): JSX.Element | null;
52
+ }
53
+
54
+ export declare type DecisionState = 'DECIDED';
55
+
56
+ export declare type DecisionStatus = 'CREATED';
57
+
58
+ export declare type DecisionType = 'DECISION';
59
+
60
+ export declare type Handler = (state: TaskState | DecisionState) => void;
61
+
62
+ export declare type Item = Decision | Task;
63
+
64
+ export declare interface Meta {
65
+ cursor?: string;
66
+ }
67
+
68
+ export declare interface ObjectKey {
69
+ localId: string;
70
+ containerAri?: string;
71
+ objectAri: string;
72
+ }
73
+
74
+ export declare interface OnUpdate<T> {
75
+ (allDecisions: T[], newDecisions: T[]): void;
76
+ }
77
+
78
+ declare interface Props {
79
+ children?: any;
80
+ contentRef?: ContentRef;
81
+ placeholder?: string;
82
+ showPlaceholder?: boolean;
83
+ appearance?: Appearance;
84
+ dataAttributes?: {
85
+ [key: string]: string | number;
86
+ };
87
+ }
88
+
89
+ declare interface Props_2 {
90
+ children?: ReactNode;
91
+ }
92
+
93
+ declare interface Props_3 {
94
+ taskId: string;
95
+ isDone?: boolean;
96
+ isRenderer?: boolean;
97
+ onChange?: (taskId: string, isChecked: boolean) => void;
98
+ contentRef?: ContentRef;
99
+ children?: any;
100
+ taskDecisionProvider?: Promise<TaskDecisionProvider>;
101
+ objectAri?: string;
102
+ showPlaceholder?: boolean;
103
+ placeholder?: string;
104
+ appearance?: Appearance;
105
+ disabled?: boolean;
106
+ dataAttributes?: {
107
+ [key: string]: string | number;
108
+ };
109
+ }
110
+
111
+ declare interface Props_4 {
112
+ taskId: string;
113
+ isDone?: boolean;
114
+ isRenderer?: boolean;
115
+ onChange?: (taskId: string, isChecked: boolean) => void;
116
+ contentRef?: ContentRef;
117
+ children?: any;
118
+ placeholder?: string;
119
+ showPlaceholder?: boolean;
120
+ appearance?: Appearance;
121
+ disabled?: boolean;
122
+ dataAttributes?: {
123
+ [key: string]: string | number;
124
+ };
125
+ }
126
+
127
+ declare interface Props_5 {
128
+ listId?: string;
129
+ children?: ReactNode;
130
+ }
131
+
132
+ export declare interface PubSubClient {
133
+ on(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
134
+ off(eventAvi: string, listener: PubSubOnEvent): PubSubClient;
135
+ join(aris: ARI[]): Promise<PubSubClient>;
136
+ leave(aris: ARI[]): Promise<PubSubClient>;
137
+ }
138
+
139
+ export declare interface PubSubOnEvent<T = any> {
140
+ (event: string, data: T): void;
141
+ }
142
+
143
+ export declare enum PubSubSpecialEventType {
144
+ ERROR = 'ERROR',
145
+ CONNECTED = 'CONNECTED',
146
+ RECONNECT = 'RECONNECT',
147
+ }
148
+
149
+ export declare interface RecentUpdateContext {
150
+ objectAri: string;
151
+ localId?: string;
152
+ }
153
+
154
+ export declare type RecentUpdatesId = string;
155
+
156
+ /**
157
+ * A subscriber interface that can be called back if there are new decisions/tasks/items
158
+ * available as the result of an external change.
159
+ */
160
+ export declare interface RecentUpdatesListener {
161
+ /**
162
+ * An id that can be used to unsubscribe
163
+ */
164
+ id(id: RecentUpdatesId): void;
165
+ /**
166
+ * Indicates there are recent updates, and the listener should refresh
167
+ * the latest items from the TaskDecisionProvider.
168
+ *
169
+ * There will be a number of retries until expectedLocalId, if passed.
170
+ *
171
+ * @param updateContext Recent update context
172
+ */
173
+ recentUpdates(updateContext: RecentUpdateContext): void;
174
+ }
175
+
176
+ export declare interface RenderDocument {
177
+ (document: any, rendererContext?: RendererContext): JSX.Element;
178
+ }
179
+
180
+ /**
181
+ * Same as RendererContext in editor-core (don't want an direct dep though)
182
+ */
183
+ export declare interface RendererContext {
184
+ objectAri: string;
185
+ containerAri?: string;
186
+ }
187
+
188
+ export declare class ResourcedTaskItem extends PureComponent<Props_3, State> {
189
+ static defaultProps: Partial<Props_3>;
190
+ private mounted;
191
+ constructor(props: Props_3);
192
+ componentDidMount(): void;
193
+ UNSAFE_componentWillReceiveProps(nextProps: Props_3): void;
194
+ componentWillUnmount(): void;
195
+ private subscribe;
196
+ private unsubscribe;
197
+ private onUpdate;
198
+ private handleOnChange;
199
+ render(): JSX.Element;
200
+ }
201
+
202
+ export declare interface ServiceDecision {
203
+ creationDate?: string;
204
+ creatorId?: UserId;
205
+ lastUpdaterId?: UserId;
206
+ lastUpdateDate: string;
207
+ localId: string;
208
+ objectAri: string;
209
+ participants?: UserId[];
210
+ state?: DecisionState;
211
+ status: DecisionStatus;
212
+ type: DecisionType;
213
+ }
214
+
215
+ export declare interface ServiceDecisionResponse {
216
+ decisions: ServiceDecision[];
217
+ meta: Meta;
218
+ }
219
+
220
+ export declare type ServiceItem = ServiceDecision | ServiceTask;
221
+
222
+ export declare interface ServiceTask {
223
+ creationDate?: string;
224
+ creatorId?: UserId;
225
+ lastUpdaterId?: UserId;
226
+ lastUpdateDate: string;
227
+ localId: string;
228
+ objectAri: string;
229
+ parentLocalId?: string;
230
+ participants?: UserId[];
231
+ position: number;
232
+ state: TaskState;
233
+ type: TaskType;
234
+ }
235
+
236
+ export declare interface ServiceTaskState {
237
+ lastUpdateDate: string;
238
+ localId: string;
239
+ objectAri: string;
240
+ state: TaskState;
241
+ }
242
+
243
+ declare interface State {
244
+ isDone?: boolean;
245
+ }
246
+
247
+ export declare interface Task extends BaseItem<TaskState> {
248
+ creationDate?: Date;
249
+ creator?: UserId;
250
+ lastUpdater?: UserId;
251
+ lastUpdateDate: Date;
252
+ parentLocalId?: string;
253
+ participants?: UserId[];
254
+ position?: number;
255
+ type: TaskType;
256
+ }
257
+
258
+ export declare interface TaskDecisionProvider {
259
+ unsubscribeRecentUpdates(id: RecentUpdatesId): void;
260
+ notifyRecentUpdates(updateContext: RecentUpdateContext): void;
261
+ toggleTask(objectKey: ObjectKey, state: TaskState): Promise<TaskState>;
262
+ subscribe(
263
+ objectKey: ObjectKey,
264
+ handler: Handler,
265
+ item?: BaseItem<TaskState | DecisionState>,
266
+ ): void;
267
+ unsubscribe(objectKey: ObjectKey, handler: Handler): void;
268
+ }
269
+
270
+ export declare class TaskDecisionResource implements TaskDecisionProvider {
271
+ private recentUpdates;
272
+ private itemStateManager;
273
+ constructor(serviceConfig: TaskDecisionResourceConfig);
274
+ unsubscribeRecentUpdates(id: RecentUpdatesId): void;
275
+ notifyRecentUpdates(recentUpdateContext: RecentUpdateContext): void;
276
+ toggleTask(objectKey: ObjectKey, state: TaskState): Promise<TaskState>;
277
+ subscribe(
278
+ objectKey: ObjectKey,
279
+ handler: Handler,
280
+ item?: BaseItem<TaskState | DecisionState>,
281
+ ): void;
282
+ unsubscribe(objectKey: ObjectKey, handler: Handler): void;
283
+ /**
284
+ * Usually only needed for testing to ensure no outstanding requests
285
+ * are sent to a server (typically mocked).
286
+ */
287
+ destroy(): void;
288
+ }
289
+
290
+ export declare interface TaskDecisionResourceConfig extends ServiceConfig {
291
+ pubSubClient?: PubSubClient;
292
+ /**
293
+ * Indicates if initial state for an action or decision is should be cached,
294
+ * from the content, i.e. was originally hydrated from the service initially,
295
+ * and so should be considered up to date.
296
+ *
297
+ * Will stop the initiation of the hydration from the service the first
298
+ * time an action or decision is seen.
299
+ *
300
+ * If false the state will always be hydrated from the service on first view.
301
+ */
302
+ disableServiceHydration?: boolean;
303
+ }
304
+
305
+ export declare const TaskItem: React_2.ForwardRefExoticComponent<
306
+ Pick<
307
+ Omit<Props_4 & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps>,
308
+ never
309
+ > &
310
+ Partial<
311
+ Pick<
312
+ Omit<
313
+ Props_4 & WithAnalyticsEventsProps,
314
+ keyof WithAnalyticsEventsProps
315
+ >,
316
+ keyof Props_4
317
+ >
318
+ > &
319
+ Partial<Pick<Partial<Props_4>, never>> &
320
+ React_2.RefAttributes<any>
321
+ >;
322
+
323
+ export declare class TaskList extends PureComponent<Props_5, {}> {
324
+ render(): JSX.Element | null;
325
+ }
326
+
327
+ export declare type TaskState = 'TODO' | 'DONE';
328
+
329
+ export declare type TaskType = 'TASK';
330
+
331
+ export declare type UserId = string;
332
+
333
+ export {};
334
+ ```
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/type-helpers.js",
4
4
  "module": "../dist/esm/type-helpers.js",
5
5
  "module:es2019": "../dist/es2019/type-helpers.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/type-helpers.d.ts"
7
8
  }
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/types.js",
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/types.d.ts"
7
8
  }