@hpcc-js/codemirror 2.60.13 → 2.61.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/dist/index.es6.js +22 -2
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
- package/src/Editor.ts +30 -7
- package/src/__package__.ts +2 -2
- package/types/Editor.d.ts +6 -0
- package/types/Editor.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/Editor.d.ts +6 -0
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Palette, HTMLWidget } from '@hpcc-js/common';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/codemirror";
|
|
4
|
-
var PKG_VERSION = "2.
|
|
5
|
-
var BUILD_VERSION = "2.104.
|
|
4
|
+
var PKG_VERSION = "2.61.0";
|
|
5
|
+
var BUILD_VERSION = "2.104.34";
|
|
6
6
|
|
|
7
7
|
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -16391,6 +16391,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
16391
16391
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
16392
16392
|
_this._markedText = [];
|
|
16393
16393
|
_this._initialText = "";
|
|
16394
|
+
_this._options = new Map();
|
|
16394
16395
|
return _this;
|
|
16395
16396
|
}
|
|
16396
16397
|
Editor.prototype.options = function () {
|
|
@@ -16401,6 +16402,19 @@ var Editor = /** @class */ (function (_super) {
|
|
|
16401
16402
|
tabSize: 2
|
|
16402
16403
|
};
|
|
16403
16404
|
};
|
|
16405
|
+
Editor.prototype.option = function (option, value) {
|
|
16406
|
+
if (this._codemirror) {
|
|
16407
|
+
if (arguments.length < 2) {
|
|
16408
|
+
return this._codemirror.getOption(option);
|
|
16409
|
+
}
|
|
16410
|
+
this._codemirror.setOption(option, value);
|
|
16411
|
+
return this;
|
|
16412
|
+
}
|
|
16413
|
+
if (arguments.length < 2) {
|
|
16414
|
+
return this._options.get(option);
|
|
16415
|
+
}
|
|
16416
|
+
this._options.set(option, value);
|
|
16417
|
+
};
|
|
16404
16418
|
Editor.prototype.guttersOption = function () {
|
|
16405
16419
|
var gutters = ["CodeMirror-linenumbers"];
|
|
16406
16420
|
if (this.gutterMarkerWidth() > 0) {
|
|
@@ -16522,6 +16536,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
16522
16536
|
this._codemirror.on("changes", function (cm, changes) {
|
|
16523
16537
|
_this.changes(changes);
|
|
16524
16538
|
});
|
|
16539
|
+
this._options.forEach(function (value, key) {
|
|
16540
|
+
_this._codemirror.setOption(key, value);
|
|
16541
|
+
});
|
|
16525
16542
|
this.text(this._initialText);
|
|
16526
16543
|
};
|
|
16527
16544
|
Editor.prototype.update = function (domNode, Element) {
|
|
@@ -16534,6 +16551,9 @@ var Editor = /** @class */ (function (_super) {
|
|
|
16534
16551
|
// Events ---
|
|
16535
16552
|
Editor.prototype.changes = function (changes) {
|
|
16536
16553
|
};
|
|
16554
|
+
/**
|
|
16555
|
+
* @deprecated Replaced with `option`
|
|
16556
|
+
*/
|
|
16537
16557
|
Editor.prototype.setOption = function (option, value) {
|
|
16538
16558
|
this._codemirror.setOption(option, value);
|
|
16539
16559
|
};
|