Skip to content

Commit

Permalink
Merge pull request #3634 from illacloud/release/4.3.0
Browse files Browse the repository at this point in the history
Release/4.3.0
  • Loading branch information
AruSeito authored Jan 18, 2024
2 parents 9de8c7c + b4ee8b7 commit 1a3a0da
Show file tree
Hide file tree
Showing 71 changed files with 1,123 additions and 929 deletions.
5 changes: 5 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ ILLA CLI 使您能够以超乎想象的速度部署 ILLA Builder。 [单击此

加入 ILLA 社区,分享您的想法、建议或问题,并与其他用户和贡献者交流。

加入微信群:

![screenshot-20240118-154219](https://github.com/illacloud/illa-builder/assets/112603073/f5b42507-201f-421c-b2b4-edf022479757)


Discord与Github社区入口

[![Chat on Discord](https://img.shields.io/badge/chat-Discord-7289DA?logo=discord)](https://discord.gg/illacloud) [![Discuss on GitHub](https://img.shields.io/badge/discussions-GitHub-333333?logo=github)](https://github.com/orgs/illacloud/discussions)
Expand Down
4 changes: 3 additions & 1 deletion apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"author": "ILLA Cloud <[email protected]>",
"license": "Apache-2.0",
"version": "4.2.4",
"version": "4.3.0",
"scripts": {
"dev": "vite --strictPort --force",
"build-cloud": "NODE_OPTIONS=--max-old-space-size=12288 vite build --mode cloud",
Expand Down Expand Up @@ -50,11 +50,13 @@
"@illa-public/cropper": "workspace:*",
"@illa-public/dynamic-string": "workspace:^",
"@illa-public/icon": "workspace:*",
"@illa-public/icon-hot-spot": "workspace:^",
"@illa-public/illa-net": "workspace:*",
"@illa-public/illa-storage": "workspace:*",
"@illa-public/invite-modal": "workspace:*",
"@illa-public/layout-auto-change": "workspace:*",
"@illa-public/market-agent": "workspace:*",
"@illa-public/missing-resource-module": "workspace:^",
"@illa-public/mixpanel-utils": "workspace:*",
"@illa-public/public-configs": "workspace:*",
"@illa-public/public-types": "workspace:*",
Expand Down
48 changes: 17 additions & 31 deletions apps/builder/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import createCache from "@emotion/cache"
import { CacheProvider, Global } from "@emotion/react"
import { Global } from "@emotion/react"
import {
ILLA_MIXPANEL_EVENT_TYPE,
ILLA_MIXPANEL_PUBLIC_PAGE_NAME,
} from "@illa-public/mixpanel-utils"
import { px2Rem } from "@illa-public/styleis-plugin"
import { UpgradeModalGroup } from "@illa-public/upgrade-modal"
import { getCurrentTranslateLanguage } from "@illa-public/user-data"
import { useEffect, useMemo } from "react"
Expand Down Expand Up @@ -67,35 +65,23 @@ function App() {
)
}, [])

let cache = createCache({
key: "css",
stylisPlugins: [
px2Rem({
unit: "rem",
remSize: 100,
}),
],
})

return (
<CacheProvider value={cache}>
<HelmetProvider>
<DndProvider backend={TouchBackend} options={dragOptions}>
<ConfigProvider locale={configLanguage}>
<Global styles={globalStyle} />
<MessageGroup pt={!isProductMode ? "46px" : "0"} />
<UpgradeModalGroup />
<NotificationGroup pt={!isProductMode ? "46px" : "0"} />
<ModalGroup />
<RouterProvider router={ILLARoute} />
<div
className="illaCodeMirrorWrapper"
css={illaCodeMirrorTooltipStyle}
/>
</ConfigProvider>
</DndProvider>
</HelmetProvider>
</CacheProvider>
<HelmetProvider>
<DndProvider backend={TouchBackend} options={dragOptions}>
<ConfigProvider locale={configLanguage}>
<Global styles={globalStyle} />
<MessageGroup pt={!isProductMode ? "46px" : "0"} />
<UpgradeModalGroup />
<NotificationGroup pt={!isProductMode ? "46px" : "0"} />
<ModalGroup />
<RouterProvider router={ILLARoute} />
<div
className="illaCodeMirrorWrapper"
css={illaCodeMirrorTooltipStyle}
/>
</ConfigProvider>
</DndProvider>
</HelmetProvider>
)
}

Expand Down
28 changes: 0 additions & 28 deletions apps/builder/src/components/IconHotSpot/index.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions apps/builder/src/components/IconHotSpot/interface.ts

This file was deleted.

24 changes: 0 additions & 24 deletions apps/builder/src/components/IconHotSpot/style.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/builder/src/components/Modal/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import IconHotSpot from "@illa-public/icon-hot-spot"
import { FC } from "react"
import { Link } from "react-router-dom"
import {
Expand All @@ -6,7 +7,6 @@ import {
DragPointIcon,
getColor,
} from "@illa-design/react"
import IconHotSpot from "@/components/IconHotSpot"
import { HeaderProps } from "@/components/Modal/Header/interface"
import {
dragIconStyle,
Expand Down
7 changes: 6 additions & 1 deletion apps/builder/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ILLAMixpanel } from "@illa-public/mixpanel-utils"
import { initDateReport, initDayjs } from "@illa-public/utils"
import { initDateReport, initDayjs, isCloudVersion } from "@illa-public/utils"
import { LicenseInfo } from "@mui/x-data-grid-premium"
import * as Sentry from "@sentry/react"
import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
Expand All @@ -24,6 +25,10 @@ if (
})
}

if (isCloudVersion) {
LicenseInfo.setLicenseKey(import.meta.env.ILLA_MUI_LICENSE)
}

initDateReport()
ILLAMixpanel.setDeviceID()
initDayjs()
Expand Down
28 changes: 28 additions & 0 deletions apps/builder/src/middleware/reduxAsync/sendMessage/actionMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,33 @@ export const actionsAsync = (
)
break
}
case "batchUpdateResourceID": {
Connection.getTextRoom("app", currentAppID)?.send(
getTextMessagePayload(
TextSignal.BROADCAST_ONLY,
TextTarget.ACTION,
true,
action,
teamID,
uid,
[payload],
),
)
break
}
case "batchUpdateActionItemReducer": {
Connection.getTextRoom("app", currentAppID)?.send(
getTextMessagePayload(
TextSignal.BROADCAST_ONLY,
TextTarget.ACTION,
true,
action,
teamID,
uid,
[payload],
),
)
break
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getIconFromWidgetType } from "@illa-public/icon"
import IconHotSpot from "@illa-public/icon-hot-spot"
import { getDocLink } from "@illa-public/public-configs"
import { AnimatePresence, motion } from "framer-motion"
import { FC, useState } from "react"
import { useDispatch, useSelector } from "react-redux"
import { CaretRightIcon } from "@illa-design/react"
import StateIcon from "@/assets/dataWorkspace/state.svg?react"
import IconHotSpot from "@/components/IconHotSpot"
import { MovableModal } from "@/components/Modal/movableModal"
import { panelBarItemContainerAnimationVariants } from "@/components/PanelBar/style"
import { ViewItemShape } from "@/page/App/components/InspectPanel/PanelSetters/TabsSetter/TabListSetter/interface"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import IconHotSpot from "@illa-public/icon-hot-spot"
import { FC } from "react"
import { Link } from "react-router-dom"
import { DocsIcon } from "@illa-design/react"
import IconHotSpot from "@/components/IconHotSpot"
import { LibrariesItemProps } from "./interface"
import {
actionGroupContainerStyle,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import IconHotSpot from "@illa-public/icon-hot-spot"
import { FC, useContext } from "react"
import { useTranslation } from "react-i18next"
import {
Expand All @@ -7,7 +8,6 @@ import {
MoreIcon,
getColor,
} from "@illa-design/react"
import IconHotSpot from "@/components/IconHotSpot"
import { onCopyActionItem } from "@/page/App/components/Actions/api"
import { getActionList } from "@/redux/currentApp/action/actionSelector"
import store from "@/store"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import IconHotSpot from "@illa-public/icon-hot-spot"
import { ILLA_MIXPANEL_EVENT_TYPE } from "@illa-public/mixpanel-utils"
import { FC, MouseEvent, useCallback } from "react"
import { useTranslation } from "react-i18next"
import { useDispatch, useSelector } from "react-redux"
import { PlusIcon } from "@illa-design/react"
import IconHotSpot from "@/components/IconHotSpot"
import { PanelBar } from "@/components/PanelBar"
import { getPageDisplayNameMapViewDisplayName } from "@/redux/currentApp/components/componentsSelector"
import { componentsActions } from "@/redux/currentApp/components/componentsSlice"
Expand Down Expand Up @@ -31,7 +31,7 @@ export const PageSpaceTree: FC = () => {
const dispatch = useDispatch()

const handleClickAddButton = useCallback(
(e: MouseEvent<HTMLDivElement>) => {
(e: MouseEvent<HTMLButtonElement>) => {
e.stopPropagation()
trackInEditor(ILLA_MIXPANEL_EVENT_TYPE.CLICK, {
element: "add_page",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { convertPathToString } from "@illa-public/dynamic-string"
import IconHotSpot from "@illa-public/icon-hot-spot"
import { toPath } from "lodash-es"
import { FC, memo } from "react"
import { CopyIcon, isArray, isObject } from "@illa-design/react"
import IconHotSpot from "@/components/IconHotSpot"
import { WorkSpaceTreeNodeProps } from "@/page/App/Module/DataWorkspace/components/WorkSpaceTreeItem/interface"
import {
applyJsonValueColorStyle,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { convertPathToString } from "@illa-public/dynamic-string"
import IconHotSpot from "@illa-public/icon-hot-spot"
import copyToClipboard from "copy-to-clipboard"
import { AnimatePresence, motion } from "framer-motion"
import { toPath } from "lodash-es"
import { FC, memo } from "react"
import { useDispatch, useSelector } from "react-redux"
import { CaretRightIcon, CopyIcon } from "@illa-design/react"
import IconHotSpot from "@/components/IconHotSpot"
import { panelBarItemContainerAnimationVariants } from "@/components/PanelBar/style"
import { getExpandedKeys } from "@/redux/config/configSelector"
import { configActions } from "@/redux/config/configSlice"
Expand Down
11 changes: 4 additions & 7 deletions apps/builder/src/page/App/Module/DataWorkspace/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { FC, HTMLAttributes } from "react"
import { FC } from "react"
import { leftPanelStyle } from "../../style"
import { ActionSpaceTree } from "./components/ActionSpaceTree"
import { ComponentSpaceTree } from "./components/ComponentSpaceTree"
import { GlobalsSpaceTree } from "./components/GlobalsSpaceTree"
import { LibrarySpaceTree } from "./components/LibrariesTree"
import { PageSpaceTree } from "./components/PageSpaceTree"
import { innerContainerStyle } from "./style"

interface DataWorkspaceProps extends HTMLAttributes<HTMLDivElement> {}

export const DataWorkspace: FC<DataWorkspaceProps> = (props) => {
const { className } = props

export const DataWorkspace: FC = () => {
return (
<div className={className}>
<div css={leftPanelStyle}>
<div css={innerContainerStyle}>
<PageSpaceTree />
<ComponentSpaceTree />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import IconHotSpot from "@illa-public/icon-hot-spot"
import { ILLA_MIXPANEL_EVENT_TYPE } from "@illa-public/mixpanel-utils"
import { t } from "i18next"
import { FC, memo } from "react"
import { useDispatch, useSelector } from "react-redux"
import { Badge, BugIcon, Trigger, getColor } from "@illa-design/react"
import { isOpenDebugger } from "@/redux/config/configSelector"
import { configActions } from "@/redux/config/configSlice"
import { getExecutionDebuggerData } from "@/redux/currentApp/executionTree/executionSelector"
import { trackInEditor } from "@/utils/mixpanelHelper"

const DebugButton: FC = () => {
const debuggerData = useSelector(getExecutionDebuggerData)
const debuggerVisible = useSelector(isOpenDebugger)

const debugMessageNumber = debuggerData
? Object.keys(debuggerData).length
: undefined
const dispatch = useDispatch()

const handleClickDebuggerIcon = () => {
trackInEditor(ILLA_MIXPANEL_EVENT_TYPE.CLICK, {
element: "debug",
parameter2: debugMessageNumber ?? 0,
})
dispatch(configActions.updateDebuggerVisible(!debuggerVisible))
}

return (
<Trigger position="right" content={t("flow.editor.app.tooltips.debug")}>
<IconHotSpot onClick={handleClickDebuggerIcon}>
<Badge count={debugMessageNumber}>
<BugIcon color={getColor("grayBlue", "02")} />
</Badge>
</IconHotSpot>
</Trigger>
)
}

export default memo(DebugButton)
Loading

0 comments on commit 1a3a0da

Please sign in to comment.