@zhubangyun/lowcode-core 5.3.132 → 5.3.182

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 (51) hide show
  1. package/es/components/schema-render/components/schema-render-base.js +1 -1
  2. package/es/index.d.ts +2 -3
  3. package/es/index.js +2 -3
  4. package/es/utils/{common → api}/RestApi.d.ts +9 -7
  5. package/es/utils/{common → api}/RestApi.js +142 -85
  6. package/es/utils/api/index.d.ts +2 -0
  7. package/es/utils/api/index.js +49 -2
  8. package/es/utils/cache/index.d.ts +9 -0
  9. package/es/utils/cache/index.js +75 -0
  10. package/es/utils/common/SingletonInstanceMap.d.ts +7 -0
  11. package/es/utils/common/SingletonInstanceMap.js +73 -0
  12. package/es/utils/common/index.d.ts +0 -2
  13. package/es/utils/common/index.js +1 -30
  14. package/es/utils/{common/RestFormApi.d.ts → form/form.api.d.ts} +9 -4
  15. package/es/utils/{common/RestFormApi.js → form/form.api.js} +85 -36
  16. package/es/utils/form/form.handler.js +0 -0
  17. package/es/utils/form/form.instance.d.ts +26 -0
  18. package/es/utils/form/form.instance.js +100 -0
  19. package/es/utils/form/form.process.js +0 -0
  20. package/es/utils/index.d.ts +2 -0
  21. package/es/utils/index.js +2 -0
  22. package/lib/components/schema-render/components/schema-render-base.js +1 -1
  23. package/lib/index.d.ts +2 -3
  24. package/lib/index.js +4 -6
  25. package/lib/utils/{common → api}/RestApi.d.ts +9 -7
  26. package/lib/utils/{common → api}/RestApi.js +142 -85
  27. package/lib/utils/api/index.d.ts +2 -0
  28. package/lib/utils/api/index.js +51 -2
  29. package/lib/utils/cache/index.d.ts +9 -0
  30. package/lib/utils/cache/index.js +80 -0
  31. package/lib/utils/common/SingletonInstanceMap.d.ts +7 -0
  32. package/lib/utils/common/SingletonInstanceMap.js +78 -0
  33. package/lib/utils/common/index.d.ts +0 -2
  34. package/lib/utils/common/index.js +2 -32
  35. package/lib/utils/{common/RestFormApi.d.ts → form/form.api.d.ts} +9 -4
  36. package/lib/utils/{common/RestFormApi.js → form/form.api.js} +85 -36
  37. package/lib/utils/form/form.handler.js +1 -0
  38. package/lib/utils/form/form.instance.d.ts +26 -0
  39. package/lib/utils/form/form.instance.js +105 -0
  40. package/lib/utils/form/form.process.js +1 -0
  41. package/lib/utils/index.d.ts +2 -0
  42. package/lib/utils/index.js +2 -0
  43. package/package.json +1 -1
  44. package/es/utils/common/ClientCache.d.ts +0 -36
  45. package/es/utils/common/ClientCache.js +0 -120
  46. package/lib/utils/common/ClientCache.d.ts +0 -36
  47. package/lib/utils/common/ClientCache.js +0 -125
  48. /package/es/utils/{common → api}/Request.d.ts +0 -0
  49. /package/es/utils/{common → api}/Request.js +0 -0
  50. /package/lib/utils/{common → api}/Request.d.ts +0 -0
  51. /package/lib/utils/{common → api}/Request.js +0 -0
@@ -1,125 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- exports.__esModule = true;
5
- exports.ClientCache = void 0;
6
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
7
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
- var ClientCache = exports.ClientCache = /*#__PURE__*/function () {
9
- function ClientCache(options) {
10
- this.cacheMap = void 0;
11
- this.name = void 0;
12
- this.loadData = void 0;
13
- this.cacheMap = new Map();
14
- this.name = options.name;
15
- if (typeof options.loadData == "function") {
16
- this.loadData = options.loadData;
17
- } else {
18
- this.loadData = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
19
- return _regenerator["default"].wrap(function _callee$(_context) {
20
- while (1) switch (_context.prev = _context.next) {
21
- case 0:
22
- return _context.abrupt("return", null);
23
- case 1:
24
- case "end":
25
- return _context.stop();
26
- }
27
- }, _callee);
28
- }));
29
- }
30
- }
31
-
32
- /**
33
- * 获取值
34
- * @param key
35
- * @param cache 是否从缓存中获取
36
- */
37
- var _proto = ClientCache.prototype;
38
- _proto.get =
39
- /*#__PURE__*/
40
- function () {
41
- var _get = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(key, cache) {
42
- var value;
43
- return _regenerator["default"].wrap(function _callee2$(_context2) {
44
- while (1) switch (_context2.prev = _context2.next) {
45
- case 0:
46
- if (!(!cache && this.cacheMap.has(key))) {
47
- _context2.next = 2;
48
- break;
49
- }
50
- return _context2.abrupt("return", this.cacheMap.get(key));
51
- case 2:
52
- _context2.prev = 2;
53
- _context2.next = 5;
54
- return this.loadData(key);
55
- case 5:
56
- value = _context2.sent;
57
- this.cacheMap.set(key, value);
58
- return _context2.abrupt("return", value);
59
- case 10:
60
- _context2.prev = 10;
61
- _context2.t0 = _context2["catch"](2);
62
- console.log("\u7F13\u5B58 {" + this.name + "} \u83B7\u53D6\u503C\u5931\u8D25!\u5C06\u8FD4\u56DEnull", _context2.t0);
63
- this.cacheMap.set(key, null);
64
- return _context2.abrupt("return", null);
65
- case 15:
66
- case "end":
67
- return _context2.stop();
68
- }
69
- }, _callee2, this, [[2, 10]]);
70
- }));
71
- function get(_x, _x2) {
72
- return _get.apply(this, arguments);
73
- }
74
- return get;
75
- }()
76
- /**
77
- * 重新加载
78
- * @param key
79
- */
80
- ;
81
- _proto.reload =
82
- /*#__PURE__*/
83
- function () {
84
- var _reload = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(key) {
85
- return _regenerator["default"].wrap(function _callee3$(_context3) {
86
- while (1) switch (_context3.prev = _context3.next) {
87
- case 0:
88
- return _context3.abrupt("return", this.get(key, false));
89
- case 1:
90
- case "end":
91
- return _context3.stop();
92
- }
93
- }, _callee3, this);
94
- }));
95
- function reload(_x3) {
96
- return _reload.apply(this, arguments);
97
- }
98
- return reload;
99
- }()
100
- /**
101
- * 手动设置
102
- * @param key
103
- * @param value
104
- */
105
- ;
106
- _proto.set = function set(key, value) {
107
- this.cacheMap.set(key, value);
108
- }
109
-
110
- /**
111
- * 删除某个缓存
112
- * @param key
113
- */;
114
- _proto["delete"] = function _delete(key) {
115
- this.cacheMap["delete"](key);
116
- }
117
-
118
- /**
119
- * 删除全部缓存
120
- */;
121
- _proto.clear = function clear() {
122
- this.cacheMap.clear();
123
- };
124
- return ClientCache;
125
- }();
File without changes
File without changes
File without changes
File without changes