@redneckz/wildless-cms-uni-blocks 0.16.2-credit → 0.16.3-credit
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/bundle.umd.js +12 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/retail/components/Fields/DaDataInnField.js +10 -3
- package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/retail/components/Fields/DaDataInnField.js +10 -3
- package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +12 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/retail/components/Fields/DaDataInnField.js +10 -3
- package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/DaDataInnField.js +10 -3
- package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/src/retail/components/Fields/DaDataInnField.tsx +14 -6
- package/package.json +1 -1
- package/src/retail/components/Fields/DaDataInnField.tsx +14 -6
|
@@ -17,9 +17,7 @@ exports.DaDataInnField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
|
17
17
|
(0, updateOrganizationFields_1.updateOrganizationFields)(store, field, item);
|
|
18
18
|
}, []);
|
|
19
19
|
(0, hooks_1.useEffect)(() => {
|
|
20
|
-
if (!esiaAccountTypeCd ||
|
|
21
|
-
!inn ||
|
|
22
|
-
!(employerActivities && employerOrganization && organization && amountWorkers)) {
|
|
20
|
+
if (!esiaAccountTypeCd || !inn || !isDictionariesAlreadyLoad(store)) {
|
|
23
21
|
return;
|
|
24
22
|
}
|
|
25
23
|
(async () => {
|
|
@@ -31,4 +29,13 @@ exports.DaDataInnField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
|
31
29
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
32
30
|
return ((0, jsx_runtime_1.jsx)(DaDataInputControl_1.DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: (0, isEsiaAuthorize_1.isEsiaAuthorize)(field, input) }));
|
|
33
31
|
});
|
|
32
|
+
const isDictionariesAlreadyLoad = (store) => {
|
|
33
|
+
const { employerActivities, employerOrganization, organization, amountWorkers, productType } = store;
|
|
34
|
+
return [
|
|
35
|
+
employerOrganization,
|
|
36
|
+
organization,
|
|
37
|
+
amountWorkers,
|
|
38
|
+
productType === 'creditCard' ? employerActivities : true,
|
|
39
|
+
].every(Boolean);
|
|
40
|
+
};
|
|
34
41
|
//# sourceMappingURL=DaDataInnField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaDataInnField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/DaDataInnField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAqE;AAGrE,6EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"DaDataInnField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/DaDataInnField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAqE;AAGrE,6EAA0E;AAC1E,uEAA+F;AAC/F,iEAA8D;AAC9D,mFAAgF;AAChF,iFAA8E;AAEjE,QAAA,cAAc,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACvE,MAAM,KAAK,GAAG,IAAA,uCAAkB,GAAE,CAAC;IACnC,MAAM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACxF,MAAM,iBAAiB,GAAG,KAAK,EAAE,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC9D,MAAM,GAAG,GAAG,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAElC,MAAM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O,CAAC,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -15,9 +15,7 @@ export const DaDataInnField = JSX(({ field, input }) => {
|
|
|
15
15
|
updateOrganizationFields(store, field, item);
|
|
16
16
|
}, []);
|
|
17
17
|
useEffect(() => {
|
|
18
|
-
if (!esiaAccountTypeCd ||
|
|
19
|
-
!inn ||
|
|
20
|
-
!(employerActivities && employerOrganization && organization && amountWorkers)) {
|
|
18
|
+
if (!esiaAccountTypeCd || !inn || !isDictionariesAlreadyLoad(store)) {
|
|
21
19
|
return;
|
|
22
20
|
}
|
|
23
21
|
(async () => {
|
|
@@ -29,4 +27,13 @@ export const DaDataInnField = JSX(({ field, input }) => {
|
|
|
29
27
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
30
28
|
return (_jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input) }));
|
|
31
29
|
});
|
|
30
|
+
const isDictionariesAlreadyLoad = (store) => {
|
|
31
|
+
const { employerActivities, employerOrganization, organization, amountWorkers, productType } = store;
|
|
32
|
+
return [
|
|
33
|
+
employerOrganization,
|
|
34
|
+
organization,
|
|
35
|
+
amountWorkers,
|
|
36
|
+
productType === 'creditCard' ? employerActivities : true,
|
|
37
|
+
].every(Boolean);
|
|
38
|
+
};
|
|
32
39
|
//# sourceMappingURL=DaDataInnField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaDataInnField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/DaDataInnField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{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AC,CAAC;YACrE,IAAI,gBAAgB,EAAE;gBACpB,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC;aAC1D;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;IAE5E,OAAO,CACL,KAAC,kBAAkB,IACjB,KAAK,EAAC,oBAAK,EACX,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,EAAE,KACT,KAAK,KACL,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,EAC5B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,GACvC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,yBAAyB,GAAG,CAAC,KAA2B,EAAE,EAAE;IAChE,MAAM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,GAC1F,KAAK,CAAC;IAER,OAAO;QACL,oBAAoB;QACpB,YAAY;QACZ,aAAa;QACb,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
4
|
import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
|
|
5
5
|
import { getOrganizationFromInn } from '../../api/getOrganizationFromInn';
|
|
6
|
-
import { useRetailFormStore } from '../../hooks/useRetailFormStore';
|
|
6
|
+
import { useRetailFormStore, type CreditFormStoreSlice } from '../../hooks/useRetailFormStore';
|
|
7
7
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
8
8
|
import { updateOrganizationFields } from '../../utils/updateOrganizationFields';
|
|
9
9
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -19,11 +19,7 @@ export const DaDataInnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
19
19
|
}, []);
|
|
20
20
|
|
|
21
21
|
useEffect(() => {
|
|
22
|
-
if (
|
|
23
|
-
!esiaAccountTypeCd ||
|
|
24
|
-
!inn ||
|
|
25
|
-
!(employerActivities && employerOrganization && organization && amountWorkers)
|
|
26
|
-
) {
|
|
22
|
+
if (!esiaAccountTypeCd || !inn || !isDictionariesAlreadyLoad(store as CreditFormStoreSlice)) {
|
|
27
23
|
return;
|
|
28
24
|
}
|
|
29
25
|
(async () => {
|
|
@@ -46,3 +42,15 @@ export const DaDataInnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
46
42
|
/>
|
|
47
43
|
);
|
|
48
44
|
});
|
|
45
|
+
|
|
46
|
+
const isDictionariesAlreadyLoad = (store: CreditFormStoreSlice) => {
|
|
47
|
+
const { employerActivities, employerOrganization, organization, amountWorkers, productType } =
|
|
48
|
+
store;
|
|
49
|
+
|
|
50
|
+
return [
|
|
51
|
+
employerOrganization,
|
|
52
|
+
organization,
|
|
53
|
+
amountWorkers,
|
|
54
|
+
productType === 'creditCard' ? employerActivities : true,
|
|
55
|
+
].every(Boolean);
|
|
56
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
4
|
import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
|
|
5
5
|
import { getOrganizationFromInn } from '../../api/getOrganizationFromInn';
|
|
6
|
-
import { useRetailFormStore } from '../../hooks/useRetailFormStore';
|
|
6
|
+
import { useRetailFormStore, type CreditFormStoreSlice } from '../../hooks/useRetailFormStore';
|
|
7
7
|
import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
|
|
8
8
|
import { updateOrganizationFields } from '../../utils/updateOrganizationFields';
|
|
9
9
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
@@ -19,11 +19,7 @@ export const DaDataInnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
19
19
|
}, []);
|
|
20
20
|
|
|
21
21
|
useEffect(() => {
|
|
22
|
-
if (
|
|
23
|
-
!esiaAccountTypeCd ||
|
|
24
|
-
!inn ||
|
|
25
|
-
!(employerActivities && employerOrganization && organization && amountWorkers)
|
|
26
|
-
) {
|
|
22
|
+
if (!esiaAccountTypeCd || !inn || !isDictionariesAlreadyLoad(store as CreditFormStoreSlice)) {
|
|
27
23
|
return;
|
|
28
24
|
}
|
|
29
25
|
(async () => {
|
|
@@ -46,3 +42,15 @@ export const DaDataInnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
46
42
|
/>
|
|
47
43
|
);
|
|
48
44
|
});
|
|
45
|
+
|
|
46
|
+
const isDictionariesAlreadyLoad = (store: CreditFormStoreSlice) => {
|
|
47
|
+
const { employerActivities, employerOrganization, organization, amountWorkers, productType } =
|
|
48
|
+
store;
|
|
49
|
+
|
|
50
|
+
return [
|
|
51
|
+
employerOrganization,
|
|
52
|
+
organization,
|
|
53
|
+
amountWorkers,
|
|
54
|
+
productType === 'creditCard' ? employerActivities : true,
|
|
55
|
+
].every(Boolean);
|
|
56
|
+
};
|