Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dev -> Main for Release 2.4.3#1031

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
FalkWolsky merged 12 commits intomainfromdev
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
12 commits
Select commitHold shift + click to select a range
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
2 changes: 1 addition & 1 deletionclient/VERSION
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
2.4.2
2.4.3
2 changes: 1 addition & 1 deletionclient/packages/lowcoder-comps/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-comps",
"version": "2.4.7",
"version": "2.4.8",
"type": "module",
"license": "MIT",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletionclient/packages/lowcoder-sdk/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
{
"name":"lowcoder-sdk",
"version":"2.4.5",
"version":"2.4.6",
"type":"module",
"files": [
"src",
Expand Down
5 changes: 5 additions & 0 deletionsclient/packages/lowcoder/src/app.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -130,6 +130,11 @@ class AppIndex extends React.Component<AppIndexProps, any> {
// make sure all users in this app have checked login info
if (!this.props.isFetchUserFinished || (this.props.currentUserId && !this.props.fetchHomeDataFinished)) {
const hideLoadingHeader = isTemplate || isAuthUnRequired(pathname);
// if the user just logged in, we send the event to posthog
if (sessionStorage.getItem('_just_logged_in_')) {
posthog.identify(this.props.currentUserId);
sessionStorage.removeItem('_just_logged_in_');
}
return <ProductLoading hideHeader={hideLoadingHeader} />;
}

Expand Down
48 changes: 28 additions & 20 deletionsclient/packages/lowcoder/src/comps/comps/dividerComp.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,19 +17,18 @@ import { AutoHeightControl } from "comps/controls/autoHeightControl";

import{useContext}from"react";
import{EditorContext}from"comps/editorState";
import{useMergeCompStyles}from"@lowcoder-ee/index.sdk";

typeIProps=DividerProps&{
$style:DividerStyleType;
dashed:boolean;
$animationStyle:AnimationStyleType;
type?:'vertical'|'horizontal';
};

// TODO: enable type "vertical" https://ant.design/components/divider

constStyledDivider=styled(Divider)<IProps>`
margin-top: 3.5px;
rotate:${(props)=>props.$style.rotation};
rotate:${(props)=>props.type==='vertical' ?'0deg' :props.$style.rotation};
.ant-divider-inner-text {
height: 32px;
display: flex;
Expand All@@ -56,7 +55,6 @@ const StyledDivider = styled(Divider)<IProps>`
.ant-divider-inner-text::before,
.ant-divider-inner-text::after {
border-block-start:${(props)=>props.$style.borderWidth&&props.$style.borderWidth!=="0px" ?props.$style.borderWidth :"1px"}
${(props)=>props.dashed ?"dashed" :"solid"}
${(props)=>props.$style.border} !important;
border-block-start-color: inherit;
border-block-end: 0;
Expand All@@ -77,15 +75,22 @@ const StyledDivider = styled(Divider)<IProps>`
${(props)=>props.$style.borderStyle}
${(props)=>props.$style.border};
}
&.ant-divider-vertical {
height:${(props)=>props.type==='vertical'&&'200px'};
border-left:${(props)=>props.$style.borderWidth&&props.$style.borderWidth!=="0px" ?props.$style.borderWidth :"1px"}
${(props)=>props.$style.borderStyle}
${(props)=>props.$style.border};
border-top: none;
}
`;

constchildrenMap={
title:StringControl,
dashed:BoolControl,
align:alignControl(),
autoHeight:withDefault(AutoHeightControl,"fixed"),
style:styleControl(DividerStyle),
animationStyle:styleControl(AnimationStyle),
type:BoolControl,
autoHeight:withDefault(AutoHeightControl,"auto"),
style:styleControl(DividerStyle,'style'),
animationStyle:styleControl(AnimationStyle,'animationStyle'),
};

functionfixOldStyleData(oldData:any){
Expand All@@ -105,25 +110,29 @@ function fixOldStyleData(oldData: any) {

// Compatible with historical style data 2022-8-26
constDividerTempComp=migrateOldData(
newUICompBuilder(childrenMap,(props)=>{
newUICompBuilder(childrenMap,(props,dispatch)=>{
useMergeCompStyles(propsasRecord<string,any>,dispatch);
constdividerType=props.type ?'vertical' :'horizontal';

return(
<StyledDivider
orientation={props.align}
dashed={props.dashed}
type={dividerType}
$style={props.style}
$animationStyle={props.animationStyle}
>
{props.title}
{dividerType==='horizontal'&&props.title}
</StyledDivider>
);
})
.setPropertyViewFn((children)=>{
return(
<>
<Sectionname={sectionNames.basic}>
{children.title.propertyView({label:trans("divider.title")})}
</Section>

{!children?.type?.getView()&&
<Sectionname={sectionNames.basic}>
{children.title.propertyView({label:trans("divider.title")})}
</Section>}

{["logic","both"].includes(useContext(EditorContext).editorModeStatus)&&(
<Sectionname={sectionNames.interaction}>
{hiddenPropertyView(children)}
Expand All@@ -141,7 +150,7 @@ const DividerTempComp = migrateOldData(
{children.autoHeight.getPropertyView()}
</Section>
<Sectionname={sectionNames.style}>
{children.dashed.propertyView({label:trans("divider.dashed")})}
{children.type.propertyView({label:trans("divider.type")})}
{children.style.getPropertyView()}
</Section>
<Sectionname={sectionNames.animationStyle}hasTooltip={true}>
Expand All@@ -153,7 +162,6 @@ const DividerTempComp = migrateOldData(
);
})
.setExposeStateConfigs([
newNameConfig("dashed",trans("divider.dashedDesc")),
newNameConfig("title",trans("divider.titleDesc")),
newNameConfig("align",trans("divider.alignDesc")),
NameConfigHidden,
Expand All@@ -166,4 +174,4 @@ export const DividerComp = class extends DividerTempComp {
overrideautoHeight():boolean{
returnthis.children.autoHeight.getView();
}
};
};
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,8 @@ import { AlignRight } from "lowcoder-design";
import{LayoutActionComp}from"./layoutActionComp";
import{defaultTheme}from"@lowcoder-ee/constants/themeConstants";
import{clickEvent,eventHandlerControl}from"@lowcoder-ee/comps/controls/eventHandlerControl";
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
import{childrenToProps}from"@lowcoder-ee/comps/generators/multi";

constTabBar=React.lazy(()=>import("antd-mobile/es/components/tab-bar"));
constTabBarItem=React.lazy(()=>
Expand DownExpand Up@@ -228,9 +230,10 @@ function TabBarView(props: TabBarProps & {
>
<StyledTabBar
onChange={(key:string)=>{
console.log(key)
if(key){
props.onEvent('click')
props.onChange(key);
props.onEvent('click')
}
}}
activeKey={props.selectedKey}
Expand DownExpand Up@@ -289,7 +292,7 @@ let MobileTabLayoutTmp = (function () {
constchildrenMap={
onEvent:eventHandlerControl(EventOptions),
dataOptionType:dropdownControl(DataOptionType,DataOption.Manual),
jsonItems:jsonControl<JsonItemNode[]>(convertTreeData,mobileNavJsonMenuItems),
jsonItems:jsonControl<JsonItemNode[]>(convertTreeData,mobileNavJsonMenuItems),
tabs:manualOptionsControl(TabOptionComp,{
initOptions:[
{
Expand All@@ -315,12 +318,12 @@ let MobileTabLayoutTmp = (function () {
maxWidth:withDefault(NumberControl,450),
verticalAlignment:dropdownControl(VerticalAlignmentOptions,"stretch"),
showSeparator:withDefault(BoolCodeControl,true),
navStyle:withDefault(styleControl(NavLayoutStyle),defaultStyle),
navItemStyle:withDefault(styleControl(NavLayoutItemStyle),defaultStyle),
navItemHoverStyle:withDefault(styleControl(NavLayoutItemHoverStyle),{}),
navItemActiveStyle:withDefault(styleControl(NavLayoutItemActiveStyle),{}),
navStyle:styleControl(NavLayoutStyle,'navStyle'),
navItemStyle:styleControl(NavLayoutItemStyle,'navItemStyle'),
navItemHoverStyle:styleControl(NavLayoutItemHoverStyle,'navItemHoverStyle'),
navItemActiveStyle:styleControl(NavLayoutItemActiveStyle,'navItemActiveStyle'),
};
returnnewMultiCompBuilder(childrenMap,(props)=>{
returnnewMultiCompBuilder(childrenMap,(props,dispatch)=>{
returnnull;
})
.setPropertyViewFn((children)=>{
Expand DownExpand Up@@ -402,6 +405,8 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
constbgColor=(useContext(ThemeContext)?.theme||defaultTheme).canvas;
constonEvent=comp.children.onEvent.getView();

useMergeCompStyles(childrenToProps(comp.children),comp.dispatch);

useEffect(()=>{
comp.children.jsonTabs.dispatchChangeValueAction({
manual:jsonItemsasunknownasArray<ConstructorToDataType<typeofTabOptionComp>>
Expand All@@ -427,9 +432,20 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
constappView=useMemo(()=>{
constcurrentTab=tabViews[tabIndex];

if(dataOptionType===DataOption.Json){
return(currentTab&&
currentTab.children.app.getAppId()&&
currentTab.children.app.getView())||(
<EmptyContent
text={readOnly ?"" :trans("aggregation.emptyTabTooltip")}
style={{height:"100%",backgroundColor:"white"}}
/>
);
}

return(currentTab&&
currentTab.children.app.getAppId()&&
currentTab.children.app.getView())||(
//currentTab.children.app.getAppId() &&
currentTab.children.action.getView())||(
<EmptyContent
text={readOnly ?"" :trans("aggregation.emptyTabTooltip")}
style={{height:"100%",backgroundColor:"white"}}
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ import { trans } from "i18n";
import { EditorContainer, EmptyContent } from "pages/common/styledComponent";
import { useCallback, useEffect, useMemo, useState } from "react";
import styled from "styled-components";
import { isUserViewMode, useAppPathParam } from "util/hooks";
import { isUserViewMode, useAppPathParam, useMergeCompStyles } from "util/hooks";
import { BoolCodeControl, StringControl, jsonControl } from "comps/controls/codeControl";
import { styleControl } from "comps/controls/styleControl";
import {
Expand All@@ -41,6 +41,7 @@ import {
menuItemStyleOptions
} from "./navLayoutConstants";
import { clickEvent, eventHandlerControl } from "@lowcoder-ee/comps/controls/eventHandlerControl";
import { childrenToProps } from "@lowcoder-ee/comps/generators/multi";

const { Header } = Layout;

Expand DownExpand Up@@ -198,10 +199,10 @@ let NavTmpLayout = (function () {
backgroundImage: withDefault(StringControl, ""),
mode: dropdownControl(ModeOptions, "inline"),
collapse: BoolCodeControl,
navStyle:withDefault(styleControl(NavLayoutStyle), {...defaultStyle, padding: '1px'}),
navItemStyle:withDefault(styleControl(NavLayoutItemStyle), defaultStyle),
navItemHoverStyle:withDefault(styleControl(NavLayoutItemHoverStyle), {}),
navItemActiveStyle:withDefault(styleControl(NavLayoutItemActiveStyle), {}),
navStyle: styleControl(NavLayoutStyle, 'navStyle'),
navItemStyle: styleControl(NavLayoutItemStyle, 'navItemStyle'),
navItemHoverStyle: styleControl(NavLayoutItemHoverStyle, 'navItemHoverStyle'),
navItemActiveStyle: styleControl(NavLayoutItemActiveStyle, 'navItemActiveStyle'),
};
return new MultiCompBuilder(childrenMap, (props) => {
return null;
Expand DownExpand Up@@ -290,6 +291,8 @@ NavTmpLayout = withViewFn(NavTmpLayout, (comp) => {
const dataOptionType = comp.children.dataOptionType.getView();
const onEvent = comp.children.onEvent.getView();

useMergeCompStyles(childrenToProps(comp.children), comp.dispatch);

// filter out hidden. unauthorised items filtered by server
const filterItem = useCallback((item: LayoutMenuItemComp): boolean => {
return !item.children.hidden.getView();
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -876,7 +876,7 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
...(theme?.theme?.components?.[compType]?.[styleKey] || {}) as unknown as Record<string, string>
}
: undefined;
const styleProps = preventStyleOverwriting || preventAppStylesOverwriting || appliedThemeId === themeId
const styleProps =(!comp && !compType) ||preventStyleOverwriting || preventAppStylesOverwriting || appliedThemeId === themeId
? props as ColorMap
: {} as ColorMap;

Expand Down
6 changes: 6 additions & 0 deletionsclient/packages/lowcoder/src/constants/themeConstants.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,6 +95,11 @@ const qrCode = {
}
};

constdivider={
style:{
radius:"0px"
}
};

exportconstdefaultTheme:ThemeDetail={
primary:"#3377FF",
Expand DownExpand Up@@ -130,6 +135,7 @@ export const defaultTheme: ThemeDetail = {
qrCode,
treeSelect,
pageLayout,
divider,
password:input,
numberInput:input,
textArea:input,
Expand Down
1 change: 1 addition & 0 deletionsclient/packages/lowcoder/src/i18n/locales/en.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2006,6 +2006,7 @@ export const en = {
"title": "Title",
"align": "Alignment",
"dashed": "Dashed",
"type": "Vertical type",
"dashedDesc": "Whether to Use Dashed Line",
"titleDesc": "Divider Title",
"alignDesc": "Divider Title Alignment"
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -82,6 +82,7 @@ export function authRespValidate(

if (doValidResponse(resp)) {
onAuthSuccess?.();
sessionStorage.setItem("_just_logged_in_", "true");
history.replace(replaceUrl.replace(baseUrl, ''));
} else if (
resp.data.code === SERVER_ERROR_CODES.EXCEED_MAX_USER_ORG_COUNT ||
Expand Down
2 changes: 1 addition & 1 deletionclient/packages/lowcoder/src/util/hooks.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -177,7 +177,7 @@ export function useMergeCompStyles(
const compTheme = theme?.theme?.components?.[compType];
const themeId = theme?.themeId;

const styleKeys = Object.keys(props).filter(key => key.toLowerCase().endsWith('style'));
const styleKeys = Object.keys(props).filter(key => key.toLowerCase().endsWith('style' || 'styles'));
const styleProps: Record<string, any> = {};
styleKeys.forEach((key: string) => {
styleProps[key] = (props as any)[key];
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ public Mono<Organization> createDefault(User user, boolean isSuperAdmin) {

private Mono<Boolean> joinOrganizationInEnterpriseMode(String userId) {
return getOrganizationInEnterpriseMode()
.flatMap(organization -> orgMemberService.addMember(organization.getGid(), userId, MemberRole.MEMBER))
.flatMap(organization -> orgMemberService.addMember(organization.getId(), userId, MemberRole.MEMBER))
.defaultIfEmpty(false);
}

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@ public class AuthUser {

private String uid;
private String username;
private String email;
private String avatar;
private Map<String, Object> rawUserInfo;
private Map<String, Object> extra;
Expand All@@ -41,6 +42,7 @@ public Connection toAuthConnection() {
.authId(getAuthContext().getAuthConfig().getId())
.source(getSource())
.name(getUsername())
.email(getEmail())
.rawId(getUid())
.avatar(getAvatar())
.orgIds(StringUtils.isBlank(getOrgId()) ? Set.of() : Set.of(getOrgId()))
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,6 +46,8 @@ public class Connection implements Serializable {

privatefinalStringname;

privatefinalStringemail;

privatefinalStringavatar;

privateSet<String>orgIds;
Expand All@@ -59,12 +61,13 @@ public class Connection implements Serializable {
privateSet<String>tokens;

@JsonCreator
privateConnection(StringauthId,Stringsource,StringrawId,Stringname,Stringavatar,Set<String>orgIds,@Nullable
privateConnection(StringauthId,Stringsource,StringrawId,Stringname,Stringemail,Stringavatar,Set<String>orgIds,@Nullable
ConnectionAuthTokenauthConnectionAuthToken,Map<String,Object>rawUserInfo,Set<String>tokens) {
this.authId =authId;
this.source =source;
this.rawId =rawId;
this.name =name;
this.email =email;
this.avatar =avatar;
this.orgIds =CollectionUtils.isEmpty(orgIds) ?newHashSet<>() :orgIds;
this.authConnectionAuthToken =authConnectionAuthToken;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,6 +42,8 @@ public class User extends HasIdAndAuditing implements BeforeMongodbWrite, AfterM

private String name;

private String email;

private String uiLanguage;

private String avatar;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,4 +19,7 @@ public interface UserRepository extends ReactiveMongoRepository<User, String> {
Flux<User> findByConnections_SourceAndConnections_RawIdIn(String source, Collection<String> rawIds);

Mono<User> findByName(String rawUuid);

//email1 and email2 should be equal
Mono<User> findByEmailOrConnections_Email(String email1, String email2);
}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp