@atlaskit/editor-plugin-text-color 0.1.7 → 0.1.8

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 0.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
8
+
3
9
  ## 0.1.7
4
10
 
5
11
  ### Patch Changes
@@ -13,6 +13,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
13
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireDefault(require("react"));
16
+ var _react2 = require("@emotion/react");
16
17
  var _reactIntlNext = require("react-intl-next");
17
18
  var _analytics = require("@atlaskit/editor-common/analytics");
18
19
  var _styles = require("@atlaskit/editor-common/styles");
@@ -27,7 +28,7 @@ var _styles2 = require("./styles");
27
28
  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; }
28
29
  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; }
29
30
  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); }; }
30
- 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; } }
31
+ 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 */
31
32
  var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
32
33
  var EXPERIMENT_GROUP_CONTROL = 'control';
33
34
  var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
@@ -175,11 +176,10 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
175
176
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
176
177
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
177
178
  return (
178
- /*#__PURE__*/
179
179
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
180
- _react.default.createElement("span", {
180
+ (0, _react2.jsx)("span", {
181
181
  css: _styles.wrapperStyle
182
- }, /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownContainer, {
182
+ }, (0, _react2.jsx)(_uiMenu.DropdownContainer, {
183
183
  mountTo: popupsMountPoint,
184
184
  boundariesElement: popupsBoundariesElement,
185
185
  scrollableElement: popupsScrollableElement,
@@ -197,7 +197,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
197
197
  isOpenedByKeyboard: isOpenedByKeyboard,
198
198
  isPopupPositioned: true
199
199
  },
200
- trigger: /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarButton, {
200
+ trigger: (0, _react2.jsx)(_uiMenu.ToolbarButton, {
201
201
  buttonId: _uiMenu.TOOLBAR_BUTTON.TEXT_COLOR,
202
202
  spacing: isReducedSpacing ? 'none' : 'default',
203
203
  disabled: disabled || pluginState.disabled,
@@ -210,28 +210,27 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
210
210
  onKeyDown: this.onKeyDown,
211
211
  ref: this.toolbarItemRef,
212
212
  iconBefore:
213
- /*#__PURE__*/
214
213
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
215
- _react.default.createElement("div", {
214
+ (0, _react2.jsx)("div", {
216
215
  css: _styles.triggerWrapperStyles
217
- }, /*#__PURE__*/_react.default.createElement("div", {
216
+ }, (0, _react2.jsx)("div", {
218
217
  css: _styles2.textColorIconWrapper
219
- }, /*#__PURE__*/_react.default.createElement(_icon.EditorTextColorIcon, null), /*#__PURE__*/_react.default.createElement("div", {
218
+ }, (0, _react2.jsx)(_icon.EditorTextColorIcon, null), (0, _react2.jsx)("div", {
220
219
  css: [
221
220
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
222
221
  _styles2.textColorIconBar, selectedColor ? // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
223
222
  "background: ".concat(selectedColor, ";") :
224
223
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
225
224
  pluginState.disabled && _styles2.backgroundDisabled]
226
- })), /*#__PURE__*/_react.default.createElement("span", {
225
+ })), (0, _react2.jsx)("span", {
227
226
  css: _styles.expandIconWrapperStyle
228
- }, /*#__PURE__*/_react.default.createElement(_chevronDown.default, {
227
+ }, (0, _react2.jsx)(_chevronDown.default, {
229
228
  label: ""
230
229
  })))
231
230
  })
232
- }, /*#__PURE__*/_react.default.createElement("div", {
231
+ }, (0, _react2.jsx)("div", {
233
232
  "data-testid": "text-color-palette"
234
- }, /*#__PURE__*/_react.default.createElement(_uiColor.ColorPalette, {
233
+ }, (0, _react2.jsx)(_uiColor.ColorPalette, {
235
234
  onClick: function onClick(color) {
236
235
  var _pluginInjectionApi$a;
237
236
  return _this2.changeTextColor(color, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions, pluginState.disabled);
@@ -242,7 +241,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
242
241
  hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
243
242
  paletteColorTooltipMessages: _uiColor.textPaletteTooltipMessages
244
243
  }
245
- }))), /*#__PURE__*/_react.default.createElement("span", {
244
+ }))), (0, _react2.jsx)("span", {
246
245
  css: _styles.separatorStyles
247
246
  }))
248
247
  );
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import { defineMessages, injectIntl } from 'react-intl-next';
4
6
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
5
7
  import { expandIconWrapperStyle, separatorStyles, triggerWrapperStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
@@ -155,11 +157,10 @@ export class ToolbarTextColor extends React.Component {
155
157
  selectedColumnIndex
156
158
  } = getSelectedRowAndColumnFromPalette(palette, pluginState.color);
157
159
  return (
158
- /*#__PURE__*/
159
160
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
160
- React.createElement("span", {
161
+ jsx("span", {
161
162
  css: wrapperStyle
162
- }, /*#__PURE__*/React.createElement(Dropdown, {
163
+ }, jsx(Dropdown, {
163
164
  mountTo: popupsMountPoint,
164
165
  boundariesElement: popupsBoundariesElement,
165
166
  scrollableElement: popupsScrollableElement,
@@ -177,7 +178,7 @@ export class ToolbarTextColor extends React.Component {
177
178
  isOpenedByKeyboard,
178
179
  isPopupPositioned: true
179
180
  },
180
- trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
181
+ trigger: jsx(ToolbarButton, {
181
182
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
182
183
  spacing: isReducedSpacing ? 'none' : 'default',
183
184
  disabled: disabled || pluginState.disabled,
@@ -190,13 +191,12 @@ export class ToolbarTextColor extends React.Component {
190
191
  onKeyDown: this.onKeyDown,
191
192
  ref: this.toolbarItemRef,
192
193
  iconBefore:
193
- /*#__PURE__*/
194
194
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
195
- React.createElement("div", {
195
+ jsx("div", {
196
196
  css: triggerWrapperStyles
197
- }, /*#__PURE__*/React.createElement("div", {
197
+ }, jsx("div", {
198
198
  css: textColorIconWrapper
199
- }, /*#__PURE__*/React.createElement(EditorTextColorIcon, null), /*#__PURE__*/React.createElement("div", {
199
+ }, jsx(EditorTextColorIcon, null), jsx("div", {
200
200
  css: [
201
201
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
202
202
  textColorIconBar, selectedColor ?
@@ -204,15 +204,15 @@ export class ToolbarTextColor extends React.Component {
204
204
  `background: ${selectedColor};` :
205
205
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
206
206
  pluginState.disabled && backgroundDisabled]
207
- })), /*#__PURE__*/React.createElement("span", {
207
+ })), jsx("span", {
208
208
  css: expandIconWrapperStyle
209
- }, /*#__PURE__*/React.createElement(ExpandIcon, {
209
+ }, jsx(ExpandIcon, {
210
210
  label: ""
211
211
  })))
212
212
  })
213
- }, /*#__PURE__*/React.createElement("div", {
213
+ }, jsx("div", {
214
214
  "data-testid": "text-color-palette"
215
- }, /*#__PURE__*/React.createElement(ColorPalette, {
215
+ }, jsx(ColorPalette, {
216
216
  onClick: color => {
217
217
  var _pluginInjectionApi$a;
218
218
  return this.changeTextColor(color, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions, pluginState.disabled);
@@ -223,7 +223,7 @@ export class ToolbarTextColor extends React.Component {
223
223
  hexToPaletteColor: hexToEditorTextPaletteColor,
224
224
  paletteColorTooltipMessages: textPaletteTooltipMessages
225
225
  }
226
- }))), /*#__PURE__*/React.createElement("span", {
226
+ }))), jsx("span", {
227
227
  css: separatorStyles
228
228
  }))
229
229
  );
@@ -9,7 +9,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
9
9
  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; }
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
11
  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; } }
12
+ /** @jsx jsx */
12
13
  import React from 'react';
14
+ import { jsx } from '@emotion/react';
13
15
  import { defineMessages, injectIntl } from 'react-intl-next';
14
16
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
15
17
  import { expandIconWrapperStyle, separatorStyles, triggerWrapperStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
@@ -168,11 +170,10 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
168
170
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
169
171
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
170
172
  return (
171
- /*#__PURE__*/
172
173
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
173
- React.createElement("span", {
174
+ jsx("span", {
174
175
  css: wrapperStyle
175
- }, /*#__PURE__*/React.createElement(Dropdown, {
176
+ }, jsx(Dropdown, {
176
177
  mountTo: popupsMountPoint,
177
178
  boundariesElement: popupsBoundariesElement,
178
179
  scrollableElement: popupsScrollableElement,
@@ -190,7 +191,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
190
191
  isOpenedByKeyboard: isOpenedByKeyboard,
191
192
  isPopupPositioned: true
192
193
  },
193
- trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
194
+ trigger: jsx(ToolbarButton, {
194
195
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
195
196
  spacing: isReducedSpacing ? 'none' : 'default',
196
197
  disabled: disabled || pluginState.disabled,
@@ -203,28 +204,27 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
203
204
  onKeyDown: this.onKeyDown,
204
205
  ref: this.toolbarItemRef,
205
206
  iconBefore:
206
- /*#__PURE__*/
207
207
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
208
- React.createElement("div", {
208
+ jsx("div", {
209
209
  css: triggerWrapperStyles
210
- }, /*#__PURE__*/React.createElement("div", {
210
+ }, jsx("div", {
211
211
  css: textColorIconWrapper
212
- }, /*#__PURE__*/React.createElement(EditorTextColorIcon, null), /*#__PURE__*/React.createElement("div", {
212
+ }, jsx(EditorTextColorIcon, null), jsx("div", {
213
213
  css: [
214
214
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
215
215
  textColorIconBar, selectedColor ? // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
216
216
  "background: ".concat(selectedColor, ";") :
217
217
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
218
218
  pluginState.disabled && backgroundDisabled]
219
- })), /*#__PURE__*/React.createElement("span", {
219
+ })), jsx("span", {
220
220
  css: expandIconWrapperStyle
221
- }, /*#__PURE__*/React.createElement(ExpandIcon, {
221
+ }, jsx(ExpandIcon, {
222
222
  label: ""
223
223
  })))
224
224
  })
225
- }, /*#__PURE__*/React.createElement("div", {
225
+ }, jsx("div", {
226
226
  "data-testid": "text-color-palette"
227
- }, /*#__PURE__*/React.createElement(ColorPalette, {
227
+ }, jsx(ColorPalette, {
228
228
  onClick: function onClick(color) {
229
229
  var _pluginInjectionApi$a;
230
230
  return _this2.changeTextColor(color, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions, pluginState.disabled);
@@ -235,7 +235,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
235
235
  hexToPaletteColor: hexToEditorTextPaletteColor,
236
236
  paletteColorTooltipMessages: textPaletteTooltipMessages
237
237
  }
238
- }))), /*#__PURE__*/React.createElement("span", {
238
+ }))), jsx("span", {
239
239
  css: separatorStyles
240
240
  }))
241
241
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^35.0.0",
35
- "@atlaskit/editor-common": "^76.24.0",
35
+ "@atlaskit/editor-common": "^76.25.0",
36
36
  "@atlaskit/editor-palette": "1.5.2",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.3.0",
38
38
  "@atlaskit/editor-prosemirror": "1.1.0",