@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/ui-kit/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/ui-kit/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CACtB,CAAC,EACC,GAAG,EACH,SAAS,GAAG,EAAE,EACd,cAAc,GAAG,EAAE,EACnB,EAAE,EACF,IAAI,EACJ,IAAI,GAAG,MAAM,EACb,KAAK,EACL,WAAW,EACX,KAAK,GAAG,EAAE,EACV,KAAK,GAAG,IAAI,EACZ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,CAAkC,EAAE,EAAE;QACrC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,MAAM,UAAU,GAAG,KAAK;QACtB,CAAC,CAAC,6FAA6F;QAC/F,CAAC,CAAC,cAAc,CAAC;IAEnB,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,CAAC,aAC1C,4BACG,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,YAClC,KAAK,GACD,GACH,CACP,CAAC,CAAC,CAAC,IAAI,EACR,gBAEE,SAAS,EAAE,KAAK,CACd,6DAA6D,EAC7D,YAAY,EACZ,UAAU,EACV,cAAc,CACf,EACD,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,IAAI,EAAE,EAChB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAmB,EAC5B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,IAfX,GAAG,CAgBR,IACI,EACP,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LabelProps } from '../../model/HeadlineType';
|
|
2
2
|
import type { InputTypes } from '../../model/InputTypes';
|
|
3
|
-
|
|
3
|
+
import type { ControlProps } from '../ControlProps';
|
|
4
|
+
export interface InputProps<V = string> extends ControlProps<V>, LabelProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
inputClassName?: string;
|
|
6
7
|
id?: string;
|
|
@@ -8,10 +9,8 @@ export declare type InputProps = LabelProps & {
|
|
|
8
9
|
type?: InputTypes;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
pattern?: string;
|
|
11
|
-
value?: string;
|
|
12
|
-
onChange?: (value: string) => void;
|
|
13
|
-
onInput?: (event: any) => void;
|
|
14
12
|
onFocus?: (event: any) => void;
|
|
15
13
|
onBlur?: () => void;
|
|
16
14
|
valid?: boolean;
|
|
17
|
-
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useCallback
|
|
4
|
-
import {
|
|
3
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { useNormalizedInput } from '../../hooks/useNormalizedInput.js';
|
|
5
5
|
import { clamp } from '../../utils/clamp.js';
|
|
6
6
|
import { style } from '../../utils/style.js';
|
|
7
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
|
|
7
8
|
import { Text } from '../Text/Text.js';
|
|
8
9
|
import { parseDecimal } from './parseDecimal.js';
|
|
9
10
|
import { renderRangeWithTicks } from './renderRangeWithTicks.js';
|
|
10
11
|
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
11
12
|
const DEFAULT_MIN = 1;
|
|
12
13
|
const DEFAULT_MAX = 100;
|
|
13
|
-
export const InputRange = JSX((
|
|
14
|
-
const [
|
|
14
|
+
export const InputRange = JSX((props) => {
|
|
15
|
+
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;
|
|
16
|
+
const normalizedProps = useNormalizedInput(props, {
|
|
17
|
+
normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
|
|
18
|
+
format: toLocalNumberFormat(),
|
|
19
|
+
});
|
|
15
20
|
const handleChange = useCallback((e) => {
|
|
16
21
|
onChange && onChange(parseDecimal(e.target?.value));
|
|
17
22
|
}, [onChange]);
|
|
18
|
-
|
|
19
|
-
setFocused(true);
|
|
20
|
-
}, []);
|
|
21
|
-
const handleBlur = useCallback(() => {
|
|
22
|
-
setFocused(false);
|
|
23
|
-
onChange && onChange(list.length ? closestValue(list)(value) : clamp(value || 0, min, max));
|
|
24
|
-
}, [onChange, value]);
|
|
25
|
-
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)] }));
|
|
23
|
+
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)] }));
|
|
26
24
|
});
|
|
27
25
|
const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
28
26
|
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)))) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputRange.js","sourceRoot":"","sources":["../../../src/ui-kit/InputRange/InputRange.tsx"],"names":[],"mappings":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CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAEvF,MAAM,kBAAkB,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,CAC9C,cAAK,SAAS,EAAC,2BAA2B,YACvC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,KAAC,IAAI,IAAiB,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClE,IAAI,IADI,MAAM,CAAC,CAAC,CAAC,CAEb,CACR,CAAC,GACE,CACP,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
import type { InputProps } from '../Input/InputProps';
|
|
1
2
|
import type { ListContent } from '../List/ListContent';
|
|
2
|
-
export interface InputRangeProps extends ListContent {
|
|
3
|
-
className?: string;
|
|
3
|
+
export interface InputRangeProps extends ListContent, InputProps<number> {
|
|
4
4
|
items?: string[];
|
|
5
5
|
min?: number;
|
|
6
6
|
max?: number;
|
|
7
7
|
list?: number[];
|
|
8
8
|
step?: number;
|
|
9
|
-
value?: number;
|
|
10
9
|
title?: string;
|
|
11
10
|
disabled?: boolean;
|
|
12
|
-
onChange?: (value: number) => void;
|
|
13
11
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InputProps } from '../Input/InputProps';
|
|
2
|
+
export interface NumberInputProps extends InputProps<string> {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
fractionDigits?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const NumberInput: import("@redneckz/uni-jsx").UNIComponent<NumberInputProps, any, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { useNormalizedInput } from '../../hooks/useNormalizedInput.js';
|
|
5
|
+
import { clamp } from '../../utils/clamp.js';
|
|
6
|
+
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
|
|
7
|
+
import { Input } from '../Input/Input.js';
|
|
8
|
+
export const NumberInput = JSX((props) => {
|
|
9
|
+
const { onChange, min, max, defaultValue = '0', fractionDigits = 0, ...inputProps } = props;
|
|
10
|
+
const normalizedProps = useNormalizedInput(props, {
|
|
11
|
+
normalize: (_ = defaultValue) => min && max ? String(clamp(Number(sanitizeNumberStr(_)), min, max)) : sanitizeNumberStr(_),
|
|
12
|
+
format: toLocalNumberFormat(fractionDigits),
|
|
13
|
+
});
|
|
14
|
+
const handleChange = useCallback((_) => onChange && onChange(sanitizeNumberStr(_)), [onChange]);
|
|
15
|
+
return _jsx(Input, { onChange: handleChange, ...inputProps, ...normalizedProps });
|
|
16
|
+
});
|
|
17
|
+
const sanitizeNumberStr = (_ = '') => _.replaceAll(',', '.')
|
|
18
|
+
.replace(/[^\d.]/g, '')
|
|
19
|
+
.replace(/([^.]*\.[^.]*)\./, '$1');
|
|
20
|
+
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../src/ui-kit/NumberInput/NumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE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x").UNIComponent<InputProps
|
|
2
|
+
export declare const PhoneInput: import("@redneckz/uni-jsx").UNIComponent<InputProps<string>, any, any>;
|
|
@@ -4,7 +4,7 @@ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
4
4
|
import { Input } from '../Input/Input.js';
|
|
5
5
|
import { normalizePhone } from './normalizePhone.js';
|
|
6
6
|
export const PhoneInput = JSX(({ children, onChange, ...inputProps }) => {
|
|
7
|
-
const handleChange = useCallback((
|
|
8
|
-
return (_jsx(Input, {
|
|
7
|
+
const handleChange = useCallback((value) => onChange && onChange(normalizePhone(value)), [onChange]);
|
|
8
|
+
return (_jsx(Input, { onChange: handleChange, onFocus: handleChange, ...inputProps, children: children }));
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=PhoneInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.js","sourceRoot":"","sources":["../../../src/ui-kit/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAa,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAAE,EAAE;IAClF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,
|
|
1
|
+
{"version":3,"file":"PhoneInput.js","sourceRoot":"","sources":["../../../src/ui-kit/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAa,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAAE,EAAE;IAClF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAa,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAC9D,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,KAAC,KAAK,IAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,KAAM,UAAU,YACjE,QAAQ,GACH,CACT,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { SearchInput } from './SearchInput.js';
|
|
|
11
11
|
export const SEARCH_DIALOG_ID = 'search';
|
|
12
12
|
export const SearchDialog = JSX(({ topItems }) => {
|
|
13
13
|
const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
|
|
14
|
-
const basePathList = topItems?.map((_) => _.href || '/');
|
|
14
|
+
const basePathList = useMemo(() => topItems?.map((_) => _.href || '/'), [topItems]);
|
|
15
15
|
const [searchResult, searchInputProps] = useSearch({
|
|
16
16
|
basePathList,
|
|
17
17
|
initialQuery: dialogProps.message,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/SearchDialog/SearchDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAqB,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC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CAC5B,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAa,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAC3E;KACF,CAAC,CAAC;IACL,CAAC,CAAC,EAAE,CAAC;AAEX,OAAO;AACP,SAAS,gBAAgB,CAAC,QAA4B;IACpD,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE;QAC7D,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACzC,OAAO,CAAC,QAAQ,EAAE,CAAC;KACpB;AACH,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useLink } from '../../hooks/useLink.js';
|
|
4
4
|
import { projectSettings } from '../../ProjectSettings.js';
|
|
5
|
+
import { appendSlash } from '../../utils/appendSlash.js';
|
|
5
6
|
import { style } from '../../utils/style.js';
|
|
6
7
|
export const Sitemap = JSX(({ className, topItems }) => {
|
|
7
8
|
const link = useLink({ isRemote: true });
|
|
@@ -9,7 +10,7 @@ export const Sitemap = JSX(({ className, topItems }) => {
|
|
|
9
10
|
});
|
|
10
11
|
const renderColumn = (menuItem, index) => {
|
|
11
12
|
const { text, items, href, target, onClick } = menuItem;
|
|
12
|
-
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)));
|
|
13
|
+
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)));
|
|
13
14
|
};
|
|
14
15
|
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
15
16
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sitemap.js","sourceRoot":"","sources":["../../../src/ui-kit/Sitemap/Sitemap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAO1C,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzC,OAAO,CACL,cAAK,SAAS,EAAE,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,YACjE,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,GAClC,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,QAAoD,EAAE,KAAa,EAAE,EAAE;IAC3F,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EA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,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":"SlideCheckboxGro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AAE,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"}
|
|
@@ -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';
|
|
@@ -1058,44 +1059,50 @@
|
|
|
1058
1059
|
return orientation === 'horizontal' ? (jsx(SwipeListControl, { onVisibleIndicesChange: handleSlideChange, children: tableColumns })) : (tableColumns);
|
|
1059
1060
|
});
|
|
1060
1061
|
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1062
|
+
const isFilled = (_) => _ !== null && _ !== undefined;
|
|
1063
|
+
|
|
1064
|
+
const defaultCache = new Map();
|
|
1065
|
+
const applyCache = (fetcher, cache = defaultCache) => (key) => {
|
|
1066
|
+
const cachedData = cache.get(key);
|
|
1067
|
+
if (isFilled(cachedData)) {
|
|
1068
|
+
return cachedData;
|
|
1069
|
+
}
|
|
1070
|
+
const data = fetcher(key);
|
|
1071
|
+
if (isFilled(data)) {
|
|
1072
|
+
cache.set(key, Promise.resolve(data));
|
|
1073
|
+
}
|
|
1074
|
+
else {
|
|
1075
|
+
cache.delete(key);
|
|
1076
|
+
}
|
|
1077
|
+
return data;
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
const isSimpleKey = (args) => Boolean(args && Array.isArray(args) && args.length === 1 && typeof args[0] === 'string');
|
|
1081
|
+
function useAsyncData(key, fetcher, { fallback, cache } = {}) {
|
|
1063
1082
|
const args = useMemo(() => keyToArgs(key), [key]);
|
|
1064
|
-
const [
|
|
1065
|
-
const [
|
|
1066
|
-
const
|
|
1067
|
-
setData(_);
|
|
1068
|
-
setError(undefined);
|
|
1069
|
-
};
|
|
1070
|
-
const updateError = (_) => {
|
|
1071
|
-
setData(undefined);
|
|
1072
|
-
setError(_);
|
|
1073
|
-
};
|
|
1074
|
-
const chainToConsistentResult = (_) => {
|
|
1075
|
-
_.then(rawData => consistentDataMap.get(args) || rawData)
|
|
1076
|
-
.then(updateData)
|
|
1077
|
-
.catch(updateError);
|
|
1078
|
-
};
|
|
1083
|
+
const [simpleKey] = isSimpleKey(args) ? args : [];
|
|
1084
|
+
const [data, setData] = useState(undefined);
|
|
1085
|
+
const [error, setError] = useState(undefined);
|
|
1079
1086
|
useEffect(() => {
|
|
1080
|
-
const isEmptyKey = args.
|
|
1087
|
+
const isEmptyKey = !args.some(isFilled);
|
|
1081
1088
|
if (isEmptyKey) {
|
|
1082
1089
|
return;
|
|
1083
1090
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1091
|
+
(async () => {
|
|
1092
|
+
try {
|
|
1093
|
+
const newData = await (simpleKey
|
|
1094
|
+
? applyCache(fetcher, cache)(simpleKey)
|
|
1095
|
+
: fetcher(...args));
|
|
1096
|
+
setData(newData);
|
|
1097
|
+
setError(undefined);
|
|
1088
1098
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1099
|
+
catch (err) {
|
|
1100
|
+
setData(undefined);
|
|
1101
|
+
setError(err);
|
|
1091
1102
|
}
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}
|
|
1096
|
-
}, [fetcher, ...args]);
|
|
1097
|
-
const simpleKey = args[0];
|
|
1098
|
-
const fallbackData = fallback && typeof simpleKey === 'string' && fallback[simpleKey];
|
|
1103
|
+
})();
|
|
1104
|
+
}, [fetcher, cache, args]);
|
|
1105
|
+
const fallbackData = fallback && simpleKey && fallback[simpleKey];
|
|
1099
1106
|
return {
|
|
1100
1107
|
data: !data && fallbackData ? fallbackData : data,
|
|
1101
1108
|
error,
|
|
@@ -1104,9 +1111,6 @@
|
|
|
1104
1111
|
};
|
|
1105
1112
|
}
|
|
1106
1113
|
function keyToArgs(key) {
|
|
1107
|
-
if (!key) {
|
|
1108
|
-
return [key];
|
|
1109
|
-
}
|
|
1110
1114
|
if (Array.isArray(key)) {
|
|
1111
1115
|
return key;
|
|
1112
1116
|
}
|
|
@@ -1138,11 +1142,12 @@
|
|
|
1138
1142
|
return await response.json();
|
|
1139
1143
|
}
|
|
1140
1144
|
|
|
1145
|
+
const EMPTY_VALUE = {};
|
|
1141
1146
|
function useSWRResource(filename, fallback = {}) {
|
|
1142
1147
|
const { data } = useAsyncData(`/wcms-resources/${filename}.json`, fetchJSONUnsafe, {
|
|
1143
1148
|
fallback,
|
|
1144
1149
|
});
|
|
1145
|
-
return data ||
|
|
1150
|
+
return data || EMPTY_VALUE;
|
|
1146
1151
|
}
|
|
1147
1152
|
|
|
1148
1153
|
const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
|
|
@@ -1297,7 +1302,8 @@
|
|
|
1297
1302
|
const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
|
|
1298
1303
|
|
|
1299
1304
|
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
1300
|
-
const
|
|
1305
|
+
const DEFAULT_BASE_PATH = ['/'];
|
|
1306
|
+
const useSearch = ({ basePathList = DEFAULT_BASE_PATH, initialQuery = '', wasOpened, }) => {
|
|
1301
1307
|
const [query, setQuery] = useState(initialQuery || '');
|
|
1302
1308
|
useEffect(() => {
|
|
1303
1309
|
if (initialQuery !== undefined && initialQuery !== null) {
|
|
@@ -1305,7 +1311,7 @@
|
|
|
1305
1311
|
}
|
|
1306
1312
|
}, [initialQuery]);
|
|
1307
1313
|
const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
|
|
1308
|
-
[wasOpened,
|
|
1314
|
+
[wasOpened, basePathList]);
|
|
1309
1315
|
const { data } = useAsyncData(key, fetchSearchIndex);
|
|
1310
1316
|
const [result, setResult] = useState(null);
|
|
1311
1317
|
useDebouncedEffect(() => {
|
|
@@ -1376,7 +1382,7 @@
|
|
|
1376
1382
|
});
|
|
1377
1383
|
const renderColumn = (menuItem, index) => {
|
|
1378
1384
|
const { text, items, href, target, onClick } = menuItem;
|
|
1379
|
-
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)));
|
|
1385
|
+
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)));
|
|
1380
1386
|
};
|
|
1381
1387
|
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
1382
1388
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
@@ -1395,7 +1401,7 @@
|
|
|
1395
1401
|
const SEARCH_DIALOG_ID = 'search';
|
|
1396
1402
|
JSX(({ topItems }) => {
|
|
1397
1403
|
const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
|
|
1398
|
-
const basePathList = topItems?.map((_) => _.href || '/');
|
|
1404
|
+
const basePathList = useMemo(() => topItems?.map((_) => _.href || '/'), [topItems]);
|
|
1399
1405
|
const [searchResult, searchInputProps] = useSearch({
|
|
1400
1406
|
basePathList,
|
|
1401
1407
|
initialQuery: dialogProps.message,
|
|
@@ -2061,7 +2067,7 @@
|
|
|
2061
2067
|
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
2062
2068
|
}
|
|
2063
2069
|
|
|
2064
|
-
const packageVersion = "0.10.
|
|
2070
|
+
const packageVersion = "0.10.10";
|
|
2065
2071
|
|
|
2066
2072
|
exports.Blocks = Blocks;
|
|
2067
2073
|
exports.ContentPage = ContentPage;
|