Skip to content

Fix/minor bugs #1133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Sep 4, 2024
Merged
Next Next commit
animation styles
  • Loading branch information
MenamAfzal committed Aug 29, 2024
commit 4764c9e142d07f868f4ea6f313dd67b1518e0c7c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
Tooltip,
EditorContext,
CompNameContext,
AnimationStyle
} from 'lowcoder-sdk';

import {
Expand Down Expand Up @@ -92,6 +93,7 @@ let childrenMap: any = {
licenseKey: withDefault( StringControl, "" ),
currentFreeView: dropdownControl(DefaultWithFreeViewOptions, "timeGridWeek"),
currentPremiumView: dropdownControl(DefaultWithPremiumViewOptions, "resourceTimelineDay"),
animationStyle: styleControl(AnimationStyle, 'animationStyle'),
};
// this should ensure backwards compatibility with older versions of the SDK
if (DragEventHandlerControl) {
Expand Down Expand Up @@ -121,9 +123,10 @@ let CalendarBasicComp = (function () {
licensed?: boolean;
currentFreeView?: string;
currentPremiumView?: string;
animationStyle:any;
}, dispatch: any) => {

const comp = useContext(EditorContext).getUICompByName(
const comp = useContext(EditorContext)?.getUICompByName(
useContext(CompNameContext)
);
const onEventVal = comp?.toJsonValue()?.comp?.onEvent;
Expand Down Expand Up @@ -350,6 +353,12 @@ let CalendarBasicComp = (function () {
const eventId = editEvent.current?.id;
CustomModal.confirm({
title: modalTitle,
style: {
animation: props.animationStyle?.animation || "none",
animationDelay: props.animationStyle?.animationDelay || "0s",
animationDuration: props.animationStyle?.animationDuration || "0s",
animationIterationCount: props.animationStyle?.animationIterationCount || "1",
},
content: (
<FormWrapper form={form}>
<Form.Item
Expand Down Expand Up @@ -577,6 +586,7 @@ let CalendarBasicComp = (function () {
currentFreeView: { propertyView: (arg0: { label: string; tooltip: string; }) => any; };
currentPremiumView: { propertyView: (arg0: { label: string; tooltip: string; }) => any; };
style: { getPropertyView: () => any; };
animationStyle: { getPropertyView: () => any; };
licenseKey: { getView: () => any; propertyView: (arg0: { label: string; }) => any; };
}) => {

Expand Down Expand Up @@ -622,6 +632,7 @@ let CalendarBasicComp = (function () {
<Section name={sectionNames.style}>
{children.style.getPropertyView()}
</Section>
<Section name={sectionNames.animationStyle} hasTooltip={true}>{children.animationStyle.getPropertyView()}</Section>
</>
);
})
Expand Down