@commercetools-uikit/localized-rich-text-input 18.0.0 → 18.2.0
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/README.md +23 -22
- package/dist/commercetools-uikit-localized-rich-text-input.cjs.dev.js +19 -10
- package/dist/commercetools-uikit-localized-rich-text-input.cjs.prod.js +9 -3
- package/dist/commercetools-uikit-localized-rich-text-input.esm.js +19 -10
- package/dist/declarations/src/localized-rich-text-input.d.ts +4 -0
- package/package.json +16 -16
|
@@ -39,13 +39,13 @@ var CollapsibleMotion = require('@commercetools-uikit/collapsible-motion');
|
|
|
39
39
|
var icons = require('@commercetools-uikit/icons');
|
|
40
40
|
var Text = require('@commercetools-uikit/text');
|
|
41
41
|
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
42
|
+
var messages = require('@commercetools-uikit/messages');
|
|
42
43
|
var slateReact = require('slate-react');
|
|
43
44
|
var slate = require('slate');
|
|
44
45
|
var slateHistory = require('slate-history');
|
|
45
46
|
var isHotkey = require('is-hotkey');
|
|
46
47
|
var pipe = require('lodash/fp/pipe');
|
|
47
48
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
48
|
-
var messages = require('@commercetools-uikit/messages');
|
|
49
49
|
|
|
50
50
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
51
51
|
|
|
@@ -183,7 +183,7 @@ const Editor = /*#__PURE__*/react.forwardRef((props, forwardedRef) => {
|
|
|
183
183
|
and LocalizedInputToggle is placed below the errors/warnings.
|
|
184
184
|
*/
|
|
185
185
|
|
|
186
|
-
renderToggleButton && !props.hasLanguagesControl || props.error || props.warning;
|
|
186
|
+
renderToggleButton && !props.hasLanguagesControl || props.error || props.warning || props.additionalInfo;
|
|
187
187
|
return jsxRuntime.jsx(CollapsibleMotion__default["default"], {
|
|
188
188
|
minHeight: COLLAPSED_HEIGHT,
|
|
189
189
|
isClosed: !props.isOpen,
|
|
@@ -304,6 +304,10 @@ const Editor = /*#__PURE__*/react.forwardRef((props, forwardedRef) => {
|
|
|
304
304
|
})
|
|
305
305
|
})
|
|
306
306
|
})]
|
|
307
|
+
}), props.additionalInfo && jsxRuntime.jsx(LeftColumn, {
|
|
308
|
+
children: jsxRuntime.jsx(messages.AdditionalInfoMessage, {
|
|
309
|
+
message: props.additionalInfo
|
|
310
|
+
})
|
|
307
311
|
})]
|
|
308
312
|
});
|
|
309
313
|
}
|
|
@@ -387,6 +391,7 @@ let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
387
391
|
isOpen: this.props.isOpen,
|
|
388
392
|
warning: this.props.warning,
|
|
389
393
|
error: this.props.error,
|
|
394
|
+
additionalInfo: this.props.additionalInfo,
|
|
390
395
|
hasLanguagesControl: this.props.hasLanguagesControl,
|
|
391
396
|
ref: this.props.parentRef
|
|
392
397
|
}));
|
|
@@ -534,6 +539,7 @@ const LocalizedRichTextInput = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
534
539
|
hasWarning: Boolean(props.hasWarning || props.warnings && props.warnings[language]),
|
|
535
540
|
warning: props.warnings && props.warnings[language],
|
|
536
541
|
error: props.errors && props.errors[language],
|
|
542
|
+
additionalInfo: props.additionalInfo && props.additionalInfo[language],
|
|
537
543
|
showExpandIcon: props.showExpandIcon,
|
|
538
544
|
onClickExpand: props.onClickExpand,
|
|
539
545
|
hasLanguagesControl: hasLanguagesControl,
|
|
@@ -562,7 +568,7 @@ LocalizedRichTextInput.isTouched = localizedUtils.isTouched;
|
|
|
562
568
|
var LocalizedRichTextInput$1 = LocalizedRichTextInput;
|
|
563
569
|
|
|
564
570
|
// NOTE: This string will be replaced on build time with the package version.
|
|
565
|
-
var version = "18.
|
|
571
|
+
var version = "18.2.0";
|
|
566
572
|
|
|
567
573
|
exports["default"] = LocalizedRichTextInput$1;
|
|
568
574
|
exports.version = version;
|