Skip to content

Commit 217cfad

Browse files
committed
Remove unused elements from copy/pasting
also disable indicators for now
1 parent 9371cda commit 217cfad

File tree

3 files changed

+23
-152
lines changed

3 files changed

+23
-152
lines changed

client/packages/lowcoder/src/comps/comps/tourComp/tourComp.tsx

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ import {
88
withExposingConfigs,
99
withMethodExposing
1010
} from "lowcoder-sdk";
11-
import { baseSelectRefMethods, TourChildrenMap, TourPropertyView } from "./tourPropertyView";
12-
import { TourInputCommonConfig } from "./tourInputConstants";
11+
import { TourChildrenMap, TourPropertyView } from "./tourPropertyView";
1312
import { Tour, TourProps } from "antd";
14-
import React, { Suspense, useContext } from "react";
13+
import React, { useContext } from "react";
1514
import { EditorContext } from "@lowcoder-ee/comps/editorState";
1615
import { GridItemComp } from "@lowcoder-ee/comps/comps/gridItemComp";
1716
import { HookComp } from "@lowcoder-ee/comps/hooks/hookComp";
@@ -65,27 +64,24 @@ let TourBasicComp = (function() {
6564
});
6665

6766
return (
68-
<Suspense fallback={<div>loading</div>}>
69-
<Tour
70-
steps={steps}
71-
open={props.open.value}
72-
onClose={() => props.open.onChange(false)}
73-
indicatorsRender={(current, total) => props.indicatorsRender(current, total)}
74-
disabledInteraction={props.disabledInteraction}
75-
arrow={props.arrow}
76-
placement={props.placement === "" ? undefined : props.placement}
77-
type={props.type === "" ? undefined : props.type}
78-
mask={props.mask}
79-
/>
80-
</Suspense>
67+
<Tour
68+
steps={steps}
69+
open={props.open.value}
70+
onClose={() => props.open.onChange(false)}
71+
// indicatorsRender={(current, total) => props.indicatorsRender(current, total)} // todo enable later
72+
disabledInteraction={props.disabledInteraction}
73+
arrow={props.arrow}
74+
placement={props.placement === "" ? undefined : props.placement}
75+
type={props.type === "" ? undefined : props.type}
76+
mask={props.mask}
77+
/>
8178
);
8279
})
8380
.setPropertyViewFn((children) => <TourPropertyView {...children} />)
84-
.setExposeMethodConfigs(baseSelectRefMethods)
8581
.build();
8682
})();
8783

88-
TourBasicComp = withMethodExposing(TourBasicComp, [
84+
export const TourComp = withMethodExposing(TourBasicComp, [
8985
{
9086
method: {
9187
name: "startTour",
@@ -97,10 +93,3 @@ TourBasicComp = withMethodExposing(TourBasicComp, [
9793
}
9894
}
9995
]);
100-
101-
export const TourComp = withExposingConfigs(TourBasicComp, [
102-
new NameConfig("value", trans("selectInput.valueDesc")),
103-
new NameConfig("inputValue", trans("select.inputValueDesc")),
104-
...TourInputCommonConfig,
105-
...CommonNameConfig
106-
]);

client/packages/lowcoder/src/comps/comps/tourComp/tourInputConstants.tsx

Lines changed: 0 additions & 111 deletions
This file was deleted.

client/packages/lowcoder/src/comps/comps/tourComp/tourPropertyView.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,9 @@ import {
2020
} from "@lowcoder-ee/comps/comps/tourComp/tourTooltips";
2121

2222
export const TourChildrenMap = {
23-
label: LabelControl,
24-
placeholder: StringControl,
25-
disabled: BoolCodeControl,
2623
open: booleanExposingStateControl("open"),
27-
onEvent: SelectEventHandlerControl,
2824
options: TourStepControl,
29-
inputValue: stateComp<string>(""), // user's input value when search
30-
showSearch: BoolControl.DEFAULT_TRUE,
31-
viewRef: RefControl<BaseSelectRef>,
32-
indicatorsRender: AlkjdfControl,
25+
// indicatorsRender: AlkjdfControl, // todo get this working later
3326
disabledInteraction: BoolControl,
3427
mask: MaskControl,
3528
placement: dropdownControl(PlacementOptions, "bottom"),
@@ -52,10 +45,10 @@ export const TourPropertyView = (
5245
</Section>
5346

5447
<Section name="customization">
55-
{children.indicatorsRender.propertyView({
56-
label: trans("tour.indicatorsRender.label"),
57-
tooltip: IndicatorsRenderTooltip,
58-
})}
48+
{/*{children.indicatorsRender.propertyView({*/}
49+
{/* label: trans("tour.indicatorsRender.label"),*/}
50+
{/* tooltip: IndicatorsRenderTooltip,*/}
51+
{/*})}*/}
5952
{children.disabledInteraction.propertyView({
6053
label: trans("tour.disabledInteraction.label"),
6154
tooltip: trans("tour.disabledInteraction.tooltip")
@@ -89,7 +82,7 @@ export const TourPropertyView = (
8982
</>
9083
);
9184

92-
export const baseSelectRefMethods = refMethods<BaseSelectRef>([
93-
focusMethod,
94-
blurMethod,
95-
]);
85+
// export const baseSelectRefMethods = refMethods<BaseSelectRef>([
86+
// focusMethod,
87+
// blurMethod,
88+
// ]);

0 commit comments

Comments
 (0)