Skip to content

Commit 26fcd2e

Browse files
committed
formating removed-33
1 parent e41fccd commit 26fcd2e

File tree

1 file changed

+41
-53
lines changed

1 file changed

+41
-53
lines changed

client/packages/lowcoder/src/comps/comps/containerComp/pageLayoutComp.tsx

Lines changed: 41 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
1-
import {CompParams} from 'lowcoder-core';
2-
import {ToDataType} from 'comps/generators/multi';
3-
import {
4-
NameConfigDisabled,
5-
NameConfigHidden,
6-
withExposingConfigs,
7-
NameConfig,
8-
CompDepsConfig,
9-
} from 'comps/generators/withExposing';
10-
import {withMethodExposing} from 'comps/generators/withMethodExposing';
11-
import {NameGenerator} from 'comps/utils/nameGenerator';
12-
import {Section, sectionNames} from 'lowcoder-design';
13-
import {oldContainerParamsToNew} from '../containerBase';
14-
import {toSimpleContainerData} from '../containerBase/simpleContainerComp';
15-
import {
16-
disabledPropertyView,
17-
hiddenPropertyView,
18-
} from 'comps/utils/propertyUtils';
19-
import {trans} from 'i18n';
20-
import {BoolCodeControl} from 'comps/controls/codeControl';
21-
import {DisabledContext} from 'comps/generators/uiCompBuilder';
22-
import React, {useContext, useEffect, useState} from 'react';
23-
import {EditorContext} from 'comps/editorState';
1+
import { CompParams } from "lowcoder-core";
2+
import { ToDataType } from "comps/generators/multi";
3+
import { NameConfigDisabled, NameConfigHidden, withExposingConfigs, NameConfig, CompDepsConfig } from "comps/generators/withExposing";
4+
import { withMethodExposing } from "comps/generators/withMethodExposing";
5+
import { NameGenerator } from "comps/utils/nameGenerator";
6+
import { Section, sectionNames } from "lowcoder-design";
7+
import { oldContainerParamsToNew } from "../containerBase";
8+
import { toSimpleContainerData } from "../containerBase/simpleContainerComp";
9+
import { disabledPropertyView, hiddenPropertyView, } from "comps/utils/propertyUtils";
10+
import { trans } from "i18n";
11+
import { BoolCodeControl } from "comps/controls/codeControl";
12+
import { DisabledContext } from "comps/generators/uiCompBuilder";
13+
import React, { useContext, useEffect, useState } from "react";
14+
import { EditorContext } from "comps/editorState";
2415

25-
import {
26-
ContainerChildren,
27-
ContainerCompBuilder,
28-
} from '../pageLayoutComp/pageLayoutCompBuilder';
29-
import {PageLayout} from '../pageLayoutComp/pageLayout';
30-
import {AnimationStyle, styleControl} from '@lowcoder-ee/index.sdk';
16+
import { ContainerChildren, ContainerCompBuilder } from "../pageLayoutComp/pageLayoutCompBuilder";
17+
import { PageLayout } from "../pageLayoutComp/pageLayout";
18+
import { AnimationStyle, styleControl } from "@lowcoder-ee/index.sdk";
3119

3220
export const ContainerBaseComp = (function () {
3321
const childrenMap = {
@@ -51,17 +39,17 @@ export const ContainerBaseComp = (function () {
5139
.setPropertyViewFn((children) => {
5240
return (
5341
<>
54-
{(useContext(EditorContext).editorModeStatus === 'logic' ||
55-
useContext(EditorContext).editorModeStatus === 'both') && (
42+
{(useContext(EditorContext).editorModeStatus === "logic" ||
43+
useContext(EditorContext).editorModeStatus === "both") && (
5644
<Section name={sectionNames.interaction}>
5745
{disabledPropertyView(children)}
5846
{hiddenPropertyView(children)}
5947
{children.container.appSelectorPropertyView()}
6048
</Section>
6149
)}
6250

63-
{(useContext(EditorContext).editorModeStatus === 'layout' ||
64-
useContext(EditorContext).editorModeStatus === 'both') && (
51+
{(useContext(EditorContext).editorModeStatus === "layout" ||
52+
useContext(EditorContext).editorModeStatus === "both") && (
6553
<>
6654
<Section name={sectionNames.layout}>
6755
{children.container.getPropertyView()}
@@ -73,20 +61,20 @@ export const ContainerBaseComp = (function () {
7361
{children.animationStyle.getPropertyView()}
7462
</Section>
7563
{children.container.children.showHeader.getView() && (
76-
<Section name={'Header Style'}>
64+
<Section name={"Header Style"}>
7765
{children.container.headerStylePropertyView()}
7866
</Section>
7967
)}
8068
{children.container.children.showSider.getView() && (
81-
<Section name={'Sider Style'}>
69+
<Section name={"Sider Style"}>
8270
{children.container.siderStylePropertyView()}
8371
</Section>
8472
)}
85-
<Section name={'Body Style'}>
73+
<Section name={"Body Style"}>
8674
{children.container.bodyStylePropertyView()}
8775
</Section>
8876
{children.container.children.showFooter.getView() && (
89-
<Section name={'Footer Style'}>
77+
<Section name={"Footer Style"}>
9078
{children.container.footerStylePropertyView()}
9179
</Section>
9280
)}
@@ -108,7 +96,7 @@ function convertOldContainerParams(params: CompParams<any>) {
10896
// old params
10997
if (
11098
container &&
111-
(container.hasOwnProperty('layout') || container.hasOwnProperty('items'))
99+
(container.hasOwnProperty("layout") || container.hasOwnProperty("items"))
112100
) {
113101
const autoHeight = tempParams.value.autoHeight;
114102
const scrollbars = tempParams.value.scrollbars;
@@ -140,23 +128,23 @@ const PageLayoutCompTmP = withExposingConfigs(ContainerTmpComp, [
140128
NameConfigHidden,
141129
NameConfigDisabled,
142130

143-
new NameConfig('container', trans('export.ratingValueDesc')),
131+
new NameConfig("container", trans("export.ratingValueDesc")),
144132
new CompDepsConfig(
145-
'siderCollapsed',
133+
"siderCollapsed",
146134
(comp) => ({
147135
data: comp.children.container.children.siderCollapsed.nodeWithoutCache(),
148136
}),
149137
(input) => input.data.value,
150-
trans('listView.itemsDesc')
138+
trans("listView.itemsDesc")
151139
),
152140
]);
153141

154142
export const PageLayoutComp = withMethodExposing(PageLayoutCompTmP, [
155143
{
156144
method: {
157-
name: 'setSiderCollapsed',
158-
description: 'Set the Sider of the PageLayout to be collapsed or not',
159-
params: [{name: 'collapsed', type: 'boolean'}],
145+
name: "setSiderCollapsed",
146+
description: "Set the Sider of the PageLayout to be collapsed or not",
147+
params: [{name: "collapsed", type: "boolean"}],
160148
},
161149
execute: (comp, values) => {
162150
const page = values[0] as number;
@@ -178,44 +166,44 @@ export function defaultPageLayoutData(
178166
header: toSimpleContainerData([
179167
{
180168
item: {
181-
compType: 'navigation',
182-
name: nameGenerator.genItemName('pageNavigation'),
169+
compType: "navigation",
170+
name: nameGenerator.genItemName("pageNavigation"),
183171
comp: {
184-
logoUrl: '',
172+
logoUrl: "",
185173
hidden: false,
186174
items: [
187175
{
188-
label: 'Home',
176+
label: "Home",
189177
hidden: false,
190178
active: false,
191179
},
192180
{
193-
label: 'Services',
181+
label: "Services",
194182
hidden: false,
195183
active: false,
196184
items: [
197185
{
198-
label: 'Lowcode Platform',
186+
label: "Lowcode Platform",
199187
hidden: false,
200188
active: false,
201189
},
202190
{
203-
label: 'App Development',
191+
label: "App Development",
204192
hidden: false,
205193
active: false,
206194
},
207195
],
208196
},
209197
{
210-
label: 'About',
198+
label: "About",
211199
hidden: false,
212200
active: false,
213201
},
214202
],
215203
},
216204
},
217205
layoutItem: {
218-
i: '',
206+
i: "",
219207
h: 6,
220208
w: 24,
221209
x: 0,

0 commit comments

Comments
 (0)