iglooform 3.0.7 → 3.0.9
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/.dumi/tmp/dumi/theme/ContextWrapper.tsx +1 -1
- package/es/admin-amount/index.d.ts +9 -0
- package/es/admin-amount/style/index.d.ts +0 -0
- package/es/admin-upload/float.d.ts +16 -0
- package/es/admin-upload/index.d.ts +36 -0
- package/es/admin-upload/index.js +2 -2
- package/es/admin-upload/modal.d.ts +17 -0
- package/es/alert-message/index.d.ts +5 -0
- package/es/babel-plugin-import-option.d.ts +7 -0
- package/es/back-top/index.d.ts +5 -0
- package/es/button/index.d.ts +11 -0
- package/es/card-detail/card-group.d.ts +12 -0
- package/es/card-detail/card-item.d.ts +9 -0
- package/es/card-detail/card-page.d.ts +12 -0
- package/es/card-detail/card.d.ts +10 -0
- package/es/card-detail/utils.d.ts +5 -0
- package/es/checkbox/index.d.ts +24 -0
- package/es/claim-list/index.d.ts +48 -0
- package/es/confirmation/index.d.ts +14 -0
- package/es/date-picker/buddhist.d.ts +6 -0
- package/es/date-picker/index.d.ts +13 -0
- package/es/declaration/index.d.ts +9 -0
- package/es/detail-panel/index.d.ts +18 -0
- package/es/filter/checkBox.d.ts +12 -0
- package/es/filter/index.d.ts +52 -0
- package/es/filter/rangePicker.d.ts +18 -0
- package/es/form/addable-section/index.d.ts +20 -0
- package/es/form/addable-section/index.js +3 -2
- package/es/form/element/index.d.ts +12 -0
- package/es/form/element/index.js +3 -2
- package/es/form/elements.d.ts +8 -0
- package/es/form/hstep/index.d.ts +17 -0
- package/es/form/hsteps/index.d.ts +21 -0
- package/es/form/index.d.ts +4 -0
- package/es/form/index.js +4 -2
- package/es/form/login/index.d.ts +9 -0
- package/es/form/page/index.d.ts +10 -0
- package/es/form/pages/index.d.ts +10 -0
- package/es/form/section/index.d.ts +16 -0
- package/es/form/section/index.js +3 -2
- package/es/form/step/index.d.ts +17 -0
- package/es/form/steps/index.d.ts +10 -0
- package/es/form-context.d.ts +28 -0
- package/es/form-step-context.d.ts +6 -0
- package/es/free-form/addable-section/index.d.ts +19 -0
- package/es/free-form/addable-section/index.js +3 -2
- package/es/free-form/element/index.d.ts +11 -0
- package/es/free-form/element/index.js +3 -2
- package/es/free-form/index.d.ts +11 -0
- package/es/free-form/index.js +4 -2
- package/es/free-form/page/index.d.ts +16 -0
- package/es/free-form/pages/index.d.ts +10 -0
- package/es/free-form/section/index.d.ts +13 -0
- package/es/free-form/section/index.js +3 -2
- package/es/free-form/step/index.d.ts +21 -0
- package/es/free-form/steps/index.d.ts +12 -0
- package/es/home-menu/index.d.ts +20 -0
- package/es/hooks/ocr/index.d.ts +3 -0
- package/es/hooks/ocr/micro-blink.d.ts +10 -0
- package/es/index.d.ts +47 -0
- package/es/input/amount.d.ts +14 -0
- package/es/input/credit-card.d.ts +13 -0
- package/es/input/email.d.ts +6 -0
- package/es/input/expiry-date.d.ts +16 -0
- package/es/input/index.d.ts +14 -0
- package/es/input/input-date.d.ts +8 -0
- package/es/input/input-id.d.ts +6 -0
- package/es/input/input-number.d.ts +6 -0
- package/es/input/input.d.ts +9 -0
- package/es/input/otp.d.ts +11 -0
- package/es/input/password.d.ts +6 -0
- package/es/input/phone-number.d.ts +14 -0
- package/es/input/style/amount/index.d.ts +2 -0
- package/es/input/style/index.d.ts +2 -0
- package/es/input/style/input-date/index.d.ts +2 -0
- package/es/input/style/otp/index.d.ts +2 -0
- package/es/input/style/phone-number/index.d.ts +2 -0
- package/es/input/style/text-area/index.d.ts +2 -0
- package/es/input/text-area.d.ts +6 -0
- package/es/layout/header.d.ts +5 -0
- package/es/layout/index.d.ts +56 -0
- package/es/locale/locale-provider.d.ts +11 -0
- package/es/login-page/index.d.ts +7 -0
- package/es/media/index.d.ts +19 -0
- package/es/message/index.d.ts +12 -0
- package/es/message/style/index.d.ts +1 -0
- package/es/mobile-insurer-detail/index.d.ts +40 -0
- package/es/mobile-insurer-list/index.d.ts +17 -0
- package/es/modal/index.d.ts +31 -0
- package/es/ocr/index.d.ts +15 -0
- package/es/ocr/micro-blink/index.d.ts +8 -0
- package/es/ocr/micro-blink/style/index.d.ts +1 -0
- package/es/platform/platform-card/index.d.ts +12 -0
- package/es/platform/switch-platform/index.d.ts +12 -0
- package/es/policy-list/policy-card.d.ts +48 -0
- package/es/radio/index.d.ts +24 -0
- package/es/search-box/index.d.ts +19 -0
- package/es/select/attached-select.d.ts +17 -0
- package/es/select/select.d.ts +13 -0
- package/es/select/time-select.d.ts +7 -0
- package/es/status-box/index.d.ts +11 -0
- package/es/table/index.d.ts +42 -0
- package/es/tabs/index.d.ts +15 -0
- package/es/types.d.ts +183 -0
- package/es/typography/index.d.ts +14 -0
- package/es/upload/index.d.ts +16 -0
- package/es/upload-photo/index.d.ts +28 -0
- package/es/upload-preview/index.d.ts +9 -0
- package/es/utils/form-methods.d.ts +3 -0
- package/es/utils/form-utils.d.ts +77 -0
- package/es/utils/form-utils.js +2 -2
- package/es/utils/option-utils.d.ts +29 -0
- package/es/utils/tools.d.ts +1 -1
- package/es/utils/useAsyncEffect.d.ts +3 -0
- package/lib/admin-amount/index.d.ts +9 -0
- package/lib/admin-amount/style/index.d.ts +0 -0
- package/lib/admin-upload/float.d.ts +16 -0
- package/lib/admin-upload/index.d.ts +36 -0
- package/lib/admin-upload/index.js +2 -2
- package/lib/admin-upload/modal.d.ts +17 -0
- package/lib/alert-message/index.d.ts +5 -0
- package/lib/babel-plugin-import-option.d.ts +7 -0
- package/lib/back-top/index.d.ts +5 -0
- package/lib/button/index.d.ts +11 -0
- package/lib/card-detail/card-group.d.ts +12 -0
- package/lib/card-detail/card-item.d.ts +9 -0
- package/lib/card-detail/card-page.d.ts +12 -0
- package/lib/card-detail/card.d.ts +10 -0
- package/lib/card-detail/utils.d.ts +5 -0
- package/lib/checkbox/index.d.ts +24 -0
- package/lib/claim-list/index.d.ts +48 -0
- package/lib/confirmation/index.d.ts +14 -0
- package/lib/date-picker/buddhist.d.ts +6 -0
- package/lib/date-picker/index.d.ts +13 -0
- package/lib/declaration/index.d.ts +9 -0
- package/lib/detail-panel/index.d.ts +18 -0
- package/lib/filter/checkBox.d.ts +12 -0
- package/lib/filter/index.d.ts +52 -0
- package/lib/filter/rangePicker.d.ts +18 -0
- package/lib/form/addable-section/index.d.ts +20 -0
- package/lib/form/addable-section/index.js +3 -2
- package/lib/form/element/index.d.ts +12 -0
- package/lib/form/element/index.js +3 -2
- package/lib/form/elements.d.ts +8 -0
- package/lib/form/hstep/index.d.ts +17 -0
- package/lib/form/hsteps/index.d.ts +21 -0
- package/lib/form/index.d.ts +4 -0
- package/lib/form/index.js +4 -2
- package/lib/form/login/index.d.ts +9 -0
- package/lib/form/page/index.d.ts +10 -0
- package/lib/form/pages/index.d.ts +10 -0
- package/lib/form/section/index.d.ts +16 -0
- package/lib/form/section/index.js +3 -2
- package/lib/form/step/index.d.ts +17 -0
- package/lib/form/steps/index.d.ts +10 -0
- package/lib/form-context.d.ts +28 -0
- package/lib/form-step-context.d.ts +6 -0
- package/lib/free-form/addable-section/index.d.ts +19 -0
- package/lib/free-form/addable-section/index.js +3 -2
- package/lib/free-form/element/index.d.ts +11 -0
- package/lib/free-form/element/index.js +3 -2
- package/lib/free-form/index.d.ts +11 -0
- package/lib/free-form/index.js +4 -2
- package/lib/free-form/page/index.d.ts +16 -0
- package/lib/free-form/pages/index.d.ts +10 -0
- package/lib/free-form/section/index.d.ts +13 -0
- package/lib/free-form/section/index.js +3 -2
- package/lib/free-form/step/index.d.ts +21 -0
- package/lib/free-form/steps/index.d.ts +12 -0
- package/lib/home-menu/index.d.ts +20 -0
- package/lib/hooks/ocr/index.d.ts +3 -0
- package/lib/hooks/ocr/micro-blink.d.ts +10 -0
- package/lib/index.d.ts +47 -0
- package/lib/input/amount.d.ts +14 -0
- package/lib/input/credit-card.d.ts +13 -0
- package/lib/input/email.d.ts +6 -0
- package/lib/input/expiry-date.d.ts +16 -0
- package/lib/input/index.d.ts +14 -0
- package/lib/input/input-date.d.ts +8 -0
- package/lib/input/input-id.d.ts +6 -0
- package/lib/input/input-number.d.ts +6 -0
- package/lib/input/input.d.ts +9 -0
- package/lib/input/otp.d.ts +11 -0
- package/lib/input/password.d.ts +6 -0
- package/lib/input/phone-number.d.ts +14 -0
- package/lib/input/style/amount/index.d.ts +2 -0
- package/lib/input/style/index.d.ts +2 -0
- package/lib/input/style/input-date/index.d.ts +2 -0
- package/lib/input/style/otp/index.d.ts +2 -0
- package/lib/input/style/phone-number/index.d.ts +2 -0
- package/lib/input/style/text-area/index.d.ts +2 -0
- package/lib/input/text-area.d.ts +6 -0
- package/lib/layout/header.d.ts +5 -0
- package/lib/layout/index.d.ts +56 -0
- package/lib/locale/locale-provider.d.ts +11 -0
- package/lib/login-page/index.d.ts +7 -0
- package/lib/media/index.d.ts +19 -0
- package/lib/message/index.d.ts +12 -0
- package/lib/message/style/index.d.ts +1 -0
- package/lib/mobile-insurer-detail/index.d.ts +40 -0
- package/lib/mobile-insurer-list/index.d.ts +17 -0
- package/lib/modal/index.d.ts +31 -0
- package/lib/ocr/index.d.ts +15 -0
- package/lib/ocr/micro-blink/index.d.ts +8 -0
- package/lib/ocr/micro-blink/style/index.d.ts +1 -0
- package/lib/platform/platform-card/index.d.ts +12 -0
- package/lib/platform/switch-platform/index.d.ts +12 -0
- package/lib/policy-list/policy-card.d.ts +48 -0
- package/lib/radio/index.d.ts +24 -0
- package/lib/search-box/index.d.ts +19 -0
- package/lib/select/attached-select.d.ts +17 -0
- package/lib/select/select.d.ts +13 -0
- package/lib/select/time-select.d.ts +7 -0
- package/lib/status-box/index.d.ts +11 -0
- package/lib/table/index.d.ts +42 -0
- package/lib/tabs/index.d.ts +15 -0
- package/lib/types.d.ts +183 -0
- package/lib/typography/index.d.ts +14 -0
- package/lib/upload/index.d.ts +16 -0
- package/lib/upload-photo/index.d.ts +28 -0
- package/lib/upload-preview/index.d.ts +9 -0
- package/lib/utils/form-methods.d.ts +3 -0
- package/lib/utils/form-utils.d.ts +77 -0
- package/lib/utils/form-utils.js +2 -2
- package/lib/utils/option-utils.d.ts +29 -0
- package/lib/utils/tools.d.ts +1 -1
- package/lib/utils/useAsyncEffect.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
export interface StepProps {
|
|
5
|
+
parentName?: FormItemName;
|
|
6
|
+
config: FormItemConfig;
|
|
7
|
+
edit: boolean;
|
|
8
|
+
preview: boolean;
|
|
9
|
+
index: number;
|
|
10
|
+
total: number;
|
|
11
|
+
handleNext(): void;
|
|
12
|
+
handleEdit(index: number): void;
|
|
13
|
+
showLastIndex?: boolean;
|
|
14
|
+
shouldScroll: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Step: FC<StepProps>;
|
|
17
|
+
export default Step;
|
|
@@ -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;
|
package/lib/form/index.js
CHANGED
|
@@ -66,7 +66,8 @@ var IglooForm = function IglooForm(props, ref) {
|
|
|
66
66
|
stepDirection = _props$stepDirection === void 0 ? 'vertical' : _props$stepDirection,
|
|
67
67
|
_props$customizeCompo = props.customizeComponents,
|
|
68
68
|
customizeComponents = _props$customizeCompo === void 0 ? {} : _props$customizeCompo,
|
|
69
|
-
ocr = props.ocr
|
|
69
|
+
ocr = props.ocr,
|
|
70
|
+
validationCodeExtraParams = props.validationCodeExtraParams;
|
|
70
71
|
var _Form$useForm = _antd.Form.useForm(),
|
|
71
72
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
72
73
|
innerForm = _Form$useForm2[0];
|
|
@@ -239,7 +240,8 @@ var IglooForm = function IglooForm(props, ref) {
|
|
|
239
240
|
getRuleValidationApi: getRuleValidationApi,
|
|
240
241
|
handleValuesChange: handleValuesChange,
|
|
241
242
|
customizeComponents: customizeComponents,
|
|
242
|
-
ocrHooks: ocrHooks
|
|
243
|
+
ocrHooks: ocrHooks,
|
|
244
|
+
validationCodeExtraParams: validationCodeExtraParams
|
|
243
245
|
}, locales),
|
|
244
246
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Form, {
|
|
245
247
|
form: form,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
export interface PageProps {
|
|
5
|
+
parentName?: FormItemName;
|
|
6
|
+
config: FormItemConfig;
|
|
7
|
+
showFooter?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Page: FC<PageProps>;
|
|
10
|
+
export default Page;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
export interface PagesProps {
|
|
5
|
+
parentName?: FormItemName;
|
|
6
|
+
config: FormItemConfig;
|
|
7
|
+
name?: FormItemName;
|
|
8
|
+
}
|
|
9
|
+
declare const Pages: FC<PagesProps>;
|
|
10
|
+
export default Pages;
|
|
@@ -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;
|
|
@@ -61,7 +61,8 @@ var Section = function Section(_ref) {
|
|
|
61
61
|
toggle = _useState2[1];
|
|
62
62
|
var _useContext = (0, _react.useContext)(_formContext.default),
|
|
63
63
|
form = _useContext.form,
|
|
64
|
-
requiredMark = _useContext.requiredMark
|
|
64
|
+
requiredMark = _useContext.requiredMark,
|
|
65
|
+
validationCodeExtraParams = _useContext.validationCodeExtraParams;
|
|
65
66
|
var _useContext2 = (0, _react.useContext)(_formStepContext.default),
|
|
66
67
|
registerSection = _useContext2.registerSection;
|
|
67
68
|
var namePath = (0, _formUtils.calcNamePath)(parentName, name);
|
|
@@ -74,7 +75,7 @@ var Section = function Section(_ref) {
|
|
|
74
75
|
}, []);
|
|
75
76
|
var _calcFormItemProps = (0, _formUtils.calcFormItemProps)(rest, {
|
|
76
77
|
requiredMark: requiredMark
|
|
77
|
-
}, form, parentName),
|
|
78
|
+
}, form, parentName, validationCodeExtraParams),
|
|
78
79
|
formItemProps = _calcFormItemProps.formItemProps,
|
|
79
80
|
elementProps = _calcFormItemProps.elementProps,
|
|
80
81
|
display = _calcFormItemProps.display;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
export interface StepProps {
|
|
5
|
+
parentName?: FormItemName;
|
|
6
|
+
config: FormItemConfig;
|
|
7
|
+
edit: boolean;
|
|
8
|
+
preview: boolean;
|
|
9
|
+
index: number;
|
|
10
|
+
total: number;
|
|
11
|
+
handleNext(): void;
|
|
12
|
+
handleEdit(index: number): void;
|
|
13
|
+
showLastIndex?: boolean;
|
|
14
|
+
shouldScroll: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Step: FC<StepProps>;
|
|
17
|
+
export default Step;
|
|
@@ -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;
|
|
@@ -68,7 +68,8 @@ var AddableSection = function AddableSection(props) {
|
|
|
68
68
|
var _useContext2 = (0, _react.useContext)(_formContext.default),
|
|
69
69
|
form = _useContext2.form,
|
|
70
70
|
requiredMark = _useContext2.requiredMark,
|
|
71
|
-
registerDependencies = _useContext2.registerDependencies
|
|
71
|
+
registerDependencies = _useContext2.registerDependencies,
|
|
72
|
+
validationCodeExtraParams = _useContext2.validationCodeExtraParams;
|
|
72
73
|
var namePath = (0, _formUtils.calcNamePath)(parentName, name);
|
|
73
74
|
var reducer = (0, _react.useCallback)(function (state, action) {
|
|
74
75
|
if (action.type === 'add') {
|
|
@@ -148,7 +149,7 @@ var AddableSection = function AddableSection(props) {
|
|
|
148
149
|
}, []);
|
|
149
150
|
var _calcFormItemProps = (0, _formUtils.calcFormItemProps)(props, {
|
|
150
151
|
requiredMark: requiredMark
|
|
151
|
-
}, form, parentName),
|
|
152
|
+
}, form, parentName, validationCodeExtraParams),
|
|
152
153
|
formItemProps = _calcFormItemProps.formItemProps,
|
|
153
154
|
elementProps = _calcFormItemProps.elementProps,
|
|
154
155
|
display = _calcFormItemProps.display;
|
|
@@ -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;
|
|
@@ -48,7 +48,8 @@ var Element = function Element(props) {
|
|
|
48
48
|
form = _useContext.form,
|
|
49
49
|
requiredMark = _useContext.requiredMark,
|
|
50
50
|
registerDependencies = _useContext.registerDependencies,
|
|
51
|
-
handleValuesChange = _useContext.handleValuesChange
|
|
51
|
+
handleValuesChange = _useContext.handleValuesChange,
|
|
52
|
+
validationCodeExtraParams = _useContext.validationCodeExtraParams;
|
|
52
53
|
var _useReducer = (0, _react.useReducer)(function (r) {
|
|
53
54
|
return r + 1;
|
|
54
55
|
}, 0),
|
|
@@ -118,7 +119,7 @@ var Element = function Element(props) {
|
|
|
118
119
|
}, [children]);
|
|
119
120
|
var _calcFormItemProps = (0, _formUtils.calcFormItemProps)(rest, _objectSpread(_objectSpread({}, extraConfig), {}, {
|
|
120
121
|
requiredMark: requiredMark
|
|
121
|
-
}), form, parentName),
|
|
122
|
+
}), form, parentName, validationCodeExtraParams),
|
|
122
123
|
colProps = _calcFormItemProps.colProps,
|
|
123
124
|
formItemProps = _calcFormItemProps.formItemProps,
|
|
124
125
|
display = _calcFormItemProps.display,
|
|
@@ -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;
|
package/lib/free-form/index.js
CHANGED
|
@@ -60,7 +60,8 @@ var FreeForm = function FreeForm(props) {
|
|
|
60
60
|
selectDatasourceApi = props.selectDatasourceApi,
|
|
61
61
|
validationRule = props.validationRule,
|
|
62
62
|
getRuleValidationApi = props.getRuleValidationApi,
|
|
63
|
-
ocr = props.ocr
|
|
63
|
+
ocr = props.ocr,
|
|
64
|
+
validationCodeExtraParams = props.validationCodeExtraParams;
|
|
64
65
|
var _Form$useForm = _antd.Form.useForm(),
|
|
65
66
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
66
67
|
innerForm = _Form$useForm2[0];
|
|
@@ -202,7 +203,8 @@ var FreeForm = function FreeForm(props) {
|
|
|
202
203
|
selectDatasourceApi: selectDatasourceApi,
|
|
203
204
|
getRuleValidationApi: getRuleValidationApi,
|
|
204
205
|
handleValuesChange: handleValuesChange,
|
|
205
|
-
ocrHooks: ocrHooks
|
|
206
|
+
ocrHooks: ocrHooks,
|
|
207
|
+
validationCodeExtraParams: validationCodeExtraParams
|
|
206
208
|
}, locales),
|
|
207
209
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Form, {
|
|
208
210
|
form: form,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemConfig, FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
export interface PageProps extends FormItemConfig {
|
|
5
|
+
parentName?: FormItemName;
|
|
6
|
+
showFooter?: boolean;
|
|
7
|
+
buttonPlacement?: 'right' | 'left';
|
|
8
|
+
description?: string;
|
|
9
|
+
handleNextPage?(): void;
|
|
10
|
+
handlePreviousPage?(index: number): void;
|
|
11
|
+
index?: number;
|
|
12
|
+
current?: number;
|
|
13
|
+
total?: number;
|
|
14
|
+
}
|
|
15
|
+
declare const Page: FC<PageProps>;
|
|
16
|
+
export default Page;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FormItemName } from '../../types';
|
|
3
|
+
import './style';
|
|
4
|
+
export interface PagesProps {
|
|
5
|
+
parentName?: FormItemName;
|
|
6
|
+
name?: FormItemName;
|
|
7
|
+
currentStep?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const Pages: FC<PagesProps>;
|
|
10
|
+
export default Pages;
|
|
@@ -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;
|
|
@@ -37,7 +37,8 @@ var Section = function Section(props) {
|
|
|
37
37
|
var _useContext = (0, _react.useContext)(_formContext.default),
|
|
38
38
|
form = _useContext.form,
|
|
39
39
|
requiredMark = _useContext.requiredMark,
|
|
40
|
-
registerDependencies = _useContext.registerDependencies
|
|
40
|
+
registerDependencies = _useContext.registerDependencies,
|
|
41
|
+
validationCodeExtraParams = _useContext.validationCodeExtraParams;
|
|
41
42
|
var _useReducer = (0, _react.useReducer)(function (r) {
|
|
42
43
|
return r + 1;
|
|
43
44
|
}, 0),
|
|
@@ -103,7 +104,7 @@ var Section = function Section(props) {
|
|
|
103
104
|
}, []);
|
|
104
105
|
var _calcFormItemProps = (0, _formUtils.calcFormItemProps)(rest, {
|
|
105
106
|
requiredMark: requiredMark
|
|
106
|
-
}, form, parentName),
|
|
107
|
+
}, form, parentName, validationCodeExtraParams),
|
|
107
108
|
formItemProps = _calcFormItemProps.formItemProps,
|
|
108
109
|
elementProps = _calcFormItemProps.elementProps,
|
|
109
110
|
display = _calcFormItemProps.display;
|
|
@@ -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,20 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
interface info {
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
interface action {
|
|
8
|
+
title: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface IHomeMenu {
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
customInfos: info[];
|
|
15
|
+
actions: action[];
|
|
16
|
+
userAvatar?: string;
|
|
17
|
+
userName?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const HomeMenu: (props: IHomeMenu) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default HomeMenu;
|
|
@@ -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/lib/index.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
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';
|
|
@@ -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,13 @@
|
|
|
1
|
+
import { InputProps } from 'antd/es/input';
|
|
2
|
+
import { FC, IglooComponentProps } from '../types';
|
|
3
|
+
import './style/index';
|
|
4
|
+
interface CardConfig {
|
|
5
|
+
name: string;
|
|
6
|
+
reg: string;
|
|
7
|
+
icon: any;
|
|
8
|
+
}
|
|
9
|
+
type Props = InputProps & IglooComponentProps & {
|
|
10
|
+
cardConfig?: CardConfig[];
|
|
11
|
+
};
|
|
12
|
+
declare const IglooCredit: FC<Props>;
|
|
13
|
+
export default IglooCredit;
|
|
@@ -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,14 @@
|
|
|
1
|
+
export { default as PhoneNumber } from './phone-number';
|
|
2
|
+
export { default as Amount } from './amount';
|
|
3
|
+
export { default as Email } from './email';
|
|
4
|
+
export { default as Password } from './password';
|
|
5
|
+
export { default as InputNumber } from './input-number';
|
|
6
|
+
export { default as TextArea } from './text-area';
|
|
7
|
+
export { default as InputDate } from './input-date';
|
|
8
|
+
export { default as CreditCard } from './credit-card';
|
|
9
|
+
export { default as Otp } from './otp';
|
|
10
|
+
export { default as ExpiryDate } from './expiry-date';
|
|
11
|
+
export { default as InputId } from './input-id';
|
|
12
|
+
import IglooInput from './input';
|
|
13
|
+
import './style';
|
|
14
|
+
export default IglooInput;
|
|
@@ -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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputProps as AntdInputProps } from 'antd/es/input';
|
|
3
|
+
import { FC, IglooComponentProps } from '../types';
|
|
4
|
+
import './style/index';
|
|
5
|
+
export type InputProps = AntdInputProps & IglooComponentProps & {
|
|
6
|
+
ref?: React.Ref<any>;
|
|
7
|
+
};
|
|
8
|
+
declare const IglooInput: FC<InputProps>;
|
|
9
|
+
export default IglooInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputProps } from './input';
|
|
2
|
+
import { FC, FormItemName } from '../types';
|
|
3
|
+
import './style/otp';
|
|
4
|
+
interface OtpProps extends InputProps {
|
|
5
|
+
sendOtp: (value: any) => any;
|
|
6
|
+
dependField: FormItemName;
|
|
7
|
+
countDownSeconds: number;
|
|
8
|
+
fireBaseId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Otp: FC<OtpProps>;
|
|
11
|
+
export default Otp;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { FC, IglooComponentProps } from '../types';
|
|
3
|
+
import './style/phone-number';
|
|
4
|
+
export interface PhoneNumberProps extends IglooComponentProps {
|
|
5
|
+
areaCode?: string | string[];
|
|
6
|
+
phoneNumber?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
value?: any;
|
|
11
|
+
onChange?: any;
|
|
12
|
+
}
|
|
13
|
+
declare const PhoneNumber: FC<PhoneNumberProps>;
|
|
14
|
+
export default PhoneNumber;
|