@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.
@@ -2019,7 +2019,9 @@ var getStyles = function getStyles(placeholder) {
2019
2019
  };
2020
2020
  function PromQLEditor(props) {
2021
2021
  var id = v4();
2022
- var _props$size = props.size,
2022
+ var _props$className = props.className,
2023
+ className = _props$className === void 0 ? '' : _props$className,
2024
+ _props$size = props.size,
2023
2025
  size = _props$size === void 0 ? 'middle' : _props$size,
2024
2026
  _props$theme = props.theme,
2025
2027
  theme = _props$theme === void 0 ? 'light' : _props$theme,
@@ -2232,7 +2234,10 @@ function PromQLEditor(props) {
2232
2234
  }
2233
2235
  }, [enableAutocomplete, props.url, props.lookbackInterval, JSON.stringify(props.variablesNames), props.durationVariablesCompletion, props.httpMethod, props.apiPrefix, placeholder, enableRequests]);
2234
2236
  return React.createElement("div", {
2235
- className: 'ant-input' + (size ? " " + SIZE_MAP[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName : '') + (readOnly ? " " + containerReadOnlyClassName : '')
2237
+ className: 'ant-input' + (size ? " " + SIZE_MAP[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName : '') + (readOnly ? " " + containerReadOnlyClassName : '') + (" " + className),
2238
+ style: {
2239
+ display: 'block'
2240
+ }
2236
2241
  }, React.createElement("div", {
2237
2242
  ref: containerRef
2238
2243
  }, React.createElement(MonacoEditor, {
@@ -3472,17 +3477,20 @@ var SIZE_MAP$2 = {
3472
3477
  small: {
3473
3478
  className: 'ant-input-sm',
3474
3479
  top: 1,
3475
- bottom: 1
3480
+ bottom: 1,
3481
+ minHeight: 24
3476
3482
  },
3477
3483
  middle: {
3478
3484
  className: 'ant-input-md',
3479
3485
  top: 1,
3480
- bottom: 1
3486
+ bottom: 1,
3487
+ minHeight: 32
3481
3488
  },
3482
3489
  large: {
3483
3490
  className: 'ant-input-lg',
3484
3491
  top: 3,
3485
- bottom: 2
3492
+ bottom: 2,
3493
+ minHeight: 40
3486
3494
  }
3487
3495
  };
3488
3496
  var themeMap$2 = {
@@ -3493,7 +3501,9 @@ var containerDisabledClassName$2 = /*#__PURE__*/css(_templateObject$2 || (_templ
3493
3501
  var containerReadOnlyClassName$2 = /*#__PURE__*/css(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .monaco-editor .cursors-layer > .cursor {\n opacity: 0 !important;\n }\n"])));
3494
3502
  function SqlEditor(props) {
3495
3503
  var id = v4();
3496
- var _props$size = props.size,
3504
+ var maxHeight = props.maxHeight,
3505
+ fontSize = props.fontSize,
3506
+ _props$size = props.size,
3497
3507
  size = _props$size === void 0 ? 'middle' : _props$size,
3498
3508
  _props$theme = props.theme,
3499
3509
  theme = _props$theme === void 0 ? 'light' : _props$theme,
@@ -3626,7 +3636,13 @@ function SqlEditor(props) {
3626
3636
  };
3627
3637
  var themeValue = themeMap$2[theme];
3628
3638
  return React.createElement("div", {
3629
- className: 'ant-input' + (size ? " " + SIZE_MAP$2[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName$2 : '') + (readOnly ? " " + containerReadOnlyClassName$2 : '')
3639
+ className: 'ant-input' + (size ? " " + SIZE_MAP$2[size].className : '') + (disabled ? " ant-input-disabled " + containerDisabledClassName$2 : '') + (readOnly ? " " + containerReadOnlyClassName$2 : ''),
3640
+ style: {
3641
+ resize: 'vertical',
3642
+ overflow: 'auto',
3643
+ minHeight: SIZE_MAP$2[size].minHeight,
3644
+ maxHeight: maxHeight
3645
+ }
3630
3646
  }, React.createElement("div", {
3631
3647
  ref: containerRef
3632
3648
  }, React.createElement(MonacoEditor, {
@@ -3649,9 +3665,12 @@ function SqlEditor(props) {
3649
3665
  readOnly: readOnly || disabled,
3650
3666
  scrollBeyondLastLine: false,
3651
3667
  smoothScrolling: true,
3668
+ fontSize: fontSize,
3669
+ lineHeight: 24,
3652
3670
  tabSize: 2,
3653
3671
  wordWrap: 'on',
3654
3672
  automaticLayout: true,
3673
+ fixedOverflowWidgets: true,
3655
3674
  glyphMargin: false,
3656
3675
  lineNumbers: 'off',
3657
3676
  lineNumbersMinChars: 0,
@@ -3661,7 +3680,12 @@ function SqlEditor(props) {
3661
3680
  overviewRulerLanes: 0,
3662
3681
  placeholder: placeholder,
3663
3682
  renderLineHighlight: 'none',
3664
- occurrencesHighlight: 'off'
3683
+ occurrencesHighlight: 'off',
3684
+ scrollbar: {
3685
+ vertical: 'hidden',
3686
+ horizontal: 'hidden',
3687
+ alwaysConsumeMouseWheel: false
3688
+ }
3665
3689
  }
3666
3690
  })));
3667
3691
  }