@kmkf-fe-packages/basic-components 2.10.9-beta.53 → 2.10.9-beta.55

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.
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { type SearchFormProps } from './index';
3
+ import { type GoodsSearchFormType } from './registry';
4
+ import type { SearchFormOptionLoader } from './loaders';
5
+ import type { SearchFormData } from './index';
6
+ export type GoodsSearchFormProps = Omit<SearchFormProps, 'searchFormData'> & {
7
+ type: GoodsSearchFormType;
8
+ searchFormData?: SearchFormData;
9
+ loadOptions?: SearchFormOptionLoader[];
10
+ };
11
+ declare const GoodsSearchForm: ({ type, searchFormData: customSearchFormData, loadOptions, ...searchFormProps }: GoodsSearchFormProps) => React.JSX.Element;
12
+ export default GoodsSearchForm;
@@ -0,0 +1,19 @@
1
+ import type { SearchFormData } from './index';
2
+ export type SearchFormSelectOption = {
3
+ label: string;
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ };
7
+ export type SearchFormOptionMap = Record<string, SearchFormSelectOption[]>;
8
+ /**
9
+ * Builds the search fields used by the WDT goods selector.
10
+ * Brand options are supplied by the caller because they are loaded at runtime.
11
+ */
12
+ export declare const createWdtSearchFormData: (brandOptions?: SearchFormSelectOption[]) => SearchFormData;
13
+ export declare const createBsE3SearchFormData: () => SearchFormData;
14
+ export declare const createGySearchFormData: () => SearchFormData;
15
+ export declare const createJstSearchFormData: () => SearchFormData;
16
+ export declare const createKmSearchFormData: () => SearchFormData;
17
+ export declare const createJySearchFormData: () => SearchFormData;
18
+ export declare const createWlnSearchFormData: () => SearchFormData;
19
+ export declare const createJkySearchFormData: () => SearchFormData;
@@ -1,12 +1,13 @@
1
1
  import React from 'react';
2
2
  import type { FormInstance } from 'antd';
3
3
  import './index.less';
4
- type Props = {
4
+ export type SearchFormProps = {
5
5
  searchFormData: SearchFormData;
6
6
  form: FormInstance;
7
- showColumnsDataIndexList: string[];
7
+ showColumnsDataIndexList?: string[];
8
8
  submit: () => void;
9
9
  reset: () => void;
10
+ optionalInputDefaultCompareSymbol?: 'like' | 'eq';
10
11
  };
11
12
  export type SearchFormItem = {
12
13
  label: string;
@@ -16,5 +17,5 @@ export type SearchFormItem = {
16
17
  formItemProps?: Record<string, any>;
17
18
  };
18
19
  export type SearchFormData = SearchFormItem[];
19
- declare function SearchForm({ searchFormData, form, showColumnsDataIndexList, submit, reset, }: Props): React.JSX.Element;
20
+ declare function SearchForm({ searchFormData, form, showColumnsDataIndexList, submit, reset, optionalInputDefaultCompareSymbol, }: SearchFormProps): React.JSX.Element;
20
21
  export default SearchForm;
@@ -0,0 +1,3 @@
1
+ import type { SearchFormOptionMap } from './configs';
2
+ export type SearchFormOptionLoader = () => Promise<SearchFormOptionMap>;
3
+ export declare const loadWdtBrandOptions: SearchFormOptionLoader;
@@ -0,0 +1,9 @@
1
+ import { type SearchFormOptionMap } from './configs';
2
+ import type { SearchFormData } from './index';
3
+ import { type SearchFormOptionLoader } from './loaders';
4
+ export type GoodsSearchFormType = 'wdt' | 'bse3' | 'gy' | 'jst' | 'km' | 'jy' | 'wln' | 'jky';
5
+ export type GoodsSearchFormConfig = {
6
+ createSearchFormData: (options: SearchFormOptionMap) => SearchFormData;
7
+ loadOptions: SearchFormOptionLoader[];
8
+ };
9
+ export declare const GOODS_SEARCH_FORM_CONFIG: Record<GoodsSearchFormType, GoodsSearchFormConfig>;
@@ -66,6 +66,19 @@ export { default as IdentifyAddress } from './common/IdentifyAddress';
66
66
  export { default as CalculationInput } from './apaas/CalculationInput';
67
67
  export { default as WdtGoodList } from './bs/component/model/WdtGoodList';
68
68
  export { default as BsE3Reissue } from './e3/Reissue';
69
+ export { default as SearchForm } from './bs/component/model/components/SearchForm';
70
+ export { default as GoodsSearchForm } from './bs/component/model/components/SearchForm/GoodsSearchForm';
71
+ export { default as GoodsReSync, useGoodsReSyncQuery, } from './bs/component/model/components/GoodsReSync';
72
+ export type { ReSyncQueryState } from './bs/component/model/components/GoodsReSync';
73
+ export type { SearchFormData, SearchFormItem, SearchFormProps, } from './bs/component/model/components/SearchForm';
74
+ export { createBsE3SearchFormData, createGySearchFormData, createJstSearchFormData, createJkySearchFormData, createJySearchFormData, createKmSearchFormData, createWdtSearchFormData, createWlnSearchFormData, } from './bs/component/model/components/SearchForm/configs';
75
+ export type { SearchFormOptionMap, SearchFormSelectOption, } from './bs/component/model/components/SearchForm/configs';
76
+ export { loadWdtBrandOptions } from './bs/component/model/components/SearchForm/loaders';
77
+ export type { SearchFormOptionLoader, } from './bs/component/model/components/SearchForm/loaders';
78
+ export { GOODS_SEARCH_FORM_CONFIG, } from './bs/component/model/components/SearchForm/registry';
79
+ export type { GoodsSearchFormConfig, GoodsSearchFormType, } from './bs/component/model/components/SearchForm/registry';
80
+ export type { GoodsSearchFormProps } from './bs/component/model/components/SearchForm/GoodsSearchForm';
81
+ export { transformFormData, shouldSubmitOnBlur, } from './bs/component/model/components/SearchForm/utils';
69
82
  export type { WdtGoods } from './bs/component/model/WdtGoodList';
70
83
  export { default as GyReissue } from './gy/Reissue';
71
84
  export * from './constants/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.9-beta.53",
3
+ "version": "2.10.9-beta.55",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "2b33e941ade36298495ea83b762c57cbd52e3c12"
69
+ "gitHead": "1fa8a28cf3a2df8d8975933570e61a066fdf01eb"
70
70
  }