@pisell/materials 1.0.973 → 1.0.975
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 +4 -4
- package/build/lowcode/preview.js +146 -149
- package/build/lowcode/render/default/view.js +26 -30
- package/build/lowcode/view.js +26 -30
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/auto-complete-number/index.d.ts +1 -0
- package/es/components/badge/index.d.ts +1 -0
- package/es/components/batch-editor/fields/index.d.ts +1 -0
- package/es/components/calendar/index.d.ts +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/classicLayout/index.d.ts +1 -0
- package/es/components/colorPicker/index.d.ts +1 -0
- package/es/components/config-provider/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +28 -6
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +16 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +179 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +4 -4
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +39 -0
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +34 -0
- package/es/components/dataSourceComponents/dataSourceForm/urlUtils.js +5 -7
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +27 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +101 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +33 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +85 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +7 -7
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +18 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +120 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/dropdown/index.d.ts +1 -0
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/hardwareErrorTip/demo.d.ts +3 -0
- package/es/components/hardwareErrorTip/errorCard/index.d.ts +28 -0
- package/es/components/hardwareErrorTip/index.d.ts +19 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/page/index.d.ts +8 -0
- package/es/components/page/index.js +5 -2
- package/es/components/pisellCamera/index.d.ts +4 -0
- package/es/components/pisellCard/index.d.ts +1 -0
- package/es/components/pisellCardList/index.d.ts +107 -0
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/es/components/pisellDatePicker/index.d.ts +1 -0
- package/es/components/pisellGoodPassCard/index.d.ts +50 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/es/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/es/components/pisellQRScanner/index.d.ts +24 -0
- package/es/components/pisellToast/index.d.ts +17 -0
- package/es/components/pisellTooltip/index.d.ts +1 -0
- package/es/components/pisellUpload/index.d.ts +1 -0
- package/es/components/pisellWalletPassCard/index.d.ts +146 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/Divider/index.d.ts +1 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/es/components/productCard/index.d.ts +7 -0
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/segmented/index.d.ts +1 -0
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select-time/RightPanel/index.d.ts +1 -0
- package/es/components/skeleton/index.d.ts +1 -0
- package/es/components/slider/index.d.ts +1 -0
- package/es/components/sort/components/InlineMenu/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/es/components/table/Actions/component/ViewMode/index.d.ts +1 -0
- package/es/components/table/Summary/index.d.ts +1 -0
- package/es/components/table/Table/AddFieldModal/index.d.ts +4 -0
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/link/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +1 -0
- package/es/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/es/components/table/TableFilter/SortIcon.d.ts +1 -0
- package/es/components/time-picker/index.d.ts +1 -0
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/es/components/walletCard/Guest/index.d.ts +1 -0
- package/es/components/walletCard/Guide/index.d.ts +1 -0
- package/es/components/walletCard/index.d.ts +77 -0
- package/es/index.d.ts +150 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/auto-complete-number/index.d.ts +1 -0
- package/lib/components/badge/index.d.ts +1 -0
- package/lib/components/batch-editor/fields/index.d.ts +1 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/classicLayout/index.d.ts +1 -0
- package/lib/components/colorPicker/index.d.ts +1 -0
- package/lib/components/config-provider/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +21 -7
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +16 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +179 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +39 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +34 -0
- package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.js +3 -5
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +27 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +101 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +33 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +85 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +7 -7
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +18 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +120 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/hardwareErrorTip/demo.d.ts +3 -0
- package/lib/components/hardwareErrorTip/errorCard/index.d.ts +28 -0
- package/lib/components/hardwareErrorTip/index.d.ts +19 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/page/index.d.ts +8 -0
- package/lib/components/page/index.js +3 -2
- package/lib/components/pisellCamera/index.d.ts +4 -0
- package/lib/components/pisellCard/index.d.ts +1 -0
- package/lib/components/pisellCardList/index.d.ts +107 -0
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/lib/components/pisellDatePicker/index.d.ts +1 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +50 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/lib/components/pisellQRScanner/index.d.ts +24 -0
- package/lib/components/pisellToast/index.d.ts +17 -0
- package/lib/components/pisellTooltip/index.d.ts +1 -0
- package/lib/components/pisellUpload/index.d.ts +1 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +146 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/Divider/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/lib/components/productCard/index.d.ts +7 -0
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/segmented/index.d.ts +1 -0
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select-time/RightPanel/index.d.ts +1 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/slider/index.d.ts +1 -0
- package/lib/components/sort/components/InlineMenu/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +1 -0
- package/lib/components/table/Summary/index.d.ts +1 -0
- package/lib/components/table/Table/AddFieldModal/index.d.ts +4 -0
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/link/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/lib/components/table/TableFilter/SortIcon.d.ts +1 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/lib/components/walletCard/Guest/index.d.ts +1 -0
- package/lib/components/walletCard/Guide/index.d.ts +1 -0
- package/lib/components/walletCard/index.d.ts +77 -0
- package/lib/index.d.ts +150 -0
- package/package.json +2 -2
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataSourceTableProps } from '../type';
|
|
3
|
+
import { OperationItem } from '../type';
|
|
4
|
+
interface UseTablePropsProps {
|
|
5
|
+
data: any;
|
|
6
|
+
originProps: DataSourceTableProps;
|
|
7
|
+
openDrawer: (type: OperationItem) => void;
|
|
8
|
+
closeDrawer: () => void;
|
|
9
|
+
refreshData: () => void;
|
|
10
|
+
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
11
|
+
tableRef: any;
|
|
12
|
+
getInitialValues: () => Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 处理table的props
|
|
16
|
+
* 转换title
|
|
17
|
+
* @param props
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
|
+
currentComponentId: any;
|
|
22
|
+
title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
23
|
+
pagination: {
|
|
24
|
+
total: number;
|
|
25
|
+
current: number;
|
|
26
|
+
pageSize: number;
|
|
27
|
+
size: string;
|
|
28
|
+
showSizeChanger: boolean;
|
|
29
|
+
};
|
|
30
|
+
columns: import("./useColumns").Column[];
|
|
31
|
+
subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
|
+
buttons: any[] | null;
|
|
33
|
+
filter: {
|
|
34
|
+
dom: any;
|
|
35
|
+
items: any;
|
|
36
|
+
} | null;
|
|
37
|
+
onRow: (record: any) => any;
|
|
38
|
+
actionButtons: any[] | null;
|
|
39
|
+
__id?: string | undefined;
|
|
40
|
+
currentSettingKey?: string | undefined;
|
|
41
|
+
titleButtons?: {
|
|
42
|
+
show: boolean;
|
|
43
|
+
maxCount: number;
|
|
44
|
+
items: OperationItem[];
|
|
45
|
+
} | undefined;
|
|
46
|
+
tableButtons?: {
|
|
47
|
+
show: boolean;
|
|
48
|
+
maxCount: number;
|
|
49
|
+
items: OperationItem[];
|
|
50
|
+
} | undefined;
|
|
51
|
+
operation?: {
|
|
52
|
+
show: boolean;
|
|
53
|
+
title: string;
|
|
54
|
+
width: number;
|
|
55
|
+
align: "center" | "left" | "right";
|
|
56
|
+
fixed: false | "left" | "right";
|
|
57
|
+
type: "link" | "button";
|
|
58
|
+
items: OperationItem[];
|
|
59
|
+
} | undefined;
|
|
60
|
+
operationContent?: {
|
|
61
|
+
[key: string]: React.ReactNode;
|
|
62
|
+
} | undefined;
|
|
63
|
+
dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
|
|
64
|
+
search?: {
|
|
65
|
+
show: boolean;
|
|
66
|
+
placeholder: string;
|
|
67
|
+
} | undefined;
|
|
68
|
+
__designMode: string;
|
|
69
|
+
componentId: string;
|
|
70
|
+
clickToDetail?: {
|
|
71
|
+
show: boolean;
|
|
72
|
+
useCustomAction: boolean;
|
|
73
|
+
actionType: string;
|
|
74
|
+
openMode: "modal" | "drawer";
|
|
75
|
+
openContentSize: "small" | "middle" | "large";
|
|
76
|
+
openTitle: string;
|
|
77
|
+
key: string;
|
|
78
|
+
} | undefined;
|
|
79
|
+
filterBy?: Record<string, any> | undefined;
|
|
80
|
+
sortBy: string;
|
|
81
|
+
tabs?: {
|
|
82
|
+
show: boolean;
|
|
83
|
+
type: string;
|
|
84
|
+
items: {
|
|
85
|
+
name: string;
|
|
86
|
+
filterBy: Record<string, any>;
|
|
87
|
+
sortBy: string;
|
|
88
|
+
}[];
|
|
89
|
+
} | undefined;
|
|
90
|
+
onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
|
|
91
|
+
onDeleteFinish?: ((record: Record<string, any>) => void) | undefined;
|
|
92
|
+
extraParams?: {
|
|
93
|
+
list?: Record<string, any> | undefined;
|
|
94
|
+
get?: Record<string, any> | undefined;
|
|
95
|
+
update?: Record<string, any> | undefined;
|
|
96
|
+
create?: Record<string, any> | undefined;
|
|
97
|
+
destroy?: Record<string, any> | undefined;
|
|
98
|
+
} | undefined;
|
|
99
|
+
localSettings?: import("../../../table/types").LocalSettingsType | undefined;
|
|
100
|
+
};
|
|
101
|
+
export default useTableProps;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DataSourceTableProps } from '../type';
|
|
2
|
+
declare type Params = {
|
|
3
|
+
pagination?: {
|
|
4
|
+
page: number;
|
|
5
|
+
size: number;
|
|
6
|
+
};
|
|
7
|
+
order_by?: string;
|
|
8
|
+
tabs?: {
|
|
9
|
+
name: string;
|
|
10
|
+
filterBy: Record<string, any>;
|
|
11
|
+
sortBy: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const useTableQuery: (props: DataSourceTableProps, currentSettingHash: string) => {
|
|
15
|
+
queryPageConfig: {
|
|
16
|
+
page: number;
|
|
17
|
+
pageSize: number;
|
|
18
|
+
filter: Record<string, any>;
|
|
19
|
+
sort: string;
|
|
20
|
+
};
|
|
21
|
+
setQueryPageConfig: import("react").Dispatch<import("react").SetStateAction<{
|
|
22
|
+
page: number;
|
|
23
|
+
pageSize: number;
|
|
24
|
+
filter: Record<string, any>;
|
|
25
|
+
sort: string;
|
|
26
|
+
}>>;
|
|
27
|
+
handleValuesChange: (params: Params, allParams: Params) => void;
|
|
28
|
+
refreshData: () => void;
|
|
29
|
+
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
30
|
+
refreshCurrentPage: () => void;
|
|
31
|
+
getInitialValues: () => Record<string, any>;
|
|
32
|
+
};
|
|
33
|
+
export default useTableQuery;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { LocalSettingsType } from '../../table/types';
|
|
4
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
5
|
+
export declare type OperationItem = {
|
|
6
|
+
label?: string;
|
|
7
|
+
openMode: 'modal' | 'drawer' | 'custom';
|
|
8
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
9
|
+
openTitle: string;
|
|
10
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
11
|
+
key: string;
|
|
12
|
+
buttonProps?: any;
|
|
13
|
+
onClick?: (record: any) => void;
|
|
14
|
+
afterClose?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export interface DataSourceTableProps {
|
|
17
|
+
__id?: string;
|
|
18
|
+
currentComponentId?: string;
|
|
19
|
+
currentSettingKey?: string;
|
|
20
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
21
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
22
|
+
titleButtons?: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
items: OperationItem[];
|
|
26
|
+
};
|
|
27
|
+
tableButtons?: {
|
|
28
|
+
show: boolean;
|
|
29
|
+
maxCount: number;
|
|
30
|
+
items: OperationItem[];
|
|
31
|
+
};
|
|
32
|
+
buttons?: any[];
|
|
33
|
+
operation?: {
|
|
34
|
+
show: boolean;
|
|
35
|
+
title: string;
|
|
36
|
+
width: number;
|
|
37
|
+
align: 'left' | 'center' | 'right';
|
|
38
|
+
fixed: 'left' | 'right' | false;
|
|
39
|
+
type: 'link' | 'button';
|
|
40
|
+
items: OperationItem[];
|
|
41
|
+
};
|
|
42
|
+
operationContent?: {
|
|
43
|
+
[key: string]: React.ReactNode;
|
|
44
|
+
};
|
|
45
|
+
dataSource: DataSourceType;
|
|
46
|
+
columns: ColumnType<any>[];
|
|
47
|
+
filter: any;
|
|
48
|
+
search?: {
|
|
49
|
+
show: boolean;
|
|
50
|
+
placeholder: string;
|
|
51
|
+
};
|
|
52
|
+
__designMode: string;
|
|
53
|
+
componentId: string;
|
|
54
|
+
clickToDetail?: {
|
|
55
|
+
show: boolean;
|
|
56
|
+
useCustomAction: boolean;
|
|
57
|
+
actionType: string;
|
|
58
|
+
openMode: 'modal' | 'drawer';
|
|
59
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
60
|
+
openTitle: string;
|
|
61
|
+
key: string;
|
|
62
|
+
};
|
|
63
|
+
onRow?: any;
|
|
64
|
+
filterBy?: Record<string, any>;
|
|
65
|
+
sortBy: string;
|
|
66
|
+
tabs?: {
|
|
67
|
+
show: boolean;
|
|
68
|
+
type: string;
|
|
69
|
+
items: {
|
|
70
|
+
name: string;
|
|
71
|
+
filterBy: Record<string, any>;
|
|
72
|
+
sortBy: string;
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
onValuesChange?: (changedValues: any, values: any) => void;
|
|
76
|
+
onDeleteFinish?: (record: Record<string, any>) => void;
|
|
77
|
+
extraParams?: {
|
|
78
|
+
list?: Record<string, any>;
|
|
79
|
+
get?: Record<string, any>;
|
|
80
|
+
update?: Record<string, any>;
|
|
81
|
+
create?: Record<string, any>;
|
|
82
|
+
destroy?: Record<string, any>;
|
|
83
|
+
};
|
|
84
|
+
localSettings?: LocalSettingsType;
|
|
85
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import { ModeType } from '../../dataSourceForm/type';
|
|
4
|
+
declare type PhoneValue = string | {
|
|
5
|
+
phone: string;
|
|
6
|
+
countryCallingCode: string;
|
|
7
|
+
countryCode?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
10
|
+
renderMode: ModeType;
|
|
11
|
+
value?: PhoneValue;
|
|
12
|
+
onChange?: (value: PhoneValue) => void;
|
|
13
|
+
returnFormat?: 'string' | 'object';
|
|
14
|
+
inputRef?: any;
|
|
15
|
+
}
|
|
16
|
+
declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
17
|
+
export default MobileNumberInputWithMode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
4
|
+
declare type PhoneValue = string | {
|
|
5
|
+
phone: string;
|
|
6
|
+
countryCallingCode: string;
|
|
7
|
+
};
|
|
8
|
+
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
9
|
+
renderMode: ModeType;
|
|
10
|
+
value?: PhoneValue;
|
|
11
|
+
onChange?: (value: PhoneValue) => void;
|
|
12
|
+
returnFormat?: 'string' | 'object';
|
|
13
|
+
inputRef?: any;
|
|
14
|
+
}
|
|
15
|
+
declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
16
|
+
export default PhoneNumberInputWithMode;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UploadFile as AntdUploadFile } from 'antd/es/upload/interface';
|
|
2
|
+
import type { UploadValue, UploadChangeHandler } from './types';
|
|
3
|
+
export interface UploadFile extends AntdUploadFile {
|
|
4
|
+
metadata?: {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
duration?: number;
|
|
8
|
+
bitrate?: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface UploadProps {
|
|
12
|
+
renderMode?: string;
|
|
13
|
+
fieldKey: string;
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
minCount?: number;
|
|
16
|
+
maxCount?: number;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
presetType?: string[];
|
|
19
|
+
presetTypeString?: string[];
|
|
20
|
+
customType?: string[];
|
|
21
|
+
enablePresetType?: boolean;
|
|
22
|
+
enableCustomType?: boolean;
|
|
23
|
+
allowPreview?: boolean;
|
|
24
|
+
value?: UploadValue;
|
|
25
|
+
typeMaxSizeMap?: Record<string, number>;
|
|
26
|
+
enableMultilingual?: boolean;
|
|
27
|
+
onChange?: UploadChangeHandler;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
mediaUploadUrl?: string;
|
|
30
|
+
getHeaders?: () => Record<string, string>;
|
|
31
|
+
mediaConfig?: {
|
|
32
|
+
data: {
|
|
33
|
+
upload_onetime_limit: number;
|
|
34
|
+
upload_maxsize: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
allowCamera?: boolean;
|
|
38
|
+
}
|
|
@@ -59,7 +59,11 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
63
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
+
} & {
|
|
65
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").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("./Input/type").InputProps> & {
|
|
63
67
|
JSON: import("react").FC<any>;
|
|
64
68
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
65
69
|
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>;
|
|
@@ -79,11 +83,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
79
83
|
name?: string | undefined;
|
|
80
84
|
fieldKey?: string | undefined;
|
|
81
85
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
82
|
-
}) |
|
|
83
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
-
} & {
|
|
85
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
-
}) | import("react").FC<import("./ColorPicker/type").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<{}> & {
|
|
86
|
+
}) | (import("react").FC<{}> & {
|
|
87
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
88
|
} & {
|
|
89
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -95,7 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
95
95
|
extraParams?: Record<string, any> | undefined;
|
|
96
96
|
} & {
|
|
97
97
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
99
|
onChange: (value: string) => void;
|
|
100
100
|
} & 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("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
2
|
+
export interface UseActionsParams {
|
|
3
|
+
dataSource?: DataSourceType;
|
|
4
|
+
currentValue?: 'server' | 'local';
|
|
5
|
+
__designMode?: string;
|
|
6
|
+
extraParams?: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
declare const useActions: ({ dataSource: propsDataSource, currentValue: propsCurrentValue, __designMode, extraParams: propsExtraParams, }?: UseActionsParams) => {
|
|
9
|
+
create: (values: Record<string, any>) => Promise<any>;
|
|
10
|
+
get: () => Promise<any>;
|
|
11
|
+
update: (values: Record<string, any>) => Promise<any>;
|
|
12
|
+
list: (params: {
|
|
13
|
+
page: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
}) => Promise<any>;
|
|
16
|
+
destroy: (id: string) => Promise<any>;
|
|
17
|
+
};
|
|
18
|
+
export default useActions;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Result } from 'ahooks/es/useRequest/src/types';
|
|
3
|
+
import { ActionsItem } from '../../dataSourceForm/serve';
|
|
4
|
+
export interface Field {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
allowNull: boolean;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
unique: boolean;
|
|
10
|
+
autoIncrement: boolean;
|
|
11
|
+
description?: (null | string)[];
|
|
12
|
+
possibleTypes?: string[];
|
|
13
|
+
rawType: string;
|
|
14
|
+
interface: string;
|
|
15
|
+
uiSchema: UiSchema;
|
|
16
|
+
key?: string;
|
|
17
|
+
collectionName?: string;
|
|
18
|
+
collectionKey?: any;
|
|
19
|
+
dataSourceKey?: string;
|
|
20
|
+
defaultValue?: any;
|
|
21
|
+
}
|
|
22
|
+
interface UiSchema {
|
|
23
|
+
type?: string;
|
|
24
|
+
'x-component': string;
|
|
25
|
+
'x-component-props'?: Xcomponentprops;
|
|
26
|
+
'x-validator'?: string;
|
|
27
|
+
title: string;
|
|
28
|
+
default?: any;
|
|
29
|
+
enum?: any[];
|
|
30
|
+
}
|
|
31
|
+
interface Xcomponentprops {
|
|
32
|
+
style?: Style;
|
|
33
|
+
autoSize?: AutoSize;
|
|
34
|
+
stringMode?: boolean;
|
|
35
|
+
step?: string;
|
|
36
|
+
dateFormat?: string;
|
|
37
|
+
showTime?: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface AutoSize {
|
|
40
|
+
minRows: number;
|
|
41
|
+
}
|
|
42
|
+
interface Style {
|
|
43
|
+
width: string;
|
|
44
|
+
}
|
|
45
|
+
export declare type ActionTypes = 'list' | 'get' | 'update' | 'create' | 'destroy';
|
|
46
|
+
export declare type DataSourceType = {
|
|
47
|
+
fromSettingMeta: boolean;
|
|
48
|
+
actions: {
|
|
49
|
+
get: ActionsItem;
|
|
50
|
+
update: ActionsItem;
|
|
51
|
+
create: ActionsItem;
|
|
52
|
+
delete: ActionsItem;
|
|
53
|
+
list: ActionsItem;
|
|
54
|
+
};
|
|
55
|
+
headerDataSource: string;
|
|
56
|
+
dataSourceKey: string;
|
|
57
|
+
filterTargetKey: string;
|
|
58
|
+
introspected: boolean;
|
|
59
|
+
isCustomApi: boolean;
|
|
60
|
+
key: string;
|
|
61
|
+
tableName: string;
|
|
62
|
+
logging: boolean;
|
|
63
|
+
name: string;
|
|
64
|
+
title: string;
|
|
65
|
+
titleField: string;
|
|
66
|
+
types: ActionTypes[];
|
|
67
|
+
fields: Field[];
|
|
68
|
+
options: {
|
|
69
|
+
apiType: string;
|
|
70
|
+
baseUrl: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export declare type DataSourceContextProps = {
|
|
74
|
+
dataSource: DataSourceType;
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
currentValue?: string;
|
|
77
|
+
actions?: {
|
|
78
|
+
list?: () => Promise<any>;
|
|
79
|
+
get?: () => Promise<any>;
|
|
80
|
+
update?: () => Promise<any>;
|
|
81
|
+
create?: () => Promise<any>;
|
|
82
|
+
destroy?: () => Promise<any>;
|
|
83
|
+
};
|
|
84
|
+
requestOptions?: {
|
|
85
|
+
list?: any;
|
|
86
|
+
get?: any;
|
|
87
|
+
update?: any;
|
|
88
|
+
create?: any;
|
|
89
|
+
destroy?: any;
|
|
90
|
+
};
|
|
91
|
+
overrideData?: {
|
|
92
|
+
list?: any;
|
|
93
|
+
get?: any;
|
|
94
|
+
};
|
|
95
|
+
autoRun?: {
|
|
96
|
+
list?: boolean;
|
|
97
|
+
get?: boolean;
|
|
98
|
+
};
|
|
99
|
+
extraParams?: {
|
|
100
|
+
list?: Record<string, any>;
|
|
101
|
+
get?: Record<string, any>;
|
|
102
|
+
update?: Record<string, any>;
|
|
103
|
+
create?: Record<string, any>;
|
|
104
|
+
destroy?: Record<string, any>;
|
|
105
|
+
};
|
|
106
|
+
__id?: string;
|
|
107
|
+
__designMode?: string;
|
|
108
|
+
};
|
|
109
|
+
export interface DataSourceContextType {
|
|
110
|
+
dataSource?: DataSourceType;
|
|
111
|
+
list: Result<any, any>;
|
|
112
|
+
destroy: Result<any, any>;
|
|
113
|
+
get: Result<any, any>;
|
|
114
|
+
update: Result<any, any>;
|
|
115
|
+
create: Result<any, any>;
|
|
116
|
+
__designMode?: string;
|
|
117
|
+
getCurrentRecord: () => any;
|
|
118
|
+
}
|
|
119
|
+
export declare const DataSourceContext: import("react").Context<DataSourceContextType>;
|
|
120
|
+
export default DataSourceContext;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const DEVICE_TYPE_MAP: {
|
|
3
|
+
readonly printer: any;
|
|
4
|
+
readonly barcode_scanner: any;
|
|
5
|
+
readonly cds: any;
|
|
6
|
+
readonly kds: any;
|
|
7
|
+
readonly display: any;
|
|
8
|
+
readonly card_reader: any;
|
|
9
|
+
readonly till: any;
|
|
10
|
+
readonly scale: any;
|
|
11
|
+
};
|
|
12
|
+
export interface ErrorCardData {
|
|
13
|
+
error_level: 0 | 1 | 2 | 3;
|
|
14
|
+
error_message: string;
|
|
15
|
+
error_code: string;
|
|
16
|
+
time: string;
|
|
17
|
+
device: {
|
|
18
|
+
device_type: keyof typeof DEVICE_TYPE_MAP;
|
|
19
|
+
device_name: string;
|
|
20
|
+
device_idfa: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
interface IErrorCardProps {
|
|
24
|
+
data: ErrorCardData;
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
}
|
|
27
|
+
declare const ErrorCard: (props: IErrorCardProps) => JSX.Element | null;
|
|
28
|
+
export default ErrorCard;
|