diff --git a/client/packages/lowcoder/src/assets/icons/icon-lottie.svg b/client/packages/lowcoder-design/src/icons/icon-lottie.svg similarity index 100% rename from client/packages/lowcoder/src/assets/icons/icon-lottie.svg rename to client/packages/lowcoder-design/src/icons/icon-lottie.svg diff --git a/client/packages/lowcoder-design/src/icons/index.ts b/client/packages/lowcoder-design/src/icons/index.ts index 4d7591df3..a84c01278 100644 --- a/client/packages/lowcoder-design/src/icons/index.ts +++ b/client/packages/lowcoder-design/src/icons/index.ts @@ -285,5 +285,6 @@ export { ReactComponent as TableCheckedIcon } from "icons/icon-table-checked.svg export { ReactComponent as TableUnCheckedIcon } from "icons/icon-table-boolean-false.svg"; export { ReactComponent as FileFolderIcon } from "icons/icon-editor-folder.svg"; export { ReactComponent as ExpandIcon } from "icons/icon-expand.svg"; -export { ReactComponent as CompressIcon } from "icons/icon-compress.svg" -export { ReactComponent as TableCellsIcon } from "icons/icon-table-cells.svg" // Added By Aqib Mirza +export { ReactComponent as CompressIcon } from "icons/icon-compress.svg"; +export { ReactComponent as TableCellsIcon } from "icons/icon-table-cells.svg"; // Added By Aqib Mirza +export { ReactComponent as LottieIcon } from "icons/icon-lottie.svg"; \ No newline at end of file diff --git a/client/packages/lowcoder/src/assets/icons/index.ts b/client/packages/lowcoder/src/assets/icons/index.ts index df7c3d2bb..409292ab7 100644 --- a/client/packages/lowcoder/src/assets/icons/index.ts +++ b/client/packages/lowcoder/src/assets/icons/index.ts @@ -10,6 +10,4 @@ export { ReactComponent as DocIcon } from "./view-doc.svg"; export { ReactComponent as TutorialIcon } from "./tutorial.svg"; export { ReactComponent as ShortcutIcon } from "./icon-help-shortcut.svg"; -export { ReactComponent as LottieIcon } from "./icon-lottie.svg"; //Added By Aqib Mirza - export { GoogleLoginIcon, GithubLoginIcon, GeneralLoginIcon, EmailLoginIcon }; diff --git a/client/packages/lowcoder/src/comps/comps/jsonComp/jsonLottieComp.tsx b/client/packages/lowcoder/src/comps/comps/jsonComp/jsonLottieComp.tsx index 7e03d89ba..1eb4da69a 100644 --- a/client/packages/lowcoder/src/comps/comps/jsonComp/jsonLottieComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/jsonComp/jsonLottieComp.tsx @@ -5,6 +5,7 @@ import { NumberControl, } from "comps/controls/codeControl"; import { dropdownControl } from "comps/controls/dropdownControl"; +import { BoolControl } from "comps/controls/boolControl"; import { styleControl } from "comps/controls/styleControl"; import { LottieStyle } from "comps/controls/styleControlConstants"; import { trans } from "i18n"; @@ -22,27 +23,35 @@ import { defaultLottie } from "./jsonConstants"; */ const animationStartOptions = [ { - label: "Auto", + label: trans("jsonLottie.auto"), value: "auto", }, { - label: "On Hover", + label: trans("jsonLottie.onHover"), value: "on hover", }, ] as const; const loopOptions = [ { - label: "Single play", + label: trans("jsonLottie.singlePlay"), value: "single", }, { - label: "Endless loop", + label: trans("jsonLottie.endlessLoop"), value: "endless", }, ] as const; const speedOptions = [ + { + label: "0.5x", + value: "0.5", + }, + { + label: "0.75x", + value: "0.75", + }, { label: "1x", value: "1", @@ -81,8 +90,8 @@ let JsonLottieTmpComp = (function () { backgroundColor: styleControl(LottieStyle), animationStart: dropdownControl(animationStartOptions, "auto"), loop: dropdownControl(loopOptions, "single"), + keepLastFrame: BoolControl.DEFAULT_TRUE, }; - return new UICompBuilder(childrenMap, (props) => { return (