@redneckz/wildless-cms-uni-blocks 0.14.691 → 0.14.693
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/bundle/api/RetailAPI/updateUserTask.d.ts +3 -1
- package/bundle/api/dadataHints/dadataHintsType.d.ts +7 -1
- package/bundle/bundle.umd.js +41 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/FormField/Fields/AddressField.d.ts +18 -0
- package/bundle/ui-kit/FormField/Fields/CurrencyField.d.ts +5 -0
- package/dist/api/RetailAPI/updateUserTask.d.ts +3 -1
- package/dist/api/dadataHints/dadataHintsType.d.ts +7 -1
- package/dist/components/CreditCardForm/getCardData.js +1 -1
- package/dist/components/CreditCardForm/getCardData.js.map +1 -1
- package/dist/components/CreditCardForm/getFourthStepData.js +1 -1
- package/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/dist/components/CreditForm/getThirdStepData.js +1 -1
- package/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +11 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AddressField.d.ts +18 -0
- package/dist/ui-kit/FormField/Fields/AddressField.js +20 -18
- package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CurrencyField.d.ts +5 -0
- package/dist/ui-kit/FormField/Fields/CurrencyField.js +8 -2
- package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +2 -0
- package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/lib/api/RetailAPI/updateUserTask.d.ts +3 -1
- package/lib/api/dadataHints/dadataHintsType.d.ts +7 -1
- package/lib/components/CreditCardForm/getCardData.js +1 -1
- package/lib/components/CreditCardForm/getCardData.js.map +1 -1
- package/lib/components/CreditCardForm/getFourthStepData.js +1 -1
- package/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/lib/components/CreditForm/getThirdStepData.js +1 -1
- package/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +11 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AddressField.d.ts +18 -0
- package/lib/ui-kit/FormField/Fields/AddressField.js +18 -17
- package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CurrencyField.d.ts +5 -0
- package/lib/ui-kit/FormField/Fields/CurrencyField.js +7 -1
- package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +2 -0
- package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +3 -1
- package/mobile/bundle/api/dadataHints/dadataHintsType.d.ts +7 -1
- package/mobile/bundle/bundle.umd.js +41 -24
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/FormField/Fields/AddressField.d.ts +18 -0
- package/mobile/bundle/ui-kit/FormField/Fields/CurrencyField.d.ts +5 -0
- package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +3 -1
- package/mobile/dist/api/dadataHints/dadataHintsType.d.ts +7 -1
- package/mobile/dist/components/CreditCardForm/getCardData.js +1 -1
- package/mobile/dist/components/CreditCardForm/getCardData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getFourthStepData.js +1 -1
- package/mobile/dist/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.js +1 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +11 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressField.d.ts +18 -0
- package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +20 -18
- package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.d.ts +5 -0
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +8 -2
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +3 -1
- package/mobile/lib/api/dadataHints/dadataHintsType.d.ts +7 -1
- package/mobile/lib/components/CreditCardForm/getCardData.js +1 -1
- package/mobile/lib/components/CreditCardForm/getCardData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getFourthStepData.js +1 -1
- package/mobile/lib/components/CreditCardForm/getFourthStepData.js.map +1 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.js +1 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +11 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressField.d.ts +18 -0
- package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +18 -17
- package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.d.ts +5 -0
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +7 -1
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/src/api/RetailAPI/updateUserTask.ts +1 -1
- package/mobile/src/api/dadataHints/dadataHintsType.ts +8 -1
- package/mobile/src/components/CreditCardForm/getCardData.tsx +1 -1
- package/mobile/src/components/CreditCardForm/getFourthStepData.ts +1 -1
- package/mobile/src/components/CreditForm/getThirdStepData.ts +1 -1
- package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +1 -1
- package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +14 -2
- package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +19 -17
- package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +7 -1
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +4 -0
- package/package.json +1 -1
- package/src/api/RetailAPI/updateUserTask.ts +1 -1
- package/src/api/dadataHints/dadataHintsType.ts +8 -1
- package/src/components/CreditCardForm/getCardData.tsx +1 -1
- package/src/components/CreditCardForm/getFourthStepData.ts +1 -1
- package/src/components/CreditForm/getThirdStepData.ts +1 -1
- package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +1 -1
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +14 -2
- package/src/ui-kit/FormField/Fields/AddressField.tsx +19 -17
- package/src/ui-kit/FormField/Fields/CurrencyField.tsx +7 -1
- package/src/ui-kit/FormField/Fields/InnField.tsx +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/AddressField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACrE,MAAM,SAAS,GAAG,KAAK,EAAE,IAAI,IAAI,qBAAqB,CAAC;IACvD,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC;IAE1C,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,IAAsB,EAAE,EAAE;QAC5D,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"AddressField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/AddressField.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type RadioButtonItem } from '../../RadioButtonGroup/RadioButtonGroup';
|
|
2
2
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
3
|
+
export declare enum CurrencyCode {
|
|
4
|
+
'rub' = "810",
|
|
5
|
+
'dollar' = "840",
|
|
6
|
+
'euro' = "978"
|
|
7
|
+
}
|
|
3
8
|
export declare const CURRENCY_TYPES: RadioButtonItem[];
|
|
4
9
|
export declare const CurrencyField: import("@redneckz/uni-jsx").UNIComponent<CustomFieldProps, any, any>;
|
|
@@ -3,7 +3,13 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { RadioButtonGroupControl } from '../../RadioButtonGroup/RadioButtonGroupControl.js';
|
|
4
4
|
import { validatorObj } from '../getObjectValidator.js';
|
|
5
5
|
import { getValidation } from '../getValidation.js';
|
|
6
|
-
export
|
|
6
|
+
export var CurrencyCode;
|
|
7
|
+
(function (CurrencyCode) {
|
|
8
|
+
CurrencyCode["rub"] = "810";
|
|
9
|
+
CurrencyCode["dollar"] = "840";
|
|
10
|
+
CurrencyCode["euro"] = "978";
|
|
11
|
+
})(CurrencyCode || (CurrencyCode = {}));
|
|
12
|
+
export const CURRENCY_TYPES = [{ id: CurrencyCode.rub, text: 'Рубль' }];
|
|
7
13
|
export const CurrencyField = JSX(({ field, input }) => {
|
|
8
14
|
const { value, onChange } = field('currency');
|
|
9
15
|
return (_jsx(RadioButtonGroupControl, { label: "\u0412\u0430\u043B\u044E\u0442\u0430", orientation: "horizontal", items: CURRENCY_TYPES, value: value, onChange: (_) => onChange?.(_), ...getValidation(field('currency'), validatorObj.currency, input?.required) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/CurrencyField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"CurrencyField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/CurrencyField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,2BAAa,CAAA;IACb,8BAAgB,CAAA;IAChB,4BAAc,CAAA;AAChB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,EAAE,EAAE,EAAE,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACtE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IAE9C,OAAO,CACL,KAAC,uBAAuB,IACtB,KAAK,EAAC,sCAAQ,EACd,WAAW,EAAC,YAAY,EACxB,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAC1B,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,GAC5E,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -4,8 +4,10 @@ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
4
4
|
import { InputControl } from '../../Input/InputControl.js';
|
|
5
5
|
import { validatorObj } from '../getObjectValidator.js';
|
|
6
6
|
import { getValidation } from '../getValidation.js';
|
|
7
|
+
import { getAddressFromDaDataItem } from './AddressField.js';
|
|
7
8
|
export const InnField = JSX(({ field, input }) => {
|
|
8
9
|
const onDaDataChange = useCallback((item) => {
|
|
10
|
+
field?.('organizationAddress')?.onChange?.(getAddressFromDaDataItem(item.data?.address));
|
|
9
11
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
10
12
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
11
13
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/InnField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"InnField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/InnField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACjE,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,IAAsB,EAAE,EAAE;QAC5D,KAAK,EAAE,CAAC,qBAAqB,CAAC,EAAE,QAAQ,EAAE,CACxC,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,OAA2B,CAAC,CACjE,CAAC;QACF,KAAK,EAAE,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACzE,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,YAAY,IACX,KAAK,EAAC,oBAAK,EACX,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,EAAE,KACT,KAAK,KACL,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAClE,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -10,12 +10,14 @@ export interface DaDataSuggestion {
|
|
|
10
10
|
|
|
11
11
|
type DaDataGender = 'MALE' | 'FEMALE' | 'UNKNOWN';
|
|
12
12
|
|
|
13
|
+
type DaDataQC = '0' | '1';
|
|
14
|
+
|
|
13
15
|
interface DaDataFio {
|
|
14
16
|
surname: Nullable<string>;
|
|
15
17
|
name: Nullable<string>;
|
|
16
18
|
patronymic: Nullable<string>;
|
|
17
19
|
gender: DaDataGender;
|
|
18
|
-
qc:
|
|
20
|
+
qc: DaDataQC;
|
|
19
21
|
source: null;
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -30,6 +32,10 @@ interface DaDataPassportFms {
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
interface DaDataOrganization {
|
|
35
|
+
address: {
|
|
36
|
+
data: DaDataAddress;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
33
39
|
inn: string;
|
|
34
40
|
name: {
|
|
35
41
|
short_with_opf: string;
|
|
@@ -52,6 +58,7 @@ export interface DaDataAddress {
|
|
|
52
58
|
settlement_with_type: Nullable<string>;
|
|
53
59
|
street: Nullable<string>;
|
|
54
60
|
fias_code: string;
|
|
61
|
+
qc: DaDataQC;
|
|
55
62
|
qc_complete: Nullable<string>;
|
|
56
63
|
qc_house: Nullable<string>;
|
|
57
64
|
}
|
|
@@ -5,7 +5,7 @@ export const getCardData = (formData: FormState): Partial<Participant> => {
|
|
|
5
5
|
const { currency, paymentSystem, cardCategory, codeWord } = formData;
|
|
6
6
|
|
|
7
7
|
return {
|
|
8
|
-
currencyCode: currency,
|
|
8
|
+
currencyCode: currency ? { key: currency } : undefined,
|
|
9
9
|
paymentSystemTypeCd: paymentSystem,
|
|
10
10
|
classCard: cardCategory,
|
|
11
11
|
codeWord: codeWord,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { getLink } from '../../api/RetailAPI/getLink';
|
|
4
|
+
import { type FormState } from '../../components/ApplicationLeadForm/getInitialFormState';
|
|
4
5
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
6
|
+
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
5
7
|
import { Button } from '../Button/Button';
|
|
6
8
|
import { Dialog } from '../DialogManager/Dialog';
|
|
7
9
|
import { Img } from '../Img/Img';
|
|
@@ -12,6 +14,7 @@ export interface EsiaLoginDialogProps {
|
|
|
12
14
|
|
|
13
15
|
export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
14
16
|
const navigator = locationNavigator();
|
|
17
|
+
const [leadForm, setLeadForm] = useLocalStorage<FormState>('leadForm');
|
|
15
18
|
const handleAuth = useCallback(async () => {
|
|
16
19
|
const resp = await getLink({
|
|
17
20
|
redirectUri: navigator.href,
|
|
@@ -22,8 +25,17 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
|
22
25
|
}
|
|
23
26
|
}, []);
|
|
24
27
|
|
|
28
|
+
const handleClose = useCallback(() => {
|
|
29
|
+
if (leadForm !== null) {
|
|
30
|
+
const leadFormCopy = { ...leadForm };
|
|
31
|
+
Reflect.deleteProperty(leadFormCopy, 'esiaAccountTypeCd');
|
|
32
|
+
setLeadForm(leadFormCopy);
|
|
33
|
+
}
|
|
34
|
+
onClose?.();
|
|
35
|
+
}, []);
|
|
36
|
+
|
|
25
37
|
return (
|
|
26
|
-
<Dialog className="my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg" onClose={
|
|
38
|
+
<Dialog className="my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg" onClose={handleClose}>
|
|
27
39
|
<div className="flex flex-col gap-lg items-center rounded-md">
|
|
28
40
|
<div className="flex items-center justify-around w-full">
|
|
29
41
|
<ul className="list-disc">
|
|
@@ -37,7 +49,7 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
|
37
49
|
<Button type="button" onClick={handleAuth}>
|
|
38
50
|
Заполнить через Госуслуги
|
|
39
51
|
</Button>
|
|
40
|
-
<Button type="button" version="secondary" onClick={
|
|
52
|
+
<Button type="button" version="secondary" onClick={handleClose}>
|
|
41
53
|
Пропустить
|
|
42
54
|
</Button>
|
|
43
55
|
</div>
|
|
@@ -12,23 +12,7 @@ export const AddressField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
12
12
|
const fieldValue = field(fieldName).value;
|
|
13
13
|
|
|
14
14
|
const onDaDataChange = useCallback((item: DaDataSuggestion) => {
|
|
15
|
-
field?.(fieldName)?.onChange?.(
|
|
16
|
-
apartment: item?.data?.flat,
|
|
17
|
-
city: item?.data?.city,
|
|
18
|
-
district: item?.data?.area_with_type,
|
|
19
|
-
fullAddress: item?.value,
|
|
20
|
-
fiasCode: item?.data?.fias_id,
|
|
21
|
-
house: item?.data?.house,
|
|
22
|
-
locality: item?.data?.settlement_with_type,
|
|
23
|
-
okatoRegionCode: item?.data?.okato,
|
|
24
|
-
postcode: item?.data?.postal_code,
|
|
25
|
-
region: item?.data?.region,
|
|
26
|
-
regionCode: item?.data?.region_kladr_id ? item?.data?.region_kladr_id.substring(0, 2) : '',
|
|
27
|
-
street: item?.data?.house,
|
|
28
|
-
qc: item?.data?.qc,
|
|
29
|
-
qcComplete: item?.data?.qc_complete,
|
|
30
|
-
qcHouse: item?.data?.qc_house,
|
|
31
|
-
});
|
|
15
|
+
field?.(fieldName)?.onChange?.(getAddressFromDaDataItem(item));
|
|
32
16
|
}, []);
|
|
33
17
|
|
|
34
18
|
const onChange = useCallback((value: string) => {
|
|
@@ -63,3 +47,21 @@ export const AddressField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
63
47
|
/>
|
|
64
48
|
);
|
|
65
49
|
});
|
|
50
|
+
|
|
51
|
+
export const getAddressFromDaDataItem = (item?: DaDataSuggestion) => ({
|
|
52
|
+
apartment: item?.data?.flat,
|
|
53
|
+
city: item?.data?.city,
|
|
54
|
+
district: item?.data?.area_with_type,
|
|
55
|
+
fullAddress: item?.value,
|
|
56
|
+
fiasCode: item?.data?.fias_id,
|
|
57
|
+
house: item?.data?.house,
|
|
58
|
+
locality: item?.data?.settlement_with_type,
|
|
59
|
+
okatoRegionCode: item?.data?.okato,
|
|
60
|
+
postcode: item?.data?.postal_code,
|
|
61
|
+
region: item?.data?.region,
|
|
62
|
+
regionCode: item?.data?.region_kladr_id ? item?.data?.region_kladr_id.substring(0, 2) : '',
|
|
63
|
+
street: item?.data?.house,
|
|
64
|
+
qc: item?.data?.qc,
|
|
65
|
+
qcComplete: item?.data?.qc_complete,
|
|
66
|
+
qcHouse: item?.data?.qc_house,
|
|
67
|
+
});
|
|
@@ -5,7 +5,13 @@ import { type CustomFieldProps } from '../CustomFieldProps';
|
|
|
5
5
|
import { validatorObj } from '../getObjectValidator';
|
|
6
6
|
import { getValidation } from '../getValidation';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export enum CurrencyCode {
|
|
9
|
+
'rub' = '810',
|
|
10
|
+
'dollar' = '840',
|
|
11
|
+
'euro' = '978',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CURRENCY_TYPES: RadioButtonItem[] = [{ id: CurrencyCode.rub, text: 'Рубль' }];
|
|
9
15
|
|
|
10
16
|
export const CurrencyField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
11
17
|
const { value, onChange } = field('currency');
|
|
@@ -5,9 +5,13 @@ import { InputControl } from '../../Input/InputControl';
|
|
|
5
5
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
6
6
|
import { validatorObj } from '../getObjectValidator';
|
|
7
7
|
import { getValidation } from '../getValidation';
|
|
8
|
+
import { getAddressFromDaDataItem } from './AddressField';
|
|
8
9
|
|
|
9
10
|
export const InnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
10
11
|
const onDaDataChange = useCallback((item: DaDataSuggestion) => {
|
|
12
|
+
field?.('organizationAddress')?.onChange?.(
|
|
13
|
+
getAddressFromDaDataItem(item.data?.address as DaDataSuggestion),
|
|
14
|
+
);
|
|
11
15
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
12
16
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
13
17
|
}, []);
|
package/package.json
CHANGED
|
@@ -10,12 +10,14 @@ export interface DaDataSuggestion {
|
|
|
10
10
|
|
|
11
11
|
type DaDataGender = 'MALE' | 'FEMALE' | 'UNKNOWN';
|
|
12
12
|
|
|
13
|
+
type DaDataQC = '0' | '1';
|
|
14
|
+
|
|
13
15
|
interface DaDataFio {
|
|
14
16
|
surname: Nullable<string>;
|
|
15
17
|
name: Nullable<string>;
|
|
16
18
|
patronymic: Nullable<string>;
|
|
17
19
|
gender: DaDataGender;
|
|
18
|
-
qc:
|
|
20
|
+
qc: DaDataQC;
|
|
19
21
|
source: null;
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -30,6 +32,10 @@ interface DaDataPassportFms {
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
interface DaDataOrganization {
|
|
35
|
+
address: {
|
|
36
|
+
data: DaDataAddress;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
33
39
|
inn: string;
|
|
34
40
|
name: {
|
|
35
41
|
short_with_opf: string;
|
|
@@ -52,6 +58,7 @@ export interface DaDataAddress {
|
|
|
52
58
|
settlement_with_type: Nullable<string>;
|
|
53
59
|
street: Nullable<string>;
|
|
54
60
|
fias_code: string;
|
|
61
|
+
qc: DaDataQC;
|
|
55
62
|
qc_complete: Nullable<string>;
|
|
56
63
|
qc_house: Nullable<string>;
|
|
57
64
|
}
|
|
@@ -5,7 +5,7 @@ export const getCardData = (formData: FormState): Partial<Participant> => {
|
|
|
5
5
|
const { currency, paymentSystem, cardCategory, codeWord } = formData;
|
|
6
6
|
|
|
7
7
|
return {
|
|
8
|
-
currencyCode: currency,
|
|
8
|
+
currencyCode: currency ? { key: currency } : undefined,
|
|
9
9
|
paymentSystemTypeCd: paymentSystem,
|
|
10
10
|
classCard: cardCategory,
|
|
11
11
|
codeWord: codeWord,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { getLink } from '../../api/RetailAPI/getLink';
|
|
4
|
+
import { type FormState } from '../../components/ApplicationLeadForm/getInitialFormState';
|
|
4
5
|
import { locationNavigator } from '../../external/locationNavigator';
|
|
6
|
+
import { useLocalStorage } from '../../hooks/useLocalStorage';
|
|
5
7
|
import { Button } from '../Button/Button';
|
|
6
8
|
import { Dialog } from '../DialogManager/Dialog';
|
|
7
9
|
import { Img } from '../Img/Img';
|
|
@@ -12,6 +14,7 @@ export interface EsiaLoginDialogProps {
|
|
|
12
14
|
|
|
13
15
|
export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
14
16
|
const navigator = locationNavigator();
|
|
17
|
+
const [leadForm, setLeadForm] = useLocalStorage<FormState>('leadForm');
|
|
15
18
|
const handleAuth = useCallback(async () => {
|
|
16
19
|
const resp = await getLink({
|
|
17
20
|
redirectUri: navigator.href,
|
|
@@ -22,8 +25,17 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
|
22
25
|
}
|
|
23
26
|
}, []);
|
|
24
27
|
|
|
28
|
+
const handleClose = useCallback(() => {
|
|
29
|
+
if (leadForm !== null) {
|
|
30
|
+
const leadFormCopy = { ...leadForm };
|
|
31
|
+
Reflect.deleteProperty(leadFormCopy, 'esiaAccountTypeCd');
|
|
32
|
+
setLeadForm(leadFormCopy);
|
|
33
|
+
}
|
|
34
|
+
onClose?.();
|
|
35
|
+
}, []);
|
|
36
|
+
|
|
25
37
|
return (
|
|
26
|
-
<Dialog className="my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg" onClose={
|
|
38
|
+
<Dialog className="my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg" onClose={handleClose}>
|
|
27
39
|
<div className="flex flex-col gap-lg items-center rounded-md">
|
|
28
40
|
<div className="flex items-center justify-around w-full">
|
|
29
41
|
<ul className="list-disc">
|
|
@@ -37,7 +49,7 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
|
37
49
|
<Button type="button" onClick={handleAuth}>
|
|
38
50
|
Заполнить через Госуслуги
|
|
39
51
|
</Button>
|
|
40
|
-
<Button type="button" version="secondary" onClick={
|
|
52
|
+
<Button type="button" version="secondary" onClick={handleClose}>
|
|
41
53
|
Пропустить
|
|
42
54
|
</Button>
|
|
43
55
|
</div>
|
|
@@ -12,23 +12,7 @@ export const AddressField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
12
12
|
const fieldValue = field(fieldName).value;
|
|
13
13
|
|
|
14
14
|
const onDaDataChange = useCallback((item: DaDataSuggestion) => {
|
|
15
|
-
field?.(fieldName)?.onChange?.(
|
|
16
|
-
apartment: item?.data?.flat,
|
|
17
|
-
city: item?.data?.city,
|
|
18
|
-
district: item?.data?.area_with_type,
|
|
19
|
-
fullAddress: item?.value,
|
|
20
|
-
fiasCode: item?.data?.fias_id,
|
|
21
|
-
house: item?.data?.house,
|
|
22
|
-
locality: item?.data?.settlement_with_type,
|
|
23
|
-
okatoRegionCode: item?.data?.okato,
|
|
24
|
-
postcode: item?.data?.postal_code,
|
|
25
|
-
region: item?.data?.region,
|
|
26
|
-
regionCode: item?.data?.region_kladr_id ? item?.data?.region_kladr_id.substring(0, 2) : '',
|
|
27
|
-
street: item?.data?.house,
|
|
28
|
-
qc: item?.data?.qc,
|
|
29
|
-
qcComplete: item?.data?.qc_complete,
|
|
30
|
-
qcHouse: item?.data?.qc_house,
|
|
31
|
-
});
|
|
15
|
+
field?.(fieldName)?.onChange?.(getAddressFromDaDataItem(item));
|
|
32
16
|
}, []);
|
|
33
17
|
|
|
34
18
|
const onChange = useCallback((value: string) => {
|
|
@@ -63,3 +47,21 @@ export const AddressField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
63
47
|
/>
|
|
64
48
|
);
|
|
65
49
|
});
|
|
50
|
+
|
|
51
|
+
export const getAddressFromDaDataItem = (item?: DaDataSuggestion) => ({
|
|
52
|
+
apartment: item?.data?.flat,
|
|
53
|
+
city: item?.data?.city,
|
|
54
|
+
district: item?.data?.area_with_type,
|
|
55
|
+
fullAddress: item?.value,
|
|
56
|
+
fiasCode: item?.data?.fias_id,
|
|
57
|
+
house: item?.data?.house,
|
|
58
|
+
locality: item?.data?.settlement_with_type,
|
|
59
|
+
okatoRegionCode: item?.data?.okato,
|
|
60
|
+
postcode: item?.data?.postal_code,
|
|
61
|
+
region: item?.data?.region,
|
|
62
|
+
regionCode: item?.data?.region_kladr_id ? item?.data?.region_kladr_id.substring(0, 2) : '',
|
|
63
|
+
street: item?.data?.house,
|
|
64
|
+
qc: item?.data?.qc,
|
|
65
|
+
qcComplete: item?.data?.qc_complete,
|
|
66
|
+
qcHouse: item?.data?.qc_house,
|
|
67
|
+
});
|
|
@@ -5,7 +5,13 @@ import { type CustomFieldProps } from '../CustomFieldProps';
|
|
|
5
5
|
import { validatorObj } from '../getObjectValidator';
|
|
6
6
|
import { getValidation } from '../getValidation';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export enum CurrencyCode {
|
|
9
|
+
'rub' = '810',
|
|
10
|
+
'dollar' = '840',
|
|
11
|
+
'euro' = '978',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CURRENCY_TYPES: RadioButtonItem[] = [{ id: CurrencyCode.rub, text: 'Рубль' }];
|
|
9
15
|
|
|
10
16
|
export const CurrencyField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
11
17
|
const { value, onChange } = field('currency');
|
|
@@ -5,9 +5,13 @@ import { InputControl } from '../../Input/InputControl';
|
|
|
5
5
|
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
6
6
|
import { validatorObj } from '../getObjectValidator';
|
|
7
7
|
import { getValidation } from '../getValidation';
|
|
8
|
+
import { getAddressFromDaDataItem } from './AddressField';
|
|
8
9
|
|
|
9
10
|
export const InnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
10
11
|
const onDaDataChange = useCallback((item: DaDataSuggestion) => {
|
|
12
|
+
field?.('organizationAddress')?.onChange?.(
|
|
13
|
+
getAddressFromDaDataItem(item.data?.address as DaDataSuggestion),
|
|
14
|
+
);
|
|
11
15
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
12
16
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
13
17
|
}, []);
|