@atlaskit/editor-plugin-media 0.12.5 → 0.12.6
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 +7 -0
- package/dist/cjs/nodeviews/mediaGroup.js +2 -2
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +10 -10
- package/dist/cjs/pm-plugins/keymap.js +6 -6
- package/dist/cjs/toolbar/alt-text.js +2 -2
- package/dist/cjs/ui/CaptionPlaceholder/index.js +2 -2
- package/dist/cjs/ui/ImageBorder/index.js +10 -10
- package/dist/cjs/ui/Media/DropPlaceholder.js +4 -4
- package/dist/cjs/ui/MediaLinkingToolbar.js +2 -2
- package/dist/cjs/ui/PixelEntry/index.js +9 -9
- package/dist/cjs/ui/ToolbarMedia/index.js +2 -2
- package/dist/es2019/nodeviews/mediaGroup.js +1 -1
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/pm-plugins/keymap.js +1 -1
- package/dist/es2019/toolbar/alt-text.js +1 -1
- package/dist/es2019/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/es2019/ui/ImageBorder/index.js +1 -1
- package/dist/es2019/ui/Media/DropPlaceholder.js +1 -1
- package/dist/es2019/ui/MediaLinkingToolbar.js +1 -1
- package/dist/es2019/ui/PixelEntry/index.js +1 -1
- package/dist/es2019/ui/ToolbarMedia/index.js +1 -1
- package/dist/esm/nodeviews/mediaGroup.js +1 -1
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/pm-plugins/keymap.js +1 -1
- package/dist/esm/toolbar/alt-text.js +1 -1
- package/dist/esm/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/esm/ui/ImageBorder/index.js +1 -1
- package/dist/esm/ui/Media/DropPlaceholder.js +1 -1
- package/dist/esm/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/ui/PixelEntry/index.js +1 -1
- package/dist/esm/ui/ToolbarMedia/index.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/nodeviews/messages.js +0 -14
- package/dist/cjs/pm-plugins/alt-text/messages.js +0 -44
- package/dist/cjs/pm-plugins/mediaResizeAnnouncerMess.js +0 -34
- package/dist/cjs/ui/CaptionPlaceholder/messages.js +0 -14
- package/dist/cjs/ui/ImageBorder/messages.js +0 -49
- package/dist/cjs/ui/Media/drop-placeholder-messages.js +0 -14
- package/dist/cjs/ui/PixelEntry/messages.js +0 -54
- package/dist/cjs/ui/ToolbarMedia/toolbar-media-messages.js +0 -14
- package/dist/cjs/ui/media-linking-toolbar-messages.js +0 -14
- package/dist/es2019/nodeviews/messages.js +0 -8
- package/dist/es2019/pm-plugins/alt-text/messages.js +0 -38
- package/dist/es2019/pm-plugins/mediaResizeAnnouncerMess.js +0 -28
- package/dist/es2019/ui/CaptionPlaceholder/messages.js +0 -8
- package/dist/es2019/ui/ImageBorder/messages.js +0 -43
- package/dist/es2019/ui/Media/drop-placeholder-messages.js +0 -8
- package/dist/es2019/ui/PixelEntry/messages.js +0 -48
- package/dist/es2019/ui/ToolbarMedia/toolbar-media-messages.js +0 -8
- package/dist/es2019/ui/media-linking-toolbar-messages.js +0 -8
- package/dist/esm/nodeviews/messages.js +0 -8
- package/dist/esm/pm-plugins/alt-text/messages.js +0 -38
- package/dist/esm/pm-plugins/mediaResizeAnnouncerMess.js +0 -28
- package/dist/esm/ui/CaptionPlaceholder/messages.js +0 -8
- package/dist/esm/ui/ImageBorder/messages.js +0 -43
- package/dist/esm/ui/Media/drop-placeholder-messages.js +0 -8
- package/dist/esm/ui/PixelEntry/messages.js +0 -48
- package/dist/esm/ui/ToolbarMedia/toolbar-media-messages.js +0 -8
- package/dist/esm/ui/media-linking-toolbar-messages.js +0 -8
- package/dist/types/nodeviews/messages.d.ts +0 -7
- package/dist/types/pm-plugins/alt-text/messages.d.ts +0 -37
- package/dist/types/pm-plugins/mediaResizeAnnouncerMess.d.ts +0 -27
- package/dist/types/ui/CaptionPlaceholder/messages.d.ts +0 -7
- package/dist/types/ui/ImageBorder/messages.d.ts +0 -42
- package/dist/types/ui/Media/drop-placeholder-messages.d.ts +0 -7
- package/dist/types/ui/PixelEntry/messages.d.ts +0 -47
- package/dist/types/ui/ToolbarMedia/toolbar-media-messages.d.ts +0 -7
- package/dist/types/ui/media-linking-toolbar-messages.d.ts +0 -7
- package/dist/types-ts4.5/nodeviews/messages.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/alt-text/messages.d.ts +0 -37
- package/dist/types-ts4.5/pm-plugins/mediaResizeAnnouncerMess.d.ts +0 -27
- package/dist/types-ts4.5/ui/CaptionPlaceholder/messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/ImageBorder/messages.d.ts +0 -42
- package/dist/types-ts4.5/ui/Media/drop-placeholder-messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/PixelEntry/messages.d.ts +0 -47
- package/dist/types-ts4.5/ui/ToolbarMedia/toolbar-media-messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/media-linking-toolbar-messages.d.ts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 0.12.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#71136](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71136) [`c803fea1e6a4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c803fea1e6a4) - Move all plugin translations to editor-common
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 0.12.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -17,6 +17,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
18
|
var _reactIntlNext = require("react-intl-next");
|
|
19
19
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
20
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
20
21
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
21
22
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
22
23
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -25,7 +26,6 @@ var _mediaCommon = require("@atlaskit/media-common");
|
|
|
25
26
|
var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
|
|
26
27
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
27
28
|
var _mediaNodeUpdater = require("./mediaNodeUpdater");
|
|
28
|
-
var _messages = require("./messages");
|
|
29
29
|
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; }
|
|
30
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
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); }; }
|
|
@@ -161,7 +161,7 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
161
161
|
actions: [{
|
|
162
162
|
handler: disabled || !_this.mediaPluginState ? function () {} : _this.mediaPluginState.handleMediaNodeRemoval.bind(null, undefined, getNodePos),
|
|
163
163
|
icon: /*#__PURE__*/_react.default.createElement(_close.default, {
|
|
164
|
-
label: _this.props.intl.formatMessage(
|
|
164
|
+
label: _this.props.intl.formatMessage(_media.nodeViewsMessages.mediaGroupDeleteLabel)
|
|
165
165
|
})
|
|
166
166
|
}]
|
|
167
167
|
};
|
|
@@ -19,13 +19,13 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
19
19
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
20
20
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
21
21
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
22
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
22
23
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
23
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
25
|
var _chevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-left-large"));
|
|
25
26
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
|
|
26
27
|
var _colors = require("@atlaskit/theme/colors");
|
|
27
28
|
var _commands = require("../commands");
|
|
28
|
-
var _messages = require("../messages");
|
|
29
29
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
30
30
|
/** @jsx jsx */
|
|
31
31
|
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); }; }
|
|
@@ -138,7 +138,7 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
138
138
|
value: function render() {
|
|
139
139
|
var formatMessage = this.props.intl.formatMessage;
|
|
140
140
|
var showClearTextButton = this.state.showClearTextButton;
|
|
141
|
-
var backButtonMessage = formatMessage(
|
|
141
|
+
var backButtonMessage = formatMessage(_media.altTextMessages.back);
|
|
142
142
|
var backButtonMessageComponent = (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
143
143
|
description: backButtonMessage,
|
|
144
144
|
keymap: _keymaps.escape,
|
|
@@ -157,17 +157,17 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
157
157
|
}, (0, _react2.jsx)("div", {
|
|
158
158
|
css: buttonWrapper
|
|
159
159
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
160
|
-
title: formatMessage(
|
|
160
|
+
title: formatMessage(_media.altTextMessages.back),
|
|
161
161
|
icon: (0, _react2.jsx)(_chevronLeftLarge.default, {
|
|
162
|
-
label: formatMessage(
|
|
162
|
+
label: formatMessage(_media.altTextMessages.back)
|
|
163
163
|
}),
|
|
164
164
|
tooltipContent: backButtonMessageComponent,
|
|
165
165
|
onClick: this.closeMediaAltTextMenu
|
|
166
166
|
})), (0, _react2.jsx)(_ui.PanelTextInput, {
|
|
167
167
|
testId: "alt-text-input",
|
|
168
|
-
ariaLabel: formatMessage(
|
|
168
|
+
ariaLabel: formatMessage(_media.altTextMessages.placeholder),
|
|
169
169
|
describedById: "".concat(hasErrors ? 'errors-list' : '', " support-text"),
|
|
170
|
-
placeholder: formatMessage(
|
|
170
|
+
placeholder: formatMessage(_media.altTextMessages.placeholder),
|
|
171
171
|
defaultValue: this.state.lastValue,
|
|
172
172
|
onCancel: this.dispatchCancelEvent,
|
|
173
173
|
onChange: this.handleOnChange,
|
|
@@ -181,13 +181,13 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
181
181
|
css: buttonWrapper
|
|
182
182
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
183
183
|
testId: "alt-text-clear-button",
|
|
184
|
-
title: formatMessage(
|
|
184
|
+
title: formatMessage(_media.altTextMessages.clear),
|
|
185
185
|
icon: (0, _react2.jsx)("span", {
|
|
186
186
|
css: clearText
|
|
187
187
|
}, (0, _react2.jsx)(_crossCircle.default, {
|
|
188
|
-
label: formatMessage(
|
|
188
|
+
label: formatMessage(_media.altTextMessages.clear)
|
|
189
189
|
})),
|
|
190
|
-
tooltipContent: formatMessage(
|
|
190
|
+
tooltipContent: formatMessage(_media.altTextMessages.clear),
|
|
191
191
|
onClick: this.handleClearText
|
|
192
192
|
}))), hasErrors && (0, _react2.jsx)("section", {
|
|
193
193
|
id: "errors-list",
|
|
@@ -197,7 +197,7 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
197
197
|
}, errorsList), (0, _react2.jsx)("p", {
|
|
198
198
|
css: supportText,
|
|
199
199
|
id: "support-text"
|
|
200
|
-
}, formatMessage(
|
|
200
|
+
}, formatMessage(_media.altTextMessages.supportText)));
|
|
201
201
|
}
|
|
202
202
|
}, {
|
|
203
203
|
key: "fireAnalytics",
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
exports.keymapPlugin = keymapPlugin;
|
|
8
8
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
9
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
9
10
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
10
11
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
11
12
|
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
@@ -16,7 +17,6 @@ var _captions = require("../commands/captions");
|
|
|
16
17
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
17
18
|
var _commands = require("../toolbar/commands");
|
|
18
19
|
var _utils = require("../toolbar/utils");
|
|
19
|
-
var _mediaResizeAnnouncerMess = require("./mediaResizeAnnouncerMess");
|
|
20
20
|
function keymapPlugin(options, editorAnalyticsAPI, editorSelectionAPI, widthPlugin, getIntl) {
|
|
21
21
|
var list = {};
|
|
22
22
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.undo.common, ignoreLinksInSteps, list);
|
|
@@ -81,11 +81,11 @@ var createAnnouncer = function createAnnouncer(action, mediaWidth, changeAmount,
|
|
|
81
81
|
} else {
|
|
82
82
|
var newMediaWidth = mediaWidth + changeAmount;
|
|
83
83
|
if (validation === 'greater-than-max') {
|
|
84
|
-
announcerContainer.textContent = intl.formatMessage(
|
|
84
|
+
announcerContainer.textContent = intl.formatMessage(_media.mediaResizeAnnouncerMessMessages.MediaWidthIsMax);
|
|
85
85
|
} else if (validation === 'less-than-min') {
|
|
86
|
-
announcerContainer.textContent = intl.formatMessage(
|
|
86
|
+
announcerContainer.textContent = intl.formatMessage(_media.mediaResizeAnnouncerMessMessages.MediaWidthIsMin);
|
|
87
87
|
} else {
|
|
88
|
-
announcerContainer.textContent = intl.formatMessage(
|
|
88
|
+
announcerContainer.textContent = intl.formatMessage(_media.mediaResizeAnnouncerMessMessages.DefaultMediaWidth, {
|
|
89
89
|
action: action,
|
|
90
90
|
newMediaWidth: newMediaWidth
|
|
91
91
|
});
|
|
@@ -124,9 +124,9 @@ var handleMediaSizeChange = function handleMediaSizeChange(editorAnalyticsAPI, w
|
|
|
124
124
|
validationResult = _validationMaxMin.validation;
|
|
125
125
|
var formattedAction = action;
|
|
126
126
|
if (action === 'increased') {
|
|
127
|
-
formattedAction = intl.formatMessage(
|
|
127
|
+
formattedAction = intl.formatMessage(_media.mediaResizeAnnouncerMessMessages.IncreasedAction);
|
|
128
128
|
} else if (action === 'decreased') {
|
|
129
|
-
formattedAction = intl.formatMessage(
|
|
129
|
+
formattedAction = intl.formatMessage(_media.mediaResizeAnnouncerMessMessages.DecreasedAction);
|
|
130
130
|
}
|
|
131
131
|
var newLayout = (0, _utils.calcNewLayout)(newWidthValidated, (_getSelectedMediaSing2 = (0, _utils.getSelectedMediaSingle)(state)) === null || _getSelectedMediaSing2 === void 0 || (_getSelectedMediaSing2 = _getSelectedMediaSing2.node) === null || _getSelectedMediaSing2 === void 0 || (_getSelectedMediaSing2 = _getSelectedMediaSing2.attrs) === null || _getSelectedMediaSing2 === void 0 ? void 0 : _getSelectedMediaSing2.layout, contentWidth, options === null || options === void 0 ? void 0 : options.fullWidthEnabled);
|
|
132
132
|
(0, _commands.updateMediaSingleWidth)(editorAnalyticsAPI)(newWidthValidated, validationResult, 'keyboard', newLayout)(state, dispatch);
|
|
@@ -9,9 +9,9 @@ exports.getAltTextToolbar = exports.altTextEditComponent = exports.altTextButton
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
12
13
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
14
|
var _commands = require("../pm-plugins/alt-text/commands");
|
|
14
|
-
var _messages = require("../pm-plugins/alt-text/messages");
|
|
15
15
|
var _AltTextEdit = _interopRequireWildcard(require("../pm-plugins/alt-text/ui/AltTextEdit"));
|
|
16
16
|
var _mediaCommon = require("../utils/media-common");
|
|
17
17
|
var _commands2 = require("./commands");
|
|
@@ -22,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
22
22
|
var testId = 'alt-text-edit-button';
|
|
23
23
|
var altTextButton = exports.altTextButton = function altTextButton(intl, state, editorAnalyticsAPI) {
|
|
24
24
|
var mediaNode = (0, _mediaCommon.getMediaSingleOrInlineNodeFromSelection)(state);
|
|
25
|
-
var message = mediaNode && mediaNode.attrs.alt ?
|
|
25
|
+
var message = mediaNode && mediaNode.attrs.alt ? _media.altTextMessages.editAltText : _media.altTextMessages.altText;
|
|
26
26
|
var title = intl.formatMessage(message);
|
|
27
27
|
return {
|
|
28
28
|
title: title,
|
|
@@ -9,9 +9,9 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
12
13
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
13
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
|
-
var _messages = require("./messages");
|
|
15
15
|
var _templateObject;
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
var placeholder = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n width: 100%;\n text-align: center;\n margin-top: ", " !important;\n display: block;\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-100, 8px)");
|
|
@@ -23,5 +23,5 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
23
23
|
onClick: onClick,
|
|
24
24
|
"data-id": _mediaSingle.CAPTION_PLACEHOLDER_ID,
|
|
25
25
|
"data-testid": "caption-placeholder"
|
|
26
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage,
|
|
26
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _media.captionMessages.placeholder));
|
|
27
27
|
});
|
|
@@ -9,6 +9,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _icons = require("@atlaskit/editor-common/icons");
|
|
12
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
12
13
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
15
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
@@ -16,7 +17,6 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
16
17
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
17
18
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
18
19
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
19
|
-
var _messages = require("./messages");
|
|
20
20
|
var _styles2 = require("./styles");
|
|
21
21
|
/** @jsx jsx */
|
|
22
22
|
|
|
@@ -51,17 +51,17 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
var borderSizeOptions = [{
|
|
54
|
-
name: formatMessage(
|
|
54
|
+
name: formatMessage(_media.imageBorderMessages.borderSizeSubtle),
|
|
55
55
|
value: 1
|
|
56
56
|
}, {
|
|
57
|
-
name: formatMessage(
|
|
57
|
+
name: formatMessage(_media.imageBorderMessages.borderSizeMedium),
|
|
58
58
|
value: 2
|
|
59
59
|
}, {
|
|
60
|
-
name: formatMessage(
|
|
60
|
+
name: formatMessage(_media.imageBorderMessages.borderSizeBold),
|
|
61
61
|
value: 3
|
|
62
62
|
}];
|
|
63
63
|
var items = [{
|
|
64
|
-
content: formatMessage(
|
|
64
|
+
content: formatMessage(_media.imageBorderMessages.borderColor),
|
|
65
65
|
value: {
|
|
66
66
|
name: 'color'
|
|
67
67
|
},
|
|
@@ -87,7 +87,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
87
87
|
}
|
|
88
88
|
})))
|
|
89
89
|
}, {
|
|
90
|
-
content: formatMessage(
|
|
90
|
+
content: formatMessage(_media.imageBorderMessages.borderSize),
|
|
91
91
|
value: {
|
|
92
92
|
name: 'size'
|
|
93
93
|
},
|
|
@@ -144,18 +144,18 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
144
144
|
selected: enabled,
|
|
145
145
|
onClick: toggleBorder,
|
|
146
146
|
spacing: "compact",
|
|
147
|
-
"aria-label": enabled ? formatMessage(
|
|
147
|
+
"aria-label": enabled ? formatMessage(_media.imageBorderMessages.removeBorder) : formatMessage(_media.imageBorderMessages.addBorder),
|
|
148
148
|
iconBefore: (0, _react2.jsx)(_icons.BorderIcon, {
|
|
149
149
|
label: ""
|
|
150
150
|
}),
|
|
151
|
-
title: enabled ? formatMessage(
|
|
151
|
+
title: enabled ? formatMessage(_media.imageBorderMessages.removeBorder) : formatMessage(_media.imageBorderMessages.addBorder)
|
|
152
152
|
}), (0, _react2.jsx)("div", {
|
|
153
153
|
ref: popupTarget
|
|
154
154
|
}, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
|
|
155
155
|
className: "image-border-toolbar-dropdown",
|
|
156
156
|
selected: enabled || isOpen,
|
|
157
|
-
"aria-label": formatMessage(
|
|
158
|
-
title: formatMessage(
|
|
157
|
+
"aria-label": formatMessage(_media.imageBorderMessages.borderOptions),
|
|
158
|
+
title: formatMessage(_media.imageBorderMessages.borderOptions),
|
|
159
159
|
spacing: "compact",
|
|
160
160
|
iconBefore: (0, _react2.jsx)(_chevronDown.default, {
|
|
161
161
|
label: ""
|
|
@@ -9,18 +9,18 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
12
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
12
13
|
var _documentFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/document-filled"));
|
|
13
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
14
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
|
-
var
|
|
16
|
-
var _dropPlaceholderMessages = require("./drop-placeholder-messages");
|
|
16
|
+
var _media2 = require("../../nodeviews/mediaNodeView/media");
|
|
17
17
|
var _templateObject, _templateObject2;
|
|
18
18
|
/** @jsx jsx */
|
|
19
|
-
var iconWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n margin: 5px 3px 25px;\n width: ", "px;\n min-height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), "var(--ds-icon-accent-blue, ".concat((0, _adfSchema.hexToRgba)(_colors.B400, 0.4) || _colors.B400, ")"), "var(--ds-background-accent-blue-subtle, ".concat((0, _adfSchema.hexToRgba)(_colors.B300, 0.6) || _colors.B300, ")"), (0, _constants.borderRadius)(),
|
|
19
|
+
var iconWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n margin: 5px 3px 25px;\n width: ", "px;\n min-height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), "var(--ds-icon-accent-blue, ".concat((0, _adfSchema.hexToRgba)(_colors.B400, 0.4) || _colors.B400, ")"), "var(--ds-background-accent-blue-subtle, ".concat((0, _adfSchema.hexToRgba)(_colors.B300, 0.6) || _colors.B300, ")"), (0, _constants.borderRadius)(), _media2.FILE_WIDTH, _media2.MEDIA_HEIGHT);
|
|
20
20
|
var dropLine = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: ", "px;\n margin: ", " 0;\n width: 100%;\n height: 2px;\n"])), "var(--ds-border-focused, ".concat(_colors.B200, ")"), (0, _constants.borderRadius)(), "var(--ds-space-025, 2px)");
|
|
21
21
|
var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
22
22
|
var intl = props.intl;
|
|
23
|
-
var dropPlaceholderLabel =
|
|
23
|
+
var dropPlaceholderLabel = _media.dropPlaceholderMessages.dropPlaceholderLabel;
|
|
24
24
|
return (0, _react.jsx)("div", {
|
|
25
25
|
css: iconWrapper
|
|
26
26
|
}, (0, _react.jsx)(_documentFilled.default, {
|
|
@@ -18,13 +18,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
20
|
var _link = require("@atlaskit/editor-common/link");
|
|
21
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
21
22
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
22
23
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
23
24
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
24
25
|
var _chevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-left-large"));
|
|
25
26
|
var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink"));
|
|
26
27
|
var _colors = require("@atlaskit/theme/colors");
|
|
27
|
-
var _mediaLinkingToolbarMessages = require("./media-linking-toolbar-messages");
|
|
28
28
|
var _templateObject, _templateObject2;
|
|
29
29
|
/** @jsx jsx */
|
|
30
30
|
// Common Translations will live here
|
|
@@ -96,7 +96,7 @@ var LinkAddToolbar = exports.LinkAddToolbar = /*#__PURE__*/function (_React$Pure
|
|
|
96
96
|
var getPlaceholder = function getPlaceholder(hasActivityProvider) {
|
|
97
97
|
return formatMessage(hasActivityProvider ? _messages.linkToolbarMessages.placeholder : _messages.linkToolbarMessages.linkPlaceholder);
|
|
98
98
|
};
|
|
99
|
-
var formatLinkAddressText = formatMessage(
|
|
99
|
+
var formatLinkAddressText = formatMessage(_media.mediaLinkToolbarMessages.backLink);
|
|
100
100
|
var formatUnlinkText = formatMessage(_messages.linkToolbarMessages.unlink);
|
|
101
101
|
var errorsList = _this.state.validationErrors.map(function (error, index) {
|
|
102
102
|
return (0, _react2.jsx)(_ui.ErrorMessage, {
|
|
@@ -11,11 +11,11 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
14
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
14
15
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
15
16
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
16
17
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
18
|
var _constants = require("./constants");
|
|
18
|
-
var _messages = require("./messages");
|
|
19
19
|
var _styles = require("./styles");
|
|
20
20
|
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); }
|
|
21
21
|
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; }
|
|
@@ -113,13 +113,13 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
113
113
|
}, [minWidth, maxWidth, onChange, ratioWidth, ratioHeight]);
|
|
114
114
|
if (showMigration) {
|
|
115
115
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
116
|
-
content: formatMessage(
|
|
116
|
+
content: formatMessage(_media.pixelEntryMessages.migrationButtonTooltip)
|
|
117
117
|
}, (0, _react2.jsx)(_button.default, {
|
|
118
118
|
appearance: "warning",
|
|
119
119
|
spacing: "compact",
|
|
120
120
|
onClick: onMigrate,
|
|
121
121
|
testId: _constants.PIXELENTRY_MIGRATION_BUTTON_TESTID
|
|
122
|
-
}, formatMessage(
|
|
122
|
+
}, formatMessage(_media.pixelEntryMessages.migrationButtonText)));
|
|
123
123
|
}
|
|
124
124
|
return (0, _react2.jsx)("div", {
|
|
125
125
|
css: _styles.pixelEntryForm
|
|
@@ -137,7 +137,7 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
137
137
|
var fieldProps = _ref3.fieldProps;
|
|
138
138
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
139
139
|
hideTooltipOnMouseDown: true,
|
|
140
|
-
content: formatMessage(
|
|
140
|
+
content: formatMessage(_media.pixelEntryMessages.inputWidthTooltip, {
|
|
141
141
|
maxWidth: maxWidth
|
|
142
142
|
}),
|
|
143
143
|
position: "top"
|
|
@@ -147,7 +147,7 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
147
147
|
isCompact: true,
|
|
148
148
|
onChange: handleOnChange('inputWidth'),
|
|
149
149
|
pattern: "\\d*",
|
|
150
|
-
"aria-label": formatMessage(
|
|
150
|
+
"aria-label": formatMessage(_media.pixelEntryMessages.inputWidthAriaLabel, {
|
|
151
151
|
maxWidth: maxWidth
|
|
152
152
|
})
|
|
153
153
|
})));
|
|
@@ -161,7 +161,7 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
161
161
|
var fieldProps = _ref4.fieldProps;
|
|
162
162
|
return (0, _react2.jsx)(_tooltip.default, {
|
|
163
163
|
hideTooltipOnMouseDown: true,
|
|
164
|
-
content: formatMessage(
|
|
164
|
+
content: formatMessage(_media.pixelEntryMessages.inputHeightTooltip),
|
|
165
165
|
position: "top"
|
|
166
166
|
}, (0, _react2.jsx)(_textfield.default, (0, _extends2.default)({}, fieldProps, {
|
|
167
167
|
css: [_styles.pixelSizingHeightInput, _styles.pixelSizingInput],
|
|
@@ -169,17 +169,17 @@ var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
|
169
169
|
isCompact: true,
|
|
170
170
|
onChange: handleOnChange('inputHeight'),
|
|
171
171
|
pattern: "\\d*",
|
|
172
|
-
"aria-label": formatMessage(
|
|
172
|
+
"aria-label": formatMessage(_media.pixelEntryMessages.inputHeightAriaLabel)
|
|
173
173
|
})));
|
|
174
174
|
}), (0, _react2.jsx)(_button.default, {
|
|
175
175
|
css: _styles.pixelEntryHiddenSubmit,
|
|
176
176
|
type: "submit"
|
|
177
|
-
}, formatMessage(
|
|
177
|
+
}, formatMessage(_media.pixelEntryMessages.submitButtonText))));
|
|
178
178
|
}));
|
|
179
179
|
};
|
|
180
180
|
var FullWidthDisplay = exports.FullWidthDisplay = function FullWidthDisplay(_ref5) {
|
|
181
181
|
var formatMessage = _ref5.intl.formatMessage;
|
|
182
182
|
return (0, _react2.jsx)("div", {
|
|
183
183
|
css: _styles.pixelSizingFullWidthLabelStyles
|
|
184
|
-
}, (0, _react2.jsx)("span", null, formatMessage(
|
|
184
|
+
}, (0, _react2.jsx)("span", null, formatMessage(_media.pixelEntryMessages.fullWidthLabel)));
|
|
185
185
|
};
|
|
@@ -8,9 +8,9 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
|
+
var _media = require("@atlaskit/editor-common/media");
|
|
11
12
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
12
13
|
var _attachment = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/attachment"));
|
|
13
|
-
var _toolbarMediaMessages = require("./toolbar-media-messages");
|
|
14
14
|
var onClickMediaButton = function onClickMediaButton(pluginState) {
|
|
15
15
|
return function () {
|
|
16
16
|
pluginState.showMediaPicker();
|
|
@@ -27,7 +27,7 @@ var ToolbarMedia = function ToolbarMedia(_ref) {
|
|
|
27
27
|
if (!(mediaState !== null && mediaState !== void 0 && mediaState.allowsUploads)) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
-
var toolbarMediaTitle =
|
|
30
|
+
var toolbarMediaTitle = _media.toolbarMediaMessages.toolbarMediaTitle;
|
|
31
31
|
return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarButton, {
|
|
32
32
|
buttonId: _uiMenu.TOOLBAR_BUTTON.MEDIA,
|
|
33
33
|
onClick: onClickMediaButton(mediaState),
|
|
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { injectIntl } from 'react-intl-next';
|
|
4
4
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
|
+
import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
6
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
6
7
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
7
8
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
@@ -10,7 +11,6 @@ import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
|
10
11
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
11
12
|
import { stateKey as mediaStateKey } from '../pm-plugins/plugin-key';
|
|
12
13
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
13
|
-
import { messages } from './messages';
|
|
14
14
|
const isMediaGroupSelectedFromProps = props => {
|
|
15
15
|
/**
|
|
16
16
|
* ED-19831
|
|
@@ -7,13 +7,13 @@ import { injectIntl } from 'react-intl-next';
|
|
|
7
7
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
8
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { escape, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
10
|
+
import { altTextMessages as messages } from '@atlaskit/editor-common/media';
|
|
10
11
|
import { FloatingToolbarButton as Button, ErrorMessage, PanelTextInput, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
11
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
12
13
|
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
13
14
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
14
15
|
import { N200, N30, N80, R400 } from '@atlaskit/theme/colors';
|
|
15
16
|
import { closeMediaAltTextMenu, closeMediaAltTextMenuAndSave } from '../commands';
|
|
16
|
-
import { messages } from '../messages';
|
|
17
17
|
export const CONTAINER_WIDTH_IN_PX = RECENT_SEARCH_WIDTH_IN_PX;
|
|
18
18
|
export const MAX_ALT_TEXT_LENGTH = 510; // double tweet length
|
|
19
19
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { bindKeymapWithCommand, decreaseMediaSize, enter, increaseMediaSize, insertNewLine, moveDown, moveLeft, moveRight, tab, undo } from '@atlaskit/editor-common/keymaps';
|
|
2
|
+
import { mediaResizeAnnouncerMessMessages as mediaResizeAnnouncerMess } from '@atlaskit/editor-common/media';
|
|
2
3
|
import { calcMediaSingleMaxWidth, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
3
4
|
import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
4
5
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
@@ -9,7 +10,6 @@ import { insertAndSelectCaptionFromMediaSinglePos, selectCaptionFromMediaSingleP
|
|
|
9
10
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
10
11
|
import { updateMediaSingleWidth } from '../toolbar/commands';
|
|
11
12
|
import { calcNewLayout, getSelectedMediaSingle } from '../toolbar/utils';
|
|
12
|
-
import { mediaResizeAnnouncerMess } from './mediaResizeAnnouncerMess';
|
|
13
13
|
export function keymapPlugin(options, editorAnalyticsAPI, editorSelectionAPI, widthPlugin, getIntl) {
|
|
14
14
|
const list = {};
|
|
15
15
|
bindKeymapWithCommand(undo.common, ignoreLinksInSteps, list);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { addAltText, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
3
|
+
import { altTextMessages as messages } from '@atlaskit/editor-common/media';
|
|
3
4
|
import { MediaSharedClassNames as ClassNames } from '@atlaskit/editor-common/styles';
|
|
4
5
|
import { openMediaAltTextMenu } from '../pm-plugins/alt-text/commands';
|
|
5
|
-
import { messages } from '../pm-plugins/alt-text/messages';
|
|
6
6
|
import AltTextEdit, { CONTAINER_WIDTH_IN_PX } from '../pm-plugins/alt-text/ui/AltTextEdit';
|
|
7
7
|
import { getMediaSingleOrInlineNodeFromSelection } from '../utils/media-common';
|
|
8
8
|
import { getNodeType } from './commands';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { captionMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
6
|
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
6
7
|
import { N200 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { messages } from './messages';
|
|
8
8
|
const placeholder = css`
|
|
9
9
|
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
10
10
|
width: 100%;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { BorderIcon } from '@atlaskit/editor-common/icons';
|
|
5
|
+
import { imageBorderMessages as messages } from '@atlaskit/editor-common/media';
|
|
5
6
|
import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
7
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
7
8
|
import { borderColorPalette, borderPaletteTooltipMessages, ColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
@@ -9,7 +10,6 @@ import { ArrowKeyNavigationType, DropdownMenu, ToolbarButton } from '@atlaskit/e
|
|
|
9
10
|
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
10
11
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
11
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
|
-
import { messages } from './messages';
|
|
13
13
|
import { buttonStyle, buttonWrapperStyle, contextualMenuArrow, contextualMenuColorIcon, contextualSubMenu, itemSpacing, line, menuItemDimensions, toolbarButtonWrapper } from './styles';
|
|
14
14
|
const ImageBorder = ({
|
|
15
15
|
intl: {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { injectIntl } from 'react-intl-next';
|
|
4
4
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
5
|
+
import { dropPlaceholderMessages } from '@atlaskit/editor-common/media';
|
|
5
6
|
import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
|
|
6
7
|
import { B200, B300, B400 } from '@atlaskit/theme/colors';
|
|
7
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
9
|
import { FILE_WIDTH, MEDIA_HEIGHT } from '../../nodeviews/mediaNodeView/media';
|
|
9
|
-
import { dropPlaceholderMessages } from './drop-placeholder-messages';
|
|
10
10
|
const iconWrapper = css`
|
|
11
11
|
color: ${`var(--ds-icon-accent-blue, ${hexToRgba(B400, 0.4) || B400})`};
|
|
12
12
|
background: ${`var(--ds-background-accent-blue-subtle, ${hexToRgba(B300, 0.6) || B300})`};
|
|
@@ -4,6 +4,7 @@ import React, { Fragment } from 'react';
|
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
|
|
7
|
+
import { mediaLinkToolbarMessages } from '@atlaskit/editor-common/media';
|
|
7
8
|
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
8
9
|
import { ErrorMessage } from '@atlaskit/editor-common/ui';
|
|
9
10
|
// Common Translations will live here
|
|
@@ -13,7 +14,6 @@ import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
|
13
14
|
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
14
15
|
import EditorUnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
15
16
|
import { R400 } from '@atlaskit/theme/colors';
|
|
16
|
-
import { mediaLinkToolbarMessages } from './media-linking-toolbar-messages';
|
|
17
17
|
const validationWrapper = css`
|
|
18
18
|
line-height: 0;
|
|
19
19
|
padding: ${"var(--ds-space-150, 12px)"} ${"var(--ds-space-300, 24px)"}
|
|
@@ -3,11 +3,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import Button from '@atlaskit/button';
|
|
6
|
+
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
6
7
|
import Form, { Field } from '@atlaskit/form';
|
|
7
8
|
import Textfield from '@atlaskit/textfield';
|
|
8
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
10
|
import { PIXELENTRY_MIGRATION_BUTTON_TESTID } from './constants';
|
|
10
|
-
import { messages } from './messages';
|
|
11
11
|
import { pixelEntryForm, pixelEntryHiddenSubmit, pixelSizingFullWidthLabelStyles, pixelSizingHeightInput, pixelSizingInput, pixelSizingLabel, pixelSizingWidthInput, pixelSizingWrapper } from './styles';
|
|
12
12
|
export const PixelEntry = ({
|
|
13
13
|
width,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { toolbarMediaMessages } from '@atlaskit/editor-common/media';
|
|
4
5
|
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
5
6
|
import AttachmentIcon from '@atlaskit/icon/glyph/editor/attachment';
|
|
6
|
-
import { toolbarMediaMessages } from './toolbar-media-messages';
|
|
7
7
|
const onClickMediaButton = pluginState => () => {
|
|
8
8
|
pluginState.showMediaPicker();
|
|
9
9
|
return true;
|
|
@@ -14,6 +14,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { injectIntl } from 'react-intl-next';
|
|
16
16
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
17
|
+
import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
|
|
17
18
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
18
19
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
19
20
|
import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
@@ -22,7 +23,6 @@ import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
|
22
23
|
import { Filmstrip } from '@atlaskit/media-filmstrip';
|
|
23
24
|
import { stateKey as mediaStateKey } from '../pm-plugins/plugin-key';
|
|
24
25
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
25
|
-
import { messages } from './messages';
|
|
26
26
|
var isMediaGroupSelectedFromProps = function isMediaGroupSelectedFromProps(props) {
|
|
27
27
|
/**
|
|
28
28
|
* ED-19831
|
|
@@ -17,13 +17,13 @@ import { injectIntl } from 'react-intl-next';
|
|
|
17
17
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
18
18
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
19
19
|
import { escape, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
20
|
+
import { altTextMessages as messages } from '@atlaskit/editor-common/media';
|
|
20
21
|
import { FloatingToolbarButton as Button, ErrorMessage, PanelTextInput, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
21
22
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
22
23
|
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
23
24
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
24
25
|
import { N200, N30, N80, R400 } from '@atlaskit/theme/colors';
|
|
25
26
|
import { closeMediaAltTextMenu, closeMediaAltTextMenuAndSave } from '../commands';
|
|
26
|
-
import { messages } from '../messages';
|
|
27
27
|
export var CONTAINER_WIDTH_IN_PX = RECENT_SEARCH_WIDTH_IN_PX;
|
|
28
28
|
export var MAX_ALT_TEXT_LENGTH = 510; // double tweet length
|
|
29
29
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { bindKeymapWithCommand, decreaseMediaSize, enter, increaseMediaSize, insertNewLine, moveDown, moveLeft, moveRight, tab, undo } from '@atlaskit/editor-common/keymaps';
|
|
2
|
+
import { mediaResizeAnnouncerMessMessages as mediaResizeAnnouncerMess } from '@atlaskit/editor-common/media';
|
|
2
3
|
import { calcMediaSingleMaxWidth, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
3
4
|
import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
4
5
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
@@ -9,7 +10,6 @@ import { insertAndSelectCaptionFromMediaSinglePos, selectCaptionFromMediaSingleP
|
|
|
9
10
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
10
11
|
import { updateMediaSingleWidth } from '../toolbar/commands';
|
|
11
12
|
import { calcNewLayout, getSelectedMediaSingle } from '../toolbar/utils';
|
|
12
|
-
import { mediaResizeAnnouncerMess } from './mediaResizeAnnouncerMess';
|
|
13
13
|
export function keymapPlugin(options, editorAnalyticsAPI, editorSelectionAPI, widthPlugin, getIntl) {
|
|
14
14
|
var list = {};
|
|
15
15
|
bindKeymapWithCommand(undo.common, ignoreLinksInSteps, list);
|
|
@@ -3,9 +3,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { addAltText, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
6
|
+
import { altTextMessages as messages } from '@atlaskit/editor-common/media';
|
|
6
7
|
import { MediaSharedClassNames as ClassNames } from '@atlaskit/editor-common/styles';
|
|
7
8
|
import { openMediaAltTextMenu } from '../pm-plugins/alt-text/commands';
|
|
8
|
-
import { messages } from '../pm-plugins/alt-text/messages';
|
|
9
9
|
import AltTextEdit, { CONTAINER_WIDTH_IN_PX } from '../pm-plugins/alt-text/ui/AltTextEdit';
|
|
10
10
|
import { getMediaSingleOrInlineNodeFromSelection } from '../utils/media-common';
|
|
11
11
|
import { getNodeType } from './commands';
|