Skip to content

add comment component: #317

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 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Merge branch 'dev' into comment_component
  • Loading branch information
FalkWolsky authored Oct 20, 2023
commit a8f40231fda07439edafb43644b91cf63d2ebf4a
6 changes: 5 additions & 1 deletion client/packages/lowcoder-design/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,8 @@ export { ReactComponent as CompressIcon } from "icons/icon-compress.svg";
export { ReactComponent as TableCellsIcon } from "icons/icon-table-cells.svg"; // Added By Aqib Mirza
export { ReactComponent as TimeLineIcon } from "icons/icon-timeline-comp.svg"
export { ReactComponent as LottieIcon } from "icons/icon-lottie.svg";
export { ReactComponent as CommentIcon } from "icons/icon-comment-comp.svg";
export { ReactComponent as CommentIcon } from "icons/icon-comment-comp.svg";
export { ReactComponent as MentionIcon } from "icons/icon-mention-comp.svg";
export { ReactComponent as AutoCompleteCompIcon } from "icons/icon-autocomplete-comp.svg";
export { ReactComponent as WidthIcon } from "icons/icon-width.svg";
export { ReactComponent as ResponsiveLayoutCompIcon } from "icons/icon-responsive-layout-comp.svg";
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,31 @@ export const mentionEvent: EventConfigType = {
value: "mention",
description: trans("event.mentionDesc"),
};

export const audioUnmuted: EventConfigType = {
label: trans("meeting.audioUnmuted"),
value: "audioUnmuted",
description: trans("meeting.audioUnmuted"),
};
export const audioMuted: EventConfigType = {
label: trans("meeting.audioMuted"),
value: "audioMuted",
description: trans("meeting.audioMuted"),
};
export const videoOff: EventConfigType = {
label: trans("meeting.videoOff"),
value: "videoOff",
description: trans("meeting.videoOff"),
};
export const videoOn: EventConfigType = {
label: trans("meeting.videoOn"),
value: "videoOn",
description: trans("meeting.videoOn"),
};
export const videoClicked: EventConfigType = {
label: trans("meeting.videoClicked"),
value: "videoClicked",
description: trans("meeting.videoClicked"),
};
export const InputEventHandlerControl = eventHandlerControl([
changeEvent,
focusEvent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ export const SignatureStyle = [
PADDING,
] as const;

//Added by Aqib Mirza
// Added by Aqib Mirza
export const LottieStyle = [
{
name: "background",
Expand All @@ -904,7 +904,6 @@ export const LottieStyle = [
PADDING,
] as const;
/////////////////////

export const CommentStyle = [
{
name: "background",
Expand All @@ -917,6 +916,17 @@ export const CommentStyle = [
PADDING,
RADIUS,
] as const
export const ResponsiveLayoutRowStyle = [
...BG_STATIC_BORDER_RADIUS,
MARGIN,
PADDING,
] as const;

export const ResponsiveLayoutColStyle = [
...BG_STATIC_BORDER_RADIUS,
MARGIN,
PADDING,
] as const;

export const CarouselStyle = [getBackground("canvas")] as const;

Expand Down
45 changes: 44 additions & 1 deletion client/packages/lowcoder/src/comps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ import {
TimeLineIcon,
LottieIcon,
CommentIcon,
MentionIcon,
AutoCompleteCompIcon,
ResponsiveLayoutCompIcon,
MermaidIcon,
} from "lowcoder-design";

import { defaultFormData, FormComp } from "./comps/formComp/formComp";
Expand Down Expand Up @@ -130,7 +134,8 @@ import { ScannerComp } from "./comps/buttonComp/scannerComp";
import { SignatureComp } from "./comps/signatureComp";
import { TimeLineComp } from "./comps/timelineComp/timelineComp";
import { CommentComp } from "./comps/commentComp/commentComp";

import { MentionComp } from "./comps/textInputComp/mentionComp";
import { AutoCompleteComp } from "./comps/autoCompleteComp/autoCompleteComp";
//Added by Aqib Mirza
import { JsonLottieComp } from "./comps/jsonComp/jsonLottieComp";
import { ResponsiveLayoutComp } from "./comps/responsiveLayout";
Expand Down Expand Up @@ -914,6 +919,7 @@ const uiCompMap: Registry = {
h: 55,
},
},

comment: {
name: trans("uiComp.commentCompName"),
enName: "comment",
Expand All @@ -925,6 +931,43 @@ const uiCompMap: Registry = {
layoutInfo: {
w: 13,
h: 55,
mention: {
name: trans("uiComp.mentionCompName"),
enName: "mention",
description: trans("uiComp.mentionCompDesc"),
categories: ["dataInputText"],
icon: MentionIcon,
keywords: trans("uiComp.mentionCompKeywords"),
comp: MentionComp,
},
autocomplete: {
name: trans("uiComp.autoCompleteCompName"),
enName: "autoComplete",
description: trans("uiComp.autoCompleteCompDesc"),
categories: ["dataInputText"],
icon: AutoCompleteCompIcon,
keywords: cnchar
.spell(trans("uiComp.autoCompleteCompName"), "first", "low")
.toString(),
comp: AutoCompleteComp,
layoutInfo: {
w: 7,
h: 5,
},
},
responsiveLayout: {
name: trans("uiComp.responsiveLayoutCompName"),
enName: "Responsive Layout",
description: trans("uiComp.responsiveLayoutCompDesc"),
categories: ["container", "common"],
icon: ResponsiveLayoutCompIcon,
keywords: trans("uiComp.responsiveLayoutCompKeywords"),
comp: ResponsiveLayoutComp,
withoutLoading: true,
layoutInfo: {
w: 15,
h: 27,
delayCollision: true,
},
},
};
Expand Down
3 changes: 3 additions & 0 deletions client/packages/lowcoder/src/comps/uiCompRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ export type UICompType =
| "jsonLottie" //Added By Aqib Mirza
| "timeline"
| "comment"
| "mention"
| "autocomplete"
| "responsiveLayout";

export const uiCompRegistry = {} as Record<UICompType | string, UICompManifest>;

Expand Down
56 changes: 56 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,15 @@ export const en = {
commentCompName: "Comment",
commentCompDesc: "Comment",
commentCompKeywords: "",
mentionCompName: "mention",
mentionCompDesc: "mention",
mentionCompKeywords: "",
autoCompleteCompName: "autoComplete",
autoCompleteCompDesc: "autoComplete",
autoCompleteCompKeywords: "",
responsiveLayoutCompName: "Responsive Layout",
responsiveLayoutCompDesc: "Responsive Layout",
responsiveLayoutCompKeywords: "",
},
comp: {
menuViewDocs: "View documentation",
Expand Down Expand Up @@ -2643,4 +2652,51 @@ export const en = {
helpvalue: "Comment content",
helpcreatedAt: "create date",
}
mention: {
mentionList: "mention list",
},
autoComplete: {
value: "auto complete value",
checkedValueFrom: "checked value from",
ignoreCase: "search ignore case",
searchLabelOnly: "search label only",
searchFirstPY: "search first pinying",
searchCompletePY: "search complete pinying",
searchText: "search text",
SectionDataName: "autoComplete Data",
valueInItems: "value in items",
type: "type",
antDesign: "AntDesign",
normal: "Normal",
selectKey: "key",
selectLable: "label",
ComponentType: "Component Type",
colorIcon: "blue",
grewIcon: "grew",
noneIcon: "none",
small: "small",
large: "large",
componentSize: "component size",
Introduction: "Introduction keys",
helpLabel: "label",
helpValue: "value",
},
responsiveLayout: {
column: "Columns",
atLeastOneColumnError: "Responsive layout keeps at least one Column",
columnsPerRow: "Columns per Row",
columnsSpacing: "Columns Spacing (px)",
horizontal: "Horizontal",
vertical: "Vertical",
mobile: "Mobile",
tablet: "Tablet",
desktop: "Desktop",
rowStyle: "Row Style",
columnStyle: "Column Style",
minWidth: "Min. Width",
rowBreak: "Row Break",
matchColumnsHeight: "Match Columns Height",
rowLayout: "Row Layout",
columnsLayout: "Columns Layout",
},
};
56 changes: 56 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,15 @@ uiComp: {
commentCompName: "评论",
commentCompDesc: "评论组件",
commentCompKeywords: "pl",
mentionCompName: "提及",
mentionCompDesc: "提及组件",
mentionCompKeywords: "tj",
autoCompleteCompName: "自动完成",
autoCompleteCompDesc: "自动完成",
autoCompleteCompKeywords: "zdwc",
responsiveLayoutCompName: "响应式布局",
responsiveLayoutCompDesc: "响应式布局",
responsiveLayoutCompKeywords: "",
},
comp: {
menuViewDocs: "查看文档",
Expand Down Expand Up @@ -2500,5 +2509,52 @@ timeLine: {
helpvalue: "评论内容",
helpcreatedAt: "创建时间",
}
mention:{
mentionList: "提及列表",
},
autoComplete: {
value: "数据",
checkedValueFrom: "选择提示时获取",
ignoreCase: "搜索忽略大小写",
searchLabelOnly: "仅搜索标签",
searchFirstPY: "搜索首拼",
searchCompletePY: "搜索全拼",
searchText: "搜索文字",
valueInItems: "项目中的值",
SectionDataName: "组件数据",
type: "类型",
antDesign: "AntDesign",
normal: "常规",
selectKey: '值',
selectLable: '标签',
ComponentType: '组件类型',
colorIcon: '彩色',
grewIcon: '黑白',
noneIcon: '无',
small: '小',
large: "大",
componentSize: "组件尺寸",
Introduction: '键值介绍',
helpLabel: "标签",
helpValue: "值",
},
responsiveLayout: {
column: "列",
atLeastOneColumnError: "响应式布局至少保留一列",
columnsPerRow: "每行列数",
columnsSpacing: "列间距 (px)",
horizontal: "水平的",
vertical: "垂直的",
mobile: "移动的",
tablet: "药片",
desktop: "桌面",
rowStyle: "行式",
columnStyle: "栏目样式",
minWidth: "分钟。宽度",
rowBreak: "断行",
matchColumnsHeight: "匹配列高度",
rowLayout: "行布局",
columnsLayout: "栏目布局",
}
};

6 changes: 6 additions & 0 deletions client/packages/lowcoder/src/pages/editor/editorConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ import {
LeftSignature,
TimeLineIcon,
CommentIcon,
MentionIcon,
AutoCompleteCompIcon,
ResponsiveLayoutCompIcon,
} from "lowcoder-design";

export const CompStateIcon: {
Expand Down Expand Up @@ -110,4 +113,7 @@ export const CompStateIcon: {
jsonLottie: <LeftJsonEditor />, //Added By Aqib Mirza
timeline: <TimeLineIcon />,
comment: <CommentIcon />,
mention: <MentionIcon />,
autocomplete: <AutoCompleteCompIcon />,
responsiveLayout: <ResponsiveLayoutCompIcon />,
};
You are viewing a condensed version of this merge commit. You can view the full changes here.