@atlaskit/editor-extension-dropbox 0.2.26 → 0.2.29
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 +19 -0
- package/constants/package.json +1 -0
- package/dist/cjs/icons/DropboxIcon.js +1 -0
- package/dist/cjs/modal.js +5 -43
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/icons/DropboxIcon.js +1 -0
- package/dist/es2019/modal.js +1 -29
- package/dist/es2019/version.json +1 -1
- package/dist/esm/icons/DropboxIcon.js +1 -0
- package/dist/esm/modal.js +1 -35
- package/dist/esm/version.json +1 -1
- package/dist/types/manifest.d.ts +1 -1
- package/dropboxscript/package.json +1 -0
- package/enable-dropbox/package.json +1 -0
- package/manifest/package.json +1 -0
- package/modal/package.json +1 -0
- package/package.json +11 -8
- package/types/package.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-extension-dropbox
|
|
2
2
|
|
|
3
|
+
## 0.2.29
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.2.28
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 0.2.27
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 0.2.26
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/constants/package.json
CHANGED
|
@@ -15,6 +15,7 @@ var _default = function _default() {
|
|
|
15
15
|
return (
|
|
16
16
|
/*#__PURE__*/
|
|
17
17
|
// This colour is not ADG - it is the dropbox brand color
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
18
19
|
_react.default.createElement(_dropbox.default, {
|
|
19
20
|
primaryColor: "#0061FF",
|
|
20
21
|
label: ""
|
package/dist/cjs/modal.js
CHANGED
|
@@ -11,12 +11,8 @@ exports.default = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
15
|
|
|
18
|
-
var _chromatism = _interopRequireDefault(require("chromatism"));
|
|
19
|
-
|
|
20
16
|
var _react2 = require("@emotion/react");
|
|
21
17
|
|
|
22
18
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
@@ -25,22 +21,13 @@ var _close = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/close")
|
|
|
25
21
|
|
|
26
22
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
27
23
|
|
|
28
|
-
var _constants = require("
|
|
29
|
-
|
|
30
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
31
|
-
|
|
32
|
-
var _constants2 = require("./constants");
|
|
24
|
+
var _constants = require("./constants");
|
|
33
25
|
|
|
34
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
27
|
|
|
36
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; }
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41
|
-
|
|
42
|
-
var gridSize = (0, _constants.gridSize)();
|
|
43
|
-
|
|
30
|
+
/** @jsx jsx */
|
|
44
31
|
var ModalBody = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
45
32
|
return (0, _react2.jsx)("div", {
|
|
46
33
|
ref: ref,
|
|
@@ -55,35 +42,10 @@ var iframeStyle = {
|
|
|
55
42
|
height: '100%',
|
|
56
43
|
borderRadius: '0 0 3px 3px'
|
|
57
44
|
};
|
|
58
|
-
/*
|
|
59
|
-
BC: I have stolen hexToRGBA and bottomShadow from atlassian-navigation. Having a direct dependency
|
|
60
|
-
on Atlassian navigation seemed bad, but wanted to get us close enough. Finding a
|
|
61
|
-
better solution to have this as common would be good.
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
var hexToRGBA = function hexToRGBA(hex) {
|
|
65
|
-
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
66
|
-
|
|
67
|
-
var rgba = _objectSpread(_objectSpread({}, _chromatism.default.convert(hex).rgb), {
|
|
68
|
-
a: opacity
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
return "rgba(".concat(Object.values(rgba).join(', '), ")");
|
|
72
|
-
};
|
|
73
|
-
|
|
74
45
|
var bottomShadow = (0, _react2.css)({
|
|
75
46
|
display: 'flex',
|
|
76
47
|
justifyContent: 'space-between',
|
|
77
|
-
alignItems: 'baseline'
|
|
78
|
-
'&:after': {
|
|
79
|
-
content: '""',
|
|
80
|
-
left: 0,
|
|
81
|
-
right: 0,
|
|
82
|
-
position: 'absolute',
|
|
83
|
-
top: '33px',
|
|
84
|
-
height: gridSize / 2,
|
|
85
|
-
background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat(hexToRGBA(_colors.N900, 0), " 4px)")
|
|
86
|
-
}
|
|
48
|
+
alignItems: 'baseline'
|
|
87
49
|
});
|
|
88
50
|
var spacingDivStyle = {
|
|
89
51
|
width: '28px'
|
|
@@ -137,12 +99,12 @@ var Modal = function Modal(_ref) {
|
|
|
137
99
|
}
|
|
138
100
|
}, (0, _react2.jsx)(Header, null), (0, _react2.jsx)(_modalDialog.ModalBody, null, (0, _react2.jsx)(ModalBody, null, TEST_ONLY_src ? (0, _react2.jsx)("iframe", {
|
|
139
101
|
css: iframeStyle,
|
|
140
|
-
name:
|
|
102
|
+
name: _constants.DROPBOX_IFRAME_NAME,
|
|
141
103
|
frameBorder: 0,
|
|
142
104
|
src: TEST_ONLY_src
|
|
143
105
|
}) : (0, _react2.jsx)("iframe", {
|
|
144
106
|
css: iframeStyle,
|
|
145
|
-
name:
|
|
107
|
+
name: _constants.DROPBOX_IFRAME_NAME,
|
|
146
108
|
frameBorder: 0
|
|
147
109
|
})))));
|
|
148
110
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,6 +3,7 @@ import DropboxIcon from '@atlaskit/icon/glyph/dropbox';
|
|
|
3
3
|
export default (() =>
|
|
4
4
|
/*#__PURE__*/
|
|
5
5
|
// This colour is not ADG - it is the dropbox brand color
|
|
6
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
6
7
|
React.createElement(DropboxIcon, {
|
|
7
8
|
primaryColor: "#0061FF",
|
|
8
9
|
label: ""
|
package/dist/es2019/modal.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
import chromatism from 'chromatism';
|
|
4
3
|
import { jsx, css } from '@emotion/react';
|
|
5
4
|
import ModalDialog, { ModalTransition, useModal, ModalBody as AKModalBody } from '@atlaskit/modal-dialog';
|
|
6
5
|
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
7
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
|
-
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
9
|
-
import { N40A, N30A, N900 } from '@atlaskit/theme/colors';
|
|
10
7
|
import { DROPBOX_IFRAME_NAME } from './constants';
|
|
11
|
-
const gridSize = gridSizeFn();
|
|
12
8
|
const ModalBody = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
13
9
|
return jsx("div", {
|
|
14
10
|
ref: ref,
|
|
@@ -22,34 +18,10 @@ const iframeStyle = {
|
|
|
22
18
|
height: '100%',
|
|
23
19
|
borderRadius: '0 0 3px 3px'
|
|
24
20
|
};
|
|
25
|
-
/*
|
|
26
|
-
BC: I have stolen hexToRGBA and bottomShadow from atlassian-navigation. Having a direct dependency
|
|
27
|
-
on Atlassian navigation seemed bad, but wanted to get us close enough. Finding a
|
|
28
|
-
better solution to have this as common would be good.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
const hexToRGBA = (hex, opacity = 1) => {
|
|
32
|
-
const rgba = { ...chromatism.convert(hex).rgb,
|
|
33
|
-
...{
|
|
34
|
-
a: opacity
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
return `rgba(${Object.values(rgba).join(', ')})`;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
21
|
const bottomShadow = css({
|
|
41
22
|
display: 'flex',
|
|
42
23
|
justifyContent: 'space-between',
|
|
43
|
-
alignItems: 'baseline'
|
|
44
|
-
'&:after': {
|
|
45
|
-
content: '""',
|
|
46
|
-
left: 0,
|
|
47
|
-
right: 0,
|
|
48
|
-
position: 'absolute',
|
|
49
|
-
top: '33px',
|
|
50
|
-
height: gridSize / 2,
|
|
51
|
-
background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA(N900, 0)} 4px)`
|
|
52
|
-
}
|
|
24
|
+
alignItems: 'baseline'
|
|
53
25
|
});
|
|
54
26
|
const spacingDivStyle = {
|
|
55
27
|
width: '28px'
|
package/dist/es2019/version.json
CHANGED
|
@@ -4,6 +4,7 @@ export default (function () {
|
|
|
4
4
|
return (
|
|
5
5
|
/*#__PURE__*/
|
|
6
6
|
// This colour is not ADG - it is the dropbox brand color
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
7
8
|
React.createElement(DropboxIcon, {
|
|
8
9
|
primaryColor: "#0061FF",
|
|
9
10
|
label: ""
|
package/dist/esm/modal.js
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
2
|
|
|
8
3
|
/** @jsx jsx */
|
|
9
4
|
import React, { useState } from 'react';
|
|
10
|
-
import chromatism from 'chromatism';
|
|
11
5
|
import { jsx, css } from '@emotion/react';
|
|
12
6
|
import ModalDialog, { ModalTransition, useModal, ModalBody as AKModalBody } from '@atlaskit/modal-dialog';
|
|
13
7
|
import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
|
|
14
8
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
15
|
-
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
16
|
-
import { N40A, N30A, N900 } from '@atlaskit/theme/colors';
|
|
17
9
|
import { DROPBOX_IFRAME_NAME } from './constants';
|
|
18
|
-
var gridSize = gridSizeFn();
|
|
19
10
|
var ModalBody = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
11
|
return jsx("div", {
|
|
21
12
|
ref: ref,
|
|
@@ -29,35 +20,10 @@ var iframeStyle = {
|
|
|
29
20
|
height: '100%',
|
|
30
21
|
borderRadius: '0 0 3px 3px'
|
|
31
22
|
};
|
|
32
|
-
/*
|
|
33
|
-
BC: I have stolen hexToRGBA and bottomShadow from atlassian-navigation. Having a direct dependency
|
|
34
|
-
on Atlassian navigation seemed bad, but wanted to get us close enough. Finding a
|
|
35
|
-
better solution to have this as common would be good.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
var hexToRGBA = function hexToRGBA(hex) {
|
|
39
|
-
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
40
|
-
|
|
41
|
-
var rgba = _objectSpread(_objectSpread({}, chromatism.convert(hex).rgb), {
|
|
42
|
-
a: opacity
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
return "rgba(".concat(Object.values(rgba).join(', '), ")");
|
|
46
|
-
};
|
|
47
|
-
|
|
48
23
|
var bottomShadow = css({
|
|
49
24
|
display: 'flex',
|
|
50
25
|
justifyContent: 'space-between',
|
|
51
|
-
alignItems: 'baseline'
|
|
52
|
-
'&:after': {
|
|
53
|
-
content: '""',
|
|
54
|
-
left: 0,
|
|
55
|
-
right: 0,
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
top: '33px',
|
|
58
|
-
height: gridSize / 2,
|
|
59
|
-
background: "linear-gradient(180deg, ".concat(N40A, " 0, ").concat(N40A, " 1px, ").concat(N30A, " 1px, ").concat(hexToRGBA(N900, 0), " 4px)")
|
|
60
|
-
}
|
|
26
|
+
alignItems: 'baseline'
|
|
61
27
|
});
|
|
62
28
|
var spacingDivStyle = {
|
|
63
29
|
width: '28px'
|
package/dist/esm/version.json
CHANGED
package/dist/types/manifest.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare global {
|
|
|
7
7
|
choose: (args: {
|
|
8
8
|
iframe?: boolean;
|
|
9
9
|
windowName?: string;
|
|
10
|
-
success: (value
|
|
10
|
+
success: (value: DropboxFile[] | PromiseLike<DropboxFile[]>) => void;
|
|
11
11
|
cancel: () => void;
|
|
12
12
|
}) => void;
|
|
13
13
|
};
|
package/manifest/package.json
CHANGED
package/modal/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-extension-dropbox",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"description": "A an atlassian editor extension to add a native dropbox picker",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,14 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/adf-utils": "^16.0.0",
|
|
28
|
-
"@atlaskit/button": "^16.
|
|
29
|
-
"@atlaskit/editor-common": "^
|
|
28
|
+
"@atlaskit/button": "^16.3.0",
|
|
29
|
+
"@atlaskit/editor-common": "^67.0.0",
|
|
30
30
|
"@atlaskit/icon": "^21.10.0",
|
|
31
31
|
"@atlaskit/modal-dialog": "^12.2.0",
|
|
32
|
-
"@atlaskit/theme": "^12.1.0",
|
|
33
32
|
"@babel/runtime": "^7.0.0",
|
|
34
|
-
"@emotion/react": "^11.7.1"
|
|
35
|
-
"chromatism": "^2.6.0"
|
|
33
|
+
"@emotion/react": "^11.7.1"
|
|
36
34
|
},
|
|
37
35
|
"peerDependencies": {
|
|
38
36
|
"react": "^16.8.0",
|
|
@@ -44,7 +42,12 @@
|
|
|
44
42
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
45
43
|
"react": "^16.8.0",
|
|
46
44
|
"react-dom": "^16.8.0",
|
|
47
|
-
"typescript": "
|
|
45
|
+
"typescript": "4.2.4"
|
|
48
46
|
},
|
|
49
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
47
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
48
|
+
"techstack": {
|
|
49
|
+
"@repo/internal": {
|
|
50
|
+
"theming": "tokens"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
50
53
|
}
|