@azrico/webobject 1.5.70 → 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.
Files changed (31) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/src/WebObjects/ParentWebObject.d.ts +24 -24
  3. package/dist/src/WebObjects/ParentWebObject.js +7 -7
  4. package/dist/src/WebObjects/WebObject.d.ts +153 -153
  5. package/dist/src/WebObjects/WebObject.js +476 -561
  6. package/dist/src/WebObjects/WebObjectHelper.d.ts +9 -9
  7. package/dist/src/WebObjects/WebObjectHelper.js +4 -4
  8. package/dist/src/WebObjects/WebObjectHelper.test.d.ts +1 -1
  9. package/dist/src/WebObjects/WebObjectHelper.test.js +1 -1
  10. package/dist/src/WebObjects/WebObjectManager.d.ts +68 -68
  11. package/dist/src/WebObjects/WebObjectManager.js +303 -350
  12. package/dist/src/WebObjects/WebObjectPathHelper.d.ts +36 -36
  13. package/dist/src/WebObjects/WebObjectPathHelper.js +31 -39
  14. package/dist/src/WebObjects/WebObjectPathHelper.test.d.ts +1 -1
  15. package/dist/src/WebObjects/WebObjectPathHelper.test.js +55 -61
  16. package/dist/src/index.d.ts +10 -10
  17. package/dist/src/structs/DummyObject.d.ts +5 -5
  18. package/dist/src/structs/DummyObject.js +1 -1
  19. package/dist/src/structs/MapableObject.d.ts +43 -43
  20. package/dist/src/structs/MapableObject.js +3 -3
  21. package/dist/src/structs/MetaObject.d.ts +15 -15
  22. package/dist/src/structs/MetaObject.js +19 -25
  23. package/dist/src/structs/ObjectArray.d.ts +10 -10
  24. package/dist/src/structs/ObjectArray.js +1 -1
  25. package/dist/src/structs/ObjectManager.d.ts +140 -140
  26. package/dist/src/structs/ObjectManager.js +202 -223
  27. package/dist/src/structs/ObjectWithTemp.d.ts +17 -17
  28. package/dist/src/structs/ObjectWithTemp.js +13 -17
  29. package/dist/src/structs/SimpleObject.d.ts +318 -303
  30. package/dist/src/structs/SimpleObject.js +423 -467
  31. package/package.json +63 -82
@@ -1,9 +1,9 @@
1
- import WebObject from "./WebObject";
2
- export declare class WebObjectHelper {
3
- /**
4
- * check if the given WebObject is changed or given WebObject array has any changed element
5
- * @param obj
6
- */
7
- static isChangedWebObjectField(obj: WebObject | WebObject[] | any): boolean;
8
- }
9
- export default WebObjectHelper;
1
+ import WebObject from "./WebObject";
2
+ export declare class WebObjectHelper {
3
+ /**
4
+ * check if the given WebObject is changed or given WebObject array has any changed element
5
+ * @param obj
6
+ */
7
+ static isChangedWebObjectField(obj: WebObject | WebObject[] | any): boolean;
8
+ }
9
+ export default WebObjectHelper;
@@ -11,7 +11,7 @@ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Can
11
11
  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); } }
12
12
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
- 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); }
14
+ 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); }
15
15
  var WebObjectHelper = exports.WebObjectHelper = /*#__PURE__*/function () {
16
16
  function WebObjectHelper() {
17
17
  _classCallCheck(this, WebObjectHelper);
@@ -19,9 +19,9 @@ var WebObjectHelper = exports.WebObjectHelper = /*#__PURE__*/function () {
19
19
  return _createClass(WebObjectHelper, null, [{
20
20
  key: "isChangedWebObjectField",
21
21
  value:
22
- /**
23
- * check if the given WebObject is changed or given WebObject array has any changed element
24
- * @param obj
22
+ /**
23
+ * check if the given WebObject is changed or given WebObject array has any changed element
24
+ * @param obj
25
25
  */
26
26
  function isChangedWebObjectField(obj) {
27
27
  if (_typeof(obj) !== "object") return false;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -16,7 +16,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
16
16
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
17
17
  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; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
- 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
+ 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); }
20
20
  var TestWebObject = /*#__PURE__*/function (_WebObject) {
21
21
  function TestWebObject() {
22
22
  var _this;
@@ -1,68 +1,68 @@
1
- import { ClassType } from "@azrico/types";
2
- import { WebObject, sendChangesType } from "../index";
3
- import ObjectManager from "../structs/ObjectManager";
4
- /**
5
- * This class manages the events of an Simple Object
6
- */
7
- export declare class WebObjectManager<ObjType extends WebObject> extends ObjectManager<ObjType> {
8
- protected static readonly __object_type: () => typeof WebObject | ClassType<WebObject>;
9
- static readonly __save_message: boolean;
10
- constructor(defaultObject?: ObjType);
11
- setObject(toObj: ObjType | undefined): boolean;
12
- /**
13
- * Update meta value of this object , meta data is stored in meta_data variable
14
- * @param key
15
- * @param value
16
- * @param createIfNotExists should we create a new meta if key does not exist
17
- * @param sendChange
18
- * @returns
19
- */
20
- setMetaValue(key: string, value: any, sendChange?: sendChangesType): Promise<boolean | undefined>;
21
- getMetaValue(key: string): any;
22
- get_deltaObject(): Promise<any>;
23
- Save(): Promise<boolean>;
24
- New(): Promise<void>;
25
- Delete(): Promise<any>;
26
- Lock(): Promise<any>;
27
- UnLock(): Promise<any>;
28
- Archive(): Promise<any>;
29
- UnArchive(): Promise<any>;
30
- Load(id: any, ...p: any[]): Promise<WebObject | undefined>;
31
- get __web_path(): string;
32
- get __db_name(): string;
33
- get __object_name(): string;
34
- get_webpath(): string;
35
- private __getObjectData;
36
- /**
37
- * Use this when you delete Object
38
- * @param p
39
- * @returns
40
- */
41
- onDelete(...p: any): Promise<any>;
42
- onArchive(...p: any): Promise<any>;
43
- onUnArchive(...p: any): Promise<any>;
44
- onLock(...p: any): Promise<any>;
45
- onUnLock(...p: any): Promise<any>;
46
- /**
47
- * Use this when you load new Object
48
- * @param p
49
- * @returns
50
- */
51
- onNew(...p: any): Promise<any>;
52
- /**
53
- * Use this when you load data to the object
54
- * @param p
55
- * @returns
56
- */
57
- onLoad(...p: any): Promise<any>;
58
- /**
59
- * Use this after succesful save to Database
60
- * @param p
61
- * @returns
62
- */
63
- onSave(...p: any): Promise<any>;
64
- onAfterSave(...p: any): Promise<any>;
65
- getObjectType(): typeof WebObject;
66
- static getObjectType(): typeof WebObject | ClassType<WebObject>;
67
- }
68
- export default WebObjectManager;
1
+ import { ClassType } from "@azrico/types";
2
+ import { WebObject, sendChangesType } from "../index";
3
+ import ObjectManager from "../structs/ObjectManager";
4
+ /**
5
+ * This class manages the events of an Simple Object
6
+ */
7
+ export declare class WebObjectManager<ObjType extends WebObject> extends ObjectManager<ObjType> {
8
+ protected static readonly __object_type: () => typeof WebObject | ClassType<WebObject>;
9
+ static readonly __save_message: boolean;
10
+ constructor(defaultObject?: ObjType);
11
+ setObject(toObj: ObjType | undefined): boolean;
12
+ /**
13
+ * Update meta value of this object , meta data is stored in meta_data variable
14
+ * @param key
15
+ * @param value
16
+ * @param createIfNotExists should we create a new meta if key does not exist
17
+ * @param sendChange
18
+ * @returns
19
+ */
20
+ setMetaValue(key: string, value: any, sendChange?: sendChangesType): Promise<boolean | undefined>;
21
+ getMetaValue(key: string): any;
22
+ get_deltaObject(): Promise<any>;
23
+ Save(): Promise<boolean>;
24
+ New(): Promise<void>;
25
+ Delete(): Promise<any>;
26
+ Lock(): Promise<any>;
27
+ UnLock(): Promise<any>;
28
+ Archive(): Promise<any>;
29
+ UnArchive(): Promise<any>;
30
+ Load(id: any, ...p: any[]): Promise<WebObject | undefined>;
31
+ get __web_path(): string;
32
+ get __db_name(): string;
33
+ get __object_name(): string;
34
+ get_webpath(): string;
35
+ private __getObjectData;
36
+ /**
37
+ * Use this when you delete Object
38
+ * @param p
39
+ * @returns
40
+ */
41
+ onDelete(...p: any): Promise<any>;
42
+ onArchive(...p: any): Promise<any>;
43
+ onUnArchive(...p: any): Promise<any>;
44
+ onLock(...p: any): Promise<any>;
45
+ onUnLock(...p: any): Promise<any>;
46
+ /**
47
+ * Use this when you load new Object
48
+ * @param p
49
+ * @returns
50
+ */
51
+ onNew(...p: any): Promise<any>;
52
+ /**
53
+ * Use this when you load data to the object
54
+ * @param p
55
+ * @returns
56
+ */
57
+ onLoad(...p: any): Promise<any>;
58
+ /**
59
+ * Use this after succesful save to Database
60
+ * @param p
61
+ * @returns
62
+ */
63
+ onSave(...p: any): Promise<any>;
64
+ onAfterSave(...p: any): Promise<any>;
65
+ getObjectType(): typeof WebObject;
66
+ static getObjectType(): typeof WebObject | ClassType<WebObject>;
67
+ }
68
+ export default WebObjectManager;