primevue 3.28.0 → 3.29.0
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/README.md +3 -3
- package/autocomplete/AutoComplete.d.ts +153 -1
- package/autocomplete/AutoComplete.vue +46 -17
- package/autocomplete/autocomplete.cjs.js +80 -74
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +80 -75
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +81 -76
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/BaseComponent.vue +19 -5
- package/basecomponent/basecomponent.cjs.js +19 -5
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +19 -5
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +20 -7
- package/basecomponent/basecomponent.min.js +1 -1
- package/calendar/Calendar.d.ts +269 -0
- package/calendar/Calendar.vue +75 -59
- package/calendar/calendar.cjs.js +223 -259
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +223 -260
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +224 -261
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +154 -0
- package/carousel/Carousel.vue +27 -14
- package/carousel/carousel.cjs.js +64 -65
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +64 -66
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +65 -67
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +133 -0
- package/cascadeselect/CascadeSelect.vue +15 -12
- package/cascadeselect/CascadeSelectSub.vue +7 -3
- package/cascadeselect/cascadeselect.cjs.js +63 -66
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +63 -67
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +64 -68
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +60 -0
- package/checkbox/Checkbox.vue +7 -5
- package/checkbox/checkbox.cjs.js +17 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +17 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +18 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +80 -0
- package/chips/Chips.vue +9 -5
- package/chips/chips.cjs.js +23 -24
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +23 -25
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +24 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +76 -0
- package/colorpicker/ColorPicker.vue +11 -9
- package/colorpicker/colorpicker.cjs.js +28 -27
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +28 -28
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +29 -29
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +303 -2
- package/column/Column.vue +3 -0
- package/column/column.cjs.js +7 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +3 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +7 -2
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.d.ts +34 -0
- package/columngroup/ColumnGroup.vue +3 -0
- package/columngroup/columngroup.cjs.js +7 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +3 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +7 -2
- package/columngroup/columngroup.min.js +1 -1
- package/config/PrimeVue.d.ts +163 -2
- package/confirmdialog/ConfirmDialog.d.ts +14 -7
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/core/core.js +448 -331
- package/core/core.min.js +9 -9
- package/datatable/BodyCell.vue +29 -13
- package/datatable/ColumnFilter.vue +49 -20
- package/datatable/DataTable.d.ts +188 -1
- package/datatable/DataTable.vue +25 -14
- package/datatable/FooterCell.vue +15 -1
- package/datatable/HeaderCell.vue +31 -6
- package/datatable/HeaderCheckbox.vue +35 -5
- package/datatable/RowCheckbox.vue +36 -5
- package/datatable/RowRadioButton.vue +26 -6
- package/datatable/TableBody.vue +41 -11
- package/datatable/TableFooter.vue +31 -5
- package/datatable/TableHeader.vue +53 -6
- package/datatable/datatable.cjs.js +559 -376
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +559 -377
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +560 -378
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +72 -0
- package/dataview/DataView.vue +13 -8
- package/dataview/dataview.cjs.js +33 -37
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +33 -38
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -38
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dialog/Dialog.d.ts +6 -4
- package/dialog/Dialog.vue +2 -3
- package/dialog/dialog.cjs.js +4 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +4 -5
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +4 -5
- package/dialog/dialog.min.js +1 -1
- package/dropdown/Dropdown.d.ts +162 -1
- package/dropdown/Dropdown.vue +44 -25
- package/dropdown/dropdown.cjs.js +97 -93
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +97 -94
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -95
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +67 -0
- package/editor/Editor.vue +35 -33
- package/editor/editor.cjs.js +88 -73
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +85 -74
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +89 -75
- package/editor/editor.min.js +1 -1
- package/fileupload/FileUpload.d.ts +23 -23
- package/fileupload/FileUpload.vue +3 -3
- package/fileupload/fileupload.cjs.js +4 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -4
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/Galleria.d.ts +196 -0
- package/galleria/Galleria.vue +5 -3
- package/galleria/GalleriaContent.vue +10 -6
- package/galleria/GalleriaItem.vue +12 -9
- package/galleria/GalleriaThumbnails.vue +46 -9
- package/galleria/galleria.cjs.js +106 -104
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +106 -105
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +107 -106
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +170 -0
- package/image/Image.vue +49 -21
- package/image/image.cjs.js +94 -59
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +94 -60
- package/image/image.esm.min.js +1 -1
- package/image/image.js +95 -61
- package/image/image.min.js +1 -1
- package/inputmask/InputMask.d.ts +25 -0
- package/inputmask/InputMask.vue +3 -1
- package/inputmask/inputmask.cjs.js +9 -3
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +6 -4
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +10 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +69 -0
- package/inputnumber/InputNumber.vue +13 -11
- package/inputnumber/inputnumber.cjs.js +19 -28
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +19 -29
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +20 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +51 -0
- package/inputswitch/InputSwitch.vue +7 -4
- package/inputswitch/inputswitch.cjs.js +15 -11
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +12 -12
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +16 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +25 -0
- package/inputtext/InputText.vue +4 -1
- package/inputtext/inputtext.cjs.js +9 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +6 -4
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +10 -5
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +78 -0
- package/knob/Knob.vue +8 -4
- package/knob/knob.cjs.js +17 -13
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +14 -14
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +18 -15
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +137 -1
- package/listbox/Listbox.vue +28 -15
- package/listbox/listbox.cjs.js +83 -78
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +83 -79
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +84 -80
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +5 -5
- package/menu/Menu.d.ts +4 -4
- package/menubar/Menubar.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +223 -1
- package/multiselect/MultiSelect.vue +72 -41
- package/multiselect/multiselect.cjs.js +156 -151
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +156 -152
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +157 -153
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +94 -0
- package/orderlist/OrderList.vue +38 -18
- package/orderlist/orderlist.cjs.js +50 -36
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +50 -37
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +51 -38
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +129 -0
- package/organizationchart/OrganizationChart.vue +14 -2
- package/organizationchart/OrganizationChartNode.vue +37 -16
- package/organizationchart/organizationchart.cjs.js +77 -61
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +77 -62
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +78 -63
- package/organizationchart/organizationchart.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +5 -1
- package/paginator/FirstPageLink.vue +13 -2
- package/paginator/JumpToPageDropdown.vue +3 -1
- package/paginator/JumpToPageInput.vue +3 -1
- package/paginator/LastPageLink.vue +13 -2
- package/paginator/NextPageLink.vue +13 -2
- package/paginator/PageLinks.vue +12 -2
- package/paginator/Paginator.d.ts +133 -0
- package/paginator/Paginator.vue +23 -12
- package/paginator/PrevPageLink.vue +13 -2
- package/paginator/RowsPerPageDropdown.vue +3 -1
- package/paginator/paginator.cjs.js +135 -76
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +135 -77
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +136 -78
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +4 -8
- package/password/Password.d.ts +104 -0
- package/password/Password.vue +11 -9
- package/password/password.cjs.js +26 -28
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +26 -29
- package/password/password.esm.min.js +1 -1
- package/password/password.js +27 -30
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +160 -0
- package/picklist/PickList.vue +46 -34
- package/picklist/picklist.cjs.js +111 -85
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +111 -86
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +112 -87
- package/picklist/picklist.min.js +1 -1
- package/radiobutton/RadioButton.d.ts +55 -0
- package/radiobutton/RadioButton.vue +7 -5
- package/radiobutton/radiobutton.cjs.js +19 -16
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +16 -17
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +20 -18
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +96 -0
- package/rating/Rating.vue +32 -9
- package/rating/rating.cjs.js +41 -34
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +41 -35
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +42 -36
- package/rating/rating.min.js +1 -1
- package/row/Row.d.ts +29 -0
- package/row/Row.vue +3 -0
- package/row/row.cjs.js +7 -0
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +3 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +7 -2
- package/row/row.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +68 -0
- package/selectbutton/SelectButton.vue +13 -2
- package/selectbutton/selectbutton.cjs.js +20 -10
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +20 -11
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +21 -12
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +48 -0
- package/slider/Slider.vue +7 -2
- package/slider/slider.cjs.js +22 -16
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +19 -17
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +23 -18
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +0 -4
- package/splitbutton/SplitButton.vue +2 -2
- package/splitbutton/splitbutton.cjs.js +7 -6
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -6
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -6
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +3 -3
- package/textarea/Textarea.d.ts +32 -0
- package/textarea/Textarea.vue +4 -1
- package/textarea/textarea.cjs.js +9 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +6 -4
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +10 -5
- package/textarea/textarea.min.js +1 -1
- package/timeline/Timeline.d.ts +49 -0
- package/timeline/Timeline.vue +9 -7
- package/timeline/timeline.cjs.js +19 -21
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +16 -22
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +20 -23
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +4 -0
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +3 -3
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +3 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +3 -3
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +59 -0
- package/togglebutton/ToggleButton.vue +7 -5
- package/togglebutton/togglebutton.cjs.js +15 -14
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +15 -15
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +16 -16
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/Tooltip.d.ts +10 -0
- package/tooltip/tooltip.cjs.js +51 -9
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +52 -10
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +51 -9
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +137 -0
- package/tree/Tree.vue +12 -9
- package/tree/TreeNode.vue +23 -10
- package/tree/tree.cjs.js +85 -79
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +85 -80
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +86 -81
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +103 -1
- package/treeselect/TreeSelect.vue +15 -12
- package/treeselect/treeselect.cjs.js +37 -39
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +37 -40
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +38 -41
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +38 -10
- package/treetable/FooterCell.vue +15 -1
- package/treetable/HeaderCell.vue +28 -5
- package/treetable/TreeTable.d.ts +162 -0
- package/treetable/TreeTable.vue +25 -19
- package/treetable/TreeTableRow.vue +5 -0
- package/treetable/treetable.cjs.js +205 -158
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +205 -159
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +206 -160
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
- package/tristatecheckbox/TriStateCheckbox.vue +19 -8
- package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +3 -1
- package/vetur-attributes.json +180 -0
- package/vetur-tags.json +94 -39
- package/virtualscroller/VirtualScroller.d.ts +97 -0
- package/virtualscroller/VirtualScroller.vue +7 -5
- package/virtualscroller/virtualscroller.cjs.js +22 -19
- 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 +23 -21
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +467 -3
- package/datatable/TableLoadingBody.vue +0 -25
package/inputmask/inputmask.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.inputmask = (function (utils, vue) {
|
|
2
|
+
this.primevue.inputmask = (function (BaseComponent, utils, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
|
+
|
|
5
9
|
var script = {
|
|
6
10
|
name: 'InputMask',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
7
12
|
emits: ['update:modelValue', 'focus', 'blur', 'keydown', 'complete', 'keypress', 'paste'],
|
|
8
13
|
props: {
|
|
9
14
|
modelValue: null,
|
|
@@ -529,8 +534,8 @@ this.primevue.inputmask = (function (utils, vue) {
|
|
|
529
534
|
const _hoisted_1 = ["readonly"];
|
|
530
535
|
|
|
531
536
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
532
|
-
return (vue.openBlock(), vue.createElementBlock("input", {
|
|
533
|
-
class:
|
|
537
|
+
return (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
538
|
+
class: $options.inputClass,
|
|
534
539
|
readonly: $props.readonly,
|
|
535
540
|
onInput: _cache[0] || (_cache[0] = (...args) => ($options.onInput && $options.onInput(...args))),
|
|
536
541
|
onFocus: _cache[1] || (_cache[1] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
@@ -538,11 +543,11 @@ this.primevue.inputmask = (function (utils, vue) {
|
|
|
538
543
|
onKeydown: _cache[3] || (_cache[3] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
539
544
|
onKeypress: _cache[4] || (_cache[4] = (...args) => ($options.onKeyPress && $options.onKeyPress(...args))),
|
|
540
545
|
onPaste: _cache[5] || (_cache[5] = (...args) => ($options.onPaste && $options.onPaste(...args)))
|
|
541
|
-
}, null,
|
|
546
|
+
}, _ctx.ptm('root')), null, 16, _hoisted_1))
|
|
542
547
|
}
|
|
543
548
|
|
|
544
549
|
script.render = render;
|
|
545
550
|
|
|
546
551
|
return script;
|
|
547
552
|
|
|
548
|
-
})(primevue.utils, Vue);
|
|
553
|
+
})(primevue.basecomponent, primevue.utils, Vue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.inputmask=function(e,t){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.inputmask=function(e,t,s){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h={name:"InputMask",extends:i(e).default,emits:["update:modelValue","focus","blur","keydown","complete","keypress","paste"],props:{modelValue:null,slotChar:{type:String,default:"_"},mask:{type:String,default:null},autoClear:{type:Boolean,default:!0},unmask:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},watch:{mask(e,t){t!==e&&this.initMask()}},mounted(){this.initMask()},updated(){this.isValueUpdated()&&this.updateValue()},methods:{onInput(e){this.androidChrome?this.handleAndroidInput(e):this.handleInputChange(e),this.$emit("update:modelValue",e.target.value)},onFocus(e){if(this.readonly)return;let t;this.focus=!0,clearTimeout(this.caretTimeoutId),this.focusText=this.$el.value,t=this.checkVal(),this.caretTimeoutId=setTimeout((()=>{this.$el===document.activeElement&&(this.writeBuffer(),t===this.mask.replace("?","").length?this.caret(0,t):this.caret(t))}),10),this.$emit("focus",e)},onBlur(e){if(this.focus=!1,this.checkVal(),this.updateModel(e),this.$el.value!==this.focusText){let e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.$el.dispatchEvent(e)}this.$emit("blur",e)},onKeyDown(e){if(this.readonly)return;let s,i,h,l=e.which||e.keyCode,a=/iphone/i.test(t.DomHandler.getUserAgent());this.oldVal=this.$el.value,8===l||46===l||a&&127===l?(s=this.caret(),i=s.begin,h=s.end,h-i==0&&(i=46!==l?this.seekPrev(i):h=this.seekNext(i-1),h=46===l?this.seekNext(h):h),this.clearBuffer(i,h),this.shiftL(i,h-1),this.updateModel(e),e.preventDefault()):13===l?(this.$el.blur(),this.updateModel(e)):27===l&&(this.$el.value=this.focusText,this.caret(0,this.checkVal()),this.updateModel(e),e.preventDefault()),this.$emit("keydown",e)},onKeyPress(e){if(!this.readonly){var s,i,h,l,a=e.which||e.keyCode,n=this.caret();if(!(e.ctrlKey||e.altKey||e.metaKey||a<32)){if(a&&13!==a){if(n.end-n.begin!=0&&(this.clearBuffer(n.begin,n.end),this.shiftL(n.begin,n.end-1)),(s=this.seekNext(n.begin-1))<this.len&&(i=String.fromCharCode(a),this.tests[s].test(i))){if(this.shiftR(s),this.buffer[s]=i,this.writeBuffer(),h=this.seekNext(s),/android/i.test(t.DomHandler.getUserAgent())){setTimeout((()=>{this.caret(h)}),0)}else this.caret(h);n.begin<=this.lastRequiredNonMaskPos&&(l=this.isCompleted())}e.preventDefault()}this.updateModel(e),l&&this.$emit("complete",e),this.$emit("keypress",e)}}},onPaste(e){this.handleInputChange(e),this.$emit("paste",e)},caret(e,t){let s,i,h;if(this.$el.offsetParent&&this.$el===document.activeElement)return"number"!=typeof e?(this.$el.setSelectionRange?(i=this.$el.selectionStart,h=this.$el.selectionEnd):document.selection&&document.selection.createRange&&(s=document.selection.createRange(),i=0-s.duplicate().moveStart("character",-1e5),h=i+s.text.length),{begin:i,end:h}):(i=e,h="number"==typeof t?t:i,void(this.$el.setSelectionRange?this.$el.setSelectionRange(i,h):this.$el.createTextRange&&(s=this.$el.createTextRange(),s.collapse(!0),s.moveEnd("character",h),s.moveStart("character",i),s.select())))},isCompleted(){for(let e=this.firstNonMaskPos;e<=this.lastRequiredNonMaskPos;e++)if(this.tests[e]&&this.buffer[e]===this.getPlaceholder(e))return!1;return!0},getPlaceholder(e){return e<this.slotChar.length?this.slotChar.charAt(e):this.slotChar.charAt(0)},seekNext(e){for(;++e<this.len&&!this.tests[e];);return e},seekPrev(e){for(;--e>=0&&!this.tests[e];);return e},shiftL(e,t){let s,i;if(!(e<0)){for(s=e,i=this.seekNext(t);s<this.len;s++)if(this.tests[s]){if(!(i<this.len&&this.tests[s].test(this.buffer[i])))break;this.buffer[s]=this.buffer[i],this.buffer[i]=this.getPlaceholder(i),i=this.seekNext(i)}this.writeBuffer(),this.caret(Math.max(this.firstNonMaskPos,e))}},shiftR(e){let t,s,i,h;for(t=e,s=this.getPlaceholder(e);t<this.len;t++)if(this.tests[t]){if(i=this.seekNext(t),h=this.buffer[t],this.buffer[t]=s,!(i<this.len&&this.tests[i].test(h)))break;s=h}},handleAndroidInput(e){var t=this.$el.value,s=this.caret();if(this.oldVal&&this.oldVal.length&&this.oldVal.length>t.length){for(this.checkVal(!0);s.begin>0&&!this.tests[s.begin-1];)s.begin--;if(0===s.begin)for(;s.begin<this.firstNonMaskPos&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}else{for(this.checkVal(!0);s.begin<this.len&&!this.tests[s.begin];)s.begin++;this.caret(s.begin,s.begin)}this.isCompleted()&&this.$emit("complete",e)},clearBuffer(e,t){let s;for(s=e;s<t&&s<this.len;s++)this.tests[s]&&(this.buffer[s]=this.getPlaceholder(s))},writeBuffer(){this.$el.value=this.buffer.join("")},checkVal(e){this.isValueChecked=!0;let t,s,i,h=this.$el.value,l=-1;for(t=0,i=0;t<this.len;t++)if(this.tests[t]){for(this.buffer[t]=this.getPlaceholder(t);i++<h.length;)if(s=h.charAt(i-1),this.tests[t].test(s)){this.buffer[t]=s,l=t;break}if(i>h.length){this.clearBuffer(t+1,this.len);break}}else this.buffer[t]===h.charAt(i)&&i++,t<this.partialPosition&&(l=t);return e?this.writeBuffer():l+1<this.partialPosition?this.autoClear||this.buffer.join("")===this.defaultBuffer?(this.$el.value&&(this.$el.value=""),this.clearBuffer(0,this.len)):this.writeBuffer():(this.writeBuffer(),this.$el.value=this.$el.value.substring(0,l+1)),this.partialPosition?t:this.firstNonMaskPos},handleInputChange(e){if(!this.readonly){var t=this.checkVal(!0);this.caret(t),this.updateModel(e),this.isCompleted()&&this.$emit("complete",e)}},getUnmaskedValue(){let e=[];for(let t=0;t<this.buffer.length;t++){let s=this.buffer[t];this.tests[t]&&s!==this.getPlaceholder(t)&&e.push(s)}return e.join("")},updateModel(e){let t=this.unmask?this.getUnmaskedValue():e.target.value;this.$emit("update:modelValue",this.defaultBuffer!==t?t:"")},updateValue(e=!0){this.$el&&(null==this.modelValue?(this.$el.value="",e&&this.$emit("update:modelValue","")):(this.$el.value=this.modelValue,this.checkVal(),setTimeout((()=>{if(this.$el&&(this.writeBuffer(),this.checkVal(),e)){let e=this.unmask?this.getUnmaskedValue():this.$el.value;this.$emit("update:modelValue",this.defaultBuffer!==e?e:"")}}),10)),this.focusText=this.$el.value)},initMask(){this.tests=[],this.partialPosition=this.mask.length,this.len=this.mask.length,this.firstNonMaskPos=null,this.defs={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"};let e=t.DomHandler.getUserAgent();this.androidChrome=/chrome/i.test(e)&&/android/i.test(e);let s=this.mask.split("");for(let e=0;e<s.length;e++){let t=s[e];"?"===t?(this.len--,this.partialPosition=e):this.defs[t]?(this.tests.push(new RegExp(this.defs[t])),null===this.firstNonMaskPos&&(this.firstNonMaskPos=this.tests.length-1),e<this.partialPosition&&(this.lastRequiredNonMaskPos=this.tests.length-1)):this.tests.push(null)}this.buffer=[];for(let e=0;e<s.length;e++){let t=s[e];"?"!==t&&(this.defs[t]?this.buffer.push(this.getPlaceholder(e)):this.buffer.push(t))}this.defaultBuffer=this.buffer.join(""),this.updateValue(!1)},isValueUpdated(){return this.unmask?this.modelValue!=this.getUnmaskedValue():this.defaultBuffer!==this.$el.value&&this.$el.value!==this.modelValue}},computed:{filled(){return null!=this.modelValue&&this.modelValue.toString().length>0},inputClass(){return["p-inputmask p-inputtext p-component",{"p-filled":this.filled}]}}};const l=["readonly"];return h.render=function(e,t,i,h,a,n){return s.openBlock(),s.createElementBlock("input",s.mergeProps({class:n.inputClass,readonly:i.readonly,onInput:t[0]||(t[0]=(...e)=>n.onInput&&n.onInput(...e)),onFocus:t[1]||(t[1]=(...e)=>n.onFocus&&n.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>n.onBlur&&n.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>n.onKeyDown&&n.onKeyDown(...e)),onKeypress:t[4]||(t[4]=(...e)=>n.onKeyPress&&n.onKeyPress(...e)),onPaste:t[5]||(t[5]=(...e)=>n.onPaste&&n.onPaste(...e))},e.ptm("root")),null,16,l)},h}(primevue.basecomponent,primevue.utils,Vue);
|
|
@@ -8,8 +8,20 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import { ButtonHTMLAttributes, InputHTMLAttributes, VNode } from 'vue';
|
|
11
|
+
import { ButtonPassThroughOptionType } from '../button';
|
|
12
|
+
import { InputTextPassThroughOptionType } from '../inputtext';
|
|
11
13
|
import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers';
|
|
12
14
|
|
|
15
|
+
export declare type InputNumberPassThroughOptionType = InputNumberPassThroughAttributes | ((options: InputNumberPassThroughMethodOptions) => InputNumberPassThroughAttributes) | null | undefined;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom passthrough(pt) option method.
|
|
19
|
+
*/
|
|
20
|
+
export interface InputNumberPassThroughMethodOptions {
|
|
21
|
+
props: InputNumberProps;
|
|
22
|
+
state: InputNumberState;
|
|
23
|
+
}
|
|
24
|
+
|
|
13
25
|
/**
|
|
14
26
|
* Custom input event.
|
|
15
27
|
* @see {@link InputNumberEmits.input}
|
|
@@ -40,6 +52,58 @@ export interface InputNumberBlurEvent {
|
|
|
40
52
|
value: string;
|
|
41
53
|
}
|
|
42
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Custom passthrough(pt) options.
|
|
57
|
+
* @see {@link InputNumberProps.pt}
|
|
58
|
+
*/
|
|
59
|
+
export interface InputNumberPassThroughOptions {
|
|
60
|
+
/**
|
|
61
|
+
* Uses to pass attributes to the root's DOM element.
|
|
62
|
+
*/
|
|
63
|
+
root?: InputNumberPassThroughOptionType;
|
|
64
|
+
/**
|
|
65
|
+
* Uses to pass attributes to the Input component.
|
|
66
|
+
* @see {@link InputTextPassThroughOptionType}
|
|
67
|
+
*/
|
|
68
|
+
input?: InputTextPassThroughOptionType;
|
|
69
|
+
/**
|
|
70
|
+
* Uses to pass attributes to the button group's DOM element.
|
|
71
|
+
*/
|
|
72
|
+
buttonGroup?: InputNumberPassThroughOptionType;
|
|
73
|
+
/**
|
|
74
|
+
* Uses to pass attributes to the Button component.
|
|
75
|
+
* @see {@link ButtonPassThroughOptions}
|
|
76
|
+
*/
|
|
77
|
+
incrementButton?: ButtonPassThroughOptionType;
|
|
78
|
+
/**
|
|
79
|
+
* Uses to pass attributes to the Button component.
|
|
80
|
+
* @see {@link ButtonPassThroughOptions}
|
|
81
|
+
*/
|
|
82
|
+
decrementButton?: ButtonPassThroughOptionType;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Custom passthrough attributes for each DOM elements
|
|
87
|
+
*/
|
|
88
|
+
export interface InputNumberPassThroughAttributes {
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Defines current inline state in InputNumber component.
|
|
94
|
+
*/
|
|
95
|
+
export interface InputNumberState {
|
|
96
|
+
/**
|
|
97
|
+
* Current value state as a number.
|
|
98
|
+
*/
|
|
99
|
+
d_modelValue: number;
|
|
100
|
+
/**
|
|
101
|
+
* Current focused state as a boolean.
|
|
102
|
+
* @defaultValue false
|
|
103
|
+
*/
|
|
104
|
+
focused: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
43
107
|
/**
|
|
44
108
|
* Defines valid properties in InputNumber component.
|
|
45
109
|
*/
|
|
@@ -198,6 +262,11 @@ export interface InputNumberProps {
|
|
|
198
262
|
* Establishes a string value that labels the component.
|
|
199
263
|
*/
|
|
200
264
|
'aria-label'?: string | undefined;
|
|
265
|
+
/**
|
|
266
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
267
|
+
* @type {InputNumberPassThroughOptions}
|
|
268
|
+
*/
|
|
269
|
+
pt?: InputNumberPassThroughOptions;
|
|
201
270
|
}
|
|
202
271
|
|
|
203
272
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span :class="containerClass">
|
|
2
|
+
<span :class="containerClass" v-bind="ptm('root')">
|
|
3
3
|
<INInputText
|
|
4
4
|
ref="input"
|
|
5
5
|
:id="inputId"
|
|
@@ -23,35 +23,35 @@
|
|
|
23
23
|
@click="onInputClick"
|
|
24
24
|
@focus="onInputFocus"
|
|
25
25
|
@blur="onInputBlur"
|
|
26
|
-
v-bind="inputProps"
|
|
26
|
+
v-bind="{ ...inputProps, ...ptm('input') }"
|
|
27
27
|
/>
|
|
28
|
-
<span v-if="showButtons && buttonLayout === 'stacked'" class="p-inputnumber-button-group">
|
|
29
|
-
<INButton :class="upButtonClass" v-on="upButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="incrementButtonProps">
|
|
28
|
+
<span v-if="showButtons && buttonLayout === 'stacked'" class="p-inputnumber-button-group" v-bind="ptm('buttonGroup')">
|
|
29
|
+
<INButton :class="upButtonClass" v-on="upButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="{ ...incrementButtonProps, ...ptm('incrementButton') }">
|
|
30
30
|
<template #icon>
|
|
31
31
|
<slot name="incrementbuttonicon">
|
|
32
|
-
<component :is="incrementButtonIcon ? 'span' : 'AngleUpIcon'" :class="incrementButtonIcon" />
|
|
32
|
+
<component :is="incrementButtonIcon ? 'span' : 'AngleUpIcon'" :class="incrementButtonIcon" v-bind="ptm('incrementButton')['icon']" />
|
|
33
33
|
</slot>
|
|
34
34
|
</template>
|
|
35
35
|
</INButton>
|
|
36
|
-
<INButton :class="downButtonClass" v-on="downButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="decrementButtonProps">
|
|
36
|
+
<INButton :class="downButtonClass" v-on="downButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="{ ...decrementButtonProps, ...ptm('decrementButton') }">
|
|
37
37
|
<template #icon>
|
|
38
38
|
<slot name="decrementbuttonicon">
|
|
39
|
-
<component :is="decrementButtonIcon ? 'span' : 'AngleDownIcon'" :class="decrementButtonIcon" />
|
|
39
|
+
<component :is="decrementButtonIcon ? 'span' : 'AngleDownIcon'" :class="decrementButtonIcon" v-bind="ptm('decrementButton')['icon']" />
|
|
40
40
|
</slot>
|
|
41
41
|
</template>
|
|
42
42
|
</INButton>
|
|
43
43
|
</span>
|
|
44
|
-
<INButton v-if="showButtons && buttonLayout !== 'stacked'" :class="upButtonClass" v-on="upButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="incrementButtonProps">
|
|
44
|
+
<INButton v-if="showButtons && buttonLayout !== 'stacked'" :class="upButtonClass" v-on="upButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="{ ...incrementButtonProps, ...ptm('incrementButton') }">
|
|
45
45
|
<template #icon>
|
|
46
46
|
<slot name="incrementbuttonicon">
|
|
47
|
-
<component :is="incrementButtonIcon ? 'span' : 'AngleUpIcon'" :class="incrementButtonIcon" />
|
|
47
|
+
<component :is="incrementButtonIcon ? 'span' : 'AngleUpIcon'" :class="incrementButtonIcon" v-bind="ptm('incrementButton')['icon']" />
|
|
48
48
|
</slot>
|
|
49
49
|
</template>
|
|
50
50
|
</INButton>
|
|
51
|
-
<INButton v-if="showButtons && buttonLayout !== 'stacked'" :class="downButtonClass" v-on="downButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="decrementButtonProps">
|
|
51
|
+
<INButton v-if="showButtons && buttonLayout !== 'stacked'" :class="downButtonClass" v-on="downButtonListeners" :disabled="disabled" :tabindex="-1" aria-hidden="true" v-bind="{ ...decrementButtonProps, ...ptm('decrementButton') }">
|
|
52
52
|
<template #icon>
|
|
53
53
|
<slot name="decrementbuttonicon">
|
|
54
|
-
<component :is="decrementButtonIcon ? 'span' : 'AngleDownIcon'" :class="decrementButtonIcon" />
|
|
54
|
+
<component :is="decrementButtonIcon ? 'span' : 'AngleDownIcon'" :class="decrementButtonIcon" v-bind="ptm('decrementButton')['icon']" />
|
|
55
55
|
</slot>
|
|
56
56
|
</template>
|
|
57
57
|
</INButton>
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script>
|
|
62
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
62
63
|
import Button from 'primevue/button';
|
|
63
64
|
import AngleDownIcon from 'primevue/icons/angledown';
|
|
64
65
|
import AngleUpIcon from 'primevue/icons/angleup';
|
|
@@ -67,6 +68,7 @@ import { DomHandler } from 'primevue/utils';
|
|
|
67
68
|
|
|
68
69
|
export default {
|
|
69
70
|
name: 'InputNumber',
|
|
71
|
+
extends: BaseComponent,
|
|
70
72
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
71
73
|
props: {
|
|
72
74
|
modelValue: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var Button = require('primevue/button');
|
|
4
5
|
var AngleDownIcon = require('primevue/icons/angledown');
|
|
5
6
|
var AngleUpIcon = require('primevue/icons/angleup');
|
|
@@ -9,6 +10,7 @@ var vue = require('vue');
|
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
13
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
12
14
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
13
15
|
var AngleDownIcon__default = /*#__PURE__*/_interopDefaultLegacy(AngleDownIcon);
|
|
14
16
|
var AngleUpIcon__default = /*#__PURE__*/_interopDefaultLegacy(AngleUpIcon);
|
|
@@ -16,6 +18,7 @@ var InputText__default = /*#__PURE__*/_interopDefaultLegacy(InputText);
|
|
|
16
18
|
|
|
17
19
|
var script = {
|
|
18
20
|
name: 'InputNumber',
|
|
21
|
+
extends: BaseComponent__default["default"],
|
|
19
22
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
20
23
|
props: {
|
|
21
24
|
modelValue: {
|
|
@@ -1075,18 +1078,11 @@ var script = {
|
|
|
1075
1078
|
}
|
|
1076
1079
|
};
|
|
1077
1080
|
|
|
1078
|
-
const _hoisted_1 = {
|
|
1079
|
-
key: 0,
|
|
1080
|
-
class: "p-inputnumber-button-group"
|
|
1081
|
-
};
|
|
1082
|
-
|
|
1083
1081
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1084
1082
|
const _component_INInputText = vue.resolveComponent("INInputText");
|
|
1085
1083
|
const _component_INButton = vue.resolveComponent("INButton");
|
|
1086
1084
|
|
|
1087
|
-
return (vue.openBlock(), vue.createElementBlock("span", {
|
|
1088
|
-
class: vue.normalizeClass($options.containerClass)
|
|
1089
|
-
}, [
|
|
1085
|
+
return (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
|
|
1090
1086
|
vue.createVNode(_component_INInputText, vue.mergeProps({
|
|
1091
1087
|
ref: "input",
|
|
1092
1088
|
id: $props.inputId,
|
|
@@ -1109,19 +1105,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1109
1105
|
onClick: $options.onInputClick,
|
|
1110
1106
|
onFocus: $options.onInputFocus,
|
|
1111
1107
|
onBlur: $options.onInputBlur
|
|
1112
|
-
},
|
|
1108
|
+
}, { ...$props.inputProps, ..._ctx.ptm('input') }), 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"]),
|
|
1113
1109
|
($props.showButtons && $props.buttonLayout === 'stacked')
|
|
1114
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
1110
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
1111
|
+
key: 0,
|
|
1112
|
+
class: "p-inputnumber-button-group"
|
|
1113
|
+
}, _ctx.ptm('buttonGroup')), [
|
|
1115
1114
|
vue.createVNode(_component_INButton, vue.mergeProps({ class: $options.upButtonClass }, vue.toHandlers($options.upButtonListeners), {
|
|
1116
1115
|
disabled: $props.disabled,
|
|
1117
1116
|
tabindex: -1,
|
|
1118
1117
|
"aria-hidden": "true"
|
|
1119
|
-
},
|
|
1118
|
+
}, { ...$props.incrementButtonProps, ..._ctx.ptm('incrementButton') }), {
|
|
1120
1119
|
icon: vue.withCtx(() => [
|
|
1121
1120
|
vue.renderSlot(_ctx.$slots, "incrementbuttonicon", {}, () => [
|
|
1122
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), {
|
|
1123
|
-
class: vue.normalizeClass($props.incrementButtonIcon)
|
|
1124
|
-
}, null, 8, ["class"]))
|
|
1121
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), vue.mergeProps({ class: $props.incrementButtonIcon }, _ctx.ptm('incrementButton')['icon']), null, 16, ["class"]))
|
|
1125
1122
|
])
|
|
1126
1123
|
]),
|
|
1127
1124
|
_: 3
|
|
@@ -1130,17 +1127,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1130
1127
|
disabled: $props.disabled,
|
|
1131
1128
|
tabindex: -1,
|
|
1132
1129
|
"aria-hidden": "true"
|
|
1133
|
-
},
|
|
1130
|
+
}, { ...$props.decrementButtonProps, ..._ctx.ptm('decrementButton') }), {
|
|
1134
1131
|
icon: vue.withCtx(() => [
|
|
1135
1132
|
vue.renderSlot(_ctx.$slots, "decrementbuttonicon", {}, () => [
|
|
1136
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), {
|
|
1137
|
-
class: vue.normalizeClass($props.decrementButtonIcon)
|
|
1138
|
-
}, null, 8, ["class"]))
|
|
1133
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), vue.mergeProps({ class: $props.decrementButtonIcon }, _ctx.ptm('decrementButton')['icon']), null, 16, ["class"]))
|
|
1139
1134
|
])
|
|
1140
1135
|
]),
|
|
1141
1136
|
_: 3
|
|
1142
1137
|
}, 16, ["class", "disabled"])
|
|
1143
|
-
]))
|
|
1138
|
+
], 16))
|
|
1144
1139
|
: vue.createCommentVNode("", true),
|
|
1145
1140
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
1146
1141
|
? (vue.openBlock(), vue.createBlock(_component_INButton, vue.mergeProps({
|
|
@@ -1150,12 +1145,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1150
1145
|
disabled: $props.disabled,
|
|
1151
1146
|
tabindex: -1,
|
|
1152
1147
|
"aria-hidden": "true"
|
|
1153
|
-
},
|
|
1148
|
+
}, { ...$props.incrementButtonProps, ..._ctx.ptm('incrementButton') }), {
|
|
1154
1149
|
icon: vue.withCtx(() => [
|
|
1155
1150
|
vue.renderSlot(_ctx.$slots, "incrementbuttonicon", {}, () => [
|
|
1156
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), {
|
|
1157
|
-
class: vue.normalizeClass($props.incrementButtonIcon)
|
|
1158
|
-
}, null, 8, ["class"]))
|
|
1151
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), vue.mergeProps({ class: $props.incrementButtonIcon }, _ctx.ptm('incrementButton')['icon']), null, 16, ["class"]))
|
|
1159
1152
|
])
|
|
1160
1153
|
]),
|
|
1161
1154
|
_: 3
|
|
@@ -1169,18 +1162,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1169
1162
|
disabled: $props.disabled,
|
|
1170
1163
|
tabindex: -1,
|
|
1171
1164
|
"aria-hidden": "true"
|
|
1172
|
-
},
|
|
1165
|
+
}, { ...$props.decrementButtonProps, ..._ctx.ptm('decrementButton') }), {
|
|
1173
1166
|
icon: vue.withCtx(() => [
|
|
1174
1167
|
vue.renderSlot(_ctx.$slots, "decrementbuttonicon", {}, () => [
|
|
1175
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), {
|
|
1176
|
-
class: vue.normalizeClass($props.decrementButtonIcon)
|
|
1177
|
-
}, null, 8, ["class"]))
|
|
1168
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), vue.mergeProps({ class: $props.decrementButtonIcon }, _ctx.ptm('decrementButton')['icon']), null, 16, ["class"]))
|
|
1178
1169
|
])
|
|
1179
1170
|
]),
|
|
1180
1171
|
_: 3
|
|
1181
1172
|
}, 16, ["class", "disabled"]))
|
|
1182
1173
|
: vue.createCommentVNode("", true)
|
|
1183
|
-
],
|
|
1174
|
+
], 16))
|
|
1184
1175
|
}
|
|
1185
1176
|
|
|
1186
1177
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("primevue/icons/angledown"),n=require("primevue/icons/angleup"),i=require("primevue/inputtext"),s=require("primevue/utils"),r=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e),a=l(t),o=l(n),p={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:void 0},decrementButtonIcon:{type:String,default:void 0},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},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default: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.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case"Tab":case"Enter":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"Backspace":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"Delete":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"Home":this.min&&(this.updateModel(e,this.min),e.preventDefault());break;case"End":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 c;if(n.isMinusSign)0===s&&(c=l,-1!==a&&0===r||(c=this.insertText(l,t,0,r)),this.updateValue(e,c,t,"insert"));else if(n.isDecimalSign)u>0&&s===u?this.updateValue(e,l,t,"insert"):(u>s&&u<r||-1===u&&this.maxFractionDigits)&&(c=this.insertText(l,t,s,r),this.updateValue(e,c,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;c=l.slice(0,s)+t+l.slice(s+t.length,n)+l.slice(n),this.updateValue(e,c,t,i)}}else c=this.insertText(l,t,s,r),this.updateValue(e,c,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(){const e=this.$refs.input.$el.value;this.readonly||e===s.DomHandler.getSelection()||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,formattedValue:t})},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,this.suffixChar?e.replace(this.suffixChar,"").split(this._decimal)[0]+t.replace(this.suffixChar,"").slice(n)+this.suffixChar:-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.disabled||this.readonly||this.$refs.input.$el.value===s.DomHandler.getSelection()||!this.highlightOnFocus||e.target.select(),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:l(i).default,INButton:u.default,AngleUpIcon:o.default,AngleDownIcon:a.default}};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: inline-flex;\n}\n.p-inputnumber-button {\n display: flex;\n align-items: center;\n justify-content: center;\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: flex;\n flex-direction: column;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\n flex: 1 1 auto;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\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 order: 2;\n border-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\n order: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-vertical {\n flex-direction: column;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\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 order: 2;\n border-radius: 0;\n text-align: center;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\n order: 3;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-input {\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"),p.render=function(e,t,n,i,s,l){const u=r.resolveComponent("INInputText"),a=r.resolveComponent("INButton");return r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(l.containerClass)},[r.createVNode(u,r.mergeProps({ref:"input",id:n.inputId,class:["p-inputnumber-input",n.inputClass],role:"spinbutton",style:n.inputStyle,value:l.formattedValue,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-valuenow":n.modelValue,disabled:n.disabled,readonly:n.readonly,placeholder:n.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onInput:l.onUserInput,onKeydown:l.onInputKeyDown,onKeypress:l.onInputKeyPress,onPaste:l.onPaste,onClick:l.onInputClick,onFocus:l.onInputFocus,onBlur:l.onInputBlur},n.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"]),n.showButtons&&"stacked"===n.buttonLayout?(r.openBlock(),r.createElementBlock("span",c,[r.createVNode(a,r.mergeProps({class:l.upButtonClass},r.toHandlers(l.upButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},n.incrementButtonProps),{icon:r.withCtx((()=>[r.renderSlot(e.$slots,"incrementbuttonicon",{},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.incrementButtonIcon?"span":"AngleUpIcon"),{class:r.normalizeClass(n.incrementButtonIcon)},null,8,["class"]))]))])),_:3},16,["class","disabled"]),r.createVNode(a,r.mergeProps({class:l.downButtonClass},r.toHandlers(l.downButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},n.decrementButtonProps),{icon:r.withCtx((()=>[r.renderSlot(e.$slots,"decrementbuttonicon",{},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.decrementButtonIcon?"span":"AngleDownIcon"),{class:r.normalizeClass(n.decrementButtonIcon)},null,8,["class"]))]))])),_:3},16,["class","disabled"])])):r.createCommentVNode("",!0),n.showButtons&&"stacked"!==n.buttonLayout?(r.openBlock(),r.createBlock(a,r.mergeProps({key:1,class:l.upButtonClass},r.toHandlers(l.upButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},n.incrementButtonProps),{icon:r.withCtx((()=>[r.renderSlot(e.$slots,"incrementbuttonicon",{},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.incrementButtonIcon?"span":"AngleUpIcon"),{class:r.normalizeClass(n.incrementButtonIcon)},null,8,["class"]))]))])),_:3},16,["class","disabled"])):r.createCommentVNode("",!0),n.showButtons&&"stacked"!==n.buttonLayout?(r.openBlock(),r.createBlock(a,r.mergeProps({key:2,class:l.downButtonClass},r.toHandlers(l.downButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},n.decrementButtonProps),{icon:r.withCtx((()=>[r.renderSlot(e.$slots,"decrementbuttonicon",{},(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.decrementButtonIcon?"span":"AngleDownIcon"),{class:r.normalizeClass(n.decrementButtonIcon)},null,8,["class"]))]))])),_:3},16,["class","disabled"])):r.createCommentVNode("",!0)],2)},module.exports=p;
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/button"),n=require("primevue/icons/angledown"),i=require("primevue/icons/angleup"),s=require("primevue/inputtext"),r=require("primevue/utils"),l=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e),o=u(t),p=u(n),c=u(i),h=u(s),d={name:"InputNumber",extends:a.default,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:void 0},decrementButtonIcon:{type:String,default:void 0},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},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default: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.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case"Tab":case"Enter":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"Backspace":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"Delete":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"Home":this.min&&(this.updateModel(e,this.min),e.preventDefault());break;case"End":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 c;if(n.isMinusSign)0===s&&(c=l,-1!==a&&0===r||(c=this.insertText(l,t,0,r)),this.updateValue(e,c,t,"insert"));else if(n.isDecimalSign)u>0&&s===u?this.updateValue(e,l,t,"insert"):(u>s&&u<r||-1===u&&this.maxFractionDigits)&&(c=this.insertText(l,t,s,r),this.updateValue(e,c,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;c=l.slice(0,s)+t+l.slice(s+t.length,n)+l.slice(n),this.updateValue(e,c,t,i)}}else c=this.insertText(l,t,s,r),this.updateValue(e,c,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(){const e=this.$refs.input.$el.value;this.readonly||e===r.DomHandler.getSelection()||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,formattedValue:t})},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,this.suffixChar?e.replace(this.suffixChar,"").split(this._decimal)[0]+t.replace(this.suffixChar,"").slice(n)+this.suffixChar:-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.disabled||this.readonly||this.$refs.input.$el.value===r.DomHandler.getSelection()||!this.highlightOnFocus||e.target.select(),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:h.default,INButton:o.default,AngleUpIcon:c.default,AngleDownIcon:p.default}};!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: inline-flex;\n}\n.p-inputnumber-button {\n display: flex;\n align-items: center;\n justify-content: center;\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: flex;\n flex-direction: column;\n}\n.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button {\n flex: 1 1 auto;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up {\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 order: 2;\n border-radius: 0;\n}\n.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down {\n order: 1;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-inputnumber-buttons-vertical {\n flex-direction: column;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up {\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 order: 2;\n border-radius: 0;\n text-align: center;\n}\n.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down {\n order: 3;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n width: 100%;\n}\n.p-inputnumber-input {\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"),d.render=function(e,t,n,i,s,r){const u=l.resolveComponent("INInputText"),a=l.resolveComponent("INButton");return l.openBlock(),l.createElementBlock("span",l.mergeProps({class:r.containerClass},e.ptm("root")),[l.createVNode(u,l.mergeProps({ref:"input",id:n.inputId,class:["p-inputnumber-input",n.inputClass],role:"spinbutton",style:n.inputStyle,value:r.formattedValue,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-valuenow":n.modelValue,disabled:n.disabled,readonly:n.readonly,placeholder:n.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onInput:r.onUserInput,onKeydown:r.onInputKeyDown,onKeypress:r.onInputKeyPress,onPaste:r.onPaste,onClick:r.onInputClick,onFocus:r.onInputFocus,onBlur:r.onInputBlur},{...n.inputProps,...e.ptm("input")}),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"]),n.showButtons&&"stacked"===n.buttonLayout?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:0,class:"p-inputnumber-button-group"},e.ptm("buttonGroup")),[l.createVNode(a,l.mergeProps({class:r.upButtonClass},l.toHandlers(r.upButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},{...n.incrementButtonProps,...e.ptm("incrementButton")}),{icon:l.withCtx((()=>[l.renderSlot(e.$slots,"incrementbuttonicon",{},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.incrementButtonIcon?"span":"AngleUpIcon"),l.mergeProps({class:n.incrementButtonIcon},e.ptm("incrementButton").icon),null,16,["class"]))]))])),_:3},16,["class","disabled"]),l.createVNode(a,l.mergeProps({class:r.downButtonClass},l.toHandlers(r.downButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},{...n.decrementButtonProps,...e.ptm("decrementButton")}),{icon:l.withCtx((()=>[l.renderSlot(e.$slots,"decrementbuttonicon",{},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.decrementButtonIcon?"span":"AngleDownIcon"),l.mergeProps({class:n.decrementButtonIcon},e.ptm("decrementButton").icon),null,16,["class"]))]))])),_:3},16,["class","disabled"])],16)):l.createCommentVNode("",!0),n.showButtons&&"stacked"!==n.buttonLayout?(l.openBlock(),l.createBlock(a,l.mergeProps({key:1,class:r.upButtonClass},l.toHandlers(r.upButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},{...n.incrementButtonProps,...e.ptm("incrementButton")}),{icon:l.withCtx((()=>[l.renderSlot(e.$slots,"incrementbuttonicon",{},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.incrementButtonIcon?"span":"AngleUpIcon"),l.mergeProps({class:n.incrementButtonIcon},e.ptm("incrementButton").icon),null,16,["class"]))]))])),_:3},16,["class","disabled"])):l.createCommentVNode("",!0),n.showButtons&&"stacked"!==n.buttonLayout?(l.openBlock(),l.createBlock(a,l.mergeProps({key:2,class:r.downButtonClass},l.toHandlers(r.downButtonListeners),{disabled:n.disabled,tabindex:-1,"aria-hidden":"true"},{...n.decrementButtonProps,...e.ptm("decrementButton")}),{icon:l.withCtx((()=>[l.renderSlot(e.$slots,"decrementbuttonicon",{},(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.decrementButtonIcon?"span":"AngleDownIcon"),l.mergeProps({class:n.decrementButtonIcon},e.ptm("decrementButton").icon),null,16,["class"]))]))])),_:3},16,["class","disabled"])):l.createCommentVNode("",!0)],16)},module.exports=d;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import Button from 'primevue/button';
|
|
2
3
|
import AngleDownIcon from 'primevue/icons/angledown';
|
|
3
4
|
import AngleUpIcon from 'primevue/icons/angleup';
|
|
4
5
|
import InputText from 'primevue/inputtext';
|
|
5
6
|
import { DomHandler } from 'primevue/utils';
|
|
6
|
-
import { resolveComponent, openBlock, createElementBlock,
|
|
7
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, toHandlers, withCtx, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode } from 'vue';
|
|
7
8
|
|
|
8
9
|
var script = {
|
|
9
10
|
name: 'InputNumber',
|
|
11
|
+
extends: BaseComponent,
|
|
10
12
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
11
13
|
props: {
|
|
12
14
|
modelValue: {
|
|
@@ -1066,18 +1068,11 @@ var script = {
|
|
|
1066
1068
|
}
|
|
1067
1069
|
};
|
|
1068
1070
|
|
|
1069
|
-
const _hoisted_1 = {
|
|
1070
|
-
key: 0,
|
|
1071
|
-
class: "p-inputnumber-button-group"
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
1071
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1075
1072
|
const _component_INInputText = resolveComponent("INInputText");
|
|
1076
1073
|
const _component_INButton = resolveComponent("INButton");
|
|
1077
1074
|
|
|
1078
|
-
return (openBlock(), createElementBlock("span", {
|
|
1079
|
-
class: normalizeClass($options.containerClass)
|
|
1080
|
-
}, [
|
|
1075
|
+
return (openBlock(), createElementBlock("span", mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
|
|
1081
1076
|
createVNode(_component_INInputText, mergeProps({
|
|
1082
1077
|
ref: "input",
|
|
1083
1078
|
id: $props.inputId,
|
|
@@ -1100,19 +1095,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1100
1095
|
onClick: $options.onInputClick,
|
|
1101
1096
|
onFocus: $options.onInputFocus,
|
|
1102
1097
|
onBlur: $options.onInputBlur
|
|
1103
|
-
},
|
|
1098
|
+
}, { ...$props.inputProps, ..._ctx.ptm('input') }), 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"]),
|
|
1104
1099
|
($props.showButtons && $props.buttonLayout === 'stacked')
|
|
1105
|
-
? (openBlock(), createElementBlock("span",
|
|
1100
|
+
? (openBlock(), createElementBlock("span", mergeProps({
|
|
1101
|
+
key: 0,
|
|
1102
|
+
class: "p-inputnumber-button-group"
|
|
1103
|
+
}, _ctx.ptm('buttonGroup')), [
|
|
1106
1104
|
createVNode(_component_INButton, mergeProps({ class: $options.upButtonClass }, toHandlers($options.upButtonListeners), {
|
|
1107
1105
|
disabled: $props.disabled,
|
|
1108
1106
|
tabindex: -1,
|
|
1109
1107
|
"aria-hidden": "true"
|
|
1110
|
-
},
|
|
1108
|
+
}, { ...$props.incrementButtonProps, ..._ctx.ptm('incrementButton') }), {
|
|
1111
1109
|
icon: withCtx(() => [
|
|
1112
1110
|
renderSlot(_ctx.$slots, "incrementbuttonicon", {}, () => [
|
|
1113
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), {
|
|
1114
|
-
class: normalizeClass($props.incrementButtonIcon)
|
|
1115
|
-
}, null, 8, ["class"]))
|
|
1111
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), mergeProps({ class: $props.incrementButtonIcon }, _ctx.ptm('incrementButton')['icon']), null, 16, ["class"]))
|
|
1116
1112
|
])
|
|
1117
1113
|
]),
|
|
1118
1114
|
_: 3
|
|
@@ -1121,17 +1117,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1121
1117
|
disabled: $props.disabled,
|
|
1122
1118
|
tabindex: -1,
|
|
1123
1119
|
"aria-hidden": "true"
|
|
1124
|
-
},
|
|
1120
|
+
}, { ...$props.decrementButtonProps, ..._ctx.ptm('decrementButton') }), {
|
|
1125
1121
|
icon: withCtx(() => [
|
|
1126
1122
|
renderSlot(_ctx.$slots, "decrementbuttonicon", {}, () => [
|
|
1127
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), {
|
|
1128
|
-
class: normalizeClass($props.decrementButtonIcon)
|
|
1129
|
-
}, null, 8, ["class"]))
|
|
1123
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), mergeProps({ class: $props.decrementButtonIcon }, _ctx.ptm('decrementButton')['icon']), null, 16, ["class"]))
|
|
1130
1124
|
])
|
|
1131
1125
|
]),
|
|
1132
1126
|
_: 3
|
|
1133
1127
|
}, 16, ["class", "disabled"])
|
|
1134
|
-
]))
|
|
1128
|
+
], 16))
|
|
1135
1129
|
: createCommentVNode("", true),
|
|
1136
1130
|
($props.showButtons && $props.buttonLayout !== 'stacked')
|
|
1137
1131
|
? (openBlock(), createBlock(_component_INButton, mergeProps({
|
|
@@ -1141,12 +1135,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1141
1135
|
disabled: $props.disabled,
|
|
1142
1136
|
tabindex: -1,
|
|
1143
1137
|
"aria-hidden": "true"
|
|
1144
|
-
},
|
|
1138
|
+
}, { ...$props.incrementButtonProps, ..._ctx.ptm('incrementButton') }), {
|
|
1145
1139
|
icon: withCtx(() => [
|
|
1146
1140
|
renderSlot(_ctx.$slots, "incrementbuttonicon", {}, () => [
|
|
1147
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), {
|
|
1148
|
-
class: normalizeClass($props.incrementButtonIcon)
|
|
1149
|
-
}, null, 8, ["class"]))
|
|
1141
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.incrementButtonIcon ? 'span' : 'AngleUpIcon'), mergeProps({ class: $props.incrementButtonIcon }, _ctx.ptm('incrementButton')['icon']), null, 16, ["class"]))
|
|
1150
1142
|
])
|
|
1151
1143
|
]),
|
|
1152
1144
|
_: 3
|
|
@@ -1160,18 +1152,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1160
1152
|
disabled: $props.disabled,
|
|
1161
1153
|
tabindex: -1,
|
|
1162
1154
|
"aria-hidden": "true"
|
|
1163
|
-
},
|
|
1155
|
+
}, { ...$props.decrementButtonProps, ..._ctx.ptm('decrementButton') }), {
|
|
1164
1156
|
icon: withCtx(() => [
|
|
1165
1157
|
renderSlot(_ctx.$slots, "decrementbuttonicon", {}, () => [
|
|
1166
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), {
|
|
1167
|
-
class: normalizeClass($props.decrementButtonIcon)
|
|
1168
|
-
}, null, 8, ["class"]))
|
|
1158
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.decrementButtonIcon ? 'span' : 'AngleDownIcon'), mergeProps({ class: $props.decrementButtonIcon }, _ctx.ptm('decrementButton')['icon']), null, 16, ["class"]))
|
|
1169
1159
|
])
|
|
1170
1160
|
]),
|
|
1171
1161
|
_: 3
|
|
1172
1162
|
}, 16, ["class", "disabled"]))
|
|
1173
1163
|
: createCommentVNode("", true)
|
|
1174
|
-
],
|
|
1164
|
+
], 16))
|
|
1175
1165
|
}
|
|
1176
1166
|
|
|
1177
1167
|
function styleInject(css, ref) {
|