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

Commit9ca2990

Browse files
authored
Merge branch 'dev' into deployment_updates
2 parents6dbf6ad +6ef41f5 commit9ca2990

File tree

6 files changed

+224
-46
lines changed

6 files changed

+224
-46
lines changed

‎client/packages/lowcoder-design/src/icons/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export { ReactComponent as ImportAppIcon } from "./v1/icon-app-import.svg";
8787
export{ReactComponentasImportIcon}from"./v1/icon-import.svg";
8888
export{ReactComponentasImportIconV2}from"./v1/icon-import-v2.svg";
8989
export{ReactComponentasDatasourceIcon}from"./v1/icon-datasource.svg";
90-
export{ReactComponentasQueryLibraryIcon}from"./v1/icon-query-library.svg";
90+
export{ReactComponentasQueryLibraryIcon}from"./remix/braces-line.svg";
9191
export{ReactComponentasTransformerIcon}from"./v1/icon-transformer.svg";
9292
export{ReactComponentasTempStateIcon}from"./v1/icon-temp-state.svg";
9393
export{ReactComponentasIconDep}from"./v1/icon-style-dep.svg";
@@ -145,6 +145,8 @@ export { ReactComponent as OracleIcon } from "./v1/icon-query-OracleDB.svg";
145145
export{ReactComponentasClickHouseIcon}from"./v1/icon-query-ClickHouse.svg";
146146
export{ReactComponentasGoogleSheetsIcon}from"./v1/icon-query-GoogleSheets.svg";
147147
export{ReactComponentasGraphqlIcon}from"./v1/icon-query-Graphql.svg";
148+
export{ReactComponentasAlasqlIcon}from"./remix/database-2-line.svg";
149+
export{ReactComponentasStreamApiIcon}from"./remix/rfid-line.svg";
148150
export{ReactComponentasSnowflakeIcon}from"./v1/icon-query-snowflake.svg";
149151
export{ReactComponentasMariaDBIcon}from"./v1/icon-query-MariaDB.svg";
150152

‎client/packages/lowcoder/src/components/ResCreatePanel.tsx

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ export function ResCreatePanel(props: ResCreateModalProps) {
265265
.map((id,idx)=>(
266266
<ResButtonkey={idx}size={buttonSize}identifier={id}onSelect={onSelect}/>
267267
))}
268+
<ResButton
269+
size={buttonSize}
270+
identifier={BottomResTypeEnum.Folder}
271+
onSelect={onSelect}
272+
/>
268273
</DataSourceListWrapper>
269274
</div>
270275

@@ -273,28 +278,8 @@ export function ResCreatePanel(props: ResCreateModalProps) {
273278
<divclassName="section-title">{trans("code")}</div>
274279
<divclassName="section">
275280
<DataSourceListWrapper$placement={placement}>
276-
<ResButton
277-
size={buttonSize}
278-
identifier={BottomResTypeEnum.TempState}
279-
onSelect={onSelect}
280-
/>
281-
<ResButton
282-
size={buttonSize}
283-
identifier={BottomResTypeEnum.Transformer}
284-
onSelect={onSelect}
285-
/>
286-
<ResButton
287-
size={buttonSize}
288-
identifier={BottomResTypeEnum.DateResponder}
289-
onSelect={onSelect}
290-
/>
291281
<ResButtonsize={buttonSize}identifier={"js"}onSelect={onSelect}/>
292-
{!isPublicApp&&<ResButtonsize={buttonSize}identifier={"libraryQuery"}onSelect={onSelect}/>}
293-
<ResButton
294-
size={buttonSize}
295-
identifier={BottomResTypeEnum.Folder}
296-
onSelect={onSelect}
297-
/>
282+
<ResButtonsize={buttonSize}identifier={BottomResTypeEnum.TempState}onSelect={onSelect}/>
298283
</DataSourceListWrapper>
299284
</div>
300285
</>
@@ -334,13 +319,39 @@ export function ResCreatePanel(props: ResCreateModalProps) {
334319
</>
335320
)}
336321

337-
<divclassName="section-title">{trans("query.datasource")}</div>
322+
<divclassName="section-title">{trans("query.preparedDataQueries")}</div>
323+
<divclassName="section">
324+
{!isPublicApp&&<ResButtonsize={buttonSize}identifier={"libraryQuery"}onSelect={onSelect}/>}
325+
</div>
326+
327+
<divclassName="section-title">{trans("query.adHocDataQueries")}</div>
338328
<divclassName="section">
339329
<DataSourceListWrapper$placement={placement}>
340330
<ResButtonsize={buttonSize}identifier={"restApi"}onSelect={onSelect}/>
341331
<ResButtonsize={buttonSize}identifier={"streamApi"}onSelect={onSelect}/>
342332
<ResButtonsize={buttonSize}identifier={"alasql"}onSelect={onSelect}/>
343333
<ResButtonsize={buttonSize}identifier={"graphql"}onSelect={onSelect}/>
334+
</DataSourceListWrapper>
335+
</div>
336+
337+
<divclassName="section-title">{trans("query.queryResultTransformer")}</div>
338+
<divclassName="section">
339+
<DataSourceListWrapper$placement={placement}>
340+
<ResButtonsize={buttonSize}identifier={BottomResTypeEnum.Transformer}onSelect={onSelect}/>
341+
</DataSourceListWrapper>
342+
</div>
343+
344+
<divclassName="section-title">{trans("query.queryResultReactor")}</div>
345+
<divclassName="section">
346+
<DataSourceListWrapper$placement={placement}>
347+
<ResButtonsize={buttonSize}identifier={BottomResTypeEnum.DateResponder}onSelect={onSelect}/>
348+
</DataSourceListWrapper>
349+
</div>
350+
351+
<divclassName="section-title">{trans("query.datasource")}</div>
352+
<divclassName="section">
353+
<DataSourceListWrapper$placement={placement}>
354+
344355
{datasource.map((i)=>(
345356
<ResButtonsize={buttonSize}key={i.id}identifier={i}onSelect={onSelect}/>
346357
))}

‎client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,11 @@ export const en = {
742742
"chooseDatabase":"Choose Database",
743743
"lowcoderAPI":"Lowcoder API",
744744
"executeJSCode":"Run JavaScript Code",
745-
"importFromQueryLibrary":"Import from Query Library",
745+
"importFromQueryLibrary":"Prepared Data Query",
746+
"preparedDataQueries" :"Your prepared Data Queries",
747+
"adHocDataQueries" :"Qick Data Queries (without prepared Query or Data Source)",
748+
"queryResultTransformer" :"Manipulate a Query Response to transform Data before binding",
749+
"queryResultReactor" :"React to any change of a dynamic Data value",
746750
"importFromFile":"Import from File",
747751
"triggerType":"Triggered when...",
748752
"triggerTypeAuto":"When Inputs Change or after Application (Page) loads",
@@ -3323,7 +3327,7 @@ export const en = {
33233327
"trash":"Trash",
33243328
"marketplace":"Marketplace",
33253329
"allCategories":"All Categories",
3326-
"queryLibrary":"Query Library",
3330+
"queryLibrary":"Data Queries",
33273331
"datasource":"Data Sources",
33283332
"selectDatasourceType":"Select Data Source Type",
33293333
"home":"Home",

‎client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,6 @@ export default function ApplicationHome() {
220220
{
221221
items:[
222222

223-
{
224-
text:<TabLabel>{trans("home.queryLibrary")}</TabLabel>,
225-
routePath:QUERY_LIBRARY_URL,
226-
routeComp:QueryLibraryEditor,
227-
icon:({ selected, ...otherProps})=>selected ?<HomeQueryLibraryIcon{...otherProps}width={"24px"}/> :<HomeQueryLibraryIcon{...otherProps}width={"24px"}/>,
228-
visible:({ user})=>user.orgDev,
229-
mobileVisible:false,
230-
},
231223
{
232224
text:<TabLabel>{trans("home.datasource")}</TabLabel>,
233225
routePath:DATASOURCE_URL,
@@ -238,22 +230,18 @@ export default function ApplicationHome() {
238230
onSelected:(_,currentPath)=>currentPath.split("/")[1]==="datasource",
239231
mobileVisible:false,
240232
},
241-
],
242-
},
243-
isEE() ?{
244-
items:[
245233
{
246-
text:<TabLabel>{trans("settings.AppUsage")}</TabLabel>,
247-
routePath:"/ee/6600ae8724a23f365ba2ed4c/admin",
248-
routePathExact:false,
249-
routeComp:AppEditor,
250-
icon:({ selected, ...otherProps})=>selected ?(<EnterpriseIcon{...otherProps}width={"24px"}/>) :(<EnterpriseIcon{...otherProps}width={"24px"}/>),
234+
text:<TabLabel>{trans("home.queryLibrary")}</TabLabel>,
235+
routePath:QUERY_LIBRARY_URL,
236+
routeComp:QueryLibraryEditor,
237+
icon:({ selected, ...otherProps})=>selected ?<HomeQueryLibraryIcon{...otherProps}width={"24px"}/> :<HomeQueryLibraryIcon{...otherProps}width={"24px"}/>,
251238
visible:({ user})=>user.orgDev,
252239
mobileVisible:false,
253-
},
240+
}
254241
],
255-
} :{items:[]},
256-
242+
},
243+
244+
// Show Subscription if not yet subscribed
257245
!supportSubscription&&user.orgDev ?{
258246
items:[
259247
{
@@ -267,6 +255,7 @@ export default function ApplicationHome() {
267255
],
268256
} :{items:[]},
269257

258+
// show Support Section when an active Subscription exist
270259
supportSubscription&&user.orgDev ?{
271260
items:[
272261
{
Lines changed: 167 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,169 @@
1+
import{HelpText}from"components/HelpText";
2+
import{GreyTextColor}from"constants/style";
3+
import{lazy,useEffect,useState,useRef}from"react";
4+
import{useDispatch,useSelector}from"react-redux";
5+
import{fetchCommonSettings}from"redux/reduxActions/commonSettingsActions";
6+
import{getCommonSettings}from"redux/selectors/commonSettingSelectors";
7+
import{fetchAPIUsageAction,fetchLastMonthAPIUsageAction}from"redux/reduxActions/orgActions";
8+
import{getUser}from"redux/selectors/usersSelectors";
9+
import{getOrgApiUsage,getOrgLastMonthApiUsage}from"redux/selectors/orgSelectors";
10+
importstyledfrom"styled-components";
11+
import{useShallowEqualSelector}from"util/hooks";
12+
import{Level1SettingPageContent,Level1SettingPageTitle}from"../styled";
13+
import{fetchAllApplications}from"redux/reduxActions/applicationActions";
14+
import{trans}from"i18n";
15+
import{Location}from"history";
16+
importDividerfrom"antd/es/divider";
17+
import{CustomSelect,TacoButton}from"lowcoder-design";
18+
import{getDeploymentId}from"@lowcoder-ee/redux/selectors/configSelectors";
19+
20+
constAdvancedSettingContent=styled.div`
21+
max-width: 840px;
22+
23+
.section-title {
24+
font-size: 14px;
25+
font-weight: 500;
26+
margin-bottom: 8px;
27+
}
28+
29+
.section-content {
30+
margin-bottom: 28px;
31+
}
32+
33+
.section-option {
34+
color:${GreyTextColor};
35+
margin-bottom: 14px;
36+
font-size: 13px;
37+
}
38+
39+
.code-editor {
40+
margin-bottom: 12px;
41+
}
42+
`;
43+
44+
constSaveButton=styled(TacoButton)`
45+
padding: 4px 8px;
46+
min-width: 84px;
47+
height: 32px;
48+
`;
49+
50+
constCustomSelectStyle=styled(CustomSelect)`
51+
.ant-select .ant-select-selector .ant-select-selection-item {
52+
max-width: 230px;
53+
display: block;
54+
}
55+
`;
56+
57+
constHubspotFormContainer=styled.div`
58+
max-width: 100%;
59+
width: 100%;
60+
.hs-form {
61+
max-width: 100% !important;
62+
}
63+
`;
64+
65+
letlocationInfo:Location|Location<unknown>|null=null;
66+
67+
declare global{
68+
interfaceWindow{
69+
hbspt:{
70+
forms:{
71+
create:(options:{
72+
region:string;
73+
portalId:string;
74+
formId:string;
75+
target:string|HTMLElement|null;
76+
})=>void;
77+
};
78+
};
79+
}
80+
}
81+
182
exportdefaultfunctionAudit(){
2-
returnnull;
83+
constdispatch=useDispatch();
84+
constcurrentUser=useSelector(getUser);
85+
constcommonSettings=useShallowEqualSelector(getCommonSettings);
86+
const[settings,setSettings]=useState(commonSettings);
87+
constdeploymentId=useSelector(getDeploymentId);
88+
89+
90+
constapiUsage=useSelector(getOrgApiUsage);
91+
useEffect(()=>{
92+
dispatch(fetchAPIUsageAction(currentUser.currentOrgId));
93+
},[currentUser.currentOrgId])
94+
95+
constlastMonthApiUsage=useSelector(getOrgLastMonthApiUsage);
96+
useEffect(()=>{
97+
dispatch(fetchLastMonthAPIUsageAction(currentUser.currentOrgId));
98+
},[currentUser.currentOrgId])
99+
100+
useEffect(()=>{
101+
dispatch(fetchCommonSettings({orgId:currentUser.currentOrgId}));
102+
dispatch(fetchAllApplications({}));
103+
},[currentUser.currentOrgId,dispatch]);
104+
105+
useEffect(()=>{
106+
setSettings(commonSettings);
107+
},[commonSettings]);
108+
109+
useEffect(()=>{
110+
dispatch(fetchCommonSettings({orgId:currentUser.currentOrgId}));
111+
},[currentUser.currentOrgId,dispatch]);
112+
113+
constformRef=useRef<HTMLDivElement>(null);
114+
115+
useEffect(()=>{
116+
constscriptId="hubspot-script";
117+
118+
// Prevent re-adding the script
119+
constexistingScript=document.getElementById(scriptId)asHTMLScriptElement;
120+
121+
constcreateForm=()=>{
122+
// Wait a tick to ensure #hubspot-form is in the DOM
123+
setTimeout(()=>{
124+
if(window.hbspt&&document.querySelector("#hubspot-form")){
125+
window.hbspt.forms.create({
126+
region:"eu1",
127+
portalId:"144574215",
128+
formId:"f03697ad-62cf-4161-a3de-228a2db1180b",
129+
target:"#hubspot-form"
130+
});
131+
}
132+
},0);
133+
};
134+
135+
if(!existingScript){
136+
constscript=document.createElement("script");
137+
script.src="https://js-eu1.hsforms.net/forms/embed/v2.js";
138+
script.async=true;
139+
script.defer=true;
140+
script.id=scriptId;
141+
script.onload=createForm;
142+
document.body.appendChild(script);
143+
}else{
144+
if(window.hbspt){
145+
createForm();
146+
}else{
147+
existingScript.addEventListener("load",createForm);
148+
}
149+
}
150+
},[]);
151+
152+
153+
154+
return(
155+
<Level1SettingPageContent>
156+
<Level1SettingPageTitle>{trans("advanced.title")}</Level1SettingPageTitle>
157+
<AdvancedSettingContent>
158+
<divclassName="section-title">{trans("advanced.defaultHomeTitle")}</div>
159+
<HelpTextstyle={{marginBottom:12}}>{trans("advanced.defaultHomeHelp")}</HelpText>
160+
<divclassName="section-content">
161+
<Divider/>
162+
<HubspotFormContainer>
163+
<divid="hubspot-form"/>
164+
</HubspotFormContainer>
165+
</div>
166+
</AdvancedSettingContent>
167+
</Level1SettingPageContent>
168+
);
3169
}

‎client/packages/lowcoder/src/util/bottomResUtils.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import {
2424
QueryLibraryIcon,
2525
RedisIcon,
2626
RestApiIcon,
27+
AlasqlIcon,
28+
StreamApiIcon,
2729
SMTPIcon,
2830
SnowflakeIcon,
2931
TempStateIcon,
@@ -106,6 +108,10 @@ export const getBottomResIcon = (
106108
return<MysqlIcon/>;
107109
case"mongodb":
108110
return<MongoIcon/>;
111+
case"streamApi":
112+
return<StreamApiIcon/>;
113+
case"alasql":
114+
return<AlasqlIcon/>;
109115
case"restApi":
110116
returnhttpMethod ?HttpMethodIcon[httpMethod] :<RestApiIcon/>;
111117
case"postgres":

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp