bm-core-ui 2.7.0 → 2.8.3

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.
@@ -343,7 +343,6 @@ BMExtend(BMCodeMirrorCodeEditor.prototype, BMCodeEditor.prototype, {
343
343
  export function BMMonacoCodeEditor() {} // <constructor>
344
344
 
345
345
  var _BMMonacoCodeEditorThemesCreated = NO;
346
- var _BMMonacoCodeEditorDefaultsSet = NO;
347
346
 
348
347
  /**
349
348
  * Invoked when creating a monaco code editor.
@@ -357,6 +356,7 @@ BMMonacoCodeEditor.createThemes = function () {
357
356
  monaco.editor.defineTheme('BMMonacoCodeEditorTheme', {
358
357
  base: 'vs',
359
358
  inherit: YES,
359
+ colors: [],
360
360
  rules: [
361
361
  {token: 'comment', foreground: 'CCCCCC'},
362
362
  {token: 'string', foreground: 'BC670F', background: 'FDFBF3'},
@@ -378,6 +378,7 @@ BMMonacoCodeEditor.createThemes = function () {
378
378
  monaco.editor.defineTheme('BMMonacoCodeEditorThemeDark', {
379
379
  base: 'vs-dark',
380
380
  inherit: YES,
381
+ colors: [],
381
382
  rules: [
382
383
  {token: 'comment', foreground: '555555'},
383
384
  {token: 'string', foreground: 'ee9452', background: 'FDFBF3'},
@@ -466,34 +467,30 @@ BMExtend(BMMonacoCodeEditor.prototype, BMCodeEditor.prototype, {
466
467
  };
467
468
 
468
469
  this._language = args.language || BMCodeEditorLanguage.Javascript;
470
+
471
+ monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
472
+ target: monaco.languages.typescript.ScriptTarget.ESNext,
473
+ allowNonTsExtensions: YES,
474
+ experimentalDecorators: YES,
475
+ strict: YES,
476
+ inlineSourceMap: YES,
477
+ module: monaco.languages.typescript.ModuleKind.CommonJS,
478
+ noImplicitUseStrict: YES
479
+ });
469
480
 
470
- if (!_BMMonacoCodeEditorDefaultsSet) {
471
- _BMMonacoCodeEditorDefaultsSet = YES;
472
-
473
- monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
474
- target: monaco.languages.typescript.ScriptTarget.ESNext,
475
- allowNonTsExtensions: YES,
476
- experimentalDecorators: YES,
477
- strict: YES,
478
- inlineSourceMap: YES,
479
- module: monaco.languages.typescript.ModuleKind.CommonJS,
480
- noImplicitUseStrict: YES
481
- });
481
+ monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
482
+ target: monaco.languages.typescript.ScriptTarget.ESNext,
483
+ allowNonTsExtensions: YES,
484
+ experimentalDecorators: YES,
485
+ strict: YES,
486
+ inlineSourceMap: YES,
487
+ inlineSources: YES,
488
+ noImplicitUseStrict: YES,
489
+ alwaysStrict: NO,
490
+ module: monaco.languages.typescript.ModuleKind.None,
491
+ useDefineForClassFields: NO,
492
+ });
482
493
 
483
- monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
484
- target: monaco.languages.typescript.ScriptTarget.ESNext,
485
- allowNonTsExtensions: YES,
486
- experimentalDecorators: YES,
487
- strict: YES,
488
- inlineSourceMap: YES,
489
- inlineSources: YES,
490
- noImplicitUseStrict: YES,
491
- alwaysStrict: NO,
492
- module: monaco.languages.typescript.ModuleKind.None,
493
- useDefineForClassFields: NO,
494
- });
495
- }
496
-
497
494
  this._monaco = monaco.editor.create(container, options);
498
495
 
499
496
  var self = this;