@lingxiteam/assets 4.2.1-alpha.2 → 4.3.2-alpha.3

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 (175) hide show
  1. package/es/IconSvg/index.js +8 -7
  2. package/es/error/errorCatch/index.js +1 -1
  3. package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -77
  4. package/es/error/errorDisplay/Mobile/Drawer/index.js +26 -26
  5. package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +127 -129
  6. package/es/error/errorDisplay/Mobile/Modal/Modal.js +46 -31
  7. package/es/error/errorDisplay/Mobile/Modal/index.js +24 -24
  8. package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +2 -2
  9. package/es/error/errorDisplay/Web/Drawer/Drawer.js +183 -145
  10. package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +43 -46
  11. package/es/error/errorDisplay/Web/Drawer/index.js +15 -15
  12. package/es/error/errorDisplay/Web/ErrorMsg/index.js +341 -327
  13. package/es/error/errorDisplay/Web/Notification/Notice.js +78 -65
  14. package/es/error/errorDisplay/Web/Notification/Notification.js +15 -15
  15. package/es/error/errorDisplay/Web/Notification/index.js +36 -38
  16. package/es/error/errorDisplay/Web/defaultGlobalConfig.js +2 -2
  17. package/es/error/errorDisplay/compUtils.js +6 -6
  18. package/es/error/errorDisplay/http.js +7 -7
  19. package/es/error/index.js +6 -6
  20. package/es/index.js +5 -5
  21. package/es/rootConfig/index.d.ts +1 -1
  22. package/es/rootConfig/index.js +5 -5
  23. package/es/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
  24. package/es/rootConfig/locales/enus/config-locales-es.js +13 -0
  25. package/es/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
  26. package/es/rootConfig/locales/enus/config-locales-es.mobile.js +106 -0
  27. package/es/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
  28. package/es/rootConfig/locales/enus/config-locales-es.pc.js +42 -0
  29. package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
  30. package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.js +865 -0
  31. package/es/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
  32. package/es/rootConfig/locales/enus/config-locales-es.todo-callback.js +20 -0
  33. package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
  34. package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.js +266 -0
  35. package/es/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
  36. package/es/rootConfig/locales/zhcn/config-locales-cn.js +13 -0
  37. package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
  38. package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.js +57 -0
  39. package/es/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
  40. package/es/rootConfig/locales/zhcn/config-locales-cn.pc.js +97 -0
  41. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
  42. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +583 -0
  43. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
  44. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +13 -0
  45. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
  46. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +127 -0
  47. package/es/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
  48. package/es/rootConfig/locales/zhhk/config-locales-hk.js +13 -0
  49. package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
  50. package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.js +106 -0
  51. package/es/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
  52. package/es/rootConfig/locales/zhhk/config-locales-hk.pc.js +174 -0
  53. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
  54. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +869 -0
  55. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
  56. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +20 -0
  57. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
  58. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +266 -0
  59. package/es/rootConfig/mobile/BusiComp.d.ts +0 -1
  60. package/es/rootConfig/mobile/BusiComp.js +13 -10
  61. package/es/rootConfig/mobile/MobileModal.js +32 -27
  62. package/es/rootConfig/mobile/MobilePopover.d.ts +0 -2
  63. package/es/rootConfig/mobile/MobilePopover.js +16 -13
  64. package/es/rootConfig/mobile/index.js +4 -4
  65. package/es/rootConfig/mobile/page.d.ts +17 -2
  66. package/es/rootConfig/mobile/page.js +45 -38
  67. package/es/rootConfig/pc/BusiComp.js +82 -12
  68. package/es/rootConfig/pc/Drawer.d.ts +8 -9
  69. package/es/rootConfig/pc/Drawer.js +116 -46
  70. package/es/rootConfig/pc/Modal.d.ts +0 -1
  71. package/es/rootConfig/pc/Modal.js +90 -20
  72. package/es/rootConfig/pc/Popover.d.ts +0 -1
  73. package/es/rootConfig/pc/Popover.js +85 -15
  74. package/es/rootConfig/pc/index.js +5 -5
  75. package/es/rootConfig/pc/page.d.ts +0 -2
  76. package/es/rootConfig/pc/page.js +91 -22
  77. package/es/rootConfig/todoActionList.d.ts +1 -0
  78. package/es/rootConfig/todoActionList.js +1845 -719
  79. package/es/rootConfig/todoCallback.d.ts +12 -1
  80. package/es/rootConfig/todoCallback.js +175 -103
  81. package/es/rootConfig/todoOptionList.d.ts +0 -66
  82. package/es/rootConfig/todoOptionList.js +197 -198
  83. package/es/theme/index.js +18 -20
  84. package/es/theme/src/default/index.js +7 -7
  85. package/es/theme/utils/renderColors.js +1 -1
  86. package/es/utils/url.js +8 -7
  87. package/lib/IconSvg/index.js +10 -9
  88. package/lib/error/errorCatch/index.js +2 -3
  89. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -79
  90. package/lib/error/errorDisplay/Mobile/Drawer/index.js +25 -26
  91. package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +123 -126
  92. package/lib/error/errorDisplay/Mobile/Modal/Modal.js +45 -33
  93. package/lib/error/errorDisplay/Mobile/Modal/index.js +23 -24
  94. package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +3 -5
  95. package/lib/error/errorDisplay/SVGstring.js +6 -12
  96. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +181 -146
  97. package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +44 -48
  98. package/lib/error/errorDisplay/Web/Drawer/index.js +18 -20
  99. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +336 -324
  100. package/lib/error/errorDisplay/Web/Notification/Notice.js +79 -68
  101. package/lib/error/errorDisplay/Web/Notification/Notification.js +15 -16
  102. package/lib/error/errorDisplay/Web/Notification/index.js +37 -41
  103. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +3 -5
  104. package/lib/error/errorDisplay/compUtils.js +9 -12
  105. package/lib/error/errorDisplay/const.js +7 -13
  106. package/lib/error/errorDisplay/http.js +8 -9
  107. package/lib/index.js +3 -6
  108. package/lib/rootConfig/index.d.ts +1 -1
  109. package/lib/rootConfig/index.js +9 -3
  110. package/lib/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
  111. package/lib/rootConfig/locales/enus/config-locales-es.js +19 -0
  112. package/lib/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
  113. package/lib/rootConfig/locales/enus/config-locales-es.mobile.js +112 -0
  114. package/lib/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
  115. package/lib/rootConfig/locales/enus/config-locales-es.pc.js +48 -0
  116. package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
  117. package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.js +871 -0
  118. package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
  119. package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.js +26 -0
  120. package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
  121. package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.js +272 -0
  122. package/lib/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
  123. package/lib/rootConfig/locales/zhcn/config-locales-cn.js +19 -0
  124. package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
  125. package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.js +63 -0
  126. package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
  127. package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.js +103 -0
  128. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
  129. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +589 -0
  130. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
  131. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +19 -0
  132. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
  133. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +133 -0
  134. package/lib/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
  135. package/lib/rootConfig/locales/zhhk/config-locales-hk.js +19 -0
  136. package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
  137. package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.js +112 -0
  138. package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
  139. package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.js +180 -0
  140. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
  141. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +875 -0
  142. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
  143. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +26 -0
  144. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
  145. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +272 -0
  146. package/lib/rootConfig/mobile/BusiComp.d.ts +0 -1
  147. package/lib/rootConfig/mobile/BusiComp.js +14 -12
  148. package/lib/rootConfig/mobile/MobileModal.js +33 -29
  149. package/lib/rootConfig/mobile/MobilePopover.d.ts +0 -2
  150. package/lib/rootConfig/mobile/MobilePopover.js +17 -15
  151. package/lib/rootConfig/mobile/page.d.ts +17 -2
  152. package/lib/rootConfig/mobile/page.js +46 -40
  153. package/lib/rootConfig/pc/BusiComp.js +83 -14
  154. package/lib/rootConfig/pc/Drawer.d.ts +8 -9
  155. package/lib/rootConfig/pc/Drawer.js +117 -48
  156. package/lib/rootConfig/pc/Modal.d.ts +0 -1
  157. package/lib/rootConfig/pc/Modal.js +91 -22
  158. package/lib/rootConfig/pc/Popover.d.ts +0 -1
  159. package/lib/rootConfig/pc/Popover.js +86 -17
  160. package/lib/rootConfig/pc/page.d.ts +0 -2
  161. package/lib/rootConfig/pc/page.js +92 -24
  162. package/lib/rootConfig/todoActionList.d.ts +1 -0
  163. package/lib/rootConfig/todoActionList.js +1815 -695
  164. package/lib/rootConfig/todoCallback.d.ts +12 -1
  165. package/lib/rootConfig/todoCallback.js +182 -116
  166. package/lib/rootConfig/todoOptionList.d.ts +0 -66
  167. package/lib/rootConfig/todoOptionList.js +198 -200
  168. package/lib/theme/bin/default/modalWidth.js +1 -2
  169. package/lib/theme/index.js +19 -22
  170. package/lib/theme/src/default/index.js +7 -7
  171. package/lib/theme/utils/renderColors.js +1 -1
  172. package/lib/utils/cookieUtil.js +1 -2
  173. package/lib/utils/img.js +2 -3
  174. package/lib/utils/url.js +13 -16
  175. package/package.json +3 -4
@@ -75,7 +75,18 @@ export declare const getPostObjectResponseFields: (lastObj: KV, context: Callbac
75
75
  dataId: string | number;
76
76
  type: string;
77
77
  }[];
78
- export declare const getAccountDivideOptsFields: (lastObj: KV, context: CallbackContext) => {
78
+ export declare const getAiServiceResponseFields: (lastObj: KV, context: CallbackContext) => {
79
+ title: string;
80
+ actionTitle: any;
81
+ value: string;
82
+ attrType: string;
83
+ responseId: string | number;
84
+ actionName: string;
85
+ isRoot: boolean;
86
+ dataId: string | number;
87
+ type: string;
88
+ }[];
89
+ export declare const getJSBridgeFields: (kv: KV, title?: string) => {
79
90
  title: string;
80
91
  value: string;
81
92
  dataId: string | number;
@@ -3,40 +3,58 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getPostObjectResponseFields = exports.getApiResponseFields = exports.getAccountDivideOptsFields = exports.generateFormValuesCallback2Fields = exports.generateFormValuesCallback1Fields = exports.SERVICE_SOURCE = void 0;
6
+ exports.getPostObjectResponseFields = exports.getJSBridgeFields = exports.getApiResponseFields = exports.getAiServiceResponseFields = exports.generateFormValuesCallback2Fields = exports.generateFormValuesCallback1Fields = exports.SERVICE_SOURCE = void 0;
7
7
  var _excluded = ["_source", "_serviceId"];
8
8
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
9
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
10
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
11
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
18
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
- 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); }
17
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
+ 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); }
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
23
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
- var SERVICE_SOURCE = {
24
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
25
+ 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); }
26
+ var SERVICE_SOURCE = exports.SERVICE_SOURCE = {
23
27
  // 服务来源
24
28
  APP: 'app',
29
+ // 应用内部 & 模型生成
25
30
  QUERY: 'query',
31
+ // 解析服务(SQL类服务)
26
32
  INNER: 'inner',
33
+ // 高代码服务
27
34
  PLATFORM: 'platform',
35
+ // 平台服务
28
36
  STD: 'std',
37
+ // 编排服务
29
38
  ATOM: 'atom',
39
+ // 外部服务(低代码运营平台的原子服务)
30
40
  RHIN: 'rhin',
41
+ // 业务运营服务
31
42
  SCENE: 'scene',
43
+ // 业务运营场景服务
32
44
  OBJECT: 'object',
45
+ // 业务对象生成服务
33
46
  SUPER: 'super' // 动态查询通用服务
34
47
  };
48
+ // i18n
49
+ var TODO_CALLBACK_LOCALE_PREFIX = 'todo.callback';
50
+ var localeKey = function localeKey(suffix) {
51
+ return "".concat(TODO_CALLBACK_LOCALE_PREFIX, ".").concat(suffix);
52
+ };
53
+
35
54
  /**
36
55
  * 生成成功表单字段
37
56
  */
38
- exports.SERVICE_SOURCE = SERVICE_SOURCE;
39
- var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fields(kv, context, extraInfo) {
57
+ var generateFormValuesCallback1Fields = exports.generateFormValuesCallback1Fields = function generateFormValuesCallback1Fields(kv, context, extraInfo) {
40
58
  var name = kv.name,
41
59
  options = kv.options,
42
60
  dataId = kv.dataId,
@@ -48,29 +66,29 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
48
66
  if (!targetContainer) return [];
49
67
  if (actionObjName === 'DForm' || actionObjName === 'BOFramer') {
50
68
  opts.push(_objectSpread({
51
- title: "(".concat(name, ")\u8868\u5355\u53D6\u503C"),
69
+ title: "(".concat(name, ")", '表单取值'),
52
70
  value: "$values_".concat(options.compId, "$"),
53
71
  formValueActionId: dataId,
54
72
  targetName: name,
55
73
  formId: targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.id,
56
74
  dataId: dataId,
57
75
  type: 'object',
58
- description: '表单数据对象,包括:字段编码和值'
76
+ description: localeKey('form.values.description')
59
77
  }, extraInfo));
60
78
  var collectionFormApi = function collectionFormApi(comps) {
61
- comps === null || comps === void 0 ? void 0 : comps.forEach(function (comp) {
62
- var _comp$attribute, _actionItem$todoCallb, _actionItem$todoCallb2;
63
- var isAppChildForm = comp === null || comp === void 0 ? void 0 : (_comp$attribute = comp.attribute) === null || _comp$attribute === void 0 ? void 0 : _comp$attribute.isAppChildForm;
79
+ comps === null || comps === void 0 || comps.forEach(function (comp) {
80
+ var _comp$attribute, _actionItem$todoCallb;
81
+ var isAppChildForm = comp === null || comp === void 0 || (_comp$attribute = comp.attribute) === null || _comp$attribute === void 0 ? void 0 : _comp$attribute.isAppChildForm;
64
82
  var isRangePicker = (comp === null || comp === void 0 ? void 0 : comp.compName) === 'DformRangePicker';
65
83
  var props = comp === null || comp === void 0 ? void 0 : comp.props;
66
84
  var childComponents = comp === null || comp === void 0 ? void 0 : comp.children();
67
85
  var actionItem = getTodoActionByItem('value', comp.compName, true);
68
- var callbackItem = actionItem === null || actionItem === void 0 ? void 0 : (_actionItem$todoCallb = actionItem.todoCallbacks.find(function (callback) {
86
+ var callbackItem = actionItem === null || actionItem === void 0 || (_actionItem$todoCallb = actionItem.todoCallbacks.find(function (callback) {
69
87
  return _typeof(callback) === 'object' && callback.key === 'callback1';
70
- })) === null || _actionItem$todoCallb === void 0 ? void 0 : (_actionItem$todoCallb2 = _actionItem$todoCallb.fields) === null || _actionItem$todoCallb2 === void 0 ? void 0 : _actionItem$todoCallb2[0];
88
+ })) === null || _actionItem$todoCallb === void 0 || (_actionItem$todoCallb = _actionItem$todoCallb.fields) === null || _actionItem$todoCallb === void 0 ? void 0 : _actionItem$todoCallb[0];
71
89
  if (isAppChildForm) {
72
90
  opts.push(_objectSpread({
73
- title: "".concat(props === null || props === void 0 ? void 0 : props.title).concat((props === null || props === void 0 ? void 0 : props.fieldProps) ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "\uFF09") : ''),
91
+ title: "".concat(props === null || props === void 0 ? void 0 : props.title).concat(props !== null && props !== void 0 && props.fieldProps ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "\uFF09") : ''),
74
92
  value: "$values_".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldProps, "$"),
75
93
  formValueActionId: dataId,
76
94
  targetName: name,
@@ -83,7 +101,7 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
83
101
  // 时间段选择增加起止时间
84
102
  if (isRangePicker) {
85
103
  opts.push({
86
- title: "".concat(props === null || props === void 0 ? void 0 : props.title, "_\u5F00\u59CB\u65F6\u95F4").concat((props === null || props === void 0 ? void 0 : props.fieldProps) ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_begin\uFF09") : ''),
104
+ title: "".concat(props === null || props === void 0 ? void 0 : props.title, "_", '开始时间').concat(props !== null && props !== void 0 && props.fieldProps ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_begin\uFF09") : ''),
87
105
  value: "$values_".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldProps, "[0]$"),
88
106
  formValueActionId: dataId,
89
107
  targetName: name,
@@ -91,10 +109,10 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
91
109
  valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_begin"),
92
110
  dataId: dataId,
93
111
  type: 'string',
94
- description: "".concat(props === null || props === void 0 ? void 0 : props.title, "\u7684\u5F00\u59CB\u65F6\u95F4\uFF0C\u6309\u7167\u6307\u5B9A\u7684\u201C\u53D6\u503C\u683C\u5F0F\u201D\u8FDB\u884C\u683C\u5F0F\u5316\u8F93\u51FA")
112
+ description: "".concat(props === null || props === void 0 ? void 0 : props.title).concat(localeKey('form.range.beginDesc')).concat(localeKey('form.range.description'))
95
113
  });
96
114
  opts.push({
97
- title: "".concat(props === null || props === void 0 ? void 0 : props.title, "_\u7ED3\u675F\u65F6\u95F4").concat((props === null || props === void 0 ? void 0 : props.fieldProps) ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_end\uFF09") : ''),
115
+ title: "".concat(props === null || props === void 0 ? void 0 : props.title, "_", '结束时间').concat(props !== null && props !== void 0 && props.fieldProps ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_end\uFF09") : ''),
98
116
  value: "$values_".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldProps, "[1]$"),
99
117
  formValueActionId: dataId,
100
118
  targetName: name,
@@ -102,7 +120,7 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
102
120
  valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_end"),
103
121
  dataId: dataId,
104
122
  type: 'string',
105
- description: "".concat(props === null || props === void 0 ? void 0 : props.title, "\u7684\u7ED3\u675F\u65F6\u95F4\uFF0C\u6309\u7167\u6307\u5B9A\u7684\u201C\u53D6\u503C\u683C\u5F0F\u201D\u8FDB\u884C\u683C\u5F0F\u5316\u8F93\u51FA")
123
+ description: "".concat(props === null || props === void 0 ? void 0 : props.title).concat(localeKey('form.range.endDesc')).concat(localeKey('form.range.description'))
106
124
  });
107
125
  }
108
126
  }
@@ -111,36 +129,47 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
111
129
  };
112
130
  collectionFormApi(targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.children());
113
131
  }
132
+
114
133
  // pc端表单
115
- if (actionObjName === 'Form') {
134
+ if (['Form', 'QueryForm'].includes(actionObjName)) {
135
+ var obj = {
136
+ Form: '表单',
137
+ QueryForm: '查询表单',
138
+ FormList: '子表单'
139
+ };
116
140
  opts.push({
117
- title: "".concat(name, "\u8868\u5355\u6570\u636E"),
141
+ title: "".concat(name).concat(obj[actionObjName], '数据'),
118
142
  value: "$".concat(options.compId, "$"),
119
143
  dataId: dataId,
120
144
  formValueActionId: dataId,
121
145
  targetName: name,
122
146
  formId: targetContainer.id,
123
147
  type: 'object',
124
- description: '表单数据对象,包括:字段编码和值'
148
+ description: localeKey('form.values.description')
125
149
  });
126
150
  var _collectionFormApi = function _collectionFormApi(comps) {
127
- comps === null || comps === void 0 ? void 0 : comps.forEach(function (comp) {
128
- var _comp$attribute2, _actionItem$todoCallb3, _actionItem$todoCallb4;
129
- var isFormComponent = (comp === null || comp === void 0 ? void 0 : (_comp$attribute2 = comp.attribute) === null || _comp$attribute2 === void 0 ? void 0 : _comp$attribute2.compType) === 2;
151
+ comps === null || comps === void 0 || comps.forEach(function (comp) {
152
+ var _comp$attribute2, _comp$attribute3, _actionItem$todoCallb2;
153
+ var isFormComponent = (comp === null || comp === void 0 || (_comp$attribute2 = comp.attribute) === null || _comp$attribute2 === void 0 ? void 0 : _comp$attribute2.compType) === 2;
154
+
155
+ // 表单类型不再递归收集
156
+ var stopLoopFlag = ['FormList', 'Form', 'QueryForm'].includes(comp === null || comp === void 0 || (_comp$attribute3 = comp.attribute) === null || _comp$attribute3 === void 0 ? void 0 : _comp$attribute3.compName);
157
+
130
158
  // 时间段选择控件
131
159
  var isRangePicker = (comp === null || comp === void 0 ? void 0 : comp.compName) === 'RangePicker';
132
160
  var attribute = (comp === null || comp === void 0 ? void 0 : comp.attribute) || {};
133
161
  var props = attribute === null || attribute === void 0 ? void 0 : attribute.props;
134
162
  var childComponents = comp === null || comp === void 0 ? void 0 : comp.children();
135
163
  var actionItem = getTodoActionByItem('getValue', comp.compName, false);
136
- var callbackItem = actionItem === null || actionItem === void 0 ? void 0 : (_actionItem$todoCallb3 = actionItem.todoCallbacks.find(function (callback) {
164
+ var callbackItem = actionItem === null || actionItem === void 0 || (_actionItem$todoCallb2 = actionItem.todoCallbacks.find(function (callback) {
137
165
  return _typeof(callback) === 'object' && callback.key === 'callback1';
138
- })) === null || _actionItem$todoCallb3 === void 0 ? void 0 : (_actionItem$todoCallb4 = _actionItem$todoCallb3.fields) === null || _actionItem$todoCallb4 === void 0 ? void 0 : _actionItem$todoCallb4[0];
166
+ })) === null || _actionItem$todoCallb2 === void 0 || (_actionItem$todoCallb2 = _actionItem$todoCallb2.fields) === null || _actionItem$todoCallb2 === void 0 ? void 0 : _actionItem$todoCallb2[0];
167
+
139
168
  // 解决在表单的情况下,用户删除了标题字段,出现title undefined
140
169
  var title = (props === null || props === void 0 ? void 0 : props.name) || (attribute === null || attribute === void 0 ? void 0 : attribute.label) || (attribute === null || attribute === void 0 ? void 0 : attribute.compName);
141
170
  if (isFormComponent) {
142
171
  opts.push({
143
- title: "".concat(title).concat((props === null || props === void 0 ? void 0 : props.fieldName) ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "\uFF09") : ''),
172
+ title: "".concat(title).concat(props !== null && props !== void 0 && props.fieldName ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "\uFF09") : ''),
144
173
  value: "$".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldName, "$"),
145
174
  formValueActionId: dataId,
146
175
  targetName: name,
@@ -153,7 +182,7 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
153
182
  // 时间段选择需要添加起止时间
154
183
  if (isRangePicker) {
155
184
  opts.push({
156
- title: "".concat(title, "_\u5F00\u59CB\u65F6\u95F4").concat((props === null || props === void 0 ? void 0 : props.fieldName) ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_begin\uFF09") : ''),
185
+ title: "".concat(title, "_", '开始时间').concat(props !== null && props !== void 0 && props.fieldName ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_begin\uFF09") : ''),
157
186
  value: "$".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldName, "[0]$"),
158
187
  formValueActionId: dataId,
159
188
  targetName: name,
@@ -161,10 +190,10 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
161
190
  valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_begin"),
162
191
  dataId: dataId,
163
192
  type: 'string',
164
- description: "".concat(title, "\u7684\u5F00\u59CB\u65F6\u95F4\uFF0C\u6309\u7167\u6307\u5B9A\u7684\u201C\u53D6\u503C\u683C\u5F0F\u201D\u8FDB\u884C\u683C\u5F0F\u5316\u8F93\u51FA")
193
+ description: "".concat(title).concat(localeKey('form.range.beginDesc')).concat(localeKey('form.range.description'))
165
194
  });
166
195
  opts.push({
167
- title: "".concat(title, "_\u7ED3\u675F\u65F6\u95F4").concat((props === null || props === void 0 ? void 0 : props.fieldName) ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_end\uFF09") : ''),
196
+ title: "".concat(title, "_", '结束时间').concat(props !== null && props !== void 0 && props.fieldName ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_end\uFF09") : ''),
168
197
  value: "$".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldName, "[1]$"),
169
198
  formValueActionId: dataId,
170
199
  targetName: name,
@@ -172,22 +201,24 @@ var generateFormValuesCallback1Fields = function generateFormValuesCallback1Fiel
172
201
  valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_end"),
173
202
  dataId: dataId,
174
203
  type: 'string',
175
- description: "".concat(props === null || props === void 0 ? void 0 : props.title, "\u7684\u7ED3\u675F\u65F6\u95F4\uFF0C\u6309\u7167\u6307\u5B9A\u7684\u201C\u53D6\u503C\u683C\u5F0F\u201D\u8FDB\u884C\u683C\u5F0F\u5316\u8F93\u51FA")
204
+ description: "".concat(title).concat(localeKey('form.range.endDesc')).concat(localeKey('form.range.description'))
176
205
  });
177
206
  }
178
207
  }
179
- _collectionFormApi(childComponents || []);
208
+ if (!stopLoopFlag) {
209
+ _collectionFormApi(childComponents || []);
210
+ }
180
211
  });
181
212
  };
182
213
  _collectionFormApi(targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.children());
183
214
  }
184
215
  return opts;
185
216
  };
217
+
186
218
  /**
187
219
  * 生成失败表单字段
188
220
  */
189
- exports.generateFormValuesCallback1Fields = generateFormValuesCallback1Fields;
190
- var generateFormValuesCallback2Fields = function generateFormValuesCallback2Fields(kv, context) {
221
+ var generateFormValuesCallback2Fields = exports.generateFormValuesCallback2Fields = function generateFormValuesCallback2Fields(kv, context) {
191
222
  var targetName = kv.name,
192
223
  options = kv.options,
193
224
  dataId = kv.dataId,
@@ -197,28 +228,48 @@ var generateFormValuesCallback2Fields = function generateFormValuesCallback2Fiel
197
228
  var targetContainer = getComponentId(options.compId);
198
229
  if (actionObjName === 'DForm' || actionObjName === 'BOFramer') {
199
230
  opts.push({
200
- title: "(".concat(targetName, ")\u8868\u5355\u5931\u8D25\u7ED3\u679C"),
231
+ title: "(".concat(targetName, ")").concat(localeKey('form.validate.failResult')),
201
232
  value: "$errors_".concat(options.compId, "$"),
202
233
  formValueActionId: dataId,
203
234
  targetName: targetName,
204
235
  formId: targetContainer.id,
205
236
  dataId: dataId,
206
237
  type: 'object',
207
- description: '表单数据对象和失败信息,包括:字段编码、字段值、校验失败的字段编码和错误提示信息'
238
+ description: localeKey('form.validate.description')
208
239
  }, {
209
- title: "(".concat(targetName, ")\u8868\u5355\u5931\u8D25\u7ED3\u679C\u9996\u4E2A\u9519\u8BEF\u4FE1\u606F"),
240
+ title: "(".concat(targetName, ")").concat(localeKey('form.validate.failFirstError')),
210
241
  value: "$errors_".concat(options.compId, ".errorFields[0].errors[0]$"),
211
242
  formValueActionId: dataId,
212
243
  targetName: targetName,
213
244
  formId: targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.id,
214
245
  dataId: dataId,
215
246
  type: 'string',
216
- description: '校验失败返回的错误提示信息'
247
+ description: localeKey('form.validate.firstError.description')
248
+ });
249
+ }
250
+ if (actionObjName === 'Form') {
251
+ opts.push({
252
+ title: "(".concat(targetName, ")").concat(localeKey('form.validate.failResult')),
253
+ value: '$err$',
254
+ formValueActionId: dataId,
255
+ targetName: targetName,
256
+ formId: targetContainer.id,
257
+ dataId: dataId,
258
+ type: 'object',
259
+ description: localeKey('form.validate.description')
260
+ }, {
261
+ title: "(".concat(targetName, ")").concat(localeKey('form.validate.failFirstError')),
262
+ value: '$err.errorFields[0].errors[0]$',
263
+ formValueActionId: dataId,
264
+ targetName: targetName,
265
+ formId: targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.id,
266
+ dataId: dataId,
267
+ type: 'string',
268
+ description: localeKey('form.validate.firstError.description')
217
269
  });
218
270
  }
219
271
  return opts;
220
272
  };
221
- exports.generateFormValuesCallback2Fields = generateFormValuesCallback2Fields;
222
273
  var typeMap = {
223
274
  objectArray: 'objectInArray',
224
275
  field: 'string',
@@ -232,18 +283,18 @@ var addOpts = function addOpts(resAttrs, opts, lastObj, parentValue) {
232
283
  var disabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
233
284
  var needResponseCodeKey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
234
285
  (resAttrs || []).forEach(function (c) {
235
- var _lastObj$options, _lastObj$options2, _code$replace, _typeMap$c$attrType, _c$children;
236
- var actionTitle = lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options = lastObj.options) === null || _lastObj$options === void 0 ? void 0 : _lastObj$options.actionTitle;
286
+ var _lastObj$options, _lastObj$options2, _code$replace, _typeMap, _c$children;
287
+ var actionTitle = lastObj === null || lastObj === void 0 || (_lastObj$options = lastObj.options) === null || _lastObj$options === void 0 ? void 0 : _lastObj$options.actionTitle;
237
288
  var responseId = lastObj === null || lastObj === void 0 ? void 0 : lastObj.dataId;
238
- var serviceTitle = lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options2 = lastObj.options) === null || _lastObj$options2 === void 0 ? void 0 : _lastObj$options2._serviceTitle;
289
+ var serviceTitle = lastObj === null || lastObj === void 0 || (_lastObj$options2 = lastObj.options) === null || _lastObj$options2 === void 0 ? void 0 : _lastObj$options2._serviceTitle;
239
290
  if (actionTitle && serviceTitle) {
240
291
  serviceTitle = "".concat(serviceTitle, "(").concat(actionTitle, ")");
241
292
  }
242
293
  var code = (c === null || c === void 0 ? void 0 : c._id) || (c === null || c === void 0 ? void 0 : c.code);
243
- var value = "$reply_".concat(lastObj.options.id, "?.").concat((code === null || code === void 0 ? void 0 : (_code$replace = code.replace) === null || _code$replace === void 0 ? void 0 : _code$replace.call(code, /\./g, '?.')) || code, "$");
294
+ var value = "$reply_".concat(lastObj.options.id, "?.").concat((code === null || code === void 0 || (_code$replace = code.replace) === null || _code$replace === void 0 ? void 0 : _code$replace.call(code, /\./g, '?.')) || code, "$");
244
295
  opts.push({
245
296
  // eslint-disable-next-line no-underscore-dangle
246
- title: (c === null || c === void 0 ? void 0 : c.name) ? "".concat(c === null || c === void 0 ? void 0 : c.name, "\uFF08").concat(code, "\uFF09") : "response.".concat(code),
297
+ title: c !== null && c !== void 0 && c.name ? "".concat(c === null || c === void 0 ? void 0 : c.name, "\uFF08").concat(code, "\uFF09") : "response.".concat(code),
247
298
  actionTitle: actionTitle,
248
299
  code: c === null || c === void 0 ? void 0 : c.code,
249
300
  name: c === null || c === void 0 ? void 0 : c.name,
@@ -258,55 +309,61 @@ var addOpts = function addOpts(resAttrs, opts, lastObj, parentValue) {
258
309
  dataId: responseId,
259
310
  disabled: needResponseCodeKey ? false : disabled,
260
311
  serviceAttrType: c === null || c === void 0 ? void 0 : c.attrType,
261
- type: (_typeMap$c$attrType = typeMap[c.attrType]) !== null && _typeMap$c$attrType !== void 0 ? _typeMap$c$attrType : c.attrType
312
+ type: (_typeMap = typeMap[c.attrType]) !== null && _typeMap !== void 0 ? _typeMap : c.attrType
262
313
  });
263
314
  // 数组节点下的字段不能直接通过属性访问符访问,禁用掉
264
- if (c === null || c === void 0 ? void 0 : (_c$children = c.children) === null || _c$children === void 0 ? void 0 : _c$children.length) {
315
+ if (c !== null && c !== void 0 && (_c$children = c.children) !== null && _c$children !== void 0 && _c$children.length) {
265
316
  addOpts(c.children, opts, lastObj, value, disabled || ['objectArray', 'array'].includes(c.attrType), needResponseCodeKey);
266
317
  }
267
318
  });
268
319
  };
320
+
269
321
  /**
270
322
  * 获取发送请求的入参字段
271
323
  * @param lastObj
272
324
  * @param context
273
325
  */
274
- var getApiResponseFields = function getApiResponseFields(lastObj, context) {
275
- var _lastObj$options3, _lastObj$options4, _targetComp$props, _targetComp$props2;
326
+ var getApiResponseFields = exports.getApiResponseFields = function getApiResponseFields(lastObj, context) {
327
+ var _lastObj$options3, _lastObj$options4, _typeMap2, _targetComp$props, _targetComp$props2;
276
328
  var options = lastObj.options;
277
329
  var getComponentId = context.getComponentId,
278
330
  callFun = context.callFun,
279
331
  needResponseCodeKey = context.needResponseCodeKey;
280
332
  var targetComp = getComponentId(options.compId);
281
333
  // 往请求里面加入一些提示,用于区分多个请求
282
- var actionTitle = lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options3 = lastObj.options) === null || _lastObj$options3 === void 0 ? void 0 : _lastObj$options3.actionTitle;
334
+ var actionTitle = lastObj === null || lastObj === void 0 || (_lastObj$options3 = lastObj.options) === null || _lastObj$options3 === void 0 ? void 0 : _lastObj$options3.actionTitle;
283
335
  var responseId = lastObj === null || lastObj === void 0 ? void 0 : lastObj.dataId;
284
- var serviceTitle = lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options4 = lastObj.options) === null || _lastObj$options4 === void 0 ? void 0 : _lastObj$options4._serviceTitle;
336
+ var serviceTitle = lastObj === null || lastObj === void 0 || (_lastObj$options4 = lastObj.options) === null || _lastObj$options4 === void 0 ? void 0 : _lastObj$options4._serviceTitle;
285
337
  if (actionTitle && serviceTitle) {
286
338
  serviceTitle = "".concat(serviceTitle, "(").concat(actionTitle, ")");
287
339
  }
288
340
  var value = "$reply_".concat(lastObj.options.id, "$");
341
+ var _lastObj$options5 = lastObj.options,
342
+ _source = _lastObj$options5._source,
343
+ _serviceId = _lastObj$options5._serviceId,
344
+ restOption = _objectWithoutProperties(_lastObj$options5, _excluded);
345
+ var _callFun = callFun('findSelectedService', {
346
+ _source: _source,
347
+ _serviceId: _serviceId,
348
+ restOption: restOption
349
+ }),
350
+ _callFun2 = _slicedToArray(_callFun, 3),
351
+ service = _callFun2[0],
352
+ resAttrs = _callFun2[2];
353
+ var type = service ? (_typeMap2 = typeMap[service === null || service === void 0 ? void 0 : service.responseType]) !== null && _typeMap2 !== void 0 ? _typeMap2 : 'object' : 'object';
289
354
  var opts = [{
290
- title: (targetComp === null || targetComp === void 0 ? void 0 : (_targetComp$props = targetComp.props) === null || _targetComp$props === void 0 ? void 0 : _targetComp$props.name) ? "response(".concat(targetComp === null || targetComp === void 0 ? void 0 : (_targetComp$props2 = targetComp.props) === null || _targetComp$props2 === void 0 ? void 0 : _targetComp$props2.name, ")") : 'response',
355
+ title: targetComp !== null && targetComp !== void 0 && (_targetComp$props = targetComp.props) !== null && _targetComp$props !== void 0 && _targetComp$props.name ? "response(".concat(targetComp === null || targetComp === void 0 || (_targetComp$props2 = targetComp.props) === null || _targetComp$props2 === void 0 ? void 0 : _targetComp$props2.name, ")") : 'response',
291
356
  actionTitle: actionTitle,
292
357
  value: value,
293
- attrType: 'object',
358
+ attrType: type,
294
359
  responseId: responseId,
295
360
  serviceTitle: serviceTitle,
296
361
  // valueKey: lastObj.options.id,
297
362
  isRoot: true,
298
363
  dataId: responseId,
299
- type: 'object'
364
+ type: type
300
365
  }];
301
- var _lastObj$options5 = lastObj.options,
302
- _source = _lastObj$options5._source,
303
- _serviceId = _lastObj$options5._serviceId,
304
- restOption = _objectWithoutProperties(_lastObj$options5, _excluded);
305
- var resAttrs = callFun('findSelectedService', {
306
- _source: _source,
307
- _serviceId: _serviceId,
308
- restOption: restOption
309
- })[2];
366
+
310
367
  // 这些服务只收集一级参数?
311
368
  if ([SERVICE_SOURCE.APP,
312
369
  // SERVICE_SOURCE.QUERY,
@@ -317,12 +374,12 @@ var getApiResponseFields = function getApiResponseFields(lastObj, context) {
317
374
  opts.push.apply(opts, _toConsumableArray(resAttrs.map(function (c) {
318
375
  var _c$code, _c$code$replace;
319
376
  return {
320
- title: (c === null || c === void 0 ? void 0 : c.name) ? "".concat(c.name, "\uFF08").concat(c.code, "\uFF09") : "response.".concat(c.code),
377
+ title: c !== null && c !== void 0 && c.name ? "".concat(c.name, "\uFF08").concat(c.code, "\uFF09") : "response.".concat(c.code),
321
378
  actionTitle: actionTitle,
322
379
  name: c === null || c === void 0 ? void 0 : c.name,
323
380
  code: c === null || c === void 0 ? void 0 : c.code,
324
381
  // 有些c.code中包含多个参数(比如param.node),要修改成param?.node
325
- value: "$reply_".concat(lastObj.options.id, "?.").concat(((_c$code = c.code) === null || _c$code === void 0 ? void 0 : (_c$code$replace = _c$code.replace) === null || _c$code$replace === void 0 ? void 0 : _c$code$replace.call(_c$code, /\./g, '?.')) || c.code, "$"),
382
+ value: "$reply_".concat(lastObj.options.id, "?.").concat(((_c$code = c.code) === null || _c$code === void 0 || (_c$code$replace = _c$code.replace) === null || _c$code$replace === void 0 ? void 0 : _c$code$replace.call(_c$code, /\./g, '?.')) || c.code, "$"),
326
383
  parentValue: value,
327
384
  attrType: c.type,
328
385
  responseId: responseId,
@@ -336,14 +393,14 @@ var getApiResponseFields = function getApiResponseFields(lastObj, context) {
336
393
  }
337
394
  return opts;
338
395
  };
396
+
339
397
  /**
340
398
  * 提交业务对象
341
399
  * @param lastObj
342
400
  * @param context
343
401
  * @returns
344
402
  */
345
- exports.getApiResponseFields = getApiResponseFields;
346
- var getPostObjectResponseFields = function getPostObjectResponseFields(lastObj, context) {
403
+ var getPostObjectResponseFields = exports.getPostObjectResponseFields = function getPostObjectResponseFields(lastObj, context) {
347
404
  var _lastObj$options6, _lastObj$options7;
348
405
  var getRootNode = context.getRootNode;
349
406
  var _getRootNode = getRootNode(),
@@ -351,72 +408,81 @@ var getPostObjectResponseFields = function getPostObjectResponseFields(lastObj,
351
408
  dataSource = _getRootNode$dataSour === void 0 ? [] : _getRootNode$dataSour;
352
409
  var opts = [{
353
410
  title: 'response',
354
- actionTitle: lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options6 = lastObj.options) === null || _lastObj$options6 === void 0 ? void 0 : _lastObj$options6.actionTitle,
411
+ actionTitle: lastObj === null || lastObj === void 0 || (_lastObj$options6 = lastObj.options) === null || _lastObj$options6 === void 0 ? void 0 : _lastObj$options6.actionTitle,
355
412
  value: "$reply_".concat(lastObj.options.id, "$"),
356
413
  attrType: 'object',
357
414
  dataId: lastObj.dataId,
358
415
  type: 'object'
359
416
  }];
417
+
360
418
  // 提交的所有数据源(业务对象)
361
- var postDataSource = (lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options7 = lastObj.options) === null || _lastObj$options7 === void 0 ? void 0 : _lastObj$options7.postDataSource) || [];
419
+ var postDataSource = (lastObj === null || lastObj === void 0 || (_lastObj$options7 = lastObj.options) === null || _lastObj$options7 === void 0 ? void 0 : _lastObj$options7.postDataSource) || [];
362
420
  postDataSource.map(function (m) {
363
421
  var source = dataSource.find(function (d) {
364
422
  return d.name === m;
365
423
  });
366
424
  if (source) {
367
- var _source$config, _source$config$option, _source$config$option2, _lastObj$options8, _source$config2, _source$config2$optio, _source$config2$optio2, _typeMap$source$type;
425
+ var _source$config, _lastObj$options8, _source$config2, _typeMap3;
368
426
  opts.push({
369
- title: "\u8FD4\u56DE\u5BF9\u8C61-".concat(source === null || source === void 0 ? void 0 : (_source$config = source.config) === null || _source$config === void 0 ? void 0 : (_source$config$option = _source$config.options) === null || _source$config$option === void 0 ? void 0 : (_source$config$option2 = _source$config$option.service) === null || _source$config$option2 === void 0 ? void 0 : _source$config$option2.busiObjectName),
370
- actionTitle: lastObj === null || lastObj === void 0 ? void 0 : (_lastObj$options8 = lastObj.options) === null || _lastObj$options8 === void 0 ? void 0 : _lastObj$options8.actionTitle,
371
- value: "$reply_".concat(lastObj.options.id, "?.['").concat(source === null || source === void 0 ? void 0 : (_source$config2 = source.config) === null || _source$config2 === void 0 ? void 0 : (_source$config2$optio = _source$config2.options) === null || _source$config2$optio === void 0 ? void 0 : (_source$config2$optio2 = _source$config2$optio.service) === null || _source$config2$optio2 === void 0 ? void 0 : _source$config2$optio2.busiObjectId, "']$"),
427
+ title: "".concat(localeKey('postObject.returnObjectPrefix')).concat(source === null || source === void 0 || (_source$config = source.config) === null || _source$config === void 0 || (_source$config = _source$config.options) === null || _source$config === void 0 || (_source$config = _source$config.service) === null || _source$config === void 0 ? void 0 : _source$config.busiObjectName),
428
+ actionTitle: lastObj === null || lastObj === void 0 || (_lastObj$options8 = lastObj.options) === null || _lastObj$options8 === void 0 ? void 0 : _lastObj$options8.actionTitle,
429
+ value: "$reply_".concat(lastObj.options.id, "?.['").concat(source === null || source === void 0 || (_source$config2 = source.config) === null || _source$config2 === void 0 || (_source$config2 = _source$config2.options) === null || _source$config2 === void 0 || (_source$config2 = _source$config2.service) === null || _source$config2 === void 0 ? void 0 : _source$config2.busiObjectId, "']$"),
372
430
  attrType: 'array',
373
431
  dataId: lastObj.dataId,
374
- type: (_typeMap$source$type = typeMap[source.type]) !== null && _typeMap$source$type !== void 0 ? _typeMap$source$type : source.type
432
+ type: (_typeMap3 = typeMap[source.type]) !== null && _typeMap3 !== void 0 ? _typeMap3 : source.type
375
433
  });
376
434
  }
377
435
  return m;
378
436
  });
379
437
  return opts;
380
438
  };
381
- exports.getPostObjectResponseFields = getPostObjectResponseFields;
382
- var getAccountDivideOptsFields = function getAccountDivideOptsFields(lastObj, context) {
439
+ var getAiServiceResponseFields = exports.getAiServiceResponseFields = function getAiServiceResponseFields(lastObj, context) {
440
+ var _lastObj$options9, _targetComp$props3, _targetComp$props4;
441
+ var getComponentId = context.getComponentId,
442
+ callFun = context.callFun,
443
+ needResponseCodeKey = context.needResponseCodeKey;
444
+ var targetComp = getComponentId(lastObj.options.compId);
445
+ var value = "$reply_".concat(lastObj.options.id, "$");
446
+ var actionTitle = lastObj === null || lastObj === void 0 || (_lastObj$options9 = lastObj.options) === null || _lastObj$options9 === void 0 ? void 0 : _lastObj$options9.actionTitle;
447
+ var responseId = lastObj === null || lastObj === void 0 ? void 0 : lastObj.dataId;
448
+ var opts = [{
449
+ title: targetComp !== null && targetComp !== void 0 && (_targetComp$props3 = targetComp.props) !== null && _targetComp$props3 !== void 0 && _targetComp$props3.name ? "response(".concat(targetComp === null || targetComp === void 0 || (_targetComp$props4 = targetComp.props) === null || _targetComp$props4 === void 0 ? void 0 : _targetComp$props4.name, ")") : 'response',
450
+ actionTitle: actionTitle,
451
+ value: value,
452
+ attrType: 'object',
453
+ responseId: responseId,
454
+ actionName: localeKey('ai.actionName'),
455
+ // serviceTitle: lastObj?.options?.url,
456
+ // valueKey: lastObj.options.id,
457
+ isRoot: true,
458
+ dataId: responseId,
459
+ type: 'object'
460
+ }];
461
+ var resAttrs = callFun('syncGetAIServiceDetail', lastObj.options.url);
462
+ addOpts(resAttrs === null || resAttrs === void 0 ? void 0 : resAttrs.response, opts, lastObj, value, undefined, needResponseCodeKey);
463
+ return opts;
464
+ };
465
+
466
+ // export const getAccountDivideOptsFields = (lastObj: KV, context: CallbackContext) => {
467
+ // const opts = [];
468
+ // const rootVal = `adData_${lastObj.options.id}`;
469
+ // opts.push({ title: '(分账)response', value: `$${rootVal}$`, dataId: lastObj.dataId });
470
+ // opts.push({ title: '(分账)response.startDate', value: `$${rootVal}.startDate$`, dataId: lastObj.dataId });
471
+ // opts.push({ title: '(分账)response.endDate', value: `$${rootVal}.endDate$`, dataId: lastObj.dataId });
472
+ // opts.push({ title: '(分账)response.payCycle', value: `$${rootVal}.payCycle$`, dataId: lastObj.dataId });
473
+ // opts.push({ title: '(分账)response.totalAmount', value: `$${rootVal}.totalAmount$`, dataId: lastObj.dataId });
474
+ // opts.push({ title: '(分账)response.list', value: `$${rootVal}.list$`, dataId: lastObj.dataId });
475
+ // opts.push({ title: '(分账)response.prodCode', value: `$${rootVal}.prodCode$`, dataId: lastObj.dataId });
476
+ // return opts;
477
+ // };
478
+
479
+ var getJSBridgeFields = exports.getJSBridgeFields = function getJSBridgeFields(kv) {
480
+ var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
383
481
  var opts = [];
384
- var rootVal = "adData_".concat(lastObj.options.id);
385
- opts.push({
386
- title: '(分账)response',
387
- value: "$".concat(rootVal, "$"),
388
- dataId: lastObj.dataId
389
- });
390
- opts.push({
391
- title: '(分账)response.startDate',
392
- value: "$".concat(rootVal, ".startDate$"),
393
- dataId: lastObj.dataId
394
- });
395
482
  opts.push({
396
- title: '(分账)response.endDate',
397
- value: "$".concat(rootVal, ".endDate$"),
398
- dataId: lastObj.dataId
399
- });
400
- opts.push({
401
- title: '(分账)response.payCycle',
402
- value: "$".concat(rootVal, ".payCycle$"),
403
- dataId: lastObj.dataId
404
- });
405
- opts.push({
406
- title: '(分账)response.totalAmount',
407
- value: "$".concat(rootVal, ".totalAmount$"),
408
- dataId: lastObj.dataId
409
- });
410
- opts.push({
411
- title: '(分账)response.list',
412
- value: "$".concat(rootVal, ".list$"),
413
- dataId: lastObj.dataId
414
- });
415
- opts.push({
416
- title: '(分账)response.prodCode',
417
- value: "$".concat(rootVal, ".prodCode$"),
418
- dataId: lastObj.dataId
483
+ title: title,
484
+ value: "$jsbridge_".concat(kv.options.id, "$"),
485
+ dataId: kv.dataId
419
486
  });
420
487
  return opts;
421
- };
422
- exports.getAccountDivideOptsFields = getAccountDivideOptsFields;
488
+ };