@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.
- package/es/IconSvg/index.js +8 -7
- package/es/error/errorCatch/index.js +1 -1
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -77
- package/es/error/errorDisplay/Mobile/Drawer/index.js +26 -26
- package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +127 -129
- package/es/error/errorDisplay/Mobile/Modal/Modal.js +46 -31
- package/es/error/errorDisplay/Mobile/Modal/index.js +24 -24
- package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +2 -2
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +183 -145
- package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +43 -46
- package/es/error/errorDisplay/Web/Drawer/index.js +15 -15
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +341 -327
- package/es/error/errorDisplay/Web/Notification/Notice.js +78 -65
- package/es/error/errorDisplay/Web/Notification/Notification.js +15 -15
- package/es/error/errorDisplay/Web/Notification/index.js +36 -38
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +2 -2
- package/es/error/errorDisplay/compUtils.js +6 -6
- package/es/error/errorDisplay/http.js +7 -7
- package/es/error/index.js +6 -6
- package/es/index.js +5 -5
- package/es/rootConfig/index.d.ts +1 -1
- package/es/rootConfig/index.js +5 -5
- package/es/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.js +13 -0
- package/es/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.mobile.js +106 -0
- package/es/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.pc.js +42 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.js +865 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-callback.js +20 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.js +266 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.js +13 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.js +57 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.pc.js +97 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +583 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +13 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +127 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.js +13 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.js +106 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.pc.js +174 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +869 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +20 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +266 -0
- package/es/rootConfig/mobile/BusiComp.d.ts +0 -1
- package/es/rootConfig/mobile/BusiComp.js +13 -10
- package/es/rootConfig/mobile/MobileModal.js +32 -27
- package/es/rootConfig/mobile/MobilePopover.d.ts +0 -2
- package/es/rootConfig/mobile/MobilePopover.js +16 -13
- package/es/rootConfig/mobile/index.js +4 -4
- package/es/rootConfig/mobile/page.d.ts +17 -2
- package/es/rootConfig/mobile/page.js +45 -38
- package/es/rootConfig/pc/BusiComp.js +82 -12
- package/es/rootConfig/pc/Drawer.d.ts +8 -9
- package/es/rootConfig/pc/Drawer.js +116 -46
- package/es/rootConfig/pc/Modal.d.ts +0 -1
- package/es/rootConfig/pc/Modal.js +90 -20
- package/es/rootConfig/pc/Popover.d.ts +0 -1
- package/es/rootConfig/pc/Popover.js +85 -15
- package/es/rootConfig/pc/index.js +5 -5
- package/es/rootConfig/pc/page.d.ts +0 -2
- package/es/rootConfig/pc/page.js +91 -22
- package/es/rootConfig/todoActionList.d.ts +1 -0
- package/es/rootConfig/todoActionList.js +1845 -719
- package/es/rootConfig/todoCallback.d.ts +12 -1
- package/es/rootConfig/todoCallback.js +175 -103
- package/es/rootConfig/todoOptionList.d.ts +0 -66
- package/es/rootConfig/todoOptionList.js +197 -198
- package/es/theme/index.js +18 -20
- package/es/theme/src/default/index.js +7 -7
- package/es/theme/utils/renderColors.js +1 -1
- package/es/utils/url.js +8 -7
- package/lib/IconSvg/index.js +10 -9
- package/lib/error/errorCatch/index.js +2 -3
- package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -79
- package/lib/error/errorDisplay/Mobile/Drawer/index.js +25 -26
- package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +123 -126
- package/lib/error/errorDisplay/Mobile/Modal/Modal.js +45 -33
- package/lib/error/errorDisplay/Mobile/Modal/index.js +23 -24
- package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +3 -5
- package/lib/error/errorDisplay/SVGstring.js +6 -12
- package/lib/error/errorDisplay/Web/Drawer/Drawer.js +181 -146
- package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +44 -48
- package/lib/error/errorDisplay/Web/Drawer/index.js +18 -20
- package/lib/error/errorDisplay/Web/ErrorMsg/index.js +336 -324
- package/lib/error/errorDisplay/Web/Notification/Notice.js +79 -68
- package/lib/error/errorDisplay/Web/Notification/Notification.js +15 -16
- package/lib/error/errorDisplay/Web/Notification/index.js +37 -41
- package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +3 -5
- package/lib/error/errorDisplay/compUtils.js +9 -12
- package/lib/error/errorDisplay/const.js +7 -13
- package/lib/error/errorDisplay/http.js +8 -9
- package/lib/index.js +3 -6
- package/lib/rootConfig/index.d.ts +1 -1
- package/lib/rootConfig/index.js +9 -3
- package/lib/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.js +19 -0
- package/lib/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.mobile.js +112 -0
- package/lib/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.pc.js +48 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.js +871 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.js +26 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.js +272 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.js +19 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.js +63 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.js +103 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +589 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +19 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +133 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.js +19 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.js +112 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.js +180 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +875 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +26 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +272 -0
- package/lib/rootConfig/mobile/BusiComp.d.ts +0 -1
- package/lib/rootConfig/mobile/BusiComp.js +14 -12
- package/lib/rootConfig/mobile/MobileModal.js +33 -29
- package/lib/rootConfig/mobile/MobilePopover.d.ts +0 -2
- package/lib/rootConfig/mobile/MobilePopover.js +17 -15
- package/lib/rootConfig/mobile/page.d.ts +17 -2
- package/lib/rootConfig/mobile/page.js +46 -40
- package/lib/rootConfig/pc/BusiComp.js +83 -14
- package/lib/rootConfig/pc/Drawer.d.ts +8 -9
- package/lib/rootConfig/pc/Drawer.js +117 -48
- package/lib/rootConfig/pc/Modal.d.ts +0 -1
- package/lib/rootConfig/pc/Modal.js +91 -22
- package/lib/rootConfig/pc/Popover.d.ts +0 -1
- package/lib/rootConfig/pc/Popover.js +86 -17
- package/lib/rootConfig/pc/page.d.ts +0 -2
- package/lib/rootConfig/pc/page.js +92 -24
- package/lib/rootConfig/todoActionList.d.ts +1 -0
- package/lib/rootConfig/todoActionList.js +1815 -695
- package/lib/rootConfig/todoCallback.d.ts +12 -1
- package/lib/rootConfig/todoCallback.js +182 -116
- package/lib/rootConfig/todoOptionList.d.ts +0 -66
- package/lib/rootConfig/todoOptionList.js +198 -200
- package/lib/theme/bin/default/modalWidth.js +1 -2
- package/lib/theme/index.js +19 -22
- package/lib/theme/src/default/index.js +7 -7
- package/lib/theme/utils/renderColors.js +1 -1
- package/lib/utils/cookieUtil.js +1 -2
- package/lib/utils/img.js +2 -3
- package/lib/utils/url.js +13 -16
- 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
|
|
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;
|
|
@@ -1,31 +1,50 @@
|
|
|
1
1
|
var _excluded = ["_source", "_serviceId"];
|
|
2
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
3
|
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."); }
|
|
4
|
-
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); }
|
|
5
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
-
function
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
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."); }
|
|
8
|
+
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); }
|
|
9
|
+
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; }
|
|
10
|
+
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; } }
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
12
|
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; }
|
|
9
13
|
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; }
|
|
10
|
-
function _typeof(
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
13
17
|
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; }
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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); }
|
|
16
20
|
export var SERVICE_SOURCE = {
|
|
17
21
|
// 服务来源
|
|
18
22
|
APP: 'app',
|
|
23
|
+
// 应用内部 & 模型生成
|
|
19
24
|
QUERY: 'query',
|
|
25
|
+
// 解析服务(SQL类服务)
|
|
20
26
|
INNER: 'inner',
|
|
27
|
+
// 高代码服务
|
|
21
28
|
PLATFORM: 'platform',
|
|
29
|
+
// 平台服务
|
|
22
30
|
STD: 'std',
|
|
31
|
+
// 编排服务
|
|
23
32
|
ATOM: 'atom',
|
|
33
|
+
// 外部服务(低代码运营平台的原子服务)
|
|
24
34
|
RHIN: 'rhin',
|
|
35
|
+
// 业务运营服务
|
|
25
36
|
SCENE: 'scene',
|
|
37
|
+
// 业务运营场景服务
|
|
26
38
|
OBJECT: 'object',
|
|
39
|
+
// 业务对象生成服务
|
|
27
40
|
SUPER: 'super' // 动态查询通用服务
|
|
28
41
|
};
|
|
42
|
+
// i18n
|
|
43
|
+
var TODO_CALLBACK_LOCALE_PREFIX = 'todo.callback';
|
|
44
|
+
var localeKey = function localeKey(suffix) {
|
|
45
|
+
return "".concat(TODO_CALLBACK_LOCALE_PREFIX, ".").concat(suffix);
|
|
46
|
+
};
|
|
47
|
+
|
|
29
48
|
/**
|
|
30
49
|
* 生成成功表单字段
|
|
31
50
|
*/
|
|
@@ -41,29 +60,29 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
41
60
|
if (!targetContainer) return [];
|
|
42
61
|
if (actionObjName === 'DForm' || actionObjName === 'BOFramer') {
|
|
43
62
|
opts.push(_objectSpread({
|
|
44
|
-
title: "(".concat(name, ")
|
|
63
|
+
title: "(".concat(name, ")", '表单取值'),
|
|
45
64
|
value: "$values_".concat(options.compId, "$"),
|
|
46
65
|
formValueActionId: dataId,
|
|
47
66
|
targetName: name,
|
|
48
67
|
formId: targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.id,
|
|
49
68
|
dataId: dataId,
|
|
50
69
|
type: 'object',
|
|
51
|
-
description: '
|
|
70
|
+
description: localeKey('form.values.description')
|
|
52
71
|
}, extraInfo));
|
|
53
72
|
var collectionFormApi = function collectionFormApi(comps) {
|
|
54
|
-
comps === null || comps === void 0
|
|
55
|
-
var _comp$attribute, _actionItem$todoCallb
|
|
56
|
-
var isAppChildForm = comp === null || comp === void 0
|
|
73
|
+
comps === null || comps === void 0 || comps.forEach(function (comp) {
|
|
74
|
+
var _comp$attribute, _actionItem$todoCallb;
|
|
75
|
+
var isAppChildForm = comp === null || comp === void 0 || (_comp$attribute = comp.attribute) === null || _comp$attribute === void 0 ? void 0 : _comp$attribute.isAppChildForm;
|
|
57
76
|
var isRangePicker = (comp === null || comp === void 0 ? void 0 : comp.compName) === 'DformRangePicker';
|
|
58
77
|
var props = comp === null || comp === void 0 ? void 0 : comp.props;
|
|
59
78
|
var childComponents = comp === null || comp === void 0 ? void 0 : comp.children();
|
|
60
79
|
var actionItem = getTodoActionByItem('value', comp.compName, true);
|
|
61
|
-
var callbackItem = actionItem === null || actionItem === void 0
|
|
80
|
+
var callbackItem = actionItem === null || actionItem === void 0 || (_actionItem$todoCallb = actionItem.todoCallbacks.find(function (callback) {
|
|
62
81
|
return _typeof(callback) === 'object' && callback.key === 'callback1';
|
|
63
|
-
})) === null || _actionItem$todoCallb === void 0
|
|
82
|
+
})) === null || _actionItem$todoCallb === void 0 || (_actionItem$todoCallb = _actionItem$todoCallb.fields) === null || _actionItem$todoCallb === void 0 ? void 0 : _actionItem$todoCallb[0];
|
|
64
83
|
if (isAppChildForm) {
|
|
65
84
|
opts.push(_objectSpread({
|
|
66
|
-
title: "".concat(props === null || props === void 0 ? void 0 : props.title).concat(
|
|
85
|
+
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") : ''),
|
|
67
86
|
value: "$values_".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldProps, "$"),
|
|
68
87
|
formValueActionId: dataId,
|
|
69
88
|
targetName: name,
|
|
@@ -76,7 +95,7 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
76
95
|
// 时间段选择增加起止时间
|
|
77
96
|
if (isRangePicker) {
|
|
78
97
|
opts.push({
|
|
79
|
-
title: "".concat(props === null || props === void 0 ? void 0 : props.title, "_
|
|
98
|
+
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") : ''),
|
|
80
99
|
value: "$values_".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldProps, "[0]$"),
|
|
81
100
|
formValueActionId: dataId,
|
|
82
101
|
targetName: name,
|
|
@@ -84,10 +103,10 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
84
103
|
valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_begin"),
|
|
85
104
|
dataId: dataId,
|
|
86
105
|
type: 'string',
|
|
87
|
-
description: "".concat(props === null || props === void 0 ? void 0 : props.title
|
|
106
|
+
description: "".concat(props === null || props === void 0 ? void 0 : props.title).concat(localeKey('form.range.beginDesc')).concat(localeKey('form.range.description'))
|
|
88
107
|
});
|
|
89
108
|
opts.push({
|
|
90
|
-
title: "".concat(props === null || props === void 0 ? void 0 : props.title, "_
|
|
109
|
+
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") : ''),
|
|
91
110
|
value: "$values_".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldProps, "[1]$"),
|
|
92
111
|
formValueActionId: dataId,
|
|
93
112
|
targetName: name,
|
|
@@ -95,7 +114,7 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
95
114
|
valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldProps, "_end"),
|
|
96
115
|
dataId: dataId,
|
|
97
116
|
type: 'string',
|
|
98
|
-
description: "".concat(props === null || props === void 0 ? void 0 : props.title
|
|
117
|
+
description: "".concat(props === null || props === void 0 ? void 0 : props.title).concat(localeKey('form.range.endDesc')).concat(localeKey('form.range.description'))
|
|
99
118
|
});
|
|
100
119
|
}
|
|
101
120
|
}
|
|
@@ -104,36 +123,47 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
104
123
|
};
|
|
105
124
|
collectionFormApi(targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.children());
|
|
106
125
|
}
|
|
126
|
+
|
|
107
127
|
// pc端表单
|
|
108
|
-
if (
|
|
128
|
+
if (['Form', 'QueryForm'].includes(actionObjName)) {
|
|
129
|
+
var obj = {
|
|
130
|
+
Form: '表单',
|
|
131
|
+
QueryForm: '查询表单',
|
|
132
|
+
FormList: '子表单'
|
|
133
|
+
};
|
|
109
134
|
opts.push({
|
|
110
|
-
title: "".concat(name,
|
|
135
|
+
title: "".concat(name).concat(obj[actionObjName], '数据'),
|
|
111
136
|
value: "$".concat(options.compId, "$"),
|
|
112
137
|
dataId: dataId,
|
|
113
138
|
formValueActionId: dataId,
|
|
114
139
|
targetName: name,
|
|
115
140
|
formId: targetContainer.id,
|
|
116
141
|
type: 'object',
|
|
117
|
-
description: '
|
|
142
|
+
description: localeKey('form.values.description')
|
|
118
143
|
});
|
|
119
144
|
var _collectionFormApi = function _collectionFormApi(comps) {
|
|
120
|
-
comps === null || comps === void 0
|
|
121
|
-
var _comp$attribute2,
|
|
122
|
-
var isFormComponent = (comp === null || comp === void 0
|
|
145
|
+
comps === null || comps === void 0 || comps.forEach(function (comp) {
|
|
146
|
+
var _comp$attribute2, _comp$attribute3, _actionItem$todoCallb2;
|
|
147
|
+
var isFormComponent = (comp === null || comp === void 0 || (_comp$attribute2 = comp.attribute) === null || _comp$attribute2 === void 0 ? void 0 : _comp$attribute2.compType) === 2;
|
|
148
|
+
|
|
149
|
+
// 表单类型不再递归收集
|
|
150
|
+
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);
|
|
151
|
+
|
|
123
152
|
// 时间段选择控件
|
|
124
153
|
var isRangePicker = (comp === null || comp === void 0 ? void 0 : comp.compName) === 'RangePicker';
|
|
125
154
|
var attribute = (comp === null || comp === void 0 ? void 0 : comp.attribute) || {};
|
|
126
155
|
var props = attribute === null || attribute === void 0 ? void 0 : attribute.props;
|
|
127
156
|
var childComponents = comp === null || comp === void 0 ? void 0 : comp.children();
|
|
128
157
|
var actionItem = getTodoActionByItem('getValue', comp.compName, false);
|
|
129
|
-
var callbackItem = actionItem === null || actionItem === void 0
|
|
158
|
+
var callbackItem = actionItem === null || actionItem === void 0 || (_actionItem$todoCallb2 = actionItem.todoCallbacks.find(function (callback) {
|
|
130
159
|
return _typeof(callback) === 'object' && callback.key === 'callback1';
|
|
131
|
-
})) === null || _actionItem$
|
|
160
|
+
})) === null || _actionItem$todoCallb2 === void 0 || (_actionItem$todoCallb2 = _actionItem$todoCallb2.fields) === null || _actionItem$todoCallb2 === void 0 ? void 0 : _actionItem$todoCallb2[0];
|
|
161
|
+
|
|
132
162
|
// 解决在表单的情况下,用户删除了标题字段,出现title undefined
|
|
133
163
|
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);
|
|
134
164
|
if (isFormComponent) {
|
|
135
165
|
opts.push({
|
|
136
|
-
title: "".concat(title).concat(
|
|
166
|
+
title: "".concat(title).concat(props !== null && props !== void 0 && props.fieldName ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "\uFF09") : ''),
|
|
137
167
|
value: "$".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldName, "$"),
|
|
138
168
|
formValueActionId: dataId,
|
|
139
169
|
targetName: name,
|
|
@@ -146,7 +176,7 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
146
176
|
// 时间段选择需要添加起止时间
|
|
147
177
|
if (isRangePicker) {
|
|
148
178
|
opts.push({
|
|
149
|
-
title: "".concat(title, "_
|
|
179
|
+
title: "".concat(title, "_", '开始时间').concat(props !== null && props !== void 0 && props.fieldName ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_begin\uFF09") : ''),
|
|
150
180
|
value: "$".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldName, "[0]$"),
|
|
151
181
|
formValueActionId: dataId,
|
|
152
182
|
targetName: name,
|
|
@@ -154,10 +184,10 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
154
184
|
valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_begin"),
|
|
155
185
|
dataId: dataId,
|
|
156
186
|
type: 'string',
|
|
157
|
-
description: "".concat(title
|
|
187
|
+
description: "".concat(title).concat(localeKey('form.range.beginDesc')).concat(localeKey('form.range.description'))
|
|
158
188
|
});
|
|
159
189
|
opts.push({
|
|
160
|
-
title: "".concat(title, "_
|
|
190
|
+
title: "".concat(title, "_", '结束时间').concat(props !== null && props !== void 0 && props.fieldName ? "\uFF08".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_end\uFF09") : ''),
|
|
161
191
|
value: "$".concat(options.compId, ".").concat(props === null || props === void 0 ? void 0 : props.fieldName, "[1]$"),
|
|
162
192
|
formValueActionId: dataId,
|
|
163
193
|
targetName: name,
|
|
@@ -165,17 +195,20 @@ export var generateFormValuesCallback1Fields = function generateFormValuesCallba
|
|
|
165
195
|
valueKey: "".concat(props === null || props === void 0 ? void 0 : props.fieldName, "_end"),
|
|
166
196
|
dataId: dataId,
|
|
167
197
|
type: 'string',
|
|
168
|
-
description: "".concat(
|
|
198
|
+
description: "".concat(title).concat(localeKey('form.range.endDesc')).concat(localeKey('form.range.description'))
|
|
169
199
|
});
|
|
170
200
|
}
|
|
171
201
|
}
|
|
172
|
-
|
|
202
|
+
if (!stopLoopFlag) {
|
|
203
|
+
_collectionFormApi(childComponents || []);
|
|
204
|
+
}
|
|
173
205
|
});
|
|
174
206
|
};
|
|
175
207
|
_collectionFormApi(targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.children());
|
|
176
208
|
}
|
|
177
209
|
return opts;
|
|
178
210
|
};
|
|
211
|
+
|
|
179
212
|
/**
|
|
180
213
|
* 生成失败表单字段
|
|
181
214
|
*/
|
|
@@ -189,23 +222,44 @@ export var generateFormValuesCallback2Fields = function generateFormValuesCallba
|
|
|
189
222
|
var targetContainer = getComponentId(options.compId);
|
|
190
223
|
if (actionObjName === 'DForm' || actionObjName === 'BOFramer') {
|
|
191
224
|
opts.push({
|
|
192
|
-
title: "(".concat(targetName, ")
|
|
225
|
+
title: "(".concat(targetName, ")").concat(localeKey('form.validate.failResult')),
|
|
193
226
|
value: "$errors_".concat(options.compId, "$"),
|
|
194
227
|
formValueActionId: dataId,
|
|
195
228
|
targetName: targetName,
|
|
196
229
|
formId: targetContainer.id,
|
|
197
230
|
dataId: dataId,
|
|
198
231
|
type: 'object',
|
|
199
|
-
description: '
|
|
232
|
+
description: localeKey('form.validate.description')
|
|
200
233
|
}, {
|
|
201
|
-
title: "(".concat(targetName, ")
|
|
234
|
+
title: "(".concat(targetName, ")").concat(localeKey('form.validate.failFirstError')),
|
|
202
235
|
value: "$errors_".concat(options.compId, ".errorFields[0].errors[0]$"),
|
|
203
236
|
formValueActionId: dataId,
|
|
204
237
|
targetName: targetName,
|
|
205
238
|
formId: targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.id,
|
|
206
239
|
dataId: dataId,
|
|
207
240
|
type: 'string',
|
|
208
|
-
description: '
|
|
241
|
+
description: localeKey('form.validate.firstError.description')
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
if (actionObjName === 'Form') {
|
|
245
|
+
opts.push({
|
|
246
|
+
title: "(".concat(targetName, ")").concat(localeKey('form.validate.failResult')),
|
|
247
|
+
value: '$err$',
|
|
248
|
+
formValueActionId: dataId,
|
|
249
|
+
targetName: targetName,
|
|
250
|
+
formId: targetContainer.id,
|
|
251
|
+
dataId: dataId,
|
|
252
|
+
type: 'object',
|
|
253
|
+
description: localeKey('form.validate.description')
|
|
254
|
+
}, {
|
|
255
|
+
title: "(".concat(targetName, ")").concat(localeKey('form.validate.failFirstError')),
|
|
256
|
+
value: '$err.errorFields[0].errors[0]$',
|
|
257
|
+
formValueActionId: dataId,
|
|
258
|
+
targetName: targetName,
|
|
259
|
+
formId: targetContainer === null || targetContainer === void 0 ? void 0 : targetContainer.id,
|
|
260
|
+
dataId: dataId,
|
|
261
|
+
type: 'string',
|
|
262
|
+
description: localeKey('form.validate.firstError.description')
|
|
209
263
|
});
|
|
210
264
|
}
|
|
211
265
|
return opts;
|
|
@@ -223,18 +277,18 @@ var addOpts = function addOpts(resAttrs, opts, lastObj, parentValue) {
|
|
|
223
277
|
var disabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
224
278
|
var needResponseCodeKey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
225
279
|
(resAttrs || []).forEach(function (c) {
|
|
226
|
-
var _lastObj$options, _lastObj$options2, _code$replace, _typeMap
|
|
227
|
-
var actionTitle = lastObj === null || lastObj === void 0
|
|
280
|
+
var _lastObj$options, _lastObj$options2, _code$replace, _typeMap, _c$children;
|
|
281
|
+
var actionTitle = lastObj === null || lastObj === void 0 || (_lastObj$options = lastObj.options) === null || _lastObj$options === void 0 ? void 0 : _lastObj$options.actionTitle;
|
|
228
282
|
var responseId = lastObj === null || lastObj === void 0 ? void 0 : lastObj.dataId;
|
|
229
|
-
var serviceTitle = lastObj === null || lastObj === void 0
|
|
283
|
+
var serviceTitle = lastObj === null || lastObj === void 0 || (_lastObj$options2 = lastObj.options) === null || _lastObj$options2 === void 0 ? void 0 : _lastObj$options2._serviceTitle;
|
|
230
284
|
if (actionTitle && serviceTitle) {
|
|
231
285
|
serviceTitle = "".concat(serviceTitle, "(").concat(actionTitle, ")");
|
|
232
286
|
}
|
|
233
287
|
var code = (c === null || c === void 0 ? void 0 : c._id) || (c === null || c === void 0 ? void 0 : c.code);
|
|
234
|
-
var value = "$reply_".concat(lastObj.options.id, "?.").concat((code === null || code === void 0
|
|
288
|
+
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, "$");
|
|
235
289
|
opts.push({
|
|
236
290
|
// eslint-disable-next-line no-underscore-dangle
|
|
237
|
-
title:
|
|
291
|
+
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),
|
|
238
292
|
actionTitle: actionTitle,
|
|
239
293
|
code: c === null || c === void 0 ? void 0 : c.code,
|
|
240
294
|
name: c === null || c === void 0 ? void 0 : c.name,
|
|
@@ -249,55 +303,61 @@ var addOpts = function addOpts(resAttrs, opts, lastObj, parentValue) {
|
|
|
249
303
|
dataId: responseId,
|
|
250
304
|
disabled: needResponseCodeKey ? false : disabled,
|
|
251
305
|
serviceAttrType: c === null || c === void 0 ? void 0 : c.attrType,
|
|
252
|
-
type: (_typeMap
|
|
306
|
+
type: (_typeMap = typeMap[c.attrType]) !== null && _typeMap !== void 0 ? _typeMap : c.attrType
|
|
253
307
|
});
|
|
254
308
|
// 数组节点下的字段不能直接通过属性访问符访问,禁用掉
|
|
255
|
-
if (c
|
|
309
|
+
if (c !== null && c !== void 0 && (_c$children = c.children) !== null && _c$children !== void 0 && _c$children.length) {
|
|
256
310
|
addOpts(c.children, opts, lastObj, value, disabled || ['objectArray', 'array'].includes(c.attrType), needResponseCodeKey);
|
|
257
311
|
}
|
|
258
312
|
});
|
|
259
313
|
};
|
|
314
|
+
|
|
260
315
|
/**
|
|
261
316
|
* 获取发送请求的入参字段
|
|
262
317
|
* @param lastObj
|
|
263
318
|
* @param context
|
|
264
319
|
*/
|
|
265
320
|
export var getApiResponseFields = function getApiResponseFields(lastObj, context) {
|
|
266
|
-
var _lastObj$options3, _lastObj$options4, _targetComp$props, _targetComp$props2;
|
|
321
|
+
var _lastObj$options3, _lastObj$options4, _typeMap2, _targetComp$props, _targetComp$props2;
|
|
267
322
|
var options = lastObj.options;
|
|
268
323
|
var getComponentId = context.getComponentId,
|
|
269
324
|
callFun = context.callFun,
|
|
270
325
|
needResponseCodeKey = context.needResponseCodeKey;
|
|
271
326
|
var targetComp = getComponentId(options.compId);
|
|
272
327
|
// 往请求里面加入一些提示,用于区分多个请求
|
|
273
|
-
var actionTitle = lastObj === null || lastObj === void 0
|
|
328
|
+
var actionTitle = lastObj === null || lastObj === void 0 || (_lastObj$options3 = lastObj.options) === null || _lastObj$options3 === void 0 ? void 0 : _lastObj$options3.actionTitle;
|
|
274
329
|
var responseId = lastObj === null || lastObj === void 0 ? void 0 : lastObj.dataId;
|
|
275
|
-
var serviceTitle = lastObj === null || lastObj === void 0
|
|
330
|
+
var serviceTitle = lastObj === null || lastObj === void 0 || (_lastObj$options4 = lastObj.options) === null || _lastObj$options4 === void 0 ? void 0 : _lastObj$options4._serviceTitle;
|
|
276
331
|
if (actionTitle && serviceTitle) {
|
|
277
332
|
serviceTitle = "".concat(serviceTitle, "(").concat(actionTitle, ")");
|
|
278
333
|
}
|
|
279
334
|
var value = "$reply_".concat(lastObj.options.id, "$");
|
|
335
|
+
var _lastObj$options5 = lastObj.options,
|
|
336
|
+
_source = _lastObj$options5._source,
|
|
337
|
+
_serviceId = _lastObj$options5._serviceId,
|
|
338
|
+
restOption = _objectWithoutProperties(_lastObj$options5, _excluded);
|
|
339
|
+
var _callFun = callFun('findSelectedService', {
|
|
340
|
+
_source: _source,
|
|
341
|
+
_serviceId: _serviceId,
|
|
342
|
+
restOption: restOption
|
|
343
|
+
}),
|
|
344
|
+
_callFun2 = _slicedToArray(_callFun, 3),
|
|
345
|
+
service = _callFun2[0],
|
|
346
|
+
resAttrs = _callFun2[2];
|
|
347
|
+
var type = service ? (_typeMap2 = typeMap[service === null || service === void 0 ? void 0 : service.responseType]) !== null && _typeMap2 !== void 0 ? _typeMap2 : 'object' : 'object';
|
|
280
348
|
var opts = [{
|
|
281
|
-
title:
|
|
349
|
+
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',
|
|
282
350
|
actionTitle: actionTitle,
|
|
283
351
|
value: value,
|
|
284
|
-
attrType:
|
|
352
|
+
attrType: type,
|
|
285
353
|
responseId: responseId,
|
|
286
354
|
serviceTitle: serviceTitle,
|
|
287
355
|
// valueKey: lastObj.options.id,
|
|
288
356
|
isRoot: true,
|
|
289
357
|
dataId: responseId,
|
|
290
|
-
type:
|
|
358
|
+
type: type
|
|
291
359
|
}];
|
|
292
|
-
|
|
293
|
-
_source = _lastObj$options5._source,
|
|
294
|
-
_serviceId = _lastObj$options5._serviceId,
|
|
295
|
-
restOption = _objectWithoutProperties(_lastObj$options5, _excluded);
|
|
296
|
-
var resAttrs = callFun('findSelectedService', {
|
|
297
|
-
_source: _source,
|
|
298
|
-
_serviceId: _serviceId,
|
|
299
|
-
restOption: restOption
|
|
300
|
-
})[2];
|
|
360
|
+
|
|
301
361
|
// 这些服务只收集一级参数?
|
|
302
362
|
if ([SERVICE_SOURCE.APP,
|
|
303
363
|
// SERVICE_SOURCE.QUERY,
|
|
@@ -308,12 +368,12 @@ export var getApiResponseFields = function getApiResponseFields(lastObj, context
|
|
|
308
368
|
opts.push.apply(opts, _toConsumableArray(resAttrs.map(function (c) {
|
|
309
369
|
var _c$code, _c$code$replace;
|
|
310
370
|
return {
|
|
311
|
-
title:
|
|
371
|
+
title: c !== null && c !== void 0 && c.name ? "".concat(c.name, "\uFF08").concat(c.code, "\uFF09") : "response.".concat(c.code),
|
|
312
372
|
actionTitle: actionTitle,
|
|
313
373
|
name: c === null || c === void 0 ? void 0 : c.name,
|
|
314
374
|
code: c === null || c === void 0 ? void 0 : c.code,
|
|
315
375
|
// 有些c.code中包含多个参数(比如param.node),要修改成param?.node
|
|
316
|
-
value: "$reply_".concat(lastObj.options.id, "?.").concat(((_c$code = c.code) === null || _c$code === void 0
|
|
376
|
+
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, "$"),
|
|
317
377
|
parentValue: value,
|
|
318
378
|
attrType: c.type,
|
|
319
379
|
responseId: responseId,
|
|
@@ -327,6 +387,7 @@ export var getApiResponseFields = function getApiResponseFields(lastObj, context
|
|
|
327
387
|
}
|
|
328
388
|
return opts;
|
|
329
389
|
};
|
|
390
|
+
|
|
330
391
|
/**
|
|
331
392
|
* 提交业务对象
|
|
332
393
|
* @param lastObj
|
|
@@ -341,70 +402,81 @@ export var getPostObjectResponseFields = function getPostObjectResponseFields(la
|
|
|
341
402
|
dataSource = _getRootNode$dataSour === void 0 ? [] : _getRootNode$dataSour;
|
|
342
403
|
var opts = [{
|
|
343
404
|
title: 'response',
|
|
344
|
-
actionTitle: lastObj === null || lastObj === void 0
|
|
405
|
+
actionTitle: lastObj === null || lastObj === void 0 || (_lastObj$options6 = lastObj.options) === null || _lastObj$options6 === void 0 ? void 0 : _lastObj$options6.actionTitle,
|
|
345
406
|
value: "$reply_".concat(lastObj.options.id, "$"),
|
|
346
407
|
attrType: 'object',
|
|
347
408
|
dataId: lastObj.dataId,
|
|
348
409
|
type: 'object'
|
|
349
410
|
}];
|
|
411
|
+
|
|
350
412
|
// 提交的所有数据源(业务对象)
|
|
351
|
-
var postDataSource = (lastObj === null || lastObj === void 0
|
|
413
|
+
var postDataSource = (lastObj === null || lastObj === void 0 || (_lastObj$options7 = lastObj.options) === null || _lastObj$options7 === void 0 ? void 0 : _lastObj$options7.postDataSource) || [];
|
|
352
414
|
postDataSource.map(function (m) {
|
|
353
415
|
var source = dataSource.find(function (d) {
|
|
354
416
|
return d.name === m;
|
|
355
417
|
});
|
|
356
418
|
if (source) {
|
|
357
|
-
var _source$config,
|
|
419
|
+
var _source$config, _lastObj$options8, _source$config2, _typeMap3;
|
|
358
420
|
opts.push({
|
|
359
|
-
title: "
|
|
360
|
-
actionTitle: lastObj === null || lastObj === void 0
|
|
361
|
-
value: "$reply_".concat(lastObj.options.id, "?.['").concat(source === null || source === void 0
|
|
421
|
+
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),
|
|
422
|
+
actionTitle: lastObj === null || lastObj === void 0 || (_lastObj$options8 = lastObj.options) === null || _lastObj$options8 === void 0 ? void 0 : _lastObj$options8.actionTitle,
|
|
423
|
+
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, "']$"),
|
|
362
424
|
attrType: 'array',
|
|
363
425
|
dataId: lastObj.dataId,
|
|
364
|
-
type: (
|
|
426
|
+
type: (_typeMap3 = typeMap[source.type]) !== null && _typeMap3 !== void 0 ? _typeMap3 : source.type
|
|
365
427
|
});
|
|
366
428
|
}
|
|
367
429
|
return m;
|
|
368
430
|
});
|
|
369
431
|
return opts;
|
|
370
432
|
};
|
|
371
|
-
export var
|
|
433
|
+
export var getAiServiceResponseFields = function getAiServiceResponseFields(lastObj, context) {
|
|
434
|
+
var _lastObj$options9, _targetComp$props3, _targetComp$props4;
|
|
435
|
+
var getComponentId = context.getComponentId,
|
|
436
|
+
callFun = context.callFun,
|
|
437
|
+
needResponseCodeKey = context.needResponseCodeKey;
|
|
438
|
+
var targetComp = getComponentId(lastObj.options.compId);
|
|
439
|
+
var value = "$reply_".concat(lastObj.options.id, "$");
|
|
440
|
+
var actionTitle = lastObj === null || lastObj === void 0 || (_lastObj$options9 = lastObj.options) === null || _lastObj$options9 === void 0 ? void 0 : _lastObj$options9.actionTitle;
|
|
441
|
+
var responseId = lastObj === null || lastObj === void 0 ? void 0 : lastObj.dataId;
|
|
442
|
+
var opts = [{
|
|
443
|
+
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',
|
|
444
|
+
actionTitle: actionTitle,
|
|
445
|
+
value: value,
|
|
446
|
+
attrType: 'object',
|
|
447
|
+
responseId: responseId,
|
|
448
|
+
actionName: localeKey('ai.actionName'),
|
|
449
|
+
// serviceTitle: lastObj?.options?.url,
|
|
450
|
+
// valueKey: lastObj.options.id,
|
|
451
|
+
isRoot: true,
|
|
452
|
+
dataId: responseId,
|
|
453
|
+
type: 'object'
|
|
454
|
+
}];
|
|
455
|
+
var resAttrs = callFun('syncGetAIServiceDetail', lastObj.options.url);
|
|
456
|
+
addOpts(resAttrs === null || resAttrs === void 0 ? void 0 : resAttrs.response, opts, lastObj, value, undefined, needResponseCodeKey);
|
|
457
|
+
return opts;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// export const getAccountDivideOptsFields = (lastObj: KV, context: CallbackContext) => {
|
|
461
|
+
// const opts = [];
|
|
462
|
+
// const rootVal = `adData_${lastObj.options.id}`;
|
|
463
|
+
// opts.push({ title: '(分账)response', value: `$${rootVal}$`, dataId: lastObj.dataId });
|
|
464
|
+
// opts.push({ title: '(分账)response.startDate', value: `$${rootVal}.startDate$`, dataId: lastObj.dataId });
|
|
465
|
+
// opts.push({ title: '(分账)response.endDate', value: `$${rootVal}.endDate$`, dataId: lastObj.dataId });
|
|
466
|
+
// opts.push({ title: '(分账)response.payCycle', value: `$${rootVal}.payCycle$`, dataId: lastObj.dataId });
|
|
467
|
+
// opts.push({ title: '(分账)response.totalAmount', value: `$${rootVal}.totalAmount$`, dataId: lastObj.dataId });
|
|
468
|
+
// opts.push({ title: '(分账)response.list', value: `$${rootVal}.list$`, dataId: lastObj.dataId });
|
|
469
|
+
// opts.push({ title: '(分账)response.prodCode', value: `$${rootVal}.prodCode$`, dataId: lastObj.dataId });
|
|
470
|
+
// return opts;
|
|
471
|
+
// };
|
|
472
|
+
|
|
473
|
+
export var getJSBridgeFields = function getJSBridgeFields(kv) {
|
|
474
|
+
var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
372
475
|
var opts = [];
|
|
373
|
-
var rootVal = "adData_".concat(lastObj.options.id);
|
|
374
|
-
opts.push({
|
|
375
|
-
title: '(分账)response',
|
|
376
|
-
value: "$".concat(rootVal, "$"),
|
|
377
|
-
dataId: lastObj.dataId
|
|
378
|
-
});
|
|
379
|
-
opts.push({
|
|
380
|
-
title: '(分账)response.startDate',
|
|
381
|
-
value: "$".concat(rootVal, ".startDate$"),
|
|
382
|
-
dataId: lastObj.dataId
|
|
383
|
-
});
|
|
384
|
-
opts.push({
|
|
385
|
-
title: '(分账)response.endDate',
|
|
386
|
-
value: "$".concat(rootVal, ".endDate$"),
|
|
387
|
-
dataId: lastObj.dataId
|
|
388
|
-
});
|
|
389
|
-
opts.push({
|
|
390
|
-
title: '(分账)response.payCycle',
|
|
391
|
-
value: "$".concat(rootVal, ".payCycle$"),
|
|
392
|
-
dataId: lastObj.dataId
|
|
393
|
-
});
|
|
394
|
-
opts.push({
|
|
395
|
-
title: '(分账)response.totalAmount',
|
|
396
|
-
value: "$".concat(rootVal, ".totalAmount$"),
|
|
397
|
-
dataId: lastObj.dataId
|
|
398
|
-
});
|
|
399
|
-
opts.push({
|
|
400
|
-
title: '(分账)response.list',
|
|
401
|
-
value: "$".concat(rootVal, ".list$"),
|
|
402
|
-
dataId: lastObj.dataId
|
|
403
|
-
});
|
|
404
476
|
opts.push({
|
|
405
|
-
title:
|
|
406
|
-
value: "$".concat(
|
|
407
|
-
dataId:
|
|
477
|
+
title: title,
|
|
478
|
+
value: "$jsbridge_".concat(kv.options.id, "$"),
|
|
479
|
+
dataId: kv.dataId
|
|
408
480
|
});
|
|
409
481
|
return opts;
|
|
410
482
|
};
|
|
@@ -1031,72 +1031,6 @@ declare const todoOptionList: {
|
|
|
1031
1031
|
}[];
|
|
1032
1032
|
};
|
|
1033
1033
|
};
|
|
1034
|
-
payCycle: {
|
|
1035
|
-
key: string;
|
|
1036
|
-
label: string;
|
|
1037
|
-
type: string;
|
|
1038
|
-
};
|
|
1039
|
-
prodCode: {
|
|
1040
|
-
key: string;
|
|
1041
|
-
label: string;
|
|
1042
|
-
type: string;
|
|
1043
|
-
};
|
|
1044
|
-
totalAmount: {
|
|
1045
|
-
key: string;
|
|
1046
|
-
label: string;
|
|
1047
|
-
type: string;
|
|
1048
|
-
};
|
|
1049
|
-
adStartDate: {
|
|
1050
|
-
key: string;
|
|
1051
|
-
label: string;
|
|
1052
|
-
type: string;
|
|
1053
|
-
};
|
|
1054
|
-
adEndDate: {
|
|
1055
|
-
key: string;
|
|
1056
|
-
label: string;
|
|
1057
|
-
type: string;
|
|
1058
|
-
};
|
|
1059
|
-
adList: {
|
|
1060
|
-
key: string;
|
|
1061
|
-
label: string;
|
|
1062
|
-
type: string;
|
|
1063
|
-
};
|
|
1064
|
-
adOperationType: {
|
|
1065
|
-
key: string;
|
|
1066
|
-
label: string;
|
|
1067
|
-
type: string;
|
|
1068
|
-
props: {
|
|
1069
|
-
options: {
|
|
1070
|
-
title: string;
|
|
1071
|
-
value: string;
|
|
1072
|
-
}[];
|
|
1073
|
-
};
|
|
1074
|
-
};
|
|
1075
|
-
adStartDateAfter: {
|
|
1076
|
-
key: string;
|
|
1077
|
-
label: string;
|
|
1078
|
-
type: string;
|
|
1079
|
-
};
|
|
1080
|
-
adTitle: {
|
|
1081
|
-
key: string;
|
|
1082
|
-
label: string;
|
|
1083
|
-
type: string;
|
|
1084
|
-
};
|
|
1085
|
-
adOldList: {
|
|
1086
|
-
key: string;
|
|
1087
|
-
label: string;
|
|
1088
|
-
type: string;
|
|
1089
|
-
};
|
|
1090
|
-
adAfterList: {
|
|
1091
|
-
key: string;
|
|
1092
|
-
label: string;
|
|
1093
|
-
type: string;
|
|
1094
|
-
};
|
|
1095
|
-
payCycleAfter: {
|
|
1096
|
-
key: string;
|
|
1097
|
-
label: string;
|
|
1098
|
-
type: string;
|
|
1099
|
-
};
|
|
1100
1034
|
accept: {
|
|
1101
1035
|
key: string;
|
|
1102
1036
|
label: string;
|