@shjjs/visual-ui 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/commons/plugins/datasource/index.d.ts +1 -1
- package/es/commons/plugins/datasource/index.mjs +91 -86
- package/es/commons/plugins/datasource/sources/api.mjs +7 -7
- package/es/commons/plugins/datasource/sources/static.mjs +4 -4
- package/es/commons/plugins/datasource/sources/storage.mjs +8 -8
- package/es/commons/plugins/datasource/sources/url.mjs +4 -4
- package/es/commons/plugins/datasource/sources/variable.mjs +9 -9
- package/es/commons/plugins/datasource/sources/ws.mjs +8 -7
- package/es/commons/plugins/datasource/utils/utils.d.ts +1 -1
- package/es/commons/plugins/datasource/utils/utils.mjs +17 -17
- package/es/commons/plugins/event/actions/invokeAction.mjs +1 -1
- package/es/components/chart/commons/components/common-chart/hooks/useCommonChart.mjs +8 -19
- package/es/components/chart/commons/components/common-chart/index.vue.mjs +35 -24
- package/es/components/chart/commons/components/common-chart-map/hooks/useCommonChart.mjs +8 -19
- package/es/components/chart/commons/components/common-chart-map/index.vue.mjs +35 -24
- package/es/components/chart/commons/hooks/useChart.mjs +66 -51
- package/es/components/chart/components/bar/animation/index.d.ts +1 -0
- package/es/components/chart/components/bar/animation/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/animation/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/basic/index.d.ts +1 -0
- package/es/components/chart/components/bar/basic/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/basic/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/contrast/index.d.ts +1 -0
- package/es/components/chart/components/bar/contrast/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/contrast/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/contrast2/index.d.ts +1 -0
- package/es/components/chart/components/bar/contrast2/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/contrast2/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/contrast3/index.d.ts +1 -0
- package/es/components/chart/components/bar/contrast3/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/contrast3/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/gradient-column-chart/index.d.ts +1 -0
- package/es/components/chart/components/bar/gradient-column-chart/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/gradient-column-chart/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/horizontal/index.d.ts +1 -0
- package/es/components/chart/components/bar/horizontal/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/horizontal/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/horizontal-stack/index.d.ts +1 -0
- package/es/components/chart/components/bar/horizontal-stack/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/horizontal-stack/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/line-bar/index.d.ts +1 -0
- package/es/components/chart/components/bar/line-bar/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/line-bar/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/line-bar2/index.d.ts +1 -0
- package/es/components/chart/components/bar/line-bar2/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/line-bar2/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/loop/index.d.ts +1 -0
- package/es/components/chart/components/bar/loop/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/loop/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/mini/index.d.ts +1 -0
- package/es/components/chart/components/bar/mini/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/mini/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/polar/index.d.ts +1 -0
- package/es/components/chart/components/bar/polar/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/polar/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/polar-stack/index.d.ts +1 -0
- package/es/components/chart/components/bar/polar-stack/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/polar-stack/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/polar2/index.d.ts +1 -0
- package/es/components/chart/components/bar/polar2/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/polar2/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/radius-circle/index.d.ts +1 -0
- package/es/components/chart/components/bar/radius-circle/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/radius-circle/index.vue.mjs +26 -6
- package/es/components/chart/components/bar/rank/index.d.ts +1 -0
- package/es/components/chart/components/bar/rank/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/rank/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/segmented-progress/index.d.ts +1 -0
- package/es/components/chart/components/bar/segmented-progress/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/segmented-progress/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/spire/index.d.ts +1 -0
- package/es/components/chart/components/bar/spire/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/spire/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/stack/index.d.ts +1 -0
- package/es/components/chart/components/bar/stack/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/stack/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/stack-line/index.d.ts +1 -0
- package/es/components/chart/components/bar/stack-line/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/stack-line/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/stack2/index.d.ts +1 -0
- package/es/components/chart/components/bar/stack2/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/stack2/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/stack3/index.d.ts +1 -0
- package/es/components/chart/components/bar/stack3/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/stack3/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/staggered/index.d.ts +1 -0
- package/es/components/chart/components/bar/staggered/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/staggered/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/three/index.d.ts +1 -0
- package/es/components/chart/components/bar/three/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/three/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/waterfall/index.d.ts +1 -0
- package/es/components/chart/components/bar/waterfall/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/waterfall/index.vue.mjs +27 -7
- package/es/components/chart/components/bar/zebra/index.d.ts +1 -0
- package/es/components/chart/components/bar/zebra/index.vue.d.ts +1 -0
- package/es/components/chart/components/bar/zebra/index.vue.mjs +27 -7
- package/es/components/chart/components/line/area-gradient/index.d.ts +1 -0
- package/es/components/chart/components/line/area-gradient/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/area-gradient/index.vue.mjs +27 -7
- package/es/components/chart/components/line/area-highlight/index.d.ts +1 -0
- package/es/components/chart/components/line/area-highlight/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/area-highlight/index.vue.mjs +26 -6
- package/es/components/chart/components/line/area-highlight2/index.d.ts +1 -0
- package/es/components/chart/components/line/area-highlight2/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/area-highlight2/index.vue.mjs +26 -6
- package/es/components/chart/components/line/basic/index.d.ts +1 -0
- package/es/components/chart/components/line/basic/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/basic/index.vue.mjs +27 -7
- package/es/components/chart/components/line/bump/index.d.ts +1 -0
- package/es/components/chart/components/line/bump/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/bump/index.vue.mjs +27 -7
- package/es/components/chart/components/line/dashed/index.d.ts +1 -0
- package/es/components/chart/components/line/dashed/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/dashed/index.vue.mjs +27 -7
- package/es/components/chart/components/line/ladder/index.d.ts +1 -0
- package/es/components/chart/components/line/ladder/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/ladder/index.vue.mjs +27 -7
- package/es/components/chart/components/line/logarithm/index.d.ts +1 -0
- package/es/components/chart/components/line/logarithm/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/logarithm/index.vue.mjs +27 -7
- package/es/components/chart/components/line/multix/index.d.ts +1 -0
- package/es/components/chart/components/line/multix/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/multix/index.vue.mjs +27 -7
- package/es/components/chart/components/line/polar-double/index.d.ts +1 -0
- package/es/components/chart/components/line/polar-double/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/polar-double/index.vue.mjs +27 -7
- package/es/components/chart/components/line/rain-flow/index.d.ts +1 -0
- package/es/components/chart/components/line/rain-flow/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/rain-flow/index.vue.mjs +27 -7
- package/es/components/chart/components/line/scale/index.d.ts +1 -0
- package/es/components/chart/components/line/scale/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/scale/index.vue.mjs +27 -7
- package/es/components/chart/components/line/smooth/index.d.ts +1 -0
- package/es/components/chart/components/line/smooth/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/smooth/index.vue.mjs +27 -7
- package/es/components/chart/components/line/smooth-area/index.d.ts +1 -0
- package/es/components/chart/components/line/smooth-area/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/smooth-area/index.vue.mjs +27 -7
- package/es/components/chart/components/line/stack/index.d.ts +1 -0
- package/es/components/chart/components/line/stack/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/stack/index.vue.mjs +27 -7
- package/es/components/chart/components/line/stack-area/index.d.ts +1 -0
- package/es/components/chart/components/line/stack-area/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/stack-area/index.vue.mjs +27 -7
- package/es/components/chart/components/line/temp/index.d.ts +1 -0
- package/es/components/chart/components/line/temp/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/temp/index.vue.mjs +27 -7
- package/es/components/chart/components/line/vertical/index.d.ts +1 -0
- package/es/components/chart/components/line/vertical/index.vue.d.ts +1 -0
- package/es/components/chart/components/line/vertical/index.vue.mjs +27 -7
- package/es/components/chart/components/map/basic/index.d.ts +1 -0
- package/es/components/chart/components/map/basic/index.vue.d.ts +1 -0
- package/es/components/chart/components/map/basic/index.vue.mjs +27 -7
- package/es/components/chart/components/map/bmap-basic/index.d.ts +1 -0
- package/es/components/chart/components/map/bmap-basic/index.vue.d.ts +1 -0
- package/es/components/chart/components/map/bmap-basic/index.vue.mjs +27 -7
- package/es/components/chart/components/map/bmap-heatmap/index.d.ts +1 -0
- package/es/components/chart/components/map/bmap-heatmap/index.vue.d.ts +1 -0
- package/es/components/chart/components/map/bmap-heatmap/index.vue.mjs +27 -7
- package/es/components/chart/components/map/bmap-rich/index.d.ts +1 -0
- package/es/components/chart/components/map/bmap-rich/index.vue.d.ts +3 -6
- package/es/components/chart/components/map/bmap-rich/index.vue.mjs +27 -7
- package/es/components/chart/components/map/customize/index.d.ts +1 -0
- package/es/components/chart/components/map/customize/index.vue.d.ts +3 -6
- package/es/components/chart/components/map/customize/index.vue.mjs +27 -7
- package/es/components/chart/components/map/lines/index.d.ts +1 -0
- package/es/components/chart/components/map/lines/index.vue.d.ts +1 -0
- package/es/components/chart/components/map/lines/index.vue.mjs +27 -7
- package/es/components/chart/components/map/scatter/index.d.ts +1 -0
- package/es/components/chart/components/map/scatter/index.vue.d.ts +1 -0
- package/es/components/chart/components/map/scatter/index.vue.mjs +27 -7
- package/es/components/chart/components/pie/3d/index.d.ts +1 -0
- package/es/components/chart/components/pie/3d/index.vue.d.ts +7 -6
- package/es/components/chart/components/pie/3d/index.vue.mjs +32 -13
- package/es/components/chart/components/pie/basic/index.d.ts +1 -0
- package/es/components/chart/components/pie/basic/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/basic/index.vue.mjs +26 -6
- package/es/components/chart/components/pie/basic2/index.d.ts +1 -0
- package/es/components/chart/components/pie/basic2/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/basic2/index.vue.mjs +26 -6
- package/es/components/chart/components/pie/customized/index.d.ts +1 -0
- package/es/components/chart/components/pie/customized/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/customized/index.vue.mjs +27 -7
- package/es/components/chart/components/pie/index/index.d.ts +1 -0
- package/es/components/chart/components/pie/index/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/index/index.vue.mjs +31 -12
- package/es/components/chart/components/pie/interval/index.d.ts +1 -0
- package/es/components/chart/components/pie/interval/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/interval/index.vue.mjs +27 -7
- package/es/components/chart/components/pie/legend-scroll/index.d.ts +1 -0
- package/es/components/chart/components/pie/legend-scroll/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/legend-scroll/index.vue.mjs +27 -7
- package/es/components/chart/components/pie/radius/index.d.ts +1 -0
- package/es/components/chart/components/pie/radius/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/radius/index.vue.mjs +26 -6
- package/es/components/chart/components/pie/rose/index.d.ts +1 -0
- package/es/components/chart/components/pie/rose/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/rose/index.vue.mjs +27 -7
- package/es/components/chart/components/pie/round/index.d.ts +1 -0
- package/es/components/chart/components/pie/round/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/round/index.vue.mjs +27 -7
- package/es/components/chart/components/pie/sunburst/index.d.ts +1 -0
- package/es/components/chart/components/pie/sunburst/index.vue.d.ts +1 -0
- package/es/components/chart/components/pie/sunburst/index.vue.mjs +27 -7
- package/es/components/commons-product-model/index.vue.mjs +1 -1
- package/es/components/commons-product-model/index.vue2.mjs +23 -23
- package/es/components/commons-three-loader/index.vue.mjs +1 -1
- package/es/components/commons-three-loader/index.vue2.mjs +54 -50
- package/es/components/commons-three-loader3/index.vue.mjs +1 -1
- package/es/components/commons-three-loader3/index.vue2.mjs +3 -3
- package/es/components/interaction/tabs/hooks/useTabsWatch.mjs +21 -7
- package/es/components/interaction/tabs/index.vue.mjs +16 -16
- package/es/components/interaction/tabs/types.d.ts +3 -0
- package/es/components/interaction-input/index.vue.mjs +2 -2
- package/es/components/scene-amap2d/index.vue.mjs +1 -1
- package/es/components/scene-amap2d/index.vue2.mjs +102 -96
- package/es/components/scene-amap3d/index.vue.mjs +2 -2
- package/es/components/scene-amap3d/index.vue2.mjs +64 -58
- package/es/widgets.css +1 -1
- package/lib/commons/plugins/datasource/index.js +2 -2
- package/lib/commons/plugins/datasource/sources/api.js +1 -1
- package/lib/commons/plugins/datasource/sources/static.js +1 -1
- package/lib/commons/plugins/datasource/sources/storage.js +1 -1
- package/lib/commons/plugins/datasource/sources/url.js +1 -1
- package/lib/commons/plugins/datasource/sources/variable.js +1 -1
- package/lib/commons/plugins/datasource/sources/ws.js +1 -1
- package/lib/commons/plugins/datasource/utils/utils.js +1 -1
- package/lib/commons/plugins/event/actions/invokeAction.js +1 -1
- package/lib/components/chart/commons/components/common-chart/hooks/useCommonChart.js +1 -1
- package/lib/components/chart/commons/components/common-chart/index.vue.js +1 -1
- package/lib/components/chart/commons/components/common-chart-map/hooks/useCommonChart.js +1 -1
- package/lib/components/chart/commons/components/common-chart-map/index.vue.js +1 -1
- package/lib/components/chart/commons/hooks/useChart.js +6 -1
- package/lib/components/chart/components/bar/animation/index.vue.js +1 -1
- package/lib/components/chart/components/bar/basic/index.vue.js +1 -1
- package/lib/components/chart/components/bar/contrast/index.vue.js +1 -1
- package/lib/components/chart/components/bar/contrast2/index.vue.js +1 -1
- package/lib/components/chart/components/bar/contrast3/index.vue.js +1 -1
- package/lib/components/chart/components/bar/gradient-column-chart/index.vue.js +1 -1
- package/lib/components/chart/components/bar/horizontal/index.vue.js +1 -1
- package/lib/components/chart/components/bar/horizontal-stack/index.vue.js +1 -1
- package/lib/components/chart/components/bar/line-bar/index.vue.js +1 -1
- package/lib/components/chart/components/bar/line-bar2/index.vue.js +1 -1
- package/lib/components/chart/components/bar/loop/index.vue.js +1 -1
- package/lib/components/chart/components/bar/mini/index.vue.js +1 -1
- package/lib/components/chart/components/bar/polar/index.vue.js +1 -1
- package/lib/components/chart/components/bar/polar-stack/index.vue.js +1 -1
- package/lib/components/chart/components/bar/polar2/index.vue.js +1 -1
- package/lib/components/chart/components/bar/radius-circle/index.vue.js +1 -1
- package/lib/components/chart/components/bar/rank/index.vue.js +1 -1
- package/lib/components/chart/components/bar/segmented-progress/index.vue.js +1 -1
- package/lib/components/chart/components/bar/spire/index.vue.js +1 -1
- package/lib/components/chart/components/bar/stack/index.vue.js +1 -1
- package/lib/components/chart/components/bar/stack-line/index.vue.js +1 -1
- package/lib/components/chart/components/bar/stack2/index.vue.js +1 -1
- package/lib/components/chart/components/bar/stack3/index.vue.js +1 -1
- package/lib/components/chart/components/bar/staggered/index.vue.js +1 -1
- package/lib/components/chart/components/bar/three/index.vue.js +1 -1
- package/lib/components/chart/components/bar/waterfall/index.vue.js +1 -1
- package/lib/components/chart/components/bar/zebra/index.vue.js +1 -1
- package/lib/components/chart/components/line/area-gradient/index.vue.js +1 -1
- package/lib/components/chart/components/line/area-highlight/index.vue.js +1 -1
- package/lib/components/chart/components/line/area-highlight2/index.vue.js +1 -1
- package/lib/components/chart/components/line/basic/index.vue.js +1 -1
- package/lib/components/chart/components/line/bump/index.vue.js +1 -1
- package/lib/components/chart/components/line/dashed/index.vue.js +1 -1
- package/lib/components/chart/components/line/ladder/index.vue.js +1 -1
- package/lib/components/chart/components/line/logarithm/index.vue.js +1 -1
- package/lib/components/chart/components/line/multix/index.vue.js +1 -1
- package/lib/components/chart/components/line/polar-double/index.vue.js +1 -1
- package/lib/components/chart/components/line/rain-flow/index.vue.js +1 -1
- package/lib/components/chart/components/line/scale/index.vue.js +1 -1
- package/lib/components/chart/components/line/smooth/index.vue.js +1 -1
- package/lib/components/chart/components/line/smooth-area/index.vue.js +1 -1
- package/lib/components/chart/components/line/stack/index.vue.js +1 -1
- package/lib/components/chart/components/line/stack-area/index.vue.js +1 -1
- package/lib/components/chart/components/line/temp/index.vue.js +1 -1
- package/lib/components/chart/components/line/vertical/index.vue.js +1 -1
- package/lib/components/chart/components/map/basic/index.vue.js +1 -1
- package/lib/components/chart/components/map/bmap-basic/index.vue.js +1 -1
- package/lib/components/chart/components/map/bmap-heatmap/index.vue.js +1 -1
- package/lib/components/chart/components/map/bmap-rich/index.vue.js +1 -1
- package/lib/components/chart/components/map/customize/index.vue.js +1 -1
- package/lib/components/chart/components/map/lines/index.vue.js +1 -1
- package/lib/components/chart/components/map/scatter/index.vue.js +1 -1
- package/lib/components/chart/components/pie/3d/index.vue.js +1 -1
- package/lib/components/chart/components/pie/basic/index.vue.js +1 -1
- package/lib/components/chart/components/pie/basic2/index.vue.js +1 -1
- package/lib/components/chart/components/pie/customized/index.vue.js +1 -1
- package/lib/components/chart/components/pie/index/index.vue.js +1 -1
- package/lib/components/chart/components/pie/interval/index.vue.js +1 -1
- package/lib/components/chart/components/pie/legend-scroll/index.vue.js +1 -1
- package/lib/components/chart/components/pie/radius/index.vue.js +1 -1
- package/lib/components/chart/components/pie/rose/index.vue.js +1 -1
- package/lib/components/chart/components/pie/round/index.vue.js +1 -1
- package/lib/components/chart/components/pie/sunburst/index.vue.js +1 -1
- package/lib/components/commons-product-model/index.vue.js +1 -1
- package/lib/components/commons-product-model/index.vue2.js +1 -1
- package/lib/components/commons-three-loader/index.vue.js +1 -1
- package/lib/components/commons-three-loader/index.vue2.js +1 -1
- package/lib/components/commons-three-loader3/index.vue.js +1 -1
- package/lib/components/commons-three-loader3/index.vue2.js +1 -1
- package/lib/components/interaction/tabs/hooks/useTabsWatch.js +1 -1
- package/lib/components/interaction/tabs/index.vue.js +1 -1
- package/lib/components/interaction-input/index.vue.js +1 -1
- package/lib/components/scene-amap2d/index.vue.js +1 -1
- package/lib/components/scene-amap2d/index.vue2.js +1 -1
- package/lib/components/scene-amap3d/index.vue.js +1 -1
- package/lib/components/scene-amap3d/index.vue2.js +4 -4
- package/lib/widgets.css +1 -1
- package/package.json +1 -1
|
@@ -52,7 +52,7 @@ export declare class SHJDatasourceV2 {
|
|
|
52
52
|
* @param noUseMapping 是否不使用映射
|
|
53
53
|
* @returns
|
|
54
54
|
*/
|
|
55
|
-
static processData(filter: any, data: any, mappings: any[], id: string, dynamicMapping?: boolean, noUseMapping?: boolean): Promise<unknown>;
|
|
55
|
+
static processData(filter: any, data: any, mappings: any[], id: string, dynamicMapping?: boolean, noUseMapping?: boolean, isUserdata?: boolean): Promise<unknown>;
|
|
56
56
|
/**
|
|
57
57
|
* 解析数据为Key、Data格式
|
|
58
58
|
* @param data 数据
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { isArray as
|
|
5
|
-
import { parseStaticData as
|
|
6
|
-
import { parseUrlData as
|
|
7
|
-
import { parseVariableData as
|
|
8
|
-
import { parseAPIPort as
|
|
9
|
-
import { parseWebSocket as
|
|
10
|
-
import { DataSourceUtils as
|
|
11
|
-
import { parseStorage as
|
|
12
|
-
const
|
|
1
|
+
var K = Object.defineProperty;
|
|
2
|
+
var b = (w, t, a) => t in w ? K(w, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : w[t] = a;
|
|
3
|
+
var I = (w, t, a) => b(w, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
import { isArray as F, isString as j, cloneDeep as P } from "lodash";
|
|
5
|
+
import { parseStaticData as E } from "./sources/static.mjs";
|
|
6
|
+
import { parseUrlData as U } from "./sources/url.mjs";
|
|
7
|
+
import { parseVariableData as W } from "./sources/variable.mjs";
|
|
8
|
+
import { parseAPIPort as $ } from "./sources/api.mjs";
|
|
9
|
+
import { parseWebSocket as N } from "./sources/ws.mjs";
|
|
10
|
+
import { DataSourceUtils as T } from "./utils/utils.mjs";
|
|
11
|
+
import { parseStorage as O } from "./sources/storage.mjs";
|
|
12
|
+
const D = class D {
|
|
13
13
|
static addParser(t, a) {
|
|
14
14
|
this.parsers.add({ type: t, parser: a });
|
|
15
15
|
}
|
|
@@ -27,42 +27,47 @@ const y = class y {
|
|
|
27
27
|
* @param isInterval 是否开启定时任务
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
static parse({ sources: t, callback: a, tId: e, isStore:
|
|
30
|
+
static parse({ sources: t, callback: a, tId: e, isStore: r = !1, noUseMapping: i = !1, isInterval: n = !0 }) {
|
|
31
31
|
return a ?? (a = () => {
|
|
32
|
-
}), t &&
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
t.forEach((
|
|
36
|
-
var
|
|
32
|
+
}), t && F(t) && t.length > 0 && t[0] ? new Promise((p, o) => {
|
|
33
|
+
T.cleanupPreviousWebSockets(this.wsInstances, t.map((s) => s.id), e);
|
|
34
|
+
const u = /* @__PURE__ */ new Set(), l = this.wsInstances.get(e) || /* @__PURE__ */ new Set();
|
|
35
|
+
t.forEach((s) => {
|
|
36
|
+
var d;
|
|
37
37
|
if (n) {
|
|
38
|
-
const { source:
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
const { source: f } = s;
|
|
39
|
+
if (!f) {
|
|
40
|
+
a([]), p([]);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const h = `${e}-${s.id}`, m = this.datasourceTimer.findIndex((S) => S.id === h);
|
|
44
|
+
if (m !== -1 && (clearInterval(this.datasourceTimer[m].timer), this.datasourceTimer.splice(m, 1)), f.isAutoUpdate) {
|
|
45
|
+
const S = setInterval(() => {
|
|
46
|
+
var y;
|
|
47
|
+
(y = this.task(s, r, i, e, (c) => {
|
|
48
|
+
a(c);
|
|
49
|
+
})) == null || y.then((c) => {
|
|
50
|
+
p(c);
|
|
46
51
|
});
|
|
47
|
-
},
|
|
48
|
-
this.datasourceTimer.push({ id:
|
|
52
|
+
}, f.autoUpdateTime * 1e3);
|
|
53
|
+
this.datasourceTimer.push({ id: h, timer: S });
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
|
-
if (
|
|
52
|
-
(
|
|
56
|
+
if (s.source.type !== "ws") {
|
|
57
|
+
(d = this.task(s, r, i, e, (f) => a(f))) == null || d.then((f) => p(f));
|
|
53
58
|
return;
|
|
54
59
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
if (T.hasValidWebSocket(this.wsInstances, e, s.id))
|
|
61
|
+
l.forEach((f) => {
|
|
62
|
+
f.getId() === s.id && u.add(f);
|
|
58
63
|
});
|
|
59
64
|
else {
|
|
60
|
-
const
|
|
61
|
-
p(
|
|
65
|
+
const f = N(s, s.id, i, e, (h) => {
|
|
66
|
+
p(h), a({ data: [{ data: h.finalUserData.data }] }), this.taskStorage(t, h.rawData.data);
|
|
62
67
|
});
|
|
63
|
-
|
|
68
|
+
u.add(f);
|
|
64
69
|
}
|
|
65
|
-
}),
|
|
70
|
+
}), u.size > 0 && this.wsInstances.set(e, u);
|
|
66
71
|
}) : (a([]), Promise.resolve([]));
|
|
67
72
|
}
|
|
68
73
|
/**
|
|
@@ -74,13 +79,13 @@ const y = class y {
|
|
|
74
79
|
* @param callback 回调函数
|
|
75
80
|
* @returns
|
|
76
81
|
*/
|
|
77
|
-
static task(t, a = !1, e = !1,
|
|
82
|
+
static task(t, a = !1, e = !1, r, i = () => {
|
|
78
83
|
}) {
|
|
79
84
|
return t ? new Promise((n, p) => {
|
|
80
85
|
let o = null;
|
|
81
|
-
const { source:
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
const { source: u } = t, l = this.getParser(u.type);
|
|
87
|
+
l && (o = l(t, t.id, e)), o.then((s) => {
|
|
88
|
+
this.taskStorage(t, s.rawData.data), n(s), e && i(s.noMappingData), e || i(s.finalKeyData);
|
|
84
89
|
});
|
|
85
90
|
}) : (i([]), Promise.resolve([]));
|
|
86
91
|
}
|
|
@@ -91,17 +96,17 @@ const y = class y {
|
|
|
91
96
|
* @returns
|
|
92
97
|
*/
|
|
93
98
|
static filterData(t, a) {
|
|
94
|
-
return new Promise((e,
|
|
95
|
-
if (
|
|
99
|
+
return new Promise((e, r) => {
|
|
100
|
+
if (j(t)) {
|
|
96
101
|
try {
|
|
97
|
-
const i =
|
|
102
|
+
const i = T.getVariableData();
|
|
98
103
|
let n = `
|
|
99
104
|
${t}
|
|
100
105
|
|
|
101
106
|
// 在这里调用 filter 函数,并传递 data 参数
|
|
102
107
|
return filter(data);
|
|
103
108
|
`;
|
|
104
|
-
n = n.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, ""), n =
|
|
109
|
+
n = n.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, ""), n = T.replaceStringVariables(n, i);
|
|
105
110
|
const p = new Function("data", n);
|
|
106
111
|
e(p(a));
|
|
107
112
|
} catch {
|
|
@@ -122,43 +127,43 @@ const y = class y {
|
|
|
122
127
|
* @param noUseMapping 是否不使用映射
|
|
123
128
|
* @returns
|
|
124
129
|
*/
|
|
125
|
-
static processData(t, a, e,
|
|
126
|
-
return new Promise(function(
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
+
static processData(t, a, e, r, i, n, p) {
|
|
131
|
+
return new Promise(function(o) {
|
|
132
|
+
const u = P({ id: r, data: a });
|
|
133
|
+
D.filterData(t, a).then((l) => {
|
|
134
|
+
const s = P({ id: r, data: l });
|
|
130
135
|
if (n)
|
|
131
|
-
|
|
132
|
-
id:
|
|
136
|
+
o({
|
|
137
|
+
id: r,
|
|
133
138
|
finalKeyData: [],
|
|
134
|
-
finalUserData: { id:
|
|
135
|
-
filteredData:
|
|
136
|
-
rawData:
|
|
137
|
-
noMappingData:
|
|
139
|
+
finalUserData: { id: r, data: l },
|
|
140
|
+
filteredData: s,
|
|
141
|
+
rawData: u,
|
|
142
|
+
noMappingData: l
|
|
138
143
|
});
|
|
139
144
|
else {
|
|
140
|
-
let
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
if (i && i &&
|
|
144
|
-
const
|
|
145
|
-
for (const
|
|
146
|
-
const
|
|
147
|
-
|
|
145
|
+
let d = [];
|
|
146
|
+
F(l) && (d = l.map((m, S) => {
|
|
147
|
+
const y = {};
|
|
148
|
+
if (i && i && S === 0) {
|
|
149
|
+
const c = [];
|
|
150
|
+
for (const g in m) {
|
|
151
|
+
const k = e.find((A) => A.name === g);
|
|
152
|
+
k ? c.push({ alias: k.alias, name: g, type: "any", label: g, mapping: k.mapping, status: !0 }) : c.push({ alias: g, name: g, type: "any", label: g, mapping: g, status: !0 });
|
|
148
153
|
}
|
|
149
|
-
e.splice(0, e.length), e.push(...
|
|
154
|
+
e.splice(0, e.length), e.push(...c);
|
|
150
155
|
}
|
|
151
|
-
return e.forEach((
|
|
152
|
-
|
|
153
|
-
}), m;
|
|
156
|
+
return e.forEach((c) => {
|
|
157
|
+
c.alias ? y[c.alias] = m[c.mapping] : y[c.name] = m[c.mapping];
|
|
158
|
+
}), p && (y.userdata = m), y;
|
|
154
159
|
}));
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
id:
|
|
158
|
-
finalKeyData:
|
|
159
|
-
finalUserData:
|
|
160
|
-
filteredData:
|
|
161
|
-
rawData:
|
|
160
|
+
const f = P({ id: r, data: d }), h = P({ id: r, data: D.parseMappedData(d, e, r) });
|
|
161
|
+
o({
|
|
162
|
+
id: r,
|
|
163
|
+
finalKeyData: d.length === 0 ? { id: r, data: l } : h,
|
|
164
|
+
finalUserData: d.length === 0 ? { id: r, data: l } : f,
|
|
165
|
+
filteredData: s,
|
|
166
|
+
rawData: u,
|
|
162
167
|
noMappingData: []
|
|
163
168
|
});
|
|
164
169
|
}
|
|
@@ -174,11 +179,11 @@ const y = class y {
|
|
|
174
179
|
*/
|
|
175
180
|
static parseMappedData(t, a, e) {
|
|
176
181
|
return t.reduce(
|
|
177
|
-
(
|
|
182
|
+
(r, i) => {
|
|
178
183
|
let n = "系列一";
|
|
179
184
|
a && a.find((o) => o.name === "series") && (n = i[a.find((o) => o.name === "series").name], delete i[a.find((o) => o.name === "series").name]);
|
|
180
|
-
const p =
|
|
181
|
-
return p ? p.data.push(i) :
|
|
185
|
+
const p = r.find((o) => o.key === n);
|
|
186
|
+
return p ? p.data.push(i) : r.push({ key: n, data: [i] }), r;
|
|
182
187
|
},
|
|
183
188
|
[]
|
|
184
189
|
);
|
|
@@ -193,14 +198,14 @@ const y = class y {
|
|
|
193
198
|
e.storage && e.storage.setField && e.storage.setType !== 0 && (e.storage.setType === 1 && localStorage.setItem("Local_" + e.storage.setField, JSON.stringify(a)), e.storage.setType === 2 && sessionStorage.setItem("Session_" + e.storage.setField, JSON.stringify(a)));
|
|
194
199
|
}
|
|
195
200
|
};
|
|
196
|
-
|
|
197
|
-
{ type: "url", parser:
|
|
198
|
-
{ type: "static", parser:
|
|
199
|
-
{ type: "variable", parser:
|
|
200
|
-
{ type: "api", parser:
|
|
201
|
-
{ type: "storage", parser:
|
|
201
|
+
I(D, "wsInstances", /* @__PURE__ */ new Map()), I(D, "datasourceTimer", []), I(D, "parsers", /* @__PURE__ */ new Set([
|
|
202
|
+
{ type: "url", parser: U },
|
|
203
|
+
{ type: "static", parser: E },
|
|
204
|
+
{ type: "variable", parser: W },
|
|
205
|
+
{ type: "api", parser: $ },
|
|
206
|
+
{ type: "storage", parser: O }
|
|
202
207
|
]));
|
|
203
|
-
let
|
|
208
|
+
let x = D;
|
|
204
209
|
export {
|
|
205
|
-
|
|
210
|
+
x as SHJDatasourceV2
|
|
206
211
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SHJDatasourceV2 as
|
|
2
|
-
import { httpRequest as
|
|
1
|
+
import { SHJDatasourceV2 as U } from "../index.mjs";
|
|
2
|
+
import { httpRequest as p } from "../utils/request.mjs";
|
|
3
3
|
import { DataSourceUtils as t } from "../utils/utils.mjs";
|
|
4
|
-
const q = (f, e, y) => new Promise(function(r,
|
|
4
|
+
const q = (f, e, y) => new Promise(function(r, j) {
|
|
5
5
|
const { api: n } = f.source;
|
|
6
6
|
try {
|
|
7
7
|
if (n) {
|
|
@@ -9,8 +9,8 @@ const q = (f, e, y) => new Promise(function(r, U) {
|
|
|
9
9
|
const E = t.getEnvironments(), l = t.getVariableData(), i = (P) => {
|
|
10
10
|
P.then((D) => {
|
|
11
11
|
if (D.status === 200) {
|
|
12
|
-
const { filter: V, mapping: g } = f.source;
|
|
13
|
-
|
|
12
|
+
const { filter: V, mapping: g, isUserdata: T } = f.source;
|
|
13
|
+
U.processData(V, D.data, g, e, f.source.dynamicMapping, y, T).then((b) => {
|
|
14
14
|
b && r(b);
|
|
15
15
|
}).catch(() => r(t.noneData(e)));
|
|
16
16
|
return;
|
|
@@ -19,8 +19,8 @@ const q = (f, e, y) => new Promise(function(r, U) {
|
|
|
19
19
|
}).catch(() => {
|
|
20
20
|
r(t.noneData(e));
|
|
21
21
|
});
|
|
22
|
-
},
|
|
23
|
-
a = t.replaceURLVariables(a, l), h && (o = t.replaceObjectVariables(o, l)), m && (c = t.replaceObjectVariables(c, l)), n.type === "GET" && i(
|
|
22
|
+
}, s = t.replaceEnvVariables(a, E);
|
|
23
|
+
a = t.replaceURLVariables(a, l), h && (o = t.replaceObjectVariables(o, l)), m && (c = t.replaceObjectVariables(c, l)), n.type === "GET" && i(p.get(s + a, { headers: c })), n.type === "POST" && i(p.post(s + a, o, { headers: c }, u)), n.type === "PUT" && i(p.put(s + a, o, { headers: c }, u)), n.type === "DELETE" && i(p.delete(s + a, { headers: c }));
|
|
24
24
|
} else
|
|
25
25
|
r(t.noneData(e));
|
|
26
26
|
} catch {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SHJDatasourceV2 as
|
|
1
|
+
import { SHJDatasourceV2 as i } from "../index.mjs";
|
|
2
2
|
import { DataSourceUtils as n } from "../utils/utils.mjs";
|
|
3
|
-
const m = (t, a, c) => new Promise(function(r,
|
|
3
|
+
const m = (t, a, c) => new Promise(function(r, o) {
|
|
4
4
|
if (t.source.static !== void 0) {
|
|
5
|
-
|
|
6
|
-
r(
|
|
5
|
+
i.processData(t.source.filter, t.source.static, t.source.mapping, a, t.source.dynamicMapping, c, t.source.isUserdata).then((e) => {
|
|
6
|
+
r(e);
|
|
7
7
|
}).catch(() => {
|
|
8
8
|
r(n.noneData(a));
|
|
9
9
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SHJDatasourceV2 as
|
|
1
|
+
import { SHJDatasourceV2 as m } from "../index.mjs";
|
|
2
2
|
import { DataSourceUtils as n } from "../utils/utils.mjs";
|
|
3
|
-
const
|
|
3
|
+
const l = (e, t, c) => new Promise(function(a, u) {
|
|
4
4
|
if (!e.source.storage) {
|
|
5
5
|
a(n.noneData(t));
|
|
6
6
|
return;
|
|
@@ -14,15 +14,15 @@ const S = (e, t, i) => new Promise(function(a, m) {
|
|
|
14
14
|
a(n.noneData(t));
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
let
|
|
18
|
-
o === 1 && (
|
|
19
|
-
const { filter:
|
|
20
|
-
|
|
21
|
-
a(
|
|
17
|
+
let s = null;
|
|
18
|
+
o === 1 && (s = localStorage.getItem("Local_" + r)), o === 2 && (s = sessionStorage.getItem("Session_" + r));
|
|
19
|
+
const { filter: i, mapping: g, isUserdata: p } = e.source;
|
|
20
|
+
m.processData(i, s, g, t, e.source.dynamicMapping, c, p).then((f) => {
|
|
21
|
+
a(f);
|
|
22
22
|
}).catch(() => {
|
|
23
23
|
a(n.noneData(t));
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
l as parseStorage
|
|
28
28
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { SHJDatasourceV2 as i } from "../index.mjs";
|
|
2
2
|
import { DataSourceUtils as n } from "../utils/utils.mjs";
|
|
3
|
-
const f = (
|
|
3
|
+
const f = (a, t, c) => new Promise(function(r, m) {
|
|
4
4
|
const o = new URLSearchParams(window.location.search), e = Object.fromEntries(o.entries());
|
|
5
5
|
if (Object.keys(e).length > 0) {
|
|
6
|
-
i.processData(
|
|
6
|
+
i.processData(a.source.filter, e, a.source.mapping, t, a.source.dynamicMapping, c, a.source.isUserdata).then((s) => {
|
|
7
7
|
r(s);
|
|
8
8
|
}).catch(() => {
|
|
9
|
-
r(n.noneData(
|
|
9
|
+
r(n.noneData(t));
|
|
10
10
|
});
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
|
-
r(n.noneData(
|
|
13
|
+
r(n.noneData(t));
|
|
14
14
|
});
|
|
15
15
|
export {
|
|
16
16
|
f as parseUrlData
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { SHJDatasourceV2 as c } from "../index.mjs";
|
|
2
2
|
import { DataSourceUtils as n } from "../utils/utils.mjs";
|
|
3
|
-
const
|
|
3
|
+
const m = (a, r, o) => new Promise(function(e, s) {
|
|
4
4
|
const i = n.getVariableData().find((t) => t.id === a.source.variableId || t.name === a.source.variableId);
|
|
5
|
-
if (i) {
|
|
6
|
-
|
|
7
|
-
e(t);
|
|
8
|
-
}).catch(() => {
|
|
9
|
-
e(n.noneData(r));
|
|
10
|
-
});
|
|
5
|
+
if (!i) {
|
|
6
|
+
e(n.noneData(r));
|
|
11
7
|
return;
|
|
12
8
|
}
|
|
13
|
-
|
|
9
|
+
c.processData(a.source.filter, i._value, a.source.mapping, r, a.source.dynamicMapping, o, a.source.isUserdata).then((t) => {
|
|
10
|
+
e(t);
|
|
11
|
+
}).catch(() => {
|
|
12
|
+
e(n.noneData(r));
|
|
13
|
+
});
|
|
14
14
|
});
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
m as parseVariableData
|
|
17
17
|
};
|
|
@@ -2,7 +2,7 @@ var p = Object.defineProperty;
|
|
|
2
2
|
var g = (c, t, e) => t in c ? p(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
|
|
3
3
|
var d = (c, t, e) => g(c, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { SHJDatasourceV2 as f } from "../index.mjs";
|
|
5
|
-
import { wsManager as
|
|
5
|
+
import { wsManager as u } from "../utils/wsManager.mjs";
|
|
6
6
|
import { DataSourceUtils as l } from "../utils/utils.mjs";
|
|
7
7
|
class w {
|
|
8
8
|
constructor(t, e, s, i, n, o) {
|
|
@@ -54,11 +54,11 @@ class w {
|
|
|
54
54
|
binaryType: s = "blob",
|
|
55
55
|
timeout: i = 3e4
|
|
56
56
|
} = this.config, n = e ? this.injectHeadersToUrl(t) : t, o = this.processProtocols();
|
|
57
|
-
|
|
57
|
+
u.closeByComponentIds(this.tId);
|
|
58
58
|
try {
|
|
59
|
-
this.ws = o.length > 0 ? new WebSocket(n, o) : new WebSocket(n), this.ws && (
|
|
60
|
-
var a,
|
|
61
|
-
((a = this.ws) == null ? void 0 : a.readyState) === WebSocket.CONNECTING && (this.ws.close(), (
|
|
59
|
+
this.ws = o.length > 0 ? new WebSocket(n, o) : new WebSocket(n), this.ws && (u.add(this.ws, this.tId), this.ws.binaryType = s, this.timeoutTimer = setTimeout(() => {
|
|
60
|
+
var a, m;
|
|
61
|
+
((a = this.ws) == null ? void 0 : a.readyState) === WebSocket.CONNECTING && (this.ws.close(), (m = this.onEvent) == null || m.call(this, "error", "Connection timeout"), this.handleClose({ code: 4001, reason: "Timeout" }));
|
|
62
62
|
}, i), this.ws.onopen = this.handleOpen.bind(this), this.ws.onmessage = this.handleMessage.bind(this), this.ws.onerror = this.handleError.bind(this), this.ws.onclose = this.handleClose.bind(this), (r = this.onEvent) == null || r.call(this, "connecting"));
|
|
63
63
|
} catch (a) {
|
|
64
64
|
(h = this.onEvent) == null || h.call(this, "error", a), this.scheduleReconnect();
|
|
@@ -91,7 +91,8 @@ class w {
|
|
|
91
91
|
this.source.source.mapping,
|
|
92
92
|
this.id,
|
|
93
93
|
this.source.source.dynamicMapping,
|
|
94
|
-
this.noUseMapping
|
|
94
|
+
this.noUseMapping,
|
|
95
|
+
this.source.source.isUserdata
|
|
95
96
|
);
|
|
96
97
|
(e = this.onData) == null || e.call(this, r), (s = this.onEvent) == null || s.call(this, "data", r);
|
|
97
98
|
} catch {
|
|
@@ -125,7 +126,7 @@ class w {
|
|
|
125
126
|
this.ws.send(e);
|
|
126
127
|
}
|
|
127
128
|
disconnect() {
|
|
128
|
-
this.isDisconnecting = !0, this.ws && (this.ws.close(1e3, "Manual close"), this.timeoutTimer && clearTimeout(this.timeoutTimer),
|
|
129
|
+
this.isDisconnecting = !0, this.ws && (this.ws.close(1e3, "Manual close"), this.timeoutTimer && clearTimeout(this.timeoutTimer), u.closeByComponentIds(this.tId));
|
|
129
130
|
}
|
|
130
131
|
getWebSocket() {
|
|
131
132
|
return this.ws;
|
|
@@ -90,7 +90,7 @@ export declare class DataSourceUtils {
|
|
|
90
90
|
static getNestedValue(obj: any, path: string): any;
|
|
91
91
|
/**
|
|
92
92
|
* 从路径字符串中提取变量名
|
|
93
|
-
* @param path 路径字符串,例如 "test
|
|
93
|
+
* @param path 路径字符串,例如 "测试.test" 或 "333[0].aa"
|
|
94
94
|
* @returns 提取出的变量名
|
|
95
95
|
*/
|
|
96
96
|
static extractVariableName(path: string): string;
|
|
@@ -11,11 +11,11 @@ class o {
|
|
|
11
11
|
const t = e.match(/\${(.*?)}/g);
|
|
12
12
|
if (t)
|
|
13
13
|
for (let a = 0; a < t.length; a++) {
|
|
14
|
-
const r = t[a].substring(2, t[a].length - 1), i = o.extractVariableName(r),
|
|
15
|
-
if (!
|
|
14
|
+
const r = t[a].substring(2, t[a].length - 1), i = o.extractVariableName(r), s = n.find((l) => l.name === i);
|
|
15
|
+
if (!s)
|
|
16
16
|
continue;
|
|
17
|
-
const
|
|
18
|
-
e = e.replaceAll(t[a],
|
|
17
|
+
const c = o.getNestedValue(s._value, r.substring(i.length));
|
|
18
|
+
e = e.replaceAll(t[a], c);
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
21
|
} catch {
|
|
@@ -34,10 +34,10 @@ class o {
|
|
|
34
34
|
const a = t.match(/\$g{(.*?)}/g);
|
|
35
35
|
if (a) {
|
|
36
36
|
for (let r = 0; r < a.length; r++) {
|
|
37
|
-
const i = a[r].substring(3, a[r].length - 1),
|
|
38
|
-
if (!
|
|
37
|
+
const i = a[r].substring(3, a[r].length - 1), s = this.extractVariableName(i), c = n.find((u) => u.name === s);
|
|
38
|
+
if (!c)
|
|
39
39
|
continue;
|
|
40
|
-
const l = this.getNestedValue(
|
|
40
|
+
const l = this.getNestedValue(c._value, i.substring(s.length));
|
|
41
41
|
t = t.replaceAll(a[r], l);
|
|
42
42
|
}
|
|
43
43
|
return JSON.parse(t);
|
|
@@ -58,11 +58,11 @@ class o {
|
|
|
58
58
|
const t = e.match(/\$g{(.*?)}/g);
|
|
59
59
|
if (t)
|
|
60
60
|
for (let a = 0; a < t.length; a++) {
|
|
61
|
-
const r = t[a].substring(3, t[a].length - 1), i = this.extractVariableName(r),
|
|
62
|
-
if (!
|
|
61
|
+
const r = t[a].substring(3, t[a].length - 1), i = this.extractVariableName(r), s = n.find((l) => l.name === i);
|
|
62
|
+
if (!s)
|
|
63
63
|
continue;
|
|
64
|
-
const
|
|
65
|
-
e = e.replaceAll(t[a],
|
|
64
|
+
const c = this.getNestedValue(s._value, r.substring(i.length));
|
|
65
|
+
e = e.replaceAll(t[a], c);
|
|
66
66
|
}
|
|
67
67
|
return e;
|
|
68
68
|
} catch {
|
|
@@ -107,7 +107,7 @@ class o {
|
|
|
107
107
|
* @returns 环境变量
|
|
108
108
|
*/
|
|
109
109
|
static getEnvironments() {
|
|
110
|
-
let e =
|
|
110
|
+
let e = sessionStorage.getItem("currentApiEnvironments");
|
|
111
111
|
return e && (e = JSON.parse(e)), e;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
@@ -115,14 +115,14 @@ class o {
|
|
|
115
115
|
* @param environments 环境变量
|
|
116
116
|
*/
|
|
117
117
|
static setEnvironments(e) {
|
|
118
|
-
|
|
118
|
+
sessionStorage.setItem("currentApiEnvironments", JSON.stringify(e));
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* 获取变量数据
|
|
122
122
|
* @returns 变量数据
|
|
123
123
|
*/
|
|
124
124
|
static getVariableData() {
|
|
125
|
-
let e =
|
|
125
|
+
let e = sessionStorage.getItem("currentVariableData");
|
|
126
126
|
return e && (e = JSON.parse(e)), e;
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
@@ -130,7 +130,7 @@ class o {
|
|
|
130
130
|
* @param variableData 变量数据
|
|
131
131
|
*/
|
|
132
132
|
static setVariableData(e) {
|
|
133
|
-
|
|
133
|
+
sessionStorage.setItem("currentVariableData", JSON.stringify(e));
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
136
|
* 检查 WebSocket 是否已存在且有效
|
|
@@ -174,11 +174,11 @@ class o {
|
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* 从路径字符串中提取变量名
|
|
177
|
-
* @param path 路径字符串,例如 "test
|
|
177
|
+
* @param path 路径字符串,例如 "测试.test" 或 "333[0].aa"
|
|
178
178
|
* @returns 提取出的变量名
|
|
179
179
|
*/
|
|
180
180
|
static extractVariableName(e) {
|
|
181
|
-
const n = e.match(/^([
|
|
181
|
+
const n = e.match(/^([\u4e00-\u9fa5a-zA-Z0-9_][\u4e00-\u9fa5a-zA-Z0-9_]*)/);
|
|
182
182
|
return n ? n[1] : "";
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -2,7 +2,7 @@ import { ComponentRefs as r } from "../../../utils/componentRefs.mjs";
|
|
|
2
2
|
const f = (e, n) => {
|
|
3
3
|
try {
|
|
4
4
|
const { invokeAction: o } = e, t = r.getComponentRef(o.targetLayerId);
|
|
5
|
-
t && t.ref[o.functionName](o.functionArgs
|
|
5
|
+
t && t.ref[o.functionName](n, o.functionArgs);
|
|
6
6
|
} catch {
|
|
7
7
|
}
|
|
8
8
|
};
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import { watch as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
e.sources && e.sources.length > 0 &&
|
|
1
|
+
import { watch as t } from "vue";
|
|
2
|
+
import { cloneDeep as u, isEqual as m } from "lodash";
|
|
3
|
+
const f = (e, r, c, n) => {
|
|
4
|
+
t(() => e.sources, () => {
|
|
5
|
+
e.sources && e.sources.length > 0 && r(e.option);
|
|
6
6
|
}, {
|
|
7
7
|
deep: !0
|
|
8
|
-
}),
|
|
9
|
-
|
|
8
|
+
}), t(() => u(e.option), (o, i) => {
|
|
9
|
+
m(o, i) || c(o);
|
|
10
10
|
}, {
|
|
11
11
|
deep: !0
|
|
12
|
-
}), f({
|
|
13
|
-
getEchartsInstance: () => c.value,
|
|
14
|
-
refresh: () => {
|
|
15
|
-
e.sources && e.sources.length > 0 && o(e.option), t(e.option);
|
|
16
|
-
},
|
|
17
|
-
refreshView: () => {
|
|
18
|
-
t(e.option);
|
|
19
|
-
},
|
|
20
|
-
refreshData: () => {
|
|
21
|
-
o(e.option);
|
|
22
|
-
}
|
|
23
12
|
});
|
|
24
13
|
};
|
|
25
14
|
export {
|
|
26
|
-
|
|
15
|
+
f as useCommonChart
|
|
27
16
|
};
|