@azrico/webobject 1.5.69 → 1.5.71
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.d.ts +1 -1
- package/dist/src/WebObjects/ParentWebObject.d.ts +24 -24
- package/dist/src/WebObjects/ParentWebObject.js +7 -7
- package/dist/src/WebObjects/WebObject.d.ts +153 -153
- package/dist/src/WebObjects/WebObject.js +476 -561
- package/dist/src/WebObjects/WebObjectHelper.d.ts +9 -9
- package/dist/src/WebObjects/WebObjectHelper.js +4 -4
- package/dist/src/WebObjects/WebObjectHelper.test.d.ts +1 -1
- package/dist/src/WebObjects/WebObjectHelper.test.js +1 -1
- package/dist/src/WebObjects/WebObjectManager.d.ts +68 -68
- package/dist/src/WebObjects/WebObjectManager.js +303 -350
- package/dist/src/WebObjects/WebObjectPathHelper.d.ts +36 -36
- package/dist/src/WebObjects/WebObjectPathHelper.js +31 -39
- package/dist/src/WebObjects/WebObjectPathHelper.test.d.ts +1 -1
- package/dist/src/WebObjects/WebObjectPathHelper.test.js +55 -61
- package/dist/src/index.d.ts +10 -10
- package/dist/src/structs/DummyObject.d.ts +5 -5
- package/dist/src/structs/DummyObject.js +1 -1
- package/dist/src/structs/MapableObject.d.ts +43 -43
- package/dist/src/structs/MapableObject.js +3 -3
- package/dist/src/structs/MetaObject.d.ts +15 -15
- package/dist/src/structs/MetaObject.js +19 -25
- package/dist/src/structs/ObjectArray.d.ts +10 -10
- package/dist/src/structs/ObjectArray.js +1 -1
- package/dist/src/structs/ObjectManager.d.ts +140 -140
- package/dist/src/structs/ObjectManager.js +202 -223
- package/dist/src/structs/ObjectWithTemp.d.ts +17 -17
- package/dist/src/structs/ObjectWithTemp.js +13 -17
- package/dist/src/structs/SimpleObject.d.ts +318 -303
- package/dist/src/structs/SimpleObject.js +423 -467
- package/package.json +63 -82
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This object supports temp values
|
|
3
|
-
*/
|
|
4
|
-
export declare class ObjectWithTemp {
|
|
5
|
-
protected __temp: any;
|
|
6
|
-
constructor();
|
|
7
|
-
setTemp: (key: string, value: any) => Promise<boolean>;
|
|
8
|
-
getTemp: (key: string) => any;
|
|
9
|
-
get_temp(key: string): any;
|
|
10
|
-
set_temp(key: string, value: any): Promise<boolean>;
|
|
11
|
-
/**
|
|
12
|
-
* clear and discard all temp values
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
clear_cache(): boolean;
|
|
16
|
-
}
|
|
17
|
-
export default ObjectWithTemp;
|
|
1
|
+
/**
|
|
2
|
+
* This object supports temp values
|
|
3
|
+
*/
|
|
4
|
+
export declare class ObjectWithTemp {
|
|
5
|
+
protected __temp: any;
|
|
6
|
+
constructor();
|
|
7
|
+
setTemp: (key: string, value: any) => Promise<boolean>;
|
|
8
|
+
getTemp: (key: string) => any;
|
|
9
|
+
get_temp(key: string): any;
|
|
10
|
+
set_temp(key: string, value: any): Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* clear and discard all temp values
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
clear_cache(): boolean;
|
|
16
|
+
}
|
|
17
|
+
export default ObjectWithTemp;
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = exports.ObjectWithTemp = void 0;
|
|
7
7
|
var _object = require("@azrico/object");
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
-
function
|
|
9
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
10
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
10
11
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
12
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -14,9 +15,9 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
14
15
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
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; }
|
|
16
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t,
|
|
18
|
-
/**
|
|
19
|
-
* This object supports temp values
|
|
18
|
+
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); }
|
|
19
|
+
/**
|
|
20
|
+
* This object supports temp values
|
|
20
21
|
*/
|
|
21
22
|
var ObjectWithTemp = exports.ObjectWithTemp = /*#__PURE__*/function () {
|
|
22
23
|
function ObjectWithTemp() {
|
|
@@ -36,19 +37,14 @@ var ObjectWithTemp = exports.ObjectWithTemp = /*#__PURE__*/function () {
|
|
|
36
37
|
}, {
|
|
37
38
|
key: "set_temp",
|
|
38
39
|
value: function () {
|
|
39
|
-
var _set_temp = _asyncToGenerator(/*#__PURE__*/
|
|
40
|
+
var _set_temp = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(key, value) {
|
|
40
41
|
var isValueChanged;
|
|
41
|
-
return
|
|
42
|
-
while (1) switch (_context.
|
|
42
|
+
return _regenerator().w(function (_context) {
|
|
43
|
+
while (1) switch (_context.n) {
|
|
43
44
|
case 0:
|
|
44
|
-
isValueChanged =
|
|
45
|
-
isValueChanged = this.getTemp(key) != value;
|
|
46
|
-
// if (this.__temp == null) this.__temp = {};
|
|
45
|
+
isValueChanged = this.getTemp(key) != value; // if (this.__temp == null) this.__temp = {};
|
|
47
46
|
(0, _object.object_set)(this.__temp, key, value);
|
|
48
|
-
return _context.
|
|
49
|
-
case 4:
|
|
50
|
-
case "end":
|
|
51
|
-
return _context.stop();
|
|
47
|
+
return _context.a(2, isValueChanged);
|
|
52
48
|
}
|
|
53
49
|
}, _callee, this);
|
|
54
50
|
}));
|
|
@@ -57,9 +53,9 @@ var ObjectWithTemp = exports.ObjectWithTemp = /*#__PURE__*/function () {
|
|
|
57
53
|
}
|
|
58
54
|
return set_temp;
|
|
59
55
|
}()
|
|
60
|
-
/**
|
|
61
|
-
* clear and discard all temp values
|
|
62
|
-
* @returns
|
|
56
|
+
/**
|
|
57
|
+
* clear and discard all temp values
|
|
58
|
+
* @returns
|
|
63
59
|
*/
|
|
64
60
|
}, {
|
|
65
61
|
key: "clear_cache",
|