@azrico/webobject 1.4.25 → 1.4.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.
@@ -52,6 +52,8 @@ export declare class WebObject extends SimpleObject {
52
52
  * @returns value or undefined
53
53
  */
54
54
  static getMetaValue(o: WebObject | null | undefined, key: string): any;
55
+ static zipSaveList(svlist: any): string;
56
+ static unzipSaveList(svlist: any): any;
55
57
  static saveList(itemList: WebObject[], extraOptions?: {
56
58
  [key: string]: any;
57
59
  }): Promise<boolean>;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = exports.WebObject = void 0;
7
7
  var _SimpleObject2 = _interopRequireDefault(require("../structs/SimpleObject"));
8
8
  var _object = require("@azrico/object");
9
+ var _string = require("@azrico/string");
9
10
  var _global = require("@azrico/global");
10
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
12
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -580,6 +581,21 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
580
581
  /* -------------------------------------------------------------------------- */
581
582
  /* Save */
582
583
  /* -------------------------------------------------------------------------- */
584
+ }, {
585
+ key: "zipSaveList",
586
+ value: function zipSaveList(svlist) {
587
+ if (_typeof(svlist) === "object") svlist = JSON.stringify(svlist);
588
+ return (0, _string.string_compress)(svlist);
589
+ }
590
+ }, {
591
+ key: "unzipSaveList",
592
+ value: function unzipSaveList(svlist) {
593
+ try {
594
+ if (_typeof(svlist) === "object") return svlist;
595
+ if (typeof svlist === "string") return JSON.parse((0, _string.string_decompress)(svlist));
596
+ } catch (_unused) {}
597
+ return svlist;
598
+ }
583
599
  }, {
584
600
  key: "saveList",
585
601
  value: function () {
@@ -638,7 +654,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject) {
638
654
  case 19:
639
655
  _context11.next = 21;
640
656
  return _global.gfunc.run_action("post", putAddress, _objectSpread({
641
- __save_list: save_array
657
+ __save_list: WebObject.zipSaveList(save_array)
642
658
  }, extraOptions));
643
659
  case 21:
644
660
  resultObject = _context11.sent;
@@ -14,6 +14,8 @@ export declare class SimpleObject extends MapableObject {
14
14
  static readonly __protectedProperties?: string[];
15
15
  static readonly __functionProperties?: string[];
16
16
  static readonly __extraProperties?: string[];
17
+ static readonly __childTypes?: any[];
18
+ static readonly __importColumns?: string[];
17
19
  static readonly __use_delta: boolean;
18
20
  _static(): Function;
19
21
  __originalobject?: this;
@@ -1141,6 +1141,10 @@ _defineProperty(SimpleObject, "__protectedProperties", void 0);
1141
1141
  _defineProperty(SimpleObject, "__functionProperties", void 0);
1142
1142
  //these properties usually are not directly changed and sometimes are included in deltaObject
1143
1143
  _defineProperty(SimpleObject, "__extraProperties", void 0);
1144
+ //types for children can be used when importing children
1145
+ _defineProperty(SimpleObject, "__childTypes", void 0);
1146
+ //these fields are used when importing
1147
+ _defineProperty(SimpleObject, "__importColumns", void 0);
1144
1148
  _defineProperty(SimpleObject, "__use_delta", true);
1145
1149
  var _default = SimpleObject;
1146
1150
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.25",
3
+ "version": "1.4.27",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",