@atlaskit/editor-plugin-text-color 2.1.7 → 2.1.9
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 +15 -0
- package/dist/cjs/ui/ToolbarTextColor/index.js +1 -31
- package/dist/es2019/ui/ToolbarTextColor/index.js +0 -32
- package/dist/esm/ui/ToolbarTextColor/index.js +1 -31
- package/dist/types/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/ToolbarTextColor/index.d.ts +0 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 2.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139173](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139173)
|
|
8
|
+
[`fafd1374cc3a4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fafd1374cc3a4) -
|
|
9
|
+
[ED-27448] Remove experiment tracking for allowMoreTextColors experiment
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.1.8
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 2.1.7
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -38,8 +38,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
38
38
|
* @jsxRuntime classic
|
|
39
39
|
* @jsx jsx
|
|
40
40
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
41
|
-
var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
|
|
42
|
-
var EXPERIMENT_GROUP_CONTROL = 'control';
|
|
43
41
|
var addMarginToWrapper = (0, _react2.css)({
|
|
44
42
|
marginRight: "var(--ds-space-050, 4px)"
|
|
45
43
|
});
|
|
@@ -64,15 +62,6 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
64
62
|
(0, _defineProperty2.default)(_this, "changeTextColor", function (color, editorAnalyticsApi, disabled) {
|
|
65
63
|
if (!disabled) {
|
|
66
64
|
var _this$props$editorVie;
|
|
67
|
-
var palette = _this.props.pluginState.palette;
|
|
68
|
-
|
|
69
|
-
// we store color names in analytics
|
|
70
|
-
var swatch = palette.find(function (sw) {
|
|
71
|
-
return sw.value === color;
|
|
72
|
-
});
|
|
73
|
-
_this.dispatchAnalyticsEvent(_this.buildAnalyticsSelectColor({
|
|
74
|
-
color: (swatch ? swatch.label : color).toLowerCase()
|
|
75
|
-
}));
|
|
76
65
|
_this.handleOpenChange({
|
|
77
66
|
isOpen: false,
|
|
78
67
|
logCloseEvent: false
|
|
@@ -269,14 +258,6 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
269
258
|
(0, _editorPalette.hexToEditorTextPaletteColor)(pluginState.color) : pluginState.color : null;
|
|
270
259
|
return selectedColor;
|
|
271
260
|
}
|
|
272
|
-
}, {
|
|
273
|
-
key: "getCommonAnalyticsAttributes",
|
|
274
|
-
value: function getCommonAnalyticsAttributes() {
|
|
275
|
-
return {
|
|
276
|
-
experiment: EXPERIMENT_NAME,
|
|
277
|
-
experimentGroup: EXPERIMENT_GROUP_CONTROL
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
261
|
}, {
|
|
281
262
|
key: "buildAnalyticsPalette",
|
|
282
263
|
value: function buildAnalyticsPalette(action, data) {
|
|
@@ -285,18 +266,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
|
|
|
285
266
|
actionSubject: _analytics.ACTION_SUBJECT.TOOLBAR,
|
|
286
267
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
287
268
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
288
|
-
attributes: _objectSpread(
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
}, {
|
|
292
|
-
key: "buildAnalyticsSelectColor",
|
|
293
|
-
value: function buildAnalyticsSelectColor(data) {
|
|
294
|
-
return {
|
|
295
|
-
action: _analytics.ACTION.FORMATTED,
|
|
296
|
-
actionSubject: _analytics.ACTION_SUBJECT.TEXT,
|
|
297
|
-
actionSubjectId: _analytics.ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
298
|
-
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
299
|
-
attributes: _objectSpread(_objectSpread({}, this.getCommonAnalyticsAttributes()), data)
|
|
269
|
+
attributes: _objectSpread({}, data)
|
|
300
270
|
};
|
|
301
271
|
}
|
|
302
272
|
}, {
|
|
@@ -24,8 +24,6 @@ import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/comman
|
|
|
24
24
|
import { getInputMethod } from '../../pm-plugins/utils/inputType';
|
|
25
25
|
import { ToolbarType } from '../../types';
|
|
26
26
|
import { EditorTextColorIcon } from './icon';
|
|
27
|
-
const EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
|
|
28
|
-
const EXPERIMENT_GROUP_CONTROL = 'control';
|
|
29
27
|
const addMarginToWrapper = css({
|
|
30
28
|
marginRight: "var(--ds-space-050, 4px)"
|
|
31
29
|
});
|
|
@@ -43,17 +41,6 @@ export class ToolbarTextColor extends React.Component {
|
|
|
43
41
|
_defineProperty(this, "changeTextColor", (color, editorAnalyticsApi, disabled) => {
|
|
44
42
|
if (!disabled) {
|
|
45
43
|
var _this$props$editorVie;
|
|
46
|
-
const {
|
|
47
|
-
pluginState: {
|
|
48
|
-
palette
|
|
49
|
-
}
|
|
50
|
-
} = this.props;
|
|
51
|
-
|
|
52
|
-
// we store color names in analytics
|
|
53
|
-
const swatch = palette.find(sw => sw.value === color);
|
|
54
|
-
this.dispatchAnalyticsEvent(this.buildAnalyticsSelectColor({
|
|
55
|
-
color: (swatch ? swatch.label : color).toLowerCase()
|
|
56
|
-
}));
|
|
57
44
|
this.handleOpenChange({
|
|
58
45
|
isOpen: false,
|
|
59
46
|
logCloseEvent: false
|
|
@@ -249,12 +236,6 @@ export class ToolbarTextColor extends React.Component {
|
|
|
249
236
|
hexToEditorTextPaletteColor(pluginState.color) : pluginState.color : null;
|
|
250
237
|
return selectedColor;
|
|
251
238
|
}
|
|
252
|
-
getCommonAnalyticsAttributes() {
|
|
253
|
-
return {
|
|
254
|
-
experiment: EXPERIMENT_NAME,
|
|
255
|
-
experimentGroup: EXPERIMENT_GROUP_CONTROL
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
239
|
buildAnalyticsPalette(action, data) {
|
|
259
240
|
return {
|
|
260
241
|
action,
|
|
@@ -262,19 +243,6 @@ export class ToolbarTextColor extends React.Component {
|
|
|
262
243
|
actionSubjectId: ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
263
244
|
eventType: EVENT_TYPE.TRACK,
|
|
264
245
|
attributes: {
|
|
265
|
-
...this.getCommonAnalyticsAttributes(),
|
|
266
|
-
...data
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
buildAnalyticsSelectColor(data) {
|
|
271
|
-
return {
|
|
272
|
-
action: ACTION.FORMATTED,
|
|
273
|
-
actionSubject: ACTION_SUBJECT.TEXT,
|
|
274
|
-
actionSubjectId: ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
275
|
-
eventType: EVENT_TYPE.TRACK,
|
|
276
|
-
attributes: {
|
|
277
|
-
...this.getCommonAnalyticsAttributes(),
|
|
278
246
|
...data
|
|
279
247
|
}
|
|
280
248
|
};
|
|
@@ -34,8 +34,6 @@ import { changeColor as changeColorWithAnalytics } from '../../pm-plugins/comman
|
|
|
34
34
|
import { getInputMethod } from '../../pm-plugins/utils/inputType';
|
|
35
35
|
import { ToolbarType } from '../../types';
|
|
36
36
|
import { EditorTextColorIcon } from './icon';
|
|
37
|
-
var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
|
|
38
|
-
var EXPERIMENT_GROUP_CONTROL = 'control';
|
|
39
37
|
var addMarginToWrapper = css({
|
|
40
38
|
marginRight: "var(--ds-space-050, 4px)"
|
|
41
39
|
});
|
|
@@ -60,15 +58,6 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
60
58
|
_defineProperty(_this, "changeTextColor", function (color, editorAnalyticsApi, disabled) {
|
|
61
59
|
if (!disabled) {
|
|
62
60
|
var _this$props$editorVie;
|
|
63
|
-
var palette = _this.props.pluginState.palette;
|
|
64
|
-
|
|
65
|
-
// we store color names in analytics
|
|
66
|
-
var swatch = palette.find(function (sw) {
|
|
67
|
-
return sw.value === color;
|
|
68
|
-
});
|
|
69
|
-
_this.dispatchAnalyticsEvent(_this.buildAnalyticsSelectColor({
|
|
70
|
-
color: (swatch ? swatch.label : color).toLowerCase()
|
|
71
|
-
}));
|
|
72
61
|
_this.handleOpenChange({
|
|
73
62
|
isOpen: false,
|
|
74
63
|
logCloseEvent: false
|
|
@@ -265,14 +254,6 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
265
254
|
hexToEditorTextPaletteColor(pluginState.color) : pluginState.color : null;
|
|
266
255
|
return selectedColor;
|
|
267
256
|
}
|
|
268
|
-
}, {
|
|
269
|
-
key: "getCommonAnalyticsAttributes",
|
|
270
|
-
value: function getCommonAnalyticsAttributes() {
|
|
271
|
-
return {
|
|
272
|
-
experiment: EXPERIMENT_NAME,
|
|
273
|
-
experimentGroup: EXPERIMENT_GROUP_CONTROL
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
257
|
}, {
|
|
277
258
|
key: "buildAnalyticsPalette",
|
|
278
259
|
value: function buildAnalyticsPalette(action, data) {
|
|
@@ -281,18 +262,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
|
|
|
281
262
|
actionSubject: ACTION_SUBJECT.TOOLBAR,
|
|
282
263
|
actionSubjectId: ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
283
264
|
eventType: EVENT_TYPE.TRACK,
|
|
284
|
-
attributes: _objectSpread(
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
}, {
|
|
288
|
-
key: "buildAnalyticsSelectColor",
|
|
289
|
-
value: function buildAnalyticsSelectColor(data) {
|
|
290
|
-
return {
|
|
291
|
-
action: ACTION.FORMATTED,
|
|
292
|
-
actionSubject: ACTION_SUBJECT.TEXT,
|
|
293
|
-
actionSubjectId: ACTION_SUBJECT_ID.FORMAT_COLOR,
|
|
294
|
-
eventType: EVENT_TYPE.TRACK,
|
|
295
|
-
attributes: _objectSpread(_objectSpread({}, this.getCommonAnalyticsAttributes()), data)
|
|
265
|
+
attributes: _objectSpread({}, data)
|
|
296
266
|
};
|
|
297
267
|
}
|
|
298
268
|
}, {
|
|
@@ -39,9 +39,7 @@ export declare class ToolbarTextColor extends React.Component<Props & WrappedCom
|
|
|
39
39
|
private hide;
|
|
40
40
|
private hideonEsc;
|
|
41
41
|
private getSelectedColor;
|
|
42
|
-
private getCommonAnalyticsAttributes;
|
|
43
42
|
private buildAnalyticsPalette;
|
|
44
|
-
private buildAnalyticsSelectColor;
|
|
45
43
|
private dispatchAnalyticsEvent;
|
|
46
44
|
}
|
|
47
45
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
@@ -39,9 +39,7 @@ export declare class ToolbarTextColor extends React.Component<Props & WrappedCom
|
|
|
39
39
|
private hide;
|
|
40
40
|
private hideonEsc;
|
|
41
41
|
private getSelectedColor;
|
|
42
|
-
private getCommonAnalyticsAttributes;
|
|
43
42
|
private buildAnalyticsPalette;
|
|
44
|
-
private buildAnalyticsSelectColor;
|
|
45
43
|
private dispatchAnalyticsEvent;
|
|
46
44
|
}
|
|
47
45
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^103.3.0",
|
|
38
38
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.1.0",
|
|
41
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
|
41
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.3.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
45
|
-
"@atlaskit/icon": "^25.
|
|
45
|
+
"@atlaskit/icon": "^25.5.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/theme": "^18.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
49
|
-
"@atlaskit/tokens": "^4.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
49
|
+
"@atlaskit/tokens": "^4.7.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|
|
52
52
|
},
|