Date: Thu, 3 Aug 2023 12:55:01 +0530
Subject: [PATCH 2/6] fix: comment component
---
.../comps/comps/commentComp/commentComp.tsx | 243 +++++++++---------
1 file changed, 121 insertions(+), 122 deletions(-)
diff --git a/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx b/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx
index 0f0e4fe15..74168ec9e 100644
--- a/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx
+++ b/client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx
@@ -214,138 +214,137 @@ const CommentCompBase = (
}
};
return (
-
-
- {commentListData.length > 1
- ? title
- .replaceAll("%d", commentListData.length.toString())
- .replace("comment", "comments")
- : title.replaceAll("%d", commentListData.length.toString())}
-
- ) : (
- ""
- )
- }
- size="small"
+ }}>
+
-
+ {commentListData.length > 1
+ ? title
+ .replaceAll("%d", commentListData.length.toString())
+ .replace("comment", "comments")
+ : title.replaceAll("%d", commentListData.length.toString())}
+
+ ) : (
+ ""
+ )
+ }
+ size="small"
>
- {(item, index) => (
- handleDelete(index)}
- />,
- ]
- : undefined
- }
- >
- props.onEvent("click")}>
- {item?.user?.name}
-
-
- {dayjs(item?.createdAt).isValid()
- ? dayjs(item?.createdAt).fromNow()
- : trans("comment.dateErr")}
-
-
-
- }
- description={{item?.value}}
- />
-
- )}
-
-
- {sendCommentAble ? (
- <>
- {
- dispatch(changeChildAction("mentionName", option?.value, false));
- props.onEvent("mention");
- }}
- value={context}
- rows={2}
- onPressEnter={onPressEnter}
- placeholder={placeholder}
+
- {(MentionListData[prefix] || []).map(
- (value: string, index: number) => (
-
- {value}
-
- )
+ {(item, index) => (
+ handleDelete(index)}
+ />,
+ ]
+ : undefined
+ }
+ >
+ props.onEvent("click")}>
+ {item?.user?.name}
+
+
+ {dayjs(item?.createdAt).isValid()
+ ? dayjs(item?.createdAt).fromNow()
+ : trans("comment.dateErr")}
+
+
+
+ }
+ description={{item?.value}}
+ />
+
)}
-
-
- >
- ) : (
- ""
- )}
+
+
+ {sendCommentAble ? (
+
+ {
+ dispatch(changeChildAction("mentionName", option?.value, false));
+ props.onEvent("mention");
+ }}
+ value={context}
+ rows={2}
+ onPressEnter={onPressEnter}
+ placeholder={placeholder}
+ >
+ {(MentionListData[prefix] || []).map(
+ (value: string, index: number) => (
+
+ {value}
+
+ )
+ )}
+
+
+
+ ) : (
+ ""
+ )}
+
);
};
From 2bd434c551c055df3f063ee54a20d67873d6c5c5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 7 Aug 2023 08:05:40 +0000
Subject: [PATCH 3/6] chore(deps): bump clsx from 1.2.1 to 2.0.0 in /client
Bumps [clsx](https://github.com/lukeed/clsx) from 1.2.1 to 2.0.0.
- [Release notes](https://github.com/lukeed/clsx/releases)
- [Commits](https://github.com/lukeed/clsx/compare/v1.2.1...v2.0.0)
---
updated-dependencies:
- dependency-name: clsx
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
client/packages/lowcoder/package.json | 2 +-
client/yarn.lock | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/client/packages/lowcoder/package.json b/client/packages/lowcoder/package.json
index 278628768..06b107dfc 100644
--- a/client/packages/lowcoder/package.json
+++ b/client/packages/lowcoder/package.json
@@ -41,7 +41,7 @@
"antd-img-crop": "^4.12.2",
"axios": "^0.21.1",
"buffer": "^6.0.3",
- "clsx": "^1.2.1",
+ "clsx": "^2.0.0",
"cnchar": "^3.2.4",
"copy-to-clipboard": "^3.3.3",
"core-js": "^3.25.2",
diff --git a/client/yarn.lock b/client/yarn.lock
index c000939f6..15f1fcb12 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -6058,13 +6058,20 @@ __metadata:
languageName: node
linkType: hard
-"clsx@npm:^1.0.4, clsx@npm:^1.1.1, clsx@npm:^1.2.1":
+"clsx@npm:^1.0.4, clsx@npm:^1.1.1":
version: 1.2.1
resolution: "clsx@npm:1.2.1"
checksum: 30befca8019b2eb7dbad38cff6266cf543091dae2825c856a62a8ccf2c3ab9c2907c4d12b288b73101196767f66812365400a227581484a05f968b0307cfaf12
languageName: node
linkType: hard
+"clsx@npm:^2.0.0":
+ version: 2.0.0
+ resolution: "clsx@npm:2.0.0"
+ checksum: a2cfb2351b254611acf92faa0daf15220f4cd648bdf96ce369d729813b85336993871a4bf6978ddea2b81b5a130478339c20d9d0b5c6fc287e5147f0c059276e
+ languageName: node
+ linkType: hard
+
"cnchar-types@npm:^3.2.4":
version: 3.2.4
resolution: "cnchar-types@npm:3.2.4"
@@ -11721,7 +11728,7 @@ __metadata:
antd-img-crop: ^4.12.2
axios: ^0.21.1
buffer: ^6.0.3
- clsx: ^1.2.1
+ clsx: ^2.0.0
cnchar: ^3.2.4
copy-to-clipboard: ^3.3.3
core-js: ^3.25.2
From d0e10348673f5e6091f880984feb955c1d49a64c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 26 Sep 2023 17:29:01 +0000
Subject: [PATCH 4/6] build(deps): bump org.eclipse.jgit:org.eclipse.jgit
Bumps org.eclipse.jgit:org.eclipse.jgit from 6.5.0.202303070854-r to 6.7.0.202309050840-r.
---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
server/api-service/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/api-service/pom.xml b/server/api-service/pom.xml
index a6acfae30..5af501f1b 100644
--- a/server/api-service/pom.xml
+++ b/server/api-service/pom.xml
@@ -175,7 +175,7 @@
org.eclipse.jgit
org.eclipse.jgit
- 6.5.0.202303070854-r
+ 6.7.0.202309050840-r
From ca41abf6a94b00feda2df7a18c3d170d05eb5989 Mon Sep 17 00:00:00 2001
From: FalkWolsky
Date: Fri, 20 Oct 2023 21:33:10 +0200
Subject: [PATCH 5/6] Comment Component by Mousheng
---
client/packages/lowcoder/src/comps/index.tsx | 2 ++
client/packages/lowcoder/src/i18n/locales/en.ts | 2 +-
client/packages/lowcoder/src/i18n/locales/zh.ts | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/client/packages/lowcoder/src/comps/index.tsx b/client/packages/lowcoder/src/comps/index.tsx
index a7466e9a8..8aa9386b7 100644
--- a/client/packages/lowcoder/src/comps/index.tsx
+++ b/client/packages/lowcoder/src/comps/index.tsx
@@ -931,6 +931,8 @@ const uiCompMap: Registry = {
layoutInfo: {
w: 13,
h: 55,
+ }
+ },
mention: {
name: trans("uiComp.mentionCompName"),
enName: "mention",
diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts
index 2a4acb101..741743c69 100644
--- a/client/packages/lowcoder/src/i18n/locales/en.ts
+++ b/client/packages/lowcoder/src/i18n/locales/en.ts
@@ -2651,7 +2651,7 @@ export const en = {
helpdisplayName: "display name(low priority)",
helpvalue: "Comment content",
helpcreatedAt: "create date",
- }
+ },
mention: {
mentionList: "mention list",
},
diff --git a/client/packages/lowcoder/src/i18n/locales/zh.ts b/client/packages/lowcoder/src/i18n/locales/zh.ts
index 6d39cf08a..b73d9752a 100644
--- a/client/packages/lowcoder/src/i18n/locales/zh.ts
+++ b/client/packages/lowcoder/src/i18n/locales/zh.ts
@@ -2508,7 +2508,7 @@ timeLine: {
helpdisplayName: "头像文字(低优先)",
helpvalue: "评论内容",
helpcreatedAt: "创建时间",
- }
+ },
mention:{
mentionList: "提及列表",
},
From 98236e2ff926967a4d1a217be2af00141a9edd1b Mon Sep 17 00:00:00 2001
From: Abdul Qadir
Date: Sat, 21 Oct 2023 00:34:29 +0500
Subject: [PATCH 6/6] Add handling to delete an auth config permanently
---
.../AuthenticationController.java | 4 +--
.../service/AuthenticationApiService.java | 2 +-
.../service/AuthenticationApiServiceImpl.java | 34 ++++++++++++++-----
3 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/AuthenticationController.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/AuthenticationController.java
index 7017da2fc..8f6a2cfcd 100644
--- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/AuthenticationController.java
+++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/AuthenticationController.java
@@ -90,8 +90,8 @@ public Mono> enableAuthConfig(@RequestBody AuthConfigRequest
}
@DeleteMapping("/config/{id}")
- public Mono> disableAuthConfig(@PathVariable("id") String id) {
- return authenticationApiService.disableAuthConfig(id)
+ public Mono> disableAuthConfig(@PathVariable("id") String id, @RequestParam(required = false) boolean delete) {
+ return authenticationApiService.disableAuthConfig(id, delete)
.thenReturn(ResponseView.success(null));
}
diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiService.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiService.java
index c3db123f0..68ac9f691 100644
--- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiService.java
+++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiService.java
@@ -17,7 +17,7 @@ public interface AuthenticationApiService {
Mono enableAuthConfig(AuthConfigRequest authConfigRequest);
- Mono disableAuthConfig(String authId);
+ Mono disableAuthConfig(String authId, boolean delete);
Flux findAuthConfigs(boolean enableOnly);
}
diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java
index da0d58aff..2851e1070 100644
--- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java
+++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java
@@ -41,6 +41,7 @@
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Function;
+import java.util.function.Predicate;
import java.util.stream.Collectors;
import static org.lowcoder.sdk.exception.BizError.*;
@@ -239,12 +240,12 @@ public Mono enableAuthConfig(AuthConfigRequest authConfigRequest) {
}
@Override
- public Mono disableAuthConfig(String authId) {
+ public Mono disableAuthConfig(String authId, boolean delete) {
return checkIfAdmin()
.then(checkIfOnlyEffectiveCurrentUserConnections(authId))
.then(sessionUserService.getVisitorOrgMemberCache())
.flatMap(orgMember -> organizationService.getById(orgMember.getOrgId()))
- .doOnNext(organization -> disableAuthConfig(organization, authId))
+ .doOnNext(organization -> disableAuthConfig(organization, authId, delete))
.flatMap(organization -> organizationService.update(organization.getId(), organization))
.delayUntil(result -> {
if (result) {
@@ -309,13 +310,28 @@ private Mono checkIfOnlyEffectiveCurrentUserConnections(String authId) {
.then();
}
- private void disableAuthConfig(Organization organization, String authId) {
- Optional.of(organization)
- .map(Organization::getAuthConfigs)
- .orElse(Collections.emptyList())
- .stream()
- .filter(abstractAuthConfig -> Objects.equals(abstractAuthConfig.getId(), authId))
- .forEach(abstractAuthConfig -> abstractAuthConfig.setEnable(false));
+ private void disableAuthConfig(Organization organization, String authId, boolean delete) {
+
+ Predicate authConfigPredicate = abstractAuthConfig -> Objects.equals(abstractAuthConfig.getId(), authId);
+
+ if(delete) {
+ List abstractAuthConfigs = Optional.of(organization)
+ .map(Organization::getAuthConfigs)
+ .orElse(Collections.emptyList());
+
+ abstractAuthConfigs.removeIf(authConfigPredicate);
+
+ organization.getOrganizationDomain().setConfigs(abstractAuthConfigs);
+
+ } else {
+ Optional.of(organization)
+ .map(Organization::getAuthConfigs)
+ .orElse(Collections.emptyList()).stream()
+ .filter(authConfigPredicate)
+ .forEach(abstractAuthConfig -> {
+ abstractAuthConfig.setEnable(false);
+ });
+ }
}
/**