@kmkf-fe-packages/basic-components 0.1.3-alpha.3 → 0.2.0

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.
Files changed (45) hide show
  1. package/dist/apaas/ApaasAddress/index.d.ts +13 -0
  2. package/dist/apaas/ApaasCascader/index.d.ts +2 -0
  3. package/dist/apaas/ApaasCheckbox/index.d.ts +21 -0
  4. package/dist/apaas/ApaasDate/index.d.ts +8 -0
  5. package/dist/apaas/ApaasInput/index.d.ts +7 -0
  6. package/dist/apaas/ApaasInputNumber/index.d.ts +3 -0
  7. package/dist/apaas/ApaasMultipleSelect/index.d.ts +3 -0
  8. package/dist/apaas/ApaasRadio/index.d.ts +21 -0
  9. package/dist/apaas/ApaasRate/index.d.ts +17 -0
  10. package/dist/apaas/ApaasSelect/index.d.ts +12 -0
  11. package/dist/apaas/ApaasSlider/index.d.ts +9 -0
  12. package/dist/apaas/ApaasTextArea/index.d.ts +7 -0
  13. package/dist/apaas/ApaasUpload/index.d.ts +13 -0
  14. package/dist/apaas/ApaasUploadAsync/index.d.ts +16 -0
  15. package/dist/apaas/hoc/withFormItem.d.ts +12 -0
  16. package/dist/basics/FormItem/index.d.ts +2 -0
  17. package/dist/business/Address/index.d.ts +13 -0
  18. package/dist/business/AliPay/index.d.ts +13 -0
  19. package/dist/business/BuyerNick/index.d.ts +14 -0
  20. package/dist/business/ChooseBaby/index.d.ts +3 -0
  21. package/dist/business/ExpressLogistics/index.d.ts +3 -0
  22. package/dist/business/Invoice/index.d.ts +14 -0
  23. package/dist/business/Payment/index.d.ts +14 -0
  24. package/dist/business/Remark/index.d.ts +12 -0
  25. package/dist/business/ShopName/index.d.ts +8 -0
  26. package/dist/business/Status/index.d.ts +16 -0
  27. package/dist/business/Supplier/index.d.ts +3 -0
  28. package/dist/business/TBGoodId/index.d.ts +3 -0
  29. package/dist/business/TBGoodSerial/index.d.ts +3 -0
  30. package/dist/business/TradeId/index.d.ts +10 -0
  31. package/dist/common/ExpressCompany/index.d.ts +7 -0
  32. package/dist/common/Goods/goodModel.d.ts +15 -0
  33. package/dist/common/Goods/index.d.ts +37 -0
  34. package/dist/common/GoodsTable/goodModel.d.ts +13 -0
  35. package/dist/common/GoodsTable/index.d.ts +14 -0
  36. package/dist/common/Logistics/index.d.ts +3 -0
  37. package/dist/common/Sku/index.d.ts +14 -0
  38. package/dist/common/request.d.ts +2 -0
  39. package/dist/config/utils.d.ts +3 -0
  40. package/dist/index.d.ts +34 -0
  41. package/dist/index.esm.js +3784 -0
  42. package/dist/index.js +3827 -0
  43. package/dist/jst/Goods/index.d.ts +10 -0
  44. package/dist/jst/ItemList/index.d.ts +19 -0
  45. package/package.json +2 -2
@@ -0,0 +1,13 @@
1
+ interface Option {
2
+ value: string | number;
3
+ label: string;
4
+ children?: Option[];
5
+ }
6
+ interface ProvinceType {
7
+ value: string[];
8
+ options: Option[];
9
+ disabled: boolean;
10
+ onChange: (value: any, selectedOptions: any) => void;
11
+ }
12
+ declare const Province: (props: Partial<ProvinceType>) => JSX.Element;
13
+ export default Province;
@@ -0,0 +1,2 @@
1
+ declare function ApaasCascader(props: any): JSX.Element;
2
+ export default ApaasCascader;
@@ -0,0 +1,21 @@
1
+ import { CheckboxGroupProps, CheckboxValueType } from 'antd/es/checkbox/Group';
2
+ type OptionsType = {
3
+ label: string;
4
+ value: string;
5
+ [propName: string]: any;
6
+ };
7
+ interface CheckboxValue {
8
+ value?: Array<CheckboxValueType>;
9
+ other?: string;
10
+ }
11
+ export interface ApaasCheckboxProps extends Omit<CheckboxGroupProps, 'onChange' | 'value'> {
12
+ showOther?: boolean;
13
+ horizontal?: boolean;
14
+ options?: OptionsType[];
15
+ disabled?: boolean;
16
+ onChange?: (value: CheckboxValue) => void;
17
+ value?: CheckboxValue;
18
+ [key: string]: any;
19
+ }
20
+ declare function ApaasCheckbox(props: ApaasCheckboxProps): JSX.Element;
21
+ export default ApaasCheckbox;
@@ -0,0 +1,8 @@
1
+ declare const DateType: ["DATE", "DATE_TIME", "DATE_RANGE", "DATE_TIME_RANGE"];
2
+ export declare type ButtonType = typeof DateType[number];
3
+ export interface ApaasDate {
4
+ dateType?: ButtonType;
5
+ [propName: string]: any;
6
+ }
7
+ declare const ApaasDate: (props: ApaasDate) => JSX.Element;
8
+ export default ApaasDate;
@@ -0,0 +1,7 @@
1
+ import { InputProps } from 'antd';
2
+ export interface ApaasInputProps extends InputProps {
3
+ isNumber?: boolean;
4
+ replaceWarn?: boolean;
5
+ }
6
+ declare function ApaasInput(props: ApaasInputProps): JSX.Element;
7
+ export default ApaasInput;
@@ -0,0 +1,3 @@
1
+ import { InputNumberProps } from 'antd';
2
+ declare function ApaasInputNumber(props: InputNumberProps): JSX.Element;
3
+ export default ApaasInputNumber;
@@ -0,0 +1,3 @@
1
+ import { ApaasSelectProps } from '../ApaasSelect/index';
2
+ declare function ApaasMultipleSelect(props: ApaasSelectProps): JSX.Element;
3
+ export default ApaasMultipleSelect;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { RadioGroupProps } from 'antd';
3
+ type OptionsType = {
4
+ label: string;
5
+ value: string;
6
+ [propName: string]: any;
7
+ };
8
+ interface RadioValue {
9
+ value?: string;
10
+ other?: string;
11
+ }
12
+ export interface ApaasRadioProps extends Omit<RadioGroupProps, "onChange" | "value"> {
13
+ showOther?: boolean;
14
+ horizontal?: boolean;
15
+ options?: OptionsType[];
16
+ disabled?: boolean;
17
+ onChange?: (value: RadioValue) => void;
18
+ value?: RadioValue;
19
+ }
20
+ declare function ApaasRadio(props: ApaasRadioProps): React.ReactElement;
21
+ export default ApaasRadio;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface optionsType {
3
+ name?: string;
4
+ id: string;
5
+ value?: number;
6
+ }
7
+ export interface SliderType {
8
+ value: optionsType[];
9
+ options: optionsType[];
10
+ onChange: (value: optionsType[]) => void;
11
+ disabled: boolean;
12
+ allowHalf?: boolean;
13
+ style?: any;
14
+ textStyle?: any;
15
+ }
16
+ declare function ApaasRate(props: Partial<SliderType>): React.ReactElement;
17
+ export default ApaasRate;
@@ -0,0 +1,12 @@
1
+ import { SelectProps } from 'antd';
2
+ type OptionsType = {
3
+ label: string;
4
+ value: string;
5
+ [propName: string]: any;
6
+ };
7
+ export interface ApaasSelectProps extends SelectProps<string[]> {
8
+ options?: OptionsType[];
9
+ [propName: string]: any;
10
+ }
11
+ declare function ApaasSelect(props: ApaasSelectProps): JSX.Element;
12
+ export default ApaasSelect;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export interface SliderType {
3
+ value: number;
4
+ onChange: (value: number | null) => void;
5
+ range: number;
6
+ disabled: boolean;
7
+ }
8
+ declare function ApaasSlider(props: Partial<SliderType>): React.ReactElement;
9
+ export default ApaasSlider;
@@ -0,0 +1,7 @@
1
+ import { TextAreaProps } from 'antd/es/input';
2
+ export interface ITextAreaProps {
3
+ minRows?: number;
4
+ maxRows?: number;
5
+ }
6
+ declare function ApaasTextArea(props: TextAreaProps & ITextAreaProps): JSX.Element;
7
+ export default ApaasTextArea;
@@ -0,0 +1,13 @@
1
+ import { UploadProps } from 'antd';
2
+ declare type UploadValue = string[];
3
+ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'> {
4
+ maxCount?: number;
5
+ maxSize?: number;
6
+ uploadText?: string;
7
+ canPreview?: boolean;
8
+ disabled?: boolean;
9
+ onChange?: (value: UploadValue) => void;
10
+ value?: UploadValue;
11
+ }
12
+ declare const ApaasUpload: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, ...resetProps }: ApaasUploadProps) => JSX.Element;
13
+ export default ApaasUpload;
@@ -0,0 +1,16 @@
1
+ import { UploadProps } from 'antd';
2
+ declare type UploadValue = string[];
3
+ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'> {
4
+ maxCount?: number;
5
+ maxSize?: number;
6
+ uploadText?: string;
7
+ canPreview?: boolean;
8
+ disabled?: boolean;
9
+ onChange?: (value: UploadValue) => void;
10
+ value?: UploadValue;
11
+ uniqueKey?: string;
12
+ hostUrl?: string;
13
+ actionUrl?: string;
14
+ }
15
+ declare const ApaasUploadAsync: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, uniqueKey, hostUrl, actionUrl, ...resetProps }: ApaasUploadProps) => JSX.Element;
16
+ export default ApaasUploadAsync;
@@ -0,0 +1,12 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Rule } from 'antd/es/form';
3
+ export interface WithFormItemProps {
4
+ label?: string;
5
+ name?: string;
6
+ extra?: ReactNode;
7
+ required?: boolean;
8
+ rules?: Rule[];
9
+ initialValue?: string;
10
+ [prop: string]: any;
11
+ }
12
+ export default function withFormItem(WrappedComponent: React.ComponentType<WithFormItemProps>): (props: WithFormItemProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const FormItem: (props: any) => JSX.Element;
2
+ export default FormItem;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface valueType {
3
+ address?: string[];
4
+ detail?: string;
5
+ }
6
+ export interface AddressType {
7
+ value: valueType;
8
+ disabled: boolean;
9
+ onChange: (value: valueType) => void;
10
+ [key: string]: any;
11
+ }
12
+ declare function ApaasAddress(props: Partial<AddressType>): React.ReactElement;
13
+ export default ApaasAddress;
@@ -0,0 +1,13 @@
1
+ interface AliPayValueType {
2
+ name?: string;
3
+ user?: string;
4
+ }
5
+ interface AliPayProps {
6
+ value: AliPayValueType;
7
+ isSingle: boolean;
8
+ disabled?: boolean;
9
+ onChange: (value: AliPayValueType) => void;
10
+ onBlur?: (value: string, type: string) => void;
11
+ }
12
+ declare const AliPay: (props: Partial<AliPayProps>) => JSX.Element;
13
+ export default AliPay;
@@ -0,0 +1,14 @@
1
+ interface BuyerNickValueType {
2
+ buyerNick?: string;
3
+ buyerOpenUid?: string;
4
+ }
5
+ interface BuyerNickProps {
6
+ value: BuyerNickValueType;
7
+ shopId: string;
8
+ shopList: any[];
9
+ disabled: boolean;
10
+ onChange: (value: BuyerNickValueType) => void;
11
+ onBlur: (value: string, type: string) => void;
12
+ }
13
+ declare const BuyerNick: (props: Partial<BuyerNickProps>) => JSX.Element;
14
+ export default BuyerNick;
@@ -0,0 +1,3 @@
1
+ import { GoodsProps } from '../../common/Goods';
2
+ declare const ChooseBaby: (props: Partial<GoodsProps>) => JSX.Element;
3
+ export default ChooseBaby;
@@ -0,0 +1,3 @@
1
+ import { LogisticsType } from '../../common/Logistics/index.d';
2
+ declare const ExpressLogistics: (props: Partial<LogisticsType>) => JSX.Element;
3
+ export default ExpressLogistics;
@@ -0,0 +1,14 @@
1
+ import './index.less';
2
+ export interface InvoiceValueType {
3
+ ordinaryTaitou: string;
4
+ ordinarySerial: string;
5
+ ordinaryMoney: string;
6
+ }
7
+ export interface InvoiceProps {
8
+ value: InvoiceValueType;
9
+ required: boolean;
10
+ disabled?: boolean;
11
+ onChange: (value: InvoiceValueType) => void;
12
+ }
13
+ declare const Invoice: (props: Partial<InvoiceProps>) => JSX.Element;
14
+ export default Invoice;
@@ -0,0 +1,14 @@
1
+ export interface PaymentProps {
2
+ value: any;
3
+ zhiFubaoRequired: boolean;
4
+ required: boolean;
5
+ shopId: string;
6
+ shopList: any[];
7
+ disabled: boolean;
8
+ id: string;
9
+ onChange: (value: any) => void;
10
+ onSearch: (value: any) => void;
11
+ onBlur: (value: any, type: string) => void;
12
+ }
13
+ declare const Payment: (props: Partial<PaymentProps>) => JSX.Element;
14
+ export default Payment;
@@ -0,0 +1,12 @@
1
+ interface ValueType {
2
+ remark?: string;
3
+ flag?: number;
4
+ }
5
+ interface RemarkType {
6
+ isShowFlag: boolean;
7
+ disabled?: boolean;
8
+ value: ValueType;
9
+ onChange: (value: ValueType) => void;
10
+ }
11
+ declare const RemarkInput: (props: Partial<RemarkType>) => JSX.Element;
12
+ export default RemarkInput;
@@ -0,0 +1,8 @@
1
+ interface ShopNameType {
2
+ value: number;
3
+ onChange: (value: number) => void;
4
+ disabled: boolean;
5
+ style: any;
6
+ }
7
+ declare const ShopNameSelect: (props: Partial<ShopNameType>) => JSX.Element;
8
+ export default ShopNameSelect;
@@ -0,0 +1,16 @@
1
+ export interface StatusProps {
2
+ shopId: string;
3
+ customStatusText: string;
4
+ customerService: any[];
5
+ isEditing: boolean;
6
+ isSelectStyle: boolean;
7
+ isUseCustomStatus: boolean;
8
+ status?: string;
9
+ originCustomer?: string[];
10
+ value: any;
11
+ disabled?: boolean;
12
+ required: boolean;
13
+ onChange: (value: any) => void;
14
+ }
15
+ declare const Status: (props: StatusProps) => JSX.Element;
16
+ export default Status;
@@ -0,0 +1,3 @@
1
+ import { GoodsProps } from '../../common/Goods';
2
+ declare const Supplier: (props: Partial<GoodsProps>) => JSX.Element;
3
+ export default Supplier;
@@ -0,0 +1,3 @@
1
+ import { GoodsProps } from '../../common/Goods';
2
+ declare const TBGoodId: (props: Partial<GoodsProps>) => JSX.Element;
3
+ export default TBGoodId;
@@ -0,0 +1,3 @@
1
+ import { GoodsProps } from '../../common/Goods';
2
+ declare const TBGoodSerial: (props: Partial<GoodsProps>) => JSX.Element;
3
+ export default TBGoodSerial;
@@ -0,0 +1,10 @@
1
+ import { InputProps } from 'antd';
2
+ interface TradeIdProps extends InputProps {
3
+ value: string;
4
+ shopId?: string;
5
+ shopList?: any[];
6
+ disabled?: boolean;
7
+ onSearch: (value: any) => void;
8
+ }
9
+ declare function TradeId(props: Partial<TradeIdProps>): JSX.Element;
10
+ export default TradeId;
@@ -0,0 +1,7 @@
1
+ type ExpressCompanyProps = {
2
+ options: any[];
3
+ value: string;
4
+ onChange: (v: string) => void;
5
+ };
6
+ declare const ExpressCompany: (props: ExpressCompanyProps) => JSX.Element;
7
+ export default ExpressCompany;
@@ -0,0 +1,15 @@
1
+ import './index.less';
2
+ interface GoodModelProps {
3
+ visible: boolean;
4
+ type: number;
5
+ shopId: number | string;
6
+ imgList: any[];
7
+ maxLength: number;
8
+ shopList: any[];
9
+ changeSku?: boolean;
10
+ width?: string | number;
11
+ onSubmit: (...args: any[]) => any;
12
+ onCancel: (...args: any[]) => any;
13
+ }
14
+ declare const GoodsModal: (props: GoodModelProps) => JSX.Element;
15
+ export default GoodsModal;
@@ -0,0 +1,37 @@
1
+ import './index.less';
2
+ export interface GoodsProps {
3
+ value: GoodsValues;
4
+ type: number;
5
+ enableItemId?: boolean;
6
+ enableSupplierName?: boolean;
7
+ userNick?: string;
8
+ maxLength: number;
9
+ onChange: (value: any) => void;
10
+ shopList: any[];
11
+ shopId?: string;
12
+ disabled?: boolean;
13
+ changeSku?: boolean;
14
+ width?: string | number;
15
+ }
16
+ interface GoodsValues {
17
+ shopId: string;
18
+ imgList: any[];
19
+ }
20
+ export interface GoodsItem {
21
+ numIid: number;
22
+ picUrl: string;
23
+ platform: string;
24
+ title: string;
25
+ price: string;
26
+ outerId?: number;
27
+ [key: string]: any;
28
+ }
29
+ export interface IEditState {
30
+ outerId: string | null;
31
+ numIid: number | null;
32
+ supplierItemOuterId?: string | null;
33
+ itemId?: string | null;
34
+ supplierName: string | null;
35
+ }
36
+ declare const Goods: (props: Partial<GoodsProps>) => JSX.Element;
37
+ export default Goods;
@@ -0,0 +1,13 @@
1
+ import './index.less';
2
+ interface GoodModelProps {
3
+ visible: boolean;
4
+ type: number;
5
+ shopId: number | string;
6
+ imgList: any[];
7
+ maxLength: number;
8
+ shopList: any[];
9
+ onSubmit: (...args: any[]) => any;
10
+ onCancel: (...args: any[]) => any;
11
+ }
12
+ declare const GoodsModal: (props: GoodModelProps) => JSX.Element;
13
+ export default GoodsModal;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface GoodsProps {
4
+ value: any;
5
+ type: number;
6
+ enableItemId?: boolean;
7
+ enableSupplierName?: boolean;
8
+ userNick?: string;
9
+ maxLength: number;
10
+ onChange: (value: any) => void;
11
+ shopList: any[];
12
+ }
13
+ declare const _default: React.ForwardRefExoticComponent<GoodsProps & React.RefAttributes<unknown>>;
14
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { LogisticsType } from './index.d';
2
+ declare const Logistics: (props: Partial<LogisticsType>) => JSX.Element;
3
+ export default Logistics;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ declare type SkuProps = {
3
+ handleOk: (sku: {
4
+ enableItemId: string;
5
+ enableSupplierName: string;
6
+ propertiesName: string;
7
+ picUrl?: string;
8
+ outerSkuId?: string;
9
+ }) => void;
10
+ userNick: string | undefined;
11
+ type?: number;
12
+ };
13
+ declare const Sku: React.ForwardRefExoticComponent<SkuProps & React.RefAttributes<unknown>>;
14
+ export default Sku;
@@ -0,0 +1,2 @@
1
+ declare const extendRequest: import("umi-request").RequestMethod<false>;
2
+ export default extendRequest;
@@ -0,0 +1,3 @@
1
+ export declare const toTree: (list: any[] | undefined, parId: number) => any[];
2
+ export declare const keepDecimals: (value: string) => string;
3
+ export declare function dataURLtoFile(dataurl: string, filename: string): File;
@@ -0,0 +1,34 @@
1
+ export { default as ApaasCascader } from './apaas/ApaasCascader';
2
+ export { default as ApaasDate } from './apaas/ApaasDate';
3
+ export { default as ApaasInput } from './apaas/ApaasInput';
4
+ export { default as ApaasInputNumber } from './apaas/ApaasInputNumber';
5
+ export { default as ApaasSelect } from './apaas/ApaasSelect';
6
+ export { default as ApaasMultipleSelect } from './apaas/ApaasMultipleSelect';
7
+ export { default as ApaasTextArea } from './apaas/ApaasTextArea';
8
+ export { default as ApaasUpload } from './apaas/ApaasUpload';
9
+ export { default as ApaasRadio } from './apaas/ApaasRadio';
10
+ export { default as ApaasUploadAsync } from './apaas/ApaasUploadAsync';
11
+ export { default as ApaasCheckbox } from './apaas/ApaasCheckbox';
12
+ export { default as ApaasSlider } from './apaas/ApaasSlider';
13
+ export { default as ApaasRate } from './apaas/ApaasRate';
14
+ export { default as ApaasAddress } from './apaas/ApaasAddress';
15
+ export { default as ApaasHoc } from './apaas/hoc/withFormItem';
16
+ export { default as BuyerNick } from './business/BuyerNick';
17
+ export { default as TradeId } from './business/TradeId';
18
+ export { default as ShopName } from './business/ShopName';
19
+ export { default as Address } from './business/Address';
20
+ export { default as Remark } from './business/Remark';
21
+ export { default as ExpressLogistics } from './business/ExpressLogistics';
22
+ export { default as ReturnLogistics } from './business/ExpressLogistics';
23
+ export { default as AliPay } from './business/AliPay';
24
+ export { default as TBGoodId } from './business/TBGoodId';
25
+ export { default as ChooseBaby } from './business/ChooseBaby';
26
+ export { default as TBGoodSerial } from './business/TBGoodSerial';
27
+ export { default as Supplier } from './business/Supplier';
28
+ export { default as Invoice } from './business/Invoice';
29
+ export { default as Status } from './business/Status';
30
+ export { default as Payment } from './business/Payment';
31
+ export { default as Goods } from './common/Goods';
32
+ export { default as JstGoods } from './jst/Goods';
33
+ export { default as JstItemList } from './jst/ItemList';
34
+ export { default as GoodsTable } from './common/GoodsTable';