@boteteam/utils 0.0.17 → 0.0.19

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/file.js +10 -1
  2. package/dist/cjs/file.js.map +2 -2
  3. package/dist/cjs/formatModule/formatModuleData.js +26 -3
  4. package/dist/cjs/formatModule/formatModuleData.js.map +2 -2
  5. package/dist/cjs/formatModule/helpers/formatChartsProps.d.ts +13 -0
  6. package/dist/cjs/formatModule/helpers/formatChartsProps.js +48 -0
  7. package/dist/cjs/formatModule/helpers/formatChartsProps.js.map +7 -0
  8. package/dist/cjs/formatModule/helpers/index.d.ts +2 -1
  9. package/dist/cjs/formatModule/helpers/index.js +3 -0
  10. package/dist/cjs/formatModule/helpers/index.js.map +3 -3
  11. package/dist/cjs/formatModule/helpers/stringPramarsValTransition.d.ts +1 -1
  12. package/dist/cjs/securityUtils.js +1 -1
  13. package/dist/cjs/securityUtils.js.map +2 -2
  14. package/dist/cjs/treeUtils.d.ts +1 -1
  15. package/dist/cjs/treeUtils.js +4 -1
  16. package/dist/cjs/treeUtils.js.map +2 -2
  17. package/dist/esm/file.js +10 -3
  18. package/dist/esm/file.js.map +1 -1
  19. package/dist/esm/formatModule/formatModuleData.js +27 -9
  20. package/dist/esm/formatModule/formatModuleData.js.map +1 -1
  21. package/dist/esm/formatModule/helpers/formatChartsProps.d.ts +13 -0
  22. package/dist/esm/formatModule/helpers/formatChartsProps.js +12 -0
  23. package/dist/esm/formatModule/helpers/formatChartsProps.js.map +1 -0
  24. package/dist/esm/formatModule/helpers/index.d.ts +2 -1
  25. package/dist/esm/formatModule/helpers/index.js +2 -1
  26. package/dist/esm/formatModule/helpers/index.js.map +1 -1
  27. package/dist/esm/formatModule/helpers/stringPramarsValTransition.d.ts +1 -1
  28. package/dist/esm/securityUtils.js +1 -1
  29. package/dist/esm/securityUtils.js.map +1 -1
  30. package/dist/esm/treeUtils.d.ts +1 -1
  31. package/dist/esm/treeUtils.js +5 -0
  32. package/dist/esm/treeUtils.js.map +1 -1
  33. package/dist/umd/index.min.js +1 -1
  34. package/dist/umd/index.min.js.map +1 -1
  35. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- var _excluded = ["itemLabel", "itemContent", "itemDescribe", "dataSource", "columns", "tableBodyHeight", "fileProps", "attrs", "rowSelection", "hasSelectAll", "rowKey", "fieldName", "column", "articleContent", "eventFlag"];
1
+ var _excluded = ["itemLabel", "itemContent", "itemDescribe", "dataSource", "columns", "tableBodyHeight", "fileProps", "attrs", "rowSelection", "hasSelectAll", "rowKey", "fieldName", "column", "articleContent", "eventFlag", "events"];
2
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
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
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; }
@@ -9,7 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
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); }
10
10
  import 'ses';
11
11
  import { getDataArr } from "../treeUtils";
12
- import { urlPrefix, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatFormProps, formatHighCodeProps, formatDescriptionsProps, formatLoopProps, formatStyleProps, formatEchartLineProps, formatEchartPieProps, formatStepsProps, staticCodeAssemble, stringPramarsValTransition } from "./helpers";
12
+ import { urlPrefix, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatFormProps, formatHighCodeProps, formatDescriptionsProps, formatLoopProps, formatStyleProps, formatEchartLineProps, formatEchartPieProps, formatChartsProps, formatStepsProps, staticCodeAssemble, stringPramarsValTransition } from "./helpers";
13
13
  var formatModuleData = function formatModuleData(_ref) {
14
14
  var moduleData = _ref.moduleData,
15
15
  parentModuleData = _ref.parentModuleData,
@@ -56,6 +56,7 @@ var formatModuleData = function formatModuleData(_ref) {
56
56
  column = _ref2.column,
57
57
  articleContent = _ref2.articleContent,
58
58
  eventFlag = _ref2.eventFlag,
59
+ events = _ref2.events,
59
60
  otherCompProps = _objectWithoutProperties(_ref2, _excluded);
60
61
  if (moduleTitle) {
61
62
  moduleDataRes.moduleTitle = stringPramarsValTransition(moduleTitle, allParametrs);
@@ -66,11 +67,6 @@ var formatModuleData = function formatModuleData(_ref) {
66
67
  if (otherCompProps !== null && otherCompProps !== void 0 && otherCompProps.title) {
67
68
  moduleDataRes.compProps.title = stringPramarsValTransition(otherCompProps === null || otherCompProps === void 0 ? void 0 : otherCompProps.title, allParametrs);
68
69
  }
69
- if (eventFlag) {
70
- moduleDataRes.compProps.eventFlag = {
71
- checked: true
72
- };
73
- }
74
70
  moduleDataRes.parentCompProps = (parentModuleData === null || parentModuleData === void 0 ? void 0 : parentModuleData.compProps) || {};
75
71
  if (['panel', 'div', 'page'].indexOf(compType) >= 0 && Array.isArray(children) && children.length > 0) {
76
72
  var childs = children.map(function (item) {
@@ -85,6 +81,21 @@ var formatModuleData = function formatModuleData(_ref) {
85
81
  });
86
82
  });
87
83
  moduleDataRes.children = childs;
84
+ if (compType === 'page') {
85
+ if (events && (events === null || events === void 0 ? void 0 : events.length) > 0) {
86
+ var onLoadEvent = events.find(function (item) {
87
+ return (item === null || item === void 0 ? void 0 : item.key) === 'pageLoad';
88
+ });
89
+ if (onLoadEvent) {
90
+ moduleDataRes.compProps.onLoad = onLoadEvent === null || onLoadEvent === void 0 ? void 0 : onLoadEvent.event;
91
+ }
92
+ }
93
+ if (eventFlag) {
94
+ moduleDataRes.compProps.eventFlag = {
95
+ checked: true
96
+ };
97
+ }
98
+ }
88
99
  } else {
89
100
  var _Object$keys;
90
101
  if (otherCompProps && (Object === null || Object === void 0 || (_Object$keys = Object.keys(otherCompProps)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0) {
@@ -281,6 +292,15 @@ var formatModuleData = function formatModuleData(_ref) {
281
292
  });
282
293
  moduleDataRes.compProps = _objectSpread(_objectSpread({}, moduleDataRes.compProps || {}), _echartProps);
283
294
  }
295
+ if (compType === 'charts') {
296
+ var chartsProps = formatChartsProps({
297
+ options: {
298
+ echartsOptions: compProps === null || compProps === void 0 ? void 0 : compProps.echartsOptions
299
+ },
300
+ parameters: allParametrs
301
+ });
302
+ moduleDataRes.compProps = _objectSpread(_objectSpread({}, moduleDataRes.compProps || {}), chartsProps);
303
+ }
284
304
  }
285
305
  if (compType === 'steps') {
286
306
  var stepsProps = formatStepsProps({
@@ -297,8 +317,6 @@ var formatModuleData = function formatModuleData(_ref) {
297
317
  moduleDataRes.compProps.fieldName = fieldName;
298
318
  }
299
319
  }
300
-
301
- // console.log('moduleDataRes', moduleDataRes);
302
320
  return moduleDataRes;
303
321
  };
304
322
  export default formatModuleData;
@@ -1 +1 @@
1
- {"version":3,"names":["getDataArr","urlPrefix","formatListProps","formatTableProps","formatCarouselProps","formatImageProps","formatFormProps","formatHighCodeProps","formatDescriptionsProps","formatLoopProps","formatStyleProps","formatEchartLineProps","formatEchartPieProps","formatStepsProps","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","compColumns","columns","tableBodyHeight","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","stepsProps","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 formatStepsProps,\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 columns: compColumns,\n tableBodyHeight,\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 ...otherCompProps,\n columns: compColumns,\n dataSource: compDataSource,\n attrs,\n tableBodyHeight,\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 if (compType === 'steps') {\n const stepsProps = formatStepsProps({\n options: {\n dataSource: compDataSource,\n ...otherCompProps,\n },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...stepsProps,\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,gBAAgB,EAChBC,kBAAkB,EAClBC,0BAA0B;AAa5B,IAAMC,gBAAgB,GAAG,SAAnBA,g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UAAc,GACvBc,cAAc,CAClB;UACDzC,UAAU,EAAEM;QACd,CAAC,CAAC;QAEFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9BiF,YAAW,CACf;MACH;IACF;IACA,IAAIhF,QAAQ,KAAK,OAAO,EAAE;MACxB,IAAMiF,UAAU,GAAGrG,gBAAgB,CAAC;QAClC0E,OAAO,EAAA5D,aAAA;UACLqB,UAAU,EAAED;QAAc,GACvBc,cAAc,CAClB;QACDzC,UAAU,EAAEM;MACd,CAAC,CAAC;MACFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9BkF,UAAU,CACd;IACH;IACAzF,aAAa,CAACO,SAAS,CAACmF,KAAK,GAAGzG,gBAAgB,CAACQ,UAAU,EAAEC,gBAAgB,CAAC;IAC9E;IACA,IAAID,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEc,SAAS,IAAIyB,SAAS,EAAE;MACtChC,aAAa,CAACO,SAAS,CAACyB,SAAS,GAAGA,SAAS;IAC/C;EACF;;EAEA;EACA,OAAOhC,aAAa;AACtB,CAAC;AAED,eAAeT,gBAAgB"}
1
+ {"version":3,"names":["getDataArr","urlPrefix","formatListProps","formatTableProps","formatCarouselProps","formatImageProps","formatFormProps","formatHighCodeProps","formatDescriptionsProps","formatLoopProps","formatStyleProps","formatEchartLineProps","formatEchartPieProps","formatChartsProps","formatStepsProps","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","compColumns","columns","tableBodyHeight","fileProps","attrs","rowSelection","hasSelectAll","rowKey","fieldName","column","articleContent","eventFlag","events","otherCompProps","_objectWithoutProperties","_excluded","title","parentCompProps","indexOf","Array","isArray","length","childs","map","item","onLoadEvent","find","onLoad","event","checked","_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","chartsProps","echartsOptions","stepsProps","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 formatChartsProps,\n formatStepsProps,\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 columns: compColumns,\n tableBodyHeight,\n fileProps,\n attrs,\n rowSelection,\n hasSelectAll,\n rowKey,\n fieldName,\n column,\n articleContent,\n eventFlag,\n events,\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 \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 if (compType === 'page') {\n if (events && events?.length > 0) {\n const onLoadEvent = events.find(\n (item: any) => item?.key === 'pageLoad',\n );\n if (onLoadEvent) {\n moduleDataRes.compProps.onLoad = onLoadEvent?.event;\n }\n }\n if (eventFlag) {\n moduleDataRes.compProps.eventFlag = { checked: true };\n }\n }\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 ...otherCompProps,\n columns: compColumns,\n dataSource: compDataSource,\n attrs,\n tableBodyHeight,\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 if (compType === 'charts') {\n const chartsProps = formatChartsProps({\n options: {\n echartsOptions: compProps?.echartsOptions,\n },\n parameters: allParametrs,\n });\n\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...chartsProps,\n };\n }\n }\n if (compType === 'steps') {\n const stepsProps = formatStepsProps({\n options: {\n dataSource: compDataSource,\n ...otherCompProps,\n },\n parameters: allParametrs,\n });\n moduleDataRes.compProps = {\n ...(moduleDataRes.compProps || {}),\n ...stepsProps,\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 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,iBAA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AClB;QACD1C,UAAU,EAAEM;MACd,CAAC,CAAC;MACFD,aAAa,CAACO,SAAS,GAAAL,aAAA,CAAAA,aAAA,KACjBF,aAAa,CAACO,SAAS,IAAI,CAAC,CAAC,GAC9ByF,UAAU,CACd;IACH;IACAhG,aAAa,CAACO,SAAS,CAAC0F,KAAK,GAAGjH,gBAAgB,CAACS,UAAU,EAAEC,gBAAgB,CAAC;IAC9E;IACA,IAAID,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEc,SAAS,IAAIyB,SAAS,EAAE;MACtChC,aAAa,CAACO,SAAS,CAACyB,SAAS,GAAGA,SAAS;IAC/C;EACF;EAEA,OAAOhC,aAAa;AACtB,CAAC;AAED,eAAeT,gBAAgB"}
@@ -0,0 +1,13 @@
1
+ export type formatChartsPropsType = {
2
+ options?: {
3
+ echartsOptions?: string;
4
+ };
5
+ parameters?: {
6
+ [key: string]: any;
7
+ };
8
+ };
9
+ export type formatChartsPropsExportType = {
10
+ options: string | undefined;
11
+ };
12
+ declare const formatChartsProps: ({ parameters, options, }: formatChartsPropsType) => formatChartsPropsExportType;
13
+ export default formatChartsProps;
@@ -0,0 +1,12 @@
1
+ import stringPramarsValTransition from "./stringPramarsValTransition";
2
+ var formatChartsProps = function formatChartsProps(_ref) {
3
+ var parameters = _ref.parameters,
4
+ _ref$options = _ref.options,
5
+ options = _ref$options === void 0 ? {} : _ref$options;
6
+ var echartsOptions = options.echartsOptions;
7
+ return {
8
+ options: stringPramarsValTransition(echartsOptions || '', parameters, true)
9
+ };
10
+ };
11
+ export default formatChartsProps;
12
+ //# sourceMappingURL=formatChartsProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stringPramarsValTransition","formatChartsProps","_ref","parameters","_ref$options","options","echartsOptions"],"sources":["../../../../src/formatModule/helpers/formatChartsProps.ts"],"sourcesContent":["import stringPramarsValTransition from './stringPramarsValTransition';\n\nexport type formatChartsPropsType = {\n options?: {\n echartsOptions?: string;\n }\n parameters?: {[key:string]: any};\n}\n\nexport type formatChartsPropsExportType = {\n options: string | undefined\n}\n\nconst formatChartsProps = ({\n parameters,\n options = {},\n}: formatChartsPropsType): formatChartsPropsExportType => {\n const {\n echartsOptions,\n } = options;\n\n return {\n options: stringPramarsValTransition(echartsOptions || '', parameters, true),\n };\n};\n\nexport default formatChartsProps;\n"],"mappings":"AAAA,OAAOA,0BAA0B;AAajC,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAGmC;EAAA,IAFxDC,UAAU,GAAAD,IAAA,CAAVC,UAAU;IAAAC,YAAA,GAAAF,IAAA,CACVG,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,CAAC,CAAC,GAAAA,YAAA;EAEZ,IACEE,cAAc,GACZD,OAAO,CADTC,cAAc;EAGhB,OAAO;IACLD,OAAO,EAAEL,0BAA0B,CAACM,cAAc,IAAI,EAAE,EAAEH,UAAU,EAAE,IAAI;EAC5E,CAAC;AACH,CAAC;AAED,eAAeF,iBAAiB"}
@@ -10,10 +10,11 @@ import formatHighCodeProps from './formatHighCodeProps';
10
10
  import formatFormProps from './formatFormProps';
11
11
  import formatEchartLineProps from './formatEchartLineProps';
12
12
  import formatEchartPieProps from './formatEchartPieProps';
13
+ import formatChartsProps from './formatChartsProps';
13
14
  import formatLoopProps from './formatLoopProps';
14
15
  import formatStyleProps from './formatStyleProps';
15
16
  import formatStepsProps from './formatStepsProps';
16
17
  import formRulsRegMap from './formRulsRegMap';
17
18
  import urlPrefix from './urlPrefix';
18
19
  import { stringScriptExecution } from './stringScriptExecution';
19
- export { urlPrefix, formRulsRegMap, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatDescriptionsProps, formatFormProps, formatHighCodeProps, formatEchartLineProps, formatEchartPieProps, formatLoopProps, formatStyleProps, formatStepsProps, staticCodeAssemble, patternTransitionRegExp, stringPramarsValTransition, stringScriptExecution, };
20
+ export { urlPrefix, formRulsRegMap, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatDescriptionsProps, formatFormProps, formatHighCodeProps, formatEchartLineProps, formatEchartPieProps, formatChartsProps, formatLoopProps, formatStyleProps, formatStepsProps, staticCodeAssemble, patternTransitionRegExp, stringPramarsValTransition, stringScriptExecution, };
@@ -10,11 +10,12 @@ import formatHighCodeProps from "./formatHighCodeProps";
10
10
  import formatFormProps from "./formatFormProps";
11
11
  import formatEchartLineProps from "./formatEchartLineProps";
12
12
  import formatEchartPieProps from "./formatEchartPieProps";
13
+ import formatChartsProps from "./formatChartsProps";
13
14
  import formatLoopProps from "./formatLoopProps";
14
15
  import formatStyleProps from "./formatStyleProps";
15
16
  import formatStepsProps from "./formatStepsProps";
16
17
  import formRulsRegMap from "./formRulsRegMap";
17
18
  import urlPrefix from "./urlPrefix";
18
19
  import { stringScriptExecution } from "./stringScriptExecution";
19
- export { urlPrefix, formRulsRegMap, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatDescriptionsProps, formatFormProps, formatHighCodeProps, formatEchartLineProps, formatEchartPieProps, formatLoopProps, formatStyleProps, formatStepsProps, staticCodeAssemble, patternTransitionRegExp, stringPramarsValTransition, stringScriptExecution };
20
+ export { urlPrefix, formRulsRegMap, formatListProps, formatTableProps, formatCarouselProps, formatImageProps, formatDescriptionsProps, formatFormProps, formatHighCodeProps, formatEchartLineProps, formatEchartPieProps, formatChartsProps, formatLoopProps, formatStyleProps, formatStepsProps, staticCodeAssemble, patternTransitionRegExp, stringPramarsValTransition, stringScriptExecution };
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["stringPramarsValTransition","patternTransitionRegExp","staticCodeAssemble","formatTableProps","formatListProps","formatImageProps","formatCarouselProps","formatDescriptionsProps","formatHighCodeProps","formatFormProps","formatEchartLineProps","formatEchartPieProps","formatLoopProps","formatStyleProps","formatStepsProps","formRulsRegMap","urlPrefix","stringScriptExecution"],"sources":["../../../../src/formatModule/helpers/index.ts"],"sourcesContent":["import stringPramarsValTransition from './stringPramarsValTransition';\nimport patternTransitionRegExp from './patternTransitionRegExp';\nimport staticCodeAssemble from './staticCodeAssemble';\nimport formatTableProps from './formatTableProps';\nimport formatListProps from './formatListProps';\nimport formatImageProps from './formatImageProps';\nimport formatCarouselProps from './formatCarouselProps';\nimport formatDescriptionsProps from './formatDescriptionsProps';\nimport formatHighCodeProps from './formatHighCodeProps';\nimport formatFormProps from './formatFormProps';\nimport formatEchartLineProps from './formatEchartLineProps';\nimport formatEchartPieProps from './formatEchartPieProps';\nimport formatLoopProps from './formatLoopProps';\nimport formatStyleProps from './formatStyleProps';\nimport formatStepsProps from './formatStepsProps';\nimport formRulsRegMap from './formRulsRegMap';\nimport urlPrefix from './urlPrefix';\nimport { stringScriptExecution } from './stringScriptExecution';\n\nexport {\n urlPrefix,\n formRulsRegMap,\n formatListProps,\n formatTableProps,\n formatCarouselProps,\n formatImageProps,\n formatDescriptionsProps,\n formatFormProps,\n formatHighCodeProps,\n formatEchartLineProps,\n formatEchartPieProps,\n formatLoopProps,\n formatStyleProps,\n formatStepsProps,\n staticCodeAssemble,\n patternTransitionRegExp,\n stringPramarsValTransition,\n stringScriptExecution,\n};\n"],"mappings":"AAAA,OAAOA,0BAA0B;AACjC,OAAOC,uBAAuB;AAC9B,OAAOC,kBAAkB;AACzB,OAAOC,gBAAgB;AACvB,OAAOC,eAAe;AACtB,OAAOC,gBAAgB;AACvB,OAAOC,mBAAmB;AAC1B,OAAOC,uBAAuB;AAC9B,OAAOC,mBAAmB;AAC1B,OAAOC,eAAe;AACtB,OAAOC,qBAAqB;AAC5B,OAAOC,oBAAoB;AAC3B,OAAOC,eAAe;AACtB,OAAOC,gBAAgB;AACvB,OAAOC,gBAAgB;AACvB,OAAOC,cAAc;AACrB,OAAOC,SAAS;AAChB,SAASC,qBAAqB;AAE9B,SACED,SAAS,EACTD,cAAc,EACdX,eAAe,EACfD,gBAAgB,EAChBG,mBAAmB,EACnBD,gBAAgB,EAChBE,uBAAuB,EACvBE,eAAe,EACfD,mBAAmB,EACnBE,qBAAqB,EACrBC,oBAAoB,EACpBC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBZ,kBAAkB,EAClBD,uBAAuB,EACvBD,0BAA0B,EAC1BiB,qBAAqB"}
1
+ {"version":3,"names":["stringPramarsValTransition","patternTransitionRegExp","staticCodeAssemble","formatTableProps","formatListProps","formatImageProps","formatCarouselProps","formatDescriptionsProps","formatHighCodeProps","formatFormProps","formatEchartLineProps","formatEchartPieProps","formatChartsProps","formatLoopProps","formatStyleProps","formatStepsProps","formRulsRegMap","urlPrefix","stringScriptExecution"],"sources":["../../../../src/formatModule/helpers/index.ts"],"sourcesContent":["import stringPramarsValTransition from './stringPramarsValTransition';\nimport patternTransitionRegExp from './patternTransitionRegExp';\nimport staticCodeAssemble from './staticCodeAssemble';\nimport formatTableProps from './formatTableProps';\nimport formatListProps from './formatListProps';\nimport formatImageProps from './formatImageProps';\nimport formatCarouselProps from './formatCarouselProps';\nimport formatDescriptionsProps from './formatDescriptionsProps';\nimport formatHighCodeProps from './formatHighCodeProps';\nimport formatFormProps from './formatFormProps';\nimport formatEchartLineProps from './formatEchartLineProps';\nimport formatEchartPieProps from './formatEchartPieProps';\nimport formatChartsProps from './formatChartsProps';\nimport formatLoopProps from './formatLoopProps';\nimport formatStyleProps from './formatStyleProps';\nimport formatStepsProps from './formatStepsProps';\nimport formRulsRegMap from './formRulsRegMap';\nimport urlPrefix from './urlPrefix';\nimport { stringScriptExecution } from './stringScriptExecution';\n\nexport {\n urlPrefix,\n formRulsRegMap,\n formatListProps,\n formatTableProps,\n formatCarouselProps,\n formatImageProps,\n formatDescriptionsProps,\n formatFormProps,\n formatHighCodeProps,\n formatEchartLineProps,\n formatEchartPieProps,\n formatChartsProps,\n formatLoopProps,\n formatStyleProps,\n formatStepsProps,\n staticCodeAssemble,\n patternTransitionRegExp,\n stringPramarsValTransition,\n stringScriptExecution,\n};\n"],"mappings":"AAAA,OAAOA,0BAA0B;AACjC,OAAOC,uBAAuB;AAC9B,OAAOC,kBAAkB;AACzB,OAAOC,gBAAgB;AACvB,OAAOC,eAAe;AACtB,OAAOC,gBAAgB;AACvB,OAAOC,mBAAmB;AAC1B,OAAOC,uBAAuB;AAC9B,OAAOC,mBAAmB;AAC1B,OAAOC,eAAe;AACtB,OAAOC,qBAAqB;AAC5B,OAAOC,oBAAoB;AAC3B,OAAOC,iBAAiB;AACxB,OAAOC,eAAe;AACtB,OAAOC,gBAAgB;AACvB,OAAOC,gBAAgB;AACvB,OAAOC,cAAc;AACrB,OAAOC,SAAS;AAChB,SAASC,qBAAqB;AAE9B,SACED,SAAS,EACTD,cAAc,EACdZ,eAAe,EACfD,gBAAgB,EAChBG,mBAAmB,EACnBD,gBAAgB,EAChBE,uBAAuB,EACvBE,eAAe,EACfD,mBAAmB,EACnBE,qBAAqB,EACrBC,oBAAoB,EACpBC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBb,kBAAkB,EAClBD,uBAAuB,EACvBD,0BAA0B,EAC1BkB,qBAAqB"}
@@ -1,4 +1,4 @@
1
1
  declare const stringPramarsValTransition: (contentStr: string, pararms?: {
2
2
  [key: string]: any;
3
- }) => string;
3
+ }, isObject2String?: boolean) => string;
4
4
  export default stringPramarsValTransition;
@@ -64,7 +64,7 @@ export var sanitizeRedirectUrl = function sanitizeRedirectUrl(url) {
64
64
  return defaultUrl;
65
65
  }
66
66
  }
67
- return urlObj.toString();
67
+ return urlObj.pathname + urlObj.search;
68
68
  } catch (_unused2) {
69
69
  return defaultUrl;
70
70
  }
@@ -1 +1 @@
1
- {"version":3,"names":["isValidUrl","url","urlObj","URL","window","location","origin","includes","protocol","dangerousPatterns","some","pattern","test","_unused","sanitizeRedirectUrl","allowedDomains","arguments","length","undefined","defaultUrl","currentHost","hostname","isAllowedDomain","domain","endsWith","concat","toString","_unused2","safeRedirect","safeUrl","href","sanitizeEventHandler","handler","apply","error","console"],"sources":["../../src/securityUtils.ts"],"sourcesContent":["/**\n * 安全工具函数,用于防止XSS等安全漏洞\n */\n\n/**\n * 验证URL是否安全,防止XSS攻击\n * @param url 待验证的URL\n * @returns 是否为安全的URL\n */\nexport const isValidUrl = (url: string): boolean => {\n if (!url || typeof url !== 'string') {\n return false;\n }\n\n try {\n const urlObj = new URL(url, window.location.origin);\n \n // 只允许http和https协议,防止javascript:等危险协议\n if (!['http:', 'https:'].includes(urlObj.protocol)) {\n return false;\n }\n\n // 检查是否包含危险字符\n const dangerousPatterns = [\n /javascript:/i,\n /vbscript:/i,\n /data:/i,\n /file:/i,\n /<script/i,\n /onload=/i,\n /onerror=/i,\n /onclick=/i,\n ];\n\n return !dangerousPatterns.some(pattern => pattern.test(url));\n } catch {\n return false;\n }\n};\n\n/**\n * 清理和验证重定向URL,确保安全\n * @param url 待清理的URL\n * @param allowedDomains 允许的域名列表,为空时允许同源URL\n * @returns 清理后的安全URL,如果不安全则返回默认URL\n */\nexport const sanitizeRedirectUrl = (\n url: string,\n allowedDomains: string[] = [],\n defaultUrl: string = '/'\n): string => {\n if (!url || typeof url !== 'string') {\n return defaultUrl;\n }\n\n // 基本URL验证\n if (!isValidUrl(url)) {\n return defaultUrl;\n }\n\n try {\n const urlObj = new URL(url, window.location.origin);\n const currentHost = window.location.hostname;\n\n // 如果没有指定允许的域名,只允许同源URL\n if (allowedDomains.length === 0) {\n if (urlObj.hostname !== currentHost) {\n return defaultUrl;\n }\n } else {\n // 检查是否在允许的域名列表中\n const isAllowedDomain = allowedDomains.some(domain =>\n urlObj.hostname === domain || urlObj.hostname.endsWith(`.${domain}`)\n );\n \n if (!isAllowedDomain && urlObj.hostname !== currentHost) {\n return defaultUrl;\n }\n }\n\n return urlObj.toString();\n } catch {\n return defaultUrl;\n }\n};\n\n/**\n * 安全地设置window.location.href,防止XSS攻击\n * @param url 目标URL\n * @param allowedDomains 允许的域名列表\n */\nexport const safeRedirect = (url: string, allowedDomains: string[] = []): void => {\n const safeUrl = sanitizeRedirectUrl(url, allowedDomains);\n window.location.href = safeUrl;\n};\n\n/**\n * 验证和清理事件处理器,防止恶意代码注入\n * @param handler 事件处理函数\n * @returns 安全的事件处理函数\n */\nexport const sanitizeEventHandler = (handler: Function): Function => {\n if (typeof handler !== 'function') {\n return () => {};\n }\n \n return (...args: any[]) => {\n try {\n handler(...args);\n } catch (error) {\n console.error('Event handler error:', error);\n }\n };\n};\n"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,GAAW,EAAc;EAClD,IAAI,CAACA,GAAG,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;IACnC,OAAO,KAAK;EACd;EAEA,IAAI;IACF,IAAMC,MAAM,GAAG,IAAIC,GAAG,CAACF,GAAG,EAAEG,MAAM,CAACC,QAAQ,CAACC,MAAM,CAAC;;IAEnD;IACA,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACL,MAAM,CAACM,QAAQ,CAAC,EAAE;MAClD,OAAO,KAAK;IACd;;IAEA;IACA,IAAMC,iBAAiB,GAAG,CACxB,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,EACX,WAAW,CACZ;IAED,OAAO,CAACA,iBAAiB,CAACC,IAAI,CAAC,UAAAC,OAAO;MAAA,OAAIA,OAAO,CAACC,IAAI,CAACX,GAAG,CAAC;IAAA,EAAC;EAC9D,CAAC,CAAC,OAAAY,OAAA,EAAM;IACN,OAAO,KAAK;EACd;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAC9Bb,GAAW,EAGA;EAAA,IAFXc,cAAwB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IAC7BG,UAAkB,GAAAH,SAAA,CAAAC,MAAA,QAAA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EACxDX,MAAM,CAACC,QAAQ,CAACyB,IAAI,GAAGD,OAAO;AAChC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAME,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIC,OAAiB,EAAe;EACnE,IAAI,OAAOA,OAAO,KAAK,UAAU,EAAE;IACjC,OAAO,YAAM,CAAC,CAAC;EACjB;EAEA,OAAO,YAAoB;IACzB,IAAI;MACFA,OAAO,CAAAC,KAAA,SAAAjB,SAAQ,CAAC;IAClB,CAAC,CAAC,OAAOkB,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,sBAAsB,EAAEA,KAAK,CAAC;IAC9C;EACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"names":["isValidUrl","url","urlObj","URL","window","location","origin","includes","protocol","dangerousPatterns","some","pattern","test","_unused","sanitizeRedirectUrl","allowedDomains","arguments","length","undefined","defaultUrl","currentHost","hostname","isAllowedDomain","domain","endsWith","concat","pathname","search","_unused2","safeRedirect","safeUrl","href","sanitizeEventHandler","handler","apply","error","console"],"sources":["../../src/securityUtils.ts"],"sourcesContent":["/**\n * 安全工具函数,用于防止XSS等安全漏洞\n */\n\n/**\n * 验证URL是否安全,防止XSS攻击\n * @param url 待验证的URL\n * @returns 是否为安全的URL\n */\nexport const isValidUrl = (url: string): boolean => {\n if (!url || typeof url !== 'string') {\n return false;\n }\n\n try {\n const urlObj = new URL(url, window.location.origin);\n \n // 只允许http和https协议,防止javascript:等危险协议\n if (!['http:', 'https:'].includes(urlObj.protocol)) {\n return false;\n }\n\n // 检查是否包含危险字符\n const dangerousPatterns = [\n /javascript:/i,\n /vbscript:/i,\n /data:/i,\n /file:/i,\n /<script/i,\n /onload=/i,\n /onerror=/i,\n /onclick=/i,\n ];\n\n return !dangerousPatterns.some(pattern => pattern.test(url));\n } catch {\n return false;\n }\n};\n\n/**\n * 清理和验证重定向URL,确保安全\n * @param url 待清理的URL\n * @param allowedDomains 允许的域名列表,为空时允许同源URL\n * @returns 清理后的安全URL,如果不安全则返回默认URL\n */\nexport const sanitizeRedirectUrl = (\n url: string,\n allowedDomains: string[] = [],\n defaultUrl: string = '/'\n): string => {\n if (!url || typeof url !== 'string') {\n return defaultUrl;\n }\n\n // 基本URL验证\n if (!isValidUrl(url)) {\n return defaultUrl;\n }\n\n try {\n const urlObj = new URL(url, window.location.origin);\n const currentHost = window.location.hostname;\n\n // 如果没有指定允许的域名,只允许同源URL\n if (allowedDomains.length === 0) {\n if (urlObj.hostname !== currentHost) {\n return defaultUrl;\n }\n } else {\n // 检查是否在允许的域名列表中\n const isAllowedDomain = allowedDomains.some(domain =>\n urlObj.hostname === domain || urlObj.hostname.endsWith(`.${domain}`)\n );\n \n if (!isAllowedDomain && urlObj.hostname !== currentHost) {\n return defaultUrl;\n }\n }\n\n return urlObj.pathname + urlObj.search;\n } catch {\n return defaultUrl;\n }\n};\n\n/**\n * 安全地设置window.location.href,防止XSS攻击\n * @param url 目标URL\n * @param allowedDomains 允许的域名列表\n */\nexport const safeRedirect = (url: string, allowedDomains: string[] = []): void => {\n const safeUrl = sanitizeRedirectUrl(url, allowedDomains);\n window.location.href = safeUrl;\n};\n\n/**\n * 验证和清理事件处理器,防止恶意代码注入\n * @param handler 事件处理函数\n * @returns 安全的事件处理函数\n */\nexport const sanitizeEventHandler = (handler: Function): Function => {\n if (typeof handler !== 'function') {\n return () => {};\n }\n \n return (...args: any[]) => {\n try {\n handler(...args);\n } catch (error) {\n console.error('Event handler error:', error);\n }\n };\n};\n"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,GAAW,EAAc;EAClD,IAAI,CAACA,GAAG,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;IACnC,OAAO,KAAK;EACd;EAEA,IAAI;IACF,IAAMC,MAAM,GAAG,IAAIC,GAAG,CAACF,GAAG,EAAEG,MAAM,CAACC,QAAQ,CAACC,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{
19
19
  }) => string;
20
20
  export declare const replaceParamsValue: (contentStr: string, pararms?: {
21
21
  [key: string]: any;
22
- }) => string;
22
+ }, isObject2String?: boolean) => string;
23
23
  /**
24
24
  * 提供给事件参数转换那边的方法
25
25
  * 和replaceParamsValue 区别,
@@ -1,3 +1,4 @@
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); }
1
2
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
3
  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); }
3
4
  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; }
@@ -153,10 +154,14 @@ export var replaceLoopBodyParamsValue = function replaceLoopBodyParamsValue(cont
153
154
  };
154
155
  export var replaceParamsValue = function replaceParamsValue(contentStr) {
155
156
  var pararms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
157
+ var isObject2String = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
156
158
  var nowContent = '';
157
159
  if (typeof contentStr === 'string' && contentStr && pararms) {
158
160
  nowContent = contentStr.replace(/\$\{\{?[^{}]+}?\}/g, function (match) {
159
161
  var filedVal = getParamsContentByParamKeys(match, pararms);
162
+ if (isObject2String && _typeof(filedVal) === 'object') {
163
+ return JSON.stringify(filedVal);
164
+ }
160
165
  return filedVal || '';
161
166
  });
162
167
  }
@@ -1 +1 @@
1
- {"version":3,"names":["get","cloneDeep","escapeString","getDataArr","content","matchArr","_matchs","_matchArr","escapeRegex","regex","matchs","exec","split","_matchs2","filter","item","idx","includes","loopNodeByParamsPath","paramsArr","data","escape","arguments","length","undefined","Array","isArray","_iterator","_createForOfIteratorHelper","_step","_loop","_nextParamsArr5","keyword","value","dataNode","nextParamsArr","slice","_nextParamsArr","_nextParamsArr3","idxRegex","test","_nextParamsArr2","idxNum","replace","Number","Object","v","map","_nextParamsArr4","_ret","s","n","done","err","e","f","getParamsContentByParamKeys","paramNames","_Object$keys","keys","paramNameList","replaceLoopBodyParamsValue","contentStr","options","_ref","_ref$loopParams","loopParams","_ref$loopSourceArr","loopSourceArr","_ref$loopData","loopData","_ref$parameters","parameters","nowTemp","match","paramsPath","itemKey","filedVal","_parameters","forEach","sourceKey","replaceParamsValue","pararms","nowContent","splitStringWithTemplateLiteral","input","templateRegex","matches","result","Boolean","index","splice","getParamsContentByParamKeysForEvent","_matchs$","replaceParamsValueForEvent","_Object$keys2","valueArr","JSON","stringify","_unused"],"sources":["../../src/treeUtils.ts"],"sourcesContent":["import { get, cloneDeep } from 'lodash';\nimport escapeString from './markdownEscape';\n\nexport const getDataArr = (content: string) => {\n let matchArr:string[] = [];\n if (content && typeof content === 'string') {\n const escapeRegex = /\\$\\{\\{([^}]+)\\}\\}/gi; // 变量正则表达式,${{xxx}}\n const regex = /\\$\\{(.+?)\\}/gi; // 变量正则表达式,${xxx}\n let matchs = escapeRegex.exec(content);\n if (matchs?.[1]) {\n matchArr = matchs[1].split('.');\n } else {\n matchs = regex.exec(content);\n if (matchs?.[1]) {\n matchArr = matchs[1].split('.');\n }\n }\n return matchArr?.filter((item, idx) => !(idx === 0 && ['root', 'pageParams'].includes(item)) && !(idx === 1 && ['pageParams'].includes(item))); // 过滤掉第一个root,pageParams\n }\n return matchArr;\n};\n\nconst loopNodeByParamsPath:any = (\n paramsArr:string[],\n data: {[key:string]: any},\n escape:boolean = false\n) => {\n if (Array.isArray(paramsArr) && paramsArr.length > 0) {\n for (const keyword of paramsArr) {\n const dataNode = get(data, keyword);\n let nextParamsArr = paramsArr.slice(1); // 取下一个节点字段\n if (Array.isArray(dataNode)) {\n // 如果当前节点是数组,且下一个节点是数字,则取下标对应的值\n const idxRegex = /^\\[.*\\]$|^\\d+$/;\n if (idxRegex.test(nextParamsArr?.[0])) {\n const idxNum = nextParamsArr?.[0].replace(/\\[|\\]/g, '');\n if (dataNode?.[Number(idxNum)] instanceof Object) {\n return loopNodeByParamsPath(nextParamsArr.slice(1), dataNode?.[Number(idxNum)], escape);\n }\n return escape ? escapeString(dataNode?.[Number(idxNum)]) : dataNode?.[Number(idxNum)];\n }\n // 否则或缺中间节点,直接往下取值\n nextParamsArr = nextParamsArr.slice(1);\n if (nextParamsArr?.length >= 1) {\n return dataNode.map((item:any) => {\n // 如果数组节点是对象,则继续递归取值\n if (item instanceof Object && nextParamsArr?.length >= 1) {\n return loopNodeByParamsPath(nextParamsArr, item, escape);\n }\n // 否则直接返回数组值\n return escape ? escapeString(item) : item;\n });\n }\n return dataNode;\n } if (nextParamsArr?.length >= 1) {\n return loopNodeByParamsPath(nextParamsArr, dataNode, escape);\n }\n return escape ? escapeString(dataNode) : dataNode;\n }\n }\n return '';\n};\n\n\nexport const getParamsContentByParamKeys = (paramNames: string, data: {[key:string]: any} = {}) => {\n if (!paramNames || !data || Object.keys(data)?.length <= 0) {\n return undefined;\n }\n const escapeRegex = /\\$\\{\\{([^}]+)\\}\\}/gi; // 匹配${{}}格式的参数,属于需转义内容\n const paramNameList = getDataArr(paramNames);\n return loopNodeByParamsPath(paramNameList, data, escapeRegex.test(paramNames));\n};\n\n// 获取替换循环体内的参数值\nexport const replaceLoopBodyParamsValue = (\n contentStr: string,\n options: {\n loopParams: { [key: string]: any } // 循环体参数\n loopSourceArr: string[], // 循环体数据源\n loopData: {[key: string]: any}[], // 循环数据源数据\n parameters?: {[key: string]: any}, // 全量参数\n staticCodeMap?: {[key: string]: any}, // 静态数据\n },\n) => {\n const {\n loopParams = {},\n loopSourceArr = [],\n loopData = [],\n parameters = {},\n } = options || {};\n let nowTemp = '';\n if (typeof contentStr === 'string' && contentStr && loopParams) {\n nowTemp = contentStr.replace(/\\$\\{(.+?)\\}/gi, (match) => {\n const paramsPath = getDataArr(match).filter((itemKey) => !loopSourceArr.includes(itemKey));\n let filedVal:any = '';\n // 如果当前节点是数组,且下一个节点是数字,则取下标对应的值\n const idxRegex = /^\\[.*\\]$|^\\d+$/;\n if (idxRegex.test(paramsPath?.[0])) {\n const idxNum = paramsPath?.[0].replace(/\\[|\\]/g, '');\n if (loopData?.[Number(idxNum)] instanceof Object) {\n filedVal = loopNodeByParamsPath(paramsPath.slice(1), loopData?.[Number(idxNum)]);\n } else {\n filedVal = loopData?.[Number(idxNum)] || '';\n }\n } else {\n filedVal = loopNodeByParamsPath(paramsPath.slice(1), loopParams);\n\n // 循环体内查找不到,则从参数中取值,但忽略循环体本身\n if (!filedVal && parameters) {\n const _parameters = cloneDeep(parameters);\n if (Array.isArray(loopSourceArr) && loopSourceArr.length > 0) {\n loopSourceArr.forEach((sourceKey:string) => {\n delete _parameters[sourceKey];\n });\n }\n const paramNameList = getDataArr(match);\n filedVal = loopNodeByParamsPath(paramNameList, _parameters);\n }\n }\n return filedVal || '';\n });\n }\n return nowTemp;\n};\n\nexport const replaceParamsValue = (\n contentStr: string,\n pararms: { [key: string]: any } = {},\n) => {\n let nowContent:string = '';\n if (typeof contentStr === 'string' && contentStr && pararms) {\n nowContent = contentStr.replace(/\\$\\{\\{?[^{}]+}?\\}/g, (match) => {\n const filedVal = getParamsContentByParamKeys(match, pararms);\n return filedVal || '';\n });\n }\n return nowContent;\n};\n\n\n/** ======下面几个方法主要提供给事件参数使用 勿共用 ===== */\nconst splitStringWithTemplateLiteral = (input: string) => {\n // 正则表达式:匹配 ${...} 模式\n const templateRegex = /\\$\\{[^}]*\\}/;\n\n // 检查字符串是否包含 ${...}\n if (!templateRegex.test(input)) {\n return [input]; // 返回原始字符串\n }\n\n // 匹配所有 ${...} 模式\n const matches = input.match(templateRegex);\n\n if (!matches || matches.length === 0) {\n return [input]; // 返回原始字符串\n }\n\n // 分割字符串,同时保留 ${...} 模式\n const result = input.split(templateRegex).filter(Boolean); // 去掉空字符串\n\n // 将匹配到的 ${...} 模式重新插入到结果数组中\n matches.forEach((match, index) => {\n result.splice(index * 2 + 1, 0, match); // 插入到对应位置\n });\n\n return result;\n};\n\nconst getParamsContentByParamKeysForEvent = (\n paramNames: string,\n data: { [key: string]: any } = {},\n) => {\n let paramNameList: string[] = [];\n const regex = /\\$\\{(.+?)\\}/gi; // 变量正则表达式,${xxx}\n if (paramNames && typeof paramNames === 'string') {\n const matchs = regex.exec(paramNames);\n if (matchs?.[1]) {\n paramNameList = matchs?.[1]?.split('.');\n }\n }\n\n // 如果替换不成功,需要返回字符串原始的值\n return paramNameList.length > 0\n ? loopNodeByParamsPath(paramNameList, data) || ''\n : paramNames;\n};\n\n\n/**\n * 提供给事件参数转换那边的方法\n * 和replaceParamsValue 区别,\n * 1、不能去掉pageParams那一层\n * 2、字符串拼对象,需要把对象做JSON.stringify转换\n * 3、如果替换不成功,需要返回字符串原始的值\n * @param contentStr \"你好\" ,\"你$好, ${pageParams.userName}\" , \"${pageData}, ${pageParams.userList[0]}\"\n * @param data 数据\n */\nexport const replaceParamsValueForEvent = (\n contentStr: string,\n data: { [key: string]: any } = {},\n) => {\n if (!contentStr || !data || Object.keys(data)?.length <= 0) {\n return undefined;\n }\n\n const valueArr = splitStringWithTemplateLiteral(contentStr);\n // 单个字符串, 没有拼接\n if (valueArr.length === 1) {\n return getParamsContentByParamKeysForEvent(valueArr[0], data);\n }\n\n\n let nowTemp = '';\n if (typeof contentStr === 'string' && contentStr && data) {\n nowTemp = contentStr.replace(/\\$\\{(.+?)\\}/g, (match) => {\n const filedVal = getParamsContentByParamKeysForEvent(match, data);\n if (typeof filedVal === 'string') {\n return filedVal;\n }\n // 字符串拼对象,需要把对象做JSON.stringify转换\n try {\n return JSON.stringify(filedVal);\n } catch {\n return '';\n }\n });\n }\n return nowTemp;\n};\n\n/** ======上面几个方法主要提供给事件参数使用 勿共用 ===== */\n"],"mappings":";;;AAAA,SAASA,GAAG,EAAEC,SAAS,QAAQ,QAAQ;AACvC,OAAOC,YAAY;AAEnB,OAAO,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,OAAe,EAAK;EAC7C,IAAIC,QAAiB,GAAG,EAAE;EAC1B,IAAID,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAAA,IAAAE,OAAA,EAAAC,SAAA;IAC1C,IAAMC,WAAW,GAAG,qBAAqB,CAAC,CAAC;IAC3C,IAAMC,KAAK,GAAG,eAAe,CAAC,CAAC;IAC/B,IAAIC,MAAM,GAAGF,WAAW,CAACG,IAAI,CAACP,OAAO,CAAC;IACtC,KAAAE,OAAA,GAAII,MAAM,cAAAJ,OAAA,eAANA,OAAA,CAAS,CAAC,CAAC,EAAE;MACfD,QAAQ,GAAGK,MAAM,CAAC,CAAC,CAAC,CAACE,KAAK,CAAC,GAAG,CAAC;IACjC,CAAC,MAAM;MAAA,IAAAC,QAAA;MACLH,MAAM,GAAGD,KAAK,CAACE,IAAI,CAACP,OAA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AMwE,QAAQ,GAAGZ,8BAA8B,CAACtB,UAAU,CAAC;EAC3D;EACA,IAAIkC,QAAQ,CAACzE,MAAM,KAAK,CAAC,EAAE;IACzB,OAAOqE,mCAAmC,CAACI,QAAQ,CAAC,CAAC,CAAC,EAAE5E,IAAI,CAAC;EAC/D;EAGA,IAAIqD,OAAO,GAAG,EAAE;EAChB,IAAI,OAAOX,UAAU,KAAK,QAAQ,IAAIA,UAAU,IAAI1C,IAAI,EAAE;IACxDqD,OAAO,GAAGX,UAAU,CAACnB,OAAO,CAAC,cAAc,EAAE,UAAC+B,KAAK,EAAK;MACtD,IAAMG,QAAQ,GAAGe,mCAAmC,CAAClB,KAAK,EAAEtD,IAAI,CAAC;MACjE,IAAI,OAAOyD,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAOA,QAAQ;MACjB;MACA;MACA,IAAI;QACF,OAAOoB,IAAI,CAACC,SAAS,CAACrB,QAAQ,CAAC;MACjC,CAAC,CAAC,OAAAsB,OAAA,EAAM;QACN,OAAO,EAAE;MACX;IACF,CAAC,CAAC;EACJ;EACA,OAAO1B,OAAO;AAChB,CAAC;;AAED"}
1
+ {"version":3,"names":["get","cloneDeep","escapeString","getDataArr","content","matchArr","_matchs","_matchArr","escapeRegex","regex","matchs","exec","split","_matchs2","filter","item","idx","includes","loopNodeByParamsPath","paramsArr","data","escape","arguments","length","undefined","Array","isArray","_iterator","_createForOfIteratorHelper","_step","_loop","_nextParamsArr5","keyword","value","dataNode","nextParamsArr","slice","_nextParamsArr","_nextParamsArr3","idxRegex","test","_nextParamsArr2","idxNum","replace","Number","Object","v","map","_nextParamsArr4","_ret","s","n","done","err","e","f","getParamsContentByParamKeys","paramNames","_Object$keys","keys","paramNameList","replaceLoopBodyParamsValue","contentStr","options","_ref","_ref$loopParams","loopParams","_ref$loopSourceArr","loopSourceArr","_ref$loopData","loopData","_ref$parameters","parameters","nowTemp","match","paramsPath","itemKey","filedVal","_parameters","forEach","sourceKey","replaceParamsValue","pararms","isObject2String","nowContent","_typeof","JSON","stringify","splitStringWithTemplateLiteral","input","templateRegex","matches","result","Boolean","index","splice","getParamsContentByParamKeysForEvent","_matchs$","replaceParamsValueForEvent","_Object$keys2","valueArr","_unused"],"sources":["../../src/treeUtils.ts"],"sourcesContent":["import { get, cloneDeep } from 'lodash';\nimport escapeString from './markdownEscape';\n\nexport const getDataArr = (content: string) => {\n let matchArr:string[] = [];\n if (content && typeof content === 'string') {\n const escapeRegex = /\\$\\{\\{([^}]+)\\}\\}/gi; // 变量正则表达式,${{xxx}}\n const regex = /\\$\\{(.+?)\\}/gi; // 变量正则表达式,${xxx}\n let matchs = escapeRegex.exec(content);\n if (matchs?.[1]) {\n matchArr = matchs[1].split('.');\n } else {\n matchs = regex.exec(content);\n if (matchs?.[1]) {\n matchArr = matchs[1].split('.');\n }\n }\n return matchArr?.filter((item, idx) => !(idx === 0 && ['root', 'pageParams'].includes(item)) && !(idx === 1 && ['pageParams'].includes(item))); // 过滤掉第一个root,pageParams\n }\n return matchArr;\n};\n\nconst loopNodeByParamsPath:any = (\n paramsArr:string[],\n data: {[key:string]: any},\n escape:boolean = false\n) => {\n if (Array.isArray(paramsArr) && paramsArr.length > 0) {\n for (const keyword of paramsArr) {\n const dataNode = get(data, keyword);\n let nextParamsArr = paramsArr.slice(1); // 取下一个节点字段\n if (Array.isArray(dataNode)) {\n // 如果当前节点是数组,且下一个节点是数字,则取下标对应的值\n const idxRegex = /^\\[.*\\]$|^\\d+$/;\n if (idxRegex.test(nextParamsArr?.[0])) {\n const idxNum = nextParamsArr?.[0].replace(/\\[|\\]/g, '');\n if (dataNode?.[Number(idxNum)] instanceof Object) {\n return loopNodeByParamsPath(nextParamsArr.slice(1), dataNode?.[Number(idxNum)], escape);\n }\n return escape ? escapeString(dataNode?.[Number(idxNum)]) : dataNode?.[Number(idxNum)];\n }\n // 否则或缺中间节点,直接往下取值\n nextParamsArr = nextParamsArr.slice(1);\n if (nextParamsArr?.length >= 1) {\n return dataNode.map((item:any) => {\n // 如果数组节点是对象,则继续递归取值\n if (item instanceof Object && nextParamsArr?.length >= 1) {\n return loopNodeByParamsPath(nextParamsArr, item, escape);\n }\n // 否则直接返回数组值\n return escape ? escapeString(item) : item;\n });\n }\n return dataNode;\n } if (nextParamsArr?.length >= 1) {\n return loopNodeByParamsPath(nextParamsArr, dataNode, escape);\n }\n return escape ? escapeString(dataNode) : dataNode;\n }\n }\n return '';\n};\n\n\nexport const getParamsContentByParamKeys = (paramNames: string, data: {[key:string]: any} = {}) => {\n if (!paramNames || !data || Object.keys(data)?.length <= 0) {\n return undefined;\n }\n const escapeRegex = /\\$\\{\\{([^}]+)\\}\\}/gi; // 匹配${{}}格式的参数,属于需转义内容\n const paramNameList = getDataArr(paramNames);\n return loopNodeByParamsPath(paramNameList, data, escapeRegex.test(paramNames));\n};\n\n// 获取替换循环体内的参数值\nexport const replaceLoopBodyParamsValue = (\n contentStr: string,\n options: {\n loopParams: { [key: string]: any } // 循环体参数\n loopSourceArr: string[], // 循环体数据源\n loopData: {[key: string]: any}[], // 循环数据源数据\n parameters?: {[key: string]: any}, // 全量参数\n staticCodeMap?: {[key: string]: any}, // 静态数据\n },\n) => {\n const {\n loopParams = {},\n loopSourceArr = [],\n loopData = [],\n parameters = {},\n } = options || {};\n let nowTemp = '';\n if (typeof contentStr === 'string' && contentStr && loopParams) {\n nowTemp = contentStr.replace(/\\$\\{(.+?)\\}/gi, (match) => {\n const paramsPath = getDataArr(match).filter((itemKey) => !loopSourceArr.includes(itemKey));\n let filedVal:any = '';\n // 如果当前节点是数组,且下一个节点是数字,则取下标对应的值\n const idxRegex = /^\\[.*\\]$|^\\d+$/;\n if (idxRegex.test(paramsPath?.[0])) {\n const idxNum = paramsPath?.[0].replace(/\\[|\\]/g, '');\n if (loopData?.[Number(idxNum)] instanceof Object) {\n filedVal = loopNodeByParamsPath(paramsPath.slice(1), loopData?.[Number(idxNum)]);\n } else {\n filedVal = loopData?.[Number(idxNum)] || '';\n }\n } else {\n filedVal = loopNodeByParamsPath(paramsPath.slice(1), loopParams);\n\n // 循环体内查找不到,则从参数中取值,但忽略循环体本身\n if (!filedVal && parameters) {\n const _parameters = cloneDeep(parameters);\n if (Array.isArray(loopSourceArr) && loopSourceArr.length > 0) {\n loopSourceArr.forEach((sourceKey:string) => {\n delete _parameters[sourceKey];\n });\n }\n const paramNameList = getDataArr(match);\n filedVal = loopNodeByParamsPath(paramNameList, _parameters);\n }\n }\n return filedVal || '';\n });\n }\n return nowTemp;\n};\n\nexport const replaceParamsValue = (\n contentStr: string,\n pararms: { [key: string]: any } = {},\n isObject2String: boolean = false,\n) => {\n let nowContent:string = '';\n if (typeof contentStr === 'string' && contentStr && pararms) {\n nowContent = contentStr.replace(/\\$\\{\\{?[^{}]+}?\\}/g, (match) => {\n const filedVal = getParamsContentByParamKeys(match, pararms);\n if (isObject2String && typeof filedVal === 'object') {\n return JSON.stringify(filedVal);\n }\n return filedVal || '';\n });\n }\n return nowContent;\n};\n\n\n/** ======下面几个方法主要提供给事件参数使用 勿共用 ===== */\nconst splitStringWithTemplateLiteral = (input: string) => {\n // 正则表达式:匹配 ${...} 模式\n const templateRegex = /\\$\\{[^}]*\\}/;\n\n // 检查字符串是否包含 ${...}\n if (!templateRegex.test(input)) {\n return [input]; // 返回原始字符串\n }\n\n // 匹配所有 ${...} 模式\n const matches = input.match(templateRegex);\n\n if (!matches || matches.length === 0) {\n return [input]; // 返回原始字符串\n }\n\n // 分割字符串,同时保留 ${...} 模式\n const result = input.split(templateRegex).filter(Boolean); // 去掉空字符串\n\n // 将匹配到的 ${...} 模式重新插入到结果数组中\n matches.forEach((match, index) => {\n result.splice(index * 2 + 1, 0, match); // 插入到对应位置\n });\n\n return result;\n};\n\nconst getParamsContentByParamKeysForEvent = (\n paramNames: string,\n data: { [key: string]: any } = {},\n) => {\n let paramNameList: string[] = [];\n const regex = /\\$\\{(.+?)\\}/gi; // 变量正则表达式,${xxx}\n if (paramNames && typeof paramNames === 'string') {\n const matchs = regex.exec(paramNames);\n if (matchs?.[1]) {\n paramNameList = matchs?.[1]?.split('.');\n }\n }\n\n // 如果替换不成功,需要返回字符串原始的值\n return paramNameList.length > 0\n ? loopNodeByParamsPath(paramNameList, data) || ''\n : paramNames;\n};\n\n\n/**\n * 提供给事件参数转换那边的方法\n * 和replaceParamsValue 区别,\n * 1、不能去掉pageParams那一层\n * 2、字符串拼对象,需要把对象做JSON.stringify转换\n * 3、如果替换不成功,需要返回字符串原始的值\n * @param contentStr \"你好\" ,\"你$好, ${pageParams.userName}\" , \"${pageData}, ${pageParams.userList[0]}\"\n * @param data 数据\n */\nexport const replaceParamsValueForEvent = (\n contentStr: string,\n data: { [key: string]: any } = {},\n) => {\n if (!contentStr || !data || Object.keys(data)?.length <= 0) {\n return undefined;\n }\n\n const valueArr = splitStringWithTemplateLiteral(contentStr);\n // 单个字符串, 没有拼接\n if (valueArr.length === 1) {\n return getParamsContentByParamKeysForEvent(valueArr[0], data);\n }\n\n\n let nowTemp = '';\n if (typeof contentStr === 'string' && contentStr && data) {\n nowTemp = contentStr.replace(/\\$\\{(.+?)\\}/g, (match) => {\n const filedVal = getParamsContentByParamKeysForEvent(match, data);\n if (typeof filedVal === 'string') {\n return filedVal;\n }\n // 字符串拼对象,需要把对象做JSON.stringify转换\n try {\n return JSON.stringify(filedVal);\n } catch {\n return '';\n }\n });\n }\n return nowTemp;\n};\n\n/** ======上面几个方法主要提供给事件参数使用 勿共用 ===== */\n"],"mappings":";;;;AAAA,SAASA,GAAG,EAAEC,SAAS,QAAQ,QAAQ;AACvC,OAAOC,YAAY;AAEnB,OAAO,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,OAAe,EAAK;EAC7C,IAAIC,QAAiB,GAAG,EAAE;EAC1B,IAAID,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAAA,IAAAE,OAAA,EAAAC,SAAA;IAC1C,IAAMC,WAAW,GAAG,qBAAqB,CAAC,CAAC;IAC3C,IAAMC,KAAK,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