@fc-components/monaco-editor 0.1.19 → 0.1.21

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.
@@ -2025,7 +2025,9 @@ var getStyles = function getStyles(placeholder) {
2025
2025
  };
2026
2026
  function PromQLEditor(props) {
2027
2027
  var id = uuid.v4();
2028
- var _props$size = props.size,
2028
+ var _props$className = props.className,
2029
+ className = _props$className === void 0 ? '' : _props$className,
2030
+ _props$size = props.size,
2029
2031
  size = _props$size === void 0 ? 'middle' : _props$size,
2030
2032
  _props$theme = props.theme,
2031
2033
  theme = _props$theme === void 0 ? 'light' : _props$theme,
@@ -2238,7 +2240,10 @@ function PromQLEditor(props) {
2238
2240
  }
2239
2241
  }, [enableAutocomplete, props.url, props.lookbackInterval, JSON.stringify(props.variablesNames), props.durationVariablesCompletion, props.httpMethod, props.apiPrefix, placeholder, enableRequests]);
2240
2242
  return React__default.createElement("div", {
2241
- className: 'ant-input' + (size ? " " + SIZE_MAP[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName : '') + (readOnly ? " " + containerReadOnlyClassName : '')
2243
+ className: 'ant-input' + (size ? " " + SIZE_MAP[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName : '') + (readOnly ? " " + containerReadOnlyClassName : '') + (" " + className),
2244
+ style: {
2245
+ display: 'block'
2246
+ }
2242
2247
  }, React__default.createElement("div", {
2243
2248
  ref: containerRef
2244
2249
  }, React__default.createElement(MonacoEditor, {
@@ -3478,17 +3483,20 @@ var SIZE_MAP$2 = {
3478
3483
  small: {
3479
3484
  className: 'ant-input-sm',
3480
3485
  top: 1,
3481
- bottom: 1
3486
+ bottom: 1,
3487
+ minHeight: 24
3482
3488
  },
3483
3489
  middle: {
3484
3490
  className: 'ant-input-md',
3485
3491
  top: 1,
3486
- bottom: 1
3492
+ bottom: 1,
3493
+ minHeight: 32
3487
3494
  },
3488
3495
  large: {
3489
3496
  className: 'ant-input-lg',
3490
3497
  top: 3,
3491
- bottom: 2
3498
+ bottom: 2,
3499
+ minHeight: 40
3492
3500
  }
3493
3501
  };
3494
3502
  var themeMap$2 = {
@@ -3499,7 +3507,9 @@ var containerDisabledClassName$2 = /*#__PURE__*/css.css(_templateObject$2 || (_t
3499
3507
  var containerReadOnlyClassName$2 = /*#__PURE__*/css.css(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .monaco-editor .cursors-layer > .cursor {\n opacity: 0 !important;\n }\n"])));
3500
3508
  function SqlEditor(props) {
3501
3509
  var id = uuid.v4();
3502
- var _props$size = props.size,
3510
+ var maxHeight = props.maxHeight,
3511
+ fontSize = props.fontSize,
3512
+ _props$size = props.size,
3503
3513
  size = _props$size === void 0 ? 'middle' : _props$size,
3504
3514
  _props$theme = props.theme,
3505
3515
  theme = _props$theme === void 0 ? 'light' : _props$theme,
@@ -3632,7 +3642,13 @@ function SqlEditor(props) {
3632
3642
  };
3633
3643
  var themeValue = themeMap$2[theme];
3634
3644
  return React__default.createElement("div", {
3635
- className: 'ant-input' + (size ? " " + SIZE_MAP$2[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName$2 : '') + (readOnly ? " " + containerReadOnlyClassName$2 : '')
3645
+ className: 'ant-input' + (size ? " " + SIZE_MAP$2[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName$2 : '') + (readOnly ? " " + containerReadOnlyClassName$2 : ''),
3646
+ style: {
3647
+ resize: 'vertical',
3648
+ overflow: 'auto',
3649
+ minHeight: SIZE_MAP$2[size].minHeight,
3650
+ maxHeight: maxHeight
3651
+ }
3636
3652
  }, React__default.createElement("div", {
3637
3653
  ref: containerRef
3638
3654
  }, React__default.createElement(MonacoEditor, {
@@ -3655,9 +3671,12 @@ function SqlEditor(props) {
3655
3671
  readOnly: readOnly || disabled,
3656
3672
  scrollBeyondLastLine: false,
3657
3673
  smoothScrolling: true,
3674
+ fontSize: fontSize,
3675
+ lineHeight: 24,
3658
3676
  tabSize: 2,
3659
3677
  wordWrap: 'on',
3660
3678
  automaticLayout: true,
3679
+ fixedOverflowWidgets: true,
3661
3680
  glyphMargin: false,
3662
3681
  lineNumbers: 'off',
3663
3682
  lineNumbersMinChars: 0,
@@ -3667,7 +3686,12 @@ function SqlEditor(props) {
3667
3686
  overviewRulerLanes: 0,
3668
3687
  placeholder: placeholder,
3669
3688
  renderLineHighlight: 'none',
3670
- occurrencesHighlight: 'off'
3689
+ occurrencesHighlight: 'off',
3690
+ scrollbar: {
3691
+ vertical: 'hidden',
3692
+ horizontal: 'hidden',
3693
+ alwaysConsumeMouseWheel: false
3694
+ }
3671
3695
  }
3672
3696
  })));
3673
3697
  }