@azrico/webobject 1.2.25 → 1.2.27
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.
|
@@ -35,8 +35,6 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
35
35
|
|
|
36
36
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
37
37
|
|
|
38
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
-
|
|
40
38
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
|
41
39
|
|
|
42
40
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
|
@@ -68,8 +66,6 @@ var ParentWebObject = /*#__PURE__*/function (_WebObject) {
|
|
|
68
66
|
|
|
69
67
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
70
68
|
|
|
71
|
-
_defineProperty(_assertThisInitialized(_this), "__parent__table_id", "");
|
|
72
|
-
|
|
73
69
|
_classPrivateFieldInitSpec(_assertThisInitialized(_this), _children_items, {
|
|
74
70
|
writable: true,
|
|
75
71
|
value: undefined
|
|
@@ -84,6 +80,13 @@ var ParentWebObject = /*#__PURE__*/function (_WebObject) {
|
|
|
84
80
|
return _classPrivateFieldGet(this, _children_items);
|
|
85
81
|
},
|
|
86
82
|
set: function set(val) {
|
|
83
|
+
if (Array.isArray(val)) {
|
|
84
|
+
var selftableid = this.__table_id;
|
|
85
|
+
val.forEach(function (v) {
|
|
86
|
+
v.__parent__table_id = selftableid;
|
|
87
|
+
});
|
|
88
|
+
} else val = [];
|
|
89
|
+
|
|
87
90
|
_classPrivateFieldSet(this, _children_items, val);
|
|
88
91
|
}
|
|
89
92
|
}]);
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -106,4 +106,17 @@ Object.keys(_WebObject).forEach(function (key) {
|
|
|
106
106
|
return _WebObject[key];
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
var _ParentWebObject = require("./WebObjects/ParentWebObject");
|
|
112
|
+
|
|
113
|
+
Object.keys(_ParentWebObject).forEach(function (key) {
|
|
114
|
+
if (key === "default" || key === "__esModule") return;
|
|
115
|
+
if (key in exports && exports[key] === _ParentWebObject[key]) return;
|
|
116
|
+
Object.defineProperty(exports, key, {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _ParentWebObject[key];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
109
122
|
});
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.MapableObject = void 0;
|
|
7
7
|
|
|
8
|
-
var _object = require("@azrico/object");
|
|
9
|
-
|
|
10
8
|
var _ObjectArray = _interopRequireDefault(require("./ObjectArray"));
|
|
11
9
|
|
|
10
|
+
var _object = require("@azrico/object");
|
|
11
|
+
|
|
12
12
|
var _string = require("@azrico/string");
|
|
13
13
|
|
|
14
14
|
var _uid = require("@azrico/uid");
|
|
@@ -38,9 +38,12 @@ var MapableObject = /*#__PURE__*/function () {
|
|
|
38
38
|
|
|
39
39
|
_defineProperty(this, "__table_id", void 0);
|
|
40
40
|
|
|
41
|
+
_defineProperty(this, "__parent__table_id", void 0);
|
|
42
|
+
|
|
41
43
|
_defineProperty(this, "__row_number", void 0);
|
|
42
44
|
|
|
43
45
|
this.__uid = _uid.uid.localuid();
|
|
46
|
+
this.__table_id = this.__uid;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
_createClass(MapableObject, [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azrico/webobject",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.27",
|
|
4
4
|
"description": "Stateful object",
|
|
5
5
|
"author": "Azrideus",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@azrico/event": "^1",
|
|
73
73
|
"@azrico/global": "^1",
|
|
74
|
-
"@azrico/object": "^1.
|
|
74
|
+
"@azrico/object": "^1.4.4",
|
|
75
75
|
"@azrico/string": "^1",
|
|
76
76
|
"@azrico/uid": "^1"
|
|
77
77
|
}
|