primevue 3.9.1 → 3.10.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/accordion/Accordion.d.ts +74 -11
- package/accordiontab/AccordionTab.d.ts +37 -8
- package/api/Api.d.ts +292 -285
- package/autocomplete/AutoComplete.d.ts +279 -62
- package/avatar/Avatar.d.ts +57 -8
- package/avatargroup/AvatarGroup.d.ts +29 -3
- package/badge/Badge.d.ts +46 -5
- package/blockui/BlockUI.d.ts +52 -11
- package/breadcrumb/Breadcrumb.d.ts +49 -9
- package/button/Button.d.ts +68 -11
- package/calendar/Calendar.d.ts +322 -62
- package/calendar/Calendar.vue +48 -20
- package/calendar/calendar.cjs.js +120 -93
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +120 -92
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +122 -94
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +43 -9
- package/carousel/Carousel.d.ts +121 -24
- package/cascadeselect/CascadeSelect.d.ts +164 -31
- package/chart/Chart.d.ts +104 -12
- package/chart/Chart.vue +9 -2
- package/chart/chart.cjs.js +9 -2
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +9 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +9 -2
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +65 -7
- package/chip/Chip.d.ts +50 -4
- package/chips/Chips.d.ts +88 -15
- package/colorpicker/ColorPicker.d.ts +105 -16
- package/column/Column.d.ts +448 -78
- package/columngroup/ColumnGroup.d.ts +30 -4
- package/confirmationoptions/ConfirmationOptions.d.ts +50 -0
- package/confirmationoptions/package.json +3 -0
- package/confirmationservice/ConfirmationService.d.ts +2 -1
- package/confirmdialog/ConfirmDialog.d.ts +57 -5
- package/confirmpopup/ConfirmPopup.d.ts +38 -7
- package/contextmenu/ContextMenu.d.ts +88 -16
- package/core/core.js +364 -268
- package/core/core.min.js +2 -2
- package/datatable/BodyCell.vue +26 -1
- package/datatable/DataTable.d.ts +1056 -131
- package/datatable/DataTable.vue +102 -81
- package/datatable/HeaderCheckbox.vue +4 -1
- package/datatable/TableBody.vue +53 -14
- package/datatable/datatable.cjs.js +414 -307
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +414 -308
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +415 -309
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +198 -32
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +34 -5
- package/deferredcontent/DeferredContent.d.ts +31 -6
- package/dialog/Dialog.d.ts +188 -35
- package/divider/Divider.d.ts +53 -8
- package/dock/Dock.d.ts +92 -15
- package/dropdown/Dropdown.d.ts +335 -76
- package/editor/Editor.d.ts +78 -11
- package/fieldset/Fieldset.d.ts +63 -11
- package/fileupload/FileUpload.d.ts +255 -37
- package/fullcalendar/FullCalendar.d.ts +29 -3
- package/galleria/Galleria.d.ts +196 -46
- package/image/Image.d.ts +51 -6
- package/inlinemessage/InlineMessage.d.ts +34 -6
- package/inplace/Inplace.d.ts +57 -12
- package/inputmask/InputMask.d.ts +75 -15
- package/inputnumber/InputNumber.d.ts +180 -30
- package/inputswitch/InputSwitch.d.ts +61 -9
- package/inputtext/InputText.d.ts +34 -5
- package/knob/Knob.d.ts +92 -18
- package/listbox/Listbox.d.ts +240 -55
- package/megamenu/MegaMenu.d.ts +60 -12
- package/menu/Menu.d.ts +84 -15
- package/menubar/Menubar.d.ts +52 -11
- package/menuitem/MenuItem.d.ts +80 -0
- package/menuitem/package.json +3 -0
- package/message/Message.d.ts +57 -11
- package/multiselect/MultiSelect.d.ts +363 -83
- package/orderlist/OrderList.d.ts +122 -19
- package/organizationchart/OrganizationChart.d.ts +137 -15
- package/overlaypanel/OverlayPanel.d.ts +107 -12
- package/package.json +1 -1
- package/paginator/Paginator.d.ts +129 -27
- package/panel/Panel.d.ts +64 -9
- package/panelmenu/PanelMenu.d.ts +59 -11
- package/panelmenu/PanelMenu.vue +2 -2
- package/panelmenu/panelmenu.cjs.js +4 -4
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +4 -4
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +4 -4
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +115 -24
- package/picklist/PickList.d.ts +199 -32
- package/progressbar/ProgressBar.d.ts +43 -8
- package/progressspinner/ProgressSpinner.d.ts +39 -6
- package/radiobutton/RadioButton.d.ts +51 -6
- package/rating/Rating.d.ts +67 -10
- package/resources/themes/arya-blue/theme.css +5 -1
- package/resources/themes/arya-green/theme.css +5 -1
- package/resources/themes/arya-orange/theme.css +5 -1
- package/resources/themes/arya-purple/theme.css +5 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +5 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +5 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +5 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +5 -1
- package/resources/themes/fluent-light/theme.css +5 -1
- package/resources/themes/lara-dark-blue/theme.css +43 -39
- package/resources/themes/lara-dark-indigo/theme.css +43 -39
- package/resources/themes/lara-dark-purple/theme.css +43 -39
- package/resources/themes/lara-dark-teal/theme.css +43 -39
- package/resources/themes/lara-light-blue/theme.css +5 -1
- package/resources/themes/lara-light-indigo/theme.css +5 -1
- package/resources/themes/lara-light-purple/theme.css +5 -1
- package/resources/themes/lara-light-teal/theme.css +5 -1
- package/resources/themes/luna-amber/theme.css +5 -1
- package/resources/themes/luna-blue/theme.css +5 -1
- package/resources/themes/luna-green/theme.css +5 -1
- package/resources/themes/luna-pink/theme.css +5 -1
- package/resources/themes/md-dark-deeppurple/theme.css +5 -1
- package/resources/themes/md-dark-indigo/theme.css +5 -1
- package/resources/themes/md-light-deeppurple/theme.css +5 -1
- package/resources/themes/md-light-indigo/theme.css +5 -1
- package/resources/themes/mdc-dark-deeppurple/theme.css +5 -1
- package/resources/themes/mdc-dark-indigo/theme.css +5 -1
- package/resources/themes/mdc-light-deeppurple/theme.css +5 -1
- package/resources/themes/mdc-light-indigo/theme.css +5 -1
- package/resources/themes/nova/theme.css +5 -1
- package/resources/themes/nova-accent/theme.css +5 -1
- package/resources/themes/nova-alt/theme.css +5 -1
- package/resources/themes/nova-vue/theme.css +5 -1
- package/resources/themes/rhea/theme.css +5 -1
- package/resources/themes/saga-blue/theme.css +5 -1
- package/resources/themes/saga-green/theme.css +5 -1
- package/resources/themes/saga-orange/theme.css +5 -1
- package/resources/themes/saga-purple/theme.css +5 -1
- package/resources/themes/tailwind-light/theme.css +5 -1
- package/resources/themes/vela-blue/theme.css +5 -1
- package/resources/themes/vela-green/theme.css +5 -1
- package/resources/themes/vela-orange/theme.css +5 -1
- package/resources/themes/vela-purple/theme.css +5 -1
- package/row/Row.d.ts +25 -3
- package/scrollpanel/ScrollPanel.d.ts +27 -5
- package/scrolltop/ScrollTop.d.ts +47 -7
- package/selectbutton/SelectButton.d.ts +101 -17
- package/sidebar/Sidebar.d.ts +81 -16
- package/skeleton/Skeleton.d.ts +58 -9
- package/slider/Slider.d.ts +90 -14
- package/speeddial/SpeedDial.d.ts +166 -29
- package/splitbutton/SplitButton.d.ts +71 -11
- package/splitter/Splitter.d.ts +74 -7
- package/splitterpanel/SplitterPanel.d.ts +34 -7
- package/steps/Steps.d.ts +51 -11
- package/tabmenu/TabMenu.d.ts +63 -10
- package/tabpanel/TabPanel.d.ts +34 -7
- package/tabview/TabView.d.ts +73 -11
- package/tag/Tag.d.ts +44 -8
- package/terminal/Terminal.d.ts +36 -5
- package/terminalservice/TerminalService.d.ts +1 -1
- package/textarea/Textarea.d.ts +38 -6
- package/tieredmenu/TieredMenu.d.ts +89 -15
- package/timeline/Timeline.d.ts +94 -15
- package/toast/Toast.d.ts +110 -12
- package/toastservice/ToastService.d.ts +17 -5
- package/togglebutton/ToggleButton.d.ts +64 -11
- package/toolbar/Toolbar.d.ts +31 -6
- package/tree/Tree.d.ts +189 -26
- package/treeselect/TreeSelect.d.ts +201 -44
- package/treetable/TreeTable.d.ts +459 -63
- package/tristatecheckbox/TriStateCheckbox.d.ts +39 -5
- package/ts-helpers.d.ts +28 -0
- package/useconfirm/UseConfirm.d.ts +5 -19
- package/usetoast/UseToast.d.ts +3 -5
- package/utils/Utils.d.ts +3 -0
- package/utils/utils.cjs.js +39 -2
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +39 -2
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +39 -2
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +57 -25
- package/vetur-tags.json +11 -3
- package/virtualscroller/VirtualScroller.d.ts +294 -53
- package/virtualscroller/VirtualScroller.vue +296 -255
- package/virtualscroller/virtualscroller.cjs.js +325 -266
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +325 -266
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +325 -266
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +153 -28
package/panel/Panel.d.ts
CHANGED
|
@@ -1,20 +1,75 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
3
|
|
|
3
|
-
interface
|
|
4
|
+
export interface PanelToggleEvent {
|
|
5
|
+
/**
|
|
6
|
+
* Browser event.
|
|
7
|
+
*/
|
|
8
|
+
originalEvent: Event;
|
|
9
|
+
/**
|
|
10
|
+
* Collapsed state as a boolean
|
|
11
|
+
*/
|
|
12
|
+
value: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PanelProps {
|
|
16
|
+
/**
|
|
17
|
+
* Header text of the panel.
|
|
18
|
+
*/
|
|
4
19
|
header?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Defines if content of panel can be expanded and collapsed.
|
|
22
|
+
*/
|
|
5
23
|
toggleable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the initial state of panel content.
|
|
26
|
+
*/
|
|
6
27
|
collapsed?: boolean;
|
|
7
28
|
}
|
|
8
29
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
export interface PanelSlots {
|
|
31
|
+
/**
|
|
32
|
+
* Custom content template.
|
|
33
|
+
*/
|
|
34
|
+
default: () => VNode[];
|
|
35
|
+
/**
|
|
36
|
+
* Custom header template.
|
|
37
|
+
*/
|
|
38
|
+
header: () => VNode[];
|
|
39
|
+
/**
|
|
40
|
+
* Custom icons template.
|
|
41
|
+
*/
|
|
42
|
+
icons: () => VNode[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export declare type PanelEmits = {
|
|
46
|
+
/**
|
|
47
|
+
* Emitted when the collapsed changes.
|
|
48
|
+
* @param {boolean} value - New value.
|
|
49
|
+
*/
|
|
50
|
+
'update:collapsed': (value: boolean) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Callback to invoke when a tab toggle.
|
|
53
|
+
* @param {PanelToggleEvent} event - Custom toggle event.
|
|
54
|
+
*/
|
|
55
|
+
'toggle': (event: PanelToggleEvent) => void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare class Panel extends ClassComponent<PanelProps, PanelSlots, PanelEmits> { }
|
|
59
|
+
|
|
60
|
+
declare module '@vue/runtime-core' {
|
|
61
|
+
interface GlobalComponents {
|
|
62
|
+
Panel: GlobalComponentConstructor<Panel>
|
|
17
63
|
}
|
|
18
64
|
}
|
|
19
65
|
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* Panel is a container with the optional content toggle feature.
|
|
69
|
+
*
|
|
70
|
+
* Demos:
|
|
71
|
+
*
|
|
72
|
+
* - [Panel](https://www.primefaces.org/primevue/showcase/#/panel)
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
20
75
|
export default Panel;
|
package/panelmenu/PanelMenu.d.ts
CHANGED
|
@@ -1,19 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
3
|
+
import { MenuItem } from '../menuitem';
|
|
4
|
+
|
|
5
|
+
export interface PanelMenuExpandedKeys {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface PanelMenuProps {
|
|
10
|
+
/**
|
|
11
|
+
* An array of menuitems.
|
|
12
|
+
*/
|
|
13
|
+
model?: MenuItem[] | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* A map of keys to represent the expansion state in controlled mode.
|
|
16
|
+
* @see PanelMenuExpandedKeys
|
|
17
|
+
*/
|
|
18
|
+
expandedKeys?: PanelMenuExpandedKeys;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
|
21
|
+
*/
|
|
22
|
+
exact?: boolean | undefined;
|
|
5
23
|
}
|
|
6
24
|
|
|
7
|
-
interface
|
|
8
|
-
|
|
25
|
+
export interface PanelMenuSlots {
|
|
26
|
+
/**
|
|
27
|
+
* Custom content for each item.
|
|
28
|
+
* @param {Object} scope - item slot's params.
|
|
29
|
+
*/
|
|
30
|
+
item: (scope: {
|
|
31
|
+
/**
|
|
32
|
+
* Menuitem instance
|
|
33
|
+
*/
|
|
34
|
+
item: MenuItem;
|
|
35
|
+
}) => VNode[];
|
|
9
36
|
}
|
|
10
37
|
|
|
11
|
-
declare
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
38
|
+
export declare type PanelMenuEmits = {
|
|
39
|
+
/**
|
|
40
|
+
* Emitted when the expandedKeys changes.
|
|
41
|
+
* @param {*} value - New value.
|
|
42
|
+
*/
|
|
43
|
+
'update:expandedKeys': (value: any) => void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class PanelMenu extends ClassComponent<PanelMenuProps, PanelMenuSlots, PanelMenuEmits> { }
|
|
47
|
+
|
|
48
|
+
declare module '@vue/runtime-core' {
|
|
49
|
+
interface GlobalComponents {
|
|
50
|
+
PanelMenu: GlobalComponentConstructor<PanelMenu>
|
|
16
51
|
}
|
|
17
52
|
}
|
|
18
53
|
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* PanelMenu is a hybrid of Accordion and Tree components.
|
|
57
|
+
*
|
|
58
|
+
* Helper API:
|
|
59
|
+
*
|
|
60
|
+
* - [MenuItem](https://www.primefaces.org/primevue/showcase/#/menumodel)
|
|
61
|
+
*
|
|
62
|
+
* Demos:
|
|
63
|
+
*
|
|
64
|
+
* - [PanelMenu](https://www.primefaces.org/primevue/showcase/#/panelmenu)
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
19
67
|
export default PanelMenu;
|
package/panelmenu/PanelMenu.vue
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</a>
|
|
12
12
|
</router-link>
|
|
13
13
|
<a v-else :href="item.url" :class="getHeaderLinkClass(item)" @click="onItemClick($event, item)" :tabindex="disabled(item) ? null : '0'"
|
|
14
|
-
:aria-expanded="isActive(item)" :id="ariaId +'
|
|
14
|
+
:aria-expanded="isActive(item)" :id="ariaId +'_header_' + index" :aria-controls="ariaId +'_content_' + index">
|
|
15
15
|
<span v-if="item.items" :class="getPanelToggleIcon(item)"></span>
|
|
16
16
|
<span v-if="item.icon" :class="getPanelIcon(item)"></span>
|
|
17
17
|
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<transition name="p-toggleable-content">
|
|
23
23
|
<div class="p-toggleable-content" v-show="isActive(item)"
|
|
24
|
-
role="region" :id="ariaId +'
|
|
24
|
+
role="region" :id="ariaId +'_content_' + index" :aria-labelledby="ariaId +'_header_' + index">
|
|
25
25
|
<div class="p-panelmenu-content" v-if="item.items">
|
|
26
26
|
<PanelMenuSub :model="item.items" class="p-panelmenu-root-submenu" :template="$slots.item"
|
|
27
27
|
:expandedKeys="expandedKeys" @item-toggle="updateExpandedKeys" :exact="exact" />
|
|
@@ -362,8 +362,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
362
362
|
onClick: $event => ($options.onItemClick($event, item)),
|
|
363
363
|
tabindex: $options.disabled(item) ? null : '0',
|
|
364
364
|
"aria-expanded": $options.isActive(item),
|
|
365
|
-
id: $options.ariaId +'
|
|
366
|
-
"aria-controls": $options.ariaId +'
|
|
365
|
+
id: $options.ariaId +'_header_' + index,
|
|
366
|
+
"aria-controls": $options.ariaId +'_content_' + index
|
|
367
367
|
}, [
|
|
368
368
|
(item.items)
|
|
369
369
|
? (vue.openBlock(), vue.createBlock("span", {
|
|
@@ -390,8 +390,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
390
390
|
vue.withDirectives(vue.createVNode("div", {
|
|
391
391
|
class: "p-toggleable-content",
|
|
392
392
|
role: "region",
|
|
393
|
-
id: $options.ariaId +'
|
|
394
|
-
"aria-labelledby": $options.ariaId +'
|
|
393
|
+
id: $options.ariaId +'_content_' + index,
|
|
394
|
+
"aria-labelledby": $options.ariaId +'_header_' + index
|
|
395
395
|
}, [
|
|
396
396
|
(item.items)
|
|
397
397
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_4, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("vue"),t=require("primevue/utils"),n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const l={class:"p-submenu-list",role:"tree"},a={class:"p-menuitem-text"},i={class:"p-menuitem-text"},o={class:"p-toggleable-content"};n.render=function(t,n,s,c,r,d){const m=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub",!0);return e.openBlock(),e.createBlock("ul",l,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.model,((l,c)=>(e.openBlock(),e.createBlock(e.Fragment,{key:d.label(l)+c.toString()},[d.visible(l)&&!l.separator?(e.openBlock(),e.createBlock("li",{key:0,role:"none",class:d.getItemClass(l),style:l.style},[s.template?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.template),{key:1,item:l},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[l.to&&!d.disabled(l)?(e.openBlock(),e.createBlock(m,{key:0,to:l.to,custom:""},{default:e.withCtx((({navigate:t,href:n,isActive:i,isExactActive:o})=>[e.createVNode("a",{href:n,class:d.linkClass(l,{isRouterActive:i,isExactActive:o}),onClick:e=>d.onItemClick(e,l,t),role:"treeitem","aria-expanded":d.isActive(l)},[e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",a,e.toDisplayString(d.label(l)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:l.url,class:d.linkClass(l),target:l.target,onClick:e=>d.onItemClick(e,l),role:"treeitem","aria-expanded":d.isActive(l),tabindex:d.disabled(l)?null:"0"},[l.items?(e.openBlock(),e.createBlock("span",{key:0,class:d.getSubmenuIcon(l)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",i,e.toDisplayString(d.label(l)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",o,[d.visible(l)&&l.items?(e.openBlock(),e.createBlock(p,{model:l.items,key:d.label(l)+"_sub_",template:s.template,expandedKeys:s.expandedKeys,onItemToggle:n[1]||(n[1]=e=>t.$emit("item-toggle",e)),exact:s.exact},null,8,["model","template","expandedKeys","exact"])):e.createCommentVNode("",!0)],512),[[e.vShow,d.isActive(l)]])])),_:2},1024)],6)):e.createCommentVNode("",!0),d.visible(l)&&l.separator?(e.openBlock(),e.createBlock("li",{class:["p-menu-separator",l.class],style:l.style,key:"separator"+c.toString()},null,6)):e.createCommentVNode("",!0)],64)))),128))])};var s={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:n},computed:{ariaId:()=>t.UniqueComponentId()}};const c={class:"p-panelmenu p-component"},r={class:"p-menuitem-text"},d={class:"p-menuitem-text"},m={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),s.render=function(t,n,l,a,i,o){const s=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub");return e.openBlock(),e.createBlock("div",c,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(l.model,((n,a)=>(e.openBlock(),e.createBlock(e.Fragment,{key:o.label(n)+"_"+a},[o.visible(n)?(e.openBlock(),e.createBlock("div",{key:0,class:o.getPanelClass(n),style:n.style},[e.createVNode("div",{class:o.getHeaderClass(n),style:n.style},[t.$slots.item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.$slots.item),{key:1,item:n},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[n.to&&!o.disabled(n)?(e.openBlock(),e.createBlock(s,{key:0,to:n.to,custom:""},{default:e.withCtx((({navigate:t,href:l,isActive:a,isExactActive:i})=>[e.createVNode("a",{href:l,class:o.getHeaderLinkClass(n,{isActive:a,isExactActive:i}),onClick:e=>o.onItemClick(e,n,t),role:"treeitem"},[n.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",r,e.toDisplayString(o.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:n.url,class:o.getHeaderLinkClass(n),onClick:e=>o.onItemClick(e,n),tabindex:o.disabled(n)?null:"0","aria-expanded":o.isActive(n),id:o.ariaId+"
|
|
1
|
+
"use strict";var e=require("vue"),t=require("primevue/utils"),n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const l={class:"p-submenu-list",role:"tree"},a={class:"p-menuitem-text"},i={class:"p-menuitem-text"},o={class:"p-toggleable-content"};n.render=function(t,n,s,c,r,d){const m=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub",!0);return e.openBlock(),e.createBlock("ul",l,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.model,((l,c)=>(e.openBlock(),e.createBlock(e.Fragment,{key:d.label(l)+c.toString()},[d.visible(l)&&!l.separator?(e.openBlock(),e.createBlock("li",{key:0,role:"none",class:d.getItemClass(l),style:l.style},[s.template?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.template),{key:1,item:l},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[l.to&&!d.disabled(l)?(e.openBlock(),e.createBlock(m,{key:0,to:l.to,custom:""},{default:e.withCtx((({navigate:t,href:n,isActive:i,isExactActive:o})=>[e.createVNode("a",{href:n,class:d.linkClass(l,{isRouterActive:i,isExactActive:o}),onClick:e=>d.onItemClick(e,l,t),role:"treeitem","aria-expanded":d.isActive(l)},[e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",a,e.toDisplayString(d.label(l)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:l.url,class:d.linkClass(l),target:l.target,onClick:e=>d.onItemClick(e,l),role:"treeitem","aria-expanded":d.isActive(l),tabindex:d.disabled(l)?null:"0"},[l.items?(e.openBlock(),e.createBlock("span",{key:0,class:d.getSubmenuIcon(l)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",i,e.toDisplayString(d.label(l)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",o,[d.visible(l)&&l.items?(e.openBlock(),e.createBlock(p,{model:l.items,key:d.label(l)+"_sub_",template:s.template,expandedKeys:s.expandedKeys,onItemToggle:n[1]||(n[1]=e=>t.$emit("item-toggle",e)),exact:s.exact},null,8,["model","template","expandedKeys","exact"])):e.createCommentVNode("",!0)],512),[[e.vShow,d.isActive(l)]])])),_:2},1024)],6)):e.createCommentVNode("",!0),d.visible(l)&&l.separator?(e.openBlock(),e.createBlock("li",{class:["p-menu-separator",l.class],style:l.style,key:"separator"+c.toString()},null,6)):e.createCommentVNode("",!0)],64)))),128))])};var s={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:n},computed:{ariaId:()=>t.UniqueComponentId()}};const c={class:"p-panelmenu p-component"},r={class:"p-menuitem-text"},d={class:"p-menuitem-text"},m={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),s.render=function(t,n,l,a,i,o){const s=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub");return e.openBlock(),e.createBlock("div",c,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(l.model,((n,a)=>(e.openBlock(),e.createBlock(e.Fragment,{key:o.label(n)+"_"+a},[o.visible(n)?(e.openBlock(),e.createBlock("div",{key:0,class:o.getPanelClass(n),style:n.style},[e.createVNode("div",{class:o.getHeaderClass(n),style:n.style},[t.$slots.item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.$slots.item),{key:1,item:n},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[n.to&&!o.disabled(n)?(e.openBlock(),e.createBlock(s,{key:0,to:n.to,custom:""},{default:e.withCtx((({navigate:t,href:l,isActive:a,isExactActive:i})=>[e.createVNode("a",{href:l,class:o.getHeaderLinkClass(n,{isActive:a,isExactActive:i}),onClick:e=>o.onItemClick(e,n,t),role:"treeitem"},[n.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",r,e.toDisplayString(o.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:n.url,class:o.getHeaderLinkClass(n),onClick:e=>o.onItemClick(e,n),tabindex:o.disabled(n)?null:"0","aria-expanded":o.isActive(n),id:o.ariaId+"_header_"+a,"aria-controls":o.ariaId+"_content_"+a},[n.items?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelToggleIcon(n)},null,2)):e.createCommentVNode("",!0),n.icon?(e.openBlock(),e.createBlock("span",{key:1,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",d,e.toDisplayString(o.label(n)),1)],10,["href","onClick","tabindex","aria-expanded","id","aria-controls"]))],64))],6),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",{class:"p-toggleable-content",role:"region",id:o.ariaId+"_content_"+a,"aria-labelledby":o.ariaId+"_header_"+a},[n.items?(e.openBlock(),e.createBlock("div",m,[e.createVNode(p,{model:n.items,class:"p-panelmenu-root-submenu",template:t.$slots.item,expandedKeys:l.expandedKeys,onItemToggle:o.updateExpandedKeys,exact:l.exact},null,8,["model","template","expandedKeys","onItemToggle","exact"])])):e.createCommentVNode("",!0)],8,["id","aria-labelledby"]),[[e.vShow,o.isActive(n)]])])),_:2},1024)],6)):e.createCommentVNode("",!0)],64)))),128))])},module.exports=s;
|
|
@@ -360,8 +360,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
360
360
|
onClick: $event => ($options.onItemClick($event, item)),
|
|
361
361
|
tabindex: $options.disabled(item) ? null : '0',
|
|
362
362
|
"aria-expanded": $options.isActive(item),
|
|
363
|
-
id: $options.ariaId +'
|
|
364
|
-
"aria-controls": $options.ariaId +'
|
|
363
|
+
id: $options.ariaId +'_header_' + index,
|
|
364
|
+
"aria-controls": $options.ariaId +'_content_' + index
|
|
365
365
|
}, [
|
|
366
366
|
(item.items)
|
|
367
367
|
? (openBlock(), createBlock("span", {
|
|
@@ -388,8 +388,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
388
388
|
withDirectives(createVNode("div", {
|
|
389
389
|
class: "p-toggleable-content",
|
|
390
390
|
role: "region",
|
|
391
|
-
id: $options.ariaId +'
|
|
392
|
-
"aria-labelledby": $options.ariaId +'
|
|
391
|
+
id: $options.ariaId +'_content_' + index,
|
|
392
|
+
"aria-labelledby": $options.ariaId +'_header_' + index
|
|
393
393
|
}, [
|
|
394
394
|
(item.items)
|
|
395
395
|
? (openBlock(), createBlock("div", _hoisted_4, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveComponent as e,openBlock as t,createBlock as n,Fragment as l,renderList as i,withCtx as a,createVNode as s,toDisplayString as o,createCommentVNode as d,resolveDynamicComponent as c,Transition as m,withDirectives as p,vShow as r}from"vue";import{UniqueComponentId as u}from"primevue/utils";var v={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const b={class:"p-submenu-list",role:"tree"},y={class:"p-menuitem-text"},x={class:"p-menuitem-text"},h={class:"p-toggleable-content"};v.render=function(u,v,g,k,f,I){const C=e("router-link"),A=e("PanelMenuSub",!0);return t(),n("ul",b,[(t(!0),n(l,null,i(g.model,((e,i)=>(t(),n(l,{key:I.label(e)+i.toString()},[I.visible(e)&&!e.separator?(t(),n("li",{key:0,role:"none",class:I.getItemClass(e),style:e.style},[g.template?(t(),n(c(g.template),{key:1,item:e},null,8,["item"])):(t(),n(l,{key:0},[e.to&&!I.disabled(e)?(t(),n(C,{key:0,to:e.to,custom:""},{default:a((({navigate:t,href:n,isActive:l,isExactActive:i})=>[s("a",{href:n,class:I.linkClass(e,{isRouterActive:l,isExactActive:i}),onClick:n=>I.onItemClick(n,e,t),role:"treeitem","aria-expanded":I.isActive(e)},[s("span",{class:["p-menuitem-icon",e.icon]},null,2),s("span",y,o(I.label(e)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(t(),n("a",{key:1,href:e.url,class:I.linkClass(e),target:e.target,onClick:t=>I.onItemClick(t,e),role:"treeitem","aria-expanded":I.isActive(e),tabindex:I.disabled(e)?null:"0"},[e.items?(t(),n("span",{key:0,class:I.getSubmenuIcon(e)},null,2)):d("",!0),s("span",{class:["p-menuitem-icon",e.icon]},null,2),s("span",x,o(I.label(e)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),s(m,{name:"p-toggleable-content"},{default:a((()=>[p(s("div",h,[I.visible(e)&&e.items?(t(),n(A,{model:e.items,key:I.label(e)+"_sub_",template:g.template,expandedKeys:g.expandedKeys,onItemToggle:v[1]||(v[1]=e=>u.$emit("item-toggle",e)),exact:g.exact},null,8,["model","template","expandedKeys","exact"])):d("",!0)],512),[[r,I.isActive(e)]])])),_:2},1024)],6)):d("",!0),I.visible(e)&&e.separator?(t(),n("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+i.toString()},null,6)):d("",!0)],64)))),128))])};var g={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:v},computed:{ariaId:()=>u()}};const k={class:"p-panelmenu p-component"},f={class:"p-menuitem-text"},I={class:"p-menuitem-text"},C={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),g.render=function(u,v,b,y,x,h){const g=e("router-link"),A=e("PanelMenuSub");return t(),n("div",k,[(t(!0),n(l,null,i(b.model,((e,i)=>(t(),n(l,{key:h.label(e)+"_"+i},[h.visible(e)?(t(),n("div",{key:0,class:h.getPanelClass(e),style:e.style},[s("div",{class:h.getHeaderClass(e),style:e.style},[u.$slots.item?(t(),n(c(u.$slots.item),{key:1,item:e},null,8,["item"])):(t(),n(l,{key:0},[e.to&&!h.disabled(e)?(t(),n(g,{key:0,to:e.to,custom:""},{default:a((({navigate:l,href:i,isActive:a,isExactActive:c})=>[s("a",{href:i,class:h.getHeaderLinkClass(e,{isActive:a,isExactActive:c}),onClick:t=>h.onItemClick(t,e,l),role:"treeitem"},[e.icon?(t(),n("span",{key:0,class:h.getPanelIcon(e)},null,2)):d("",!0),s("span",f,o(h.label(e)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(t(),n("a",{key:1,href:e.url,class:h.getHeaderLinkClass(e),onClick:t=>h.onItemClick(t,e),tabindex:h.disabled(e)?null:"0","aria-expanded":h.isActive(e),id:h.ariaId+"
|
|
1
|
+
import{resolveComponent as e,openBlock as t,createBlock as n,Fragment as l,renderList as i,withCtx as a,createVNode as s,toDisplayString as o,createCommentVNode as d,resolveDynamicComponent as c,Transition as m,withDirectives as p,vShow as r}from"vue";import{UniqueComponentId as u}from"primevue/utils";var v={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const b={class:"p-submenu-list",role:"tree"},y={class:"p-menuitem-text"},x={class:"p-menuitem-text"},h={class:"p-toggleable-content"};v.render=function(u,v,g,k,f,I){const C=e("router-link"),A=e("PanelMenuSub",!0);return t(),n("ul",b,[(t(!0),n(l,null,i(g.model,((e,i)=>(t(),n(l,{key:I.label(e)+i.toString()},[I.visible(e)&&!e.separator?(t(),n("li",{key:0,role:"none",class:I.getItemClass(e),style:e.style},[g.template?(t(),n(c(g.template),{key:1,item:e},null,8,["item"])):(t(),n(l,{key:0},[e.to&&!I.disabled(e)?(t(),n(C,{key:0,to:e.to,custom:""},{default:a((({navigate:t,href:n,isActive:l,isExactActive:i})=>[s("a",{href:n,class:I.linkClass(e,{isRouterActive:l,isExactActive:i}),onClick:n=>I.onItemClick(n,e,t),role:"treeitem","aria-expanded":I.isActive(e)},[s("span",{class:["p-menuitem-icon",e.icon]},null,2),s("span",y,o(I.label(e)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(t(),n("a",{key:1,href:e.url,class:I.linkClass(e),target:e.target,onClick:t=>I.onItemClick(t,e),role:"treeitem","aria-expanded":I.isActive(e),tabindex:I.disabled(e)?null:"0"},[e.items?(t(),n("span",{key:0,class:I.getSubmenuIcon(e)},null,2)):d("",!0),s("span",{class:["p-menuitem-icon",e.icon]},null,2),s("span",x,o(I.label(e)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),s(m,{name:"p-toggleable-content"},{default:a((()=>[p(s("div",h,[I.visible(e)&&e.items?(t(),n(A,{model:e.items,key:I.label(e)+"_sub_",template:g.template,expandedKeys:g.expandedKeys,onItemToggle:v[1]||(v[1]=e=>u.$emit("item-toggle",e)),exact:g.exact},null,8,["model","template","expandedKeys","exact"])):d("",!0)],512),[[r,I.isActive(e)]])])),_:2},1024)],6)):d("",!0),I.visible(e)&&e.separator?(t(),n("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+i.toString()},null,6)):d("",!0)],64)))),128))])};var g={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:v},computed:{ariaId:()=>u()}};const k={class:"p-panelmenu p-component"},f={class:"p-menuitem-text"},I={class:"p-menuitem-text"},C={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),g.render=function(u,v,b,y,x,h){const g=e("router-link"),A=e("PanelMenuSub");return t(),n("div",k,[(t(!0),n(l,null,i(b.model,((e,i)=>(t(),n(l,{key:h.label(e)+"_"+i},[h.visible(e)?(t(),n("div",{key:0,class:h.getPanelClass(e),style:e.style},[s("div",{class:h.getHeaderClass(e),style:e.style},[u.$slots.item?(t(),n(c(u.$slots.item),{key:1,item:e},null,8,["item"])):(t(),n(l,{key:0},[e.to&&!h.disabled(e)?(t(),n(g,{key:0,to:e.to,custom:""},{default:a((({navigate:l,href:i,isActive:a,isExactActive:c})=>[s("a",{href:i,class:h.getHeaderLinkClass(e,{isActive:a,isExactActive:c}),onClick:t=>h.onItemClick(t,e,l),role:"treeitem"},[e.icon?(t(),n("span",{key:0,class:h.getPanelIcon(e)},null,2)):d("",!0),s("span",f,o(h.label(e)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(t(),n("a",{key:1,href:e.url,class:h.getHeaderLinkClass(e),onClick:t=>h.onItemClick(t,e),tabindex:h.disabled(e)?null:"0","aria-expanded":h.isActive(e),id:h.ariaId+"_header_"+i,"aria-controls":h.ariaId+"_content_"+i},[e.items?(t(),n("span",{key:0,class:h.getPanelToggleIcon(e)},null,2)):d("",!0),e.icon?(t(),n("span",{key:1,class:h.getPanelIcon(e)},null,2)):d("",!0),s("span",I,o(h.label(e)),1)],10,["href","onClick","tabindex","aria-expanded","id","aria-controls"]))],64))],6),s(m,{name:"p-toggleable-content"},{default:a((()=>[p(s("div",{class:"p-toggleable-content",role:"region",id:h.ariaId+"_content_"+i,"aria-labelledby":h.ariaId+"_header_"+i},[e.items?(t(),n("div",C,[s(A,{model:e.items,class:"p-panelmenu-root-submenu",template:u.$slots.item,expandedKeys:b.expandedKeys,onItemToggle:h.updateExpandedKeys,exact:b.exact},null,8,["model","template","expandedKeys","onItemToggle","exact"])])):d("",!0)],8,["id","aria-labelledby"]),[[r,h.isActive(e)]])])),_:2},1024)],6)):d("",!0)],64)))),128))])};export default g;
|
package/panelmenu/panelmenu.js
CHANGED
|
@@ -361,8 +361,8 @@ this.primevue.panelmenu = (function (vue, utils) {
|
|
|
361
361
|
onClick: $event => ($options.onItemClick($event, item)),
|
|
362
362
|
tabindex: $options.disabled(item) ? null : '0',
|
|
363
363
|
"aria-expanded": $options.isActive(item),
|
|
364
|
-
id: $options.ariaId +'
|
|
365
|
-
"aria-controls": $options.ariaId +'
|
|
364
|
+
id: $options.ariaId +'_header_' + index,
|
|
365
|
+
"aria-controls": $options.ariaId +'_content_' + index
|
|
366
366
|
}, [
|
|
367
367
|
(item.items)
|
|
368
368
|
? (vue.openBlock(), vue.createBlock("span", {
|
|
@@ -389,8 +389,8 @@ this.primevue.panelmenu = (function (vue, utils) {
|
|
|
389
389
|
vue.withDirectives(vue.createVNode("div", {
|
|
390
390
|
class: "p-toggleable-content",
|
|
391
391
|
role: "region",
|
|
392
|
-
id: $options.ariaId +'
|
|
393
|
-
"aria-labelledby": $options.ariaId +'
|
|
392
|
+
id: $options.ariaId +'_content_' + index,
|
|
393
|
+
"aria-labelledby": $options.ariaId +'_header_' + index
|
|
394
394
|
}, [
|
|
395
395
|
(item.items)
|
|
396
396
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_4, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.panelmenu=function(e,t){"use strict";var n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const l={class:"p-submenu-list",role:"tree"},a={class:"p-menuitem-text"},i={class:"p-menuitem-text"},o={class:"p-toggleable-content"};n.render=function(t,n,s,c,r,d){const m=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub",!0);return e.openBlock(),e.createBlock("ul",l,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.model,((l,c)=>(e.openBlock(),e.createBlock(e.Fragment,{key:d.label(l)+c.toString()},[d.visible(l)&&!l.separator?(e.openBlock(),e.createBlock("li",{key:0,role:"none",class:d.getItemClass(l),style:l.style},[s.template?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.template),{key:1,item:l},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[l.to&&!d.disabled(l)?(e.openBlock(),e.createBlock(m,{key:0,to:l.to,custom:""},{default:e.withCtx((({navigate:t,href:n,isActive:i,isExactActive:o})=>[e.createVNode("a",{href:n,class:d.linkClass(l,{isRouterActive:i,isExactActive:o}),onClick:e=>d.onItemClick(e,l,t),role:"treeitem","aria-expanded":d.isActive(l)},[e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",a,e.toDisplayString(d.label(l)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:l.url,class:d.linkClass(l),target:l.target,onClick:e=>d.onItemClick(e,l),role:"treeitem","aria-expanded":d.isActive(l),tabindex:d.disabled(l)?null:"0"},[l.items?(e.openBlock(),e.createBlock("span",{key:0,class:d.getSubmenuIcon(l)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",i,e.toDisplayString(d.label(l)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",o,[d.visible(l)&&l.items?(e.openBlock(),e.createBlock(p,{model:l.items,key:d.label(l)+"_sub_",template:s.template,expandedKeys:s.expandedKeys,onItemToggle:n[1]||(n[1]=e=>t.$emit("item-toggle",e)),exact:s.exact},null,8,["model","template","expandedKeys","exact"])):e.createCommentVNode("",!0)],512),[[e.vShow,d.isActive(l)]])])),_:2},1024)],6)):e.createCommentVNode("",!0),d.visible(l)&&l.separator?(e.openBlock(),e.createBlock("li",{class:["p-menu-separator",l.class],style:l.style,key:"separator"+c.toString()},null,6)):e.createCommentVNode("",!0)],64)))),128))])};var s={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:n},computed:{ariaId:()=>t.UniqueComponentId()}};const c={class:"p-panelmenu p-component"},r={class:"p-menuitem-text"},d={class:"p-menuitem-text"},m={key:0,class:"p-panelmenu-content"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),s.render=function(t,n,l,a,i,o){const s=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub");return e.openBlock(),e.createBlock("div",c,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(l.model,((n,a)=>(e.openBlock(),e.createBlock(e.Fragment,{key:o.label(n)+"_"+a},[o.visible(n)?(e.openBlock(),e.createBlock("div",{key:0,class:o.getPanelClass(n),style:n.style},[e.createVNode("div",{class:o.getHeaderClass(n),style:n.style},[t.$slots.item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.$slots.item),{key:1,item:n},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[n.to&&!o.disabled(n)?(e.openBlock(),e.createBlock(s,{key:0,to:n.to,custom:""},{default:e.withCtx((({navigate:t,href:l,isActive:a,isExactActive:i})=>[e.createVNode("a",{href:l,class:o.getHeaderLinkClass(n,{isActive:a,isExactActive:i}),onClick:e=>o.onItemClick(e,n,t),role:"treeitem"},[n.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",r,e.toDisplayString(o.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:n.url,class:o.getHeaderLinkClass(n),onClick:e=>o.onItemClick(e,n),tabindex:o.disabled(n)?null:"0","aria-expanded":o.isActive(n),id:o.ariaId+"
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.panelmenu=function(e,t){"use strict";var n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const l={class:"p-submenu-list",role:"tree"},a={class:"p-menuitem-text"},i={class:"p-menuitem-text"},o={class:"p-toggleable-content"};n.render=function(t,n,s,c,r,d){const m=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub",!0);return e.openBlock(),e.createBlock("ul",l,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.model,((l,c)=>(e.openBlock(),e.createBlock(e.Fragment,{key:d.label(l)+c.toString()},[d.visible(l)&&!l.separator?(e.openBlock(),e.createBlock("li",{key:0,role:"none",class:d.getItemClass(l),style:l.style},[s.template?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.template),{key:1,item:l},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[l.to&&!d.disabled(l)?(e.openBlock(),e.createBlock(m,{key:0,to:l.to,custom:""},{default:e.withCtx((({navigate:t,href:n,isActive:i,isExactActive:o})=>[e.createVNode("a",{href:n,class:d.linkClass(l,{isRouterActive:i,isExactActive:o}),onClick:e=>d.onItemClick(e,l,t),role:"treeitem","aria-expanded":d.isActive(l)},[e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",a,e.toDisplayString(d.label(l)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:l.url,class:d.linkClass(l),target:l.target,onClick:e=>d.onItemClick(e,l),role:"treeitem","aria-expanded":d.isActive(l),tabindex:d.disabled(l)?null:"0"},[l.items?(e.openBlock(),e.createBlock("span",{key:0,class:d.getSubmenuIcon(l)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",i,e.toDisplayString(d.label(l)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",o,[d.visible(l)&&l.items?(e.openBlock(),e.createBlock(p,{model:l.items,key:d.label(l)+"_sub_",template:s.template,expandedKeys:s.expandedKeys,onItemToggle:n[1]||(n[1]=e=>t.$emit("item-toggle",e)),exact:s.exact},null,8,["model","template","expandedKeys","exact"])):e.createCommentVNode("",!0)],512),[[e.vShow,d.isActive(l)]])])),_:2},1024)],6)):e.createCommentVNode("",!0),d.visible(l)&&l.separator?(e.openBlock(),e.createBlock("li",{class:["p-menu-separator",l.class],style:l.style,key:"separator"+c.toString()},null,6)):e.createCommentVNode("",!0)],64)))),128))])};var s={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:n},computed:{ariaId:()=>t.UniqueComponentId()}};const c={class:"p-panelmenu p-component"},r={class:"p-menuitem-text"},d={class:"p-menuitem-text"},m={key:0,class:"p-panelmenu-content"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),s.render=function(t,n,l,a,i,o){const s=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub");return e.openBlock(),e.createBlock("div",c,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(l.model,((n,a)=>(e.openBlock(),e.createBlock(e.Fragment,{key:o.label(n)+"_"+a},[o.visible(n)?(e.openBlock(),e.createBlock("div",{key:0,class:o.getPanelClass(n),style:n.style},[e.createVNode("div",{class:o.getHeaderClass(n),style:n.style},[t.$slots.item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.$slots.item),{key:1,item:n},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[n.to&&!o.disabled(n)?(e.openBlock(),e.createBlock(s,{key:0,to:n.to,custom:""},{default:e.withCtx((({navigate:t,href:l,isActive:a,isExactActive:i})=>[e.createVNode("a",{href:l,class:o.getHeaderLinkClass(n,{isActive:a,isExactActive:i}),onClick:e=>o.onItemClick(e,n,t),role:"treeitem"},[n.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",r,e.toDisplayString(o.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:n.url,class:o.getHeaderLinkClass(n),onClick:e=>o.onItemClick(e,n),tabindex:o.disabled(n)?null:"0","aria-expanded":o.isActive(n),id:o.ariaId+"_header_"+a,"aria-controls":o.ariaId+"_content_"+a},[n.items?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelToggleIcon(n)},null,2)):e.createCommentVNode("",!0),n.icon?(e.openBlock(),e.createBlock("span",{key:1,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",d,e.toDisplayString(o.label(n)),1)],10,["href","onClick","tabindex","aria-expanded","id","aria-controls"]))],64))],6),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",{class:"p-toggleable-content",role:"region",id:o.ariaId+"_content_"+a,"aria-labelledby":o.ariaId+"_header_"+a},[n.items?(e.openBlock(),e.createBlock("div",m,[e.createVNode(p,{model:n.items,class:"p-panelmenu-root-submenu",template:t.$slots.item,expandedKeys:l.expandedKeys,onItemToggle:o.updateExpandedKeys,exact:l.exact},null,8,["model","template","expandedKeys","onItemToggle","exact"])])):e.createCommentVNode("",!0)],8,["id","aria-labelledby"]),[[e.vShow,o.isActive(n)]])])),_:2},1024)],6)):e.createCommentVNode("",!0)],64)))),128))])},s}(Vue,primevue.utils);
|
package/password/Password.d.ts
CHANGED
|
@@ -1,33 +1,124 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
1
|
+
import { VNode, InputHTMLAttributes } from 'vue';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
type PasswordAppendToType = 'body' | 'self' | string | undefined;
|
|
5
|
+
|
|
6
|
+
export interface PasswordProps extends InputHTMLAttributes {
|
|
7
|
+
/**
|
|
8
|
+
* Value of the component.
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Text to prompt password entry. Defaults to PrimeVue Locale configuration.
|
|
13
|
+
*/
|
|
14
|
+
promptLabel?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Regex for a medium level password.
|
|
17
|
+
* Default value is '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})'.
|
|
18
|
+
*/
|
|
19
|
+
mediumRegex?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Regex for a strong level password.
|
|
22
|
+
* Default value is '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})'.
|
|
23
|
+
*/
|
|
24
|
+
strongRegex?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Text for a weak password. Defaults to PrimeVue Locale configuration.
|
|
27
|
+
*/
|
|
28
|
+
weakLabel?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Text for a medium password. Defaults to PrimeVue Locale configuration.
|
|
31
|
+
*/
|
|
32
|
+
mediumLabel?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Text for a strong password. Defaults to PrimeVue Locale configuration.
|
|
35
|
+
*/
|
|
36
|
+
strongLabel?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to show the strength indicator or not.
|
|
39
|
+
* Default value is true.
|
|
40
|
+
*/
|
|
41
|
+
feedback?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself.
|
|
44
|
+
* @see PasswordAppendToType
|
|
45
|
+
* Default value is 'body'.
|
|
46
|
+
*/
|
|
47
|
+
appendTo?: PasswordAppendToType;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to show an icon to display the password as plain text.
|
|
50
|
+
*/
|
|
51
|
+
toggleMask?: boolean | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Icon to hide displaying the password as plain text.
|
|
54
|
+
* Default value is 'pi pi-eye-slash'.
|
|
55
|
+
*/
|
|
56
|
+
hideIcon?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Icon to show displaying the password as plain text.
|
|
59
|
+
* Default value is 'pi pi-eye'.
|
|
60
|
+
*/
|
|
61
|
+
showIcon?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Inline style of the input field.
|
|
64
|
+
*/
|
|
16
65
|
inputStyle?: any;
|
|
17
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Style class of the input field.
|
|
68
|
+
*/
|
|
69
|
+
inputClass?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Inline style of the component.
|
|
72
|
+
*/
|
|
18
73
|
style?: any;
|
|
19
|
-
|
|
20
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Style class of the component input field.
|
|
76
|
+
*/
|
|
77
|
+
class?: string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Style class of the overlay panel.
|
|
80
|
+
*/
|
|
81
|
+
panelClass?: string | undefined;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface PasswordSlots {
|
|
85
|
+
/**
|
|
86
|
+
* Custom header template.
|
|
87
|
+
*/
|
|
88
|
+
header: () => VNode[];
|
|
89
|
+
/**
|
|
90
|
+
* Custom footer template.
|
|
91
|
+
*/
|
|
92
|
+
footer: () => VNode[];
|
|
93
|
+
/**
|
|
94
|
+
* Custom content template.
|
|
95
|
+
*/
|
|
96
|
+
content: () => VNode[];
|
|
21
97
|
}
|
|
22
98
|
|
|
23
|
-
declare
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
99
|
+
export declare type PasswordEmits = {
|
|
100
|
+
/**
|
|
101
|
+
* Emitted when the value changes.
|
|
102
|
+
* @param {string} value - New value.
|
|
103
|
+
*/
|
|
104
|
+
'update:modelValue': (value: string) => void;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare class Password extends ClassComponent<PasswordProps, PasswordSlots, PasswordEmits> { }
|
|
108
|
+
|
|
109
|
+
declare module '@vue/runtime-core' {
|
|
110
|
+
interface GlobalComponents {
|
|
111
|
+
Password: GlobalComponentConstructor<Password>
|
|
30
112
|
}
|
|
31
113
|
}
|
|
32
114
|
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* Password displays strength indicator for password fields.
|
|
118
|
+
*
|
|
119
|
+
* Demos:
|
|
120
|
+
*
|
|
121
|
+
* - [Password](https://www.primefaces.org/primevue/showcase/#/password)
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
33
124
|
export default Password;
|