primevue 3.27.0 → 3.28.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 +1 -1
- package/autocomplete/AutoComplete.d.ts +10 -1
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +4 -1
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +4 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -1
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +44 -0
- package/avatar/Avatar.vue +10 -8
- package/avatar/avatar.cjs.js +36 -34
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +33 -35
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +37 -36
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +27 -1
- package/avatargroup/AvatarGroup.vue +5 -2
- package/avatargroup/avatargroup.cjs.js +9 -5
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +6 -6
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +10 -7
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/Badge.d.ts +32 -0
- package/badge/Badge.vue +3 -1
- package/badge/badge.cjs.js +8 -4
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +5 -5
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +9 -6
- package/badge/badge.min.js +1 -1
- package/basecomponent/BaseComponent.vue +10 -3
- package/basecomponent/basecomponent.cjs.js +10 -3
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +10 -3
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +10 -3
- package/basecomponent/basecomponent.min.js +1 -1
- package/baseicon/BaseIcon.vue +2 -2
- package/baseicon/baseicon.cjs.js +2 -2
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +2 -2
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +2 -2
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +44 -0
- package/blockui/BlockUI.vue +3 -1
- package/blockui/blockui.cjs.js +9 -3
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +6 -4
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +10 -5
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +60 -0
- package/breadcrumb/Breadcrumb.vue +8 -6
- package/breadcrumb/BreadcrumbItem.vue +14 -10
- package/breadcrumb/breadcrumb.cjs.js +53 -51
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +53 -52
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +54 -53
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +48 -0
- package/button/Button.vue +10 -9
- package/button/button.cjs.js +43 -44
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +43 -45
- package/button/button.esm.min.js +1 -1
- package/button/button.js +44 -46
- package/button/button.min.js +1 -1
- package/chart/Chart.d.ts +36 -0
- package/chart/Chart.vue +5 -2
- package/chart/chart.cjs.js +10 -5
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +7 -6
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +11 -7
- package/chart/chart.min.js +1 -1
- package/chip/Chip.d.ts +60 -0
- package/chip/Chip.vue +10 -9
- package/chip/chip.cjs.js +35 -36
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +35 -37
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +36 -38
- package/chip/chip.min.js +1 -1
- package/config/PrimeVue.d.ts +8 -0
- package/config/config.cjs.js +3 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +3 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +3 -1
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +88 -0
- package/confirmdialog/ConfirmDialog.vue +9 -6
- package/confirmdialog/confirmdialog.cjs.js +22 -18
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +22 -19
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +23 -20
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +75 -0
- package/confirmpopup/ConfirmPopup.vue +11 -9
- package/confirmpopup/confirmpopup.cjs.js +27 -25
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +27 -26
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +28 -27
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +135 -0
- package/contextmenu/ContextMenu.vue +4 -1
- package/contextmenu/ContextMenuSub.vue +46 -10
- package/contextmenu/contextmenu.cjs.js +57 -46
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +57 -47
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +58 -48
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +278 -246
- package/core/core.min.js +11 -11
- package/dialog/Dialog.d.ts +87 -0
- package/dialog/Dialog.vue +23 -10
- package/dialog/dialog.cjs.js +31 -30
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +31 -31
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +32 -32
- package/dialog/dialog.min.js +1 -1
- package/dock/Dock.d.ts +94 -0
- package/dock/Dock.vue +4 -2
- package/dock/DockSub.vue +30 -6
- package/dock/dock.cjs.js +52 -39
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +52 -40
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +53 -41
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.vue +1 -1
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/dynamicdialog/DynamicDialog.vue +3 -1
- package/dynamicdialog/dynamicdialog.cjs.js +5 -1
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +4 -1
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +6 -3
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/fileupload/FileContent.vue +11 -9
- package/fileupload/FileUpload.d.ts +154 -0
- package/fileupload/FileUpload.vue +26 -24
- package/fileupload/fileupload.cjs.js +100 -97
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +100 -98
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +101 -99
- package/fileupload/fileupload.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +52 -0
- package/inlinemessage/InlineMessage.vue +7 -3
- package/inlinemessage/inlinemessage.cjs.js +12 -11
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +12 -12
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +13 -13
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.d.ts +59 -0
- package/inplace/Inplace.vue +7 -5
- package/inplace/inplace.cjs.js +17 -16
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +17 -17
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +18 -18
- package/inplace/inplace.min.js +1 -1
- package/listbox/Listbox.d.ts +1 -1
- package/megamenu/MegaMenu.d.ts +149 -0
- package/megamenu/MegaMenu.vue +6 -3
- package/megamenu/MegaMenuSub.vue +43 -15
- package/megamenu/megamenu.cjs.js +83 -75
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +83 -76
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +84 -77
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +113 -0
- package/menu/Menu.vue +11 -8
- package/menu/Menuitem.vue +20 -8
- package/menu/menu.cjs.js +73 -62
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +73 -63
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +74 -64
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +146 -0
- package/menubar/Menubar.vue +8 -5
- package/menubar/MenubarSub.vue +38 -10
- package/menubar/menubar.cjs.js +70 -60
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +70 -61
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +71 -62
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +64 -1
- package/message/Message.vue +9 -7
- package/message/message.cjs.js +22 -21
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +22 -22
- package/message/message.esm.min.js +1 -1
- package/message/message.js +23 -23
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +1 -1
- package/overlaypanel/OverlayPanel.d.ts +56 -0
- package/overlaypanel/OverlayPanel.vue +6 -4
- package/overlaypanel/overlaypanel.cjs.js +13 -10
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +13 -11
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +14 -12
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/panel/Panel.d.ts +10 -1
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +4 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +4 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +133 -0
- package/panelmenu/PanelMenu.vue +36 -13
- package/panelmenu/PanelMenuList.vue +3 -0
- package/panelmenu/PanelMenuSub.vue +33 -12
- package/panelmenu/panelmenu.cjs.js +115 -96
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +115 -97
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +116 -98
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.vue +2 -2
- package/password/password.cjs.js +2 -2
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -2
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -2
- package/password/password.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +40 -0
- package/progressbar/ProgressBar.vue +8 -5
- package/progressbar/progressbar.cjs.js +25 -23
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +22 -24
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +26 -25
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +40 -0
- package/progressspinner/ProgressSpinner.vue +6 -3
- package/progressspinner/progressspinner.cjs.js +18 -13
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +15 -14
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +19 -15
- package/progressspinner/progressspinner.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +1 -1
- package/resources/themes/arya-green/theme.css +1 -1
- package/resources/themes/arya-orange/theme.css +1 -1
- package/resources/themes/arya-purple/theme.css +1 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +1 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +1 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +1 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +1 -1
- package/resources/themes/fluent-light/theme.css +1 -1
- package/resources/themes/lara-dark-blue/theme.css +1 -1
- package/resources/themes/lara-dark-indigo/theme.css +1 -1
- package/resources/themes/lara-dark-purple/theme.css +1 -1
- package/resources/themes/lara-dark-teal/theme.css +1 -1
- package/resources/themes/lara-light-blue/theme.css +1 -1
- package/resources/themes/lara-light-indigo/theme.css +1 -1
- package/resources/themes/lara-light-purple/theme.css +1 -1
- package/resources/themes/lara-light-teal/theme.css +1 -1
- package/resources/themes/luna-amber/theme.css +1 -1
- package/resources/themes/luna-blue/theme.css +1 -1
- package/resources/themes/luna-green/theme.css +1 -1
- package/resources/themes/luna-pink/theme.css +1 -1
- package/resources/themes/md-dark-deeppurple/theme.css +4 -1
- package/resources/themes/md-dark-indigo/theme.css +4 -1
- package/resources/themes/md-light-deeppurple/theme.css +4 -1
- package/resources/themes/md-light-indigo/theme.css +4 -1
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -1
- package/resources/themes/mdc-dark-indigo/theme.css +4 -1
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -1
- package/resources/themes/mdc-light-indigo/theme.css +4 -1
- package/resources/themes/mira/theme.css +1 -1
- package/resources/themes/nano/theme.css +1 -1
- package/resources/themes/nova/theme.css +1 -1
- package/resources/themes/nova-accent/theme.css +1 -1
- package/resources/themes/nova-alt/theme.css +1 -1
- package/resources/themes/nova-vue/theme.css +1 -1
- package/resources/themes/rhea/theme.css +1 -1
- package/resources/themes/saga-blue/theme.css +1 -1
- package/resources/themes/saga-green/theme.css +1 -1
- package/resources/themes/saga-orange/theme.css +1 -1
- package/resources/themes/saga-purple/theme.css +1 -1
- package/resources/themes/soho-dark/theme.css +1 -1
- package/resources/themes/soho-light/theme.css +1 -1
- package/resources/themes/tailwind-light/theme.css +1 -1
- package/resources/themes/vela-blue/theme.css +1 -1
- package/resources/themes/vela-green/theme.css +1 -1
- package/resources/themes/vela-orange/theme.css +1 -1
- package/resources/themes/vela-purple/theme.css +1 -1
- package/resources/themes/viva-dark/theme.css +1 -1
- package/resources/themes/viva-light/theme.css +1 -1
- package/scrolltop/ScrollTop.d.ts +48 -0
- package/scrolltop/ScrollTop.vue +5 -2
- package/scrolltop/scrolltop.cjs.js +10 -7
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +10 -8
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +11 -9
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/Sidebar.d.ts +68 -0
- package/sidebar/Sidebar.vue +9 -7
- package/sidebar/sidebar.cjs.js +26 -24
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +26 -25
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +27 -26
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +32 -0
- package/skeleton/Skeleton.vue +4 -1
- package/skeleton/skeleton.cjs.js +10 -4
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +7 -5
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +11 -6
- package/skeleton/skeleton.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +101 -0
- package/speeddial/SpeedDial.vue +31 -8
- package/speeddial/speeddial.cjs.js +47 -33
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +47 -34
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +48 -35
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +64 -0
- package/splitbutton/SplitButton.vue +8 -5
- package/splitbutton/splitbutton.cjs.js +23 -18
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +23 -19
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +24 -20
- package/splitbutton/splitbutton.min.js +1 -1
- package/steps/Steps.d.ts +52 -0
- package/steps/Steps.vue +11 -8
- package/steps/steps.cjs.js +34 -33
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +31 -34
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +35 -35
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +79 -0
- package/tabmenu/TabMenu.vue +20 -10
- package/tabmenu/tabmenu.cjs.js +47 -41
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +47 -42
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +48 -43
- package/tabmenu/tabmenu.min.js +1 -1
- package/tag/Tag.d.ts +40 -0
- package/tag/Tag.vue +7 -4
- package/tag/tag.cjs.js +14 -12
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +11 -13
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +15 -14
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.d.ts +79 -0
- package/terminal/Terminal.vue +12 -10
- package/terminal/terminal.cjs.js +23 -28
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +23 -29
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -30
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +130 -0
- package/tieredmenu/TieredMenu.vue +4 -1
- package/tieredmenu/TieredMenuSub.vue +39 -11
- package/tieredmenu/tieredmenu.cjs.js +53 -41
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +53 -42
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +54 -43
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/Toast.d.ts +79 -0
- package/toast/Toast.vue +4 -1
- package/toast/ToastMessage.vue +12 -10
- package/toast/toast.cjs.js +31 -31
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +31 -32
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +32 -33
- package/toast/toast.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +1 -2
- package/vetur-attributes.json +160 -0
- package/vetur-tags.json +79 -34
- package/web-types.json +404 -2
package/terminal/Terminal.vue
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="p-terminal p-component" @click="onClick">
|
|
3
|
-
<div v-if="welcomeMessage">{{ welcomeMessage }}</div>
|
|
4
|
-
<div class="p-terminal-content">
|
|
5
|
-
<div v-for="(command, i) of commands" :key="command.text + i.toString()">
|
|
6
|
-
<span class="p-terminal-prompt">{{ prompt }}</span>
|
|
7
|
-
<span class="p-terminal-command">{{ command.text }}</span>
|
|
8
|
-
<div class="p-terminal-response" aria-live="polite">{{ command.response }}</div>
|
|
2
|
+
<div class="p-terminal p-component" @click="onClick" v-bind="ptm('root')">
|
|
3
|
+
<div v-if="welcomeMessage" v-bind="ptm('welcomeMessage')">{{ welcomeMessage }}</div>
|
|
4
|
+
<div class="p-terminal-content" v-bind="ptm('content')">
|
|
5
|
+
<div v-for="(command, i) of commands" :key="command.text + i.toString()" v-bind="ptm('commands')">
|
|
6
|
+
<span class="p-terminal-prompt" v-bind="ptm('prompt')">{{ prompt }}</span>
|
|
7
|
+
<span class="p-terminal-command" v-bind="ptm('command')">{{ command.text }}</span>
|
|
8
|
+
<div class="p-terminal-response" aria-live="polite" v-bind="ptm('response')">{{ command.response }}</div>
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="p-terminal-prompt-container">
|
|
12
|
-
<span class="p-terminal-prompt">{{ prompt }}</span>
|
|
13
|
-
<input ref="input" v-model="commandText" type="text" class="p-terminal-input" autocomplete="off" @keydown="onKeydown" />
|
|
11
|
+
<div class="p-terminal-prompt-container" v-bind="ptm('container')">
|
|
12
|
+
<span class="p-terminal-prompt" v-bind="ptm('prompt')">{{ prompt }}</span>
|
|
13
|
+
<input ref="input" v-model="commandText" type="text" class="p-terminal-input" autocomplete="off" @keydown="onKeydown" v-bind="ptm('commandText')" />
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
19
20
|
import TerminalService from 'primevue/terminalservice';
|
|
20
21
|
|
|
21
22
|
export default {
|
|
22
23
|
name: 'Terminal',
|
|
24
|
+
extends: BaseComponent,
|
|
23
25
|
props: {
|
|
24
26
|
welcomeMessage: {
|
|
25
27
|
type: String,
|
package/terminal/terminal.cjs.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var TerminalService = require('primevue/terminalservice');
|
|
4
5
|
var vue = require('vue');
|
|
5
6
|
|
|
6
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
8
|
|
|
9
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
10
|
var TerminalService__default = /*#__PURE__*/_interopDefaultLegacy(TerminalService);
|
|
9
11
|
|
|
10
12
|
var script = {
|
|
11
13
|
name: 'Terminal',
|
|
14
|
+
extends: BaseComponent__default["default"],
|
|
12
15
|
props: {
|
|
13
16
|
welcomeMessage: {
|
|
14
17
|
type: String,
|
|
@@ -52,50 +55,42 @@ var script = {
|
|
|
52
55
|
}
|
|
53
56
|
};
|
|
54
57
|
|
|
55
|
-
const _hoisted_1 = { key: 0 };
|
|
56
|
-
const _hoisted_2 = { class: "p-terminal-content" };
|
|
57
|
-
const _hoisted_3 = { class: "p-terminal-prompt" };
|
|
58
|
-
const _hoisted_4 = { class: "p-terminal-command" };
|
|
59
|
-
const _hoisted_5 = {
|
|
60
|
-
class: "p-terminal-response",
|
|
61
|
-
"aria-live": "polite"
|
|
62
|
-
};
|
|
63
|
-
const _hoisted_6 = { class: "p-terminal-prompt-container" };
|
|
64
|
-
const _hoisted_7 = { class: "p-terminal-prompt" };
|
|
65
|
-
|
|
66
58
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
67
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
59
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
68
60
|
class: "p-terminal p-component",
|
|
69
61
|
onClick: _cache[2] || (_cache[2] = (...args) => ($options.onClick && $options.onClick(...args)))
|
|
70
|
-
}, [
|
|
62
|
+
}, _ctx.ptm('root')), [
|
|
71
63
|
($props.welcomeMessage)
|
|
72
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
64
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({ key: 0 }, _ctx.ptm('welcomeMessage'))), vue.toDisplayString($props.welcomeMessage), 17))
|
|
73
65
|
: vue.createCommentVNode("", true),
|
|
74
|
-
vue.createElementVNode("div",
|
|
66
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-terminal-content" }, _ctx.ptm('content')), [
|
|
75
67
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.commands, (command, i) => {
|
|
76
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
68
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
77
69
|
key: command.text + i.toString()
|
|
78
|
-
}, [
|
|
79
|
-
vue.createElementVNode("span",
|
|
80
|
-
vue.createElementVNode("span",
|
|
81
|
-
vue.createElementVNode("div",
|
|
82
|
-
|
|
70
|
+
}, _ctx.ptm('commands')), [
|
|
71
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-terminal-prompt" }, _ctx.ptm('prompt')), vue.toDisplayString($props.prompt), 17),
|
|
72
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-terminal-command" }, _ctx.ptm('command')), vue.toDisplayString(command.text), 17),
|
|
73
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
74
|
+
class: "p-terminal-response",
|
|
75
|
+
"aria-live": "polite"
|
|
76
|
+
}, _ctx.ptm('response')), vue.toDisplayString(command.response), 17)
|
|
77
|
+
], 16))
|
|
83
78
|
}), 128))
|
|
84
|
-
]),
|
|
85
|
-
vue.createElementVNode("div",
|
|
86
|
-
vue.createElementVNode("span",
|
|
87
|
-
vue.withDirectives(vue.createElementVNode("input", {
|
|
79
|
+
], 16),
|
|
80
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-terminal-prompt-container" }, _ctx.ptm('container')), [
|
|
81
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-terminal-prompt" }, _ctx.ptm('prompt')), vue.toDisplayString($props.prompt), 17),
|
|
82
|
+
vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
|
|
88
83
|
ref: "input",
|
|
89
84
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.commandText) = $event)),
|
|
90
85
|
type: "text",
|
|
91
86
|
class: "p-terminal-input",
|
|
92
87
|
autocomplete: "off",
|
|
93
88
|
onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.onKeydown && $options.onKeydown(...args)))
|
|
94
|
-
}, null,
|
|
89
|
+
}, _ctx.ptm('commandText')), null, 16), [
|
|
95
90
|
[vue.vModelText, $data.commandText]
|
|
96
91
|
])
|
|
97
|
-
])
|
|
98
|
-
]))
|
|
92
|
+
], 16)
|
|
93
|
+
], 16))
|
|
99
94
|
}
|
|
100
95
|
|
|
101
96
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/terminalservice"),n=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e),m=o(t),s={name:"Terminal",extends:r.default,props:{welcomeMessage:{type:String,default:null},prompt:{type:String,default:null}},data:()=>({commandText:null,commands:[]}),mounted(){m.default.on("response",this.responseListener),this.$refs.input.focus()},updated(){this.$el.scrollTop=this.$el.scrollHeight},beforeUnmount(){m.default.off("response",this.responseListener)},methods:{onClick(){this.$refs.input.focus()},onKeydown(e){"Enter"===e.code&&this.commandText&&(this.commands.push({text:this.commandText}),m.default.emit("command",this.commandText),this.commandText="")},responseListener(e){this.commands[this.commands.length-1].response=e}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("\n.p-terminal {\n height: 18rem;\n overflow: auto;\n}\n.p-terminal-prompt-container {\n display: flex;\n align-items: center;\n}\n.p-terminal-input {\n flex: 1 1 auto;\n border: 0 none;\n background-color: transparent;\n color: inherit;\n padding: 0;\n outline: 0 none;\n}\n.p-terminal-input::-ms-clear {\n display: none;\n}\n"),s.render=function(e,t,o,r,m,s){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:"p-terminal p-component",onClick:t[2]||(t[2]=(...e)=>s.onClick&&s.onClick(...e))},e.ptm("root")),[o.welcomeMessage?(n.openBlock(),n.createElementBlock("div",n.normalizeProps(n.mergeProps({key:0},e.ptm("welcomeMessage"))),n.toDisplayString(o.welcomeMessage),17)):n.createCommentVNode("",!0),n.createElementVNode("div",n.mergeProps({class:"p-terminal-content"},e.ptm("content")),[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.commands,((t,r)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:t.text+r.toString()},e.ptm("commands")),[n.createElementVNode("span",n.mergeProps({class:"p-terminal-prompt"},e.ptm("prompt")),n.toDisplayString(o.prompt),17),n.createElementVNode("span",n.mergeProps({class:"p-terminal-command"},e.ptm("command")),n.toDisplayString(t.text),17),n.createElementVNode("div",n.mergeProps({class:"p-terminal-response","aria-live":"polite"},e.ptm("response")),n.toDisplayString(t.response),17)],16)))),128))],16),n.createElementVNode("div",n.mergeProps({class:"p-terminal-prompt-container"},e.ptm("container")),[n.createElementVNode("span",n.mergeProps({class:"p-terminal-prompt"},e.ptm("prompt")),n.toDisplayString(o.prompt),17),n.withDirectives(n.createElementVNode("input",n.mergeProps({ref:"input","onUpdate:modelValue":t[0]||(t[0]=e=>m.commandText=e),type:"text",class:"p-terminal-input",autocomplete:"off",onKeydown:t[1]||(t[1]=(...e)=>s.onKeydown&&s.onKeydown(...e))},e.ptm("commandText")),null,16),[[n.vModelText,m.commandText]])],16)],16)},module.exports=s;
|
package/terminal/terminal.esm.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import TerminalService from 'primevue/terminalservice';
|
|
2
|
-
import { openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, withDirectives, vModelText } from 'vue';
|
|
3
|
+
import { openBlock, createElementBlock, mergeProps, normalizeProps, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, withDirectives, vModelText } from 'vue';
|
|
3
4
|
|
|
4
5
|
var script = {
|
|
5
6
|
name: 'Terminal',
|
|
7
|
+
extends: BaseComponent,
|
|
6
8
|
props: {
|
|
7
9
|
welcomeMessage: {
|
|
8
10
|
type: String,
|
|
@@ -46,50 +48,42 @@ var script = {
|
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
const _hoisted_1 = { key: 0 };
|
|
50
|
-
const _hoisted_2 = { class: "p-terminal-content" };
|
|
51
|
-
const _hoisted_3 = { class: "p-terminal-prompt" };
|
|
52
|
-
const _hoisted_4 = { class: "p-terminal-command" };
|
|
53
|
-
const _hoisted_5 = {
|
|
54
|
-
class: "p-terminal-response",
|
|
55
|
-
"aria-live": "polite"
|
|
56
|
-
};
|
|
57
|
-
const _hoisted_6 = { class: "p-terminal-prompt-container" };
|
|
58
|
-
const _hoisted_7 = { class: "p-terminal-prompt" };
|
|
59
|
-
|
|
60
51
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
61
|
-
return (openBlock(), createElementBlock("div", {
|
|
52
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
62
53
|
class: "p-terminal p-component",
|
|
63
54
|
onClick: _cache[2] || (_cache[2] = (...args) => ($options.onClick && $options.onClick(...args)))
|
|
64
|
-
}, [
|
|
55
|
+
}, _ctx.ptm('root')), [
|
|
65
56
|
($props.welcomeMessage)
|
|
66
|
-
? (openBlock(), createElementBlock("div",
|
|
57
|
+
? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 0 }, _ctx.ptm('welcomeMessage'))), toDisplayString($props.welcomeMessage), 17))
|
|
67
58
|
: createCommentVNode("", true),
|
|
68
|
-
createElementVNode("div",
|
|
59
|
+
createElementVNode("div", mergeProps({ class: "p-terminal-content" }, _ctx.ptm('content')), [
|
|
69
60
|
(openBlock(true), createElementBlock(Fragment, null, renderList($data.commands, (command, i) => {
|
|
70
|
-
return (openBlock(), createElementBlock("div", {
|
|
61
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
71
62
|
key: command.text + i.toString()
|
|
72
|
-
}, [
|
|
73
|
-
createElementVNode("span",
|
|
74
|
-
createElementVNode("span",
|
|
75
|
-
createElementVNode("div",
|
|
76
|
-
|
|
63
|
+
}, _ctx.ptm('commands')), [
|
|
64
|
+
createElementVNode("span", mergeProps({ class: "p-terminal-prompt" }, _ctx.ptm('prompt')), toDisplayString($props.prompt), 17),
|
|
65
|
+
createElementVNode("span", mergeProps({ class: "p-terminal-command" }, _ctx.ptm('command')), toDisplayString(command.text), 17),
|
|
66
|
+
createElementVNode("div", mergeProps({
|
|
67
|
+
class: "p-terminal-response",
|
|
68
|
+
"aria-live": "polite"
|
|
69
|
+
}, _ctx.ptm('response')), toDisplayString(command.response), 17)
|
|
70
|
+
], 16))
|
|
77
71
|
}), 128))
|
|
78
|
-
]),
|
|
79
|
-
createElementVNode("div",
|
|
80
|
-
createElementVNode("span",
|
|
81
|
-
withDirectives(createElementVNode("input", {
|
|
72
|
+
], 16),
|
|
73
|
+
createElementVNode("div", mergeProps({ class: "p-terminal-prompt-container" }, _ctx.ptm('container')), [
|
|
74
|
+
createElementVNode("span", mergeProps({ class: "p-terminal-prompt" }, _ctx.ptm('prompt')), toDisplayString($props.prompt), 17),
|
|
75
|
+
withDirectives(createElementVNode("input", mergeProps({
|
|
82
76
|
ref: "input",
|
|
83
77
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.commandText) = $event)),
|
|
84
78
|
type: "text",
|
|
85
79
|
class: "p-terminal-input",
|
|
86
80
|
autocomplete: "off",
|
|
87
81
|
onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.onKeydown && $options.onKeydown(...args)))
|
|
88
|
-
}, null,
|
|
82
|
+
}, _ctx.ptm('commandText')), null, 16), [
|
|
89
83
|
[vModelText, $data.commandText]
|
|
90
84
|
])
|
|
91
|
-
])
|
|
92
|
-
]))
|
|
85
|
+
], 16)
|
|
86
|
+
], 16))
|
|
93
87
|
}
|
|
94
88
|
|
|
95
89
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/terminalservice";import{openBlock as
|
|
1
|
+
import e from"primevue/basecomponent";import n from"primevue/terminalservice";import{openBlock as t,createElementBlock as o,mergeProps as m,normalizeProps as s,toDisplayString as p,createCommentVNode as r,createElementVNode as i,Fragment as a,renderList as l,withDirectives as c,vModelText as d}from"vue";var u={name:"Terminal",extends:e,props:{welcomeMessage:{type:String,default:null},prompt:{type:String,default:null}},data:()=>({commandText:null,commands:[]}),mounted(){n.on("response",this.responseListener),this.$refs.input.focus()},updated(){this.$el.scrollTop=this.$el.scrollHeight},beforeUnmount(){n.off("response",this.responseListener)},methods:{onClick(){this.$refs.input.focus()},onKeydown(e){"Enter"===e.code&&this.commandText&&(this.commands.push({text:this.commandText}),n.emit("command",this.commandText),this.commandText="")},responseListener(e){this.commands[this.commands.length-1].response=e}}};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");m.type="text/css","top"===t&&o.firstChild?o.insertBefore(m,o.firstChild):o.appendChild(m),m.styleSheet?m.styleSheet.cssText=e:m.appendChild(document.createTextNode(e))}}("\n.p-terminal {\n height: 18rem;\n overflow: auto;\n}\n.p-terminal-prompt-container {\n display: flex;\n align-items: center;\n}\n.p-terminal-input {\n flex: 1 1 auto;\n border: 0 none;\n background-color: transparent;\n color: inherit;\n padding: 0;\n outline: 0 none;\n}\n.p-terminal-input::-ms-clear {\n display: none;\n}\n"),u.render=function(e,n,u,h,f,x){return t(),o("div",m({class:"p-terminal p-component",onClick:n[2]||(n[2]=(...e)=>x.onClick&&x.onClick(...e))},e.ptm("root")),[u.welcomeMessage?(t(),o("div",s(m({key:0},e.ptm("welcomeMessage"))),p(u.welcomeMessage),17)):r("",!0),i("div",m({class:"p-terminal-content"},e.ptm("content")),[(t(!0),o(a,null,l(f.commands,((n,s)=>(t(),o("div",m({key:n.text+s.toString()},e.ptm("commands")),[i("span",m({class:"p-terminal-prompt"},e.ptm("prompt")),p(u.prompt),17),i("span",m({class:"p-terminal-command"},e.ptm("command")),p(n.text),17),i("div",m({class:"p-terminal-response","aria-live":"polite"},e.ptm("response")),p(n.response),17)],16)))),128))],16),i("div",m({class:"p-terminal-prompt-container"},e.ptm("container")),[i("span",m({class:"p-terminal-prompt"},e.ptm("prompt")),p(u.prompt),17),c(i("input",m({ref:"input","onUpdate:modelValue":n[0]||(n[0]=e=>f.commandText=e),type:"text",class:"p-terminal-input",autocomplete:"off",onKeydown:n[1]||(n[1]=(...e)=>x.onKeydown&&x.onKeydown(...e))},e.ptm("commandText")),null,16),[[d,f.commandText]])],16)],16)};export{u as default};
|
package/terminal/terminal.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.terminal = (function (TerminalService, vue) {
|
|
2
|
+
this.primevue.terminal = (function (BaseComponent, TerminalService, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
6
|
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
7
8
|
var TerminalService__default = /*#__PURE__*/_interopDefaultLegacy(TerminalService);
|
|
8
9
|
|
|
9
10
|
var script = {
|
|
10
11
|
name: 'Terminal',
|
|
12
|
+
extends: BaseComponent__default["default"],
|
|
11
13
|
props: {
|
|
12
14
|
welcomeMessage: {
|
|
13
15
|
type: String,
|
|
@@ -51,50 +53,42 @@ this.primevue.terminal = (function (TerminalService, vue) {
|
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
55
|
|
|
54
|
-
const _hoisted_1 = { key: 0 };
|
|
55
|
-
const _hoisted_2 = { class: "p-terminal-content" };
|
|
56
|
-
const _hoisted_3 = { class: "p-terminal-prompt" };
|
|
57
|
-
const _hoisted_4 = { class: "p-terminal-command" };
|
|
58
|
-
const _hoisted_5 = {
|
|
59
|
-
class: "p-terminal-response",
|
|
60
|
-
"aria-live": "polite"
|
|
61
|
-
};
|
|
62
|
-
const _hoisted_6 = { class: "p-terminal-prompt-container" };
|
|
63
|
-
const _hoisted_7 = { class: "p-terminal-prompt" };
|
|
64
|
-
|
|
65
56
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
66
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
57
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
67
58
|
class: "p-terminal p-component",
|
|
68
59
|
onClick: _cache[2] || (_cache[2] = (...args) => ($options.onClick && $options.onClick(...args)))
|
|
69
|
-
}, [
|
|
60
|
+
}, _ctx.ptm('root')), [
|
|
70
61
|
($props.welcomeMessage)
|
|
71
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
62
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({ key: 0 }, _ctx.ptm('welcomeMessage'))), vue.toDisplayString($props.welcomeMessage), 17))
|
|
72
63
|
: vue.createCommentVNode("", true),
|
|
73
|
-
vue.createElementVNode("div",
|
|
64
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-terminal-content" }, _ctx.ptm('content')), [
|
|
74
65
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.commands, (command, i) => {
|
|
75
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
66
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
76
67
|
key: command.text + i.toString()
|
|
77
|
-
}, [
|
|
78
|
-
vue.createElementVNode("span",
|
|
79
|
-
vue.createElementVNode("span",
|
|
80
|
-
vue.createElementVNode("div",
|
|
81
|
-
|
|
68
|
+
}, _ctx.ptm('commands')), [
|
|
69
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-terminal-prompt" }, _ctx.ptm('prompt')), vue.toDisplayString($props.prompt), 17),
|
|
70
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-terminal-command" }, _ctx.ptm('command')), vue.toDisplayString(command.text), 17),
|
|
71
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
72
|
+
class: "p-terminal-response",
|
|
73
|
+
"aria-live": "polite"
|
|
74
|
+
}, _ctx.ptm('response')), vue.toDisplayString(command.response), 17)
|
|
75
|
+
], 16))
|
|
82
76
|
}), 128))
|
|
83
|
-
]),
|
|
84
|
-
vue.createElementVNode("div",
|
|
85
|
-
vue.createElementVNode("span",
|
|
86
|
-
vue.withDirectives(vue.createElementVNode("input", {
|
|
77
|
+
], 16),
|
|
78
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-terminal-prompt-container" }, _ctx.ptm('container')), [
|
|
79
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-terminal-prompt" }, _ctx.ptm('prompt')), vue.toDisplayString($props.prompt), 17),
|
|
80
|
+
vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
|
|
87
81
|
ref: "input",
|
|
88
82
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.commandText) = $event)),
|
|
89
83
|
type: "text",
|
|
90
84
|
class: "p-terminal-input",
|
|
91
85
|
autocomplete: "off",
|
|
92
86
|
onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.onKeydown && $options.onKeydown(...args)))
|
|
93
|
-
}, null,
|
|
87
|
+
}, _ctx.ptm('commandText')), null, 16), [
|
|
94
88
|
[vue.vModelText, $data.commandText]
|
|
95
89
|
])
|
|
96
|
-
])
|
|
97
|
-
]))
|
|
90
|
+
], 16)
|
|
91
|
+
], 16))
|
|
98
92
|
}
|
|
99
93
|
|
|
100
94
|
function styleInject(css, ref) {
|
|
@@ -131,4 +125,4 @@ this.primevue.terminal = (function (TerminalService, vue) {
|
|
|
131
125
|
|
|
132
126
|
return script;
|
|
133
127
|
|
|
134
|
-
})(primevue.terminalservice, Vue);
|
|
128
|
+
})(primevue.basecomponent, primevue.terminalservice, Vue);
|
package/terminal/terminal.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.terminal=function(e,t){"use strict";function
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.terminal=function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e),m=o(t),s={name:"Terminal",extends:r.default,props:{welcomeMessage:{type:String,default:null},prompt:{type:String,default:null}},data:()=>({commandText:null,commands:[]}),mounted(){m.default.on("response",this.responseListener),this.$refs.input.focus()},updated(){this.$el.scrollTop=this.$el.scrollHeight},beforeUnmount(){m.default.off("response",this.responseListener)},methods:{onClick(){this.$refs.input.focus()},onKeydown(e){"Enter"===e.code&&this.commandText&&(this.commands.push({text:this.commandText}),m.default.emit("command",this.commandText),this.commandText="")},responseListener(e){this.commands[this.commands.length-1].response=e}}};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("\n.p-terminal {\n height: 18rem;\n overflow: auto;\n}\n.p-terminal-prompt-container {\n display: flex;\n align-items: center;\n}\n.p-terminal-input {\n flex: 1 1 auto;\n border: 0 none;\n background-color: transparent;\n color: inherit;\n padding: 0;\n outline: 0 none;\n}\n.p-terminal-input::-ms-clear {\n display: none;\n}\n"),s.render=function(e,t,o,r,m,s){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:"p-terminal p-component",onClick:t[2]||(t[2]=(...e)=>s.onClick&&s.onClick(...e))},e.ptm("root")),[o.welcomeMessage?(n.openBlock(),n.createElementBlock("div",n.normalizeProps(n.mergeProps({key:0},e.ptm("welcomeMessage"))),n.toDisplayString(o.welcomeMessage),17)):n.createCommentVNode("",!0),n.createElementVNode("div",n.mergeProps({class:"p-terminal-content"},e.ptm("content")),[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.commands,((t,r)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:t.text+r.toString()},e.ptm("commands")),[n.createElementVNode("span",n.mergeProps({class:"p-terminal-prompt"},e.ptm("prompt")),n.toDisplayString(o.prompt),17),n.createElementVNode("span",n.mergeProps({class:"p-terminal-command"},e.ptm("command")),n.toDisplayString(t.text),17),n.createElementVNode("div",n.mergeProps({class:"p-terminal-response","aria-live":"polite"},e.ptm("response")),n.toDisplayString(t.response),17)],16)))),128))],16),n.createElementVNode("div",n.mergeProps({class:"p-terminal-prompt-container"},e.ptm("container")),[n.createElementVNode("span",n.mergeProps({class:"p-terminal-prompt"},e.ptm("prompt")),n.toDisplayString(o.prompt),17),n.withDirectives(n.createElementVNode("input",n.mergeProps({ref:"input","onUpdate:modelValue":t[0]||(t[0]=e=>m.commandText=e),type:"text",class:"p-terminal-input",autocomplete:"off",onKeydown:t[1]||(t[1]=(...e)=>s.onKeydown&&s.onKeydown(...e))},e.ptm("commandText")),null,16),[[n.vModelText,m.commandText]])],16)],16)},s}(primevue.basecomponent,primevue.terminalservice,Vue);
|
|
@@ -11,6 +11,131 @@ import { VNode } from 'vue';
|
|
|
11
11
|
import { MenuItem } from '../menuitem';
|
|
12
12
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
13
|
|
|
14
|
+
export declare type TieredMenuPassThroughOptionType = TieredMenuPassThroughAttributes | ((options: TieredMenuPassThroughMethodOptions) => TieredMenuPassThroughAttributes) | null | undefined;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Custom passthrough(pt) option method.
|
|
18
|
+
*/
|
|
19
|
+
export interface TieredMenuPassThroughMethodOptions {
|
|
20
|
+
props: TieredMenuProps;
|
|
21
|
+
state: TieredMenuState;
|
|
22
|
+
context: TieredMenuContext;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom passthrough(pt) options.
|
|
27
|
+
* @see {@link TieredMenuProps.pt}
|
|
28
|
+
*/
|
|
29
|
+
export interface TieredMenuPassThroughOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Uses to pass attributes to the root's DOM element.
|
|
32
|
+
*/
|
|
33
|
+
root?: TieredMenuPassThroughOptionType;
|
|
34
|
+
/**
|
|
35
|
+
* Uses to pass attributes to the list's DOM element.
|
|
36
|
+
*/
|
|
37
|
+
menu?: TieredMenuPassThroughOptionType;
|
|
38
|
+
/**
|
|
39
|
+
* Uses to pass attributes to the list item's DOM element.
|
|
40
|
+
*/
|
|
41
|
+
menuitem?: TieredMenuPassThroughOptionType;
|
|
42
|
+
/**
|
|
43
|
+
* Uses to pass attributes to the content's DOM element.
|
|
44
|
+
*/
|
|
45
|
+
content?: TieredMenuPassThroughOptionType;
|
|
46
|
+
/**
|
|
47
|
+
* Uses to pass attributes to the action's DOM element.
|
|
48
|
+
*/
|
|
49
|
+
action?: TieredMenuPassThroughOptionType;
|
|
50
|
+
/**
|
|
51
|
+
* Uses to pass attributes to the icon's DOM element.
|
|
52
|
+
*/
|
|
53
|
+
icon?: TieredMenuPassThroughOptionType;
|
|
54
|
+
/**
|
|
55
|
+
* Uses to pass attributes to the label's DOM element.
|
|
56
|
+
*/
|
|
57
|
+
label?: TieredMenuPassThroughOptionType;
|
|
58
|
+
/**
|
|
59
|
+
* Uses to pass attributes to the submenu icon's DOM element.
|
|
60
|
+
*/
|
|
61
|
+
submenuIcon?: TieredMenuPassThroughOptionType;
|
|
62
|
+
/**
|
|
63
|
+
* Uses to pass attributes to the separator's DOM element.
|
|
64
|
+
*/
|
|
65
|
+
separator?: TieredMenuPassThroughOptionType;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Custom passthrough attributes for each DOM elements
|
|
70
|
+
*/
|
|
71
|
+
export interface TieredMenuPassThroughAttributes {
|
|
72
|
+
[key: string]: any;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Defines focused item info
|
|
77
|
+
*/
|
|
78
|
+
export interface TieredMenuFocusedItemInfo {
|
|
79
|
+
/**
|
|
80
|
+
* Active item index
|
|
81
|
+
*/
|
|
82
|
+
index: number;
|
|
83
|
+
/**
|
|
84
|
+
* Active item level
|
|
85
|
+
*/
|
|
86
|
+
level: number;
|
|
87
|
+
/**
|
|
88
|
+
* Parent key info
|
|
89
|
+
*/
|
|
90
|
+
parentKey: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Defines current inline state in TieredMenu component.
|
|
95
|
+
*/
|
|
96
|
+
export interface TieredMenuState {
|
|
97
|
+
/**
|
|
98
|
+
* Current id state as a string.
|
|
99
|
+
*/
|
|
100
|
+
id: string;
|
|
101
|
+
/**
|
|
102
|
+
* Current focus state as a boolean.
|
|
103
|
+
* @defaultValue false
|
|
104
|
+
*/
|
|
105
|
+
focused: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Current focused item info.
|
|
108
|
+
* @type {TieredMenuFocusedItemInfo}
|
|
109
|
+
*/
|
|
110
|
+
focusedItemInfo: TieredMenuFocusedItemInfo;
|
|
111
|
+
/**
|
|
112
|
+
* Active item path.
|
|
113
|
+
* @type {TieredMenuFocusedItemInfo}
|
|
114
|
+
*/
|
|
115
|
+
activeItemPath: TieredMenuFocusedItemInfo[];
|
|
116
|
+
/**
|
|
117
|
+
* Current visible state as a boolean.
|
|
118
|
+
* @defaultValue true
|
|
119
|
+
*/
|
|
120
|
+
visible: boolean;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Defines current options in TieredMenu component.
|
|
125
|
+
*/
|
|
126
|
+
export interface TieredMenuContext {
|
|
127
|
+
/**
|
|
128
|
+
* Current active state of menuitem as a boolean.
|
|
129
|
+
* @defaultValue false
|
|
130
|
+
*/
|
|
131
|
+
active: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Current focused state of menuitem as a boolean.
|
|
134
|
+
* @defaultValue false
|
|
135
|
+
*/
|
|
136
|
+
focused: boolean;
|
|
137
|
+
}
|
|
138
|
+
|
|
14
139
|
/**
|
|
15
140
|
* Defines valid properties in TieredMenuMenu component.
|
|
16
141
|
*/
|
|
@@ -61,6 +186,11 @@ export interface TieredMenuProps {
|
|
|
61
186
|
* Identifier of the underlying menu element.
|
|
62
187
|
*/
|
|
63
188
|
'aria-labelledby'?: string | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
191
|
+
* @type {TieredMenuPassThroughOptions}
|
|
192
|
+
*/
|
|
193
|
+
pt?: TieredMenuPassThroughOptions;
|
|
64
194
|
}
|
|
65
195
|
|
|
66
196
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Portal :appendTo="appendTo" :disabled="!popup">
|
|
3
3
|
<transition name="p-connected-overlay" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave">
|
|
4
|
-
<div v-if="visible" :ref="containerRef" :id="id" :class="containerClass" @click="onOverlayClick" v-bind="
|
|
4
|
+
<div v-if="visible" :ref="containerRef" :id="id" :class="containerClass" @click="onOverlayClick" v-bind="{ ...$attrs, ...ptm('root') }">
|
|
5
5
|
<TieredMenuSub
|
|
6
6
|
:ref="menubarRef"
|
|
7
7
|
:id="id + '_list'"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:activeItemPath="activeItemPath"
|
|
21
21
|
:exact="exact"
|
|
22
22
|
:level="0"
|
|
23
|
+
:pt="pt"
|
|
23
24
|
@focus="onFocus"
|
|
24
25
|
@blur="onBlur"
|
|
25
26
|
@keydown="onKeyDown"
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
</template>
|
|
33
34
|
|
|
34
35
|
<script>
|
|
36
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
35
37
|
import OverlayEventBus from 'primevue/overlayeventbus';
|
|
36
38
|
import Portal from 'primevue/portal';
|
|
37
39
|
import { ConnectedOverlayScrollHandler, DomHandler, ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primevue/utils';
|
|
@@ -39,6 +41,7 @@ import TieredMenuSub from './TieredMenuSub.vue';
|
|
|
39
41
|
|
|
40
42
|
export default {
|
|
41
43
|
name: 'TieredMenu',
|
|
44
|
+
extends: BaseComponent,
|
|
42
45
|
inheritAttrs: false,
|
|
43
46
|
emits: ['focus', 'blur', 'before-show', 'before-hide', 'hide', 'show'],
|
|
44
47
|
props: {
|