@atlaskit/editor-plugin-text-color 0.2.1 → 0.2.2
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/ui/ToolbarTextColor/index.js +3 -9
- package/dist/es2019/ui/ToolbarTextColor/index.js +2 -8
- package/dist/esm/ui/ToolbarTextColor/index.js +2 -8
- package/dist/types/ui/ToolbarTextColor/index.d.ts +0 -7
- package/dist/types-ts4.5/ui/ToolbarTextColor/index.d.ts +0 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
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.2.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.default = exports.ToolbarTextColor = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -16,6 +16,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _reactIntlNext = require("react-intl-next");
|
|
18
18
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
19
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
20
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
20
21
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
21
22
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
@@ -31,13 +32,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
31
32
|
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; } } /** @jsx jsx */
|
|
32
33
|
var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
|
|
33
34
|
var EXPERIMENT_GROUP_CONTROL = 'control';
|
|
34
|
-
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
35
|
-
textColor: {
|
|
36
|
-
id: 'fabric.editor.textColor',
|
|
37
|
-
defaultMessage: 'Text color',
|
|
38
|
-
description: ''
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
35
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
42
36
|
var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
43
37
|
(0, _inherits2.default)(ToolbarTextColor, _React$Component);
|
|
@@ -154,7 +148,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
154
148
|
formatMessage = _this$props.intl.formatMessage,
|
|
155
149
|
disabled = _this$props.disabled,
|
|
156
150
|
pluginInjectionApi = _this$props.pluginInjectionApi;
|
|
157
|
-
var labelTextColor = formatMessage(
|
|
151
|
+
var labelTextColor = formatMessage(_messages.textColorMessages.textColor);
|
|
158
152
|
var palette = pluginState.palette;
|
|
159
153
|
var fitWidth;
|
|
160
154
|
if (document.body.clientWidth <= 740) {
|
|
@@ -2,8 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
8
|
import { expandIconWrapperStyle, separatorStyles, triggerWrapperStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
8
9
|
import { ColorPalette, getSelectedRowAndColumnFromPalette, textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
9
10
|
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -15,13 +16,6 @@ import { EditorTextColorIcon } from './icon';
|
|
|
15
16
|
import { backgroundDisabled, textColorIconBar, textColorIconWrapper } from './styles';
|
|
16
17
|
const EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
|
|
17
18
|
const EXPERIMENT_GROUP_CONTROL = 'control';
|
|
18
|
-
export const messages = defineMessages({
|
|
19
|
-
textColor: {
|
|
20
|
-
id: 'fabric.editor.textColor',
|
|
21
|
-
defaultMessage: 'Text color',
|
|
22
|
-
description: ''
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
19
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
26
20
|
export class ToolbarTextColor extends React.Component {
|
|
27
21
|
constructor(...args) {
|
|
@@ -12,8 +12,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { jsx } from '@emotion/react';
|
|
15
|
-
import {
|
|
15
|
+
import { injectIntl } from 'react-intl-next';
|
|
16
16
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
17
|
+
import { textColorMessages as messages } from '@atlaskit/editor-common/messages';
|
|
17
18
|
import { expandIconWrapperStyle, separatorStyles, triggerWrapperStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
18
19
|
import { ColorPalette, getSelectedRowAndColumnFromPalette, textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
19
20
|
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -25,13 +26,6 @@ import { EditorTextColorIcon } from './icon';
|
|
|
25
26
|
import { backgroundDisabled, textColorIconBar, textColorIconWrapper } from './styles';
|
|
26
27
|
var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
|
|
27
28
|
var EXPERIMENT_GROUP_CONTROL = 'control';
|
|
28
|
-
export var messages = defineMessages({
|
|
29
|
-
textColor: {
|
|
30
|
-
id: 'fabric.editor.textColor',
|
|
31
|
-
defaultMessage: 'Text color',
|
|
32
|
-
description: ''
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
29
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
36
30
|
export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
37
31
|
_inherits(ToolbarTextColor, _React$Component);
|
|
@@ -7,13 +7,6 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { TextColorPluginState } from '../../pm-plugins/main';
|
|
9
9
|
import type { TextColorPlugin } from '../../types';
|
|
10
|
-
export declare const messages: {
|
|
11
|
-
textColor: {
|
|
12
|
-
id: string;
|
|
13
|
-
defaultMessage: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
10
|
export interface State {
|
|
18
11
|
isOpen: boolean;
|
|
19
12
|
isOpenedByKeyboard: boolean;
|
|
@@ -7,13 +7,6 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { TextColorPluginState } from '../../pm-plugins/main';
|
|
9
9
|
import type { TextColorPlugin } from '../../types';
|
|
10
|
-
export declare const messages: {
|
|
11
|
-
textColor: {
|
|
12
|
-
id: string;
|
|
13
|
-
defaultMessage: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
10
|
export interface State {
|
|
18
11
|
isOpen: boolean;
|
|
19
12
|
isOpenedByKeyboard: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^35.5.1",
|
|
37
|
-
"@atlaskit/editor-common": "^77.
|
|
37
|
+
"@atlaskit/editor-common": "^77.3.0",
|
|
38
38
|
"@atlaskit/editor-palette": "1.5.2",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "1.1.0",
|