@boteteam/utils 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/file.js +10 -1
- package/dist/cjs/file.js.map +2 -2
- package/dist/cjs/formatModule/formatModuleData.js +12 -0
- package/dist/cjs/formatModule/formatModuleData.js.map +2 -2
- package/dist/cjs/formatModule/helpers/formatChartsProps.d.ts +13 -0
- package/dist/cjs/formatModule/helpers/formatChartsProps.js +48 -0
- package/dist/cjs/formatModule/helpers/formatChartsProps.js.map +7 -0
- package/dist/cjs/formatModule/helpers/index.d.ts +2 -1
- package/dist/cjs/formatModule/helpers/index.js +3 -0
- package/dist/cjs/formatModule/helpers/index.js.map +3 -3
- package/dist/cjs/formatModule/helpers/stringPramarsValTransition.d.ts +1 -1
- package/dist/cjs/treeUtils.d.ts +1 -1
- package/dist/cjs/treeUtils.js +4 -1
- package/dist/cjs/treeUtils.js.map +2 -2
- package/dist/esm/file.js +10 -3
- package/dist/esm/file.js.map +1 -1
- package/dist/esm/formatModule/formatModuleData.js +10 -3
- package/dist/esm/formatModule/formatModuleData.js.map +1 -1
- package/dist/esm/formatModule/helpers/formatChartsProps.d.ts +13 -0
- package/dist/esm/formatModule/helpers/formatChartsProps.js +12 -0
- package/dist/esm/formatModule/helpers/formatChartsProps.js.map +1 -0
- package/dist/esm/formatModule/helpers/index.d.ts +2 -1
- package/dist/esm/formatModule/helpers/index.js +2 -1
- package/dist/esm/formatModule/helpers/index.js.map +1 -1
- package/dist/esm/formatModule/helpers/stringPramarsValTransition.d.ts +1 -1
- package/dist/esm/treeUtils.d.ts +1 -1
- package/dist/esm/treeUtils.js +5 -0
- package/dist/esm/treeUtils.js.map +1 -1
- package/dist/umd/index.min.js +1 -1
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -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,EA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Q,KAAK,WAAW,EAAE;QAC5B,IAAMgF,YAAW,GAAGrG,oBAAoB,CAAC;UACvC2E,OAAO,EAAA5D,aAAA;YACLqB,UAAU,EAAED;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","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","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 ...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 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,iBAAiB,EACjBC,gBAAgB,EAChBC,kBAAkB,EAClBC,0BAA0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
+
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,
|
|
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"}
|
package/dist/esm/treeUtils.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const replaceLoopBodyParamsValue: (contentStr: string, options: {
|
|
|
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 区别,
|
package/dist/esm/treeUtils.js
CHANGED
|
@@ -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;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,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,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,OAAO,CAAC;MAC5B,KAAAS,QAAA,GAAIH,MAAM,cAAAG,QAAA,eAANA,QAAA,CAAS,CAAC,CAAC,EAAE;QACfR,QAAQ,GAAGK,MAAM,CAAC,CAAC,CAAC,CAACE,KAAK,CAAC,GAAG,CAAC;MACjC;IACF;IACA,QAAAL,SAAA,GAAOF,QAAQ,cAAAE,SAAA,uBAARA,SAAA,CAAUO,MAAM,CAAC,UAACC,IAAI,EAAEC,GAAG;MAAA,OAAK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