iglooform 3.3.1 → 3.3.2

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 (128) hide show
  1. package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +1 -1
  2. package/es/admin-upload/index.d.ts +37 -0
  3. package/es/app/context.d.ts +9 -0
  4. package/es/app/index.d.ts +8 -0
  5. package/es/card-detail/card-page.d.ts +12 -0
  6. package/es/card-detail/card.d.ts +10 -0
  7. package/es/confirmation/index.d.ts +16 -0
  8. package/es/date-picker/buddhist.d.ts +6 -0
  9. package/es/date-picker/index.d.ts +13 -0
  10. package/es/documents/index.d.ts +15 -0
  11. package/es/filter/index.d.ts +52 -0
  12. package/es/form/addable-section/index.d.ts +20 -0
  13. package/es/form/element/index.d.ts +12 -0
  14. package/es/form/elements.d.ts +8 -0
  15. package/es/form/hsteps/index.d.ts +21 -0
  16. package/es/form/index.d.ts +4 -0
  17. package/es/form/section/index.d.ts +16 -0
  18. package/es/form/step-items-selection/components/checkbox-group-items/index.d.ts +12 -0
  19. package/es/form/step-items-selection/components/checkbox-group-items/style/index.d.ts +1 -0
  20. package/es/form/step-items-selection/components/index.d.ts +2 -0
  21. package/es/form/step-items-selection/components/item-info/index.d.ts +11 -0
  22. package/es/form/step-items-selection/components/item-info/style/index.d.ts +1 -0
  23. package/es/form/step-items-selection/components/section-of-item-condition/hooks/index.d.ts +1 -0
  24. package/es/form/step-items-selection/components/section-of-item-condition/index.d.ts +17 -0
  25. package/es/form/step-items-selection/components/section-of-item-condition/style/index.d.ts +1 -0
  26. package/es/form/step-items-selection/config.d.ts +5 -0
  27. package/es/form/step-items-selection/index.d.ts +6 -0
  28. package/es/form/step-items-selection/types.d.ts +27 -0
  29. package/es/form/steps/index.d.ts +10 -0
  30. package/es/form-context.d.ts +28 -0
  31. package/es/free-form/addable-section/index.d.ts +19 -0
  32. package/es/free-form/element/index.d.ts +11 -0
  33. package/es/free-form/index.d.ts +11 -0
  34. package/es/free-form/section/index.d.ts +13 -0
  35. package/es/free-form/step/index.d.ts +21 -0
  36. package/es/free-form/steps/index.d.ts +12 -0
  37. package/es/hooks/ocr/index.d.ts +3 -0
  38. package/es/hooks/ocr/micro-blink.d.ts +10 -0
  39. package/es/index.d.ts +49 -0
  40. package/es/input/amount.d.ts +14 -0
  41. package/es/input/expiry-date.d.ts +16 -0
  42. package/es/input/input-date.d.ts +8 -0
  43. package/es/input/input-number/basic.d.ts +6 -0
  44. package/es/input/input-number/index.d.ts +8 -0
  45. package/es/input/input-number/stepper/index.d.ts +7 -0
  46. package/es/input/phone-number.d.ts +14 -0
  47. package/es/layout/defaultFooter.d.ts +4 -0
  48. package/es/media/index.d.ts +29 -0
  49. package/es/media/preview.d.ts +12 -0
  50. package/es/message/index.d.ts +14 -0
  51. package/es/message/useMessage.d.ts +6 -0
  52. package/es/modal/index.d.ts +33 -0
  53. package/es/modal/useModal.d.ts +12 -0
  54. package/es/ocr/index.d.ts +15 -0
  55. package/es/ocr/micro-blink/index.d.ts +8 -0
  56. package/es/radio/index.d.ts +24 -0
  57. package/es/radio/radio-group-with-other.d.ts +7 -0
  58. package/es/types.d.ts +188 -0
  59. package/es/upload/index.d.ts +16 -0
  60. package/es/upload-photo/index.d.ts +28 -0
  61. package/es/upload-preview/index.d.ts +9 -0
  62. package/es/upload-preview/media.d.ts +7 -0
  63. package/es/utils/form-utils.d.ts +79 -0
  64. package/es/utils/option-utils.d.ts +29 -0
  65. package/lib/admin-upload/index.d.ts +37 -0
  66. package/lib/app/context.d.ts +9 -0
  67. package/lib/app/index.d.ts +8 -0
  68. package/lib/card-detail/card-page.d.ts +12 -0
  69. package/lib/card-detail/card.d.ts +10 -0
  70. package/lib/confirmation/index.d.ts +16 -0
  71. package/lib/date-picker/buddhist.d.ts +6 -0
  72. package/lib/date-picker/index.d.ts +13 -0
  73. package/lib/documents/index.d.ts +15 -0
  74. package/lib/filter/index.d.ts +52 -0
  75. package/lib/form/addable-section/index.d.ts +20 -0
  76. package/lib/form/element/index.d.ts +12 -0
  77. package/lib/form/elements.d.ts +8 -0
  78. package/lib/form/hsteps/index.d.ts +21 -0
  79. package/lib/form/index.d.ts +4 -0
  80. package/lib/form/section/index.d.ts +16 -0
  81. package/lib/form/step-items-selection/components/checkbox-group-items/index.d.ts +12 -0
  82. package/lib/form/step-items-selection/components/checkbox-group-items/style/index.d.ts +1 -0
  83. package/lib/form/step-items-selection/components/index.d.ts +2 -0
  84. package/lib/form/step-items-selection/components/item-info/index.d.ts +11 -0
  85. package/lib/form/step-items-selection/components/item-info/style/index.d.ts +1 -0
  86. package/lib/form/step-items-selection/components/section-of-item-condition/hooks/index.d.ts +1 -0
  87. package/lib/form/step-items-selection/components/section-of-item-condition/index.d.ts +17 -0
  88. package/lib/form/step-items-selection/components/section-of-item-condition/style/index.d.ts +1 -0
  89. package/lib/form/step-items-selection/config.d.ts +5 -0
  90. package/lib/form/step-items-selection/index.d.ts +6 -0
  91. package/lib/form/step-items-selection/types.d.ts +27 -0
  92. package/lib/form/steps/index.d.ts +10 -0
  93. package/lib/form-context.d.ts +28 -0
  94. package/lib/free-form/addable-section/index.d.ts +19 -0
  95. package/lib/free-form/element/index.d.ts +11 -0
  96. package/lib/free-form/index.d.ts +11 -0
  97. package/lib/free-form/section/index.d.ts +13 -0
  98. package/lib/free-form/step/index.d.ts +21 -0
  99. package/lib/free-form/steps/index.d.ts +12 -0
  100. package/lib/hooks/ocr/index.d.ts +3 -0
  101. package/lib/hooks/ocr/micro-blink.d.ts +10 -0
  102. package/lib/index.d.ts +49 -0
  103. package/lib/input/amount.d.ts +14 -0
  104. package/lib/input/expiry-date.d.ts +16 -0
  105. package/lib/input/input-date.d.ts +8 -0
  106. package/lib/input/input-number/basic.d.ts +6 -0
  107. package/lib/input/input-number/index.d.ts +8 -0
  108. package/lib/input/input-number/stepper/index.d.ts +7 -0
  109. package/lib/input/phone-number.d.ts +14 -0
  110. package/lib/layout/defaultFooter.d.ts +4 -0
  111. package/lib/media/index.d.ts +29 -0
  112. package/lib/media/preview.d.ts +12 -0
  113. package/lib/message/index.d.ts +14 -0
  114. package/lib/message/useMessage.d.ts +6 -0
  115. package/lib/modal/index.d.ts +33 -0
  116. package/lib/modal/useModal.d.ts +12 -0
  117. package/lib/ocr/index.d.ts +15 -0
  118. package/lib/ocr/micro-blink/index.d.ts +8 -0
  119. package/lib/radio/index.d.ts +24 -0
  120. package/lib/radio/radio-group-with-other.d.ts +7 -0
  121. package/lib/types.d.ts +188 -0
  122. package/lib/upload/index.d.ts +16 -0
  123. package/lib/upload-photo/index.d.ts +28 -0
  124. package/lib/upload-preview/index.d.ts +9 -0
  125. package/lib/upload-preview/media.d.ts +7 -0
  126. package/lib/utils/form-utils.d.ts +79 -0
  127. package/lib/utils/option-utils.d.ts +29 -0
  128. package/package.json +1 -1
@@ -30,7 +30,7 @@ export default function DumiContextWrapper() {
30
30
 
31
31
  return (
32
32
  <SiteContext.Provider value={{
33
- pkg: {"name":"iglooform","version":"3.3.0","license":"MIT"},
33
+ pkg: {"name":"iglooform","version":"3.3.1","license":"MIT"},
34
34
  historyType: "browser",
35
35
  entryExports,
36
36
  demos,
@@ -0,0 +1,37 @@
1
+ import { FC } from 'react';
2
+ import { RequestMethod } from 'umi-request';
3
+ import { IglooButtonProps } from '../button';
4
+ import { UploadProps } from 'antd/es/upload';
5
+ import { Job } from './job-list';
6
+ import './style';
7
+ export interface AdminUploadProps {
8
+ dataSource: string | {
9
+ label: string;
10
+ value: string;
11
+ }[];
12
+ requestMethod: RequestMethod;
13
+ uploadMethod: (dataSource: string, file: File, enableApiAuth: boolean, onProgess: (e: ProgressEvent) => any) => {
14
+ abort: () => any;
15
+ result: Promise<{
16
+ success: boolean;
17
+ errorMessage?: string;
18
+ }>;
19
+ };
20
+ modalTitle?: string;
21
+ floatTitle?: string;
22
+ buttonText?: string;
23
+ buttonType?: IglooButtonProps['type'];
24
+ enableApiAuth?: boolean;
25
+ accept?: UploadProps['accept'];
26
+ refreshInteval?: number;
27
+ formatTips?: (props: {
28
+ uploading: number;
29
+ processing: number;
30
+ done: number;
31
+ }) => string;
32
+ selectPlaceholder?: string;
33
+ onFinish?: (jobs: Job[]) => any;
34
+ handleCloseFloat?: (hidden: () => {}) => any;
35
+ }
36
+ declare const AdminUpload: FC<AdminUploadProps>;
37
+ export default AdminUpload;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { HookAPI as ModalHookAPI } from '../modal/useModal';
3
+ import type { HookAPI as MessageHookAPI } from '../message/useMessage';
4
+ export type AppContextType = {
5
+ modal: ModalHookAPI;
6
+ message: MessageHookAPI;
7
+ };
8
+ declare const AppContext: import("react").Context<AppContextType>;
9
+ export default AppContext;
@@ -0,0 +1,8 @@
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ import { type AppContextType } from './context';
3
+ interface AppProps {
4
+ }
5
+ declare const App: FC<PropsWithChildren<AppProps>> & {
6
+ useApp: () => AppContextType;
7
+ };
8
+ export default App;
@@ -0,0 +1,12 @@
1
+ import { ReactNode, FC, CSSProperties, PropsWithChildren } from 'react';
2
+ import './style';
3
+ export interface ICardPageProps {
4
+ title: string;
5
+ pageTitleIcon?: ReactNode;
6
+ pageStatusIcon?: ReactNode;
7
+ extraButtons?: ReactNode[];
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ }
11
+ declare const IglooCardPage: FC<PropsWithChildren<ICardPageProps>>;
12
+ export default IglooCardPage;
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode, PropsWithChildren } from 'react';
2
+ import './style';
3
+ interface ICard {
4
+ title: string;
5
+ contentTitle?: ReactNode;
6
+ contentStatus?: any;
7
+ className?: string;
8
+ }
9
+ declare const IglooCard: FC<PropsWithChildren<ICard>>;
10
+ export default IglooCard;
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { FC } from '../types';
3
+ import './style';
4
+ export interface ConfirmationProps {
5
+ onChange?: Function;
6
+ value?: boolean;
7
+ message?: ReactNode;
8
+ modalContent?: ReactNode;
9
+ modalTitle?: ReactNode;
10
+ okText?: ReactNode;
11
+ cancelText?: ReactNode;
12
+ href?: string;
13
+ disabled?: boolean;
14
+ }
15
+ declare const Confirmation: FC<ConfirmationProps>;
16
+ export default Confirmation;
@@ -0,0 +1,6 @@
1
+ import { DatePickerProps } from 'antd/es/date-picker';
2
+ import { FC, IglooComponentProps } from '../types';
3
+ import './style';
4
+ type Props = DatePickerProps & IglooComponentProps;
5
+ declare const IglooBuddhistDatePicker: FC<Props>;
6
+ export default IglooBuddhistDatePicker;
@@ -0,0 +1,13 @@
1
+ import { DatePickerProps, RangePickerProps, MonthPickerProps, WeekPickerProps } from 'antd/es/date-picker';
2
+ import { FC, IglooComponentProps } from '../types';
3
+ import { Dayjs } from 'dayjs';
4
+ import './style';
5
+ export { default as IglooBuddhistDatePicker } from './buddhist';
6
+ type Props = Omit<DatePickerProps, 'value'> & IglooComponentProps & {
7
+ value?: Dayjs | null | 0;
8
+ };
9
+ declare const IglooDatePicker: FC<Props>;
10
+ export default IglooDatePicker;
11
+ export declare const IglooRangePicker: FC<RangePickerProps & IglooComponentProps>;
12
+ export declare const IglooWeekPicker: FC<WeekPickerProps & IglooComponentProps>;
13
+ export declare const IglooMonthPicker: FC<MonthPickerProps & IglooComponentProps>;
@@ -0,0 +1,15 @@
1
+ import React, { FC, CSSProperties } from 'react';
2
+ import MediaWithPreview from '../media';
3
+ type MediaWithPreviewProps = React.ComponentProps<typeof MediaWithPreview>;
4
+ declare const Documents: FC<{
5
+ docList: Array<string | {
6
+ src: string;
7
+ type: string;
8
+ }>;
9
+ className?: string;
10
+ style?: CSSProperties;
11
+ docNames?: string[];
12
+ showAllPages?: boolean;
13
+ destroyOnClose?: boolean;
14
+ } & Pick<MediaWithPreviewProps, 'getNonCORSUrl' | 'download'>>;
15
+ export default Documents;
@@ -0,0 +1,52 @@
1
+ import { ReactNode } from 'react';
2
+ import './style';
3
+ export interface IFrameConfig {
4
+ type: 'date' | 'mult' | 'single' | 'customize';
5
+ filterItemTitle?: ReactNode;
6
+ default?: any[] | any;
7
+ key: string;
8
+ disabled?: string[];
9
+ disabledDate?: (p: any) => any;
10
+ format?: string;
11
+ options?: {
12
+ label: any;
13
+ value: any;
14
+ span?: 8 | 12 | 16 | 24;
15
+ }[];
16
+ dateRangeConfig?: {
17
+ custom?: any[];
18
+ lastDay?: any[];
19
+ lastSevenDays?: any[];
20
+ lastMonth?: any[];
21
+ thisMonth?: any[];
22
+ };
23
+ canNotDelete?: boolean;
24
+ tagTitle?: (value?: any) => string;
25
+ render?: (value: any, onChange: any) => ReactNode;
26
+ onChange?: any;
27
+ }
28
+ export interface IFilterProps {
29
+ initValue?: {
30
+ [key: string]: any;
31
+ };
32
+ parentFilterCallBack?: (params?: any) => void;
33
+ showIdSelect?: boolean;
34
+ idKeyTypes?: {
35
+ label: string;
36
+ value: number | string;
37
+ }[];
38
+ filterTitle?: ReactNode;
39
+ filterItems?: IFrameConfig[];
40
+ placeholder?: string;
41
+ idKeyTypeDefault?: string;
42
+ onFilter?: (params?: any) => void;
43
+ showDefaultOptions?: boolean;
44
+ deleteAllTagsType?: 'closeAllCanDelete' | 'restFilters';
45
+ searchInputDefault?: string | number;
46
+ searchWithFilter?: boolean;
47
+ inputOnly?: boolean;
48
+ beforeOpenFilter?: any;
49
+ resetCallBack?: any;
50
+ }
51
+ declare const FilterComponent: (props: IFilterProps) => import("react/jsx-runtime").JSX.Element;
52
+ export default FilterComponent;
@@ -0,0 +1,20 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { FormItemProps } from 'antd/es/form';
3
+ import { FormItemConfig, FormItemName } from '../../types';
4
+ import './style';
5
+ export interface AddableSectionProps {
6
+ parentName?: FormItemName;
7
+ formItemProps?: FormItemProps;
8
+ config: FormItemConfig;
9
+ preview?: boolean;
10
+ disabled?: boolean;
11
+ setShowStepButton?: (showButton: boolean) => void;
12
+ max?: number;
13
+ min?: number;
14
+ initCount?: number;
15
+ addButtonText?: string;
16
+ addButtonIcon?: ReactNode;
17
+ description?: string | ReactNode;
18
+ }
19
+ declare const AddableSection: FC<AddableSectionProps>;
20
+ export default AddableSection;
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { FormItemConfig, FormItemName } from '../../types';
3
+ import './style';
4
+ interface ElementProps {
5
+ config: FormItemConfig;
6
+ parentName?: FormItemName;
7
+ preview?: boolean;
8
+ disabled?: boolean;
9
+ setShowStepButton?: (showButton: boolean) => void;
10
+ }
11
+ declare const Element: FC<ElementProps>;
12
+ export default Element;
@@ -0,0 +1,8 @@
1
+ import { FormItemConfig, FormItemExtraConfig } from '../types';
2
+ type UseComponentHook = (config: FormItemConfig) => {
3
+ Component: any;
4
+ formItemProps: FormItemExtraConfig;
5
+ withoutForm: boolean;
6
+ };
7
+ declare const useComponent: UseComponentHook;
8
+ export default useComponent;
@@ -0,0 +1,21 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { FormItemConfig, FormItemName } from '../../types';
3
+ import './style';
4
+ import { ConfirmationProps } from '../../confirmation';
5
+ export interface HStepsProps {
6
+ config: FormItemConfig & {
7
+ confirmations?: {
8
+ [key: string]: {
9
+ required: boolean;
10
+ confirmation?: ConfirmationProps;
11
+ requiredMessage?: string;
12
+ };
13
+ };
14
+ withReview?: boolean;
15
+ description?: ReactNode;
16
+ };
17
+ parentName?: FormItemName;
18
+ name?: FormItemName;
19
+ }
20
+ declare const HSteps: FC<HStepsProps>;
21
+ export default HSteps;
@@ -0,0 +1,4 @@
1
+ import { Form as FormType } from '../types';
2
+ import './style';
3
+ declare const ExportedForm: FormType;
4
+ export default ExportedForm;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { FormItemProps } from 'antd/es/form';
3
+ import { FormItemConfig, FormItemName } from '../../types';
4
+ import './style';
5
+ export interface SectionProps {
6
+ parentName?: FormItemName;
7
+ formItemProps?: FormItemProps;
8
+ config: FormItemConfig;
9
+ preview?: boolean;
10
+ disabled?: boolean;
11
+ collapsable?: boolean;
12
+ defaultCollapsed?: boolean;
13
+ setShowStepButton?: (showButton: boolean) => void;
14
+ }
15
+ declare const Section: FC<SectionProps>;
16
+ export default Section;
@@ -0,0 +1,12 @@
1
+ import { FC, IglooComponentProps } from '../../../../types';
2
+ import type { ItemData, ItemsDataConfig } from '../../types';
3
+ import './style';
4
+ interface Props extends IglooComponentProps {
5
+ itemsData: ItemData[];
6
+ itemsDataConfig: ItemsDataConfig;
7
+ value: string[];
8
+ onChange?: (value: string[]) => any;
9
+ preview: boolean;
10
+ }
11
+ export declare const CheckboxGroupItems: FC<Props>;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ export { CheckboxGroupItems } from './checkbox-group-items';
2
+ export { SectionOfItemCondition } from './section-of-item-condition';
@@ -0,0 +1,11 @@
1
+ import type { FC } from 'react';
2
+ import './style';
3
+ export type ItemInfoProps = {
4
+ item_id?: string;
5
+ item_name?: string;
6
+ item_quantity?: number;
7
+ item_image?: string;
8
+ visibleConfig?: Record<string, boolean>;
9
+ };
10
+ declare const ItemInfo: FC<ItemInfoProps>;
11
+ export default ItemInfo;
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { IglooComponentProps, FormItemConfig, FormItemName } from '../../../../types';
3
+ import type { ItemData, ItemsDataConfig } from '../../types';
4
+ import './style';
5
+ export interface SectionOfItemConditionRef {
6
+ unfold: () => void;
7
+ }
8
+ interface Props extends IglooComponentProps {
9
+ index: number;
10
+ itemData: ItemData;
11
+ itemsDataConfig: ItemsDataConfig;
12
+ elements: FormItemConfig[];
13
+ parentName: FormItemName;
14
+ preview: boolean;
15
+ }
16
+ export declare const SectionOfItemCondition: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<SectionOfItemConditionRef>>;
17
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const KEY_STEP1 = "selected_items_ids";
2
+ export declare const KEY_STEP2 = "selected_items";
3
+ export declare const KEY_FORM_QUANTITY = "claim_quantity";
4
+ export declare const KEY_ITEM_QUANTITY = "item_quantity";
5
+ export declare const KEY_ITEM_ID = "item_id";
@@ -0,0 +1,6 @@
1
+ import type { FC } from 'react';
2
+ import type { StepItemsSelectionProps } from './types';
3
+ declare const StepItemsSelection: FC<StepItemsSelectionProps> & {
4
+ STEP_COUNT: number;
5
+ };
6
+ export default StepItemsSelection;
@@ -0,0 +1,27 @@
1
+ import type { StepProps } from '../step';
2
+ import type { FormItemConfig } from '../../types';
3
+ export type ItemData = {
4
+ item_id: string;
5
+ item_name: string;
6
+ item_quantity: number;
7
+ item_image: string;
8
+ };
9
+ export type ItemsDataConfig = Record<string, {
10
+ visible?: boolean;
11
+ }>;
12
+ export interface StepItemsSelectionProps extends StepProps {
13
+ currentStep?: number;
14
+ config: FormItemConfig & {
15
+ itemsData: ItemData[];
16
+ itemsDataConfig: ItemsDataConfig;
17
+ elements: [
18
+ {
19
+ label: string;
20
+ },
21
+ {
22
+ label: string;
23
+ elements: FormItemConfig[];
24
+ }
25
+ ];
26
+ };
27
+ }
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { FormItemConfig, FormItemName } from '../../types';
3
+ import './style';
4
+ export interface StepsProps {
5
+ parentName?: FormItemName;
6
+ config: FormItemConfig;
7
+ name?: FormItemName;
8
+ }
9
+ declare const Steps: FC<StepsProps>;
10
+ export default Steps;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { FormInstance } from 'antd/es/form';
3
+ import { FC, FormItemName, OCRHooks } from './types';
4
+ declare const _default: React.Context<{
5
+ form?: FormInstance<any> | undefined;
6
+ onCancel?(): void;
7
+ cancelText?: string | undefined;
8
+ submitText?: string | undefined;
9
+ previewText?: string | undefined;
10
+ nextText?: string | undefined;
11
+ continueText?: string | undefined;
12
+ validateMessages?: Object | undefined;
13
+ submitting?: boolean | undefined;
14
+ requiredMark?: boolean | undefined;
15
+ showSubmitButton?: boolean | undefined;
16
+ getScrollContainer: () => HTMLElement | Window | null;
17
+ registerDependencies: (name: FormItemName | FormItemName[], updater: Function) => void;
18
+ handleValuesChange(changedFields: any): any;
19
+ uploadApi?: string | undefined;
20
+ selectDatasourceApi?: string | undefined;
21
+ getRuleValidationApi?: string | undefined;
22
+ customizeComponents?: {
23
+ [name: string]: FC<{}>;
24
+ } | undefined;
25
+ ocrHooks?: OCRHooks | undefined;
26
+ validationCodeExtraParams?: Record<string, any> | undefined;
27
+ }>;
28
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { FormItemProps } from 'antd/es/form';
3
+ import { FormItemConfig, FormItemName } from '../../types';
4
+ import './style';
5
+ export interface AddableSectionProps extends FormItemConfig {
6
+ parentName?: FormItemName;
7
+ formItemProps?: FormItemProps;
8
+ preview?: boolean;
9
+ disabledFromParent?: boolean;
10
+ setShowStepButton?: (showButton: boolean) => void;
11
+ max?: number;
12
+ min?: number;
13
+ initCount?: number;
14
+ addButtonText?: string;
15
+ addButtonIcon?: ReactNode;
16
+ description?: string | ReactNode;
17
+ }
18
+ declare const AddableSection: FC<AddableSectionProps>;
19
+ export default AddableSection;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { FormItemConfig, FormItemName } from '../../types';
3
+ import './style';
4
+ interface ElementProps extends FormItemConfig {
5
+ parentName?: FormItemName;
6
+ preview?: boolean;
7
+ setShowStepButton?: (showButton: boolean) => void;
8
+ disabledFromParent?: boolean;
9
+ }
10
+ declare const Element: FC<ElementProps>;
11
+ export default Element;
@@ -0,0 +1,11 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { Form } from 'antd';
3
+ import { FormBasicConfig } from '../types';
4
+ import './style';
5
+ interface FreeFormProps extends Omit<FormBasicConfig, 'config'> {
6
+ }
7
+ interface FreeFormType extends FC<PropsWithChildren<FreeFormProps>> {
8
+ useForm: typeof Form.useForm;
9
+ }
10
+ declare const FreeForm: FreeFormType;
11
+ export default FreeForm;
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { FormItemProps } from 'antd/es/form';
3
+ import { FormItemConfig, FormItemName } from '../../types';
4
+ import './style';
5
+ export interface SectionProps extends FormItemConfig {
6
+ parentName?: FormItemName;
7
+ formItemProps?: FormItemProps;
8
+ preview?: boolean;
9
+ disabledFromParent?: boolean;
10
+ setShowStepButton?: (showButton: boolean) => void;
11
+ }
12
+ declare const Section: FC<SectionProps>;
13
+ export default Section;
@@ -0,0 +1,21 @@
1
+ import { FC } from 'react';
2
+ import { FormItemConfig, FormItemName } from '../../types';
3
+ import './style';
4
+ export interface StepProps extends FormItemConfig {
5
+ name: FormItemName;
6
+ label: string;
7
+ parentName?: FormItemName;
8
+ edit?: boolean;
9
+ preview?: boolean;
10
+ index?: number;
11
+ total?: number;
12
+ handleNextStep?(fields: any): void;
13
+ handleEdit?(index: number): void;
14
+ showLastIndex?: boolean;
15
+ shouldScroll?: boolean;
16
+ editButtonLabel?: string;
17
+ disableEditButton?: boolean;
18
+ buttonText?: string;
19
+ }
20
+ declare const Step: FC<StepProps>;
21
+ export default Step;
@@ -0,0 +1,12 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { FormItemName } from '../../types';
3
+ import './style';
4
+ export interface StepsProps {
5
+ parentName?: FormItemName;
6
+ showLastIndex?: boolean;
7
+ name?: FormItemName;
8
+ currentStep?: number;
9
+ onEdit?: (index: number) => any;
10
+ }
11
+ declare const Steps: FC<PropsWithChildren<StepsProps>>;
12
+ export default Steps;
@@ -0,0 +1,3 @@
1
+ import { OCRConfig, OCRHooks } from "../../types";
2
+ declare const useOCR: () => (config: OCRConfig) => OCRHooks;
3
+ export default useOCR;
@@ -0,0 +1,10 @@
1
+ import * as BlinkIDSDK from '@microblink/blinkid-in-browser-sdk';
2
+ declare const useMicroBlink: () => (licenseKey: string) => {
3
+ initResult: {
4
+ error: undefined;
5
+ failed: boolean;
6
+ };
7
+ recognize: ((file: File) => Promise<BlinkIDSDK.BlinkIdSingleSideRecognizerResult | null>) | null;
8
+ loading: boolean;
9
+ };
10
+ export default useMicroBlink;
package/es/index.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ export { default as Form } from './form';
2
+ export { default as Button, GreenButton, YellowButton, RedButton, } from './button';
3
+ export { default as DatePicker, IglooBuddhistDatePicker as BuddhistDatePicker, IglooRangePicker as RangePicker, IglooWeekPicker as WeekPicker, IglooMonthPicker as MonthPicker, } from './date-picker';
4
+ export { default as Input, PhoneNumber, Amount, Password, Email, InputNumber, TextArea, InputDate, CreditCard, ExpiryDate, InputId, } from './input';
5
+ export { default as OCR } from './ocr';
6
+ export { default as Select, TimeSelect, AttachedSelect } from './select';
7
+ export { default as Radio, RadioGroup, RadioGroupWithOther } from './radio';
8
+ export { default as Upload } from './upload';
9
+ export { default as Checkbox, CheckboxGroup } from './checkbox';
10
+ export { default as Declaration } from './declaration';
11
+ export { Divider } from 'antd';
12
+ export { default as UploadPhoto } from './upload-photo';
13
+ export { default as AlertMessage } from './alert-message';
14
+ export { default as LoginPage } from './login-page';
15
+ export { default as UploadPreview } from './upload-preview';
16
+ export { default as Typography } from './typography';
17
+ export { default as PlatformCard } from './platform/platform-card';
18
+ export { default as SwitchPlatform } from './platform/switch-platform';
19
+ export { default as Table } from './table';
20
+ export { default as StatusBox } from './status-box';
21
+ export { CardPage, Card, CardGroup, CardItem } from './card-detail';
22
+ export { default as AdminMedia } from './media';
23
+ export { default as Documents } from './documents';
24
+ export { default as Filter } from './filter';
25
+ export { default as CurrencyContext } from './currency-context';
26
+ export { default as Tabs } from './tabs';
27
+ export { default as AdminAmount } from './admin-amount';
28
+ export { default as AdminUpload } from './admin-upload';
29
+ export { LocaleProvider } from './locale';
30
+ export { default as Modal } from './modal';
31
+ export { default as BackTop } from './back-top';
32
+ export { default as MediaPreview } from './upload-preview/media';
33
+ export { default as PolicyList } from './policy-list';
34
+ export { default as ClaimList } from './claim-list';
35
+ export { default as MobileInsurerDetail } from './mobile-insurer-detail';
36
+ export { default as Layout } from './layout';
37
+ export { default as DetailPanel } from './detail-panel';
38
+ export { default as message } from './message';
39
+ export { default as SearchBox } from './search-box';
40
+ export { default as FreeForm } from './free-form';
41
+ export { default as FormItem } from './free-form/element';
42
+ export { default as FormPages } from './free-form/pages';
43
+ export { default as FormPage } from './free-form/page';
44
+ export { default as FormSteps } from './free-form/steps';
45
+ export { default as FormStep } from './free-form/step';
46
+ export { default as FormSection } from './free-form/section';
47
+ export { default as FormAddableSection } from './free-form/addable-section';
48
+ export { default as App } from './app';
49
+ export { default as ConfigProvider } from './config-provider';
@@ -0,0 +1,14 @@
1
+ import { InputProps } from 'antd/es/input';
2
+ import { FC, IglooComponentProps } from '../types';
3
+ import './style/amount';
4
+ export interface AmountProps extends InputProps, IglooComponentProps {
5
+ currency?: string;
6
+ currencyProps?: InputProps;
7
+ amount?: number;
8
+ amountProps?: InputProps;
9
+ seperator?: ',' | '.';
10
+ separator?: ',' | '.';
11
+ decimalSeparator?: ',' | '.';
12
+ }
13
+ declare const Amount: FC<AmountProps>;
14
+ export default Amount;
@@ -0,0 +1,16 @@
1
+ import { FC, IglooComponentProps } from '../types';
2
+ import './style/input-date';
3
+ type Props = IglooComponentProps & {
4
+ value?: {
5
+ year: string | number;
6
+ month: string | number;
7
+ };
8
+ onChange?: any;
9
+ disabled?: boolean;
10
+ check?: (value: {
11
+ year: string;
12
+ month: string;
13
+ }) => boolean;
14
+ };
15
+ declare const IglooExpiryDate: FC<Props>;
16
+ export default IglooExpiryDate;
@@ -0,0 +1,8 @@
1
+ import { InputProps } from 'antd/es/input';
2
+ import { FC, IglooComponentProps } from '../types';
3
+ import './style/input-date';
4
+ type Props = InputProps & IglooComponentProps & {
5
+ format: string;
6
+ };
7
+ declare const IglooInputDate: FC<Props>;
8
+ export default IglooInputDate;