@azrico/webobject 1.5.59 → 1.5.62
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/README.md +9 -9
- package/dist/index.js +1 -16
- package/dist/src/WebObjects/ParentWebObject.js +71 -115
- package/dist/src/WebObjects/WebObject.js +584 -1554
- package/dist/src/WebObjects/WebObjectHelper.js +15 -35
- package/dist/src/WebObjects/WebObjectHelper.test.js +45 -67
- package/dist/src/WebObjects/WebObjectManager.js +265 -864
- package/dist/src/WebObjects/WebObjectPathHelper.js +71 -142
- package/dist/src/WebObjects/WebObjectPathHelper.test.js +31 -122
- package/dist/src/index.js +10 -115
- package/dist/src/structs/DummyObject.js +8 -32
- package/dist/src/structs/MapableObject.js +75 -121
- package/dist/src/structs/MetaObject.js +35 -121
- package/dist/src/structs/ObjectArray.js +43 -68
- package/dist/src/structs/ObjectManager.d.ts +11 -6
- package/dist/src/structs/ObjectManager.js +285 -739
- package/dist/src/structs/ObjectWithTemp.d.ts +5 -0
- package/dist/src/structs/ObjectWithTemp.js +33 -64
- package/dist/src/structs/SimpleObject.js +1052 -1660
- package/package.json +1 -1
- package/dist/src/structs/SimpleObject.d.ts +0 -305
|
@@ -1,155 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
-
var WebObjectPathHelper = exports.WebObjectPathHelper = /*#__PURE__*/function () {
|
|
20
|
-
function WebObjectPathHelper() {
|
|
21
|
-
_classCallCheck(this, WebObjectPathHelper);
|
|
22
|
-
}
|
|
23
|
-
return _createClass(WebObjectPathHelper, null, [{
|
|
24
|
-
key: "get_path",
|
|
25
|
-
value: (
|
|
1
|
+
import WebObject from "./WebObject";
|
|
2
|
+
export class WebObjectPathHelper {
|
|
3
|
+
static defaultPaths = {
|
|
4
|
+
lock: "{wn}/{id}/lock",
|
|
5
|
+
unlock: "{wn}/{id}/unlock",
|
|
6
|
+
archive: "{wn}/{id}/archive",
|
|
7
|
+
unarchive: "{wn}/{id}/unarchive",
|
|
8
|
+
delete: "{wn}/{id}",
|
|
9
|
+
new: "{wn}",
|
|
10
|
+
save: "{wn}/{id}",
|
|
11
|
+
get: "{wn}",
|
|
12
|
+
};
|
|
13
|
+
static pathOverrides = {};
|
|
26
14
|
/**
|
|
27
15
|
* get path that we use for `action` for the `obj`
|
|
28
16
|
* @param obj
|
|
29
17
|
* @param action
|
|
30
18
|
* @returns
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
case 10:
|
|
57
|
-
case "end":
|
|
58
|
-
return _context.stop();
|
|
59
|
-
}
|
|
60
|
-
}, _callee);
|
|
61
|
-
}));
|
|
62
|
-
function get_path(_x, _x2) {
|
|
63
|
-
return _get_path.apply(this, arguments);
|
|
64
|
-
}
|
|
65
|
-
return get_path;
|
|
66
|
-
}()
|
|
19
|
+
*/
|
|
20
|
+
static async get_path(obj, action) {
|
|
21
|
+
action = String(action).toLowerCase();
|
|
22
|
+
const wn = obj.get_webpath();
|
|
23
|
+
const wp = obj.__web_path;
|
|
24
|
+
let usepath = "";
|
|
25
|
+
if (WebObjectPathHelper.pathOverrides[wn] &&
|
|
26
|
+
WebObjectPathHelper.pathOverrides[wn][action]) {
|
|
27
|
+
usepath = WebObjectPathHelper.pathOverrides[wn][action];
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
usepath = WebObjectPathHelper.defaultPaths[action];
|
|
31
|
+
}
|
|
32
|
+
if (!usepath)
|
|
33
|
+
usepath = WebObjectPathHelper.defaultPaths["save"];
|
|
34
|
+
if (typeof usepath === "function")
|
|
35
|
+
usepath = String(usepath(obj));
|
|
36
|
+
/* ----------------------------- place variables ---------------------------- */
|
|
37
|
+
usepath = String(usepath).replaceAll("{wn}", wn).replaceAll("{wp}", wp);
|
|
38
|
+
if (obj instanceof WebObject) {
|
|
39
|
+
usepath = usepath.replaceAll("{id}", obj.getID());
|
|
40
|
+
}
|
|
41
|
+
/* -------------------------------------------------------------------------- */
|
|
42
|
+
return usepath;
|
|
43
|
+
}
|
|
67
44
|
/**
|
|
68
45
|
* clear all paths that are override by `override_path`
|
|
69
|
-
*/
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var key;
|
|
76
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
77
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
78
|
-
case 0:
|
|
79
|
-
for (key in this.pathOverrides) {
|
|
80
|
-
this.pathOverrides[key] = {};
|
|
81
|
-
}
|
|
82
|
-
case 1:
|
|
83
|
-
case "end":
|
|
84
|
-
return _context2.stop();
|
|
85
|
-
}
|
|
86
|
-
}, _callee2, this);
|
|
87
|
-
}));
|
|
88
|
-
function clear_overrides() {
|
|
89
|
-
return _clear_overrides.apply(this, arguments);
|
|
90
|
-
}
|
|
91
|
-
return clear_overrides;
|
|
92
|
-
}()
|
|
46
|
+
*/
|
|
47
|
+
static async clear_overrides() {
|
|
48
|
+
for (const key in this.pathOverrides) {
|
|
49
|
+
this.pathOverrides[key] = {};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
93
52
|
/**
|
|
94
53
|
* override a save path for the gievn webobject
|
|
95
54
|
* @param obj
|
|
96
55
|
* @param pn
|
|
97
56
|
* @param override
|
|
98
57
|
* @returns
|
|
99
|
-
*/
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
case 6:
|
|
127
|
-
/* --------------------------- apply the override --------------------------- */
|
|
128
|
-
if (!WebObjectPathHelper.pathOverrides[wn]) WebObjectPathHelper.pathOverrides[wn] = {};
|
|
129
|
-
WebObjectPathHelper.pathOverrides[wn][pn] = override;
|
|
130
|
-
return _context3.abrupt("return", override);
|
|
131
|
-
case 9:
|
|
132
|
-
case "end":
|
|
133
|
-
return _context3.stop();
|
|
134
|
-
}
|
|
135
|
-
}, _callee3);
|
|
136
|
-
}));
|
|
137
|
-
function override_path(_x3, _x4, _x5) {
|
|
138
|
-
return _override_path.apply(this, arguments);
|
|
139
|
-
}
|
|
140
|
-
return override_path;
|
|
141
|
-
}())
|
|
142
|
-
}]);
|
|
143
|
-
}();
|
|
144
|
-
_defineProperty(WebObjectPathHelper, "defaultPaths", {
|
|
145
|
-
lock: "{wn}/{id}/lock",
|
|
146
|
-
unlock: "{wn}/{id}/unlock",
|
|
147
|
-
archive: "{wn}/{id}/archive",
|
|
148
|
-
unarchive: "{wn}/{id}/unarchive",
|
|
149
|
-
"delete": "{wn}/{id}",
|
|
150
|
-
"new": "{wn}",
|
|
151
|
-
save: "{wn}/{id}",
|
|
152
|
-
get: "{wn}"
|
|
153
|
-
});
|
|
154
|
-
_defineProperty(WebObjectPathHelper, "pathOverrides", {});
|
|
155
|
-
var _default = exports["default"] = WebObjectPathHelper;
|
|
58
|
+
*/
|
|
59
|
+
static async override_path(obj, pn, override) {
|
|
60
|
+
pn = String(pn).toLowerCase();
|
|
61
|
+
let wn = "";
|
|
62
|
+
/* ------------------------------ find webname ------------------------------ */
|
|
63
|
+
if (typeof obj === "string") {
|
|
64
|
+
wn = obj;
|
|
65
|
+
}
|
|
66
|
+
else if (typeof obj.get_webpath === "function") {
|
|
67
|
+
wn = obj.get_webpath();
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
console.error("[override_path]", "given object has no get_webpath");
|
|
71
|
+
wn = obj.__web_path || obj.__web_type;
|
|
72
|
+
}
|
|
73
|
+
if (!wn) {
|
|
74
|
+
console.error("[override_path]", "bad webname");
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
/* --------------------------- apply the override --------------------------- */
|
|
78
|
+
if (!WebObjectPathHelper.pathOverrides[wn])
|
|
79
|
+
WebObjectPathHelper.pathOverrides[wn] = {};
|
|
80
|
+
WebObjectPathHelper.pathOverrides[wn][pn] = override;
|
|
81
|
+
return override;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export default WebObjectPathHelper;
|
|
@@ -1,122 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
describe("WebObjectPathHelper", function () {
|
|
33
|
-
var wobj;
|
|
34
|
-
beforeEach(function () {
|
|
35
|
-
_WebObjectPathHelper["default"].clear_overrides();
|
|
36
|
-
wobj = new TestWebObject();
|
|
37
|
-
wobj._id = "test";
|
|
38
|
-
});
|
|
39
|
-
it("get_path", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
40
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41
|
-
while (1) switch (_context.prev = _context.next) {
|
|
42
|
-
case 0:
|
|
43
|
-
_context.t0 = expect;
|
|
44
|
-
_context.next = 3;
|
|
45
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "save");
|
|
46
|
-
case 3:
|
|
47
|
-
_context.t1 = _context.sent;
|
|
48
|
-
(0, _context.t0)(_context.t1).toBe(wobj.get_webpath() + "/" + wobj.getID());
|
|
49
|
-
_context.t2 = expect;
|
|
50
|
-
_context.next = 8;
|
|
51
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "new");
|
|
52
|
-
case 8:
|
|
53
|
-
_context.t3 = _context.sent;
|
|
54
|
-
(0, _context.t2)(_context.t3).toBe(wobj.get_webpath());
|
|
55
|
-
_context.t4 = expect;
|
|
56
|
-
_context.next = 13;
|
|
57
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "lock");
|
|
58
|
-
case 13:
|
|
59
|
-
_context.t5 = _context.sent;
|
|
60
|
-
(0, _context.t4)(_context.t5).toBe("".concat(wobj.get_webpath(), "/").concat(wobj.getID(), "/lock"));
|
|
61
|
-
case 15:
|
|
62
|
-
case "end":
|
|
63
|
-
return _context.stop();
|
|
64
|
-
}
|
|
65
|
-
}, _callee);
|
|
66
|
-
})));
|
|
67
|
-
it("override_path", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
68
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
69
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
70
|
-
case 0:
|
|
71
|
-
_context2.next = 2;
|
|
72
|
-
return _WebObjectPathHelper["default"].override_path(wobj.get_webpath(), "save", "blah");
|
|
73
|
-
case 2:
|
|
74
|
-
_context2.t0 = expect;
|
|
75
|
-
_context2.next = 5;
|
|
76
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "save");
|
|
77
|
-
case 5:
|
|
78
|
-
_context2.t1 = _context2.sent;
|
|
79
|
-
(0, _context2.t0)(_context2.t1).toBe("blah");
|
|
80
|
-
_context2.next = 9;
|
|
81
|
-
return _WebObjectPathHelper["default"].override_path(wobj.get_webpath(), "save", "{id}");
|
|
82
|
-
case 9:
|
|
83
|
-
_context2.t2 = expect;
|
|
84
|
-
_context2.next = 12;
|
|
85
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "save");
|
|
86
|
-
case 12:
|
|
87
|
-
_context2.t3 = _context2.sent;
|
|
88
|
-
(0, _context2.t2)(_context2.t3).toBe(wobj.getID());
|
|
89
|
-
_context2.t4 = expect;
|
|
90
|
-
_context2.next = 17;
|
|
91
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "new");
|
|
92
|
-
case 17:
|
|
93
|
-
_context2.t5 = _context2.sent;
|
|
94
|
-
(0, _context2.t4)(_context2.t5).toBe(wobj.get_webpath());
|
|
95
|
-
case 19:
|
|
96
|
-
case "end":
|
|
97
|
-
return _context2.stop();
|
|
98
|
-
}
|
|
99
|
-
}, _callee2);
|
|
100
|
-
})));
|
|
101
|
-
it("override_path with function", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
102
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
103
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
104
|
-
case 0:
|
|
105
|
-
_context3.next = 2;
|
|
106
|
-
return _WebObjectPathHelper["default"].override_path(wobj, "save", function (s) {
|
|
107
|
-
return s._id;
|
|
108
|
-
});
|
|
109
|
-
case 2:
|
|
110
|
-
_context3.t0 = expect;
|
|
111
|
-
_context3.next = 5;
|
|
112
|
-
return _WebObjectPathHelper["default"].get_path(wobj, "save");
|
|
113
|
-
case 5:
|
|
114
|
-
_context3.t1 = _context3.sent;
|
|
115
|
-
(0, _context3.t0)(_context3.t1).toBe(wobj.getID());
|
|
116
|
-
case 7:
|
|
117
|
-
case "end":
|
|
118
|
-
return _context3.stop();
|
|
119
|
-
}
|
|
120
|
-
}, _callee3);
|
|
121
|
-
})));
|
|
122
|
-
});
|
|
1
|
+
import { WebObject } from "../index";
|
|
2
|
+
import WebObjectPathHelper from "./WebObjectPathHelper";
|
|
3
|
+
class TestWebObject extends WebObject {
|
|
4
|
+
static __web_path = "test-wp";
|
|
5
|
+
}
|
|
6
|
+
describe("WebObjectPathHelper", () => {
|
|
7
|
+
let wobj;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
WebObjectPathHelper.clear_overrides();
|
|
10
|
+
wobj = new TestWebObject();
|
|
11
|
+
wobj._id = "test";
|
|
12
|
+
});
|
|
13
|
+
it("get_path", async () => {
|
|
14
|
+
expect(await WebObjectPathHelper.get_path(wobj, "save")).toBe(wobj.get_webpath() + "/" + wobj.getID());
|
|
15
|
+
expect(await WebObjectPathHelper.get_path(wobj, "new")).toBe(wobj.get_webpath());
|
|
16
|
+
expect(await WebObjectPathHelper.get_path(wobj, "lock")).toBe(`${wobj.get_webpath()}/${wobj.getID()}/lock`);
|
|
17
|
+
});
|
|
18
|
+
it("override_path", async () => {
|
|
19
|
+
await WebObjectPathHelper.override_path(wobj.get_webpath(), "save", "blah");
|
|
20
|
+
expect(await WebObjectPathHelper.get_path(wobj, "save")).toBe("blah");
|
|
21
|
+
/* -------------------------------------------------------------------------- */
|
|
22
|
+
await WebObjectPathHelper.override_path(wobj.get_webpath(), "save", "{id}");
|
|
23
|
+
expect(await WebObjectPathHelper.get_path(wobj, "save")).toBe(wobj.getID());
|
|
24
|
+
/* ------------------------ old data is not affected ------------------------ */
|
|
25
|
+
expect(await WebObjectPathHelper.get_path(wobj, "new")).toBe(wobj.get_webpath());
|
|
26
|
+
});
|
|
27
|
+
it("override_path with function", async () => {
|
|
28
|
+
await WebObjectPathHelper.override_path(wobj, "save", (s) => s._id);
|
|
29
|
+
expect(await WebObjectPathHelper.get_path(wobj, "save")).toBe(wobj.getID());
|
|
30
|
+
});
|
|
31
|
+
});
|
package/dist/src/index.js
CHANGED
|
@@ -1,115 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _SimpleObject[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _ObjectArray = require("./structs/ObjectArray");
|
|
18
|
-
Object.keys(_ObjectArray).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _ObjectArray[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _ObjectArray[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _MapableObject = require("./structs/MapableObject");
|
|
29
|
-
Object.keys(_MapableObject).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _MapableObject[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _MapableObject[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _MetaObject = require("./structs/MetaObject");
|
|
40
|
-
Object.keys(_MetaObject).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _MetaObject[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function get() {
|
|
46
|
-
return _MetaObject[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _DummyObject = require("./structs/DummyObject");
|
|
51
|
-
Object.keys(_DummyObject).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _DummyObject[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _DummyObject[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _ObjectManager = require("./structs/ObjectManager");
|
|
62
|
-
Object.keys(_ObjectManager).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _ObjectManager[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function get() {
|
|
68
|
-
return _ObjectManager[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _WebObjectManager = require("./WebObjects/WebObjectManager");
|
|
73
|
-
Object.keys(_WebObjectManager).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _WebObjectManager[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function get() {
|
|
79
|
-
return _WebObjectManager[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _WebObject = require("./WebObjects/WebObject");
|
|
84
|
-
Object.keys(_WebObject).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _WebObject[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function get() {
|
|
90
|
-
return _WebObject[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _WebObjectPathHelper = require("./WebObjects/WebObjectPathHelper");
|
|
95
|
-
Object.keys(_WebObjectPathHelper).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _WebObjectPathHelper[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function get() {
|
|
101
|
-
return _WebObjectPathHelper[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _ParentWebObject = require("./WebObjects/ParentWebObject");
|
|
106
|
-
Object.keys(_ParentWebObject).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _ParentWebObject[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function get() {
|
|
112
|
-
return _ParentWebObject[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
1
|
+
export * from "./structs/SimpleObject";
|
|
2
|
+
export * from "./structs/ObjectArray";
|
|
3
|
+
export * from "./structs/MapableObject";
|
|
4
|
+
export * from "./structs/MetaObject";
|
|
5
|
+
export * from "./structs/DummyObject";
|
|
6
|
+
export * from "./structs/ObjectManager";
|
|
7
|
+
export * from "./WebObjects/WebObjectManager";
|
|
8
|
+
export * from "./WebObjects/WebObject";
|
|
9
|
+
export * from "./WebObjects/WebObjectPathHelper";
|
|
10
|
+
export * from "./WebObjects/ParentWebObject";
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
16
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
17
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
19
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
20
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
21
|
-
var DummyObject = exports.DummyObject = /*#__PURE__*/function (_SimpleObject) {
|
|
22
|
-
function DummyObject(initObject) {
|
|
23
|
-
var _this;
|
|
24
|
-
_classCallCheck(this, DummyObject);
|
|
25
|
-
_this = _callSuper(this, DummyObject, [false]);
|
|
26
|
-
_this.loadValues(initObject, true);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
_inherits(DummyObject, _SimpleObject);
|
|
30
|
-
return _createClass(DummyObject);
|
|
31
|
-
}(_SimpleObject2.SimpleObject);
|
|
32
|
-
var _default = exports["default"] = DummyObject;
|
|
1
|
+
import { SimpleObject } from "./SimpleObject";
|
|
2
|
+
export class DummyObject extends SimpleObject {
|
|
3
|
+
constructor(initObject) {
|
|
4
|
+
super(false);
|
|
5
|
+
this.loadValues(initObject, true);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default DummyObject;
|