@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
|
@@ -3,13 +3,15 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { SlideCheckbox } from '../SlideCheckbox/SlideCheckbox.js';
|
|
4
4
|
export const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
|
|
5
5
|
const handleChange = (newValue) => {
|
|
6
|
+
if (!onChange) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
6
9
|
if (multiple) {
|
|
7
10
|
const hasAlready = value?.includes(newValue);
|
|
8
|
-
onChange
|
|
9
|
-
onChange(hasAlready ? value?.filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
11
|
+
onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
10
12
|
}
|
|
11
13
|
else {
|
|
12
|
-
onChange
|
|
14
|
+
onChange(value === newValue ? '' : newValue);
|
|
13
15
|
}
|
|
14
16
|
};
|
|
15
17
|
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)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideCheckboxGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAiB/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5C,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,IAAI,QAAQ,EAAE;YACZ,MAAM,UAAU,GAAG,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"SlideCheckboxGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/SlideCheckboxGroup/SlideCheckboxGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAiB/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC5C,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO;SACR;QAED,IAAI,QAAQ,EAAE;YACZ,MAAM,UAAU,GAAG,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE7C,QAAQ,CACN,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CACxF,CAAC;SACH;aAAM;YACL,QAAQ,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC9C;IACH,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzB,KAAC,aAAa,IAEZ,IAAI,EAAE,IAAI,CAAC,KAAK,EAChB,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EACrD,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EACxC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,IAJhC,IAAI,CAAC,KAAK,CAKf,CACH,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const appendSlash: (url: string | undefined) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appendSlash.js","sourceRoot":"","sources":["../../src/utils/appendSlash.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,EAAE,CACrD,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const identity: <T>(_: T) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/utils/identity.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAI,CAAI,EAAE,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toLocalNumberFormat: (fractionDigits?: number) => (_?: string | number | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toLocalNumberFormat.js","sourceRoot":"","sources":["../../src/utils/toLocalNumberFormat.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,cAAc,GAAG,CAAC,EAAE,EAAE,CACvB,CAAC,IAAiC,CAAC,EAAU,EAAE,CAC7C,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC7B,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,cAAc;CACtC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { appendSlash } from './utils/appendSlash';
|
|
2
|
+
|
|
1
3
|
export interface ProjectSettings {
|
|
2
4
|
TEST_BRANCH?: string;
|
|
3
5
|
RC_BRANCH?: string;
|
|
@@ -59,5 +61,3 @@ export const projectSettings = new (class implements ProjectSettings {
|
|
|
59
61
|
return this._.YANDEX_METRIKA_ID;
|
|
60
62
|
}
|
|
61
63
|
})();
|
|
62
|
-
|
|
63
|
-
const appendSlash = (url: string | undefined) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
@@ -51,12 +51,12 @@ export const ApplicationFormDeposit = JSX<ApplicationFormsProps>((props) => {
|
|
|
51
51
|
/>
|
|
52
52
|
<div className="max-w-[560px] m-auto">
|
|
53
53
|
<InputControl
|
|
54
|
-
className="shrink-0
|
|
54
|
+
className="shrink-0 w-full mb-3"
|
|
55
55
|
label="Имя"
|
|
56
56
|
{...withValidator(field('name'), nameValidator)}
|
|
57
57
|
/>
|
|
58
58
|
<PhoneInputControl
|
|
59
|
-
className="shrink-0
|
|
59
|
+
className="shrink-0 w-full mb-3"
|
|
60
60
|
label="Телефон"
|
|
61
61
|
{...withValidator(field('phone'), phoneValidator)}
|
|
62
62
|
/>
|
|
@@ -9,24 +9,24 @@ export const renderAcquiringDataOrganization = (field: FormFieldRegisterer<Acqui
|
|
|
9
9
|
<div className="flex justify-between gap-5 mb-5">
|
|
10
10
|
<div className="w-1/2">
|
|
11
11
|
<InputControl
|
|
12
|
-
className="shrink-0
|
|
12
|
+
className="shrink-0 w-full mb-3"
|
|
13
13
|
label="Наименование организации"
|
|
14
14
|
{...withValidator(field('fullName'), defaultValidator)}
|
|
15
15
|
/>
|
|
16
16
|
<InputControl
|
|
17
|
-
className="shrink-0
|
|
17
|
+
className="shrink-0 w-full mb-3"
|
|
18
18
|
label="Контактное лицо"
|
|
19
19
|
{...withValidator(field('name'), nameValidator)}
|
|
20
20
|
/>
|
|
21
21
|
</div>
|
|
22
22
|
<div className="w-1/2">
|
|
23
23
|
<InputControl
|
|
24
|
-
className="shrink-0
|
|
24
|
+
className="shrink-0 w-full mb-3"
|
|
25
25
|
label="ИНН"
|
|
26
26
|
{...withValidator(field('inn'), innValidator)}
|
|
27
27
|
/>
|
|
28
28
|
<PhoneInputControl
|
|
29
|
-
className="shrink-0
|
|
29
|
+
className="shrink-0 w-full mb-3"
|
|
30
30
|
label="Телефон"
|
|
31
31
|
{...withValidator(field('phone'), phoneValidator)}
|
|
32
32
|
/>
|
|
@@ -11,24 +11,24 @@ export const renderBusinessCardDataOrganization = (
|
|
|
11
11
|
<div className="flex justify-between gap-5">
|
|
12
12
|
<div className="w-1/2">
|
|
13
13
|
<InputControl
|
|
14
|
-
className="shrink-0
|
|
14
|
+
className="shrink-0 w-full mb-3"
|
|
15
15
|
label="Контактное лицо"
|
|
16
16
|
{...withValidator(field('name'), nameValidator)}
|
|
17
17
|
/>
|
|
18
18
|
<InputControl
|
|
19
|
-
className="shrink-0
|
|
19
|
+
className="shrink-0 w-full mb-3"
|
|
20
20
|
label="ИНН"
|
|
21
21
|
{...withValidator(field('inn'), innValidator)}
|
|
22
22
|
/>
|
|
23
23
|
</div>
|
|
24
24
|
<div className="w-1/2">
|
|
25
25
|
<PhoneInputControl
|
|
26
|
-
className="shrink-0
|
|
26
|
+
className="shrink-0 w-full mb-3"
|
|
27
27
|
label="Телефон"
|
|
28
28
|
{...withValidator(field('phone'), phoneValidator)}
|
|
29
29
|
/>
|
|
30
30
|
<InputControl
|
|
31
|
-
className="shrink-0
|
|
31
|
+
className="shrink-0 w-full mb-3"
|
|
32
32
|
label="Электронная почта"
|
|
33
33
|
{...withValidator(field('mail'), defaultValidator)}
|
|
34
34
|
/>
|
|
@@ -9,37 +9,33 @@ export const renderCreditDataOrganization = (field: FormFieldRegisterer<CreditFo
|
|
|
9
9
|
<div className="flex justify-between gap-5 mb-7">
|
|
10
10
|
<div className="w-1/2">
|
|
11
11
|
<InputControl
|
|
12
|
-
className="shrink-0
|
|
12
|
+
className="shrink-0 w-full mb-3"
|
|
13
13
|
label="Наименование организации"
|
|
14
14
|
{...field('fullName')}
|
|
15
15
|
/>
|
|
16
16
|
<InputControl
|
|
17
|
-
className="shrink-0
|
|
17
|
+
className="shrink-0 w-full mb-3"
|
|
18
18
|
label="ИНН"
|
|
19
19
|
{...withValidator(field('inn'), innValidator)}
|
|
20
20
|
/>
|
|
21
21
|
<PhoneInputControl
|
|
22
|
-
className="shrink-0
|
|
22
|
+
className="shrink-0 w-full mb-3"
|
|
23
23
|
label="Телефон"
|
|
24
24
|
{...withValidator(field('phone'), phoneValidator)}
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
27
|
<div className="w-1/2">
|
|
28
28
|
<InputControl
|
|
29
|
-
className="shrink-0
|
|
29
|
+
className="shrink-0 w-full mb-3"
|
|
30
30
|
label="Годовая выручка, ₽"
|
|
31
31
|
{...withValidator(field('annualRevenue'), defaultValidator)}
|
|
32
32
|
/>
|
|
33
33
|
<InputControl
|
|
34
|
-
className="shrink-0
|
|
34
|
+
className="shrink-0 w-full mb-3"
|
|
35
35
|
label="Контактное лицо"
|
|
36
36
|
{...withValidator(field('name'), nameValidator)}
|
|
37
37
|
/>
|
|
38
|
-
<InputControl
|
|
39
|
-
className="shrink-0 text-l w-full mb-3"
|
|
40
|
-
label="Электронная почта"
|
|
41
|
-
{...field('mail')}
|
|
42
|
-
/>
|
|
38
|
+
<InputControl className="shrink-0 w-full mb-3" label="Электронная почта" {...field('mail')} />
|
|
43
39
|
</div>
|
|
44
40
|
</div>
|
|
45
41
|
);
|
|
@@ -10,14 +10,14 @@ export const renderWedDataOrganization = (field: FormFieldRegisterer<WedFormStat
|
|
|
10
10
|
<div className="flex justify-between gap-5">
|
|
11
11
|
<div className="w-1/2">
|
|
12
12
|
<InputControl
|
|
13
|
-
className="shrink-0
|
|
13
|
+
className="shrink-0 w-full mb-3"
|
|
14
14
|
label="Наименование организации"
|
|
15
15
|
{...withValidator(field('fullName'), defaultValidator)}
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
18
|
<div className="w-1/2">
|
|
19
19
|
<InputControl
|
|
20
|
-
className="shrink-0
|
|
20
|
+
className="shrink-0 w-full mb-3"
|
|
21
21
|
label="ФИО"
|
|
22
22
|
{...withValidator(field('name'), nameValidator)}
|
|
23
23
|
/>
|
|
@@ -26,14 +26,14 @@ export const renderWedDataOrganization = (field: FormFieldRegisterer<WedFormStat
|
|
|
26
26
|
<div className="flex justify-between gap-5 mb-7">
|
|
27
27
|
<div className="w-1/2">
|
|
28
28
|
<PhoneInputControl
|
|
29
|
-
className="shrink-0
|
|
29
|
+
className="shrink-0 w-full mb-3"
|
|
30
30
|
label="Телефон"
|
|
31
31
|
{...withValidator(field('phone'), phoneValidator)}
|
|
32
32
|
/>
|
|
33
33
|
</div>
|
|
34
34
|
<div className="w-1/2">
|
|
35
35
|
<InputControl
|
|
36
|
-
className="shrink-0
|
|
36
|
+
className="shrink-0 w-full mb-3"
|
|
37
37
|
label="Электронная почта"
|
|
38
38
|
{...withValidator(field('mail'), defaultValidator)}
|
|
39
39
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
-
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
4
3
|
import { style } from '../../utils/style';
|
|
4
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
5
5
|
|
|
6
6
|
export interface CalculatorValueBlockProps {
|
|
7
7
|
title?: string;
|
|
@@ -22,7 +22,7 @@ export const CalculatorValueBlock = JSX<CalculatorValueBlockProps>(
|
|
|
22
22
|
{value ? (
|
|
23
23
|
<div>
|
|
24
24
|
<Text size="text-h3">
|
|
25
|
-
{prefix} {
|
|
25
|
+
{prefix} {toLocalNumberFormat(2)(Math.round(value))} {postfix}
|
|
26
26
|
</Text>
|
|
27
27
|
</div>
|
|
28
28
|
) : (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// TEMP
|
|
2
2
|
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
3
|
-
import {
|
|
3
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
4
4
|
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
|
|
5
5
|
|
|
6
6
|
const STEP_MONEY = 1000;
|
|
@@ -24,8 +24,8 @@ export function renderInitialFeeInput(
|
|
|
24
24
|
className="mt-7"
|
|
25
25
|
title={title}
|
|
26
26
|
items={[
|
|
27
|
-
`От ${
|
|
28
|
-
`До ${
|
|
27
|
+
`От ${toLocalNumberFormat(0)(minSum)} рублей`,
|
|
28
|
+
`До ${toLocalNumberFormat(0)(maxSum)} рублей`,
|
|
29
29
|
]}
|
|
30
30
|
min={minSum}
|
|
31
31
|
max={maxSum}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Button } from '../../ui-kit/Button/Button';
|
|
2
|
-
import {
|
|
2
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
3
3
|
|
|
4
4
|
export function renderProposal(monthlyPayment: number) {
|
|
5
5
|
return (
|
|
6
6
|
<div className="box-border ">
|
|
7
7
|
<div className="text-l-light">Ежемесячный платёж</div>
|
|
8
|
-
<div className="text-h3 mb-3">{
|
|
8
|
+
<div className="text-h3 mb-3">{toLocalNumberFormat(2)(Math.round(monthlyPayment))} ₽</div>
|
|
9
9
|
<Button className="mt-12 w-full" text="Отправить заявку" version="primary" href="#" />
|
|
10
10
|
</div>
|
|
11
11
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// TEMP
|
|
2
2
|
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
3
|
-
import {
|
|
3
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
4
4
|
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
|
|
5
5
|
|
|
6
6
|
const STEP_MONEY = 1000;
|
|
@@ -22,7 +22,7 @@ export function renderRealEstateValue(
|
|
|
22
22
|
return (
|
|
23
23
|
<InputRange
|
|
24
24
|
title={title}
|
|
25
|
-
items={[`От ${
|
|
25
|
+
items={[`От ${toLocalNumberFormat(2)(minSum)} ₽`, `До ${toLocalNumberFormat(2)(maxSum)} ₽`]}
|
|
26
26
|
min={minSum}
|
|
27
27
|
max={maxSum}
|
|
28
28
|
step={STEP_MONEY}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
2
|
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
-
import {
|
|
3
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_MONEY_STEP = 1000;
|
|
6
6
|
|
|
@@ -14,8 +14,8 @@ export function renderWantedSumInput({
|
|
|
14
14
|
...rest
|
|
15
15
|
}: RenderWantedSumParams) {
|
|
16
16
|
const items = [
|
|
17
|
-
`От ${
|
|
18
|
-
`До ${
|
|
17
|
+
`От ${toLocalNumberFormat(2)(rest.min || 0)} ₽`,
|
|
18
|
+
`До ${toLocalNumberFormat(2)(rest.max || 0)} ₽`,
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
return <InputRange items={isShowItems ? items : []} step={step} {...rest} />;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useForm } from '../../hooks/useForm';
|
|
3
3
|
import { useLink } from '../../hooks/useLink';
|
|
4
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
@@ -7,15 +7,19 @@ import { getDisabledButtonClasses } from '../../ui-kit/Button/getDisabledButtonC
|
|
|
7
7
|
import { getRegularButtonClasses } from '../../ui-kit/Button/getRegularButtonClasses';
|
|
8
8
|
import { CurrencyInput } from '../../ui-kit/CurrencyInput/CurrencyInput';
|
|
9
9
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
10
|
-
import {
|
|
10
|
+
import { style } from '../../utils/style';
|
|
11
11
|
import type { CardTransferContent } from './CardTransferContent';
|
|
12
12
|
|
|
13
|
-
const AMOUNT_KEY = 'amount';
|
|
14
|
-
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
15
13
|
const DEFAULT_TITLE = 'Укажите сумму перевода';
|
|
16
14
|
const DEFAULT_LABEL = 'Сумма перевода';
|
|
17
15
|
const DEFAULT_PLACEHOLDER = '1500';
|
|
18
16
|
|
|
17
|
+
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
18
|
+
const AMOUNT_KEY = 'amount';
|
|
19
|
+
const INITIAL_FORM_STATE = {
|
|
20
|
+
[AMOUNT_KEY]: 1500,
|
|
21
|
+
};
|
|
22
|
+
|
|
19
23
|
export interface CardTransferProps extends CardTransferContent, UniBlockProps {}
|
|
20
24
|
|
|
21
25
|
export const CardTransfer = JSX<CardTransferProps>(
|
|
@@ -27,9 +31,10 @@ export const CardTransfer = JSX<CardTransferProps>(
|
|
|
27
31
|
button,
|
|
28
32
|
...rest
|
|
29
33
|
}) => {
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
const isDisabled =
|
|
34
|
+
const [{ amount }, { field }] = useForm(INITIAL_FORM_STATE);
|
|
35
|
+
|
|
36
|
+
const isDisabled = amount <= 0;
|
|
37
|
+
|
|
33
38
|
const buttonStyle = isDisabled
|
|
34
39
|
? getDisabledButtonClasses({ version: button?.version })
|
|
35
40
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
@@ -37,21 +42,20 @@ export const CardTransfer = JSX<CardTransferProps>(
|
|
|
37
42
|
const link = useLink();
|
|
38
43
|
|
|
39
44
|
return (
|
|
40
|
-
<BlockWrapper className={
|
|
45
|
+
<BlockWrapper className={style('p-default flex flex-col items-center', className)} {...rest}>
|
|
41
46
|
{title ? <Heading className="max-w-[684px] pb-9" headingType="h2" title={title} /> : null}
|
|
42
47
|
<form className="w-[468px]" method="POST" action={FORM_URL}>
|
|
43
48
|
<CurrencyInput
|
|
44
49
|
name={AMOUNT_KEY}
|
|
45
|
-
|
|
46
|
-
onChange={handleChange}
|
|
47
|
-
valid={value === '' || !isDisabled}
|
|
50
|
+
valid={!isDisabled}
|
|
48
51
|
placeholder={placeholder}
|
|
49
52
|
label={label}
|
|
53
|
+
{...field(AMOUNT_KEY, { parse: Number, format: String })}
|
|
50
54
|
/>
|
|
51
55
|
{button?.text ? (
|
|
52
56
|
<button
|
|
53
57
|
type="submit"
|
|
54
|
-
className={
|
|
58
|
+
className={style('w-full p-4 mt-6', buttonStyle)}
|
|
55
59
|
disabled={isDisabled}
|
|
56
60
|
{...link(button)}
|
|
57
61
|
>
|
|
@@ -24,7 +24,7 @@ export const Filtration: JSXBlock<FiltrationProps> = JSX<FiltrationProps>(
|
|
|
24
24
|
</div>
|
|
25
25
|
{resetButton ? (
|
|
26
26
|
<div>
|
|
27
|
-
<Button className="w-72" onClick={reset} {...resetButton} />
|
|
27
|
+
<Button className="w-72 ml-3" onClick={reset} {...resetButton} />
|
|
28
28
|
</div>
|
|
29
29
|
) : null}
|
|
30
30
|
</form>
|
|
@@ -46,7 +46,6 @@ export type StringArray = {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
// TODO: Make customizable to implement arbitrary filtration blocks
|
|
50
49
|
export type FiltrationSchema = {
|
|
51
50
|
/** @title Тип недвижимости */
|
|
52
51
|
propertyType?: StringArray;
|
|
@@ -62,13 +61,9 @@ export type FiltrationSchema = {
|
|
|
62
61
|
* @title Кнопка сброса
|
|
63
62
|
*/
|
|
64
63
|
export type ResetButton = {
|
|
65
|
-
/**
|
|
66
|
-
* @title Текст кнопки
|
|
67
|
-
*/
|
|
64
|
+
/** @title Текст кнопки */
|
|
68
65
|
text: string;
|
|
69
|
-
/**
|
|
70
|
-
* @title Цвет кнопки
|
|
71
|
-
*/
|
|
66
|
+
/** @title Цвет кнопки */
|
|
72
67
|
version: ButtonVersion;
|
|
73
68
|
};
|
|
74
69
|
|
|
@@ -30,7 +30,7 @@ const renderCheckboxes = (key: string, field: FormFieldRegisterer<any>) => (item
|
|
|
30
30
|
</Text>
|
|
31
31
|
</div>
|
|
32
32
|
) : null}
|
|
33
|
-
<SlideCheckboxGroup items={options} multiple {...field(key)} />
|
|
33
|
+
<SlideCheckboxGroup items={options} multiple {...field<string, string[] | undefined>(key)} />
|
|
34
34
|
</div>
|
|
35
35
|
);
|
|
36
36
|
};
|
|
@@ -5,7 +5,7 @@ import { Button } from '../../ui-kit/Button/Button';
|
|
|
5
5
|
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
6
|
import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
7
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
-
import {
|
|
8
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
9
9
|
import type { CardItem, InsuranceAmountBlockTab } from './InsuranceAmountBlockContent';
|
|
10
10
|
|
|
11
11
|
export interface InsuranceAmountBlockInnerProps extends InsuranceAmountBlockTab {
|
|
@@ -122,7 +122,7 @@ function renderNavButton({ slide, i, isActive, onClick }: NavButtonProps) {
|
|
|
122
122
|
function renderValueBlock(title: string, sum: number) {
|
|
123
123
|
return (
|
|
124
124
|
<div className="flex flex-col text-left whitespace-pre">
|
|
125
|
-
<span className="text-h6">{
|
|
125
|
+
<span className="text-h6">{toLocalNumberFormat(2)(sum)} ₽</span>
|
|
126
126
|
<span className="text-secondary-text text-l mt-1">{title}</span>
|
|
127
127
|
</div>
|
|
128
128
|
);
|
|
@@ -2,17 +2,17 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
4
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
5
|
+
import { OFFICE_MAP } from './mockOfficeMap';
|
|
5
6
|
import { nearbyOffices } from './nearbyOffices';
|
|
6
7
|
import type { OfficeMapContent, WorkScheduleWeek } from './OfficeMapContent';
|
|
7
8
|
import { renderCurrentDaySchedule, renderDay, renderNearbyOffice } from './renderFunctions';
|
|
8
|
-
import { useOfficeMap } from './useOfficeMap';
|
|
9
9
|
|
|
10
10
|
export interface OfficeMapProps extends OfficeMapContent, UniBlockProps {}
|
|
11
11
|
export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
12
12
|
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
13
13
|
// TODO: useOfficeMap has return MOCK OBJECT!
|
|
14
14
|
// TODO: Fix this when endpoint /api/v1/branches (or new endpoint) had returning right data
|
|
15
|
-
const resultOfficeMap =
|
|
15
|
+
const resultOfficeMap = OFFICE_MAP;
|
|
16
16
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } =
|
|
17
17
|
resultOfficeMap as OfficeMapContent;
|
|
18
18
|
const {
|
|
@@ -12,9 +12,7 @@ export function useOfficeMap(regionCode?: string) {
|
|
|
12
12
|
fetchOfficeMap,
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return OFFICE_MAP;
|
|
15
|
+
return data || OFFICE_MAP;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
function fetchOfficeMap(url?: string) {
|
|
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
3
3
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
4
|
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
-
import {
|
|
5
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
|
|
6
6
|
import { Headline } from '../Headline/Headline';
|
|
7
7
|
import type { PictureTextContent } from './PictureTextContent';
|
|
8
8
|
import { renderBenefit } from './renderBenefit';
|
|
@@ -54,7 +54,7 @@ function renderValueBlock(title: string, sum = 0, isAnotherBlock = false) {
|
|
|
54
54
|
return (
|
|
55
55
|
<div className={`flex justify-between items-center gap-2 w-full whitespace-pre ${widthStyle}`}>
|
|
56
56
|
<span className="text-secondary-text text-l-light">{title}</span>
|
|
57
|
-
<span className="text-primary-main text-h6">{
|
|
57
|
+
<span className="text-primary-main text-h6">{toLocalNumberFormat(2)(sum)} ₽</span>
|
|
58
58
|
</div>
|
|
59
59
|
);
|
|
60
60
|
}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { useCallback, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { ControlProps } from '../ui-kit/ControlProps';
|
|
2
3
|
import type { PreventableEvent } from '../ui-kit/PreventableEvent';
|
|
4
|
+
import { identity } from '../utils/identity';
|
|
3
5
|
|
|
4
|
-
export interface FieldProps<V> {
|
|
5
|
-
value?: V;
|
|
6
|
+
export interface FieldProps<V> extends ControlProps<V> {
|
|
6
7
|
isDirty?: boolean;
|
|
7
|
-
onChange?: (value: V) => void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type Options<In, Out> = {
|
|
11
|
+
parse?: (_: In) => Out;
|
|
12
|
+
format?: (_: Out) => In;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type FormFieldRegisterer<FormState> = <N extends keyof FormState, V = FormState[N]>(
|
|
11
16
|
fieldName: N,
|
|
12
|
-
|
|
17
|
+
options?: Options<V, FormState[N]>,
|
|
18
|
+
) => FieldProps<V extends undefined ? FormState[N] : V>;
|
|
13
19
|
|
|
14
20
|
export const useForm = <FormState extends Record<string, any>>(
|
|
15
21
|
initialState: FormState,
|
|
@@ -33,18 +39,20 @@ export const useForm = <FormState extends Record<string, any>>(
|
|
|
33
39
|
const handlersMap = useRef<Partial<Record<keyof FormState, (value: any) => void>>>({});
|
|
34
40
|
|
|
35
41
|
const field: FormFieldRegisterer<FormState> = useCallback(
|
|
36
|
-
(fieldName) => {
|
|
42
|
+
(fieldName, options) => {
|
|
43
|
+
const { parse = identity, format = identity } = options || {};
|
|
44
|
+
|
|
37
45
|
if (!handlersMap.current) {
|
|
38
46
|
handlersMap.current = {};
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
handlersMap.current[fieldName] ||= (value) => {
|
|
42
|
-
setFormState((prev) => ({ ...prev, [fieldName]: value }));
|
|
50
|
+
setFormState((prev) => ({ ...prev, [fieldName]: parse(value) }));
|
|
43
51
|
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
return {
|
|
47
|
-
value: formState[fieldName],
|
|
55
|
+
value: format(formState[fieldName]) as any,
|
|
48
56
|
isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
|
|
49
57
|
onChange: handlersMap.current[fieldName],
|
|
50
58
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { InputProps } from '../ui-kit/Input/InputProps';
|
|
3
|
+
|
|
4
|
+
interface UseNormalizedInputOptions<V, R> {
|
|
5
|
+
normalize: (v: V | undefined) => V;
|
|
6
|
+
format?: (v: V | undefined) => R;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const useNormalizedInput = <V, P extends InputProps<V>, R = V>(
|
|
10
|
+
props: P,
|
|
11
|
+
{ normalize, format }: UseNormalizedInputOptions<V, R>,
|
|
12
|
+
) => {
|
|
13
|
+
const { value, onFocus, onBlur, onChange } = props;
|
|
14
|
+
|
|
15
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
16
|
+
|
|
17
|
+
const handleFocus = useCallback((e) => {
|
|
18
|
+
setIsFocused(true);
|
|
19
|
+
onFocus && onFocus(e);
|
|
20
|
+
}, []);
|
|
21
|
+
|
|
22
|
+
const handleBlur = useCallback(() => {
|
|
23
|
+
setIsFocused(false);
|
|
24
|
+
onChange && onChange(normalize(value));
|
|
25
|
+
onBlur && onBlur();
|
|
26
|
+
}, [onChange, value]);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
value: (isFocused || !format ? value : format(value)) as R,
|
|
30
|
+
onFocus: handleFocus,
|
|
31
|
+
onBlur: handleBlur,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -2,10 +2,12 @@ import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
|
2
2
|
import type { Fallback } from '../model/Fallback';
|
|
3
3
|
import { fetchJSONUnsafe } from '../utils/fetchJSON';
|
|
4
4
|
|
|
5
|
+
const EMPTY_VALUE = {};
|
|
6
|
+
|
|
5
7
|
export function useSWRResource<Data>(filename: string, fallback: Fallback = {}): Data {
|
|
6
8
|
const { data } = useAsyncData<Data>(`/wcms-resources/${filename}.json`, fetchJSONUnsafe, {
|
|
7
9
|
fallback,
|
|
8
10
|
});
|
|
9
11
|
|
|
10
|
-
return data || (
|
|
12
|
+
return data || (EMPTY_VALUE as Data);
|
|
11
13
|
}
|