primevue 3.15.0 → 3.16.2
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/autocomplete/AutoComplete.d.ts +182 -38
- package/autocomplete/AutoComplete.vue +636 -342
- package/autocomplete/autocomplete.cjs.js +745 -416
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +747 -418
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +745 -416
- package/autocomplete/autocomplete.min.js +1 -1
- package/button/Button.vue +4 -1
- package/button/button.cjs.js +5 -1
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -1
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +51 -12
- package/calendar/Calendar.vue +259 -114
- package/calendar/calendar.cjs.js +414 -220
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +415 -221
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +414 -220
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.vue +25 -0
- package/carousel/carousel.cjs.js +25 -0
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +25 -0
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +25 -0
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +97 -17
- package/cascadeselect/CascadeSelect.vue +560 -135
- package/cascadeselect/CascadeSelectSub.vue +48 -129
- package/cascadeselect/cascadeselect.cjs.js +670 -306
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +672 -308
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +670 -306
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +40 -4
- package/checkbox/Checkbox.vue +50 -13
- package/checkbox/checkbox.cjs.js +64 -23
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +65 -24
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +64 -23
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +36 -12
- package/chips/Chips.vue +116 -22
- package/chips/chips.cjs.js +149 -37
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +150 -38
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +150 -39
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +3 -6
- package/colorpicker/ColorPicker.vue +1 -5
- package/colorpicker/colorpicker.cjs.js +2 -7
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +2 -7
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +2 -7
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/column/Column.vue +4 -0
- package/column/column.cjs.js +4 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +4 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +4 -0
- package/column/column.min.js +1 -1
- package/config/PrimeVue.d.ts +42 -0
- package/config/config.cjs.js +35 -4
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +35 -4
- package/config/config.esm.min.js +1 -1
- package/config/config.js +35 -4
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +4 -1
- package/confirmdialog/confirmdialog.cjs.js +6 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +6 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +6 -2
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/contextmenu/ContextMenuSub.vue +3 -3
- package/contextmenu/contextmenu.cjs.js +14 -8
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +15 -9
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -8
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1128 -772
- package/core/core.min.js +12 -12
- package/datatable/BodyCell.vue +11 -2
- package/datatable/DataTable.vue +23 -2
- package/datatable/datatable.cjs.js +34 -4
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +34 -4
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +34 -4
- package/datatable/datatable.min.js +1 -1
- package/dialog/Dialog.d.ts +5 -1
- package/dropdown/Dropdown.d.ts +92 -38
- package/dropdown/Dropdown.vue +538 -399
- package/dropdown/dropdown.cjs.js +657 -486
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +659 -488
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +657 -486
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +32 -0
- package/editor/Editor.vue +15 -1
- package/editor/editor.cjs.js +15 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +15 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +15 -1
- package/editor/editor.min.js +1 -1
- package/inputmask/InputMask.vue +9 -6
- package/inputmask/inputmask.cjs.js +14 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +15 -7
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +14 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +31 -7
- package/inputnumber/InputNumber.vue +53 -20
- package/inputnumber/inputnumber.cjs.js +75 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +76 -30
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +75 -29
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +24 -8
- package/inputswitch/InputSwitch.vue +27 -12
- package/inputswitch/inputswitch.cjs.js +38 -20
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +39 -21
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +38 -20
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.vue +1 -2
- package/inputtext/inputtext.cjs.js +3 -4
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +4 -5
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +3 -4
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +12 -0
- package/knob/Knob.vue +62 -2
- package/knob/knob.cjs.js +73 -5
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +73 -5
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +73 -5
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +53 -7
- package/listbox/Listbox.vue +500 -135
- package/listbox/listbox.cjs.js +597 -193
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +599 -195
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +597 -193
- package/listbox/listbox.min.js +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menu/Menuitem.vue +2 -2
- package/menu/menu.cjs.js +12 -6
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +13 -7
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +12 -6
- package/menu/menu.min.js +1 -1
- package/menubar/MenubarSub.vue +3 -3
- package/menubar/menubar.cjs.js +14 -8
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -9
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +14 -8
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +111 -51
- package/multiselect/MultiSelect.vue +629 -338
- package/multiselect/multiselect.cjs.js +748 -428
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +750 -430
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +748 -428
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +1 -1
- package/overlaypanel/OverlayPanel.vue +14 -2
- package/overlaypanel/overlaypanel.cjs.js +14 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +14 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +14 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +2 -2
- package/paginator/Paginator.d.ts +2 -2
- package/password/Password.d.ts +36 -8
- package/password/Password.vue +50 -14
- package/password/password.cjs.js +69 -24
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +71 -26
- package/password/password.esm.min.js +1 -1
- package/password/password.js +69 -24
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +8 -0
- package/picklist/PickList.vue +10 -2
- package/picklist/picklist.cjs.js +68 -50
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +69 -51
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +68 -50
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +1 -1
- package/radiobutton/RadioButton.d.ts +28 -4
- package/radiobutton/RadioButton.vue +36 -11
- package/radiobutton/radiobutton.cjs.js +49 -23
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +50 -24
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +49 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +4 -0
- package/rating/Rating.vue +61 -7
- package/rating/rating.cjs.js +90 -16
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +91 -17
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +90 -16
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +8 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +82 -40
- package/resources/themes/arya-green/theme.css +82 -40
- package/resources/themes/arya-orange/theme.css +82 -40
- package/resources/themes/arya-purple/theme.css +82 -40
- package/resources/themes/bootstrap4-dark-blue/theme.css +82 -40
- package/resources/themes/bootstrap4-dark-purple/theme.css +82 -40
- package/resources/themes/bootstrap4-light-blue/theme.css +82 -40
- package/resources/themes/bootstrap4-light-purple/theme.css +82 -40
- package/resources/themes/fluent-light/theme.css +82 -40
- package/resources/themes/lara-dark-blue/theme.css +82 -40
- package/resources/themes/lara-dark-indigo/theme.css +82 -40
- package/resources/themes/lara-dark-purple/theme.css +82 -40
- package/resources/themes/lara-dark-teal/theme.css +82 -40
- package/resources/themes/lara-light-blue/theme.css +82 -40
- package/resources/themes/lara-light-indigo/theme.css +82 -40
- package/resources/themes/lara-light-purple/theme.css +82 -40
- package/resources/themes/lara-light-teal/theme.css +82 -40
- package/resources/themes/luna-amber/theme.css +82 -40
- package/resources/themes/luna-blue/theme.css +82 -40
- package/resources/themes/luna-green/theme.css +82 -40
- package/resources/themes/luna-pink/theme.css +82 -40
- package/resources/themes/md-dark-deeppurple/theme.css +82 -40
- package/resources/themes/md-dark-indigo/theme.css +82 -40
- package/resources/themes/md-light-deeppurple/theme.css +82 -40
- package/resources/themes/md-light-indigo/theme.css +82 -40
- package/resources/themes/mdc-dark-deeppurple/theme.css +82 -40
- package/resources/themes/mdc-dark-indigo/theme.css +82 -40
- package/resources/themes/mdc-light-deeppurple/theme.css +82 -40
- package/resources/themes/mdc-light-indigo/theme.css +82 -40
- package/resources/themes/nova/theme.css +82 -40
- package/resources/themes/nova-accent/theme.css +82 -40
- package/resources/themes/nova-alt/theme.css +82 -40
- package/resources/themes/nova-vue/theme.css +82 -40
- package/resources/themes/rhea/theme.css +82 -40
- package/resources/themes/saga-blue/theme.css +82 -40
- package/resources/themes/saga-green/theme.css +82 -40
- package/resources/themes/saga-orange/theme.css +82 -40
- package/resources/themes/saga-purple/theme.css +82 -40
- package/resources/themes/tailwind-light/theme.css +82 -40
- package/resources/themes/vela-blue/theme.css +82 -40
- package/resources/themes/vela-green/theme.css +82 -40
- package/resources/themes/vela-orange/theme.css +82 -40
- package/resources/themes/vela-purple/theme.css +82 -40
- package/ripple/ripple.cjs.js +1 -0
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -0
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -0
- package/ripple/ripple.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +89 -12
- package/selectbutton/selectbutton.cjs.js +97 -22
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +99 -24
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +97 -22
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +9 -1
- package/slider/Slider.vue +50 -34
- package/slider/slider.cjs.js +59 -38
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +59 -38
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +59 -38
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitter/Splitter.vue +30 -1
- package/splitter/splitter.cjs.js +30 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +30 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +30 -1
- package/splitter/splitter.min.js +1 -1
- package/textarea/Textarea.vue +1 -2
- package/textarea/textarea.cjs.js +3 -5
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +4 -6
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +3 -5
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +1 -1
- package/tieredmenu/TieredMenuSub.vue +3 -3
- package/tieredmenu/tieredmenu.cjs.js +14 -8
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +15 -9
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +14 -8
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +10 -1
- package/timeline/Timeline.vue +1 -1
- package/timeline/timeline.cjs.js +5 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +5 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +5 -1
- package/timeline/timeline.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +42 -0
- package/togglebutton/ToggleButton.vue +44 -7
- package/togglebutton/togglebutton.cjs.js +59 -13
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +60 -14
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +59 -13
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.cjs.js +20 -11
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +21 -12
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +20 -11
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.vue +5 -1
- package/tree/TreeNode.vue +20 -19
- package/tree/tree.cjs.js +47 -32
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +47 -32
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +47 -32
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +26 -10
- package/treeselect/TreeSelect.vue +52 -29
- package/treeselect/treeselect.cjs.js +74 -41
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +76 -43
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +74 -41
- package/treeselect/treeselect.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +20 -4
- package/tristatecheckbox/TriStateCheckbox.vue +52 -15
- package/tristatecheckbox/tristatecheckbox.cjs.js +67 -26
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +68 -27
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +67 -26
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/Utils.d.ts +3 -2
- package/utils/utils.cjs.js +239 -173
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +239 -173
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +239 -173
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +612 -136
- package/vetur-tags.json +180 -59
- package/virtualscroller/VirtualScroller.d.ts +10 -0
- package/virtualscroller/VirtualScroller.vue +18 -17
- package/virtualscroller/virtualscroller.cjs.js +22 -20
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +22 -20
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +22 -20
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1745 -338
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import InputText from 'primevue/inputtext';
|
|
2
2
|
import Button from 'primevue/button';
|
|
3
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass,
|
|
3
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, toHandlers, createCommentVNode, createBlock } from 'vue';
|
|
4
4
|
|
|
5
5
|
var script = {
|
|
6
6
|
name: 'InputNumber',
|
|
7
|
-
inheritAttrs: false,
|
|
8
7
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
9
8
|
props: {
|
|
10
9
|
modelValue: {
|
|
@@ -99,10 +98,28 @@ var script = {
|
|
|
99
98
|
type: Boolean,
|
|
100
99
|
default: false
|
|
101
100
|
},
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
disabled: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: false
|
|
104
|
+
},
|
|
105
|
+
placeholder: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: null
|
|
108
|
+
},
|
|
109
|
+
inputId: null,
|
|
110
|
+
inputClass: null,
|
|
104
111
|
inputStyle: null,
|
|
105
|
-
|
|
112
|
+
inputProps: null,
|
|
113
|
+
incrementButtonProps: null,
|
|
114
|
+
decrementButtonProps: null,
|
|
115
|
+
'aria-labelledby': {
|
|
116
|
+
type: String,
|
|
117
|
+
default: null
|
|
118
|
+
},
|
|
119
|
+
'aria-label': {
|
|
120
|
+
type: String,
|
|
121
|
+
default: null
|
|
122
|
+
}
|
|
106
123
|
},
|
|
107
124
|
numberFormat: null,
|
|
108
125
|
_numeral: null,
|
|
@@ -314,24 +331,24 @@ var script = {
|
|
|
314
331
|
}
|
|
315
332
|
},
|
|
316
333
|
onUpButtonMouseDown(event) {
|
|
317
|
-
if (!this
|
|
334
|
+
if (!this.disabled) {
|
|
318
335
|
this.$refs.input.$el.focus();
|
|
319
336
|
this.repeat(event, null, 1);
|
|
320
337
|
event.preventDefault();
|
|
321
338
|
}
|
|
322
339
|
},
|
|
323
340
|
onUpButtonMouseUp() {
|
|
324
|
-
if (!this
|
|
341
|
+
if (!this.disabled) {
|
|
325
342
|
this.clearTimer();
|
|
326
343
|
}
|
|
327
344
|
},
|
|
328
345
|
onUpButtonMouseLeave() {
|
|
329
|
-
if (!this
|
|
346
|
+
if (!this.disabled) {
|
|
330
347
|
this.clearTimer();
|
|
331
348
|
}
|
|
332
349
|
},
|
|
333
350
|
onUpButtonKeyUp() {
|
|
334
|
-
if (!this
|
|
351
|
+
if (!this.disabled) {
|
|
335
352
|
this.clearTimer();
|
|
336
353
|
}
|
|
337
354
|
},
|
|
@@ -341,24 +358,24 @@ var script = {
|
|
|
341
358
|
}
|
|
342
359
|
},
|
|
343
360
|
onDownButtonMouseDown(event) {
|
|
344
|
-
if (!this
|
|
361
|
+
if (!this.disabled) {
|
|
345
362
|
this.$refs.input.$el.focus();
|
|
346
363
|
this.repeat(event, null, -1);
|
|
347
364
|
event.preventDefault();
|
|
348
365
|
}
|
|
349
366
|
},
|
|
350
367
|
onDownButtonMouseUp() {
|
|
351
|
-
if (!this
|
|
368
|
+
if (!this.disabled) {
|
|
352
369
|
this.clearTimer();
|
|
353
370
|
}
|
|
354
371
|
},
|
|
355
372
|
onDownButtonMouseLeave() {
|
|
356
|
-
if (!this
|
|
373
|
+
if (!this.disabled) {
|
|
357
374
|
this.clearTimer();
|
|
358
375
|
}
|
|
359
376
|
},
|
|
360
377
|
onDownButtonKeyUp() {
|
|
361
|
-
if (!this
|
|
378
|
+
if (!this.disabled) {
|
|
362
379
|
this.clearTimer();
|
|
363
380
|
}
|
|
364
381
|
},
|
|
@@ -522,6 +539,22 @@ var script = {
|
|
|
522
539
|
this.updateValue(event, newValueStr, null, 'delete-range');
|
|
523
540
|
}
|
|
524
541
|
break;
|
|
542
|
+
|
|
543
|
+
//home
|
|
544
|
+
case 36:
|
|
545
|
+
if (this.min) {
|
|
546
|
+
this.updateModel(event, this.min);
|
|
547
|
+
event.preventDefault();
|
|
548
|
+
}
|
|
549
|
+
break;
|
|
550
|
+
|
|
551
|
+
//end
|
|
552
|
+
case 35:
|
|
553
|
+
if (this.max) {
|
|
554
|
+
this.updateModel(event, this.max);
|
|
555
|
+
event.preventDefault();
|
|
556
|
+
}
|
|
557
|
+
break;
|
|
525
558
|
}
|
|
526
559
|
},
|
|
527
560
|
onInputKeyPress(event) {
|
|
@@ -931,7 +964,7 @@ var script = {
|
|
|
931
964
|
},
|
|
932
965
|
computed: {
|
|
933
966
|
containerClass() {
|
|
934
|
-
return ['p-inputnumber p-component p-inputwrapper',
|
|
967
|
+
return ['p-inputnumber p-component p-inputwrapper', {
|
|
935
968
|
'p-inputwrapper-filled': this.filled,
|
|
936
969
|
'p-inputwrapper-focus': this.focused,
|
|
937
970
|
'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked',
|
|
@@ -995,18 +1028,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
995
1028
|
const _component_INButton = resolveComponent("INButton");
|
|
996
1029
|
|
|
997
1030
|
return (openBlock(), createElementBlock("span", {
|
|
998
|
-
class: normalizeClass($options.containerClass)
|
|
999
|
-
style: normalizeStyle($props.style)
|
|
1031
|
+
class: normalizeClass($options.containerClass)
|
|
1000
1032
|
}, [
|
|
1001
1033
|
createVNode(_component_INInputText, mergeProps({
|
|
1002
1034
|
ref: "input",
|
|
1003
|
-
class: [
|
|
1035
|
+
class: ["p-inputnumber-input", $props.inputClass],
|
|
1036
|
+
role: "spinbutton",
|
|
1037
|
+
id: $props.inputId,
|
|
1004
1038
|
style: $props.inputStyle,
|
|
1005
|
-
value: $options.formattedValue
|
|
1006
|
-
|
|
1007
|
-
"aria-valumin": $props.min,
|
|
1039
|
+
value: $options.formattedValue,
|
|
1040
|
+
"aria-valuemin": $props.min,
|
|
1008
1041
|
"aria-valuemax": $props.max,
|
|
1042
|
+
"aria-valuenow": $props.modelValue,
|
|
1043
|
+
disabled: $props.disabled,
|
|
1009
1044
|
readonly: $props.readonly,
|
|
1045
|
+
placeholder: $props.placeholder,
|
|
1046
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
1047
|
+
"aria-label": _ctx.ariaLabel,
|
|
1010
1048
|
onInput: $options.onUserInput,
|
|
1011
1049
|
onKeydown: $options.onInputKeyDown,
|
|
1012
1050
|
onKeypress: $options.onInputKeyPress,
|
|
@@ -1014,21 +1052,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1014
1052
|
onClick: $options.onInputClick,
|
|
1015
1053
|
onFocus: $options.onInputFocus,
|
|
1016
1054
|
onBlur: $options.onInputBlur
|
|
1017
|
-
}), null, 16, ["class", "style", "value", "aria-
|
|
1055
|
+
}, $props.inputProps), null, 16, ["id", "class", "style", "value", "aria-valuemin", "aria-valuemax", "aria-valuenow", "disabled", "readonly", "placeholder", "aria-labelledby", "aria-label", "onInput", "onKeydown", "onKeypress", "onPaste", "onClick", "onFocus", "onBlur"]),
|
|
1018
1056
|
($props.showButtons && $props.buttonLayout === 'stacked')
|
|
1019
1057
|
? (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
1020
1058
|
createVNode(_component_INButton, mergeProps({
|
|
1021
1059
|
class: $options.upButtonClass,
|
|
1022
1060
|
icon: $props.incrementButtonIcon
|
|
1023
1061
|
}, toHandlers($options.upButtonListeners), {
|
|
1024
|
-
disabled:
|
|
1025
|
-
|
|
1062
|
+
disabled: $props.disabled,
|
|
1063
|
+
tabindex: -1,
|
|
1064
|
+
"aria-hidden": "true"
|
|
1065
|
+
}, $props.incrementButtonProps), null, 16, ["class", "icon", "disabled"]),
|
|
1026
1066
|
createVNode(_component_INButton, mergeProps({
|
|
1027
1067
|
class: $options.downButtonClass,
|
|
1028
1068
|
icon: $props.decrementButtonIcon
|
|
1029
1069
|
}, toHandlers($options.downButtonListeners), {
|
|
1030
|
-
disabled:
|
|
1031
|
-
|
|
1070
|
+
disabled: $props.disabled,
|
|
1071
|
+
tabindex: -1,
|
|
1072
|
+
"aria-hidden": "true"
|
|
1073
|
+
}, $props.decrementButtonProps), null, 16, ["class", "icon", "disabled"])
|
|
1032
1074
|
]))
|
|
1033
1075
|
: createCommentVNode("", true),
|
|
1034
1076
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
@@ -1037,8 +1079,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1037
1079
|
class: $options.upButtonClass,
|
|
1038
1080
|
icon: $props.incrementButtonIcon
|
|
1039
1081
|
}, toHandlers($options.upButtonListeners), {
|
|
1040
|
-
disabled:
|
|
1041
|
-
|
|
1082
|
+
disabled: $props.disabled,
|
|
1083
|
+
tabindex: -1,
|
|
1084
|
+
"aria-hidden": "true"
|
|
1085
|
+
}, $props.incrementButtonProps), null, 16, ["class", "icon", "disabled"]))
|
|
1042
1086
|
: createCommentVNode("", true),
|
|
1043
1087
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
1044
1088
|
? (openBlock(), createBlock(_component_INButton, mergeProps({
|
|
@@ -1046,10 +1090,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1046
1090
|
class: $options.downButtonClass,
|
|
1047
1091
|
icon: $props.decrementButtonIcon
|
|
1048
1092
|
}, toHandlers($options.downButtonListeners), {
|
|
1049
|
-
disabled:
|
|
1050
|
-
|
|
1093
|
+
disabled: $props.disabled,
|
|
1094
|
+
tabindex: -1,
|
|
1095
|
+
"aria-hidden": "true"
|
|
1096
|
+
}, $props.decrementButtonProps), null, 16, ["class", "icon", "disabled"]))
|
|
1051
1097
|
: createCommentVNode("", true)
|
|
1052
|
-
],
|
|
1098
|
+
], 2))
|
|
1053
1099
|
}
|
|
1054
1100
|
|
|
1055
1101
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/inputtext";import e from"primevue/button";import{resolveComponent as n,openBlock as i,createElementBlock as s,normalizeClass as r,normalizeStyle as u,createVNode as l,mergeProps as a,toHandlers as o,createCommentVNode as p,createBlock as h}from"vue";var c={name:"InputNumber",inheritAttrs:!1,emits:["update:modelValue","input","focus","blur"],props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:"pi pi-angle-up"},decrementButtonIcon:{type:String,default:"pi pi-angle-down"},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},style:null,class:null,inputStyle:null,inputClass:null},numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue(t){this.d_modelValue=t},locale(t,e){this.updateConstructParser(t,e)},localeMatcher(t,e){this.updateConstructParser(t,e)},mode(t,e){this.updateConstructParser(t,e)},currency(t,e){this.updateConstructParser(t,e)},currencyDisplay(t,e){this.updateConstructParser(t,e)},useGrouping(t,e){this.updateConstructParser(t,e)},minFractionDigits(t,e){this.updateConstructParser(t,e)},maxFractionDigits(t,e){this.updateConstructParser(t,e)},suffix(t,e){this.updateConstructParser(t,e)},prefix(t,e){this.updateConstructParser(t,e)}},created(){this.constructParser()},methods:{getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}},constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const t=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),e=new Map(t.map(((t,e)=>[t,e])));this._numeral=new RegExp(`[${t.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=t=>e.get(t)},updateConstructParser(t,e){t!==e&&this.constructParser()},escapeRegExp:t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),getDecimalExpression(){const t=new Intl.NumberFormat(this.locale,{...this.getOptions(),useGrouping:!1});return new RegExp(`[${t.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")},getGroupingExpression(){const t=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=t.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")},getMinusSignExpression(){const t=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${t.format(-1).trim().replace(this._numeral,"")}]`,"g")},getCurrencyExpression(){if(this.currency){const t=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${t.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")},getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const t=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=t.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")},getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const t=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=t.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")},formatValue(t){if(null!=t){if("-"===t)return t;if(this.format){let e=new Intl.NumberFormat(this.locale,this.getOptions()).format(t);return this.prefix&&(e=this.prefix+e),this.suffix&&(e+=this.suffix),e}return t.toString()}return""},parseValue(t){let e=t.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(e){if("-"===e)return e;let t=+e;return isNaN(t)?null:t}return null},repeat(t,e,n){if(this.readonly)return;let i=e||500;this.clearTimer(),this.timer=setTimeout((()=>{this.repeat(t,40,n)}),i),this.spin(t,n)},spin(t,e){if(this.$refs.input){let n=this.step*e,i=this.parseValue(this.$refs.input.$el.value)||0,s=this.validateValue(i+n);this.updateInput(s,null,"spin"),this.updateModel(t,s),this.handleOnInput(t,i,s)}},onUpButtonMouseDown(t){this.$attrs.disabled||(this.$refs.input.$el.focus(),this.repeat(t,null,1),t.preventDefault())},onUpButtonMouseUp(){this.$attrs.disabled||this.clearTimer()},onUpButtonMouseLeave(){this.$attrs.disabled||this.clearTimer()},onUpButtonKeyUp(){this.$attrs.disabled||this.clearTimer()},onUpButtonKeyDown(t){32!==t.keyCode&&13!==t.keyCode||this.repeat(t,null,1)},onDownButtonMouseDown(t){this.$attrs.disabled||(this.$refs.input.$el.focus(),this.repeat(t,null,-1),t.preventDefault())},onDownButtonMouseUp(){this.$attrs.disabled||this.clearTimer()},onDownButtonMouseLeave(){this.$attrs.disabled||this.clearTimer()},onDownButtonKeyUp(){this.$attrs.disabled||this.clearTimer()},onDownButtonKeyDown(t){32!==t.keyCode&&13!==t.keyCode||this.repeat(t,null,-1)},onUserInput(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown(t){if(this.readonly)return;if(this.lastValue=t.target.value,t.shiftKey||t.altKey)return void(this.isSpecialChar=!0);let e=t.target.selectionStart,n=t.target.selectionEnd,i=t.target.value,s=null;switch(t.altKey&&t.preventDefault(),t.which){case 38:this.spin(t,1),t.preventDefault();break;case 40:this.spin(t,-1),t.preventDefault();break;case 37:this.isNumeralChar(i.charAt(e-1))||t.preventDefault();break;case 39:this.isNumeralChar(i.charAt(e))||t.preventDefault();break;case 9:case 13:s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(t,s);break;case 8:if(t.preventDefault(),e===n){const n=i.charAt(e-1),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const t=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,e-2)+i.slice(e-1);else if(this._decimal.test(n))this._decimal.lastIndex=0,t?this.$refs.input.$el.setSelectionRange(e-1,e-1):s=i.slice(0,e-1)+i.slice(e);else if(r>0&&e>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<t?"":"0";s=i.slice(0,e-1)+n+i.slice(e)}else 1===u?(s=i.slice(0,e-1)+"0"+i.slice(e),s=this.parseValue(s)>0?s:""):s=i.slice(0,e-1)+i.slice(e)}this.updateValue(t,s,null,"delete-single")}else s=this.deleteRange(i,e,n),this.updateValue(t,s,null,"delete-range");break;case 46:if(t.preventDefault(),e===n){const n=i.charAt(e),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const t=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,e)+i.slice(e+2);else if(this._decimal.test(n))this._decimal.lastIndex=0,t?this.$refs.input.$el.setSelectionRange(e+1,e+1):s=i.slice(0,e)+i.slice(e+1);else if(r>0&&e>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<t?"":"0";s=i.slice(0,e)+n+i.slice(e+1)}else 1===u?(s=i.slice(0,e)+"0"+i.slice(e+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,e)+i.slice(e+1)}this.updateValue(t,s,null,"delete-back-single")}else s=this.deleteRange(i,e,n),this.updateValue(t,s,null,"delete-range")}},onInputKeyPress(t){if(this.readonly)return;t.preventDefault();let e=t.which||t.keyCode,n=String.fromCharCode(e);const i=this.isDecimalSign(n),s=this.isMinusSign(n);(48<=e&&e<=57||s||i)&&this.insert(t,n,{isDecimalSign:i,isMinusSign:s})},onPaste(t){t.preventDefault();let e=(t.clipboardData||window.clipboardData).getData("Text");if(e){let n=this.parseValue(e);null!=n&&this.insert(t,n.toString())}},allowMinusSign(){return null===this.min||this.min<0},isMinusSign(t){return!(!this._minusSign.test(t)&&"-"!==t)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign(t){return!!this._decimal.test(t)&&(this._decimal.lastIndex=0,!0)},isDecimalMode(){return"decimal"===this.mode},getDecimalCharIndexes(t){let e=t.search(this._decimal);this._decimal.lastIndex=0;const n=t.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:e,decimalCharIndexWithoutPrefix:n}},getCharIndexes(t){const e=t.search(this._decimal);this._decimal.lastIndex=0;const n=t.search(this._minusSign);this._minusSign.lastIndex=0;const i=t.search(this._suffix);this._suffix.lastIndex=0;const s=t.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:e,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:s}},insert(t,e,n={isDecimalSign:!1,isMinusSign:!1}){const i=e.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==i)return;const s=this.$refs.input.$el.selectionStart,r=this.$refs.input.$el.selectionEnd;let u=this.$refs.input.$el.value.trim();const{decimalCharIndex:l,minusCharIndex:a,suffixCharIndex:o,currencyCharIndex:p}=this.getCharIndexes(u);let h;if(n.isMinusSign)0===s&&(h=u,-1!==a&&0===r||(h=this.insertText(u,e,0,r)),this.updateValue(t,h,e,"insert"));else if(n.isDecimalSign)l>0&&s===l?this.updateValue(t,u,e,"insert"):(l>s&&l<r||-1===l&&this.maxFractionDigits)&&(h=this.insertText(u,e,s,r),this.updateValue(t,h,e,"insert"));else{const n=this.numberFormat.resolvedOptions().maximumFractionDigits,i=s!==r?"range-insert":"insert";if(l>0&&s>l){if(s+e.length-(l+1)<=n){const n=p>=s?p-1:o>=s?o:u.length;h=u.slice(0,s)+e+u.slice(s+e.length,n)+u.slice(n),this.updateValue(t,h,e,i)}}else h=this.insertText(u,e,s,r),this.updateValue(t,h,e,i)}},insertText(t,e,n,i){if(2===("."===e?e:e.split(".")).length){const s=t.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,s>0?t.slice(0,n)+this.formatValue(e)+t.slice(i):t||this.formatValue(e)}return i-n===t.length?this.formatValue(e):0===n?e+t.slice(i):i===t.length?t.slice(0,n)+e:t.slice(0,n)+e+t.slice(i)},deleteRange(t,e,n){let i;return i=n-e===t.length?"":0===e?t.slice(n):n===t.length?t.slice(0,e):t.slice(0,e)+t.slice(n),i},initCursor(){let t=this.$refs.input.$el.selectionStart,e=this.$refs.input.$el.value,n=e.length,i=null,s=(this.prefixChar||"").length;e=e.replace(this._prefix,""),t-=s;let r=e.charAt(t);if(this.isNumeralChar(r))return t+s;let u=t-1;for(;u>=0;){if(r=e.charAt(u),this.isNumeralChar(r)){i=u+s;break}u--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(u=t;u<n;){if(r=e.charAt(u),this.isNumeralChar(r)){i=u+s;break}u++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick(){this.readonly||this.initCursor()},isNumeralChar(t){return!(1!==t.length||!(this._numeral.test(t)||this._decimal.test(t)||this._group.test(t)||this._minusSign.test(t)))&&(this.resetRegex(),!0)},resetRegex(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue(t,e,n,i){let s=this.$refs.input.$el.value,r=null;null!=e&&(r=this.parseValue(e),r=r||this.allowEmpty?r:0,this.updateInput(r,n,i,e),this.handleOnInput(t,s,r))},handleOnInput(t,e,n){this.isValueChanged(e,n)&&this.$emit("input",{originalEvent:t,value:n})},isValueChanged(t,e){if(null===e&&null!==t)return!0;if(null!=e){return e!==("string"==typeof t?this.parseValue(t):t)}return!1},validateValue(t){return"-"===t||null==t?null:null!=this.min&&t<this.min?this.min:null!=this.max&&t>this.max?this.max:t},updateInput(t,e,n,i){e=e||"";let s=this.$refs.input.$el.value,r=this.formatValue(t),u=s.length;if(r!==i&&(r=this.concatValues(r,i)),0===u){this.$refs.input.$el.value=r,this.$refs.input.$el.setSelectionRange(0,0);const t=this.initCursor()+e.length;this.$refs.input.$el.setSelectionRange(t,t)}else{let t=this.$refs.input.$el.selectionStart,i=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=r;let l=r.length;if("range-insert"===n){const n=this.parseValue((s||"").slice(0,t)),u=(null!==n?n.toString():"").split("").join(`(${this.groupChar})?`),l=new RegExp(u,"g");l.test(r);const a=e.split("").join(`(${this.groupChar})?`),o=new RegExp(a,"g");o.test(r.slice(l.lastIndex)),i=l.lastIndex+o.lastIndex,this.$refs.input.$el.setSelectionRange(i,i)}else if(l===u)"insert"===n||"delete-back-single"===n?this.$refs.input.$el.setSelectionRange(i+1,i+1):"delete-single"===n?this.$refs.input.$el.setSelectionRange(i-1,i-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(i,i);else if("delete-back-single"===n){let t=s.charAt(i-1),e=s.charAt(i),n=u-l,r=this._group.test(e);r&&1===n?i+=1:!r&&this.isNumeralChar(t)&&(i+=-1*n+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(i,i)}else if("-"===s&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);const t=this.initCursor()+e.length+1;this.$refs.input.$el.setSelectionRange(t,t)}else i+=l-u,this.$refs.input.$el.setSelectionRange(i,i)}this.$refs.input.$el.setAttribute("aria-valuenow",t)},concatValues(t,e){if(t&&e){let n=e.search(this._decimal);return this._decimal.lastIndex=0,-1!==n?t.split(this._decimal)[0]+e.slice(n):t}return t},getDecimalLength(t){if(t){const e=t.split(this._decimal);if(2===e.length)return e[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel(t,e){this.d_modelValue=e,this.$emit("update:modelValue",e)},onInputFocus(t){this.focused=!0,this.$emit("focus",t)},onInputBlur(t){this.focused=!1;let e=t.target,n=this.validateValue(this.parseValue(e.value));this.$emit("blur",{originalEvent:t,value:e.value}),e.value=this.formatValue(n),e.setAttribute("aria-valuenow",n),this.updateModel(t,n)},clearTimer(){this.timer&&clearInterval(this.timer)},maxBoundry(){return this.d_modelValue>=this.max},minBoundry(){return this.d_modelValue<=this.min}},computed:{containerClass(){return["p-inputnumber p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-inputnumber-buttons-stacked":this.showButtons&&"stacked"===this.buttonLayout,"p-inputnumber-buttons-horizontal":this.showButtons&&"horizontal"===this.buttonLayout,"p-inputnumber-buttons-vertical":this.showButtons&&"vertical"===this.buttonLayout}]},upButtonClass(){return["p-inputnumber-button p-inputnumber-button-up",this.incrementButtonClass,{"p-disabled":this.showButtons&&null!==this.max&&this.maxBoundry()}]},downButtonClass(){return["p-inputnumber-button p-inputnumber-button-down",this.decrementButtonClass,{"p-disabled":this.showButtons&&null!==this.min&&this.minBoundry()}]},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners(){return{mousedown:t=>this.onUpButtonMouseDown(t),mouseup:t=>this.onUpButtonMouseUp(t),mouseleave:t=>this.onUpButtonMouseLeave(t),keydown:t=>this.onUpButtonKeyDown(t),keyup:t=>this.onUpButtonKeyUp(t)}},downButtonListeners(){return{mousedown:t=>this.onDownButtonMouseDown(t),mouseup:t=>this.onDownButtonMouseUp(t),mouseleave:t=>this.onDownButtonMouseLeave(t),keydown:t=>this.onDownButtonKeyDown(t),keyup:t=>this.onDownButtonKeyUp(t)}},formattedValue(){const t=this.modelValue||this.allowEmpty?this.modelValue:0;return this.formatValue(t)},getFormatter(){return this.numberFormat}},components:{INInputText:t,INButton:e}};const d={key:0,class:"p-inputnumber-button-group"};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}("\n.p-inputnumber {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-inputnumber-button {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label {\n display: none;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-vertical {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-buttons-vertical .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n text-align: center;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-input {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-fluid .p-inputnumber {\n width: 100%;\n}\n.p-fluid .p-inputnumber .p-inputnumber-input {\n width: 1%;\n}\n.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input {\n width: 100%;\n}\n"),c.render=function(t,e,c,m,f,b){const g=n("INInputText"),x=n("INButton");return i(),s("span",{class:r(b.containerClass),style:u(c.style)},[l(g,a({ref:"input",class:["p-inputnumber-input",c.inputClass],style:c.inputStyle,value:b.formattedValue},t.$attrs,{"aria-valumin":c.min,"aria-valuemax":c.max,readonly:c.readonly,onInput:b.onUserInput,onKeydown:b.onInputKeyDown,onKeypress:b.onInputKeyPress,onPaste:b.onPaste,onClick:b.onInputClick,onFocus:b.onInputFocus,onBlur:b.onInputBlur}),null,16,["class","style","value","aria-valumin","aria-valuemax","readonly","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur"]),c.showButtons&&"stacked"===c.buttonLayout?(i(),s("span",d,[l(x,a({class:b.upButtonClass,icon:c.incrementButtonIcon},o(b.upButtonListeners),{disabled:t.$attrs.disabled}),null,16,["class","icon","disabled"]),l(x,a({class:b.downButtonClass,icon:c.decrementButtonIcon},o(b.downButtonListeners),{disabled:t.$attrs.disabled}),null,16,["class","icon","disabled"])])):p("",!0),c.showButtons&&"stacked"!==c.buttonLayout?(i(),h(x,a({key:1,class:b.upButtonClass,icon:c.incrementButtonIcon},o(b.upButtonListeners),{disabled:t.$attrs.disabled}),null,16,["class","icon","disabled"])):p("",!0),c.showButtons&&"stacked"!==c.buttonLayout?(i(),h(x,a({key:2,class:b.downButtonClass,icon:c.decrementButtonIcon},o(b.downButtonListeners),{disabled:t.$attrs.disabled}),null,16,["class","icon","disabled"])):p("",!0)],6)};export{c as default};
|
|
1
|
+
import e from"primevue/inputtext";import t from"primevue/button";import{resolveComponent as n,openBlock as i,createElementBlock as s,normalizeClass as r,createVNode as l,mergeProps as u,toHandlers as a,createCommentVNode as o,createBlock as p}from"vue";var h={name:"InputNumber",emits:["update:modelValue","input","focus","blur"],props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:"pi pi-angle-up"},decrementButtonIcon:{type:String,default:"pi pi-angle-down"},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:null,inputClass:null,inputStyle:null,inputProps:null,incrementButtonProps:null,decrementButtonProps:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue(e){this.d_modelValue=e},locale(e,t){this.updateConstructParser(e,t)},localeMatcher(e,t){this.updateConstructParser(e,t)},mode(e,t){this.updateConstructParser(e,t)},currency(e,t){this.updateConstructParser(e,t)},currencyDisplay(e,t){this.updateConstructParser(e,t)},useGrouping(e,t){this.updateConstructParser(e,t)},minFractionDigits(e,t){this.updateConstructParser(e,t)},maxFractionDigits(e,t){this.updateConstructParser(e,t)},suffix(e,t){this.updateConstructParser(e,t)},prefix(e,t){this.updateConstructParser(e,t)}},created(){this.constructParser()},methods:{getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits}},constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());const e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),t=new Map(e.map(((e,t)=>[e,t])));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=e=>t.get(e)},updateConstructParser(e,t){e!==t&&this.constructParser()},escapeRegExp:e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),getDecimalExpression(){const e=new Intl.NumberFormat(this.locale,{...this.getOptions(),useGrouping:!1});return new RegExp(`[${e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}]`,"g")},getGroupingExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")},getMinusSignExpression(){const e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")},getCurrencyExpression(){if(this.currency){const e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")},getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")},getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{const e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")},formatValue(e){if(null!=e){if("-"===e)return e;if(this.format){let t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return""},parseValue(e){let t=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(t){if("-"===t)return t;let e=+t;return isNaN(e)?null:e}return null},repeat(e,t,n){if(this.readonly)return;let i=t||500;this.clearTimer(),this.timer=setTimeout((()=>{this.repeat(e,40,n)}),i),this.spin(e,n)},spin(e,t){if(this.$refs.input){let n=this.step*t,i=this.parseValue(this.$refs.input.$el.value)||0,s=this.validateValue(i+n);this.updateInput(s,null,"spin"),this.updateModel(e,s),this.handleOnInput(e,i,s)}},onUpButtonMouseDown(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp(){this.disabled||this.clearTimer()},onUpButtonMouseLeave(){this.disabled||this.clearTimer()},onUpButtonKeyUp(){this.disabled||this.clearTimer()},onUpButtonKeyDown(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,1)},onDownButtonMouseDown(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp(){this.disabled||this.clearTimer()},onDownButtonMouseLeave(){this.disabled||this.clearTimer()},onDownButtonKeyUp(){this.disabled||this.clearTimer()},onDownButtonKeyDown(e){32!==e.keyCode&&13!==e.keyCode||this.repeat(e,null,-1)},onUserInput(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown(e){if(this.readonly)return;if(this.lastValue=e.target.value,e.shiftKey||e.altKey)return void(this.isSpecialChar=!0);let t=e.target.selectionStart,n=e.target.selectionEnd,i=e.target.value,s=null;switch(e.altKey&&e.preventDefault(),e.which){case 38:this.spin(e,1),e.preventDefault();break;case 40:this.spin(e,-1),e.preventDefault();break;case 37:this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case 39:this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case 9:case 13:s=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(s),this.$refs.input.$el.setAttribute("aria-valuenow",s),this.updateModel(e,s);break;case 8:if(e.preventDefault(),t===n){const n=i.charAt(t-1),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:l}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const e=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(n))this._decimal.lastIndex=0,e?this.$refs.input.$el.setSelectionRange(t-1,t-1):s=i.slice(0,t-1)+i.slice(t);else if(r>0&&t>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<e?"":"0";s=i.slice(0,t-1)+n+i.slice(t)}else 1===l?(s=i.slice(0,t-1)+"0"+i.slice(t),s=this.parseValue(s)>0?s:""):s=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,s,null,"delete-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case 46:if(e.preventDefault(),t===n){const n=i.charAt(t),{decimalCharIndex:r,decimalCharIndexWithoutPrefix:l}=this.getDecimalCharIndexes(i);if(this.isNumeralChar(n)){const e=this.getDecimalLength(i);if(this._group.test(n))this._group.lastIndex=0,s=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(n))this._decimal.lastIndex=0,e?this.$refs.input.$el.setSelectionRange(t+1,t+1):s=i.slice(0,t)+i.slice(t+1);else if(r>0&&t>r){const n=this.isDecimalMode()&&(this.minFractionDigits||0)<e?"":"0";s=i.slice(0,t)+n+i.slice(t+1)}else 1===l?(s=i.slice(0,t)+"0"+i.slice(t+1),s=this.parseValue(s)>0?s:""):s=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,s,null,"delete-back-single")}else s=this.deleteRange(i,t,n),this.updateValue(e,s,null,"delete-range");break;case 36:this.min&&(this.updateModel(e,this.min),e.preventDefault());break;case 35:this.max&&(this.updateModel(e,this.max),e.preventDefault())}},onInputKeyPress(e){if(this.readonly)return;e.preventDefault();let t=e.which||e.keyCode,n=String.fromCharCode(t);const i=this.isDecimalSign(n),s=this.isMinusSign(n);(48<=t&&t<=57||s||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:s})},onPaste(e){e.preventDefault();let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.parseValue(t);null!=n&&this.insert(e,n.toString())}},allowMinusSign(){return null===this.min||this.min<0},isMinusSign(e){return!(!this._minusSign.test(e)&&"-"!==e)&&(this._minusSign.lastIndex=0,!0)},isDecimalSign(e){return!!this._decimal.test(e)&&(this._decimal.lastIndex=0,!0)},isDecimalMode(){return"decimal"===this.mode},getDecimalCharIndexes(e){let t=e.search(this._decimal);this._decimal.lastIndex=0;const n=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes(e){const t=e.search(this._decimal);this._decimal.lastIndex=0;const n=e.search(this._minusSign);this._minusSign.lastIndex=0;const i=e.search(this._suffix);this._suffix.lastIndex=0;const s=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:i,currencyCharIndex:s}},insert(e,t,n={isDecimalSign:!1,isMinusSign:!1}){const i=t.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&-1!==i)return;const s=this.$refs.input.$el.selectionStart,r=this.$refs.input.$el.selectionEnd;let l=this.$refs.input.$el.value.trim();const{decimalCharIndex:u,minusCharIndex:a,suffixCharIndex:o,currencyCharIndex:p}=this.getCharIndexes(l);let h;if(n.isMinusSign)0===s&&(h=l,-1!==a&&0===r||(h=this.insertText(l,t,0,r)),this.updateValue(e,h,t,"insert"));else if(n.isDecimalSign)u>0&&s===u?this.updateValue(e,l,t,"insert"):(u>s&&u<r||-1===u&&this.maxFractionDigits)&&(h=this.insertText(l,t,s,r),this.updateValue(e,h,t,"insert"));else{const n=this.numberFormat.resolvedOptions().maximumFractionDigits,i=s!==r?"range-insert":"insert";if(u>0&&s>u){if(s+t.length-(u+1)<=n){const n=p>=s?p-1:o>=s?o:l.length;h=l.slice(0,s)+t+l.slice(s+t.length,n)+l.slice(n),this.updateValue(e,h,t,i)}}else h=this.insertText(l,t,s,r),this.updateValue(e,h,t,i)}},insertText(e,t,n,i){if(2===("."===t?t:t.split(".")).length){const s=e.slice(n,i).search(this._decimal);return this._decimal.lastIndex=0,s>0?e.slice(0,n)+this.formatValue(t)+e.slice(i):e||this.formatValue(t)}return i-n===e.length?this.formatValue(t):0===n?t+e.slice(i):i===e.length?e.slice(0,n)+t:e.slice(0,n)+t+e.slice(i)},deleteRange(e,t,n){let i;return i=n-t===e.length?"":0===t?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n),i},initCursor(){let e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,i=null,s=(this.prefixChar||"").length;t=t.replace(this._prefix,""),e-=s;let r=t.charAt(e);if(this.isNumeralChar(r))return e+s;let l=e-1;for(;l>=0;){if(r=t.charAt(l),this.isNumeralChar(r)){i=l+s;break}l--}if(null!==i)this.$refs.input.$el.setSelectionRange(i+1,i+1);else{for(l=e;l<n;){if(r=t.charAt(l),this.isNumeralChar(r)){i=l+s;break}l++}null!==i&&this.$refs.input.$el.setSelectionRange(i,i)}return i||0},onInputClick(){this.readonly||this.initCursor()},isNumeralChar(e){return!(1!==e.length||!(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e)))&&(this.resetRegex(),!0)},resetRegex(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue(e,t,n,i){let s=this.$refs.input.$el.value,r=null;null!=t&&(r=this.parseValue(t),r=r||this.allowEmpty?r:0,this.updateInput(r,n,i,t),this.handleOnInput(e,s,r))},handleOnInput(e,t,n){this.isValueChanged(t,n)&&this.$emit("input",{originalEvent:e,value:n})},isValueChanged(e,t){if(null===t&&null!==e)return!0;if(null!=t){return t!==("string"==typeof e?this.parseValue(e):e)}return!1},validateValue(e){return"-"===e||null==e?null:null!=this.min&&e<this.min?this.min:null!=this.max&&e>this.max?this.max:e},updateInput(e,t,n,i){t=t||"";let s=this.$refs.input.$el.value,r=this.formatValue(e),l=s.length;if(r!==i&&(r=this.concatValues(r,i)),0===l){this.$refs.input.$el.value=r,this.$refs.input.$el.setSelectionRange(0,0);const e=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(e,e)}else{let e=this.$refs.input.$el.selectionStart,i=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=r;let u=r.length;if("range-insert"===n){const n=this.parseValue((s||"").slice(0,e)),l=(null!==n?n.toString():"").split("").join(`(${this.groupChar})?`),u=new RegExp(l,"g");u.test(r);const a=t.split("").join(`(${this.groupChar})?`),o=new RegExp(a,"g");o.test(r.slice(u.lastIndex)),i=u.lastIndex+o.lastIndex,this.$refs.input.$el.setSelectionRange(i,i)}else if(u===l)"insert"===n||"delete-back-single"===n?this.$refs.input.$el.setSelectionRange(i+1,i+1):"delete-single"===n?this.$refs.input.$el.setSelectionRange(i-1,i-1):"delete-range"!==n&&"spin"!==n||this.$refs.input.$el.setSelectionRange(i,i);else if("delete-back-single"===n){let e=s.charAt(i-1),t=s.charAt(i),n=l-u,r=this._group.test(t);r&&1===n?i+=1:!r&&this.isNumeralChar(e)&&(i+=-1*n+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(i,i)}else if("-"===s&&"insert"===n){this.$refs.input.$el.setSelectionRange(0,0);const e=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(e,e)}else i+=u-l,this.$refs.input.$el.setSelectionRange(i,i)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues(e,t){if(e&&t){let n=t.search(this._decimal);return this._decimal.lastIndex=0,-1!==n?e.split(this._decimal)[0]+t.slice(n):e}return e},getDecimalLength(e){if(e){const t=e.split(this._decimal);if(2===t.length)return t[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel(e,t){this.d_modelValue=t,this.$emit("update:modelValue",t)},onInputFocus(e){this.focused=!0,this.$emit("focus",e)},onInputBlur(e){this.focused=!1;let t=e.target,n=this.validateValue(this.parseValue(t.value));this.$emit("blur",{originalEvent:e,value:t.value}),t.value=this.formatValue(n),t.setAttribute("aria-valuenow",n),this.updateModel(e,n)},clearTimer(){this.timer&&clearInterval(this.timer)},maxBoundry(){return this.d_modelValue>=this.max},minBoundry(){return this.d_modelValue<=this.min}},computed:{containerClass(){return["p-inputnumber p-component p-inputwrapper",{"p-inputwrapper-filled":this.filled,"p-inputwrapper-focus":this.focused,"p-inputnumber-buttons-stacked":this.showButtons&&"stacked"===this.buttonLayout,"p-inputnumber-buttons-horizontal":this.showButtons&&"horizontal"===this.buttonLayout,"p-inputnumber-buttons-vertical":this.showButtons&&"vertical"===this.buttonLayout}]},upButtonClass(){return["p-inputnumber-button p-inputnumber-button-up",this.incrementButtonClass,{"p-disabled":this.showButtons&&null!==this.max&&this.maxBoundry()}]},downButtonClass(){return["p-inputnumber-button p-inputnumber-button-down",this.decrementButtonClass,{"p-disabled":this.showButtons&&null!==this.min&&this.minBoundry()}]},filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},upButtonListeners(){return{mousedown:e=>this.onUpButtonMouseDown(e),mouseup:e=>this.onUpButtonMouseUp(e),mouseleave:e=>this.onUpButtonMouseLeave(e),keydown:e=>this.onUpButtonKeyDown(e),keyup:e=>this.onUpButtonKeyUp(e)}},downButtonListeners(){return{mousedown:e=>this.onDownButtonMouseDown(e),mouseup:e=>this.onDownButtonMouseUp(e),mouseleave:e=>this.onDownButtonMouseLeave(e),keydown:e=>this.onDownButtonKeyDown(e),keyup:e=>this.onDownButtonKeyUp(e)}},formattedValue(){const e=this.modelValue||this.allowEmpty?this.modelValue:0;return this.formatValue(e)},getFormatter(){return this.numberFormat}},components:{INInputText:e,INButton:t}};const c={key:0,class:"p-inputnumber-button-group"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-inputnumber {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-inputnumber-button {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label {\n display: none;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n padding: 0;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-vertical {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-buttons-vertical .p-inputnumber-input {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n border-radius: 0;\n text-align: center;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\n -webkit-box-ordinal-group: 4;\n -ms-flex-order: 3;\n order: 3;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-input {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-fluid .p-inputnumber {\n width: 100%;\n}\n.p-fluid .p-inputnumber .p-inputnumber-input {\n width: 1%;\n}\n.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input {\n width: 100%;\n}\n"),h.render=function(e,t,h,d,m,f){const b=n("INInputText"),g=n("INButton");return i(),s("span",{class:r(f.containerClass)},[l(b,u({ref:"input",class:["p-inputnumber-input",h.inputClass],role:"spinbutton",id:h.inputId,style:h.inputStyle,value:f.formattedValue,"aria-valuemin":h.min,"aria-valuemax":h.max,"aria-valuenow":h.modelValue,disabled:h.disabled,readonly:h.readonly,placeholder:h.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onInput:f.onUserInput,onKeydown:f.onInputKeyDown,onKeypress:f.onInputKeyPress,onPaste:f.onPaste,onClick:f.onInputClick,onFocus:f.onInputFocus,onBlur:f.onInputBlur},h.inputProps),null,16,["id","class","style","value","aria-valuemin","aria-valuemax","aria-valuenow","disabled","readonly","placeholder","aria-labelledby","aria-label","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur"]),h.showButtons&&"stacked"===h.buttonLayout?(i(),s("span",c,[l(g,u({class:f.upButtonClass,icon:h.incrementButtonIcon},a(f.upButtonListeners),{disabled:h.disabled,tabindex:-1,"aria-hidden":"true"},h.incrementButtonProps),null,16,["class","icon","disabled"]),l(g,u({class:f.downButtonClass,icon:h.decrementButtonIcon},a(f.downButtonListeners),{disabled:h.disabled,tabindex:-1,"aria-hidden":"true"},h.decrementButtonProps),null,16,["class","icon","disabled"])])):o("",!0),h.showButtons&&"stacked"!==h.buttonLayout?(i(),p(g,u({key:1,class:f.upButtonClass,icon:h.incrementButtonIcon},a(f.upButtonListeners),{disabled:h.disabled,tabindex:-1,"aria-hidden":"true"},h.incrementButtonProps),null,16,["class","icon","disabled"])):o("",!0),h.showButtons&&"stacked"!==h.buttonLayout?(i(),p(g,u({key:2,class:f.downButtonClass,icon:h.decrementButtonIcon},a(f.downButtonListeners),{disabled:h.disabled,tabindex:-1,"aria-hidden":"true"},h.decrementButtonProps),null,16,["class","icon","disabled"])):o("",!0)],2)};export{h as default};
|
|
@@ -9,7 +9,6 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
9
9
|
|
|
10
10
|
var script = {
|
|
11
11
|
name: 'InputNumber',
|
|
12
|
-
inheritAttrs: false,
|
|
13
12
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
14
13
|
props: {
|
|
15
14
|
modelValue: {
|
|
@@ -104,10 +103,28 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
104
103
|
type: Boolean,
|
|
105
104
|
default: false
|
|
106
105
|
},
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
disabled: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false
|
|
109
|
+
},
|
|
110
|
+
placeholder: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: null
|
|
113
|
+
},
|
|
114
|
+
inputId: null,
|
|
115
|
+
inputClass: null,
|
|
109
116
|
inputStyle: null,
|
|
110
|
-
|
|
117
|
+
inputProps: null,
|
|
118
|
+
incrementButtonProps: null,
|
|
119
|
+
decrementButtonProps: null,
|
|
120
|
+
'aria-labelledby': {
|
|
121
|
+
type: String,
|
|
122
|
+
default: null
|
|
123
|
+
},
|
|
124
|
+
'aria-label': {
|
|
125
|
+
type: String,
|
|
126
|
+
default: null
|
|
127
|
+
}
|
|
111
128
|
},
|
|
112
129
|
numberFormat: null,
|
|
113
130
|
_numeral: null,
|
|
@@ -319,24 +336,24 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
319
336
|
}
|
|
320
337
|
},
|
|
321
338
|
onUpButtonMouseDown(event) {
|
|
322
|
-
if (!this
|
|
339
|
+
if (!this.disabled) {
|
|
323
340
|
this.$refs.input.$el.focus();
|
|
324
341
|
this.repeat(event, null, 1);
|
|
325
342
|
event.preventDefault();
|
|
326
343
|
}
|
|
327
344
|
},
|
|
328
345
|
onUpButtonMouseUp() {
|
|
329
|
-
if (!this
|
|
346
|
+
if (!this.disabled) {
|
|
330
347
|
this.clearTimer();
|
|
331
348
|
}
|
|
332
349
|
},
|
|
333
350
|
onUpButtonMouseLeave() {
|
|
334
|
-
if (!this
|
|
351
|
+
if (!this.disabled) {
|
|
335
352
|
this.clearTimer();
|
|
336
353
|
}
|
|
337
354
|
},
|
|
338
355
|
onUpButtonKeyUp() {
|
|
339
|
-
if (!this
|
|
356
|
+
if (!this.disabled) {
|
|
340
357
|
this.clearTimer();
|
|
341
358
|
}
|
|
342
359
|
},
|
|
@@ -346,24 +363,24 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
346
363
|
}
|
|
347
364
|
},
|
|
348
365
|
onDownButtonMouseDown(event) {
|
|
349
|
-
if (!this
|
|
366
|
+
if (!this.disabled) {
|
|
350
367
|
this.$refs.input.$el.focus();
|
|
351
368
|
this.repeat(event, null, -1);
|
|
352
369
|
event.preventDefault();
|
|
353
370
|
}
|
|
354
371
|
},
|
|
355
372
|
onDownButtonMouseUp() {
|
|
356
|
-
if (!this
|
|
373
|
+
if (!this.disabled) {
|
|
357
374
|
this.clearTimer();
|
|
358
375
|
}
|
|
359
376
|
},
|
|
360
377
|
onDownButtonMouseLeave() {
|
|
361
|
-
if (!this
|
|
378
|
+
if (!this.disabled) {
|
|
362
379
|
this.clearTimer();
|
|
363
380
|
}
|
|
364
381
|
},
|
|
365
382
|
onDownButtonKeyUp() {
|
|
366
|
-
if (!this
|
|
383
|
+
if (!this.disabled) {
|
|
367
384
|
this.clearTimer();
|
|
368
385
|
}
|
|
369
386
|
},
|
|
@@ -527,6 +544,22 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
527
544
|
this.updateValue(event, newValueStr, null, 'delete-range');
|
|
528
545
|
}
|
|
529
546
|
break;
|
|
547
|
+
|
|
548
|
+
//home
|
|
549
|
+
case 36:
|
|
550
|
+
if (this.min) {
|
|
551
|
+
this.updateModel(event, this.min);
|
|
552
|
+
event.preventDefault();
|
|
553
|
+
}
|
|
554
|
+
break;
|
|
555
|
+
|
|
556
|
+
//end
|
|
557
|
+
case 35:
|
|
558
|
+
if (this.max) {
|
|
559
|
+
this.updateModel(event, this.max);
|
|
560
|
+
event.preventDefault();
|
|
561
|
+
}
|
|
562
|
+
break;
|
|
530
563
|
}
|
|
531
564
|
},
|
|
532
565
|
onInputKeyPress(event) {
|
|
@@ -936,7 +969,7 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
936
969
|
},
|
|
937
970
|
computed: {
|
|
938
971
|
containerClass() {
|
|
939
|
-
return ['p-inputnumber p-component p-inputwrapper',
|
|
972
|
+
return ['p-inputnumber p-component p-inputwrapper', {
|
|
940
973
|
'p-inputwrapper-filled': this.filled,
|
|
941
974
|
'p-inputwrapper-focus': this.focused,
|
|
942
975
|
'p-inputnumber-buttons-stacked': this.showButtons && this.buttonLayout === 'stacked',
|
|
@@ -1000,18 +1033,23 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
1000
1033
|
const _component_INButton = vue.resolveComponent("INButton");
|
|
1001
1034
|
|
|
1002
1035
|
return (vue.openBlock(), vue.createElementBlock("span", {
|
|
1003
|
-
class: vue.normalizeClass($options.containerClass)
|
|
1004
|
-
style: vue.normalizeStyle($props.style)
|
|
1036
|
+
class: vue.normalizeClass($options.containerClass)
|
|
1005
1037
|
}, [
|
|
1006
1038
|
vue.createVNode(_component_INInputText, vue.mergeProps({
|
|
1007
1039
|
ref: "input",
|
|
1008
|
-
class: [
|
|
1040
|
+
class: ["p-inputnumber-input", $props.inputClass],
|
|
1041
|
+
role: "spinbutton",
|
|
1042
|
+
id: $props.inputId,
|
|
1009
1043
|
style: $props.inputStyle,
|
|
1010
|
-
value: $options.formattedValue
|
|
1011
|
-
|
|
1012
|
-
"aria-valumin": $props.min,
|
|
1044
|
+
value: $options.formattedValue,
|
|
1045
|
+
"aria-valuemin": $props.min,
|
|
1013
1046
|
"aria-valuemax": $props.max,
|
|
1047
|
+
"aria-valuenow": $props.modelValue,
|
|
1048
|
+
disabled: $props.disabled,
|
|
1014
1049
|
readonly: $props.readonly,
|
|
1050
|
+
placeholder: $props.placeholder,
|
|
1051
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
1052
|
+
"aria-label": _ctx.ariaLabel,
|
|
1015
1053
|
onInput: $options.onUserInput,
|
|
1016
1054
|
onKeydown: $options.onInputKeyDown,
|
|
1017
1055
|
onKeypress: $options.onInputKeyPress,
|
|
@@ -1019,21 +1057,25 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
1019
1057
|
onClick: $options.onInputClick,
|
|
1020
1058
|
onFocus: $options.onInputFocus,
|
|
1021
1059
|
onBlur: $options.onInputBlur
|
|
1022
|
-
}), null, 16, ["class", "style", "value", "aria-
|
|
1060
|
+
}, $props.inputProps), null, 16, ["id", "class", "style", "value", "aria-valuemin", "aria-valuemax", "aria-valuenow", "disabled", "readonly", "placeholder", "aria-labelledby", "aria-label", "onInput", "onKeydown", "onKeypress", "onPaste", "onClick", "onFocus", "onBlur"]),
|
|
1023
1061
|
($props.showButtons && $props.buttonLayout === 'stacked')
|
|
1024
1062
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
|
|
1025
1063
|
vue.createVNode(_component_INButton, vue.mergeProps({
|
|
1026
1064
|
class: $options.upButtonClass,
|
|
1027
1065
|
icon: $props.incrementButtonIcon
|
|
1028
1066
|
}, vue.toHandlers($options.upButtonListeners), {
|
|
1029
|
-
disabled:
|
|
1030
|
-
|
|
1067
|
+
disabled: $props.disabled,
|
|
1068
|
+
tabindex: -1,
|
|
1069
|
+
"aria-hidden": "true"
|
|
1070
|
+
}, $props.incrementButtonProps), null, 16, ["class", "icon", "disabled"]),
|
|
1031
1071
|
vue.createVNode(_component_INButton, vue.mergeProps({
|
|
1032
1072
|
class: $options.downButtonClass,
|
|
1033
1073
|
icon: $props.decrementButtonIcon
|
|
1034
1074
|
}, vue.toHandlers($options.downButtonListeners), {
|
|
1035
|
-
disabled:
|
|
1036
|
-
|
|
1075
|
+
disabled: $props.disabled,
|
|
1076
|
+
tabindex: -1,
|
|
1077
|
+
"aria-hidden": "true"
|
|
1078
|
+
}, $props.decrementButtonProps), null, 16, ["class", "icon", "disabled"])
|
|
1037
1079
|
]))
|
|
1038
1080
|
: vue.createCommentVNode("", true),
|
|
1039
1081
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
@@ -1042,8 +1084,10 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
1042
1084
|
class: $options.upButtonClass,
|
|
1043
1085
|
icon: $props.incrementButtonIcon
|
|
1044
1086
|
}, vue.toHandlers($options.upButtonListeners), {
|
|
1045
|
-
disabled:
|
|
1046
|
-
|
|
1087
|
+
disabled: $props.disabled,
|
|
1088
|
+
tabindex: -1,
|
|
1089
|
+
"aria-hidden": "true"
|
|
1090
|
+
}, $props.incrementButtonProps), null, 16, ["class", "icon", "disabled"]))
|
|
1047
1091
|
: vue.createCommentVNode("", true),
|
|
1048
1092
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
1049
1093
|
? (vue.openBlock(), vue.createBlock(_component_INButton, vue.mergeProps({
|
|
@@ -1051,10 +1095,12 @@ this.primevue.inputnumber = (function (InputText, Button, vue) {
|
|
|
1051
1095
|
class: $options.downButtonClass,
|
|
1052
1096
|
icon: $props.decrementButtonIcon
|
|
1053
1097
|
}, vue.toHandlers($options.downButtonListeners), {
|
|
1054
|
-
disabled:
|
|
1055
|
-
|
|
1098
|
+
disabled: $props.disabled,
|
|
1099
|
+
tabindex: -1,
|
|
1100
|
+
"aria-hidden": "true"
|
|
1101
|
+
}, $props.decrementButtonProps), null, 16, ["class", "icon", "disabled"]))
|
|
1056
1102
|
: vue.createCommentVNode("", true)
|
|
1057
|
-
],
|
|
1103
|
+
], 2))
|
|
1058
1104
|
}
|
|
1059
1105
|
|
|
1060
1106
|
function styleInject(css, ref) {
|