@redneckz/wildless-cms-uni-blocks 0.10.8 → 0.10.10
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/bin/migration-scripts/0.10.10.js +44 -0
- package/bundle/bundle.umd.js +149 -150
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Filtration/FiltrationContent.d.ts +2 -6
- package/bundle/components/OfficeMap/useOfficeMap.d.ts +2 -0
- package/bundle/hooks/useForm.d.ts +8 -4
- package/bundle/hooks/useNormalizedInput.d.ts +11 -0
- package/bundle/ui-kit/ControlProps.d.ts +1 -1
- package/bundle/ui-kit/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/bundle/ui-kit/Input/Input.d.ts +1 -1
- package/bundle/ui-kit/Input/InputProps.d.ts +4 -5
- package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +2 -4
- package/bundle/ui-kit/NumberInput/NumberInput.d.ts +8 -0
- package/bundle/ui-kit/PhoneInput/PhoneInput.d.ts +1 -1
- package/bundle/utils/appendSlash.d.ts +1 -0
- package/bundle/utils/identity.d.ts +1 -0
- package/bundle/utils/toLocalNumberFormat.d.ts +1 -0
- package/dist/ProjectSettings.js +3 -3
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/dist/components/Calculator/CalculatorValueBlock.js +2 -2
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/renderInitialFeeInput.js +3 -3
- package/dist/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/dist/components/Calculator/renderProposal.js +2 -2
- package/dist/components/Calculator/renderProposal.js.map +1 -1
- package/dist/components/Calculator/renderRealEstateValue.js +2 -2
- package/dist/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/dist/components/Calculator/renderWantedSumInput.js +3 -3
- package/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/CardTransfer/CardTransfer.js +10 -8
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.page.json +0 -1
- package/dist/components/Filtration/Filtration.js +1 -1
- package/dist/components/Filtration/Filtration.js.map +1 -1
- package/dist/components/Filtration/FiltrationContent.d.ts +2 -6
- package/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/OfficeMap/OfficeMap.js +2 -2
- package/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/dist/components/OfficeMap/useOfficeMap.d.ts +2 -0
- package/dist/components/OfficeMap/useOfficeMap.js +1 -2
- package/dist/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +2 -2
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/hooks/useForm.d.ts +8 -4
- package/dist/hooks/useForm.js +5 -3
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/hooks/useNormalizedInput.d.ts +11 -0
- package/dist/hooks/useNormalizedInput.js +23 -0
- package/dist/hooks/useNormalizedInput.js.map +1 -0
- package/dist/hooks/useSWRResource.js +2 -1
- package/dist/hooks/useSWRResource.js.map +1 -1
- package/dist/services/search/useSearch.js +3 -2
- package/dist/services/search/useSearch.js.map +1 -1
- package/dist/ui-kit/ControlProps.d.ts +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js +3 -16
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/dist/ui-kit/Input/Input.d.ts +1 -1
- package/dist/ui-kit/Input/Input.js +3 -2
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +4 -5
- package/dist/ui-kit/InputRange/InputRange.js +9 -11
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRangeProps.d.ts +2 -4
- package/dist/ui-kit/NumberInput/NumberInput.d.ts +8 -0
- package/dist/ui-kit/NumberInput/NumberInput.js +22 -0
- package/dist/ui-kit/NumberInput/NumberInput.js.map +1 -0
- package/dist/ui-kit/PhoneInput/PhoneInput.d.ts +1 -1
- package/dist/ui-kit/PhoneInput/PhoneInput.js +2 -2
- package/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.js +2 -1
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +5 -3
- package/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
- package/dist/utils/appendSlash.d.ts +1 -0
- package/dist/utils/appendSlash.js +5 -0
- package/dist/utils/appendSlash.js.map +1 -0
- package/dist/utils/identity.d.ts +1 -0
- package/dist/utils/identity.js +5 -0
- package/dist/utils/identity.js.map +1 -0
- package/dist/utils/toLocalNumberFormat.d.ts +1 -0
- package/dist/utils/toLocalNumberFormat.js +8 -0
- package/dist/utils/toLocalNumberFormat.js.map +1 -0
- package/lib/ProjectSettings.js +1 -1
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/lib/components/Calculator/CalculatorValueBlock.js +2 -2
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/renderInitialFeeInput.js +3 -3
- package/lib/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/lib/components/Calculator/renderProposal.js +2 -2
- package/lib/components/Calculator/renderProposal.js.map +1 -1
- package/lib/components/Calculator/renderRealEstateValue.js +2 -2
- package/lib/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/lib/components/Calculator/renderWantedSumInput.js +3 -3
- package/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +10 -8
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +1 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.fixture.d.ts +1 -0
- package/lib/components/CarouselEventCard/CarouselEventCard.fixture.d.ts +1 -0
- package/lib/components/CarouselLinks/CarouselLinks.fixture.d.ts +1 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +1 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +1 -0
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.fixture.d.ts +1 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.d.ts +1 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.d.ts +1 -0
- package/lib/components/ContentPage/ContentPage.page.json +0 -1
- package/lib/components/Filtration/Filtration.fixture.d.ts +1 -0
- package/lib/components/Filtration/Filtration.js +1 -1
- package/lib/components/Filtration/Filtration.js.map +1 -1
- package/lib/components/Filtration/FiltrationContent.d.ts +2 -6
- package/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/OfficeMap/OfficeMap.js +2 -2
- package/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/lib/components/OfficeMap/useOfficeMap.d.ts +2 -0
- package/lib/components/OfficeMap/useOfficeMap.js +1 -2
- package/lib/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +2 -2
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.fixture.d.ts +1 -0
- package/lib/components/RollupItem/RollupItem.fixture.mobile.d.ts +1 -0
- package/lib/components/SwipeListControlBlock/SwipeListControlBlock.fixture.d.ts +1 -0
- package/lib/components/Video/Video.fixture.d.ts +1 -0
- package/lib/hooks/useForm.d.ts +8 -4
- package/lib/hooks/useForm.js +5 -3
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useNormalizedInput.d.ts +11 -0
- package/lib/hooks/useNormalizedInput.js +20 -0
- package/lib/hooks/useNormalizedInput.js.map +1 -0
- package/lib/hooks/useSWRResource.js +2 -1
- package/lib/hooks/useSWRResource.js.map +1 -1
- package/lib/services/search/useSearch.js +3 -2
- package/lib/services/search/useSearch.js.map +1 -1
- package/lib/ui-kit/ControlProps.d.ts +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js +3 -16
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.fixture.d.ts +1 -0
- package/lib/ui-kit/Heading/Heading.fixture.mobile.d.ts +1 -0
- package/lib/ui-kit/Input/Input.d.ts +1 -1
- package/lib/ui-kit/Input/Input.js +3 -2
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +4 -5
- package/lib/ui-kit/InputRange/InputRange.js +10 -12
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRangeProps.d.ts +2 -4
- package/lib/ui-kit/LinkButton/LinkButton.fixture.d.ts +1 -0
- package/lib/ui-kit/NumberInput/NumberInput.d.ts +8 -0
- package/lib/ui-kit/NumberInput/NumberInput.fixture.d.ts +7 -0
- package/lib/ui-kit/NumberInput/NumberInput.js +20 -0
- package/lib/ui-kit/NumberInput/NumberInput.js.map +1 -0
- package/lib/ui-kit/PhoneInput/PhoneInput.d.ts +1 -1
- package/lib/ui-kit/PhoneInput/PhoneInput.js +2 -2
- package/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/lib/ui-kit/RichText/RichText.fixture.d.ts +1 -0
- package/lib/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/lib/ui-kit/Select/Select.fixture.d.ts +1 -0
- package/lib/ui-kit/Sitemap/Sitemap.js +2 -1
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/ui-kit/SlideCheckbox/SlideCheckbox.fixture.d.ts +1 -0
- package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +5 -3
- package/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
- package/lib/ui-kit/Tags/Tags.fixture.d.ts +1 -0
- package/lib/utils/appendSlash.d.ts +1 -0
- package/lib/utils/appendSlash.js +2 -0
- package/lib/utils/appendSlash.js.map +1 -0
- package/lib/utils/identity.d.ts +1 -0
- package/lib/utils/identity.js +2 -0
- package/lib/utils/identity.js.map +1 -0
- package/lib/utils/toLocalNumberFormat.d.ts +1 -0
- package/lib/utils/toLocalNumberFormat.js +5 -0
- package/lib/utils/toLocalNumberFormat.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +47 -41
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Filtration/FiltrationContent.d.ts +2 -6
- package/mobile/bundle/components/OfficeMap/useOfficeMap.d.ts +2 -0
- package/mobile/bundle/hooks/useForm.d.ts +8 -4
- package/mobile/bundle/hooks/useNormalizedInput.d.ts +11 -0
- package/mobile/bundle/ui-kit/ControlProps.d.ts +1 -1
- package/mobile/bundle/ui-kit/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/mobile/bundle/ui-kit/Input/Input.d.ts +1 -1
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +4 -5
- package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +2 -4
- package/mobile/bundle/ui-kit/NumberInput/NumberInput.d.ts +8 -0
- package/mobile/bundle/ui-kit/PhoneInput/PhoneInput.d.ts +1 -1
- package/mobile/bundle/utils/appendSlash.d.ts +1 -0
- package/mobile/bundle/utils/identity.d.ts +1 -0
- package/mobile/bundle/utils/toLocalNumberFormat.d.ts +1 -0
- package/mobile/dist/ProjectSettings.js +3 -3
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +2 -2
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js +3 -3
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderProposal.js +2 -2
- package/mobile/dist/components/Calculator/renderProposal.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRealEstateValue.js +2 -2
- package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/mobile/dist/components/Calculator/renderWantedSumInput.js +3 -3
- package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js +10 -8
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.page.json +0 -1
- package/mobile/dist/components/Filtration/Filtration.js +1 -1
- package/mobile/dist/components/Filtration/Filtration.js.map +1 -1
- package/mobile/dist/components/Filtration/FiltrationContent.d.ts +2 -6
- package/mobile/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/OfficeMap/OfficeMap.js +2 -2
- package/mobile/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/dist/components/OfficeMap/useOfficeMap.d.ts +2 -0
- package/mobile/dist/components/OfficeMap/useOfficeMap.js +1 -2
- package/mobile/dist/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +2 -2
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/hooks/useForm.d.ts +8 -4
- package/mobile/dist/hooks/useForm.js +5 -3
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/hooks/useNormalizedInput.d.ts +11 -0
- package/mobile/dist/hooks/useNormalizedInput.js +23 -0
- package/mobile/dist/hooks/useNormalizedInput.js.map +1 -0
- package/mobile/dist/hooks/useSWRResource.js +2 -1
- package/mobile/dist/hooks/useSWRResource.js.map +1 -1
- package/mobile/dist/services/search/useSearch.js +3 -2
- package/mobile/dist/services/search/useSearch.js.map +1 -1
- package/mobile/dist/ui-kit/ControlProps.d.ts +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +3 -16
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.d.ts +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +3 -2
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +4 -5
- package/mobile/dist/ui-kit/InputRange/InputRange.js +9 -11
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +2 -4
- package/mobile/dist/ui-kit/NumberInput/NumberInput.d.ts +8 -0
- package/mobile/dist/ui-kit/NumberInput/NumberInput.js +22 -0
- package/mobile/dist/ui-kit/NumberInput/NumberInput.js.map +1 -0
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.d.ts +1 -1
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js +2 -2
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +2 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +5 -3
- package/mobile/dist/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
- package/mobile/dist/utils/appendSlash.d.ts +1 -0
- package/mobile/dist/utils/appendSlash.js +5 -0
- package/mobile/dist/utils/appendSlash.js.map +1 -0
- package/mobile/dist/utils/identity.d.ts +1 -0
- package/mobile/dist/utils/identity.js +5 -0
- package/mobile/dist/utils/identity.js.map +1 -0
- package/mobile/dist/utils/toLocalNumberFormat.d.ts +1 -0
- package/mobile/dist/utils/toLocalNumberFormat.js +8 -0
- package/mobile/dist/utils/toLocalNumberFormat.js.map +1 -0
- package/mobile/lib/ProjectSettings.js +1 -1
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderBusinessCardDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +2 -2
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js +3 -3
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderProposal.js +2 -2
- package/mobile/lib/components/Calculator/renderProposal.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRealEstateValue.js +2 -2
- package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +1 -1
- package/mobile/lib/components/Calculator/renderWantedSumInput.js +3 -3
- package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js +10 -8
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.page.json +0 -1
- package/mobile/lib/components/Filtration/Filtration.js +1 -1
- package/mobile/lib/components/Filtration/Filtration.js.map +1 -1
- package/mobile/lib/components/Filtration/FiltrationContent.d.ts +2 -6
- package/mobile/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/OfficeMap/OfficeMap.js +2 -2
- package/mobile/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/lib/components/OfficeMap/useOfficeMap.d.ts +2 -0
- package/mobile/lib/components/OfficeMap/useOfficeMap.js +1 -2
- package/mobile/lib/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +2 -2
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/hooks/useForm.d.ts +8 -4
- package/mobile/lib/hooks/useForm.js +5 -3
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/hooks/useNormalizedInput.d.ts +11 -0
- package/mobile/lib/hooks/useNormalizedInput.js +20 -0
- package/mobile/lib/hooks/useNormalizedInput.js.map +1 -0
- package/mobile/lib/hooks/useSWRResource.js +2 -1
- package/mobile/lib/hooks/useSWRResource.js.map +1 -1
- package/mobile/lib/services/search/useSearch.js +3 -2
- package/mobile/lib/services/search/useSearch.js.map +1 -1
- package/mobile/lib/ui-kit/ControlProps.d.ts +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +3 -16
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.d.ts +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +3 -2
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +4 -5
- package/mobile/lib/ui-kit/InputRange/InputRange.js +10 -12
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +2 -4
- package/mobile/lib/ui-kit/NumberInput/NumberInput.d.ts +8 -0
- package/mobile/lib/ui-kit/NumberInput/NumberInput.js +20 -0
- package/mobile/lib/ui-kit/NumberInput/NumberInput.js.map +1 -0
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.d.ts +1 -1
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js +2 -2
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +2 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js +5 -3
- package/mobile/lib/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.js.map +1 -1
- package/mobile/lib/utils/appendSlash.d.ts +1 -0
- package/mobile/lib/utils/appendSlash.js +2 -0
- package/mobile/lib/utils/appendSlash.js.map +1 -0
- package/mobile/lib/utils/identity.d.ts +1 -0
- package/mobile/lib/utils/identity.js +2 -0
- package/mobile/lib/utils/identity.js.map +1 -0
- package/mobile/lib/utils/toLocalNumberFormat.d.ts +1 -0
- package/mobile/lib/utils/toLocalNumberFormat.js +5 -0
- package/mobile/lib/utils/toLocalNumberFormat.js.map +1 -0
- package/mobile/src/ProjectSettings.ts +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +4 -4
- package/mobile/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +4 -4
- package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +6 -10
- package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +4 -4
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +2 -2
- package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +3 -3
- package/mobile/src/components/Calculator/renderProposal.tsx +2 -2
- package/mobile/src/components/Calculator/renderRealEstateValue.tsx +2 -2
- package/mobile/src/components/Calculator/renderWantedSumInput.tsx +3 -3
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -1
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +16 -12
- package/mobile/src/components/ContentPage/ContentPage.page.json +0 -1
- package/mobile/src/components/Filtration/Filtration.tsx +1 -1
- package/mobile/src/components/Filtration/FiltrationContent.ts +2 -7
- package/mobile/src/components/Filtration/renderFormItem.tsx +1 -1
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +2 -2
- package/mobile/src/components/OfficeMap/OfficeMap.tsx +2 -2
- package/mobile/src/components/OfficeMap/useOfficeMap.ts +1 -3
- package/mobile/src/components/PictureText/PictureText.tsx +2 -2
- package/mobile/src/hooks/useForm.ts +16 -8
- package/mobile/src/hooks/useNormalizedInput.ts +33 -0
- package/mobile/src/hooks/useSWRResource.ts +3 -1
- package/mobile/src/services/search/useSearch.ts +3 -2
- package/mobile/src/ui-kit/ControlProps.ts +1 -1
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +12 -38
- package/mobile/src/ui-kit/Input/Input.tsx +33 -16
- package/mobile/src/ui-kit/Input/InputProps.ts +4 -5
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +43 -49
- package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +2 -4
- package/mobile/src/ui-kit/NumberInput/NumberInput.tsx +35 -0
- package/mobile/src/ui-kit/PhoneInput/PhoneInput.tsx +2 -3
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +1 -1
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +2 -1
- package/mobile/src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx +9 -5
- package/mobile/src/utils/appendSlash.ts +2 -0
- package/mobile/src/utils/identity.ts +1 -0
- package/mobile/src/utils/toLocalNumberFormat.ts +7 -0
- package/package.json +8 -3
- package/src/ProjectSettings.ts +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -0
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +2 -2
- package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +4 -4
- package/src/components/ApplicationForm/renderBusinessCardDataOrganization.tsx +4 -4
- package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +6 -10
- package/src/components/ApplicationForm/renderWedDataOrganization.tsx +4 -4
- package/src/components/Bonus/Bonus.fixture.tsx +2 -1
- package/src/components/BusinessBlock/BusinessBlock.fixture.tsx +1 -0
- package/src/components/ButtonBlock/ButtonBlock.fixture.tsx +1 -0
- package/src/components/Calculator/Calculator.fixture.tsx +1 -1
- package/src/components/Calculator/CalculatorValueBlock.tsx +2 -2
- package/src/components/Calculator/renderInitialFeeInput.tsx +3 -3
- package/src/components/Calculator/renderProposal.tsx +2 -2
- package/src/components/Calculator/renderRealEstateValue.tsx +2 -2
- package/src/components/Calculator/renderWantedSumInput.tsx +3 -3
- package/src/components/Calculator/useCreditCalculatorParams.ts +1 -1
- package/src/components/CardTransfer/CardTransfer.fixture.tsx +1 -0
- package/src/components/CardTransfer/CardTransfer.tsx +16 -12
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +2 -1
- package/src/components/Carousel/Carousel.fixture.tsx +2 -1
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -0
- package/src/components/CarouselCard/CarouselCard.fixture.tsx +1 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.fixture.tsx +2 -0
- package/src/components/CarouselEventCard/CarouselEventCard.fixture.tsx +3 -1
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.fixture.tsx +2 -1
- package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +2 -0
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +2 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +2 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +2 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +2 -1
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.fixture.tsx +2 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.tsx +2 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +2 -0
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +2 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +2 -1
- package/src/components/ContactsBlock/ContactsBlock.fixture.tsx +2 -7
- package/src/components/ContentPage/ContentPage.page.json +0 -1
- package/src/components/ErrorBlock/ErrorBlock.fixture.tsx +2 -1
- package/src/components/ExchangeRateOffice/ExchangeRateOffice.fixture.tsx +1 -0
- package/src/components/Filtration/Filtration.fixture.tsx +2 -0
- package/src/components/Filtration/Filtration.tsx +1 -1
- package/src/components/Filtration/FiltrationContent.ts +2 -7
- package/src/components/Filtration/renderFormItem.tsx +1 -1
- package/src/components/Footer/Footer.fixture.mobile.tsx +1 -0
- package/src/components/Footer/Footer.fixture.tsx +1 -0
- package/src/components/Header/Header.fixture.mobile.tsx +1 -0
- package/src/components/Header/Header.fixture.tsx +1 -0
- package/src/components/Headline/Headline.fixture.mobile.tsx +2 -1
- package/src/components/Headline/Headline.fixture.tsx +2 -1
- package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +2 -1
- package/src/components/ImgBlock/ImgBlock.fixture.mobile.tsx +2 -1
- package/src/components/ImgBlock/ImgBlock.fixture.tsx +2 -1
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +1 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +2 -2
- package/src/components/InvestmentInfo/InvestmentInfo.fixture.tsx +1 -0
- package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +1 -0
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +1 -0
- package/src/components/LinkList/LinkList.fixture.tsx +1 -0
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +2 -1
- package/src/components/OfficeMap/OfficeMap.fixture.tsx +1 -0
- package/src/components/OfficeMap/OfficeMap.tsx +2 -2
- package/src/components/OfficeMap/useOfficeMap.ts +1 -3
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +1 -0
- package/src/components/ParagraphBlock/ParagraphBlock.fixture.tsx +1 -0
- package/src/components/PictureText/PictureText.fixture.tsx +2 -1
- package/src/components/PictureText/PictureText.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +2 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +2 -1
- package/src/components/ProductTile/ProductTile.fixture.tsx +2 -1
- package/src/components/PromoTile/PromoTile.fixture.tsx +1 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.tsx +1 -0
- package/src/components/RichTextBlock/RichTextBlock.fixture.mobile.tsx +1 -0
- package/src/components/RichTextBlock/RichTextBlock.fixture.tsx +1 -0
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +2 -1
- package/src/components/RollupItem/RollupItem.fixture.tsx +2 -0
- package/src/components/SafeDepositRental/SafeDepositRental.fixture.tsx +1 -0
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +1 -0
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +1 -0
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +2 -0
- package/src/components/Tabs/Tabs.fixture.tsx +1 -0
- package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +1 -0
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +1 -0
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +2 -1
- package/src/components/TextBlock/TextBlock.fixture.tsx +2 -1
- package/src/components/Tile/Tile.fixture.tsx +2 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +2 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +2 -1
- package/src/components/Video/Video.fixture.tsx +2 -0
- package/src/hooks/useForm.ts +16 -8
- package/src/hooks/useNormalizedInput.ts +33 -0
- package/src/hooks/useSWRResource.ts +3 -1
- package/src/services/search/useSearch.ts +3 -2
- package/src/ui-kit/Button/Button.fixture.tsx +1 -0
- package/src/ui-kit/ControlProps.ts +1 -1
- package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +12 -38
- package/src/ui-kit/Heading/Heading.fixture.mobile.tsx +2 -0
- package/src/ui-kit/Heading/Heading.fixture.tsx +2 -0
- package/src/ui-kit/Icon/Icon.fixture.tsx +2 -1
- package/src/ui-kit/Input/Input.tsx +33 -16
- package/src/ui-kit/Input/InputProps.ts +4 -5
- package/src/ui-kit/InputRange/InputRange.tsx +43 -49
- package/src/ui-kit/InputRange/InputRangeProps.ts +2 -4
- package/src/ui-kit/LinkButton/LinkButton.fixture.tsx +2 -0
- package/src/ui-kit/List/List.fixture.tsx +1 -0
- package/src/ui-kit/LocationDialog/LocationDialog.fixture.tsx +2 -1
- package/src/ui-kit/NumberInput/NumberInput.fixture.tsx +31 -0
- package/src/ui-kit/NumberInput/NumberInput.tsx +35 -0
- package/src/ui-kit/PhoneInput/PhoneInput.tsx +2 -3
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.tsx +1 -0
- package/src/ui-kit/RichText/RichText.fixture.tsx +2 -0
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +1 -1
- package/src/ui-kit/Select/Select.fixture.tsx +2 -0
- package/src/ui-kit/Sitemap/Sitemap.tsx +2 -1
- package/src/ui-kit/SlideCheckbox/SlideCheckbox.fixture.tsx +2 -0
- package/src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx +9 -5
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +2 -1
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.tsx +2 -1
- package/src/ui-kit/Tags/Tags.fixture.tsx +2 -0
- package/src/utils/appendSlash.ts +2 -0
- package/src/utils/identity.ts +1 -0
- package/src/utils/toLocalNumberFormat.ts +7 -0
- package/tailwind.config.cjs +1 -1
- package/bundle/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +0 -5
- package/bundle/utils/addSpacesBetweenNumbers.d.ts +0 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +0 -5
- package/dist/ui-kit/CurrencyInput/CurrencyInputProps.js +0 -2
- package/dist/ui-kit/CurrencyInput/CurrencyInputProps.js.map +0 -1
- package/dist/utils/addSpacesBetweenNumbers.d.ts +0 -1
- package/dist/utils/addSpacesBetweenNumbers.js +0 -5
- package/dist/utils/addSpacesBetweenNumbers.js.map +0 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +0 -5
- package/lib/ui-kit/CurrencyInput/CurrencyInputProps.js +0 -2
- package/lib/ui-kit/CurrencyInput/CurrencyInputProps.js.map +0 -1
- package/lib/utils/addSpacesBetweenNumbers.d.ts +0 -1
- package/lib/utils/addSpacesBetweenNumbers.js +0 -2
- package/lib/utils/addSpacesBetweenNumbers.js.map +0 -1
- package/mobile/bundle/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +0 -5
- package/mobile/bundle/utils/addSpacesBetweenNumbers.d.ts +0 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +0 -5
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInputProps.js +0 -2
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInputProps.js.map +0 -1
- package/mobile/dist/utils/addSpacesBetweenNumbers.d.ts +0 -1
- package/mobile/dist/utils/addSpacesBetweenNumbers.js +0 -5
- package/mobile/dist/utils/addSpacesBetweenNumbers.js.map +0 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInputProps.d.ts +0 -5
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInputProps.js +0 -2
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInputProps.js.map +0 -1
- package/mobile/lib/utils/addSpacesBetweenNumbers.d.ts +0 -1
- package/mobile/lib/utils/addSpacesBetweenNumbers.js +0 -2
- package/mobile/lib/utils/addSpacesBetweenNumbers.js.map +0 -1
- package/mobile/src/components/Gallery/Gallery.ui.json +0 -1
- package/mobile/src/components/MiniGallery/MiniGallery.ui.json +0 -1
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInputProps.ts +0 -6
- package/mobile/src/utils/addSpacesBetweenNumbers.ts +0 -2
- package/src/components/Gallery/Gallery.ui.json +0 -1
- package/src/components/MiniGallery/MiniGallery.ui.json +0 -1
- package/src/ui-kit/CurrencyInput/CurrencyInputProps.ts +0 -6
- package/src/utils/addSpacesBetweenNumbers.ts +0 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
const appendSlash = (url) => url && !url.endsWith('/') ? `${url}/` : url;
|
|
57
|
+
|
|
56
58
|
const DEFAULT_PROJECT_SETTINGS = { PROD_BRANCH: 'master' };
|
|
57
59
|
const projectSettings = new (class {
|
|
58
60
|
_ = DEFAULT_PROJECT_SETTINGS;
|
|
@@ -96,7 +98,6 @@
|
|
|
96
98
|
return this._.YANDEX_METRIKA_ID;
|
|
97
99
|
}
|
|
98
100
|
})();
|
|
99
|
-
const appendSlash = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
100
101
|
|
|
101
102
|
const AUTH_PREFIX = 'guest';
|
|
102
103
|
const STORAGE_KEY = 'likesToken';
|
|
@@ -358,21 +359,24 @@
|
|
|
358
359
|
};
|
|
359
360
|
const Heading = JSX(({ className = '', headingType = 'h3', as: Tag = 'h3', title, children }) => (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children })));
|
|
360
361
|
|
|
362
|
+
const identity = (_) => _;
|
|
363
|
+
|
|
361
364
|
const useForm = (initialState, onSubmit) => {
|
|
362
365
|
const [formState, setFormState] = useState(initialState);
|
|
363
366
|
const [isDirtyForm, setDirtyForm] = useState(false);
|
|
364
367
|
const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
|
|
365
368
|
const handlersMap = useRef({});
|
|
366
|
-
const field = useCallback((fieldName) => {
|
|
369
|
+
const field = useCallback((fieldName, options) => {
|
|
370
|
+
const { parse = identity, format = identity } = options || {};
|
|
367
371
|
if (!handlersMap.current) {
|
|
368
372
|
handlersMap.current = {};
|
|
369
373
|
}
|
|
370
374
|
handlersMap.current[fieldName] ||= (value) => {
|
|
371
|
-
setFormState((prev) => ({ ...prev, [fieldName]: value }));
|
|
375
|
+
setFormState((prev) => ({ ...prev, [fieldName]: parse(value) }));
|
|
372
376
|
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
373
377
|
};
|
|
374
378
|
return {
|
|
375
|
-
value: formState[fieldName],
|
|
379
|
+
value: format(formState[fieldName]),
|
|
376
380
|
isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
|
|
377
381
|
onChange: handlersMap.current[fieldName],
|
|
378
382
|
};
|
|
@@ -405,44 +409,50 @@
|
|
|
405
409
|
const isValidationSuccess = (info) => !info?.length;
|
|
406
410
|
const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
|
|
407
411
|
|
|
408
|
-
const
|
|
409
|
-
|
|
412
|
+
const isFilled = (_) => _ !== null && _ !== undefined;
|
|
413
|
+
|
|
414
|
+
const defaultCache = new Map();
|
|
415
|
+
const applyCache = (fetcher, cache = defaultCache) => (key) => {
|
|
416
|
+
const cachedData = cache.get(key);
|
|
417
|
+
if (isFilled(cachedData)) {
|
|
418
|
+
return cachedData;
|
|
419
|
+
}
|
|
420
|
+
const data = fetcher(key);
|
|
421
|
+
if (isFilled(data)) {
|
|
422
|
+
cache.set(key, Promise.resolve(data));
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
cache.delete(key);
|
|
426
|
+
}
|
|
427
|
+
return data;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
const isSimpleKey = (args) => Boolean(args && Array.isArray(args) && args.length === 1 && typeof args[0] === 'string');
|
|
431
|
+
function useAsyncData(key, fetcher, { fallback, cache } = {}) {
|
|
410
432
|
const args = useMemo(() => keyToArgs(key), [key]);
|
|
411
|
-
const [
|
|
412
|
-
const [
|
|
413
|
-
const
|
|
414
|
-
setData(_);
|
|
415
|
-
setError(undefined);
|
|
416
|
-
};
|
|
417
|
-
const updateError = (_) => {
|
|
418
|
-
setData(undefined);
|
|
419
|
-
setError(_);
|
|
420
|
-
};
|
|
421
|
-
const chainToConsistentResult = (_) => {
|
|
422
|
-
_.then(rawData => consistentDataMap.get(args) || rawData)
|
|
423
|
-
.then(updateData)
|
|
424
|
-
.catch(updateError);
|
|
425
|
-
};
|
|
433
|
+
const [simpleKey] = isSimpleKey(args) ? args : [];
|
|
434
|
+
const [data, setData] = useState(undefined);
|
|
435
|
+
const [error, setError] = useState(undefined);
|
|
426
436
|
useEffect(() => {
|
|
427
|
-
const isEmptyKey = args.
|
|
437
|
+
const isEmptyKey = !args.some(isFilled);
|
|
428
438
|
if (isEmptyKey) {
|
|
429
439
|
return;
|
|
430
440
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
441
|
+
(async () => {
|
|
442
|
+
try {
|
|
443
|
+
const newData = await (simpleKey
|
|
444
|
+
? applyCache(fetcher, cache)(simpleKey)
|
|
445
|
+
: fetcher(...args));
|
|
446
|
+
setData(newData);
|
|
447
|
+
setError(undefined);
|
|
435
448
|
}
|
|
436
|
-
|
|
437
|
-
|
|
449
|
+
catch (err) {
|
|
450
|
+
setData(undefined);
|
|
451
|
+
setError(err);
|
|
438
452
|
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
}, [fetcher, ...args]);
|
|
444
|
-
const simpleKey = args[0];
|
|
445
|
-
const fallbackData = fallback && typeof simpleKey === 'string' && fallback[simpleKey];
|
|
453
|
+
})();
|
|
454
|
+
}, [fetcher, cache, args]);
|
|
455
|
+
const fallbackData = fallback && simpleKey && fallback[simpleKey];
|
|
446
456
|
return {
|
|
447
457
|
data: !data && fallbackData ? fallbackData : data,
|
|
448
458
|
error,
|
|
@@ -451,9 +461,6 @@
|
|
|
451
461
|
};
|
|
452
462
|
}
|
|
453
463
|
function keyToArgs(key) {
|
|
454
|
-
if (!key) {
|
|
455
|
-
return [key];
|
|
456
|
-
}
|
|
457
464
|
if (Array.isArray(key)) {
|
|
458
465
|
return key;
|
|
459
466
|
}
|
|
@@ -486,10 +493,10 @@
|
|
|
486
493
|
}
|
|
487
494
|
|
|
488
495
|
const REGIONS_URL$1 = '/api/v1/regions';
|
|
489
|
-
const EMPTY_VALUE$
|
|
496
|
+
const EMPTY_VALUE$3 = [];
|
|
490
497
|
function useGetRegions() {
|
|
491
498
|
const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
|
|
492
|
-
return data || EMPTY_VALUE$
|
|
499
|
+
return data || EMPTY_VALUE$3;
|
|
493
500
|
}
|
|
494
501
|
|
|
495
502
|
const useDialog = (id = '') => ({
|
|
@@ -664,7 +671,7 @@
|
|
|
664
671
|
};
|
|
665
672
|
};
|
|
666
673
|
|
|
667
|
-
const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange,
|
|
674
|
+
const Input = JSX(({ key, className = '', inputClassName = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, }) => {
|
|
668
675
|
const handleChange = useCallback((e) => {
|
|
669
676
|
onChange && onChange(e.target?.value || '');
|
|
670
677
|
}, [onChange]);
|
|
@@ -672,7 +679,7 @@
|
|
|
672
679
|
const validStyle = valid
|
|
673
680
|
? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
|
|
674
681
|
: 'border-error';
|
|
675
|
-
return (jsxs("div", { className: style('relative', className), children: [label ? jsx("
|
|
682
|
+
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { className: style('w-full border rounded-md text-primary-text outline-none p-4', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
|
|
676
683
|
});
|
|
677
684
|
|
|
678
685
|
const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: error })) : null })] })));
|
|
@@ -692,8 +699,8 @@
|
|
|
692
699
|
}
|
|
693
700
|
|
|
694
701
|
const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
|
|
695
|
-
const handleChange = useCallback((
|
|
696
|
-
return (jsx(Input, {
|
|
702
|
+
const handleChange = useCallback((value) => onChange && onChange(normalizePhone(value)), [onChange]);
|
|
703
|
+
return (jsx(Input, { onChange: handleChange, onFocus: handleChange, ...inputProps, children: children }));
|
|
697
704
|
});
|
|
698
705
|
|
|
699
706
|
const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(PhoneInput, { "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs-light", color: "text-error", children: error })) : null })] })));
|
|
@@ -708,7 +715,7 @@
|
|
|
708
715
|
const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
|
|
709
716
|
const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
|
|
710
717
|
|
|
711
|
-
const renderAcquiringDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0
|
|
718
|
+
const renderAcquiringDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
|
|
712
719
|
|
|
713
720
|
const ACQUIRING_TYPES = [
|
|
714
721
|
{
|
|
@@ -844,7 +851,7 @@
|
|
|
844
851
|
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderAcquiringRegion({ regions, field }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderAcquiringDataOrganization(field), renderSlideCheckboxes(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
845
852
|
});
|
|
846
853
|
|
|
847
|
-
const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0
|
|
854
|
+
const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
|
|
848
855
|
|
|
849
856
|
const renderRegion$1 = ({ regions, field }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }) }));
|
|
850
857
|
|
|
@@ -881,14 +888,14 @@
|
|
|
881
888
|
});
|
|
882
889
|
|
|
883
890
|
const BRANCHES_URL = '/api/v1/branches';
|
|
884
|
-
const EMPTY_VALUE$
|
|
891
|
+
const EMPTY_VALUE$2 = [];
|
|
885
892
|
function useBranches(regionCode) {
|
|
886
893
|
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
|
|
887
|
-
return data || EMPTY_VALUE$
|
|
894
|
+
return data || EMPTY_VALUE$2;
|
|
888
895
|
}
|
|
889
896
|
const fetchSafeBoxes$1 = async (url) => {
|
|
890
897
|
const result = await fetchJSON(url, { method: 'GET' });
|
|
891
|
-
return result || EMPTY_VALUE$
|
|
898
|
+
return result || EMPTY_VALUE$2;
|
|
892
899
|
};
|
|
893
900
|
|
|
894
901
|
const MIN_CREDIT_AMOUNT = 1000;
|
|
@@ -898,12 +905,34 @@
|
|
|
898
905
|
const MAX_CREDIT_TERM = 180;
|
|
899
906
|
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
900
907
|
|
|
901
|
-
const renderCreditDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0
|
|
908
|
+
const renderCreditDataOrganization = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('mail') })] })] }));
|
|
902
909
|
|
|
903
|
-
const
|
|
910
|
+
const useNormalizedInput = (props, { normalize, format }) => {
|
|
911
|
+
const { value, onFocus, onBlur, onChange } = props;
|
|
912
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
913
|
+
const handleFocus = useCallback((e) => {
|
|
914
|
+
setIsFocused(true);
|
|
915
|
+
onFocus && onFocus(e);
|
|
916
|
+
}, []);
|
|
917
|
+
const handleBlur = useCallback(() => {
|
|
918
|
+
setIsFocused(false);
|
|
919
|
+
onChange && onChange(normalize(value));
|
|
920
|
+
onBlur && onBlur();
|
|
921
|
+
}, [onChange, value]);
|
|
922
|
+
return {
|
|
923
|
+
value: (isFocused || !format ? value : format(value)),
|
|
924
|
+
onFocus: handleFocus,
|
|
925
|
+
onBlur: handleBlur,
|
|
926
|
+
};
|
|
927
|
+
};
|
|
904
928
|
|
|
905
929
|
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
906
930
|
|
|
931
|
+
const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
|
|
932
|
+
minimumFractionDigits: 0,
|
|
933
|
+
maximumFractionDigits: fractionDigits,
|
|
934
|
+
}).format(Number(_) || 0);
|
|
935
|
+
|
|
907
936
|
function parseDecimal(value) {
|
|
908
937
|
const rawValue = (value || '').replace(/\D/g, '');
|
|
909
938
|
const unsafeDecimal = parseInt(rawValue, 10);
|
|
@@ -925,19 +954,16 @@
|
|
|
925
954
|
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
926
955
|
const DEFAULT_MIN = 1;
|
|
927
956
|
const DEFAULT_MAX = 100;
|
|
928
|
-
const InputRange = JSX((
|
|
929
|
-
const [
|
|
957
|
+
const InputRange = JSX((props) => {
|
|
958
|
+
const { className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, } = props;
|
|
959
|
+
const normalizedProps = useNormalizedInput(props, {
|
|
960
|
+
normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
|
|
961
|
+
format: toLocalNumberFormat(),
|
|
962
|
+
});
|
|
930
963
|
const handleChange = useCallback((e) => {
|
|
931
964
|
onChange && onChange(parseDecimal(e.target?.value));
|
|
932
965
|
}, [onChange]);
|
|
933
|
-
|
|
934
|
-
setFocused(true);
|
|
935
|
-
}, []);
|
|
936
|
-
const handleBlur = useCallback(() => {
|
|
937
|
-
setFocused(false);
|
|
938
|
-
onChange && onChange(list.length ? closestValue(list)(value) : clamp(value || 0, min, max));
|
|
939
|
-
}, [onChange, value]);
|
|
940
|
-
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('m-0 mt-2 font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'p-0 pl-4 box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), value: isFocused ? value : addSpacesBetweenNumbers(value), disabled: disabled, onInput: handleChange, onFocus: handleFocus, onBlur: handleBlur }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
966
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('m-0 mt-2 font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'p-0 pl-4 box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
941
967
|
});
|
|
942
968
|
const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
943
969
|
const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: item }, String(i)))) }));
|
|
@@ -1009,7 +1035,7 @@
|
|
|
1009
1035
|
});
|
|
1010
1036
|
}, [onSubmit]);
|
|
1011
1037
|
const [, { field, ...formProps }] = useForm(initialFormState$1, handleSubmit);
|
|
1012
|
-
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0
|
|
1038
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
|
|
1013
1039
|
});
|
|
1014
1040
|
|
|
1015
1041
|
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
@@ -1077,7 +1103,7 @@
|
|
|
1077
1103
|
return (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", ...field('currencyControl') }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('documentaryOperations') }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('conversionOperations') })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }));
|
|
1078
1104
|
};
|
|
1079
1105
|
|
|
1080
|
-
const renderWedDataOrganization = (field) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0
|
|
1106
|
+
const renderWedDataOrganization = (field) => (jsxs("div", { children: [jsxs("div", { className: "flex justify-between gap-5", children: [jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }) })] }), jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) }) })] })] }));
|
|
1081
1107
|
|
|
1082
1108
|
const initialFormState = {
|
|
1083
1109
|
fullName: '',
|
|
@@ -1300,7 +1326,7 @@
|
|
|
1300
1326
|
return isVisible ? (jsxs("div", { children: [canDec ? (jsx(ArrowButton, { className: `absolute z-40 ${btnClass[0]} ${className}`, onClick: dec, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !canDec })) : null, canInc ? (jsx(ArrowButton, { className: `absolute z-40 rotate-180 ${btnClass[1]} ${className}`, onClick: inc, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !canInc })) : null] })) : null;
|
|
1301
1327
|
}
|
|
1302
1328
|
|
|
1303
|
-
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style('mb-7', className), children: [title ? (jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ",
|
|
1329
|
+
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style('mb-7', className), children: [title ? (jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", toLocalNumberFormat(2)(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
1304
1330
|
|
|
1305
1331
|
const DEFAULT_MIN_SUM = 10000;
|
|
1306
1332
|
const DEFAULT_MAX_SUM = 5000000;
|
|
@@ -1376,8 +1402,8 @@
|
|
|
1376
1402
|
const DEFAULT_MONEY_STEP = 1000;
|
|
1377
1403
|
function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
|
|
1378
1404
|
const items = [
|
|
1379
|
-
`От ${
|
|
1380
|
-
`До ${
|
|
1405
|
+
`От ${toLocalNumberFormat(2)(rest.min || 0)} ₽`,
|
|
1406
|
+
`До ${toLocalNumberFormat(2)(rest.max || 0)} ₽`,
|
|
1381
1407
|
];
|
|
1382
1408
|
return jsx(InputRange, { items: isShowItems ? items : [], step: step, ...rest });
|
|
1383
1409
|
}
|
|
@@ -1628,7 +1654,7 @@
|
|
|
1628
1654
|
...getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows),
|
|
1629
1655
|
...userInputParams,
|
|
1630
1656
|
monthlyPayment,
|
|
1631
|
-
}), [userInputParams]);
|
|
1657
|
+
}), [userInputParams, data]);
|
|
1632
1658
|
};
|
|
1633
1659
|
const checkRowCommonParams = (props) => checkRowParam({
|
|
1634
1660
|
...props,
|
|
@@ -1847,53 +1873,37 @@
|
|
|
1847
1873
|
})) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
1848
1874
|
}
|
|
1849
1875
|
|
|
1850
|
-
const
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
.replace(',', '.');
|
|
1859
|
-
const onlyOneDot = (val) => {
|
|
1860
|
-
const matches = val.match(/\./g) || [];
|
|
1861
|
-
return matches.length > 1 ? val.slice(0, val.lastIndexOf('.')) : val;
|
|
1862
|
-
};
|
|
1863
|
-
const setZeroStart = (val) => {
|
|
1864
|
-
const isZeroStart = val.indexOf('0') === 0 && val.length === 2;
|
|
1865
|
-
const newVal = isZeroStart ? val.replace('0', '0.') : val;
|
|
1866
|
-
return newVal.startsWith('.') ? newVal.replace('.', '0.') : newVal;
|
|
1867
|
-
};
|
|
1868
|
-
const replaceCommaToDot = (val) => String(val.replace(',', '.').replace(/[^.\d]/g, ''));
|
|
1869
|
-
|
|
1870
|
-
const CurrencyInput = JSX(({ className = '', value = '', onChange, minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1871
|
-
const handleChange = useCallback((inputValue) => {
|
|
1872
|
-
const adjustedVal = adjustValue(inputValue);
|
|
1873
|
-
const clampVal = getClampValue(adjustedVal, clamp(Number(adjustedVal), minValue, maxValue));
|
|
1874
|
-
onChange && onChange(clampVal);
|
|
1875
|
-
}, [onChange]);
|
|
1876
|
-
const handleBlur = useCallback(() => {
|
|
1877
|
-
onChange && onChange(localNumberFormat(value));
|
|
1878
|
-
}, [onChange, value]);
|
|
1879
|
-
return (jsx(Input, { className: className, inputClassName: "w-full", value: value, onChange: handleChange, onBlur: handleBlur, ...inputProps, children: jsx("span", { className: "text-xl-light absolute right-4 bottom-4", children: "\u20BD" }) }));
|
|
1876
|
+
const NumberInput = JSX((props) => {
|
|
1877
|
+
const { onChange, min, max, defaultValue = '0', fractionDigits = 0, ...inputProps } = props;
|
|
1878
|
+
const normalizedProps = useNormalizedInput(props, {
|
|
1879
|
+
normalize: (_ = defaultValue) => min && max ? String(clamp(Number(sanitizeNumberStr(_)), min, max)) : sanitizeNumberStr(_),
|
|
1880
|
+
format: toLocalNumberFormat(fractionDigits),
|
|
1881
|
+
});
|
|
1882
|
+
const handleChange = useCallback((_) => onChange && onChange(sanitizeNumberStr(_)), [onChange]);
|
|
1883
|
+
return jsx(Input, { onChange: handleChange, ...inputProps, ...normalizedProps });
|
|
1880
1884
|
});
|
|
1881
|
-
const
|
|
1885
|
+
const sanitizeNumberStr = (_ = '') => _.replaceAll(',', '.')
|
|
1886
|
+
.replace(/[^\d.]/g, '')
|
|
1887
|
+
.replace(/([^.]*\.[^.]*)\./, '$1');
|
|
1888
|
+
|
|
1889
|
+
const CurrencyInput = JSX((props) => (jsx(NumberInput, { ...props, fractionDigits: 2, children: jsx("div", { className: "absolute right-4 bottom-4", children: jsx(Text, { size: "text-xl", font: "font-light", children: "\u20BD" }) }) })));
|
|
1882
1890
|
|
|
1883
|
-
const AMOUNT_KEY = 'amount';
|
|
1884
|
-
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
1885
1891
|
const DEFAULT_TITLE = 'Укажите сумму перевода';
|
|
1886
1892
|
const DEFAULT_LABEL = 'Сумма перевода';
|
|
1887
1893
|
const DEFAULT_PLACEHOLDER = '1500';
|
|
1894
|
+
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
1895
|
+
const AMOUNT_KEY = 'amount';
|
|
1896
|
+
const INITIAL_FORM_STATE = {
|
|
1897
|
+
[AMOUNT_KEY]: 1500,
|
|
1898
|
+
};
|
|
1888
1899
|
const CardTransfer = JSX(({ className = '', title = DEFAULT_TITLE, label = DEFAULT_LABEL, placeholder = DEFAULT_PLACEHOLDER, button, ...rest }) => {
|
|
1889
|
-
const [
|
|
1890
|
-
const
|
|
1891
|
-
const isDisabled = !Number(getSanitizedValue(value));
|
|
1900
|
+
const [{ amount }, { field }] = useForm(INITIAL_FORM_STATE);
|
|
1901
|
+
const isDisabled = amount <= 0;
|
|
1892
1902
|
const buttonStyle = isDisabled
|
|
1893
1903
|
? getDisabledButtonClasses({ version: button?.version })
|
|
1894
1904
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
1895
1905
|
const link = useLink();
|
|
1896
|
-
return (jsxs(BlockWrapper, { className:
|
|
1906
|
+
return (jsxs(BlockWrapper, { className: style('p-default flex flex-col items-center', className), ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, valid: !isDisabled, placeholder: placeholder, label: label, ...field(AMOUNT_KEY, { parse: Number, format: String }) }), button?.text ? (jsx("button", { type: "submit", className: style('w-full p-4 mt-6', buttonStyle), disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
|
|
1897
1907
|
});
|
|
1898
1908
|
|
|
1899
1909
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
@@ -2747,13 +2757,15 @@
|
|
|
2747
2757
|
|
|
2748
2758
|
const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
|
|
2749
2759
|
const handleChange = (newValue) => {
|
|
2760
|
+
if (!onChange) {
|
|
2761
|
+
return;
|
|
2762
|
+
}
|
|
2750
2763
|
if (multiple) {
|
|
2751
2764
|
const hasAlready = value?.includes(newValue);
|
|
2752
|
-
onChange
|
|
2753
|
-
onChange(hasAlready ? value?.filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
2765
|
+
onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
2754
2766
|
}
|
|
2755
2767
|
else {
|
|
2756
|
-
onChange
|
|
2768
|
+
onChange(value === newValue ? '' : newValue);
|
|
2757
2769
|
}
|
|
2758
2770
|
};
|
|
2759
2771
|
return items.map((item) => (jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
@@ -2778,16 +2790,17 @@
|
|
|
2778
2790
|
const initialFiltrationState = {};
|
|
2779
2791
|
const Filtration = JSX(({ className, filtrationSchema = {}, resetButton, ...rest }) => {
|
|
2780
2792
|
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
2781
|
-
return (jsxs(BlockWrapper, { className: style(className), version: "transparent", ...rest, children: [jsxs("form", { className: "flex justify-between bg-white p-9 mb-1", children: [jsx("div", { className: "flex gap-11", children: Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, field)) }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72", onClick: reset, ...resetButton }) })) : null] }), jsx(FiltrationInner, { filtrationState: filtrationState, ...rest })] }));
|
|
2793
|
+
return (jsxs(BlockWrapper, { className: style(className), version: "transparent", ...rest, children: [jsxs("form", { className: "flex justify-between bg-white p-9 mb-1", children: [jsx("div", { className: "flex gap-11", children: Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, field)) }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72 ml-3", onClick: reset, ...resetButton }) })) : null] }), jsx(FiltrationInner, { filtrationState: filtrationState, ...rest })] }));
|
|
2782
2794
|
});
|
|
2783
2795
|
Filtration.childrenTypes = ['ProductTile'];
|
|
2784
2796
|
Filtration.childSchema = (content) => content?.filtrationSchema || {};
|
|
2785
2797
|
|
|
2798
|
+
const EMPTY_VALUE$1 = {};
|
|
2786
2799
|
function useSWRResource(filename, fallback = {}) {
|
|
2787
2800
|
const { data } = useAsyncData(`/wcms-resources/${filename}.json`, fetchJSONUnsafe, {
|
|
2788
2801
|
fallback,
|
|
2789
2802
|
});
|
|
2790
|
-
return data ||
|
|
2803
|
+
return data || EMPTY_VALUE$1;
|
|
2791
2804
|
}
|
|
2792
2805
|
|
|
2793
2806
|
const ICON_VERSION_MAP = {
|
|
@@ -2969,7 +2982,8 @@
|
|
|
2969
2982
|
const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
|
|
2970
2983
|
|
|
2971
2984
|
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
2972
|
-
const
|
|
2985
|
+
const DEFAULT_BASE_PATH = ['/'];
|
|
2986
|
+
const useSearch = ({ basePathList = DEFAULT_BASE_PATH, initialQuery = '', wasOpened, }) => {
|
|
2973
2987
|
const [query, setQuery] = useState(initialQuery || '');
|
|
2974
2988
|
useEffect(() => {
|
|
2975
2989
|
if (initialQuery !== undefined && initialQuery !== null) {
|
|
@@ -2977,7 +2991,7 @@
|
|
|
2977
2991
|
}
|
|
2978
2992
|
}, [initialQuery]);
|
|
2979
2993
|
const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
|
|
2980
|
-
[wasOpened,
|
|
2994
|
+
[wasOpened, basePathList]);
|
|
2981
2995
|
const { data } = useAsyncData(key, fetchSearchIndex);
|
|
2982
2996
|
const [result, setResult] = useState(null);
|
|
2983
2997
|
useDebouncedEffect(() => {
|
|
@@ -3040,7 +3054,7 @@
|
|
|
3040
3054
|
});
|
|
3041
3055
|
const renderColumn = (menuItem, index) => {
|
|
3042
3056
|
const { text, items, href, target, onClick } = menuItem;
|
|
3043
|
-
return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
|
|
3057
|
+
return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
|
|
3044
3058
|
};
|
|
3045
3059
|
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
3046
3060
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
@@ -3059,7 +3073,7 @@
|
|
|
3059
3073
|
const SEARCH_DIALOG_ID = 'search';
|
|
3060
3074
|
const SearchDialog = JSX(({ topItems }) => {
|
|
3061
3075
|
const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
|
|
3062
|
-
const basePathList = topItems?.map((_) => _.href || '/');
|
|
3076
|
+
const basePathList = useMemo(() => topItems?.map((_) => _.href || '/'), [topItems]);
|
|
3063
3077
|
const [searchResult, searchInputProps] = useSearch({
|
|
3064
3078
|
basePathList,
|
|
3065
3079
|
initialQuery: dialogProps.message,
|
|
@@ -3488,7 +3502,7 @@
|
|
|
3488
3502
|
return (jsxs("button", { type: "button", onClick: onClick, className: `p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(ImgInner, { className: "p-5 rounded-full bg-secondary-light mr-[30px]", image: slide.icon, width: "108", height: "108" })) : null, jsxs("div", { className: "flex gap-3.5", children: [slide?.sum ? renderValueBlock$1('страховая сумма', slide.sum) : null, slide?.fee ? renderValueBlock$1('страховой взнос', slide.fee) : null] }), renderDoneIcon(isActive)] }, String(i)));
|
|
3489
3503
|
}
|
|
3490
3504
|
function renderValueBlock$1(title, sum) {
|
|
3491
|
-
return (jsxs("div", { className: "flex flex-col text-left whitespace-pre", children: [jsxs("span", { className: "text-h6", children: [
|
|
3505
|
+
return (jsxs("div", { className: "flex flex-col text-left whitespace-pre", children: [jsxs("span", { className: "text-h6", children: [toLocalNumberFormat(2)(sum), " \u20BD"] }), jsx("span", { className: "text-secondary-text text-l mt-1", children: title })] }));
|
|
3492
3506
|
}
|
|
3493
3507
|
function renderDoneIcon(isActive) {
|
|
3494
3508
|
return isActive ? (jsx(ImgInner, { className: `h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4`, image: { icon: 'DoneIcon' }, width: "24", height: "24" })) : null;
|
|
@@ -3839,25 +3853,6 @@
|
|
|
3839
3853
|
const getArraySumAndAverage = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
|
3840
3854
|
const normalizePoints = (points) => (points ? points.map((_) => _.coords) : null);
|
|
3841
3855
|
|
|
3842
|
-
// Добавлено для проверки
|
|
3843
|
-
const nearbyOffices = [
|
|
3844
|
-
{ title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
|
|
3845
|
-
{ title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
|
|
3846
|
-
{ title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
|
|
3847
|
-
];
|
|
3848
|
-
|
|
3849
|
-
const renderCurrentDaySchedule = ({ lunchHour, status, workTime }) => {
|
|
3850
|
-
const hasTime = /\d+/gi.test(lunchHour);
|
|
3851
|
-
const lunchHourText = hasTime ? `Перерыв ${lunchHour}` : lunchHour;
|
|
3852
|
-
return status ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4", children: workTime ? workTime : null }), jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden", children: lunchHour ? lunchHourText : null })] })) : (jsx("div", { className: "flex", children: jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }) }));
|
|
3853
|
-
};
|
|
3854
|
-
const renderNearbyOffice = ({ icon, title, distance, time }, index) => (jsxs("div", { className: "flex mr-4", children: [jsx(Icon, { name: icon, width: "16", height: "16", className: "mr-1" }), title ? jsxs("span", { className: "text-m", children: [title, "\u00A0"] }) : null, jsxs("span", { className: "text-m-light", children: [distance ? ` (${distance})` : null, time ? `, ${time}` : null] })] }, `nearbyOffice${index}`));
|
|
3855
|
-
const renderDay = ({ title, status, workTime, lunchHour, description }, inx) => (jsxs("div", { className: "flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0", children: [jsxs("div", { className: "flex justify-between items-center w-full pb-1 text-l text-primary-text", children: [jsx("div", { children: title }), status ? null : jsx("div", { className: "text-m-light text-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }), status && workTime ? jsx("div", { children: workTime }) : null] }), status && lunchHour ? renderLunchHour(lunchHour) : null, description ? (jsx("div", { className: "pb-1 text-s-light text-secondary-text", children: description })) : null] }, `day${inx}`));
|
|
3856
|
-
const renderLunchHour = (lunchHour) => {
|
|
3857
|
-
const hasTime = /\d+/gi.test(lunchHour);
|
|
3858
|
-
return hasTime ? (jsxs("div", { className: "flex justify-between items-center w-full pb-1 text-m-light text-error", children: [jsx("div", { children: "\u041F\u0435\u0440\u0435\u0440\u044B\u0432" }), jsx("div", { children: lunchHour })] })) : (jsx("div", { className: "flex justify-between items-center w-full pb-1 text-m-light text-primary-main", children: jsx("div", { children: lunchHour }) }));
|
|
3859
|
-
};
|
|
3860
|
-
|
|
3861
3856
|
const OFFICE_MAP = {
|
|
3862
3857
|
id: 123,
|
|
3863
3858
|
branchType: {
|
|
@@ -3938,26 +3933,30 @@
|
|
|
3938
3933
|
safeBoxCaseVolumes: null,
|
|
3939
3934
|
};
|
|
3940
3935
|
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
}
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
}
|
|
3936
|
+
// Добавлено для проверки
|
|
3937
|
+
const nearbyOffices = [
|
|
3938
|
+
{ title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
|
|
3939
|
+
{ title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
|
|
3940
|
+
{ title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
|
|
3941
|
+
];
|
|
3942
|
+
|
|
3943
|
+
const renderCurrentDaySchedule = ({ lunchHour, status, workTime }) => {
|
|
3944
|
+
const hasTime = /\d+/gi.test(lunchHour);
|
|
3945
|
+
const lunchHourText = hasTime ? `Перерыв ${lunchHour}` : lunchHour;
|
|
3946
|
+
return status ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4", children: workTime ? workTime : null }), jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden", children: lunchHour ? lunchHourText : null })] })) : (jsx("div", { className: "flex", children: jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }) }));
|
|
3947
|
+
};
|
|
3948
|
+
const renderNearbyOffice = ({ icon, title, distance, time }, index) => (jsxs("div", { className: "flex mr-4", children: [jsx(Icon, { name: icon, width: "16", height: "16", className: "mr-1" }), title ? jsxs("span", { className: "text-m", children: [title, "\u00A0"] }) : null, jsxs("span", { className: "text-m-light", children: [distance ? ` (${distance})` : null, time ? `, ${time}` : null] })] }, `nearbyOffice${index}`));
|
|
3949
|
+
const renderDay = ({ title, status, workTime, lunchHour, description }, inx) => (jsxs("div", { className: "flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0", children: [jsxs("div", { className: "flex justify-between items-center w-full pb-1 text-l text-primary-text", children: [jsx("div", { children: title }), status ? null : jsx("div", { className: "text-m-light text-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }), status && workTime ? jsx("div", { children: workTime }) : null] }), status && lunchHour ? renderLunchHour(lunchHour) : null, description ? (jsx("div", { className: "pb-1 text-s-light text-secondary-text", children: description })) : null] }, `day${inx}`));
|
|
3950
|
+
const renderLunchHour = (lunchHour) => {
|
|
3951
|
+
const hasTime = /\d+/gi.test(lunchHour);
|
|
3952
|
+
return hasTime ? (jsxs("div", { className: "flex justify-between items-center w-full pb-1 text-m-light text-error", children: [jsx("div", { children: "\u041F\u0435\u0440\u0435\u0440\u044B\u0432" }), jsx("div", { children: lunchHour })] })) : (jsx("div", { className: "flex justify-between items-center w-full pb-1 text-m-light text-primary-main", children: jsx("div", { children: lunchHour }) }));
|
|
3953
|
+
};
|
|
3955
3954
|
|
|
3956
3955
|
const OfficeMap = JSX(({ className = '' }) => {
|
|
3957
3956
|
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
3958
3957
|
// TODO: useOfficeMap has return MOCK OBJECT!
|
|
3959
3958
|
// TODO: Fix this when endpoint /api/v1/branches (or new endpoint) had returning right data
|
|
3960
|
-
const resultOfficeMap =
|
|
3959
|
+
const resultOfficeMap = OFFICE_MAP;
|
|
3961
3960
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } = resultOfficeMap;
|
|
3962
3961
|
const { workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
|
|
3963
3962
|
const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
|
|
@@ -4035,7 +4034,7 @@
|
|
|
4035
4034
|
}
|
|
4036
4035
|
function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
|
|
4037
4036
|
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
4038
|
-
return (jsxs("div", { className: `flex justify-between items-center gap-2 w-full whitespace-pre ${widthStyle}`, children: [jsx("span", { className: "text-secondary-text text-l-light", children: title }), jsxs("span", { className: "text-primary-main text-h6", children: [
|
|
4037
|
+
return (jsxs("div", { className: `flex justify-between items-center gap-2 w-full whitespace-pre ${widthStyle}`, children: [jsx("span", { className: "text-secondary-text text-l-light", children: title }), jsxs("span", { className: "text-primary-main text-h6", children: [toLocalNumberFormat(2)(sum), " \u20BD"] })] }));
|
|
4039
4038
|
}
|
|
4040
4039
|
|
|
4041
4040
|
function getTileHeadingType(className = '') {
|
|
@@ -5025,7 +5024,7 @@
|
|
|
5025
5024
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
5026
5025
|
}
|
|
5027
5026
|
|
|
5028
|
-
const packageVersion = "0.10.
|
|
5027
|
+
const packageVersion = "0.10.10";
|
|
5029
5028
|
|
|
5030
5029
|
exports.Blocks = Blocks;
|
|
5031
5030
|
exports.ContentPage = ContentPage;
|