@atlaskit/editor-plugin-media 10.0.7 → 10.0.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 10.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.0.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [`7428d9bf3aa13`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7428d9bf3aa13) -
14
+ Clean up platform_synced_block_patch_5 feature gate
15
+ - Updated dependencies
16
+
3
17
  ## 10.0.7
4
18
 
5
19
  ### Patch Changes
@@ -129,13 +129,6 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
129
129
  actions: {
130
130
  handleMediaNodeRenderError: function handleMediaNodeRenderError(node, reason, nestedUnder) {
131
131
  var _api$analytics;
132
- if (!(0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') && !(0, _expValEquals.expValEquals)('platform_editor_media_reliability_observability', 'isEnabled', true)) {
133
- // Only fire the errored event once per media node
134
- if (mediaErrorLocalIds.has(node.attrs.localId)) {
135
- return;
136
- }
137
- mediaErrorLocalIds.add(node.attrs.localId);
138
- }
139
132
  var isDuplicateError = false;
140
133
  if ((0, _expValEquals.expValEquals)('platform_editor_media_reliability_observability', 'isEnabled', true)) {
141
134
  if (mediaErrorLocalIds.has(node.attrs.localId)) {
@@ -155,9 +148,9 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref3) {
155
148
  attributes: _objectSpread(_objectSpread({
156
149
  reason: reason,
157
150
  external: node.attrs.__external
158
- }, nestedUnder && (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') ? {
151
+ }, nestedUnder && (0, _experiments.editorExperiment)('platform_synced_block', true) ? {
159
152
  nestedUnder: nestedUnder
160
- } : {}), (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') ? {
153
+ } : {}), (0, _experiments.editorExperiment)('platform_synced_block', true) ? {
161
154
  isDuplicateError: isDuplicateError
162
155
  } : {})
163
156
  });
@@ -122,7 +122,7 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
122
122
  }));
123
123
  (0, _defineProperty2.default)(_this, "onError", function (reason) {
124
124
  var _this$props$api;
125
- var nestedUnder = (0, _platformFeatureFlags.fg)('platform_synced_block_patch_5') ? _this.getNestedUnder() : undefined;
125
+ var nestedUnder = _this.getNestedUnder();
126
126
  (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || _this$props$api.media.actions.handleMediaNodeRenderError(_this.props.node, reason, nestedUnder);
127
127
  });
128
128
  /**
@@ -144,9 +144,9 @@ var ImageBorder = function ImageBorder(_ref) {
144
144
  type: "button",
145
145
  "aria-label": formatMessage(_media.imageBorderMessages.borderColorDropdownAriaLabel),
146
146
  "data-testid": "image-border-dropdown-button-color",
147
- css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
147
+ css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
148
148
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
149
- : _styles2.dropdownOptionButton,
149
+ _styles2.dropdownOptionButton,
150
150
  "aria-expanded": isColorSubmenuOpen,
151
151
  onKeyDown: function onKeyDown(e) {
152
152
  return handleTriggerByKeyboard(e, function () {
@@ -210,9 +210,9 @@ var ImageBorder = function ImageBorder(_ref) {
210
210
  type: "button",
211
211
  "aria-label": formatMessage(_media.imageBorderMessages.borderSizeDropdownAriaLabel),
212
212
  "data-testid": "image-border-dropdown-button-size",
213
- css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
213
+ css: (0, _expValEquals.expValEquals)('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
214
214
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
215
- : _styles2.dropdownOptionButton,
215
+ _styles2.dropdownOptionButton,
216
216
  "aria-expanded": isSizeSubmenuOpen,
217
217
  ref: dropDownSizeOptionButton,
218
218
  onKeyDown: function onKeyDown(e) {
@@ -121,13 +121,6 @@ export const mediaPlugin = ({
121
121
  actions: {
122
122
  handleMediaNodeRenderError: (node, reason, nestedUnder) => {
123
123
  var _api$analytics;
124
- if (!fg('platform_synced_block_patch_5') && !expValEquals('platform_editor_media_reliability_observability', 'isEnabled', true)) {
125
- // Only fire the errored event once per media node
126
- if (mediaErrorLocalIds.has(node.attrs.localId)) {
127
- return;
128
- }
129
- mediaErrorLocalIds.add(node.attrs.localId);
130
- }
131
124
  let isDuplicateError = false;
132
125
  if (expValEquals('platform_editor_media_reliability_observability', 'isEnabled', true)) {
133
126
  if (mediaErrorLocalIds.has(node.attrs.localId)) {
@@ -147,10 +140,10 @@ export const mediaPlugin = ({
147
140
  attributes: {
148
141
  reason,
149
142
  external: node.attrs.__external,
150
- ...(nestedUnder && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
143
+ ...(nestedUnder && editorExperiment('platform_synced_block', true) ? {
151
144
  nestedUnder
152
145
  } : {}),
153
- ...(editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
146
+ ...(editorExperiment('platform_synced_block', true) ? {
154
147
  isDuplicateError
155
148
  } : {})
156
149
  }
@@ -93,7 +93,7 @@ export class MediaNode extends Component {
93
93
  })));
94
94
  _defineProperty(this, "onError", reason => {
95
95
  var _this$props$api;
96
- const nestedUnder = fg('platform_synced_block_patch_5') ? this.getNestedUnder() : undefined;
96
+ const nestedUnder = this.getNestedUnder();
97
97
  (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.media.actions.handleMediaNodeRenderError(this.props.node, reason, nestedUnder);
98
98
  });
99
99
  /**
@@ -126,9 +126,9 @@ const ImageBorder = ({
126
126
  type: "button",
127
127
  "aria-label": formatMessage(messages.borderColorDropdownAriaLabel),
128
128
  "data-testid": "image-border-dropdown-button-color",
129
- css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
129
+ css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
130
130
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
131
- : dropdownOptionButton,
131
+ dropdownOptionButton,
132
132
  "aria-expanded": isColorSubmenuOpen,
133
133
  onKeyDown: e => handleTriggerByKeyboard(e, () => setIsColorSubmenuOpen(!isColorSubmenuOpen))
134
134
  }, jsx(Text, null, formatMessage(messages.borderColor)), jsx("div", {
@@ -188,9 +188,9 @@ const ImageBorder = ({
188
188
  type: "button",
189
189
  "aria-label": formatMessage(messages.borderSizeDropdownAriaLabel),
190
190
  "data-testid": "image-border-dropdown-button-size",
191
- css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
191
+ css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
192
192
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
193
- : dropdownOptionButton,
193
+ dropdownOptionButton,
194
194
  "aria-expanded": isSizeSubmenuOpen,
195
195
  ref: dropDownSizeOptionButton,
196
196
  onKeyDown: e => handleTriggerByKeyboard(e, () => setIsSizeSubmenuOpen(!isSizeSubmenuOpen))
@@ -120,13 +120,6 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
120
120
  actions: {
121
121
  handleMediaNodeRenderError: function handleMediaNodeRenderError(node, reason, nestedUnder) {
122
122
  var _api$analytics;
123
- if (!fg('platform_synced_block_patch_5') && !expValEquals('platform_editor_media_reliability_observability', 'isEnabled', true)) {
124
- // Only fire the errored event once per media node
125
- if (mediaErrorLocalIds.has(node.attrs.localId)) {
126
- return;
127
- }
128
- mediaErrorLocalIds.add(node.attrs.localId);
129
- }
130
123
  var isDuplicateError = false;
131
124
  if (expValEquals('platform_editor_media_reliability_observability', 'isEnabled', true)) {
132
125
  if (mediaErrorLocalIds.has(node.attrs.localId)) {
@@ -146,9 +139,9 @@ export var mediaPlugin = function mediaPlugin(_ref3) {
146
139
  attributes: _objectSpread(_objectSpread({
147
140
  reason: reason,
148
141
  external: node.attrs.__external
149
- }, nestedUnder && editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
142
+ }, nestedUnder && editorExperiment('platform_synced_block', true) ? {
150
143
  nestedUnder: nestedUnder
151
- } : {}), editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_5') ? {
144
+ } : {}), editorExperiment('platform_synced_block', true) ? {
152
145
  isDuplicateError: isDuplicateError
153
146
  } : {})
154
147
  });
@@ -114,7 +114,7 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
114
114
  }));
115
115
  _defineProperty(_this, "onError", function (reason) {
116
116
  var _this$props$api;
117
- var nestedUnder = fg('platform_synced_block_patch_5') ? _this.getNestedUnder() : undefined;
117
+ var nestedUnder = _this.getNestedUnder();
118
118
  (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || _this$props$api.media.actions.handleMediaNodeRenderError(_this.props.node, reason, nestedUnder);
119
119
  });
120
120
  /**
@@ -136,9 +136,9 @@ var ImageBorder = function ImageBorder(_ref) {
136
136
  type: "button",
137
137
  "aria-label": formatMessage(messages.borderColorDropdownAriaLabel),
138
138
  "data-testid": "image-border-dropdown-button-color",
139
- css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
139
+ css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
140
140
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
141
- : dropdownOptionButton,
141
+ dropdownOptionButton,
142
142
  "aria-expanded": isColorSubmenuOpen,
143
143
  onKeyDown: function onKeyDown(e) {
144
144
  return handleTriggerByKeyboard(e, function () {
@@ -202,9 +202,9 @@ var ImageBorder = function ImageBorder(_ref) {
202
202
  type: "button",
203
203
  "aria-label": formatMessage(messages.borderSizeDropdownAriaLabel),
204
204
  "data-testid": "image-border-dropdown-button-size",
205
- css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew
205
+ css: expValEquals('platform_editor_fix_media_toolbar_border_dropdown', 'isEnabled', true, false) ? dropdownOptionButtonNew :
206
206
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
207
- : dropdownOptionButton,
207
+ dropdownOptionButton,
208
208
  "aria-expanded": isSizeSubmenuOpen,
209
209
  ref: dropDownSizeOptionButton,
210
210
  onKeyDown: function onKeyDown(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "10.0.7",
3
+ "version": "10.0.9",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^52.3.0",
32
+ "@atlaskit/adf-schema": "^52.4.0",
33
33
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
34
34
  "@atlaskit/analytics-next": "^11.1.0",
35
35
  "@atlaskit/button": "^23.10.0",
@@ -66,9 +66,9 @@
66
66
  "@atlaskit/primitives": "^18.0.0",
67
67
  "@atlaskit/textfield": "^8.2.0",
68
68
  "@atlaskit/theme": "^22.0.0",
69
- "@atlaskit/tmp-editor-statsig": "^40.2.0",
69
+ "@atlaskit/tmp-editor-statsig": "^41.0.0",
70
70
  "@atlaskit/tokens": "^11.1.0",
71
- "@atlaskit/tooltip": "^20.14.0",
71
+ "@atlaskit/tooltip": "^21.0.0",
72
72
  "@babel/runtime": "^7.0.0",
73
73
  "@emotion/react": "^11.7.1",
74
74
  "bind-event-listener": "^3.0.0",
@@ -78,7 +78,7 @@
78
78
  "uuid": "^3.1.0"
79
79
  },
80
80
  "peerDependencies": {
81
- "@atlaskit/editor-common": "^112.4.0",
81
+ "@atlaskit/editor-common": "^112.6.0",
82
82
  "@atlaskit/media-core": "^37.0.0",
83
83
  "react": "^18.2.0",
84
84
  "react-dom": "^18.2.0",
@@ -160,9 +160,6 @@
160
160
  "platform_editor_media_insert_check": {
161
161
  "type": "boolean"
162
162
  },
163
- "platform_synced_block_patch_5": {
164
- "type": "boolean"
165
- },
166
163
  "confluence_fe_create_inline_comment_exp_coverage_2": {
167
164
  "type": "boolean"
168
165
  }