@exhaustive-ui/core 22.0.0-alpha.9 → 22.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/exhaustive-ui-core-accordion.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +3 -3
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +25 -14
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatargroup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-avatargroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +12 -3
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-basecomponent.mjs +34 -4
- package/fesm2022/exhaustive-ui-core-basecomponent.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-baseeditableholder.mjs +4 -2
- package/fesm2022/exhaustive-ui-core-baseeditableholder.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +9 -2
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +13 -6
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +35 -13
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-card.mjs +2 -6
- package/fesm2022/exhaustive-ui-core-card.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +9 -4
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +12 -11
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-config.mjs +3 -1
- package/fesm2022/exhaustive-ui-core-config.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +65 -26
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +28 -5
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +15 -8
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +188 -95
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +31 -13
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-divider.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-divider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dom.mjs +3 -1
- package/fesm2022/exhaustive-ui-core-dom.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +24 -6
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +9 -5
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +4 -4
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +25 -14
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +0 -2
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +18 -3
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +12 -4
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +3 -3
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +11 -2
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +31 -7
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +85 -25
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +9 -3
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +8 -9
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +27 -17
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +17 -6
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +4 -3
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +15 -4
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +64 -15
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-message.mjs +2 -4
- package/fesm2022/exhaustive-ui-core-message.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +7 -7
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +38 -27
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +19 -6
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlay.mjs +6 -4
- package/fesm2022/exhaustive-ui-core-overlay.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +4 -4
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +12 -5
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +9 -11
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +43 -15
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +93 -25
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +33 -12
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +27 -8
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-progressbar.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-progressbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-progressspinner.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-progressspinner.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-radiobutton.mjs +8 -3
- package/fesm2022/exhaustive-ui-core-radiobutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +14 -4
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +11 -3
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +102 -29
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +13 -7
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-skeleton.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +18 -5
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +9 -5
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +29 -8
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-stepper.mjs +8 -4
- package/fesm2022/exhaustive-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +535 -203
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tabs.mjs +44 -8
- package/fesm2022/exhaustive-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tag.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-tag.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +9 -4
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +31 -16
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toast.mjs +17 -5
- package/fesm2022/exhaustive-ui-core-toast.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +11 -4
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +2 -4
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +5 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +30 -11
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +53 -6
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +93 -21
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-usestyle.mjs +49 -0
- package/fesm2022/exhaustive-ui-core-usestyle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-utils.mjs +2 -1
- package/fesm2022/exhaustive-ui-core-utils.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/migrate-from-primeflex/index.js +4 -2
- package/schematics/migrate-from-primeflex/schema.json +5 -0
- package/schematics/utils/package-json.js +17 -0
- package/schematics/utils/primeflex.js +45 -10
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-api.d.ts +6 -0
- package/types/exhaustive-ui-core-autocomplete.d.ts +2 -0
- package/types/exhaustive-ui-core-badge.d.ts +1 -0
- package/types/exhaustive-ui-core-basecomponent.d.ts +16 -0
- package/types/exhaustive-ui-core-breadcrumb.d.ts +7 -1
- package/types/exhaustive-ui-core-button.d.ts +12 -1
- package/types/exhaustive-ui-core-cascadeselect.d.ts +2 -1
- package/types/exhaustive-ui-core-chart.d.ts +2 -2
- package/types/exhaustive-ui-core-confirmdialog.d.ts +17 -5
- package/types/exhaustive-ui-core-confirmpopup.d.ts +4 -0
- package/types/exhaustive-ui-core-datepicker.d.ts +10 -2
- package/types/exhaustive-ui-core-dialog.d.ts +2 -0
- package/types/exhaustive-ui-core-drawer.d.ts +1 -0
- package/types/exhaustive-ui-core-fileupload.d.ts +4 -0
- package/types/exhaustive-ui-core-iconfield.d.ts +1 -2
- package/types/exhaustive-ui-core-image.d.ts +6 -1
- package/types/exhaustive-ui-core-inputnumber.d.ts +8 -0
- package/types/exhaustive-ui-core-keyfilter.d.ts +1 -0
- package/types/exhaustive-ui-core-megamenu.d.ts +1 -0
- package/types/exhaustive-ui-core-menu.d.ts +2 -0
- package/types/exhaustive-ui-core-menubar.d.ts +6 -0
- package/types/exhaustive-ui-core-metergroup.d.ts +1 -1
- package/types/exhaustive-ui-core-multiselect.d.ts +1 -1
- package/types/exhaustive-ui-core-orderlist.d.ts +11 -1
- package/types/exhaustive-ui-core-paginator.d.ts +1 -0
- package/types/exhaustive-ui-core-panelmenu.d.ts +7 -0
- package/types/exhaustive-ui-core-password.d.ts +9 -1
- package/types/exhaustive-ui-core-picklist.d.ts +8 -3
- package/types/exhaustive-ui-core-popover.d.ts +3 -0
- package/types/exhaustive-ui-core-select.d.ts +13 -1
- package/types/exhaustive-ui-core-selectbutton.d.ts +3 -0
- package/types/exhaustive-ui-core-splitbutton.d.ts +2 -1
- package/types/exhaustive-ui-core-splitter.d.ts +7 -1
- package/types/exhaustive-ui-core-stepper.d.ts +3 -2
- package/types/exhaustive-ui-core-table.d.ts +34 -4
- package/types/exhaustive-ui-core-tabs.d.ts +4 -0
- package/types/exhaustive-ui-core-tieredmenu.d.ts +2 -0
- package/types/exhaustive-ui-core-togglebutton.d.ts +1 -0
- package/types/exhaustive-ui-core-tree.d.ts +2 -0
- package/types/exhaustive-ui-core-treeselect.d.ts +12 -1
- package/types/exhaustive-ui-core-treetable.d.ts +22 -2
- package/types/exhaustive-ui-core-types-chart.d.ts +21 -1
- package/types/exhaustive-ui-core-types-confirmdialog.d.ts +1 -3
- package/types/exhaustive-ui-core-types-table.d.ts +1 -1
- package/types/exhaustive-ui-core-types-treetable.d.ts +2 -2
- package/types/exhaustive-ui-core-usestyle.d.ts +17 -0
|
@@ -2,7 +2,7 @@ export * from '@exhaustive-ui/core/types/panelmenu';
|
|
|
2
2
|
import * as i2 from '@angular/common';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, InjectionToken, input, numberAttribute, booleanAttribute, output, inject, ElementRef, forwardRef,
|
|
5
|
+
import { Injectable, InjectionToken, input, numberAttribute, booleanAttribute, output, inject, ElementRef, forwardRef, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, signal, linkedSignal, contentChild, contentChildren, NgModule } from '@angular/core';
|
|
6
6
|
import * as i3 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
8
|
import { resolve, isNotEmpty, findLast, findSingle, isPrintableCharacter, isEmpty, uuid, equals, focus, getAttribute } from '@exhaustive-ui/utils';
|
|
@@ -28,6 +28,10 @@ const style = /*css*/ `
|
|
|
28
28
|
.p-panelmenu-item-link {
|
|
29
29
|
outline: 0 none;
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
.p-panelmenu .p-menuitem-separator {
|
|
33
|
+
border-block-start: 1px solid dt('content.border.color');
|
|
34
|
+
}
|
|
31
35
|
`;
|
|
32
36
|
const classes = {
|
|
33
37
|
root: () => ['p-panelmenu p-component'],
|
|
@@ -158,6 +162,7 @@ var PanelMenuClasses;
|
|
|
158
162
|
const PANELMENU_INSTANCE = new InjectionToken('PANELMENU_INSTANCE');
|
|
159
163
|
const PANELMENUSUB_INSTANCE = new InjectionToken('PANELMENUSUB_INSTANCE');
|
|
160
164
|
class PanelMenuSub extends BaseComponent {
|
|
165
|
+
hostName = 'PanelMenu';
|
|
161
166
|
panelId = input(undefined, /* @ts-ignore */
|
|
162
167
|
...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
163
168
|
focusedItemId = input(undefined, /* @ts-ignore */
|
|
@@ -183,7 +188,7 @@ class PanelMenuSub extends BaseComponent {
|
|
|
183
188
|
$pcPanelMenu = inject(PANELMENU_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
184
189
|
constructor() {
|
|
185
190
|
super();
|
|
186
|
-
|
|
191
|
+
this.bindHostAttrs(this.bindDirectiveInstance, () => this.ptm(this.root() ? 'rootList' : 'submenu'));
|
|
187
192
|
}
|
|
188
193
|
getPTOptions(processedItem, index, key) {
|
|
189
194
|
return this.ptm(key, {
|
|
@@ -315,6 +320,9 @@ class PanelMenuSub extends BaseComponent {
|
|
|
315
320
|
[pBind]="getPTOptions(processedItem, index, 'itemLabel')"
|
|
316
321
|
></span>
|
|
317
322
|
}
|
|
323
|
+
@if (getItemProp(processedItem, 'badge')) {
|
|
324
|
+
<span [class]="cn(cx('badge'), getItemProp(processedItem, 'badgeStyleClass'))">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
325
|
+
}
|
|
318
326
|
</a>
|
|
319
327
|
}
|
|
320
328
|
@if (getItemProp(processedItem, 'routerLink')) {
|
|
@@ -373,8 +381,8 @@ class PanelMenuSub extends BaseComponent {
|
|
|
373
381
|
[pBind]="getPTOptions(processedItem, index, 'itemLabel')"
|
|
374
382
|
></span>
|
|
375
383
|
}
|
|
376
|
-
@if (processedItem
|
|
377
|
-
<span [class]="cn(cx('badge'), getItemProp(processedItem, 'badgeStyleClass'))">{{ processedItem
|
|
384
|
+
@if (getItemProp(processedItem, 'badge')) {
|
|
385
|
+
<span [class]="cn(cx('badge'), getItemProp(processedItem, 'badgeStyleClass'))">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
378
386
|
}
|
|
379
387
|
</a>
|
|
380
388
|
}
|
|
@@ -494,6 +502,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
494
502
|
[pBind]="getPTOptions(processedItem, index, 'itemLabel')"
|
|
495
503
|
></span>
|
|
496
504
|
}
|
|
505
|
+
@if (getItemProp(processedItem, 'badge')) {
|
|
506
|
+
<span [class]="cn(cx('badge'), getItemProp(processedItem, 'badgeStyleClass'))">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
507
|
+
}
|
|
497
508
|
</a>
|
|
498
509
|
}
|
|
499
510
|
@if (getItemProp(processedItem, 'routerLink')) {
|
|
@@ -552,8 +563,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
552
563
|
[pBind]="getPTOptions(processedItem, index, 'itemLabel')"
|
|
553
564
|
></span>
|
|
554
565
|
}
|
|
555
|
-
@if (processedItem
|
|
556
|
-
<span [class]="cn(cx('badge'), getItemProp(processedItem, 'badgeStyleClass'))">{{ processedItem
|
|
566
|
+
@if (getItemProp(processedItem, 'badge')) {
|
|
567
|
+
<span [class]="cn(cx('badge'), getItemProp(processedItem, 'badgeStyleClass'))">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
557
568
|
}
|
|
558
569
|
</a>
|
|
559
570
|
}
|
|
@@ -605,6 +616,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
605
616
|
}]
|
|
606
617
|
}], ctorParameters: () => [], propDecorators: { panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], focusedItemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedItemId", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], activeItemPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeItemPath", required: true }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], parentExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentExpanded", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }], menuFocus: [{ type: i0.Output, args: ["menuFocus"] }], menuBlur: [{ type: i0.Output, args: ["menuBlur"] }] } });
|
|
607
618
|
class PanelMenuList extends BaseComponent {
|
|
619
|
+
hostName = 'PanelMenu';
|
|
608
620
|
panelId = input(undefined, /* @ts-ignore */
|
|
609
621
|
...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
610
622
|
items = input(/* @ts-ignore */
|
|
@@ -763,8 +775,8 @@ class PanelMenuList extends BaseComponent {
|
|
|
763
775
|
}
|
|
764
776
|
onItemToggle(event) {
|
|
765
777
|
const { processedItem, expanded } = event;
|
|
766
|
-
// Update the original item object's 'expanded' property
|
|
767
|
-
if (processedItem.item) {
|
|
778
|
+
// Update the original item object's 'expanded' property, unless the model is immutable (frozen)
|
|
779
|
+
if (processedItem.item && !Object.isFrozen(processedItem.item)) {
|
|
768
780
|
processedItem.item.expanded = expanded;
|
|
769
781
|
}
|
|
770
782
|
// Update the expanded property in the existing processedItem
|
|
@@ -1062,12 +1074,17 @@ class PanelMenu extends BaseComponent {
|
|
|
1062
1074
|
...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
|
|
1063
1075
|
activeItem = signal(null, /* @ts-ignore */
|
|
1064
1076
|
...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
1077
|
+
/**
|
|
1078
|
+
* Expanded state of the frozen (immutable) model items, which cannot be written to.
|
|
1079
|
+
*/
|
|
1080
|
+
frozenItemsExpanded = signal(new Map(), /* @ts-ignore */
|
|
1081
|
+
...(ngDevMode ? [{ debugName: "frozenItemsExpanded" }] : /* istanbul ignore next */ []));
|
|
1065
1082
|
_componentStyle = inject(PanelMenuStyle);
|
|
1066
1083
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
1067
1084
|
$pcPanelMenu = inject(PANELMENU_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
1068
1085
|
constructor() {
|
|
1069
1086
|
super();
|
|
1070
|
-
|
|
1087
|
+
this.bindHostAttrs(this.bindDirectiveInstance, () => this.ptms(['host', 'root']));
|
|
1071
1088
|
}
|
|
1072
1089
|
getPTOptions(key, item, index) {
|
|
1073
1090
|
return this.ptm(key, {
|
|
@@ -1084,8 +1101,8 @@ class PanelMenu extends BaseComponent {
|
|
|
1084
1101
|
*/
|
|
1085
1102
|
collapseAll() {
|
|
1086
1103
|
for (let item of this.model()) {
|
|
1087
|
-
if (item
|
|
1088
|
-
item
|
|
1104
|
+
if (this.isItemActive(item)) {
|
|
1105
|
+
this.setItemExpanded(item, false);
|
|
1089
1106
|
}
|
|
1090
1107
|
}
|
|
1091
1108
|
this.cd.detectChanges();
|
|
@@ -1103,7 +1120,16 @@ class PanelMenu extends BaseComponent {
|
|
|
1103
1120
|
return this.getItemProp(item, 'label');
|
|
1104
1121
|
}
|
|
1105
1122
|
isItemActive(item) {
|
|
1106
|
-
|
|
1123
|
+
const frozenItemsExpanded = this.frozenItemsExpanded();
|
|
1124
|
+
return frozenItemsExpanded.has(item) ? frozenItemsExpanded.get(item) : item.expanded;
|
|
1125
|
+
}
|
|
1126
|
+
setItemExpanded(item, expanded) {
|
|
1127
|
+
if (Object.isFrozen(item)) {
|
|
1128
|
+
this.frozenItemsExpanded.update((frozenItemsExpanded) => new Map(frozenItemsExpanded).set(item, expanded));
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
item.expanded = expanded;
|
|
1132
|
+
}
|
|
1107
1133
|
}
|
|
1108
1134
|
isItemVisible(item) {
|
|
1109
1135
|
return this.getItemProp(item, 'visible') !== false;
|
|
@@ -1161,12 +1187,14 @@ class PanelMenu extends BaseComponent {
|
|
|
1161
1187
|
}
|
|
1162
1188
|
if (!this.multiple()) {
|
|
1163
1189
|
for (let modelItem of this.model()) {
|
|
1164
|
-
if (item !== modelItem && modelItem
|
|
1165
|
-
modelItem
|
|
1190
|
+
if (item !== modelItem && this.isItemActive(modelItem)) {
|
|
1191
|
+
this.setItemExpanded(modelItem, false);
|
|
1166
1192
|
}
|
|
1167
1193
|
}
|
|
1168
1194
|
}
|
|
1169
|
-
item
|
|
1195
|
+
if (this.isItemGroup(item)) {
|
|
1196
|
+
this.setItemExpanded(item, !this.isItemActive(item));
|
|
1197
|
+
}
|
|
1170
1198
|
this.changeActiveItem(event, item, index);
|
|
1171
1199
|
focus(event.currentTarget);
|
|
1172
1200
|
}
|