@dxtmisha/constructor 0.39.7 → 0.52.1
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/ai-types.txt +4901 -284
- package/dist/ActionsInclude-BzyGXlK7.js +23 -0
- package/dist/AriaStaticInclude-CS1hPGyK.js +89 -0
- package/dist/ArrowInclude-BM_RP5vO.js +14 -0
- package/dist/BadgeInclude-DISlNqBJ.js +17 -0
- package/dist/BarsInclude-rBLacb0J.js +35 -0
- package/dist/BlockDesign-DkbPo-Ey.js +106 -0
- package/dist/ButtonDesign-DTihOCBe.js +87 -0
- package/dist/ButtonInclude-Bq7DNI-R.js +23 -0
- package/dist/CaptionInclude-CunHUsec.js +41 -0
- package/dist/DescriptionInclude-B_Xf_j3l.js +36 -0
- package/dist/EnabledInclude-CkD_lxMY.js +11 -0
- package/dist/EventClickInclude-6I8kuFc9.js +63 -0
- package/dist/FieldCounterInclude-l1o0Bm7V.js +22 -0
- package/dist/FieldEventInclude-DLX__9aJ.js +257 -0
- package/dist/FieldInclude-DCvNorOt.js +87 -0
- package/dist/FieldInputCheckInclude-czZ02ymY.js +170 -0
- package/dist/FieldLabelInclude-BA5H3kib.js +27 -0
- package/dist/FieldMatchInclude-CA716pa4.js +100 -0
- package/dist/FieldMessageInclude-6cxMqgIx.js +27 -0
- package/dist/HorizontalScrollInclude-BN6p9jjq.js +30 -0
- package/dist/IconInclude-BhzGfa3o.js +44 -0
- package/dist/IconTrailingInclude-BwoB_AQn.js +23 -0
- package/dist/ImageInclude-CP-Q4R20.js +18 -0
- package/dist/LabelHighlightInclude-DC9qNAR-.js +30 -0
- package/dist/LabelInclude-DoZ7EUYO.js +56 -0
- package/dist/LabelNumberInclude-VVGMvwYq.js +15 -0
- package/dist/ListGroupOpen-C6J8d4SM.js +12 -0
- package/dist/MaskInclude-DuE6XcDZ.js +48 -0
- package/dist/MenuInclude-BT27rmFW.js +48 -0
- package/dist/ModalDesignAbstract-BaVdtb1N.js +63 -0
- package/dist/ModelInclude-D8LkrhPp.js +32 -0
- package/dist/ModelValueInclude-CQDkIoal.js +20 -0
- package/dist/MotionAxisInclude-DO4t3_lZ.js +18 -0
- package/dist/MotionTransformClassesInclude-BN-T4YKS.js +91 -0
- package/dist/MotionTransformInclude-CFVVig1F.js +52 -0
- package/dist/Plugin-cWn0HZcf.js +205 -0
- package/dist/ProgressInclude-BnPBYwJg.js +15 -0
- package/dist/RippleInclude-BlC1h0Ya.js +10 -0
- package/dist/ScrollToXInclude-yt1sAUrP.js +15 -0
- package/dist/ScrollbarInclude-B4_ZIqkW.js +55 -0
- package/dist/SkeletonInclude-D8on8xmw.js +39 -0
- package/dist/SuffixInclude-VNq8SwAI.js +67 -0
- package/dist/TabIndexInclude-DLSfl7-6.js +88 -0
- package/dist/TabsNavigationInclude-DU9Nb7hG.js +17 -0
- package/dist/TextInclude-OwyVCAbS.js +90 -0
- package/dist/TooltipInclude-3iLdbNcH.js +27 -0
- package/dist/TouchEventInclude-By_ChOIe.js +84 -0
- package/dist/WindowClassesInclude-zm-ITw5d.js +89 -0
- package/dist/WindowEsc-vBFI8pVr.js +28 -0
- package/dist/WindowInclude-GF4aSfrJ.js +66 -0
- package/dist/accordion.js +76 -193
- package/dist/actionSheet.js +61 -137
- package/dist/actions.js +59 -192
- package/dist/anchor.js +134 -360
- package/dist/arrow.js +279 -664
- package/dist/badge.js +47 -140
- package/dist/bars.js +120 -365
- package/dist/block.js +2 -10
- package/dist/button.js +3 -62
- package/dist/cell.js +117 -281
- package/dist/checkbox.js +112 -0
- package/dist/chip.js +24 -81
- package/dist/chipGroup.js +48 -163
- package/dist/classes/CaptionInclude.d.ts +4 -4
- package/dist/classes/EventClickInclude.d.ts +17 -1
- package/dist/classes/Field/FieldAttributesInclude.d.ts +2 -0
- package/dist/classes/Field/FieldEventInclude.d.ts +6 -6
- package/dist/classes/Plugin/PluginCode.d.ts +0 -8
- package/dist/classes/ScrollToXInclude.d.ts +35 -0
- package/dist/constructors/Accordion/Accordion.d.ts +9 -1
- package/dist/constructors/Accordion/props.d.ts +6 -6
- package/dist/constructors/Accordion/types.d.ts +3 -4
- package/dist/constructors/ActionSheet/ActionSheet.d.ts +19 -2
- package/dist/constructors/ActionSheet/props.d.ts +2 -0
- package/dist/constructors/Actions/Actions.d.ts +5 -2
- package/dist/constructors/Actions/basicTypes.d.ts +3 -0
- package/dist/constructors/Actions/props.d.ts +4 -0
- package/dist/constructors/Actions/types.d.ts +2 -0
- package/dist/constructors/Anchor/Anchor.d.ts +17 -8
- package/dist/constructors/Anchor/basicTypes.d.ts +4 -0
- package/dist/constructors/Anchor/index.d.ts +4 -0
- package/dist/constructors/Anchor/props.d.ts +10 -0
- package/dist/constructors/Anchor/types.d.ts +1 -0
- package/dist/constructors/Arrow/Arrow.d.ts +13 -6
- package/dist/constructors/Arrow/basicTypes.d.ts +9 -0
- package/dist/constructors/Arrow/index.d.ts +5 -0
- package/dist/constructors/Arrow/props.d.ts +3 -0
- package/dist/constructors/Arrow/types.d.ts +1 -0
- package/dist/constructors/Badge/Badge.d.ts +7 -3
- package/dist/constructors/Badge/basicTypes.d.ts +11 -0
- package/dist/constructors/Badge/index.d.ts +1 -0
- package/dist/constructors/Badge/props.d.ts +1 -0
- package/dist/constructors/Bars/Bars.d.ts +21 -10
- package/dist/constructors/Bars/basicTypes.d.ts +4 -0
- package/dist/constructors/Bars/index.d.ts +1 -0
- package/dist/constructors/Bars/props.d.ts +14 -0
- package/dist/constructors/Bars/types.d.ts +4 -0
- package/dist/constructors/Block/Block.d.ts +11 -5
- package/dist/constructors/Block/props.d.ts +3 -0
- package/dist/constructors/Button/Button.d.ts +17 -8
- package/dist/constructors/Button/ButtonInclude.d.ts +6 -4
- package/dist/constructors/Button/basicTypes.d.ts +17 -0
- package/dist/constructors/Button/props.d.ts +2 -0
- package/dist/constructors/Button/types.d.ts +2 -2
- package/dist/constructors/Cell/Cell.d.ts +21 -10
- package/dist/constructors/Cell/CellDesign.d.ts +7 -5
- package/dist/constructors/Cell/basicTypes.d.ts +3 -1
- package/dist/constructors/Cell/props.d.ts +4 -0
- package/dist/constructors/Cell/types.d.ts +4 -2
- package/dist/constructors/Checkbox/Checkbox.d.ts +90 -0
- package/dist/constructors/Checkbox/CheckboxDesign.d.ts +73 -0
- package/dist/constructors/Checkbox/CheckboxIcon.d.ts +33 -0
- package/dist/constructors/Checkbox/basicTypes.d.ts +1 -0
- package/dist/constructors/Checkbox/index.d.ts +6 -0
- package/dist/constructors/Checkbox/props.d.ts +44 -0
- package/dist/constructors/Checkbox/types.d.ts +49 -0
- package/dist/constructors/Chip/basicTypes.d.ts +10 -0
- package/dist/constructors/ChipGroup/ChipGroup.d.ts +9 -4
- package/dist/constructors/ChipGroup/basicTypes.d.ts +3 -0
- package/dist/constructors/ChipGroup/props.d.ts +10 -0
- package/dist/constructors/ChipGroup/types.d.ts +1 -0
- package/dist/constructors/Dialog/Dialog.d.ts +31 -3
- package/dist/constructors/Dialog/props.d.ts +11 -0
- package/dist/constructors/Dialog/types.d.ts +2 -0
- package/dist/constructors/Dummy/Dummy.d.ts +29 -0
- package/dist/constructors/Dummy/DummyDesign.d.ts +43 -0
- package/dist/constructors/Dummy/basicTypes.d.ts +1 -0
- package/dist/constructors/Dummy/index.d.ts +5 -0
- package/dist/constructors/Dummy/props.d.ts +15 -0
- package/dist/constructors/Dummy/types.d.ts +37 -0
- package/dist/constructors/Field/Field.d.ts +29 -14
- package/dist/constructors/Field/FieldSize.d.ts +2 -1
- package/dist/constructors/Field/basicTypes.d.ts +15 -2
- package/dist/constructors/Field/index.d.ts +3 -0
- package/dist/constructors/Field/props.d.ts +12 -0
- package/dist/constructors/Field/types.d.ts +3 -0
- package/dist/constructors/FieldCounter/FieldCounter.d.ts +5 -2
- package/dist/constructors/FieldCounter/basicTypes.d.ts +8 -1
- package/dist/constructors/FieldCounter/props.d.ts +6 -0
- package/dist/constructors/FieldLabel/FieldLabel.d.ts +11 -5
- package/dist/constructors/FieldLabel/basicTypes.d.ts +4 -1
- package/dist/constructors/FieldLabel/props.d.ts +4 -0
- package/dist/constructors/FieldMessage/FieldMessage.d.ts +9 -4
- package/dist/constructors/FieldMessage/basicTypes.d.ts +12 -1
- package/dist/constructors/FieldMessage/index.d.ts +1 -0
- package/dist/constructors/FieldMessage/props.d.ts +9 -0
- package/dist/constructors/Grid/Grid.d.ts +29 -0
- package/dist/constructors/Grid/GridDesign.d.ts +43 -0
- package/dist/constructors/Grid/basicTypes.d.ts +1 -0
- package/dist/constructors/Grid/index.d.ts +5 -0
- package/dist/constructors/Grid/props.d.ts +15 -0
- package/dist/constructors/Grid/types.d.ts +37 -0
- package/dist/constructors/GridItem/GridItem.d.ts +29 -0
- package/dist/constructors/GridItem/GridItemDesign.d.ts +43 -0
- package/dist/constructors/GridItem/basicTypes.d.ts +1 -0
- package/dist/constructors/GridItem/index.d.ts +5 -0
- package/dist/constructors/GridItem/props.d.ts +19 -0
- package/dist/constructors/GridItem/types.d.ts +37 -0
- package/dist/constructors/Group/Group.d.ts +6 -0
- package/dist/constructors/Group/GroupDesign.d.ts +18 -0
- package/dist/constructors/Group/basicTypes.d.ts +1 -0
- package/dist/constructors/Group/index.d.ts +5 -0
- package/dist/constructors/Group/props.d.ts +20 -0
- package/dist/constructors/Group/types.d.ts +44 -0
- package/dist/constructors/HorizontalScroll/HorizontalScroll.d.ts +67 -0
- package/dist/constructors/HorizontalScroll/HorizontalScrollDesign.d.ts +43 -0
- package/dist/constructors/HorizontalScroll/HorizontalScrollInclude.d.ts +67 -0
- package/dist/constructors/HorizontalScroll/basicTypes.d.ts +40 -0
- package/dist/constructors/HorizontalScroll/index.d.ts +6 -0
- package/dist/constructors/HorizontalScroll/props.d.ts +29 -0
- package/dist/constructors/HorizontalScroll/types.d.ts +39 -0
- package/dist/constructors/Icon/Icon.d.ts +7 -3
- package/dist/constructors/Icon/basicTypes.d.ts +33 -0
- package/dist/constructors/Icon/index.d.ts +1 -1
- package/dist/constructors/Icon/props.d.ts +5 -0
- package/dist/constructors/Icon/types.d.ts +4 -2
- package/dist/constructors/Image/Image.d.ts +21 -12
- package/dist/constructors/Image/ImageInclude.d.ts +3 -3
- package/dist/constructors/Image/ImageUint8Array.d.ts +47 -0
- package/dist/constructors/Image/basicTypes.d.ts +56 -7
- package/dist/constructors/Image/index.d.ts +15 -1
- package/dist/constructors/Image/types.d.ts +3 -0
- package/dist/constructors/Input/Input.d.ts +37 -18
- package/dist/constructors/Input/basicTypes.d.ts +5 -0
- package/dist/constructors/Input/index.d.ts +1 -0
- package/dist/constructors/List/List.d.ts +21 -12
- package/dist/constructors/List/ListControl.d.ts +12 -0
- package/dist/constructors/List/basicTypes.d.ts +5 -0
- package/dist/constructors/List/index.d.ts +4 -0
- package/dist/constructors/List/props.d.ts +31 -0
- package/dist/constructors/List/types.d.ts +5 -0
- package/dist/constructors/ListGroup/ListGroup.d.ts +5 -2
- package/dist/constructors/ListGroup/basicTypes.d.ts +4 -0
- package/dist/constructors/ListGroup/index.d.ts +1 -0
- package/dist/constructors/ListGroup/props.d.ts +1 -0
- package/dist/constructors/ListGroup/types.d.ts +3 -0
- package/dist/constructors/ListItem/ListItem.d.ts +34 -18
- package/dist/constructors/ListItem/basicTypes.d.ts +5 -0
- package/dist/constructors/ListItem/props.d.ts +13 -0
- package/dist/constructors/ListItem/types.d.ts +5 -2
- package/dist/constructors/ListMenu/ListMenu.d.ts +7 -3
- package/dist/constructors/ListMenu/basicTypes.d.ts +5 -0
- package/dist/constructors/ListMenu/props.d.ts +3 -1
- package/dist/constructors/ListMenu/types.d.ts +2 -0
- package/dist/constructors/Mask/Mask.d.ts +49 -24
- package/dist/constructors/Mask/basicTypes.d.ts +43 -0
- package/dist/constructors/Mask/index.d.ts +24 -0
- package/dist/constructors/Mask/props.d.ts +19 -0
- package/dist/constructors/Mask/types.d.ts +15 -0
- package/dist/constructors/Menu/Menu.d.ts +21 -10
- package/dist/constructors/Menu/MenuInclude.d.ts +1 -0
- package/dist/constructors/Menu/basicTypes.d.ts +15 -0
- package/dist/constructors/Menu/index.d.ts +5 -0
- package/dist/constructors/Menu/props.d.ts +26 -0
- package/dist/constructors/Menu/types.d.ts +2 -0
- package/dist/constructors/Modal/Modal.d.ts +15 -1
- package/dist/constructors/Modal/ModalAbstract.d.ts +9 -1
- package/dist/constructors/Modal/index.d.ts +2 -0
- package/dist/constructors/Modal/props.d.ts +2 -0
- package/dist/constructors/Modal/types.d.ts +1 -0
- package/dist/constructors/MotionAxis/MotionAxis.d.ts +75 -0
- package/dist/constructors/MotionAxis/MotionAxisDesign.d.ts +49 -0
- package/dist/constructors/MotionAxis/MotionAxisElement.d.ts +132 -0
- package/dist/constructors/MotionAxis/MotionAxisGo.d.ts +103 -0
- package/dist/constructors/MotionAxis/MotionAxisInclude.d.ts +49 -0
- package/dist/constructors/MotionAxis/MotionAxisPrevious.d.ts +42 -0
- package/dist/constructors/MotionAxis/MotionAxisSelected.d.ts +31 -0
- package/dist/constructors/MotionAxis/MotionAxisSlides.d.ts +19 -0
- package/dist/constructors/MotionAxis/MotionAxisStatus.d.ts +88 -0
- package/dist/constructors/MotionAxis/MotionAxisStyles.d.ts +38 -0
- package/dist/constructors/MotionAxis/basicTypes.d.ts +42 -0
- package/dist/constructors/MotionAxis/index.d.ts +13 -0
- package/dist/constructors/MotionAxis/props.d.ts +35 -0
- package/dist/constructors/MotionAxis/types.d.ts +64 -0
- package/dist/constructors/MotionTransform/MotionTransform.d.ts +19 -9
- package/dist/constructors/MotionTransform/MotionTransformDesign.d.ts +3 -3
- package/dist/constructors/MotionTransform/basicTypes.d.ts +1 -0
- package/dist/constructors/MotionTransform/index.d.ts +6 -1
- package/dist/constructors/MotionTransform/props.d.ts +18 -12
- package/dist/constructors/MotionTransform/types.d.ts +7 -5
- package/dist/constructors/Progress/Progress.d.ts +5 -1
- package/dist/constructors/Progress/basicTypes.d.ts +4 -0
- package/dist/constructors/Progress/props.d.ts +11 -0
- package/dist/constructors/Ripple/Ripple.d.ts +5 -1
- package/dist/constructors/Ripple/RippleInclude.d.ts +3 -3
- package/dist/constructors/Ripple/basicTypes.d.ts +6 -1
- package/dist/constructors/Ripple/index.d.ts +1 -0
- package/dist/constructors/Ripple/props.d.ts +1 -0
- package/dist/constructors/Scrollbar/Scrollbar.d.ts +7 -3
- package/dist/constructors/Scrollbar/ScrollbarInclude.d.ts +3 -3
- package/dist/constructors/Scrollbar/basicTypes.d.ts +10 -1
- package/dist/constructors/Scrollbar/index.d.ts +2 -0
- package/dist/constructors/Scrollbar/props.d.ts +2 -0
- package/dist/constructors/Scrollbar/types.d.ts +8 -0
- package/dist/constructors/Select/Select.d.ts +25 -12
- package/dist/constructors/Select/index.d.ts +2 -0
- package/dist/constructors/Select/props.d.ts +9 -0
- package/dist/constructors/SelectValue/SelectValue.d.ts +9 -4
- package/dist/constructors/SelectValue/basicTypes.d.ts +3 -0
- package/dist/constructors/SelectValue/props.d.ts +8 -0
- package/dist/constructors/Skeleton/basicTypes.d.ts +13 -0
- package/dist/constructors/Skeleton/index.d.ts +2 -1
- package/dist/constructors/Skeleton/types.d.ts +2 -0
- package/dist/constructors/Snackbar/Snackbar.d.ts +47 -0
- package/dist/constructors/Snackbar/SnackbarData.d.ts +104 -0
- package/dist/constructors/Snackbar/SnackbarDesign.d.ts +63 -0
- package/dist/constructors/Snackbar/SnackbarEvent.d.ts +32 -0
- package/dist/constructors/Snackbar/basicTypes.d.ts +17 -0
- package/dist/constructors/Snackbar/index.d.ts +7 -0
- package/dist/constructors/Snackbar/props.d.ts +27 -0
- package/dist/constructors/Snackbar/types.d.ts +54 -0
- package/dist/constructors/SnackbarItem/SnackbarItem.d.ts +72 -0
- package/dist/constructors/SnackbarItem/SnackbarItemDesign.d.ts +67 -0
- package/dist/constructors/SnackbarItem/basicTypes.d.ts +28 -0
- package/dist/constructors/SnackbarItem/index.d.ts +5 -0
- package/dist/constructors/SnackbarItem/props.d.ts +43 -0
- package/dist/constructors/SnackbarItem/types.d.ts +56 -0
- package/dist/constructors/TabItem/TabItem.d.ts +120 -0
- package/dist/constructors/TabItem/TabItemDesign.d.ts +43 -0
- package/dist/constructors/TabItem/basicTypes.d.ts +8 -0
- package/dist/constructors/TabItem/index.d.ts +5 -0
- package/dist/constructors/TabItem/props.d.ts +40 -0
- package/dist/constructors/TabItem/types.d.ts +44 -0
- package/dist/constructors/Tabs/Tabs.d.ts +50 -0
- package/dist/constructors/Tabs/TabsDesign.d.ts +49 -0
- package/dist/constructors/Tabs/TabsSelected.d.ts +39 -0
- package/dist/constructors/Tabs/basicTypes.d.ts +1 -0
- package/dist/constructors/Tabs/index.d.ts +6 -0
- package/dist/constructors/Tabs/props.d.ts +20 -0
- package/dist/constructors/Tabs/types.d.ts +39 -0
- package/dist/constructors/TabsNavigation/TabsNavigation.d.ts +141 -0
- package/dist/constructors/TabsNavigation/TabsNavigationControl.d.ts +85 -0
- package/dist/constructors/TabsNavigation/TabsNavigationDesign.d.ts +60 -0
- package/dist/constructors/TabsNavigation/TabsNavigationFocus.d.ts +61 -0
- package/dist/constructors/TabsNavigation/TabsNavigationIds.d.ts +32 -0
- package/dist/constructors/TabsNavigation/TabsNavigationInclude.d.ts +43 -0
- package/dist/constructors/TabsNavigation/TabsNavigationIndicator.d.ts +55 -0
- package/dist/constructors/TabsNavigation/TabsNavigationSelected.d.ts +39 -0
- package/dist/constructors/TabsNavigation/basicTypes.d.ts +27 -0
- package/dist/constructors/TabsNavigation/index.d.ts +11 -0
- package/dist/constructors/TabsNavigation/props.d.ts +42 -0
- package/dist/constructors/TabsNavigation/types.d.ts +47 -0
- package/dist/constructors/Textarea/Textarea.d.ts +83 -0
- package/dist/constructors/Textarea/TextareaDesign.d.ts +51 -0
- package/dist/constructors/Textarea/basicTypes.d.ts +1 -0
- package/dist/constructors/Textarea/index.d.ts +5 -0
- package/dist/constructors/Textarea/props.d.ts +26 -0
- package/dist/constructors/Textarea/types.d.ts +38 -0
- package/dist/constructors/TextareaAutosize/TextareaAutosize.d.ts +7 -3
- package/dist/constructors/TextareaAutosize/basicTypes.d.ts +20 -1
- package/dist/constructors/TextareaAutosize/index.d.ts +2 -0
- package/dist/constructors/TextareaAutosize/props.d.ts +7 -2
- package/dist/constructors/TextareaAutosize/types.d.ts +2 -0
- package/dist/constructors/Tooltip/Tooltip.d.ts +27 -16
- package/dist/constructors/Tooltip/{TooltipClasses.d.ts → TooltipClassesData.d.ts} +1 -1
- package/dist/constructors/Tooltip/TooltipEvent.d.ts +4 -4
- package/dist/constructors/Tooltip/TooltipPosition.d.ts +3 -3
- package/dist/constructors/Tooltip/basicTypes.d.ts +15 -0
- package/dist/constructors/Tooltip/index.d.ts +6 -0
- package/dist/constructors/Tooltip/props.d.ts +9 -0
- package/dist/constructors/Tooltip/types.d.ts +4 -0
- package/dist/constructors/Window/Window.d.ts +53 -26
- package/dist/constructors/Window/{WindowClasses.d.ts → WindowClassesData.d.ts} +1 -1
- package/dist/constructors/Window/WindowCoordinates.d.ts +3 -3
- package/dist/constructors/Window/WindowElement.d.ts +3 -3
- package/dist/constructors/Window/WindowEmit.d.ts +3 -3
- package/dist/constructors/Window/WindowFlash.d.ts +3 -3
- package/dist/constructors/Window/WindowHidden.d.ts +3 -3
- package/dist/constructors/Window/WindowPersistent.d.ts +3 -3
- package/dist/constructors/Window/WindowVerification.d.ts +3 -3
- package/dist/constructors/Window/basicTypes.d.ts +10 -0
- package/dist/constructors/Window/index.d.ts +21 -3
- package/dist/constructors/Window/props.d.ts +53 -27
- package/dist/constructors/Window/types.d.ts +7 -7
- package/dist/defineProperty-hmGKPWdq.js +39 -0
- package/dist/dialog.js +89 -210
- package/dist/dummy.js +28 -0
- package/dist/field.js +220 -549
- package/dist/fieldCounter.js +77 -194
- package/dist/fieldLabel.js +63 -175
- package/dist/fieldMessage.js +82 -234
- package/dist/getClassTagAStatic-BPIEWyHY.js +4 -0
- package/dist/grid.js +31 -0
- package/dist/gridItem.js +31 -0
- package/dist/group.js +13 -0
- package/dist/horizontalScroll.js +57 -0
- package/dist/icon.js +82 -227
- package/dist/image.js +648 -1345
- package/dist/input.js +82 -363
- package/dist/library/checkbox.d.ts +1 -0
- package/dist/library/dummy.d.ts +1 -0
- package/dist/library/grid.d.ts +1 -0
- package/dist/library/gridItem.d.ts +1 -0
- package/dist/library/group.d.ts +1 -0
- package/dist/library/horizontalScroll.d.ts +1 -0
- package/dist/library/motionAxis.d.ts +1 -0
- package/dist/library/snackbar.d.ts +1 -0
- package/dist/library/snackbarItem.d.ts +1 -0
- package/dist/library/tabItem.d.ts +1 -0
- package/dist/library/tabs.d.ts +1 -0
- package/dist/library/tabsNavigation.d.ts +1 -0
- package/dist/library/textarea.d.ts +1 -0
- package/dist/library.d.ts +1 -0
- package/dist/library.js +21 -58
- package/dist/list.js +455 -1062
- package/dist/listGroup.js +61 -172
- package/dist/listItem.js +113 -318
- package/dist/listMenu.js +51 -123
- package/dist/mask.js +1015 -2488
- package/dist/menu.js +200 -537
- package/dist/modal.js +28 -72
- package/dist/motionAxis.js +319 -0
- package/dist/motionTransform.js +225 -633
- package/dist/page.js +11 -28
- package/dist/plugin.js +2 -4
- package/dist/progress.js +123 -302
- package/dist/ripple.js +55 -135
- package/dist/scrollbar.js +99 -237
- package/dist/section.js +11 -28
- package/dist/select.js +163 -423
- package/dist/selectValue.js +87 -247
- package/dist/skeleton.js +32 -80
- package/dist/snackbar.js +143 -0
- package/dist/snackbarItem.js +119 -0
- package/dist/tabItem.js +64 -0
- package/dist/tabs.js +69 -0
- package/dist/tabsNavigation.js +212 -0
- package/dist/textarea.js +58 -0
- package/dist/textareaAutosize.js +83 -237
- package/dist/tooltip.js +236 -667
- package/dist/types/ariaTypes.d.ts +45 -25
- package/dist/types/descriptionTypes.d.ts +3 -0
- package/dist/types/eventClickTypes.d.ts +2 -0
- package/dist/types/fieldTypes.d.ts +29 -20
- package/dist/types/modelTypes.d.ts +30 -0
- package/dist/types/pluginTypes.d.ts +5 -1
- package/dist/types/roleTypes.d.ts +1 -0
- package/dist/types/textTypes.d.ts +18 -0
- package/dist/window.js +769 -2037
- package/package.json +56 -2
- package/src/constructors/Accordion/properties.json +16 -0
- package/src/constructors/ActionSheet/properties.json +14 -0
- package/src/constructors/Actions/properties.json +66 -0
- package/src/constructors/Anchor/properties.json +3 -0
- package/src/constructors/Arrow/properties.json +23 -0
- package/src/constructors/Badge/properties.json +36 -0
- package/src/constructors/Bars/properties.json +5 -0
- package/src/constructors/Block/properties.json +10 -0
- package/src/constructors/Button/properties.json +84 -0
- package/src/constructors/Cell/properties.json +52 -0
- package/src/constructors/Cell/style.scss +8 -3
- package/src/constructors/Checkbox/properties.json +65 -0
- package/src/constructors/Checkbox/style.scss +99 -0
- package/src/constructors/Chip/properties.json +3 -0
- package/src/constructors/ChipGroup/properties.json +3 -0
- package/src/constructors/Dialog/properties.json +23 -0
- package/src/constructors/Dummy/properties.json +2 -0
- package/src/constructors/Dummy/style.scss +5 -0
- package/src/constructors/Field/properties.json +92 -0
- package/src/constructors/Field/style.scss +2 -0
- package/src/constructors/FieldCounter/properties.json +4 -0
- package/src/constructors/FieldLabel/properties.json +4 -0
- package/src/constructors/FieldMessage/properties.json +10 -0
- package/src/constructors/Grid/properties.json +6 -0
- package/src/constructors/Grid/style.scss +8 -0
- package/src/constructors/GridItem/properties.json +40 -0
- package/src/constructors/GridItem/style.scss +5 -0
- package/src/constructors/Group/properties.json +3 -0
- package/src/constructors/Group/style.scss +6 -0
- package/src/constructors/HorizontalScroll/properties.json +26 -0
- package/src/constructors/HorizontalScroll/style.scss +27 -0
- package/src/constructors/Icon/properties.json +25 -0
- package/src/constructors/Image/properties.json +17 -0
- package/src/constructors/Input/properties.json +2 -0
- package/src/constructors/List/properties.json +16 -0
- package/src/constructors/ListGroup/properties.json +15 -0
- package/src/constructors/ListItem/properties.json +52 -0
- package/src/constructors/ListItem/style.scss +2 -0
- package/src/constructors/ListMenu/properties.json +19 -0
- package/src/constructors/Mask/properties.json +30 -0
- package/src/constructors/Mask/style.scss +6 -2
- package/src/constructors/Menu/properties.json +17 -0
- package/src/constructors/Modal/properties.json +17 -0
- package/src/constructors/MotionAxis/properties.json +15 -0
- package/src/constructors/MotionAxis/style.scss +110 -0
- package/src/constructors/MotionTransform/properties.json +35 -0
- package/src/constructors/Page/properties.json +3 -0
- package/src/constructors/Progress/properties.json +47 -0
- package/src/constructors/Ripple/properties.json +9 -0
- package/src/constructors/Scrollbar/properties.json +33 -0
- package/src/constructors/Section/properties.json +3 -0
- package/src/constructors/Select/properties.json +3 -0
- package/src/constructors/SelectValue/properties.json +7 -0
- package/src/constructors/Skeleton/properties.json +24 -0
- package/src/constructors/Snackbar/properties.json +95 -0
- package/src/constructors/Snackbar/style.scss +58 -0
- package/src/constructors/SnackbarItem/properties.json +12 -0
- package/src/constructors/SnackbarItem/style.scss +30 -0
- package/src/constructors/TabItem/properties.json +49 -0
- package/src/constructors/TabItem/style.scss +64 -0
- package/src/constructors/Tabs/properties.json +3 -0
- package/src/constructors/Tabs/style.scss +5 -0
- package/src/constructors/TabsNavigation/properties.json +10 -0
- package/src/constructors/TabsNavigation/style.scss +5 -0
- package/src/constructors/Textarea/properties.json +2 -0
- package/src/constructors/Textarea/style.scss +5 -0
- package/src/constructors/TextareaAutosize/properties.json +9 -0
- package/src/constructors/TextareaAutosize/style.scss +9 -6
- package/src/constructors/Tooltip/properties.json +18 -0
- package/src/constructors/Window/properties.json +240 -0
- package/src/library/style.scss +13 -0
- package/dist/ActionsInclude-H5ZWeXJj.js +0 -64
- package/dist/AriaStaticInclude-CAURwJMb.js +0 -257
- package/dist/ArrowInclude-CcpT637l.js +0 -47
- package/dist/BarsInclude-BOEoY-O4.js +0 -74
- package/dist/BlockDesign-CwRNJi0I.js +0 -244
- package/dist/ButtonDesign-DgZNw44L.js +0 -198
- package/dist/CaptionInclude-NzS6EYYj.js +0 -70
- package/dist/DescriptionInclude-D4ane9aR.js +0 -55
- package/dist/EnabledInclude-Dk-rP4jp.js +0 -46
- package/dist/EventClickInclude-WHJqxZ1b.js +0 -103
- package/dist/FieldCounterInclude-D0oojGWY.js +0 -59
- package/dist/FieldEventInclude-DBRqmzpF.js +0 -718
- package/dist/FieldInclude-BKoBWZdj.js +0 -145
- package/dist/FieldInputCheckInclude-CjNYyGTb.js +0 -79
- package/dist/FieldLabelInclude-Bkxf6rRw.js +0 -71
- package/dist/FieldMatchInclude-GgyucDC_.js +0 -318
- package/dist/FieldMessageInclude-BJDnir34.js +0 -77
- package/dist/IconInclude-CLqwI29Q.js +0 -123
- package/dist/IconTrailingInclude-CdsOcDxv.js +0 -83
- package/dist/LabelHighlightInclude-CLmTvW_6.js +0 -75
- package/dist/LabelInclude-D-mLvjK5.js +0 -114
- package/dist/LabelNumberInclude-Cn0qDEgX.js +0 -46
- package/dist/ListGroupOpen-Bl_HIQoV.js +0 -43
- package/dist/MenuInclude-DfGCfr_I.js +0 -94
- package/dist/ModalDesignAbstract-D4A_a_rC.js +0 -179
- package/dist/ModelInclude-BiYm_iCQ.js +0 -73
- package/dist/ModelValueInclude-CJmm5go9.js +0 -48
- package/dist/MotionTransformClassesInclude-B23RIq0Q.js +0 -214
- package/dist/MotionTransformInclude-P_oRs3JZ.js +0 -97
- package/dist/Plugin-CBNCh_iN.js +0 -628
- package/dist/ProgressInclude-9MfZWtGP.js +0 -56
- package/dist/RippleInclude-Du5yIzX_.js +0 -21
- package/dist/SkeletonInclude-BIUzAO2s.js +0 -105
- package/dist/SuffixInclude-maZ7235l.js +0 -125
- package/dist/TabIndexInclude-xcSFV8yP.js +0 -177
- package/dist/TextInclude--GERRCGj.js +0 -146
- package/dist/TooltipInclude--QRSE83v.js +0 -76
- package/dist/TouchEventInclude-DctYCjt8.js +0 -186
- package/dist/WindowClassesInclude-B56usxgx.js +0 -213
- package/dist/WindowEsc-DTwn4Vsz.js +0 -72
- package/dist/WindowInclude-BWm4-0Gh.js +0 -121
- package/dist/getClassTagAStatic-BnVYlXHI.js +0 -4
package/dist/mask.js
CHANGED
|
@@ -1,2489 +1,1016 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
class
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
}
|
|
846
|
-
class
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
}
|
|
1015
|
-
/**
|
|
1016
|
-
* Returns the length of only special characters.
|
|
1017
|
-
*
|
|
1018
|
-
* Возвращает длину только из специальных символов.
|
|
1019
|
-
*/
|
|
1020
|
-
getLengthBySpecial() {
|
|
1021
|
-
return this.info.value.length;
|
|
1022
|
-
}
|
|
1023
|
-
/**
|
|
1024
|
-
* Returns how many special characters were highlighted.
|
|
1025
|
-
*
|
|
1026
|
-
* Возвращает, сколько специальных символов было выделено.
|
|
1027
|
-
* @param start start of selection/ начало выделения
|
|
1028
|
-
* @param end end of selection/ конец выделения
|
|
1029
|
-
*/
|
|
1030
|
-
getQuantity(t, e) {
|
|
1031
|
-
if (t === e)
|
|
1032
|
-
return 1;
|
|
1033
|
-
let i = 0;
|
|
1034
|
-
for (let s = t; s < e; s++)
|
|
1035
|
-
this.special.isSpecial(this.get(s)) && i++;
|
|
1036
|
-
return i;
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
* Returns a list of masks.
|
|
1040
|
-
*
|
|
1041
|
-
* Возвращает список масок.
|
|
1042
|
-
*/
|
|
1043
|
-
getMask() {
|
|
1044
|
-
var t;
|
|
1045
|
-
return (t = this.props.mask) != null ? t : "";
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
* Returns the number of special characters in the current mask.
|
|
1049
|
-
*
|
|
1050
|
-
* Возвращает количество специальных символов в текущей маске.
|
|
1051
|
-
* @param mask selected mask/ выбранная маска
|
|
1052
|
-
*/
|
|
1053
|
-
getSpecialLength(t) {
|
|
1054
|
-
return t.split("").filter((e) => this.special.isSpecial(e)).length;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
class Mt {
|
|
1058
|
-
/**
|
|
1059
|
-
* Constructor
|
|
1060
|
-
* @param special object for working with special characters/ объект для работы со специальными символами
|
|
1061
|
-
* @param mask object for managing masks/ объект управления маской
|
|
1062
|
-
*/
|
|
1063
|
-
constructor(t, e) {
|
|
1064
|
-
/** Selection value/ Значение выделения */
|
|
1065
|
-
a(this, "value", 0);
|
|
1066
|
-
/** Immediate selection value/ Значение непосредственного выделения */
|
|
1067
|
-
a(this, "immediate", 0);
|
|
1068
|
-
/** Shift flag/ Флаг сдвига */
|
|
1069
|
-
a(this, "shift", !1);
|
|
1070
|
-
this.special = t, this.mask = e;
|
|
1071
|
-
}
|
|
1072
|
-
/**
|
|
1073
|
-
* Getting the selection key number.
|
|
1074
|
-
*
|
|
1075
|
-
* Получение номера ключа выделения.
|
|
1076
|
-
*/
|
|
1077
|
-
get() {
|
|
1078
|
-
return this.value;
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
* Returns the selection number for the first element that is a special symbol.
|
|
1082
|
-
*
|
|
1083
|
-
* Возвращает номер выделения для первого элемента, являющегося специальным символом.
|
|
1084
|
-
*/
|
|
1085
|
-
getFirst() {
|
|
1086
|
-
var t, e, i;
|
|
1087
|
-
return (i = (e = (t = this.mask.info.value) == null ? void 0 : t[0]) == null ? void 0 : e.key) != null ? i : 0;
|
|
1088
|
-
}
|
|
1089
|
-
/**
|
|
1090
|
-
* Getting the current key of the selected character.
|
|
1091
|
-
*
|
|
1092
|
-
* Получение текущего ключа выделенного символа.
|
|
1093
|
-
*/
|
|
1094
|
-
getFocus() {
|
|
1095
|
-
return this.getCharacter(this.value);
|
|
1096
|
-
}
|
|
1097
|
-
/**
|
|
1098
|
-
* Getting the next key of the selected character.
|
|
1099
|
-
*
|
|
1100
|
-
* Получение следующего ключа выделенного символа.
|
|
1101
|
-
*/
|
|
1102
|
-
getNext() {
|
|
1103
|
-
return this.getCharacter(this.value + 1);
|
|
1104
|
-
}
|
|
1105
|
-
/**
|
|
1106
|
-
* Getting the previous key of the selected symbol.
|
|
1107
|
-
*
|
|
1108
|
-
* Получение предыдущего ключа выделенного символа.
|
|
1109
|
-
*/
|
|
1110
|
-
getPrevious() {
|
|
1111
|
-
return this.getCharacter(this.value - 1);
|
|
1112
|
-
}
|
|
1113
|
-
/**
|
|
1114
|
-
* Getting the key number of the nearest special character.
|
|
1115
|
-
*
|
|
1116
|
-
* Получение номера ключа ближайшего специального символа.
|
|
1117
|
-
*/
|
|
1118
|
-
getImmediate() {
|
|
1119
|
-
return this.getCharacter(this.immediate);
|
|
1120
|
-
}
|
|
1121
|
-
/**
|
|
1122
|
-
* Getting the number of the key shifted to the left direction.
|
|
1123
|
-
*
|
|
1124
|
-
* Получение номера ключа, сдвинутого в левом направлении.
|
|
1125
|
-
*/
|
|
1126
|
-
getShift() {
|
|
1127
|
-
return this.shift ? this.value > 0 ? this.getCharacter(this.value - 1) + 1 : 0 : this.getFocus();
|
|
1128
|
-
}
|
|
1129
|
-
/**
|
|
1130
|
-
* Changing the selection key number.
|
|
1131
|
-
*
|
|
1132
|
-
* Изменение номера ключа выделения.
|
|
1133
|
-
* @param selection selection number/ номер выделения
|
|
1134
|
-
*/
|
|
1135
|
-
set(t) {
|
|
1136
|
-
return this.value = t, this;
|
|
1137
|
-
}
|
|
1138
|
-
/**
|
|
1139
|
-
* Changes the selection key number according to the mask structure.
|
|
1140
|
-
*
|
|
1141
|
-
* Изменяет номер ключа выделения по структуре маски.
|
|
1142
|
-
* @param selection selection number/ номер выделения
|
|
1143
|
-
* @param focus is the element in focus/ элемент в фокусе ли
|
|
1144
|
-
*/
|
|
1145
|
-
setByMask(t, e = !0) {
|
|
1146
|
-
if (e) {
|
|
1147
|
-
let i, s;
|
|
1148
|
-
this.mask.info.value.forEach((r) => {
|
|
1149
|
-
i === void 0 && r.key >= t && (i = r.index), r.key <= t && (s = r.index);
|
|
1150
|
-
}), this.set(i !== void 0 ? i : this.mask.getLengthBySpecial()), this.setImmediate(s !== void 0 ? s : this.mask.getLengthBySpecial());
|
|
1151
|
-
}
|
|
1152
|
-
return this;
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Changing the selection key for the nearest special character.
|
|
1156
|
-
*
|
|
1157
|
-
* Изменение ключа выделения для ближайшего специального символа.
|
|
1158
|
-
* @param immediate selection key number/ номер ключа выделения
|
|
1159
|
-
*/
|
|
1160
|
-
setImmediate(t) {
|
|
1161
|
-
return this.immediate = t, this;
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* Turning shift on or off.
|
|
1165
|
-
*
|
|
1166
|
-
* Включение или отключение сдвига.
|
|
1167
|
-
* @param shift value for shift/ значение для сдвига
|
|
1168
|
-
*/
|
|
1169
|
-
setShift(t) {
|
|
1170
|
-
return this.shift = t, this;
|
|
1171
|
-
}
|
|
1172
|
-
/**
|
|
1173
|
-
* Resets the selection key for the nearest special character to the selection location.
|
|
1174
|
-
*
|
|
1175
|
-
* Сбрасывает ключ выделения для ближайшего специального символа до места выделения.
|
|
1176
|
-
*/
|
|
1177
|
-
resetImmediate() {
|
|
1178
|
-
return this.immediate = this.value <= 0 ? 0 : this.value - 1, this;
|
|
1179
|
-
}
|
|
1180
|
-
/**
|
|
1181
|
-
* Move the selection location back by 1 step.
|
|
1182
|
-
*
|
|
1183
|
-
* Передвигаем место выделения назад на 1 шаг.
|
|
1184
|
-
*/
|
|
1185
|
-
goBack() {
|
|
1186
|
-
return this.value > 0 && this.value--, this;
|
|
1187
|
-
}
|
|
1188
|
-
/**
|
|
1189
|
-
* Move the selection location forward by 1 step.
|
|
1190
|
-
*
|
|
1191
|
-
* Передвигаем место выделения вперед на 1 шаг.
|
|
1192
|
-
*/
|
|
1193
|
-
goNext() {
|
|
1194
|
-
return this.value <= this.mask.getLength() && this.value++, this;
|
|
1195
|
-
}
|
|
1196
|
-
/**
|
|
1197
|
-
* Getting the key number at the selection location.
|
|
1198
|
-
*
|
|
1199
|
-
* Получение номера ключа по месту выделения.
|
|
1200
|
-
* @param selection selection location/ место выделения
|
|
1201
|
-
*/
|
|
1202
|
-
getCharacter(t) {
|
|
1203
|
-
for (const e of this.mask.info.value)
|
|
1204
|
-
if (e.index >= t)
|
|
1205
|
-
return e.key;
|
|
1206
|
-
return this.mask.getLength();
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
const b = "~", Lt = "_";
|
|
1210
|
-
class Tt {
|
|
1211
|
-
/**
|
|
1212
|
-
* Constructor
|
|
1213
|
-
* @param props input data/ входные данные
|
|
1214
|
-
* @param rubberItem object for working with rubber elements/ объект для работы с резиновыми элементами
|
|
1215
|
-
* @param characterLength object for managing input length/ объект управления длиной ввода
|
|
1216
|
-
* @param special object for working with special characters/ объект для работы со специальными символами
|
|
1217
|
-
* @param mask object for managing masks/ объект управления маской
|
|
1218
|
-
* @param selection object for managing cursor position/ объект для управления положением курсора
|
|
1219
|
-
*/
|
|
1220
|
-
constructor(t, e, i, s, r, n) {
|
|
1221
|
-
/** Entered characters list/ Список введённых символов */
|
|
1222
|
-
a(this, "item", C([]));
|
|
1223
|
-
this.props = t, this.rubberItem = e, this.characterLength = i, this.special = s, this.mask = r, this.selection = n;
|
|
1224
|
-
}
|
|
1225
|
-
/**
|
|
1226
|
-
* Checks if the value is filled.
|
|
1227
|
-
*
|
|
1228
|
-
* Проверяет, заполнено ли значение.
|
|
1229
|
-
*/
|
|
1230
|
-
is() {
|
|
1231
|
-
return this.item.value.length > 0;
|
|
1232
|
-
}
|
|
1233
|
-
/**
|
|
1234
|
-
* Checks if the selected character was previously deleted.
|
|
1235
|
-
*
|
|
1236
|
-
* Проверяет, является ли выделенный символ ранее удалённым.
|
|
1237
|
-
*/
|
|
1238
|
-
isCharDelete() {
|
|
1239
|
-
const t = this.selection.get();
|
|
1240
|
-
return t in this.item.value && this.item.value[t] === b;
|
|
1241
|
-
}
|
|
1242
|
-
/**
|
|
1243
|
-
* Getting the selected mask character.
|
|
1244
|
-
*
|
|
1245
|
-
* Получение выбранного символа маски.
|
|
1246
|
-
*/
|
|
1247
|
-
getFocus() {
|
|
1248
|
-
return this.mask.get(this.selection.getFocus());
|
|
1249
|
-
}
|
|
1250
|
-
/**
|
|
1251
|
-
* Getting the mask character by the key number of the nearest special character.
|
|
1252
|
-
*
|
|
1253
|
-
* Получение символа маски по номеру ключа ближайшего специального символа.
|
|
1254
|
-
*/
|
|
1255
|
-
getImmediate() {
|
|
1256
|
-
return this.mask.get(this.selection.getImmediate());
|
|
1257
|
-
}
|
|
1258
|
-
/**
|
|
1259
|
-
* Getting the next mask character.
|
|
1260
|
-
*
|
|
1261
|
-
* Получение следующего символа маски.
|
|
1262
|
-
*/
|
|
1263
|
-
getNext() {
|
|
1264
|
-
return this.mask.get(this.selection.getNext());
|
|
1265
|
-
}
|
|
1266
|
-
/**
|
|
1267
|
-
* Adding 1 entered character at its selection location.
|
|
1268
|
-
*
|
|
1269
|
-
* Добавление 1 введённого символа по месту его выделения.
|
|
1270
|
-
* @param char entered character/ введённый символ
|
|
1271
|
-
*/
|
|
1272
|
-
add(t) {
|
|
1273
|
-
return this.item.value.splice(this.selection.get(), this.isCharDelete() ? 1 : 0, t), this.selection.goNext().resetImmediate(), this.updateLength(), this;
|
|
1274
|
-
}
|
|
1275
|
-
/**
|
|
1276
|
-
* Deleting 1 entered character at its selection location.
|
|
1277
|
-
*
|
|
1278
|
-
* Удаление 1 введённого символа по месту его выделения.
|
|
1279
|
-
*/
|
|
1280
|
-
pop() {
|
|
1281
|
-
const t = this.selection.get() - 1;
|
|
1282
|
-
return this.isSpecialNextAnother() ? this.item.value[t] = b : (this.item.value.splice(t, 1), this.updateLength()), this.selection.goBack().resetImmediate(), this;
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
* Resets the values to the initial values.
|
|
1286
|
-
*
|
|
1287
|
-
* Сбрасывает значения до начальных.
|
|
1288
|
-
*/
|
|
1289
|
-
reset() {
|
|
1290
|
-
return this.item.value = [], this.selection.set(0).resetImmediate(), this.updateLength(), this;
|
|
1291
|
-
}
|
|
1292
|
-
/**
|
|
1293
|
-
* Shifts by 1 value depending on the direction of selection change.
|
|
1294
|
-
*
|
|
1295
|
-
* Сдвигает на 1 значение в зависимости от направления изменения выделения.
|
|
1296
|
-
* @param status shift status/ статус сдвига
|
|
1297
|
-
*/
|
|
1298
|
-
shift(t = 1) {
|
|
1299
|
-
return this.characterLength.set(this.item.value.length + t), this;
|
|
1300
|
-
}
|
|
1301
|
-
/**
|
|
1302
|
-
* Checks if there is another group of special characters ahead.
|
|
1303
|
-
*
|
|
1304
|
-
* Проверяет, есть ли впереди другая группа специальных символов.
|
|
1305
|
-
*/
|
|
1306
|
-
isSpecialNextAnother() {
|
|
1307
|
-
var i, s;
|
|
1308
|
-
const t = this.selection.get() - 1, e = this.item.value.length;
|
|
1309
|
-
if (this.props.groupSave && t >= 0 && t <= e) {
|
|
1310
|
-
const r = this.mask.info.value, n = (i = r == null ? void 0 : r[t]) == null ? void 0 : i.char;
|
|
1311
|
-
if (n && !this.rubberItem.is(n)) {
|
|
1312
|
-
for (let l = t; l < e; l++)
|
|
1313
|
-
if (r != null && r[l]) {
|
|
1314
|
-
const c = (s = r[l]) == null ? void 0 : s.char;
|
|
1315
|
-
if (c && this.special.isSpecial(c) && n !== c)
|
|
1316
|
-
return !0;
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
return !1;
|
|
1321
|
-
}
|
|
1322
|
-
/**
|
|
1323
|
-
* Updates the length of entered characters.
|
|
1324
|
-
*
|
|
1325
|
-
* Обновляет длину введённых символов.
|
|
1326
|
-
*/
|
|
1327
|
-
updateLength() {
|
|
1328
|
-
return this.characterLength.set(this.item.value.length), this;
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
class Ft {
|
|
1332
|
-
/**
|
|
1333
|
-
* Constructor
|
|
1334
|
-
* @param rubberTransition object for managing the transition character/ объект для управления символом перехода
|
|
1335
|
-
* @param mask object for managing masks/ объект управления маской
|
|
1336
|
-
* @param special object for working with special characters/ объект для работы со специальными символами
|
|
1337
|
-
* @param character object for managing entered character/ объект для управления введённым символом
|
|
1338
|
-
*/
|
|
1339
|
-
constructor(t, e, i, s) {
|
|
1340
|
-
/**
|
|
1341
|
-
* Receiving basic standard values.
|
|
1342
|
-
*
|
|
1343
|
-
* Получение базовых стандартных значений.
|
|
1344
|
-
*/
|
|
1345
|
-
a(this, "item", u(() => {
|
|
1346
|
-
const t = this.character.item.value, e = [];
|
|
1347
|
-
let i = 0;
|
|
1348
|
-
for (const s of this.mask.item.value)
|
|
1349
|
-
if (!this.special.isSpecial(s))
|
|
1350
|
-
e.push(s);
|
|
1351
|
-
else if (i in t) {
|
|
1352
|
-
if (e.push(String(t[i++])), i > t.length && this.rubberTransition.is() && !this.rubberTransition.isChar(s))
|
|
1353
|
-
break;
|
|
1354
|
-
} else
|
|
1355
|
-
break;
|
|
1356
|
-
return e.join("");
|
|
1357
|
-
}));
|
|
1358
|
-
this.rubberTransition = t, this.mask = e, this.special = i, this.character = s;
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Checks if the values are filled in.
|
|
1362
|
-
*
|
|
1363
|
-
* Проверяет, заполнены ли значения.
|
|
1364
|
-
*/
|
|
1365
|
-
is() {
|
|
1366
|
-
return this.getLength() > 0;
|
|
1367
|
-
}
|
|
1368
|
-
/**
|
|
1369
|
-
* Getting the character from the basic standard values by its key number.
|
|
1370
|
-
*
|
|
1371
|
-
* Получение символа из базовых стандартных значений по его номеру ключа.
|
|
1372
|
-
* @param index key number/ номер ключа
|
|
1373
|
-
*/
|
|
1374
|
-
getChar(t) {
|
|
1375
|
-
var e;
|
|
1376
|
-
return (e = this.item.value) == null ? void 0 : e[t];
|
|
1377
|
-
}
|
|
1378
|
-
/**
|
|
1379
|
-
* Getting the length of basic standard values.
|
|
1380
|
-
*
|
|
1381
|
-
* Получение длины базовых стандартных значений.
|
|
1382
|
-
*/
|
|
1383
|
-
getLength() {
|
|
1384
|
-
return this.item.value.length;
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
class Et {
|
|
1388
|
-
/**
|
|
1389
|
-
* Constructor
|
|
1390
|
-
* @param props input data/ входные данные
|
|
1391
|
-
* @param type object for working with the mask type/ объект для работы с типом маски
|
|
1392
|
-
* @param date object for working with date types/ объект для работы с типом даты
|
|
1393
|
-
* @param format object for managing numeric mask types/ объект для управления числовыми типами масок
|
|
1394
|
-
* @param mask object for managing masks/ объект управления маской
|
|
1395
|
-
* @param special object for working with special characters/ объект для работы со специальными символами
|
|
1396
|
-
* @param valueBasic object for working with base values/ объект для работы с базовыми значениями
|
|
1397
|
-
*/
|
|
1398
|
-
constructor(t, e, i, s, r, n, l) {
|
|
1399
|
-
a(this, "infoCache");
|
|
1400
|
-
/**
|
|
1401
|
-
* Receiving a list with information about standard values/
|
|
1402
|
-
* Получение списка с информацией о стандартных значениях
|
|
1403
|
-
*/
|
|
1404
|
-
a(this, "info", u(() => {
|
|
1405
|
-
const t = this.valueBasic.item.value, e = {};
|
|
1406
|
-
return this.mask.item.value.forEach((i, s) => {
|
|
1407
|
-
if (this.special.isSpecial(i)) {
|
|
1408
|
-
const r = this.add(e, i);
|
|
1409
|
-
this.isStandard(s) && t[s] !== b && r.chars.push(String(t[s])), r.maxLength++, r.end = r.maxLength === r.chars.length, r.full = this.special.isDefault(i) || r.end, r.value = r.full ? r.chars.join("") : "";
|
|
1410
|
-
}
|
|
1411
|
-
}), e;
|
|
1412
|
-
}));
|
|
1413
|
-
/** Final value (shortcut)/ Финальное значение (ярлык) */
|
|
1414
|
-
a(this, "item", u(() => this.getValue(this.info.value)));
|
|
1415
|
-
/** Checks if the mask is fully filled/ Проверяет, полностью ли заполнена маска */
|
|
1416
|
-
a(this, "isFull", u(() => {
|
|
1417
|
-
for (const t of Object.values(this.info.value))
|
|
1418
|
-
if (!t.full)
|
|
1419
|
-
return !1;
|
|
1420
|
-
return !0;
|
|
1421
|
-
}));
|
|
1422
|
-
/** Checks if the mask is fully filled by length/ Проверяет, полностью ли заполнена маска по длине */
|
|
1423
|
-
a(this, "isEnd", u(() => {
|
|
1424
|
-
for (const t of Object.values(this.info.value))
|
|
1425
|
-
if (!t.end)
|
|
1426
|
-
return !1;
|
|
1427
|
-
return !0;
|
|
1428
|
-
}));
|
|
1429
|
-
/** Returns the final form of the value/ Возвращает финальный вид значения */
|
|
1430
|
-
a(this, "valueFinal", u(() => {
|
|
1431
|
-
const t = this.valueBasic.item.value.split(""), e = this.mask.item.value;
|
|
1432
|
-
let i = "";
|
|
1433
|
-
for (const s in e)
|
|
1434
|
-
if (s in t)
|
|
1435
|
-
i += t[s];
|
|
1436
|
-
else if (e[s]) {
|
|
1437
|
-
const r = this.special.getDefault(e[s]);
|
|
1438
|
-
r && (i += r);
|
|
1439
|
-
}
|
|
1440
|
-
return i;
|
|
1441
|
-
}));
|
|
1442
|
-
this.props = t, this.type = e, this.date = i, this.format = s, this.mask = r, this.special = n, this.valueBasic = l, y(this.info, (c, m) => {
|
|
1443
|
-
this.type.isDate() && (this.infoCache = m);
|
|
1444
|
-
});
|
|
1445
|
-
}
|
|
1446
|
-
/**
|
|
1447
|
-
* Returns old values.
|
|
1448
|
-
*
|
|
1449
|
-
* Возвращает старые значения.
|
|
1450
|
-
*/
|
|
1451
|
-
getValueCache() {
|
|
1452
|
-
return this.infoCache ? this.getValue(this.infoCache) : this.item.value;
|
|
1453
|
-
}
|
|
1454
|
-
/**
|
|
1455
|
-
* Getting full information for global verification.
|
|
1456
|
-
*
|
|
1457
|
-
* Получение полной информации для глобальной проверки.
|
|
1458
|
-
*/
|
|
1459
|
-
getForCheck() {
|
|
1460
|
-
const t = this.item.value;
|
|
1461
|
-
return {
|
|
1462
|
-
group: v.getGroupDefault(),
|
|
1463
|
-
value: t,
|
|
1464
|
-
maxLength: t.length,
|
|
1465
|
-
full: this.isFull.value,
|
|
1466
|
-
end: this.isEnd.value,
|
|
1467
|
-
chars: t.split("")
|
|
1468
|
-
};
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* Getting information for a specific group.
|
|
1472
|
-
*
|
|
1473
|
-
* Получение информации для конкретной группы.
|
|
1474
|
-
* @param groupName group name/ название группы
|
|
1475
|
-
*/
|
|
1476
|
-
getInfoItem(t) {
|
|
1477
|
-
var e;
|
|
1478
|
-
return (e = this.info.value) == null ? void 0 : e[t];
|
|
1479
|
-
}
|
|
1480
|
-
/**
|
|
1481
|
-
* Checks if there is a value by the key number in the basic values.
|
|
1482
|
-
*
|
|
1483
|
-
* Проверяет, есть ли значение по номеру ключа в базовых значениях.
|
|
1484
|
-
* @param index key number/ номер ключа
|
|
1485
|
-
*/
|
|
1486
|
-
isStandard(t) {
|
|
1487
|
-
return !!this.valueBasic.getChar(t);
|
|
1488
|
-
}
|
|
1489
|
-
/**
|
|
1490
|
-
* Returns values based on the specified data information structure.
|
|
1491
|
-
*
|
|
1492
|
-
* Возвращает значения по указанной структуре информации о данных.
|
|
1493
|
-
* @param info data information/ информация о данных
|
|
1494
|
-
*/
|
|
1495
|
-
getValue(t) {
|
|
1496
|
-
return this.type.isCurrencyOrNumber() ? this.format.getValueStandard(t) : this.type.isDate() ? this.isFull.value ? this.date.getValueStandard(t) : "" : this.props.fullOnly && !this.isFull.value ? "" : this.valueFinal.value;
|
|
1497
|
-
}
|
|
1498
|
-
/**
|
|
1499
|
-
* Adding a new character to the list divided by groups if it is not there and returning the property of the given group.
|
|
1500
|
-
*
|
|
1501
|
-
* Добавление нового символа в список, разделенный по группам, если его там нет, и возвращение свойства данной группы.
|
|
1502
|
-
* @param data data for verification/ данные для проверки
|
|
1503
|
-
* @param groupName group name/ название группы
|
|
1504
|
-
*/
|
|
1505
|
-
add(t, e) {
|
|
1506
|
-
return e in t || (t[e] = {
|
|
1507
|
-
group: e,
|
|
1508
|
-
value: "",
|
|
1509
|
-
maxLength: 0,
|
|
1510
|
-
full: !1,
|
|
1511
|
-
end: !1,
|
|
1512
|
-
chars: []
|
|
1513
|
-
}), t[e];
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
class Vt {
|
|
1517
|
-
/**
|
|
1518
|
-
* Constructor
|
|
1519
|
-
* @param pattern object for working with input data validation/ объект для работы с проверкой введённых данных
|
|
1520
|
-
* @param value object for working with entered data/ объект для работы с введёнными данными
|
|
1521
|
-
*/
|
|
1522
|
-
constructor(t, e) {
|
|
1523
|
-
/** Validation error info or undefined/ Информация об ошибке или undefined */
|
|
1524
|
-
a(this, "item", u(() => {
|
|
1525
|
-
for (const t of Object.values(this.pattern.item.value)) {
|
|
1526
|
-
const e = this.value.getInfoItem(t.group);
|
|
1527
|
-
if (e && e.full) {
|
|
1528
|
-
const i = t.check(e.value);
|
|
1529
|
-
if (i && !i.status)
|
|
1530
|
-
return {
|
|
1531
|
-
...i,
|
|
1532
|
-
value: this.value.item.value
|
|
1533
|
-
};
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
return this.getValidationCheck();
|
|
1537
|
-
}));
|
|
1538
|
-
this.pattern = t, this.value = e;
|
|
1539
|
-
}
|
|
1540
|
-
/**
|
|
1541
|
-
* Checks if the current group has an error.
|
|
1542
|
-
*
|
|
1543
|
-
* Проверяет, есть ли ошибка у текущей группы.
|
|
1544
|
-
* @param groupName group name/ название группы
|
|
1545
|
-
*/
|
|
1546
|
-
isError(t) {
|
|
1547
|
-
var i;
|
|
1548
|
-
const e = (i = this.item.value) == null ? void 0 : i.group;
|
|
1549
|
-
return !!(e && (e === t || e === v.getGroupDefault()));
|
|
1550
|
-
}
|
|
1551
|
-
/**
|
|
1552
|
-
* Checks the correctness of filling in the values.
|
|
1553
|
-
*
|
|
1554
|
-
* Проверяет корректность заполнения значений.
|
|
1555
|
-
*/
|
|
1556
|
-
checkValidity() {
|
|
1557
|
-
return this.item.value === void 0;
|
|
1558
|
-
}
|
|
1559
|
-
/**
|
|
1560
|
-
* Getting global check data.
|
|
1561
|
-
*
|
|
1562
|
-
* Получение данных глобальной проверки.
|
|
1563
|
-
*/
|
|
1564
|
-
getValidationCheck() {
|
|
1565
|
-
var t;
|
|
1566
|
-
if (this.value.isFull.value) {
|
|
1567
|
-
const e = this.value.getForCheck();
|
|
1568
|
-
if (this.pattern.isCheck()) {
|
|
1569
|
-
const i = (t = this.pattern.getInput(e.group)) == null ? void 0 : t.check(e.value);
|
|
1570
|
-
if (i && !i.status)
|
|
1571
|
-
return i;
|
|
1572
|
-
}
|
|
1573
|
-
return {
|
|
1574
|
-
status: !0,
|
|
1575
|
-
value: e.value,
|
|
1576
|
-
isFull: !0
|
|
1577
|
-
};
|
|
1578
|
-
}
|
|
1579
|
-
return {
|
|
1580
|
-
status: !0,
|
|
1581
|
-
value: this.value.item.value,
|
|
1582
|
-
isFull: !1
|
|
1583
|
-
};
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
class Nt {
|
|
1587
|
-
/**
|
|
1588
|
-
* Constructor
|
|
1589
|
-
* @param props input data/ входные данные
|
|
1590
|
-
* @param type object for working with the mask type/ объект для работы с типом маски
|
|
1591
|
-
* @param date object for working with date types/ объект для работы с типом даты
|
|
1592
|
-
* @param format object for managing numeric mask types/ объект для управления числовыми типами масок
|
|
1593
|
-
* @param special object for working with special characters/ объект для работы со специальными символами
|
|
1594
|
-
* @param rubber object for working with rubber types/ объект для работы с резиновыми типами
|
|
1595
|
-
* @param mask object for managing masks/ объект управления маской
|
|
1596
|
-
* @param valueBasic object for working with base values/ объект для работы с базовыми значениями
|
|
1597
|
-
* @param validation object for working with validation/ объект для работы с валидацией
|
|
1598
|
-
* @param className define class names for each symbol/ определить название класса для каждого символа
|
|
1599
|
-
*/
|
|
1600
|
-
constructor(t, e, i, s, r, n, l, c, m, o) {
|
|
1601
|
-
/** Class name prefix for item/ Класс для элемента */
|
|
1602
|
-
a(this, "classNameItem");
|
|
1603
|
-
/** View items list/ Список данных для отображения */
|
|
1604
|
-
a(this, "item", u(() => {
|
|
1605
|
-
const t = [], e = this.valueBasic.item.value;
|
|
1606
|
-
return this.mask.item.value.forEach((i, s) => {
|
|
1607
|
-
const r = e == null ? void 0 : e[s];
|
|
1608
|
-
t.push({
|
|
1609
|
-
className: `${this.classNameItem} ${this.classNameItem}--${this.getStatus(i, r)}`,
|
|
1610
|
-
value: this.getValue(i, r)
|
|
1611
|
-
});
|
|
1612
|
-
}), t;
|
|
1613
|
-
}));
|
|
1614
|
-
/** Input value with special view characters/ Значение ввода со спецсимволами отображения */
|
|
1615
|
-
a(this, "input", u(() => {
|
|
1616
|
-
const t = [], e = this.mask.item.value;
|
|
1617
|
-
return this.valueBasic.item.value.split("").forEach((i, s) => {
|
|
1618
|
-
var r, n;
|
|
1619
|
-
i === b ? t.push(
|
|
1620
|
-
(n = this.getSpecialToView((r = e == null ? void 0 : e[s]) != null ? r : "")) != null ? n : i
|
|
1621
|
-
) : t.push(i);
|
|
1622
|
-
}), t.join("");
|
|
1623
|
-
}));
|
|
1624
|
-
this.props = t, this.type = e, this.date = i, this.format = s, this.special = r, this.rubber = n, this.mask = l, this.valueBasic = c, this.validation = m, this.classNameItem = `${o}__character__item`;
|
|
1625
|
-
}
|
|
1626
|
-
/**
|
|
1627
|
-
* Checks if the value is filled in.
|
|
1628
|
-
*
|
|
1629
|
-
* Проверяет, заполнено ли значение.
|
|
1630
|
-
* @param value checked value/ проверяемое значение
|
|
1631
|
-
*/
|
|
1632
|
-
isValue(t) {
|
|
1633
|
-
return !!(t && t !== b);
|
|
1634
|
-
}
|
|
1635
|
-
/**
|
|
1636
|
-
* Returns the status by mask symbol and its position.
|
|
1637
|
-
*
|
|
1638
|
-
* Возвращает статус по символу маски и месту его расположения.
|
|
1639
|
-
* @param char mask symbol/ символ маски
|
|
1640
|
-
* @param value entered value for this position/ введённое значение для позиции
|
|
1641
|
-
*/
|
|
1642
|
-
getStatus(t, e) {
|
|
1643
|
-
return this.isValue(e) ? this.special.isSpecial(t) ? this.validation.isError(t) ? "error" : "special" : "standard" : this.rubber.isTransition(t) ? "transition" : "placeholder";
|
|
1644
|
-
}
|
|
1645
|
-
/**
|
|
1646
|
-
* Returns symbol for rendering: real value or placeholder.
|
|
1647
|
-
*
|
|
1648
|
-
* Возвращает символ для отображения: реальное значение или плейсхолдер.
|
|
1649
|
-
* @param char mask symbol/ символ маски
|
|
1650
|
-
* @param value entered value for position/ введённое значение позиции
|
|
1651
|
-
*/
|
|
1652
|
-
getValue(t, e) {
|
|
1653
|
-
return this.isValue(e) ? e : this.getSpecialToView(t);
|
|
1654
|
-
}
|
|
1655
|
-
/**
|
|
1656
|
-
* Returns display version of special mask symbol (placeholder).
|
|
1657
|
-
*
|
|
1658
|
-
* Возвращает отображаемую версию специального символа маски (плейсхолдер).
|
|
1659
|
-
* @param char mask symbol/ символ маски
|
|
1660
|
-
*/
|
|
1661
|
-
getSpecialToView(t) {
|
|
1662
|
-
var e, i, s;
|
|
1663
|
-
return this.special.isSpecial(t) ? (s = (i = (e = this.getViewChar(t)) != null ? e : this.special.getView(t)) != null ? i : this.props.view) != null ? s : Lt : t;
|
|
1664
|
-
}
|
|
1665
|
-
/**
|
|
1666
|
-
* Returns special character for view by its group name.
|
|
1667
|
-
*
|
|
1668
|
-
* Возвращает специальный символ для отображения по имени группы.
|
|
1669
|
-
* @param groupName group name/ имя группы
|
|
1670
|
-
*/
|
|
1671
|
-
getViewChar(t) {
|
|
1672
|
-
if (this.type.isDate())
|
|
1673
|
-
return this.date.getView(t);
|
|
1674
|
-
if (this.type.isCurrencyOrNumber())
|
|
1675
|
-
return this.format.view.value;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
class At {
|
|
1679
|
-
/**
|
|
1680
|
-
* Constructor
|
|
1681
|
-
* @param validation object for working with validation/ объект для работы с валидацией
|
|
1682
|
-
* @param emits emit function (Design system bridge)/ функция вызова события
|
|
1683
|
-
*/
|
|
1684
|
-
constructor(t, e) {
|
|
1685
|
-
/** Current event type key/ Текущий ключ типа события */
|
|
1686
|
-
a(this, "type");
|
|
1687
|
-
/** Native event object/ Объект нативного события */
|
|
1688
|
-
a(this, "event");
|
|
1689
|
-
this.validation = t, this.emits = e;
|
|
1690
|
-
}
|
|
1691
|
-
/**
|
|
1692
|
-
* Checks whether extra data (validation) should be generated for current event
|
|
1693
|
-
*
|
|
1694
|
-
* Проверяет, нужно ли генерировать дополнительные данные (валидацию) для текущего события
|
|
1695
|
-
*/
|
|
1696
|
-
isValue() {
|
|
1697
|
-
return !!(this.type && ["input", "change"].indexOf(this.type) >= 0);
|
|
1698
|
-
}
|
|
1699
|
-
/**
|
|
1700
|
-
* Initializes event handling and emits event with optional validation payload
|
|
1701
|
-
*
|
|
1702
|
-
* Инициализирует обработку и вызывает событие с опциональной валидацией
|
|
1703
|
-
*/
|
|
1704
|
-
go() {
|
|
1705
|
-
var t, e;
|
|
1706
|
-
if (this.type && this.event) {
|
|
1707
|
-
const i = this.isValue() ? this.validation.item.value : void 0;
|
|
1708
|
-
(t = this.emits) == null || t.call(
|
|
1709
|
-
this,
|
|
1710
|
-
this.type,
|
|
1711
|
-
this.event,
|
|
1712
|
-
i
|
|
1713
|
-
), (this.type === "inputLite" || this.type === "changeLite") && ((e = this.emits) == null || e.call(
|
|
1714
|
-
this,
|
|
1715
|
-
this.type,
|
|
1716
|
-
i
|
|
1717
|
-
));
|
|
1718
|
-
}
|
|
1719
|
-
return this;
|
|
1720
|
-
}
|
|
1721
|
-
/**
|
|
1722
|
-
* Sets both event type and native event object
|
|
1723
|
-
*
|
|
1724
|
-
* Устанавливает одновременно тип события и объект события
|
|
1725
|
-
* @param type event name/ название события
|
|
1726
|
-
* @param event event object/ объект события
|
|
1727
|
-
*/
|
|
1728
|
-
set(t, e) {
|
|
1729
|
-
return this.setType(t), this.setEvent(e), this;
|
|
1730
|
-
}
|
|
1731
|
-
/**
|
|
1732
|
-
* Sets event type
|
|
1733
|
-
*
|
|
1734
|
-
* Устанавливает тип события
|
|
1735
|
-
* @param type event name/ название события
|
|
1736
|
-
*/
|
|
1737
|
-
setType(t) {
|
|
1738
|
-
return this.type = t, this;
|
|
1739
|
-
}
|
|
1740
|
-
/**
|
|
1741
|
-
* Sets native event object
|
|
1742
|
-
*
|
|
1743
|
-
* Устанавливает объект события
|
|
1744
|
-
* @param event event object/ объект события
|
|
1745
|
-
*/
|
|
1746
|
-
setEvent(t) {
|
|
1747
|
-
return this.event = t, this;
|
|
1748
|
-
}
|
|
1749
|
-
/**
|
|
1750
|
-
* Resets all internal state (type + event)
|
|
1751
|
-
*
|
|
1752
|
-
* Сбрасывает всё внутреннее состояние (тип и событие)
|
|
1753
|
-
*/
|
|
1754
|
-
reset() {
|
|
1755
|
-
return this.resetType(), this.resetEvent(), this;
|
|
1756
|
-
}
|
|
1757
|
-
/**
|
|
1758
|
-
* Resets stored event type
|
|
1759
|
-
*
|
|
1760
|
-
* Сбрасывает сохранённый тип события
|
|
1761
|
-
*/
|
|
1762
|
-
resetType() {
|
|
1763
|
-
return this.type = void 0, this;
|
|
1764
|
-
}
|
|
1765
|
-
/**
|
|
1766
|
-
* Resets stored native event
|
|
1767
|
-
*
|
|
1768
|
-
* Сбрасывает сохранённый объект события
|
|
1769
|
-
*/
|
|
1770
|
-
resetEvent() {
|
|
1771
|
-
return this.event = void 0, this;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
class Ot {
|
|
1775
|
-
/**
|
|
1776
|
-
* Constructor
|
|
1777
|
-
* @param type object for working with the mask type/ объект для работы с типом маски
|
|
1778
|
-
* @param buffer object for managing cached input data/ объект управления кешированными вводимыми данными
|
|
1779
|
-
* @param focus object for handling input field focus/ объект для работы с фокусом поля ввода
|
|
1780
|
-
* @param rubberTransition object for managing the transition character/ объект для управления символом перехода
|
|
1781
|
-
* @param date object for working with date types/ объект для работы с типом даты
|
|
1782
|
-
* @param special object for working with special characters/ объект для работы со специальными символами
|
|
1783
|
-
* @param match object for managing the input character match logic/ объект для управления совпадением символов ввода
|
|
1784
|
-
* @param rubber object for working with rubber types/ объект для работы с резиновыми типами
|
|
1785
|
-
* @param mask object for managing masks/ объект управления маской
|
|
1786
|
-
* @param selection object for managing caret position/ объект для управления положением курсора
|
|
1787
|
-
* @param character object for managing entered characters/ объект для управления введёнными символами
|
|
1788
|
-
* @param valueBasic object for working with base values/ объект для работы с базовыми значениями
|
|
1789
|
-
* @param value object for working with transformed value/ объект для работы с преобразованным значением
|
|
1790
|
-
* @param emit object for handling callback events/ объект для работы с событиями
|
|
1791
|
-
* @param element input element ref/ ссылка на элемент ввода
|
|
1792
|
-
*/
|
|
1793
|
-
constructor(t, e, i, s, r, n, l, c, m, o, p, f, g, I, w) {
|
|
1794
|
-
this.type = t, this.buffer = e, this.focus = i, this.rubberTransition = s, this.date = r, this.special = n, this.match = l, this.rubber = c, this.mask = m, this.selection = o, this.character = p, this.valueBasic = f, this.value = g, this.emit = I, this.element = w;
|
|
1795
|
-
}
|
|
1796
|
-
/**
|
|
1797
|
-
* Adds new characters entered by user
|
|
1798
|
-
*
|
|
1799
|
-
* Добавляет новые символы, вводимые пользователем
|
|
1800
|
-
* @param selection selected key index/ индекс выделенного ключа
|
|
1801
|
-
* @param chars list of characters (string or array)/ список вводимых символов
|
|
1802
|
-
* @param focus is element focused/ элемент в фокусе ли
|
|
1803
|
-
* @returns was value updated/ было ли обновлено значение
|
|
1804
|
-
*/
|
|
1805
|
-
add(t, e, i = !0) {
|
|
1806
|
-
let s = !1;
|
|
1807
|
-
return this.selection.setByMask(t, i), this.rubberTransition.reset(), st(e).forEach((r) => {
|
|
1808
|
-
const n = this.character.getFocus(), l = this.character.getImmediate();
|
|
1809
|
-
this.selection.setShift(
|
|
1810
|
-
this.rubber.update(this.value.info.value, l, r)
|
|
1811
|
-
), this.rubberTransition.is() && this.selection.setByMask(
|
|
1812
|
-
this.mask.getByChar(
|
|
1813
|
-
this.rubberTransition.item.value,
|
|
1814
|
-
this.selection.getImmediate()
|
|
1815
|
-
) + 1,
|
|
1816
|
-
i
|
|
1817
|
-
), this.match.is(r, n) && (this.character.shift(), this.character.getFocus() && (this.mask.maxLength.value > this.valueBasic.getLength() || this.character.isCharDelete()) && (this.character.add(r), s = !0));
|
|
1818
|
-
}), this.goSelection(), s;
|
|
1819
|
-
}
|
|
1820
|
-
/**
|
|
1821
|
-
* Removes (deletes) selected input characters
|
|
1822
|
-
*
|
|
1823
|
-
* Удаляет выделенные символы ввода
|
|
1824
|
-
* @param start start selection index/ индекс начала выделения
|
|
1825
|
-
* @param end end selection index/ индекс конца выделения
|
|
1826
|
-
* @param focus is element focused/ элемент в фокусе ли
|
|
1827
|
-
*/
|
|
1828
|
-
pop(t, e = t, i = !0) {
|
|
1829
|
-
if (t >= 0 && e <= this.mask.maxLength.value) {
|
|
1830
|
-
let s = this.mask.getQuantity(t, e);
|
|
1831
|
-
for (i && this.selection.setByMask(e); s--; )
|
|
1832
|
-
this.rubberTransition.reset(), this.character.pop(), this.character.shift(0), this.selection.setShift(
|
|
1833
|
-
this.rubber.pop(this.character.getFocus())
|
|
1834
|
-
);
|
|
1835
|
-
this.goSelection();
|
|
1836
|
-
}
|
|
1837
|
-
return this;
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
* Resets all values or applies provided value
|
|
1841
|
-
*
|
|
1842
|
-
* Сбрасывает все значения или применяет переданное
|
|
1843
|
-
* @param value new raw value to apply/ новое значение для применения
|
|
1844
|
-
*/
|
|
1845
|
-
reset(t = "") {
|
|
1846
|
-
if (this.character.reset(), this.rubber.reset(), rt(t)) {
|
|
1847
|
-
const e = this.type.isDate() ? this.date.getValue(t) : t;
|
|
1848
|
-
this.add(0, this.extra(e.split("")));
|
|
1849
|
-
}
|
|
1850
|
-
return this;
|
|
1851
|
-
}
|
|
1852
|
-
/**
|
|
1853
|
-
* Removes redundant characters for paste operation
|
|
1854
|
-
*
|
|
1855
|
-
* Удаляет лишние символы при вставке
|
|
1856
|
-
* @param chars characters to insert/ вставляемые символы
|
|
1857
|
-
*/
|
|
1858
|
-
extra(t) {
|
|
1859
|
-
var n, l, c;
|
|
1860
|
-
if (this.character.is())
|
|
1861
|
-
return t;
|
|
1862
|
-
const e = this.mask.item.value, i = [...t];
|
|
1863
|
-
let s = this.match.get((l = (n = this.mask.info.value) == null ? void 0 : n[0]) == null ? void 0 : l.char), r = 0;
|
|
1864
|
-
if (s)
|
|
1865
|
-
for (const m in e) {
|
|
1866
|
-
const o = e[m];
|
|
1867
|
-
if (o) {
|
|
1868
|
-
if (this.special.isSpecial(o)) {
|
|
1869
|
-
for (let p = r; p < i.length && (r++, !((c = i == null ? void 0 : i[p]) != null && c.match(s))); p++)
|
|
1870
|
-
;
|
|
1871
|
-
s = this.match.get(o);
|
|
1872
|
-
} else if (o.match(s)) {
|
|
1873
|
-
let p = !1;
|
|
1874
|
-
for (let f = r; f < i.length; f++) {
|
|
1875
|
-
const g = i[f];
|
|
1876
|
-
if (r++, g != null && g.match(s)) {
|
|
1877
|
-
o === g ? (i.splice(f, 1), r--) : p = !0;
|
|
1878
|
-
break;
|
|
1879
|
-
}
|
|
1880
|
-
}
|
|
1881
|
-
if (p)
|
|
1882
|
-
break;
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
return i;
|
|
1887
|
-
}
|
|
1888
|
-
/**
|
|
1889
|
-
* Restores caret (selection) position
|
|
1890
|
-
*
|
|
1891
|
-
* Восстанавливает позицию курсора (выделения)
|
|
1892
|
-
* @param updateBuffer update from buffer first/ сначала обновить из буфера
|
|
1893
|
-
*/
|
|
1894
|
-
goSelection(t = !0) {
|
|
1895
|
-
return this.focus.is() && requestAnimationFrame(() => {
|
|
1896
|
-
if (this.element.value && (!t || !this.goBuffer())) {
|
|
1897
|
-
const e = this.valueBasic.getLength(), i = this.selection.getShift(), s = e < i ? e : i;
|
|
1898
|
-
this.element.value.selectionEnd = s, this.element.value.selectionStart = s;
|
|
1899
|
-
}
|
|
1900
|
-
}), this;
|
|
1901
|
-
}
|
|
1902
|
-
/**
|
|
1903
|
-
* Processes buffered data if present and emits events
|
|
1904
|
-
*
|
|
1905
|
-
* Обрабатывает данные из буфера (если есть) и вызывает события
|
|
1906
|
-
* @returns was buffer consumed/ был ли использован буфер
|
|
1907
|
-
*/
|
|
1908
|
-
goBuffer() {
|
|
1909
|
-
return this.buffer.is() ? (this.add(this.selection.getShift(), this.buffer.get()), this.buffer.resetChars(), !0) : (this.buffer.reset(), this.emit.go(), !1);
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
class $t {
|
|
1913
|
-
/**
|
|
1914
|
-
* Constructor
|
|
1915
|
-
* @param buffer object for managing cached input data/ объект управления кешированными вводимыми данными
|
|
1916
|
-
* @param focus object for handling input field focus/ объект для работы с фокусировкой поля ввода
|
|
1917
|
-
* @param characterLength object for managing input length/ объект управления длиной ввода
|
|
1918
|
-
* @param right object for right alignment/ объект для выравнивания направо
|
|
1919
|
-
* @param selection object for managing cursor position/ объект для управления положением курсора
|
|
1920
|
-
* @param valueBasic object for working with base values/ объект для работы с базовыми значениями
|
|
1921
|
-
* @param emit object for handling callback events/ объект для работы с обратными событиями
|
|
1922
|
-
* @param data object for managing input/ объект для управления вводом
|
|
1923
|
-
*/
|
|
1924
|
-
constructor(t, e, i, s, r, n, l, c) {
|
|
1925
|
-
/** Change flag/ Флаг изменения */
|
|
1926
|
-
a(this, "change", !1);
|
|
1927
|
-
/** Unidentified selection data/ Данные неопознанного выделения */
|
|
1928
|
-
a(this, "unidentified");
|
|
1929
|
-
/**
|
|
1930
|
-
* Capture of the event in focus.
|
|
1931
|
-
*
|
|
1932
|
-
* Перехват события при получении фокуса.
|
|
1933
|
-
* @param event event object/ объект события
|
|
1934
|
-
*/
|
|
1935
|
-
a(this, "onFocus", (t) => {
|
|
1936
|
-
this.change = !1, this.focus.in(), this.emit.set("focus", t).go();
|
|
1937
|
-
});
|
|
1938
|
-
/**
|
|
1939
|
-
* Capture of the event when focus is lost.
|
|
1940
|
-
*
|
|
1941
|
-
* Перехват события при потере фокуса.
|
|
1942
|
-
* @param event event object/ объект события
|
|
1943
|
-
*/
|
|
1944
|
-
a(this, "onBlur", (t) => {
|
|
1945
|
-
this.change && this.emit.setType("change").go(), this.focus.out(), this.emit.set("blur", t).go();
|
|
1946
|
-
});
|
|
1947
|
-
/**
|
|
1948
|
-
* Intercepting key press to get a character.
|
|
1949
|
-
*
|
|
1950
|
-
* Перехват нажатия клавиши для получения символа.
|
|
1951
|
-
* @param event invoked event/ вызываемое событие
|
|
1952
|
-
*/
|
|
1953
|
-
a(this, "onKeydown", (t) => {
|
|
1954
|
-
const e = this.getSelectionInfo(t), { start: i, end: s } = e;
|
|
1955
|
-
this.emit.set("keydown", t).go(), this.isCut(t) && this.isSelection(e) && (this.data.pop(i, s), at(
|
|
1956
|
-
t.target.value.slice(i, s)
|
|
1957
|
-
).then()), !this.isMetaKey(t) && (this.isKey(t) ? t.key === "Backspace" ? (i > 0 || i !== s) && this.data.pop(i, s) : t.key.length <= 1 && (i === s ? this.buffer.go(t.key) && this.data.add(i, t.key) : (this.buffer.goStart(), this.data.pop(i, s).add(this.selection.getShift(), t.key))) : this.unidentified = e);
|
|
1958
|
-
});
|
|
1959
|
-
/**
|
|
1960
|
-
* Intercept key release to check arrow presses.
|
|
1961
|
-
*
|
|
1962
|
-
* Перехват отпускания клавиши для проверки нажатия стрелок.
|
|
1963
|
-
* @param event invoked event/ вызываемое событие
|
|
1964
|
-
*/
|
|
1965
|
-
a(this, "onKeyup", (t) => {
|
|
1966
|
-
this.emit.set("keyup", t).go(), !this.isMetaKey(t) && this.isKey(t) && [
|
|
1967
|
-
"ArrowUp",
|
|
1968
|
-
"ArrowRight",
|
|
1969
|
-
"ArrowDown",
|
|
1970
|
-
"ArrowLeft"
|
|
1971
|
-
].indexOf(t.key) >= 0 && (this.makeToEnd(t), this.makeToStart(t));
|
|
1972
|
-
});
|
|
1973
|
-
/**
|
|
1974
|
-
* Intercepting the event before data modification.
|
|
1975
|
-
*
|
|
1976
|
-
* Перехват события перед изменением данных.
|
|
1977
|
-
* @param event invoked event/ вызываемое событие
|
|
1978
|
-
*/
|
|
1979
|
-
a(this, "onBeforeinput", (t) => {
|
|
1980
|
-
this.emit.set("beforeinput", t).go(), this.unidentified || (this.makeChange(t), ht(t));
|
|
1981
|
-
});
|
|
1982
|
-
/**
|
|
1983
|
-
* Intercepting the event during data modification.
|
|
1984
|
-
*
|
|
1985
|
-
* Перехват события при изменении данных.
|
|
1986
|
-
* @param event invoked event/ вызываемое событие
|
|
1987
|
-
*/
|
|
1988
|
-
a(this, "onInput", (t) => {
|
|
1989
|
-
if (this.unidentified) {
|
|
1990
|
-
const e = t.target;
|
|
1991
|
-
(this.unidentified.length > e.value.length || this.unidentified.start !== this.unidentified.end) && this.data.pop(this.unidentified.start, this.unidentified.end), "data" in t ? t.data && this.buffer.go(t.data) && this.data.add(this.unidentified.start, t.data) : this.data.reset(e.value), this.makeChange(t), this.unidentified = void 0;
|
|
1992
|
-
}
|
|
1993
|
-
});
|
|
1994
|
-
/**
|
|
1995
|
-
* Intercept paste event for inserting data from clipboard.
|
|
1996
|
-
*
|
|
1997
|
-
* Перехват события вставки данных из буфера обмена.
|
|
1998
|
-
* @param event invoked event/ вызываемое событие
|
|
1999
|
-
*/
|
|
2000
|
-
a(this, "onPaste", (t) => {
|
|
2001
|
-
const { start: e, end: i } = this.getSelectionInfo(t);
|
|
2002
|
-
nt(t).then((s) => {
|
|
2003
|
-
const r = s.split("");
|
|
2004
|
-
e === i ? this.data.add(e, this.data.extra(r)) : this.data.pop(e, i).add(this.selection.getShift(), this.data.extra(r)), this.change = !0, this.emit.set("paste", t).go();
|
|
2005
|
-
}).catch((s) => console.error("getClipboardData", s));
|
|
2006
|
-
});
|
|
2007
|
-
/**
|
|
2008
|
-
* Intercept change event (autocomplete support).
|
|
2009
|
-
*
|
|
2010
|
-
* Перехват события изменения (поддержка автозаполнения).
|
|
2011
|
-
* @param event invoked event/ вызываемое событие
|
|
2012
|
-
*/
|
|
2013
|
-
a(this, "onChange", (t) => {
|
|
2014
|
-
const e = t.target;
|
|
2015
|
-
this.data.reset(e.value), this.emit.set("change", t).go();
|
|
2016
|
-
});
|
|
2017
|
-
/**
|
|
2018
|
-
* Intercept click to adjust selection if needed.
|
|
2019
|
-
*
|
|
2020
|
-
* Перехват клика для корректировки выделения при необходимости.
|
|
2021
|
-
* @param event invoked event/ вызываемое событие
|
|
2022
|
-
*/
|
|
2023
|
-
a(this, "onClick", (t) => {
|
|
2024
|
-
this.makeToEnd(t), this.makeToStart(t);
|
|
2025
|
-
});
|
|
2026
|
-
this.buffer = t, this.focus = e, this.characterLength = i, this.right = s, this.selection = r, this.valueBasic = n, this.emit = l, this.data = c;
|
|
2027
|
-
}
|
|
2028
|
-
/**
|
|
2029
|
-
* Was a meta button pressed.
|
|
2030
|
-
*
|
|
2031
|
-
* Была ли нажата мета-кнопка.
|
|
2032
|
-
* @param event invoked event/ вызываемое событие
|
|
2033
|
-
*/
|
|
2034
|
-
isMetaKey(t) {
|
|
2035
|
-
return t.metaKey || t.altKey || t.ctrlKey;
|
|
2036
|
-
}
|
|
2037
|
-
/**
|
|
2038
|
-
* Was a cut operation performed.
|
|
2039
|
-
*
|
|
2040
|
-
* Была ли выполнена операция вырезания.
|
|
2041
|
-
* @param event invoked event/ вызываемое событие
|
|
2042
|
-
*/
|
|
2043
|
-
isCut(t) {
|
|
2044
|
-
return t.type === "cut" || !!(t.key.toLowerCase() === "x" && (t.metaKey || t.ctrlKey));
|
|
2045
|
-
}
|
|
2046
|
-
/**
|
|
2047
|
-
* Checks key value in the event.
|
|
2048
|
-
*
|
|
2049
|
-
* Проверяет значение key в событии.
|
|
2050
|
-
* @param event invoked event/ вызываемое событие
|
|
2051
|
-
*/
|
|
2052
|
-
isKey(t) {
|
|
2053
|
-
return "key" in t && t.key !== "Unidentified";
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* Was there a selection.
|
|
2057
|
-
*
|
|
2058
|
-
* Было ли выделение.
|
|
2059
|
-
* @param info selection data/ данные выделения
|
|
2060
|
-
*/
|
|
2061
|
-
isSelection(t) {
|
|
2062
|
-
const { start: e, end: i } = t;
|
|
2063
|
-
return e > 0 || e !== i;
|
|
2064
|
-
}
|
|
2065
|
-
/**
|
|
2066
|
-
* Getting data about selection on the event element.
|
|
2067
|
-
*
|
|
2068
|
-
* Получение данных о выделении у элемента события.
|
|
2069
|
-
* @param event invoked event/ вызываемое событие
|
|
2070
|
-
*/
|
|
2071
|
-
getSelectionInfo(t) {
|
|
2072
|
-
var i, s;
|
|
2073
|
-
const e = t.target;
|
|
2074
|
-
return {
|
|
2075
|
-
target: e,
|
|
2076
|
-
start: (i = e.selectionStart) != null ? i : 0,
|
|
2077
|
-
end: (s = e.selectionEnd) != null ? s : 0,
|
|
2078
|
-
length: e.value.length
|
|
2079
|
-
};
|
|
2080
|
-
}
|
|
2081
|
-
/**
|
|
2082
|
-
* Preparing to send an event.
|
|
2083
|
-
*
|
|
2084
|
-
* Подготовка для отправки события.
|
|
2085
|
-
* @param event invoked event/ вызываемое событие
|
|
2086
|
-
*/
|
|
2087
|
-
makeChange(t) {
|
|
2088
|
-
this.change = !0, this.emit.set("input", t), !this.buffer.is() && (this.emit.go(), this.emit.resetType());
|
|
2089
|
-
}
|
|
2090
|
-
/**
|
|
2091
|
-
* Changes cursor position if alignment is right.
|
|
2092
|
-
*
|
|
2093
|
-
* Изменяет позицию курсора, если выравнивание справа.
|
|
2094
|
-
* @param event invoked event/ вызываемое событие
|
|
2095
|
-
*/
|
|
2096
|
-
makeToEnd(t) {
|
|
2097
|
-
if (this.right.isRight()) {
|
|
2098
|
-
const e = this.valueBasic.getLength(), { target: i, start: s, end: r } = this.getSelectionInfo(t);
|
|
2099
|
-
s > e && (i.selectionStart = e), r > e && (i.selectionEnd = e);
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
/**
|
|
2103
|
-
* Check selection from the start (before special chars).
|
|
2104
|
-
*
|
|
2105
|
-
* Проверка выделения спереди (перед спецсимволами).
|
|
2106
|
-
* @param event invoked event/ вызываемое событие
|
|
2107
|
-
*/
|
|
2108
|
-
makeToStart(t) {
|
|
2109
|
-
const e = this.selection.getFirst(), { target: i, start: s } = this.getSelectionInfo(t);
|
|
2110
|
-
s < e && (i.selectionStart = e, i.selectionEnd = e);
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
class Kt {
|
|
2114
|
-
/**
|
|
2115
|
-
* Constructor
|
|
2116
|
-
* @param props input data/ входные данные
|
|
2117
|
-
* @param refs input data in the form of reactive elements/ входные данные в виде реактивных элементов
|
|
2118
|
-
* @param element input element/ элемент ввода
|
|
2119
|
-
* @param classDesign design name/ название дизайна
|
|
2120
|
-
* @param className class name/ название класса
|
|
2121
|
-
* @param components object for working with components/ объект для работы с компонентами
|
|
2122
|
-
* @param slots object for working with slots/ объект для работы со слотами
|
|
2123
|
-
* @param emits the function is called when an event is triggered/ функция вызывается, когда срабатывает событие
|
|
2124
|
-
* @param MaskTypeConstructor class for working with mask type/ класс для работы с типом маски
|
|
2125
|
-
* @param MaskBufferConstructor class for working with mask buffer/ класс для работы с буфером маски
|
|
2126
|
-
* @param MaskFocusConstructor class for working with mask focus/ класс для работы с фокусом маски
|
|
2127
|
-
* @param MaskCharacterLengthConstructor class for working with mask character length/ класс для работы с длиной символов маски
|
|
2128
|
-
* @param MaskRubberItemConstructor class for working with mask rubber item/ класс для работы с резиновым элементом маски
|
|
2129
|
-
* @param MaskRubberTransitionConstructor class for working with mask rubber transition/ класс для работы с переходом резины маски
|
|
2130
|
-
* @param MaskDateConstructor class for working with mask date/ класс для работы с датой маски
|
|
2131
|
-
* @param MaskFormatConstructor class for working with mask format/ класс для работы с форматом маски
|
|
2132
|
-
* @param MaskSpecialConstructor class for working with mask special/ класс для работы со специальными символами маски
|
|
2133
|
-
* @param MaskMatchConstructor class for working with mask match/ класс для работы с совпадением маски
|
|
2134
|
-
* @param MaskPatternConstructor class for working with mask pattern/ класс для работы с шаблоном маски
|
|
2135
|
-
* @param MaskRightConstructor class for working with mask right/ класс для работы с выравниванием справа маски
|
|
2136
|
-
* @param MaskRubberConstructor class for working with mask rubber/ класс для работы с резиной маски
|
|
2137
|
-
* @param MaskItemConstructor class for working with mask item/ класс для работы с элементом маски
|
|
2138
|
-
* @param MaskSelectionConstructor class for working with mask selection/ класс для работы с выделением маски
|
|
2139
|
-
* @param MaskCharacterConstructor class for working with mask character/ класс для работы с символом маски
|
|
2140
|
-
* @param MaskValueBasicConstructor class for working with mask value basic/ класс для работы с базовым значением маски
|
|
2141
|
-
* @param MaskValueConstructor class for working with mask value/ класс для работы со значением маски
|
|
2142
|
-
* @param MaskValidationConstructor class for working with mask validation/ класс для работы с валидацией маски
|
|
2143
|
-
* @param MaskViewConstructor class for working with mask view/ класс для работы с отображением маски
|
|
2144
|
-
* @param MaskEmitConstructor class for working with mask emit/ класс для работы с событиями маски
|
|
2145
|
-
* @param MaskDataConstructor class for working with mask data/ класс для работы с данными маски
|
|
2146
|
-
* @param MaskEventConstructor class for working with mask event/ класс для работы с событием маски
|
|
2147
|
-
*/
|
|
2148
|
-
constructor(t, e, i, s, r, n, l, c, m = mt, o = ft, p = gt, f = dt, g = vt, I = bt, w = kt, E = St, V = Ct, N = It, A = wt, O = xt, $ = Bt, K = Dt, R = Mt, _ = Tt, j = Ft, P = Et, Y = Vt, H = Nt, G = At, U = Ot, q = $t) {
|
|
2149
|
-
/** Type helper/ Объект для работы с типом */
|
|
2150
|
-
a(this, "type");
|
|
2151
|
-
/** Buffer helper/ Объект для буферизации ввода */
|
|
2152
|
-
a(this, "buffer");
|
|
2153
|
-
/** Focus helper/ Объект для работы с фокусом */
|
|
2154
|
-
a(this, "focus");
|
|
2155
|
-
/** Entered characters length helper/ Объект длины введённых символов */
|
|
2156
|
-
a(this, "characterLength");
|
|
2157
|
-
/** Rubber groups length helper/ Объект длины резиновых групп */
|
|
2158
|
-
a(this, "rubberItem");
|
|
2159
|
-
/** Rubber transition symbol helper/ Объект символа перехода резины */
|
|
2160
|
-
a(this, "rubberTransition");
|
|
2161
|
-
/** Date/time mask helper/ Объект для работы с датой/временем */
|
|
2162
|
-
a(this, "date");
|
|
2163
|
-
/** Number/currency format mask helper/ Объект форматирования числа/валюты */
|
|
2164
|
-
a(this, "format");
|
|
2165
|
-
/** Special symbols/groups helper/ Объект для спецсимволов и групп */
|
|
2166
|
-
a(this, "special");
|
|
2167
|
-
/** Match helper/ Объект проверки символов */
|
|
2168
|
-
a(this, "match");
|
|
2169
|
-
/** Pattern helper/ Объект паттернов валидации */
|
|
2170
|
-
a(this, "pattern");
|
|
2171
|
-
/** Alignment helper/ Объект выравнивания */
|
|
2172
|
-
a(this, "right");
|
|
2173
|
-
/** Rubber groups helper/ Объект для работы с резиновыми группами */
|
|
2174
|
-
a(this, "rubber");
|
|
2175
|
-
/** Mask item helper/ Объект для работы с маской */
|
|
2176
|
-
a(this, "item");
|
|
2177
|
-
/** Selection helper/ Объект для работы с выделением */
|
|
2178
|
-
a(this, "selection");
|
|
2179
|
-
/** Characters helper/ Объект для работы с введёнными символами */
|
|
2180
|
-
a(this, "character");
|
|
2181
|
-
/** Basic value helper/ Объект для работы с базовыми значениями */
|
|
2182
|
-
a(this, "valueBasic");
|
|
2183
|
-
/** Value helper/ Объект для работы с итоговым значением */
|
|
2184
|
-
a(this, "value");
|
|
2185
|
-
/** Validation helper/ Объект для работы с валидацией */
|
|
2186
|
-
a(this, "validation");
|
|
2187
|
-
/** View helper/ Объект для работы с отображением */
|
|
2188
|
-
a(this, "view");
|
|
2189
|
-
/** Emit helper/ Объект для работы с событиями */
|
|
2190
|
-
a(this, "emit");
|
|
2191
|
-
/** Data helper/ Объект для работы с вводом */
|
|
2192
|
-
a(this, "data");
|
|
2193
|
-
/** Event helper/ Объект для работы с DOM-событиями */
|
|
2194
|
-
a(this, "event");
|
|
2195
|
-
/** Receiving basic standard values/ Получение базовых стандартных значений */
|
|
2196
|
-
a(this, "basic", u(() => {
|
|
2197
|
-
if (this.right.isRight()) {
|
|
2198
|
-
let t = "";
|
|
2199
|
-
return this.view.item.value.forEach((e) => {
|
|
2200
|
-
t += e.value;
|
|
2201
|
-
}), t;
|
|
2202
|
-
}
|
|
2203
|
-
return this.view.input.value;
|
|
2204
|
-
}));
|
|
2205
|
-
/** Values for CSS class/ Значения для CSS-класса */
|
|
2206
|
-
a(this, "classes", u(() => ({
|
|
2207
|
-
[`${this.className}--value`]: this.characterLength.is(),
|
|
2208
|
-
[`${this.className}--end`]: this.right.isEnd()
|
|
2209
|
-
})));
|
|
2210
|
-
/**
|
|
2211
|
-
* Sets new value and reinitializes mask.
|
|
2212
|
-
*
|
|
2213
|
-
* Устанавливает новое значение и переинициализирует маску.
|
|
2214
|
-
* @param value new value/ новое значение
|
|
2215
|
-
*/
|
|
2216
|
-
a(this, "set", (t) => this.reset(t));
|
|
2217
|
-
/**
|
|
2218
|
-
* Clears value to default and focuses input.
|
|
2219
|
-
*
|
|
2220
|
-
* Очищает значение до значения по умолчанию и фокусирует поле ввода.
|
|
2221
|
-
*/
|
|
2222
|
-
a(this, "clear", () => {
|
|
2223
|
-
var t, e;
|
|
2224
|
-
this.data.reset(((t = this.props.valueDefault) != null ? t : "").toString()), this.emit.set("reset", {}).go(), (e = this.element.value) == null || e.focus();
|
|
2225
|
-
});
|
|
2226
|
-
this.props = t, this.refs = e, this.element = i, this.classDesign = s, this.className = r, this.components = n, this.slots = l, this.emits = c, this.type = new m(this.props), this.buffer = new o(), this.focus = new p(this.buffer), this.characterLength = new f(), this.rubberItem = new g(), this.rubberTransition = new I(), this.date = new w(this.props, this.type), this.format = new E(this.props, this.type, this.rubberItem), this.special = new V(
|
|
2227
|
-
this.props,
|
|
2228
|
-
this.type,
|
|
2229
|
-
this.date,
|
|
2230
|
-
this.format
|
|
2231
|
-
), this.match = new N(this.props, this.special), this.pattern = new A(
|
|
2232
|
-
this.props,
|
|
2233
|
-
this.type,
|
|
2234
|
-
this.date,
|
|
2235
|
-
this.special
|
|
2236
|
-
), this.right = new O(this.props, this.type), this.rubber = new $(
|
|
2237
|
-
this.props,
|
|
2238
|
-
this.type,
|
|
2239
|
-
this.rubberItem,
|
|
2240
|
-
this.rubberTransition,
|
|
2241
|
-
this.special,
|
|
2242
|
-
this.match,
|
|
2243
|
-
this.format
|
|
2244
|
-
), this.item = new K(
|
|
2245
|
-
this.props,
|
|
2246
|
-
this.type,
|
|
2247
|
-
this.rubberItem,
|
|
2248
|
-
this.characterLength,
|
|
2249
|
-
this.date,
|
|
2250
|
-
this.format,
|
|
2251
|
-
this.special
|
|
2252
|
-
), this.selection = new R(
|
|
2253
|
-
this.special,
|
|
2254
|
-
this.item
|
|
2255
|
-
), this.character = new _(
|
|
2256
|
-
this.props,
|
|
2257
|
-
this.rubberItem,
|
|
2258
|
-
this.characterLength,
|
|
2259
|
-
this.special,
|
|
2260
|
-
this.item,
|
|
2261
|
-
this.selection
|
|
2262
|
-
), this.valueBasic = new j(
|
|
2263
|
-
this.rubberTransition,
|
|
2264
|
-
this.item,
|
|
2265
|
-
this.special,
|
|
2266
|
-
this.character
|
|
2267
|
-
), this.value = new P(
|
|
2268
|
-
this.props,
|
|
2269
|
-
this.type,
|
|
2270
|
-
this.date,
|
|
2271
|
-
this.format,
|
|
2272
|
-
this.item,
|
|
2273
|
-
this.special,
|
|
2274
|
-
this.valueBasic
|
|
2275
|
-
), this.validation = new Y(
|
|
2276
|
-
this.pattern,
|
|
2277
|
-
this.value
|
|
2278
|
-
), this.view = new H(
|
|
2279
|
-
this.props,
|
|
2280
|
-
this.type,
|
|
2281
|
-
this.date,
|
|
2282
|
-
this.format,
|
|
2283
|
-
this.special,
|
|
2284
|
-
this.rubber,
|
|
2285
|
-
this.item,
|
|
2286
|
-
this.valueBasic,
|
|
2287
|
-
this.validation,
|
|
2288
|
-
this.className
|
|
2289
|
-
), this.emit = new G(
|
|
2290
|
-
this.validation,
|
|
2291
|
-
this.emits
|
|
2292
|
-
), this.data = new U(
|
|
2293
|
-
this.type,
|
|
2294
|
-
this.buffer,
|
|
2295
|
-
this.focus,
|
|
2296
|
-
this.rubberTransition,
|
|
2297
|
-
this.date,
|
|
2298
|
-
this.special,
|
|
2299
|
-
this.match,
|
|
2300
|
-
this.rubber,
|
|
2301
|
-
this.item,
|
|
2302
|
-
this.selection,
|
|
2303
|
-
this.character,
|
|
2304
|
-
this.valueBasic,
|
|
2305
|
-
this.value,
|
|
2306
|
-
this.emit,
|
|
2307
|
-
this.element
|
|
2308
|
-
), this.event = new q(
|
|
2309
|
-
this.buffer,
|
|
2310
|
-
this.focus,
|
|
2311
|
-
this.characterLength,
|
|
2312
|
-
this.right,
|
|
2313
|
-
this.selection,
|
|
2314
|
-
this.valueBasic,
|
|
2315
|
-
this.emit,
|
|
2316
|
-
this.data
|
|
2317
|
-
), y([e.value], () => this.reset(t.value)), y(this.basic, () => this.data.goSelection(!1)), y([ut.getStandard(), e.language], () => this.reset(this.value.getValueCache())), t.value && this.data.reset(L(t.value));
|
|
2318
|
-
}
|
|
2319
|
-
/**
|
|
2320
|
-
* Resets all values or updates to the new one.
|
|
2321
|
-
*
|
|
2322
|
-
* Сбрасывает все значения или обновляется до нового.
|
|
2323
|
-
* @param value new values/ новые значения
|
|
2324
|
-
*/
|
|
2325
|
-
reset(t) {
|
|
2326
|
-
const e = L(t);
|
|
2327
|
-
return e !== this.props.valueDefault && (this.value.item.value !== e || this.valueBasic.item.value !== e && !lt(e)) ? (this.data.reset(e), this.emit.set("reset", {}).go(), !0) : !1;
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
class Gt extends ct {
|
|
2331
|
-
/**
|
|
2332
|
-
* Constructor
|
|
2333
|
-
* @param name class name/ название класса
|
|
2334
|
-
* @param props properties/ свойства
|
|
2335
|
-
* @param options list of additional parameters/ список дополнительных параметров
|
|
2336
|
-
* @param ItemConstructor mask item class/ класс элемента маски
|
|
2337
|
-
*/
|
|
2338
|
-
constructor(e, i, s, r = Kt) {
|
|
2339
|
-
super(
|
|
2340
|
-
e,
|
|
2341
|
-
i,
|
|
2342
|
-
s
|
|
2343
|
-
);
|
|
2344
|
-
a(this, "item");
|
|
2345
|
-
/**
|
|
2346
|
-
* Element for storing the final data.
|
|
2347
|
-
*
|
|
2348
|
-
* Элемент для хранения конечных данных.
|
|
2349
|
-
*/
|
|
2350
|
-
a(this, "renderData", () => this.props.name ? [
|
|
2351
|
-
d("input", {
|
|
2352
|
-
type: "hidden",
|
|
2353
|
-
name: this.props.name,
|
|
2354
|
-
value: this.item.value.item.value
|
|
2355
|
-
})
|
|
2356
|
-
] : []);
|
|
2357
|
-
/**
|
|
2358
|
-
* Rendering method for input.
|
|
2359
|
-
*
|
|
2360
|
-
* Метод рендеринга для ввода.
|
|
2361
|
-
*/
|
|
2362
|
-
a(this, "renderInput", () => {
|
|
2363
|
-
var e;
|
|
2364
|
-
return [
|
|
2365
|
-
d(
|
|
2366
|
-
"input",
|
|
2367
|
-
ot(
|
|
2368
|
-
this.props.inputAttrs,
|
|
2369
|
-
{
|
|
2370
|
-
ref: this.element,
|
|
2371
|
-
class: (e = this.classes) == null ? void 0 : e.value.input,
|
|
2372
|
-
type: "text",
|
|
2373
|
-
value: this.item.basic.value,
|
|
2374
|
-
placeholder: "",
|
|
2375
|
-
onFocus: this.item.event.onFocus,
|
|
2376
|
-
onBlur: this.item.event.onBlur,
|
|
2377
|
-
onKeydown: this.item.event.onKeydown,
|
|
2378
|
-
onKeyup: this.item.event.onKeyup,
|
|
2379
|
-
onBeforeinput: this.item.event.onBeforeinput,
|
|
2380
|
-
onInput: this.item.event.onInput,
|
|
2381
|
-
onChange: this.item.event.onChange,
|
|
2382
|
-
onPaste: this.item.event.onPaste,
|
|
2383
|
-
onClick: this.item.event.onClick
|
|
2384
|
-
}
|
|
2385
|
-
)
|
|
2386
|
-
)
|
|
2387
|
-
];
|
|
2388
|
-
});
|
|
2389
|
-
/**
|
|
2390
|
-
* Rendering method for displaying the mask and the input data.
|
|
2391
|
-
*
|
|
2392
|
-
* Метод рендеринга для вывода маски и вводимых данных.
|
|
2393
|
-
*/
|
|
2394
|
-
a(this, "renderView", () => {
|
|
2395
|
-
var r;
|
|
2396
|
-
const e = this.item.view.item.value, i = [];
|
|
2397
|
-
let s;
|
|
2398
|
-
return e.length > 0 ? e.forEach((n, l) => {
|
|
2399
|
-
i.push(
|
|
2400
|
-
d("span", {
|
|
2401
|
-
key: l,
|
|
2402
|
-
class: n.className,
|
|
2403
|
-
innerHTML: n.value === " " ? " " : n.value
|
|
2404
|
-
})
|
|
2405
|
-
);
|
|
2406
|
-
}) : s = " ", [
|
|
2407
|
-
d(
|
|
2408
|
-
"span",
|
|
2409
|
-
{
|
|
2410
|
-
class: (r = this.classes) == null ? void 0 : r.value.character,
|
|
2411
|
-
"data-length": "1",
|
|
2412
|
-
...pt.hidden(),
|
|
2413
|
-
innerHTML: s
|
|
2414
|
-
},
|
|
2415
|
-
i
|
|
2416
|
-
)
|
|
2417
|
-
];
|
|
2418
|
-
});
|
|
2419
|
-
this.item = new r(
|
|
2420
|
-
this.props,
|
|
2421
|
-
this.refs,
|
|
2422
|
-
this.element,
|
|
2423
|
-
this.getDesign(),
|
|
2424
|
-
this.getName(),
|
|
2425
|
-
this.components,
|
|
2426
|
-
this.slots,
|
|
2427
|
-
this.emits
|
|
2428
|
-
), this.init();
|
|
2429
|
-
}
|
|
2430
|
-
/**
|
|
2431
|
-
* Initialization of all the necessary properties for work
|
|
2432
|
-
*
|
|
2433
|
-
* Инициализация всех необходимых свойств для работы.
|
|
2434
|
-
*/
|
|
2435
|
-
initExpose() {
|
|
2436
|
-
return {
|
|
2437
|
-
valueBasic: this.item.basic,
|
|
2438
|
-
value: this.item.value.item,
|
|
2439
|
-
setValue: this.item.set,
|
|
2440
|
-
clear: this.item.clear
|
|
2441
|
-
};
|
|
2442
|
-
}
|
|
2443
|
-
/**
|
|
2444
|
-
* Improvement of the obtained list of classes.
|
|
2445
|
-
*
|
|
2446
|
-
* Доработка полученного списка классов.
|
|
2447
|
-
*/
|
|
2448
|
-
initClasses() {
|
|
2449
|
-
return {
|
|
2450
|
-
main: this.item.classes.value,
|
|
2451
|
-
// :classes [!] System label / Системная метка
|
|
2452
|
-
input: this.getSubClass("input"),
|
|
2453
|
-
character: this.getSubClass("character"),
|
|
2454
|
-
characterItem: this.getSubClass("character__item")
|
|
2455
|
-
};
|
|
2456
|
-
}
|
|
2457
|
-
/**
|
|
2458
|
-
* Refinement of the received list of styles.
|
|
2459
|
-
*
|
|
2460
|
-
* Доработка полученного списка стилей.
|
|
2461
|
-
*/
|
|
2462
|
-
initStyles() {
|
|
2463
|
-
return {};
|
|
2464
|
-
}
|
|
2465
|
-
/**
|
|
2466
|
-
* A method for rendering.
|
|
2467
|
-
*
|
|
2468
|
-
* Метод для рендеринга.
|
|
2469
|
-
*/
|
|
2470
|
-
initRender() {
|
|
2471
|
-
var i;
|
|
2472
|
-
const e = [
|
|
2473
|
-
...this.renderData(),
|
|
2474
|
-
...this.renderInput(),
|
|
2475
|
-
...this.renderView()
|
|
2476
|
-
];
|
|
2477
|
-
return d("span", {
|
|
2478
|
-
...this.getAttrs(),
|
|
2479
|
-
class: (i = this.classes) == null ? void 0 : i.value.main
|
|
2480
|
-
}, e);
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
export {
|
|
2484
|
-
b as MASK_CHAR_DELETE,
|
|
2485
|
-
Lt as MASK_VIEW_DEFAULT,
|
|
2486
|
-
Kt as Mask,
|
|
2487
|
-
Gt as MaskDesign,
|
|
2488
|
-
Ht as defaultsMask
|
|
1
|
+
import { t as e } from "./AriaStaticInclude-CS1hPGyK.js";
|
|
2
|
+
import { t } from "./defineProperty-hmGKPWdq.js";
|
|
3
|
+
import { t as n } from "./FieldInputCheckInclude-czZ02ymY.js";
|
|
4
|
+
import { t as r } from "./MaskInclude-DuE6XcDZ.js";
|
|
5
|
+
import { computed as i, h as a, ref as o, watch as s } from "vue";
|
|
6
|
+
import { Datetime as c, DesignConstructorAbstract as l, GeoIntl as u, GeoRef as d, anyToString as f, eventStopPropagation as p, forEach as m, getClipboardData as h, getColumn as g, getExp as _, getMaxLengthAllArray as v, isArray as y, isFilled as ee, isFloat as b, isObject as x, isObjectNotArray as S, isSelected as C, isString as w, replaceRecursive as T, strFill as E, toArray as D, toBinds as O, writeClipboardData as k } from "@dxtmisha/functional";
|
|
7
|
+
//#region src/constructors/Mask/MaskType.ts
|
|
8
|
+
var A = class {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
t(this, "item", i(() => {
|
|
11
|
+
var e;
|
|
12
|
+
return (e = this.props.type) == null ? "text" : e;
|
|
13
|
+
})), this.props = e;
|
|
14
|
+
}
|
|
15
|
+
isNumber() {
|
|
16
|
+
return this.item.value === "number";
|
|
17
|
+
}
|
|
18
|
+
isNumberFormat() {
|
|
19
|
+
return this.item.value === "number-format";
|
|
20
|
+
}
|
|
21
|
+
isCurrency() {
|
|
22
|
+
return this.item.value === "currency";
|
|
23
|
+
}
|
|
24
|
+
isCurrencyOrNumber() {
|
|
25
|
+
return this.isNumber() || this.isNumberFormat() || this.isCurrency();
|
|
26
|
+
}
|
|
27
|
+
isTime() {
|
|
28
|
+
return [
|
|
29
|
+
"full",
|
|
30
|
+
"datetime",
|
|
31
|
+
"time",
|
|
32
|
+
"hour-minute",
|
|
33
|
+
"hour",
|
|
34
|
+
"minute",
|
|
35
|
+
"second"
|
|
36
|
+
].indexOf(this.item.value) !== -1;
|
|
37
|
+
}
|
|
38
|
+
isDate() {
|
|
39
|
+
return this.isTime() || [
|
|
40
|
+
"date",
|
|
41
|
+
"year",
|
|
42
|
+
"year-month",
|
|
43
|
+
"month",
|
|
44
|
+
"day",
|
|
45
|
+
"day-month"
|
|
46
|
+
].indexOf(this.item.value) !== -1;
|
|
47
|
+
}
|
|
48
|
+
getByDate() {
|
|
49
|
+
return this.isDate() ? this.item.value : "date";
|
|
50
|
+
}
|
|
51
|
+
}, j = class {
|
|
52
|
+
constructor() {
|
|
53
|
+
t(this, "chars", []), t(this, "start", !1);
|
|
54
|
+
}
|
|
55
|
+
is() {
|
|
56
|
+
return this.chars.length > 0;
|
|
57
|
+
}
|
|
58
|
+
get() {
|
|
59
|
+
return this.chars;
|
|
60
|
+
}
|
|
61
|
+
add(e) {
|
|
62
|
+
return this.chars.push(e), this;
|
|
63
|
+
}
|
|
64
|
+
go(e) {
|
|
65
|
+
return this.start ? (this.add(e), !1) : (this.goStart(), !0);
|
|
66
|
+
}
|
|
67
|
+
goStart() {
|
|
68
|
+
return this.start = !0, this;
|
|
69
|
+
}
|
|
70
|
+
reset() {
|
|
71
|
+
return this.resetChars(), this.start = !1, this;
|
|
72
|
+
}
|
|
73
|
+
resetChars() {
|
|
74
|
+
return this.chars = [], this;
|
|
75
|
+
}
|
|
76
|
+
}, M = class {
|
|
77
|
+
constructor(e) {
|
|
78
|
+
t(this, "value", !1), this.buffer = e;
|
|
79
|
+
}
|
|
80
|
+
is() {
|
|
81
|
+
return this.value;
|
|
82
|
+
}
|
|
83
|
+
in() {
|
|
84
|
+
this.value = !0, this.buffer.reset();
|
|
85
|
+
}
|
|
86
|
+
out() {
|
|
87
|
+
this.value = !1, this.buffer.reset();
|
|
88
|
+
}
|
|
89
|
+
}, N = class {
|
|
90
|
+
constructor() {
|
|
91
|
+
t(this, "length", o(0));
|
|
92
|
+
}
|
|
93
|
+
is() {
|
|
94
|
+
return this.length.value > 0;
|
|
95
|
+
}
|
|
96
|
+
get() {
|
|
97
|
+
return this.length.value;
|
|
98
|
+
}
|
|
99
|
+
set(e) {
|
|
100
|
+
return this.length.value = e, this;
|
|
101
|
+
}
|
|
102
|
+
}, P = class {
|
|
103
|
+
constructor() {
|
|
104
|
+
t(this, "item", o({}));
|
|
105
|
+
}
|
|
106
|
+
is(e) {
|
|
107
|
+
var t;
|
|
108
|
+
return Number((t = this.item.value) == null ? void 0 : t[e]) > 0;
|
|
109
|
+
}
|
|
110
|
+
getByIndex(e) {
|
|
111
|
+
var t, n;
|
|
112
|
+
return (t = (n = this.item.value) == null ? void 0 : n[e]) == null ? 0 : t;
|
|
113
|
+
}
|
|
114
|
+
add(e) {
|
|
115
|
+
return this.item.value = {
|
|
116
|
+
...this.item.value,
|
|
117
|
+
[e]: this.getByIndex(e) + 1
|
|
118
|
+
}, this;
|
|
119
|
+
}
|
|
120
|
+
pop(e) {
|
|
121
|
+
return this.is(e) ? (this.item.value = {
|
|
122
|
+
...this.item.value,
|
|
123
|
+
[e]: this.getByIndex(e) - 1
|
|
124
|
+
}, !0) : !1;
|
|
125
|
+
}
|
|
126
|
+
reset() {
|
|
127
|
+
return this.item.value = {}, this;
|
|
128
|
+
}
|
|
129
|
+
expandMask(e) {
|
|
130
|
+
let t = e;
|
|
131
|
+
return m(this.item.value, (e, n) => {
|
|
132
|
+
t = t.replace(_(n, "g", "([:value]+)"), (t) => `${t}${E(n, e)}`);
|
|
133
|
+
}), t;
|
|
134
|
+
}
|
|
135
|
+
}, F = class {
|
|
136
|
+
constructor() {
|
|
137
|
+
t(this, "item", o(""));
|
|
138
|
+
}
|
|
139
|
+
is() {
|
|
140
|
+
return this.item.value !== "";
|
|
141
|
+
}
|
|
142
|
+
isChar(e) {
|
|
143
|
+
return this.item.value === e;
|
|
144
|
+
}
|
|
145
|
+
set(e) {
|
|
146
|
+
return this.item.value = e, this;
|
|
147
|
+
}
|
|
148
|
+
reset() {
|
|
149
|
+
return this.set("");
|
|
150
|
+
}
|
|
151
|
+
}, I = {
|
|
152
|
+
Y: "[0-9]{4}",
|
|
153
|
+
M: {
|
|
154
|
+
type: "number",
|
|
155
|
+
min: "1",
|
|
156
|
+
max: "12"
|
|
157
|
+
},
|
|
158
|
+
D: (e) => {
|
|
159
|
+
var t, n, r, i;
|
|
160
|
+
return {
|
|
161
|
+
type: "number",
|
|
162
|
+
min: "1",
|
|
163
|
+
max: new c(`${(t = e == null || (n = e.Y) == null ? void 0 : n.value) == null ? "2000" : t}-${(r = e == null || (i = e.M) == null ? void 0 : i.value) == null ? "01" : r}-01`).getMaxDay().toString()
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
h: {
|
|
167
|
+
type: "number",
|
|
168
|
+
min: "0",
|
|
169
|
+
max: "23"
|
|
170
|
+
},
|
|
171
|
+
m: {
|
|
172
|
+
type: "number",
|
|
173
|
+
min: "0",
|
|
174
|
+
max: "59"
|
|
175
|
+
},
|
|
176
|
+
s: {
|
|
177
|
+
type: "number",
|
|
178
|
+
min: "0",
|
|
179
|
+
max: "59"
|
|
180
|
+
}
|
|
181
|
+
}, L = {
|
|
182
|
+
Y: "y",
|
|
183
|
+
M: "m",
|
|
184
|
+
D: "d",
|
|
185
|
+
h: "h",
|
|
186
|
+
m: "m",
|
|
187
|
+
s: "s"
|
|
188
|
+
}, R = class {
|
|
189
|
+
constructor(e, n) {
|
|
190
|
+
t(this, "mask", i(() => this.getDatetime().setHour24(!0).locale(void 0, "2-digit").replace("1987", "YYYY").replace("12", "MM").replace("18", "DD").replace("10", "hh").replace("20", "mm").replace("30", "ss").split(""))), this.props = e, this.type = n;
|
|
191
|
+
}
|
|
192
|
+
getDatetime(e) {
|
|
193
|
+
return new c(e == null ? "1987-12-18T10:20:30" : e, this.type.getByDate(), this.props.language);
|
|
194
|
+
}
|
|
195
|
+
getValue(e) {
|
|
196
|
+
return this.getDatetime(e).locale(void 0, "2-digit");
|
|
197
|
+
}
|
|
198
|
+
getValueStandard(e) {
|
|
199
|
+
let t = this.getValueStandardFull(e);
|
|
200
|
+
return t === "" ? "" : this.getDatetime(t).standard(!1);
|
|
201
|
+
}
|
|
202
|
+
getValueStandardFull(e) {
|
|
203
|
+
var t, n, r, i, a, o;
|
|
204
|
+
let s = `${(e == null || (t = e.Y) == null ? void 0 : t.value) || "2000"}-${(e == null || (n = e.M) == null ? void 0 : n.value) || "01"}-${(e == null || (r = e.D) == null ? void 0 : r.value) || "01"}T${(e == null || (i = e.h) == null ? void 0 : i.value) || "00"}:${(e == null || (a = e.m) == null ? void 0 : a.value) || "00"}:${(e == null || (o = e.s) == null ? void 0 : o.value) || "00"}`;
|
|
205
|
+
return isNaN(Date.parse(s)) ? "" : s;
|
|
206
|
+
}
|
|
207
|
+
getPattern() {
|
|
208
|
+
return I;
|
|
209
|
+
}
|
|
210
|
+
getSpecialDate() {
|
|
211
|
+
return [
|
|
212
|
+
"Y",
|
|
213
|
+
"M",
|
|
214
|
+
"D"
|
|
215
|
+
];
|
|
216
|
+
}
|
|
217
|
+
getSpecialFull() {
|
|
218
|
+
return [
|
|
219
|
+
...this.getSpecialDate(),
|
|
220
|
+
"h",
|
|
221
|
+
"m",
|
|
222
|
+
"s"
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
getView(e) {
|
|
226
|
+
return L == null ? void 0 : L[e];
|
|
227
|
+
}
|
|
228
|
+
}, z = class {
|
|
229
|
+
constructor(e, n, r) {
|
|
230
|
+
t(this, "special", {
|
|
231
|
+
n: {},
|
|
232
|
+
f: { defaultValue: "0" }
|
|
233
|
+
}), t(this, "rubber", i(() => ({
|
|
234
|
+
n: {
|
|
235
|
+
rubber: !0,
|
|
236
|
+
transitionChar: this.getDecimal(),
|
|
237
|
+
maxLength: 10
|
|
238
|
+
},
|
|
239
|
+
f: {
|
|
240
|
+
rubber: this.isFractionRubber(),
|
|
241
|
+
maxLength: 4
|
|
242
|
+
}
|
|
243
|
+
}))), t(this, "view", i(() => this.type.isNumber() ? "" : "0")), t(this, "fraction", i(() => {
|
|
244
|
+
if (this.type.isCurrency()) return 2;
|
|
245
|
+
let e = this.props.fraction;
|
|
246
|
+
return typeof e == "number" ? e : typeof e == "string" && e.match(/[0-9]+/) ? Number(e) : this.rubberItem.is("f") ? this.rubberItem.getByIndex("f") + 1 : e === !0 ? 1 : 0;
|
|
247
|
+
})), t(this, "mask", i(() => this.type.isCurrency() ? this.toSpecial(this.getCurrency()) : this.type.isNumberFormat() ? this.toSpecial(this.getNumberFormat()) : this.toSpecial(this.getNumber()))), this.props = e, this.type = n, this.rubberItem = r;
|
|
248
|
+
}
|
|
249
|
+
isFractionRubber() {
|
|
250
|
+
return this.props.fraction === !0;
|
|
251
|
+
}
|
|
252
|
+
getValueStandard(e) {
|
|
253
|
+
var t, n;
|
|
254
|
+
if (this.type.isNumber()) {
|
|
255
|
+
var r;
|
|
256
|
+
return (e == null || (r = e.n) == null ? void 0 : r.value) || "";
|
|
257
|
+
}
|
|
258
|
+
let i = `${(e == null || (t = e.n) == null ? void 0 : t.value) || "0"}.${(e == null || (n = e.f) == null ? void 0 : n.value) || "0"}`;
|
|
259
|
+
return i === "0.0" ? "0" : i;
|
|
260
|
+
}
|
|
261
|
+
getNumber() {
|
|
262
|
+
return this.getNumberForString();
|
|
263
|
+
}
|
|
264
|
+
getNumberFormat() {
|
|
265
|
+
return this.getIntl().number(this.getNumberForString(), { maximumFractionDigits: 9 });
|
|
266
|
+
}
|
|
267
|
+
getCurrency() {
|
|
268
|
+
return this.getIntl().currency(this.getNumberForString(), void 0, this.props.currencyHide);
|
|
269
|
+
}
|
|
270
|
+
getDecimal() {
|
|
271
|
+
return [this.getIntl().decimal(), "."];
|
|
272
|
+
}
|
|
273
|
+
getSpecial() {
|
|
274
|
+
return Object.keys(this.special);
|
|
275
|
+
}
|
|
276
|
+
getIntl() {
|
|
277
|
+
return new u(this.props.language);
|
|
278
|
+
}
|
|
279
|
+
getNumberForString() {
|
|
280
|
+
let e = this.fraction.value;
|
|
281
|
+
return `${E("9", this.rubberItem.getByIndex("n") + 1)}${e ? `.${E("3", e)}` : ""}${this.type.isCurrency() && this.props.currency ? ` ${this.props.currency}` : ""}`;
|
|
282
|
+
}
|
|
283
|
+
toSpecial(e) {
|
|
284
|
+
return e.replace(/9/gi, "n").replace(/3/gi, "f").split("");
|
|
285
|
+
}
|
|
286
|
+
}, B = class {
|
|
287
|
+
constructor(e, n, r, a) {
|
|
288
|
+
t(this, "item", i(() => {
|
|
289
|
+
if (this.type.isCurrencyOrNumber()) return this.format.getSpecial();
|
|
290
|
+
if (this.type.isTime()) return this.date.getSpecialFull();
|
|
291
|
+
if (this.type.isDate()) return this.date.getSpecialDate();
|
|
292
|
+
let e = this.special.value;
|
|
293
|
+
return y(e) ? e : x(e) ? Object.keys(e) : [e];
|
|
294
|
+
})), t(this, "rubberList", i(() => {
|
|
295
|
+
let e = {};
|
|
296
|
+
return S(this.special.value) && m(this.special.value, (t, n) => {
|
|
297
|
+
t != null && t.rubber && (e[n] = t);
|
|
298
|
+
}), e;
|
|
299
|
+
})), t(this, "special", i(() => {
|
|
300
|
+
var e;
|
|
301
|
+
return this.type.isCurrencyOrNumber() ? this.format.special : (e = this.props.special) == null ? "*" : e;
|
|
302
|
+
})), this.props = e, this.type = n, this.date = r, this.format = a;
|
|
303
|
+
}
|
|
304
|
+
isSpecial(e) {
|
|
305
|
+
return this.item.value.indexOf(e) !== -1;
|
|
306
|
+
}
|
|
307
|
+
isDefault(e) {
|
|
308
|
+
return !!this.getDefault(e);
|
|
309
|
+
}
|
|
310
|
+
getDefault(e) {
|
|
311
|
+
var t;
|
|
312
|
+
return (t = this.getSpecialItem(e)) == null ? void 0 : t.defaultValue;
|
|
313
|
+
}
|
|
314
|
+
getMatch(e) {
|
|
315
|
+
var t;
|
|
316
|
+
return (t = this.getSpecialItem(e)) == null ? void 0 : t.match;
|
|
317
|
+
}
|
|
318
|
+
getPattern(e) {
|
|
319
|
+
var t;
|
|
320
|
+
return (t = this.getSpecialItem(e)) == null ? void 0 : t.pattern;
|
|
321
|
+
}
|
|
322
|
+
getView(e) {
|
|
323
|
+
var t;
|
|
324
|
+
return (t = this.getSpecialItem(e)) == null ? void 0 : t.view;
|
|
325
|
+
}
|
|
326
|
+
getSpecialItem(e) {
|
|
327
|
+
let t = this.special.value;
|
|
328
|
+
if (S(t) && e in t) return t[e];
|
|
329
|
+
}
|
|
330
|
+
}, V = /[0-9]/, H = class {
|
|
331
|
+
constructor(e, t) {
|
|
332
|
+
this.props = e, this.special = t;
|
|
333
|
+
}
|
|
334
|
+
is(e, t) {
|
|
335
|
+
let n = this.get(t);
|
|
336
|
+
return n instanceof RegExp ? !!e.match(n) : w(n) ? !!e.match(new RegExp(n)) : !!e.match(V);
|
|
337
|
+
}
|
|
338
|
+
get(e) {
|
|
339
|
+
var t, n;
|
|
340
|
+
return (t = (n = e && this.special.getMatch(e)) == null ? this.props.match : n) == null ? V : t;
|
|
341
|
+
}
|
|
342
|
+
filter(e) {
|
|
343
|
+
let t = this.special.item.value;
|
|
344
|
+
return e.split("").filter((e) => t.find((t) => this.is(e, t)));
|
|
345
|
+
}
|
|
346
|
+
}, U = class {
|
|
347
|
+
constructor(e, r, a, o) {
|
|
348
|
+
t(this, "item", i(() => {
|
|
349
|
+
let e = {};
|
|
350
|
+
return m(this.list.value, (t, r) => {
|
|
351
|
+
e[r] = new n(t, r);
|
|
352
|
+
}), this.props.check && (e.check = new n(this.props.check)), e;
|
|
353
|
+
})), t(this, "list", i(() => {
|
|
354
|
+
let e = this.getByType();
|
|
355
|
+
for (let t in e) {
|
|
356
|
+
let n = this.getPattern(t);
|
|
357
|
+
e[t] && (w(n) ? Object.assign(e[t], { pattern: n }) : S(n) && S(e[t]) && Object.assign(e[t], n));
|
|
358
|
+
}
|
|
359
|
+
return e;
|
|
360
|
+
})), this.props = e, this.type = r, this.date = a, this.special = o;
|
|
361
|
+
}
|
|
362
|
+
isCheck() {
|
|
363
|
+
return !!this.props.check;
|
|
364
|
+
}
|
|
365
|
+
getInput(e = n.getGroupDefault()) {
|
|
366
|
+
var t;
|
|
367
|
+
return (t = this.item.value) == null ? void 0 : t[e];
|
|
368
|
+
}
|
|
369
|
+
getByType() {
|
|
370
|
+
if (this.type.isDate()) return this.date.getPattern();
|
|
371
|
+
let e = {};
|
|
372
|
+
return this.special.item.value.forEach((t) => {
|
|
373
|
+
e[t] = {};
|
|
374
|
+
}), e;
|
|
375
|
+
}
|
|
376
|
+
getPattern(e) {
|
|
377
|
+
var t;
|
|
378
|
+
return (t = e && this.special.getPattern(e)) == null ? this.props.pattern : t;
|
|
379
|
+
}
|
|
380
|
+
}, W = {
|
|
381
|
+
special: "*",
|
|
382
|
+
match: /[0-9]/,
|
|
383
|
+
type: "text",
|
|
384
|
+
groupSave: !0,
|
|
385
|
+
view: "_",
|
|
386
|
+
visible: !0
|
|
387
|
+
}, G = class {
|
|
388
|
+
constructor(e, t) {
|
|
389
|
+
this.props = e, this.type = t;
|
|
390
|
+
}
|
|
391
|
+
isEnd() {
|
|
392
|
+
return this.props.align !== "left" && (this.props.dir === "rtl" || this.type.isCurrency() && !this.props.currencyHide || this.type.isNumberFormat());
|
|
393
|
+
}
|
|
394
|
+
isRight() {
|
|
395
|
+
return this.props.align === "right" || this.isEnd();
|
|
396
|
+
}
|
|
397
|
+
}, K = class {
|
|
398
|
+
constructor(e, n, r, a, o, s, c) {
|
|
399
|
+
t(this, "list", i(() => {
|
|
400
|
+
let e = this.special.rubberList.value;
|
|
401
|
+
return this.type.isCurrencyOrNumber() ? T(this.format.rubber.value, e) : e;
|
|
402
|
+
})), t(this, "transition", i(() => g(Object.values(this.list.value).filter((e) => "transitionChar" in e && (w(e.transitionChar) || y(e.transitionChar))), "transitionChar").flat())), this.props = e, this.type = n, this.rubberItem = r, this.rubberTransition = a, this.special = o, this.match = s, this.format = c;
|
|
403
|
+
}
|
|
404
|
+
isTransition(e) {
|
|
405
|
+
return this.transition.value.indexOf(e) >= 0;
|
|
406
|
+
}
|
|
407
|
+
get(e) {
|
|
408
|
+
var t;
|
|
409
|
+
return (t = this.list.value) == null ? void 0 : t[e];
|
|
410
|
+
}
|
|
411
|
+
update(e, t, n) {
|
|
412
|
+
let r = this.get(t), i = e == null ? void 0 : e[t];
|
|
413
|
+
return r && i ? C(n, r == null ? void 0 : r.transitionChar) || r != null && r.maxLength && (r == null ? void 0 : r.maxLength) <= (i == null ? void 0 : i.chars.length) ? (this.rubberTransition.set(t), !1) : (i.end && this.match.is(n, t) && !this.rubberTransition.isChar(t) && (this.rubberItem.add(t), this.rubberTransition.reset()), !0) : !1;
|
|
414
|
+
}
|
|
415
|
+
pop(e) {
|
|
416
|
+
return this.rubberItem.pop(e);
|
|
417
|
+
}
|
|
418
|
+
reset() {
|
|
419
|
+
return this.rubberItem.reset(), this.rubberTransition.reset(), this;
|
|
420
|
+
}
|
|
421
|
+
}, q = class {
|
|
422
|
+
constructor(e, n, r, a, o, s, c) {
|
|
423
|
+
t(this, "item", i(() => this.type.isCurrencyOrNumber() ? this.format.mask.value : this.type.isDate() ? this.date.mask.value : this.basic.value)), t(this, "info", i(() => {
|
|
424
|
+
let e = [], t = 0;
|
|
425
|
+
return this.item.value.forEach((n, r) => {
|
|
426
|
+
this.special.isSpecial(n) && (e.push({
|
|
427
|
+
index: t,
|
|
428
|
+
key: r,
|
|
429
|
+
char: n
|
|
430
|
+
}), t++);
|
|
431
|
+
}), e;
|
|
432
|
+
})), t(this, "maxLength", i(() => {
|
|
433
|
+
let e = this.getMask();
|
|
434
|
+
return y(e) ? v(e) : this.item.value.length;
|
|
435
|
+
})), t(this, "maskActive", i(() => {
|
|
436
|
+
let e = this.getMask();
|
|
437
|
+
return y(e) ? e.find((e) => this.getSpecialLength(e) >= this.characterLength.get()) || (e == null ? void 0 : e[e.length - 1]) || "" : e;
|
|
438
|
+
})), t(this, "basic", i(() => this.rubberItem.expandMask(this.maskActive.value).split(""))), this.props = e, this.type = n, this.rubberItem = r, this.characterLength = a, this.date = o, this.format = s, this.special = c;
|
|
439
|
+
}
|
|
440
|
+
get(e) {
|
|
441
|
+
var t, n;
|
|
442
|
+
return (t = (n = this.item.value) == null ? void 0 : n[e]) == null ? "" : t;
|
|
443
|
+
}
|
|
444
|
+
getByChar(e, t = -1) {
|
|
445
|
+
let n = t;
|
|
446
|
+
return this.item.value.forEach((r, i) => {
|
|
447
|
+
r === e && i >= t && (n = i);
|
|
448
|
+
}), n;
|
|
449
|
+
}
|
|
450
|
+
getLength() {
|
|
451
|
+
return this.item.value.length;
|
|
452
|
+
}
|
|
453
|
+
getLengthBySpecial() {
|
|
454
|
+
return this.info.value.length;
|
|
455
|
+
}
|
|
456
|
+
getQuantity(e, t) {
|
|
457
|
+
if (e === t) return 1;
|
|
458
|
+
let n = 0;
|
|
459
|
+
for (let r = e; r < t; r++) this.special.isSpecial(this.get(r)) && n++;
|
|
460
|
+
return n;
|
|
461
|
+
}
|
|
462
|
+
getMask() {
|
|
463
|
+
var e;
|
|
464
|
+
return (e = this.props.mask) == null ? "" : e;
|
|
465
|
+
}
|
|
466
|
+
getSpecialLength(e) {
|
|
467
|
+
return e.split("").filter((e) => this.special.isSpecial(e)).length;
|
|
468
|
+
}
|
|
469
|
+
}, J = class {
|
|
470
|
+
constructor(e, n) {
|
|
471
|
+
t(this, "value", 0), t(this, "immediate", 0), t(this, "shift", !1), this.special = e, this.mask = n;
|
|
472
|
+
}
|
|
473
|
+
get() {
|
|
474
|
+
return this.value;
|
|
475
|
+
}
|
|
476
|
+
getFirst() {
|
|
477
|
+
var e, t;
|
|
478
|
+
return (e = (t = this.mask.info.value) == null || (t = t[0]) == null ? void 0 : t.key) == null ? 0 : e;
|
|
479
|
+
}
|
|
480
|
+
getFocus() {
|
|
481
|
+
return this.getCharacter(this.value);
|
|
482
|
+
}
|
|
483
|
+
getNext() {
|
|
484
|
+
return this.getCharacter(this.value + 1);
|
|
485
|
+
}
|
|
486
|
+
getPrevious() {
|
|
487
|
+
return this.getCharacter(this.value - 1);
|
|
488
|
+
}
|
|
489
|
+
getImmediate() {
|
|
490
|
+
return this.getCharacter(this.immediate);
|
|
491
|
+
}
|
|
492
|
+
getShift() {
|
|
493
|
+
return this.shift ? this.value > 0 ? this.getCharacter(this.value - 1) + 1 : 0 : this.getFocus();
|
|
494
|
+
}
|
|
495
|
+
set(e) {
|
|
496
|
+
return this.value = e, this;
|
|
497
|
+
}
|
|
498
|
+
setByMask(e, t = !0) {
|
|
499
|
+
if (t) {
|
|
500
|
+
let t, n;
|
|
501
|
+
this.mask.info.value.forEach((r) => {
|
|
502
|
+
t === void 0 && r.key >= e && (t = r.index), r.key <= e && (n = r.index);
|
|
503
|
+
}), this.set(t === void 0 ? this.mask.getLengthBySpecial() : t), this.setImmediate(n === void 0 ? this.mask.getLengthBySpecial() : n);
|
|
504
|
+
}
|
|
505
|
+
return this;
|
|
506
|
+
}
|
|
507
|
+
setImmediate(e) {
|
|
508
|
+
return this.immediate = e, this;
|
|
509
|
+
}
|
|
510
|
+
setShift(e) {
|
|
511
|
+
return this.shift = e, this;
|
|
512
|
+
}
|
|
513
|
+
resetImmediate() {
|
|
514
|
+
return this.immediate = this.value <= 0 ? 0 : this.value - 1, this;
|
|
515
|
+
}
|
|
516
|
+
goBack() {
|
|
517
|
+
return this.value > 0 && this.value--, this;
|
|
518
|
+
}
|
|
519
|
+
goNext() {
|
|
520
|
+
return this.value <= this.mask.getLength() && this.value++, this;
|
|
521
|
+
}
|
|
522
|
+
getCharacter(e) {
|
|
523
|
+
for (let t of this.mask.info.value) if (t.index >= e) return t.key;
|
|
524
|
+
return this.mask.getLength();
|
|
525
|
+
}
|
|
526
|
+
}, Y = "~", X = "_", Z = class {
|
|
527
|
+
constructor(e, n, r, i, a, s) {
|
|
528
|
+
t(this, "item", o([])), this.props = e, this.rubberItem = n, this.characterLength = r, this.special = i, this.mask = a, this.selection = s;
|
|
529
|
+
}
|
|
530
|
+
is() {
|
|
531
|
+
return this.item.value.length > 0;
|
|
532
|
+
}
|
|
533
|
+
isCharDelete() {
|
|
534
|
+
let e = this.selection.get();
|
|
535
|
+
return e in this.item.value && this.item.value[e] === "~";
|
|
536
|
+
}
|
|
537
|
+
getFocus() {
|
|
538
|
+
return this.mask.get(this.selection.getFocus());
|
|
539
|
+
}
|
|
540
|
+
getImmediate() {
|
|
541
|
+
return this.mask.get(this.selection.getImmediate());
|
|
542
|
+
}
|
|
543
|
+
getNext() {
|
|
544
|
+
return this.mask.get(this.selection.getNext());
|
|
545
|
+
}
|
|
546
|
+
add(e) {
|
|
547
|
+
return this.item.value.splice(this.selection.get(), this.isCharDelete() ? 1 : 0, e), this.selection.goNext().resetImmediate(), this.updateLength(), this;
|
|
548
|
+
}
|
|
549
|
+
pop() {
|
|
550
|
+
let e = this.selection.get() - 1;
|
|
551
|
+
return this.isSpecialNextAnother() ? this.item.value[e] = "~" : (this.item.value.splice(e, 1), this.updateLength()), this.selection.goBack().resetImmediate(), this;
|
|
552
|
+
}
|
|
553
|
+
reset() {
|
|
554
|
+
return this.item.value = [], this.selection.set(0).resetImmediate(), this.updateLength(), this;
|
|
555
|
+
}
|
|
556
|
+
shift(e = 1) {
|
|
557
|
+
return this.characterLength.set(this.item.value.length + e), this;
|
|
558
|
+
}
|
|
559
|
+
isSpecialNextAnother() {
|
|
560
|
+
let e = this.selection.get() - 1, t = this.item.value.length;
|
|
561
|
+
if (this.props.groupSave && e >= 0 && e <= t) {
|
|
562
|
+
var n;
|
|
563
|
+
let i = this.mask.info.value, a = i == null || (n = i[e]) == null ? void 0 : n.char;
|
|
564
|
+
if (a && !this.rubberItem.is(a)) {
|
|
565
|
+
for (let n = e; n < t; n++) if (i != null && i[n]) {
|
|
566
|
+
var r;
|
|
567
|
+
let e = (r = i[n]) == null ? void 0 : r.char;
|
|
568
|
+
if (e && this.special.isSpecial(e) && a !== e) return !0;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
return !1;
|
|
573
|
+
}
|
|
574
|
+
updateLength() {
|
|
575
|
+
return this.characterLength.set(this.item.value.length), this;
|
|
576
|
+
}
|
|
577
|
+
}, Q = class {
|
|
578
|
+
constructor(e, n, r, a) {
|
|
579
|
+
t(this, "item", i(() => {
|
|
580
|
+
let e = this.character.item.value, t = [], n = 0;
|
|
581
|
+
for (let r of this.mask.item.value) if (!this.special.isSpecial(r)) t.push(r);
|
|
582
|
+
else if (n in e) {
|
|
583
|
+
if (t.push(String(e[n++])), n > e.length && this.rubberTransition.is() && !this.rubberTransition.isChar(r)) break;
|
|
584
|
+
} else break;
|
|
585
|
+
return t.join("");
|
|
586
|
+
})), this.rubberTransition = e, this.mask = n, this.special = r, this.character = a;
|
|
587
|
+
}
|
|
588
|
+
is() {
|
|
589
|
+
return this.getLength() > 0;
|
|
590
|
+
}
|
|
591
|
+
getChar(e) {
|
|
592
|
+
var t;
|
|
593
|
+
return (t = this.item.value) == null ? void 0 : t[e];
|
|
594
|
+
}
|
|
595
|
+
getLength() {
|
|
596
|
+
return this.item.value.length;
|
|
597
|
+
}
|
|
598
|
+
}, $ = class {
|
|
599
|
+
constructor(e, n, r, a, o, c, l) {
|
|
600
|
+
t(this, "infoCache", void 0), t(this, "info", i(() => {
|
|
601
|
+
let e = this.valueBasic.item.value, t = {};
|
|
602
|
+
return this.mask.item.value.forEach((n, r) => {
|
|
603
|
+
if (this.special.isSpecial(n)) {
|
|
604
|
+
let i = this.add(t, n);
|
|
605
|
+
this.isStandard(r) && e[r] !== "~" && i.chars.push(String(e[r])), i.maxLength++, i.end = i.maxLength === i.chars.length, i.full = this.special.isDefault(n) || i.end, i.value = i.full ? i.chars.join("") : "";
|
|
606
|
+
}
|
|
607
|
+
}), t;
|
|
608
|
+
})), t(this, "item", i(() => this.getValue(this.info.value))), t(this, "isFull", i(() => {
|
|
609
|
+
for (let e of Object.values(this.info.value)) if (!e.full) return !1;
|
|
610
|
+
return !0;
|
|
611
|
+
})), t(this, "isEnd", i(() => {
|
|
612
|
+
for (let e of Object.values(this.info.value)) if (!e.end) return !1;
|
|
613
|
+
return !0;
|
|
614
|
+
})), t(this, "valueFinal", i(() => {
|
|
615
|
+
let e = this.valueBasic.item.value.split(""), t = this.mask.item.value, n = "";
|
|
616
|
+
for (let r in t) if (r in e) n += e[r];
|
|
617
|
+
else if (t[r]) {
|
|
618
|
+
let e = this.special.getDefault(t[r]);
|
|
619
|
+
e && (n += e);
|
|
620
|
+
}
|
|
621
|
+
return n;
|
|
622
|
+
})), this.props = e, this.type = n, this.date = r, this.format = a, this.mask = o, this.special = c, this.valueBasic = l, s(this.info, (e, t) => {
|
|
623
|
+
this.type.isDate() && (this.infoCache = t);
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
getValueCache() {
|
|
627
|
+
return this.infoCache ? this.getValue(this.infoCache) : this.item.value;
|
|
628
|
+
}
|
|
629
|
+
getForCheck() {
|
|
630
|
+
let e = this.item.value;
|
|
631
|
+
return {
|
|
632
|
+
group: n.getGroupDefault(),
|
|
633
|
+
value: e,
|
|
634
|
+
maxLength: e.length,
|
|
635
|
+
full: this.isFull.value,
|
|
636
|
+
end: this.isEnd.value,
|
|
637
|
+
chars: e.split("")
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
getInfoItem(e) {
|
|
641
|
+
var t;
|
|
642
|
+
return (t = this.info.value) == null ? void 0 : t[e];
|
|
643
|
+
}
|
|
644
|
+
isStandard(e) {
|
|
645
|
+
return !!this.valueBasic.getChar(e);
|
|
646
|
+
}
|
|
647
|
+
getValue(e) {
|
|
648
|
+
return this.type.isCurrencyOrNumber() ? this.format.getValueStandard(e) : this.type.isDate() ? this.isFull.value ? this.date.getValueStandard(e) : "" : this.props.fullOnly && !this.isFull.value ? "" : this.valueFinal.value;
|
|
649
|
+
}
|
|
650
|
+
add(e, t) {
|
|
651
|
+
return t in e || (e[t] = {
|
|
652
|
+
group: t,
|
|
653
|
+
value: "",
|
|
654
|
+
maxLength: 0,
|
|
655
|
+
full: !1,
|
|
656
|
+
end: !1,
|
|
657
|
+
chars: []
|
|
658
|
+
}), e[t];
|
|
659
|
+
}
|
|
660
|
+
}, te = class {
|
|
661
|
+
constructor(e, n) {
|
|
662
|
+
t(this, "item", i(() => {
|
|
663
|
+
for (let e of Object.values(this.pattern.item.value)) {
|
|
664
|
+
let t = this.value.getInfoItem(e.group);
|
|
665
|
+
if (t && t.full) {
|
|
666
|
+
let n = e.check(t.value);
|
|
667
|
+
if (n && !n.status) return {
|
|
668
|
+
...n,
|
|
669
|
+
value: this.value.item.value
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
return this.getValidationCheck();
|
|
674
|
+
})), this.pattern = e, this.value = n;
|
|
675
|
+
}
|
|
676
|
+
isError(e) {
|
|
677
|
+
var t;
|
|
678
|
+
let r = (t = this.item.value) == null ? void 0 : t.group;
|
|
679
|
+
return !!(r && (r === e || r === n.getGroupDefault()));
|
|
680
|
+
}
|
|
681
|
+
checkValidity() {
|
|
682
|
+
return this.item.value === void 0;
|
|
683
|
+
}
|
|
684
|
+
getValidationCheck() {
|
|
685
|
+
if (this.value.isFull.value) {
|
|
686
|
+
let t = this.value.getForCheck();
|
|
687
|
+
if (this.pattern.isCheck()) {
|
|
688
|
+
var e;
|
|
689
|
+
let n = (e = this.pattern.getInput(t.group)) == null ? void 0 : e.check(t.value);
|
|
690
|
+
if (n && !n.status) return n;
|
|
691
|
+
}
|
|
692
|
+
return {
|
|
693
|
+
status: !0,
|
|
694
|
+
value: t.value,
|
|
695
|
+
isFull: !0
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
return {
|
|
699
|
+
status: !0,
|
|
700
|
+
value: this.value.item.value,
|
|
701
|
+
isFull: !1
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
}, ne = class {
|
|
705
|
+
constructor(e, n, r, a, o, s, c, l, u, d) {
|
|
706
|
+
t(this, "classNameItem", void 0), t(this, "item", i(() => {
|
|
707
|
+
let e = [], t = this.valueBasic.item.value;
|
|
708
|
+
return this.mask.item.value.forEach((n, r) => {
|
|
709
|
+
let i = t == null ? void 0 : t[r];
|
|
710
|
+
e.push({
|
|
711
|
+
className: `${this.classNameItem} ${this.classNameItem}--${this.getStatus(n, i)}`,
|
|
712
|
+
value: this.getValue(n, i)
|
|
713
|
+
});
|
|
714
|
+
}), e;
|
|
715
|
+
})), t(this, "input", i(() => {
|
|
716
|
+
let e = [], t = this.mask.item.value;
|
|
717
|
+
return this.valueBasic.item.value.split("").forEach((n, r) => {
|
|
718
|
+
if (n === "~") {
|
|
719
|
+
var i, a;
|
|
720
|
+
e.push((i = this.getSpecialToView((a = t == null ? void 0 : t[r]) == null ? "" : a)) == null ? n : i);
|
|
721
|
+
} else e.push(n);
|
|
722
|
+
}), e.join("");
|
|
723
|
+
})), this.props = e, this.type = n, this.date = r, this.format = a, this.special = o, this.rubber = s, this.mask = c, this.valueBasic = l, this.validation = u, this.classNameItem = `${d}__character__item`;
|
|
724
|
+
}
|
|
725
|
+
isValue(e) {
|
|
726
|
+
return !!(e && e !== "~");
|
|
727
|
+
}
|
|
728
|
+
getStatus(e, t) {
|
|
729
|
+
return this.isValue(t) ? this.special.isSpecial(e) ? this.validation.isError(e) ? "error" : "special" : "standard" : this.rubber.isTransition(e) ? "transition" : "placeholder";
|
|
730
|
+
}
|
|
731
|
+
getValue(e, t) {
|
|
732
|
+
return this.isValue(t) ? t : this.getSpecialToView(e);
|
|
733
|
+
}
|
|
734
|
+
getSpecialToView(e) {
|
|
735
|
+
if (this.special.isSpecial(e)) {
|
|
736
|
+
var t, n, r;
|
|
737
|
+
return (t = (n = (r = this.getViewChar(e)) == null ? this.special.getView(e) : r) == null ? this.props.view : n) == null ? "_" : t;
|
|
738
|
+
}
|
|
739
|
+
return e;
|
|
740
|
+
}
|
|
741
|
+
getViewChar(e) {
|
|
742
|
+
if (this.type.isDate()) return this.date.getView(e);
|
|
743
|
+
if (this.type.isCurrencyOrNumber()) return this.format.view.value;
|
|
744
|
+
}
|
|
745
|
+
}, re = class {
|
|
746
|
+
constructor(e, n) {
|
|
747
|
+
t(this, "type", void 0), t(this, "event", void 0), this.validation = e, this.emits = n;
|
|
748
|
+
}
|
|
749
|
+
isValue() {
|
|
750
|
+
return !!(this.type && ["input", "change"].indexOf(this.type) >= 0);
|
|
751
|
+
}
|
|
752
|
+
go() {
|
|
753
|
+
if (this.type && this.event) {
|
|
754
|
+
var e;
|
|
755
|
+
let n = this.isValue() ? this.validation.item.value : void 0;
|
|
756
|
+
if ((e = this.emits) == null || e.call(this, this.type, this.event, n), this.type === "inputLite" || this.type === "changeLite") {
|
|
757
|
+
var t;
|
|
758
|
+
(t = this.emits) == null || t.call(this, this.type, n);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
return this;
|
|
762
|
+
}
|
|
763
|
+
set(e, t) {
|
|
764
|
+
return this.setType(e), this.setEvent(t), this;
|
|
765
|
+
}
|
|
766
|
+
setType(e) {
|
|
767
|
+
return this.type = e, this;
|
|
768
|
+
}
|
|
769
|
+
setEvent(e) {
|
|
770
|
+
return this.event = e, this;
|
|
771
|
+
}
|
|
772
|
+
reset() {
|
|
773
|
+
return this.resetType(), this.resetEvent(), this;
|
|
774
|
+
}
|
|
775
|
+
resetType() {
|
|
776
|
+
return this.type = void 0, this;
|
|
777
|
+
}
|
|
778
|
+
resetEvent() {
|
|
779
|
+
return this.event = void 0, this;
|
|
780
|
+
}
|
|
781
|
+
}, ie = class {
|
|
782
|
+
constructor(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m) {
|
|
783
|
+
this.type = e, this.buffer = t, this.focus = n, this.rubberTransition = r, this.date = i, this.special = a, this.match = o, this.rubber = s, this.mask = c, this.selection = l, this.character = u, this.valueBasic = d, this.value = f, this.emit = p, this.element = m;
|
|
784
|
+
}
|
|
785
|
+
add(e, t, n = !0) {
|
|
786
|
+
let r = !1;
|
|
787
|
+
return this.selection.setByMask(e, n), this.rubberTransition.reset(), D(t).forEach((e) => {
|
|
788
|
+
let t = this.character.getFocus(), i = this.character.getImmediate();
|
|
789
|
+
this.selection.setShift(this.rubber.update(this.value.info.value, i, e)), this.rubberTransition.is() && this.selection.setByMask(this.mask.getByChar(this.rubberTransition.item.value, this.selection.getImmediate()) + 1, n), this.match.is(e, t) && (this.character.shift(), this.character.getFocus() && (this.mask.maxLength.value > this.valueBasic.getLength() || this.character.isCharDelete()) && (this.character.add(e), r = !0));
|
|
790
|
+
}), this.goSelection(), r;
|
|
791
|
+
}
|
|
792
|
+
pop(e, t = e, n = !0) {
|
|
793
|
+
if (e >= 0 && t <= this.mask.maxLength.value) {
|
|
794
|
+
let r = this.mask.getQuantity(e, t);
|
|
795
|
+
for (n && this.selection.setByMask(t); r--;) this.rubberTransition.reset(), this.character.pop(), this.character.shift(0), this.selection.setShift(this.rubber.pop(this.character.getFocus()));
|
|
796
|
+
this.goSelection();
|
|
797
|
+
}
|
|
798
|
+
return this;
|
|
799
|
+
}
|
|
800
|
+
reset(e = "") {
|
|
801
|
+
if (this.character.reset(), this.rubber.reset(), ee(e)) {
|
|
802
|
+
let t = this.type.isDate() ? this.date.getValue(e) : e;
|
|
803
|
+
this.add(0, this.extra(t.split("")));
|
|
804
|
+
}
|
|
805
|
+
return this;
|
|
806
|
+
}
|
|
807
|
+
extra(e) {
|
|
808
|
+
var t;
|
|
809
|
+
if (this.character.is()) return e;
|
|
810
|
+
let n = this.mask.item.value, r = [...e], i = this.match.get((t = this.mask.info.value) == null || (t = t[0]) == null ? void 0 : t.char), a = 0;
|
|
811
|
+
if (i) for (let e in n) {
|
|
812
|
+
let t = n[e];
|
|
813
|
+
if (t) {
|
|
814
|
+
if (this.special.isSpecial(t)) {
|
|
815
|
+
for (let e = a; e < r.length; e++) {
|
|
816
|
+
var o;
|
|
817
|
+
if (a++, !(r == null || (o = r[e]) == null) && o.match(i)) break;
|
|
818
|
+
}
|
|
819
|
+
i = this.match.get(t);
|
|
820
|
+
} else if (t.match(i)) {
|
|
821
|
+
let e = !1;
|
|
822
|
+
for (let n = a; n < r.length; n++) {
|
|
823
|
+
let o = r[n];
|
|
824
|
+
if (a++, o != null && o.match(i)) {
|
|
825
|
+
t === o ? (r.splice(n, 1), a--) : e = !0;
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
if (e) break;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return r;
|
|
834
|
+
}
|
|
835
|
+
goSelection(e = !0) {
|
|
836
|
+
return this.focus.is() && requestAnimationFrame(() => {
|
|
837
|
+
if (this.element.value && (!e || !this.goBuffer())) {
|
|
838
|
+
let e = this.valueBasic.getLength(), t = this.selection.getShift(), n = e < t ? e : t;
|
|
839
|
+
this.element.value.selectionEnd = n, this.element.value.selectionStart = n;
|
|
840
|
+
}
|
|
841
|
+
}), this;
|
|
842
|
+
}
|
|
843
|
+
goBuffer() {
|
|
844
|
+
return this.buffer.is() ? (this.add(this.selection.getShift(), this.buffer.get()), this.buffer.resetChars(), !0) : (this.buffer.reset(), this.emit.go(), !1);
|
|
845
|
+
}
|
|
846
|
+
}, ae = class {
|
|
847
|
+
constructor(e, n, r, i, a, o, s, c) {
|
|
848
|
+
t(this, "change", !1), t(this, "unidentified", void 0), t(this, "onFocus", (e) => {
|
|
849
|
+
this.change = !1, this.focus.in(), this.emit.set("focus", e).go();
|
|
850
|
+
}), t(this, "onBlur", (e) => {
|
|
851
|
+
this.change && this.emit.setType("change").go(), this.focus.out(), this.emit.set("blur", e).go();
|
|
852
|
+
}), t(this, "onKeydown", (e) => {
|
|
853
|
+
let t = this.getSelectionInfo(e), { start: n, end: r } = t;
|
|
854
|
+
this.emit.set("keydown", e).go(), this.isCut(e) && this.isSelection(t) && (this.data.pop(n, r), k(e.target.value.slice(n, r)).then()), !this.isMetaKey(e) && (this.isKey(e) ? e.key === "Backspace" ? (n > 0 || n !== r) && this.data.pop(n, r) : e.key.length <= 1 && (n === r ? this.buffer.go(e.key) && this.data.add(n, e.key) : (this.buffer.goStart(), this.data.pop(n, r).add(this.selection.getShift(), e.key))) : this.unidentified = t);
|
|
855
|
+
}), t(this, "onKeyup", (e) => {
|
|
856
|
+
this.emit.set("keyup", e).go(), !this.isMetaKey(e) && this.isKey(e) && [
|
|
857
|
+
"ArrowUp",
|
|
858
|
+
"ArrowRight",
|
|
859
|
+
"ArrowDown",
|
|
860
|
+
"ArrowLeft"
|
|
861
|
+
].indexOf(e.key) >= 0 && (this.makeToEnd(e), this.makeToStart(e));
|
|
862
|
+
}), t(this, "onBeforeinput", (e) => {
|
|
863
|
+
this.emit.set("beforeinput", e).go(), this.unidentified || (this.makeChange(e), p(e));
|
|
864
|
+
}), t(this, "onInput", (e) => {
|
|
865
|
+
if (this.unidentified) {
|
|
866
|
+
let t = e.target;
|
|
867
|
+
(this.unidentified.length > t.value.length || this.unidentified.start !== this.unidentified.end) && this.data.pop(this.unidentified.start, this.unidentified.end), "data" in e ? e.data && this.buffer.go(e.data) && this.data.add(this.unidentified.start, e.data) : this.data.reset(t.value), this.makeChange(e), this.unidentified = void 0;
|
|
868
|
+
}
|
|
869
|
+
}), t(this, "onPaste", (e) => {
|
|
870
|
+
let { start: t, end: n } = this.getSelectionInfo(e);
|
|
871
|
+
h(e).then((r) => {
|
|
872
|
+
let i = r.split("");
|
|
873
|
+
t === n ? this.data.add(t, this.data.extra(i)) : this.data.pop(t, n).add(this.selection.getShift(), this.data.extra(i)), this.change = !0, this.emit.set("paste", e).go();
|
|
874
|
+
}).catch((e) => console.error("getClipboardData", e));
|
|
875
|
+
}), t(this, "onChange", (e) => {
|
|
876
|
+
let t = e.target;
|
|
877
|
+
this.data.reset(t.value), this.emit.set("change", e).go();
|
|
878
|
+
}), t(this, "onClick", (e) => {
|
|
879
|
+
this.makeToEnd(e), this.makeToStart(e);
|
|
880
|
+
}), this.buffer = e, this.focus = n, this.characterLength = r, this.right = i, this.selection = a, this.valueBasic = o, this.emit = s, this.data = c;
|
|
881
|
+
}
|
|
882
|
+
isMetaKey(e) {
|
|
883
|
+
return e.metaKey || e.altKey || e.ctrlKey;
|
|
884
|
+
}
|
|
885
|
+
isCut(e) {
|
|
886
|
+
return e.type === "cut" || !!(e.key.toLowerCase() === "x" && (e.metaKey || e.ctrlKey));
|
|
887
|
+
}
|
|
888
|
+
isKey(e) {
|
|
889
|
+
return "key" in e && e.key !== "Unidentified";
|
|
890
|
+
}
|
|
891
|
+
isSelection(e) {
|
|
892
|
+
let { start: t, end: n } = e;
|
|
893
|
+
return t > 0 || t !== n;
|
|
894
|
+
}
|
|
895
|
+
getSelectionInfo(e) {
|
|
896
|
+
var t, n;
|
|
897
|
+
let r = e.target;
|
|
898
|
+
return {
|
|
899
|
+
target: r,
|
|
900
|
+
start: (t = r.selectionStart) == null ? 0 : t,
|
|
901
|
+
end: (n = r.selectionEnd) == null ? 0 : n,
|
|
902
|
+
length: r.value.length
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
makeChange(e) {
|
|
906
|
+
this.change = !0, this.emit.set("input", e), !this.buffer.is() && (this.emit.go(), this.emit.resetType());
|
|
907
|
+
}
|
|
908
|
+
makeToEnd(e) {
|
|
909
|
+
if (this.right.isRight()) {
|
|
910
|
+
let t = this.valueBasic.getLength(), { target: n, start: r, end: i } = this.getSelectionInfo(e);
|
|
911
|
+
r > t && (n.selectionStart = t), i > t && (n.selectionEnd = t);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
makeToStart(e) {
|
|
915
|
+
let t = this.selection.getFirst(), { target: n, start: r } = this.getSelectionInfo(e);
|
|
916
|
+
r < t && (n.selectionStart = t, n.selectionEnd = t);
|
|
917
|
+
}
|
|
918
|
+
}, oe = class {
|
|
919
|
+
constructor(e, n, r, a, o, c, l, u, p) {
|
|
920
|
+
t(this, "type", void 0), t(this, "buffer", void 0), t(this, "focus", void 0), t(this, "characterLength", void 0), t(this, "rubberItem", void 0), t(this, "rubberTransition", void 0), t(this, "date", void 0), t(this, "format", void 0), t(this, "special", void 0), t(this, "match", void 0), t(this, "pattern", void 0), t(this, "right", void 0), t(this, "rubber", void 0), t(this, "item", void 0), t(this, "selection", void 0), t(this, "character", void 0), t(this, "valueBasic", void 0), t(this, "value", void 0), t(this, "validation", void 0), t(this, "view", void 0), t(this, "emit", void 0), t(this, "data", void 0), t(this, "event", void 0), t(this, "basic", i(() => {
|
|
921
|
+
if (this.right.isRight()) {
|
|
922
|
+
let e = "";
|
|
923
|
+
return this.view.item.value.forEach((t) => {
|
|
924
|
+
e += t.value;
|
|
925
|
+
}), e;
|
|
926
|
+
}
|
|
927
|
+
return this.view.input.value;
|
|
928
|
+
})), t(this, "classes", i(() => ({
|
|
929
|
+
[`${this.className}--value`]: this.characterLength.is(),
|
|
930
|
+
[`${this.className}--end`]: this.right.isEnd()
|
|
931
|
+
}))), t(this, "set", (e) => this.reset(e)), t(this, "clear", () => {
|
|
932
|
+
var e, t;
|
|
933
|
+
this.data.reset(((e = this.props.valueDefault) == null ? "" : e).toString()), this.emit.set("reset", {}).go(), (t = this.element.value) == null || t.focus();
|
|
934
|
+
}), this.props = e, this.refs = n, this.element = r, this.classDesign = a, this.className = o, this.components = c, this.slots = l, this.emits = u;
|
|
935
|
+
let { MaskBufferConstructor: m = j, MaskCharacterConstructor: h = Z, MaskCharacterLengthConstructor: g = N, MaskDataConstructor: _ = ie, MaskDateConstructor: v = R, MaskEmitConstructor: y = re, MaskEventConstructor: ee = ae, MaskFocusConstructor: b = M, MaskFormatConstructor: x = z, MaskItemConstructor: S = q, MaskMatchConstructor: C = H, MaskPatternConstructor: w = U, MaskRightConstructor: T = G, MaskRubberConstructor: E = K, MaskRubberItemConstructor: D = P, MaskRubberTransitionConstructor: O = F, MaskSelectionConstructor: k = J, MaskSpecialConstructor: I = B, MaskTypeConstructor: L = A, MaskValidationConstructor: V = te, MaskValueBasicConstructor: W = Q, MaskValueConstructor: Y = $, MaskViewConstructor: X = ne } = p == null ? {} : p;
|
|
936
|
+
this.type = new L(this.props), this.buffer = new m(), this.focus = new b(this.buffer), this.characterLength = new g(), this.rubberItem = new D(), this.rubberTransition = new O(), this.date = new v(this.props, this.type), this.format = new x(this.props, this.type, this.rubberItem), this.special = new I(this.props, this.type, this.date, this.format), this.match = new C(this.props, this.special), this.pattern = new w(this.props, this.type, this.date, this.special), this.right = new T(this.props, this.type), this.rubber = new E(this.props, this.type, this.rubberItem, this.rubberTransition, this.special, this.match, this.format), this.item = new S(this.props, this.type, this.rubberItem, this.characterLength, this.date, this.format, this.special), this.selection = new k(this.special, this.item), this.character = new h(this.props, this.rubberItem, this.characterLength, this.special, this.item, this.selection), this.valueBasic = new W(this.rubberTransition, this.item, this.special, this.character), this.value = new Y(this.props, this.type, this.date, this.format, this.item, this.special, this.valueBasic), this.validation = new V(this.pattern, this.value), this.view = new X(this.props, this.type, this.date, this.format, this.special, this.rubber, this.item, this.valueBasic, this.validation, this.className), this.emit = new y(this.validation, this.emits), this.data = new _(this.type, this.buffer, this.focus, this.rubberTransition, this.date, this.special, this.match, this.rubber, this.item, this.selection, this.character, this.valueBasic, this.value, this.emit, this.element), this.event = new ee(this.buffer, this.focus, this.characterLength, this.right, this.selection, this.valueBasic, this.emit, this.data), s([n.value], () => this.reset(e.value)), s(this.basic, () => this.data.goSelection(!1)), s([d.getStandard(), n.language], () => this.reset(this.value.getValueCache())), e.value && this.data.reset(f(e.value));
|
|
937
|
+
}
|
|
938
|
+
reset(e) {
|
|
939
|
+
let t = f(e);
|
|
940
|
+
return t !== this.props.valueDefault && (this.value.item.value !== t || this.valueBasic.item.value !== t && !b(t)) ? (this.data.reset(t), this.emit.set("reset", {}).go(), !0) : !1;
|
|
941
|
+
}
|
|
942
|
+
}, se = class extends l {
|
|
943
|
+
constructor(n, r, i, o = oe) {
|
|
944
|
+
super(n, r, i), t(this, "item", void 0), t(this, "renderData", () => this.props.name ? [a("input", {
|
|
945
|
+
type: "hidden",
|
|
946
|
+
name: this.props.name,
|
|
947
|
+
value: this.item.value.item.value
|
|
948
|
+
})] : []), t(this, "renderInput", () => {
|
|
949
|
+
var e;
|
|
950
|
+
return [a("input", O(this.props.inputAttrs, {
|
|
951
|
+
ref: this.element,
|
|
952
|
+
class: (e = this.classes) == null ? void 0 : e.value.input,
|
|
953
|
+
type: "text",
|
|
954
|
+
value: this.item.basic.value,
|
|
955
|
+
placeholder: "",
|
|
956
|
+
onFocus: this.item.event.onFocus,
|
|
957
|
+
onBlur: this.item.event.onBlur,
|
|
958
|
+
onKeydown: this.item.event.onKeydown,
|
|
959
|
+
onKeyup: this.item.event.onKeyup,
|
|
960
|
+
onBeforeinput: this.item.event.onBeforeinput,
|
|
961
|
+
onInput: this.item.event.onInput,
|
|
962
|
+
onChange: this.item.event.onChange,
|
|
963
|
+
onPaste: this.item.event.onPaste,
|
|
964
|
+
onClick: this.item.event.onClick
|
|
965
|
+
}))];
|
|
966
|
+
}), t(this, "renderView", () => {
|
|
967
|
+
var t;
|
|
968
|
+
let n = this.item.view.item.value, r = [], i;
|
|
969
|
+
return n.length > 0 ? n.forEach((e, t) => {
|
|
970
|
+
r.push(a("span", {
|
|
971
|
+
key: t,
|
|
972
|
+
class: e.className,
|
|
973
|
+
innerHTML: e.value === " " ? " " : e.value
|
|
974
|
+
}));
|
|
975
|
+
}) : i = " ", [a("span", {
|
|
976
|
+
class: (t = this.classes) == null ? void 0 : t.value.character,
|
|
977
|
+
"data-length": "1",
|
|
978
|
+
...e.hidden(),
|
|
979
|
+
innerHTML: i
|
|
980
|
+
}, r)];
|
|
981
|
+
}), this.item = new o(this.props, this.refs, this.element, this.getDesign(), this.getName(), this.components, this.slots, this.emits), this.init();
|
|
982
|
+
}
|
|
983
|
+
initExpose() {
|
|
984
|
+
return {
|
|
985
|
+
valueBasic: this.item.basic,
|
|
986
|
+
value: this.item.value.item,
|
|
987
|
+
setValue: this.item.set,
|
|
988
|
+
clear: this.item.clear
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
initClasses() {
|
|
992
|
+
return {
|
|
993
|
+
main: this.item.classes.value,
|
|
994
|
+
input: this.getSubClass("input"),
|
|
995
|
+
character: this.getSubClass("character"),
|
|
996
|
+
characterItem: this.getSubClass("character__item")
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
initStyles() {
|
|
1000
|
+
return {};
|
|
1001
|
+
}
|
|
1002
|
+
initRender() {
|
|
1003
|
+
var e;
|
|
1004
|
+
let t = [
|
|
1005
|
+
...this.renderData(),
|
|
1006
|
+
...this.renderInput(),
|
|
1007
|
+
...this.renderView()
|
|
1008
|
+
];
|
|
1009
|
+
return a("span", {
|
|
1010
|
+
...this.getAttrs(),
|
|
1011
|
+
class: (e = this.classes) == null ? void 0 : e.value.main
|
|
1012
|
+
}, t);
|
|
1013
|
+
}
|
|
2489
1014
|
};
|
|
1015
|
+
//#endregion
|
|
1016
|
+
export { Y as MASK_CHAR_DELETE, X as MASK_VIEW_DEFAULT, oe as Mask, j as MaskBuffer, Z as MaskCharacter, N as MaskCharacterLength, ie as MaskData, R as MaskDate, se as MaskDesign, re as MaskEmit, ae as MaskEvent, M as MaskFocus, z as MaskFormat, r as MaskInclude, q as MaskItem, H as MaskMatch, U as MaskPattern, G as MaskRight, K as MaskRubber, P as MaskRubberItem, F as MaskRubberTransition, J as MaskSelection, B as MaskSpecial, A as MaskType, te as MaskValidation, $ as MaskValue, Q as MaskValueBasic, ne as MaskView, W as defaultsMask };
|