@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;
|
|
@@ -3,40 +3,58 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getPostObjectResponseFields = exports.getApiResponseFields = exports.
|
|
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
|
|
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(
|
|
17
|
-
function ownKeys(
|
|
18
|
-
function _objectSpread(
|
|
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(
|
|
21
|
-
function _toPrimitive(
|
|
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.
|
|
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, ")
|
|
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
|
|
62
|
-
var _comp$attribute, _actionItem$todoCallb
|
|
63
|
-
var isAppChildForm = comp === null || comp === void 0
|
|
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
|
|
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
|
|
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(
|
|
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, "_
|
|
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
|
|
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, "_
|
|
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
|
|
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 (
|
|
134
|
+
if (['Form', 'QueryForm'].includes(actionObjName)) {
|
|
135
|
+
var obj = {
|
|
136
|
+
Form: '表单',
|
|
137
|
+
QueryForm: '查询表单',
|
|
138
|
+
FormList: '子表单'
|
|
139
|
+
};
|
|
116
140
|
opts.push({
|
|
117
|
-
title: "".concat(name,
|
|
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
|
|
128
|
-
var _comp$attribute2,
|
|
129
|
-
var isFormComponent = (comp === null || comp === void 0
|
|
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
|
|
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$
|
|
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(
|
|
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, "_
|
|
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
|
|
193
|
+
description: "".concat(title).concat(localeKey('form.range.beginDesc')).concat(localeKey('form.range.description'))
|
|
165
194
|
});
|
|
166
195
|
opts.push({
|
|
167
|
-
title: "".concat(title, "_
|
|
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(
|
|
204
|
+
description: "".concat(title).concat(localeKey('form.range.endDesc')).concat(localeKey('form.range.description'))
|
|
176
205
|
});
|
|
177
206
|
}
|
|
178
207
|
}
|
|
179
|
-
|
|
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.
|
|
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, ")
|
|
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, ")
|
|
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
|
|
236
|
-
var actionTitle = lastObj === null || lastObj === void 0
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
312
|
+
type: (_typeMap = typeMap[c.attrType]) !== null && _typeMap !== void 0 ? _typeMap : c.attrType
|
|
262
313
|
});
|
|
263
314
|
// 数组节点下的字段不能直接通过属性访问符访问,禁用掉
|
|
264
|
-
if (c
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
364
|
+
type: type
|
|
300
365
|
}];
|
|
301
|
-
|
|
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:
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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,
|
|
425
|
+
var _source$config, _lastObj$options8, _source$config2, _typeMap3;
|
|
368
426
|
opts.push({
|
|
369
|
-
title: "
|
|
370
|
-
actionTitle: lastObj === null || lastObj === void 0
|
|
371
|
-
value: "$reply_".concat(lastObj.options.id, "?.['").concat(source === null || source === void 0
|
|
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: (
|
|
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.
|
|
382
|
-
var
|
|
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:
|
|
397
|
-
value: "$".concat(
|
|
398
|
-
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
|
+
};
|