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,1255 @@
|
|
|
1
|
+
import { computed, onMounted, reactive, ref, useAttrs, watch } from 'vue';
|
|
2
|
+
import { DatepickerFormat, DatepickerTypes, DayjsFormat, DatepickerOutputFormat, DatepickerFormatsVariations } from '@/enums/Datepicker';
|
|
3
|
+
//@ts-ignore
|
|
4
|
+
import { dayjs, dayjsLocales } from '../../../utils/dayjs.js';
|
|
5
|
+
import DatePicker from '@vuepic/vue-datepicker';
|
|
6
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
|
7
|
+
import McTitle from '../McTitle/McTitle.vue';
|
|
8
|
+
import McSvgIcon from '../McSvgIcon/McSvgIcon.vue';
|
|
9
|
+
import McButton from '../McButton/McButton.vue';
|
|
10
|
+
import { useFieldErrors } from '@/composables/useFieldErrors';
|
|
11
|
+
import { ButtonSize, TitleVariations, Weights } from '@/enums';
|
|
12
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
|
13
|
+
const attrs = useAttrs();
|
|
14
|
+
const emit = defineEmits(['update:modelValue']);
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
//@ts-ignore
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: [String, Array]
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Тип датапикера
|
|
22
|
+
*/
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: DatepickerTypes.DatePicker
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Заголовок поля:
|
|
29
|
+
*/
|
|
30
|
+
title: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ''
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Вспомогательный текст под инпутом:
|
|
36
|
+
*/
|
|
37
|
+
helpText: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ''
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Редактируемый инпут
|
|
43
|
+
*/
|
|
44
|
+
editable: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
disabled: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
placeholder: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: null
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Name
|
|
58
|
+
*/
|
|
59
|
+
name: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: true
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Локаль The locale code (ISO 639-1 + optional country code)
|
|
65
|
+
*/
|
|
66
|
+
lang: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: 'en'
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Ошибки
|
|
72
|
+
*/
|
|
73
|
+
errors: {
|
|
74
|
+
type: Array,
|
|
75
|
+
default: () => []
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Отдаваемая дата будет в формате ISO String
|
|
79
|
+
*/
|
|
80
|
+
toIsoFormat: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: false
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Формат отдаваемой даты
|
|
86
|
+
*/
|
|
87
|
+
placeholders: {
|
|
88
|
+
type: Object,
|
|
89
|
+
default: () => ({
|
|
90
|
+
week: 'Week',
|
|
91
|
+
month: 'Month',
|
|
92
|
+
quarter: 'Quarter',
|
|
93
|
+
year: 'Year',
|
|
94
|
+
confirm: 'Confirm'
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Пресеты для быстрых периодов
|
|
99
|
+
**/
|
|
100
|
+
customPresets: {
|
|
101
|
+
type: Array,
|
|
102
|
+
default: () => []
|
|
103
|
+
},
|
|
104
|
+
range: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* Если значение true, то датапикер отображается в открытом виде
|
|
110
|
+
*/
|
|
111
|
+
inline: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: false
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* Дата, до которой все будет задизэйблено
|
|
117
|
+
**/
|
|
118
|
+
minDate: {
|
|
119
|
+
type: [Date, String]
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* Дата, после которой все будет задизэйблено
|
|
123
|
+
**/
|
|
124
|
+
maxDate: {
|
|
125
|
+
type: [String, Date]
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* Массив дат запрещенных к выбору / Метод которые проверяет каждую дату
|
|
129
|
+
**/
|
|
130
|
+
disabledDates: {
|
|
131
|
+
type: [Array, Function]
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* Массив дат разрешенных к выбору / Метод которые проверяет каждую дату
|
|
135
|
+
* **/
|
|
136
|
+
allowedDates: {
|
|
137
|
+
type: [Array, Function]
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* Функция проверяющая и устанавливающая доступно ли время для выбора
|
|
141
|
+
* Params [String] date - текущая дата
|
|
142
|
+
* return Boolean, где true - время заблокировано для выбора
|
|
143
|
+
* **/
|
|
144
|
+
disabledTime: {
|
|
145
|
+
type: [Array, Function]
|
|
146
|
+
},
|
|
147
|
+
minWidth: {
|
|
148
|
+
type: String,
|
|
149
|
+
default: '240px'
|
|
150
|
+
},
|
|
151
|
+
hours: {
|
|
152
|
+
type: Array,
|
|
153
|
+
default: () => []
|
|
154
|
+
},
|
|
155
|
+
minutes: {
|
|
156
|
+
type: Array,
|
|
157
|
+
default: () => []
|
|
158
|
+
},
|
|
159
|
+
seconds: {
|
|
160
|
+
type: Array,
|
|
161
|
+
default: () => []
|
|
162
|
+
},
|
|
163
|
+
timezone: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: dayjs.tz.guess()
|
|
166
|
+
},
|
|
167
|
+
useTimezone: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: false
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* Показывать ли крестик очищения поля
|
|
173
|
+
* */
|
|
174
|
+
clearable: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: true
|
|
177
|
+
},
|
|
178
|
+
loading: {
|
|
179
|
+
type: Boolean,
|
|
180
|
+
default: false
|
|
181
|
+
},
|
|
182
|
+
setDefaultToday: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: true
|
|
185
|
+
},
|
|
186
|
+
markers: {
|
|
187
|
+
type: Array,
|
|
188
|
+
default: () => []
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
const fieldErrors = useFieldErrors(props.errors);
|
|
192
|
+
const pickDate = ref(null);
|
|
193
|
+
const input = ref(null);
|
|
194
|
+
const classes = computed(() => {
|
|
195
|
+
return {
|
|
196
|
+
'mc-date-picker--error': !!fieldErrors.errorText.value,
|
|
197
|
+
'mc-date-picker--disabled': props.disabled
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
const formats = reactive({
|
|
201
|
+
[DatepickerTypes.TimePicker]: {
|
|
202
|
+
[DatepickerFormatsVariations.Picker]: DatepickerFormat.TimePicker,
|
|
203
|
+
[DatepickerFormatsVariations.Dayjs]: DayjsFormat.TimePicker,
|
|
204
|
+
[DatepickerFormatsVariations.Output]: DatepickerOutputFormat.TimePicker
|
|
205
|
+
},
|
|
206
|
+
[DatepickerTypes.DatePicker]: {
|
|
207
|
+
[DatepickerFormatsVariations.Picker]: DatepickerFormat.DatePicker,
|
|
208
|
+
[DatepickerFormatsVariations.Dayjs]: DayjsFormat.DatePicker,
|
|
209
|
+
[DatepickerFormatsVariations.Output]: DatepickerOutputFormat.DatePicker
|
|
210
|
+
},
|
|
211
|
+
[DatepickerTypes.DateTimePicker]: {
|
|
212
|
+
[DatepickerFormatsVariations.Picker]: DatepickerFormat.DateTimePicker,
|
|
213
|
+
[DatepickerFormatsVariations.Dayjs]: DayjsFormat.DateTimePicker,
|
|
214
|
+
[DatepickerFormatsVariations.Output]: DatepickerOutputFormat.DateTimePicker
|
|
215
|
+
},
|
|
216
|
+
[DatepickerTypes.WeekPicker]: {
|
|
217
|
+
[DatepickerFormatsVariations.Picker]: DatepickerFormat.WeekPicker,
|
|
218
|
+
[DatepickerFormatsVariations.Dayjs]: DayjsFormat.WeekPicker,
|
|
219
|
+
[DatepickerFormatsVariations.Output]: DatepickerOutputFormat.WeekPicker
|
|
220
|
+
},
|
|
221
|
+
[DatepickerTypes.MonthPicker]: {
|
|
222
|
+
[DatepickerFormatsVariations.Picker]: DatepickerFormat.MonthPicker,
|
|
223
|
+
[DatepickerFormatsVariations.Dayjs]: DayjsFormat.MonthPicker,
|
|
224
|
+
[DatepickerFormatsVariations.Output]: DatepickerOutputFormat.MonthPicker
|
|
225
|
+
},
|
|
226
|
+
[DatepickerTypes.YearPicker]: {
|
|
227
|
+
[DatepickerFormatsVariations.Picker]: DatepickerFormat.YearPicker,
|
|
228
|
+
[DatepickerFormatsVariations.Dayjs]: DayjsFormat.YearPicker,
|
|
229
|
+
[DatepickerFormatsVariations.Output]: DatepickerOutputFormat.YearPicker
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
const computedType = computed(() => {
|
|
233
|
+
return props.type || DatepickerTypes.DatePicker;
|
|
234
|
+
});
|
|
235
|
+
const dateFormat = reactive(formats[computedType.value]);
|
|
236
|
+
const isTimePicker = computed(() => {
|
|
237
|
+
return computedType.value === DatepickerTypes.TimePicker;
|
|
238
|
+
});
|
|
239
|
+
const isDateTimePicker = computed(() => {
|
|
240
|
+
return computedType.value === DatepickerTypes.DateTimePicker;
|
|
241
|
+
});
|
|
242
|
+
const isWeekPicker = computed(() => {
|
|
243
|
+
return computedType.value === DatepickerTypes.WeekPicker;
|
|
244
|
+
});
|
|
245
|
+
const isMonthPicker = computed(() => {
|
|
246
|
+
return computedType.value === DatepickerTypes.MonthPicker;
|
|
247
|
+
});
|
|
248
|
+
const isYearPicker = computed(() => {
|
|
249
|
+
return computedType.value === DatepickerTypes.YearPicker;
|
|
250
|
+
});
|
|
251
|
+
const pickerType = computed(() => {
|
|
252
|
+
return {
|
|
253
|
+
[DatepickerTypes.TimePicker]: computedType.value === DatepickerTypes.TimePicker,
|
|
254
|
+
[DatepickerTypes.WeekPicker]: computedType.value === DatepickerTypes.WeekPicker,
|
|
255
|
+
[DatepickerTypes.MonthPicker]: computedType.value === DatepickerTypes.MonthPicker,
|
|
256
|
+
[DatepickerTypes.YearPicker]: computedType.value === DatepickerTypes.YearPicker
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
const isAutoApply = computed(() => {
|
|
260
|
+
return !isTimePicker.value && !isDateTimePicker.value && !isFooterVisible.value;
|
|
261
|
+
});
|
|
262
|
+
const weekNumbers = computed(() => {
|
|
263
|
+
return isWeekPicker.value ? 'local' : null;
|
|
264
|
+
});
|
|
265
|
+
const modelType = computed(() => {
|
|
266
|
+
return props.toIsoFormat && !props.useTimezone ? 'iso' : 'format';
|
|
267
|
+
});
|
|
268
|
+
const hoursOptions = computed(() => {
|
|
269
|
+
return props.hours && props.hours.length ? { 'hour-options': props.hours } : {};
|
|
270
|
+
});
|
|
271
|
+
const minutesOptions = computed(() => {
|
|
272
|
+
return props.minutes && props.minutes.length ? { 'minute-options': props.minutes } : {};
|
|
273
|
+
});
|
|
274
|
+
const secondsOptions = computed(() => {
|
|
275
|
+
return props.seconds && props.seconds.length ? { 'second-options': props.seconds } : {};
|
|
276
|
+
});
|
|
277
|
+
const isFooterVisible = computed(() => {
|
|
278
|
+
return (props.range &&
|
|
279
|
+
(props.customPresets?.length || !!props.placeholders) &&
|
|
280
|
+
!isTimePicker.value &&
|
|
281
|
+
!isYearPicker.value &&
|
|
282
|
+
!isMonthPicker.value);
|
|
283
|
+
});
|
|
284
|
+
const localValue = computed({
|
|
285
|
+
get() {
|
|
286
|
+
return getFormattedPickerDate(props.modelValue);
|
|
287
|
+
},
|
|
288
|
+
set(value) {
|
|
289
|
+
if (!value)
|
|
290
|
+
value = props.range ? [] : null;
|
|
291
|
+
const date = getFormattedOutputDate(value);
|
|
292
|
+
fieldErrors.toggleErrorVisible();
|
|
293
|
+
emit('update:modelValue', date);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
onMounted(() => {
|
|
297
|
+
init();
|
|
298
|
+
});
|
|
299
|
+
const init = () => {
|
|
300
|
+
props.setDefaultToday && handlePreselectToday();
|
|
301
|
+
};
|
|
302
|
+
const handlerPreselectRange = (period) => {
|
|
303
|
+
const [start, end] = period;
|
|
304
|
+
input.value && (input.value.currentValue = dayjs ? [dayjs(start).toDate(), dayjs(end).toDate()] : period);
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Преселект при setDefaultToday = true
|
|
308
|
+
* */
|
|
309
|
+
const handlePreselectToday = () => {
|
|
310
|
+
if (isWeekPicker.value)
|
|
311
|
+
return;
|
|
312
|
+
const hasValue = props.range
|
|
313
|
+
? localValue.value?.length && Array.isArray(localValue.value) && localValue.value.every((v) => dayjs(v).isValid())
|
|
314
|
+
: //@ts-ignore
|
|
315
|
+
dayjs(localValue.value).isValid();
|
|
316
|
+
if (!hasValue) {
|
|
317
|
+
let today = props.toIsoFormat
|
|
318
|
+
? dayjs().toISOString()
|
|
319
|
+
: dayjs().format(dateFormat[DatepickerFormatsVariations.Output]);
|
|
320
|
+
localValue.value = props.range ? getFormattedPickerDate([today, today]) : getFormattedPickerDate(today);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Prepare dates for datepicker
|
|
325
|
+
* */
|
|
326
|
+
const getFormattedPickerDate = (value) => {
|
|
327
|
+
if (isWeekPicker.value)
|
|
328
|
+
return value;
|
|
329
|
+
let preparedValue = props.range ? (Array.isArray(value) ? value : []) : [value];
|
|
330
|
+
if (!props.toIsoFormat) {
|
|
331
|
+
preparedValue = preparedValue.map((pv) => dayjs(pv, dateFormat.output).format(dateFormat.dayjs));
|
|
332
|
+
}
|
|
333
|
+
const [start, end] = preparedValue;
|
|
334
|
+
return props.range ? [start, end].filter(Boolean) : start;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Prepare dates for output
|
|
338
|
+
* */
|
|
339
|
+
const getFormattedOutputDate = (value) => {
|
|
340
|
+
if (isWeekPicker.value)
|
|
341
|
+
return value;
|
|
342
|
+
let preparedValue = props.range ? (Array.isArray(value) ? value.map((pv) => String(pv)) : []) : [String(value)];
|
|
343
|
+
if (!props.toIsoFormat) {
|
|
344
|
+
preparedValue = preparedValue.map((pv) => dayjs(pv, dateFormat.dayjs).format(dateFormat.output));
|
|
345
|
+
}
|
|
346
|
+
const [start, end] = preparedValue.map((pv) => (pv === 'Invalid Date' ? null : pv));
|
|
347
|
+
return props.range ? [start, end].filter(Boolean) : start;
|
|
348
|
+
};
|
|
349
|
+
const setLocale = async () => {
|
|
350
|
+
const locale = props.lang !== 'ar' && Object.keys(dayjsLocales).includes(props.lang) ? props.lang : 'en';
|
|
351
|
+
//@ts-ignore
|
|
352
|
+
await dayjsLocales[locale]?.();
|
|
353
|
+
dayjs.locale(locale);
|
|
354
|
+
};
|
|
355
|
+
const selectPeriod = (key) => {
|
|
356
|
+
let start = dayjs();
|
|
357
|
+
//@ts-ignore
|
|
358
|
+
const end = pickDate.value ? dayjs(pickDate.value) : dayjs();
|
|
359
|
+
switch (key) {
|
|
360
|
+
case 'week':
|
|
361
|
+
start = dayjs(end).subtract(7, 'days');
|
|
362
|
+
break;
|
|
363
|
+
case 'month':
|
|
364
|
+
start = dayjs(end).subtract(1, 'months');
|
|
365
|
+
break;
|
|
366
|
+
case 'quarter':
|
|
367
|
+
start = dayjs(end).subtract(3, 'months');
|
|
368
|
+
break;
|
|
369
|
+
case 'year':
|
|
370
|
+
start = dayjs(end).subtract(1, 'years');
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
input.value.updateInternalModelValue([start.toDate(), end.toDate()]);
|
|
374
|
+
};
|
|
375
|
+
const handlePickDate = (date) => {
|
|
376
|
+
pickDate.value = date;
|
|
377
|
+
};
|
|
378
|
+
const handleSubmit = () => {
|
|
379
|
+
input.value.selectDate();
|
|
380
|
+
input.value.closeMenu();
|
|
381
|
+
};
|
|
382
|
+
watch(() => props.lang, () => {
|
|
383
|
+
setLocale();
|
|
384
|
+
}, { immediate: true }); /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
385
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
|
386
|
+
props: {
|
|
387
|
+
//@ts-ignore
|
|
388
|
+
modelValue: {
|
|
389
|
+
type: [String, Array]
|
|
390
|
+
},
|
|
391
|
+
/**
|
|
392
|
+
* Тип датапикера
|
|
393
|
+
*/
|
|
394
|
+
type: {
|
|
395
|
+
type: String,
|
|
396
|
+
default: DatepickerTypes.DatePicker
|
|
397
|
+
},
|
|
398
|
+
/**
|
|
399
|
+
* Заголовок поля:
|
|
400
|
+
*/
|
|
401
|
+
title: {
|
|
402
|
+
type: String,
|
|
403
|
+
default: ''
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* Вспомогательный текст под инпутом:
|
|
407
|
+
*/
|
|
408
|
+
helpText: {
|
|
409
|
+
type: String,
|
|
410
|
+
default: ''
|
|
411
|
+
},
|
|
412
|
+
/**
|
|
413
|
+
* Редактируемый инпут
|
|
414
|
+
*/
|
|
415
|
+
editable: {
|
|
416
|
+
type: Boolean,
|
|
417
|
+
default: false
|
|
418
|
+
},
|
|
419
|
+
disabled: {
|
|
420
|
+
type: Boolean,
|
|
421
|
+
default: false
|
|
422
|
+
},
|
|
423
|
+
placeholder: {
|
|
424
|
+
type: String,
|
|
425
|
+
default: null
|
|
426
|
+
},
|
|
427
|
+
/**
|
|
428
|
+
* Name
|
|
429
|
+
*/
|
|
430
|
+
name: {
|
|
431
|
+
type: String,
|
|
432
|
+
required: true
|
|
433
|
+
},
|
|
434
|
+
/**
|
|
435
|
+
* Локаль The locale code (ISO 639-1 + optional country code)
|
|
436
|
+
*/
|
|
437
|
+
lang: {
|
|
438
|
+
type: String,
|
|
439
|
+
default: 'en'
|
|
440
|
+
},
|
|
441
|
+
/**
|
|
442
|
+
* Ошибки
|
|
443
|
+
*/
|
|
444
|
+
errors: {
|
|
445
|
+
type: Array,
|
|
446
|
+
default: () => []
|
|
447
|
+
},
|
|
448
|
+
/**
|
|
449
|
+
* Отдаваемая дата будет в формате ISO String
|
|
450
|
+
*/
|
|
451
|
+
toIsoFormat: {
|
|
452
|
+
type: Boolean,
|
|
453
|
+
default: false
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* Формат отдаваемой даты
|
|
457
|
+
*/
|
|
458
|
+
placeholders: {
|
|
459
|
+
type: Object,
|
|
460
|
+
default: () => ({
|
|
461
|
+
week: 'Week',
|
|
462
|
+
month: 'Month',
|
|
463
|
+
quarter: 'Quarter',
|
|
464
|
+
year: 'Year',
|
|
465
|
+
confirm: 'Confirm'
|
|
466
|
+
})
|
|
467
|
+
},
|
|
468
|
+
/**
|
|
469
|
+
* Пресеты для быстрых периодов
|
|
470
|
+
**/
|
|
471
|
+
customPresets: {
|
|
472
|
+
type: Array,
|
|
473
|
+
default: () => []
|
|
474
|
+
},
|
|
475
|
+
range: {
|
|
476
|
+
type: Boolean,
|
|
477
|
+
default: false
|
|
478
|
+
},
|
|
479
|
+
/**
|
|
480
|
+
* Если значение true, то датапикер отображается в открытом виде
|
|
481
|
+
*/
|
|
482
|
+
inline: {
|
|
483
|
+
type: Boolean,
|
|
484
|
+
default: false
|
|
485
|
+
},
|
|
486
|
+
/**
|
|
487
|
+
* Дата, до которой все будет задизэйблено
|
|
488
|
+
**/
|
|
489
|
+
minDate: {
|
|
490
|
+
type: [Date, String]
|
|
491
|
+
},
|
|
492
|
+
/**
|
|
493
|
+
* Дата, после которой все будет задизэйблено
|
|
494
|
+
**/
|
|
495
|
+
maxDate: {
|
|
496
|
+
type: [String, Date]
|
|
497
|
+
},
|
|
498
|
+
/**
|
|
499
|
+
* Массив дат запрещенных к выбору / Метод которые проверяет каждую дату
|
|
500
|
+
**/
|
|
501
|
+
disabledDates: {
|
|
502
|
+
type: [Array, Function]
|
|
503
|
+
},
|
|
504
|
+
/**
|
|
505
|
+
* Массив дат разрешенных к выбору / Метод которые проверяет каждую дату
|
|
506
|
+
* **/
|
|
507
|
+
allowedDates: {
|
|
508
|
+
type: [Array, Function]
|
|
509
|
+
},
|
|
510
|
+
/**
|
|
511
|
+
* Функция проверяющая и устанавливающая доступно ли время для выбора
|
|
512
|
+
* Params [String] date - текущая дата
|
|
513
|
+
* return Boolean, где true - время заблокировано для выбора
|
|
514
|
+
* **/
|
|
515
|
+
disabledTime: {
|
|
516
|
+
type: [Array, Function]
|
|
517
|
+
},
|
|
518
|
+
minWidth: {
|
|
519
|
+
type: String,
|
|
520
|
+
default: '240px'
|
|
521
|
+
},
|
|
522
|
+
hours: {
|
|
523
|
+
type: Array,
|
|
524
|
+
default: () => []
|
|
525
|
+
},
|
|
526
|
+
minutes: {
|
|
527
|
+
type: Array,
|
|
528
|
+
default: () => []
|
|
529
|
+
},
|
|
530
|
+
seconds: {
|
|
531
|
+
type: Array,
|
|
532
|
+
default: () => []
|
|
533
|
+
},
|
|
534
|
+
timezone: {
|
|
535
|
+
type: String,
|
|
536
|
+
default: dayjs.tz.guess()
|
|
537
|
+
},
|
|
538
|
+
useTimezone: {
|
|
539
|
+
type: Boolean,
|
|
540
|
+
default: false
|
|
541
|
+
},
|
|
542
|
+
/**
|
|
543
|
+
* Показывать ли крестик очищения поля
|
|
544
|
+
* */
|
|
545
|
+
clearable: {
|
|
546
|
+
type: Boolean,
|
|
547
|
+
default: true
|
|
548
|
+
},
|
|
549
|
+
loading: {
|
|
550
|
+
type: Boolean,
|
|
551
|
+
default: false
|
|
552
|
+
},
|
|
553
|
+
setDefaultToday: {
|
|
554
|
+
type: Boolean,
|
|
555
|
+
default: true
|
|
556
|
+
},
|
|
557
|
+
markers: {
|
|
558
|
+
type: Array,
|
|
559
|
+
default: () => []
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
emits: {},
|
|
563
|
+
});
|
|
564
|
+
;
|
|
565
|
+
let __VLS_functionalComponentProps;
|
|
566
|
+
function __VLS_template() {
|
|
567
|
+
const __VLS_ctx = {};
|
|
568
|
+
const __VLS_localComponents = {
|
|
569
|
+
...{},
|
|
570
|
+
...{},
|
|
571
|
+
...__VLS_ctx,
|
|
572
|
+
};
|
|
573
|
+
let __VLS_components;
|
|
574
|
+
const __VLS_localDirectives = {
|
|
575
|
+
...{},
|
|
576
|
+
...__VLS_ctx,
|
|
577
|
+
};
|
|
578
|
+
let __VLS_directives;
|
|
579
|
+
let __VLS_styleScopedClasses;
|
|
580
|
+
// CSS variable injection
|
|
581
|
+
// CSS variable injection end
|
|
582
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
|
583
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ref: ("field"), ...{ class: ("mc-date-picker") }, ...{ class: ((__VLS_ctx.classes)) }, });
|
|
584
|
+
// @ts-ignore navigation for `const field = ref()`
|
|
585
|
+
__VLS_ctx.field;
|
|
586
|
+
if (__VLS_ctx.$slots.header || !!props.title) {
|
|
587
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.label, __VLS_intrinsicElements.label)({ for: ((__VLS_ctx.name)), ...{ class: ("mc-date-picker__header") }, });
|
|
588
|
+
var __VLS_0 = {};
|
|
589
|
+
if (props.title) {
|
|
590
|
+
// @ts-ignore
|
|
591
|
+
[McTitle, McTitle,];
|
|
592
|
+
// @ts-ignore
|
|
593
|
+
const __VLS_1 = __VLS_asFunctionalComponent(McTitle, new McTitle({ weight: ((__VLS_ctx.Weights.Medium)), }));
|
|
594
|
+
const __VLS_2 = __VLS_1({ weight: ((__VLS_ctx.Weights.Medium)), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
595
|
+
(props.title);
|
|
596
|
+
__VLS_nonNullable(__VLS_5.slots).default;
|
|
597
|
+
var __VLS_5;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-date-picker__inner") }, });
|
|
601
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-date-picker__input-wrapper") }, ...{ style: (({ minWidth: __VLS_ctx.minWidth })) }, });
|
|
602
|
+
const __VLS_6 = __VLS_resolvedLocalAndGlobalComponents.DatePicker;
|
|
603
|
+
/** @type { [typeof __VLS_components.DatePicker, typeof __VLS_components.datePicker, typeof __VLS_components.DatePicker, typeof __VLS_components.datePicker, ] } */
|
|
604
|
+
// @ts-ignore
|
|
605
|
+
const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({ ...{ 'onRangeStart': {} }, modelValue: ((__VLS_ctx.localValue)), ref: ("input"), type: ((__VLS_ctx.type)), ...({
|
|
606
|
+
...__VLS_ctx.attrs,
|
|
607
|
+
...__VLS_ctx.pickerType,
|
|
608
|
+
...__VLS_ctx.hoursOptions,
|
|
609
|
+
...__VLS_ctx.minutesOptions,
|
|
610
|
+
...__VLS_ctx.secondsOptions
|
|
611
|
+
}), ...{ class: ("mc-date-picker__date-picker") }, range: ((props.range)), multiCalendars: ((props.range)), monthChangeOnScroll: ((false)), timezone: ((__VLS_ctx.timezone)), format: ((__VLS_ctx.dateFormat.picker)), modelType: ((__VLS_ctx.modelType)), autoApply: ((__VLS_ctx.isAutoApply)), partialFlow: ((__VLS_ctx.isTimePicker || __VLS_ctx.isDateTimePicker)), enableTimePicker: ((__VLS_ctx.isTimePicker || __VLS_ctx.isDateTimePicker)), clearable: ((__VLS_ctx.clearable)), inline: ((__VLS_ctx.inline)), locale: ((__VLS_ctx.lang)), markers: ((__VLS_ctx.markers)), actionRow: (({})), loading: ((__VLS_ctx.loading)), weekNumbers: ((__VLS_ctx.weekNumbers)), placeholder: ((__VLS_ctx.placeholder)), editable: ((__VLS_ctx.editable)), disabled: ((__VLS_ctx.disabled)), disabledDates: ((__VLS_ctx.disabledDates)), allowedDates: ((__VLS_ctx.allowedDates)), minDate: ((__VLS_ctx.minDate)), maxDate: ((__VLS_ctx.maxDate)), disabledTimes: ((__VLS_ctx.disabledTime)), }));
|
|
612
|
+
const __VLS_8 = __VLS_7({ ...{ 'onRangeStart': {} }, modelValue: ((__VLS_ctx.localValue)), ref: ("input"), type: ((__VLS_ctx.type)), ...({
|
|
613
|
+
...__VLS_ctx.attrs,
|
|
614
|
+
...__VLS_ctx.pickerType,
|
|
615
|
+
...__VLS_ctx.hoursOptions,
|
|
616
|
+
...__VLS_ctx.minutesOptions,
|
|
617
|
+
...__VLS_ctx.secondsOptions
|
|
618
|
+
}), ...{ class: ("mc-date-picker__date-picker") }, range: ((props.range)), multiCalendars: ((props.range)), monthChangeOnScroll: ((false)), timezone: ((__VLS_ctx.timezone)), format: ((__VLS_ctx.dateFormat.picker)), modelType: ((__VLS_ctx.modelType)), autoApply: ((__VLS_ctx.isAutoApply)), partialFlow: ((__VLS_ctx.isTimePicker || __VLS_ctx.isDateTimePicker)), enableTimePicker: ((__VLS_ctx.isTimePicker || __VLS_ctx.isDateTimePicker)), clearable: ((__VLS_ctx.clearable)), inline: ((__VLS_ctx.inline)), locale: ((__VLS_ctx.lang)), markers: ((__VLS_ctx.markers)), actionRow: (({})), loading: ((__VLS_ctx.loading)), weekNumbers: ((__VLS_ctx.weekNumbers)), placeholder: ((__VLS_ctx.placeholder)), editable: ((__VLS_ctx.editable)), disabled: ((__VLS_ctx.disabled)), disabledDates: ((__VLS_ctx.disabledDates)), allowedDates: ((__VLS_ctx.allowedDates)), minDate: ((__VLS_ctx.minDate)), maxDate: ((__VLS_ctx.maxDate)), disabledTimes: ((__VLS_ctx.disabledTime)), }, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
619
|
+
// @ts-ignore navigation for `const input = ref()`
|
|
620
|
+
__VLS_ctx.input;
|
|
621
|
+
var __VLS_12 = {};
|
|
622
|
+
let __VLS_13;
|
|
623
|
+
const __VLS_14 = {
|
|
624
|
+
onRangeStart: (__VLS_ctx.handlePickDate)
|
|
625
|
+
};
|
|
626
|
+
let __VLS_9;
|
|
627
|
+
let __VLS_10;
|
|
628
|
+
if (__VLS_ctx.isFooterVisible) {
|
|
629
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
630
|
+
{
|
|
631
|
+
const { "action-row": __VLS_thisSlot } = __VLS_nonNullable(__VLS_11.slots);
|
|
632
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-datepicker__footer-popup") }, });
|
|
633
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-datepicker__footer-popup-periods") }, });
|
|
634
|
+
if (__VLS_ctx.customPresets && __VLS_ctx.customPresets.length) {
|
|
635
|
+
for (const [preset] of __VLS_getVForSourceType((__VLS_ctx.customPresets))) {
|
|
636
|
+
// @ts-ignore
|
|
637
|
+
[McButton, McButton,];
|
|
638
|
+
// @ts-ignore
|
|
639
|
+
const __VLS_15 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, key: ((preset.title)), variation: ("black-link"), secondaryColor: ("purple"), }));
|
|
640
|
+
const __VLS_16 = __VLS_15({ ...{ 'onClick': {} }, key: ((preset.title)), variation: ("black-link"), secondaryColor: ("purple"), }, ...__VLS_functionalComponentArgsRest(__VLS_15));
|
|
641
|
+
let __VLS_20;
|
|
642
|
+
const __VLS_21 = {
|
|
643
|
+
onClick: (...[$event]) => {
|
|
644
|
+
if (!((__VLS_ctx.isFooterVisible)))
|
|
645
|
+
return;
|
|
646
|
+
if (!((__VLS_ctx.customPresets && __VLS_ctx.customPresets.length)))
|
|
647
|
+
return;
|
|
648
|
+
__VLS_ctx.handlerPreselectRange(preset.period);
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
let __VLS_17;
|
|
652
|
+
let __VLS_18;
|
|
653
|
+
(preset.title);
|
|
654
|
+
__VLS_nonNullable(__VLS_19.slots).default;
|
|
655
|
+
var __VLS_19;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
else {
|
|
659
|
+
if (__VLS_ctx.placeholders.week) {
|
|
660
|
+
// @ts-ignore
|
|
661
|
+
[McButton, McButton,];
|
|
662
|
+
// @ts-ignore
|
|
663
|
+
const __VLS_22 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }));
|
|
664
|
+
const __VLS_23 = __VLS_22({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }, ...__VLS_functionalComponentArgsRest(__VLS_22));
|
|
665
|
+
let __VLS_27;
|
|
666
|
+
const __VLS_28 = {
|
|
667
|
+
onClick: (...[$event]) => {
|
|
668
|
+
if (!((__VLS_ctx.isFooterVisible)))
|
|
669
|
+
return;
|
|
670
|
+
if (!(!((__VLS_ctx.customPresets && __VLS_ctx.customPresets.length))))
|
|
671
|
+
return;
|
|
672
|
+
if (!((__VLS_ctx.placeholders.week)))
|
|
673
|
+
return;
|
|
674
|
+
__VLS_ctx.selectPeriod('week');
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
let __VLS_24;
|
|
678
|
+
let __VLS_25;
|
|
679
|
+
(__VLS_ctx.placeholders.week);
|
|
680
|
+
__VLS_nonNullable(__VLS_26.slots).default;
|
|
681
|
+
var __VLS_26;
|
|
682
|
+
}
|
|
683
|
+
if (__VLS_ctx.placeholders.month) {
|
|
684
|
+
// @ts-ignore
|
|
685
|
+
[McButton, McButton,];
|
|
686
|
+
// @ts-ignore
|
|
687
|
+
const __VLS_29 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }));
|
|
688
|
+
const __VLS_30 = __VLS_29({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }, ...__VLS_functionalComponentArgsRest(__VLS_29));
|
|
689
|
+
let __VLS_34;
|
|
690
|
+
const __VLS_35 = {
|
|
691
|
+
onClick: (...[$event]) => {
|
|
692
|
+
if (!((__VLS_ctx.isFooterVisible)))
|
|
693
|
+
return;
|
|
694
|
+
if (!(!((__VLS_ctx.customPresets && __VLS_ctx.customPresets.length))))
|
|
695
|
+
return;
|
|
696
|
+
if (!((__VLS_ctx.placeholders.month)))
|
|
697
|
+
return;
|
|
698
|
+
__VLS_ctx.selectPeriod('month');
|
|
699
|
+
}
|
|
700
|
+
};
|
|
701
|
+
let __VLS_31;
|
|
702
|
+
let __VLS_32;
|
|
703
|
+
(__VLS_ctx.placeholders.month);
|
|
704
|
+
__VLS_nonNullable(__VLS_33.slots).default;
|
|
705
|
+
var __VLS_33;
|
|
706
|
+
}
|
|
707
|
+
if (__VLS_ctx.placeholders.quarter) {
|
|
708
|
+
// @ts-ignore
|
|
709
|
+
[McButton, McButton,];
|
|
710
|
+
// @ts-ignore
|
|
711
|
+
const __VLS_36 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }));
|
|
712
|
+
const __VLS_37 = __VLS_36({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }, ...__VLS_functionalComponentArgsRest(__VLS_36));
|
|
713
|
+
let __VLS_41;
|
|
714
|
+
const __VLS_42 = {
|
|
715
|
+
onClick: (...[$event]) => {
|
|
716
|
+
if (!((__VLS_ctx.isFooterVisible)))
|
|
717
|
+
return;
|
|
718
|
+
if (!(!((__VLS_ctx.customPresets && __VLS_ctx.customPresets.length))))
|
|
719
|
+
return;
|
|
720
|
+
if (!((__VLS_ctx.placeholders.quarter)))
|
|
721
|
+
return;
|
|
722
|
+
__VLS_ctx.selectPeriod('quarter');
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
let __VLS_38;
|
|
726
|
+
let __VLS_39;
|
|
727
|
+
(__VLS_ctx.placeholders.quarter);
|
|
728
|
+
__VLS_nonNullable(__VLS_40.slots).default;
|
|
729
|
+
var __VLS_40;
|
|
730
|
+
}
|
|
731
|
+
if (__VLS_ctx.placeholders.year) {
|
|
732
|
+
// @ts-ignore
|
|
733
|
+
[McButton, McButton,];
|
|
734
|
+
// @ts-ignore
|
|
735
|
+
const __VLS_43 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }));
|
|
736
|
+
const __VLS_44 = __VLS_43({ ...{ 'onClick': {} }, variation: ("black-link"), secondaryColor: ("purple"), }, ...__VLS_functionalComponentArgsRest(__VLS_43));
|
|
737
|
+
let __VLS_48;
|
|
738
|
+
const __VLS_49 = {
|
|
739
|
+
onClick: (...[$event]) => {
|
|
740
|
+
if (!((__VLS_ctx.isFooterVisible)))
|
|
741
|
+
return;
|
|
742
|
+
if (!(!((__VLS_ctx.customPresets && __VLS_ctx.customPresets.length))))
|
|
743
|
+
return;
|
|
744
|
+
if (!((__VLS_ctx.placeholders.year)))
|
|
745
|
+
return;
|
|
746
|
+
__VLS_ctx.selectPeriod('year');
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
let __VLS_45;
|
|
750
|
+
let __VLS_46;
|
|
751
|
+
(__VLS_ctx.placeholders.year);
|
|
752
|
+
__VLS_nonNullable(__VLS_47.slots).default;
|
|
753
|
+
var __VLS_47;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
if (__VLS_ctx.placeholders.confirm) {
|
|
757
|
+
// @ts-ignore
|
|
758
|
+
[McButton, McButton,];
|
|
759
|
+
// @ts-ignore
|
|
760
|
+
const __VLS_50 = __VLS_asFunctionalComponent(McButton, new McButton({ ...{ 'onClick': {} }, variation: ("purple-outline"), size: ((__VLS_ctx.ButtonSize.Xs)), }));
|
|
761
|
+
const __VLS_51 = __VLS_50({ ...{ 'onClick': {} }, variation: ("purple-outline"), size: ((__VLS_ctx.ButtonSize.Xs)), }, ...__VLS_functionalComponentArgsRest(__VLS_50));
|
|
762
|
+
let __VLS_55;
|
|
763
|
+
const __VLS_56 = {
|
|
764
|
+
onClick: (__VLS_ctx.handleSubmit)
|
|
765
|
+
};
|
|
766
|
+
let __VLS_52;
|
|
767
|
+
let __VLS_53;
|
|
768
|
+
(__VLS_ctx.placeholders.confirm);
|
|
769
|
+
__VLS_nonNullable(__VLS_54.slots).default;
|
|
770
|
+
var __VLS_54;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
775
|
+
{
|
|
776
|
+
const { "input-icon": __VLS_thisSlot } = __VLS_nonNullable(__VLS_11.slots);
|
|
777
|
+
// @ts-ignore
|
|
778
|
+
[McSvgIcon,];
|
|
779
|
+
// @ts-ignore
|
|
780
|
+
const __VLS_57 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ name: ("calendar"), size: ("300"), color: ((props.disabled ? 'outline-gray' : 'black')), }));
|
|
781
|
+
const __VLS_58 = __VLS_57({ name: ("calendar"), size: ("300"), color: ((props.disabled ? 'outline-gray' : 'black')), }, ...__VLS_functionalComponentArgsRest(__VLS_57));
|
|
782
|
+
}
|
|
783
|
+
if (__VLS_ctx.$slots.header) {
|
|
784
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
785
|
+
{
|
|
786
|
+
const { header: __VLS_thisSlot } = __VLS_nonNullable(__VLS_11.slots);
|
|
787
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
|
|
788
|
+
var __VLS_62 = {};
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
if (__VLS_ctx.$slots.sidebar) {
|
|
792
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
793
|
+
{
|
|
794
|
+
const { sidebar: __VLS_thisSlot } = __VLS_nonNullable(__VLS_11.slots);
|
|
795
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
|
|
796
|
+
var __VLS_63 = {};
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
|
|
800
|
+
{
|
|
801
|
+
const { "icon-calendar": __VLS_thisSlot } = __VLS_nonNullable(__VLS_11.slots);
|
|
802
|
+
// @ts-ignore
|
|
803
|
+
[McSvgIcon,];
|
|
804
|
+
// @ts-ignore
|
|
805
|
+
const __VLS_64 = __VLS_asFunctionalComponent(McSvgIcon, new McSvgIcon({ ...{ class: ("mc-date-picker__icon") }, name: ("calendar"), }));
|
|
806
|
+
const __VLS_65 = __VLS_64({ ...{ class: ("mc-date-picker__icon") }, name: ("calendar"), }, ...__VLS_functionalComponentArgsRest(__VLS_64));
|
|
807
|
+
}
|
|
808
|
+
var __VLS_11;
|
|
809
|
+
if (!!__VLS_ctx.fieldErrors.errorText.value || !!props.helpText || !!__VLS_ctx.$slots.bottom) {
|
|
810
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-date-picker__footer") }, });
|
|
811
|
+
if (!!__VLS_ctx.fieldErrors.errorText.value) {
|
|
812
|
+
// @ts-ignore
|
|
813
|
+
[McTitle, McTitle,];
|
|
814
|
+
// @ts-ignore
|
|
815
|
+
const __VLS_69 = __VLS_asFunctionalComponent(McTitle, new McTitle({ tagName: ("div"), color: ("red"), variation: ((__VLS_ctx.TitleVariations.Overline)), }));
|
|
816
|
+
const __VLS_70 = __VLS_69({ tagName: ("div"), color: ("red"), variation: ((__VLS_ctx.TitleVariations.Overline)), }, ...__VLS_functionalComponentArgsRest(__VLS_69));
|
|
817
|
+
(__VLS_ctx.fieldErrors.errorText.value);
|
|
818
|
+
__VLS_nonNullable(__VLS_73.slots).default;
|
|
819
|
+
var __VLS_73;
|
|
820
|
+
}
|
|
821
|
+
if (!!__VLS_ctx.fieldErrors.errorText.value && (!!props.helpText || !!__VLS_ctx.$slots.bottom)) {
|
|
822
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.br)({});
|
|
823
|
+
}
|
|
824
|
+
var __VLS_74 = {};
|
|
825
|
+
if (!!props.helpText) {
|
|
826
|
+
// @ts-ignore
|
|
827
|
+
[McTitle, McTitle,];
|
|
828
|
+
// @ts-ignore
|
|
829
|
+
const __VLS_75 = __VLS_asFunctionalComponent(McTitle, new McTitle({ tagName: ("div"), variation: ((__VLS_ctx.TitleVariations.Overline)), }));
|
|
830
|
+
const __VLS_76 = __VLS_75({ tagName: ("div"), variation: ((__VLS_ctx.TitleVariations.Overline)), }, ...__VLS_functionalComponentArgsRest(__VLS_75));
|
|
831
|
+
(props.helpText);
|
|
832
|
+
__VLS_nonNullable(__VLS_79.slots).default;
|
|
833
|
+
var __VLS_79;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
__VLS_styleScopedClasses['mc-date-picker'];
|
|
837
|
+
__VLS_styleScopedClasses['mc-date-picker__header'];
|
|
838
|
+
__VLS_styleScopedClasses['mc-date-picker__inner'];
|
|
839
|
+
__VLS_styleScopedClasses['mc-date-picker__input-wrapper'];
|
|
840
|
+
__VLS_styleScopedClasses['mc-date-picker__date-picker'];
|
|
841
|
+
__VLS_styleScopedClasses['mc-datepicker__footer-popup'];
|
|
842
|
+
__VLS_styleScopedClasses['mc-datepicker__footer-popup-periods'];
|
|
843
|
+
__VLS_styleScopedClasses['mc-date-picker__icon'];
|
|
844
|
+
__VLS_styleScopedClasses['mc-date-picker__footer'];
|
|
845
|
+
var __VLS_slots;
|
|
846
|
+
var __VLS_inheritedAttrs;
|
|
847
|
+
const __VLS_refs = {
|
|
848
|
+
"field": __VLS_nativeElements['div'],
|
|
849
|
+
"input": __VLS_12,
|
|
850
|
+
};
|
|
851
|
+
var $refs;
|
|
852
|
+
var $el;
|
|
853
|
+
return {
|
|
854
|
+
attrs: {},
|
|
855
|
+
slots: __VLS_slots,
|
|
856
|
+
refs: $refs,
|
|
857
|
+
rootEl: $el,
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
;
|
|
861
|
+
const __VLS_self = (await import('vue')).defineComponent({
|
|
862
|
+
setup() {
|
|
863
|
+
return {
|
|
864
|
+
DatePicker: DatePicker,
|
|
865
|
+
McTitle: McTitle,
|
|
866
|
+
McSvgIcon: McSvgIcon,
|
|
867
|
+
McButton: McButton,
|
|
868
|
+
ButtonSize: ButtonSize,
|
|
869
|
+
TitleVariations: TitleVariations,
|
|
870
|
+
Weights: Weights,
|
|
871
|
+
attrs: attrs,
|
|
872
|
+
fieldErrors: fieldErrors,
|
|
873
|
+
input: input,
|
|
874
|
+
classes: classes,
|
|
875
|
+
dateFormat: dateFormat,
|
|
876
|
+
isTimePicker: isTimePicker,
|
|
877
|
+
isDateTimePicker: isDateTimePicker,
|
|
878
|
+
pickerType: pickerType,
|
|
879
|
+
isAutoApply: isAutoApply,
|
|
880
|
+
weekNumbers: weekNumbers,
|
|
881
|
+
modelType: modelType,
|
|
882
|
+
hoursOptions: hoursOptions,
|
|
883
|
+
minutesOptions: minutesOptions,
|
|
884
|
+
secondsOptions: secondsOptions,
|
|
885
|
+
isFooterVisible: isFooterVisible,
|
|
886
|
+
localValue: localValue,
|
|
887
|
+
handlerPreselectRange: handlerPreselectRange,
|
|
888
|
+
selectPeriod: selectPeriod,
|
|
889
|
+
handlePickDate: handlePickDate,
|
|
890
|
+
handleSubmit: handleSubmit,
|
|
891
|
+
};
|
|
892
|
+
},
|
|
893
|
+
emits: {},
|
|
894
|
+
props: {
|
|
895
|
+
//@ts-ignore
|
|
896
|
+
modelValue: {
|
|
897
|
+
type: [String, Array]
|
|
898
|
+
},
|
|
899
|
+
/**
|
|
900
|
+
* Тип датапикера
|
|
901
|
+
*/
|
|
902
|
+
type: {
|
|
903
|
+
type: String,
|
|
904
|
+
default: DatepickerTypes.DatePicker
|
|
905
|
+
},
|
|
906
|
+
/**
|
|
907
|
+
* Заголовок поля:
|
|
908
|
+
*/
|
|
909
|
+
title: {
|
|
910
|
+
type: String,
|
|
911
|
+
default: ''
|
|
912
|
+
},
|
|
913
|
+
/**
|
|
914
|
+
* Вспомогательный текст под инпутом:
|
|
915
|
+
*/
|
|
916
|
+
helpText: {
|
|
917
|
+
type: String,
|
|
918
|
+
default: ''
|
|
919
|
+
},
|
|
920
|
+
/**
|
|
921
|
+
* Редактируемый инпут
|
|
922
|
+
*/
|
|
923
|
+
editable: {
|
|
924
|
+
type: Boolean,
|
|
925
|
+
default: false
|
|
926
|
+
},
|
|
927
|
+
disabled: {
|
|
928
|
+
type: Boolean,
|
|
929
|
+
default: false
|
|
930
|
+
},
|
|
931
|
+
placeholder: {
|
|
932
|
+
type: String,
|
|
933
|
+
default: null
|
|
934
|
+
},
|
|
935
|
+
/**
|
|
936
|
+
* Name
|
|
937
|
+
*/
|
|
938
|
+
name: {
|
|
939
|
+
type: String,
|
|
940
|
+
required: true
|
|
941
|
+
},
|
|
942
|
+
/**
|
|
943
|
+
* Локаль The locale code (ISO 639-1 + optional country code)
|
|
944
|
+
*/
|
|
945
|
+
lang: {
|
|
946
|
+
type: String,
|
|
947
|
+
default: 'en'
|
|
948
|
+
},
|
|
949
|
+
/**
|
|
950
|
+
* Ошибки
|
|
951
|
+
*/
|
|
952
|
+
errors: {
|
|
953
|
+
type: Array,
|
|
954
|
+
default: () => []
|
|
955
|
+
},
|
|
956
|
+
/**
|
|
957
|
+
* Отдаваемая дата будет в формате ISO String
|
|
958
|
+
*/
|
|
959
|
+
toIsoFormat: {
|
|
960
|
+
type: Boolean,
|
|
961
|
+
default: false
|
|
962
|
+
},
|
|
963
|
+
/**
|
|
964
|
+
* Формат отдаваемой даты
|
|
965
|
+
*/
|
|
966
|
+
placeholders: {
|
|
967
|
+
type: Object,
|
|
968
|
+
default: () => ({
|
|
969
|
+
week: 'Week',
|
|
970
|
+
month: 'Month',
|
|
971
|
+
quarter: 'Quarter',
|
|
972
|
+
year: 'Year',
|
|
973
|
+
confirm: 'Confirm'
|
|
974
|
+
})
|
|
975
|
+
},
|
|
976
|
+
/**
|
|
977
|
+
* Пресеты для быстрых периодов
|
|
978
|
+
**/
|
|
979
|
+
customPresets: {
|
|
980
|
+
type: Array,
|
|
981
|
+
default: () => []
|
|
982
|
+
},
|
|
983
|
+
range: {
|
|
984
|
+
type: Boolean,
|
|
985
|
+
default: false
|
|
986
|
+
},
|
|
987
|
+
/**
|
|
988
|
+
* Если значение true, то датапикер отображается в открытом виде
|
|
989
|
+
*/
|
|
990
|
+
inline: {
|
|
991
|
+
type: Boolean,
|
|
992
|
+
default: false
|
|
993
|
+
},
|
|
994
|
+
/**
|
|
995
|
+
* Дата, до которой все будет задизэйблено
|
|
996
|
+
**/
|
|
997
|
+
minDate: {
|
|
998
|
+
type: [Date, String]
|
|
999
|
+
},
|
|
1000
|
+
/**
|
|
1001
|
+
* Дата, после которой все будет задизэйблено
|
|
1002
|
+
**/
|
|
1003
|
+
maxDate: {
|
|
1004
|
+
type: [String, Date]
|
|
1005
|
+
},
|
|
1006
|
+
/**
|
|
1007
|
+
* Массив дат запрещенных к выбору / Метод которые проверяет каждую дату
|
|
1008
|
+
**/
|
|
1009
|
+
disabledDates: {
|
|
1010
|
+
type: [Array, Function]
|
|
1011
|
+
},
|
|
1012
|
+
/**
|
|
1013
|
+
* Массив дат разрешенных к выбору / Метод которые проверяет каждую дату
|
|
1014
|
+
* **/
|
|
1015
|
+
allowedDates: {
|
|
1016
|
+
type: [Array, Function]
|
|
1017
|
+
},
|
|
1018
|
+
/**
|
|
1019
|
+
* Функция проверяющая и устанавливающая доступно ли время для выбора
|
|
1020
|
+
* Params [String] date - текущая дата
|
|
1021
|
+
* return Boolean, где true - время заблокировано для выбора
|
|
1022
|
+
* **/
|
|
1023
|
+
disabledTime: {
|
|
1024
|
+
type: [Array, Function]
|
|
1025
|
+
},
|
|
1026
|
+
minWidth: {
|
|
1027
|
+
type: String,
|
|
1028
|
+
default: '240px'
|
|
1029
|
+
},
|
|
1030
|
+
hours: {
|
|
1031
|
+
type: Array,
|
|
1032
|
+
default: () => []
|
|
1033
|
+
},
|
|
1034
|
+
minutes: {
|
|
1035
|
+
type: Array,
|
|
1036
|
+
default: () => []
|
|
1037
|
+
},
|
|
1038
|
+
seconds: {
|
|
1039
|
+
type: Array,
|
|
1040
|
+
default: () => []
|
|
1041
|
+
},
|
|
1042
|
+
timezone: {
|
|
1043
|
+
type: String,
|
|
1044
|
+
default: dayjs.tz.guess()
|
|
1045
|
+
},
|
|
1046
|
+
useTimezone: {
|
|
1047
|
+
type: Boolean,
|
|
1048
|
+
default: false
|
|
1049
|
+
},
|
|
1050
|
+
/**
|
|
1051
|
+
* Показывать ли крестик очищения поля
|
|
1052
|
+
* */
|
|
1053
|
+
clearable: {
|
|
1054
|
+
type: Boolean,
|
|
1055
|
+
default: true
|
|
1056
|
+
},
|
|
1057
|
+
loading: {
|
|
1058
|
+
type: Boolean,
|
|
1059
|
+
default: false
|
|
1060
|
+
},
|
|
1061
|
+
setDefaultToday: {
|
|
1062
|
+
type: Boolean,
|
|
1063
|
+
default: true
|
|
1064
|
+
},
|
|
1065
|
+
markers: {
|
|
1066
|
+
type: Array,
|
|
1067
|
+
default: () => []
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
});
|
|
1071
|
+
const __VLS_component = (await import('vue')).defineComponent({
|
|
1072
|
+
setup() {
|
|
1073
|
+
return {};
|
|
1074
|
+
},
|
|
1075
|
+
emits: {},
|
|
1076
|
+
props: {
|
|
1077
|
+
//@ts-ignore
|
|
1078
|
+
modelValue: {
|
|
1079
|
+
type: [String, Array]
|
|
1080
|
+
},
|
|
1081
|
+
/**
|
|
1082
|
+
* Тип датапикера
|
|
1083
|
+
*/
|
|
1084
|
+
type: {
|
|
1085
|
+
type: String,
|
|
1086
|
+
default: DatepickerTypes.DatePicker
|
|
1087
|
+
},
|
|
1088
|
+
/**
|
|
1089
|
+
* Заголовок поля:
|
|
1090
|
+
*/
|
|
1091
|
+
title: {
|
|
1092
|
+
type: String,
|
|
1093
|
+
default: ''
|
|
1094
|
+
},
|
|
1095
|
+
/**
|
|
1096
|
+
* Вспомогательный текст под инпутом:
|
|
1097
|
+
*/
|
|
1098
|
+
helpText: {
|
|
1099
|
+
type: String,
|
|
1100
|
+
default: ''
|
|
1101
|
+
},
|
|
1102
|
+
/**
|
|
1103
|
+
* Редактируемый инпут
|
|
1104
|
+
*/
|
|
1105
|
+
editable: {
|
|
1106
|
+
type: Boolean,
|
|
1107
|
+
default: false
|
|
1108
|
+
},
|
|
1109
|
+
disabled: {
|
|
1110
|
+
type: Boolean,
|
|
1111
|
+
default: false
|
|
1112
|
+
},
|
|
1113
|
+
placeholder: {
|
|
1114
|
+
type: String,
|
|
1115
|
+
default: null
|
|
1116
|
+
},
|
|
1117
|
+
/**
|
|
1118
|
+
* Name
|
|
1119
|
+
*/
|
|
1120
|
+
name: {
|
|
1121
|
+
type: String,
|
|
1122
|
+
required: true
|
|
1123
|
+
},
|
|
1124
|
+
/**
|
|
1125
|
+
* Локаль The locale code (ISO 639-1 + optional country code)
|
|
1126
|
+
*/
|
|
1127
|
+
lang: {
|
|
1128
|
+
type: String,
|
|
1129
|
+
default: 'en'
|
|
1130
|
+
},
|
|
1131
|
+
/**
|
|
1132
|
+
* Ошибки
|
|
1133
|
+
*/
|
|
1134
|
+
errors: {
|
|
1135
|
+
type: Array,
|
|
1136
|
+
default: () => []
|
|
1137
|
+
},
|
|
1138
|
+
/**
|
|
1139
|
+
* Отдаваемая дата будет в формате ISO String
|
|
1140
|
+
*/
|
|
1141
|
+
toIsoFormat: {
|
|
1142
|
+
type: Boolean,
|
|
1143
|
+
default: false
|
|
1144
|
+
},
|
|
1145
|
+
/**
|
|
1146
|
+
* Формат отдаваемой даты
|
|
1147
|
+
*/
|
|
1148
|
+
placeholders: {
|
|
1149
|
+
type: Object,
|
|
1150
|
+
default: () => ({
|
|
1151
|
+
week: 'Week',
|
|
1152
|
+
month: 'Month',
|
|
1153
|
+
quarter: 'Quarter',
|
|
1154
|
+
year: 'Year',
|
|
1155
|
+
confirm: 'Confirm'
|
|
1156
|
+
})
|
|
1157
|
+
},
|
|
1158
|
+
/**
|
|
1159
|
+
* Пресеты для быстрых периодов
|
|
1160
|
+
**/
|
|
1161
|
+
customPresets: {
|
|
1162
|
+
type: Array,
|
|
1163
|
+
default: () => []
|
|
1164
|
+
},
|
|
1165
|
+
range: {
|
|
1166
|
+
type: Boolean,
|
|
1167
|
+
default: false
|
|
1168
|
+
},
|
|
1169
|
+
/**
|
|
1170
|
+
* Если значение true, то датапикер отображается в открытом виде
|
|
1171
|
+
*/
|
|
1172
|
+
inline: {
|
|
1173
|
+
type: Boolean,
|
|
1174
|
+
default: false
|
|
1175
|
+
},
|
|
1176
|
+
/**
|
|
1177
|
+
* Дата, до которой все будет задизэйблено
|
|
1178
|
+
**/
|
|
1179
|
+
minDate: {
|
|
1180
|
+
type: [Date, String]
|
|
1181
|
+
},
|
|
1182
|
+
/**
|
|
1183
|
+
* Дата, после которой все будет задизэйблено
|
|
1184
|
+
**/
|
|
1185
|
+
maxDate: {
|
|
1186
|
+
type: [String, Date]
|
|
1187
|
+
},
|
|
1188
|
+
/**
|
|
1189
|
+
* Массив дат запрещенных к выбору / Метод которые проверяет каждую дату
|
|
1190
|
+
**/
|
|
1191
|
+
disabledDates: {
|
|
1192
|
+
type: [Array, Function]
|
|
1193
|
+
},
|
|
1194
|
+
/**
|
|
1195
|
+
* Массив дат разрешенных к выбору / Метод которые проверяет каждую дату
|
|
1196
|
+
* **/
|
|
1197
|
+
allowedDates: {
|
|
1198
|
+
type: [Array, Function]
|
|
1199
|
+
},
|
|
1200
|
+
/**
|
|
1201
|
+
* Функция проверяющая и устанавливающая доступно ли время для выбора
|
|
1202
|
+
* Params [String] date - текущая дата
|
|
1203
|
+
* return Boolean, где true - время заблокировано для выбора
|
|
1204
|
+
* **/
|
|
1205
|
+
disabledTime: {
|
|
1206
|
+
type: [Array, Function]
|
|
1207
|
+
},
|
|
1208
|
+
minWidth: {
|
|
1209
|
+
type: String,
|
|
1210
|
+
default: '240px'
|
|
1211
|
+
},
|
|
1212
|
+
hours: {
|
|
1213
|
+
type: Array,
|
|
1214
|
+
default: () => []
|
|
1215
|
+
},
|
|
1216
|
+
minutes: {
|
|
1217
|
+
type: Array,
|
|
1218
|
+
default: () => []
|
|
1219
|
+
},
|
|
1220
|
+
seconds: {
|
|
1221
|
+
type: Array,
|
|
1222
|
+
default: () => []
|
|
1223
|
+
},
|
|
1224
|
+
timezone: {
|
|
1225
|
+
type: String,
|
|
1226
|
+
default: dayjs.tz.guess()
|
|
1227
|
+
},
|
|
1228
|
+
useTimezone: {
|
|
1229
|
+
type: Boolean,
|
|
1230
|
+
default: false
|
|
1231
|
+
},
|
|
1232
|
+
/**
|
|
1233
|
+
* Показывать ли крестик очищения поля
|
|
1234
|
+
* */
|
|
1235
|
+
clearable: {
|
|
1236
|
+
type: Boolean,
|
|
1237
|
+
default: true
|
|
1238
|
+
},
|
|
1239
|
+
loading: {
|
|
1240
|
+
type: Boolean,
|
|
1241
|
+
default: false
|
|
1242
|
+
},
|
|
1243
|
+
setDefaultToday: {
|
|
1244
|
+
type: Boolean,
|
|
1245
|
+
default: true
|
|
1246
|
+
},
|
|
1247
|
+
markers: {
|
|
1248
|
+
type: Array,
|
|
1249
|
+
default: () => []
|
|
1250
|
+
}
|
|
1251
|
+
},
|
|
1252
|
+
__typeEl: {},
|
|
1253
|
+
});
|
|
1254
|
+
export default {};
|
|
1255
|
+
; /* PartiallyEnd: #4569/main.vue */
|