@zhubangyun/lowcode-core 6.2.30 → 6.3.20

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 (69) hide show
  1. package/es/components/react-render/index.js +11 -1
  2. package/es/utils/api/form-api/form-api.assemble-entity.d.ts +2 -0
  3. package/es/utils/api/form-api/form-api.assemble-entity.js +95 -0
  4. package/es/utils/api/form-api/form-api.entity-map.d.ts +12 -0
  5. package/es/utils/api/form-api/form-api.entity-map.js +50 -0
  6. package/es/utils/api/{form-api.utils.d.ts → form-api/form-api.utils.d.ts} +3 -2
  7. package/es/utils/api/{form-api.utils.js → form-api/form-api.utils.js} +41 -8
  8. package/es/utils/api/form-api.js +10 -17
  9. package/es/utils/api/rest-api.d.ts +2 -1
  10. package/es/utils/api/schema-api.d.ts +2 -1
  11. package/es/utils/api/schema-api.js +1 -1
  12. package/es/utils/api/schema.util.d.ts +1 -0
  13. package/es/utils/api/schema.util.js +10 -0
  14. package/es/utils/cache/index.d.ts +0 -1
  15. package/es/utils/cache/index.js +58 -35
  16. package/es/utils/cache/index_db_cache.d.ts +9 -0
  17. package/es/utils/cache/index_db_cache.js +7 -0
  18. package/es/utils/common/SingletonInstanceMap.d.ts +2 -2
  19. package/es/utils/data/index.d.ts +3 -1
  20. package/es/utils/data/index.js +10 -3
  21. package/es/utils/page/index.d.ts +1 -0
  22. package/es/utils/page/index.js +1 -1
  23. package/es/utils/page/page-create-element.d.ts +6 -0
  24. package/es/utils/page/page-create-element.js +23 -0
  25. package/es/utils/page/page-render.js +1 -1
  26. package/es/utils/page/page-schema-utils.js +2 -1
  27. package/es/utils/page/print-form.d.ts +1 -1
  28. package/es/utils/page/print-form.js +13 -7
  29. package/es/utils/uni-bridge.js +1 -3
  30. package/es/utils/util.common.d.ts +1 -1
  31. package/es/utils/util.common.js +1 -2
  32. package/lib/components/react-render/index.js +11 -1
  33. package/lib/utils/api/form-api/form-api.assemble-entity.d.ts +2 -0
  34. package/lib/utils/api/form-api/form-api.assemble-entity.js +99 -0
  35. package/lib/utils/api/form-api/form-api.entity-map.d.ts +12 -0
  36. package/lib/utils/api/form-api/form-api.entity-map.js +54 -0
  37. package/lib/utils/api/{form-api.utils.d.ts → form-api/form-api.utils.d.ts} +3 -2
  38. package/lib/utils/api/{form-api.utils.js → form-api/form-api.utils.js} +41 -7
  39. package/lib/utils/api/form-api.js +10 -17
  40. package/lib/utils/api/rest-api.d.ts +2 -1
  41. package/lib/utils/api/schema-api.d.ts +2 -1
  42. package/lib/utils/api/schema-api.js +1 -1
  43. package/lib/utils/api/schema.util.d.ts +1 -0
  44. package/lib/utils/api/schema.util.js +11 -0
  45. package/lib/utils/cache/index.d.ts +0 -1
  46. package/lib/utils/cache/index.js +57 -34
  47. package/lib/utils/cache/index_db_cache.d.ts +9 -0
  48. package/lib/utils/cache/index_db_cache.js +11 -0
  49. package/lib/utils/common/SingletonInstanceMap.d.ts +2 -2
  50. package/lib/utils/data/index.d.ts +3 -1
  51. package/lib/utils/data/index.js +10 -3
  52. package/lib/utils/page/index.d.ts +1 -0
  53. package/lib/utils/page/index.js +4 -2
  54. package/lib/utils/page/page-create-element.d.ts +6 -0
  55. package/lib/utils/page/page-create-element.js +29 -0
  56. package/lib/utils/page/page-render.js +1 -1
  57. package/lib/utils/page/page-schema-utils.js +2 -1
  58. package/lib/utils/page/print-form.d.ts +1 -1
  59. package/lib/utils/page/print-form.js +13 -7
  60. package/lib/utils/uni-bridge.js +1 -3
  61. package/lib/utils/util.common.d.ts +1 -1
  62. package/lib/utils/util.common.js +2 -3
  63. package/package.json +5 -4
  64. package/es/utils/cache/schema.d.ts +0 -6
  65. package/es/utils/cache/schema.js +0 -14
  66. package/es/utils/utils.scrollbar-size.js +0 -0
  67. package/lib/utils/cache/schema.d.ts +0 -6
  68. package/lib/utils/cache/schema.js +0 -18
  69. package/lib/utils/utils.scrollbar-size.js +0 -1
@@ -9,6 +9,9 @@ var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inh
9
9
  var _SingletonInstanceMap3 = require("../common/SingletonInstanceMap");
10
10
  var _api = require("../api");
11
11
  var _schema = require("../api/schema.util");
12
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
12
15
  var SchemaCache = exports.SchemaCache = /*#__PURE__*/function (_SingletonInstanceMap) {
13
16
  function SchemaCache() {
14
17
  return _SingletonInstanceMap.apply(this, arguments) || this;
@@ -17,28 +20,24 @@ var SchemaCache = exports.SchemaCache = /*#__PURE__*/function (_SingletonInstanc
17
20
  var _proto = SchemaCache.prototype;
18
21
  _proto.createInstance = /*#__PURE__*/function () {
19
22
  var _createInstance = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(key, options) {
20
- var mock, pageId, schemaRes, schema, handleCommonSchema, permission, printTemplates, workflow, cloneSchema, _t;
23
+ var mock, pageId, params, schemaRes, schema, handleCommonSchema, permission, printTemplates, workflow, cloneSchema, refs, _iterator, _step, _ref$props, _ref$props$fieldProps, _ref$props$fieldProps2, ref, refPageId, _key, _t;
21
24
  return _regenerator["default"].wrap(function (_context) {
22
25
  while (1) switch (_context.prev = _context.next) {
23
26
  case 0:
24
27
  mock = options.mock, pageId = options.pageId;
28
+ params = {};
29
+ if (mock) {
30
+ params.mock = mock;
31
+ }
25
32
  _context.next = 1;
26
33
  return _api.apiRequest.get("pages/" + pageId + "/schema", {
27
- params: {
28
- mock: mock
29
- }
34
+ params: params
30
35
  });
31
36
  case 1:
32
37
  schemaRes = _context.sent;
33
- if (schemaRes.succss) {
34
- _context.next = 2;
35
- break;
36
- }
37
- return _context.abrupt("return", schemaRes);
38
- case 2:
39
- schema = schemaRes.data;
40
- if (!(schema != null && typeof schema == "object")) {
41
- _context.next = 8;
38
+ schema = schemaRes === null || schemaRes === void 0 ? void 0 : schemaRes.data;
39
+ if (!schema) {
40
+ _context.next = 9;
42
41
  break;
43
42
  }
44
43
  handleCommonSchema = function handleCommonSchema(schema) {
@@ -51,29 +50,29 @@ var SchemaCache = exports.SchemaCache = /*#__PURE__*/function (_SingletonInstanc
51
50
  permission = null; //处理打印
52
51
  workflow = null;
53
52
  if (location.pathname.startsWith("/print")) {
54
- _context.next = 7;
53
+ _context.next = 6;
55
54
  break;
56
55
  }
57
- _context.next = 3;
56
+ _context.next = 2;
58
57
  return _api.apiRequest.get("pages/" + pageId + "/permission");
59
- case 3:
58
+ case 2:
60
59
  permission = _context.sent.data;
61
60
  if (!((schema === null || schema === void 0 ? void 0 : schema.type) == "form")) {
62
- _context.next = 7;
61
+ _context.next = 6;
63
62
  break;
64
63
  }
65
- _context.prev = 4;
66
- _context.next = 5;
64
+ _context.prev = 3;
65
+ _context.next = 4;
67
66
  return _api.apiRequest.get("pages/" + pageId + "/printTemplates");
68
- case 5:
67
+ case 4:
69
68
  printTemplates = _context.sent.data;
70
- _context.next = 7;
69
+ _context.next = 6;
71
70
  break;
72
- case 6:
73
- _context.prev = 6;
74
- _t = _context["catch"](4);
71
+ case 5:
72
+ _context.prev = 5;
73
+ _t = _context["catch"](3);
75
74
  console.log(_t);
76
- case 7:
75
+ case 6:
77
76
  (0, _schema.findFormSchemas)(schema).forEach(function (formSchema) {
78
77
  handleCommonSchema(formSchema);
79
78
  (0, _schema.findFdmSchemas)(formSchema.fdmSchema).forEach(function (fdmSchema) {
@@ -87,13 +86,43 @@ var SchemaCache = exports.SchemaCache = /*#__PURE__*/function (_SingletonInstanc
87
86
  fdmSchema.props.formElement = cloneSchema;
88
87
  });
89
88
  });
89
+ refs = (0, _schema.findLoadRefSchemas)(schema);
90
+ if (!refs.length) {
91
+ _context.next = 9;
92
+ break;
93
+ }
94
+ _iterator = _createForOfIteratorHelperLoose(refs);
95
+ case 7:
96
+ if ((_step = _iterator()).done) {
97
+ _context.next = 9;
98
+ break;
99
+ }
100
+ ref = _step.value;
101
+ refPageId = (_ref$props = ref.props) === null || _ref$props === void 0 ? void 0 : (_ref$props$fieldProps = _ref$props.fieldProps) === null || _ref$props$fieldProps === void 0 ? void 0 : (_ref$props$fieldProps2 = _ref$props$fieldProps.associationForm) === null || _ref$props$fieldProps2 === void 0 ? void 0 : _ref$props$fieldProps2.id;
102
+ if (!(typeof refPageId == "string" && refPageId !== pageId)) {
103
+ _context.next = 8;
104
+ break;
105
+ }
106
+ if (this.valueMap.has(refPageId)) {
107
+ _context.next = 8;
108
+ break;
109
+ }
110
+ _key = mock ? refPageId + "_mock" : refPageId;
111
+ _context.next = 8;
112
+ return this.getInstance(_key, {
113
+ mock: mock,
114
+ pageId: refPageId
115
+ });
90
116
  case 8:
91
- return _context.abrupt("return", schemaRes);
117
+ _context.next = 7;
118
+ break;
92
119
  case 9:
120
+ return _context.abrupt("return", schemaRes);
121
+ case 10:
93
122
  case "end":
94
123
  return _context.stop();
95
124
  }
96
- }, _callee, null, [[4, 6]]);
125
+ }, _callee, this, [[3, 5]]);
97
126
  }));
98
127
  function createInstance(_x, _x2) {
99
128
  return _createInstance.apply(this, arguments);
@@ -105,13 +134,7 @@ var SchemaCache = exports.SchemaCache = /*#__PURE__*/function (_SingletonInstanc
105
134
  var schema = exports.schema = new SchemaCache();
106
135
  var FormApiCache = exports.FormApiCache = /*#__PURE__*/function (_SingletonInstanceMap2) {
107
136
  function FormApiCache() {
108
- var _this;
109
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
110
- args[_key] = arguments[_key];
111
- }
112
- _this = _SingletonInstanceMap2.call.apply(_SingletonInstanceMap2, [this].concat(args)) || this;
113
- _this.apiMap = new Map();
114
- return _this;
137
+ return _SingletonInstanceMap2.apply(this, arguments) || this;
115
138
  }
116
139
  (0, _inheritsLoose2["default"])(FormApiCache, _SingletonInstanceMap2);
117
140
  var _proto2 = FormApiCache.prototype;
@@ -0,0 +1,9 @@
1
+ import { Dexie, type EntityTable } from "dexie";
2
+ export interface Friend {
3
+ page_id: string;
4
+ schema: any;
5
+ }
6
+ declare const db_cache: Dexie & {
7
+ page_schemas: EntityTable<Friend, 'page_id'>;
8
+ };
9
+ export default db_cache;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+ var _dexie = require("dexie");
6
+ var db_cache = new _dexie.Dexie('cache');
7
+ db_cache.version(1).stores({
8
+ page_schemas: 'page_id,schema'
9
+ });
10
+ var page_schemas = db_cache.page_schemas;
11
+ var _default = exports["default"] = db_cache;
@@ -1,6 +1,6 @@
1
1
  export declare abstract class SingletonInstanceMap<Value, Options> {
2
- private readonly valueMap;
3
- private readonly lockMap;
2
+ protected readonly valueMap: Map<string, Value>;
3
+ protected readonly lockMap: Map<string, boolean>;
4
4
  getInstance(key: string, options: Options): Promise<Value>;
5
5
  get(key: string): Value;
6
6
  clear(): void;
@@ -1 +1,3 @@
1
- export declare function transformerId(value: any): any;
1
+ export declare function transformerId(value: any, options?: {
2
+ includeNull?: boolean;
3
+ }): any;
@@ -2,14 +2,21 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.transformerId = transformerId;
5
- function transformerId(value) {
5
+ function transformerId(value, options) {
6
6
  if (value == null) {
7
7
  return null;
8
8
  }
9
9
  if (Array.isArray(value)) {
10
- return value.map(transformerId).filter(function (value) {
11
- return !!value;
10
+ var values = value.map(function (item) {
11
+ return transformerId(item, options);
12
12
  });
13
+ if (options !== null && options !== void 0 && options.includeNull) {
14
+ return values;
15
+ } else {
16
+ return values.filter(function (v) {
17
+ return !!v;
18
+ });
19
+ }
13
20
  }
14
21
  if (typeof value == "object") {
15
22
  return (value === null || value === void 0 ? void 0 : value.id) || (value === null || value === void 0 ? void 0 : value.value) || value;
@@ -1,3 +1,4 @@
1
+ export { createForm, getSchema } from "./page-create-element";
1
2
  export { print, getFormPrintTemplates } from "./print-form";
2
3
  export { showForm } from "./page-form";
3
4
  export { showFormGroup } from "./page-form-group";
@@ -3,7 +3,7 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  exports.__esModule = true;
5
5
  exports.closePage = closePage;
6
- exports.getFormPrintTemplates = void 0;
6
+ exports.getSchema = exports.getFormPrintTemplates = exports.createForm = void 0;
7
7
  exports.hideLoading = hideLoading;
8
8
  exports.openPage = openPage;
9
9
  exports.showFormGroup = exports.showFormDataManagerGroup = exports.showFormDataManager = exports.showForm = exports.show = exports.print = void 0;
@@ -11,6 +11,9 @@ exports.showLoading = showLoading;
11
11
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
12
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
13
  var _uniBridge = require("../uni-bridge");
14
+ var _pageCreateElement = require("./page-create-element");
15
+ exports.createForm = _pageCreateElement.createForm;
16
+ exports.getSchema = _pageCreateElement.getSchema;
14
17
  var _printForm = require("./print-form");
15
18
  exports.print = _printForm.print;
16
19
  exports.getFormPrintTemplates = _printForm.getFormPrintTemplates;
@@ -72,7 +75,6 @@ function _hideLoading() {
72
75
  return _regenerator["default"].wrap(function (_context2) {
73
76
  while (1) switch (_context2.prev = _context2.next) {
74
77
  case 0:
75
- console.log("page.hide.loading");
76
78
  loading = document.getElementById("fullscreen-loading");
77
79
  if (loading) {
78
80
  loading.style.display = "none";
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface PageCreateOptions {
3
+ formId: string;
4
+ }
5
+ export declare function getSchema(pageId: string): import("../api/schema.util").Schema & import("../api/rest-api").IBaseEntity;
6
+ export declare function createForm(options: PageCreateOptions): JSX.Element;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.createForm = createForm;
6
+ exports.getSchema = getSchema;
7
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
+ var _schemaApi = require("../api/schema-api");
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _reactRender = require("../../components/react-render");
12
+ var _excluded = ["formId"];
13
+ function getSchema(pageId) {
14
+ var _getSchemaFromCache;
15
+ return (_getSchemaFromCache = (0, _schemaApi.getSchemaFromCache)(pageId)) === null || _getSchemaFromCache === void 0 ? void 0 : _getSchemaFromCache.data;
16
+ }
17
+ function createForm(options) {
18
+ var formId = options.formId,
19
+ restProps = (0, _objectWithoutPropertiesLoose2["default"])(options, _excluded);
20
+ var schemaRes = (0, _schemaApi.getSchemaFromCache)(formId, window.__mock);
21
+ if (schemaRes !== null && schemaRes !== void 0 && schemaRes.success) {
22
+ var schema = schemaRes.data;
23
+ return /*#__PURE__*/_react["default"].createElement(_reactRender.ReactRender, (0, _extends2["default"])({
24
+ schema: schema,
25
+ components: window._components || window.components || window.__components
26
+ }, restProps));
27
+ }
28
+ return null;
29
+ }
@@ -28,7 +28,7 @@ function renderElement(options) {
28
28
  resolve(data || null);
29
29
  },
30
30
  onClose: function onClose() {
31
- resolve(false);
31
+ resolve(null);
32
32
  //等待动画结束
33
33
  setTimeout(function () {
34
34
  root.unmount();
@@ -65,10 +65,11 @@ function compileFilterRules(rules) {
65
65
  if (value === "") {
66
66
  value = "undefined";
67
67
  }
68
- } else if (rule.valueType == "value" || !rule.valueType || typeof value === "object") {
68
+ } else if (rule.valueType == "value" || rule.valueType == "column" || !rule.valueType || typeof value === "object") {
69
69
  value = JSON.stringify(value);
70
70
  }
71
71
  scripts.push("\"key\":\"" + rule.key + "\",");
72
+ scripts.push("\"valueType\":\"" + rule.valueType + "\",");
72
73
  scripts.push("\"operator\":\"" + rule.operator + "\",");
73
74
  scripts.push("\"value\":" + value + ",");
74
75
  }
@@ -4,6 +4,6 @@ interface PrintOptions {
4
4
  mode?: "print" | "export" | "cloud_print";
5
5
  data: any;
6
6
  }
7
- export declare function getFormPrintTemplates(formId: string): Promise<any>;
7
+ export declare function getFormPrintTemplates(formId: string, disableCache?: boolean): Promise<any>;
8
8
  export declare function print(options: PrintOptions): Promise<void>;
9
9
  export {};
@@ -11,15 +11,19 @@ var _api = require("../api");
11
11
  var _formIds = require("../formIds");
12
12
  var _index = require("./index");
13
13
  var cache = new Map();
14
- function getFormPrintTemplates(_x) {
14
+ function getFormPrintTemplates(_x, _x2) {
15
15
  return _getFormPrintTemplates.apply(this, arguments);
16
16
  }
17
17
  function _getFormPrintTemplates() {
18
- _getFormPrintTemplates = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(formId) {
18
+ _getFormPrintTemplates = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(formId, disableCache) {
19
19
  var res;
20
20
  return _regenerator["default"].wrap(function (_context2) {
21
21
  while (1) switch (_context2.prev = _context2.next) {
22
22
  case 0:
23
+ if (disableCache) {
24
+ _context2.next = 1;
25
+ break;
26
+ }
23
27
  if (!cache.has(formId)) {
24
28
  _context2.next = 1;
25
29
  break;
@@ -56,7 +60,7 @@ function _getFormPrintTemplates() {
56
60
  }));
57
61
  return _getFormPrintTemplates.apply(this, arguments);
58
62
  }
59
- function print(_x2) {
63
+ function print(_x3) {
60
64
  return _print.apply(this, arguments);
61
65
  }
62
66
  function _print() {
@@ -109,7 +113,7 @@ function _print() {
109
113
  }));
110
114
  return _print.apply(this, arguments);
111
115
  }
112
- function openPrint(_x3, _x4) {
116
+ function openPrint(_x4, _x5) {
113
117
  return _openPrint.apply(this, arguments);
114
118
  }
115
119
  function _openPrint() {
@@ -204,7 +208,7 @@ function _openPrint() {
204
208
  }
205
209
  }, _callee5);
206
210
  }));
207
- return function (_x6, _x7) {
211
+ return function (_x7, _x8) {
208
212
  return _ref.apply(this, arguments);
209
213
  };
210
214
  }()));
@@ -274,7 +278,9 @@ var CloudPrinter = /*#__PURE__*/function () {
274
278
  });
275
279
  case 3:
276
280
  res = _context.sent;
277
- if (!res.success) {
281
+ if (res.success) {
282
+ _message2["default"].success(res.message);
283
+ } else {
278
284
  _message2["default"].error(res.message);
279
285
  }
280
286
  case 4:
@@ -283,7 +289,7 @@ var CloudPrinter = /*#__PURE__*/function () {
283
289
  }
284
290
  }, _callee, this);
285
291
  }));
286
- function post(_x5) {
292
+ function post(_x6) {
287
293
  return _post.apply(this, arguments);
288
294
  }
289
295
  return post;
@@ -129,13 +129,11 @@ var UniBridge = /*#__PURE__*/function () {
129
129
  case 1:
130
130
  messageId = (0, _uuid.v7)();
131
131
  return _context5.abrupt("return", new Promise(function (resolve, reject) {
132
- console.log("UniBridge.doAction", messageId, action, options);
133
132
  _this.callbacks[messageId] = {
134
133
  resolve: resolve,
135
134
  reject: reject
136
135
  };
137
136
  try {
138
- console.log("postMessage", messageId, action, options);
139
137
  uni.postMessage({
140
138
  data: {
141
139
  action: action,
@@ -162,7 +160,7 @@ var UniBridge = /*#__PURE__*/function () {
162
160
  _proto.receiveMessage = function receiveMessage(message) {
163
161
  var callback = this.callbacks[message.messageId];
164
162
  console.log('客户端收到 UniApp 消息:', JSON.stringify(message));
165
- console.log('客户端收到 UniApp 消息:callbacks', this.callbacks);
163
+ console.log('客户端收到 UniApp 消息:callbacks', JSON.stringify(Object.keys(this.callbacks)), callback);
166
164
  if (callback) {
167
165
  if (message.success) {
168
166
  callback.resolve(message.data);
@@ -1 +1 @@
1
- export declare function isTemplate(): boolean;
1
+ export declare function isTemplateHost(): boolean;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.isTemplate = isTemplate;
5
- function isTemplate() {
6
- return false;
4
+ exports.isTemplateHost = isTemplateHost;
5
+ function isTemplateHost() {
7
6
  return location.host == "templates.zhiyunhe.com";
8
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhubangyun/lowcode-core",
3
- "version": "6.2.30",
3
+ "version": "6.3.20",
4
4
  "description": "低代码核心",
5
5
  "files": [
6
6
  "lib",
@@ -17,13 +17,14 @@
17
17
  "publish:oss": "npm run build:umd && node scripts/publishToCdn.ts"
18
18
  },
19
19
  "dependencies": {
20
+ "@alifd/next": "^1.24.18",
20
21
  "@alilc/lowcode-datasource-fetch-handler": "^1.1.4",
21
22
  "@zhubangyun/lowcode-render-core": "^5.1.14",
22
- "@zhubangyun/lowcode-utils": "^5.1.14",
23
23
  "@zhubangyun/lowcode-types": "^1.0.0",
24
- "@alifd/next": "^1.24.18",
25
- "axios": "^1.7.9",
24
+ "@zhubangyun/lowcode-utils": "^5.1.14",
25
+ "axios": "1.13.5",
26
26
  "case": "^1.6.3",
27
+ "dexie": "^4.3.0",
27
28
  "uuid": "^10.0.0"
28
29
  },
29
30
  "devDependencies": {
@@ -1,6 +0,0 @@
1
- /**
2
- * 遍历schema
3
- * @param schema
4
- * @param callback 返回true 继续往下遍历
5
- */
6
- export declare function forEachFormSchema(schema: any, callback: (child: any, index: number, children: any[]) => boolean): void;
@@ -1,14 +0,0 @@
1
- /**
2
- * 遍历schema
3
- * @param schema
4
- * @param callback 返回true 继续往下遍历
5
- */
6
- export function forEachFormSchema(schema, callback) {
7
- var _schema$children;
8
- schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : _schema$children.forEach(function (child, index, children) {
9
- var ctn = callback(child, index, children);
10
- if (ctn) {
11
- forEachFormSchema(child, callback);
12
- }
13
- });
14
- }
File without changes
@@ -1,6 +0,0 @@
1
- /**
2
- * 遍历schema
3
- * @param schema
4
- * @param callback 返回true 继续往下遍历
5
- */
6
- export declare function forEachFormSchema(schema: any, callback: (child: any, index: number, children: any[]) => boolean): void;
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.forEachFormSchema = forEachFormSchema;
5
- /**
6
- * 遍历schema
7
- * @param schema
8
- * @param callback 返回true 继续往下遍历
9
- */
10
- function forEachFormSchema(schema, callback) {
11
- var _schema$children;
12
- schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : _schema$children.forEach(function (child, index, children) {
13
- var ctn = callback(child, index, children);
14
- if (ctn) {
15
- forEachFormSchema(child, callback);
16
- }
17
- });
18
- }
@@ -1 +0,0 @@
1
- "use strict";