light-chaser-pro 1.0.0
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/.trae/.ignore +1 -0
- package/LICENSE +21 -0
- package/README.md +99 -0
- package/UI_DESIGN_SPEC.md +130 -0
- package/deploy.bat +98 -0
- package/doc//344/277/256/345/244/215/347/224/273/345/270/203/350/207/252/351/200/202/345/272/224bug/350/203/214/345/220/216/347/232/204/347/220/206/350/256/272/347/237/245/350/257/206.md +291 -0
- package/light-chaser-app/.dockerignore +6 -0
- package/light-chaser-app/.eslintrc.cjs +19 -0
- package/light-chaser-app/Dockerfile +40 -0
- package/light-chaser-app/command.md +23 -0
- package/light-chaser-app/index.html +30 -0
- package/light-chaser-app/nginx.conf +31 -0
- package/light-chaser-app/package.json +74 -0
- package/light-chaser-app/public/favicon.ico +0 -0
- package/light-chaser-app/release.html +38 -0
- package/light-chaser-app/src/api/ReponseHandler.ts +49 -0
- package/light-chaser-app/src/api/RoleApi.ts +28 -0
- package/light-chaser-app/src/api/engineering/AbstractApi.ts +75 -0
- package/light-chaser-app/src/api/engineering/ApiManager.ts +26 -0
- package/light-chaser-app/src/api/engineering/BaseApi.ts +131 -0
- package/light-chaser-app/src/api/engineering/PureShowApi.ts +28 -0
- package/light-chaser-app/src/comps/antd/area-base/AntdBaseAreaConfig.tsx +269 -0
- package/light-chaser-app/src/comps/antd/area-base/AntdBaseAreaDefinition.ts +232 -0
- package/light-chaser-app/src/comps/antd/area-base/base-area.png +0 -0
- package/light-chaser-app/src/comps/antd/area-percent/AntdPercentAreaDefinition.ts +241 -0
- package/light-chaser-app/src/comps/antd/area-percent/percent-area.png +0 -0
- package/light-chaser-app/src/comps/antd/area-stack/AntdStackAreaDefinition.ts +212 -0
- package/light-chaser-app/src/comps/antd/area-stack/stack-area.png +0 -0
- package/light-chaser-app/src/comps/antd/bar-base/AntdBaseBarDefinition.ts +134 -0
- package/light-chaser-app/src/comps/antd/bar-base/base-bar.png +0 -0
- package/light-chaser-app/src/comps/antd/bar-group/AntdGroupBarDefinition.ts +160 -0
- package/light-chaser-app/src/comps/antd/bar-group/group-bar.png +0 -0
- package/light-chaser-app/src/comps/antd/bar-percent/AntdPercentBarController.ts +21 -0
- package/light-chaser-app/src/comps/antd/bar-percent/AntdPercentBarDefinition.ts +167 -0
- package/light-chaser-app/src/comps/antd/bar-percent/percent-bar.png +0 -0
- package/light-chaser-app/src/comps/antd/bar-range/AntdRangeBarDefinition.ts +180 -0
- package/light-chaser-app/src/comps/antd/bar-range/range-bar.png +0 -0
- package/light-chaser-app/src/comps/antd/bar-stack/AntdStackBarDefinition.ts +144 -0
- package/light-chaser-app/src/comps/antd/bar-stack/stack-bar.png +0 -0
- package/light-chaser-app/src/comps/antd/column-base/AntdBaseColumnDefinition.ts +144 -0
- package/light-chaser-app/src/comps/antd/column-base/base-column.png +0 -0
- package/light-chaser-app/src/comps/antd/column-group/AntdGroupColumnDefinition.ts +154 -0
- package/light-chaser-app/src/comps/antd/column-group/group-column.png +0 -0
- package/light-chaser-app/src/comps/antd/column-percent/AntdPercentColumnDefinition.ts +168 -0
- package/light-chaser-app/src/comps/antd/column-percent/percent-column.png +0 -0
- package/light-chaser-app/src/comps/antd/column-range/AntdRangeColumnDefinition.ts +178 -0
- package/light-chaser-app/src/comps/antd/column-range/range-column.png +0 -0
- package/light-chaser-app/src/comps/antd/column-stack/AntdStackColumnDefinition.ts +152 -0
- package/light-chaser-app/src/comps/antd/column-stack/stack-column.png +0 -0
- package/light-chaser-app/src/comps/antd/g2plot-custom/G2PlotCustomConfig.tsx +80 -0
- package/light-chaser-app/src/comps/antd/g2plot-custom/G2PlotCustomController.ts +83 -0
- package/light-chaser-app/src/comps/antd/g2plot-custom/G2PlotCustomDefinition.ts +160 -0
- package/light-chaser-app/src/comps/antd/g2plot-custom/g2-plot-custom.png +0 -0
- package/light-chaser-app/src/comps/antd/gauge/AntdGaugeConfig.tsx +423 -0
- package/light-chaser-app/src/comps/antd/gauge/AntdGaugeController.ts +110 -0
- package/light-chaser-app/src/comps/antd/gauge/AntdGaugeDefinition.ts +162 -0
- package/light-chaser-app/src/comps/antd/gauge/gauge.png +0 -0
- package/light-chaser-app/src/comps/antd/line-base/AntdBaseLineDefinition.ts +147 -0
- package/light-chaser-app/src/comps/antd/line-base/base-line.png +0 -0
- package/light-chaser-app/src/comps/antd/line-multi/AntdMultiLineConfig.tsx +241 -0
- package/light-chaser-app/src/comps/antd/line-multi/AntdMultiLineDefinition.ts +244 -0
- package/light-chaser-app/src/comps/antd/line-multi/multi-line.png +0 -0
- package/light-chaser-app/src/comps/antd/line-step/AntdStepLineDefinition.ts +171 -0
- package/light-chaser-app/src/comps/antd/line-step/step-line.png +0 -0
- package/light-chaser-app/src/comps/antd/liquid/AntdLiquidConfig.tsx +338 -0
- package/light-chaser-app/src/comps/antd/liquid/AntdLiquidController.ts +106 -0
- package/light-chaser-app/src/comps/antd/liquid/AntdLiquidDefinition.ts +152 -0
- package/light-chaser-app/src/comps/antd/liquid/liquid.png +0 -0
- package/light-chaser-app/src/comps/antd/pie/AntdPieController.ts +74 -0
- package/light-chaser-app/src/comps/antd/pie/AntdPieDefinition.ts +165 -0
- package/light-chaser-app/src/comps/antd/pie/AntdPieStyleConfig.tsx +528 -0
- package/light-chaser-app/src/comps/antd/pie/pie.png +0 -0
- package/light-chaser-app/src/comps/antd/radar/AntdRadarController.ts +110 -0
- package/light-chaser-app/src/comps/antd/radar/AntdRadarDefinition.ts +187 -0
- package/light-chaser-app/src/comps/antd/radar/AntdRadarStyleConfig.tsx +270 -0
- package/light-chaser-app/src/comps/antd/radar/radar.png +0 -0
- package/light-chaser-app/src/comps/antd/radial-bar-base/AntdBaseRadialBarController.ts +79 -0
- package/light-chaser-app/src/comps/antd/radial-bar-base/AntdBaseRadialBarDefinition.ts +124 -0
- package/light-chaser-app/src/comps/antd/radial-bar-base/AntdBaseRadialBarStyleConfig.tsx +275 -0
- package/light-chaser-app/src/comps/antd/radial-bar-base/base-radial-bar.png +0 -0
- package/light-chaser-app/src/comps/antd/ring-progress/AntdRingProgressConfig.tsx +334 -0
- package/light-chaser-app/src/comps/antd/ring-progress/AntdRingProgressController.ts +85 -0
- package/light-chaser-app/src/comps/antd/ring-progress/AntdRingProgressDefinition.ts +138 -0
- package/light-chaser-app/src/comps/antd/ring-progress/ring-progress.png +0 -0
- package/light-chaser-app/src/comps/antd/rose-base/AntdBaseRoseDefinition.ts +102 -0
- package/light-chaser-app/src/comps/antd/rose-base/base-rose.png +0 -0
- package/light-chaser-app/src/comps/antd/rose-group/AntdGroupRoseDefinition.ts +127 -0
- package/light-chaser-app/src/comps/antd/rose-group/group-rose.png +0 -0
- package/light-chaser-app/src/comps/antd/rose-stack/AntdStackRoseDefinition.ts +142 -0
- package/light-chaser-app/src/comps/antd/rose-stack/stack-rose.png +0 -0
- package/light-chaser-app/src/comps/antd/scatter-bubble/AntdScatterBubbleDefinition.ts +192 -0
- package/light-chaser-app/src/comps/antd/scatter-bubble/scatter-bubble.png +0 -0
- package/light-chaser-app/src/comps/antd/scatter-point/AntdScatterPointDefinition.ts +143 -0
- package/light-chaser-app/src/comps/antd/scatter-point/scatter-point.png +0 -0
- package/light-chaser-app/src/comps/antd/word-cloud/AntdWordCloudConfig.tsx +167 -0
- package/light-chaser-app/src/comps/antd/word-cloud/AntdWordCloudController.ts +75 -0
- package/light-chaser-app/src/comps/antd/word-cloud/AntdWordCloudDefinition.ts +198 -0
- package/light-chaser-app/src/comps/antd/word-cloud/word-cloud.png +0 -0
- package/light-chaser-app/src/comps/antd-common/AntdBaseDesignerController.ts +96 -0
- package/light-chaser-app/src/comps/antd-common/AntdCommonDefinition.ts +51 -0
- package/light-chaser-app/src/comps/antd-common/AntdCommonUtil.ts +27 -0
- package/light-chaser-app/src/comps/antd-common/area/AbstractAreaDefinition.ts +53 -0
- package/light-chaser-app/src/comps/antd-common/area/AntdAreaCommonConfig.tsx +276 -0
- package/light-chaser-app/src/comps/antd-common/area/AntdCommonAreaController.ts +108 -0
- package/light-chaser-app/src/comps/antd-common/bar/AbstractBarDefinition.ts +52 -0
- package/light-chaser-app/src/comps/antd-common/bar/AntdBarCommonConfig.tsx +177 -0
- package/light-chaser-app/src/comps/antd-common/bar/AntdCommonBarController.ts +98 -0
- package/light-chaser-app/src/comps/antd-common/column/AbstractColumnDefinition.ts +51 -0
- package/light-chaser-app/src/comps/antd-common/column/AntdColumnCommonConfig.tsx +185 -0
- package/light-chaser-app/src/comps/antd-common/column/AntdCommonColumnController.ts +99 -0
- package/light-chaser-app/src/comps/antd-common/config/AntdFragment.tsx +40 -0
- package/light-chaser-app/src/comps/antd-common/config/axis/AxisConfig.tsx +555 -0
- package/light-chaser-app/src/comps/antd-common/config/legend/AntdLegend.tsx +279 -0
- package/light-chaser-app/src/comps/antd-common/config/legend/Legend.less +68 -0
- package/light-chaser-app/src/comps/antd-common/config/tooltip/G2Tooltip.tsx +62 -0
- package/light-chaser-app/src/comps/antd-common/line/AbstractLineDefinition.ts +53 -0
- package/light-chaser-app/src/comps/antd-common/line/AntdCommonLineController.ts +109 -0
- package/light-chaser-app/src/comps/antd-common/line/AntdLineCommonConfig.tsx +229 -0
- package/light-chaser-app/src/comps/antd-common/rose/AbstractRoseDefinition.ts +52 -0
- package/light-chaser-app/src/comps/antd-common/rose/AntdCommonRoseController.ts +67 -0
- package/light-chaser-app/src/comps/antd-common/rose/AntdRoseCommonConfig.tsx +279 -0
- package/light-chaser-app/src/comps/antd-common/scatter/AbstractScatterDefinition.ts +51 -0
- package/light-chaser-app/src/comps/antd-common/scatter/AntdCommonScatterController.ts +96 -0
- package/light-chaser-app/src/comps/antd-common/scatter/AntdScatterCommonConfig.tsx +210 -0
- package/light-chaser-app/src/comps/antd-common/types.ts +82 -0
- package/light-chaser-app/src/comps/antd-common/util/G2ColorUtil.ts +129 -0
- package/light-chaser-app/src/comps/common-component/animation-config/AnimationConfig.less +23 -0
- package/light-chaser-app/src/comps/common-component/animation-config/AnimationConfig.tsx +26 -0
- package/light-chaser-app/src/comps/common-component/base-info/BaseInfo.tsx +238 -0
- package/light-chaser-app/src/comps/common-component/base-info/BaseInfoStore.ts +36 -0
- package/light-chaser-app/src/comps/common-component/config-code/ConfigCode.tsx +62 -0
- package/light-chaser-app/src/comps/common-component/data-config/DataConfig.tsx +130 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/ApiDataConfig.tsx +285 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/CommonApiConfig.tsx +210 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/DataSourceConfig.less +19 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/DataSourceConfig.tsx +151 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/DatabaseConfig.tsx +241 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/GlobalVariableConfig.tsx +178 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/MQTTConfig.tsx +311 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/StaticDataConfig.tsx +156 -0
- package/light-chaser-app/src/comps/common-component/data-source-config/WebSocketConfig.tsx +183 -0
- package/light-chaser-app/src/comps/common-component/filter-config/FilterConfig.less +18 -0
- package/light-chaser-app/src/comps/common-component/filter-config/FilterConfig.tsx +175 -0
- package/light-chaser-app/src/comps/common-component/floating-modal/FloatingModal.less +116 -0
- package/light-chaser-app/src/comps/common-component/floating-modal/FloatingModal.tsx +166 -0
- package/light-chaser-app/src/comps/common-component/schema-fragment/SchemaFragment.ts +137 -0
- package/light-chaser-app/src/comps/common-component/theme-config/ThemeConfig.tsx +57 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-editor/ThemeEditor.less +189 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-editor/ThemeEditor.tsx +199 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ColorPreviewItem.less +16 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ColorPreviewItem.tsx +16 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ThemeItem.less +82 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ThemeItem.tsx +66 -0
- package/light-chaser-app/src/comps/common-component/theme-config/theme-list/ThemeList.tsx +66 -0
- package/light-chaser-app/src/comps/echarts/EChartsConfig.tsx +80 -0
- package/light-chaser-app/src/comps/echarts/EChartsController.ts +121 -0
- package/light-chaser-app/src/comps/echarts/EChartsCustomDataUpdateConfig.tsx +80 -0
- package/light-chaser-app/src/comps/echarts/EChartsDefinition.ts +186 -0
- package/light-chaser-app/src/comps/echarts/echarts.png +0 -0
- package/light-chaser-app/src/comps/group-layer/GroupLayer.tsx +90 -0
- package/light-chaser-app/src/comps/group-layer/GroupLayerController.ts +64 -0
- package/light-chaser-app/src/comps/group-layer/GroupLayerDefinition.ts +95 -0
- package/light-chaser-app/src/comps/lc/base-button/BaseButtonComponent.less +105 -0
- package/light-chaser-app/src/comps/lc/base-button/BaseButtonComponent.tsx +81 -0
- package/light-chaser-app/src/comps/lc/base-button/BaseButtonConfig.tsx +186 -0
- package/light-chaser-app/src/comps/lc/base-button/BaseButtonController.ts +75 -0
- package/light-chaser-app/src/comps/lc/base-button/BaseButtonDefinition.ts +112 -0
- package/light-chaser-app/src/comps/lc/base-button/base-button.png +0 -0
- package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockComponent.tsx +65 -0
- package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockConfig.tsx +97 -0
- package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockController.ts +69 -0
- package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockDefinition.ts +95 -0
- package/light-chaser-app/src/comps/lc/base-color-block/base-color-block.png +0 -0
- package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeComponent.tsx +65 -0
- package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeConfig.tsx +45 -0
- package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeController.ts +57 -0
- package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeDefinition.ts +77 -0
- package/light-chaser-app/src/comps/lc/base-iframe/base-iframe.png +0 -0
- package/light-chaser-app/src/comps/lc/base-image/BaseImageComponent.tsx +86 -0
- package/light-chaser-app/src/comps/lc/base-image/BaseImageConfig.tsx +100 -0
- package/light-chaser-app/src/comps/lc/base-image/BaseImageController.ts +72 -0
- package/light-chaser-app/src/comps/lc/base-image/BaseImageDefinition.ts +89 -0
- package/light-chaser-app/src/comps/lc/base-image/baseImage.png +0 -0
- package/light-chaser-app/src/comps/lc/base-input/BaseInputComponent.less +44 -0
- package/light-chaser-app/src/comps/lc/base-input/BaseInputComponent.tsx +92 -0
- package/light-chaser-app/src/comps/lc/base-input/BaseInputConfig.tsx +173 -0
- package/light-chaser-app/src/comps/lc/base-input/BaseInputController.ts +77 -0
- package/light-chaser-app/src/comps/lc/base-input/BaseInputDefinition.ts +114 -0
- package/light-chaser-app/src/comps/lc/base-input/base-input.png +0 -0
- package/light-chaser-app/src/comps/lc/base-select/BaseSelectComponent.less +17 -0
- package/light-chaser-app/src/comps/lc/base-select/BaseSelectComponent.tsx +91 -0
- package/light-chaser-app/src/comps/lc/base-select/BaseSelectConfig.tsx +182 -0
- package/light-chaser-app/src/comps/lc/base-select/BaseSelectController.ts +92 -0
- package/light-chaser-app/src/comps/lc/base-select/BaseSelectDefinition.ts +116 -0
- package/light-chaser-app/src/comps/lc/base-select/base-select.png +0 -0
- package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchComponent.less +9 -0
- package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchComponent.tsx +190 -0
- package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchController.ts +104 -0
- package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchDefinition.ts +134 -0
- package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchStyleConfig.tsx +187 -0
- package/light-chaser-app/src/comps/lc/base-switch/base-switch.png +0 -0
- package/light-chaser-app/src/comps/lc/base-tab/BaseTabComponent.less +90 -0
- package/light-chaser-app/src/comps/lc/base-tab/BaseTabComponent.tsx +240 -0
- package/light-chaser-app/src/comps/lc/base-tab/BaseTabController.ts +112 -0
- package/light-chaser-app/src/comps/lc/base-tab/BaseTabDefinition.ts +137 -0
- package/light-chaser-app/src/comps/lc/base-tab/BaseTabStyleConfig.tsx +278 -0
- package/light-chaser-app/src/comps/lc/base-tab/tab.jpg +0 -0
- package/light-chaser-app/src/comps/lc/base-table/BaseTableComponent.less +55 -0
- package/light-chaser-app/src/comps/lc/base-table/BaseTableComponent.tsx +214 -0
- package/light-chaser-app/src/comps/lc/base-table/BaseTableConfig.tsx +252 -0
- package/light-chaser-app/src/comps/lc/base-table/BaseTableController.ts +72 -0
- package/light-chaser-app/src/comps/lc/base-table/BaseTableDefinition.ts +185 -0
- package/light-chaser-app/src/comps/lc/base-table/base-table.png +0 -0
- package/light-chaser-app/src/comps/lc/base-text/BaseTextComponent.less +57 -0
- package/light-chaser-app/src/comps/lc/base-text/BaseTextComponent.tsx +124 -0
- package/light-chaser-app/src/comps/lc/base-text/BaseTextConfig.tsx +255 -0
- package/light-chaser-app/src/comps/lc/base-text/BaseTextController.ts +79 -0
- package/light-chaser-app/src/comps/lc/base-text/BaseTextDefinition.ts +102 -0
- package/light-chaser-app/src/comps/lc/base-text/base-text.png +0 -0
- package/light-chaser-app/src/comps/lc/base-video/BaseVideoComponent.tsx +64 -0
- package/light-chaser-app/src/comps/lc/base-video/BaseVideoConfig.tsx +43 -0
- package/light-chaser-app/src/comps/lc/base-video/BaseVideoController.ts +68 -0
- package/light-chaser-app/src/comps/lc/base-video/BaseVideoDefinition.ts +86 -0
- package/light-chaser-app/src/comps/lc/base-video/baseVideo.png +0 -0
- package/light-chaser-app/src/comps/lc/carousel/CarouselComponent.less +17 -0
- package/light-chaser-app/src/comps/lc/carousel/CarouselComponent.tsx +80 -0
- package/light-chaser-app/src/comps/lc/carousel/CarouselConfig.tsx +69 -0
- package/light-chaser-app/src/comps/lc/carousel/CarouselController.ts +62 -0
- package/light-chaser-app/src/comps/lc/carousel/CarouselDefinition.ts +91 -0
- package/light-chaser-app/src/comps/lc/carousel/carousel.png +0 -0
- package/light-chaser-app/src/comps/lc/date-time/DateTimeComponent.less +16 -0
- package/light-chaser-app/src/comps/lc/date-time/DateTimeComponent.tsx +106 -0
- package/light-chaser-app/src/comps/lc/date-time/DateTimeConfig.tsx +163 -0
- package/light-chaser-app/src/comps/lc/date-time/DateTimeController.ts +70 -0
- package/light-chaser-app/src/comps/lc/date-time/DateTimeDefinition.ts +93 -0
- package/light-chaser-app/src/comps/lc/date-time/date-time.png +0 -0
- package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerComponent.less +15 -0
- package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerComponent.tsx +259 -0
- package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerConfig.tsx +219 -0
- package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerController.ts +114 -0
- package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerDefinition.ts +170 -0
- package/light-chaser-app/src/comps/lc/date-time-picker/datetime-picker.jpg +0 -0
- package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperComponent.tsx +106 -0
- package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperConfig.tsx +197 -0
- package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperController.ts +76 -0
- package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperDefinition.ts +99 -0
- package/light-chaser-app/src/comps/lc/digital-flipper/digital-flipper.png +0 -0
- package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerComponent.tsx +89 -0
- package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerConfig.tsx +44 -0
- package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerController.ts +56 -0
- package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerDefinition.ts +89 -0
- package/light-chaser-app/src/comps/lc/flv-player/flv-player.png +0 -0
- package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGloeBorder.less +64 -0
- package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorder.tsx +64 -0
- package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorderConfig.tsx +67 -0
- package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorderController.ts +71 -0
- package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorderDefinition.ts +91 -0
- package/light-chaser-app/src/comps/lc/four-angle-glow-border/four-angle-glow-border.png +0 -0
- package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerComponent.tsx +90 -0
- package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerConfig.tsx +44 -0
- package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerController.ts +51 -0
- package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerDefinition.ts +89 -0
- package/light-chaser-app/src/comps/lc/hls-player/hls-player.png +0 -0
- package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceComponent.tsx +144 -0
- package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceConfig.tsx +63 -0
- package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceController.ts +55 -0
- package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceDefinition.ts +89 -0
- package/light-chaser-app/src/comps/lc/screen-reference/screen-reference.png +0 -0
- package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerComponent.less +41 -0
- package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerComponent.tsx +82 -0
- package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerConfig.tsx +115 -0
- package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerController.ts +71 -0
- package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerDefinition.ts +89 -0
- package/light-chaser-app/src/comps/lc/text-scroller/text-scroller.png +0 -0
- package/light-chaser-app/src/comps/loop-container/LoopContainer.less +26 -0
- package/light-chaser-app/src/comps/loop-container/LoopContainer.tsx +69 -0
- package/light-chaser-app/src/comps/loop-container/LoopContainerConfig.tsx +84 -0
- package/light-chaser-app/src/comps/loop-container/LoopContainerController.ts +115 -0
- package/light-chaser-app/src/comps/loop-container/LoopContainerDefinition.ts +127 -0
- package/light-chaser-app/src/comps/map/AMapComponent.less +27 -0
- package/light-chaser-app/src/comps/map/AMapComponent.tsx +79 -0
- package/light-chaser-app/src/comps/map/AMapConfig.tsx +103 -0
- package/light-chaser-app/src/comps/map/AMapController.ts +57 -0
- package/light-chaser-app/src/comps/map/AMapDefinition.ts +104 -0
- package/light-chaser-app/src/comps/map/AMapScaleObserver.ts +44 -0
- package/light-chaser-app/src/comps/map/MapLoader.ts +61 -0
- package/light-chaser-app/src/comps/map/a-map.d.ts +22 -0
- package/light-chaser-app/src/comps/map/a-map.png +0 -0
- package/light-chaser-app/src/constant/GlobalConstant.ts +17 -0
- package/light-chaser-app/src/designer/Designer.tsx +146 -0
- package/light-chaser-app/src/designer/blueprint/BPCanvas.less +24 -0
- package/light-chaser-app/src/designer/blueprint/BPCanvas.tsx +79 -0
- package/light-chaser-app/src/designer/blueprint/BluePrint.tsx +39 -0
- package/light-chaser-app/src/designer/blueprint/IBPTyps.ts +27 -0
- package/light-chaser-app/src/designer/blueprint/bp-context-menu/BpContextMenu.tsx +112 -0
- package/light-chaser-app/src/designer/blueprint/core/BPExecutor.ts +43 -0
- package/light-chaser-app/src/designer/blueprint/core/BPTask.ts +67 -0
- package/light-chaser-app/src/designer/blueprint/drag/BPMovable.tsx +89 -0
- package/light-chaser-app/src/designer/blueprint/drag/BPSelectable.tsx +75 -0
- package/light-chaser-app/src/designer/blueprint/footer/BPFooter.less +268 -0
- package/light-chaser-app/src/designer/blueprint/footer/BPFooter.tsx +172 -0
- package/light-chaser-app/src/designer/blueprint/header/BPHeader.less +41 -0
- package/light-chaser-app/src/designer/blueprint/header/BPHeader.tsx +31 -0
- package/light-chaser-app/src/designer/blueprint/left/BPLeft.less +262 -0
- package/light-chaser-app/src/designer/blueprint/left/BPLeft.tsx +245 -0
- package/light-chaser-app/src/designer/blueprint/left/BPLeftStore.ts +44 -0
- package/light-chaser-app/src/designer/blueprint/line/LineLayer.tsx +301 -0
- package/light-chaser-app/src/designer/blueprint/manager/BluePrintManager.ts +503 -0
- package/light-chaser-app/src/designer/blueprint/manager/BluePrintPageManager.ts +94 -0
- package/light-chaser-app/src/designer/blueprint/node/BPNode.less +154 -0
- package/light-chaser-app/src/designer/blueprint/node/BPNode.tsx +77 -0
- package/light-chaser-app/src/designer/blueprint/node/NodeLayer.tsx +43 -0
- package/light-chaser-app/src/designer/blueprint/node/core/AbstractBPNodeController.ts +48 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/condition/BPConditionNodeController.ts +108 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/condition/ConditionNodeConfig.tsx +39 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/global/BPGlobalNodeController.ts +67 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/global-variable/BPGlobalVariableNodeController.ts +92 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/layer/BPLayerNodeController.ts +95 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/logical-process/BPLogicalProcessNodeController.ts +102 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/logical-process/LogicalProcessNodeConfig.tsx +39 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/mqtt/BPMqttNodeController.ts +165 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/mqtt/MqttNodeConfig.tsx +33 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/popup-box/BPPopupBoxNodeController.ts +79 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/popup-box/ModalRenderUtil.tsx +181 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/popup-box/PopupBoxNodeConfig.tsx +84 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/timer/BPTimerNodeController.ts +73 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/timer/TimerNodeConfig.tsx +51 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/visible/BPVisibleNodeController.ts +93 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/visible/VisibleNodeConfig.tsx +60 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/websocket/BPWebSocketNodeController.ts +129 -0
- package/light-chaser-app/src/designer/blueprint/node/core/impl/websocket/WebSocketNodeConfig.tsx +33 -0
- package/light-chaser-app/src/designer/blueprint/node/core/node-container/BPNodeContainer.less +25 -0
- package/light-chaser-app/src/designer/blueprint/node/core/node-container/BPNodeContainer.tsx +87 -0
- package/light-chaser-app/src/designer/blueprint/right/BPRight.less +181 -0
- package/light-chaser-app/src/designer/blueprint/right/BPRight.tsx +66 -0
- package/light-chaser-app/src/designer/blueprint/right/BPRightStore.ts +34 -0
- package/light-chaser-app/src/designer/blueprint/util/BpCanvasUtil.ts +254 -0
- package/light-chaser-app/src/designer/blueprint/util/EventUtil.ts +60 -0
- package/light-chaser-app/src/designer/canvas/DesignerCanvas.tsx +73 -0
- package/light-chaser-app/src/designer/canvas/DesignerDragScaleContainer.tsx +77 -0
- package/light-chaser-app/src/designer/canvas/DesignerRuler.tsx +164 -0
- package/light-chaser-app/src/designer/event/ContextMenuStore.ts +71 -0
- package/light-chaser-app/src/designer/footer/DesignerFooter.less +110 -0
- package/light-chaser-app/src/designer/footer/DesignerFooter.tsx +125 -0
- package/light-chaser-app/src/designer/footer/FooterStore.ts +56 -0
- package/light-chaser-app/src/designer/footer/auto-save/AutoSaveManager.ts +130 -0
- package/light-chaser-app/src/designer/footer/auto-save/EnhanceFetch.ts +41 -0
- package/light-chaser-app/src/designer/footer/auto-save/RestoreLocalStorage.less +80 -0
- package/light-chaser-app/src/designer/footer/auto-save/RestoreLocalStorage.tsx +158 -0
- package/light-chaser-app/src/designer/footer/cover/CoverConfig.less +131 -0
- package/light-chaser-app/src/designer/footer/cover/CoverConfig.tsx +113 -0
- package/light-chaser-app/src/designer/footer/hotkey-des/HotKeyDes.less +63 -0
- package/light-chaser-app/src/designer/footer/hotkey-des/HotKeyDes.tsx +111 -0
- package/light-chaser-app/src/designer/header/DesignerHeader.less +132 -0
- package/light-chaser-app/src/designer/header/DesignerHeader.tsx +172 -0
- package/light-chaser-app/src/designer/header/DesignerHeaderStore.ts +30 -0
- package/light-chaser-app/src/designer/header/items/blue-print/BluePrintHdImpl.tsx +32 -0
- package/light-chaser-app/src/designer/header/items/canvas/CanvasHdConfigImpl.less +180 -0
- package/light-chaser-app/src/designer/header/items/canvas/CanvasHdConfigImpl.tsx +128 -0
- package/light-chaser-app/src/designer/header/items/canvas/CanvasManager.ts +55 -0
- package/light-chaser-app/src/designer/header/items/global-filter/GlobalFilterConfigImpl.tsx +42 -0
- package/light-chaser-app/src/designer/header/items/project/ProjectHdItemImpl.less +34 -0
- package/light-chaser-app/src/designer/header/items/project/ProjectHdItemImpl.tsx +64 -0
- package/light-chaser-app/src/designer/header/items/project/ProjectManager.ts +56 -0
- package/light-chaser-app/src/designer/header/items/release/ReleaseHdConfigImpl.less +205 -0
- package/light-chaser-app/src/designer/header/items/release/ReleaseHdConfigImpl.tsx +189 -0
- package/light-chaser-app/src/designer/header/items/theme/ThemeHdItem.less +161 -0
- package/light-chaser-app/src/designer/header/items/theme/ThemeHdItemImpl.tsx +76 -0
- package/light-chaser-app/src/designer/header/items/theme/ThemeManager.ts +81 -0
- package/light-chaser-app/src/designer/left/DesignerLeft.less +15 -0
- package/light-chaser-app/src/designer/left/DesignerLeft.tsx +55 -0
- package/light-chaser-app/src/designer/left/DesignerLeftStore.ts +40 -0
- package/light-chaser-app/src/designer/left/compoent-lib/ComponentCategorize.ts +135 -0
- package/light-chaser-app/src/designer/left/compoent-lib/ComponentList.less +129 -0
- package/light-chaser-app/src/designer/left/compoent-lib/ComponentList.tsx +89 -0
- package/light-chaser-app/src/designer/left/compoent-lib/ComponentListStore.ts +64 -0
- package/light-chaser-app/src/designer/left/compoent-lib/list/CompList.less +112 -0
- package/light-chaser-app/src/designer/left/compoent-lib/list/CompList.tsx +155 -0
- package/light-chaser-app/src/designer/left/designer-left-menus/LeftMenus.less +63 -0
- package/light-chaser-app/src/designer/left/designer-left-menus/LeftMenus.tsx +87 -0
- package/light-chaser-app/src/designer/left/filter-lilst/AddFilterDialog.tsx +76 -0
- package/light-chaser-app/src/designer/left/filter-lilst/FilterList.less +105 -0
- package/light-chaser-app/src/designer/left/filter-lilst/FilterList.tsx +65 -0
- package/light-chaser-app/src/designer/left/global-variable/GlobalVariable.less +231 -0
- package/light-chaser-app/src/designer/left/global-variable/GlobalVariable.ts +151 -0
- package/light-chaser-app/src/designer/left/global-variable/GlobalVariableEditPanel.tsx +79 -0
- package/light-chaser-app/src/designer/left/global-variable/GlobalVariableList.tsx +89 -0
- package/light-chaser-app/src/designer/left/global-variable/parse/ComponentDataGvParser.ts +298 -0
- package/light-chaser-app/src/designer/left/layer-list/CanvasRender.ts +69 -0
- package/light-chaser-app/src/designer/left/layer-list/DesignerRender.ts +70 -0
- package/light-chaser-app/src/designer/left/layer-list/LayerList.less +371 -0
- package/light-chaser-app/src/designer/left/layer-list/LayerList.tsx +129 -0
- package/light-chaser-app/src/designer/left/layer-list/LayerListStore.ts +197 -0
- package/light-chaser-app/src/designer/left/layer-list/LayerRender.ts +67 -0
- package/light-chaser-app/src/designer/left/layer-list/item/BaseLayer.tsx +125 -0
- package/light-chaser-app/src/designer/left/layer-list/item/LayerGroupItem.tsx +61 -0
- package/light-chaser-app/src/designer/left/layer-list/item/LayerItem.tsx +48 -0
- package/light-chaser-app/src/designer/left/layer-list/search-layer/SearchLayer.less +121 -0
- package/light-chaser-app/src/designer/left/layer-list/search-layer/SearchLayer.tsx +82 -0
- package/light-chaser-app/src/designer/left/layer-list/util/LayerUtil.ts +370 -0
- package/light-chaser-app/src/designer/left/source-list/SourceList.less +99 -0
- package/light-chaser-app/src/designer/left/source-list/SourceList.tsx +50 -0
- package/light-chaser-app/src/designer/left/source-list/image-source/ImageSource.less +139 -0
- package/light-chaser-app/src/designer/left/source-list/image-source/ImageSource.tsx +155 -0
- package/light-chaser-app/src/designer/left/sub-project/SubProject.less +200 -0
- package/light-chaser-app/src/designer/left/sub-project/SubProject.tsx +231 -0
- package/light-chaser-app/src/designer/left/template-lib/TemplateLib.less +226 -0
- package/light-chaser-app/src/designer/left/template-lib/TemplateLib.tsx +165 -0
- package/light-chaser-app/src/designer/loader/DesignerLoader.ts +334 -0
- package/light-chaser-app/src/designer/loader/EditDesignerLoader.ts +75 -0
- package/light-chaser-app/src/designer/loader/PureReleaseDesignerLoader.ts +123 -0
- package/light-chaser-app/src/designer/loader/ReleaseDesignerLoader.ts +129 -0
- package/light-chaser-app/src/designer/loader/ViewDesignerLoader.ts +57 -0
- package/light-chaser-app/src/designer/manager/DesignerManager.ts +96 -0
- package/light-chaser-app/src/designer/manager/FilterManager.ts +69 -0
- package/light-chaser-app/src/designer/manager/GlobalFilterManger.ts +69 -0
- package/light-chaser-app/src/designer/manager/GlobalVariableManager.ts +148 -0
- package/light-chaser-app/src/designer/manager/LayerManager.ts +170 -0
- package/light-chaser-app/src/designer/manager/ManagerStore.ts +93 -0
- package/light-chaser-app/src/designer/manager/core/AbstractManager.ts +18 -0
- package/light-chaser-app/src/designer/operate-provider/EventOperateStore.ts +150 -0
- package/light-chaser-app/src/designer/operate-provider/canvas-context-menu/CanvasContextMenu.tsx +204 -0
- package/light-chaser-app/src/designer/operate-provider/hot-key/HotKey.tsx +51 -0
- package/light-chaser-app/src/designer/operate-provider/hot-key/HotKeyConfig.ts +226 -0
- package/light-chaser-app/src/designer/operate-provider/hot-key/HotKeyImpl.ts +871 -0
- package/light-chaser-app/src/designer/operate-provider/hot-key/HotKeyType.ts +29 -0
- package/light-chaser-app/src/designer/operate-provider/movable/DesignerMovable.less +19 -0
- package/light-chaser-app/src/designer/operate-provider/movable/DesignerMovable.tsx +461 -0
- package/light-chaser-app/src/designer/operate-provider/movable/DesignerSelectable.tsx +123 -0
- package/light-chaser-app/src/designer/operate-provider/scale/ScaleCore.ts +43 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/HistoryOperator.ts +37 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/HistoryQueue.ts +170 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/HistoryRecordOperateProxy.ts +1740 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/OperateType.ts +183 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/AbstractRollback.ts +27 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/AddRollbackImpl.ts +89 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/DelRollbackImpl.ts +99 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/DragRollbackImpl.ts +59 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/HideRollbackImpl.ts +61 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/LockRollbackImpl.ts +57 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/OrderRollbackImpl.ts +34 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/ResizeRollbackImpl.ts +59 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/RotateRollbackImpl.ts +58 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/StyleRollbackImpl.ts +62 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/UpdLayerGroupRollbackImpl.ts +62 -0
- package/light-chaser-app/src/designer/operate-provider/undo-redo/core/index.ts +37 -0
- package/light-chaser-app/src/designer/release/DesignerRelease.less +41 -0
- package/light-chaser-app/src/designer/release/DesignerRelease.tsx +91 -0
- package/light-chaser-app/src/designer/right/ConfigContent.tsx +186 -0
- package/light-chaser-app/src/designer/right/DesignerRight.less +325 -0
- package/light-chaser-app/src/designer/right/DesignerRight.tsx +28 -0
- package/light-chaser-app/src/designer/right/MenuList.tsx +70 -0
- package/light-chaser-app/src/designer/right/MenuType.ts +23 -0
- package/light-chaser-app/src/designer/right/RightStore.ts +122 -0
- package/light-chaser-app/src/designer/right/status-list/ComponentStatusList.tsx +73 -0
- package/light-chaser-app/src/designer/right/status-list/StatusListStore.ts +175 -0
- package/light-chaser-app/src/designer/right/util.ts +53 -0
- package/light-chaser-app/src/designer/store/RuntimeStore.ts +32 -0
- package/light-chaser-app/src/designer/style/DesignerGlobalStyle.less +75 -0
- package/light-chaser-app/src/designer/view/DesignerView.less +41 -0
- package/light-chaser-app/src/designer/view/DesignerView.tsx +61 -0
- package/light-chaser-app/src/framework/cache/AbstractCache.ts +38 -0
- package/light-chaser-app/src/framework/cache/ImageSourceCache.ts +23 -0
- package/light-chaser-app/src/framework/cache/LocalCoverCache.ts +29 -0
- package/light-chaser-app/src/framework/context-menu/ContextMenu.less +57 -0
- package/light-chaser-app/src/framework/context-menu/ContextMenu.tsx +76 -0
- package/light-chaser-app/src/framework/convert/AbstractConvert.ts +31 -0
- package/light-chaser-app/src/framework/core/AbstractController.ts +76 -0
- package/light-chaser-app/src/framework/core/AbstractDefinition.ts +77 -0
- package/light-chaser-app/src/framework/core/AbstractDesignerController.ts +129 -0
- package/light-chaser-app/src/framework/core/AbstractDesignerDefinition.ts +136 -0
- package/light-chaser-app/src/framework/core/AbstractScaleObserver.ts +15 -0
- package/light-chaser-app/src/framework/core/ComponentContainer.tsx +130 -0
- package/light-chaser-app/src/framework/core/ScaleAction.ts +33 -0
- package/light-chaser-app/src/framework/core/tools/ComponentDataUpdater.ts +260 -0
- package/light-chaser-app/src/framework/drag-scale/DragAddProvider.ts +45 -0
- package/light-chaser-app/src/framework/drag-scale/DragScaleProvider.tsx +202 -0
- package/light-chaser-app/src/framework/screen-fit/ScreenFit.less +25 -0
- package/light-chaser-app/src/framework/screen-fit/ScreenFit.tsx +177 -0
- package/light-chaser-app/src/global/ExportEditGlobalMember.ts +54 -0
- package/light-chaser-app/src/global/ExportViewGlobalMember.ts +40 -0
- package/light-chaser-app/src/global/GlobalConstants.ts +16 -0
- package/light-chaser-app/src/images/lock.svg +23 -0
- package/light-chaser-app/src/images/login-logo.png +0 -0
- package/light-chaser-app/src/images/logo.png +0 -0
- package/light-chaser-app/src/images/user.svg +23 -0
- package/light-chaser-app/src/index.less +359 -0
- package/light-chaser-app/src/index.tsx +47 -0
- package/light-chaser-app/src/pages/auth-reminder/AuthReminders.less +218 -0
- package/light-chaser-app/src/pages/auth-reminder/AuthReminders.tsx +174 -0
- package/light-chaser-app/src/pages/auth-reminder/AuthRemindersStore.ts +30 -0
- package/light-chaser-app/src/pages/designer/DesignerPage.tsx +18 -0
- package/light-chaser-app/src/pages/home/Home.less +123 -0
- package/light-chaser-app/src/pages/home/Home.tsx +81 -0
- package/light-chaser-app/src/pages/home/api-management/ApiEditPanel.tsx +79 -0
- package/light-chaser-app/src/pages/home/api-management/ApiManagement.module.less +234 -0
- package/light-chaser-app/src/pages/home/api-management/ApiManagement.tsx +152 -0
- package/light-chaser-app/src/pages/home/api-management/ApiManagementStore.ts +187 -0
- package/light-chaser-app/src/pages/home/database/DataBaseList.module.less +369 -0
- package/light-chaser-app/src/pages/home/database/DataBaseList.tsx +264 -0
- package/light-chaser-app/src/pages/home/database/DataBasePanel.less +170 -0
- package/light-chaser-app/src/pages/home/database/DataBasePanel.tsx +172 -0
- package/light-chaser-app/src/pages/home/database/DataBaseStore.ts +220 -0
- package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptList.module.less +305 -0
- package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptList.tsx +248 -0
- package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptManagement.tsx +19 -0
- package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptManagementStore.ts +192 -0
- package/light-chaser-app/src/pages/home/font-management/FontManagement.module.less +281 -0
- package/light-chaser-app/src/pages/home/font-management/FontManagement.tsx +218 -0
- package/light-chaser-app/src/pages/home/font-management/FontManagementStore.ts +153 -0
- package/light-chaser-app/src/pages/home/image/default-snapshot.jpg +0 -0
- package/light-chaser-app/src/pages/home/menus/HomeMenus.less +175 -0
- package/light-chaser-app/src/pages/home/menus/HomeMenus.tsx +148 -0
- package/light-chaser-app/src/pages/home/more-info/MoreInfo.module.less +154 -0
- package/light-chaser-app/src/pages/home/more-info/MoreInfo.tsx +71 -0
- package/light-chaser-app/src/pages/home/page-container/PageContainer.less +130 -0
- package/light-chaser-app/src/pages/home/page-container/PageContainer.tsx +41 -0
- package/light-chaser-app/src/pages/home/project-list/CloneProjectDialog.tsx +43 -0
- package/light-chaser-app/src/pages/home/project-list/DelProjectDialog.tsx +37 -0
- package/light-chaser-app/src/pages/home/project-list/NewProjectDialog.less +262 -0
- package/light-chaser-app/src/pages/home/project-list/NewProjectDialog.tsx +152 -0
- package/light-chaser-app/src/pages/home/project-list/ProjectItem.less +192 -0
- package/light-chaser-app/src/pages/home/project-list/ProjectItem.tsx +136 -0
- package/light-chaser-app/src/pages/home/project-list/ProjectList.less +137 -0
- package/light-chaser-app/src/pages/home/project-list/ProjectList.tsx +180 -0
- package/light-chaser-app/src/pages/home/project-management/ProjectManagement.tsx +18 -0
- package/light-chaser-app/src/pages/home/project-setting/ProjectSetting.less +39 -0
- package/light-chaser-app/src/pages/home/project-setting/ProjectSetting.tsx +39 -0
- package/light-chaser-app/src/pages/home/release-management/ReleaseEditPanel.tsx +62 -0
- package/light-chaser-app/src/pages/home/release-management/ReleaseManagement.module.less +216 -0
- package/light-chaser-app/src/pages/home/release-management/ReleaseManagement.tsx +213 -0
- package/light-chaser-app/src/pages/home/release-management/ReleaseStore.ts +138 -0
- package/light-chaser-app/src/pages/home/remote-component/RemoteComponentManagement.module.less +290 -0
- package/light-chaser-app/src/pages/home/remote-component/RemoteComponentManagement.tsx +244 -0
- package/light-chaser-app/src/pages/home/remote-component/RemoteComponentStore.ts +143 -0
- package/light-chaser-app/src/pages/home/resource-management/ResourceManagement.tsx +18 -0
- package/light-chaser-app/src/pages/home/server-list/ServerProjectList.tsx +21 -0
- package/light-chaser-app/src/pages/home/setting/Setting.module.less +298 -0
- package/light-chaser-app/src/pages/home/setting/Setting.tsx +123 -0
- package/light-chaser-app/src/pages/home/template-market/TemplateMarket.tsx +22 -0
- package/light-chaser-app/src/pages/home/user-info/UserInfo.less +279 -0
- package/light-chaser-app/src/pages/home/user-info/UserInfo.tsx +186 -0
- package/light-chaser-app/src/pages/home/user-management/UserManagement.module.less +211 -0
- package/light-chaser-app/src/pages/home/user-management/UserManagement.tsx +209 -0
- package/light-chaser-app/src/pages/home/user-management/UserManagementStore.ts +183 -0
- package/light-chaser-app/src/pages/home/user-management/UserPanel.tsx +113 -0
- package/light-chaser-app/src/pages/login/Login.less +282 -0
- package/light-chaser-app/src/pages/login/Login.tsx +77 -0
- package/light-chaser-app/src/pages/login/ServiceTerms.tsx +118 -0
- package/light-chaser-app/src/pages/login/bg.png +0 -0
- package/light-chaser-app/src/pages/preview/DesignerViewPage.tsx +18 -0
- package/light-chaser-app/src/pages/release/DesignerReleasePage.tsx +19 -0
- package/light-chaser-app/src/pages/result/Error.tsx +24 -0
- package/light-chaser-app/src/pages/result/NoAuth.tsx +24 -0
- package/light-chaser-app/src/pages/result/NotFound.tsx +24 -0
- package/light-chaser-app/src/pureRelease/home/PureHome.less +100 -0
- package/light-chaser-app/src/pureRelease/home/PureHome.tsx +90 -0
- package/light-chaser-app/src/pureRelease/index.less +335 -0
- package/light-chaser-app/src/pureRelease/index.tsx +59 -0
- package/light-chaser-app/src/pureRelease/list/PureList.less +173 -0
- package/light-chaser-app/src/pureRelease/list/PureList.tsx +118 -0
- package/light-chaser-app/src/pureRelease/release/PureRelease.less +41 -0
- package/light-chaser-app/src/pureRelease/release/PureRelease.tsx +53 -0
- package/light-chaser-app/src/router/AuthGuard.tsx +48 -0
- package/light-chaser-app/src/router/router.tsx +76 -0
- package/light-chaser-app/src/test/Demo.tsx +22 -0
- package/light-chaser-app/src/test/DemoMain.less +47 -0
- package/light-chaser-app/src/test/DemoStore.ts +51 -0
- package/light-chaser-app/src/test/alone-store-demo/AloneStore.ts +28 -0
- package/light-chaser-app/src/test/alone-store-demo/TestStoreA.tsx +28 -0
- package/light-chaser-app/src/test/alone-store-demo/TestStoreB.tsx +28 -0
- package/light-chaser-app/src/test/canvas-grid-animation/CanvasGridAnimation.tsx +59 -0
- package/light-chaser-app/src/test/drag-demo/LayerDemo.less +35 -0
- package/light-chaser-app/src/test/drag-demo/LayerDemo.tsx +53 -0
- package/light-chaser-app/src/test/drag-demo/LayerDemoStore.ts +33 -0
- package/light-chaser-app/src/test/drag-demo/MovableDemo.tsx +77 -0
- package/light-chaser-app/src/test/drag-demo/SelectableDemo.tsx +75 -0
- package/light-chaser-app/src/test/other-designer/_demo.js +99 -0
- package/light-chaser-app/src/test/test-json-schema/JsonSchemaDemo.tsx +120 -0
- package/light-chaser-app/src/theme/AntdTheme.ts +1285 -0
- package/light-chaser-app/src/theme/default.less +41 -0
- package/light-chaser-app/src/util/AuthFetchUtil.ts +37 -0
- package/light-chaser-app/src/util/BoundsValidatorUtil.ts +27 -0
- package/light-chaser-app/src/util/ControllerUtil.ts +14 -0
- package/light-chaser-app/src/util/CoordinateUtil.ts +105 -0
- package/light-chaser-app/src/util/DataUtil.ts +111 -0
- package/light-chaser-app/src/util/DomUtil.ts +57 -0
- package/light-chaser-app/src/util/EnvUtil.ts +27 -0
- package/light-chaser-app/src/util/FetchUtil.ts +193 -0
- package/light-chaser-app/src/util/HybridCryptoUtil.ts +137 -0
- package/light-chaser-app/src/util/LogoUtil.ts +34 -0
- package/light-chaser-app/src/util/ProjectUtil.ts +209 -0
- package/light-chaser-app/src/util/RequestAnimationFrameUtil.ts +31 -0
- package/light-chaser-app/src/util/TextUtil.ts +63 -0
- package/light-chaser-app/src/util/Tooles.ts +45 -0
- package/light-chaser-app/src/vite-env.d.ts +53 -0
- package/light-chaser-app/tsconfig.json +40 -0
- package/light-chaser-app/tsconfig.node.json +15 -0
- package/light-chaser-app/vite.base.config.ts +23 -0
- package/light-chaser-app/vite.build.config.ts +18 -0
- package/light-chaser-app/vite.dev.config.ts +43 -0
- package/light-chaser-app/vite.pure.release.config.ts +41 -0
- package/light-chaser-cli/bin/index.js +176 -0
- package/light-chaser-cli/config/vite.config.dev.js +24 -0
- package/light-chaser-cli/config/vite.config.prod.js +47 -0
- package/light-chaser-cli/package.json +41 -0
- package/light-chaser-cli/page/index.html +36 -0
- package/light-chaser-cli/pnpm-lock.yaml +494 -0
- package/light-chaser-cli/template/index.html +35 -0
- package/light-chaser-cli/template/package.json +38 -0
- package/light-chaser-cli/template/src/components/remote-button/base-button.png +0 -0
- package/light-chaser-cli/template/src/components/remote-button/component.module.less +105 -0
- package/light-chaser-cli/template/src/components/remote-button/component.tsx +82 -0
- package/light-chaser-cli/template/src/components/remote-button/config.tsx +179 -0
- package/light-chaser-cli/template/src/components/remote-button/controller.ts +108 -0
- package/light-chaser-cli/template/src/components/remote-button/definition.ts +125 -0
- package/light-chaser-cli/template/src/index.module.less +89 -0
- package/light-chaser-cli/template/src/index.tsx +140 -0
- package/light-chaser-cli/template/src/vite-env.d.ts +22 -0
- package/light-chaser-cli/template/tsconfig.json +39 -0
- package/light-chaser-cli/template/tsconfig.node.json +11 -0
- package/light-chaser-interface/README.md +3 -0
- package/light-chaser-interface/lib/AbstractController.ts +69 -0
- package/light-chaser-interface/lib/AbstractDefinition.ts +84 -0
- package/light-chaser-interface/lib/AbstractDesignerController.ts +80 -0
- package/light-chaser-interface/lib/AbstractDesignerDefinition.ts +71 -0
- package/light-chaser-interface/lib/BPExecutor.ts +28 -0
- package/light-chaser-interface/lib/ConfigComponents.tsx +40 -0
- package/light-chaser-interface/lib/main.ts +17 -0
- package/light-chaser-interface/package.json +46 -0
- package/light-chaser-interface/tsconfig-build.json +6 -0
- package/light-chaser-interface/tsconfig.json +40 -0
- package/light-chaser-interface/tsconfig.node.json +15 -0
- package/light-chaser-interface/vite.config.ts +22 -0
- package/light-chaser-types/package.json +38 -0
- package/light-chaser-types/tsconfig-build.json +6 -0
- package/light-chaser-types/tsconfig.json +41 -0
- package/light-chaser-types/tsconfig.node.json +12 -0
- package/light-chaser-types/types/BluePrintTypes.ts +85 -0
- package/light-chaser-types/types/CanvasTypes.ts +33 -0
- package/light-chaser-types/types/ComponentTypes.ts +100 -0
- package/light-chaser-types/types/DataSourceTypes.ts +96 -0
- package/light-chaser-types/types/DesignerToolsTypes.ts +18 -0
- package/light-chaser-types/types/DesignerTypes.ts +136 -0
- package/light-chaser-types/types/FilterTypes.ts +44 -0
- package/light-chaser-types/types/GlobalVariableTypes.ts +43 -0
- package/light-chaser-types/types/LayerTypes.ts +90 -0
- package/light-chaser-types/types/ReleaseTypes.ts +22 -0
- package/light-chaser-types/types/ThemeTypes.ts +34 -0
- package/light-chaser-types/types/main.ts +69 -0
- package/light-chaser-types/vite.config.ts +14 -0
- package/light-chaser-ui/index.html +24 -0
- package/light-chaser-ui/lib/accordion/Accordion.less +158 -0
- package/light-chaser-ui/lib/accordion/Accordion.tsx +43 -0
- package/light-chaser-ui/lib/accordion/IAccordionType.ts +35 -0
- package/light-chaser-ui/lib/accordion/SubAccordion.tsx +44 -0
- package/light-chaser-ui/lib/button/Button.tsx +37 -0
- package/light-chaser-ui/lib/card-panel/CardPanel.less +32 -0
- package/light-chaser-ui/lib/card-panel/CardPanel.tsx +36 -0
- package/light-chaser-ui/lib/checkbox/CheckBox.tsx +42 -0
- package/light-chaser-ui/lib/code-editor/CodeEditor.tsx +55 -0
- package/light-chaser-ui/lib/code-editor/FullEditor.tsx +45 -0
- package/light-chaser-ui/lib/code-editor/MonacoEditor.less +35 -0
- package/light-chaser-ui/lib/code-editor/MonacoEditor.tsx +83 -0
- package/light-chaser-ui/lib/color-mode/ColorMode.less +20 -0
- package/light-chaser-ui/lib/color-mode/ColorMode.tsx +80 -0
- package/light-chaser-ui/lib/color-picker/ColorPicker.less +104 -0
- package/light-chaser-ui/lib/color-picker/ColorPicker.tsx +315 -0
- package/light-chaser-ui/lib/color-picker/RecentColors.ts +46 -0
- package/light-chaser-ui/lib/colors-picker/ColorsPicker.less +77 -0
- package/light-chaser-ui/lib/colors-picker/ColorsPicker.tsx +78 -0
- package/light-chaser-ui/lib/control-group/ControlGroup.less +49 -0
- package/light-chaser-ui/lib/control-group/ControlGroup.tsx +101 -0
- package/light-chaser-ui/lib/frame-layout/FrameLayout.less +47 -0
- package/light-chaser-ui/lib/frame-layout/FrameLayout.tsx +42 -0
- package/light-chaser-ui/lib/grid/Grid.less +20 -0
- package/light-chaser-ui/lib/grid/Grid.tsx +33 -0
- package/light-chaser-ui/lib/group-button/GroupButton.less +52 -0
- package/light-chaser-ui/lib/group-button/GroupButton.tsx +54 -0
- package/light-chaser-ui/lib/gui/GUITheme.ts +547 -0
- package/light-chaser-ui/lib/gui/LCGUI.tsx +186 -0
- package/light-chaser-ui/lib/gui/LCGUIUtil.ts +108 -0
- package/light-chaser-ui/lib/imag-upload/ImageUpload.less +26 -0
- package/light-chaser-ui/lib/imag-upload/ImageUpload.tsx +102 -0
- package/light-chaser-ui/lib/input/Input.tsx +48 -0
- package/light-chaser-ui/lib/input/NumberInput.tsx +52 -0
- package/light-chaser-ui/lib/loading/Loading.less +211 -0
- package/light-chaser-ui/lib/loading/Loading.tsx +38 -0
- package/light-chaser-ui/lib/main.ts +71 -0
- package/light-chaser-ui/lib/message/GlobalMessage.tsx +44 -0
- package/light-chaser-ui/lib/message/GlobalModal.tsx +44 -0
- package/light-chaser-ui/lib/radio/Radio.tsx +53 -0
- package/light-chaser-ui/lib/searchable-select/SearchableSelect.tsx +239 -0
- package/light-chaser-ui/lib/select/Select.tsx +89 -0
- package/light-chaser-ui/lib/slider/Slider.tsx +51 -0
- package/light-chaser-ui/lib/switch/Switch.tsx +42 -0
- package/light-chaser-ui/lib/text-area/TextArea.tsx +49 -0
- package/light-chaser-ui/lib/text-only/TextOnly.tsx +25 -0
- package/light-chaser-ui/lib/types.ts +257 -0
- package/light-chaser-ui/lib/ui-container/UIContainer.less +44 -0
- package/light-chaser-ui/lib/ui-container/UIContainer.tsx +40 -0
- package/light-chaser-ui/lib/ui-map.ts +59 -0
- package/light-chaser-ui/package.json +57 -0
- package/light-chaser-ui/public/favicon.ico +0 -0
- package/light-chaser-ui/src/test.tsx +24 -0
- package/light-chaser-ui/tsconfig-build.json +6 -0
- package/light-chaser-ui/tsconfig.json +42 -0
- package/light-chaser-ui/tsconfig.node.json +12 -0
- package/light-chaser-ui/vite.config.ts +25 -0
- package/light-chaser-util/lib/AuthTools.ts +75 -0
- package/light-chaser-util/lib/Base64Util.ts +31 -0
- package/light-chaser-util/lib/ColorUtil.ts +110 -0
- package/light-chaser-util/lib/ComponentUtil.ts +45 -0
- package/light-chaser-util/lib/FileUtil.ts +49 -0
- package/light-chaser-util/lib/IdGenerate.ts +23 -0
- package/light-chaser-util/lib/ObjectUtil.ts +130 -0
- package/light-chaser-util/lib/SafeEvalUtil.ts +63 -0
- package/light-chaser-util/lib/URLUtil.ts +27 -0
- package/light-chaser-util/lib/main.ts +21 -0
- package/light-chaser-util/package.json +40 -0
- package/light-chaser-util/src/test.ts +12 -0
- package/light-chaser-util/tsconfig-build.json +6 -0
- package/light-chaser-util/tsconfig.json +36 -0
- package/light-chaser-util/vite.config.ts +18 -0
- package/package.json +12 -0
- package/pnpm-workspace.yaml +7 -0
- package/prompt/UI/344/274/230/345/214/226/346/217/220/347/244/272/350/257/215.md +144 -0
- package/prompt//347/273/204/344/273/266/345/274/200/345/217/221/346/217/220/347/244/272/350/257/215.md +1090 -0
- package/prompt//351/200/273/350/276/221/344/274/230/345/214/226/346/217/220/347/244/272/350/257/215.md +98 -0
- package/prompt//351/205/215/347/275/256/351/241/271/347/224/237/346/210/220/345/267/245/344/275/234/346/265/201.md +401 -0
|
@@ -0,0 +1,871 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2023-2025 puyinzhen
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
|
|
6
|
+
*
|
|
7
|
+
* This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
|
|
8
|
+
*
|
|
9
|
+
* For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import eventOperateStore from "../EventOperateStore";
|
|
13
|
+
import {cloneDeep, throttle} from "lodash";
|
|
14
|
+
import {historyOperator} from "../undo-redo/HistoryOperator";
|
|
15
|
+
import historyRecordOperateProxy from "../undo-redo/HistoryRecordOperateProxy";
|
|
16
|
+
import undoRedoMap from "../undo-redo/core";
|
|
17
|
+
import runtimeConfigStore from "../../store/RuntimeStore.ts";
|
|
18
|
+
import footerStore from "../../footer/FooterStore";
|
|
19
|
+
import bpLeftStore from "../../../designer/blueprint/left/BPLeftStore";
|
|
20
|
+
import layerListStore from "../../left/layer-list/LayerListStore.ts";
|
|
21
|
+
import {globalMessage} from "light-chaser-ui/lib/message/GlobalMessage.tsx";
|
|
22
|
+
import baseApi from "../../../api/engineering/BaseApi.ts";
|
|
23
|
+
import {ILayerItem} from "light-chaser-types/types/LayerTypes.ts";
|
|
24
|
+
import {IProjectInfoManager} from "light-chaser-types/types/DesignerTypes.ts";
|
|
25
|
+
import componentDataGvParser from "../../left/global-variable/parse/ComponentDataGvParser.ts";
|
|
26
|
+
import BpCanvasUtil from "../../blueprint/util/BpCanvasUtil.ts";
|
|
27
|
+
import AuthFetchUtil from "../../../util/AuthFetchUtil.ts";
|
|
28
|
+
import CoordinateUtil from "../../../util/CoordinateUtil.ts";
|
|
29
|
+
import {globalModal} from "light-chaser-ui/lib/message/GlobalModal.tsx";
|
|
30
|
+
import {createElement} from "react";
|
|
31
|
+
import {Button, Form, FormInstance, Input, Upload} from "antd";
|
|
32
|
+
import TextUtil from "../../../util/TextUtil.ts";
|
|
33
|
+
import managerStore from "../../manager/ManagerStore.ts";
|
|
34
|
+
import designerHeaderStore from "../../header/DesignerHeaderStore.ts";
|
|
35
|
+
import rightStore from "../../right/RightStore.ts";
|
|
36
|
+
import ProjectUtil from "../../../util/ProjectUtil.ts";
|
|
37
|
+
import NProgress from "nprogress";
|
|
38
|
+
import LayerUtil from "../../left/layer-list/util/LayerUtil.ts";
|
|
39
|
+
|
|
40
|
+
export const selectAll = () => {
|
|
41
|
+
const {layerConfigs} = window.LC_ENV.currentManager.layerManager;
|
|
42
|
+
const {setTargetIds, setGroupCoordinate} = eventOperateStore;
|
|
43
|
+
const selected = [];
|
|
44
|
+
for (const id in layerConfigs) {
|
|
45
|
+
const item = layerConfigs[id];
|
|
46
|
+
if (!item.hide)
|
|
47
|
+
selected.push(id);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (selected.length > 0) {
|
|
51
|
+
setTargetIds(selected as string[]);
|
|
52
|
+
const coordinate = CoordinateUtil.calculateGroupRect(selected, layerConfigs);
|
|
53
|
+
setGroupCoordinate(coordinate);
|
|
54
|
+
const elems = selected.map(id => {
|
|
55
|
+
return document.getElementById(id)
|
|
56
|
+
}).filter(item => !!item);
|
|
57
|
+
eventOperateStore.selectorRef?.setSelectedTargets(elems);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 克隆组件
|
|
63
|
+
*/
|
|
64
|
+
export const doClone = () => {
|
|
65
|
+
const {targetIds, setTargetIds} = eventOperateStore;
|
|
66
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
67
|
+
|
|
68
|
+
const newIds = historyRecordOperateProxy.doClone(targetIds);
|
|
69
|
+
//延迟10毫秒,等待dom元素渲染完毕后再获取。
|
|
70
|
+
const tempTimer = setTimeout(() => {
|
|
71
|
+
setTargetIds(newIds);
|
|
72
|
+
//复制成功后计算组件数据配置是否与全局变量绑定,此时复制的时候还没有完成controller的创建,因此将绑定操作延迟到后面的事件循环后再绑定
|
|
73
|
+
if (newIds.length > 0)
|
|
74
|
+
componentDataGvParser.bindConfigToGvById(newIds);
|
|
75
|
+
clearTimeout(tempTimer);
|
|
76
|
+
}, 10);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 粘贴
|
|
81
|
+
*/
|
|
82
|
+
export const doPaste = (data: string) => {
|
|
83
|
+
if (!data || !data.includes('LCP_COPY'))
|
|
84
|
+
return;
|
|
85
|
+
const template = JSON.parse(data);
|
|
86
|
+
if (template && template.flag === 'LCP_COPY' && template.layers) {
|
|
87
|
+
const {canvasManager} = window.LC_ENV.currentManager;
|
|
88
|
+
//恢复组件位置
|
|
89
|
+
Object.keys(template.layers).forEach(layerId => {
|
|
90
|
+
const layer = template.layers[layerId];
|
|
91
|
+
const {width = 0, height = 0} = canvasManager?.canvasConfig ?? {width: 0, height: 0};
|
|
92
|
+
if (layer && layer.type !== 'group') {
|
|
93
|
+
layer.x = Math.round((width / 2) + (layer?.x ?? 0));
|
|
94
|
+
layer.y = Math.round((height / 2) + (layer?.y ?? 0));
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
historyRecordOperateProxy.doUseTemplate(template);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 复制
|
|
103
|
+
*/
|
|
104
|
+
export const doCopy = () => {
|
|
105
|
+
const {targetIds} = eventOperateStore;
|
|
106
|
+
if (!targetIds || targetIds.length === 0)
|
|
107
|
+
return;
|
|
108
|
+
//筛选出图层和组件配置
|
|
109
|
+
const tempData: {
|
|
110
|
+
flag: string,
|
|
111
|
+
layers: { [key: string]: ILayerItem },
|
|
112
|
+
configs: { [key: string]: any }
|
|
113
|
+
} = {flag: 'LCP_COPY', layers: {}, configs: {}};
|
|
114
|
+
const {layerConfigs, controllers} = window.LC_ENV.currentManager.layerManager;
|
|
115
|
+
//计算基准坐标
|
|
116
|
+
const baseCoordinate = CoordinateUtil.calculateGroupRectLT(targetIds, layerConfigs);
|
|
117
|
+
targetIds.forEach(id => {
|
|
118
|
+
let layer = layerConfigs[id];
|
|
119
|
+
if (layer) {
|
|
120
|
+
layer = cloneDeep(layer);
|
|
121
|
+
if (layer.type !== 'group') {
|
|
122
|
+
//计算相对位置
|
|
123
|
+
const {minX, minY} = baseCoordinate;
|
|
124
|
+
layer.x = layer.x! - minX;
|
|
125
|
+
layer.y = layer.y! - minY;
|
|
126
|
+
}
|
|
127
|
+
layer.lock = false;
|
|
128
|
+
tempData['layers'][id] = layer;
|
|
129
|
+
}
|
|
130
|
+
const controller = controllers[id];
|
|
131
|
+
if (controller)
|
|
132
|
+
tempData['configs'][id] = controller.getConfig();
|
|
133
|
+
});
|
|
134
|
+
TextUtil.copyToClipboard(JSON.stringify(tempData)).then(() => globalMessage.messageApi?.success('组件已复制到剪贴板'));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export const doLock = () => {
|
|
138
|
+
const {targetIds, setTargetIds} = eventOperateStore;
|
|
139
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
140
|
+
const {layerConfigs} = window.LC_ENV.currentManager.layerManager;
|
|
141
|
+
const toBeUpdate = [];
|
|
142
|
+
for (const targetId of targetIds) {
|
|
143
|
+
const item = layerConfigs[targetId];
|
|
144
|
+
toBeUpdate.push({...item, lock: true})
|
|
145
|
+
}
|
|
146
|
+
historyRecordOperateProxy.doLockUpd(toBeUpdate);
|
|
147
|
+
//操作完毕之后,清空已被选择的元素。
|
|
148
|
+
setTargetIds([]);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export const doUnLock = () => {
|
|
152
|
+
const {setTargetIds, targetIds} = eventOperateStore;
|
|
153
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
154
|
+
const {layerConfigs} = window.LC_ENV.currentManager.layerManager;
|
|
155
|
+
const toUpdate: ILayerItem[] = [];
|
|
156
|
+
targetIds.filter(id => {
|
|
157
|
+
//过滤出被锁定的组件
|
|
158
|
+
return layerConfigs[id].lock;
|
|
159
|
+
}).forEach((id) => {
|
|
160
|
+
toUpdate.push({id, lock: false})
|
|
161
|
+
})
|
|
162
|
+
historyRecordOperateProxy.doLockUpd(toUpdate);
|
|
163
|
+
setTargetIds([]);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export const layerToTop = () => {
|
|
167
|
+
historyRecordOperateProxy.doLayerToTop();
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const layerToBottom = () => {
|
|
171
|
+
historyRecordOperateProxy.doLayerToBottom();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export const layerMoveUp = () => {
|
|
175
|
+
historyRecordOperateProxy.doLayerMoveUp();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export const layerMoveDown = () => {
|
|
179
|
+
historyRecordOperateProxy.doLayerMoveDown();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const deleteLayers = (targetIds: string[]) => {
|
|
183
|
+
if (targetIds && targetIds.length > 0) {
|
|
184
|
+
const {delNodeEveryPage, currentPageManager} = window.LC_ENV.currentManager.bluePrintManager!;
|
|
185
|
+
const {bpNodeLayoutMap} = currentPageManager!;
|
|
186
|
+
const preDelNodeIds: string[] = [];
|
|
187
|
+
targetIds.forEach((id: string) => {
|
|
188
|
+
if (bpNodeLayoutMap[id])
|
|
189
|
+
preDelNodeIds.push(id);
|
|
190
|
+
});
|
|
191
|
+
if (preDelNodeIds.length > 0)
|
|
192
|
+
delNodeEveryPage(preDelNodeIds);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
//删除设计器中的组件,并记录到历史操作
|
|
196
|
+
historyRecordOperateProxy.doDelete(targetIds);
|
|
197
|
+
//被删除的组件要同时接触组件配置和全局变量的绑定关系
|
|
198
|
+
componentDataGvParser.unbindFromGv(targetIds);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const doDelete = () => {
|
|
202
|
+
//如果蓝图中使用了当前要被删除的组件,则需要先删除蓝图中的组件和连线,且蓝图中的删除操作目前无法回退
|
|
203
|
+
const {targetIds} = eventOperateStore;
|
|
204
|
+
deleteLayers(targetIds);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
//保存函数节流5s, 5s内不可重复保存
|
|
208
|
+
export const throttleSave = throttle(async () => doSave(), 5000, {trailing: false});
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 获取保存数据
|
|
212
|
+
*/
|
|
213
|
+
export const getSaveData = (): IProjectInfoManager | null => {
|
|
214
|
+
const manager = managerStore.currentFinalManager;
|
|
215
|
+
const {id} = manager!;
|
|
216
|
+
const proData = manager?.getData();
|
|
217
|
+
if (!id || !proData)
|
|
218
|
+
return null;
|
|
219
|
+
return {
|
|
220
|
+
id: id!,
|
|
221
|
+
dataJson: ProjectUtil.serializeProjectData(proData),
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export const doSave = async () => {
|
|
226
|
+
NProgress.configure({minimum: 0.5});
|
|
227
|
+
NProgress.start();
|
|
228
|
+
footerStore.setSaving(true)
|
|
229
|
+
const projectInfo = getSaveData();
|
|
230
|
+
if (!projectInfo) {
|
|
231
|
+
globalMessage.messageApi?.error('保存失败');
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const result = await baseApi.updateProject(projectInfo);
|
|
235
|
+
if (!result)
|
|
236
|
+
globalMessage.messageApi?.error('保存失败');
|
|
237
|
+
footerStore.latestSaveTime = new Date().toLocaleTimeString();
|
|
238
|
+
footerStore.setSaving(false)
|
|
239
|
+
NProgress.done()
|
|
240
|
+
return result;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export const doHide = () => {
|
|
244
|
+
const {targetIds, setTargetIds} = eventOperateStore;
|
|
245
|
+
if (!targetIds || targetIds.length === 0)
|
|
246
|
+
return;
|
|
247
|
+
historyRecordOperateProxy.doHideUpd(targetIds, true);
|
|
248
|
+
setTargetIds([]);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* 图层编组,
|
|
253
|
+
* 编组时候,如果都是普通组件图层,则直接编组
|
|
254
|
+
* 如果包含了已经分组的图层,则将将已经编组的这个组作为基本图层和其他图层进行编组,
|
|
255
|
+
* 比如有A,B,C三个普通图层,则编组的时候可直接生成编组G
|
|
256
|
+
* 如果A,B已经编组为G1,此时再选中A,C或B,C,或者A,B,C,则编组的时候,G1作为基本图层,和C进行编组,生成G2
|
|
257
|
+
*/
|
|
258
|
+
export const doGrouping = () => {
|
|
259
|
+
historyRecordOperateProxy.doGrouping();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export const doUnGrouping = () => {
|
|
263
|
+
historyRecordOperateProxy.doUnGrouping();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
export const removeFromGroup = () => {
|
|
268
|
+
historyRecordOperateProxy.doRemoveFromGroup();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export const cleanEmptyGroupings = () => {
|
|
272
|
+
const {layerConfigs} = window.LC_ENV.currentManager.layerManager;
|
|
273
|
+
const emptyGroupIdArr = LayerUtil.findEmptyGrouping(Object.values(layerConfigs));
|
|
274
|
+
deleteLayers(emptyGroupIdArr);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/*************************快捷键控制移动组件的位置*************************/
|
|
278
|
+
|
|
279
|
+
export const doMoveUp = () => {
|
|
280
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
281
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
282
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
283
|
+
const {layerConfigs} = layerManager;
|
|
284
|
+
const {canvasConfig: {dragStep = 1}} = canvasManager!;
|
|
285
|
+
let yPos;
|
|
286
|
+
if (targetIds.length === 1) {
|
|
287
|
+
const id = targetIds[0];
|
|
288
|
+
yPos = (layerConfigs[id].y || 0) - dragStep;
|
|
289
|
+
} else {
|
|
290
|
+
yPos = (groupCoordinate?.minY || 0) - dragStep;
|
|
291
|
+
}
|
|
292
|
+
movableRef?.request("draggable", {y: yPos}, true);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export const doMoveDown = () => {
|
|
296
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
297
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
298
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
299
|
+
const {layerConfigs} = layerManager;
|
|
300
|
+
const {canvasConfig: {dragStep = 1}} = canvasManager!;
|
|
301
|
+
if (targetIds.length === 1) {
|
|
302
|
+
const id = targetIds[0];
|
|
303
|
+
const yPos = layerConfigs[id].y! + dragStep;
|
|
304
|
+
movableRef?.request("draggable", {y: yPos}, true);
|
|
305
|
+
} else {
|
|
306
|
+
const yPos = (groupCoordinate?.minY ?? Infinity) + dragStep;
|
|
307
|
+
movableRef?.request("draggable", {y: yPos}, true);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export const doMoveLeft = () => {
|
|
312
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
313
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
314
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
315
|
+
const {layerConfigs} = layerManager;
|
|
316
|
+
const {canvasConfig: {dragStep = 1}} = canvasManager!;
|
|
317
|
+
if (targetIds.length === 1) {
|
|
318
|
+
const id = targetIds[0];
|
|
319
|
+
const xPos = layerConfigs[id].x!;
|
|
320
|
+
movableRef?.request("draggable", {x: xPos - dragStep}, true);
|
|
321
|
+
} else {
|
|
322
|
+
const xPos = (groupCoordinate?.minX ?? Infinity) - dragStep;
|
|
323
|
+
movableRef?.request("draggable", {x: xPos}, true);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export const doMoveRight = () => {
|
|
328
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
329
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
330
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
331
|
+
const {layerConfigs} = layerManager;
|
|
332
|
+
const {canvasConfig: {dragStep = 1}} = canvasManager!;
|
|
333
|
+
if (targetIds.length === 1) {
|
|
334
|
+
const id = targetIds[0];
|
|
335
|
+
const xPos = layerConfigs[id].x!;
|
|
336
|
+
movableRef?.request("draggable", {x: xPos + dragStep}, true);
|
|
337
|
+
} else {
|
|
338
|
+
const xPos = (groupCoordinate?.minX ?? Infinity) + dragStep;
|
|
339
|
+
movableRef?.request("draggable", {x: xPos}, true);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/*************************快捷键控制缩放组件尺寸*************************/
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* 以底部为基准向上扩大
|
|
347
|
+
*/
|
|
348
|
+
export const doBaseBottomEnlargeUp = () => {
|
|
349
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
350
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
351
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
352
|
+
const {layerConfigs} = layerManager;
|
|
353
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
354
|
+
let height;
|
|
355
|
+
if (targetIds.length === 1) {
|
|
356
|
+
const id = targetIds[0];
|
|
357
|
+
height = layerConfigs[id].height! + resizeStep;
|
|
358
|
+
} else {
|
|
359
|
+
height = groupCoordinate.height! + resizeStep;
|
|
360
|
+
}
|
|
361
|
+
movableRef?.request("resizable", {offsetHeight: height, direction: [1, -1]}, true);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* 以顶部为基准向下扩大
|
|
366
|
+
*/
|
|
367
|
+
export const doBaseUpEnlargeDown = () => {
|
|
368
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
369
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
370
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
371
|
+
const {layerConfigs} = layerManager;
|
|
372
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
373
|
+
let height;
|
|
374
|
+
if (targetIds.length === 1) {
|
|
375
|
+
const id = targetIds[0];
|
|
376
|
+
height = layerConfigs[id].height! + resizeStep;
|
|
377
|
+
} else {
|
|
378
|
+
height = groupCoordinate.height! + resizeStep;
|
|
379
|
+
}
|
|
380
|
+
movableRef?.request("resizable", {offsetHeight: height, direction: [1, 1]}, true);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* 以右边为基准向左扩大
|
|
385
|
+
*/
|
|
386
|
+
export const doBaseRightEnlargeLeft = () => {
|
|
387
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
388
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
389
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
390
|
+
const {layerConfigs} = layerManager;
|
|
391
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
392
|
+
let width;
|
|
393
|
+
if (targetIds.length === 1) {
|
|
394
|
+
const id = targetIds[0];
|
|
395
|
+
width = layerConfigs[id].width! + resizeStep;
|
|
396
|
+
} else {
|
|
397
|
+
width = groupCoordinate.width! + resizeStep;
|
|
398
|
+
}
|
|
399
|
+
movableRef?.request("resizable", {offsetWidth: width, direction: [-1, 1]}, true);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* 以左边为基准向右扩大
|
|
404
|
+
*/
|
|
405
|
+
export const doBaseLeftEnlargeRight = () => {
|
|
406
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
407
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
408
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
409
|
+
const {layerConfigs} = layerManager;
|
|
410
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
411
|
+
let width;
|
|
412
|
+
if (targetIds.length === 1) {
|
|
413
|
+
const id = targetIds[0];
|
|
414
|
+
width = layerConfigs[id].width! + resizeStep;
|
|
415
|
+
} else {
|
|
416
|
+
width = groupCoordinate.width! + resizeStep;
|
|
417
|
+
}
|
|
418
|
+
movableRef?.request("resizable", {offsetWidth: width, direction: [1, 1]}, true);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* 以底部为基准向上缩小
|
|
424
|
+
*/
|
|
425
|
+
export const doBaseBottomDecreaseUp = () => {
|
|
426
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
427
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
428
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
429
|
+
const {layerConfigs} = layerManager;
|
|
430
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
431
|
+
let height;
|
|
432
|
+
if (targetIds.length === 1) {
|
|
433
|
+
height = layerConfigs[targetIds[0]].height! - resizeStep;
|
|
434
|
+
} else {
|
|
435
|
+
height = groupCoordinate.height! - resizeStep;
|
|
436
|
+
}
|
|
437
|
+
movableRef?.request("resizable", {offsetHeight: height, direction: [1, -1]}, true);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* 以顶部为基准向下缩小
|
|
442
|
+
*/
|
|
443
|
+
export const doBaseUpDecreaseDown = () => {
|
|
444
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
445
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
446
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
447
|
+
const {layerConfigs} = layerManager;
|
|
448
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
449
|
+
let height;
|
|
450
|
+
if (targetIds.length === 1) {
|
|
451
|
+
const id = targetIds[0];
|
|
452
|
+
height = layerConfigs[id].height! - resizeStep;
|
|
453
|
+
} else {
|
|
454
|
+
height = groupCoordinate.height! - resizeStep;
|
|
455
|
+
}
|
|
456
|
+
movableRef?.request("resizable", {offsetHeight: height, direction: [1, 1]}, true);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* 以右边为基准向左缩小
|
|
461
|
+
*/
|
|
462
|
+
export const doBaseRightDecreaseLeft = () => {
|
|
463
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
464
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
465
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
466
|
+
const {layerConfigs} = layerManager;
|
|
467
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
468
|
+
let width;
|
|
469
|
+
if (targetIds.length === 1) {
|
|
470
|
+
const id = targetIds[0];
|
|
471
|
+
width = layerConfigs[id].width! - resizeStep;
|
|
472
|
+
} else {
|
|
473
|
+
width = groupCoordinate.width! - resizeStep;
|
|
474
|
+
}
|
|
475
|
+
movableRef?.request("resizable", {offsetWidth: width, direction: [-1, 1]}, true);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* 以左边为基准向右缩小
|
|
480
|
+
*/
|
|
481
|
+
export const doBaseLeftDecreaseRight = () => {
|
|
482
|
+
const {targetIds, movableRef, groupCoordinate} = eventOperateStore;
|
|
483
|
+
if (!targetIds || targetIds.length === 0) return;
|
|
484
|
+
const {layerManager, canvasManager} = window.LC_ENV.currentManager;
|
|
485
|
+
const {layerConfigs} = layerManager;
|
|
486
|
+
const {canvasConfig: {resizeStep = 1}} = canvasManager!;
|
|
487
|
+
let width;
|
|
488
|
+
if (targetIds.length === 1) {
|
|
489
|
+
const id = targetIds[0];
|
|
490
|
+
width = layerConfigs[id].width! - resizeStep;
|
|
491
|
+
} else {
|
|
492
|
+
width = groupCoordinate.width! - resizeStep;
|
|
493
|
+
}
|
|
494
|
+
movableRef?.request("resizable", {offsetWidth: width, direction: [1, 1]}, true);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* 组内左对齐
|
|
499
|
+
*/
|
|
500
|
+
export const groupLeftAligned = () => {
|
|
501
|
+
historyRecordOperateProxy.groupLeftAligned();
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* 组内右对齐
|
|
506
|
+
*/
|
|
507
|
+
export const groupRightAligned = () => {
|
|
508
|
+
historyRecordOperateProxy.groupRightAligned();
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* 组内上对齐
|
|
513
|
+
*/
|
|
514
|
+
export const groupTopAligned = () => {
|
|
515
|
+
historyRecordOperateProxy.groupTopAligned();
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* 组内下对齐
|
|
520
|
+
*/
|
|
521
|
+
export const groupBottomAligned = () => {
|
|
522
|
+
historyRecordOperateProxy.groupBottomAligned();
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* 撤销
|
|
527
|
+
*/
|
|
528
|
+
export const undo = () => {
|
|
529
|
+
const history = historyOperator.backoff();
|
|
530
|
+
if (!history) return;
|
|
531
|
+
const {actions} = history!;
|
|
532
|
+
actions.forEach(action => {
|
|
533
|
+
const {type} = action!;
|
|
534
|
+
undoRedoMap.get(type)?.undo(action!);
|
|
535
|
+
})
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* 重做
|
|
540
|
+
*/
|
|
541
|
+
export const redo = () => {
|
|
542
|
+
const history = historyOperator.forward();
|
|
543
|
+
if (!history) return;
|
|
544
|
+
const {actions} = history!;
|
|
545
|
+
actions.forEach(action => {
|
|
546
|
+
const {type} = action!;
|
|
547
|
+
undoRedoMap.get(type)?.redo(action!);
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
/*************************运行时配置快捷键*************************/
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* 切换辅助线展示
|
|
556
|
+
*/
|
|
557
|
+
export const toggleSecondaryBorder = () => {
|
|
558
|
+
const {auxiliaryBorder, setAuxiliaryBorder} = runtimeConfigStore;
|
|
559
|
+
const newValue = !auxiliaryBorder;
|
|
560
|
+
if (newValue) {
|
|
561
|
+
//展示辅助线
|
|
562
|
+
const compContainers = document.getElementsByClassName('lc-comp-item')
|
|
563
|
+
compContainers && Array.from(compContainers).forEach((compContainer: Element) => {
|
|
564
|
+
(compContainer as HTMLElement).style.border = '1px solid #65eafc';
|
|
565
|
+
});
|
|
566
|
+
} else {
|
|
567
|
+
//隐藏辅助线
|
|
568
|
+
const compContainers = document.getElementsByClassName('lc-comp-item')
|
|
569
|
+
compContainers && Array.from(compContainers).forEach((compContainer: Element) => {
|
|
570
|
+
(compContainer as HTMLElement).style.border = 'none';
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
setAuxiliaryBorder(!auxiliaryBorder);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* 切换项目设置弹框
|
|
578
|
+
*/
|
|
579
|
+
export const toggleProjectConfig = () => {
|
|
580
|
+
const {currentKey, setCurrentKey} = designerHeaderStore;
|
|
581
|
+
if (currentKey === 'project')
|
|
582
|
+
setCurrentKey('')
|
|
583
|
+
else
|
|
584
|
+
setCurrentKey('project')
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* 切换画布设置弹框
|
|
589
|
+
*/
|
|
590
|
+
export const toggleCanvasConfig = () => {
|
|
591
|
+
const {currentKey, setCurrentKey} = designerHeaderStore;
|
|
592
|
+
if (currentKey === 'canvas')
|
|
593
|
+
setCurrentKey('')
|
|
594
|
+
else
|
|
595
|
+
setCurrentKey('canvas')
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* 切换全局主题设置弹框
|
|
600
|
+
*/
|
|
601
|
+
export const toggleGlobalThemeConfig = () => {
|
|
602
|
+
const {currentKey, setCurrentKey} = designerHeaderStore;
|
|
603
|
+
if (currentKey === 'theme')
|
|
604
|
+
setCurrentKey('')
|
|
605
|
+
else
|
|
606
|
+
setCurrentKey('theme')
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* 切换快捷键说明弹框
|
|
611
|
+
*/
|
|
612
|
+
export const toggleHotKeyDes = () => {
|
|
613
|
+
const {hotKeyVisible, setHotKeyVisible} = footerStore;
|
|
614
|
+
setHotKeyVisible(!hotKeyVisible)
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export const exportProject = () => {
|
|
618
|
+
globalMessage.messageApi?.open({
|
|
619
|
+
key: 'exportProject',
|
|
620
|
+
type: 'loading',
|
|
621
|
+
content: '正在导出项目数据,需要一些时间,请耐心等候...',
|
|
622
|
+
duration: 0,
|
|
623
|
+
})
|
|
624
|
+
const timeout = setTimeout(() => {
|
|
625
|
+
//1. 计算当前项目所依赖的外部资源
|
|
626
|
+
const dependency = ProjectUtil.calculateProjectDependency(managerStore.currentFinalManager!.getData());
|
|
627
|
+
//2. 将项目数据及外部资源数据一起发送至后端并生成下载链接
|
|
628
|
+
AuthFetchUtil.post<Blob>('/api/export/exportProject', dependency).then((res) => {
|
|
629
|
+
if (res !== null) {
|
|
630
|
+
//3. 自动下载后端生成的压缩包
|
|
631
|
+
const url = URL.createObjectURL(res);
|
|
632
|
+
const a = document.createElement('a')
|
|
633
|
+
a.href = url;
|
|
634
|
+
a.download = `${document.title}.zip`;
|
|
635
|
+
a.click();
|
|
636
|
+
URL.revokeObjectURL(url);
|
|
637
|
+
globalMessage.messageApi?.success('项目数据导出成功');
|
|
638
|
+
}
|
|
639
|
+
globalMessage.messageApi?.destroy("exportProject");
|
|
640
|
+
});
|
|
641
|
+
clearTimeout(timeout);
|
|
642
|
+
}, 1000);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export const importProject = () => {
|
|
646
|
+
//打开文件选择框
|
|
647
|
+
const input = document.createElement('input');
|
|
648
|
+
input.type = 'file';
|
|
649
|
+
input.accept = '.zip';
|
|
650
|
+
input.onchange = (e: any) => {
|
|
651
|
+
globalMessage.messageApi?.open({
|
|
652
|
+
key: 'importProject',
|
|
653
|
+
type: 'loading',
|
|
654
|
+
content: '正在导入项目数据...'
|
|
655
|
+
})
|
|
656
|
+
const file = e.target.files[0] as File;
|
|
657
|
+
if (!file)
|
|
658
|
+
return;
|
|
659
|
+
|
|
660
|
+
const currFinalManager = managerStore.currentFinalManager;
|
|
661
|
+
const formData = new FormData();
|
|
662
|
+
formData.append('file', file);
|
|
663
|
+
formData.append('projectId', currFinalManager?.id ?? '');
|
|
664
|
+
AuthFetchUtil.post<boolean>('/api/import/importProject', formData, {headers: {'Content-Type': 'multipart/form-data'}}).then((res) => {
|
|
665
|
+
const timer = setTimeout(() => {
|
|
666
|
+
clearTimeout(timer);
|
|
667
|
+
globalMessage.messageApi?.destroy("importProject");
|
|
668
|
+
if (res !== null) {
|
|
669
|
+
globalMessage.messageApi?.success({content: '项目数据导入成功, 将重新加载页面!', duration: 1}).then(() => location.reload());
|
|
670
|
+
}
|
|
671
|
+
}, 1000)
|
|
672
|
+
|
|
673
|
+
})
|
|
674
|
+
}
|
|
675
|
+
input.click();
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export const searchLayer = () => {
|
|
679
|
+
const {searchLayer, setSearchLayer} = layerListStore;
|
|
680
|
+
setSearchLayer(!searchLayer);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export const saveAsTemplate = () => {
|
|
684
|
+
const {targetIds} = eventOperateStore;
|
|
685
|
+
if (!targetIds || targetIds.length === 0)
|
|
686
|
+
return;
|
|
687
|
+
//筛选出图层和组件配置
|
|
688
|
+
const template: { layers: { [key: string]: ILayerItem }, configs: { [key: string]: any } } = {
|
|
689
|
+
layers: {},
|
|
690
|
+
configs: {}
|
|
691
|
+
};
|
|
692
|
+
const {layerConfigs, controllers} = window.LC_ENV.currentManager.layerManager;
|
|
693
|
+
//计算基准坐标
|
|
694
|
+
const baseCoordinate = CoordinateUtil.calculateGroupRectLT(targetIds, layerConfigs);
|
|
695
|
+
targetIds.forEach(id => {
|
|
696
|
+
let layer = layerConfigs[id];
|
|
697
|
+
if (layer) {
|
|
698
|
+
layer = cloneDeep(layer);
|
|
699
|
+
if (layer.type !== 'group') {
|
|
700
|
+
//计算相对位置
|
|
701
|
+
const {minX, minY} = baseCoordinate;
|
|
702
|
+
layer.x = layer.x! - minX;
|
|
703
|
+
layer.y = layer.y! - minY;
|
|
704
|
+
}
|
|
705
|
+
layer.lock = false;
|
|
706
|
+
template['layers'][id] = layer;
|
|
707
|
+
}
|
|
708
|
+
const controller = controllers[id];
|
|
709
|
+
if (controller)
|
|
710
|
+
template['configs'][id] = controller.getConfig();
|
|
711
|
+
});
|
|
712
|
+
let formInstance: FormInstance<{ name: string, description: string, coverFile: any }> | null = null;
|
|
713
|
+
globalModal.modalApi?.confirm({
|
|
714
|
+
title: '存为模板',
|
|
715
|
+
content: createElement(() => {
|
|
716
|
+
const [form] = Form.useForm();
|
|
717
|
+
formInstance = form;
|
|
718
|
+
|
|
719
|
+
return createElement(Form, {
|
|
720
|
+
form: form,
|
|
721
|
+
layout: 'vertical',
|
|
722
|
+
style: {marginTop: '16px'}
|
|
723
|
+
}, [
|
|
724
|
+
createElement(Form.Item, {
|
|
725
|
+
key: 'name',
|
|
726
|
+
label: '模板名称',
|
|
727
|
+
name: 'name',
|
|
728
|
+
rules: [{required: true, message: '请输入模板名称'}]
|
|
729
|
+
}, createElement(Input, {
|
|
730
|
+
placeholder: '请输入模板名称'
|
|
731
|
+
})),
|
|
732
|
+
|
|
733
|
+
createElement(Form.Item, {
|
|
734
|
+
key: 'description',
|
|
735
|
+
label: '模板描述',
|
|
736
|
+
name: 'description'
|
|
737
|
+
}, createElement(Input.TextArea, {
|
|
738
|
+
placeholder: '请输入模板描述',
|
|
739
|
+
rows: 3
|
|
740
|
+
})),
|
|
741
|
+
|
|
742
|
+
createElement(Form.Item, {
|
|
743
|
+
key: 'coverFile',
|
|
744
|
+
label: '封面图',
|
|
745
|
+
name: 'coverFile',
|
|
746
|
+
valuePropName: 'fileList',
|
|
747
|
+
getValueFromEvent: (e) => {
|
|
748
|
+
if (Array.isArray(e))
|
|
749
|
+
return e;
|
|
750
|
+
return e && e.fileList;
|
|
751
|
+
}
|
|
752
|
+
}, createElement(Upload, {
|
|
753
|
+
listType: 'picture',
|
|
754
|
+
maxCount: 1,
|
|
755
|
+
beforeUpload: () => false
|
|
756
|
+
}, createElement(Button, {
|
|
757
|
+
icon: createElement('i', {className: 'anticon-upload'})
|
|
758
|
+
}, '上传模板封面图')))
|
|
759
|
+
]);
|
|
760
|
+
}),
|
|
761
|
+
okText: '确定',
|
|
762
|
+
cancelText: '取消',
|
|
763
|
+
centered: true,
|
|
764
|
+
icon: null,
|
|
765
|
+
onOk: async () => {
|
|
766
|
+
if (!formInstance)
|
|
767
|
+
return false;
|
|
768
|
+
try {
|
|
769
|
+
const values = await formInstance.validateFields();
|
|
770
|
+
// 构建表单数据
|
|
771
|
+
const formData = new FormData();
|
|
772
|
+
formData.append('name', values.name);
|
|
773
|
+
formData.append('description', values.description || '');
|
|
774
|
+
if (values.coverFile && values.coverFile.length > 0)
|
|
775
|
+
formData.append('coverFile', values.coverFile[0].originFileObj);
|
|
776
|
+
formData.append('templateJson', JSON.stringify(template));
|
|
777
|
+
await baseApi.createTemplate(formData);
|
|
778
|
+
globalMessage.messageApi?.success('操作成功');
|
|
779
|
+
return true;
|
|
780
|
+
} catch (error) {
|
|
781
|
+
console.log('表单验证失败:', error);
|
|
782
|
+
return false; // 返回false阻止关闭
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export const createLoopContainer = () => {
|
|
790
|
+
historyRecordOperateProxy.createLoopContainer();
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* 编辑循环容器
|
|
795
|
+
* @param layerId
|
|
796
|
+
*/
|
|
797
|
+
export const editLoopContainer = (layerId: string) => {
|
|
798
|
+
if (!layerId)
|
|
799
|
+
return;
|
|
800
|
+
const {layerManager: {controllers}} = window.LC_ENV.currentManager;
|
|
801
|
+
const controller = controllers[layerId];
|
|
802
|
+
if (!controller)
|
|
803
|
+
return;
|
|
804
|
+
const {setTargetIds} = eventOperateStore;
|
|
805
|
+
setTargetIds([]);
|
|
806
|
+
const currentManager = (controller as any).manager;
|
|
807
|
+
managerStore.pushManager(currentManager)
|
|
808
|
+
window.LC_ENV.currentManager = currentManager;
|
|
809
|
+
managerStore.setCurrentManager(currentManager);
|
|
810
|
+
const timer = setTimeout(() => {
|
|
811
|
+
window.LC_ENV?.dragScaleProvider?.reset();
|
|
812
|
+
window.LC_ENV?.historyOperator?.reset();
|
|
813
|
+
rightStore.activeConfig(null, '');
|
|
814
|
+
clearTimeout(timer);
|
|
815
|
+
}, 10)
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* 返回主项目
|
|
820
|
+
*/
|
|
821
|
+
export const returnPrevProject = () => {
|
|
822
|
+
const {setTargetIds} = eventOperateStore;
|
|
823
|
+
setTargetIds([]);
|
|
824
|
+
let manager = managerStore.popManager();
|
|
825
|
+
if (!manager)
|
|
826
|
+
return;
|
|
827
|
+
if (manager === managerStore.currentManager)
|
|
828
|
+
manager = managerStore.popManager();
|
|
829
|
+
if (!manager)
|
|
830
|
+
return;
|
|
831
|
+
window.LC_ENV.currentManager = manager;
|
|
832
|
+
managerStore.setCurrentManager(manager);
|
|
833
|
+
const timer = setTimeout(() => {
|
|
834
|
+
window.LC_ENV?.dragScaleProvider?.reset();
|
|
835
|
+
window.LC_ENV?.historyOperator?.reset();
|
|
836
|
+
rightStore.activeConfig(null, '');
|
|
837
|
+
clearTimeout(timer);
|
|
838
|
+
}, 10)
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/*************************蓝图快捷键实现*************************/
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* 删除蓝图中选中的节点
|
|
845
|
+
*/
|
|
846
|
+
export const delBPNode = () => {
|
|
847
|
+
if (designerHeaderStore.currentKey !== 'blue-print') return;
|
|
848
|
+
const {selectedNodes, selectedNodeIds, delNode} = window.LC_ENV.currentManager.bluePrintManager!;
|
|
849
|
+
if (selectedNodes.length === 0)
|
|
850
|
+
return;
|
|
851
|
+
delNode(selectedNodeIds);
|
|
852
|
+
//如果删除的是图层节点,则恢复左侧图层节点的可拖拽性
|
|
853
|
+
const {setUsedNodes, usedNodes} = bpLeftStore;
|
|
854
|
+
selectedNodeIds.forEach(nodeId => {
|
|
855
|
+
if (nodeId in usedNodes)
|
|
856
|
+
setUsedNodes(nodeId, false);
|
|
857
|
+
})
|
|
858
|
+
BpCanvasUtil.reRenderAllLine();
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* 删除蓝图中选中的连线
|
|
863
|
+
*/
|
|
864
|
+
export const delBPLine = () => {
|
|
865
|
+
if (designerHeaderStore.currentKey !== 'blue-print') return;
|
|
866
|
+
const {selectedLines, delLine} = window.LC_ENV.currentManager.bluePrintManager!;
|
|
867
|
+
if (selectedLines.length === 0)
|
|
868
|
+
return;
|
|
869
|
+
delLine(selectedLines);
|
|
870
|
+
BpCanvasUtil.reRenderAllLine();
|
|
871
|
+
}
|