@atlaskit/editor-plugin-panel 14.1.27 → 14.2.1
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 +20 -0
- package/dist/cjs/ui/toolbar.js +6 -2
- package/dist/es2019/ui/toolbar.js +7 -3
- package/dist/esm/ui/toolbar.js +7 -3
- package/package.json +20 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 14.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7a9ec6f1fa018`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7a9ec6f1fa018) -
|
|
8
|
+
[EDITOR-7592] Add a new panel background color palette with expanded colors behind the lovability
|
|
9
|
+
experiment and patch gate.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 14.2.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [`51c33ef5349b6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51c33ef5349b6) -
|
|
17
|
+
Enable compatibility with React 19.2.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 14.1.27
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/cjs/ui/toolbar.js
CHANGED
|
@@ -26,6 +26,7 @@ var _statusDiscovery = _interopRequireDefault(require("@atlaskit/icon/core/statu
|
|
|
26
26
|
var _statusInformation = _interopRequireDefault(require("@atlaskit/icon/core/status-information"));
|
|
27
27
|
var _statusSuccess = _interopRequireDefault(require("@atlaskit/icon/core/status-success"));
|
|
28
28
|
var _statusWarning = _interopRequireDefault(require("@atlaskit/icon/core/status-warning"));
|
|
29
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
30
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
31
|
var _actions = require("../editor-actions/actions");
|
|
31
32
|
var _utils2 = require("../pm-plugins/utils/utils");
|
|
@@ -199,7 +200,9 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
|
|
|
199
200
|
};
|
|
200
201
|
};
|
|
201
202
|
var panelColor = activePanelType === _adfSchema.PanelType.CUSTOM ? activePanelColor || (0, _panel.getPanelTypeBackgroundNoTokens)(_adfSchema.PanelType.INFO) : (0, _panel.getPanelTypeBackgroundNoTokens)(activePanelType);
|
|
202
|
-
var
|
|
203
|
+
var isNewPanelPaletteEnabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_lovability_text_bg_color_patch_2');
|
|
204
|
+
var colorPalette = isNewPanelPaletteEnabled ? _uiColor.panelBackgroundPaletteNew : _uiColor.panelBackgroundPalette;
|
|
205
|
+
var defaultPalette = colorPalette.find(function (item) {
|
|
203
206
|
return item.value === panelColor;
|
|
204
207
|
}) || {
|
|
205
208
|
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
@@ -215,7 +218,8 @@ var getToolbarItems = exports.getToolbarItems = function getToolbarItems(formatM
|
|
|
215
218
|
type: 'select',
|
|
216
219
|
selectType: 'color',
|
|
217
220
|
defaultValue: defaultPalette,
|
|
218
|
-
options:
|
|
221
|
+
options: colorPalette,
|
|
222
|
+
cols: isNewPanelPaletteEnabled ? 10 : undefined,
|
|
219
223
|
onChange: function onChange(option) {
|
|
220
224
|
return changeColor(option.value);
|
|
221
225
|
}
|
|
@@ -5,7 +5,7 @@ import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
|
5
5
|
import commonMessages, { panelMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
|
|
7
7
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
8
|
-
import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
|
|
8
|
+
import { DEFAULT_BORDER_COLOR, panelBackgroundPalette, panelBackgroundPaletteNew } from '@atlaskit/editor-common/ui-color';
|
|
9
9
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
@@ -16,6 +16,7 @@ import StatusDiscoveryIcon from '@atlaskit/icon/core/status-discovery';
|
|
|
16
16
|
import InformationIcon from '@atlaskit/icon/core/status-information';
|
|
17
17
|
import SuccessIcon from '@atlaskit/icon/core/status-success';
|
|
18
18
|
import WarningIcon from '@atlaskit/icon/core/status-warning';
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { changePanelType, removePanel } from '../editor-actions/actions';
|
|
21
22
|
import { findPanel } from '../pm-plugins/utils/utils';
|
|
@@ -189,7 +190,9 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
|
|
|
189
190
|
return false;
|
|
190
191
|
};
|
|
191
192
|
const panelColor = activePanelType === PanelType.CUSTOM ? activePanelColor || getPanelTypeBackgroundNoTokens(PanelType.INFO) : getPanelTypeBackgroundNoTokens(activePanelType);
|
|
192
|
-
const
|
|
193
|
+
const isNewPanelPaletteEnabled = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_2');
|
|
194
|
+
const colorPalette = isNewPanelPaletteEnabled ? panelBackgroundPaletteNew : panelBackgroundPalette;
|
|
195
|
+
const defaultPalette = colorPalette.find(item => item.value === panelColor) || {
|
|
193
196
|
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
194
197
|
label: 'Custom',
|
|
195
198
|
value: panelColor,
|
|
@@ -203,7 +206,8 @@ export const getToolbarItems = (formatMessage, panelNodeType, isCustomPanelEnabl
|
|
|
203
206
|
type: 'select',
|
|
204
207
|
selectType: 'color',
|
|
205
208
|
defaultValue: defaultPalette,
|
|
206
|
-
options:
|
|
209
|
+
options: colorPalette,
|
|
210
|
+
cols: isNewPanelPaletteEnabled ? 10 : undefined,
|
|
207
211
|
onChange: option => changeColor(option.value)
|
|
208
212
|
};
|
|
209
213
|
const emojiPicker = {
|
package/dist/esm/ui/toolbar.js
CHANGED
|
@@ -9,7 +9,7 @@ import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
|
9
9
|
import commonMessages, { panelMessages as messages } from '@atlaskit/editor-common/messages';
|
|
10
10
|
import { getPanelTypeBackgroundNoTokens } from '@atlaskit/editor-common/panel';
|
|
11
11
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
12
|
-
import { DEFAULT_BORDER_COLOR, panelBackgroundPalette } from '@atlaskit/editor-common/ui-color';
|
|
12
|
+
import { DEFAULT_BORDER_COLOR, panelBackgroundPalette, panelBackgroundPaletteNew } from '@atlaskit/editor-common/ui-color';
|
|
13
13
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
14
14
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
@@ -20,6 +20,7 @@ import StatusDiscoveryIcon from '@atlaskit/icon/core/status-discovery';
|
|
|
20
20
|
import InformationIcon from '@atlaskit/icon/core/status-information';
|
|
21
21
|
import SuccessIcon from '@atlaskit/icon/core/status-success';
|
|
22
22
|
import WarningIcon from '@atlaskit/icon/core/status-warning';
|
|
23
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
24
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
25
|
import { changePanelType, removePanel } from '../editor-actions/actions';
|
|
25
26
|
import { findPanel } from '../pm-plugins/utils/utils';
|
|
@@ -190,7 +191,9 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
190
191
|
};
|
|
191
192
|
};
|
|
192
193
|
var panelColor = activePanelType === PanelType.CUSTOM ? activePanelColor || getPanelTypeBackgroundNoTokens(PanelType.INFO) : getPanelTypeBackgroundNoTokens(activePanelType);
|
|
193
|
-
var
|
|
194
|
+
var isNewPanelPaletteEnabled = expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && fg('platform_editor_lovability_text_bg_color_patch_2');
|
|
195
|
+
var colorPalette = isNewPanelPaletteEnabled ? panelBackgroundPaletteNew : panelBackgroundPalette;
|
|
196
|
+
var defaultPalette = colorPalette.find(function (item) {
|
|
194
197
|
return item.value === panelColor;
|
|
195
198
|
}) || {
|
|
196
199
|
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
|
|
@@ -206,7 +209,8 @@ export var getToolbarItems = function getToolbarItems(formatMessage, panelNodeTy
|
|
|
206
209
|
type: 'select',
|
|
207
210
|
selectType: 'color',
|
|
208
211
|
defaultValue: defaultPalette,
|
|
209
|
-
options:
|
|
212
|
+
options: colorPalette,
|
|
213
|
+
cols: isNewPanelPaletteEnabled ? 10 : undefined,
|
|
210
214
|
onChange: function onChange(option) {
|
|
211
215
|
return changeColor(option.value);
|
|
212
216
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
-
"version": "14.1
|
|
3
|
+
"version": "14.2.1",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,29 +19,29 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"atlaskit:src": "src/index.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@atlaskit/adf-schema": "^56.
|
|
23
|
-
"@atlaskit/editor-palette": "^3.
|
|
24
|
-
"@atlaskit/editor-plugin-analytics": "^12.
|
|
25
|
-
"@atlaskit/editor-plugin-block-menu": "^11.
|
|
26
|
-
"@atlaskit/editor-plugin-decorations": "^12.
|
|
27
|
-
"@atlaskit/editor-plugin-emoji": "^13.
|
|
28
|
-
"@atlaskit/editor-plugin-selection": "^12.
|
|
29
|
-
"@atlaskit/editor-plugin-toolbar": "^9.
|
|
22
|
+
"@atlaskit/adf-schema": "^56.3.0",
|
|
23
|
+
"@atlaskit/editor-palette": "^3.3.0",
|
|
24
|
+
"@atlaskit/editor-plugin-analytics": "^12.1.0",
|
|
25
|
+
"@atlaskit/editor-plugin-block-menu": "^11.2.0",
|
|
26
|
+
"@atlaskit/editor-plugin-decorations": "^12.1.0",
|
|
27
|
+
"@atlaskit/editor-plugin-emoji": "^13.3.0",
|
|
28
|
+
"@atlaskit/editor-plugin-selection": "^12.1.0",
|
|
29
|
+
"@atlaskit/editor-plugin-toolbar": "^9.1.0",
|
|
30
30
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
31
31
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
32
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
33
|
-
"@atlaskit/emoji": "^71.
|
|
32
|
+
"@atlaskit/editor-toolbar": "^2.4.0",
|
|
33
|
+
"@atlaskit/emoji": "^71.15.0",
|
|
34
34
|
"@atlaskit/icon": "^37.2.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
36
|
-
"@atlaskit/tmp-editor-statsig": "^135.
|
|
36
|
+
"@atlaskit/tmp-editor-statsig": "^135.10.0",
|
|
37
37
|
"@atlaskit/tokens": "^16.3.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"uuid": "^3.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^116.
|
|
43
|
-
"react": "^18.2.0",
|
|
44
|
-
"react-dom": "^18.2.0",
|
|
42
|
+
"@atlaskit/editor-common": "^116.47.0",
|
|
43
|
+
"react": "^18.2.0 || ^19.2.0",
|
|
44
|
+
"react-dom": "^18.2.0 || ^19.2.0",
|
|
45
45
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"techstack": {
|
|
@@ -90,6 +90,9 @@
|
|
|
90
90
|
"platform_editor_adf_with_localid": {
|
|
91
91
|
"type": "boolean"
|
|
92
92
|
},
|
|
93
|
+
"platform_editor_lovability_text_bg_color_patch_2": {
|
|
94
|
+
"type": "boolean"
|
|
95
|
+
},
|
|
93
96
|
"platform_editor_block_menu_v2_patch_3": {
|
|
94
97
|
"type": "boolean"
|
|
95
98
|
}
|
|
@@ -100,8 +103,8 @@
|
|
|
100
103
|
}
|
|
101
104
|
},
|
|
102
105
|
"devDependencies": {
|
|
103
|
-
"react": "^
|
|
104
|
-
"react-dom": "^
|
|
106
|
+
"react": "^19.2.0",
|
|
107
|
+
"react-dom": "^19.2.0",
|
|
105
108
|
"react-intl": "^7.0.0"
|
|
106
109
|
}
|
|
107
110
|
}
|