Skip to content

Add mention component #320

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
Aug 7, 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 'main' into mention_component
  • Loading branch information
aaron1604 authored Aug 7, 2023
commit 1a56b61028e1ea655b6e0e6dc80420dcb8fb82ac
3 changes: 2 additions & 1 deletion client/packages/lowcoder-design/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,5 @@ 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 MentionIcon } from "icons/icon-mention-comp.svg";
export { ReactComponent as MentionIcon } from "icons/icon-mention-comp.svg";
export { ReactComponent as AutoCompleteCompIcon } from "icons/icon-autocomplete-comp.svg";
16 changes: 15 additions & 1 deletion client/packages/lowcoder/src/comps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ import {
TimeLineIcon,
LottieIcon,
MentionIcon,
AutoCompleteCompIcon,
} from "lowcoder-design";

import { defaultFormData, FormComp } from "./comps/formComp/formComp";
Expand Down Expand Up @@ -122,7 +123,7 @@ import { ScannerComp } from "./comps/buttonComp/scannerComp";
import { SignatureComp } from "./comps/signatureComp";
import { TimeLineComp } from "./comps/timelineComp/timelineComp";
import { MentionComp } from "./comps/textInputComp/mentionComp";

import { AutoCompleteComp } from "./comps/autoCompleteComp/autoCompleteComp"
//Added by Aqib Mirza
import { JsonLottieComp } from "./comps/jsonComp/jsonLottieComp";

Expand Down Expand Up @@ -867,6 +868,19 @@ const uiCompMap: Registry = {
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,
},
},
};

export function loadComps() {
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/comps/uiCompRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export type UICompType =
| "jsonLottie" //Added By Aqib Mirza
| "timeline"
| "mention"
| "autocomplete"

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

Expand Down
29 changes: 29 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,9 @@ export const en = {
mentionCompName: "mention",
mentionCompDesc: "mention",
mentionCompKeywords: "",
autoCompleteCompName: "autoComplete",
autoCompleteCompDesc: "autoComplete",
autoCompleteCompKeywords: "",
},
comp: {
menuViewDocs: "View documentation",
Expand Down Expand Up @@ -2476,4 +2479,30 @@ export const en = {
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",
},
};
29 changes: 29 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,9 @@ uiComp: {
mentionCompName: "提及",
mentionCompDesc: "提及组件",
mentionCompKeywords: "tj",
autoCompleteCompName: "自动完成",
autoCompleteCompDesc: "自动完成",
autoCompleteCompKeywords: "zdwc",
},
comp: {
menuViewDocs: "查看文档",
Expand Down Expand Up @@ -2466,5 +2469,31 @@ timeLine: {
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: "值",
},
};

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

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