Skip to content

Hotfixes to main #766

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 29 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
80d78f9
separate defaultValue and value for old input/select comps
raheeliftikhar5 Mar 5, 2024
f324f75
map ready state fix
raheeliftikhar5 Mar 5, 2024
abe4b20
update lowcoder-comps version
raheeliftikhar5 Mar 5, 2024
20f5bc8
New plugin system
ludomikula Feb 5, 2024
e78671f
Merge pull request #742 from raheeliftikhar5/handle_defaultValue
FalkWolsky Mar 5, 2024
b58a742
new: plugin endpoint security basics
ludomikula Mar 5, 2024
800c16c
Merge branch 'lowcoder-org:dev' into dev
ludomikula Mar 6, 2024
eb0e0d5
feature: Extended folder to have more meta-data i.e: title, descripti…
irfan-ikhwa 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
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ client/node_modules/
client/packages/lowcoder-plugin-demo/.yarn/install-state.gz
client/packages/lowcoder-plugin-demo/yarn.lock
client/packages/lowcoder-plugin-demo/.yarn/cache/@types-node-npm-16.18.68-56f72825c0-094ae9ed80.zip
application-dev.yml
3 changes: 3 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@types/react-resizable": "^3.0.5",
"@types/react-router-dom": "^5.3.2",
"@types/shelljs": "^0.8.11",
"@types/simplebar": "^5.3.3",
"@types/stylis": "^4.0.2",
"@types/tern": "0.23.4",
"@types/ua-parser-js": "^0.7.36",
Expand Down Expand Up @@ -79,6 +80,8 @@
"chalk": "4",
"number-precision": "^1.6.0",
"react-player": "^2.11.0",
"resize-observer-polyfill": "^1.5.1",
"simplebar": "^6.2.5",
"tui-image-editor": "^3.15.3"
}
}
2 changes: 1 addition & 1 deletion client/packages/lowcoder-comps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-comps",
"version": "0.0.26",
"version": "0.0.27",
"type": "module",
"license": "MIT",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ ChartTmpComp = withViewFn(ChartTmpComp, (comp) => {

const handleOnMapScriptLoad = () => {
setMapScriptLoaded(true);
loadGoogleMapData();
setTimeout(() => {
loadGoogleMapData();
})
}

useEffect(() => {
Expand Down
5 changes: 4 additions & 1 deletion client/packages/lowcoder-design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"react-virtualized": "^9.22.3",
"rehype-raw": "^6.1.1",
"rehype-sanitize": "^5.0.1",
"remark-gfm": "^3.0.1"
"remark-gfm": "^3.0.1",
"simplebar": "^6.2.5",
"simplebar-react": "^3.2.4"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.2",
Expand All @@ -23,6 +25,7 @@
"@rollup/plugin-typescript": "^9.0.2",
"@rollup/plugin-url": "^8.0.1",
"@svgr/rollup": "^6.5.1",
"@types/simplebar": "^5.3.3",
"rollup": "^2",
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-polyfill-node": "^0.11.0",
Expand Down
35 changes: 29 additions & 6 deletions client/packages/lowcoder-design/src/components/ScrollBar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React from "react";
import SimpleBar from "simplebar-react";
import 'simplebar-react/dist/simplebar.min.css';
import styled from "styled-components";
import { DebouncedFunc } from 'lodash'; // Assuming you're using lodash's DebouncedFunc type

const ScrollBarWrapper = styled.div`

const ScrollBarWrapper = styled.div<{ hidePlaceholder?: boolean }>`
min-height: 0;
height: 100%;
width: 100%;
Expand Down Expand Up @@ -33,19 +36,39 @@ const ScrollBarWrapper = styled.div`
top: 10px;
bottom: 10px;
}

${props => props.hidePlaceholder && `
.simplebar-placeholder {
display: none !important;
}
`}
`;

interface IProps extends SimpleBar.Props {
// .simplebar-placeholder { added by Falk Wolsky to hide the placeholder - as it doubles the vertical space of a Module on a page

interface IProps {
children: React.ReactNode;
className?: string;
height?: string;
style?: React.CSSProperties; // Add this line to include a style prop
scrollableNodeProps?: {
onScroll: DebouncedFunc<(e: any) => void>;
};
hidePlaceholder?: boolean;
hideScrollbar?: boolean;
}

export const ScrollBar = (props: IProps) => {
const { height = "100%", className, children, ...otherProps } = props;
return (
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 ? (
<ScrollBarWrapper className={className}>
{children}
</ScrollBarWrapper>
) : (
<ScrollBarWrapper className={className}>
<SimpleBar forceVisible="y" style={{ height: height }} {...otherProps}>
<SimpleBar style={combinedStyle} scrollableNodeProps={scrollableNodeProps} {...otherProps}>
{children}
</SimpleBar>
</ScrollBarWrapper>
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export { ReactComponent as WidthIcon } from "./icon-width.svg";
export { ReactComponent as ResponsiveLayoutCompIcon } from "./icon-responsive-layout-comp.svg";
export { ReactComponent as TextSizeIcon } from "./remix/font-size-2.svg";
export { ReactComponent as FontFamilyIcon } from "./remix/font-sans-serif.svg";
export { ReactComponent as TextWeigthIcon } from "./remix/bold.svg";
export { ReactComponent as TextWeightIcon } from "./remix/bold.svg";
export { ReactComponent as BorderWidthIcon } from "./remix/expand-width-line.svg";
export { ReactComponent as LeftInfoLine } from "./remix/information-line.svg";
export { ReactComponent as LeftInfoFill } from "./remix/information-fill.svg";
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-sdk",
"version": "2.3.1",
"version": "2.3.4",
"type": "module",
"files": [
"src",
Expand Down
8 changes: 1 addition & 7 deletions client/packages/lowcoder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"/>
<meta lang="en" name="description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
<meta name="theme-color" content="#000000" />
<meta property="iframely:title" content="Lowcoder" />
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
<!-- Added Montserrat google font link to test font family style property for components -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<meta name="theme-color" content="#000000" />
<style>
html,
body {
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"rehype-sanitize": "^5.0.1",
"remark-gfm": "^3.0.1",
"resize-observer-polyfill": "^1.5.1",
"simplebar-react": "2.3.6",
"simplebar-react": "^3.2.4",
"sql-formatter": "^8.2.0",
"styled-components": "^6.1.6",
"stylis": "^4.1.1",
Expand Down
19 changes: 19 additions & 0 deletions client/packages/lowcoder/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ class AppIndex extends React.Component<AppIndexProps, any> {
render() {
const isTemplate = hasQueryParam("template");
const pathname = history.location.pathname;

// we check if we are on the public cloud
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';

// make sure all users in this app have checked login info
if (!this.props.isFetchUserFinished) {
const hideLoadingHeader = isTemplate || isAuthUnRequired(pathname);
Expand All @@ -107,6 +111,21 @@ 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>
</>
)}

</Helmet>
<SystemWarning />
<Router history={history}>
Expand Down
7 changes: 7 additions & 0 deletions client/packages/lowcoder/src/components/CompName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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 @@ -96,8 +96,7 @@ function ModuleLayoutView(props: IProps) {
};

return (
<ScrollBar style={{ height: "100%", margin: "0px", padding: "0px" }}>
<CanvasView
<CanvasView
layout={layout}
items={items}
positionParams={{ ...positionParams, cols: parseInt(defaultGrid) }}
Expand All @@ -106,7 +105,6 @@ function ModuleLayoutView(props: IProps) {
onLayoutChange={onLayoutChange}
extraHeight="0px"
/>
</ScrollBar>
);
}

Expand All @@ -118,26 +116,28 @@ export class ModuleLayoutComp extends ModuleLayoutCompBase implements IContainer
const rowCount = this.children.containerRowCount.getView();
return (
<div>
<ModuleLayoutView
positionParams={this.children.positionParams.getView()}
containerSize={this.children.containerSize.getView()}
containerView={this.children.container.containerView({
rowCount,
isRowCountLocked,
onRowCountChange: (rowCount) => {
this.children.containerRowCount.dispatchChangeValueAction(rowCount);
},
})}
onPositionParamsChange={(params) => {
setTimeout(() => this.children.positionParams.dispatchChangeValueAction(params));
}}
onLayoutChange={(layout) => {
this.children.containerSize.dispatchChangeValueAction({
height: layout[moduleContainerId].h,
width: layout[moduleContainerId].w,
});
}}
/>
<ScrollBar style={{ height: "100%", margin: "0px", padding: "0px" }} hidePlaceholder={false}>
<ModuleLayoutView
positionParams={this.children.positionParams.getView()}
containerSize={this.children.containerSize.getView()}
containerView={this.children.container.containerView({
rowCount,
isRowCountLocked,
onRowCountChange: (rowCount) => {
this.children.containerRowCount.dispatchChangeValueAction(rowCount);
},
})}
onPositionParamsChange={(params) => {
setTimeout(() => this.children.positionParams.dispatchChangeValueAction(params));
}}
onLayoutChange={(layout) => {
this.children.containerSize.dispatchChangeValueAction({
height: layout[moduleContainerId].h,
width: layout[moduleContainerId].w,
});
}}
/>
</ScrollBar>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ import {

import { useContext } from "react";
import { EditorContext } from "comps/editorState";
import { migrateOldData } from "comps/generators/simpleGenerators";
import { fixOldInputCompData } from "../textInputComp/textInputConstants";

const getStyle = (style: InputLikeStyleType) => {
return css`
Expand Down Expand Up @@ -372,7 +374,7 @@ const CustomInputNumber = (props: RecordConstructorToView<typeof childrenMap>) =
);
};

const NumberInputTmpComp = (function () {
let NumberInputTmpComp = (function () {
return new UICompBuilder(childrenMap, (props) => {
return props.label({
required: props.required,
Expand Down Expand Up @@ -434,6 +436,8 @@ const NumberInputTmpComp = (function () {
.build();
})();

NumberInputTmpComp = migrateOldData(NumberInputTmpComp, fixOldInputCompData);

const NumberInputTmp2Comp = withMethodExposing(
NumberInputTmpComp,
refMethods([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const getStyle = (style: SliderStyleType) => {
}
.ant-slider-handle {
background-color: ${style.thumb};
border-color: ${style.thumbBoder};
border-color: ${style.thumbBorder};
}
}
&:hover {
Expand All @@ -39,7 +39,7 @@ const getStyle = (style: SliderStyleType) => {
}
}
.ant-slider-handle:focus {
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBoder, 0.08), 0.12)};
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBorder, 0.08), 0.12)};
}
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { ValueFromOption } from "lowcoder-design";
import { EllipsisTextCss } from "lowcoder-design";
import { trans } from "i18n";
import { RefControl } from "comps/controls/refControl";
import { migrateOldData } from "comps/generators/simpleGenerators";
import { fixOldInputCompData } from "../textInputComp/textInputConstants";

export const getStyle = (style: CheckboxStyleType) => {
return css`
Expand Down Expand Up @@ -126,7 +128,7 @@ const CheckboxGroup = styled(AntdCheckboxGroup) <{
}}
`;

const CheckboxBasicComp = (function () {
let CheckboxBasicComp = (function () {
const childrenMap = {
defaultValue: arrayStringExposingStateControl("defaultValue"),
value: arrayStringExposingStateControl("value"),
Expand Down Expand Up @@ -176,6 +178,8 @@ const CheckboxBasicComp = (function () {
.build();
})();

CheckboxBasicComp = migrateOldData(CheckboxBasicComp, fixOldInputCompData);

export const CheckboxComp = withExposingConfigs(CheckboxBasicComp, [
new NameConfig("value", trans("selectInput.valueDesc")),
SelectInputInvalidConfig,
Expand Down
Loading