Skip to content

Commit a19b929

Browse files
authored
Merge branch 'lowcoder-org:main' into patch-2
2 parents fd54f5c + 9047441 commit a19b929

File tree

30 files changed

+2282
-200
lines changed

30 files changed

+2282
-200
lines changed
Lines changed: 1 addition & 0 deletions
Loading

client/packages/lowcoder-design/src/icons/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,7 @@ export { ReactComponent as TableCheckedIcon } from "icons/icon-table-checked.svg
285285
export { ReactComponent as TableUnCheckedIcon } from "icons/icon-table-boolean-false.svg";
286286
export { ReactComponent as FileFolderIcon } from "icons/icon-editor-folder.svg";
287287
export { ReactComponent as ExpandIcon } from "icons/icon-expand.svg";
288-
export { ReactComponent as CompressIcon } from "icons/icon-compress.svg"
289-
export { ReactComponent as TableCellsIcon } from "icons/icon-table-cells.svg" // Added By Aqib Mirza
288+
export { ReactComponent as CompressIcon } from "icons/icon-compress.svg";
289+
export { ReactComponent as TableCellsIcon } from "icons/icon-table-cells.svg"; // Added By Aqib Mirza
290+
export { ReactComponent as TimeLineIcon } from "icons/icon-timeline-comp.svg"
291+
export { ReactComponent as LottieIcon } from "icons/icon-lottie.svg";

client/packages/lowcoder/src/assets/icons/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ export { ReactComponent as DocIcon } from "./view-doc.svg";
1010
export { ReactComponent as TutorialIcon } from "./tutorial.svg";
1111
export { ReactComponent as ShortcutIcon } from "./icon-help-shortcut.svg";
1212

13-
export { ReactComponent as LottieIcon } from "./icon-lottie.svg"; //Added By Aqib Mirza
14-
1513
export { GoogleLoginIcon, GithubLoginIcon, GeneralLoginIcon, EmailLoginIcon };

client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function getButtonStyle(buttonStyle: ButtonStyleType) {
4747

4848
export const Button100 = styled(Button)<{ $buttonStyle?: ButtonStyleType }>`
4949
${(props) => props.$buttonStyle && getButtonStyle(props.$buttonStyle)}
50-
width: -webkit-fill-available;
50+
width: 100%;
5151
height: auto;
5252
display: inline-flex;
5353
justify-content: center;

client/packages/lowcoder/src/comps/comps/jsonComp/jsonLottieComp.tsx

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
NumberControl,
66
} from "comps/controls/codeControl";
77
import { dropdownControl } from "comps/controls/dropdownControl";
8+
import { BoolControl } from "comps/controls/boolControl";
89
import { styleControl } from "comps/controls/styleControl";
910
import { LottieStyle } from "comps/controls/styleControlConstants";
1011
import { trans } from "i18n";
@@ -22,27 +23,35 @@ import { defaultLottie } from "./jsonConstants";
2223
*/
2324
const animationStartOptions = [
2425
{
25-
label: "Auto",
26+
label: trans("jsonLottie.auto"),
2627
value: "auto",
2728
},
2829
{
29-
label: "On Hover",
30+
label: trans("jsonLottie.onHover"),
3031
value: "on hover",
3132
},
3233
] as const;
3334

3435
const loopOptions = [
3536
{
36-
label: "Single play",
37+
label: trans("jsonLottie.singlePlay"),
3738
value: "single",
3839
},
3940
{
40-
label: "Endless loop",
41+
label: trans("jsonLottie.endlessLoop"),
4142
value: "endless",
4243
},
4344
] as const;
4445

4546
const speedOptions = [
47+
{
48+
label: "0.5x",
49+
value: "0.5",
50+
},
51+
{
52+
label: "0.75x",
53+
value: "0.75",
54+
},
4655
{
4756
label: "1x",
4857
value: "1",
@@ -81,34 +90,40 @@ let JsonLottieTmpComp = (function () {
8190
backgroundColor: styleControl(LottieStyle),
8291
animationStart: dropdownControl(animationStartOptions, "auto"),
8392
loop: dropdownControl(loopOptions, "single"),
93+
keepLastFrame: BoolControl.DEFAULT_TRUE,
8494
};
85-
8695
return new UICompBuilder(childrenMap, (props) => {
8796
return (
88-
<div
89-
style={{
90-
height: "100%",
91-
display: "flex",
92-
justifyContent: "center",
93-
backgroundColor: `${props.backgroundColor.background}`,
94-
}}
95-
>
96-
<Player
97-
key={
98-
[props.speed, props.animationStart, props.loop, props.value] as any
99-
}
100-
autoplay={props.animationStart === "auto" && true}
101-
hover={props.animationStart === "on hover" && true}
102-
loop={props.loop === "single" ? false : true}
103-
speed={Number(props.speed)}
104-
src={props.value}
97+
<div style={{
98+
padding: `${props.backgroundColor.margin}`,
99+
}}>
100+
<div
105101
style={{
106102
height: "100%",
107-
width: "100%",
108-
maxWidth: "100%",
109-
maxHeight: "100%",
103+
display: "flex",
104+
justifyContent: "center",
105+
backgroundColor: `${props.backgroundColor.background}`,
106+
padding: `${props.backgroundColor.padding}`
110107
}}
111-
/>
108+
>
109+
<Player
110+
key={
111+
[props.speed, props.animationStart, props.loop, props.value, props.keepLastFrame] as any
112+
}
113+
keepLastFrame={props.keepLastFrame}
114+
autoplay={props.animationStart === "auto" && true}
115+
hover={props.animationStart === "on hover" && true}
116+
loop={props.loop === "single" ? false : true}
117+
speed={Number(props.speed)}
118+
src={props.value}
119+
style={{
120+
height: "100%",
121+
width: "100%",
122+
maxWidth: "100%",
123+
maxHeight: "100%",
124+
}}
125+
/>
126+
</div>
112127
</div>
113128
);
114129
})
@@ -117,7 +132,7 @@ let JsonLottieTmpComp = (function () {
117132
<>
118133
<Section name={sectionNames.basic}>
119134
{children.value.propertyView({
120-
label: trans("lottieJson"),
135+
label: trans("jsonLottie.lottieJson"),
121136
})}
122137
{children.speed.propertyView({
123138
label: trans("jsonLottie.speed"),
@@ -128,6 +143,9 @@ let JsonLottieTmpComp = (function () {
128143
{children.animationStart.propertyView({
129144
label: trans("jsonLottie.animationStart"),
130145
})}
146+
{children.keepLastFrame.propertyView({
147+
label: trans("jsonLottie.keepLastFrame"),
148+
})}
131149
</Section>
132150
<Section name={sectionNames.style}>
133151
{children.backgroundColor.getPropertyView()}

client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const TabbedContainer = (props: TabbedContainerProps) => {
164164
// log.debug("TabbedContainer. props: ", props);
165165

166166
return (
167-
<div style={{padding: props.style.margin}}>
167+
<div style={{padding: props.style.margin, height: '100%'}}>
168168
<StyledTabs
169169
activeKey={activeKey}
170170
$style={style}

0 commit comments

Comments
 (0)