@boteteam/utils 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/cjs/index.d.ts +2 -3
  2. package/dist/cjs/index.js +0 -3
  3. package/dist/cjs/index.js.map +3 -3
  4. package/dist/esm/file.js +6 -1
  5. package/dist/esm/file.js.map +1 -1
  6. package/dist/esm/formatModule/formatModuleData.js +8 -3
  7. package/dist/esm/formatModule/formatModuleData.js.map +1 -1
  8. package/dist/esm/formatModule/helpers/formatEchartCommonProps.js +8 -2
  9. package/dist/esm/formatModule/helpers/formatEchartCommonProps.js.map +1 -1
  10. package/dist/esm/formatModule/helpers/formatFormProps.js +14 -3
  11. package/dist/esm/formatModule/helpers/formatFormProps.js.map +1 -1
  12. package/dist/esm/formatModule/helpers/formatHighCodeProps.js +6 -1
  13. package/dist/esm/formatModule/helpers/formatHighCodeProps.js.map +1 -1
  14. package/dist/esm/formatModule/helpers/formatListProps.js +6 -1
  15. package/dist/esm/formatModule/helpers/formatListProps.js.map +1 -1
  16. package/dist/esm/formatModule/helpers/formatStyleProps.js +6 -2
  17. package/dist/esm/formatModule/helpers/formatStyleProps.js.map +1 -1
  18. package/dist/esm/formatModule/helpers/staticCodeAssemble.js +6 -2
  19. package/dist/esm/formatModule/helpers/staticCodeAssemble.js.map +1 -1
  20. package/dist/esm/index.d.ts +2 -3
  21. package/dist/esm/index.js +1 -2
  22. package/dist/esm/index.js.map +1 -1
  23. package/dist/esm/pathArgsUtils.js +7 -2
  24. package/dist/esm/pathArgsUtils.js.map +1 -1
  25. package/dist/esm/treeUtils.js +3 -1
  26. package/dist/esm/treeUtils.js.map +1 -1
  27. package/dist/umd/index.min.js +1 -1
  28. package/dist/umd/index.min.js.map +1 -1
  29. package/package.json +2 -4
  30. package/dist/cjs/sseFetch.d.ts +0 -12
  31. package/dist/cjs/sseFetch.js +0 -41
  32. package/dist/cjs/sseFetch.js.map +0 -7
  33. package/dist/esm/sseFetch.d.ts +0 -12
  34. package/dist/esm/sseFetch.js +0 -34
  35. package/dist/esm/sseFetch.js.map +0 -1
@@ -2,7 +2,6 @@ import fileToBase64, { type fileToBase64Type } from './fileToBase64';
2
2
  import CookieUtils from './CookieUtils';
3
3
  import { argsToString, argsToObject, getSearchObj } from './pathArgsUtils';
4
4
  import { asyncLocalStorage, asyncSessionStorage, type asyncLocalStorageType, type asyncSessionStorageType } from './asyncStorage';
5
- import sseFetch, { type sseFetchOptionsProps } from './sseFetch';
6
5
  import { camelToSnake, underscoreToCamelCase, generateRandom18Int } from './stringUtils';
7
6
  import { getDataArr, replaceParamsValue, getParamsContentByParamKeys, replaceParamsValueForEvent } from './treeUtils';
8
7
  import formatModuleData from './formatModule/formatModuleData';
@@ -10,5 +9,5 @@ import { patternTransitionRegExp, stringPramarsValTransition, stringScriptExecut
10
9
  import loopPageStaticCodeMap from './loopPageStaticCodeMap';
11
10
  import scriptExecution, { type scriptExecutionType } from './scriptExecution';
12
11
  import { getFileUrlById, getRemoteComponentUrlByCode, getRemoteComponentUrlById } from './file';
13
- export type { fileToBase64Type, asyncLocalStorageType, asyncSessionStorageType, sseFetchOptionsProps, scriptExecutionType, };
14
- export { fileToBase64, CookieUtils, argsToString, argsToObject, getSearchObj, asyncLocalStorage, asyncSessionStorage, sseFetch, camelToSnake, underscoreToCamelCase, generateRandom18Int, formatModuleData, patternTransitionRegExp, stringPramarsValTransition, loopPageStaticCodeMap, getDataArr, replaceParamsValue, replaceParamsValueForEvent, getParamsContentByParamKeys, getFileUrlById, getRemoteComponentUrlByCode, getRemoteComponentUrlById, stringScriptExecution, scriptExecution, };
12
+ export type { fileToBase64Type, asyncLocalStorageType, asyncSessionStorageType, scriptExecutionType, };
13
+ export { fileToBase64, CookieUtils, argsToString, argsToObject, getSearchObj, asyncLocalStorage, asyncSessionStorage, camelToSnake, underscoreToCamelCase, generateRandom18Int, formatModuleData, patternTransitionRegExp, stringPramarsValTransition, loopPageStaticCodeMap, getDataArr, replaceParamsValue, replaceParamsValueForEvent, getParamsContentByParamKeys, getFileUrlById, getRemoteComponentUrlByCode, getRemoteComponentUrlById, stringScriptExecution, scriptExecution, };
package/dist/cjs/index.js CHANGED
@@ -49,7 +49,6 @@ __export(src_exports, {
49
49
  replaceParamsValue: () => import_treeUtils.replaceParamsValue,
50
50
  replaceParamsValueForEvent: () => import_treeUtils.replaceParamsValueForEvent,
51
51
  scriptExecution: () => import_scriptExecution.default,
52
- sseFetch: () => import_sseFetch.default,
53
52
  stringPramarsValTransition: () => import_helpers.stringPramarsValTransition,
54
53
  stringScriptExecution: () => import_helpers.stringScriptExecution,
55
54
  underscoreToCamelCase: () => import_stringUtils.underscoreToCamelCase
@@ -59,7 +58,6 @@ var import_fileToBase64 = __toESM(require("./fileToBase64"));
59
58
  var import_CookieUtils = __toESM(require("./CookieUtils"));
60
59
  var import_pathArgsUtils = require("./pathArgsUtils");
61
60
  var import_asyncStorage = require("./asyncStorage");
62
- var import_sseFetch = __toESM(require("./sseFetch"));
63
61
  var import_stringUtils = require("./stringUtils");
64
62
  var import_treeUtils = require("./treeUtils");
65
63
  var import_formatModuleData = __toESM(require("./formatModule/formatModuleData"));
@@ -91,7 +89,6 @@ _.noConflict();
91
89
  replaceParamsValue,
92
90
  replaceParamsValueForEvent,
93
91
  scriptExecution,
94
- sseFetch,
95
92
  stringPramarsValTransition,
96
93
  stringScriptExecution,
97
94
  underscoreToCamelCase
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["import fileToBase64, { type fileToBase64Type } from './fileToBase64';\nimport CookieUtils from './CookieUtils';\nimport { argsToString, argsToObject, getSearchObj } from './pathArgsUtils';\nimport {\n asyncLocalStorage,\n asyncSessionStorage,\n type asyncLocalStorageType,\n type asyncSessionStorageType,\n} from './asyncStorage';\nimport sseFetch, { type sseFetchOptionsProps } from './sseFetch';\nimport {\n camelToSnake,\n underscoreToCamelCase,\n generateRandom18Int,\n} from './stringUtils';\nimport {\n getDataArr,\n replaceParamsValue,\n getParamsContentByParamKeys,\n replaceParamsValueForEvent,\n} from './treeUtils';\nimport formatModuleData from './formatModule/formatModuleData';\nimport {\n patternTransitionRegExp,\n stringPramarsValTransition,\n stringScriptExecution,\n} from './formatModule/helpers';\nimport loopPageStaticCodeMap from './loopPageStaticCodeMap';\nimport scriptExecution, { type scriptExecutionType } from './scriptExecution';\nimport {\n getFileUrlById,\n getRemoteComponentUrlByCode,\n getRemoteComponentUrlById,\n} from './file';\n\n\n// 避免 _对象 和其他库冲突\nconst _ = require('lodash');\n\n_.noConflict();\n\nexport type {\n fileToBase64Type,\n asyncLocalStorageType,\n asyncSessionStorageType,\n sseFetchOptionsProps,\n scriptExecutionType,\n};\n\nexport {\n fileToBase64,\n CookieUtils,\n argsToString,\n argsToObject,\n getSearchObj,\n asyncLocalStorage,\n asyncSessionStorage,\n sseFetch,\n camelToSnake,\n underscoreToCamelCase,\n generateRandom18Int,\n formatModuleData,\n patternTransitionRegExp,\n stringPramarsValTransition,\n loopPageStaticCodeMap,\n getDataArr,\n replaceParamsValue,\n replaceParamsValueForEvent,\n getParamsContentByParamKeys,\n getFileUrlById,\n getRemoteComponentUrlByCode,\n getRemoteComponentUrlById,\n stringScriptExecution,\n scriptExecution,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0CAAAC;AAAA,EAAA,gDAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4DAAAC;AAAA,EAAA;AAAA;AAAA;AAAA,gDAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAoD;AACpD,yBAAwB;AACxB,2BAAyD;AACzD,0BAKO;AACP,sBAAoD;AACpD,yBAIO;AACP,uBAKO;AACP,8BAA6B;AAC7B,qBAIO;AACP,mCAAkC;AAClC,6BAA0D;AAC1D,kBAIO;AAIP,IAAM,IAAI,QAAQ,QAAQ;AAE1B,EAAE,WAAW;",
6
- "names": ["CookieUtils", "fileToBase64", "formatModuleData", "loopPageStaticCodeMap", "scriptExecution", "sseFetch"]
4
+ "sourcesContent": ["import fileToBase64, { type fileToBase64Type } from './fileToBase64';\nimport CookieUtils from './CookieUtils';\nimport { argsToString, argsToObject, getSearchObj } from './pathArgsUtils';\nimport {\n asyncLocalStorage,\n asyncSessionStorage,\n type asyncLocalStorageType,\n type asyncSessionStorageType,\n} from './asyncStorage';\nimport {\n camelToSnake,\n underscoreToCamelCase,\n generateRandom18Int,\n} from './stringUtils';\nimport {\n getDataArr,\n replaceParamsValue,\n getParamsContentByParamKeys,\n replaceParamsValueForEvent,\n} from './treeUtils';\nimport formatModuleData from './formatModule/formatModuleData';\nimport {\n patternTransitionRegExp,\n stringPramarsValTransition,\n stringScriptExecution,\n} from './formatModule/helpers';\nimport loopPageStaticCodeMap from './loopPageStaticCodeMap';\nimport scriptExecution, { type scriptExecutionType } from './scriptExecution';\nimport {\n getFileUrlById,\n getRemoteComponentUrlByCode,\n getRemoteComponentUrlById,\n} from './file';\n\n\n// 避免 _对象 和其他库冲突\nconst _ = require('lodash');\n\n_.noConflict();\n\nexport type {\n fileToBase64Type,\n asyncLocalStorageType,\n asyncSessionStorageType,\n scriptExecutionType,\n};\n\nexport {\n fileToBase64,\n CookieUtils,\n argsToString,\n argsToObject,\n getSearchObj,\n asyncLocalStorage,\n asyncSessionStorage,\n camelToSnake,\n underscoreToCamelCase,\n generateRandom18Int,\n formatModuleData,\n patternTransitionRegExp,\n stringPramarsValTransition,\n loopPageStaticCodeMap,\n getDataArr,\n replaceParamsValue,\n replaceParamsValueForEvent,\n getParamsContentByParamKeys,\n getFileUrlById,\n getRemoteComponentUrlByCode,\n getRemoteComponentUrlById,\n stringScriptExecution,\n scriptExecution,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wCAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0CAAAC;AAAA,EAAA,gDAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4DAAAC;AAAA,EAAA;AAAA;AAAA;AAAA,gDAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAoD;AACpD,yBAAwB;AACxB,2BAAyD;AACzD,0BAKO;AACP,yBAIO;AACP,uBAKO;AACP,8BAA6B;AAC7B,qBAIO;AACP,mCAAkC;AAClC,6BAA0D;AAC1D,kBAIO;AAIP,IAAM,IAAI,QAAQ,QAAQ;AAE1B,EAAE,WAAW;",
6
+ "names": ["CookieUtils", "fileToBase64", "formatModuleData", "loopPageStaticCodeMap", "scriptExecution"]
7
7
  }
package/dist/esm/file.js CHANGED
@@ -1,4 +1,9 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ 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); }
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
2
7
  import security from '@lingxiteam/security';
3
8
  import { argsToString } from "./pathArgsUtils";
4
9
 
@@ -1 +1 @@
1
- {"version":3,"names":["security","argsToString","DEFAULT_PREFIX","concat","process","env","REACT_APP_REQ_PREFIX","getFileUrlById","fileId","_ref","arguments","length","undefined","prefix","_ref$isSecurity","isSecurity","params","baseUrl","replace","query","_objectSpread","url","autoSecurityWithUrl","getRemoteComponentUrl","_ref2","_ref2$isSecurity","_ref2$params","getRemoteComponentUrlByCode","pageCode","options","getRemoteComponentUrlById","fileInfoId"],"sources":["../../src/file.ts"],"sourcesContent":["import security from '@lingxiteam/security';\nimport { argsToString } from './pathArgsUtils';\n\n// 暂时放到utils中,后续考虑独立在@boteteam/service包\n\nconst DEFAULT_PREFIX = `${process.env.REACT_APP_REQ_PREFIX}/bote`;\n\n/**\n * 根据文件ID生成文件URL地址\n * @param fileId 文件ID\n * @param options 配置选项\n * @param options.prefix 自定义请求前缀(默认使用环境变量配置)\n * @param options.isSecurity 是否启用安全处理(默认true), 将对url地址参数加密或加签\n * @param options.params 自定义参数,将添加到query参数中\n * @returns 文件URL地址\n */\nexport const getFileUrlById = (\n fileId: string,\n {\n prefix,\n isSecurity = true,\n params,\n }: {\n prefix?: string;\n isSecurity?: boolean;\n params?: Record<string, any>;\n } = {},\n) => {\n const baseUrl = prefix ? prefix.replace(/\\/$/, '') : DEFAULT_PREFIX;\n const query = argsToString({ fileId, ...params });\n const url = `${baseUrl}/file/download?${query}`;\n return isSecurity ? security.autoSecurityWithUrl(url) : url;\n};\n\nconst getRemoteComponentUrl = ({\n prefix,\n isSecurity = true,\n params = {},\n}: {\n prefix?: string;\n isSecurity?: boolean;\n params?: Record<string, any>;\n} = {}) => {\n const baseUrl = prefix ? prefix.replace(/\\/$/, '') : DEFAULT_PREFIX;\n const query = argsToString(params);\n const url = `${baseUrl}/manager/skill/page/getRemoteComponent?${query}`;\n return isSecurity ? security.autoSecurityWithUrl(url) : url;\n};\n\n/**\n * 根据页面编码生成远程组件URL地址\n * @param pageCode 页面编码\n * @param options 配置选项\n * @param options.prefix 自定义请求前缀(默认使用环境变量配置)\n * @param options.isSecurity 是否启用安全处理(默认true), 将对url地址参数加密或加签\n * @param options.params 自定义参数,将添加到query参数中\n * @returns 文件URL地址\n */\nexport const getRemoteComponentUrlByCode = (\n pageCode: string,\n options: Parameters<typeof getRemoteComponentUrl>[0],\n) => {\n return getRemoteComponentUrl({\n ...options,\n params: { pageCode, ...options?.params },\n });\n};\n\n/**\n * 根据文件ID生成远程组件URL地址\n * @param fileInfoId 文件ID\n * @param options 配置选项\n * @param options.prefix 自定义请求前缀(默认使用环境变量配置)\n * @param options.isSecurity 是否启用安全处理(默认true), 将对url地址参数加密或加签\n * @param options.params 自定义参数,将添加到query参数中\n * @returns 文件URL地址\n */\nexport const getRemoteComponentUrlById = (\n fileInfoId: string,\n options: Parameters<typeof getRemoteComponentUrl>[0],\n) => {\n return getRemoteComponentUrl({\n ...options,\n params: { fileInfoId, ...options?.params },\n });\n};\n"],"mappings":";AAAA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,YAAY;;AAErB;;AAEA,IAAMC,cAAc,MAAAC,MAAA,CAAMC,OAAO,CAACC,GAAG,CAACC,oBAAoB,UAAO;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CACzBC,MAAc,EAUX;E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,CAAMc,OAAO,6CAAAd,MAAA,CAA0CgB,KAAK,CAAE;EACvE,OAAOJ,UAAU,GAAGf,QAAQ,CAACsB,mBAAmB,CAACD,GAAG,CAAC,GAAGA,GAAG;AAC7D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMM,2BAA2B,GAAG,SAA9BA,2BAA2BA,CACtCC,QAAgB,EAChBC,OAAoD,EACjD;EACH,OAAON,qBAAqB,CAAAH,aAAA,CAAAA,aAAA,KACvBS,OAAO;IACVb,MAAM,EAAAI,aAAA;MAAIQ,QAAQ,EAARA;IAAQ,GAAKC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEb,MAAM;EAAE,EACzC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMc,yBAAyB,GAAG,SAA5BA,yBAAyBA,CACpCC,UAAkB,EAClBF,OAAoD,EACjD;EACH,OAAON,qBAAqB,CAAAH,aAAA,CAAAA,aAAA,KACvBS,OAAO;IACVb,MAAM,EAAAI,aAAA;MAAIW,UAAU,EAAVA;IAAU,GAAKF,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEb,MAAM;EAAE,EAC3C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"names":["security","argsToString","DEFAULT_PREFIX","concat","process","env","REACT_APP_REQ_PREFIX","getFileUrlById","fileId","_ref","arguments","length","undefined","prefix","_ref$isSecurity","isSecurity","params","baseUrl","replace","query","_objectSpread","url","autoSecurityWithUrl","getRemoteComponentUrl","_ref2","_ref2$isSecurity","_ref2$params","getRemoteComponentUrlByCode","pageCode","options","getRemoteComponentUrlById","fileInfoId"],"sources":["../../src/file.ts"],"sourcesContent":["import security from '@lingxiteam/security';\nimport { argsToString } from './pathArgsUtils';\n\n// 暂时放到utils中,后续考虑独立在@boteteam/service包\n\nconst DEFAULT_PREFIX = `${process.env.REACT_APP_REQ_PREFIX}/bote`;\n\n/**\n * 根据文件ID生成文件URL地址\n * @param fileId 文件ID\n * @param options 配置选项\n * @param options.prefix 自定义请求前缀(默认使用环境变量配置)\n * @param options.isSecurity 是否启用安全处理(默认true), 将对url地址参数加密或加签\n * @param options.params 自定义参数,将添加到query参数中\n * @returns 文件URL地址\n */\nexport const getFileUrlById = (\n fileId: string,\n {\n prefix,\n isSecurity = true,\n params,\n }: {\n prefix?: string;\n isSecurity?: boolean;\n params?: Record<string, any>;\n } = {},\n) => {\n const baseUrl = prefix ? prefix.replace(/\\/$/, '') : DEFAULT_PREFIX;\n const query = argsToString({ fileId, ...params });\n const url = `${baseUrl}/file/download?${query}`;\n return isSecurity ? security.autoSecurityWithUrl(url) : url;\n};\n\nconst getRemoteComponentUrl = ({\n prefix,\n isSecurity = true,\n params = {},\n}: {\n prefix?: string;\n isSecurity?: boolean;\n params?: Record<string, any>;\n} = {}) => {\n const baseUrl = prefix ? prefix.replace(/\\/$/, '') : DEFAULT_PREFIX;\n const query = argsToString(params);\n const url = `${baseUrl}/manager/skill/page/getRemoteComponent?${query}`;\n return isSecurity ? security.autoSecurityWithUrl(url) : url;\n};\n\n/**\n * 根据页面编码生成远程组件URL地址\n * @param pageCode 页面编码\n * @param options 配置选项\n * @param options.prefix 自定义请求前缀(默认使用环境变量配置)\n * @param options.isSecurity 是否启用安全处理(默认true), 将对url地址参数加密或加签\n * @param options.params 自定义参数,将添加到query参数中\n * @returns 文件URL地址\n */\nexport const getRemoteComponentUrlByCode = (\n pageCode: string,\n options: Parameters<typeof getRemoteComponentUrl>[0],\n) => {\n return getRemoteComponentUrl({\n ...options,\n params: { pageCode, ...options?.params },\n });\n};\n\n/**\n * 根据文件ID生成远程组件URL地址\n * @param fileInfoId 文件ID\n * @param options 配置选项\n * @param options.prefix 自定义请求前缀(默认使用环境变量配置)\n * @param options.isSecurity 是否启用安全处理(默认true), 将对url地址参数加密或加签\n * @param options.params 自定义参数,将添加到query参数中\n * @returns 文件URL地址\n */\nexport const getRemoteComponentUrlById = (\n fileInfoId: string,\n options: Parameters<typeof getRemoteComponentUrl>[0],\n) => {\n return getRemoteComponentUrl({\n ...options,\n params: { fileInfoId, ...options?.params },\n });\n};\n"],"mappings":";;;;;;AAAA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,YAAY;;AAErB;;AAEA,IAAMC,cAAc,MAAAC,MAAA,CAAMC,OAAO,CAACC,GAAG,CAACC,oBAAoB,UAAO;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CACzBC,MAAc,EAUX;EAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MADC,CAAC,CAAC;IAPJG,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,eAAA,GAAAL,IAAA,CACNM,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,IAAI,GAAAA,eAAA;IACjBE,MAAM,GAAAP,IAAA,CAANO,MAAM;EAOR,IAAMC,OAAO,GAAGJ,MAAM,GAAGA,MAAM,CAACK,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAGhB,cAAc;EACnE,IAAMiB,KAAK,GAAGlB,YAAY,CAAAmB,aAAA;IAAGZ,MAAM,EAANA;EAAM,GAAKQ,MAAM,CAAE,CAAC;EACjD,IAAMK,GAAG,MAAAlB,MAAA,CAAMc,OAAO,qBAAAd,MAAA,CAAkBgB,KAAK,CAAE;EAC/C,OAAOJ,UAAU,GAAGf,QAAQ,CAACsB,mBAAmB,CAACD,GAAG,CAAC,GAAGA,GAAG;AAC7D,CAAC;AAED,IAAME,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAA,EAQhB;EAAA,IAAAC,KAAA,GAAAd,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAP,CAAC,CAAC;IAPJG,MAAM,GAAAW,KAAA,CAANX,M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m/typeof";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
1
  var _excluded = ["itemLabel", "itemContent", "itemDescribe", "dataSource", "fileProps", "attrs", "rowSelection", "hasSelectAll", "rowKey", "fieldName", "column", "articleContent", "eventFlag"];
2
+ 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); }
3
+ 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; }
4
+ 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; }
5
+ 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; }
6
+ 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; }
7
+ 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; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ 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); }
5
10
  import 'ses';
6
11
  import { getDataArr } from "../treeUtils";
7
12
  import { urlPrefix, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatFormProps, formatHighCodeProps, formatDescriptionsProps, formatLoopProps, formatStyleProps, formatEchartLineProps, formatEchartPieProps, staticCodeAssemble, stringPramarsValTransition } from "./helpers";
@@ -1 +1 @@
1
- {"version":3,"names":["getDataArr","urlPrefix","formatListProps","formatTableProps","formatCarouselProps","formatImageProps","formatFormProps","formatHighCodeProps","formatDescriptionsProps","formatLoopProps","formatStyleProps","formatEchartLineProps","formatEchartPieProps","staticCodeAssemble","stringPramarsValTransition","formatModuleData","_ref","moduleData","parentModuleData","parameters","loopItemData","staticCodeList","disabled","pageData","moduleDataRes","allParametrs","_objectSpread","loopItem","_staticCodeAssemble","staticCodeMap","staticOptionsMap","compProps","compType","children","moduleTitle","moduleDescribe","id","key","originModule","_ref2","listItemLabel","itemLabel","listItemContent","itemContent","listItemDescribe","itemDescribe","compDataSource","dataSource","fileProps","attrs","rowSelection","hasSelectAll","rowKey","fieldName","column","articleContent","eventFlag","otherCompProps","_objectWithoutProperties","_excluded","title","checked","parentCompProps","indexOf","Array","isArray","length","childs","map","item","_Object$keys","Object","keys","forEach","compPropKey","type","rowKeyIndexArr","_rowKeyIndexArr$slice","slice","url","dataType","_moduleDataRes","carouselProps","options","_moduleDataRes2","imageProps","_moduleDataRes3","highCodeCompProps","_moduleDataRes4","tableProps","_moduleDataRes5","formProps","_moduleDataRes6","descriptionsProps","_loopProps$dataSource","_moduleDataRes10","loopProps","loopChilds","dataItem","_moduleDataRes7","_moduleDataRes8","_moduleDataRes9","dataItemKey","push","originItem","loopChildInfo","_typeof","includes","resProps","echartProps","style"],"sources":["../../../src/formatModule/formatModuleData.ts"],"sourcesContent":["import 'ses';\nimport { getDataArr } from '../treeUtils';\nimport {\n urlPrefix,\n formatListProps,\n formatTableProps,\n formatCarouselProps,\n formatImageProps,\n formatFormProps,\n formatHighCodeProps,\n formatDescriptionsProps,\n formatLoopProps,\n formatStyleProps,\n formatEchartLineProps,\n formatEchartPieProps,\n staticCodeAssemble,\n stringPramarsValTransition,\n} from './helpers';\n\ntype formatModuleProps = {\n moduleData: { [key: string]: any } | null; // 页面配置数据\n parentModuleData?: { [key: string]: any } | null; // 父级配置数据\n pageData?: { [key: string]: any } | null; // 页面组件数据\n parameters?: any; // 入参上下文\n loopItemData?: any; // 循环体数据\n staticCodeList?: { [key: string]: any } | null; // 静态资源数据\n disabled?: boolean;\n};\n\nconst formatModuleData = ({\n moduleData,\n parentModuleData,\n parameters,\n loopItemData,\n staticCodeList,\n disabled,\n pageData,\n}: formatModuleProps): { [key: string]: any } | null => {\n let moduleDataRes: { [key: string]: any } = { };\n const allParametrs:{ [key: string]: any } = {\n ...(parameters || {}),\n pageData: pageData || {},\n loopItem: loopItemData || {},\n }; // 把页面数据与入参组装到一起\n const {\n staticCodeMap,\n staticOptionsMap,\n } = staticCodeAssemble(staticCodeList);\n\n if (moduleData) {\n const {\n compProps,\n compType,\n children,\n moduleTitle,\n moduleDescribe,\n id,\n } = moduleData;\n // 组装静态数据映射\n moduleDataRes = {\n ...moduleData,\n key: id,\n disabled,\n compProps: {},\n originModule: moduleData, // 配置moduled的信息\n };\n const {\n itemLabel: listItemLabel,\n itemContent: listItemContent,\n itemDescribe: listItemDescribe,\n dataSource: compDataSource,\n fileProps,\n attrs,\n rowSelection,\n hasSelectAll,\n rowKey,\n fieldName,\n column,\n articleContent,\n eventFlag,\n ...otherCompProps // 无需处理的属性\n } = compProps || {};\n if (moduleTitle) {\n moduleDataRes.moduleTitle = stringPramarsValTransition(moduleTitle, allParametrs);\n }\n if (moduleDescribe) {\n moduleDataRes.moduleDescribe = stringPramarsValTransition(moduleDescribe, allParametrs);\n }\n if (otherCompProps?.title) {\n moduleDataRes.compProps.title = stringPramarsValTransition(otherCompProps?.title, allParametrs);\n }\n if (eventFlag) {\n moduleDataRes.compProps.eventFlag = { checked: true };\n }\n \n moduleDataRes.parentCompProps = parentModuleData?.compProps || {};\n if (\n ['panel', 'div', 'page'].indexOf(compType) >= 0 &&\n Array.isArray(children) &&\n children.length > 0\n ) {\n const childs = children.map((item) => {\n return formatModuleData({\n moduleData: item,\n parentModuleData: moduleData,\n parameters,\n loopItemData,\n staticCodeList,\n disabled,\n pageData,\n });\n });\n moduleDataRes.children = childs;\n } else {\n if (otherCompProps && Object?.keys(otherCompProps)?.length > 0) {\n Object?.keys(otherCompProps).forEach(compPropKey => {\n if (otherCompProps?.[compPropKey] || typeof otherCompProps?.[compPropKey] === 'number') {\n moduleDataRes.compProps[compPropKey] = otherCompProps?.[compPropKey];\n }\n });\n }\n if (rowSelection) {\n moduleDataRes.compProps.rowSelection = rowSelection;\n if (hasSelectAll && rowSelection?.type === 'checkbox') {\n moduleDataRes.compProps.hasSelectAll = hasSelectAll;\n } else {\n delete moduleDataRes.compProps.hasSelectAll;\n }\n }\n const rowKeyIndexArr = getDataArr(rowKey);\n\n if (Array.isArray(rowKeyIndexArr) && rowKeyIndexArr.length > 0) {\n moduleDataRes.compProps.rowKey = rowKeyIndexArr.slice(-1)?.[0];\n }\n\n if (compType === 'typography') {\n if (articleContent) {\n moduleDataRes.compProps.articleContent = stringPramarsValTransition(articleContent, allParametrs);\n }\n }\n if (compType === 'iframe') {\n moduleDataRes.compProps.url = stringPramarsValTransition(\n otherCompProps?.url,\n allParametrs,\n );\n }\n\n if (compType === 'carousel' && compDataSource && compDataSource?.dataType) {\n const carouselProps = formatCarouselProps({\n options: {\n dataSource: compDataSource,\n },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...carouselProps,\n };\n }\n if (compType === 'image' && compDataSource && compDataSource?.dataType) {\n const imageProps = formatImageProps({\n options: {\n dataSource: compDataSource,\n },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...imageProps,\n };\n }\n\n if (compType === 'highCodeComp') {\n const highCodeCompProps = formatHighCodeProps({\n options: { fileProps },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...highCodeCompProps,\n };\n }\n\n if (compType === 'table') {\n const tableProps = formatTableProps({\n options: {\n attrs,\n dataSource: compDataSource,\n },\n staticCodeMap,\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...tableProps,\n };\n }\n if (compType === 'form') {\n const formProps = formatFormProps({\n options: {\n column,\n children,\n },\n parameters: allParametrs,\n staticCodeMap,\n staticOptionsMap,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...formProps,\n };\n }\n if (compType === 'descriptions') {\n const descriptionsProps = formatDescriptionsProps({\n options: {\n column,\n attrs,\n },\n parameters: allParametrs,\n staticCodeMap,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...descriptionsProps,\n };\n }\n if (compType === 'loop') {\n const loopProps = formatLoopProps({\n options: {\n dataSource: compDataSource,\n },\n parameters: allParametrs,\n staticCodeMap,\n });\n const loopChilds:({[key:string]:any}|null)[] = [];\n if (\n Array.isArray(loopProps?.dataSource) && loopProps?.dataSource?.length > 0 &&\n Array.isArray(children) && children.length > 0\n ) {\n loopProps?.dataSource.forEach((dataItem) => {\n const dataItemKey = moduleDataRes?.compProps?.rowKey && dataItem?.[moduleDataRes?.compProps?.rowKey] ?\n dataItem?.[moduleDataRes?.compProps?.rowKey] : '';\n loopChilds.push({\n id: dataItemKey,\n key: dataItemKey,\n compType: 'loopItem',\n compProps: {},\n originItem: dataItem,\n children: children.map((item:{[key:string]:any}) => {\n const loopChildInfo = formatModuleData({\n moduleData: item,\n parentModuleData: moduleData,\n loopItemData: typeof dataItem === 'object' ? dataItem : { item: dataItem },\n parameters,\n staticCodeList,\n disabled,\n pageData,\n });\n return loopChildInfo;\n }),\n });\n });\n } else if (Array.isArray(children) && children.length > 0) {\n loopChilds.push({\n id: '1',\n key: '1',\n compType: 'loopItem',\n compProps: {},\n originItem: {},\n children: children.map((item:{[key:string]:any}) => {\n const loopChildInfo = formatModuleData({\n moduleData: item,\n parentModuleData: moduleData,\n loopItemData: {},\n parameters,\n staticCodeList,\n disabled,\n pageData,\n });\n return loopChildInfo;\n }),\n });\n }\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...loopProps,\n column,\n children: loopChilds,\n };\n }\n if (['list', 'card', 'recommendList'].includes(compType)) {\n const resProps = formatListProps({\n options: {\n ...otherCompProps,\n rowKey,\n rowSelection,\n attrs,\n itemLabel: listItemLabel,\n itemContent: listItemContent,\n itemDescribe: listItemDescribe,\n dataSource: compDataSource,\n },\n urlPrefix,\n staticCodeMap,\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...resProps,\n };\n }\n if (['echartBar', 'echartLine'].includes(compType)) {\n const echartProps = formatEchartLineProps({\n options: { ...otherCompProps, dataSource: compDataSource },\n parameters: allParametrs,\n });\n\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...echartProps,\n };\n }\n if (compType === 'echartPie') {\n const echartProps = formatEchartPieProps({\n options: {\n dataSource: compDataSource,\n ...otherCompProps,\n },\n parameters: allParametrs,\n });\n\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...echartProps,\n };\n }\n }\n moduleDataRes.compProps.style = formatStyleProps(moduleData, parentModuleData);\n // 所有的模版 拼一个组装数据的key值\n if (moduleData?.compProps && fieldName) {\n moduleDataRes.compProps.fieldName = fieldName;\n }\n }\n \n // console.log('moduleDataRes', moduleDataRes);\n return moduleDataRes;\n};\n\nexport default formatModuleData;\n"],"mappings":";;;;AAAA,OAAO,KAAK;AACZ,SAASA,UAAU;AACnB,SACEC,SAAS,EACTC,eAAe,EACfC,gBAAgB,EAChBC,mBAAmB,EACnBC,gBAAgB,EAChBC,eAAe,EACfC,mBAAmB,EACnBC,uBAAuB,EACvBC,eAAe,EACfC,gBAAgB,EAChBC,qBAAqB,EACrBC,oBAAoB,EACpBC,kBAAkB,EAClBC,0BAA0B;AAa5B,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAQkC;EAAA,IAPtDC,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAChBC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,cAAc,GAAAL,IAAA,CAAdK,cAAc;IACdC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IACRC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;EAER,IAAIC,aAAqC,GAAG,CAAE,CAAC;EAC/C,IAAMC,YAAmC,GAAAC,aAAA,CAAAA,aAAA,KACnCP,UAAU,IAAI,CAAC,CAAC;IACpBI,QAAQ,EAAEA,QAAQ,IAAI,CAAC,CAAC;IACxBI,QAAQ,EAAEP,YAAY,IAAI,CAAC;EAAC,EAC7B,CAAC,CAAC;EACH,IAAAQ,mBAAA,GAGIf,kBAAkB,CAACQ,cAAc,CAAC;IAFpCQ,aAAa,GAAAD,mBAAA,CAAbC,aAAa;IACbC,gBAAgB,GAAAF,mBAAA,CAAhBE,gBAAgB;EAGlB,IAAIb,UAAU,EAAE;IACd,IACEc,SAAS,GAMPd,UAAU,CANZc,SAAS;MACTC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;UAC1D3B,UAAU,EAAEM;QACd,CAAC,CAAC;QAEFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9B8E,WAAW,CACf;MACH;MACA,IAAI7E,QAAQ,KAAK,WAAW,EAAE;QAC5B,IAAM6E,YAAW,GAAGjG,oBAAoB,CAAC;UACvCuE,OAAO,EAAAzD,aAAA;YACLqB,UAAU,EAAED;UAAc,GACvBW,cAAc,CAClB;UACDtC,UAAU,EAAEM;QACd,CAAC,CAAC;QAEFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9B8E,YAAW,CACf;MACH;IACF;IACArF,aAAa,CAACO,SAAS,CAAC+E,KAAK,GAAGpG,gBAAgB,CAACO,UAAU,EAAEC,gBAAgB,CAAC;IAC9E;IACA,IAAID,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEc,SAAS,IAAIsB,SAAS,EAAE;MACtC7B,aAAa,CAACO,SAAS,CAACsB,SAAS,GAAGA,SAAS;IAC/C;EACF;;EAEA;EACA,OAAO7B,aAAa;AACtB,CAAC;AAED,eAAeT,gBAAgB"}
1
+ {"version":3,"names":["getDataArr","urlPrefix","formatListProps","formatTableProps","formatCarouselProps","formatImageProps","formatFormProps","formatHighCodeProps","formatDescriptionsProps","formatLoopProps","formatStyleProps","formatEchartLineProps","formatEchartPieProps","staticCodeAssemble","stringPramarsValTransition","formatModuleData","_ref","moduleData","parentModuleData","parameters","loopItemData","staticCodeList","disabled","pageData","moduleDataRes","allParametrs","_objectSpread","loopItem","_staticCodeAssemble","staticCodeMap","staticOptionsMap","compProps","compType","children","moduleTitle","moduleDescribe","id","key","originModule","_ref2","listItemLabel","itemLabel","listItemContent","itemContent","listItemDescribe","itemDescribe","compDataSource","dataSource","fileProps","attrs","rowSelection","hasSelectAll","rowKey","fieldName","column","articleContent","eventFlag","otherCompProps","_objectWithoutProperties","_excluded","title","checked","parentCompProps","indexOf","Array","isArray","length","childs","map","item","_Object$keys","Object","keys","forEach","compPropKey","type","rowKeyIndexArr","_rowKeyIndexArr$slice","slice","url","dataType","_moduleDataRes","carouselProps","options","_moduleDataRes2","imageProps","_moduleDataRes3","highCodeCompProps","_moduleDataRes4","tableProps","_moduleDataRes5","formProps","_moduleDataRes6","descriptionsProps","_loopProps$dataSource","_moduleDataRes10","loopProps","loopChilds","dataItem","_moduleDataRes7","_moduleDataRes8","_moduleDataRes9","dataItemKey","push","originItem","loopChildInfo","_typeof","includes","resProps","echartProps","style"],"sources":["../../../src/formatModule/formatModuleData.ts"],"sourcesContent":["import 'ses';\nimport { getDataArr } from '../treeUtils';\nimport {\n urlPrefix,\n formatListProps,\n formatTableProps,\n formatCarouselProps,\n formatImageProps,\n formatFormProps,\n formatHighCodeProps,\n formatDescriptionsProps,\n formatLoopProps,\n formatStyleProps,\n formatEchartLineProps,\n formatEchartPieProps,\n staticCodeAssemble,\n stringPramarsValTransition,\n} from './helpers';\n\ntype formatModuleProps = {\n moduleData: { [key: string]: any } | null; // 页面配置数据\n parentModuleData?: { [key: string]: any } | null; // 父级配置数据\n pageData?: { [key: string]: any } | null; // 页面组件数据\n parameters?: any; // 入参上下文\n loopItemData?: any; // 循环体数据\n staticCodeList?: { [key: string]: any } | null; // 静态资源数据\n disabled?: boolean;\n};\n\nconst formatModuleData = ({\n moduleData,\n parentModuleData,\n parameters,\n loopItemData,\n staticCodeList,\n disabled,\n pageData,\n}: formatModuleProps): { [key: string]: any } | null => {\n let moduleDataRes: { [key: string]: any } = { };\n const allParametrs:{ [key: string]: any } = {\n ...(parameters || {}),\n pageData: pageData || {},\n loopItem: loopItemData || {},\n }; // 把页面数据与入参组装到一起\n const {\n staticCodeMap,\n staticOptionsMap,\n } = staticCodeAssemble(staticCodeList);\n\n if (moduleData) {\n const {\n compProps,\n compType,\n children,\n moduleTitle,\n moduleDescribe,\n id,\n } = moduleData;\n // 组装静态数据映射\n moduleDataRes = {\n ...moduleData,\n key: id,\n disabled,\n compProps: {},\n originModule: moduleData, // 配置moduled的信息\n };\n const {\n itemLabel: listItemLabel,\n itemContent: listItemContent,\n itemDescribe: listItemDescribe,\n dataSource: compDataSource,\n fileProps,\n attrs,\n rowSelection,\n hasSelectAll,\n rowKey,\n fieldName,\n column,\n articleContent,\n eventFlag,\n ...otherCompProps // 无需处理的属性\n } = compProps || {};\n if (moduleTitle) {\n moduleDataRes.moduleTitle = stringPramarsValTransition(moduleTitle, allParametrs);\n }\n if (moduleDescribe) {\n moduleDataRes.moduleDescribe = stringPramarsValTransition(moduleDescribe, allParametrs);\n }\n if (otherCompProps?.title) {\n moduleDataRes.compProps.title = stringPramarsValTransition(otherCompProps?.title, allParametrs);\n }\n if (eventFlag) {\n moduleDataRes.compProps.eventFlag = { checked: true };\n }\n \n moduleDataRes.parentCompProps = parentModuleData?.compProps || {};\n if (\n ['panel', 'div', 'page'].indexOf(compType) >= 0 &&\n Array.isArray(children) &&\n children.length > 0\n ) {\n const childs = children.map((item) => {\n return formatModuleData({\n moduleData: item,\n parentModuleData: moduleData,\n parameters,\n loopItemData,\n staticCodeList,\n disabled,\n pageData,\n });\n });\n moduleDataRes.children = childs;\n } else {\n if (otherCompProps && Object?.keys(otherCompProps)?.length > 0) {\n Object?.keys(otherCompProps).forEach(compPropKey => {\n if (otherCompProps?.[compPropKey] || typeof otherCompProps?.[compPropKey] === 'number') {\n moduleDataRes.compProps[compPropKey] = otherCompProps?.[compPropKey];\n }\n });\n }\n if (rowSelection) {\n moduleDataRes.compProps.rowSelection = rowSelection;\n if (hasSelectAll && rowSelection?.type === 'checkbox') {\n moduleDataRes.compProps.hasSelectAll = hasSelectAll;\n } else {\n delete moduleDataRes.compProps.hasSelectAll;\n }\n }\n const rowKeyIndexArr = getDataArr(rowKey);\n\n if (Array.isArray(rowKeyIndexArr) && rowKeyIndexArr.length > 0) {\n moduleDataRes.compProps.rowKey = rowKeyIndexArr.slice(-1)?.[0];\n }\n\n if (compType === 'typography') {\n if (articleContent) {\n moduleDataRes.compProps.articleContent = stringPramarsValTransition(articleContent, allParametrs);\n }\n }\n if (compType === 'iframe') {\n moduleDataRes.compProps.url = stringPramarsValTransition(\n otherCompProps?.url,\n allParametrs,\n );\n }\n\n if (compType === 'carousel' && compDataSource && compDataSource?.dataType) {\n const carouselProps = formatCarouselProps({\n options: {\n dataSource: compDataSource,\n },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...carouselProps,\n };\n }\n if (compType === 'image' && compDataSource && compDataSource?.dataType) {\n const imageProps = formatImageProps({\n options: {\n dataSource: compDataSource,\n },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...imageProps,\n };\n }\n\n if (compType === 'highCodeComp') {\n const highCodeCompProps = formatHighCodeProps({\n options: { fileProps },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...highCodeCompProps,\n };\n }\n\n if (compType === 'table') {\n const tableProps = formatTableProps({\n options: {\n attrs,\n dataSource: compDataSource,\n },\n staticCodeMap,\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...tableProps,\n };\n }\n if (compType === 'form') {\n const formProps = formatFormProps({\n options: {\n column,\n children,\n },\n parameters: allParametrs,\n staticCodeMap,\n staticOptionsMap,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...formProps,\n };\n }\n if (compType === 'descriptions') {\n const descriptionsProps = formatDescriptionsProps({\n options: {\n column,\n attrs,\n },\n parameters: allParametrs,\n staticCodeMap,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...descriptionsProps,\n };\n }\n if (compType === 'loop') {\n const loopProps = formatLoopProps({\n options: {\n dataSource: compDataSource,\n },\n parameters: allParametrs,\n staticCodeMap,\n });\n const loopChilds:({[key:string]:any}|null)[] = [];\n if (\n Array.isArray(loopProps?.dataSource) && loopProps?.dataSource?.length > 0 &&\n Array.isArray(children) && children.length > 0\n ) {\n loopProps?.dataSource.forEach((dataItem) => {\n const dataItemKey = moduleDataRes?.compProps?.rowKey && dataItem?.[moduleDataRes?.compProps?.rowKey] ?\n dataItem?.[moduleDataRes?.compProps?.rowKey] : '';\n loopChilds.push({\n id: dataItemKey,\n key: dataItemKey,\n compType: 'loopItem',\n compProps: {},\n originItem: dataItem,\n children: children.map((item:{[key:string]:any}) => {\n const loopChildInfo = formatModuleData({\n moduleData: item,\n parentModuleData: moduleData,\n loopItemData: typeof dataItem === 'object' ? dataItem : { item: dataItem },\n parameters,\n staticCodeList,\n disabled,\n pageData,\n });\n return loopChildInfo;\n }),\n });\n });\n } else if (Array.isArray(children) && children.length > 0) {\n loopChilds.push({\n id: '1',\n key: '1',\n compType: 'loopItem',\n compProps: {},\n originItem: {},\n children: children.map((item:{[key:string]:any}) => {\n const loopChildInfo = formatModuleData({\n moduleData: item,\n parentModuleData: moduleData,\n loopItemData: {},\n parameters,\n staticCodeList,\n disabled,\n pageData,\n });\n return loopChildInfo;\n }),\n });\n }\n moduleDataRes.compProps = {\n ...(moduleDataRes?.compProps || {}),\n ...loopProps,\n column,\n children: loopChilds,\n };\n }\n if (['list', 'card', 'recommendList'].includes(compType)) {\n const resProps = formatListProps({\n options: {\n ...otherCompProps,\n rowKey,\n rowSelection,\n attrs,\n itemLabel: listItemLabel,\n itemContent: listItemContent,\n itemDescribe: listItemDescribe,\n dataSource: compDataSource,\n },\n urlPrefix,\n staticCodeMap,\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...resProps,\n };\n }\n if (['echartBar', 'echartLine'].includes(compType)) {\n const echartProps = formatEchartLineProps({\n options: { ...otherCompProps, dataSource: compDataSource },\n parameters: allParametrs,\n });\n\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...echartProps,\n };\n }\n if (compType === 'echartPie') {\n const echartProps = formatEchartPieProps({\n options: {\n dataSource: compDataSource,\n ...otherCompProps,\n },\n parameters: allParametrs,\n });\n\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...echartProps,\n };\n }\n }\n moduleDataRes.compProps.style = formatStyleProps(moduleData, parentModuleData);\n // 所有的模版 拼一个组装数据的key值\n if (moduleData?.compProps && fieldName) {\n moduleDataRes.compProps.fieldName = fieldName;\n }\n }\n \n // console.log('moduleDataRes', moduleDataRes);\n return moduleDataRes;\n};\n\nexport default formatModuleData;\n"],"mappings":";;;;;;;;;AAAA,OAAO,KAAK;AACZ,SAASA,UAAU;AACnB,SACEC,SAAS,EACTC,eAAe,EACfC,gBAAgB,EAChBC,mBAAmB,EACnBC,gBAAgB,EAChBC,eAAe,EACfC,mBAAmB,EACnBC,uBAAuB,EACvBC,eAAe,EACfC,gBAAgB,EAChBC,qBAAqB,EACrBC,oBAAoB,EACpBC,kBAAkB,EAClBC,0BAA0B;AAa5B,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAQkC;EAAA,IAPtDC,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAChBC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,cAAc,GAAAL,IAAA,CAAdK,cAAc;IACdC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IACRC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;EAER,IAAIC,aAAqC,GAAG,CAAE,CAAC;EAC/C,IAAMC,YAAmC,GAAAC,aAAA,CAAAA,aAAA,KACnCP,UAAU,IAAI,CAAC,CAAC;IACpBI,QAAQ,EAAEA,QAAQ,IAAI,CAAC,CAAC;IACxBI,QAAQ,EAAEP,YAAY,IAAI,CAAC;EAAC,EAC7B,CAAC,CAAC;EACH,IAAAQ,m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I,CAAC,WAAW,EAAE,YAAY,CAAC,CAACD,QAAQ,CAAC3E,QAAQ,CAAC,EAAE;QAClD,IAAM6E,WAAW,GAAGlG,qBAAqB,CAAC;UACxCwE,OAAO,EAAAzD,aAAA,CAAAA,aAAA,KAAO+B,cAAc;YAAEV,UAAU,EAAED;UAAc,EAAE;UAC1D3B,UAAU,EAAEM;QACd,CAAC,CAAC;QAEFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9B8E,WAAW,CACf;MACH;MACA,IAAI7E,QAAQ,KAAK,WAAW,EAAE;QAC5B,IAAM6E,YAAW,GAAGjG,oBAAoB,CAAC;UACvCuE,OAAO,EAAAzD,aAAA;YACLqB,UAAU,EAAED;UAAc,GACvBW,cAAc,CAClB;UACDtC,UAAU,EAAEM;QACd,CAAC,CAAC;QAEFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9B8E,YAAW,CACf;MACH;IACF;IACArF,aAAa,CAACO,SAAS,CAAC+E,KAAK,GAAGpG,gBAAgB,CAACO,UAAU,EAAEC,gBAAgB,CAAC;IAC9E;IACA,IAAID,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEc,SAAS,IAAIsB,SAAS,EAAE;MACtC7B,aAAa,CAACO,SAAS,CAACsB,SAAS,GAAGA,SAAS;IAC/C;EACF;;EAEA;EACA,OAAO7B,aAAa;AACtB,CAAC;AAED,eAAeT,gBAAgB"}
@@ -1,6 +1,12 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
+ 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); }
3
2
  var _excluded = ["position"];
3
+ 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; }
4
+ 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; }
5
+ 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; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
+ 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
+ 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; }
4
10
  import { set } from 'lodash';
5
11
  import stringPramarsValTransition from "./stringPramarsValTransition";
6
12
  var eachPosition = function eachPosition(positonName) {
@@ -1 +1 @@
1
- {"version":3,"names":["set","stringPramarsValTransition","eachPosition","positonName","res","left","top","right","bottom","formatEchartLineProps","_ref","_ref$options","options","_ref$parameters","parameters","title","subtitle","grid","legend","color","showLegend","titlePosition","chartOptions","itemGap","tooltip","feature","saveAsImage","titlePositionObj","Object","keys","forEach","poKey","legndObj","position","otherLegnd","_objectWithoutProperties","_excluded","positionObj","_objectSpread","Array","isArray","length"],"sources":["../../../../src/formatModule/helpers/formatEchartCommonProps.ts"],"sourcesContent":["import { set } from 'lodash';\nimport stringPramarsValTransition from './stringPramarsValTransition';\n\nexport type formatEchartLinePropsType = {\n options?: {[key:string]: any},\n parameters?:{[key:string]: any};\n}\n\nconst eachPosition = (positonName:string) => {\n let res:{[key:string]: any} = {};\n switch (positonName) {\n case 'leftTop':\n res = {\n left: 0,\n top: 0,\n };\n break;\n case 'topCenter':\n res = {\n left: 'center',\n top: 0,\n };\n break;\n case 'rightTop':\n res = {\n right: 0,\n top: 0,\n };\n break;\n case 'leftCenter':\n res = {\n left: 0,\n top: 'center',\n };\n break;\n case 'center':\n res = {\n right: 'center',\n top: 'center',\n };\n break;\n case 'rightCenter':\n res = {\n right: 0,\n top: 'center',\n };\n break;\n case 'leftBottom':\n res = {\n left: 0,\n bottom: 0,\n };\n break;\n case 'bottomCenter':\n res = {\n left: 'center',\n bottom: 0,\n };\n break;\n case 'rightBottom':\n res = {\n right: 0,\n bottom: 0,\n };\n break;\n default:\n break;\n }\n return res;\n};\n\nconst formatEchartLineProps = ({\n options = {},\n parameters = {},\n}: formatEchartLinePropsType) => {\n const {\n title,\n subtitle,\n grid,\n legend,\n color,\n showLegend,\n titlePosition,\n } = options;\n const chartOptions:{[key:string]: any} = {\n options: {\n title: {\n itemGap: 4,\n },\n tooltip: {\n feature: {\n saveAsImage: {},\n },\n },\n },\n };\n\n if (title || subtitle) {\n if (title) {\n set(chartOptions, ['options', 'title', 'text'], stringPramarsValTransition(title, parameters));\n }\n \n if (subtitle) {\n set(chartOptions, ['options', 'title', 'subtext'], stringPramarsValTransition(subtitle, parameters));\n }\n\n if (titlePosition) {\n const titlePositionObj:{[key:string]: any} = eachPosition(titlePosition);\n Object.keys(titlePositionObj).forEach(poKey => {\n set(chartOptions, ['options', 'title', poKey], titlePositionObj?.[poKey]);\n });\n }\n }\n\n if (grid) {\n set(chartOptions, ['options', 'grid'], grid);\n }\n \n if (showLegend) {\n let legndObj:{[key:string]: any} = {};\n if (legend) {\n const { position, ...otherLegnd } = legend;\n const positionObj = eachPosition(position);\n legndObj = {\n ...positionObj,\n ...otherLegnd,\n };\n }\n\n set(chartOptions, ['options', 'legend'], legndObj);\n }\n\n if (Array.isArray(color) && color?.length > 0) {\n set(chartOptions, ['options', 'color'], color);\n }\n \n return chartOptions;\n};\n\nexport default formatEchartLineProps;\n"],"mappings":";;;AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,0BAA0B;AAOjC,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,WAAkB,EAAK;EAC3C,IAAIC,GAAuB,GAAG,CAAC,CAAC;EAChC,QAAQD,WAAW;IACjB,KAAK,SAAS;MACZC,GAAG,GAAG;QACJC,IAAI,EAAE,CAAC;QACPC,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,WAAW;MACdF,GAAG,GAAG;QACJC,IAAI,EAAE,QAAQ;QACdC,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,UAAU;MACbF,GAAG,GAAG;QACJG,KAAK,EAAE,CAAC;QACRD,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,YAAY;MACfF,GAAG,GAAG;QACJC,IAAI,EAAE,CAAC;QACPC,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,QAAQ;MACXF,GAAG,GAAG;QACJG,KAAK,EAAE,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AC,IAAI,CAAAA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEsB,MAAM,IAAG,CAAC,EAAE;IAC7CzC,GAAG,CAACsB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,EAAEH,KAAK,CAAC;EAChD;EAEA,OAAOG,YAAY;AACrB,CAAC;AAED,eAAeb,qBAAqB"}
1
+ {"version":3,"names":["set","stringPramarsValTransition","eachPosition","positonName","res","left","top","right","bottom","formatEchartLineProps","_ref","_ref$options","options","_ref$parameters","parameters","title","subtitle","grid","legend","color","showLegend","titlePosition","chartOptions","itemGap","tooltip","feature","saveAsImage","titlePositionObj","Object","keys","forEach","poKey","legndObj","position","otherLegnd","_objectWithoutProperties","_excluded","positionObj","_objectSpread","Array","isArray","length"],"sources":["../../../../src/formatModule/helpers/formatEchartCommonProps.ts"],"sourcesContent":["import { set } from 'lodash';\nimport stringPramarsValTransition from './stringPramarsValTransition';\n\nexport type formatEchartLinePropsType = {\n options?: {[key:string]: any},\n parameters?:{[key:string]: any};\n}\n\nconst eachPosition = (positonName:string) => {\n let res:{[key:string]: any} = {};\n switch (positonName) {\n case 'leftTop':\n res = {\n left: 0,\n top: 0,\n };\n break;\n case 'topCenter':\n res = {\n left: 'center',\n top: 0,\n };\n break;\n case 'rightTop':\n res = {\n right: 0,\n top: 0,\n };\n break;\n case 'leftCenter':\n res = {\n left: 0,\n top: 'center',\n };\n break;\n case 'center':\n res = {\n right: 'center',\n top: 'center',\n };\n break;\n case 'rightCenter':\n res = {\n right: 0,\n top: 'center',\n };\n break;\n case 'leftBottom':\n res = {\n left: 0,\n bottom: 0,\n };\n break;\n case 'bottomCenter':\n res = {\n left: 'center',\n bottom: 0,\n };\n break;\n case 'rightBottom':\n res = {\n right: 0,\n bottom: 0,\n };\n break;\n default:\n break;\n }\n return res;\n};\n\nconst formatEchartLineProps = ({\n options = {},\n parameters = {},\n}: formatEchartLinePropsType) => {\n const {\n title,\n subtitle,\n grid,\n legend,\n color,\n showLegend,\n titlePosition,\n } = options;\n const chartOptions:{[key:string]: any} = {\n options: {\n title: {\n itemGap: 4,\n },\n tooltip: {\n feature: {\n saveAsImage: {},\n },\n },\n },\n };\n\n if (title || subtitle) {\n if (title) {\n set(chartOptions, ['options', 'title', 'text'], stringPramarsValTransition(title, parameters));\n }\n \n if (subtitle) {\n set(chartOptions, ['options', 'title', 'subtext'], stringPramarsValTransition(subtitle, parameters));\n }\n\n if (titlePosition) {\n const titlePositionObj:{[key:string]: any} = eachPosition(titlePosition);\n Object.keys(titlePositionObj).forEach(poKey => {\n set(chartOptions, ['options', 'title', poKey], titlePositionObj?.[poKey]);\n });\n }\n }\n\n if (grid) {\n set(chartOptions, ['options', 'grid'], grid);\n }\n \n if (showLegend) {\n let legndObj:{[key:string]: any} = {};\n if (legend) {\n const { position, ...otherLegnd } = legend;\n const positionObj = eachPosition(position);\n legndObj = {\n ...positionObj,\n ...otherLegnd,\n };\n }\n\n set(chartOptions, ['options', 'legend'], legndObj);\n }\n\n if (Array.isArray(color) && color?.length > 0) {\n set(chartOptions, ['options', 'color'], color);\n }\n \n return chartOptions;\n};\n\nexport default formatEchartLineProps;\n"],"mappings":";;;;;;;;;AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,0BAA0B;AAOjC,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,WAAkB,EAAK;EAC3C,IAAIC,GAAuB,GAAG,CAAC,CAAC;EAChC,QAAQD,WAAW;IACjB,KAAK,SAAS;MACZC,GAAG,GAAG;QACJC,IAAI,EAAE,CAAC;QACPC,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,WAAW;MACdF,GAAG,GAAG;QACJC,IAAI,EAAE,QAAQ;QACdC,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,UAAU;MACbF,GAAG,GAAG;QACJG,KAAK,EAAE,CAAC;QACRD,GAAG,EAAE;MACP,CAAC;MACD;IACF,KAAK,YAAY;MACfF,GAAG,GAAG;QACJC,IAAI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C,SAAS,EAAE,QAAQ,CAAC,EAAEU,QAAQ,CAAC;EACpD;EAEA,IAAIO,KAAK,CAACC,OAAO,CAACrB,KAAK,CAAC,IAAI,CAAAA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEsB,MAAM,IAAG,CAAC,EAAE;IAC7CzC,GAAG,CAACsB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,EAAEH,KAAK,CAAC;EAChD;EAEA,OAAOG,YAAY;AACrB,CAAC;AAED,eAAeb,qBAAqB"}
@@ -1,8 +1,19 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
1
+ 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); }
4
2
  var _excluded = ["required", "extend", "display"],
5
3
  _excluded2 = ["dataOptions"];
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ 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."); }
6
+ 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); }
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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 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; }
11
+ 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; }
12
+ 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; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ 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); }
15
+ 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; }
16
+ 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; }
6
17
  import { get } from 'lodash';
7
18
  import { stringScriptExecution } from "./stringScriptExecution";
8
19
  import { getDataArr, getParamsContentByParamKeys, replaceParamsValue } from "../../treeUtils";
@@ -1 +1 @@
1
- {"version":3,"names":["get","stringScriptExecution","getDataArr","getParamsContentByParamKeys","replaceParamsValue","formatTableProps","formatListProps","formRulsRegMap","urlPrefix","patternTransitionRegExp","formatOptionsRecursively","data","labelApiPath","valApiPath","map","item","option","label","value","children","Array","isArray","formatFormProps","_ref","parameters","staticCodeMap","staticOptionsMap","_ref$options","options","column","res","formItems","initValues","length","forEach","attrItem","_extend$controlBtns","_otherAttrFormProps$r","_attrItem$formProps","_ref2","attrCompProps","compProps","attrFormProps","formProps","_ref3","required","extend","attrFormPropsDisplay","display","otherAttrFormProps","_objectWithoutProperties","_excluded","_ref4","dataOptions","otherAttrCompProps","_excluded2","formItem","key","id","name","type","compType","props","originModule","text","_objectSpread","controlBtns","_attrItem$compProps","_attrItem$compProps2","_attrItem$compProps3","_attrItem$compProps4","_attrItem$compProps5","_attrItem$compProps6","_attrItem$compProps7","_formatTableProps","attrs","dataSource","columns","rowKeys","rowKey","hasSelectAll","rowSelection","includes","_attrItem$compProps8","resProps","_attrItem$compProps9","_Object$keys","_attrItem$compProps10","_attrItem$compProps15","_attrItem$compProps16","Object","keys","_attrItem$compProps11","uploadDataParams","paramsName","_attrItem$compProps12","test","_attrItem$compProps13","_attrItem$compProps14","action","url","_attrItem$compProps17","otherRules","rules","filter","defaultValue","attrDefVal","_attrItem$formProps2","valuePropName","_attrItem$formProps3","pattern","message","formItemDisplay","codeExtendVal","formItemRequired","concat","_toConsumableArray","attrItemDataOptions","staticCode","_staticCodeMap$attrIt","_staticCodeMap$attrIt2","attrCode","formatToTreeData","optionsItems","optItem","title","treeData","contextOptions","_attrItemDataOptions$","_attrItemDataOptions$2","optLabelStr","optValueStr","splitParamsPath","paramsPathStr","paramsPathArr","replace","split","idx","optValArr","optLabelArr","optData","slice","push","formMode","span","initialValues"],"sources":["../../../../src/formatModule/helpers/formatFormProps.ts"],"sourcesContent":["import { get } from 'lodash';\nimport { stringScriptExecution } from './stringScriptExecution';\nimport { getDataArr, getParamsContentByParamKeys, replaceParamsValue } from '../../treeUtils';\nimport formatTableProps from './formatTableProps';\nimport formatListProps from './formatListProps';\nimport formRulsRegMap from './formRulsRegMap';\nimport urlPrefix from './urlPrefix';\nimport patternTransitionRegExp from './patternTransitionRegExp';\n\nexport type formatFormPropsType = {\n options?: {\n column?: number;\n children?: {[key:string]: any}[]\n }\n parameters: {[key:string]: any};\n staticCodeMap: {[key:string]: any};\n staticOptionsMap: {[key:string]: any};\n}\n\nconst formatOptionsRecursively = (data: any[], labelApiPath: string[], valApiPath: string[]): any[] => {\n return data.map((item) => {\n const option: any = {\n label: get(item, labelApiPath),\n value: get(item, valApiPath),\n };\n \n // 如果存在children属性,递归处理\n if (item.children && Array.isArray(item.children)) {\n option.children = formatOptionsRecursively(item.children, labelApiPath, valApiPath);\n }\n \n return option;\n });\n};\n\nconst formatFormProps = ({\n parameters,\n staticCodeMap,\n staticOptionsMap,\n options = {},\n}: formatFormPropsType):{[key:string]: any} => {\n const { children, column } = options;\n const res:{[key:string]: any} = {};\n const formItems: { [key: string]: any }[] = [];\n const initValues: { [key: string]: any } = {};\n if (Array.isArray(children) && children.length > 0) {\n children.forEach((attrItem) => {\n const {\n compProps: attrCompProps,\n formProps: attrFormProps,\n } = attrItem || {};\n const {\n required,\n extend,\n display: attrFormPropsDisplay,\n ...otherAttrFormProps\n } = attrFormProps || {};\n const {\n dataOptions,\n ...otherAttrCompProps\n } = attrCompProps || {};\n const formItem:{[key:string]: any} = {\n key: attrItem?.id,\n label: attrFormProps?.label,\n name: attrFormProps?.name,\n type: attrItem?.compType,\n props: otherAttrCompProps || {},\n formProps: otherAttrFormProps || {},\n originModule: attrItem, // 以下是组件配置属性,用于属性编辑\n };\n if (extend?.type === 'text' && extend?.text && typeof extend?.text === 'string') {\n formItem.formProps = {\n ...formItem.formProps,\n extend: {\n ...extend,\n text: replaceParamsValue(extend?.text, parameters),\n },\n };\n } else if (extend?.type === 'controlBtns' && Array.isArray(extend?.controlBtns) && extend?.controlBtns?.length > 0) {\n formItem.formProps = {\n ...formItem.formProps,\n extend: {\n ...extend,\n controlBtns: extend?.controlBtns,\n },\n };\n } else {\n delete formItem.formProps.extend;\n }\n if (attrItem?.compType === 'table') {\n const {\n columns,\n dataSource,\n } = formatTableProps({\n options: {\n attrs: attrItem?.compProps?.attrs,\n dataSource: attrItem?.compProps?.dataSource,\n },\n staticCodeMap,\n parameters,\n });\n const rowKeys = getDataArr(attrItem?.compProps?.rowKey);\n formItem.props = {\n ...formItem.props,\n columns,\n dataSource,\n rowKey: rowKeys?.length > 0 ? rowKeys?.[rowKeys?.length - 1] : 'key',\n hasSelectAll: (attrItem?.compProps?.rowSelection && attrItem?.compProps?.hasSelectAll) ? attrItem?.compProps?.hasSelectAll : null,\n rowSelection: attrItem?.compProps?.rowSelection || { type: 'radio' },\n };\n }\n if (['list', 'card'].includes(attrItem?.compType)) {\n const resProps = formatListProps({\n options: attrItem?.compProps,\n staticCodeMap,\n parameters,\n urlPrefix,\n });\n formItem.props = {\n ...resProps,\n rowSelection: attrItem?.compProps?.rowSelection || { type: 'radio' },\n };\n }\n if (attrItem?.compType === 'upload') {\n if (\n attrItem?.compProps?.data &&\n Object.keys(attrItem?.compProps?.data)?.length > 0\n ) {\n const uploadDataParams:{[key:string]: any} = {};\n Object.keys(attrItem?.compProps?.data).forEach(paramsName => {\n if (/\\$\\{(.+?)\\}/g.test(attrItem?.compProps?.data?.[paramsName])) {\n // const valParamArr = getDataArr(attrItem?.compProps?.data?.[paramsName]);\n uploadDataParams[paramsName] = getParamsContentByParamKeys(attrItem?.compProps?.data?.[paramsName], parameters);\n } else {\n uploadDataParams[paramsName] = attrItem?.compProps?.data?.[paramsName];\n }\n });\n formItem.props = {\n ...formItem.props,\n data: uploadDataParams,\n };\n }\n if (\n attrItem?.compProps?.action?.url &&\n typeof attrItem?.compProps?.action?.url === 'string'\n ) {\n formItem.props = {\n ...formItem.props,\n action: attrItem?.compProps?.action?.url,\n };\n }\n }\n let otherRules = Array.isArray(otherAttrFormProps?.rules) ? otherAttrFormProps?.rules?.filter((item: any) => !item?.required) : [];\n if (attrItem?.formProps?.defaultValue) {\n let attrDefVal:any = '';\n if (attrItem?.compType === 'upload') {\n formItem.formProps = {\n ...formItem.formProps,\n valuePropName: 'fileList',\n };\n attrDefVal = getParamsContentByParamKeys(attrItem?.formProps?.defaultValue, parameters) || [];\n } else {\n delete formItem.formProps.valuePropName;\n attrDefVal = replaceParamsValue(attrItem?.formProps?.defaultValue, parameters) || '';\n }\n initValues[otherAttrFormProps?.name] = attrDefVal;\n }\n otherRules = otherRules.map((item: {[key:string]: any}) => ({\n pattern: item?.type === 'custom' ? patternTransitionRegExp(item?.pattern) : (\n formRulsRegMap?.[item?.type] || ''\n ),\n message: item?.message,\n }));\n if (typeof attrFormPropsDisplay === 'boolean' || typeof attrFormPropsDisplay === 'string') {\n let formItemDisplay:boolean = true;\n if (typeof attrFormPropsDisplay === 'boolean') {\n formItemDisplay = attrFormPropsDisplay;\n } else if (typeof attrFormPropsDisplay === 'string' && attrFormPropsDisplay) {\n // const scriptCodeStr = stringPramarsValTransition(attrFormPropsDisplay, parameters);\n const codeExtendVal = stringScriptExecution(\n attrFormPropsDisplay,\n parameters,\n );\n formItemDisplay = codeExtendVal;\n }\n formItem.display = formItemDisplay;\n }\n if (typeof required === 'boolean' || typeof required === 'string') {\n let formItemRequired:boolean = false;\n if (typeof required === 'boolean') {\n formItemRequired = required;\n } else if (typeof required === 'string' && required) {\n // const scriptCodeStr = stringPramarsValTransition(required, parameters);\n const codeExtendVal = stringScriptExecution(required, parameters);\n formItemRequired = typeof codeExtendVal === 'boolean' ? codeExtendVal : false;\n }\n formItem.formProps = {\n ...formItem.formProps,\n rules: formItemRequired ? [{ required: formItemRequired }, ...otherRules] : otherRules,\n };\n } else {\n formItem.formProps = {\n ...formItem.formProps,\n rules: otherRules,\n };\n }\n if (dataOptions) {\n const attrItemDataOptions = dataOptions || {};\n if (attrItemDataOptions?.staticCode) {\n if (\n attrItem?.defaultValue &&\n staticCodeMap?.[attrItemDataOptions?.staticCode] &&\n staticCodeMap?.[attrItemDataOptions?.staticCode]?.[attrItem?.defaultValue]\n ) {\n initValues[attrItem?.attrCode] = staticCodeMap?.[attrItemDataOptions?.staticCode]?.[attrItem?.defaultValue];\n }\n const formatToTreeData = (optionsItems: {[key:string]: any}[]):{[key:string]: any}[] => {\n if (Array.isArray(optionsItems)) {\n return optionsItems.map(optItem => ({\n title: optItem?.label,\n value: optItem?.value,\n children: formatToTreeData(optItem?.children),\n }));\n }\n return [];\n };\n if (attrItem?.compType === 'treeSelect') {\n formItem.props = {\n ...formItem.props,\n treeData: formatToTreeData(staticOptionsMap?.[attrItemDataOptions?.staticCode]),\n };\n } else {\n formItem.props = {\n ...formItem.props,\n options: Array.isArray(staticOptionsMap?.[attrItemDataOptions?.staticCode]) ?\n staticOptionsMap?.[attrItemDataOptions?.staticCode] : [],\n };\n }\n } else if (attrItemDataOptions?.contextOptions && parameters) {\n const optLabelStr = attrItemDataOptions?.contextOptions?.label;\n const optValueStr = attrItemDataOptions?.contextOptions?.value;\n const splitParamsPath = (paramsPathStr: string) => {\n if (typeof paramsPathStr === 'string') {\n const paramsPathArr = paramsPathStr.replace(/\\$\\{|\\}/g, '').split('.');\n return paramsPathArr?.filter((item:string, idx:number) => !(idx === 0 && item === 'root'));\n }\n return [];\n };\n if (optValueStr) {\n const optValArr = splitParamsPath(optValueStr);\n const optLabelArr = splitParamsPath(optLabelStr);\n const optData: any[] = Array.isArray(parameters?.[optValArr?.[0]]) ? parameters?.[optValArr?.[0]] : [];\n const labelApiPath: string[] = optLabelArr?.slice(2);\n const valApiPath: string[] = optValArr?.slice(2);\n \n formItem.props = {\n ...formItem.props,\n options: formatOptionsRecursively(optData, labelApiPath, valApiPath),\n };\n }\n }\n }\n formItems.push(formItem);\n });\n }\n if (typeof column === 'number' && column > 1) {\n res.formMode = 'grid';\n res.span = 24 / column;\n } else {\n res.formMode = 'default';\n delete res.span;\n }\n res.formItems = formItems;\n res.initialValues = initValues;\n return res;\n};\n\nexport default formatFormProps;\n"],"mappings":";;;;;AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,SAASC,qBAAqB;AAC9B,SAASC,UAAU,EAAEC,2BAA2B,EAAEC,kBAAkB;AACpE,OAAOC,gBAAgB;AACvB,OAAOC,eAAe;AACtB,OAAOC,cAAc;AACrB,OAAOC,SAAS;AAChB,OAAOC,uBAAuB;AAY9B,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,IAAW,EAAEC,YAAsB,EAAEC,UAAoB,EAAY;EACrG,OAAOF,IAAI,CAACG,GAAG,CAAC,UAACC,IAAI,EAAK;IACxB,IAAMC,MAAW,GAAG;MAClBC,KAAK,EAAEjB,GAAG,CAACe,IAAI,EAAEH,YAAY,CAAC;MAC9BM,KAAK,EAAElB,GAAG,CAACe,IAAI,EAAEF,UAAU;IAC7B,CAAC;;IAED;IACA,IAAIE,IAAI,CAACI,QAAQ,IAAIC,KAAK,CAACC,OAAO,CAACN,IAAI,CAACI,QAAQ,CAAC,EAAE;MACjDH,MAAM,CAACG,QAAQ,GAAGT,wBAAwB,CAACK,IAAI,CAACI,QAAQ,EAAEP,YAAY,EAAEC,UAAU,CAAC;IACrF;IAEA,OAAOG,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAED,IAAMM,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAK0B;EAAA,IAJ7CC,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,aAAa,GAAAF,IAAA,CAAbE,aAAa;IACbC,gBAAgB,G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C,CAAC,GAAGlH,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAGkH,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAG,CAAC,CAAC,CAAC,GAAG,EAAE;YACtG,IAAM9H,YAAsB,GAAG+H,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEE,KAAK,CAAC,CAAC,CAAC;YACpD,IAAMhI,UAAoB,GAAG6H,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEG,KAAK,CAAC,CAAC,CAAC;YAEhDrF,QAAQ,CAACM,KAAK,GAAAG,aAAA,CAAAA,aAAA,KACTT,QAAQ,CAACM,KAAK;cACjBlC,OAAO,EAAElB,wBAAwB,CAACkI,OAAO,EAAEhI,YAAY,EAAEC,UAAU;YAAC,EACrE;UACH;QACF;MACF;MACAkB,SAAS,CAAC+G,IAAI,CAACtF,QAAQ,CAAC;IAC1B,CAAC,CAAC;EACJ;EACA,IAAI,OAAO3B,MAAM,KAAK,QAAQ,IAAIA,MAAM,GAAG,CAAC,EAAE;IAC5CC,GAAG,CAACiH,QAAQ,GAAG,MAAM;IACrBjH,GAAG,CAACkH,IAAI,GAAG,EAAE,GAAGnH,MAAM;EACxB,CAAC,MAAM;IACLC,GAAG,CAACiH,QAAQ,GAAG,SAAS;IACxB,OAAOjH,GAAG,CAACkH,IAAI;EACjB;EACAlH,GAAG,CAACC,SAAS,GAAGA,SAAS;EACzBD,GAAG,CAACmH,aAAa,GAAGjH,UAAU;EAC9B,OAAOF,GAAG;AACZ,CAAC;AAED,eAAeR,eAAe"}
1
+ {"version":3,"names":["get","stringScriptExecution","getDataArr","getParamsContentByParamKeys","replaceParamsValue","formatTableProps","formatListProps","formRulsRegMap","urlPrefix","patternTransitionRegExp","formatOptionsRecursively","data","labelApiPath","valApiPath","map","item","option","label","value","children","Array","isArray","formatFormProps","_ref","parameters","staticCodeMap","staticOptionsMap","_ref$options","options","column","res","formItems","initValues","length","forEach","attrItem","_extend$controlBtns","_otherAttrFormProps$r","_attrItem$formProps","_ref2","attrCompProps","compProps","attrFormProps","formProps","_ref3","required","extend","attrFormPropsDisplay","display","otherAttrFormProps","_objectWithoutProperties","_excluded","_ref4","dataOptions","otherAttrCompProps","_excluded2","formItem","key","id","name","type","compType","props","originModule","text","_objectSpread","controlBtns","_attrItem$compProps","_attrItem$compProps2","_attrItem$compProps3","_attrItem$compProps4","_attrItem$compProps5","_attrItem$compProps6","_attrItem$compProps7","_formatTableProps","attrs","dataSource","columns","rowKeys","rowKey","hasSelectAll","rowSelection","includes","_attrItem$compProps8","resProps","_attrItem$compProps9","_Object$keys","_attrItem$compProps10","_attrItem$compProps15","_attrItem$compProps16","Object","keys","_attrItem$compProps11","uploadDataParams","paramsName","_attrItem$compProps12","test","_attrItem$compProps13","_attrItem$compProps14","action","url","_attrItem$compProps17","otherRules","rules","filter","defaultValue","attrDefVal","_attrItem$formProps2","valuePropName","_attrItem$formProps3","pattern","message","formItemDisplay","codeExtendVal","formItemRequired","concat","_toConsumableArray","attrItemDataOptions","staticCode","_staticCodeMap$attrIt","_staticCodeMap$attrIt2","attrCode","formatToTreeData","optionsItems","optItem","title","treeData","contextOptions","_attrItemDataOptions$","_attrItemDataOptions$2","optLabelStr","optValueStr","splitParamsPath","paramsPathStr","paramsPathArr","replace","split","idx","optValArr","optLabelArr","optData","slice","push","formMode","span","initialValues"],"sources":["../../../../src/formatModule/helpers/formatFormProps.ts"],"sourcesContent":["import { get } from 'lodash';\nimport { stringScriptExecution } from './stringScriptExecution';\nimport { getDataArr, getParamsContentByParamKeys, replaceParamsValue } from '../../treeUtils';\nimport formatTableProps from './formatTableProps';\nimport formatListProps from './formatListProps';\nimport formRulsRegMap from './formRulsRegMap';\nimport urlPrefix from './urlPrefix';\nimport patternTransitionRegExp from './patternTransitionRegExp';\n\nexport type formatFormPropsType = {\n options?: {\n column?: number;\n children?: {[key:string]: any}[]\n }\n parameters: {[key:string]: any};\n staticCodeMap: {[key:string]: any};\n staticOptionsMap: {[key:string]: any};\n}\n\nconst formatOptionsRecursively = (data: any[], labelApiPath: string[], valApiPath: string[]): any[] => {\n return data.map((item) => {\n const option: any = {\n label: get(item, labelApiPath),\n value: get(item, valApiPath),\n };\n \n // 如果存在children属性,递归处理\n if (item.children && Array.isArray(item.children)) {\n option.children = formatOptionsRecursively(item.children, labelApiPath, valApiPath);\n }\n \n return option;\n });\n};\n\nconst formatFormProps = ({\n parameters,\n staticCodeMap,\n staticOptionsMap,\n options = {},\n}: formatFormPropsType):{[key:string]: any} => {\n const { children, column } = options;\n const res:{[key:string]: any} = {};\n const formItems: { [key: string]: any }[] = [];\n const initValues: { [key: string]: any } = {};\n if (Array.isArray(children) && children.length > 0) {\n children.forEach((attrItem) => {\n const {\n compProps: attrCompProps,\n formProps: attrFormProps,\n } = attrItem || {};\n const {\n required,\n extend,\n display: attrFormPropsDisplay,\n ...otherAttrFormProps\n } = attrFormProps || {};\n const {\n dataOptions,\n ...otherAttrCompProps\n } = attrCompProps || {};\n const formItem:{[key:string]: any} = {\n key: attrItem?.id,\n label: attrFormProps?.label,\n name: attrFormProps?.name,\n type: attrItem?.compType,\n props: otherAttrCompProps || {},\n formProps: otherAttrFormProps || {},\n originModule: attrItem, // 以下是组件配置属性,用于属性编辑\n };\n if (extend?.type === 'text' && extend?.text && typeof extend?.text === 'string') {\n formItem.formProps = {\n ...formItem.formProps,\n extend: {\n ...extend,\n text: replaceParamsValue(extend?.text, parameters),\n },\n };\n } else if (extend?.type === 'controlBtns' && Array.isArray(extend?.controlBtns) && extend?.controlBtns?.length > 0) {\n formItem.formProps = {\n ...formItem.formProps,\n extend: {\n ...extend,\n controlBtns: extend?.controlBtns,\n },\n };\n } else {\n delete formItem.formProps.extend;\n }\n if (attrItem?.compType === 'table') {\n const {\n columns,\n dataSource,\n } = formatTableProps({\n options: {\n attrs: attrItem?.compProps?.attrs,\n dataSource: attrItem?.compProps?.dataSource,\n },\n staticCodeMap,\n parameters,\n });\n const rowKeys = getDataArr(attrItem?.compProps?.rowKey);\n formItem.props = {\n ...formItem.props,\n columns,\n dataSource,\n rowKey: rowKeys?.length > 0 ? rowKeys?.[rowKeys?.length - 1] : 'key',\n hasSelectAll: (attrItem?.compProps?.rowSelection && attrItem?.compProps?.hasSelectAll) ? attrItem?.compProps?.hasSelectAll : null,\n rowSelection: attrItem?.compProps?.rowSelection || { type: 'radio' },\n };\n }\n if (['list', 'card'].includes(attrItem?.compType)) {\n const resProps = formatListProps({\n options: attrItem?.compProps,\n staticCodeMap,\n parameters,\n urlPrefix,\n });\n formItem.props = {\n ...resProps,\n rowSelection: attrItem?.compProps?.rowSelection || { type: 'radio' },\n };\n }\n if (attrItem?.compType === 'upload') {\n if (\n attrItem?.compProps?.data &&\n Object.keys(attrItem?.compProps?.data)?.length > 0\n ) {\n const uploadDataParams:{[key:string]: any} = {};\n Object.keys(attrItem?.compProps?.data).forEach(paramsName => {\n if (/\\$\\{(.+?)\\}/g.test(attrItem?.compProps?.data?.[paramsName])) {\n // const valParamArr = getDataArr(attrItem?.compProps?.data?.[paramsName]);\n uploadDataParams[paramsName] = getParamsContentByParamKeys(attrItem?.compProps?.data?.[paramsName], parameters);\n } else {\n uploadDataParams[paramsName] = attrItem?.compProps?.data?.[paramsName];\n }\n });\n formItem.props = {\n ...formItem.props,\n data: uploadDataParams,\n };\n }\n if (\n attrItem?.compProps?.action?.url &&\n typeof attrItem?.compProps?.action?.url === 'string'\n ) {\n formItem.props = {\n ...formItem.props,\n action: attrItem?.compProps?.action?.url,\n };\n }\n }\n let otherRules = Array.isArray(otherAttrFormProps?.rules) ? otherAttrFormProps?.rules?.filter((item: any) => !item?.required) : [];\n if (attrItem?.formProps?.defaultValue) {\n let attrDefVal:any = '';\n if (attrItem?.compType === 'upload') {\n formItem.formProps = {\n ...formItem.formProps,\n valuePropName: 'fileList',\n };\n attrDefVal = getParamsContentByParamKeys(attrItem?.formProps?.defaultValue, parameters) || [];\n } else {\n delete formItem.formProps.valuePropName;\n attrDefVal = replaceParamsValue(attrItem?.formProps?.defaultValue, parameters) || '';\n }\n initValues[otherAttrFormProps?.name] = attrDefVal;\n }\n otherRules = otherRules.map((item: {[key:string]: any}) => ({\n pattern: item?.type === 'custom' ? patternTransitionRegExp(item?.pattern) : (\n formRulsRegMap?.[item?.type] || ''\n ),\n message: item?.message,\n }));\n if (typeof attrFormPropsDisplay === 'boolean' || typeof attrFormPropsDisplay === 'string') {\n let formItemDisplay:boolean = true;\n if (typeof attrFormPropsDisplay === 'boolean') {\n formItemDisplay = attrFormPropsDisplay;\n } else if (typeof attrFormPropsDisplay === 'string' && attrFormPropsDisplay) {\n // const scriptCodeStr = stringPramarsValTransition(attrFormPropsDisplay, parameters);\n const codeExtendVal = stringScriptExecution(\n attrFormPropsDisplay,\n parameters,\n );\n formItemDisplay = codeExtendVal;\n }\n formItem.display = formItemDisplay;\n }\n if (typeof required === 'boolean' || typeof required === 'string') {\n let formItemRequired:boolean = false;\n if (typeof required === 'boolean') {\n formItemRequired = required;\n } else if (typeof required === 'string' && required) {\n // const scriptCodeStr = stringPramarsValTransition(required, parameters);\n const codeExtendVal = stringScriptExecution(required, parameters);\n formItemRequired = typeof codeExtendVal === 'boolean' ? codeExtendVal : false;\n }\n formItem.formProps = {\n ...formItem.formProps,\n rules: formItemRequired ? [{ required: formItemRequired }, ...otherRules] : otherRules,\n };\n } else {\n formItem.formProps = {\n ...formItem.formProps,\n rules: otherRules,\n };\n }\n if (dataOptions) {\n const attrItemDataOptions = dataOptions || {};\n if (attrItemDataOptions?.staticCode) {\n if (\n attrItem?.defaultValue &&\n staticCodeMap?.[attrItemDataOptions?.staticCode] &&\n staticCodeMap?.[attrItemDataOptions?.staticCode]?.[attrItem?.defaultValue]\n ) {\n initValues[attrItem?.attrCode] = staticCodeMap?.[attrItemDataOptions?.staticCode]?.[attrItem?.defaultValue];\n }\n const formatToTreeData = (optionsItems: {[key:string]: any}[]):{[key:string]: any}[] => {\n if (Array.isArray(optionsItems)) {\n return optionsItems.map(optItem => ({\n title: optItem?.label,\n value: optItem?.value,\n children: formatToTreeData(optItem?.children),\n }));\n }\n return [];\n };\n if (attrItem?.compType === 'treeSelect') {\n formItem.props = {\n ...formItem.props,\n treeData: formatToTreeData(staticOptionsMap?.[attrItemDataOptions?.staticCode]),\n };\n } else {\n formItem.props = {\n ...formItem.props,\n options: Array.isArray(staticOptionsMap?.[attrItemDataOptions?.staticCode]) ?\n staticOptionsMap?.[attrItemDataOptions?.staticCode] : [],\n };\n }\n } else if (attrItemDataOptions?.contextOptions && parameters) {\n const optLabelStr = attrItemDataOptions?.contextOptions?.label;\n const optValueStr = attrItemDataOptions?.contextOptions?.value;\n const splitParamsPath = (paramsPathStr: string) => {\n if (typeof paramsPathStr === 'string') {\n const paramsPathArr = paramsPathStr.replace(/\\$\\{|\\}/g, '').split('.');\n return paramsPathArr?.filter((item:string, idx:number) => !(idx === 0 && item === 'root'));\n }\n return [];\n };\n if (optValueStr) {\n const optValArr = splitParamsPath(optValueStr);\n const optLabelArr = splitParamsPath(optLabelStr);\n const optData: any[] = Array.isArray(parameters?.[optValArr?.[0]]) ? parameters?.[optValArr?.[0]] : [];\n const labelApiPath: string[] = optLabelArr?.slice(2);\n const valApiPath: string[] = optValArr?.slice(2);\n \n formItem.props = {\n ...formItem.props,\n options: formatOptionsRecursively(optData, labelApiPath, valApiPath),\n };\n }\n }\n }\n formItems.push(formItem);\n });\n }\n if (typeof column === 'number' && column > 1) {\n res.formMode = 'grid';\n res.span = 24 / column;\n } else {\n res.formMode = 'default';\n delete res.span;\n }\n res.formItems = formItems;\n res.initialValues = initValues;\n return res;\n};\n\nexport default formatFormProps;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,SAASC,qBAAqB;AAC9B,SAASC,UAAU,EAAEC,2BAA2B,EAAEC,kBAAkB;AACpE,OAAOC,gBAAgB;AACvB,OAAOC,eAAe;AACtB,OAAOC,cAAc;AACrB,OAAOC,SAAS;AAChB,OAAOC,uBAAuB;AAY9B,IA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F,QAAQ,CAAC;IAC1B,CAAC,CAAC;EACJ;EACA,IAAI,OAAO3B,MAAM,KAAK,QAAQ,IAAIA,MAAM,GAAG,CAAC,EAAE;IAC5CC,GAAG,CAACiH,QAAQ,GAAG,MAAM;IACrBjH,GAAG,CAACkH,IAAI,GAAG,EAAE,GAAGnH,MAAM;EACxB,CAAC,MAAM;IACLC,GAAG,CAACiH,QAAQ,GAAG,SAAS;IACxB,OAAOjH,GAAG,CAACkH,IAAI;EACjB;EACAlH,GAAG,CAACC,SAAS,GAAGA,SAAS;EACzBD,GAAG,CAACmH,aAAa,GAAGjH,UAAU;EAC9B,OAAOF,GAAG;AACZ,CAAC;AAED,eAAeR,eAAe"}
@@ -1,4 +1,9 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ 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); }
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
2
7
  import { get } from 'lodash';
3
8
  import stringPramarsValTransition from "./stringPramarsValTransition";
4
9
  import { getDataArr } from "../../treeUtils";
@@ -1 +1 @@
1
- {"version":3,"names":["get","stringPramarsValTransition","getDataArr","formatHighCodeProps","_ref","_loopToGetValue","_ref$options","options","parameters","res","_options$fileProps","fileProps","_fileProps$parameters","compParams","loopToGetValue","list","map","l","_lt$children","lt","_objectSpread","oriVal","value","includes","type","oriValPath","children","length","changeParamsConfigToObject","param","_param$children","obj","Object","forEach","child","name","_param$children2","element","arr","Array","arrItem","assign","paramsObj"],"sources":["../../../../src/formatModule/helpers/formatHighCodeProps.ts"],"sourcesContent":["import { get } from 'lodash';\nimport stringPramarsValTransition from './stringPramarsValTransition';\nimport { getDataArr } from '../../treeUtils';\n\nexport type formatHighCodePropsPropsType = {\n options?: { [key: string]: any };\n staticCodeMap?: { [key: string]: any };\n parameters?: { [key: string]: any };\n}\n\nexport type formatHighCodePropsExportType = { [key: string]: any }\n\nconst formatHighCodeProps = ({\n options = {},\n parameters,\n}: formatHighCodePropsPropsType): formatHighCodePropsExportType => {\n const res: { [key: string]: any } = {};\n const { fileProps = {} } = options;\n const { parameters: compParams = [] } = fileProps;\n\n // 循环替换value\n const loopToGetValue = (list: any[]) => list.map(l => {\n let lt = { ...l };\n\n if (!lt.oriVal) {\n lt = { ...lt, oriVal: lt.value };\n }\n\n if (['object', 'array'].includes(lt.type)) {\n const oriValPath = getDataArr(lt.oriVal);\n lt.value = get(parameters, oriValPath);\n } else {\n lt.value = stringPramarsValTransition(lt.oriVal || '', parameters || {});\n }\n\n if (lt.children?.length) {\n lt.children = loopToGetValue(lt.children);\n }\n\n return lt;\n });\n\n // 入参配置结构转成数据结构\n const changeParamsConfigToObject: (params: any) => any = param => {\n if (!param) {\n return {};\n }\n\n // 对象\n if (param.type === 'object') {\n const obj: any = param.value instanceof Object ? param.value : {};\n param.children?.forEach((child: any) => {\n obj[child.name] = changeParamsConfigToObject(child);\n });\n return obj;\n }\n\n // 数组\n if (param.type === 'array') {\n const element = param.children?.[0];\n const arr: any[] = param.value instanceof Array ? param.value : [];\n\n if (element && arr?.length) {\n arr.forEach(arrItem => {\n if (element.type === 'object' && arrItem) {\n Object.assign(arrItem, changeParamsConfigToObject(element));\n }\n });\n }\n\n return arr;\n }\n\n // 属性\n if (param.type === 'boolean' && param.value) {\n return param.value === 'true' || param.value === '1';\n }\n\n return param.value || null;\n };\n\n const paramsObj = changeParamsConfigToObject(loopToGetValue(compParams)?.[0] || {});\n res.parameters = paramsObj;\n return res;\n};\n\n\nexport default formatHighCodeProps;\n"],"mappings":";AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,0BAA0B;AACjC,SAASC,UAAU;AAUnB,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAG0C;EAAA,IAAAC,eAAA;EAAA,IAAAC,YAAA,GAAAF,IAAA,CAFjEG,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,CAAC,CAAC,GAAAA,YAAA;IACZE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;EAEV,IAAMC,GAA2B,GAAG,CAAC,CAAC;EACtC,IAAAC,kBAAA,GAA2BH,OAAO,CAA1BI,SAAS;IAATA,SAAS,GAAAD,kBAAA,cAAG,CAAC,CAAC,GAAAA,kBAAA;EACtB,IAAAE,qBAAA,GAAwCD,SAAS,CAAzCH,UAAU;IAAEK,UAAU,GAAAD,qBAAA,cAAG,EAAE,GAAAA,qBAAA;;EAEnC;EACA,IAAME,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAW;IAAA,OAAKA,IAAI,CAACC,GAAG,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"version":3,"names":["get","stringPramarsValTransition","getDataArr","formatHighCodeProps","_ref","_loopToGetValue","_ref$options","options","parameters","res","_options$fileProps","fileProps","_fileProps$parameters","compParams","loopToGetValue","list","map","l","_lt$children","lt","_objectSpread","oriVal","value","includes","type","oriValPath","children","length","changeParamsConfigToObject","param","_param$children","obj","Object","forEach","child","name","_param$children2","element","arr","Array","arrItem","assign","paramsObj"],"sources":["../../../../src/formatModule/helpers/formatHighCodeProps.ts"],"sourcesContent":["import { get } from 'lodash';\nimport stringPramarsValTransition from './stringPramarsValTransition';\nimport { getDataArr } from '../../treeUtils';\n\nexport type formatHighCodePropsPropsType = {\n options?: { [key: string]: any };\n staticCodeMap?: { [key: string]: any };\n parameters?: { [key: string]: any };\n}\n\nexport type formatHighCodePropsExportType = { [key: string]: any }\n\nconst formatHighCodeProps = ({\n options = {},\n parameters,\n}: formatHighCodePropsPropsType): formatHighCodePropsExportType => {\n const res: { [key: string]: any } = {};\n const { fileProps = {} } = options;\n const { parameters: compParams = [] } = fileProps;\n\n // 循环替换value\n const loopToGetValue = (list: any[]) => list.map(l => {\n let lt = { ...l };\n\n if (!lt.oriVal) {\n lt = { ...lt, oriVal: lt.value };\n }\n\n if (['object', 'array'].includes(lt.type)) {\n const oriValPath = getDataArr(lt.oriVal);\n lt.value = get(parameters, oriValPath);\n } else {\n lt.value = stringPramarsValTransition(lt.oriVal || '', parameters || {});\n }\n\n if (lt.children?.length) {\n lt.children = loopToGetValue(lt.children);\n }\n\n return lt;\n });\n\n // 入参配置结构转成数据结构\n const changeParamsConfigToObject: (params: any) => any = param => {\n if (!param) {\n return {};\n }\n\n // 对象\n if (param.type === 'object') {\n const obj: any = param.value instanceof Object ? param.value : {};\n param.children?.forEach((child: any) => {\n obj[child.name] = changeParamsConfigToObject(child);\n });\n return obj;\n }\n\n // 数组\n if (param.type === 'array') {\n const element = param.children?.[0];\n const arr: any[] = param.value instanceof Array ? param.value : [];\n\n if (element && arr?.length) {\n arr.forEach(arrItem => {\n if (element.type === 'object' && arrItem) {\n Object.assign(arrItem, changeParamsConfigToObject(element));\n }\n });\n }\n\n return arr;\n }\n\n // 属性\n if (param.type === 'boolean' && param.value) {\n return param.value === 'true' || param.value === '1';\n }\n\n return param.value || null;\n };\n\n const paramsObj = changeParamsConfigToObject(loopToGetValue(compParams)?.[0] || {});\n res.parameters = paramsObj;\n return res;\n};\n\n\nexport default formatHighCodeProps;\n"],"mappings":";;;;;;AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,0BAA0B;AACjC,SAASC,UAAU;AAUnB,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAG0C;EAAA,IAAAC,eAAA;EAAA,IAAAC,YAAA,GAAAF,IAAA,CAFjEG,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,CAAC,CAAC,GAAAA,YAAA;IACZE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;EAEV,IAAMC,GAA2B,GAAG,CAAC,CAAC;EACtC,IAAAC,kBAAA,GAA2BH,OAAO,CAA1BI,SAAS;IAATA,SAAS,GAAAD,kBAAA,cAAG,CAAC,CAAC,GAAAA,kBAAA;EACtB,IAAAE,qBAAA,GAAwCD,SAAS,CAAzCH,UAAU;IAAEK,UAAU,GAAAD,qBAAA,cAAG,EAAE,GAAAA,qBAAA;;EAEnC;EACA,IAAME,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAW;IAAA,OAAKA,IAAI,CAACC,GAAG,CAAC,UAAAC,CAAC,EAAI;MAAA,IAAAC,YAAA;MACpD,IAAIC,EAAE,GAAAC,aAAA,KAAQH,CAAC,CAAE;MAEjB,IAAI,CAACE,EAAE,CAACE,MAAM,EAAE;QACdF,EAAE,GAAAC,aAAA,CAAAA,aAAA,KAAQD,EAAE;UAAEE,MAAM,EAAEF,EAAE,CAACG;QAAK,EAAE;MAClC;MAEA,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAACC,QAAQ,CAACJ,EAAE,C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C,CAAC;MACnC,IAAME,GAAU,GAAGT,KAAK,CAACP,KAAK,YAAYiB,KAAK,GAAGV,KAAK,CAACP,KAAK,GAAG,EAAE;MAElE,IAAIe,OAAO,IAAIC,GAAG,aAAHA,GAAG,eAAHA,GAAG,CAAEX,MAAM,EAAE;QAC1BW,GAAG,CAACL,OAAO,CAAC,UAAAO,OAAO,EAAI;UACrB,IAAIH,OAAO,CAACb,IAAI,KAAK,QAAQ,IAAIgB,OAAO,EAAE;YACxCR,MAAM,CAACS,MAAM,CAACD,OAAO,EAAEZ,0BAA0B,CAACS,OAAO,CAAC,CAAC;UAC7D;QACF,CAAC,CAAC;MACJ;MAEA,OAAOC,GAAG;IACZ;;IAEA;IACA,IAAIT,KAAK,CAACL,IAAI,KAAK,SAAS,IAAIK,KAAK,CAACP,KAAK,EAAE;MAC3C,OAAOO,KAAK,CAACP,KAAK,KAAK,MAAM,IAAIO,KAAK,CAACP,KAAK,KAAK,GAAG;IACtD;IAEA,OAAOO,KAAK,CAACP,KAAK,IAAI,IAAI;EAC5B,CAAC;EAED,IAAMoB,SAAS,GAAGd,0BAA0B,CAAC,EAAAvB,eAAA,GAAAS,cAAc,CAACD,UAAU,CAAC,cAAAR,eAAA,uBAA1BA,eAAA,CAA6B,CAAC,CAAC,KAAI,CAAC,CAAC,CAAC;EACnFI,GAAG,CAACD,UAAU,GAAGkC,SAAS;EAC1B,OAAOjC,GAAG;AACZ,CAAC;AAGD,eAAeN,mBAAmB"}
@@ -1,4 +1,9 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ 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); }
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
2
7
  import { get } from 'lodash';
3
8
  import { stringScriptExecution } from "./stringScriptExecution";
4
9
  import { getDataArr, replaceLoopBodyParamsValue, getParamsContentByParamKeys } from "../../treeUtils";
@@ -1 +1 @@
1
- {"version":3,"names":["get","stringScriptExecution","getDataArr","replaceLoopBodyParamsValue","getParamsContentByParamKeys","getFileUrlById","formatListProps","_ref","_opt$icon","urlPrefix","parameters","staticCodeMap","opt","options","propsRes","_objectSpread","Array","isArray","icon","length","_opt$icon2","fileId","prefix","Object","keys","dataSource","_rowKeyArr$slice","sourceArr","rowKeyArr","rowKey","items","slice","stringAttrValueTransition","attr","pararms","nowContent","defaultValue","replace","match","_staticCodeMap$attr$s","_staticCodeMap$attr$s2","paramsPath","filter","itemKey","includes","filedVal","staticCode","_staticCodeMap$attr$s3","replaceParamsValue","contentStr","item","loopParams","loopData","loopSourceArr","forEach","idx","attrList","attrs","attrItem","attrsDisplay","display","scriptParameters","assign","row","index","codeExtendVal","attrObj","style","attrValue","attrName","attrCode","push","dataObj","label","itemLabel","content","itemContent","describe","itemDescribe","originItem"],"sources":["../../../../src/formatModule/helpers/formatListProps.ts"],"sourcesContent":["import { get } from 'lodash';\nimport { stringScriptExecution } from './stringScriptExecution';\nimport { getDataArr, replaceLoopBodyParamsValue, getParamsContentByParamKeys } from '../../treeUtils';\nimport { getFileUrlById } from '../../file';\n\nexport type formatListPropsType = {\n urlPrefix: string;\n options: {[key:string]: any};\n staticCodeMap: {[key:string]: any};\n parameters: {[key:string]: any};\n}\n\nexport type formatListPropsExportType = {[key: string]: any}\n\nconst formatListProps = ({\n urlPrefix,\n parameters,\n staticCodeMap,\n options: opt,\n}: formatListPropsType): formatListPropsExportType => {\n const propsRes: { [key: string]: any } = { ...opt };\n if (Array.isArray(opt?.icon) && opt?.icon?.length > 0) {\n propsRes.icon = getFileUrlById(opt?.icon?.[0]?.fileId, { prefix: urlPrefix });\n } else {\n propsRes.icon = '';\n }\n if (\n parameters &&\n Object.keys(parameters).length > 0 &&\n opt?.dataSource\n ) {\n const sourceArr = getDataArr(opt?.dataSource) || [];\n const rowKeyArr = getDataArr(opt?.rowKey) || [];\n const items = getParamsContentByParamKeys(opt?.dataSource, parameters) || [];\n propsRes.rowKey = rowKeyArr.slice(-1)?.[0];\n const stringAttrValueTransition = (attr:{[key:string]: any}, pararms: {[key:string]: any}) => {\n let nowContent:string = '';\n if (typeof attr?.defaultValue === 'string' && attr?.defaultValue && pararms) {\n nowContent = attr?.defaultValue.replace(/\\$\\{(.+?)\\}/g, (match) => {\n const paramsPath = getDataArr(match).filter((itemKey) => !sourceArr.includes(itemKey)).slice(1);\n const filedVal = get(pararms, paramsPath);\n // 如果存在静态数组,则翻译静态数据\n if (\n attr?.staticCode &&\n staticCodeMap?.[attr?.staticCode]?.[filedVal] &&\n typeof staticCodeMap?.[attr?.staticCode]?.[filedVal] === 'string'\n ) {\n return staticCodeMap?.[attr?.staticCode]?.[filedVal];\n }\n return filedVal || '';\n });\n }\n return nowContent;\n };\n const replaceParamsValue = (\n contentStr: string,\n item: { [key: string]: any },\n ) => {\n return replaceLoopBodyParamsValue(\n contentStr, {\n parameters,\n loopParams: item,\n loopData: items,\n loopSourceArr: sourceArr,\n });\n };\n if (Array.isArray(items)) {\n items.forEach((item, idx) => {\n const attrList: { [key: string]: any }[] = [];\n if (Array.isArray(opt?.attrs) && opt?.attrs.length > 0) {\n opt?.attrs.forEach((attrItem) => {\n let attrsDisplay: boolean = true;\n if (typeof attrItem?.display === 'boolean' || typeof attrItem?.display === 'string') {\n if (typeof attrItem?.display === 'boolean') {\n attrsDisplay = attrItem?.display;\n } else if (typeof attrItem?.display === 'string' && attrItem?.display) {\n const scriptParameters = Object.assign((parameters || {}), { row: item, index: idx });\n const codeExtendVal = stringScriptExecution(\n attrItem?.display,\n scriptParameters,\n );\n attrsDisplay = codeExtendVal;\n }\n }\n if (attrsDisplay) {\n const attrObj: { [key: string]: any } = {};\n if (attrItem?.style) {\n attrObj.style = attrItem?.style;\n }\n if (attrItem?.defaultValue) {\n const attrValue = stringAttrValueTransition(attrItem, item);\n attrObj.attrName = attrItem?.attrName;\n attrObj.attrCode = attrItem?.attrCode;\n attrObj.attrValue = attrValue;\n }\n attrList.push(attrObj);\n }\n });\n }\n const dataObj: { [key: string]: any } = {\n label: replaceParamsValue(opt?.itemLabel, item),\n content: replaceParamsValue(opt?.itemContent, item),\n describe: replaceParamsValue(opt?.itemDescribe, item),\n originItem: item,\n };\n if (propsRes?.rowKey) {\n dataObj[propsRes?.rowKey] = item?.[propsRes?.rowKey];\n }\n if (attrList.length > 0) {\n dataObj.attrList = attrList;\n }\n if (Array.isArray(propsRes.dataSource)) {\n propsRes.dataSource.push(dataObj);\n } else {\n propsRes.dataSource = [dataObj];\n }\n });\n }\n }\n return propsRes;\n};\n\n\nexport default formatListProps;\n"],"mappings":";AAAA,SAASA,GAAG,QAAQ,QAAQ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get","stringScriptExecution","getDataArr","replaceLoopBodyParamsValue","getParamsContentByParamKeys","getFileUrlById","formatListProps","_ref","_opt$icon","urlPrefix","parameters","staticCodeMap","opt","options","propsRes","_objectSpread","Array","isArray","icon","length","_opt$icon2","fileId","prefix","Object","keys","dataSource","_rowKeyArr$slice","sourceArr","rowKeyArr","rowKey","items","slice","stringAttrValueTransition","attr","pararms","nowContent","defaultValue","replace","match","_staticCodeMap$attr$s","_staticCodeMap$attr$s2","paramsPath","filter","itemKey","includes","filedVal","staticCode","_staticCodeMap$attr$s3","replaceParamsValue","contentStr","item","loopParams","loopData","loopSourceArr","forEach","idx","attrList","attrs","attrItem","attrsDisplay","display","scriptParameters","assign","row","index","codeExtendVal","attrObj","style","attrValue","attrName","attrCode","push","dataObj","label","itemLabel","content","itemContent","describe","itemDescribe","originItem"],"sources":["../../../../src/formatModule/helpers/formatListProps.ts"],"sourcesContent":["import { get } from 'lodash';\nimport { stringScriptExecution } from './stringScriptExecution';\nimport { getDataArr, replaceLoopBodyParamsValue, getParamsContentByParamKeys } from '../../treeUtils';\nimport { getFileUrlById } from '../../file';\n\nexport type formatListPropsType = {\n urlPrefix: string;\n options: {[key:string]: any};\n staticCodeMap: {[key:string]: any};\n parameters: {[key:string]: any};\n}\n\nexport type formatListPropsExportType = {[key: string]: any}\n\nconst formatListProps = ({\n urlPrefix,\n parameters,\n staticCodeMap,\n options: opt,\n}: formatListPropsType): formatListPropsExportType => {\n const propsRes: { [key: string]: any } = { ...opt };\n if (Array.isArray(opt?.icon) && opt?.icon?.length > 0) {\n propsRes.icon = getFileUrlById(opt?.icon?.[0]?.fileId, { prefix: urlPrefix });\n } else {\n propsRes.icon = '';\n }\n if (\n parameters &&\n Object.keys(parameters).length > 0 &&\n opt?.dataSource\n ) {\n const sourceArr = getDataArr(opt?.dataSource) || [];\n const rowKeyArr = getDataArr(opt?.rowKey) || [];\n const items = getParamsContentByParamKeys(opt?.dataSource, parameters) || [];\n propsRes.rowKey = rowKeyArr.slice(-1)?.[0];\n const stringAttrValueTransition = (attr:{[key:string]: any}, pararms: {[key:string]: any}) => {\n let nowContent:string = '';\n if (typeof attr?.defaultValue === 'string' && attr?.defaultValue && pararms) {\n nowContent = attr?.defaultValue.replace(/\\$\\{(.+?)\\}/g, (match) => {\n const paramsPath = getDataArr(match).filter((itemKey) => !sourceArr.includes(itemKey)).slice(1);\n const filedVal = get(pararms, paramsPath);\n // 如果存在静态数组,则翻译静态数据\n if (\n attr?.staticCode &&\n staticCodeMap?.[attr?.staticCode]?.[filedVal] &&\n typeof staticCodeMap?.[attr?.staticCode]?.[filedVal] === 'string'\n ) {\n return staticCodeMap?.[attr?.staticCode]?.[filedVal];\n }\n return filedVal || '';\n });\n }\n return nowContent;\n };\n const replaceParamsValue = (\n contentStr: string,\n item: { [key: string]: any },\n ) => {\n return replaceLoopBodyParamsValue(\n contentStr, {\n parameters,\n loopParams: item,\n loopData: items,\n loopSourceArr: sourceArr,\n });\n };\n if (Array.isArray(items)) {\n items.forEach((item, idx) => {\n const attrList: { [key: string]: any }[] = [];\n if (Array.isArray(opt?.attrs) && opt?.attrs.length > 0) {\n opt?.attrs.forEach((attrItem) => {\n let attrsDisplay: boolean = true;\n if (typeof attrItem?.display === 'boolean' || typeof attrItem?.display === 'string') {\n if (typeof attrItem?.display === 'boolean') {\n attrsDisplay = attrItem?.display;\n } else if (typeof attrItem?.display === 'string' && attrItem?.display) {\n const scriptParameters = Object.assign((parameters || {}), { row: item, index: idx });\n const codeExtendVal = stringScriptExecution(\n attrItem?.display,\n scriptParameters,\n );\n attrsDisplay = codeExtendVal;\n }\n }\n if (attrsDisplay) {\n const attrObj: { [key: string]: any } = {};\n if (attrItem?.style) {\n attrObj.style = attrItem?.style;\n }\n if (attrItem?.defaultValue) {\n const attrValue = stringAttrValueTransition(attrItem, item);\n attrObj.attrName = attrItem?.attrName;\n attrObj.attrCode = attrItem?.attrCode;\n attrObj.attrValue = attrValue;\n }\n attrList.push(attrObj);\n }\n });\n }\n const dataObj: { [key: string]: any } = {\n label: replaceParamsValue(opt?.itemLabel, item),\n content: replaceParamsValue(opt?.itemContent, item),\n describe: replaceParamsValue(opt?.itemDescribe, item),\n originItem: item,\n };\n if (propsRes?.rowKey) {\n dataObj[propsRes?.rowKey] = item?.[propsRes?.rowKey];\n }\n if (attrList.length > 0) {\n dataObj.attrList = attrList;\n }\n if (Array.isArray(propsRes.dataSource)) {\n propsRes.dataSource.push(dataObj);\n } else {\n propsRes.dataSource = [dataObj];\n }\n });\n }\n }\n return propsRes;\n};\n\n\nexport default formatListProps;\n"],"mappings":";;;;;;AAAA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,SAASC,qBAAqB;AAC9B,SAASC,UAAU,EAAEC,0BAA0B,EAAEC,2BAA2B;AAC5E,SAASC,cAAc;AAWvB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAKiC;EAAA,IAAAC,SAAA;EAAA,IAJpDC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACJC,GAAG,GAAAL,IAAA,CAAZM,OAAO;EAEP,IAAMC,QAAgC,GAAAC,aAAA,KAAQH,GAAG,CAAE;EACnD,IAAII,KAAK,CAACC,OAAO,CAACL,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEM,IAAI,CAAC,IAAI,CAAAN,GAAG,aAAHA,GAAG,gBAAAJ,SAAA,GAAHI,GAAG,CAAEM,IAAI,cAAAV,SAAA,uBAATA,SAAA,CAAWW,MAAM,IAAG,CAAC,EAAE;IAAA,IAAAC,UAAA;IACrDN,QAAQ,CAACI,IAAI,GAAGb,cAAc,CAACO,GAAG,aAAHA,GAAG,gBAAAQ,UAAA,GAAHR,GAAG,CAAEM,IAAI,cAAAE,UAAA,gBAAAA,UAAA,GAATA,UAAA,CAAY,CAAC,CAAC,cAAAA,UAAA,uBAAdA,UAAA,CAAgBC,M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