Skip to content

Cherry release -> back to dev #771

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 33 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
20f5bc8
New plugin system
ludomikula Feb 5, 2024
b58a742
new: plugin endpoint security basics
ludomikula Mar 5, 2024
800c16c
Merge branch 'lowcoder-org:dev' into dev
ludomikula Mar 6, 2024
348c98e
Merge branch 'lowcoder-org:dev' into dev
ludomikula Mar 8, 2024
f6b6bd8
fix crashing on reordering comps inside module
raheeliftikhar5 Mar 14, 2024
3809d9a
fix broken modal issue
raheeliftikhar5 Mar 14, 2024
9810150
fix bulk action updates doesn't change all comps height
raheeliftikhar5 Mar 14, 2024
4335b1e
fix iconSelector issue in js
raheeliftikhar5 Mar 14, 2024
da62927
Bugfixing in the Cerrypicked Branch 1
Mar 12, 2024
3bf3ebf
Optimize the runOpenApi plugin
snowe2010 Mar 8, 2024
784951d
Optimize the runOpenApi plugin
snowe2010 Mar 8, 2024
cbcaec6
Pull definition logic into a new function
snowe2010 Mar 8, 2024
b92024d
Small amount of code cleanup
snowe2010 Mar 8, 2024
b36a2d0
fix: complete the locale file
Mar 11, 2024
0e6b546
map ready state fix
raheeliftikhar5 Mar 5, 2024
9d28529
Google Fonts & Clearbit only on public Cloud
Mar 19, 2024
c063add
Updating the SDK, update Simplebar and Fix simplebar-placeholder problem
Mar 17, 2024
94e7c82
Updating the SDK, update Simplebar and Fix simplebar-placeholder problem
Mar 17, 2024
144ca9f
Fixing Scrollbars for Modules Editor View
Mar 18, 2024
5cadfc3
Update Scrollbars
Mar 24, 2024
7758d4a
Update Scrollbars
Mar 24, 2024
3476223
Merge pull request #767 from Lowcoder-Pro/dev
FalkWolsky Mar 24, 2024
eeef89a
Fixing AssetService - after Falk broke it.
Mar 24, 2024
d602bd4
Enabling display of Version Number for Remote Components
Mar 24, 2024
33d8210
Merge pull request #766 from lowcoder-org/cherry-release
FalkWolsky Mar 24, 2024
2b68d59
Enabling display of Version Number for Remote Components
Mar 24, 2024
17abd87
Update Helmet Tags
Mar 24, 2024
df8c97c
Fixing Helmet Tags Implementation
Mar 24, 2024
ca6905f
Merge branch 'main' into cherry-release
FalkWolsky Mar 24, 2024
e72a6c9
Adding DayJS plugins by Default
Mar 24, 2024
28112a1
Adding all DayJS plugins by Default
Mar 24, 2024
dafdd3a
Fixing - adding all DayJS plugins by Default
Mar 24, 2024
39919c4
Merge branch 'dev' into cherry-release
FalkWolsky Mar 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions client/packages/lowcoder-design/src/components/ScrollBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,15 @@ interface IProps {
hideScrollbar?: boolean;
}

export const ScrollBar = ({ height = "100%", className, children, style, scrollableNodeProps, hideScrollbar, ...otherProps }: IProps) => {
export const ScrollBar = ({ height = "100%", className, children, style, scrollableNodeProps, hideScrollbar = false, ...otherProps }: IProps) => {
// You can now use the style prop directly or pass it to SimpleBar
const combinedStyle = { ...style, height }; // Example of combining height with passed style

return (hideScrollbar ?? false) ? (
return hideScrollbar ? (
<ScrollBarWrapper className={className}>
<SimpleBar style={combinedStyle} scrollableNodeProps={scrollableNodeProps} {...otherProps}>
{children}
</SimpleBar>
{children}
</ScrollBarWrapper>
)
: (
) : (
<ScrollBarWrapper className={className}>
{children}
</ScrollBarWrapper>
Expand Down
25 changes: 10 additions & 15 deletions client/packages/lowcoder/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,16 @@ class AppIndex extends React.Component<AppIndexProps, any> {
{<title>{this.props.brandName}</title>}
{<link rel="icon" href={this.props.favicon} />}
<meta name="description" content={trans("productDesc")} />

{isLowCoderDomain && (
<>
{/* setting Meta Attributes to be able for embedding via iframely */}
<meta property="iframely:title" content="Lowcoder" />
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />

<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous"/>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet"/>
{/* embedding analytics of Cleabits */}
<script src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin"></script>
</>
)}

{isLowCoderDomain && [
// Adding Support for iframely to be able to embedd the component explorer in the docu
<meta key="iframely:title" property="iframely:title" content="Lowcoder" />,
<meta key="iframely:description" property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />,
<link key="preconnect-googleapis" rel="preconnect" href="https://fonts.googleapis.com" />,
<link key="preconnect-gstatic" rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />,
<link key="font-ubuntu" href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet" />,
// adding Clearbit Support for Analytics
<script key="clearbit-script" src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin" type="text/javascript"></script>
]}
</Helmet>
<SystemWarning />
<Router history={history}>
Expand Down
8 changes: 8 additions & 0 deletions client/packages/lowcoder/src/components/CompName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const CompName = (props: Iprops) => {

const items: EditPopoverItemType[] = [];

// Falk: TODO - Implement upgrade for individual Version functionality
const handleUpgrade = async () => {
if (upgrading) {
return;
Expand Down Expand Up @@ -112,6 +113,13 @@ export const CompName = (props: Iprops) => {


if (compInfo.isRemote) {
items.push({
text: trans("history.currentVersion") + ": " + compInfo.packageVersion,
onClick: () => {

},
});

items.push({
text: trans("comp.menuUpgradeToLatest"),
onClick: () => {
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder/src/comps/comps/allComp.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Object.keys(QueryMap).forEach((key) => {

function logDiff(comp: any, newComp: any, prefix?: string) {
if (_.isNil(comp.children)) {
console.info(`diff. comp.${prefix}: `, comp, ` newComp.${prefix}: `, newComp);
// console.info(`diff. comp.${prefix}: `, comp, ` newComp.${prefix}: `, newComp);
return;
}
Object.keys(comp.children).forEach((key) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,11 @@ export function ListView(props: Props) {
<BackgroundColorContext.Provider value={style.background}>
<ListViewWrapper $style={style} $paddingWidth={paddingWidth}>
<BodyWrapper ref={ref} $autoHeight={autoHeight}>
{scrollbars ? (
<ScrollBar style={{ height: autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }}>
<>{<ReactResizeDetector onResize={(width?: number, height?: number) => { if (height) setListHeight(height); }} observerOptions={{ box: "border-box" }} >
<div style={{ height: autoHeight ? "auto" : "100%" }}>{renders}</div>
</ReactResizeDetector>}</>
</ScrollBar>
) : (
<ScrollBar style={{ height: autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
<>{<ReactResizeDetector onResize={(width?: number, height?: number) => { if (height) setListHeight(height); }} observerOptions={{ box: "border-box" }} >
<div style={{ height: autoHeight ? "auto" : "100%" }}>{renders}</div>
</ReactResizeDetector>}</>
)}
</ScrollBar>
</BodyWrapper>
<FooterWrapper>
<Pagination size="small" itemRender={pageItemRender} {...pageInfo.pagination} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ class ModuleTmpComp extends ModuleCompBase {
const ModuleCompWithView = withViewFn(ModuleTmpComp, (comp) => {
const appId = comp.children.appId.getView();
const error = comp.children.error.getView();
const scrollbars = comp.children.scrollbars.getView();

const moduleExternalState: ExternalEditorContextState = useMemo(
() => ({
Expand All @@ -530,7 +531,7 @@ const ModuleCompWithView = withViewFn(ModuleTmpComp, (comp) => {
if (comp.moduleRootComp && comp.isReady) {
content = (
<Wrapper className="module-wrapper">
<ScrollBar style={{ height: comp.children.scrollbars.getView() ? "100%" : "auto", margin: "0px", padding: "0px" }}>
<ScrollBar style={{ height: comp.autoHeight() ? "100%" : "auto", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
<ExternalEditorContext.Provider value={moduleExternalState}>
{comp.moduleRootComp.getView()}
</ExternalEditorContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ import {
async function npmLoader(
remoteInfo: RemoteCompInfo
): Promise<CompConstructor | null> {
const { packageName, packageVersion = "latest", compName } = remoteInfo;

console.log("remoteInfo: ", remoteInfo);

// Falk: removed "packageVersion = "latest" as default value fir packageVersion - to ensure no automatic version jumping.

const { packageName, packageVersion, compName } = remoteInfo;
const entry = `${NPM_PLUGIN_ASSETS_BASE_URL}/${packageName}@${packageVersion}/index.js`;
// const entry = `../../../../../public/package/index.js`;
// console.log("Entry", entry);
try {
const module = await import(/* webpackIgnore: true */ entry);
// console.log("Entry 1", module);
const comp = module.default?.[compName];
if (!comp) {
throw new Error(trans("npm.compNotFound", { compName }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { JSONObject, JSONValue } from "util/jsonTypes";
import { CompAction, CompActionTypes, deleteCompAction, wrapChildAction } from "lowcoder-core";
import { DispatchType, RecordConstructorToView, wrapDispatch } from "lowcoder-core";
import { AutoHeightControl } from "comps/controls/autoHeightControl";
import { BooleanStateControl, booleanExposingStateControl, stringExposingStateControl } from "comps/controls/codeStateControl";
import { stringExposingStateControl } from "comps/controls/codeStateControl";
import { eventHandlerControl } from "comps/controls/eventHandlerControl";
import { TabsOptionControl } from "comps/controls/optionsControl";
import { styleControl } from "comps/controls/styleControl";
Expand All @@ -12,7 +12,7 @@ import { sameTypeMap, UICompBuilder, withDefault } from "comps/generators";
import { addMapChildAction } from "comps/generators/sameTypeMap";
import { NameConfig, NameConfigHidden, withExposingConfigs } from "comps/generators/withExposing";
import { NameGenerator } from "comps/utils";
import { ControlNode, Section, sectionNames } from "lowcoder-design";
import { ScrollBar, Section, sectionNames } from "lowcoder-design";
import { HintPlaceHolder } from "lowcoder-design";
import _ from "lodash";
import React, { useCallback, useContext } from "react";
Expand All @@ -33,6 +33,7 @@ import { DisabledContext } from "comps/generators/uiCompBuilder";
import { EditorContext } from "comps/editorState";
import { checkIsMobile } from "util/commonUtils";
import { messageInstance } from "lowcoder-design";
import { BoolControl } from "comps/controls/boolControl";

const EVENT_OPTIONS = [
{
Expand All @@ -50,9 +51,10 @@ const childrenMap = {
1: { layout: {}, items: {} },
}),
autoHeight: AutoHeightControl,
scrollbars: withDefault(BoolControl, false),
onEvent: eventHandlerControl(EVENT_OPTIONS),
disabled: BoolCodeControl,
showHeader: withDefault(BooleanStateControl, "true"),
showHeader: withDefault(BoolControl, true),
style: styleControl(TabContainerStyle),
headerStyle: styleControl(ContainerHeaderStyle),
bodyStyle: styleControl(ContainerBodyStyle),
Expand Down Expand Up @@ -211,7 +213,7 @@ const TabbedContainer = (props: TabbedContainerProps) => {
const editorState = useContext(EditorContext);
const maxWidth = editorState.getAppSettings().maxWidth;
const isMobile = checkIsMobile(maxWidth);
const showHeader = props.showHeader.value;
const showHeader = props.showHeader.valueOf();
const paddingWidth = isMobile ? 8 : 0;

const tabItems = visibleTabs.map((tab) => {
Expand All @@ -236,14 +238,16 @@ const TabbedContainer = (props: TabbedContainerProps) => {
forceRender: true,
children: (
<BackgroundColorContext.Provider value={bodyStyle.background}>
<ContainerInTab
layout={containerProps.layout.getView()}
items={gridItemCompToGridItems(containerProps.items.getView())}
positionParams={containerProps.positionParams.getView()}
dispatch={childDispatch}
autoHeight={props.autoHeight}
containerPadding={[paddingWidth, 20]}
/>
<ScrollBar style={{ height: props.autoHeight ? "100%" : "auto", margin: "0px", padding: "0px" }} hideScrollbar={!props.scrollbars}>
<ContainerInTab
layout={containerProps.layout.getView()}
items={gridItemCompToGridItems(containerProps.items.getView())}
positionParams={containerProps.positionParams.getView()}
dispatch={childDispatch}
autoHeight={props.autoHeight}
containerPadding={[paddingWidth, 20]}
/>
</ScrollBar>
</BackgroundColorContext.Provider>
)
}
Expand Down Expand Up @@ -307,6 +311,11 @@ export const TabbedContainerBaseComp = (function () {
<>
<Section name={sectionNames.layout}>
{children.autoHeight.getPropertyView()}
{!children.autoHeight.getView() && (
children.scrollbars.propertyView({
label: trans("prop.scrollbar"),
})
)}
</Section>
<Section name={sectionNames.style}>
{children.style.getPropertyView()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ export function TriContainer(props: TriContainerProps) {
)}
{showBody && (
<BackgroundColorContext.Provider value={bodyStyle.background}>
{scrollbars ? (
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }}>
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
<BodyInnerGrid
$showBorder={showHeader}
{...otherBodyProps}
Expand All @@ -171,28 +170,6 @@ export function TriContainer(props: TriContainerProps) {
style={{padding: bodyStyle.containerBodyPadding}}
/>
</ScrollBar>
) : (
<BodyInnerGrid
$showBorder={showHeader}
{...otherBodyProps}
items={gridItemCompToGridItems(bodyItems)}
autoHeight={container.autoHeight}
emptyRows={14}
minHeight={showHeader ? "143px" : "142px"}
containerPadding={
(showHeader && showFooter) || showHeader ? [paddingWidth, 11.5] : [paddingWidth, 11]
}
hintPlaceholder={props.hintPlaceholder ?? HintPlaceHolder}
$backgroundColor={bodyStyle?.background || 'transparent'}
$borderColor={style?.border}
$borderWidth={style?.borderWidth}
$backgroundImage={bodyStyle?.backgroundImage}
$backgroundImageRepeat={bodyStyle?.backgroundImageRepeat}
$backgroundImageSize={bodyStyle?.backgroundImageSize}
$backgroundImagePosition={bodyStyle?.backgroundImagePosition}
$backgroundImageOrigin={bodyStyle?.backgroundImageOrigin}
style={{padding: bodyStyle.containerBodyPadding}}/>
)}
</BackgroundColorContext.Provider>
)}
{showFooter && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,15 @@ export class TriContainerComp extends TriContainerBaseComp implements IContainer
this.children.showHeader.propertyView({ label: trans("prop.showHeader") }),
this.children.showBody.propertyView({ label: trans("prop.showBody") }),
this.children.showFooter.propertyView({ label: trans("prop.showFooter") }),
(!this.children.autoHeight.getView()) && this.children.scrollbars.propertyView({ label: trans("prop.scrollbar") }),

];
}

heightPropertyView() {
return this.children.autoHeight.getPropertyView();
return [
this.children.autoHeight.getPropertyView(),
(!this.children.autoHeight.getView()) && this.children.scrollbars.propertyView({ label: trans("prop.scrollbar") })
];
}

stylePropertyView() {
Expand Down
45 changes: 12 additions & 33 deletions client/packages/lowcoder/src/comps/controls/styleControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,11 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
preInputNode: <MarginIcon title="Margin" />,
placeholder: props[name],
})
: (name === "padding" ||
: name === "textSize" ||
name === "padding" ||
name === "containerHeaderPadding" ||
name === "containerFooterPadding" ||
name === "containerBodyPadding")
name === "containerBodyPadding"
? (
children[name] as InstanceType<typeof StringControl>
).propertyView({
Expand Down Expand Up @@ -820,37 +821,15 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
preInputNode: <StyledBackgroundImageIcon title="Background Image Repeat" />,
placeholder: props[name],
})
: name === "backgroundImageSize" || name === "headerBackgroundImageSize" || name === "footerBackgroundImageSize"
? (
children[name] as InstanceType<typeof StringControl>
).propertyView({
label: config.label,
preInputNode: <StyledBackgroundImageIcon title="Background Image Size" />,
placeholder: props[name],
})
: name === "backgroundImagePosition" || name === "headerBackgroundImagePosition" || name === "footerBackgroundImagePosition"
? (
children[name] as InstanceType<typeof StringControl>
).propertyView({
label: config.label,
preInputNode: <StyledBackgroundImageIcon title="Background Image Position" />,
placeholder: props[name],
})
: name === "backgroundImageOrigin" || name === "headerBackgroundImageOrigin" || name === "footerBackgroundImageOrigin"
? (
children[name] as InstanceType<typeof StringControl>
).propertyView({
label: config.label,
preInputNode: <StyledBackgroundImageIcon title="Background Image Origin" />,
placeholder: props[name],
})
: children[name].propertyView({
label: config.label,
panelDefaultColor: props[name],
// isDep: isDepColorConfig(config),
isDep: true,
depMsg: depMsg,
})}
: children[name].propertyView({
label: config.label,
panelDefaultColor: props[name],
// isDep: isDepColorConfig(config),
isDep: true,
depMsg: depMsg,
})

}
</div>
);
})}
Expand Down
6 changes: 3 additions & 3 deletions client/packages/lowcoder/src/comps/hooks/agoraFunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ const useAgora = () => {
const leaveChannel = async () => {
if (isJoined) {
if (!client) {
console.error("Agora client is not initialized");
// console.error("Agora client is not initialized");
return;
}

if (!client.localTracks.length) {
console.error("No local tracks to unpublish");
// console.error("No local tracks to unpublish");
return;
}

Expand Down Expand Up @@ -105,7 +105,7 @@ const useAgora = () => {
setHeight(videoHeight!);
// console.log(`Video width: ${videoWidth}px, height: ${videoHeight}px`);
} else {
console.error("Media stream track not found");
// console.error("Media stream track not found");
}
};

Expand Down
Loading