|
1 |
| -import {SelectEventHandlerControl} from '../../controls/eventHandlerControl'; |
2 |
| -import {Section, sectionNames} from 'lowcoder-design'; |
3 |
| -import {RecordConstructorToComp} from 'lowcoder-core'; |
4 |
| -import { |
5 |
| - BoolCodeControl, |
6 |
| - JSONObjectArrayControl, |
7 |
| - StringControl, |
8 |
| -} from 'comps/controls/codeControl'; |
9 |
| -import {arrayStringExposingStateControl} from 'comps/controls/codeStateControl'; |
10 |
| -import {BoolControl} from 'comps/controls/boolControl'; |
11 |
| -import {LabelControl} from 'comps/controls/labelControl'; |
12 |
| -import {styleControl} from 'comps/controls/styleControl'; |
13 |
| -import { |
14 |
| - AnimationStyle, |
15 |
| - CascaderStyle, |
16 |
| - ChildrenMultiSelectStyle, |
17 |
| - InputFieldStyle, |
18 |
| - LabelStyle, |
19 |
| -} from 'comps/controls/styleControlConstants'; |
| 1 | +import { SelectEventHandlerControl } from "../../controls/eventHandlerControl"; |
| 2 | +import { Section, sectionNames } from "lowcoder-design"; |
| 3 | +import { RecordConstructorToComp } from "lowcoder-core"; |
| 4 | +import { BoolCodeControl, JSONObjectArrayControl, StringControl } from "comps/controls/codeControl"; |
| 5 | +import { arrayStringExposingStateControl } from "comps/controls/codeStateControl"; |
| 6 | +import { BoolControl } from "comps/controls/boolControl"; |
| 7 | +import { LabelControl } from "comps/controls/labelControl"; |
| 8 | +import { styleControl } from "comps/controls/styleControl"; |
| 9 | +import { AnimationStyle, CascaderStyle, ChildrenMultiSelectStyle, InputFieldStyle, LabelStyle } from "comps/controls/styleControlConstants"; |
20 | 10 | import {
|
21 | 11 | allowClearPropertyView,
|
22 | 12 | disabledPropertyView,
|
23 | 13 | hiddenPropertyView,
|
24 | 14 | placeholderPropertyView,
|
25 | 15 | showSearchPropertyView,
|
26 |
| -} from 'comps/utils/propertyUtils'; |
27 |
| -import {i18nObjs, trans} from 'i18n'; |
28 |
| -import {RefControl} from 'comps/controls/refControl'; |
29 |
| -import {CascaderRef} from 'antd/es/cascader'; |
| 16 | +} from "comps/utils/propertyUtils"; |
| 17 | +import { i18nObjs, trans } from "i18n"; |
| 18 | +import { RefControl } from "comps/controls/refControl"; |
| 19 | +import { CascaderRef } from "antd/es/cascader"; |
30 | 20 |
|
31 |
| -import {MarginControl} from '../../controls/marginControl'; |
32 |
| -import {PaddingControl} from '../../controls/paddingControl'; |
| 21 | +import { MarginControl } from "../../controls/marginControl"; |
| 22 | +import { PaddingControl } from "../../controls/paddingControl"; |
33 | 23 |
|
34 |
| -import {useContext} from 'react'; |
35 |
| -import {EditorContext} from 'comps/editorState'; |
| 24 | +import { useContext } from "react"; |
| 25 | +import { EditorContext } from "comps/editorState"; |
36 | 26 |
|
37 |
| -export const defaultDataSource = JSON.stringify(i18nObjs.cascader, null, ' '); |
| 27 | +export const defaultDataSource = JSON.stringify(i18nObjs.cascader, null, " "); |
38 | 28 |
|
39 | 29 | export const CascaderChildren = {
|
40 |
| - value: arrayStringExposingStateControl('value', i18nObjs.cascaderDefult), |
| 30 | + value: arrayStringExposingStateControl("value", i18nObjs.cascaderDefult), |
41 | 31 | label: LabelControl,
|
42 | 32 | placeholder: StringControl,
|
43 | 33 | disabled: BoolCodeControl,
|
44 | 34 | onEvent: SelectEventHandlerControl,
|
45 | 35 | allowClear: BoolControl,
|
46 | 36 | options: JSONObjectArrayControl,
|
47 | 37 | style: styleControl(InputFieldStyle),
|
48 |
| - labelStyle: styleControl( |
49 |
| - LabelStyle.filter( |
50 |
| - (style) => ['accent', 'validate'].includes(style.name) === false |
51 |
| - ) |
52 |
| - ), |
| 38 | + labelStyle: styleControl(LabelStyle.filter((style) => ['accent', 'validate'].includes(style.name) === false)), |
53 | 39 | showSearch: BoolControl.DEFAULT_TRUE,
|
54 | 40 | viewRef: RefControl<CascaderRef>,
|
55 | 41 | margin: MarginControl,
|
56 | 42 | padding: PaddingControl,
|
57 |
| - inputFieldStyle: styleControl(CascaderStyle), |
58 |
| - childrenInputFieldStyle: styleControl(ChildrenMultiSelectStyle), |
59 |
| - animationStyle: styleControl(AnimationStyle), |
| 43 | + inputFieldStyle:styleControl(CascaderStyle), |
| 44 | + childrenInputFieldStyle:styleControl(ChildrenMultiSelectStyle), |
| 45 | + animationStyle:styleControl(AnimationStyle) |
60 | 46 | };
|
61 | 47 |
|
62 | 48 | export const CascaderPropertyView = (
|
|
0 commit comments