@pisell/materials 1.0.472 → 1.0.474
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/es/components/cardMetricItem/index.less +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +4 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +41 -17
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +15 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.js +82 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +33 -139
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +162 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +135 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +35 -39
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +65 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +105 -6
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +245 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +41 -12
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +23 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +17 -2
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +7 -1
- package/es/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/es/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +7 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/es/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.js +17 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +41 -1
- package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +12 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.js +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/es/components/dataSourceComponents/fields/index.js +7 -2
- package/es/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/type.js +1 -0
- package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/utils.js +111 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +22 -7
- package/es/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/es/components/dataSourceComponents/hooks/useComponentId.js +9 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +37 -27
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +19 -13
- package/es/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/es/components/dataSourceComponents/provider/variables/utils.js +9 -0
- package/es/components/filter/components/Dropdown/index.d.ts +1 -0
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +5 -3
- package/es/components/filter/components/FilterButton/types.d.ts +2 -0
- package/es/components/pisellAnchor/index.less +77 -77
- package/es/components/pisellStatisticList/index.less +1 -1
- package/es/components/pisellWalletPassCard/index.js +3 -1
- package/es/components/pisellWalletPassCard/index.less +23 -9
- package/es/components/table/Actions/index.js +16 -7
- package/es/components/table/Gallery/index.d.ts +3 -3
- package/es/components/table/Gallery/index.js +25 -7
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Header/index.d.ts +10 -3
- package/es/components/table/Header/index.js +37 -11
- package/es/components/table/Header/index.less +10 -2
- package/es/components/table/Table/utils.js +4 -0
- package/es/components/table/Tabs/index.d.ts +14 -0
- package/es/components/table/Tabs/index.js +37 -0
- package/es/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/es/components/table/index.js +16 -3
- package/es/components/table/types.d.ts +14 -2
- package/es/components/typography/index.d.ts +2 -2
- package/es/components/typography/index.js +4 -3
- package/es/components/walletCard/index.d.ts +6 -4
- package/es/components/walletCard/index.js +34 -15
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/en-US.js +16 -1
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +16 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +16 -1
- package/lib/components/cardMetricItem/index.less +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +58 -11
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +44 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.js +95 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +29 -90
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +24 -37
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +53 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +73 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +236 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +38 -11
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +51 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +14 -2
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +3 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +41 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +42 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.js +39 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/lib/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.js +57 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +30 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +43 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/lib/components/dataSourceComponents/fields/index.js +6 -1
- package/lib/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/utils.js +134 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +14 -5
- package/lib/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/lib/components/dataSourceComponents/hooks/useComponentId.js +32 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +29 -16
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +17 -8
- package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/lib/components/dataSourceComponents/provider/variables/utils.js +15 -2
- package/lib/components/filter/components/Dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/Dropdown/index.js +6 -2
- package/lib/components/filter/components/FilterButton/index.js +5 -3
- package/lib/components/filter/components/FilterButton/types.d.ts +2 -0
- package/lib/components/pisellAnchor/index.less +77 -77
- package/lib/components/pisellStatisticList/index.less +1 -1
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/pisellWalletPassCard/index.less +23 -9
- package/lib/components/table/Actions/index.js +18 -9
- package/lib/components/table/Gallery/index.d.ts +3 -3
- package/lib/components/table/Gallery/index.js +17 -0
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Header/index.d.ts +10 -3
- package/lib/components/table/Header/index.js +29 -4
- package/lib/components/table/Header/index.less +10 -2
- package/lib/components/table/Table/utils.js +4 -0
- package/lib/components/table/Tabs/index.d.ts +14 -0
- package/lib/components/table/Tabs/index.js +70 -0
- package/lib/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/lib/components/table/index.js +17 -2
- package/lib/components/table/types.d.ts +14 -2
- package/lib/components/typography/index.d.ts +2 -2
- package/lib/components/typography/index.js +4 -3
- package/lib/components/walletCard/index.d.ts +6 -4
- package/lib/components/walletCard/index.js +24 -13
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/locales/en-US.d.ts +7 -0
- package/lib/locales/en-US.js +8 -1
- package/lib/locales/zh-CN.d.ts +7 -0
- package/lib/locales/zh-CN.js +8 -1
- package/lib/locales/zh-TW.d.ts +7 -0
- package/lib/locales/zh-TW.js +8 -1
- package/lowcode/_utils/defaultSchema.ts +452 -83
- package/lowcode/_utils/type.ts +5 -0
- package/lowcode/_utils/utils.ts +1 -0
- package/lowcode/button/meta.ts +1 -2
- package/lowcode/data-source-form/constants.ts +5 -0
- package/lowcode/data-source-form/meta.ts +259 -273
- package/lowcode/data-source-form/snippets.ts +9 -0
- package/lowcode/data-source-form/utils.ts +80 -15
- package/lowcode/data-source-image/meta.ts +74 -0
- package/lowcode/data-source-image/snippets.ts +14 -0
- package/lowcode/data-source-qrcode/meta.ts +158 -0
- package/lowcode/data-source-qrcode/snippets.ts +20 -0
- package/lowcode/data-source-table/meta.ts +4577 -2285
- package/lowcode/data-source-table/snippets.ts +10 -4
- package/lowcode/data-source-table/utils.tsx +254 -0
- package/lowcode/data-source-typography/meta.ts +54 -0
- package/lowcode/data-source-typography.text/meta.ts +212 -0
- package/lowcode/data-source-typography.text/snippets.ts +12 -0
- package/lowcode/data-source-wrapper/meta.ts +243 -0
- package/lowcode/data-source-wrapper/snippets.ts +11 -0
- package/lowcode/data-source-wrapper/utils.ts +45 -0
- package/lowcode/form-item-color-picker/snippets.ts +1 -0
- package/lowcode/form-item-input/meta.ts +2 -1
- package/lowcode/form-item-input/snippets.ts +2 -1
- package/lowcode/form-item-input.email/meta.ts +284 -0
- package/lowcode/form-item-input.email/snippets.ts +35 -0
- package/lowcode/form-item-input.phone/meta.ts +295 -0
- package/lowcode/form-item-input.phone/snippets.ts +16 -0
- package/lowcode/form-item-input.text-area/meta.ts +243 -32
- package/lowcode/form-item-input.text-area/snippets.ts +2 -1
- package/lowcode/form-item-input.url/meta.ts +44 -20
- package/lowcode/form-item-input.url/snippets.ts +5 -5
- package/lowcode/table/snippets.ts +6 -0
- package/lowcode/test/meta.ts +1 -2
- package/package.json +4 -4
|
@@ -1,16 +1,64 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnType } from
|
|
3
|
-
import { DataSourceType } from
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
+
export declare type OperationItem = {
|
|
5
|
+
label?: string;
|
|
6
|
+
openMode: 'modal' | 'drawer';
|
|
7
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
+
openTitle: string;
|
|
9
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
+
key: string;
|
|
11
|
+
buttonProps?: any;
|
|
12
|
+
};
|
|
4
13
|
export interface DataSourceTableProps {
|
|
14
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
15
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
16
|
+
titleButtons?: {
|
|
17
|
+
show: boolean;
|
|
18
|
+
maxCount: number;
|
|
19
|
+
items: OperationItem[];
|
|
20
|
+
};
|
|
21
|
+
buttons?: any[];
|
|
22
|
+
operation?: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
title: string;
|
|
25
|
+
width: number;
|
|
26
|
+
align: 'left' | 'center' | 'right';
|
|
27
|
+
fixed: 'left' | 'right' | false;
|
|
28
|
+
type: 'link' | 'button';
|
|
29
|
+
items: OperationItem[];
|
|
30
|
+
};
|
|
31
|
+
operationContent?: {
|
|
32
|
+
[key: string]: React.ReactNode;
|
|
33
|
+
};
|
|
5
34
|
dataSource: DataSourceType;
|
|
6
35
|
columns: ColumnType<any>[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
editContent?: React.ReactNode;
|
|
13
|
-
addContent?: React.ReactNode;
|
|
36
|
+
filter: any;
|
|
37
|
+
search?: {
|
|
38
|
+
show: boolean;
|
|
39
|
+
placeholder: string;
|
|
40
|
+
};
|
|
14
41
|
__designMode: string;
|
|
15
42
|
componentId: string;
|
|
43
|
+
clickToDetail?: {
|
|
44
|
+
show: boolean;
|
|
45
|
+
useCustomAction: boolean;
|
|
46
|
+
actionType: string;
|
|
47
|
+
openMode: 'modal' | 'drawer';
|
|
48
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
49
|
+
openTitle: string;
|
|
50
|
+
key: string;
|
|
51
|
+
};
|
|
52
|
+
onRow?: any;
|
|
53
|
+
filterBy?: Record<string, any>;
|
|
54
|
+
sortBy: string;
|
|
55
|
+
tabs?: {
|
|
56
|
+
show: boolean;
|
|
57
|
+
type: string;
|
|
58
|
+
items: {
|
|
59
|
+
name: string;
|
|
60
|
+
filterBy: Record<string, any>;
|
|
61
|
+
sortBy: string;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
16
64
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import useDataSource from "../hooks/useDataSource";
|
|
3
|
+
import useVariables from "../hooks/useVariables";
|
|
4
|
+
import useComponentId from "../hooks/useComponentId";
|
|
5
|
+
var BaseWrapper = function BaseWrapper(props) {
|
|
6
|
+
var children = props.children;
|
|
7
|
+
var componentId = useComponentId(props);
|
|
8
|
+
var _useDataSource = useDataSource(),
|
|
9
|
+
get = _useDataSource.get,
|
|
10
|
+
list = _useDataSource.list;
|
|
11
|
+
var _useVariables = useVariables(),
|
|
12
|
+
registerValueVariable = _useVariables.registerValueVariable;
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
if (componentId) {
|
|
15
|
+
registerValueVariable === null || registerValueVariable === void 0 ? void 0 : registerValueVariable(componentId, {
|
|
16
|
+
get: get,
|
|
17
|
+
list: list
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}, [get, list, componentId]);
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", null, children);
|
|
22
|
+
};
|
|
23
|
+
export default BaseWrapper;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
declare const DataSourceWrapper: (props: DataSourceWrapperProps) => React.JSX.Element;
|
|
2
|
+
import { DataSourceContextProps } from '../provider/dataSource/DataSourceContext';
|
|
3
|
+
declare const DataSourceWrapper: (props: DataSourceContextProps) => React.JSX.Element;
|
|
6
4
|
export default DataSourceWrapper;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import DataSourceProvider from "../provider/dataSource/DataSourceProvider";
|
|
3
|
+
import BaseWrapper from "./BaseWrapper";
|
|
4
|
+
|
|
5
|
+
// 数据源包装器
|
|
2
6
|
var DataSourceWrapper = function DataSourceWrapper(props) {
|
|
3
|
-
var children = props.children
|
|
4
|
-
|
|
7
|
+
var children = props.children,
|
|
8
|
+
dataSource = props.dataSource,
|
|
9
|
+
overrideData = props.overrideData,
|
|
10
|
+
autoRun = props.autoRun,
|
|
11
|
+
actions = props.actions,
|
|
12
|
+
currentValue = props.currentValue;
|
|
13
|
+
return /*#__PURE__*/React.createElement(DataSourceProvider, {
|
|
14
|
+
dataSource: dataSource,
|
|
15
|
+
overrideData: overrideData,
|
|
16
|
+
actions: actions,
|
|
17
|
+
autoRun: autoRun,
|
|
18
|
+
currentValue: currentValue
|
|
19
|
+
}, /*#__PURE__*/React.createElement(BaseWrapper, props, children));
|
|
5
20
|
};
|
|
6
21
|
export default DataSourceWrapper;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckOutlined } from '@ant-design/icons';
|
|
1
3
|
import useValueMap from "../../hooks/useValueMap";
|
|
2
4
|
import { renderValueWithMap } from "../../dataSourceForm/utils";
|
|
3
5
|
var CheckboxReadPretty = function CheckboxReadPretty(props) {
|
|
4
6
|
var value = props.value;
|
|
5
|
-
return
|
|
7
|
+
return value ? /*#__PURE__*/React.createElement(CheckOutlined, {
|
|
8
|
+
style: {
|
|
9
|
+
color: 'rgb(82, 196, 26)'
|
|
10
|
+
}
|
|
11
|
+
}) : null;
|
|
6
12
|
};
|
|
7
13
|
var CheckboxGroupReadPretty = function CheckboxGroupReadPretty(props) {
|
|
8
14
|
var value = props.value,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import CheckboxWithMode from "./WithMode";
|
|
2
2
|
import { withFormItem, withDataSource, withOptions } from "../../dataSourceForm/utils";
|
|
3
|
-
var Checkbox = withFormItem(CheckboxWithMode
|
|
3
|
+
var Checkbox = withFormItem(CheckboxWithMode, {
|
|
4
|
+
valuePropName: 'checked'
|
|
5
|
+
});
|
|
4
6
|
|
|
5
7
|
// 包装formItem层
|
|
6
8
|
var CheckboxGroupWithFormItem = withFormItem(CheckboxWithMode.Group);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { withFormItem } from "../../dataSourceForm/utils";
|
|
2
2
|
import DatePickerWithMode from "./WithMode";
|
|
3
|
-
var DatePicker = withFormItem(DatePickerWithMode
|
|
3
|
+
var DatePicker = withFormItem(DatePickerWithMode, {
|
|
4
|
+
innerStyle: {
|
|
5
|
+
width: '100%'
|
|
6
|
+
}
|
|
7
|
+
});
|
|
4
8
|
export default DatePicker;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
var DateRangePickerReadPretty = function DateRangePickerReadPretty(props) {
|
|
4
|
+
var value = props.value;
|
|
5
|
+
return /*#__PURE__*/React.createElement("span", null, value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : '');
|
|
6
|
+
};
|
|
7
|
+
export default DateRangePickerReadPretty;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare const DateRangePicker: React.FC<import("./type").DateRangePickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
4
|
+
export default DateRangePicker;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.filter-form-wrapper {
|
|
2
|
+
.pisell-date-range-picker {
|
|
3
|
+
border-radius: 10px;
|
|
4
|
+
background: #fff;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.MuiInputBase-root {
|
|
8
|
+
border-radius: 10px !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.MuiOutlinedInput-notchedOutline {
|
|
12
|
+
border: 1px solid #d0d5dd !important;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,11 +3,16 @@ import JSON from '../Input.Json';
|
|
|
3
3
|
import Password from '../Input.Password';
|
|
4
4
|
import TextArea from '../Input.TextArea';
|
|
5
5
|
import Url from '../Input.Url';
|
|
6
|
-
|
|
6
|
+
import Email from '../Input.Email';
|
|
7
|
+
import Phone from '../Input.Phone';
|
|
8
|
+
import { InputProps } from './type';
|
|
9
|
+
declare type InputComponent = React.FC<InputProps> & {
|
|
7
10
|
JSON: typeof JSON;
|
|
8
11
|
Password: typeof Password;
|
|
9
12
|
TextArea: typeof TextArea;
|
|
10
13
|
URL: typeof Url;
|
|
14
|
+
Email: typeof Email;
|
|
15
|
+
Phone: typeof Phone;
|
|
11
16
|
};
|
|
12
17
|
declare const Input: InputComponent;
|
|
13
18
|
export default Input;
|
|
@@ -2,6 +2,8 @@ import JSON from "../Input.Json";
|
|
|
2
2
|
import Password from "../Input.Password";
|
|
3
3
|
import TextArea from "../Input.TextArea";
|
|
4
4
|
import Url from "../Input.Url";
|
|
5
|
+
import Email from "../Input.Email";
|
|
6
|
+
import Phone from "../Input.Phone";
|
|
5
7
|
import InputWithMode from "./WithMode";
|
|
6
8
|
import { withFormItem } from "../../dataSourceForm/utils";
|
|
7
9
|
var Input = withFormItem(InputWithMode);
|
|
@@ -9,4 +11,6 @@ Input.JSON = JSON;
|
|
|
9
11
|
Input.Password = Password;
|
|
10
12
|
Input.TextArea = TextArea;
|
|
11
13
|
Input.URL = Url;
|
|
14
|
+
Input.Email = Email;
|
|
15
|
+
Input.Phone = Phone;
|
|
12
16
|
export default Input;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Input as AntInput } from 'antd';
|
|
4
|
+
import Icon from "../../../icon";
|
|
5
|
+
import ReadPretty from "./ReadPretty";
|
|
6
|
+
import { withMode } from "../../dataSourceForm/utils";
|
|
7
|
+
var Email = function Email(props) {
|
|
8
|
+
return /*#__PURE__*/React.createElement(AntInput, _extends({}, props, {
|
|
9
|
+
prefix: /*#__PURE__*/React.createElement(Icon, {
|
|
10
|
+
type: "pisell2-mail-01",
|
|
11
|
+
size: 18,
|
|
12
|
+
color: "#98A2B3"
|
|
13
|
+
})
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
var EmailWithMode = withMode(Email, ReadPretty);
|
|
17
|
+
export default EmailWithMode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { isString, isPlainObject } from '@pisell/utils';
|
|
3
3
|
var JsonReadPretty = function JsonReadPretty(props) {
|
|
4
4
|
if (isString(props.value)) {
|
|
5
|
-
return /*#__PURE__*/React.createElement("
|
|
5
|
+
return /*#__PURE__*/React.createElement("pre", null, props.value);
|
|
6
6
|
} else if (isPlainObject(props.value)) {
|
|
7
|
-
return /*#__PURE__*/React.createElement("
|
|
7
|
+
return /*#__PURE__*/React.createElement("pre", null, JSON.stringify(props.value, null, 2));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const JsonWithMode:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const JsonWithMode: React.FC<any>;
|
|
3
3
|
export default JsonWithMode;
|
|
@@ -1,5 +1,45 @@
|
|
|
1
|
+
var _excluded = ["onChange", "onBlur", "value"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useState, useEffect } from 'react';
|
|
1
12
|
import { Input as AntInput } from 'antd';
|
|
2
13
|
import ReadPretty from "./ReadPretty";
|
|
3
14
|
import { withMode } from "../../dataSourceForm/utils";
|
|
4
|
-
var
|
|
15
|
+
var JsonInput = function JsonInput(props) {
|
|
16
|
+
var onChange = props.onChange,
|
|
17
|
+
onBlur = props.onBlur,
|
|
18
|
+
value = props.value,
|
|
19
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
20
|
+
var _useState = useState(value),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
innerValue = _useState2[0],
|
|
23
|
+
setInnerValue = _useState2[1];
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
setInnerValue(value);
|
|
26
|
+
}, [value]);
|
|
27
|
+
var handleChange = function handleChange(e) {
|
|
28
|
+
setInnerValue(e.target.value);
|
|
29
|
+
};
|
|
30
|
+
var handleBlur = function handleBlur(e) {
|
|
31
|
+
if (onBlur) {
|
|
32
|
+
onBlur(e);
|
|
33
|
+
}
|
|
34
|
+
if (onChange) {
|
|
35
|
+
onChange(e.target.value);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return /*#__PURE__*/React.createElement(AntInput.TextArea, _extends({}, restProps, {
|
|
39
|
+
value: innerValue,
|
|
40
|
+
onChange: handleChange,
|
|
41
|
+
onBlur: handleBlur
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
var JsonWithMode = withMode(JsonInput, ReadPretty);
|
|
5
45
|
export default JsonWithMode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const Json: React.FC<
|
|
2
|
+
declare const Json: React.FC<any>;
|
|
3
3
|
export default Json;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Input as AntInput } from 'antd';
|
|
4
|
+
import ReadPretty from "./ReadPretty";
|
|
5
|
+
import { withMode } from "../../dataSourceForm/utils";
|
|
6
|
+
var Phone = function Phone(props) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(AntInput, _extends({}, props, {
|
|
8
|
+
type: "tel"
|
|
9
|
+
}));
|
|
10
|
+
};
|
|
11
|
+
var PhoneWithMode = withMode(Phone, ReadPretty);
|
|
12
|
+
export default PhoneWithMode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { withFormItem } from "../../dataSourceForm/utils";
|
|
2
2
|
import InputNumberWithMode from "./WithMode";
|
|
3
|
-
var InputNumber = withFormItem(InputNumberWithMode
|
|
3
|
+
var InputNumber = withFormItem(InputNumberWithMode, {
|
|
4
|
+
innerStyle: {
|
|
5
|
+
width: '100%'
|
|
6
|
+
}
|
|
7
|
+
});
|
|
4
8
|
export default InputNumber;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
3
|
options?: any;
|
|
4
|
-
optionSourceType?:
|
|
4
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
5
5
|
labelField: string;
|
|
6
6
|
valueField: string;
|
|
7
7
|
} & {
|
|
@@ -1,23 +1,64 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
declare const formFieldMap: {
|
|
3
|
+
Checkbox: import("react").FC<{}> & {
|
|
4
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
5
|
+
} & {
|
|
6
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
7
|
+
};
|
|
8
|
+
ColorPicker: import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
9
|
+
DatePicker: import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
10
|
+
Input: import("react").FC<import("./Input/type").InputProps> & {
|
|
11
|
+
JSON: import("react").FC<any>;
|
|
12
|
+
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
13
|
+
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
14
|
+
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
15
|
+
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
16
|
+
Phone: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
17
|
+
};
|
|
18
|
+
Radio: import("react").FC<{}> & {
|
|
19
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
20
|
+
} & {
|
|
21
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
22
|
+
};
|
|
23
|
+
Select: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
24
|
+
options?: any;
|
|
25
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
26
|
+
labelField: string;
|
|
27
|
+
valueField: string;
|
|
28
|
+
} & {
|
|
29
|
+
dataSource?: any;
|
|
30
|
+
}) => import("react").JSX.Element;
|
|
31
|
+
InputNumber: import("react").FC<any>;
|
|
32
|
+
Percent: import("react").FC<any>;
|
|
33
|
+
TimePicker: import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
34
|
+
'Input.JSON': import("react").FC<any>;
|
|
35
|
+
'Input.URL': import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
36
|
+
'Input.Password': import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
37
|
+
'Radio.Group': import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
38
|
+
'Checkbox.Group': import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
39
|
+
DateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
40
|
+
};
|
|
2
41
|
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
3
42
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
4
43
|
} & {
|
|
5
44
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
6
|
-
}) | import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").
|
|
7
|
-
JSON: import("react").FC<
|
|
45
|
+
}) | import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
46
|
+
JSON: import("react").FC<any>;
|
|
8
47
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
9
48
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
10
49
|
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
50
|
+
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
51
|
+
Phone: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
11
52
|
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
12
53
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
13
54
|
} & {
|
|
14
55
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
15
56
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
16
57
|
options?: any;
|
|
17
|
-
optionSourceType?:
|
|
58
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
18
59
|
labelField: string;
|
|
19
60
|
valueField: string;
|
|
20
61
|
} & {
|
|
21
62
|
dataSource?: any;
|
|
22
|
-
}) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
23
|
-
export { getFieldComponent };
|
|
63
|
+
}) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
64
|
+
export { getFieldComponent, formFieldMap };
|
|
@@ -6,6 +6,9 @@ import Radio from "./Radio";
|
|
|
6
6
|
import Select from "./Select";
|
|
7
7
|
import InputNumber from "./InputNumber";
|
|
8
8
|
import TimePicker from "./TimePicker";
|
|
9
|
+
import DateRangePicker from "./DateRangePicker";
|
|
10
|
+
|
|
11
|
+
// 表单字段组件映射 增加时需要同步更新 utils 中的 formFieldFilterFuncMap
|
|
9
12
|
var formFieldMap = {
|
|
10
13
|
Checkbox: Checkbox,
|
|
11
14
|
ColorPicker: ColorPicker,
|
|
@@ -14,14 +17,16 @@ var formFieldMap = {
|
|
|
14
17
|
Radio: Radio,
|
|
15
18
|
Select: Select,
|
|
16
19
|
InputNumber: InputNumber,
|
|
20
|
+
Percent: InputNumber,
|
|
17
21
|
TimePicker: TimePicker,
|
|
18
22
|
'Input.JSON': Input.JSON,
|
|
19
23
|
'Input.URL': Input.URL,
|
|
20
24
|
'Input.Password': Input.Password,
|
|
21
25
|
'Radio.Group': Radio.Group,
|
|
22
|
-
'Checkbox.Group': Checkbox.Group
|
|
26
|
+
'Checkbox.Group': Checkbox.Group,
|
|
27
|
+
DateRangePicker: DateRangePicker
|
|
23
28
|
};
|
|
24
29
|
var getFieldComponent = function getFieldComponent(fieldComponent) {
|
|
25
30
|
return formFieldMap[fieldComponent];
|
|
26
31
|
};
|
|
27
|
-
export { getFieldComponent };
|
|
32
|
+
export { getFieldComponent, formFieldMap };
|