@atlaskit/editor-common 76.24.5 → 76.25.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 +12 -0
- package/dist/cjs/analytics/types/enums.js +4 -0
- package/dist/cjs/analytics/types/loom-events.js +5 -0
- package/dist/cjs/analytics/types/toolbar-button.js +1 -0
- package/dist/cjs/media-inline/inline-image-wrapper.js +14 -4
- package/dist/cjs/media-inline/media-inline-image-card.js +54 -40
- package/dist/cjs/media-inline/views/constants.js +8 -0
- package/dist/cjs/media-inline/views/error-view.js +33 -0
- package/dist/cjs/media-inline/views/frame.js +15 -0
- package/dist/cjs/media-inline/views/icon-wrapper.js +20 -0
- package/dist/cjs/media-inline/views/loading-view.js +21 -0
- package/dist/cjs/media-inline/views/wrapper.js +24 -0
- package/dist/cjs/messages/insert-block.js +10 -0
- package/dist/cjs/messages/media-inline-card.js +19 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/assets/index.js +13 -1
- package/dist/cjs/quick-insert/assets/loom.js +26 -0
- package/dist/cjs/quick-insert/index.js +6 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +4 -0
- package/dist/es2019/analytics/types/loom-events.js +1 -0
- package/dist/es2019/analytics/types/toolbar-button.js +1 -0
- package/dist/es2019/media-inline/inline-image-wrapper.js +14 -4
- package/dist/es2019/media-inline/media-inline-image-card.js +54 -39
- package/dist/es2019/media-inline/views/constants.js +2 -0
- package/dist/es2019/media-inline/views/error-view.js +25 -0
- package/dist/es2019/media-inline/views/frame.js +8 -0
- package/dist/es2019/media-inline/views/icon-wrapper.js +15 -0
- package/dist/es2019/media-inline/views/loading-view.js +13 -0
- package/dist/es2019/media-inline/views/wrapper.js +18 -0
- package/dist/es2019/messages/insert-block.js +10 -0
- package/dist/es2019/messages/media-inline-card.js +13 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/assets/index.js +4 -0
- package/dist/es2019/quick-insert/assets/loom.js +20 -0
- package/dist/es2019/quick-insert/index.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +4 -0
- package/dist/esm/analytics/types/loom-events.js +1 -0
- package/dist/esm/analytics/types/toolbar-button.js +1 -0
- package/dist/esm/media-inline/inline-image-wrapper.js +14 -4
- package/dist/esm/media-inline/media-inline-image-card.js +53 -39
- package/dist/esm/media-inline/views/constants.js +2 -0
- package/dist/esm/media-inline/views/error-view.js +26 -0
- package/dist/esm/media-inline/views/frame.js +9 -0
- package/dist/esm/media-inline/views/icon-wrapper.js +14 -0
- package/dist/esm/media-inline/views/loading-view.js +14 -0
- package/dist/esm/media-inline/views/wrapper.js +18 -0
- package/dist/esm/messages/insert-block.js +10 -0
- package/dist/esm/messages/media-inline-card.js +13 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/assets/index.js +10 -0
- package/dist/esm/quick-insert/assets/loom.js +19 -0
- package/dist/esm/quick-insert/index.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +6 -2
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/analytics/types/loom-events.d.ts +19 -0
- package/dist/types/analytics/types/toolbar-button.d.ts +2 -1
- package/dist/types/card/types.d.ts +1 -1
- package/dist/types/media-inline/inline-image-wrapper.d.ts +1 -0
- package/dist/types/media-inline/media-inline-image-card.d.ts +2 -0
- package/dist/types/media-inline/views/constants.d.ts +2 -0
- package/dist/types/media-inline/views/error-view.d.ts +12 -0
- package/dist/types/media-inline/views/frame.d.ts +9 -0
- package/dist/types/media-inline/views/icon-wrapper.d.ts +7 -0
- package/dist/types/media-inline/views/loading-view.d.ts +10 -0
- package/dist/types/media-inline/views/wrapper.d.ts +1 -0
- package/dist/types/messages/insert-block.d.ts +10 -0
- package/dist/types/messages/media-inline-card.d.ts +12 -0
- package/dist/types/provider-factory/quick-insert-provider.d.ts +3 -3
- package/dist/types/quick-insert/assets/index.d.ts +2 -1
- package/dist/types/quick-insert/assets/loom.d.ts +2 -0
- package/dist/types/quick-insert/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +6 -2
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/loom-events.d.ts +19 -0
- package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +2 -1
- package/dist/types-ts4.5/card/types.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +1 -0
- package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +2 -0
- package/dist/types-ts4.5/media-inline/views/constants.d.ts +2 -0
- package/dist/types-ts4.5/media-inline/views/error-view.d.ts +12 -0
- package/dist/types-ts4.5/media-inline/views/frame.d.ts +9 -0
- package/dist/types-ts4.5/media-inline/views/icon-wrapper.d.ts +7 -0
- package/dist/types-ts4.5/media-inline/views/loading-view.d.ts +10 -0
- package/dist/types-ts4.5/media-inline/views/wrapper.d.ts +1 -0
- package/dist/types-ts4.5/messages/insert-block.d.ts +10 -0
- package/dist/types-ts4.5/messages/media-inline-card.d.ts +12 -0
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +3 -3
- package/dist/types-ts4.5/quick-insert/assets/index.d.ts +2 -1
- package/dist/types-ts4.5/quick-insert/assets/loom.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/index.d.ts +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 76.25.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#58503](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58503) [`b98a7eb489b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b98a7eb489b9) - [ED-20984] Implement loading and error view for media inline image card
|
|
8
|
+
|
|
9
|
+
## 76.25.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#58193](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58193) [`142df4424484`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/142df4424484) - NO-ISSUE Added new editor plugin to enable Loom video recording in the Editor
|
|
14
|
+
|
|
3
15
|
## 76.24.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -132,6 +132,9 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
132
132
|
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
|
|
133
133
|
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
|
|
134
134
|
ACTION["UNSUPPORTED_TOOLTIP_VIEWED"] = "viewed";
|
|
135
|
+
ACTION["RECORD_VIDEO"] = "recordVideo";
|
|
136
|
+
ACTION["INSERT_VIDEO"] = "insertVideo";
|
|
137
|
+
ACTION["RECORD_VIDEO_FAILED"] = "recordVideoFailed";
|
|
135
138
|
return ACTION;
|
|
136
139
|
}({});
|
|
137
140
|
var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -216,6 +219,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
216
219
|
ACTION_SUBJECT["ANCHOR_LINK"] = "anchorLink";
|
|
217
220
|
ACTION_SUBJECT["LINK"] = "link";
|
|
218
221
|
ACTION_SUBJECT["TOOLTIP"] = "tooltip";
|
|
222
|
+
ACTION_SUBJECT["LOOM"] = "loom";
|
|
219
223
|
return ACTION_SUBJECT;
|
|
220
224
|
}({});
|
|
221
225
|
var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -20,5 +20,6 @@ var TOOLBAR_ACTION_SUBJECT_ID = exports.TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*
|
|
|
20
20
|
TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
|
|
21
21
|
TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
|
|
22
22
|
TOOLBAR_ACTION_SUBJECT_ID["OUTDENT"] = "outdent";
|
|
23
|
+
TOOLBAR_ACTION_SUBJECT_ID["RECORD_VIDEO"] = "recordVideo";
|
|
23
24
|
return TOOLBAR_ACTION_SUBJECT_ID;
|
|
24
25
|
}({});
|
|
@@ -5,12 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.InlineImageWrapper = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
8
9
|
var wrapperStyle = (0, _react.css)({
|
|
9
|
-
display: 'inline-block'
|
|
10
|
+
display: 'inline-block',
|
|
11
|
+
verticalAlign: 'text-bottom',
|
|
12
|
+
borderRadius: "var(--ds-border-radius, 3px)"
|
|
13
|
+
});
|
|
14
|
+
var selectedStyle = (0, _react.css)({
|
|
15
|
+
cursor: 'pointer',
|
|
16
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, ".concat(_colors.B300, ")")),
|
|
17
|
+
outline: 'none',
|
|
18
|
+
borderColor: 'transparent'
|
|
10
19
|
});
|
|
11
20
|
var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
12
|
-
var children = _ref.children
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
var children = _ref.children,
|
|
22
|
+
isSelected = _ref.isSelected;
|
|
23
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
24
|
+
css: [wrapperStyle, isSelected && selectedStyle]
|
|
15
25
|
}, children);
|
|
16
26
|
};
|
|
@@ -4,12 +4,19 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.MediaInlineImageCard = void 0;
|
|
7
|
+
exports.MediaInlineImageCardInternal = exports.MediaInlineImageCard = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
10
|
+
var _reactIntlNext = require("react-intl-next");
|
|
11
|
+
var _mediaInlineCard = require("../messages/media-inline-card");
|
|
12
|
+
var _inlineImageWrapper = require("./inline-image-wrapper");
|
|
13
|
+
var _errorView = require("./views/error-view");
|
|
14
|
+
var _loadingView = require("./views/loading-view");
|
|
15
|
+
var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = function MediaInlineImageCardInternal(_ref) {
|
|
11
16
|
var mediaClient = _ref.mediaClient,
|
|
12
|
-
identifier = _ref.identifier
|
|
17
|
+
identifier = _ref.identifier,
|
|
18
|
+
isSelected = _ref.isSelected,
|
|
19
|
+
intl = _ref.intl;
|
|
13
20
|
var _useState = (0, _react.useState)(),
|
|
14
21
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
15
22
|
fileState = _useState2[0],
|
|
@@ -18,6 +25,10 @@ var MediaInlineImageCard = exports.MediaInlineImageCard = function MediaInlineIm
|
|
|
18
25
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
19
26
|
subscribeError = _useState4[0],
|
|
20
27
|
setSubscribeError = _useState4[1];
|
|
28
|
+
var _ref2 = intl || (0, _reactIntlNext.createIntl)({
|
|
29
|
+
locale: 'en'
|
|
30
|
+
}),
|
|
31
|
+
formatMessage = _ref2.formatMessage;
|
|
21
32
|
(0, _react.useEffect)(function () {
|
|
22
33
|
var subscription = mediaClient.file.getFileState(identifier.id, {
|
|
23
34
|
collectionName: identifier.collectionName
|
|
@@ -34,41 +45,44 @@ var MediaInlineImageCard = exports.MediaInlineImageCard = function MediaInlineIm
|
|
|
34
45
|
subscription.unsubscribe();
|
|
35
46
|
};
|
|
36
47
|
}, [identifier.collectionName, identifier.id, mediaClient.file]);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (!fileState) {
|
|
66
|
-
throw new Error("not yet implemented: MediaInlineImageCard loading view");
|
|
67
|
-
}
|
|
48
|
+
var content = function content() {
|
|
49
|
+
if (subscribeError) {
|
|
50
|
+
var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
51
|
+
var errorMessage = isUploading ? _mediaInlineCard.messages.failedToUpload : _mediaInlineCard.messages.unableToLoadContent;
|
|
52
|
+
return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
|
|
53
|
+
message: formatMessage(errorMessage)
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
57
|
+
return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
|
|
58
|
+
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
62
|
+
return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
|
|
63
|
+
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Empty file handling
|
|
67
|
+
if (fileState && !fileState.name) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
|
|
69
|
+
message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (!fileState) {
|
|
73
|
+
return /*#__PURE__*/React.createElement(_loadingView.InlineImageCardLoadingView, null);
|
|
74
|
+
}
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
76
|
+
// TODO
|
|
77
|
+
// use Card from `@atlaskit/media-card` with an inline block wrapper
|
|
78
|
+
// with:
|
|
79
|
+
// selection state and `mediaOptions.allowLazyLoading`
|
|
80
|
+
throw new Error("not yet implemented: MediaInlineImageCard loading view");
|
|
81
|
+
};
|
|
82
|
+
return /*#__PURE__*/React.createElement(_inlineImageWrapper.InlineImageWrapper, {
|
|
83
|
+
isSelected: isSelected
|
|
84
|
+
}, content());
|
|
85
|
+
};
|
|
86
|
+
var MediaInlineImageCard = exports.MediaInlineImageCard = (0, _reactIntlNext.injectIntl)(MediaInlineImageCardInternal, {
|
|
87
|
+
enforceContext: false
|
|
88
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.InlineImageCardErrorView = void 0;
|
|
8
|
+
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
9
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
11
|
+
var _constants = require("./constants");
|
|
12
|
+
var _frame = require("./frame");
|
|
13
|
+
var _iconWrapper = require("./icon-wrapper");
|
|
14
|
+
var InlineImageCardErrorView = exports.InlineImageCardErrorView = function InlineImageCardErrorView(_ref) {
|
|
15
|
+
var _ref$testId = _ref.testId,
|
|
16
|
+
testId = _ref$testId === void 0 ? 'media-inline-image-card-error-view' : _ref$testId,
|
|
17
|
+
message = _ref.message,
|
|
18
|
+
icon = _ref.icon,
|
|
19
|
+
_ref$height = _ref.height,
|
|
20
|
+
height = _ref$height === void 0 ? _constants.ICON_SIZE_THRESOLD : _ref$height;
|
|
21
|
+
return /*#__PURE__*/React.createElement(_frame.Frame, {
|
|
22
|
+
testId: testId
|
|
23
|
+
}, /*#__PURE__*/React.createElement(_tooltip.default, {
|
|
24
|
+
content: message,
|
|
25
|
+
position: "top",
|
|
26
|
+
tag: "span",
|
|
27
|
+
hideTooltipOnClick: true
|
|
28
|
+
}, /*#__PURE__*/React.createElement(_iconWrapper.IconWrapper, null, icon || /*#__PURE__*/React.createElement(_warning.default, {
|
|
29
|
+
label: "error",
|
|
30
|
+
size: height > _constants.ICON_SIZE_THRESOLD ? 'medium' : 'small',
|
|
31
|
+
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")")
|
|
32
|
+
}))));
|
|
33
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Frame = void 0;
|
|
7
|
+
var _wrapper = require("./wrapper");
|
|
8
|
+
var Frame = exports.Frame = function Frame(_ref) {
|
|
9
|
+
var children = _ref.children,
|
|
10
|
+
testId = _ref.testId;
|
|
11
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
12
|
+
css: _wrapper.wrapperStyle,
|
|
13
|
+
"data-testid": testId
|
|
14
|
+
}, children);
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.IconWrapper = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var wrapperStyle = (0, _react.css)({
|
|
9
|
+
display: 'flex',
|
|
10
|
+
'span > svg': {
|
|
11
|
+
verticalAlign: 'baseline'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var IconWrapper = exports.IconWrapper = function IconWrapper(_ref) {
|
|
15
|
+
var children = _ref.children;
|
|
16
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
17
|
+
css: wrapperStyle,
|
|
18
|
+
"data-testid": "media-inline-image-card-icon"
|
|
19
|
+
}, children);
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.InlineImageCardLoadingView = void 0;
|
|
8
|
+
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
9
|
+
var _constants = require("./constants");
|
|
10
|
+
var _frame = require("./frame");
|
|
11
|
+
var InlineImageCardLoadingView = exports.InlineImageCardLoadingView = function InlineImageCardLoadingView(_ref) {
|
|
12
|
+
var _ref$testId = _ref.testId,
|
|
13
|
+
testId = _ref$testId === void 0 ? 'media-inline-image-card-loading-view' : _ref$testId,
|
|
14
|
+
_ref$height = _ref.height,
|
|
15
|
+
height = _ref$height === void 0 ? _constants.ICON_SIZE_THRESOLD : _ref$height;
|
|
16
|
+
return /*#__PURE__*/React.createElement(_frame.Frame, {
|
|
17
|
+
testId: testId
|
|
18
|
+
}, /*#__PURE__*/React.createElement(_spinner.default, {
|
|
19
|
+
size: height > _constants.ICON_SIZE_THRESOLD ? 'medium' : 'small'
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.wrapperStyle = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
+
var wrapperStyle = exports.wrapperStyle = (0, _react.css)({
|
|
10
|
+
display: 'inline-flex',
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: '100%',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
boxDecorationBreak: 'clone',
|
|
16
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
17
|
+
color: "".concat("var(--ds-text, ".concat(_colors.N900, ")")),
|
|
18
|
+
backgroundColor: "".concat("var(--ds-background-neutral, ".concat(_colors.N30A, ")")),
|
|
19
|
+
transition: '0.1s all ease-in-out',
|
|
20
|
+
cursor: 'pointer',
|
|
21
|
+
'&:hover': {
|
|
22
|
+
backgroundColor: "".concat("var(--ds-background-neutral-hovered, ".concat(_colors.N40A, ")"))
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -175,5 +175,15 @@ var toolbarInsertBlockMessages = exports.toolbarInsertBlockMessages = (0, _react
|
|
|
175
175
|
id: 'fabric.editor.help.description',
|
|
176
176
|
defaultMessage: 'Browse all the keyboard shortcuts and markdown options',
|
|
177
177
|
description: 'Browse all the keyboard shortcuts and markdown options'
|
|
178
|
+
},
|
|
179
|
+
recordVideo: {
|
|
180
|
+
id: 'fabric.editor.recordVideo',
|
|
181
|
+
defaultMessage: 'Record video',
|
|
182
|
+
description: 'Record video using Loom'
|
|
183
|
+
},
|
|
184
|
+
recordVideoDescription: {
|
|
185
|
+
id: 'fabric.editor.recordVideo.description',
|
|
186
|
+
defaultMessage: 'Record video using Loom',
|
|
187
|
+
description: 'Record video using Loom'
|
|
178
188
|
}
|
|
179
189
|
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.messages = void 0;
|
|
7
|
+
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
unableToLoadContent: {
|
|
10
|
+
id: 'fabric.editor.unableToLoadContent',
|
|
11
|
+
defaultMessage: "We couldn't load this content",
|
|
12
|
+
description: 'Display this message when there is an error loading file content'
|
|
13
|
+
},
|
|
14
|
+
failedToUpload: {
|
|
15
|
+
id: 'fabric.editor.failed_to_upload',
|
|
16
|
+
defaultMessage: 'Failed to upload',
|
|
17
|
+
description: 'Display this message when there is an error uploading a file'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
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; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "76.
|
|
19
|
+
var packageVersion = "76.25.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "IconFallback", {
|
|
|
18
18
|
return _fallback.default;
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
exports.IconStatus = exports.IconQuote = exports.IconPanelWarning = exports.IconPanelSuccess = exports.IconPanelNote = exports.IconPanelError = exports.IconPanel = exports.IconMention = exports.IconListNumber = exports.IconList = exports.IconLink = exports.IconLayout = exports.IconImages = exports.IconHeading = exports.IconFeedback = void 0;
|
|
21
|
+
exports.IconStatus = exports.IconQuote = exports.IconPanelWarning = exports.IconPanelSuccess = exports.IconPanelNote = exports.IconPanelError = exports.IconPanel = exports.IconMention = exports.IconLoom = exports.IconListNumber = exports.IconList = exports.IconLink = exports.IconLayout = exports.IconImages = exports.IconHeading = exports.IconFeedback = void 0;
|
|
22
22
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
23
23
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -371,4 +371,16 @@ var IconDatasourceAssetsObjects = exports.IconDatasourceAssetsObjects = (0, _rea
|
|
|
371
371
|
loading: function loading() {
|
|
372
372
|
return null;
|
|
373
373
|
}
|
|
374
|
+
});
|
|
375
|
+
var IconLoom = exports.IconLoom = (0, _reactLoadable.default)({
|
|
376
|
+
loader: function loader() {
|
|
377
|
+
return Promise.resolve().then(function () {
|
|
378
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-icon-loom" */'./loom'));
|
|
379
|
+
}).then(function (module) {
|
|
380
|
+
return module.default;
|
|
381
|
+
});
|
|
382
|
+
},
|
|
383
|
+
loading: function loading() {
|
|
384
|
+
return null;
|
|
385
|
+
}
|
|
374
386
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = IconLayout;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _useIconThemed2 = require("../use-icon-themed");
|
|
10
|
+
function IconLayout() {
|
|
11
|
+
var _useIconThemed = (0, _useIconThemed2.useIconThemed)(),
|
|
12
|
+
iconThemed = _useIconThemed.iconThemed;
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
14
|
+
focusable: "false",
|
|
15
|
+
"aria-hidden": true,
|
|
16
|
+
viewBox: "0 0 31 30",
|
|
17
|
+
width: 40,
|
|
18
|
+
height: 40
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
20
|
+
fill: iconThemed({
|
|
21
|
+
light: '#6460F9',
|
|
22
|
+
dark: '#FFF'
|
|
23
|
+
}),
|
|
24
|
+
d: "M30.01 13.43h-9.142l7.917-4.57-1.57-2.72-7.918 4.57 4.57-7.915-2.72-1.57-4.571 7.913V0h-3.142v9.139L8.863 1.225l-2.721 1.57 4.57 7.913L2.796 6.14 1.225 8.86l7.917 4.57H0v3.141h9.141l-7.916 4.57 1.57 2.72 7.918-4.57-4.571 7.915 2.72 1.57 4.572-7.914V30h3.142v-9.334l4.655 8.06 2.551-1.472-4.656-8.062 8.087 4.668 1.571-2.72-7.916-4.57h9.141v-3.14h.001zm-15.005 5.84a4.271 4.271 0 11-.001-8.542 4.271 4.271 0 01.001 8.542z"
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
@@ -111,6 +111,12 @@ Object.defineProperty(exports, "IconListNumber", {
|
|
|
111
111
|
return _assets.IconListNumber;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "IconLoom", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function get() {
|
|
117
|
+
return _assets.IconLoom;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
114
120
|
Object.defineProperty(exports, "IconMention", {
|
|
115
121
|
enumerable: true,
|
|
116
122
|
get: function get() {
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "76.
|
|
27
|
+
var packageVersion = "76.25.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -126,6 +126,9 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
126
126
|
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
|
|
127
127
|
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
|
|
128
128
|
ACTION["UNSUPPORTED_TOOLTIP_VIEWED"] = "viewed";
|
|
129
|
+
ACTION["RECORD_VIDEO"] = "recordVideo";
|
|
130
|
+
ACTION["INSERT_VIDEO"] = "insertVideo";
|
|
131
|
+
ACTION["RECORD_VIDEO_FAILED"] = "recordVideoFailed";
|
|
129
132
|
return ACTION;
|
|
130
133
|
}({});
|
|
131
134
|
export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -210,6 +213,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
210
213
|
ACTION_SUBJECT["ANCHOR_LINK"] = "anchorLink";
|
|
211
214
|
ACTION_SUBJECT["LINK"] = "link";
|
|
212
215
|
ACTION_SUBJECT["TOOLTIP"] = "tooltip";
|
|
216
|
+
ACTION_SUBJECT["LOOM"] = "loom";
|
|
213
217
|
return ACTION_SUBJECT;
|
|
214
218
|
}({});
|
|
215
219
|
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,5 +14,6 @@ export let TOOLBAR_ACTION_SUBJECT_ID = /*#__PURE__*/function (TOOLBAR_ACTION_SUB
|
|
|
14
14
|
TOOLBAR_ACTION_SUBJECT_ID["REDO"] = "redo";
|
|
15
15
|
TOOLBAR_ACTION_SUBJECT_ID["INDENT"] = "indent";
|
|
16
16
|
TOOLBAR_ACTION_SUBJECT_ID["OUTDENT"] = "outdent";
|
|
17
|
+
TOOLBAR_ACTION_SUBJECT_ID["RECORD_VIDEO"] = "recordVideo";
|
|
17
18
|
return TOOLBAR_ACTION_SUBJECT_ID;
|
|
18
19
|
}({});
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { B300 } from '@atlaskit/theme/colors';
|
|
2
3
|
const wrapperStyle = css({
|
|
3
|
-
display: 'inline-block'
|
|
4
|
+
display: 'inline-block',
|
|
5
|
+
verticalAlign: 'text-bottom',
|
|
6
|
+
borderRadius: `${"var(--ds-border-radius, 3px)"}`
|
|
7
|
+
});
|
|
8
|
+
const selectedStyle = css({
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
boxShadow: `0 0 0 1px ${`var(--ds-border-selected, ${B300})`}`,
|
|
11
|
+
outline: 'none',
|
|
12
|
+
borderColor: 'transparent'
|
|
4
13
|
});
|
|
5
14
|
export const InlineImageWrapper = ({
|
|
6
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
isSelected
|
|
7
17
|
}) => {
|
|
8
|
-
return /*#__PURE__*/React.createElement("
|
|
9
|
-
css: wrapperStyle
|
|
18
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
19
|
+
css: [wrapperStyle, isSelected && selectedStyle]
|
|
10
20
|
}, children);
|
|
11
21
|
};
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
|
|
2
|
+
import { createIntl, injectIntl } from 'react-intl-next';
|
|
3
|
+
import { messages } from '../messages/media-inline-card';
|
|
4
|
+
import { InlineImageWrapper } from './inline-image-wrapper';
|
|
5
|
+
import { InlineImageCardErrorView } from './views/error-view';
|
|
6
|
+
import { InlineImageCardLoadingView } from './views/loading-view';
|
|
7
|
+
export const MediaInlineImageCardInternal = ({
|
|
3
8
|
mediaClient,
|
|
4
|
-
identifier
|
|
9
|
+
identifier,
|
|
10
|
+
isSelected,
|
|
11
|
+
intl
|
|
5
12
|
}) => {
|
|
6
13
|
const [fileState, setFileState] = useState();
|
|
7
14
|
const [subscribeError, setSubscribeError] = useState();
|
|
15
|
+
const {
|
|
16
|
+
formatMessage
|
|
17
|
+
} = intl || createIntl({
|
|
18
|
+
locale: 'en'
|
|
19
|
+
});
|
|
8
20
|
useEffect(() => {
|
|
9
21
|
const subscription = mediaClient.file.getFileState(identifier.id, {
|
|
10
22
|
collectionName: identifier.collectionName
|
|
@@ -21,41 +33,44 @@ export const MediaInlineImageCard = ({
|
|
|
21
33
|
subscription.unsubscribe();
|
|
22
34
|
};
|
|
23
35
|
}, [identifier.collectionName, identifier.id, mediaClient.file]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
if (!fileState) {
|
|
53
|
-
throw new Error(`not yet implemented: MediaInlineImageCard loading view`);
|
|
54
|
-
}
|
|
36
|
+
const content = () => {
|
|
37
|
+
if (subscribeError) {
|
|
38
|
+
const isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
39
|
+
const errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
|
|
40
|
+
return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
|
|
41
|
+
message: formatMessage(errorMessage)
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
45
|
+
return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
|
|
46
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
50
|
+
return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
|
|
51
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
// Empty file handling
|
|
55
|
+
if (fileState && !fileState.name) {
|
|
56
|
+
return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
|
|
57
|
+
message: formatMessage(messages.unableToLoadContent)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (!fileState) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(InlineImageCardLoadingView, null);
|
|
62
|
+
}
|
|
55
63
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
64
|
+
// TODO
|
|
65
|
+
// use Card from `@atlaskit/media-card` with an inline block wrapper
|
|
66
|
+
// with:
|
|
67
|
+
// selection state and `mediaOptions.allowLazyLoading`
|
|
68
|
+
throw new Error(`not yet implemented: MediaInlineImageCard loading view`);
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/React.createElement(InlineImageWrapper, {
|
|
71
|
+
isSelected: isSelected
|
|
72
|
+
}, content());
|
|
73
|
+
};
|
|
74
|
+
export const MediaInlineImageCard = injectIntl(MediaInlineImageCardInternal, {
|
|
75
|
+
enforceContext: false
|
|
76
|
+
});
|