@bigbinary/neeto-editor 1.47.78 → 1.47.80

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.
Files changed (66) hide show
  1. package/dist/Attachments.js +1 -1
  2. package/dist/Editor.js +28 -28
  3. package/dist/Editor.js.map +1 -1
  4. package/dist/EditorContent.js +1 -1
  5. package/dist/EditorContent.js.map +1 -1
  6. package/dist/FormikEditor.js +2 -2
  7. package/dist/Menu.js +1 -1
  8. package/dist/{chunk-DADua5Hs.js → chunk-2rW8X4h9.js} +6 -6
  9. package/dist/{chunk-DADua5Hs.js.map → chunk-2rW8X4h9.js.map} +1 -1
  10. package/dist/{chunk-CXmkXuF3.js → chunk-B7WnAQ8d.js} +44 -44
  11. package/dist/{chunk-CXmkXuF3.js.map → chunk-B7WnAQ8d.js.map} +1 -1
  12. package/dist/{chunk-CZULBD4z.js → chunk-CS2xPYV-.js} +8 -8
  13. package/dist/chunk-CS2xPYV-.js.map +1 -0
  14. package/dist/cjs/Attachments.cjs.js +1 -1
  15. package/dist/cjs/Editor.cjs.js +28 -28
  16. package/dist/cjs/Editor.cjs.js.map +1 -1
  17. package/dist/cjs/EditorContent.cjs.js +1 -1
  18. package/dist/cjs/EditorContent.cjs.js.map +1 -1
  19. package/dist/cjs/FormikEditor.cjs.js +2 -2
  20. package/dist/cjs/Menu.cjs.js +1 -1
  21. package/dist/cjs/{chunk-BWh2yM_t.cjs.js → chunk-31Z6mjff.cjs.js} +6 -6
  22. package/dist/cjs/{chunk-BWh2yM_t.cjs.js.map → chunk-31Z6mjff.cjs.js.map} +1 -1
  23. package/dist/cjs/{chunk-pQ98WW7j.cjs.js → chunk-CX8UXLae.cjs.js} +44 -44
  24. package/dist/cjs/{chunk-pQ98WW7j.cjs.js.map → chunk-CX8UXLae.cjs.js.map} +1 -1
  25. package/dist/cjs/{chunk-D6gUFJOw.cjs.js → chunk-afvFA8i1.cjs.js} +8 -8
  26. package/dist/cjs/chunk-afvFA8i1.cjs.js.map +1 -0
  27. package/dist/cjs/index.cjs.js +2 -2
  28. package/dist/editor-stats.html +1 -1
  29. package/dist/index.js +2 -2
  30. package/package.json +1 -1
  31. package/src/translations/ar.json +2 -2
  32. package/src/translations/bg.json +2 -2
  33. package/src/translations/ca.json +2 -2
  34. package/src/translations/cs.json +2 -2
  35. package/src/translations/da.json +2 -2
  36. package/src/translations/de.json +2 -2
  37. package/src/translations/es-MX.json +2 -2
  38. package/src/translations/es.json +2 -2
  39. package/src/translations/et.json +2 -2
  40. package/src/translations/fi.json +2 -2
  41. package/src/translations/fil.json +2 -2
  42. package/src/translations/fr.json +2 -2
  43. package/src/translations/he.json +2 -2
  44. package/src/translations/hi.json +2 -2
  45. package/src/translations/hr.json +2 -2
  46. package/src/translations/id.json +2 -2
  47. package/src/translations/it.json +2 -2
  48. package/src/translations/ja.json +2 -2
  49. package/src/translations/ko.json +2 -2
  50. package/src/translations/nl.json +2 -2
  51. package/src/translations/pl.json +2 -2
  52. package/src/translations/pt-BR.json +2 -2
  53. package/src/translations/pt.json +2 -2
  54. package/src/translations/ro.json +2 -2
  55. package/src/translations/ru.json +2 -2
  56. package/src/translations/sk.json +2 -2
  57. package/src/translations/sl.json +2 -2
  58. package/src/translations/sv.json +2 -2
  59. package/src/translations/th.json +2 -2
  60. package/src/translations/tr.json +2 -2
  61. package/src/translations/uk.json +2 -2
  62. package/src/translations/vi.json +2 -2
  63. package/src/translations/zh-CN.json +2 -2
  64. package/src/translations/zh-TW.json +2 -2
  65. package/dist/chunk-CZULBD4z.js.map +0 -1
  66. package/dist/cjs/chunk-D6gUFJOw.cjs.js.map +0 -1
@@ -11,7 +11,7 @@ import '@bigbinary/neetoui/Toastr';
11
11
  import 'ramda';
12
12
  import 'react-i18next';
13
13
  import './chunk-V3YZX4m4.js';
14
- export { A as default } from './chunk-CZULBD4z.js';
14
+ export { A as default } from './chunk-CS2xPYV-.js';
15
15
  import 'react/jsx-runtime';
16
16
  import '@babel/runtime/helpers/objectWithoutProperties';
17
17
  import 'zustand/shallow';
package/dist/Editor.js CHANGED
@@ -4,7 +4,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
5
5
  import * as React from 'react';
6
6
  import React__default, { memo, useState, useEffect, useRef, useCallback, createElement, forwardRef, useImperativeHandle } from 'react';
7
- import { E as Extension, a as Mark, m as mergeAttributes, b as markInputRule, c as markPasteRule, D as DecorationSet, d as Decoration, g as getMarkAttributes, N as Node, w as wrappingInputRule, t as textblockTypeInputRule, k as keydownHandler, e as callOrReturn, f as getExtensionField, i as isNodeSelection, n as nodeInputRule, h as getNodeType, j as getNodeAtPosition, l as isNodeActive, o as isAtStartOfNode, p as isAtEndOfNode, C as CALLOUT_TYPES, q as NodeViewWrapper, r as NodeViewContent, R as ReactNodeViewRenderer, s as findChildren, u as escapeForRegEx, v as ReactRenderer, x as EmojiPickerMenu, y as emojiPickerApi, z as combineTransactionSteps, A as getChangedRanges, B as findChildrenInRange, F as getMarksBetween, G as getAttributes, I as InputRule, H as highlightFocussedNode, J as resetFocussedNode, K as findParentNodeClosestToPos, P as PasteRule, L as validateUrl, O as BubbleMenu, Q as getLinkPopoverPosition, S as getMarkType, T as getMarkRange, U as useEditor, V as useEditorState, M as Menu$4, W as MenuDynamicVariables, X as EditorContent, Y as MediaUploader, Z as LinkAddPopOver, _ as EditorView } from './chunk-CXmkXuF3.js';
7
+ import { E as Extension, a as Mark, m as mergeAttributes, b as markInputRule, c as markPasteRule, D as DecorationSet, d as Decoration, g as getMarkAttributes, N as Node, w as wrappingInputRule, t as textblockTypeInputRule, k as keydownHandler, e as callOrReturn, f as getExtensionField, i as isNodeSelection, n as nodeInputRule, h as getNodeType, j as getNodeAtPosition, l as isNodeActive, o as isAtStartOfNode, p as isAtEndOfNode, C as CALLOUT_TYPES, q as NodeViewWrapper, r as NodeViewContent, R as ReactNodeViewRenderer, s as findChildren, u as escapeForRegEx, v as ReactRenderer, x as EmojiPickerMenu, y as emojiPickerApi, z as combineTransactionSteps, A as getChangedRanges, B as findChildrenInRange, F as getMarksBetween, G as getAttributes, I as InputRule, H as highlightFocussedNode, J as resetFocussedNode, K as findParentNodeClosestToPos, P as PasteRule, L as validateUrl, O as BubbleMenu, Q as getLinkPopoverPosition, S as getMarkType, T as getMarkRange, U as useEditor, V as useEditorState, M as Menu$4, W as MenuDynamicVariables, X as EditorContent, Y as MediaUploader, Z as LinkAddPopOver, _ as EditorView } from './chunk-B7WnAQ8d.js';
8
8
  import classnames from 'classnames';
9
9
  import { D as DIRECT_UPLOAD_ENDPOINT, E as EDITOR_OPTIONS, C as COMBINED_REGEX, a as EDITOR_SIZES } from './chunk-DNMH2cJJ.js';
10
10
  import { isNotPresent, findBy, isNotEmpty, isPresent, noop as noop$1, slugify } from '@bigbinary/neeto-cist';
@@ -93,7 +93,7 @@ import Form from '@bigbinary/neetoui/formik/Form';
93
93
  import Input$1 from '@bigbinary/neetoui/formik/Input';
94
94
  import Edit from '@bigbinary/neeto-icons/Edit';
95
95
  import Articles from '@bigbinary/neeto-icons/Articles';
96
- import { A as Attachments } from './chunk-CZULBD4z.js';
96
+ import { A as Attachments } from './chunk-CS2xPYV-.js';
97
97
  import 'tippy.js/dist/svg-arrow.css';
98
98
  import '@bigbinary/neeto-commons-frontend/utils';
99
99
  import '@bigbinary/neeto-icons/Check';
@@ -158,7 +158,7 @@ var ErrorWrapper = function ErrorWrapper(_ref) {
158
158
  children: children
159
159
  }), isError && /*#__PURE__*/jsx("p", {
160
160
  className: "neeto-ui-input__error",
161
- "data-cy": "neeto-editor-error-text",
161
+ "data-testid": "neeto-editor-error-text",
162
162
  children: getErrorMessage()
163
163
  })]
164
164
  });
@@ -332,7 +332,7 @@ var CharacterCountWrapper = function CharacterCountWrapper(_ref) {
332
332
  return /*#__PURE__*/jsxs(Fragment, {
333
333
  children: [children, /*#__PURE__*/jsxs("p", {
334
334
  className: "neeto-editor-character-count",
335
- "data-cy": "neeto-editor-character-count",
335
+ "data-testid": "neeto-editor-character-count",
336
336
  children: [editor.storage.characterCount.characters(), " characters"]
337
337
  })]
338
338
  });
@@ -6335,7 +6335,7 @@ var CalloutComponent = function CalloutComponent(_ref) {
6335
6335
  children: /*#__PURE__*/jsx(Icon, {})
6336
6336
  }), /*#__PURE__*/jsx(NodeViewContent, {
6337
6337
  className: "callout-content",
6338
- "data-cy": "callout-content"
6338
+ "data-testid": "callout-content"
6339
6339
  })]
6340
6340
  })
6341
6341
  });
@@ -9390,7 +9390,7 @@ var CodeBlockComponent = function CodeBlockComponent(_ref) {
9390
9390
  };
9391
9391
  return /*#__PURE__*/jsx(NodeViewWrapper, {
9392
9392
  className: "ne-codeblock-nodeview-wrapper",
9393
- "data-cy": "neeto-editor-code-block",
9393
+ "data-testid": "neeto-editor-code-block",
9394
9394
  children: /*#__PURE__*/jsx("div", {
9395
9395
  ref: ref,
9396
9396
  children: /*#__PURE__*/jsxs("pre", {
@@ -10091,7 +10091,7 @@ var EmojiSuggestionMenu = /*#__PURE__*/function (_React$Component) {
10091
10091
  className: "neeto-editor-emoji-suggestion",
10092
10092
  children: [this.state.isLoading && /*#__PURE__*/jsx(Spinner, {}), !this.state.isLoading && (isNotEmpty(this.state.emojiSuggestions) ? this.state.emojiSuggestions.map(function (emoji, index) {
10093
10093
  return /*#__PURE__*/jsx("div", {
10094
- "data-cy": "neeto-editor-emoji-suggestion-".concat(emoji.id),
10094
+ "data-testid": "neeto-editor-emoji-suggestion-".concat(emoji.id),
10095
10095
  className: classnames("neeto-editor-emoji-suggestion__item", {
10096
10096
  "neeto-editor-emoji-suggestion__item--selected": index === _this2.state.selectedIndex
10097
10097
  }),
@@ -11186,7 +11186,7 @@ var Menu$2 = function Menu(_ref) {
11186
11186
  borderToggle = _ref2.borderToggle;
11187
11187
  return type === "button" ? /*#__PURE__*/jsx(Button, {
11188
11188
  className: "neeto-editor-bubble-menu__item",
11189
- "data-cy": "neeto-editor-image-menu-".concat(optionName),
11189
+ "data-testid": "neeto-editor-image-menu-".concat(optionName),
11190
11190
  icon: Icon,
11191
11191
  tooltipProps: {
11192
11192
  content: optionName,
@@ -11296,7 +11296,7 @@ var ImageComponent = function ImageComponent(_ref) {
11296
11296
  };
11297
11297
  if (isNotPresent(src) && isNotPresent(alt)) return null;
11298
11298
  return /*#__PURE__*/jsxs(NodeViewWrapper, {
11299
- "data-cy": "neeto-editor-image-wrapper",
11299
+ "data-testid": "neeto-editor-image-wrapper",
11300
11300
  className: classnames("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
11301
11301
  "neeto-editor__image--bordered": border
11302
11302
  }),
@@ -14186,14 +14186,14 @@ var MentionList = /*#__PURE__*/function (_React$Component) {
14186
14186
  className: "neeto-ui-dropdown__popup",
14187
14187
  children: /*#__PURE__*/jsx(Menu, {
14188
14188
  className: "neeto-editor-mentions__wrapper",
14189
- "data-cy": "neeto-editor-mention-list",
14189
+ "data-testid": "neeto-editor-mention-list",
14190
14190
  ref: this.mentionRef,
14191
14191
  children: items.map(function (_ref2, index) {
14192
14192
  var key = _ref2.key,
14193
14193
  name = _ref2.name,
14194
14194
  imageUrl = _ref2.imageUrl;
14195
14195
  return /*#__PURE__*/jsxs(MenuItem.Button, {
14196
- "data-cy": "neeto-editor-mention-list-".concat(name),
14196
+ "data-testid": "neeto-editor-mention-list-".concat(name),
14197
14197
  type: "button",
14198
14198
  className: classnames("neeto-editor-mentions__item", {
14199
14199
  active: index === selectedIndex
@@ -14679,7 +14679,7 @@ var MenuItem$1 = /*#__PURE__*/forwardRef(function (_ref2, ref) {
14679
14679
  var Icon = item.Icon;
14680
14680
  return /*#__PURE__*/jsxs("button", {
14681
14681
  ref: ref,
14682
- "data-cy": "neeto-editor-command-list-item-".concat(index),
14682
+ "data-testid": "neeto-editor-command-list-item-".concat(index),
14683
14683
  className: classnames("neeto-editor-slash-commands__item", {
14684
14684
  active: index === selectedIndex
14685
14685
  }),
@@ -14691,7 +14691,7 @@ var MenuItem$1 = /*#__PURE__*/forwardRef(function (_ref2, ref) {
14691
14691
  className: "neeto-editor-slash-commands__item-content",
14692
14692
  children: /*#__PURE__*/jsx("span", {
14693
14693
  className: "neeto-editor-slash-commands__item-title",
14694
- "data-cy": "neeto-editor-command-list-item-block-heading",
14694
+ "data-testid": "neeto-editor-command-list-item-block-heading",
14695
14695
  children: item.title
14696
14696
  })
14697
14697
  })]
@@ -20541,7 +20541,7 @@ var EmbedComponent = function EmbedComponent(_ref) {
20541
20541
  editor.commands.focus();
20542
20542
  };
20543
20543
  return /*#__PURE__*/jsx(NodeViewWrapper, {
20544
- "data-cy": "neeto-editor-video-wrapper",
20544
+ "data-testid": "neeto-editor-video-wrapper",
20545
20545
  className: classnames("neeto-editor__video-wrapper", "neeto-editor__video--".concat(align), {
20546
20546
  "neeto-editor__video--bordered": border
20547
20547
  }),
@@ -21521,14 +21521,14 @@ var KbArticleEdit = function KbArticleEdit(_ref) {
21521
21521
  required: true,
21522
21522
  unlimitedChars: true,
21523
21523
  className: "w-full",
21524
- "data-cy": "neeto-editor-edit-kb-link-text-input",
21524
+ "data-testid": "neeto-editor-edit-kb-link-text-input",
21525
21525
  label: t("neetoEditor.common.text"),
21526
21526
  name: "textContent",
21527
21527
  placeholder: t("neetoEditor.placeholders.enterText"),
21528
21528
  onKeyDown: handleKeyDown
21529
21529
  }), /*#__PURE__*/jsx(ArticlePicker, {
21530
21530
  className: "w-full",
21531
- "data-cy": "neeto-editor-edit-kb-link-page-select",
21531
+ "data-testid": "neeto-editor-edit-kb-link-page-select",
21532
21532
  isLoading: isLoadingKbData,
21533
21533
  label: t("neetoEditor.linkKb.articleLabel"),
21534
21534
  mode: MODE.SELECT,
@@ -21545,14 +21545,14 @@ var KbArticleEdit = function KbArticleEdit(_ref) {
21545
21545
  }), /*#__PURE__*/jsxs("div", {
21546
21546
  className: "ne-link-popover__edit-prompt-buttons",
21547
21547
  children: [/*#__PURE__*/jsx(Button, {
21548
- "data-cy": "neeto-editor-edit-kb-link-done",
21548
+ "data-testid": "neeto-editor-edit-kb-link-done",
21549
21549
  disabled: !dirty,
21550
21550
  label: t("neetoEditor.common.done"),
21551
21551
  loading: isSubmitting,
21552
21552
  size: "small",
21553
21553
  type: "submit"
21554
21554
  }), /*#__PURE__*/jsx(Button, {
21555
- "data-cy": "neeto-editor-edit-kb-link-cancel",
21555
+ "data-testid": "neeto-editor-edit-kb-link-cancel",
21556
21556
  label: t("neetoEditor.common.cancel"),
21557
21557
  size: "small",
21558
21558
  style: "text",
@@ -21600,7 +21600,7 @@ var KbArticleView = withT(function (_ref) {
21600
21600
  value: linkAttributes === null || linkAttributes === void 0 ? void 0 : linkAttributes.href
21601
21601
  }), /*#__PURE__*/jsx(Button, {
21602
21602
  className: "ne-link-popover__option-button mx-0",
21603
- "data-cy": "neeto-editor-link-popover-edit",
21603
+ "data-testid": "neeto-editor-link-popover-edit",
21604
21604
  icon: Edit,
21605
21605
  size: "small",
21606
21606
  style: "text",
@@ -21881,7 +21881,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
21881
21881
  return /*#__PURE__*/jsxs(Fragment, {
21882
21882
  children: [/*#__PURE__*/jsx(Input$1, {
21883
21883
  required: true,
21884
- "data-cy": "neeto-editor-edit-link-text-input",
21884
+ "data-testid": "neeto-editor-edit-link-text-input",
21885
21885
  label: t("neetoEditor.common.text"),
21886
21886
  name: "textContent",
21887
21887
  placeholder: t("neetoEditor.placeholders.enterText"),
@@ -21893,7 +21893,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
21893
21893
  autoFocus: true,
21894
21894
  required: true,
21895
21895
  className: "ne-link-popover__url-input",
21896
- "data-cy": "neeto-editor-edit-link-url-input",
21896
+ "data-testid": "neeto-editor-edit-link-url-input",
21897
21897
  label: t("neetoEditor.common.url"),
21898
21898
  name: "urlString",
21899
21899
  placeholder: t("neetoEditor.placeholders.url"),
@@ -21911,14 +21911,14 @@ var LinkPopOver = function LinkPopOver(_ref) {
21911
21911
  }), /*#__PURE__*/jsxs("div", {
21912
21912
  className: "ne-link-popover__edit-prompt-buttons",
21913
21913
  children: [/*#__PURE__*/jsx(Button, {
21914
- "data-cy": "neeto-editor-edit-link",
21914
+ "data-testid": "neeto-editor-edit-link",
21915
21915
  disabled: !dirty,
21916
21916
  label: t("neetoEditor.menu.link"),
21917
21917
  loading: isSubmitting,
21918
21918
  size: "small",
21919
21919
  type: "submit"
21920
21920
  }), /*#__PURE__*/jsx(Button, {
21921
- "data-cy": "neeto-editor-edit-link-cancel",
21921
+ "data-testid": "neeto-editor-edit-link-cancel",
21922
21922
  label: t("neetoEditor.common.cancel"),
21923
21923
  size: "small",
21924
21924
  style: "text",
@@ -21969,7 +21969,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
21969
21969
  children: linkAttributes === null || linkAttributes === void 0 ? void 0 : linkAttributes.href
21970
21970
  }), " - ", /*#__PURE__*/jsx(Button, {
21971
21971
  className: "ne-link-popover__option-button",
21972
- "data-cy": "neeto-editor-link-popover-edit",
21972
+ "data-testid": "neeto-editor-link-popover-edit",
21973
21973
  label: t("neetoEditor.common.edit"),
21974
21974
  size: "small",
21975
21975
  style: "link",
@@ -21980,7 +21980,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
21980
21980
  children: "|"
21981
21981
  }), /*#__PURE__*/jsx(Button, {
21982
21982
  className: "ne-link-popover__option-button",
21983
- "data-cy": "neeto-editor-link-popover-unlink",
21983
+ "data-testid": "neeto-editor-link-popover-unlink",
21984
21984
  label: t("neetoEditor.common.unlink"),
21985
21985
  size: "small",
21986
21986
  style: "link",
@@ -22200,7 +22200,7 @@ var Editor = function Editor(_ref, ref) {
22200
22200
  style: getEditorStyles({
22201
22201
  rows: rows
22202
22202
  }),
22203
- "data-cy": "neeto-editor-content"
22203
+ "data-testid": "neeto-editor-content"
22204
22204
  }, ariaAttributes), contentAttributes),
22205
22205
  clipboardTextParser: clipboardTextParser,
22206
22206
  transformPastedHTML: transformPastedHTML
@@ -22260,13 +22260,13 @@ var Editor = function Editor(_ref, ref) {
22260
22260
  this.updateStateInner(state, this.state.plugins !== state.plugins);
22261
22261
  };
22262
22262
  return /*#__PURE__*/jsxs("div", {
22263
- "data-cy": "neeto-editor-wrapper",
22263
+ "data-testid": "neeto-editor-wrapper",
22264
22264
  ref: wrapperRef,
22265
22265
  className: classnames(_defineProperty(_defineProperty({}, className, className), "ne-attachments__wrapper", isAttachmentsActive)),
22266
22266
  children: [label && /*#__PURE__*/jsx(Label, {
22267
22267
  required: required,
22268
22268
  className: "neeto-ui-mb-2",
22269
- "data-cy": "".concat(slugify(label), "-editor-label"),
22269
+ "data-testid": "".concat(slugify(label), "-editor-label"),
22270
22270
  children: label
22271
22271
  }), /*#__PURE__*/jsx(ErrorWrapper$1, {
22272
22272
  error: error,