@atlaskit/editor-core 187.28.3 → 187.28.5

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-core
2
2
 
3
+ ## 187.28.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5ce0bea6aa6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5ce0bea6aa6) - [ED-19399] Fixing text color underline on toolbar
8
+
3
9
  ## 187.28.3
4
10
 
5
11
  ### Patch Changes
@@ -181,7 +181,7 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
181
181
  // Not sure where the extra 2px comes from
182
182
  fitWidth = 242;
183
183
  }
184
- var selectedColor = pluginState.color !== pluginState.defaultColor && pluginState.color;
184
+ var selectedColor = this.getSelectedColor(pluginState);
185
185
  var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(palette, pluginState.color),
186
186
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
187
187
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
@@ -246,6 +246,12 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
246
246
  css: _styles2.separatorStyles
247
247
  }));
248
248
  }
249
+ }, {
250
+ key: "getSelectedColor",
251
+ value: function getSelectedColor(pluginState) {
252
+ var selectedColor = pluginState.color !== pluginState.defaultColor && (pluginState.color ? (0, _editorPalette.hexToEditorTextPaletteColor)(pluginState.color) : pluginState.color);
253
+ return selectedColor;
254
+ }
249
255
  }, {
250
256
  key: "getCommonAnalyticsAttributes",
251
257
  value: function getCommonAnalyticsAttributes() {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.28.3";
9
+ var version = "187.28.5";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -159,7 +159,7 @@ export class ToolbarTextColor extends React.Component {
159
159
  // Not sure where the extra 2px comes from
160
160
  fitWidth = 242;
161
161
  }
162
- const selectedColor = pluginState.color !== pluginState.defaultColor && pluginState.color;
162
+ const selectedColor = this.getSelectedColor(pluginState);
163
163
  const {
164
164
  selectedRowIndex,
165
165
  selectedColumnIndex
@@ -223,6 +223,10 @@ export class ToolbarTextColor extends React.Component {
223
223
  css: separatorStyles
224
224
  }));
225
225
  }
226
+ getSelectedColor(pluginState) {
227
+ const selectedColor = pluginState.color !== pluginState.defaultColor && (pluginState.color ? hexToEditorTextPaletteColor(pluginState.color) : pluginState.color);
228
+ return selectedColor;
229
+ }
226
230
  getCommonAnalyticsAttributes() {
227
231
  return {
228
232
  experiment: EXPERIMENT_NAME,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.28.3";
2
+ export const version = "187.28.5";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -171,7 +171,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
171
171
  // Not sure where the extra 2px comes from
172
172
  fitWidth = 242;
173
173
  }
174
- var selectedColor = pluginState.color !== pluginState.defaultColor && pluginState.color;
174
+ var selectedColor = this.getSelectedColor(pluginState);
175
175
  var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(palette, pluginState.color),
176
176
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
177
177
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
@@ -236,6 +236,12 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
236
236
  css: separatorStyles
237
237
  }));
238
238
  }
239
+ }, {
240
+ key: "getSelectedColor",
241
+ value: function getSelectedColor(pluginState) {
242
+ var selectedColor = pluginState.color !== pluginState.defaultColor && (pluginState.color ? hexToEditorTextPaletteColor(pluginState.color) : pluginState.color);
243
+ return selectedColor;
244
+ }
239
245
  }, {
240
246
  key: "getCommonAnalyticsAttributes",
241
247
  value: function getCommonAnalyticsAttributes() {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.28.3";
2
+ export var version = "187.28.5";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -40,6 +40,7 @@ export declare class ToolbarTextColor extends React.Component<Props & WrappedCom
40
40
  private handleOpenChange;
41
41
  private hide;
42
42
  private hideonEsc;
43
+ private getSelectedColor;
43
44
  private getCommonAnalyticsAttributes;
44
45
  private buildAnalyticsPalette;
45
46
  private buildAnalyticsSelectColor;
@@ -40,6 +40,7 @@ export declare class ToolbarTextColor extends React.Component<Props & WrappedCom
40
40
  private handleOpenChange;
41
41
  private hide;
42
42
  private hideonEsc;
43
+ private getSelectedColor;
43
44
  private getCommonAnalyticsAttributes;
44
45
  private buildAnalyticsPalette;
45
46
  private buildAnalyticsSelectColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.28.3",
3
+ "version": "187.28.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"