@contentful/field-editor-rich-text 3.4.16 → 3.4.17

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
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.4.17](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@3.4.16...@contentful/field-editor-rich-text@3.4.17) (2023-04-04)
7
+
8
+ ### Bug Fixes
9
+
10
+ - correct misleading action origin on paste event - rich text ([#1385](https://github.com/contentful/field-editors/issues/1385)) ([23e313f](https://github.com/contentful/field-editors/commit/23e313f4158de0205dfb5415f4334c5b906dc2c7))
11
+
6
12
  ## [3.4.16](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@3.4.15...@contentful/field-editor-rich-text@3.4.16) (2023-03-31)
7
13
 
8
14
  ### Bug Fixes
@@ -7181,6 +7181,7 @@ var actionOrigin = {
7181
7181
  TOOLBAR: 'toolbar-icon',
7182
7182
  SHORTCUT: 'shortcut',
7183
7183
  VIEWPORT: 'viewport-interaction',
7184
+ SHORTCUT_OR_VIEWPORT: 'shortcut-or-viewport',
7184
7185
  COMMAND_PALETTE: 'command-palette'
7185
7186
  };
7186
7187
  function getPastingSource(data) {
@@ -7238,6 +7239,15 @@ var createTrackingPlugin = function createTrackingPlugin(onAction) {
7238
7239
  origin: actionOrigin.SHORTCUT
7239
7240
  }, data));
7240
7241
  },
7242
+ onShortcutOrViewportAction: function onShortcutOrViewportAction(actionName, data) {
7243
+ if (data === void 0) {
7244
+ data = {};
7245
+ }
7246
+
7247
+ return onAction(actionName, _extends({
7248
+ origin: actionOrigin.SHORTCUT_OR_VIEWPORT
7249
+ }, data));
7250
+ },
7241
7251
  onToolbarAction: function onToolbarAction(actionName, data) {
7242
7252
  if (data === void 0) {
7243
7253
  data = {};
@@ -7273,7 +7283,7 @@ var createTrackingPlugin = function createTrackingPlugin(onAction) {
7273
7283
  var characterCountBefore = getCharacterCount(editor);
7274
7284
  setTimeout(function () {
7275
7285
  var characterCountAfter = getCharacterCount(editor);
7276
- trackingActions.onShortcutAction('paste', {
7286
+ trackingActions.onShortcutOrViewportAction('paste', {
7277
7287
  characterCountAfter: characterCountAfter,
7278
7288
  characterCountBefore: characterCountBefore,
7279
7289
  characterCountSelection: characterCountSelection,