@bigbinary/neeto-editor 1.47.62 → 1.47.63

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/dist/Editor.js CHANGED
@@ -5,7 +5,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
5
5
  import * as React from 'react';
6
6
  import React__default, { memo, useState, useEffect, useRef, useCallback, createElement, forwardRef, useImperativeHandle } from 'react';
7
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 BubbleMenu, O as getLinkPopoverPosition, Q as getMarkType, S as getMarkRange, T as useEditor, U as useEditorState, M as Menu$4, V as EditorContent, W as MediaUploader, X as LinkAddPopOver, Y as EditorView } from './chunk-P4uqYK53.js';
8
- import classnames$1 from 'classnames';
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-faiBDOaS.js';
10
10
  import { isNotPresent, findBy, isNotEmpty, isPresent, noop as noop$1, slugify } from '@bigbinary/neeto-cist';
11
11
  import { withT, useOnClickOutside, useFuncDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
@@ -131,7 +131,7 @@ var ErrorWrapper = function ErrorWrapper(_ref) {
131
131
  children = _ref.children,
132
132
  className = _ref.className;
133
133
  var isError = !isNotPresent(error);
134
- var wrapperClasses = classnames$1(_defineProperty({
134
+ var wrapperClasses = classnames(_defineProperty({
135
135
  "neeto-editor-error": isError
136
136
  }, className, className));
137
137
  var getErrorMessage = function getErrorMessage() {
@@ -10081,7 +10081,7 @@ var EmojiSuggestionMenu = /*#__PURE__*/function (_React$Component) {
10081
10081
  children: [this.state.isLoading && /*#__PURE__*/jsx(Spinner, {}), !this.state.isLoading && (isNotEmpty(this.state.emojiSuggestions) ? this.state.emojiSuggestions.map(function (emoji, index) {
10082
10082
  return /*#__PURE__*/jsx("div", {
10083
10083
  "data-cy": "neeto-editor-emoji-suggestion-".concat(emoji.id),
10084
- className: classnames$1("neeto-editor-emoji-suggestion__item", {
10084
+ className: classnames("neeto-editor-emoji-suggestion__item", {
10085
10085
  "neeto-editor-emoji-suggestion__item--selected": index === _this2.state.selectedIndex
10086
10086
  }),
10087
10087
  onClick: function onClick() {
@@ -11121,7 +11121,7 @@ var ImagePreviewModal = function ImagePreviewModal(_ref) {
11121
11121
  }), /*#__PURE__*/jsx("img", {
11122
11122
  alt: "Preview",
11123
11123
  src: previewUrl,
11124
- className: classnames$1({
11124
+ className: classnames({
11125
11125
  "display-none": isLoading || isNil(previewUrl)
11126
11126
  }),
11127
11127
  onLoad: handleImageLoad
@@ -11283,7 +11283,7 @@ var ImageComponent = function ImageComponent(_ref) {
11283
11283
  if (isNotPresent(src) && isNotPresent(alt)) return null;
11284
11284
  return /*#__PURE__*/jsxs(NodeViewWrapper, {
11285
11285
  "data-cy": "neeto-editor-image-wrapper",
11286
- className: classnames$1("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
11286
+ className: classnames("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
11287
11287
  "neeto-editor__image--bordered": border
11288
11288
  }),
11289
11289
  children: [/*#__PURE__*/jsxs("figure", {
@@ -11321,7 +11321,7 @@ var ImageComponent = function ImageComponent(_ref) {
11321
11321
  children: /*#__PURE__*/jsx(Spinner, {})
11322
11322
  }), /*#__PURE__*/jsx(NodeViewContent, {
11323
11323
  as: "figcaption",
11324
- className: classnames$1({
11324
+ className: classnames({
11325
11325
  "is-empty": isEmpty$1(caption)
11326
11326
  }),
11327
11327
  style: {
@@ -14165,7 +14165,7 @@ var MentionList = /*#__PURE__*/function (_React$Component) {
14165
14165
  return /*#__PURE__*/jsxs(MenuItem.Button, {
14166
14166
  "data-cy": "neeto-editor-mention-list-".concat(name),
14167
14167
  type: "button",
14168
- className: classnames$1("neeto-editor-mentions__item", {
14168
+ className: classnames("neeto-editor-mentions__item", {
14169
14169
  active: index === selectedIndex
14170
14170
  }),
14171
14171
  onClick: function onClick() {
@@ -14650,7 +14650,7 @@ var MenuItem$1 = /*#__PURE__*/forwardRef(function (_ref2, ref) {
14650
14650
  return /*#__PURE__*/jsxs("button", {
14651
14651
  ref: ref,
14652
14652
  "data-cy": "neeto-editor-command-list-item-".concat(index),
14653
- className: classnames$1("neeto-editor-slash-commands__item", {
14653
+ className: classnames("neeto-editor-slash-commands__item", {
14654
14654
  active: index === selectedIndex
14655
14655
  }),
14656
14656
  onClick: selectItem,
@@ -20440,7 +20440,7 @@ var VideoComponent = function VideoComponent(_ref) {
20440
20440
  };
20441
20441
  if (isNotPresent(src)) return null;
20442
20442
  return /*#__PURE__*/jsx(NodeViewWrapper, {
20443
- className: classnames$1("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
20443
+ className: classnames("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
20444
20444
  "neeto-editor__image--bordered": border
20445
20445
  }),
20446
20446
  children: /*#__PURE__*/jsxs("figure", {
@@ -20473,7 +20473,7 @@ var VideoComponent = function VideoComponent(_ref) {
20473
20473
  }))
20474
20474
  }), /*#__PURE__*/jsx(NodeViewContent, {
20475
20475
  as: "figcaption",
20476
- className: classnames$1({
20476
+ className: classnames({
20477
20477
  "is-empty": isEmpty$1(caption)
20478
20478
  }),
20479
20479
  style: {
@@ -20645,11 +20645,11 @@ var renderEmbedHTML = function renderEmbedHTML(node, HTMLAttributes, options) {
20645
20645
  border = _node$attrs.border,
20646
20646
  aspectRatio = _node$attrs.aspectRatio;
20647
20647
  return ["div", {
20648
- "class": classnames$1("neeto-editor__video-wrapper", "neeto-editor__video--".concat(align), {
20648
+ "class": classnames("neeto-editor__video-wrapper", "neeto-editor__video--".concat(align), {
20649
20649
  "neeto-editor__video--bordered": border
20650
20650
  })
20651
20651
  }, ["div", {
20652
- "class": classnames$1("neeto-editor__video-iframe", {
20652
+ "class": classnames("neeto-editor__video-iframe", {
20653
20653
  "neeto-editor-aspect-1-1": aspectRatio === "1/1",
20654
20654
  "neeto-editor-aspect-16-9": aspectRatio === "16/9",
20655
20655
  "neeto-editor-aspect-9-16": aspectRatio === "9/16",
@@ -20670,7 +20670,7 @@ var renderUploadHTML = function renderUploadHTML(node, HTMLAttributes, options)
20670
20670
  vidwidth = _node$attrs2.vidwidth,
20671
20671
  border = _node$attrs2.border;
20672
20672
  var wrapperDivAttrs = {
20673
- "class": classnames$1("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
20673
+ "class": classnames("neeto-editor__image-wrapper", "neeto-editor__image--".concat(align), {
20674
20674
  "neeto-editor__image--bordered": border
20675
20675
  })
20676
20676
  };
@@ -21459,7 +21459,7 @@ var KbArticleView = withT(function (_ref) {
21459
21459
  href: linkAttributes === null || linkAttributes === void 0 ? void 0 : linkAttributes.href,
21460
21460
  rel: "noreferrer",
21461
21461
  target: "_blank",
21462
- className: classnames$1("ne-link-popover__kb-article-link", {
21462
+ className: classnames("ne-link-popover__kb-article-link", {
21463
21463
  "ne-link-popover__kb-article-link--deleted": isDeleted
21464
21464
  }),
21465
21465
  onClick: function onClick(event) {
@@ -22043,7 +22043,7 @@ var Editor = function Editor(_ref, ref) {
22043
22043
  useEditorWarnings({
22044
22044
  initialValue: initialValue
22045
22045
  });
22046
- var editorClasses = classnames$1("neeto-editor", _defineProperty({
22046
+ var editorClasses = classnames("neeto-editor", _defineProperty({
22047
22047
  "fixed-menu-active": isFixedMenuActive,
22048
22048
  "bubble-menu-active": isBubbleMenuActive,
22049
22049
  "placeholder-active": isPlaceholderActive,
@@ -22135,7 +22135,7 @@ var Editor = function Editor(_ref, ref) {
22135
22135
  return /*#__PURE__*/jsxs("div", {
22136
22136
  "data-cy": "neeto-editor-wrapper",
22137
22137
  ref: wrapperRef,
22138
- className: classnames$1(_defineProperty(_defineProperty({}, className, className), "ne-attachments__wrapper", isAttachmentsActive)),
22138
+ className: classnames(_defineProperty(_defineProperty({}, className, className), "ne-attachments__wrapper", isAttachmentsActive)),
22139
22139
  children: [label && /*#__PURE__*/jsx(Label, {
22140
22140
  required: required,
22141
22141
  className: "neeto-ui-mb-2",
@@ -22181,7 +22181,7 @@ var Editor = function Editor(_ref, ref) {
22181
22181
  isIndependent: false,
22182
22182
  ref: addAttachmentsRef,
22183
22183
  setIsUploading: setIsAttachmentsUploading,
22184
- className: classnames$1("ne-attachments--integrated", _defineProperty({}, attachmentsClassName, attachmentsClassName)),
22184
+ className: classnames("ne-attachments--integrated", _defineProperty({}, attachmentsClassName, attachmentsClassName)),
22185
22185
  onChange: onChangeAttachments
22186
22186
  }, otherAttachmentProps)), (editor === null || editor === void 0 ? void 0 : editor.isActive("link")) && /*#__PURE__*/jsx(LinkPopOver, {
22187
22187
  deletedArticlesHook: deletedArticlesHook,