@atlaskit/editor-plugin-floating-toolbar 0.9.2 → 0.9.3
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 +6 -0
- package/dist/cjs/ui/CheckboxModal.js +5 -5
- package/dist/cjs/ui/DropdownMenu.js +2 -2
- package/dist/cjs/ui/ScrollButtons.js +5 -5
- package/dist/cjs/ui/SimpleModal.js +4 -4
- package/dist/cjs/ui/Toolbar.js +2 -3
- package/dist/es2019/ui/CheckboxModal.js +1 -1
- package/dist/es2019/ui/DropdownMenu.js +1 -1
- package/dist/es2019/ui/ScrollButtons.js +1 -2
- package/dist/es2019/ui/SimpleModal.js +1 -1
- package/dist/es2019/ui/Toolbar.js +1 -1
- package/dist/esm/ui/CheckboxModal.js +1 -1
- package/dist/esm/ui/DropdownMenu.js +1 -1
- package/dist/esm/ui/ScrollButtons.js +1 -2
- package/dist/esm/ui/SimpleModal.js +1 -1
- package/dist/esm/ui/Toolbar.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/ui/messages.js +0 -54
- package/dist/es2019/ui/messages.js +0 -48
- package/dist/esm/ui/messages.js +0 -48
- package/dist/types/ui/messages.d.ts +0 -48
- package/dist/types-ts4.5/ui/messages.d.ts +0 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.9.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572) [`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) - Upgrading @atlaskit/editor-prosemirror dependency
|
|
8
|
+
|
|
3
9
|
## 0.9.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -11,8 +11,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
13
13
|
var _checkbox = require("@atlaskit/checkbox");
|
|
14
|
+
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
14
15
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
15
|
-
var _messages = _interopRequireDefault(require("./messages"));
|
|
16
16
|
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); }
|
|
17
17
|
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; }
|
|
18
18
|
var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
@@ -26,9 +26,9 @@ var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
|
26
26
|
options = props.options,
|
|
27
27
|
formatMessage = props.intl.formatMessage,
|
|
28
28
|
testId = props.testId;
|
|
29
|
-
var heading = (options === null || options === void 0 ? void 0 : options.title) || formatMessage(
|
|
30
|
-
var okButtonLabel = (options === null || options === void 0 ? void 0 : options.okButtonLabel) || formatMessage(
|
|
31
|
-
var cancelButtonLabel = (options === null || options === void 0 ? void 0 : options.cancelButtonLabel) || formatMessage(
|
|
29
|
+
var heading = (options === null || options === void 0 ? void 0 : options.title) || formatMessage(_floatingToolbar.messages.confirmModalDefaultHeading);
|
|
30
|
+
var okButtonLabel = (options === null || options === void 0 ? void 0 : options.okButtonLabel) || formatMessage(_floatingToolbar.messages.confirmModalOK);
|
|
31
|
+
var cancelButtonLabel = (options === null || options === void 0 ? void 0 : options.cancelButtonLabel) || formatMessage(_floatingToolbar.messages.confirmModalCancel);
|
|
32
32
|
var checkboxlabel = options === null || options === void 0 ? void 0 : options.checkboxLabel;
|
|
33
33
|
var childrenInfo = options === null || options === void 0 || (_options$getChildrenI = options.getChildrenInfo) === null || _options$getChildrenI === void 0 ? void 0 : _options$getChildrenI.call(options);
|
|
34
34
|
var ListComponent = function ListComponent(_ref) {
|
|
@@ -48,7 +48,7 @@ var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
|
|
|
48
48
|
amount = props.amount;
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
50
50
|
id: id
|
|
51
|
-
}, formatMessage(
|
|
51
|
+
}, formatMessage(_floatingToolbar.messages.confirmModalListUnit, {
|
|
52
52
|
name: name,
|
|
53
53
|
amount: amount
|
|
54
54
|
}));
|
|
@@ -15,12 +15,12 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
15
15
|
var _react = require("react");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _reactIntlNext = require("react-intl-next");
|
|
18
|
+
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
18
19
|
var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
|
|
19
20
|
var _menu = require("@atlaskit/menu");
|
|
20
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
22
|
var _constants = require("@atlaskit/theme/constants");
|
|
22
23
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
23
|
-
var _messages = _interopRequireDefault(require("./messages"));
|
|
24
24
|
var _templateObject, _templateObject2, _templateObject3;
|
|
25
25
|
/** @jsx jsx */
|
|
26
26
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
@@ -203,7 +203,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
203
203
|
return (0, _react2.jsx)(_done.default, {
|
|
204
204
|
primaryColor: "var(--ds-icon-selected, ".concat(_colors.B400, ")"),
|
|
205
205
|
size: "small",
|
|
206
|
-
label: intl.formatMessage(
|
|
206
|
+
label: intl.formatMessage(_floatingToolbar.messages.confirmModalOK)
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
return (0, _react2.jsx)("span", {
|
|
@@ -11,11 +11,11 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
14
|
+
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
14
15
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
16
|
var _chevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-left-large"));
|
|
16
17
|
var _chevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right-large"));
|
|
17
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
18
|
-
var _messages = _interopRequireDefault(require("./messages"));
|
|
19
19
|
var _templateObject;
|
|
20
20
|
/** @jsx jsx */
|
|
21
21
|
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); }
|
|
@@ -137,16 +137,16 @@ var ScrollButtons = exports.ScrollButtons = function ScrollButtons(_ref) {
|
|
|
137
137
|
css: toolbarScrollButtons,
|
|
138
138
|
className: "scroll-buttons"
|
|
139
139
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
140
|
-
title: intl.formatMessage(
|
|
140
|
+
title: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollLeft),
|
|
141
141
|
icon: (0, _react2.jsx)(LeftIcon, {
|
|
142
|
-
label: intl.formatMessage(
|
|
142
|
+
label: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollLeft)
|
|
143
143
|
}),
|
|
144
144
|
onClick: scrollLeft,
|
|
145
145
|
disabled: !canScrollLeft || disabled
|
|
146
146
|
}), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
147
|
-
title: intl.formatMessage(
|
|
147
|
+
title: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollRight),
|
|
148
148
|
icon: (0, _react2.jsx)(RightIcon, {
|
|
149
|
-
label: intl.formatMessage(
|
|
149
|
+
label: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollRight)
|
|
150
150
|
}),
|
|
151
151
|
onClick: scrollRight,
|
|
152
152
|
disabled: !canScrollRight || disabled
|
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.SimpleModal = void 0;
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
11
|
+
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
11
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
12
|
-
var _messages = _interopRequireDefault(require("./messages"));
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
15
|
var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
@@ -18,9 +18,9 @@ var SimpleModal = exports.SimpleModal = function SimpleModal(props) {
|
|
|
18
18
|
options = props.options,
|
|
19
19
|
formatMessage = props.intl.formatMessage,
|
|
20
20
|
testId = props.testId;
|
|
21
|
-
var heading = (options === null || options === void 0 ? void 0 : options.title) || formatMessage(
|
|
22
|
-
var okButtonLabel = (options === null || options === void 0 ? void 0 : options.okButtonLabel) || formatMessage(
|
|
23
|
-
var cancelButtonLabel = (options === null || options === void 0 ? void 0 : options.cancelButtonLabel) || formatMessage(
|
|
21
|
+
var heading = (options === null || options === void 0 ? void 0 : options.title) || formatMessage(_floatingToolbar.messages.confirmModalDefaultHeading);
|
|
22
|
+
var okButtonLabel = (options === null || options === void 0 ? void 0 : options.okButtonLabel) || formatMessage(_floatingToolbar.messages.confirmModalOK);
|
|
23
|
+
var cancelButtonLabel = (options === null || options === void 0 ? void 0 : options.cancelButtonLabel) || formatMessage(_floatingToolbar.messages.confirmModalCancel);
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
25
25
|
onClose: onClose,
|
|
26
26
|
testId: testId
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -31,7 +31,6 @@ var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
|
31
31
|
var _EmojiPickerButton = require("./EmojiPickerButton");
|
|
32
32
|
var _ExtensionsPlaceholder = require("./ExtensionsPlaceholder");
|
|
33
33
|
var _Input = _interopRequireDefault(require("./Input"));
|
|
34
|
-
var _messages = _interopRequireDefault(require("./messages"));
|
|
35
34
|
var _ScrollButtons = require("./ScrollButtons");
|
|
36
35
|
var _Select = _interopRequireDefault(require("./Select"));
|
|
37
36
|
var _Separator = _interopRequireDefault(require("./Separator"));
|
|
@@ -395,12 +394,12 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
395
394
|
css: function css() {
|
|
396
395
|
return [toolbarContainer(scrollable, hasSelect !== undefined, firstElementIsSelect)];
|
|
397
396
|
},
|
|
398
|
-
"aria-label": intl.formatMessage(
|
|
397
|
+
"aria-label": intl.formatMessage(_floatingToolbar.messages.floatingToolbarAriaLabel),
|
|
399
398
|
role: "toolbar",
|
|
400
399
|
"data-testid": "editor-floating-toolbar",
|
|
401
400
|
className: className
|
|
402
401
|
}, (0, _react2.jsx)(_ui.Announcer, {
|
|
403
|
-
text: mediaAssistiveMessage ? "".concat(mediaAssistiveMessage, ", ").concat(intl.formatMessage(
|
|
402
|
+
text: mediaAssistiveMessage ? "".concat(mediaAssistiveMessage, ", ").concat(intl.formatMessage(_floatingToolbar.messages.floatingToolbarAnnouncer)) : intl.formatMessage(_floatingToolbar.messages.floatingToolbarAnnouncer),
|
|
404
403
|
delay: 250
|
|
405
404
|
}), (0, _react2.jsx)("div", {
|
|
406
405
|
"data-testid": "floating-toolbar-items",
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import Button from '@atlaskit/button/standard-button';
|
|
4
4
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
5
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
5
6
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
6
|
-
import messages from './messages';
|
|
7
7
|
export const CheckboxModal = props => {
|
|
8
8
|
var _options$getChildrenI;
|
|
9
9
|
const [isChecked, setCheckbox] = useState(false);
|
|
@@ -5,13 +5,13 @@ import { css, jsx } from '@emotion/react';
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
6
6
|
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
8
9
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
9
10
|
import { ButtonItem } from '@atlaskit/menu';
|
|
10
11
|
import { B400 } from '@atlaskit/theme/colors';
|
|
11
12
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
12
13
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
13
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
|
-
import messages from './messages';
|
|
15
15
|
export const menuItemDimensions = {
|
|
16
16
|
width: 175,
|
|
17
17
|
height: 32
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import rafSchedule from 'raf-schd';
|
|
5
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
5
6
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
6
7
|
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
7
8
|
import ChevronRightLargeIcon from '@atlaskit/icon/glyph/chevron-right-large';
|
|
8
9
|
import { N30 } from '@atlaskit/theme/colors';
|
|
9
|
-
import messages from './messages';
|
|
10
|
-
|
|
11
10
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
12
11
|
const toolbarScrollButtons = css`
|
|
13
12
|
display: grid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
3
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
4
|
-
import messages from './messages';
|
|
5
5
|
export const SimpleModal = props => {
|
|
6
6
|
const {
|
|
7
7
|
onConfirm,
|
|
@@ -6,6 +6,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
8
8
|
import { areSameItems } from '@atlaskit/editor-common/floating-toolbar';
|
|
9
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
9
10
|
import { Announcer, FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
10
11
|
import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
11
12
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -18,7 +19,6 @@ import Dropdown from './Dropdown';
|
|
|
18
19
|
import { EmojiPickerButton } from './EmojiPickerButton';
|
|
19
20
|
import { ExtensionsPlaceholder } from './ExtensionsPlaceholder';
|
|
20
21
|
import Input from './Input';
|
|
21
|
-
import messages from './messages';
|
|
22
22
|
import { ScrollButtons } from './ScrollButtons';
|
|
23
23
|
import Select from './Select';
|
|
24
24
|
import Separator from './Separator';
|
|
@@ -3,8 +3,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import Button from '@atlaskit/button/standard-button';
|
|
5
5
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
6
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
6
7
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
7
|
-
import messages from './messages';
|
|
8
8
|
export var CheckboxModal = function CheckboxModal(props) {
|
|
9
9
|
var _options$getChildrenI;
|
|
10
10
|
var _useState = useState(false),
|
|
@@ -15,13 +15,13 @@ import { css, jsx } from '@emotion/react';
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
16
16
|
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
18
19
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
19
20
|
import { ButtonItem } from '@atlaskit/menu';
|
|
20
21
|
import { B400 } from '@atlaskit/theme/colors';
|
|
21
22
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
22
23
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
23
24
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
|
-
import messages from './messages';
|
|
25
25
|
export var menuItemDimensions = {
|
|
26
26
|
width: 175,
|
|
27
27
|
height: 32
|
|
@@ -5,12 +5,11 @@ var _templateObject;
|
|
|
5
5
|
import React, { useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import rafSchedule from 'raf-schd';
|
|
8
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
8
9
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
9
10
|
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
10
11
|
import ChevronRightLargeIcon from '@atlaskit/icon/glyph/chevron-right-large';
|
|
11
12
|
import { N30 } from '@atlaskit/theme/colors';
|
|
12
|
-
import messages from './messages';
|
|
13
|
-
|
|
14
13
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
15
14
|
var toolbarScrollButtons = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: ", ";\n padding: ", " ", ";\n border-left: solid ", " 1px;\n flex-shrink: 0;\n align-items: center;\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-border, ".concat(N30, ")"));
|
|
16
15
|
var LeftIcon = ChevronLeftLargeIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
3
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
4
|
-
import messages from './messages';
|
|
5
5
|
export var SimpleModal = function SimpleModal(props) {
|
|
6
6
|
var onConfirm = props.onConfirm,
|
|
7
7
|
onClose = props.onClose,
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -16,6 +16,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
16
16
|
import { injectIntl } from 'react-intl-next';
|
|
17
17
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
18
18
|
import { areSameItems } from '@atlaskit/editor-common/floating-toolbar';
|
|
19
|
+
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
19
20
|
import { Announcer, FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
20
21
|
import { backgroundPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
21
22
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -28,7 +29,6 @@ import Dropdown from './Dropdown';
|
|
|
28
29
|
import { EmojiPickerButton } from './EmojiPickerButton';
|
|
29
30
|
import { ExtensionsPlaceholder } from './ExtensionsPlaceholder';
|
|
30
31
|
import Input from './Input';
|
|
31
|
-
import messages from './messages';
|
|
32
32
|
import { ScrollButtons } from './ScrollButtons';
|
|
33
33
|
import Select from './Select';
|
|
34
34
|
import Separator from './Separator';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
29
29
|
"@atlaskit/button": "^17.3.0",
|
|
30
30
|
"@atlaskit/checkbox": "^13.0.0",
|
|
31
|
-
"@atlaskit/editor-common": "^77.
|
|
31
|
+
"@atlaskit/editor-common": "^77.3.0",
|
|
32
32
|
"@atlaskit/editor-palette": "1.5.2",
|
|
33
33
|
"@atlaskit/editor-plugin-context-panel": "^0.2.0",
|
|
34
34
|
"@atlaskit/editor-plugin-copy-button": "^1.0.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-extension": "^0.7.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-table": "^7.2.0",
|
|
41
|
-
"@atlaskit/editor-prosemirror": "
|
|
41
|
+
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
42
42
|
"@atlaskit/emoji": "^67.6.0",
|
|
43
43
|
"@atlaskit/icon": "^22.0.0",
|
|
44
44
|
"@atlaskit/menu": "^2.1.0",
|
package/dist/cjs/ui/messages.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _reactIntlNext = require("react-intl-next");
|
|
8
|
-
var _default = exports.default = (0, _reactIntlNext.defineMessages)({
|
|
9
|
-
confirmModalDefaultHeading: {
|
|
10
|
-
id: 'fabric.editor.floatingToolbar.confirmModalHeading',
|
|
11
|
-
defaultMessage: 'Are you sure?',
|
|
12
|
-
description: 'Default heading of floating toolbar confirmation modal.'
|
|
13
|
-
},
|
|
14
|
-
confirmModalOK: {
|
|
15
|
-
id: 'fabric.editor.floatingToolbar.confirmModalOK',
|
|
16
|
-
defaultMessage: 'OK',
|
|
17
|
-
description: 'OK button for floating toolbar confirmation modal.'
|
|
18
|
-
},
|
|
19
|
-
confirmModalCancel: {
|
|
20
|
-
id: 'fabric.editor.floatingToolbar.confirmModalCancel',
|
|
21
|
-
defaultMessage: 'Cancel',
|
|
22
|
-
description: 'Cancel button for floating toolbar confirmation modal.'
|
|
23
|
-
},
|
|
24
|
-
confirmModalListUnit: {
|
|
25
|
-
id: 'fabric.editor.floatingToolbar.confirmModalConnectedUnit',
|
|
26
|
-
defaultMessage: '{name}{amount, plural, =0 {} one { (+1 connected element)} other { (+# connected elements)}}',
|
|
27
|
-
description: 'Text displayed in confirmation modal which highlights the nodes and the amount of connected nodes that will be deleted'
|
|
28
|
-
},
|
|
29
|
-
confirmDeleteLinkedModalMessage: {
|
|
30
|
-
id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
|
|
31
|
-
defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
|
|
32
|
-
description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
|
|
33
|
-
},
|
|
34
|
-
floatingToolbarAriaLabel: {
|
|
35
|
-
id: 'fabric.editor.floatingToolbar.floatingToolbarAriaLabel',
|
|
36
|
-
defaultMessage: 'Floating Toolbar',
|
|
37
|
-
description: "a floating toolbar's aria label"
|
|
38
|
-
},
|
|
39
|
-
floatingToolbarAnnouncer: {
|
|
40
|
-
id: 'fabric.editor.floatingToolbar.floatingToolbarAnnouncer',
|
|
41
|
-
defaultMessage: 'Floating toolbar controls have been opened',
|
|
42
|
-
description: 'message that will be announced to screenreaders that the floating toolbar is opened'
|
|
43
|
-
},
|
|
44
|
-
floatingToolbarScrollLeft: {
|
|
45
|
-
id: 'fabric.editor.floatingToolbar.scrollLeft',
|
|
46
|
-
defaultMessage: 'Scroll left',
|
|
47
|
-
description: 'Button to scroll left when the toolbar is in the overflow state'
|
|
48
|
-
},
|
|
49
|
-
floatingToolbarScrollRight: {
|
|
50
|
-
id: 'fabric.editor.floatingToolbar.scrollRight',
|
|
51
|
-
defaultMessage: 'Scroll right',
|
|
52
|
-
description: 'Button to scroll right when the toolbar is in the overflow state'
|
|
53
|
-
}
|
|
54
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from 'react-intl-next';
|
|
2
|
-
export default defineMessages({
|
|
3
|
-
confirmModalDefaultHeading: {
|
|
4
|
-
id: 'fabric.editor.floatingToolbar.confirmModalHeading',
|
|
5
|
-
defaultMessage: 'Are you sure?',
|
|
6
|
-
description: 'Default heading of floating toolbar confirmation modal.'
|
|
7
|
-
},
|
|
8
|
-
confirmModalOK: {
|
|
9
|
-
id: 'fabric.editor.floatingToolbar.confirmModalOK',
|
|
10
|
-
defaultMessage: 'OK',
|
|
11
|
-
description: 'OK button for floating toolbar confirmation modal.'
|
|
12
|
-
},
|
|
13
|
-
confirmModalCancel: {
|
|
14
|
-
id: 'fabric.editor.floatingToolbar.confirmModalCancel',
|
|
15
|
-
defaultMessage: 'Cancel',
|
|
16
|
-
description: 'Cancel button for floating toolbar confirmation modal.'
|
|
17
|
-
},
|
|
18
|
-
confirmModalListUnit: {
|
|
19
|
-
id: 'fabric.editor.floatingToolbar.confirmModalConnectedUnit',
|
|
20
|
-
defaultMessage: '{name}{amount, plural, =0 {} one { (+1 connected element)} other { (+# connected elements)}}',
|
|
21
|
-
description: 'Text displayed in confirmation modal which highlights the nodes and the amount of connected nodes that will be deleted'
|
|
22
|
-
},
|
|
23
|
-
confirmDeleteLinkedModalMessage: {
|
|
24
|
-
id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
|
|
25
|
-
defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
|
|
26
|
-
description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
|
|
27
|
-
},
|
|
28
|
-
floatingToolbarAriaLabel: {
|
|
29
|
-
id: 'fabric.editor.floatingToolbar.floatingToolbarAriaLabel',
|
|
30
|
-
defaultMessage: 'Floating Toolbar',
|
|
31
|
-
description: "a floating toolbar's aria label"
|
|
32
|
-
},
|
|
33
|
-
floatingToolbarAnnouncer: {
|
|
34
|
-
id: 'fabric.editor.floatingToolbar.floatingToolbarAnnouncer',
|
|
35
|
-
defaultMessage: 'Floating toolbar controls have been opened',
|
|
36
|
-
description: 'message that will be announced to screenreaders that the floating toolbar is opened'
|
|
37
|
-
},
|
|
38
|
-
floatingToolbarScrollLeft: {
|
|
39
|
-
id: 'fabric.editor.floatingToolbar.scrollLeft',
|
|
40
|
-
defaultMessage: 'Scroll left',
|
|
41
|
-
description: 'Button to scroll left when the toolbar is in the overflow state'
|
|
42
|
-
},
|
|
43
|
-
floatingToolbarScrollRight: {
|
|
44
|
-
id: 'fabric.editor.floatingToolbar.scrollRight',
|
|
45
|
-
defaultMessage: 'Scroll right',
|
|
46
|
-
description: 'Button to scroll right when the toolbar is in the overflow state'
|
|
47
|
-
}
|
|
48
|
-
});
|
package/dist/esm/ui/messages.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from 'react-intl-next';
|
|
2
|
-
export default defineMessages({
|
|
3
|
-
confirmModalDefaultHeading: {
|
|
4
|
-
id: 'fabric.editor.floatingToolbar.confirmModalHeading',
|
|
5
|
-
defaultMessage: 'Are you sure?',
|
|
6
|
-
description: 'Default heading of floating toolbar confirmation modal.'
|
|
7
|
-
},
|
|
8
|
-
confirmModalOK: {
|
|
9
|
-
id: 'fabric.editor.floatingToolbar.confirmModalOK',
|
|
10
|
-
defaultMessage: 'OK',
|
|
11
|
-
description: 'OK button for floating toolbar confirmation modal.'
|
|
12
|
-
},
|
|
13
|
-
confirmModalCancel: {
|
|
14
|
-
id: 'fabric.editor.floatingToolbar.confirmModalCancel',
|
|
15
|
-
defaultMessage: 'Cancel',
|
|
16
|
-
description: 'Cancel button for floating toolbar confirmation modal.'
|
|
17
|
-
},
|
|
18
|
-
confirmModalListUnit: {
|
|
19
|
-
id: 'fabric.editor.floatingToolbar.confirmModalConnectedUnit',
|
|
20
|
-
defaultMessage: '{name}{amount, plural, =0 {} one { (+1 connected element)} other { (+# connected elements)}}',
|
|
21
|
-
description: 'Text displayed in confirmation modal which highlights the nodes and the amount of connected nodes that will be deleted'
|
|
22
|
-
},
|
|
23
|
-
confirmDeleteLinkedModalMessage: {
|
|
24
|
-
id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
|
|
25
|
-
defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
|
|
26
|
-
description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
|
|
27
|
-
},
|
|
28
|
-
floatingToolbarAriaLabel: {
|
|
29
|
-
id: 'fabric.editor.floatingToolbar.floatingToolbarAriaLabel',
|
|
30
|
-
defaultMessage: 'Floating Toolbar',
|
|
31
|
-
description: "a floating toolbar's aria label"
|
|
32
|
-
},
|
|
33
|
-
floatingToolbarAnnouncer: {
|
|
34
|
-
id: 'fabric.editor.floatingToolbar.floatingToolbarAnnouncer',
|
|
35
|
-
defaultMessage: 'Floating toolbar controls have been opened',
|
|
36
|
-
description: 'message that will be announced to screenreaders that the floating toolbar is opened'
|
|
37
|
-
},
|
|
38
|
-
floatingToolbarScrollLeft: {
|
|
39
|
-
id: 'fabric.editor.floatingToolbar.scrollLeft',
|
|
40
|
-
defaultMessage: 'Scroll left',
|
|
41
|
-
description: 'Button to scroll left when the toolbar is in the overflow state'
|
|
42
|
-
},
|
|
43
|
-
floatingToolbarScrollRight: {
|
|
44
|
-
id: 'fabric.editor.floatingToolbar.scrollRight',
|
|
45
|
-
defaultMessage: 'Scroll right',
|
|
46
|
-
description: 'Button to scroll right when the toolbar is in the overflow state'
|
|
47
|
-
}
|
|
48
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
confirmModalDefaultHeading: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
confirmModalOK: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
confirmModalCancel: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
confirmModalListUnit: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
confirmDeleteLinkedModalMessage: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
floatingToolbarAriaLabel: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
floatingToolbarAnnouncer: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
floatingToolbarScrollLeft: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
floatingToolbarScrollRight: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export default _default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
confirmModalDefaultHeading: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
confirmModalOK: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
confirmModalCancel: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
confirmModalListUnit: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
confirmDeleteLinkedModalMessage: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
floatingToolbarAriaLabel: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
floatingToolbarAnnouncer: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
floatingToolbarScrollLeft: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
floatingToolbarScrollRight: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export default _default;
|