@atlaskit/editor-plugin-floating-toolbar 1.7.1 → 1.7.3

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,20 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 1.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.7.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#110582](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110582)
14
+ [`8846a40609a0e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8846a40609a0e) -
15
+ remove platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33 ff
16
+ - Updated dependencies
17
+
3
18
  ## 1.7.1
4
19
 
5
20
  ### Patch Changes
@@ -12,7 +12,6 @@ var _reactIntlNext = require("react-intl-next");
12
12
  var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
13
13
  var _done = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/done"));
14
14
  var _menu = require("@atlaskit/menu");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _colors = require("@atlaskit/theme/colors");
17
16
  var _constants = require("@atlaskit/theme/constants");
18
17
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
@@ -151,14 +150,11 @@ var DropdownMenuItem = function DropdownMenuItem(props) {
151
150
  var isAriaChecked = function isAriaChecked(item) {
152
151
  var selected = item.selected,
153
152
  domItemOptions = item.domItemOptions;
154
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') && (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox') {
155
- return selected;
156
- }
157
- return undefined;
153
+ return (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? selected : undefined;
158
154
  };
159
155
  var hasRole = function hasRole(item) {
160
- var domItemOptions = item.domItemOptions;
161
- return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') && (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
156
+ var _item$domItemOptions;
157
+ return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
162
158
  };
163
159
  (0, _react.useEffect)(function () {
164
160
  var labelRefCurrent = labelRef.current;
@@ -204,20 +200,13 @@ var SelectedIconBefore = function SelectedIconBefore(_ref) {
204
200
  intl = _ref.intl,
205
201
  showSelected = _ref.showSelected;
206
202
  if (showSelected && itemSelected) {
207
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33')) {
208
- return (0, _react2.jsx)("span", {
209
- "aria-hidden": "true"
210
- }, (0, _react2.jsx)(_done.default, {
211
- primaryColor: "var(--ds-icon-selected, ".concat(_colors.B400, ")"),
212
- size: "small",
213
- label: intl.formatMessage(_floatingToolbar.messages.confirmModalOK)
214
- }));
215
- }
216
- return (0, _react2.jsx)(_done.default, {
203
+ return (0, _react2.jsx)("span", {
204
+ "aria-hidden": "true"
205
+ }, (0, _react2.jsx)(_done.default, {
217
206
  primaryColor: "var(--ds-icon-selected, ".concat(_colors.B400, ")"),
218
207
  size: "small",
219
208
  label: intl.formatMessage(_floatingToolbar.messages.confirmModalOK)
220
- });
209
+ }));
221
210
  }
222
211
  return (0, _react2.jsx)("span", {
223
212
  css: spacerStyles
@@ -233,7 +222,7 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
233
222
  showSelected = _props$showSelected === void 0 ? true : _props$showSelected;
234
223
  return (0, _react2.jsx)("div", {
235
224
  css: menuContainerStyles,
236
- role: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') ? 'menu' : undefined
225
+ role: "menu"
237
226
  }, items.filter(function (item) {
238
227
  return !item.hidden;
239
228
  }).map(function (item, idx) {
@@ -9,7 +9,6 @@ import { injectIntl } from 'react-intl-next';
9
9
  import { messages } from '@atlaskit/editor-common/floating-toolbar';
10
10
  import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
11
11
  import { ButtonItem } from '@atlaskit/menu';
12
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
12
  import { B400 } from '@atlaskit/theme/colors';
14
13
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
15
14
  import { gridSize } from '@atlaskit/theme/constants';
@@ -142,16 +141,11 @@ const DropdownMenuItem = props => {
142
141
  selected,
143
142
  domItemOptions
144
143
  } = item;
145
- if (getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') && (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox') {
146
- return selected;
147
- }
148
- return undefined;
144
+ return (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? selected : undefined;
149
145
  };
150
146
  const hasRole = item => {
151
- const {
152
- domItemOptions
153
- } = item;
154
- return getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') && (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
147
+ var _item$domItemOptions;
148
+ return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
155
149
  };
156
150
  useEffect(() => {
157
151
  const labelRefCurrent = labelRef.current;
@@ -198,20 +192,13 @@ const SelectedIconBefore = ({
198
192
  showSelected
199
193
  }) => {
200
194
  if (showSelected && itemSelected) {
201
- if (getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33')) {
202
- return jsx("span", {
203
- "aria-hidden": "true"
204
- }, jsx(EditorDoneIcon, {
205
- primaryColor: `var(--ds-icon-selected, ${B400})`,
206
- size: "small",
207
- label: intl.formatMessage(messages.confirmModalOK)
208
- }));
209
- }
210
- return jsx(EditorDoneIcon, {
195
+ return jsx("span", {
196
+ "aria-hidden": "true"
197
+ }, jsx(EditorDoneIcon, {
211
198
  primaryColor: `var(--ds-icon-selected, ${B400})`,
212
199
  size: "small",
213
200
  label: intl.formatMessage(messages.confirmModalOK)
214
- });
201
+ }));
215
202
  }
216
203
  return jsx("span", {
217
204
  css: spacerStyles
@@ -228,7 +215,7 @@ const Dropdown = /*#__PURE__*/memo(props => {
228
215
  } = props;
229
216
  return jsx("div", {
230
217
  css: menuContainerStyles,
231
- role: getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') ? 'menu' : undefined
218
+ role: "menu"
232
219
  }, items.filter(item => !item.hidden).map((item, idx) => jsx(DropdownMenuItem, {
233
220
  key: idx,
234
221
  item: item,
@@ -10,7 +10,6 @@ import { injectIntl } from 'react-intl-next';
10
10
  import { messages } from '@atlaskit/editor-common/floating-toolbar';
11
11
  import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
12
12
  import { ButtonItem } from '@atlaskit/menu';
13
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
14
13
  import { B400 } from '@atlaskit/theme/colors';
15
14
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
16
15
  import { gridSize } from '@atlaskit/theme/constants';
@@ -142,14 +141,11 @@ var DropdownMenuItem = function DropdownMenuItem(props) {
142
141
  var isAriaChecked = function isAriaChecked(item) {
143
142
  var selected = item.selected,
144
143
  domItemOptions = item.domItemOptions;
145
- if (getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') && (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox') {
146
- return selected;
147
- }
148
- return undefined;
144
+ return (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? selected : undefined;
149
145
  };
150
146
  var hasRole = function hasRole(item) {
151
- var domItemOptions = item.domItemOptions;
152
- return getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') && (domItemOptions === null || domItemOptions === void 0 ? void 0 : domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
147
+ var _item$domItemOptions;
148
+ return ((_item$domItemOptions = item.domItemOptions) === null || _item$domItemOptions === void 0 ? void 0 : _item$domItemOptions.type) === 'item-checkbox' ? 'menuitemcheckbox' : undefined;
153
149
  };
154
150
  useEffect(function () {
155
151
  var labelRefCurrent = labelRef.current;
@@ -195,20 +191,13 @@ var SelectedIconBefore = function SelectedIconBefore(_ref) {
195
191
  intl = _ref.intl,
196
192
  showSelected = _ref.showSelected;
197
193
  if (showSelected && itemSelected) {
198
- if (getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33')) {
199
- return jsx("span", {
200
- "aria-hidden": "true"
201
- }, jsx(EditorDoneIcon, {
202
- primaryColor: "var(--ds-icon-selected, ".concat(B400, ")"),
203
- size: "small",
204
- label: intl.formatMessage(messages.confirmModalOK)
205
- }));
206
- }
207
- return jsx(EditorDoneIcon, {
194
+ return jsx("span", {
195
+ "aria-hidden": "true"
196
+ }, jsx(EditorDoneIcon, {
208
197
  primaryColor: "var(--ds-icon-selected, ".concat(B400, ")"),
209
198
  size: "small",
210
199
  label: intl.formatMessage(messages.confirmModalOK)
211
- });
200
+ }));
212
201
  }
213
202
  return jsx("span", {
214
203
  css: spacerStyles
@@ -224,7 +213,7 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
224
213
  showSelected = _props$showSelected === void 0 ? true : _props$showSelected;
225
214
  return jsx("div", {
226
215
  css: menuContainerStyles,
227
- role: getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') ? 'menu' : undefined
216
+ role: "menu"
228
217
  }, items.filter(function (item) {
229
218
  return !item.hidden;
230
219
  }).map(function (item, idx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@atlaskit/adf-utils": "^19.2.0",
28
- "@atlaskit/button": "^17.22.0",
28
+ "@atlaskit/button": "^18.0.0",
29
29
  "@atlaskit/checkbox": "^13.5.0",
30
- "@atlaskit/editor-common": "^82.9.0",
30
+ "@atlaskit/editor-common": "^82.11.0",
31
31
  "@atlaskit/editor-palette": "1.6.0",
32
32
  "@atlaskit/editor-plugin-block-controls": "^1.4.1",
33
33
  "@atlaskit/editor-plugin-context-panel": "^1.1.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
36
36
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
37
37
  "@atlaskit/editor-plugin-editor-viewmode": "^2.0.0",
38
- "@atlaskit/editor-plugin-extension": "^1.6.0",
38
+ "@atlaskit/editor-plugin-extension": "^1.7.0",
39
39
  "@atlaskit/editor-plugin-table": "^7.17.0",
40
40
  "@atlaskit/editor-prosemirror": "4.0.1",
41
41
  "@atlaskit/emoji": "^67.6.0",
@@ -44,8 +44,8 @@
44
44
  "@atlaskit/modal-dialog": "^12.14.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.2.5",
46
46
  "@atlaskit/select": "^17.11.0",
47
- "@atlaskit/theme": "^12.10.0",
48
- "@atlaskit/tokens": "^1.51.0",
47
+ "@atlaskit/theme": "^12.11.0",
48
+ "@atlaskit/tokens": "^1.52.0",
49
49
  "@atlaskit/tooltip": "^18.5.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
@@ -108,9 +108,6 @@
108
108
  "platform-feature-flags": {
109
109
  "platform.editor.a11y-floating-toolbar-markup_vexmo": {
110
110
  "type": "boolean"
111
- },
112
- "platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33": {
113
- "type": "boolean"
114
111
  }
115
112
  }
116
113
  }