hadron-document 7.4.1 → 7.7.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/index.js +1 -2
- package/lib/document.js +1 -1
- package/lib/element.js +5 -7
- package/lib/index.js +4 -0
- package/package.json +24 -15
- package/src/element.js +1 -2
- package/src/index.js +2 -0
package/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
module.exports = require('./lib
|
|
2
|
-
module.exports.Element = require('./lib/element');
|
|
1
|
+
module.exports = require('./lib');
|
package/lib/document.js
CHANGED
|
@@ -26,7 +26,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
26
26
|
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
28
28
|
|
|
29
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
29
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
30
30
|
|
|
31
31
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
32
32
|
|
package/lib/element.js
CHANGED
|
@@ -20,7 +20,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
20
20
|
|
|
21
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22
22
|
|
|
23
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
23
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
24
24
|
|
|
25
25
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
26
|
|
|
@@ -40,8 +40,6 @@ var isEqual = require('lodash.isequal');
|
|
|
40
40
|
|
|
41
41
|
var isString = require('lodash.isstring');
|
|
42
42
|
|
|
43
|
-
var includes = require('lodash.includes');
|
|
44
|
-
|
|
45
43
|
var ObjectGenerator = require('./object-generator');
|
|
46
44
|
|
|
47
45
|
var TypeChecker = require('hadron-type-checker');
|
|
@@ -596,7 +594,7 @@ var Element = /*#__PURE__*/function (_EventEmitter) {
|
|
|
596
594
|
}, {
|
|
597
595
|
key: "isValueEditable",
|
|
598
596
|
value: function isValueEditable() {
|
|
599
|
-
return this.isKeyEditable() && !includes(
|
|
597
|
+
return this.isKeyEditable() && !UNEDITABLE_TYPES.includes(this.currentType);
|
|
600
598
|
}
|
|
601
599
|
/**
|
|
602
600
|
* Determine if the key of the parent element is editable.
|
|
@@ -866,7 +864,7 @@ var Element = /*#__PURE__*/function (_EventEmitter) {
|
|
|
866
864
|
*/
|
|
867
865
|
|
|
868
866
|
|
|
869
|
-
var LinkedList = /*#__PURE__*/function () {
|
|
867
|
+
var LinkedList = /*#__PURE__*/function (_Symbol$iterator) {
|
|
870
868
|
// Instantiate the new doubly linked list.
|
|
871
869
|
function LinkedList(doc, originalDoc) {
|
|
872
870
|
_classCallCheck(this, LinkedList);
|
|
@@ -1073,7 +1071,7 @@ var LinkedList = /*#__PURE__*/function () {
|
|
|
1073
1071
|
*/
|
|
1074
1072
|
|
|
1075
1073
|
}, {
|
|
1076
|
-
key:
|
|
1074
|
+
key: _Symbol$iterator,
|
|
1077
1075
|
value: function value() {
|
|
1078
1076
|
var _this2 = this;
|
|
1079
1077
|
|
|
@@ -1230,7 +1228,7 @@ var LinkedList = /*#__PURE__*/function () {
|
|
|
1230
1228
|
}]);
|
|
1231
1229
|
|
|
1232
1230
|
return LinkedList;
|
|
1233
|
-
}();
|
|
1231
|
+
}(Symbol.iterator);
|
|
1234
1232
|
|
|
1235
1233
|
module.exports = Element;
|
|
1236
1234
|
module.exports.LinkedList = LinkedList;
|
package/lib/index.js
ADDED
package/package.json
CHANGED
|
@@ -2,38 +2,47 @@
|
|
|
2
2
|
"name": "hadron-document",
|
|
3
3
|
"description": "Hadron Document",
|
|
4
4
|
"author": "Durran Jordan <durran@gmail.com>",
|
|
5
|
-
"bugs":
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
|
|
7
|
+
"email": "compass@mongodb.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/mongodb-js/compass",
|
|
10
|
+
"version": "7.7.0",
|
|
8
11
|
"repository": {
|
|
9
12
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/mongodb-js/
|
|
13
|
+
"url": "https://github.com/mongodb-js/compass.git"
|
|
11
14
|
},
|
|
12
15
|
"license": "SSPL",
|
|
13
16
|
"keywords": [
|
|
14
17
|
"mongodb-js"
|
|
15
18
|
],
|
|
19
|
+
"main": "index.js",
|
|
20
|
+
"exports": {
|
|
21
|
+
"webpack": "./src/index.js",
|
|
22
|
+
"require": "./index.js"
|
|
23
|
+
},
|
|
16
24
|
"scripts": {
|
|
17
25
|
"test-check-ci": "npm test",
|
|
18
26
|
"test": "mocha",
|
|
19
27
|
"check": "npm run lint && npm run depcheck",
|
|
20
|
-
"
|
|
28
|
+
"compile": "babel ./src --out-dir ./lib",
|
|
29
|
+
"pretest": "npm run compile",
|
|
21
30
|
"lint": "eslint \"./{src,lib,test,bin}/**/*.{js,jsx,ts,tsx}\" \"./*.js\" --no-error-on-unmatched-pattern",
|
|
22
31
|
"depcheck": "depcheck",
|
|
23
32
|
"test-ci": "npm run test",
|
|
24
|
-
"
|
|
33
|
+
"prepublishOnly": "npm run compile",
|
|
34
|
+
"bootstrap": "npm run compile"
|
|
25
35
|
},
|
|
26
36
|
"dependencies": {
|
|
27
|
-
"debug": "
|
|
37
|
+
"debug": "4.3.0",
|
|
28
38
|
"eventemitter3": "^4.0.0",
|
|
29
|
-
"hadron-type-checker": "^6.
|
|
30
|
-
"lodash.foreach": "^4.
|
|
31
|
-
"lodash.includes": "^4.1.3",
|
|
39
|
+
"hadron-type-checker": "^6.6.0",
|
|
40
|
+
"lodash.foreach": "^4.5.0",
|
|
32
41
|
"lodash.isarray": "^4.0.0",
|
|
33
42
|
"lodash.isequal": "^4.5.0",
|
|
34
|
-
"lodash.isplainobject": "^4.0.
|
|
43
|
+
"lodash.isplainobject": "^4.0.6",
|
|
35
44
|
"lodash.isstring": "^4.0.1",
|
|
36
|
-
"lodash.keys": "^4.0
|
|
45
|
+
"lodash.keys": "^4.2.0",
|
|
37
46
|
"react": "^16.14.0",
|
|
38
47
|
"react-dom": "^16.14.0",
|
|
39
48
|
"uuid": "^7.0.3"
|
|
@@ -49,11 +58,11 @@
|
|
|
49
58
|
"babel-loader": "^8.2.2",
|
|
50
59
|
"bson": "^4.4.1",
|
|
51
60
|
"chai": "^4.2.0",
|
|
52
|
-
"depcheck": "^1.4.
|
|
61
|
+
"depcheck": "^1.4.1",
|
|
53
62
|
"eslint": "^7.25.0",
|
|
54
63
|
"eslint-config-mongodb-js": "^5.0.3",
|
|
55
64
|
"mocha": "^7.0.1",
|
|
56
|
-
"moment": "^2.
|
|
65
|
+
"moment": "^2.27.0"
|
|
57
66
|
},
|
|
58
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "77166e3754e36e95c7ff7efb5a0ce5e0990b0ff7"
|
|
59
68
|
}
|
package/src/element.js
CHANGED
|
@@ -6,7 +6,6 @@ const isObject = require('lodash.isplainobject');
|
|
|
6
6
|
const isArray = require('lodash.isarray');
|
|
7
7
|
const isEqual = require('lodash.isequal');
|
|
8
8
|
const isString = require('lodash.isstring');
|
|
9
|
-
const includes = require('lodash.includes');
|
|
10
9
|
const ObjectGenerator = require('./object-generator');
|
|
11
10
|
const TypeChecker = require('hadron-type-checker');
|
|
12
11
|
const uuid = require('uuid');
|
|
@@ -456,7 +455,7 @@ class Element extends EventEmitter {
|
|
|
456
455
|
* @returns {Boolean} If the value is editable.
|
|
457
456
|
*/
|
|
458
457
|
isValueEditable() {
|
|
459
|
-
return this.isKeyEditable() && !includes(
|
|
458
|
+
return this.isKeyEditable() && !UNEDITABLE_TYPES.includes(this.currentType);
|
|
460
459
|
}
|
|
461
460
|
|
|
462
461
|
/**
|
package/src/index.js
ADDED