@pisell/materials 6.11.216 → 6.11.218
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 +1 -1
- package/build/lowcode/preview.js +149 -149
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +15 -15
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +14 -14
- package/es/components/Pagination/index.d.ts +0 -1
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/es/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +0 -1
- package/es/components/PisellCards/index.d.ts +0 -1
- package/es/components/PisellMetrics/index.d.ts +0 -1
- package/es/components/PisellTabbar/PisellTabbar.js +1 -2
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -2
- package/es/components/cardPro/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +12 -12
- package/es/components/date-picker/datePickerCpt.d.ts +0 -1
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/list/index.d.ts +0 -1
- package/es/components/lowCodePage/index.d.ts +0 -1
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/es/components/pisellFind/index.js +33 -19
- 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/pisellInput/index.d.ts +1 -0
- package/es/components/pisellLoading/index.d.ts +0 -1
- package/es/components/pisellLookup/PisellLookup.js +34 -14
- package/es/components/pisellLookup/PisellLookup.less +21 -48
- package/es/components/pisellLookup/components/LookupTrigger.js +13 -6
- package/es/components/pisellLookup/components/SearchHistory.js +7 -1
- package/es/components/pisellLookup/types.d.ts +16 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +75 -21
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -1
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
- package/es/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/es/components/pisellTooltip/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -1
- package/es/components/productCard/components/Action/index.d.ts +1 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +0 -1
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -1
- package/es/components/productCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -1
- package/es/components/productCard/components/Time/index.d.ts +0 -1
- package/es/components/productCard/lineItem/locales.d.ts +38 -0
- package/es/components/qrcode/index.d.ts +0 -1
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +0 -1
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/ja.d.ts +1 -0
- package/es/locales/ja.js +1 -0
- package/es/locales/pt.d.ts +1 -0
- package/es/locales/pt.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/lib/components/Pagination/index.d.ts +0 -1
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/lib/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +0 -1
- package/lib/components/PisellCards/index.d.ts +0 -1
- package/lib/components/PisellMetrics/index.d.ts +0 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +1 -2
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -2
- package/lib/components/cardPro/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +12 -12
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -1
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/lowCodePage/index.d.ts +0 -1
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/lib/components/pisellFind/index.js +37 -13
- 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/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellLoading/index.d.ts +0 -1
- package/lib/components/pisellLookup/PisellLookup.js +13 -2
- package/lib/components/pisellLookup/PisellLookup.less +21 -48
- package/lib/components/pisellLookup/components/LookupTrigger.js +14 -1
- package/lib/components/pisellLookup/components/SearchHistory.js +9 -1
- package/lib/components/pisellLookup/types.d.ts +16 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +59 -5
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -1
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/lib/components/pisellTooltip/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -1
- package/lib/components/productCard/components/Action/index.d.ts +1 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -1
- package/lib/components/productCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/index.d.ts +0 -1
- package/lib/components/productCard/lineItem/locales.d.ts +38 -0
- package/lib/components/qrcode/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +0 -1
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/ja.d.ts +1 -0
- package/lib/locales/ja.js +1 -0
- package/lib/locales/pt.d.ts +1 -0
- package/lib/locales/pt.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +2 -1
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +2 -1
- package/package.json +3 -3
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +0 -9
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +0 -9
|
@@ -35,7 +35,7 @@ declare const formFieldMap: {
|
|
|
35
35
|
};
|
|
36
36
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
37
37
|
options?: any;
|
|
38
|
-
optionSourceType?: "
|
|
38
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
39
39
|
labelField: string;
|
|
40
40
|
valueField: string;
|
|
41
41
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -62,7 +62,7 @@ declare const formFieldMap: {
|
|
|
62
62
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
63
63
|
FormItemRecordListWrapper: (props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
64
64
|
options?: any;
|
|
65
|
-
optionSourceType?: "
|
|
65
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
66
66
|
labelField: string;
|
|
67
67
|
valueField: string;
|
|
68
68
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -72,7 +72,7 @@ declare const formFieldMap: {
|
|
|
72
72
|
}) => JSX.Element;
|
|
73
73
|
FormItemTabs: (props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
74
74
|
options?: any;
|
|
75
|
-
optionSourceType?: "
|
|
75
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
76
76
|
labelField: string;
|
|
77
77
|
valueField: string;
|
|
78
78
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -81,11 +81,7 @@ declare const formFieldMap: {
|
|
|
81
81
|
extraParams?: Record<string, any> | undefined;
|
|
82
82
|
}) => JSX.Element;
|
|
83
83
|
};
|
|
84
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
85
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
-
} & {
|
|
87
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
|
-
}) | 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> & {
|
|
84
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
89
85
|
JSON: import("react").FC<any>;
|
|
90
86
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
91
87
|
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>;
|
|
@@ -106,12 +102,16 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
106
102
|
fieldKey?: string | undefined;
|
|
107
103
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
108
104
|
}) | (import("react").FC<{}> & {
|
|
105
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
106
|
+
} & {
|
|
107
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
108
|
+
}) | 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<{}> & {
|
|
109
109
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
110
110
|
} & {
|
|
111
111
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
112
112
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
113
113
|
options?: any;
|
|
114
|
-
optionSourceType?: "
|
|
114
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
115
115
|
labelField: string;
|
|
116
116
|
valueField: string;
|
|
117
117
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -120,9 +120,9 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
120
120
|
extraParams?: Record<string, any> | undefined;
|
|
121
121
|
}) => JSX.Element) | 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 & {
|
|
122
122
|
onChange: (value: string) => void;
|
|
123
|
-
} & 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("./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> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
123
|
+
} & 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> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
124
124
|
options?: any;
|
|
125
|
-
optionSourceType?: "
|
|
125
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
126
126
|
labelField: string;
|
|
127
127
|
valueField: string;
|
|
128
128
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -131,7 +131,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
131
131
|
extraParams?: Record<string, any> | undefined;
|
|
132
132
|
}) => JSX.Element) | ((props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
133
133
|
options?: any;
|
|
134
|
-
optionSourceType?: "
|
|
134
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
135
135
|
labelField: string;
|
|
136
136
|
valueField: string;
|
|
137
137
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const useDataSourceKey: () => {
|
|
3
2
|
dataSourceKey: string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
4
3
|
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
@@ -38,21 +38,33 @@ var import_utils = require("@pisell/utils");
|
|
|
38
38
|
var import_pisellLookup = require("../pisellLookup");
|
|
39
39
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
40
|
var import_locales = require("../../locales");
|
|
41
|
+
var import_en_US = __toESM(require("../../locales/en-US"));
|
|
42
|
+
var import_zh_CN = __toESM(require("../../locales/zh-CN"));
|
|
43
|
+
var import_zh_TW = __toESM(require("../../locales/zh-TW"));
|
|
44
|
+
var import_ja = __toESM(require("../../locales/ja"));
|
|
45
|
+
var import_pt = __toESM(require("../../locales/pt"));
|
|
41
46
|
var SCAN_RESULT_EVENT = "nativeScanResult";
|
|
47
|
+
var pisellFindLocaleTexts = {
|
|
48
|
+
en: import_en_US.default,
|
|
49
|
+
"zh-CN": import_zh_CN.default,
|
|
50
|
+
"zh-HK": import_zh_TW.default,
|
|
51
|
+
ja: import_ja.default,
|
|
52
|
+
pt: import_pt.default
|
|
53
|
+
};
|
|
54
|
+
function getPisellFindText(engineContext, key, fallbackKey) {
|
|
55
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
56
|
+
const rawLocale = ((_f = (_e = (_d = (_c = (_b = (_a = engineContext == null ? void 0 : engineContext.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getApp) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.locales) == null ? void 0 : _e.getLocale) == null ? void 0 : _f.call(_e)) || ((_j = (_i = (_h = (_g = engineContext == null ? void 0 : engineContext.appHelper) == null ? void 0 : _g.utils) == null ? void 0 : _h.storage) == null ? void 0 : _i.get) == null ? void 0 : _j.call(_i, "umi_locale"));
|
|
57
|
+
const locale = import_utils.locales.formatLocale(rawLocale || ((_l = (_k = import_utils.locales).getLocale) == null ? void 0 : _l.call(_k)));
|
|
58
|
+
const localeTexts = pisellFindLocaleTexts[locale];
|
|
59
|
+
return (localeTexts == null ? void 0 : localeTexts[key]) || (fallbackKey ? localeTexts == null ? void 0 : localeTexts[fallbackKey] : void 0) || (0, import_locales.getText)(key) || (fallbackKey ? (0, import_locales.getText)(fallbackKey) : void 0) || key;
|
|
60
|
+
}
|
|
42
61
|
var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
43
62
|
var _a, _b, _c, _d;
|
|
44
63
|
const {
|
|
45
64
|
triggerType = "button",
|
|
46
|
-
buttonText
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return u && u !== key ? u : (0, import_locales.getText)(key) || (0, import_locales.getText)("pisell-find-button-text");
|
|
50
|
-
})(),
|
|
51
|
-
placeholder = (() => {
|
|
52
|
-
const key = "pisell2.recordBoard.toolbar.findPlaceholder";
|
|
53
|
-
const u = import_utils.locales.getText(key);
|
|
54
|
-
return u && u !== key ? u : (0, import_locales.getText)(key) || (0, import_locales.getText)("pisell-find-placeholder");
|
|
55
|
-
})(),
|
|
65
|
+
buttonText,
|
|
66
|
+
placeholder,
|
|
67
|
+
closeButtonText,
|
|
56
68
|
showConfirmButton = false,
|
|
57
69
|
showHistory = true,
|
|
58
70
|
historyKey = "pisell_find_history",
|
|
@@ -93,6 +105,17 @@ var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
|
93
105
|
[]
|
|
94
106
|
);
|
|
95
107
|
const engineContext = (0, import_useEngineContext.default)();
|
|
108
|
+
const resolvedButtonText = buttonText ?? getPisellFindText(
|
|
109
|
+
engineContext,
|
|
110
|
+
"pisell2.recordBoard.toolbar.find",
|
|
111
|
+
"pisell-find-button-text"
|
|
112
|
+
);
|
|
113
|
+
const resolvedPlaceholder = placeholder ?? getPisellFindText(
|
|
114
|
+
engineContext,
|
|
115
|
+
"pisell2.recordBoard.toolbar.findPlaceholder",
|
|
116
|
+
"pisell-find-placeholder"
|
|
117
|
+
);
|
|
118
|
+
const resolvedCloseButtonText = closeButtonText ?? getPisellFindText(engineContext, "pisell-lookup-close");
|
|
96
119
|
const getAppRef = (0, import_react.useRef)(void 0);
|
|
97
120
|
getAppRef.current = typeof ((_b = (_a = engineContext == null ? void 0 : engineContext.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getApp) === "function" ? engineContext.appHelper.utils.getApp : void 0;
|
|
98
121
|
const acquireScanFocusRef = (0, import_react.useRef)(void 0);
|
|
@@ -106,7 +129,7 @@ var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
|
106
129
|
if (typeof data !== "string" || data.length === 0) {
|
|
107
130
|
return;
|
|
108
131
|
}
|
|
109
|
-
(_a2 = lookupRef.current) == null ? void 0 : _a2.setKeyword(data);
|
|
132
|
+
(_a2 = lookupRef.current) == null ? void 0 : _a2.setKeyword(data, "scan");
|
|
110
133
|
(_b2 = onSearchRef.current) == null ? void 0 : _b2.call(onSearchRef, data);
|
|
111
134
|
(_c2 = onScannerDataRef.current) == null ? void 0 : _c2.call(onScannerDataRef, payload);
|
|
112
135
|
};
|
|
@@ -153,8 +176,9 @@ var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
|
153
176
|
{
|
|
154
177
|
ref: lookupRef,
|
|
155
178
|
triggerType,
|
|
156
|
-
buttonText,
|
|
157
|
-
placeholder,
|
|
179
|
+
buttonText: resolvedButtonText,
|
|
180
|
+
placeholder: resolvedPlaceholder,
|
|
181
|
+
closeButtonText: resolvedCloseButtonText,
|
|
158
182
|
showConfirmButton,
|
|
159
183
|
showHistory,
|
|
160
184
|
historyKey,
|
|
@@ -57,6 +57,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
57
57
|
showClear = true,
|
|
58
58
|
showConfirmButton = true,
|
|
59
59
|
confirmButtonText = (0, import_locales.getText)("pisell-lookup-confirm-button-text"),
|
|
60
|
+
closeButtonText = (0, import_locales.getText)("pisell-lookup-close"),
|
|
60
61
|
// 搜索行为配置
|
|
61
62
|
value,
|
|
62
63
|
defaultValue,
|
|
@@ -147,6 +148,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
147
148
|
});
|
|
148
149
|
const [suggestions, setSuggestions] = (0, import_react.useState)([]);
|
|
149
150
|
const [hotWords, setHotWords] = (0, import_react.useState)([]);
|
|
151
|
+
const [searchSource, setSearchSource] = (0, import_react.useState)("keyboard");
|
|
150
152
|
const lastSearchKeywordRef = (0, import_react.useRef)("");
|
|
151
153
|
const isManualSelectRef = (0, import_react.useRef)(false);
|
|
152
154
|
const modalInputRef = (0, import_react.useRef)(null);
|
|
@@ -154,7 +156,10 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
154
156
|
open,
|
|
155
157
|
close,
|
|
156
158
|
getKeyword: () => keyword,
|
|
157
|
-
setKeyword
|
|
159
|
+
setKeyword: (nextKeyword, source = "keyboard") => {
|
|
160
|
+
setSearchSource(source);
|
|
161
|
+
setKeyword(nextKeyword);
|
|
162
|
+
}
|
|
158
163
|
}), [open, close, keyword, setKeyword]);
|
|
159
164
|
(0, import_react.useEffect)(() => {
|
|
160
165
|
if (!visible && clearOnClose) {
|
|
@@ -238,6 +243,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
238
243
|
});
|
|
239
244
|
const handleInputChange = (0, import_react.useCallback)(
|
|
240
245
|
(newValue) => {
|
|
246
|
+
setSearchSource("keyboard");
|
|
241
247
|
setKeyword(newValue);
|
|
242
248
|
},
|
|
243
249
|
[setKeyword]
|
|
@@ -266,6 +272,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
266
272
|
);
|
|
267
273
|
const handleClear = (0, import_react.useCallback)(() => {
|
|
268
274
|
isManualSelectRef.current = true;
|
|
275
|
+
setSearchSource("keyboard");
|
|
269
276
|
setKeyword("");
|
|
270
277
|
lastSearchKeywordRef.current = "";
|
|
271
278
|
onSearch == null ? void 0 : onSearch("");
|
|
@@ -276,6 +283,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
276
283
|
const handleScan = (0, import_react.useCallback)(
|
|
277
284
|
(code) => {
|
|
278
285
|
isManualSelectRef.current = true;
|
|
286
|
+
setSearchSource("scan");
|
|
279
287
|
setKeyword(code);
|
|
280
288
|
handleConfirmSearch(code);
|
|
281
289
|
onScan == null ? void 0 : onScan(code);
|
|
@@ -288,6 +296,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
288
296
|
const handleSelectAuxiliary = (0, import_react.useCallback)(
|
|
289
297
|
(selectedKeyword) => {
|
|
290
298
|
isManualSelectRef.current = true;
|
|
299
|
+
setSearchSource("keyboard");
|
|
291
300
|
setKeyword(selectedKeyword);
|
|
292
301
|
if (showHistory && selectedKeyword.trim()) {
|
|
293
302
|
addHistory(selectedKeyword);
|
|
@@ -321,6 +330,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
321
330
|
confirmButtonText,
|
|
322
331
|
showScan,
|
|
323
332
|
value: keyword,
|
|
333
|
+
searchSource,
|
|
324
334
|
loading,
|
|
325
335
|
inputRender,
|
|
326
336
|
onChange: handleInputChange,
|
|
@@ -429,6 +439,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
429
439
|
confirmButtonText,
|
|
430
440
|
showScan,
|
|
431
441
|
value: keyword,
|
|
442
|
+
searchSource,
|
|
432
443
|
loading,
|
|
433
444
|
inputRender,
|
|
434
445
|
onChange: handleInputChange,
|
|
@@ -443,7 +454,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
443
454
|
onClick: close,
|
|
444
455
|
className: "pisell-lookup-modal-close-btn"
|
|
445
456
|
},
|
|
446
|
-
|
|
457
|
+
closeButtonText
|
|
447
458
|
)),
|
|
448
459
|
renderContent()
|
|
449
460
|
));
|
|
@@ -219,17 +219,6 @@
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.pisell-lookup-input-clear {
|
|
223
|
-
.anticon {
|
|
224
|
-
font-size: 18px;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.pisell-lookup-input-clear-text {
|
|
228
|
-
font-size: 14px;
|
|
229
|
-
line-height: 20px;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
222
|
.pisell-lookup-input-scan {
|
|
234
223
|
font-size: 20px;
|
|
235
224
|
width: 20px;
|
|
@@ -249,12 +238,6 @@
|
|
|
249
238
|
min-height: 58px;
|
|
250
239
|
padding: 6px 6px 6px 16px;
|
|
251
240
|
|
|
252
|
-
.pisell-lookup-input-clear {
|
|
253
|
-
.anticon {
|
|
254
|
-
font-size: 20px;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
241
|
.pisell-lookup-input-scan {
|
|
259
242
|
font-size: 28px;
|
|
260
243
|
width: 28px;
|
|
@@ -292,37 +275,6 @@
|
|
|
292
275
|
gap: 12px;
|
|
293
276
|
}
|
|
294
277
|
|
|
295
|
-
&-clear {
|
|
296
|
-
display: inline-flex;
|
|
297
|
-
align-items: center;
|
|
298
|
-
justify-content: center;
|
|
299
|
-
gap: 2px;
|
|
300
|
-
padding: 6px 4px;
|
|
301
|
-
cursor: pointer;
|
|
302
|
-
color: #7f56d9;
|
|
303
|
-
user-select: none;
|
|
304
|
-
transition: opacity 0.2s;
|
|
305
|
-
|
|
306
|
-
&:hover {
|
|
307
|
-
opacity: 0.8;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.anticon {
|
|
311
|
-
font-size: 24px;
|
|
312
|
-
color: #7f56d9;
|
|
313
|
-
line-height: 1;
|
|
314
|
-
display: flex;
|
|
315
|
-
align-items: center;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
&-text {
|
|
319
|
-
font-size: 16px;
|
|
320
|
-
font-weight: 500;
|
|
321
|
-
line-height: 24px;
|
|
322
|
-
color: #7f56d9;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
278
|
&-scan {
|
|
327
279
|
cursor: pointer;
|
|
328
280
|
color: #000000;
|
|
@@ -395,6 +347,27 @@
|
|
|
395
347
|
// ============ 搜索历史样式 ============
|
|
396
348
|
|
|
397
349
|
&-history {
|
|
350
|
+
&-footer {
|
|
351
|
+
display: flex;
|
|
352
|
+
justify-content: flex-start;
|
|
353
|
+
margin-top: 8px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&-clear {
|
|
357
|
+
border: none;
|
|
358
|
+
background: transparent;
|
|
359
|
+
color: #7f56d9;
|
|
360
|
+
cursor: pointer;
|
|
361
|
+
font-size: 14px;
|
|
362
|
+
font-weight: 500;
|
|
363
|
+
line-height: 20px;
|
|
364
|
+
padding: 0;
|
|
365
|
+
|
|
366
|
+
&:hover {
|
|
367
|
+
opacity: 0.8;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
398
371
|
&-list {
|
|
399
372
|
display: flex;
|
|
400
373
|
flex-wrap: wrap;
|
|
@@ -59,6 +59,7 @@ var LookupTriggerComponent = (0, import_react.forwardRef)(
|
|
|
59
59
|
confirmButtonText = (0, import_locales.getText)("pisell-lookup-confirm-button-text"),
|
|
60
60
|
showScan = true,
|
|
61
61
|
value,
|
|
62
|
+
searchSource = "keyboard",
|
|
62
63
|
loading,
|
|
63
64
|
inputRender,
|
|
64
65
|
onChange,
|
|
@@ -163,12 +164,24 @@ var LookupTriggerComponent = (0, import_react.forwardRef)(
|
|
|
163
164
|
onConfirm: (v) => onConfirm == null ? void 0 : onConfirm(v ?? value ?? ""),
|
|
164
165
|
onClear: handleClear,
|
|
165
166
|
onScan: (code) => onScan == null ? void 0 : onScan(code),
|
|
167
|
+
searchSource,
|
|
166
168
|
onFocus,
|
|
167
169
|
onBlur
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
172
|
const prefix = showPrefixIcon ? prefixIcon || /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, null) : void 0;
|
|
171
|
-
const
|
|
173
|
+
const isScanResult = searchSource === "scan";
|
|
174
|
+
const suffix = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lookup-input-suffix" }, showClear && value && /* @__PURE__ */ import_react.default.createElement(
|
|
175
|
+
import_antd.Button,
|
|
176
|
+
{
|
|
177
|
+
type: "link",
|
|
178
|
+
size,
|
|
179
|
+
className: "pisell-lookup-input-cancel",
|
|
180
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
181
|
+
onClick: handleClear
|
|
182
|
+
},
|
|
183
|
+
isScanResult ? (0, import_locales.getText)("pisell-lookup-cancel") || "取消" : (0, import_locales.getText)("pisell-lookup-clear") || "Clear"
|
|
184
|
+
), showScan && /* @__PURE__ */ import_react.default.createElement(
|
|
172
185
|
import_iconfont.default,
|
|
173
186
|
{
|
|
174
187
|
className: "pisell-lookup-input-scan",
|
|
@@ -64,7 +64,15 @@ var SearchHistory = (props) => {
|
|
|
64
64
|
closeIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null)
|
|
65
65
|
},
|
|
66
66
|
item
|
|
67
|
-
)))
|
|
67
|
+
))), onClear && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lookup-history-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
className: "pisell-lookup-history-clear",
|
|
72
|
+
onClick: handleClearAll
|
|
73
|
+
},
|
|
74
|
+
"Clear"
|
|
75
|
+
)));
|
|
68
76
|
};
|
|
69
77
|
SearchHistory.displayName = "SearchHistory";
|
|
70
78
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -11,6 +11,10 @@ export declare type DisplayType = 'inline' | 'popup' | 'modal' | 'drawer' | 'det
|
|
|
11
11
|
* 搜索模式
|
|
12
12
|
*/
|
|
13
13
|
export declare type SearchMode = 'realtime' | 'confirm';
|
|
14
|
+
/**
|
|
15
|
+
* 搜索来源
|
|
16
|
+
*/
|
|
17
|
+
export declare type LookupSearchSource = 'keyboard' | 'scan';
|
|
14
18
|
/**
|
|
15
19
|
* 输入框尺寸
|
|
16
20
|
*/
|
|
@@ -34,7 +38,7 @@ export interface PisellLookupRef {
|
|
|
34
38
|
/**
|
|
35
39
|
* 设置关键词
|
|
36
40
|
*/
|
|
37
|
-
setKeyword: (keyword: string) => void;
|
|
41
|
+
setKeyword: (keyword: string, source?: LookupSearchSource) => void;
|
|
38
42
|
}
|
|
39
43
|
/**
|
|
40
44
|
* Drawer 位置
|
|
@@ -69,6 +73,8 @@ export interface LookupInputRenderContext {
|
|
|
69
73
|
onClear: () => void;
|
|
70
74
|
/** 扫码结果回填 */
|
|
71
75
|
onScan?: (code: string) => void;
|
|
76
|
+
/** 最近一次搜索来源,用于输入栏区分键盘输入与扫码结果态 */
|
|
77
|
+
searchSource?: LookupSearchSource;
|
|
72
78
|
/** 聚焦:inline/popup 形态用于展开结果容器 */
|
|
73
79
|
onFocus?: () => void;
|
|
74
80
|
/** 失焦:inline/popup 形态用于延迟关闭结果容器 */
|
|
@@ -147,6 +153,11 @@ export interface PisellLookupProps {
|
|
|
147
153
|
* @default 'Lookup'
|
|
148
154
|
*/
|
|
149
155
|
confirmButtonText?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Modal 搜索栏关闭按钮文本
|
|
158
|
+
* @default 'Close'
|
|
159
|
+
*/
|
|
160
|
+
closeButtonText?: string;
|
|
150
161
|
/**
|
|
151
162
|
* 搜索触发模式
|
|
152
163
|
* - realtime: 实时搜索(输入即触发)
|
|
@@ -477,6 +488,10 @@ export interface LookupTriggerProps {
|
|
|
477
488
|
* 当前值
|
|
478
489
|
*/
|
|
479
490
|
value?: string;
|
|
491
|
+
/**
|
|
492
|
+
* 最近一次搜索来源
|
|
493
|
+
*/
|
|
494
|
+
searchSource?: LookupSearchSource;
|
|
480
495
|
/**
|
|
481
496
|
* 值变化回调
|
|
482
497
|
*/
|
|
@@ -36,7 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_RecordBoardProvider = require("./context/RecordBoardProvider");
|
|
38
38
|
var import_recordBoardColumns = require("./utils/recordBoardColumns");
|
|
39
|
-
var defaultPagination = { pageNumber: 1, pageSize:
|
|
39
|
+
var defaultPagination = { pageNumber: 1, pageSize: 20 };
|
|
40
40
|
function readBodyViewFromStorage(key, fallback) {
|
|
41
41
|
if (typeof window === "undefined" || !key) return fallback;
|
|
42
42
|
try {
|
|
@@ -47,6 +47,32 @@ function readBodyViewFromStorage(key, fallback) {
|
|
|
47
47
|
}
|
|
48
48
|
return fallback;
|
|
49
49
|
}
|
|
50
|
+
function getAccumulationKey(record, rowKey, index) {
|
|
51
|
+
if (typeof rowKey === "function") {
|
|
52
|
+
return rowKey(record);
|
|
53
|
+
}
|
|
54
|
+
if (typeof rowKey === "string" && record != null && rowKey in record) {
|
|
55
|
+
return record[rowKey];
|
|
56
|
+
}
|
|
57
|
+
return (record == null ? void 0 : record.id) ?? (record == null ? void 0 : record.key) ?? record ?? index;
|
|
58
|
+
}
|
|
59
|
+
function mergeAccumulatedRows(previousRows, nextRows, rowKey) {
|
|
60
|
+
if (previousRows.length === 0) return nextRows;
|
|
61
|
+
if (nextRows.length === 0) return previousRows;
|
|
62
|
+
const merged = /* @__PURE__ */ new Map();
|
|
63
|
+
previousRows.forEach((row, index) => {
|
|
64
|
+
merged.set(getAccumulationKey(row, rowKey, index), row);
|
|
65
|
+
});
|
|
66
|
+
nextRows.forEach((row, index) => {
|
|
67
|
+
merged.set(getAccumulationKey(row, rowKey, previousRows.length + index), row);
|
|
68
|
+
});
|
|
69
|
+
return Array.from(merged.values());
|
|
70
|
+
}
|
|
71
|
+
function isSameRowArray(left, right) {
|
|
72
|
+
if (left === right) return true;
|
|
73
|
+
if (left.length !== right.length) return false;
|
|
74
|
+
return left.every((item, index) => item === right[index]);
|
|
75
|
+
}
|
|
50
76
|
function mergeChildComponentProps(props) {
|
|
51
77
|
const hasAny = props.grid != null || props.toolBar != null || props.search != null || props.paginationConfig != null || props.batchActionBar != null || props.cardList != null;
|
|
52
78
|
if (!hasAny) return void 0;
|
|
@@ -153,6 +179,7 @@ var PisellRecordBoard = (props) => {
|
|
|
153
179
|
const [internalSelectedRows, setInternalSelectedRows] = (0, import_react.useState)([]);
|
|
154
180
|
const [scrollAreaHeight, setScrollAreaHeight] = (0, import_react.useState)(null);
|
|
155
181
|
const [filterResetKey, setFilterResetKey] = (0, import_react.useState)(0);
|
|
182
|
+
const [accumulatedDataRows, setAccumulatedDataRows] = (0, import_react.useState)([]);
|
|
156
183
|
const [bodyView, setBodyViewState] = (0, import_react.useState)(() => {
|
|
157
184
|
if (effectiveLockedBodyView != null) {
|
|
158
185
|
return effectiveLockedBodyView;
|
|
@@ -188,6 +215,33 @@ var PisellRecordBoard = (props) => {
|
|
|
188
215
|
effectiveLockedBodyView,
|
|
189
216
|
bodyView
|
|
190
217
|
]);
|
|
218
|
+
const paginationForAccumulation = paginationProp !== void 0 ? paginationProp : defaultPagination;
|
|
219
|
+
const gridInfiniteScrollEnabled = ((_a = props.grid) == null ? void 0 : _a.infiniteScroll) !== false;
|
|
220
|
+
const dataRowsForInfiniteScroll = (0, import_react.useMemo)(() => {
|
|
221
|
+
if (dataProp === void 0 || !gridInfiniteScrollEnabled) {
|
|
222
|
+
return dataProp;
|
|
223
|
+
}
|
|
224
|
+
if (paginationForAccumulation.pageNumber <= 1) {
|
|
225
|
+
return dataProp;
|
|
226
|
+
}
|
|
227
|
+
return mergeAccumulatedRows(accumulatedDataRows, dataProp, rowKeyProp);
|
|
228
|
+
}, [
|
|
229
|
+
dataProp,
|
|
230
|
+
gridInfiniteScrollEnabled,
|
|
231
|
+
paginationForAccumulation.pageNumber,
|
|
232
|
+
accumulatedDataRows,
|
|
233
|
+
rowKeyProp
|
|
234
|
+
]);
|
|
235
|
+
(0, import_react.useEffect)(() => {
|
|
236
|
+
if (dataProp === void 0 || !gridInfiniteScrollEnabled) {
|
|
237
|
+
setAccumulatedDataRows([]);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
const nextRows = dataRowsForInfiniteScroll ?? [];
|
|
241
|
+
setAccumulatedDataRows(
|
|
242
|
+
(prev) => isSameRowArray(prev, nextRows) ? prev : nextRows
|
|
243
|
+
);
|
|
244
|
+
}, [dataProp, dataRowsForInfiniteScroll, gridInfiniteScrollEnabled]);
|
|
191
245
|
const [internalColumnVisibility, setInternalColumnVisibility] = (0, import_react.useState)(() => {
|
|
192
246
|
var _a2, _b;
|
|
193
247
|
const fromConfig = ((_a2 = props.grid) == null ? void 0 : _a2.defaultHiddenColumnKeys) ?? [];
|
|
@@ -249,7 +303,6 @@ var PisellRecordBoard = (props) => {
|
|
|
249
303
|
setInternalColumnOrder(columnKeys);
|
|
250
304
|
}, []);
|
|
251
305
|
const contextValue = (0, import_react.useMemo)(() => {
|
|
252
|
-
var _a2;
|
|
253
306
|
const defaultCtx = getDefaultRecordBoardContext(
|
|
254
307
|
layoutType,
|
|
255
308
|
{
|
|
@@ -260,11 +313,11 @@ var PisellRecordBoard = (props) => {
|
|
|
260
313
|
rowKeyProp
|
|
261
314
|
);
|
|
262
315
|
const pagination = paginationProp !== void 0 ? paginationProp : defaultCtx.pagination;
|
|
263
|
-
const gridInfiniteScroll =
|
|
316
|
+
const gridInfiniteScroll = gridInfiniteScrollEnabled;
|
|
264
317
|
let data;
|
|
265
318
|
let total;
|
|
266
319
|
if (dataProp !== void 0) {
|
|
267
|
-
data = dataProp;
|
|
320
|
+
data = dataRowsForInfiniteScroll ?? dataProp;
|
|
268
321
|
total = totalProp !== void 0 ? totalProp : defaultCtx.total;
|
|
269
322
|
} else if (dataSourcesProp != null && gridDataSourceKeyProp != null && gridDataSourceKeyProp !== "") {
|
|
270
323
|
const raw = dataSourcesProp[gridDataSourceKeyProp] ?? [];
|
|
@@ -374,7 +427,8 @@ var PisellRecordBoard = (props) => {
|
|
|
374
427
|
bodyView,
|
|
375
428
|
setBodyView,
|
|
376
429
|
props.paginationRender,
|
|
377
|
-
|
|
430
|
+
gridInfiniteScrollEnabled,
|
|
431
|
+
dataRowsForInfiniteScroll
|
|
378
432
|
]);
|
|
379
433
|
const content = /* @__PURE__ */ import_react.default.createElement(import_RecordBoardProvider.RecordBoardProvider, { value: contextValue }, children);
|
|
380
434
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -38,7 +38,7 @@ var import_index = require("./index.less");
|
|
|
38
38
|
var import_useRecordBoardContext = require("../../hooks/useRecordBoardContext");
|
|
39
39
|
var defaultPagination = {
|
|
40
40
|
pageNumber: 1,
|
|
41
|
-
pageSize:
|
|
41
|
+
pageSize: 20
|
|
42
42
|
};
|
|
43
43
|
var RecordBoardPagination = (props) => {
|
|
44
44
|
var _a;
|