mediacube-ui-v2 0.0.7 → 0.0.9
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/dist/App.vue.js +54 -0
- package/dist/assets/tokens/json/animations.json +6 -0
- package/dist/assets/tokens/json/border-radius.json +24 -0
- package/dist/assets/tokens/json/box-shadows.json +24 -0
- package/dist/assets/tokens/json/colors.json +71 -0
- package/dist/assets/tokens/json/durations.json +10 -0
- package/dist/assets/tokens/json/easings.json +3 -0
- package/dist/assets/tokens/json/font-families.json +4 -0
- package/dist/assets/tokens/json/font-sizes.json +18 -0
- package/dist/assets/tokens/json/font-weights.json +12 -0
- package/dist/assets/tokens/json/gradients.json +13 -0
- package/dist/assets/tokens/json/index.js +18 -0
- package/dist/assets/tokens/json/letter-spacings.json +4 -0
- package/dist/assets/tokens/json/line-heights.json +18 -0
- package/dist/assets/tokens/json/media-queries.json +26 -0
- package/dist/assets/tokens/json/opacities.json +5 -0
- package/dist/assets/tokens/json/sizes.json +42 -0
- package/dist/assets/tokens/json/spacings.json +34 -0
- package/dist/assets/tokens/json/z-indexes.json +12 -0
- package/dist/components/elements/McAvatar/McAvatar.vue.js +412 -0
- package/dist/components/elements/McBadge/McBadge.vue.js +188 -0
- package/dist/components/elements/McBottomLoader/McBottomLoader.vue.js +83 -0
- package/dist/components/elements/McButton/McButton.vue.js +1037 -0
- package/dist/components/elements/McChip/McChip.vue.js +326 -0
- package/dist/components/elements/McCropper/McCropper.vue.js +98 -0
- package/dist/components/elements/McDatepicker/McDatepicker.vue.js +1255 -0
- package/dist/components/elements/McDraggable/McDraggable.vue.js +280 -0
- package/dist/components/elements/McFieldCheckbox/McFieldCheckbox.vue.js +542 -0
- package/dist/components/elements/McFieldRadio/McFieldRadio.vue.js +489 -0
- package/dist/components/elements/McFieldRadioGroup/McFieldRadioGroup.vue.js +471 -0
- package/dist/components/elements/McFieldRange/McFieldRange.vue.js +547 -0
- package/dist/components/elements/McFieldSelect/McFieldSelect.vue.js +1440 -0
- package/dist/components/elements/McFieldText/McFieldText.vue.js +1404 -0
- package/dist/components/elements/McFieldToggle/McFieldToggle.vue.js +408 -0
- package/dist/components/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.js +192 -0
- package/dist/components/elements/McNodata/McNoData.vue.js +319 -0
- package/dist/components/elements/McNotification/McNotification.vue.js +367 -0
- package/dist/components/elements/McProgress/McProgress.vue.js +361 -0
- package/dist/components/elements/McSeparator/McSeparator.vue.js +325 -0
- package/dist/components/elements/McSlideUpDown/McSlideUpDown.vue.js +271 -0
- package/dist/components/elements/McStack/McStack.vue.js +180 -0
- package/dist/components/elements/McSvgIcon/McSvgIcon.vue.js +289 -0
- package/dist/components/elements/McTitle/McTitle.vue.js +468 -0
- package/dist/components/elements/McTooltip/McTooltip.vue.js +246 -0
- package/dist/components/index.js +73 -0
- package/dist/components/patterns/McAccordion/McAccordion.vue.js +120 -0
- package/dist/components/patterns/McCell/McCell.vue.js +197 -0
- package/dist/components/patterns/McCollapse/McCollapse.vue.js +315 -0
- package/dist/components/patterns/McDropdown/McDropdown.vue.js +366 -0
- package/dist/components/patterns/McDropdown/McDropdownPanel.vue.js +83 -0
- package/dist/components/patterns/McFilter/McFilter.vue.js +1068 -0
- package/dist/components/patterns/McFilter/McFilterChip/McFilterChip.vue.js +211 -0
- package/dist/components/patterns/McFilter/McFilterTags/McFilterTags.vue.js +552 -0
- package/dist/components/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.js +188 -0
- package/dist/components/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.js +238 -0
- package/dist/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.js +359 -0
- package/dist/components/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.js +171 -0
- package/dist/components/patterns/McGridCol/McGridCol.vue.js +246 -0
- package/dist/components/patterns/McGridRow/McGridRow.vue.js +292 -0
- package/dist/components/patterns/McOverlay/McOverlay.vue.js +107 -0
- package/dist/components/patterns/McPreview/McPreview.vue.js +118 -0
- package/dist/components/patterns/McSideBar/McSideBar.vue.js +740 -0
- package/dist/components/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.js +204 -0
- package/dist/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.js +510 -0
- package/dist/components/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.js +413 -0
- package/dist/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.js +419 -0
- package/dist/components/patterns/McTab/McTab.vue.js +518 -0
- package/dist/components/patterns/McTabs/McTabs.vue.js +427 -0
- package/dist/components/patterns/McWrapScroll/McWrapScroll.vue.js +422 -0
- package/dist/components/templates/McDrawer/McDrawer.vue.js +304 -0
- package/dist/components/templates/McDrawer/McDrawerContainer.vue.js +133 -0
- package/dist/components/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.js +134 -0
- package/dist/components/templates/McModal/McModal.vue.js +664 -0
- package/dist/components/templates/McModal/McModalContainer.vue.js +119 -0
- package/dist/components/templates/McTable/McTable/McTable.vue.js +862 -0
- package/dist/components/templates/McTable/McTableCard/McTableCard.vue.js +339 -0
- package/dist/components/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.js +119 -0
- package/dist/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.js +118 -0
- package/dist/components/templates/McTable/McTableSort/McTableSort.vue.js +136 -0
- package/dist/components/templates/McTopBar/McTopBar.vue.js +309 -0
- package/dist/components/templates/McVirtualScroll/McVirtualScroll.vue.js +239 -0
- package/dist/composables/index.js +8 -0
- package/dist/composables/useDrawer.js +72 -0
- package/dist/composables/useEncodeDecode.js +25 -0
- package/dist/composables/useFieldErrors.js +20 -0
- package/dist/composables/useHelper.js +79 -0
- package/dist/composables/useModal.js +71 -0
- package/dist/composables/useRandomNumber.js +10 -0
- package/dist/composables/useTooltip.js +154 -0
- package/dist/consts/table.js +6 -0
- package/dist/enums/Cell.js +6 -0
- package/dist/enums/Chip.js +11 -0
- package/dist/enums/Datepicker.js +42 -0
- package/dist/enums/Drawer.js +5 -0
- package/dist/enums/Dropdown.js +12 -0
- package/dist/enums/Filter.js +14 -0
- package/dist/enums/Grid.js +24 -0
- package/dist/enums/Input.js +20 -0
- package/dist/enums/Modal.js +5 -0
- package/dist/enums/Preview.js +6 -0
- package/dist/enums/Radio.js +5 -0
- package/dist/enums/RadioGroup.js +5 -0
- package/dist/enums/Select.js +11 -0
- package/dist/enums/Sidebar.js +5 -0
- package/dist/enums/Tab.js +6 -0
- package/dist/enums/Title.js +21 -0
- package/dist/enums/Tooltip.js +15 -0
- package/dist/enums/index.js +22 -0
- package/dist/enums/ui/Alignment.js +6 -0
- package/dist/enums/ui/Button.js +24 -0
- package/dist/enums/ui/Directions.js +5 -0
- package/dist/enums/ui/Weights.js +7 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +13 -10584
- package/dist/main.js +6 -0
- package/dist/mocks/authUser.js +162 -0
- package/dist/mocks/categories.js +107 -0
- package/dist/mocks/filterMocks.js +128 -0
- package/dist/mocks/icons.json +1 -0
- package/dist/mocks/menuLangs.js +19 -0
- package/dist/mocks/sidebar.js +125 -0
- package/dist/mocks/tableData.js +8180 -0
- package/dist/style.css +1 -1
- package/dist/types/App.vue.d.ts +2 -0
- package/dist/types/IButton.js +1 -0
- package/dist/types/ICell.js +1 -0
- package/dist/types/IChip.js +1 -0
- package/dist/types/ICollapse.js +1 -0
- package/dist/types/IDatepicker.js +1 -0
- package/dist/types/IDirections.js +1 -0
- package/dist/types/IDrawer.js +1 -0
- package/dist/types/IDropdown.js +1 -0
- package/dist/types/IFilter.js +1 -0
- package/dist/types/IGrid.js +1 -0
- package/dist/types/IInput.js +1 -0
- package/dist/types/IModal.js +1 -0
- package/dist/types/IPreview.js +1 -0
- package/dist/types/IRadio.js +1 -0
- package/dist/types/IRadioGroup.js +1 -0
- package/dist/types/IRoute.js +1 -0
- package/dist/types/ISelect.js +1 -0
- package/dist/types/ISideBar.js +1 -0
- package/dist/types/ITable.js +1 -0
- package/dist/types/ITabs.js +1 -0
- package/dist/types/ITitle.js +1 -0
- package/dist/types/ITooltip.js +1 -0
- package/dist/types/assets/tokens/json/index.d.ts +18 -0
- package/dist/{components → types/components}/elements/McAvatar/McAvatar.vue.d.ts +5 -5
- package/dist/{components → types/components}/elements/McBadge/McBadge.vue.d.ts +3 -3
- package/dist/types/components/elements/McBottomLoader/McBottomLoader.vue.d.ts +14 -0
- package/dist/{components → types/components}/elements/McButton/McButton.vue.d.ts +13 -12
- package/dist/{components → types/components}/elements/McChip/McChip.vue.d.ts +7 -6
- package/dist/types/components/elements/McCropper/McCropper.vue.d.ts +2 -0
- package/dist/{components → types/components}/elements/McDatepicker/McDatepicker.vue.d.ts +2 -1
- package/dist/{components → types/components}/elements/McDraggable/McDraggable.vue.d.ts +4 -4
- package/dist/{components → types/components}/elements/McFieldCheckbox/McFieldCheckbox.vue.d.ts +1 -1
- package/dist/{components → types/components}/elements/McFieldRadio/McFieldRadio.vue.d.ts +8 -8
- package/dist/{components → types/components}/elements/McFieldRadioGroup/McFieldRadioGroup.vue.d.ts +1 -1
- package/dist/{components → types/components}/elements/McFieldRange/McFieldRange.vue.d.ts +6 -6
- package/dist/{components → types/components}/elements/McFieldSelect/McFieldSelect.vue.d.ts +12 -11
- package/dist/{components → types/components}/elements/McFieldText/McFieldText.vue.d.ts +9 -9
- package/dist/{components → types/components}/elements/McFieldToggle/McFieldToggle.vue.d.ts +6 -6
- package/dist/{components → types/components}/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.d.ts +4 -4
- package/dist/types/components/elements/McNodata/McNoData.vue.d.ts +110 -0
- package/dist/types/components/elements/McNotification/McNotification.vue.d.ts +124 -0
- package/dist/{components → types/components}/elements/McProgress/McProgress.vue.d.ts +5 -5
- package/dist/{components → types/components}/elements/McSeparator/McSeparator.vue.d.ts +4 -4
- package/dist/{components → types/components}/elements/McSlideUpDown/McSlideUpDown.vue.d.ts +5 -5
- package/dist/{components → types/components}/elements/McStack/McStack.vue.d.ts +4 -4
- package/dist/{components → types/components}/elements/McSvgIcon/McSvgIcon.vue.d.ts +9 -9
- package/dist/{components → types/components}/elements/McTitle/McTitle.vue.d.ts +7 -7
- package/dist/{components → types/components}/elements/McTooltip/McTooltip.vue.d.ts +6 -6
- package/dist/types/components/index.d.ts +70 -0
- package/dist/{components → types/components}/patterns/McAccordion/McAccordion.vue.d.ts +4 -4
- package/dist/{components → types/components}/patterns/McCell/McCell.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McCollapse/McCollapse.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McDropdown/McDropdown.vue.d.ts +7 -7
- package/dist/types/components/patterns/McDropdown/McDropdownPanel.vue.d.ts +22 -0
- package/dist/{components → types/components}/patterns/McFilter/McFilter.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McFilter/McFilterChip/McFilterChip.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McFilter/McFilterTags/McFilterTags.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McGridCol/McGridCol.vue.d.ts +4 -4
- package/dist/{components → types/components}/patterns/McGridRow/McGridRow.vue.d.ts +5 -5
- package/dist/{components → types/components}/patterns/McOverlay/McOverlay.vue.d.ts +4 -4
- package/dist/{components → types/components}/patterns/McPreview/McPreview.vue.d.ts +4 -4
- package/dist/types/components/patterns/McSideBar/McSideBar.vue.d.ts +292 -0
- package/dist/{components → types/components}/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.d.ts +5 -5
- package/dist/{components → types/components}/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts +6 -6
- package/dist/{components → types/components}/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.d.ts +6 -6
- package/dist/types/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts +123 -0
- package/dist/types/components/patterns/McTab/McTab.vue.d.ts +224 -0
- package/dist/{components → types/components}/patterns/McTabs/McTabs.vue.d.ts +8 -7
- package/dist/{components → types/components}/patterns/McWrapScroll/McWrapScroll.vue.d.ts +7 -7
- package/dist/types/components/templates/McDrawer/McDrawer.vue.d.ts +104 -0
- package/dist/{components → types/components}/templates/McDrawer/McDrawerContainer.vue.d.ts +5 -5
- package/dist/{components → types/components}/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.d.ts +4 -4
- package/dist/{components → types/components}/templates/McModal/McModal.vue.d.ts +7 -7
- package/dist/{components → types/components}/templates/McModal/McModalContainer.vue.d.ts +5 -5
- package/dist/types/components/templates/McTable/McTable/McTable.vue.d.ts +295 -0
- package/dist/{components → types/components}/templates/McTable/McTableCard/McTableCard.vue.d.ts +6 -6
- package/dist/{components → types/components}/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.d.ts +4 -4
- package/dist/types/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts +18 -0
- package/dist/{components → types/components}/templates/McTable/McTableSort/McTableSort.vue.d.ts +7 -7
- package/dist/{components → types/components}/templates/McTopBar/McTopBar.vue.d.ts +4 -4
- package/dist/{components → types/components}/templates/McVirtualScroll/McVirtualScroll.vue.d.ts +4 -4
- package/dist/{composables → types/composables}/index.d.ts +1 -1
- package/dist/{composables → types/composables}/useDrawer.d.ts +1 -1
- package/dist/types/composables/useFieldErrors.d.ts +5 -0
- package/dist/{composables → types/composables}/useTooltip.d.ts +1 -1
- package/dist/types/index.d.ts +9 -36
- package/dist/types/index.js +38 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/{mocks → types/mocks}/filterMocks.d.ts +1 -1
- package/dist/{mocks → types/mocks}/sidebar.d.ts +1 -1
- package/dist/{mocks → types/mocks}/tableData.d.ts +1 -1
- package/dist/types/styles/Alignment.js +1 -0
- package/dist/types/styles/AvatarSizes.js +3 -0
- package/dist/types/styles/Colors.js +3 -0
- package/dist/types/styles/Durations.js +3 -0
- package/dist/types/styles/FontSizes.js +3 -0
- package/dist/types/styles/FontWeights.js +3 -0
- package/dist/types/styles/Grid.js +1 -0
- package/dist/types/styles/Icons.js +2 -0
- package/dist/types/styles/LineHeights.js +3 -0
- package/dist/types/styles/MediaQueries.js +3 -0
- package/dist/types/styles/Radiuses.js +3 -0
- package/dist/types/styles/Sizes.js +3 -0
- package/dist/types/styles/Spaces.js +3 -0
- package/dist/types/styles/Weights.js +1 -0
- package/dist/types/{IButton.d.ts → types/IButton.d.ts} +5 -5
- package/dist/types/{ICell.d.ts → types/ICell.d.ts} +1 -1
- package/dist/types/{IChip.d.ts → types/IChip.d.ts} +2 -2
- package/dist/types/{IDatepicker.d.ts → types/IDatepicker.d.ts} +1 -1
- package/dist/types/{IDirections.d.ts → types/IDirections.d.ts} +1 -1
- package/dist/types/{IDrawer.d.ts → types/IDrawer.d.ts} +2 -2
- package/dist/types/{IDropdown.d.ts → types/IDropdown.d.ts} +1 -1
- package/dist/types/{IFilter.d.ts → types/IFilter.d.ts} +1 -1
- package/dist/types/{IInput.d.ts → types/IInput.d.ts} +1 -1
- package/dist/types/{IModal.d.ts → types/IModal.d.ts} +2 -2
- package/dist/types/{IPreview.d.ts → types/IPreview.d.ts} +1 -1
- package/dist/types/{IRadio.d.ts → types/IRadio.d.ts} +1 -1
- package/dist/types/{IRadioGroup.d.ts → types/IRadioGroup.d.ts} +1 -1
- package/dist/types/{ISelect.d.ts → types/ISelect.d.ts} +1 -1
- package/dist/types/{ISideBar.d.ts → types/ISideBar.d.ts} +5 -5
- package/dist/types/{ITable.d.ts → types/ITable.d.ts} +2 -2
- package/dist/types/{ITabs.d.ts → types/ITabs.d.ts} +4 -4
- package/dist/types/{ITitle.d.ts → types/ITitle.d.ts} +1 -1
- package/dist/types/{ITooltip.d.ts → types/ITooltip.d.ts} +1 -1
- package/dist/types/types/index.d.ts +36 -0
- package/dist/types/{styles → types/styles}/Alignment.d.ts +1 -1
- package/dist/types/{styles → types/styles}/Grid.d.ts +1 -1
- package/dist/types/{styles → types/styles}/Weights.d.ts +1 -1
- package/dist/{utils → types/utils}/dayjs.d.ts +2 -1
- package/dist/{utils → types/utils}/mcGridColAdaptiveProps.d.ts +1 -1
- package/dist/{utils → types/utils}/mcTitleAdaptiveProps.d.ts +1 -1
- package/dist/utils/dayjs.js +18 -0
- package/dist/utils/mcGridColAdaptiveProps.js +10 -0
- package/dist/utils/mcTitleAdaptiveProps.js +10 -0
- package/package.json +7 -3
- package/dist/App.vue.d.ts +0 -2
- package/dist/assets/tokens/json/animations.json.d.ts +0 -8
- package/dist/assets/tokens/json/border-radius.json.d.ts +0 -26
- package/dist/assets/tokens/json/box-shadows.json.d.ts +0 -26
- package/dist/assets/tokens/json/colors.json.d.ts +0 -73
- package/dist/assets/tokens/json/durations.json.d.ts +0 -12
- package/dist/assets/tokens/json/easings.json.d.ts +0 -5
- package/dist/assets/tokens/json/font-families.json.d.ts +0 -6
- package/dist/assets/tokens/json/font-sizes.json.d.ts +0 -20
- package/dist/assets/tokens/json/font-weights.json.d.ts +0 -14
- package/dist/assets/tokens/json/gradients.json.d.ts +0 -15
- package/dist/assets/tokens/json/index.d.ts +0 -18
- package/dist/assets/tokens/json/letter-spacings.json.d.ts +0 -6
- package/dist/assets/tokens/json/line-heights.json.d.ts +0 -20
- package/dist/assets/tokens/json/media-queries.json.d.ts +0 -28
- package/dist/assets/tokens/json/opacities.json.d.ts +0 -7
- package/dist/assets/tokens/json/sizes.json.d.ts +0 -44
- package/dist/assets/tokens/json/spacings.json.d.ts +0 -36
- package/dist/assets/tokens/json/z-indexes.json.d.ts +0 -14
- package/dist/components/elements/McBottomLoader/McBottomLoader.vue.d.ts +0 -14
- package/dist/components/elements/McCropper/McCropper.vue.d.ts +0 -28
- package/dist/components/elements/McNodata/McNoData.vue.d.ts +0 -110
- package/dist/components/elements/McNotification/McNotification.vue.d.ts +0 -124
- package/dist/components/index.d.ts +0 -62
- package/dist/components/patterns/McDropdown/McDropdownPanel.vue.d.ts +0 -22
- package/dist/components/patterns/McSideBar/McSideBar.vue.d.ts +0 -292
- package/dist/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts +0 -123
- package/dist/components/patterns/McTab/McTab.vue.d.ts +0 -224
- package/dist/components/templates/McDrawer/McDrawer.vue.d.ts +0 -104
- package/dist/components/templates/McTable/McTable/McTable.vue.d.ts +0 -295
- package/dist/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts +0 -18
- package/dist/composables/useFieldErrors.d.ts +0 -5
- package/dist/index.d.ts +0 -9
- package/dist/main.d.ts +0 -0
- package/dist/mocks/icons.json.d.ts +0 -3
- /package/dist/{composables → types/composables}/useEncodeDecode.d.ts +0 -0
- /package/dist/{composables → types/composables}/useHelper.d.ts +0 -0
- /package/dist/{composables → types/composables}/useModal.d.ts +0 -0
- /package/dist/{composables → types/composables}/useRandomNumber.d.ts +0 -0
- /package/dist/{consts → types/consts}/table.d.ts +0 -0
- /package/dist/{enums → types/enums}/Cell.d.ts +0 -0
- /package/dist/{enums → types/enums}/Chip.d.ts +0 -0
- /package/dist/{enums → types/enums}/Datepicker.d.ts +0 -0
- /package/dist/{enums → types/enums}/Drawer.d.ts +0 -0
- /package/dist/{enums → types/enums}/Dropdown.d.ts +0 -0
- /package/dist/{enums → types/enums}/Filter.d.ts +0 -0
- /package/dist/{enums → types/enums}/Grid.d.ts +0 -0
- /package/dist/{enums → types/enums}/Input.d.ts +0 -0
- /package/dist/{enums → types/enums}/Modal.d.ts +0 -0
- /package/dist/{enums → types/enums}/Preview.d.ts +0 -0
- /package/dist/{enums → types/enums}/Radio.d.ts +0 -0
- /package/dist/{enums → types/enums}/RadioGroup.d.ts +0 -0
- /package/dist/{enums → types/enums}/Select.d.ts +0 -0
- /package/dist/{enums → types/enums}/Sidebar.d.ts +0 -0
- /package/dist/{enums → types/enums}/Tab.d.ts +0 -0
- /package/dist/{enums → types/enums}/Title.d.ts +0 -0
- /package/dist/{enums → types/enums}/Tooltip.d.ts +0 -0
- /package/dist/{enums → types/enums}/index.d.ts +0 -0
- /package/dist/{enums → types/enums}/ui/Alignment.d.ts +0 -0
- /package/dist/{enums → types/enums}/ui/Button.d.ts +0 -0
- /package/dist/{enums → types/enums}/ui/Directions.d.ts +0 -0
- /package/dist/{enums → types/enums}/ui/Weights.d.ts +0 -0
- /package/dist/{mocks → types/mocks}/authUser.d.ts +0 -0
- /package/dist/{mocks → types/mocks}/categories.d.ts +0 -0
- /package/dist/{mocks → types/mocks}/menuLangs.d.ts +0 -0
- /package/dist/types/{ICollapse.d.ts → types/ICollapse.d.ts} +0 -0
- /package/dist/types/{IGrid.d.ts → types/IGrid.d.ts} +0 -0
- /package/dist/types/{IRoute.d.ts → types/IRoute.d.ts} +0 -0
- /package/dist/types/{styles → types/styles}/AvatarSizes.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/Colors.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/Durations.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/FontSizes.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/FontWeights.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/Icons.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/LineHeights.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/MediaQueries.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/Radiuses.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/Sizes.d.ts +0 -0
- /package/dist/types/{styles → types/styles}/Spaces.d.ts +0 -0
|
@@ -0,0 +1,1404 @@
|
|
|
1
|
+
import { IMaskComponent, IMask } from 'vue-imask';
|
|
2
|
+
import McTitle from '@/components/elements/McTitle/McTitle.vue';
|
|
3
|
+
import McButton from '@/components/elements/McButton/McButton.vue';
|
|
4
|
+
import McSvgIcon from '@/components/elements/McSvgIcon/McSvgIcon.vue';
|
|
5
|
+
import McTooltip from '@/components/elements/McTooltip/McTooltip.vue';
|
|
6
|
+
import { Spaces } from '@/types/styles/Spaces';
|
|
7
|
+
import { computed, onMounted, ref, useAttrs, useSlots } from 'vue';
|
|
8
|
+
import { Directions } from '@/enums/ui/Directions';
|
|
9
|
+
import { useFieldErrors } from '@/composables/useFieldErrors';
|
|
10
|
+
import { InputTypes, Autocomplete } from '@/enums/Input';
|
|
11
|
+
import { useTextareaAutosize } from '@vueuse/core';
|
|
12
|
+
import { ButtonSize, ButtonType, HorizontalAlignment, TitleVariations, Weights } from '@/enums';
|
|
13
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
|
14
|
+
const { textarea } = useTextareaAutosize();
|
|
15
|
+
const emit = defineEmits(['update:modelValue', 'keydown', 'copy']);
|
|
16
|
+
const slots = useSlots();
|
|
17
|
+
const attrs = useAttrs();
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
/**
|
|
20
|
+
* Значение
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: [String, Number],
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Тип:
|
|
29
|
+
* `textarea, textarea-autosize и
|
|
30
|
+
* нативные как text, password, email и т.д.`
|
|
31
|
+
*
|
|
32
|
+
* кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
|
|
33
|
+
* кастомный int - разрешает ввод только целочисленных значений
|
|
34
|
+
* кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
|
|
35
|
+
* date - добавляет placeholder, маску и ограничения ввода
|
|
36
|
+
* uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
|
|
37
|
+
* phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
|
|
38
|
+
*/
|
|
39
|
+
type: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: InputTypes.Text
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Заголовок поля:
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
title: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Маска поля:
|
|
53
|
+
*
|
|
54
|
+
* tokens - https://imask.js.org/guide.html
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
mask: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: null
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Вспомогательный текст под инпутом:
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
helpText: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: null
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* Отключенное состояние
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
disabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: false
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Ошибки
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
errors: {
|
|
82
|
+
type: Array,
|
|
83
|
+
default: null
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Placeholder
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
placeholder: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: null
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* Name
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
name: {
|
|
98
|
+
type: String,
|
|
99
|
+
required: true
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
|
|
103
|
+
* {
|
|
104
|
+
* date: 'd',
|
|
105
|
+
* month: 'm',
|
|
106
|
+
* year: 'y',
|
|
107
|
+
* }
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
dateMaskPlaceholder: {
|
|
111
|
+
type: Object,
|
|
112
|
+
default: () => ({})
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Максимальная длина строки в инпуте
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
maxLength: {
|
|
119
|
+
type: Number,
|
|
120
|
+
default: null
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* Состояние копирования
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
copy: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: false
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* Автокомплит введённого ранее текста: on, off
|
|
132
|
+
*
|
|
133
|
+
*/
|
|
134
|
+
autocomplete: {
|
|
135
|
+
type: String,
|
|
136
|
+
default: Autocomplete.On
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* только чтение текста
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
readOnly: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
default: false
|
|
145
|
+
},
|
|
146
|
+
/**
|
|
147
|
+
* Атрибут tabindex для главного элемента
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
tabindex: {
|
|
151
|
+
type: [String, Number]
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Tooltip для кнопка "показать пароль"
|
|
155
|
+
*
|
|
156
|
+
*/
|
|
157
|
+
passwordTooltip: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: 'Show/Hide'
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
|
|
163
|
+
*
|
|
164
|
+
*/
|
|
165
|
+
passwordHideTooltip: {
|
|
166
|
+
type: String,
|
|
167
|
+
default: null
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Очищаем данные от маски на выходе
|
|
171
|
+
*/
|
|
172
|
+
clearOutput: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: false
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* Кастомные настройки для маски
|
|
178
|
+
* См. https://imask.js.org/guide.html
|
|
179
|
+
*
|
|
180
|
+
* Например:
|
|
181
|
+
* {
|
|
182
|
+
* autofix: true,
|
|
183
|
+
* blocks: {
|
|
184
|
+
* d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
|
|
185
|
+
* m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
|
|
186
|
+
* Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
|
|
187
|
+
* }
|
|
188
|
+
* }
|
|
189
|
+
*/
|
|
190
|
+
maskOptions: {
|
|
191
|
+
type: Object,
|
|
192
|
+
default: null
|
|
193
|
+
},
|
|
194
|
+
required: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: false
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
* Для какого языка поле ввода
|
|
200
|
+
*/
|
|
201
|
+
locale: {
|
|
202
|
+
type: String,
|
|
203
|
+
default: null
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Мобильное ли разрешение
|
|
207
|
+
* (Используется для триггера тултипа в кнопке с паролем)
|
|
208
|
+
*/
|
|
209
|
+
isMobile: {
|
|
210
|
+
type: Boolean,
|
|
211
|
+
default: false
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
|
|
215
|
+
*/
|
|
216
|
+
maxDecimals: {
|
|
217
|
+
type: Number,
|
|
218
|
+
default: 2
|
|
219
|
+
},
|
|
220
|
+
dir: {
|
|
221
|
+
type: String,
|
|
222
|
+
default: Directions.Ltr
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
const prependWidth = ref(0);
|
|
226
|
+
const appendWidth = ref(0);
|
|
227
|
+
const prettyType = ref(props.type);
|
|
228
|
+
const fieldErrors = useFieldErrors(props.errors);
|
|
229
|
+
const isRtl = computed(() => {
|
|
230
|
+
return props.dir === Directions.Rtl;
|
|
231
|
+
});
|
|
232
|
+
const classes = computed(() => {
|
|
233
|
+
return {
|
|
234
|
+
'mc-field-text': true,
|
|
235
|
+
'mc-field-text--error': !!fieldErrors.errorText.value,
|
|
236
|
+
'mc-field-text--textarea': isTextarea.value,
|
|
237
|
+
'mc-field-text--textarea-autosize': isTextareaAutosize.value,
|
|
238
|
+
'mc-field-text--disabled': props.disabled,
|
|
239
|
+
'mc-field-text--copy': props.copy,
|
|
240
|
+
'mc-field-text--rtl': isRtl.value
|
|
241
|
+
};
|
|
242
|
+
});
|
|
243
|
+
const computedTitle = computed(() => {
|
|
244
|
+
return `${props.title}${props.required ? ' *' : ''}`;
|
|
245
|
+
});
|
|
246
|
+
const isDate = computed(() => {
|
|
247
|
+
return prettyType.value === InputTypes.Date;
|
|
248
|
+
});
|
|
249
|
+
const isMaskVisible = computed(() => {
|
|
250
|
+
return !!props.mask || !!props.maskOptions || isDate.value;
|
|
251
|
+
});
|
|
252
|
+
const isTextarea = computed(() => {
|
|
253
|
+
return props.type === InputTypes.Textarea;
|
|
254
|
+
});
|
|
255
|
+
const isTextareaAutosize = computed(() => {
|
|
256
|
+
return props.type === InputTypes.TextareaAutosize;
|
|
257
|
+
});
|
|
258
|
+
const isPassword = computed(() => {
|
|
259
|
+
return props.type === InputTypes.Password;
|
|
260
|
+
});
|
|
261
|
+
const isAmountFormat = computed(() => {
|
|
262
|
+
return props.type === InputTypes.AmountFormat;
|
|
263
|
+
});
|
|
264
|
+
const hasCharCounter = computed(() => {
|
|
265
|
+
return !!props.maxLength && (isTextarea.value || isTextareaAutosize.value);
|
|
266
|
+
});
|
|
267
|
+
const isPasswordType = computed(() => {
|
|
268
|
+
return prettyType.value === InputTypes.Password;
|
|
269
|
+
});
|
|
270
|
+
const passwordIcon = computed(() => {
|
|
271
|
+
return isPasswordType.value ? 'visibility' : 'visibility_off';
|
|
272
|
+
});
|
|
273
|
+
const charCounter = computed(() => {
|
|
274
|
+
return props.modelValue ? String(props.modelValue).length : 0;
|
|
275
|
+
});
|
|
276
|
+
const charCounterTitle = computed(() => {
|
|
277
|
+
return `${charCounter.value}/${props.maxLength}`;
|
|
278
|
+
});
|
|
279
|
+
const charCounterColor = computed(() => {
|
|
280
|
+
return props.maxLength < +charCounter.value ? 'red' : 'dark-gray';
|
|
281
|
+
});
|
|
282
|
+
const dateMask = computed(() => {
|
|
283
|
+
return {
|
|
284
|
+
mask: Date,
|
|
285
|
+
autofix: true,
|
|
286
|
+
blocks: {
|
|
287
|
+
d: {
|
|
288
|
+
mask: IMask.MaskedRange,
|
|
289
|
+
placeholderChar: props.dateMaskPlaceholder.date || 'd',
|
|
290
|
+
from: 1,
|
|
291
|
+
to: 31,
|
|
292
|
+
maxLength: 2
|
|
293
|
+
},
|
|
294
|
+
m: {
|
|
295
|
+
mask: IMask.MaskedRange,
|
|
296
|
+
placeholderChar: props.dateMaskPlaceholder.month || 'm',
|
|
297
|
+
from: 1,
|
|
298
|
+
to: 12,
|
|
299
|
+
maxLength: 2
|
|
300
|
+
},
|
|
301
|
+
Y: {
|
|
302
|
+
mask: IMask.MaskedRange,
|
|
303
|
+
placeholderChar: props.dateMaskPlaceholder.year || 'y',
|
|
304
|
+
from: 1900,
|
|
305
|
+
to: 2999,
|
|
306
|
+
maxLength: 4
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
});
|
|
311
|
+
const maskInputAttrs = computed(() => {
|
|
312
|
+
return {
|
|
313
|
+
...inputAttrs.value,
|
|
314
|
+
mask: props.mask,
|
|
315
|
+
lazy: false,
|
|
316
|
+
overwrite: false,
|
|
317
|
+
unmask: props.clearOutput,
|
|
318
|
+
definitions: {
|
|
319
|
+
'#': /./
|
|
320
|
+
},
|
|
321
|
+
readonly: props.readOnly,
|
|
322
|
+
maxlength: props.maxLength,
|
|
323
|
+
type: 'tel',
|
|
324
|
+
...attrs,
|
|
325
|
+
...(props.maskOptions ?? {}),
|
|
326
|
+
...(isDate.value ? dateMask.value : {})
|
|
327
|
+
};
|
|
328
|
+
});
|
|
329
|
+
const computedValue = computed({
|
|
330
|
+
get() {
|
|
331
|
+
if (isAmountFormat.value && !isRtl.value) {
|
|
332
|
+
return getAmountFormat(String(props.modelValue));
|
|
333
|
+
}
|
|
334
|
+
else
|
|
335
|
+
return props.modelValue;
|
|
336
|
+
},
|
|
337
|
+
set(value) {
|
|
338
|
+
fieldErrors.toggleErrorVisible();
|
|
339
|
+
emit('update:modelValue', value);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
const handleInput = (e) => {
|
|
343
|
+
computedValue.value = getPreparedInputValue(e);
|
|
344
|
+
};
|
|
345
|
+
const inputAttrs = computed(() => {
|
|
346
|
+
return {
|
|
347
|
+
style: inputStyles.value,
|
|
348
|
+
placeholder: props.placeholder,
|
|
349
|
+
disabled: props.disabled,
|
|
350
|
+
name: props.name,
|
|
351
|
+
id: props.name,
|
|
352
|
+
autocomplete: props.autocomplete,
|
|
353
|
+
tabindex: props.tabindex,
|
|
354
|
+
...attrs,
|
|
355
|
+
class: ['mc-field-text__input', attrs.class || ''].join(' ')
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
const inputStyles = computed(() => {
|
|
359
|
+
const space = parseInt(Spaces['150']);
|
|
360
|
+
let bottomStyle = {};
|
|
361
|
+
if (isTextarea.value || isTextareaAutosize.value) {
|
|
362
|
+
const spaceBottomToken = hasCharCounter.value ? '400' : '150';
|
|
363
|
+
const spaceBottomValue = Spaces[spaceBottomToken];
|
|
364
|
+
bottomStyle = { paddingBottom: `${+spaceBottomValue.replace('px', '') - 1}px` };
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
paddingInlineStart: prependWidth.value && `${prependWidth.value + space}px`,
|
|
368
|
+
paddingInlineEnd: appendWidth.value && `${appendWidth.value + space}px`,
|
|
369
|
+
...(!isTextarea.value && !isTextareaAutosize.value ? { boxSizing: 'border-box' } : {}),
|
|
370
|
+
...bottomStyle
|
|
371
|
+
};
|
|
372
|
+
});
|
|
373
|
+
onMounted(() => {
|
|
374
|
+
calculatePadding();
|
|
375
|
+
});
|
|
376
|
+
const setDecimalsLimit = (val) => {
|
|
377
|
+
if (val && props.maxDecimals) {
|
|
378
|
+
const [integerPart, decimalPart] = val.split('.');
|
|
379
|
+
if (decimalPart?.length > props.maxDecimals) {
|
|
380
|
+
return `${integerPart}.${decimalPart.slice(0, props.maxDecimals)}`;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return val;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* Remove leading zero from input if length > 1 && number isn't decimal
|
|
387
|
+
* */
|
|
388
|
+
const removeLeadingZero = (val) => {
|
|
389
|
+
let result = val;
|
|
390
|
+
const [first_char] = val || [];
|
|
391
|
+
if (val.length > 1 && +first_char === 0 && val.indexOf('.') === -1)
|
|
392
|
+
result = val.slice(1);
|
|
393
|
+
return result;
|
|
394
|
+
};
|
|
395
|
+
const getPreparedInputValue = (e) => {
|
|
396
|
+
const target = e.target;
|
|
397
|
+
let value = isDate.value && target && target.value ? target.value?.substring(0, 10) : target.value;
|
|
398
|
+
let cursor_position = getCaretPos(target)?.start;
|
|
399
|
+
let prepared_value = formattedToNumber(value);
|
|
400
|
+
switch (props.type) {
|
|
401
|
+
case InputTypes.Num: {
|
|
402
|
+
//eslint-disable-next-line
|
|
403
|
+
let [num] = /-?\d*[\.]?\d*/.exec(String(value)) || [];
|
|
404
|
+
num = setDecimalsLimit(num);
|
|
405
|
+
num = removeLeadingZero(num);
|
|
406
|
+
value = num;
|
|
407
|
+
target.value = num;
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
case InputTypes.Int: {
|
|
411
|
+
let [int] = /-?\d*/.exec(String(target.value)) || [];
|
|
412
|
+
int = removeLeadingZero(int);
|
|
413
|
+
value = int;
|
|
414
|
+
target.value = int;
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
case InputTypes.AmountFormat: {
|
|
418
|
+
value = setDecimalsLimit(value);
|
|
419
|
+
value = removeLeadingZero(value);
|
|
420
|
+
prepared_value = formattedToNumber(value);
|
|
421
|
+
const float_value = parseFloat(prepared_value);
|
|
422
|
+
const without_spaces_value = prepared_value.replace(/ /gm, '');
|
|
423
|
+
value = prepared_value
|
|
424
|
+
? String(float_value) === without_spaces_value
|
|
425
|
+
? float_value
|
|
426
|
+
: without_spaces_value || float_value || prepared_value
|
|
427
|
+
: null;
|
|
428
|
+
const formatted_value = getAmountFormat(prepared_value);
|
|
429
|
+
target.value = isRtl.value ? formatted_value.replace(/ /gm, '') : formatted_value;
|
|
430
|
+
const space_length = target.value?.slice(0, cursor_position).replace(/[^ ]/gm, '')?.length || 0;
|
|
431
|
+
setCaretPos(target, cursor_position + space_length, cursor_position + space_length);
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
case InputTypes.Uppercase: {
|
|
435
|
+
value = value?.toUpperCase();
|
|
436
|
+
target.value = value;
|
|
437
|
+
setCaretPos(target, cursor_position, cursor_position);
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
case InputTypes.Lowercase: {
|
|
441
|
+
value = value?.toLowerCase();
|
|
442
|
+
target.value = value;
|
|
443
|
+
setCaretPos(target, cursor_position, cursor_position);
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
case InputTypes.Password:
|
|
447
|
+
value = value?.replace(/ /gm, '');
|
|
448
|
+
target.value = value;
|
|
449
|
+
setCaretPos(target, cursor_position, cursor_position);
|
|
450
|
+
break;
|
|
451
|
+
case InputTypes.PhoneNumber:
|
|
452
|
+
if (value.length === 0)
|
|
453
|
+
value = '+';
|
|
454
|
+
if (value.charAt(0) !== '+')
|
|
455
|
+
value = '+' + value;
|
|
456
|
+
value = value.replace(/(?!^)\D/g, '');
|
|
457
|
+
target.value = value;
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
return value;
|
|
461
|
+
};
|
|
462
|
+
const prepareHandleKeyDown = (e) => {
|
|
463
|
+
switch (props.type) {
|
|
464
|
+
case InputTypes.AmountFormat:
|
|
465
|
+
case InputTypes.Num: {
|
|
466
|
+
if (e.key === '.' && typeof props.modelValue === 'string' && props.modelValue?.includes('.')) {
|
|
467
|
+
e.preventDefault();
|
|
468
|
+
}
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
emit('keydown', e);
|
|
473
|
+
};
|
|
474
|
+
const formattedToNumber = (value) => {
|
|
475
|
+
if (!value)
|
|
476
|
+
return value;
|
|
477
|
+
//eslint-disable-next-line
|
|
478
|
+
const [first] = /-?\d*[\.]?\d*/.exec(String(value)?.replace(/ /gm, '')?.trim()) || [];
|
|
479
|
+
return first;
|
|
480
|
+
};
|
|
481
|
+
const setCaretPos = (ctrl, start, end) => {
|
|
482
|
+
if (ctrl.setSelectionRange) {
|
|
483
|
+
ctrl.focus();
|
|
484
|
+
ctrl.setSelectionRange(start, end);
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
const getCaretPos = (ctrl) => {
|
|
488
|
+
if (ctrl.selectionStart || ctrl.selectionStart === 0) {
|
|
489
|
+
return { start: ctrl.selectionStart, end: ctrl.selectionEnd };
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
return { start: 0, end: 0 };
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
const getAmountFormat = (value) => {
|
|
496
|
+
const formatted_number = formattedToNumber(value);
|
|
497
|
+
const has_fraction = !!String(formatted_number)?.match(/\./);
|
|
498
|
+
const [int, fraction] = String(formatted_number)
|
|
499
|
+
//eslint-disable-next-line
|
|
500
|
+
.replace(/[^\d\.-]/g, '')
|
|
501
|
+
.replace(/\B(?=(?:\d{3})+(?!\d))/g, ' ')
|
|
502
|
+
.split('.');
|
|
503
|
+
const formatted_values = [int, fraction?.replace(/ /gm, '') || ''];
|
|
504
|
+
if (has_fraction) {
|
|
505
|
+
return formatted_values.join('.');
|
|
506
|
+
}
|
|
507
|
+
return formatted_values.filter((v) => !!v).join('.');
|
|
508
|
+
};
|
|
509
|
+
const calculatePadding = () => {
|
|
510
|
+
prependWidth.value = +calculateSlotPadding('prepend');
|
|
511
|
+
appendWidth.value = +calculateSlotPadding('append');
|
|
512
|
+
};
|
|
513
|
+
const calculateSlotPadding = (name) => {
|
|
514
|
+
const tokenSpace = parseInt(Spaces['50']);
|
|
515
|
+
let result = slots[name]
|
|
516
|
+
//@ts-ignore
|
|
517
|
+
? (slots[name] || []).reduce((acc) => {
|
|
518
|
+
return acc + tokenSpace;
|
|
519
|
+
}, 0) + tokenSpace
|
|
520
|
+
: tokenSpace;
|
|
521
|
+
if (name === 'prepend')
|
|
522
|
+
return result;
|
|
523
|
+
/**
|
|
524
|
+
* Также увеличиваем padding при наличии кнопки копирования и если тип password
|
|
525
|
+
*/
|
|
526
|
+
const iconSpace = parseInt(Spaces['300']);
|
|
527
|
+
result = result ? result + tokenSpace : tokenSpace;
|
|
528
|
+
props.copy && (result += iconSpace);
|
|
529
|
+
isPassword.value && (result += iconSpace);
|
|
530
|
+
return result;
|
|
531
|
+
};
|
|
532
|
+
const handlerCopy = () => {
|
|
533
|
+
/**
|
|
534
|
+
* Событие по кнопке копирования
|
|
535
|
+
*/
|
|
536
|
+
emit('copy', props.modelValue);
|
|
537
|
+
};
|
|
538
|
+
const togglePasswordVisibility = () => {
|
|
539
|
+
prettyType.value = isPasswordType.value ? InputTypes.Text : InputTypes.Password;
|
|
540
|
+
}; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
541
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
542
|
+
props: {
|
|
543
|
+
/**
|
|
544
|
+
* Значение
|
|
545
|
+
*
|
|
546
|
+
*/
|
|
547
|
+
modelValue: {
|
|
548
|
+
type: [String, Number],
|
|
549
|
+
default: null
|
|
550
|
+
},
|
|
551
|
+
/**
|
|
552
|
+
* Тип:
|
|
553
|
+
* `textarea, textarea-autosize и
|
|
554
|
+
* нативные как text, password, email и т.д.`
|
|
555
|
+
*
|
|
556
|
+
* кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
|
|
557
|
+
* кастомный int - разрешает ввод только целочисленных значений
|
|
558
|
+
* кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
|
|
559
|
+
* date - добавляет placeholder, маску и ограничения ввода
|
|
560
|
+
* uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
|
|
561
|
+
* phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
|
|
562
|
+
*/
|
|
563
|
+
type: {
|
|
564
|
+
type: String,
|
|
565
|
+
default: InputTypes.Text
|
|
566
|
+
},
|
|
567
|
+
/**
|
|
568
|
+
* Заголовок поля:
|
|
569
|
+
*
|
|
570
|
+
*/
|
|
571
|
+
title: {
|
|
572
|
+
type: String,
|
|
573
|
+
default: null
|
|
574
|
+
},
|
|
575
|
+
/**
|
|
576
|
+
* Маска поля:
|
|
577
|
+
*
|
|
578
|
+
* tokens - https://imask.js.org/guide.html
|
|
579
|
+
*
|
|
580
|
+
*/
|
|
581
|
+
mask: {
|
|
582
|
+
type: String,
|
|
583
|
+
default: null
|
|
584
|
+
},
|
|
585
|
+
/**
|
|
586
|
+
* Вспомогательный текст под инпутом:
|
|
587
|
+
*
|
|
588
|
+
*/
|
|
589
|
+
helpText: {
|
|
590
|
+
type: String,
|
|
591
|
+
default: null
|
|
592
|
+
},
|
|
593
|
+
/**
|
|
594
|
+
* Отключенное состояние
|
|
595
|
+
*
|
|
596
|
+
*/
|
|
597
|
+
disabled: {
|
|
598
|
+
type: Boolean,
|
|
599
|
+
default: false
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* Ошибки
|
|
603
|
+
*
|
|
604
|
+
*/
|
|
605
|
+
errors: {
|
|
606
|
+
type: Array,
|
|
607
|
+
default: null
|
|
608
|
+
},
|
|
609
|
+
/**
|
|
610
|
+
* Placeholder
|
|
611
|
+
*
|
|
612
|
+
*/
|
|
613
|
+
placeholder: {
|
|
614
|
+
type: String,
|
|
615
|
+
default: null
|
|
616
|
+
},
|
|
617
|
+
/**
|
|
618
|
+
* Name
|
|
619
|
+
*
|
|
620
|
+
*/
|
|
621
|
+
name: {
|
|
622
|
+
type: String,
|
|
623
|
+
required: true
|
|
624
|
+
},
|
|
625
|
+
/**
|
|
626
|
+
* плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
|
|
627
|
+
* {
|
|
628
|
+
* date: 'd',
|
|
629
|
+
* month: 'm',
|
|
630
|
+
* year: 'y',
|
|
631
|
+
* }
|
|
632
|
+
*
|
|
633
|
+
*/
|
|
634
|
+
dateMaskPlaceholder: {
|
|
635
|
+
type: Object,
|
|
636
|
+
default: () => ({})
|
|
637
|
+
},
|
|
638
|
+
/**
|
|
639
|
+
* Максимальная длина строки в инпуте
|
|
640
|
+
*
|
|
641
|
+
*/
|
|
642
|
+
maxLength: {
|
|
643
|
+
type: Number,
|
|
644
|
+
default: null
|
|
645
|
+
},
|
|
646
|
+
/**
|
|
647
|
+
* Состояние копирования
|
|
648
|
+
*
|
|
649
|
+
*/
|
|
650
|
+
copy: {
|
|
651
|
+
type: Boolean,
|
|
652
|
+
default: false
|
|
653
|
+
},
|
|
654
|
+
/**
|
|
655
|
+
* Автокомплит введённого ранее текста: on, off
|
|
656
|
+
*
|
|
657
|
+
*/
|
|
658
|
+
autocomplete: {
|
|
659
|
+
type: String,
|
|
660
|
+
default: Autocomplete.On
|
|
661
|
+
},
|
|
662
|
+
/**
|
|
663
|
+
* только чтение текста
|
|
664
|
+
*
|
|
665
|
+
*/
|
|
666
|
+
readOnly: {
|
|
667
|
+
type: Boolean,
|
|
668
|
+
default: false
|
|
669
|
+
},
|
|
670
|
+
/**
|
|
671
|
+
* Атрибут tabindex для главного элемента
|
|
672
|
+
*
|
|
673
|
+
*/
|
|
674
|
+
tabindex: {
|
|
675
|
+
type: [String, Number]
|
|
676
|
+
},
|
|
677
|
+
/**
|
|
678
|
+
* Tooltip для кнопка "показать пароль"
|
|
679
|
+
*
|
|
680
|
+
*/
|
|
681
|
+
passwordTooltip: {
|
|
682
|
+
type: String,
|
|
683
|
+
default: 'Show/Hide'
|
|
684
|
+
},
|
|
685
|
+
/**
|
|
686
|
+
* Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
|
|
687
|
+
*
|
|
688
|
+
*/
|
|
689
|
+
passwordHideTooltip: {
|
|
690
|
+
type: String,
|
|
691
|
+
default: null
|
|
692
|
+
},
|
|
693
|
+
/**
|
|
694
|
+
* Очищаем данные от маски на выходе
|
|
695
|
+
*/
|
|
696
|
+
clearOutput: {
|
|
697
|
+
type: Boolean,
|
|
698
|
+
default: false
|
|
699
|
+
},
|
|
700
|
+
/**
|
|
701
|
+
* Кастомные настройки для маски
|
|
702
|
+
* См. https://imask.js.org/guide.html
|
|
703
|
+
*
|
|
704
|
+
* Например:
|
|
705
|
+
* {
|
|
706
|
+
* autofix: true,
|
|
707
|
+
* blocks: {
|
|
708
|
+
* d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
|
|
709
|
+
* m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
|
|
710
|
+
* Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
|
|
711
|
+
* }
|
|
712
|
+
* }
|
|
713
|
+
*/
|
|
714
|
+
maskOptions: {
|
|
715
|
+
type: Object,
|
|
716
|
+
default: null
|
|
717
|
+
},
|
|
718
|
+
required: {
|
|
719
|
+
type: Boolean,
|
|
720
|
+
default: false
|
|
721
|
+
},
|
|
722
|
+
/**
|
|
723
|
+
* Для какого языка поле ввода
|
|
724
|
+
*/
|
|
725
|
+
locale: {
|
|
726
|
+
type: String,
|
|
727
|
+
default: null
|
|
728
|
+
},
|
|
729
|
+
/**
|
|
730
|
+
* Мобильное ли разрешение
|
|
731
|
+
* (Используется для триггера тултипа в кнопке с паролем)
|
|
732
|
+
*/
|
|
733
|
+
isMobile: {
|
|
734
|
+
type: Boolean,
|
|
735
|
+
default: false
|
|
736
|
+
},
|
|
737
|
+
/**
|
|
738
|
+
* Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
|
|
739
|
+
*/
|
|
740
|
+
maxDecimals: {
|
|
741
|
+
type: Number,
|
|
742
|
+
default: 2
|
|
743
|
+
},
|
|
744
|
+
dir: {
|
|
745
|
+
type: String,
|
|
746
|
+
default: Directions.Ltr
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
emits: {},
|
|
750
|
+
});
|
|
751
|
+
;
|
|
752
|
+
let __VLS_functionalComponentProps;
|
|
753
|
+
function __VLS_template() {
|
|
754
|
+
const __VLS_ctx = {};
|
|
755
|
+
const __VLS_localComponents = {
|
|
756
|
+
...{},
|
|
757
|
+
...{},
|
|
758
|
+
...__VLS_ctx,
|
|
759
|
+
};
|
|
760
|
+
let __VLS_components;
|
|
761
|
+
const __VLS_localDirectives = {
|
|
762
|
+
...{},
|
|
763
|
+
...__VLS_ctx,
|
|
764
|
+
};
|
|
765
|
+
let __VLS_directives;
|
|
766
|
+
let __VLS_styleScopedClasses;
|
|
767
|
+
// CSS variable injection
|
|
768
|
+
// CSS variable injection end
|
|
769
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
|
770
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ref: ("field"), dir: ((props.dir)), ...{ class: ((__VLS_ctx.classes)) }, });
|
|
771
|
+
// @ts-ignore navigation for `const field = ref()`
|
|
772
|
+
__VLS_ctx.field;
|
|
773
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.label, __VLS_intrinsicElements.label)({ for: ((__VLS_ctx.name)), ...{ class: ("mc-field-text__header") }, });
|
|
774
|
+
var __VLS_0 = {};
|
|
775
|
+
if (__VLS_ctx.title) {
|
|
776
|
+
// @ts-ignore
|
|
777
|
+
[McTitle, McTitle,];
|
|
778
|
+
// @ts-ignore
|
|
779
|
+
const __VLS_1 = __VLS_asFunctionalComponent(McTitle, new McTitle({ maxWidth: ("100%"), weight: ((__VLS_ctx.Weights.Medium)), }));
|
|
780
|
+
const __VLS_2 = __VLS_1({ maxWidth: ("100%"), weight: ((__VLS_ctx.Weights.Medium)), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
781
|
+
(__VLS_ctx.computedTitle);
|
|
782
|
+
__VLS_nonNullable(__VLS_5.slots).default;
|
|
783
|
+
var __VLS_5;
|
|
784
|
+
}
|
|
785
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__inner") }, });
|
|
786
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__main") }, });
|
|
787
|
+
if (__VLS_ctx.$slots.prepend) {
|
|
788
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__prepend") }, });
|
|
789
|
+
var __VLS_6 = {};
|
|
790
|
+
}
|
|
791
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.label, __VLS_intrinsicElements.label)({ ...{ class: ("mc-field-text__input-wrapper") }, });
|
|
792
|
+
if (__VLS_ctx.isTextarea) {
|
|
793
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.textarea)({ ...{ onInput: (__VLS_ctx.handleInput) }, value: ((__VLS_ctx.computedValue)), ...(__VLS_ctx.inputAttrs), maxlength: ((__VLS_ctx.maxLength)), rows: ("1"), });
|
|
794
|
+
}
|
|
795
|
+
else if (__VLS_ctx.isTextareaAutosize) {
|
|
796
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.textarea)({ ...{ onInput: (__VLS_ctx.handleInput) }, value: ((__VLS_ctx.computedValue)), ref: ("textarea"), ...(__VLS_ctx.inputAttrs), });
|
|
797
|
+
// @ts-ignore navigation for `const textarea = ref()`
|
|
798
|
+
__VLS_ctx.textarea;
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
if (__VLS_ctx.isMaskVisible) {
|
|
802
|
+
const __VLS_7 = __VLS_resolvedLocalAndGlobalComponents.IMaskComponent;
|
|
803
|
+
/** @type { [typeof __VLS_components.IMaskComponent, typeof __VLS_components.iMaskComponent, ] } */
|
|
804
|
+
// @ts-ignore
|
|
805
|
+
const __VLS_8 = __VLS_asFunctionalComponent(__VLS_7, new __VLS_7({ ...{ 'onInput': {} }, value: ((__VLS_ctx.computedValue)), ...(__VLS_ctx.maskInputAttrs), }));
|
|
806
|
+
const __VLS_9 = __VLS_8({ ...{ 'onInput': {} }, value: ((__VLS_ctx.computedValue)), ...(__VLS_ctx.maskInputAttrs), }, ...__VLS_functionalComponentArgsRest(__VLS_8));
|
|
807
|
+
let __VLS_13;
|
|
808
|
+
const __VLS_14 = {
|
|
809
|
+
onInput: (__VLS_ctx.handleInput)
|
|
810
|
+
};
|
|
811
|
+
let __VLS_10;
|
|
812
|
+
let __VLS_11;
|
|
813
|
+
var __VLS_12;
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.input)({ ...{ onKeydown: (__VLS_ctx.prepareHandleKeyDown) }, ...{ onInput: (__VLS_ctx.handleInput) }, value: ((__VLS_ctx.computedValue)), ref: ("input"), ...(__VLS_ctx.inputAttrs), type: ((__VLS_ctx.prettyType)), readonly: ((props.readOnly)), maxlength: ((__VLS_ctx.maxLength)), });
|
|
817
|
+
// @ts-ignore navigation for `const input = ref()`
|
|
818
|
+
__VLS_ctx.input;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (__VLS_ctx.$slots.append || __VLS_ctx.copy || __VLS_ctx.isPassword) {
|
|
822
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__append") }, ...{ class: (({ 'mc-field-text__append--indent-bottom': __VLS_ctx.hasCharCounter })) }, });
|
|
823
|
+
var __VLS_15 = {};
|
|
824
|
+
if (__VLS_ctx.copy) {
|
|
825
|
+
// @ts-ignore
|
|
826
|
+
[McButton, McButton,];
|
|
827
|
+
// @ts-ignore
|
|
828
|
+
const __VLS_16 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), }));
|
|
829
|
+
const __VLS_17 = __VLS_16({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), }, ...__VLS_functionalComponentArgsRest(__VLS_16));
|
|
830
|
+
let __VLS_21;
|
|
831
|
+
const __VLS_22 = {
|
|
832
|
+
onClick: (__VLS_ctx.handlerCopy)
|
|
833
|
+
};
|
|
834
|
+
let __VLS_18;
|
|
835
|
+
let __VLS_19;
|
|
836
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
837
|
+
{
|
|
838
|
+
const { "icon-append": __VLS_thisSlot } = __VLS_nonNullable(__VLS_20.slots);
|
|
839
|
+
// @ts-ignore
|
|
840
|
+
[McSvgIcon,];
|
|
841
|
+
// @ts-ignore
|
|
842
|
+
const __VLS_23 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ name: ("copy"), }));
|
|
843
|
+
const __VLS_24 = __VLS_23({ name: ("copy"), }, ...__VLS_functionalComponentArgsRest(__VLS_23));
|
|
844
|
+
}
|
|
845
|
+
var __VLS_20;
|
|
846
|
+
}
|
|
847
|
+
if (__VLS_ctx.isPassword) {
|
|
848
|
+
// @ts-ignore
|
|
849
|
+
[McTooltip, McTooltip,];
|
|
850
|
+
// @ts-ignore
|
|
851
|
+
const __VLS_28 = __VLS_asFunctionalComponent(McTooltip, new McTooltip({ content: ((__VLS_ctx.isPasswordType ? props.passwordTooltip : props.passwordHideTooltip || props.passwordTooltip)), }));
|
|
852
|
+
const __VLS_29 = __VLS_28({ content: ((__VLS_ctx.isPasswordType ? props.passwordTooltip : props.passwordHideTooltip || props.passwordTooltip)), }, ...__VLS_functionalComponentArgsRest(__VLS_28));
|
|
853
|
+
// @ts-ignore
|
|
854
|
+
[McButton, McButton,];
|
|
855
|
+
// @ts-ignore
|
|
856
|
+
const __VLS_33 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), tabindex: ("-1"), type: ((__VLS_ctx.ButtonType.Button)), }));
|
|
857
|
+
const __VLS_34 = __VLS_33({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), tabindex: ("-1"), type: ((__VLS_ctx.ButtonType.Button)), }, ...__VLS_functionalComponentArgsRest(__VLS_33));
|
|
858
|
+
let __VLS_38;
|
|
859
|
+
const __VLS_39 = {
|
|
860
|
+
onClick: (__VLS_ctx.togglePasswordVisibility)
|
|
861
|
+
};
|
|
862
|
+
let __VLS_35;
|
|
863
|
+
let __VLS_36;
|
|
864
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
865
|
+
{
|
|
866
|
+
const { "icon-append": __VLS_thisSlot } = __VLS_nonNullable(__VLS_37.slots);
|
|
867
|
+
// @ts-ignore
|
|
868
|
+
[McSvgIcon,];
|
|
869
|
+
// @ts-ignore
|
|
870
|
+
const __VLS_40 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ name: ((__VLS_ctx.passwordIcon)), }));
|
|
871
|
+
const __VLS_41 = __VLS_40({ name: ((__VLS_ctx.passwordIcon)), }, ...__VLS_functionalComponentArgsRest(__VLS_40));
|
|
872
|
+
}
|
|
873
|
+
var __VLS_37;
|
|
874
|
+
__VLS_nonNullable(__VLS_32.slots).default;
|
|
875
|
+
var __VLS_32;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
if (__VLS_ctx.hasCharCounter) {
|
|
879
|
+
// @ts-ignore
|
|
880
|
+
[McTitle, McTitle,];
|
|
881
|
+
// @ts-ignore
|
|
882
|
+
const __VLS_45 = __VLS_asFunctionalComponent(McTitle, new McTitle({ ...{ class: ("mc-field-text__char-counter") }, variation: ((__VLS_ctx.TitleVariations.Overline)), textAlign: ((__VLS_ctx.HorizontalAlignment.Right)), color: ((__VLS_ctx.charCounterColor)), }));
|
|
883
|
+
const __VLS_46 = __VLS_45({ ...{ class: ("mc-field-text__char-counter") }, variation: ((__VLS_ctx.TitleVariations.Overline)), textAlign: ((__VLS_ctx.HorizontalAlignment.Right)), color: ((__VLS_ctx.charCounterColor)), }, ...__VLS_functionalComponentArgsRest(__VLS_45));
|
|
884
|
+
(__VLS_ctx.charCounterTitle);
|
|
885
|
+
__VLS_nonNullable(__VLS_49.slots).default;
|
|
886
|
+
var __VLS_49;
|
|
887
|
+
}
|
|
888
|
+
if (__VLS_ctx.$slots.right) {
|
|
889
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__right") }, });
|
|
890
|
+
var __VLS_50 = {};
|
|
891
|
+
}
|
|
892
|
+
if (__VLS_ctx.fieldErrors.errorText.value || props.helpText || __VLS_ctx.$slots.footer) {
|
|
893
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__footer") }, });
|
|
894
|
+
if (__VLS_ctx.fieldErrors.errorText.value) {
|
|
895
|
+
// @ts-ignore
|
|
896
|
+
[McTitle,];
|
|
897
|
+
// @ts-ignore
|
|
898
|
+
const __VLS_51 = __VLS_asFunctionalComponent(McTitle, new McTitle({ tagName: ("div"), color: ("red"), variation: ((__VLS_ctx.TitleVariations.Overline)), ...{ class: ("mc-field-text__error-text") }, htmlData: ((__VLS_ctx.fieldErrors.errorText.value)), }));
|
|
899
|
+
const __VLS_52 = __VLS_51({ tagName: ("div"), color: ("red"), variation: ((__VLS_ctx.TitleVariations.Overline)), ...{ class: ("mc-field-text__error-text") }, htmlData: ((__VLS_ctx.fieldErrors.errorText.value)), }, ...__VLS_functionalComponentArgsRest(__VLS_51));
|
|
900
|
+
}
|
|
901
|
+
if (__VLS_ctx.fieldErrors.errorText.value) {
|
|
902
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.br)({});
|
|
903
|
+
}
|
|
904
|
+
var __VLS_56 = {};
|
|
905
|
+
if (props.helpText) {
|
|
906
|
+
// @ts-ignore
|
|
907
|
+
[McTitle, McTitle,];
|
|
908
|
+
// @ts-ignore
|
|
909
|
+
const __VLS_57 = __VLS_asFunctionalComponent(McTitle, new McTitle({ tagName: ("div"), variation: ((__VLS_ctx.TitleVariations.Overline)), color: ("gray"), maxWidth: ("100%"), }));
|
|
910
|
+
const __VLS_58 = __VLS_57({ tagName: ("div"), variation: ((__VLS_ctx.TitleVariations.Overline)), color: ("gray"), maxWidth: ("100%"), }, ...__VLS_functionalComponentArgsRest(__VLS_57));
|
|
911
|
+
(props.helpText);
|
|
912
|
+
__VLS_nonNullable(__VLS_61.slots).default;
|
|
913
|
+
var __VLS_61;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
__VLS_styleScopedClasses['mc-field-text__header'];
|
|
917
|
+
__VLS_styleScopedClasses['mc-field-text__inner'];
|
|
918
|
+
__VLS_styleScopedClasses['mc-field-text__main'];
|
|
919
|
+
__VLS_styleScopedClasses['mc-field-text__prepend'];
|
|
920
|
+
__VLS_styleScopedClasses['mc-field-text__input-wrapper'];
|
|
921
|
+
__VLS_styleScopedClasses['mc-field-text__append'];
|
|
922
|
+
__VLS_styleScopedClasses['mc-field-text__append--indent-bottom'];
|
|
923
|
+
__VLS_styleScopedClasses['mc-field-text__char-counter'];
|
|
924
|
+
__VLS_styleScopedClasses['mc-field-text__right'];
|
|
925
|
+
__VLS_styleScopedClasses['mc-field-text__footer'];
|
|
926
|
+
__VLS_styleScopedClasses['mc-field-text__error-text'];
|
|
927
|
+
var __VLS_slots;
|
|
928
|
+
var __VLS_inheritedAttrs;
|
|
929
|
+
const __VLS_refs = {
|
|
930
|
+
"field": __VLS_nativeElements['div'],
|
|
931
|
+
"textarea": __VLS_nativeElements['textarea'],
|
|
932
|
+
"input": __VLS_nativeElements['input'],
|
|
933
|
+
};
|
|
934
|
+
var $refs;
|
|
935
|
+
var $el;
|
|
936
|
+
return {
|
|
937
|
+
attrs: {},
|
|
938
|
+
slots: __VLS_slots,
|
|
939
|
+
refs: $refs,
|
|
940
|
+
rootEl: $el,
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
;
|
|
944
|
+
const __VLS_self = (await import('vue')).defineComponent({
|
|
945
|
+
setup() {
|
|
946
|
+
return {
|
|
947
|
+
IMaskComponent: IMaskComponent,
|
|
948
|
+
McTitle: McTitle,
|
|
949
|
+
McButton: McButton,
|
|
950
|
+
McSvgIcon: McSvgIcon,
|
|
951
|
+
McTooltip: McTooltip,
|
|
952
|
+
ButtonSize: ButtonSize,
|
|
953
|
+
ButtonType: ButtonType,
|
|
954
|
+
HorizontalAlignment: HorizontalAlignment,
|
|
955
|
+
TitleVariations: TitleVariations,
|
|
956
|
+
Weights: Weights,
|
|
957
|
+
textarea: textarea,
|
|
958
|
+
prettyType: prettyType,
|
|
959
|
+
fieldErrors: fieldErrors,
|
|
960
|
+
classes: classes,
|
|
961
|
+
computedTitle: computedTitle,
|
|
962
|
+
isMaskVisible: isMaskVisible,
|
|
963
|
+
isTextarea: isTextarea,
|
|
964
|
+
isTextareaAutosize: isTextareaAutosize,
|
|
965
|
+
isPassword: isPassword,
|
|
966
|
+
hasCharCounter: hasCharCounter,
|
|
967
|
+
isPasswordType: isPasswordType,
|
|
968
|
+
passwordIcon: passwordIcon,
|
|
969
|
+
charCounterTitle: charCounterTitle,
|
|
970
|
+
charCounterColor: charCounterColor,
|
|
971
|
+
maskInputAttrs: maskInputAttrs,
|
|
972
|
+
computedValue: computedValue,
|
|
973
|
+
handleInput: handleInput,
|
|
974
|
+
inputAttrs: inputAttrs,
|
|
975
|
+
prepareHandleKeyDown: prepareHandleKeyDown,
|
|
976
|
+
handlerCopy: handlerCopy,
|
|
977
|
+
togglePasswordVisibility: togglePasswordVisibility,
|
|
978
|
+
};
|
|
979
|
+
},
|
|
980
|
+
emits: {},
|
|
981
|
+
props: {
|
|
982
|
+
/**
|
|
983
|
+
* Значение
|
|
984
|
+
*
|
|
985
|
+
*/
|
|
986
|
+
modelValue: {
|
|
987
|
+
type: [String, Number],
|
|
988
|
+
default: null
|
|
989
|
+
},
|
|
990
|
+
/**
|
|
991
|
+
* Тип:
|
|
992
|
+
* `textarea, textarea-autosize и
|
|
993
|
+
* нативные как text, password, email и т.д.`
|
|
994
|
+
*
|
|
995
|
+
* кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
|
|
996
|
+
* кастомный int - разрешает ввод только целочисленных значений
|
|
997
|
+
* кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
|
|
998
|
+
* date - добавляет placeholder, маску и ограничения ввода
|
|
999
|
+
* uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
|
|
1000
|
+
* phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
|
|
1001
|
+
*/
|
|
1002
|
+
type: {
|
|
1003
|
+
type: String,
|
|
1004
|
+
default: InputTypes.Text
|
|
1005
|
+
},
|
|
1006
|
+
/**
|
|
1007
|
+
* Заголовок поля:
|
|
1008
|
+
*
|
|
1009
|
+
*/
|
|
1010
|
+
title: {
|
|
1011
|
+
type: String,
|
|
1012
|
+
default: null
|
|
1013
|
+
},
|
|
1014
|
+
/**
|
|
1015
|
+
* Маска поля:
|
|
1016
|
+
*
|
|
1017
|
+
* tokens - https://imask.js.org/guide.html
|
|
1018
|
+
*
|
|
1019
|
+
*/
|
|
1020
|
+
mask: {
|
|
1021
|
+
type: String,
|
|
1022
|
+
default: null
|
|
1023
|
+
},
|
|
1024
|
+
/**
|
|
1025
|
+
* Вспомогательный текст под инпутом:
|
|
1026
|
+
*
|
|
1027
|
+
*/
|
|
1028
|
+
helpText: {
|
|
1029
|
+
type: String,
|
|
1030
|
+
default: null
|
|
1031
|
+
},
|
|
1032
|
+
/**
|
|
1033
|
+
* Отключенное состояние
|
|
1034
|
+
*
|
|
1035
|
+
*/
|
|
1036
|
+
disabled: {
|
|
1037
|
+
type: Boolean,
|
|
1038
|
+
default: false
|
|
1039
|
+
},
|
|
1040
|
+
/**
|
|
1041
|
+
* Ошибки
|
|
1042
|
+
*
|
|
1043
|
+
*/
|
|
1044
|
+
errors: {
|
|
1045
|
+
type: Array,
|
|
1046
|
+
default: null
|
|
1047
|
+
},
|
|
1048
|
+
/**
|
|
1049
|
+
* Placeholder
|
|
1050
|
+
*
|
|
1051
|
+
*/
|
|
1052
|
+
placeholder: {
|
|
1053
|
+
type: String,
|
|
1054
|
+
default: null
|
|
1055
|
+
},
|
|
1056
|
+
/**
|
|
1057
|
+
* Name
|
|
1058
|
+
*
|
|
1059
|
+
*/
|
|
1060
|
+
name: {
|
|
1061
|
+
type: String,
|
|
1062
|
+
required: true
|
|
1063
|
+
},
|
|
1064
|
+
/**
|
|
1065
|
+
* плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
|
|
1066
|
+
* {
|
|
1067
|
+
* date: 'd',
|
|
1068
|
+
* month: 'm',
|
|
1069
|
+
* year: 'y',
|
|
1070
|
+
* }
|
|
1071
|
+
*
|
|
1072
|
+
*/
|
|
1073
|
+
dateMaskPlaceholder: {
|
|
1074
|
+
type: Object,
|
|
1075
|
+
default: () => ({})
|
|
1076
|
+
},
|
|
1077
|
+
/**
|
|
1078
|
+
* Максимальная длина строки в инпуте
|
|
1079
|
+
*
|
|
1080
|
+
*/
|
|
1081
|
+
maxLength: {
|
|
1082
|
+
type: Number,
|
|
1083
|
+
default: null
|
|
1084
|
+
},
|
|
1085
|
+
/**
|
|
1086
|
+
* Состояние копирования
|
|
1087
|
+
*
|
|
1088
|
+
*/
|
|
1089
|
+
copy: {
|
|
1090
|
+
type: Boolean,
|
|
1091
|
+
default: false
|
|
1092
|
+
},
|
|
1093
|
+
/**
|
|
1094
|
+
* Автокомплит введённого ранее текста: on, off
|
|
1095
|
+
*
|
|
1096
|
+
*/
|
|
1097
|
+
autocomplete: {
|
|
1098
|
+
type: String,
|
|
1099
|
+
default: Autocomplete.On
|
|
1100
|
+
},
|
|
1101
|
+
/**
|
|
1102
|
+
* только чтение текста
|
|
1103
|
+
*
|
|
1104
|
+
*/
|
|
1105
|
+
readOnly: {
|
|
1106
|
+
type: Boolean,
|
|
1107
|
+
default: false
|
|
1108
|
+
},
|
|
1109
|
+
/**
|
|
1110
|
+
* Атрибут tabindex для главного элемента
|
|
1111
|
+
*
|
|
1112
|
+
*/
|
|
1113
|
+
tabindex: {
|
|
1114
|
+
type: [String, Number]
|
|
1115
|
+
},
|
|
1116
|
+
/**
|
|
1117
|
+
* Tooltip для кнопка "показать пароль"
|
|
1118
|
+
*
|
|
1119
|
+
*/
|
|
1120
|
+
passwordTooltip: {
|
|
1121
|
+
type: String,
|
|
1122
|
+
default: 'Show/Hide'
|
|
1123
|
+
},
|
|
1124
|
+
/**
|
|
1125
|
+
* Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
|
|
1126
|
+
*
|
|
1127
|
+
*/
|
|
1128
|
+
passwordHideTooltip: {
|
|
1129
|
+
type: String,
|
|
1130
|
+
default: null
|
|
1131
|
+
},
|
|
1132
|
+
/**
|
|
1133
|
+
* Очищаем данные от маски на выходе
|
|
1134
|
+
*/
|
|
1135
|
+
clearOutput: {
|
|
1136
|
+
type: Boolean,
|
|
1137
|
+
default: false
|
|
1138
|
+
},
|
|
1139
|
+
/**
|
|
1140
|
+
* Кастомные настройки для маски
|
|
1141
|
+
* См. https://imask.js.org/guide.html
|
|
1142
|
+
*
|
|
1143
|
+
* Например:
|
|
1144
|
+
* {
|
|
1145
|
+
* autofix: true,
|
|
1146
|
+
* blocks: {
|
|
1147
|
+
* d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
|
|
1148
|
+
* m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
|
|
1149
|
+
* Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
|
|
1150
|
+
* }
|
|
1151
|
+
* }
|
|
1152
|
+
*/
|
|
1153
|
+
maskOptions: {
|
|
1154
|
+
type: Object,
|
|
1155
|
+
default: null
|
|
1156
|
+
},
|
|
1157
|
+
required: {
|
|
1158
|
+
type: Boolean,
|
|
1159
|
+
default: false
|
|
1160
|
+
},
|
|
1161
|
+
/**
|
|
1162
|
+
* Для какого языка поле ввода
|
|
1163
|
+
*/
|
|
1164
|
+
locale: {
|
|
1165
|
+
type: String,
|
|
1166
|
+
default: null
|
|
1167
|
+
},
|
|
1168
|
+
/**
|
|
1169
|
+
* Мобильное ли разрешение
|
|
1170
|
+
* (Используется для триггера тултипа в кнопке с паролем)
|
|
1171
|
+
*/
|
|
1172
|
+
isMobile: {
|
|
1173
|
+
type: Boolean,
|
|
1174
|
+
default: false
|
|
1175
|
+
},
|
|
1176
|
+
/**
|
|
1177
|
+
* Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
|
|
1178
|
+
*/
|
|
1179
|
+
maxDecimals: {
|
|
1180
|
+
type: Number,
|
|
1181
|
+
default: 2
|
|
1182
|
+
},
|
|
1183
|
+
dir: {
|
|
1184
|
+
type: String,
|
|
1185
|
+
default: Directions.Ltr
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
});
|
|
1189
|
+
const __VLS_component = (await import('vue')).defineComponent({
|
|
1190
|
+
setup() {
|
|
1191
|
+
return {};
|
|
1192
|
+
},
|
|
1193
|
+
emits: {},
|
|
1194
|
+
props: {
|
|
1195
|
+
/**
|
|
1196
|
+
* Значение
|
|
1197
|
+
*
|
|
1198
|
+
*/
|
|
1199
|
+
modelValue: {
|
|
1200
|
+
type: [String, Number],
|
|
1201
|
+
default: null
|
|
1202
|
+
},
|
|
1203
|
+
/**
|
|
1204
|
+
* Тип:
|
|
1205
|
+
* `textarea, textarea-autosize и
|
|
1206
|
+
* нативные как text, password, email и т.д.`
|
|
1207
|
+
*
|
|
1208
|
+
* кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
|
|
1209
|
+
* кастомный int - разрешает ввод только целочисленных значений
|
|
1210
|
+
* кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
|
|
1211
|
+
* date - добавляет placeholder, маску и ограничения ввода
|
|
1212
|
+
* uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
|
|
1213
|
+
* phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
|
|
1214
|
+
*/
|
|
1215
|
+
type: {
|
|
1216
|
+
type: String,
|
|
1217
|
+
default: InputTypes.Text
|
|
1218
|
+
},
|
|
1219
|
+
/**
|
|
1220
|
+
* Заголовок поля:
|
|
1221
|
+
*
|
|
1222
|
+
*/
|
|
1223
|
+
title: {
|
|
1224
|
+
type: String,
|
|
1225
|
+
default: null
|
|
1226
|
+
},
|
|
1227
|
+
/**
|
|
1228
|
+
* Маска поля:
|
|
1229
|
+
*
|
|
1230
|
+
* tokens - https://imask.js.org/guide.html
|
|
1231
|
+
*
|
|
1232
|
+
*/
|
|
1233
|
+
mask: {
|
|
1234
|
+
type: String,
|
|
1235
|
+
default: null
|
|
1236
|
+
},
|
|
1237
|
+
/**
|
|
1238
|
+
* Вспомогательный текст под инпутом:
|
|
1239
|
+
*
|
|
1240
|
+
*/
|
|
1241
|
+
helpText: {
|
|
1242
|
+
type: String,
|
|
1243
|
+
default: null
|
|
1244
|
+
},
|
|
1245
|
+
/**
|
|
1246
|
+
* Отключенное состояние
|
|
1247
|
+
*
|
|
1248
|
+
*/
|
|
1249
|
+
disabled: {
|
|
1250
|
+
type: Boolean,
|
|
1251
|
+
default: false
|
|
1252
|
+
},
|
|
1253
|
+
/**
|
|
1254
|
+
* Ошибки
|
|
1255
|
+
*
|
|
1256
|
+
*/
|
|
1257
|
+
errors: {
|
|
1258
|
+
type: Array,
|
|
1259
|
+
default: null
|
|
1260
|
+
},
|
|
1261
|
+
/**
|
|
1262
|
+
* Placeholder
|
|
1263
|
+
*
|
|
1264
|
+
*/
|
|
1265
|
+
placeholder: {
|
|
1266
|
+
type: String,
|
|
1267
|
+
default: null
|
|
1268
|
+
},
|
|
1269
|
+
/**
|
|
1270
|
+
* Name
|
|
1271
|
+
*
|
|
1272
|
+
*/
|
|
1273
|
+
name: {
|
|
1274
|
+
type: String,
|
|
1275
|
+
required: true
|
|
1276
|
+
},
|
|
1277
|
+
/**
|
|
1278
|
+
* плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
|
|
1279
|
+
* {
|
|
1280
|
+
* date: 'd',
|
|
1281
|
+
* month: 'm',
|
|
1282
|
+
* year: 'y',
|
|
1283
|
+
* }
|
|
1284
|
+
*
|
|
1285
|
+
*/
|
|
1286
|
+
dateMaskPlaceholder: {
|
|
1287
|
+
type: Object,
|
|
1288
|
+
default: () => ({})
|
|
1289
|
+
},
|
|
1290
|
+
/**
|
|
1291
|
+
* Максимальная длина строки в инпуте
|
|
1292
|
+
*
|
|
1293
|
+
*/
|
|
1294
|
+
maxLength: {
|
|
1295
|
+
type: Number,
|
|
1296
|
+
default: null
|
|
1297
|
+
},
|
|
1298
|
+
/**
|
|
1299
|
+
* Состояние копирования
|
|
1300
|
+
*
|
|
1301
|
+
*/
|
|
1302
|
+
copy: {
|
|
1303
|
+
type: Boolean,
|
|
1304
|
+
default: false
|
|
1305
|
+
},
|
|
1306
|
+
/**
|
|
1307
|
+
* Автокомплит введённого ранее текста: on, off
|
|
1308
|
+
*
|
|
1309
|
+
*/
|
|
1310
|
+
autocomplete: {
|
|
1311
|
+
type: String,
|
|
1312
|
+
default: Autocomplete.On
|
|
1313
|
+
},
|
|
1314
|
+
/**
|
|
1315
|
+
* только чтение текста
|
|
1316
|
+
*
|
|
1317
|
+
*/
|
|
1318
|
+
readOnly: {
|
|
1319
|
+
type: Boolean,
|
|
1320
|
+
default: false
|
|
1321
|
+
},
|
|
1322
|
+
/**
|
|
1323
|
+
* Атрибут tabindex для главного элемента
|
|
1324
|
+
*
|
|
1325
|
+
*/
|
|
1326
|
+
tabindex: {
|
|
1327
|
+
type: [String, Number]
|
|
1328
|
+
},
|
|
1329
|
+
/**
|
|
1330
|
+
* Tooltip для кнопка "показать пароль"
|
|
1331
|
+
*
|
|
1332
|
+
*/
|
|
1333
|
+
passwordTooltip: {
|
|
1334
|
+
type: String,
|
|
1335
|
+
default: 'Show/Hide'
|
|
1336
|
+
},
|
|
1337
|
+
/**
|
|
1338
|
+
* Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
|
|
1339
|
+
*
|
|
1340
|
+
*/
|
|
1341
|
+
passwordHideTooltip: {
|
|
1342
|
+
type: String,
|
|
1343
|
+
default: null
|
|
1344
|
+
},
|
|
1345
|
+
/**
|
|
1346
|
+
* Очищаем данные от маски на выходе
|
|
1347
|
+
*/
|
|
1348
|
+
clearOutput: {
|
|
1349
|
+
type: Boolean,
|
|
1350
|
+
default: false
|
|
1351
|
+
},
|
|
1352
|
+
/**
|
|
1353
|
+
* Кастомные настройки для маски
|
|
1354
|
+
* См. https://imask.js.org/guide.html
|
|
1355
|
+
*
|
|
1356
|
+
* Например:
|
|
1357
|
+
* {
|
|
1358
|
+
* autofix: true,
|
|
1359
|
+
* blocks: {
|
|
1360
|
+
* d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
|
|
1361
|
+
* m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
|
|
1362
|
+
* Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
|
|
1363
|
+
* }
|
|
1364
|
+
* }
|
|
1365
|
+
*/
|
|
1366
|
+
maskOptions: {
|
|
1367
|
+
type: Object,
|
|
1368
|
+
default: null
|
|
1369
|
+
},
|
|
1370
|
+
required: {
|
|
1371
|
+
type: Boolean,
|
|
1372
|
+
default: false
|
|
1373
|
+
},
|
|
1374
|
+
/**
|
|
1375
|
+
* Для какого языка поле ввода
|
|
1376
|
+
*/
|
|
1377
|
+
locale: {
|
|
1378
|
+
type: String,
|
|
1379
|
+
default: null
|
|
1380
|
+
},
|
|
1381
|
+
/**
|
|
1382
|
+
* Мобильное ли разрешение
|
|
1383
|
+
* (Используется для триггера тултипа в кнопке с паролем)
|
|
1384
|
+
*/
|
|
1385
|
+
isMobile: {
|
|
1386
|
+
type: Boolean,
|
|
1387
|
+
default: false
|
|
1388
|
+
},
|
|
1389
|
+
/**
|
|
1390
|
+
* Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
|
|
1391
|
+
*/
|
|
1392
|
+
maxDecimals: {
|
|
1393
|
+
type: Number,
|
|
1394
|
+
default: 2
|
|
1395
|
+
},
|
|
1396
|
+
dir: {
|
|
1397
|
+
type: String,
|
|
1398
|
+
default: Directions.Ltr
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
__typeEl: {},
|
|
1402
|
+
});
|
|
1403
|
+
export default {};
|
|
1404
|
+
; /* PartiallyEnd: #4569/main.vue */
|