@bigbinary/neeto-editor 1.39.4 → 1.39.6

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.
@@ -1,13 +1,13 @@
1
1
  import _extends from '@babel/runtime/helpers/extends';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import React__default, { forwardRef } from 'react';
3
+ import React__default, { memo, forwardRef } from 'react';
4
4
  import { FastField } from 'formik';
5
5
  import { noop } from '@bigbinary/neeto-cist';
6
6
  import Editor from './Editor.js';
7
7
  import '@babel/runtime/helpers/defineProperty';
8
8
  import '@babel/runtime/helpers/toConsumableArray';
9
9
  import '@babel/runtime/helpers/slicedToArray';
10
- import './chunk-1888361f.js';
10
+ import './chunk-7fc1f9b9.js';
11
11
  import 'ramda';
12
12
  import './chunk-15c449f1.js';
13
13
  import 'i18next';
@@ -44,7 +44,7 @@ import '@bigbinary/neeto-molecules/CopyToClipboardButton';
44
44
  import './chunk-ade4c9e3.js';
45
45
  import './chunk-5bc5e361.js';
46
46
  import '@bigbinary/neetoui/formik';
47
- import './chunk-b66ef3a3.js';
47
+ import './chunk-e038b63a.js';
48
48
 
49
49
  var _excluded = ["name", "onChange", "shouldUpdate", "attachments", "mentions", "variables"];
50
50
  var FormikEditor = function FormikEditor(_ref, ref) {
@@ -70,13 +70,13 @@ var FormikEditor = function FormikEditor(_ref, ref) {
70
70
  form = _ref2.form,
71
71
  meta = _ref2.meta;
72
72
  return /*#__PURE__*/React__default.createElement(Editor, _extends({
73
- error: meta.touched ? meta.error : "",
74
- initialValue: field.value,
75
73
  attachments: attachments,
76
74
  mentions: mentions,
77
75
  name: name,
78
76
  ref: ref,
79
77
  variables: variables,
78
+ error: meta.touched ? meta.error : "",
79
+ initialValue: field.value,
80
80
  onBlur: function onBlur() {
81
81
  return form.setFieldTouched(name, true);
82
82
  },
@@ -87,7 +87,8 @@ var FormikEditor = function FormikEditor(_ref, ref) {
87
87
  }, otherProps));
88
88
  });
89
89
  };
90
- var FormikEditor$1 = /*#__PURE__*/forwardRef(FormikEditor);
90
+ FormikEditor.displayName = "FormikNeetoEditor";
91
+ var FormikEditor$1 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(FormikEditor));
91
92
 
92
93
  export { FormikEditor$1 as default };
93
94
  //# sourceMappingURL=FormikEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormikEditor.js","sources":["../src/components/Editor/FormikEditor.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { FastField } from \"formik\";\nimport { noop } from \"neetocist\";\n\nimport Editor from \".\";\n\nconst FormikEditor = (\n {\n name,\n onChange = noop,\n shouldUpdate,\n attachments = [],\n mentions = [],\n variables = [],\n ...otherProps\n },\n ref\n) => (\n <FastField {...{ attachments, mentions, name, shouldUpdate, variables }}>\n {({ field, form, meta }) => (\n <Editor\n error={meta.touched ? meta.error : \"\"}\n initialValue={field.value}\n {...{ attachments, mentions, name, ref, variables }}\n onBlur={() => form.setFieldTouched(name, true)}\n onChange={value => {\n form.setFieldValue(name, value);\n onChange?.(value);\n }}\n {...otherProps}\n />\n )}\n </FastField>\n);\n\nexport default forwardRef(FormikEditor);\n"],"names":["FormikEditor","_ref","ref","name","_ref$onChange","onChange","noop","shouldUpdate","_ref$attachments","attachments","_ref$mentions","mentions","_ref$variables","variables","otherProps","_objectWithoutProperties","_excluded","React","createElement","FastField","_ref2","field","form","meta","Editor","_extends","error","touched","initialValue","value","onBlur","setFieldTouched","setFieldValue","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAUhBC,GAAG,EAAA;AAAA,EAAA,IARDC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,aAAA,GAAAH,IAAA,CACJI,QAAQ;AAARA,IAAAA,SAAQ,GAAAD,aAAA,KAAGE,KAAAA,CAAAA,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AATA,SAAS;MACjDiB,MAAM,EAAE,SAAAA,MAAA,GAAA;AAAA,QAAA,OAAMR,IAAI,CAACS,eAAe,CAAC5B,IAAI,EAAE,IAAI,CAAC,CAAA;OAAC;AAC/CE,MAAAA,QAAQ,EAAE,SAAAA,QAAAwB,CAAAA,KAAK,EAAI;AACjBP,QAAAA,IAAI,CAACU,aAAa,CAAC7B,IAAI,EAAE0B,KAAK,CAAC,CAAA;AAC/BxB,QAAAA,SAAQ,aAARA,SAAQ,KAAA,KAAA,CAAA,IAARA,SAAQ,CAAGwB,KAAK,CAAC,CAAA;AACnB,OAAA;KACIf,EAAAA,UAAU,CACf,CAAC,CAAA;AAAA,GAEK,CAAC,CAAA;AAAA,CACb,CAAA;AAED,qBAAemB,aAAAA,UAAU,CAACjC,YAAY,CAAC;;;;"}
1
+ {"version":3,"file":"FormikEditor.js","sources":["../src/components/Editor/FormikEditor.jsx"],"sourcesContent":["import React, { forwardRef, memo } from \"react\";\n\nimport { FastField } from \"formik\";\nimport { noop } from \"neetocist\";\n\nimport Editor from \".\";\n\nconst FormikEditor = (\n {\n name,\n onChange = noop,\n shouldUpdate,\n attachments = [],\n mentions = [],\n variables = [],\n ...otherProps\n },\n ref\n) => (\n <FastField {...{ attachments, mentions, name, shouldUpdate, variables }}>\n {({ field, form, meta }) => (\n <Editor\n {...{ attachments, mentions, name, ref, variables }}\n error={meta.touched ? meta.error : \"\"}\n initialValue={field.value}\n onBlur={() => form.setFieldTouched(name, true)}\n onChange={value => {\n form.setFieldValue(name, value);\n onChange?.(value);\n }}\n {...otherProps}\n />\n )}\n </FastField>\n);\n\nFormikEditor.displayName = \"FormikNeetoEditor\";\n\nexport default memo(forwardRef(FormikEditor));\n"],"names":["FormikEditor","_ref","ref","name","_ref$onChange","onChange","noop","shouldUpdate","_ref$attachments","attachments","_ref$mentions","mentions","_ref$variables","variables","otherProps","_objectWithoutProperties","_excluded","React","createElement","FastField","_ref2","field","form","meta","Editor","_extends","error","touched","initialValue","value","onB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cAAA,CAAAC,aAAA,CAACM,MAAM,EAAAC,QAAA,CAAA;AACChB,MAAAA,WAAW,EAAXA,WAAW;AAAEE,MAAAA,QAAQ,EAARA,QAAQ;AAAER,MAAAA,IAAI,EAAJA,IAAI;AAAED,MAAAA,GAAG,EAAHA,GAAG;AAAEW,MAAAA,SAAS,EAATA,SAAS;MACjDa,KAAK,EAAEH,IAAI,CAACI,OAAO,GAAGJ,IAAI,CAACG,KAAK,GAAG,EAAG;MACtCE,YAAY,EAAEP,KAAK,CAACQ,KAAM;MAC1BC,MAAM,EAAE,SAAAA,MAAA,GAAA;AAAA,QAAA,OAAMR,IAAI,CAACS,eAAe,CAAC5B,IAAI,EAAE,IAAI,CAAC,CAAA;OAAC;AAC/CE,MAAAA,QAAQ,EAAE,SAAAA,QAAAwB,CAAAA,KAAK,EAAI;AACjBP,QAAAA,IAAI,CAACU,aAAa,CAAC7B,IAAI,EAAE0B,KAAK,CAAC,CAAA;AAC/BxB,QAAAA,SAAQ,aAARA,SAAQ,KAAA,KAAA,CAAA,IAARA,SAAQ,CAAGwB,KAAK,CAAC,CAAA;AACnB,OAAA;KACIf,EAAAA,UAAU,CACf,CAAC,CAAA;AAAA,GAEK,CAAC,CAAA;AAAA,CACb,CAAA;AAEDd,YAAY,CAACiC,WAAW,GAAG,mBAAmB,CAAA;AAE9C,qBAAA,aAAeC,IAAI,eAACC,UAAU,CAACnC,YAAY,CAAC,CAAC;;;;"}
package/dist/Menu.js CHANGED
@@ -4,7 +4,7 @@ import '@babel/runtime/helpers/toConsumableArray';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import 'react';
6
6
  import 'ramda';
7
- export { M as default } from './chunk-1888361f.js';
7
+ export { M as default } from './chunk-7fc1f9b9.js';
8
8
  import './chunk-e876ad10.js';
9
9
  import './chunk-15c449f1.js';
10
10
  import 'i18next';
@@ -24,7 +24,7 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
24
24
  import _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';
25
25
  import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
26
26
  import { useTranslation, Trans } from 'react-i18next';
27
- import { d as downloadFile, c as checkPreviewAvailability, a as ATTACHMENTS_PREVIEW_DATA_CY } from './chunk-b66ef3a3.js';
27
+ import { d as downloadFile, c as checkPreviewAvailability, a as ATTACHMENTS_PREVIEW_DATA_CY } from './chunk-e038b63a.js';
28
28
  import '@babel/runtime/helpers/toConsumableArray';
29
29
  import '@babel/runtime/helpers/slicedToArray';
30
30
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -69005,4 +69005,4 @@ var Preview = function Preview(_ref) {
69005
69005
  };
69006
69006
 
69007
69007
  export { Preview as default };
69008
- //# sourceMappingURL=chunk-8b1f773d.js.map
69008
+ //# sourceMappingURL=chunk-6693eb0a.js.map