@nanahoshi/mona-ui 0.27.2 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/api/chart.md +2 -2
- package/docs/api/popup.md +1 -1
- package/docs/api/theme.md +2 -2
- package/docs/chart.md +14 -0
- package/docs/editor.md +2 -0
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +6 -2
- package/package.json +62 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +354 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,98 +1,66 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { takeUntilDestroyed } from
|
|
4
|
-
import { PreventableEvent, classInputToClass } from
|
|
5
|
-
import { createElementControlId,
|
|
6
|
-
import { PopupDataInjectionToken, PopupService } from
|
|
7
|
-
import { select, selectMany
|
|
8
|
-
import { Subject,
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
super("popupMenuCloseEvent", originalEvent?.originalEvent);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const convertToMenuItem = (item) => {
|
|
24
|
-
return {
|
|
25
|
-
checkable: item.checkable,
|
|
26
|
-
checked: item.checked ? item.checked() : false,
|
|
27
|
-
disabled: item.disabled,
|
|
28
|
-
group: typeof item.group === "string" ? item.group || undefined : item.group.description || undefined,
|
|
29
|
-
items: select(item.items, i => convertToMenuItem(i)).toArray(),
|
|
30
|
-
label: item.label,
|
|
31
|
-
separator: item.separator,
|
|
32
|
-
value: item.value?.()
|
|
33
|
-
};
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, DOCUMENT, DestroyRef, Directive, ElementRef, TemplateRef, afterNextRender, computed, contentChild, contentChildren, effect, forwardRef, inject, input, isSignal, model, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
4
|
+
import { PreventableEvent, classInputToClass } from "@nanahoshi/mona-ui/common";
|
|
5
|
+
import { createElementControlId, isNavigationKey, isTypeaheadKey, rxTimeout, setupTypeahead, themeOverlaySurfaceClasses, toCssValue } from "@nanahoshi/mona-ui/internal";
|
|
6
|
+
import { PopupDataInjectionToken, PopupService } from "@nanahoshi/mona-ui/popup";
|
|
7
|
+
import { any, select, selectMany } from "@mirei/ts-collections";
|
|
8
|
+
import { Subject, filter, fromEvent, take, takeUntil, tap } from "rxjs";
|
|
9
|
+
import { PopupMenuGroupTemplateToken, PopupMenuIconTemplateToken, PopupMenuItemClickEvent, PopupMenuItemClickEvent as PopupMenuItemClickEvent$1, PopupMenuItemType, PopupMenuOrigin, PopupMenuRadioItemToken, PopupMenuShortcutTemplateToken, PopupMenuTemplateOrigin, PopupMenuTemplateType, PopupMenuTextTemplateToken, PopupMenuToken, preparePopupMenuItems } from "@nanahoshi/mona-ui/internal/popup-menu";
|
|
10
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
11
|
+
import { LucideCheck, LucideChevronRight } from "@lucide/angular";
|
|
12
|
+
import { injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
|
|
13
|
+
import { twMerge } from "tailwind-merge";
|
|
14
|
+
import { cva } from "class-variance-authority";
|
|
15
|
+
var PopupMenuCloseEvent = class extends PreventableEvent {
|
|
16
|
+
constructor(originalEvent) {
|
|
17
|
+
super("popupMenuCloseEvent", originalEvent?.originalEvent);
|
|
18
|
+
}
|
|
34
19
|
};
|
|
35
|
-
/**
|
|
36
|
-
* Groups consecutive items that share a group key, keeping the items' order. Items with the same key that aren't
|
|
37
|
-
* next to each other form separate groups.
|
|
38
|
-
*/
|
|
39
20
|
const groupPopupMenuItems = (items) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
21
|
+
const groups = [];
|
|
22
|
+
for (const item of items) {
|
|
23
|
+
const last = groups.at(-1);
|
|
24
|
+
if (last && last.key === item.group) last.items.push(item);
|
|
25
|
+
else groups.push({
|
|
26
|
+
items: [item],
|
|
27
|
+
key: item.group
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return groups.map((group) => {
|
|
31
|
+
const title = typeof group.key === "string" ? group.key : group.key.description ?? "";
|
|
32
|
+
return {
|
|
33
|
+
items: group.items,
|
|
34
|
+
key: group.key,
|
|
35
|
+
labelId: title ? createElementControlId() : "",
|
|
36
|
+
title
|
|
37
|
+
};
|
|
38
|
+
});
|
|
54
39
|
};
|
|
55
|
-
/**
|
|
56
|
-
* Whether the item's checked state is held by the menu (a checkable `MenuItem` from the `items` input), so the
|
|
57
|
-
* menu toggles it when the item is activated.
|
|
58
|
-
*/
|
|
59
40
|
const isMenuOwnedCheckState = (item) => {
|
|
60
|
-
|
|
41
|
+
return item.checkable === true && isSignal(item.checked) && "set" in item.checked;
|
|
61
42
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
large: "rounded-lg",
|
|
69
|
-
none: "rounded-none"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
43
|
+
const popupMenuBaseThemeVariants = cva(`h-full w-full overflow-hidden`, { variants: { rounded: {
|
|
44
|
+
small: "rounded-sm",
|
|
45
|
+
medium: "rounded-md",
|
|
46
|
+
large: "rounded-lg",
|
|
47
|
+
none: "rounded-none"
|
|
48
|
+
} } });
|
|
73
49
|
const popupMenuContainerThemeVariants = cva(`
|
|
74
50
|
flex flex-col p-1
|
|
75
51
|
${themeOverlaySurfaceClasses} text-foreground
|
|
76
52
|
border border-border shadow-(--shadow-overlay) outline-none focus-visible:outline-hidden
|
|
77
|
-
`, {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
variants: {
|
|
89
|
-
size: {
|
|
90
|
-
small: "text-xs",
|
|
91
|
-
medium: "text-sm",
|
|
92
|
-
large: "text-base"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
53
|
+
`, { variants: { rounded: {
|
|
54
|
+
small: "rounded-sm",
|
|
55
|
+
medium: "rounded-md",
|
|
56
|
+
large: "rounded-lg",
|
|
57
|
+
none: "rounded-none"
|
|
58
|
+
} } });
|
|
59
|
+
const popupMenuGroupHeaderThemeVariants = cva(`inline-flex w-full select-none px-2 py-1 font-bold text-muted-foreground`, { variants: { size: {
|
|
60
|
+
small: "text-xs",
|
|
61
|
+
medium: "text-sm",
|
|
62
|
+
large: "text-base"
|
|
63
|
+
} } });
|
|
96
64
|
const popupMenuIconContainerThemeVariants = cva(`absolute start-2 flex items-center justify-center`);
|
|
97
65
|
const popupMenuItemThemeVariants = cva(`
|
|
98
66
|
relative flex cursor-pointer select-none items-center gap-2 py-1 pe-2 ps-8
|
|
@@ -105,1614 +73,2275 @@ const popupMenuItemThemeVariants = cva(`
|
|
|
105
73
|
data-[active='true']:bg-[var(--mona-menu-item-hover-background,var(--color-hover))]
|
|
106
74
|
data-[active='true']:text-foreground
|
|
107
75
|
data-[active='true']:data-[disabled='true']:text-disabled-foreground
|
|
108
|
-
`, {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
});
|
|
76
|
+
`, { variants: {
|
|
77
|
+
rounded: {
|
|
78
|
+
small: "rounded-sm",
|
|
79
|
+
medium: "rounded-md",
|
|
80
|
+
large: "rounded-lg",
|
|
81
|
+
none: "rounded-none"
|
|
82
|
+
},
|
|
83
|
+
size: {
|
|
84
|
+
small: "text-xs",
|
|
85
|
+
medium: "text-sm",
|
|
86
|
+
large: "text-base"
|
|
87
|
+
}
|
|
88
|
+
} });
|
|
123
89
|
const popupMenuLinkThemeVariants = cva(`flex items-center justify-center`);
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* How long the pointer can cross other items, while a submenu is open, before that submenu closes. It gives the
|
|
127
|
-
* pointer time to travel diagonally from a parent item to its submenu.
|
|
128
|
-
*/
|
|
129
90
|
const SUBMENU_SWITCH_DELAY = 250;
|
|
130
|
-
class PopupMenuListComponent {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
if (active && !
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
i0.ɵɵ
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
91
|
+
var PopupMenuListComponent = class PopupMenuListComponent {
|
|
92
|
+
#childCloseRequest$;
|
|
93
|
+
#destroyRef;
|
|
94
|
+
#direction;
|
|
95
|
+
#document;
|
|
96
|
+
#host;
|
|
97
|
+
#navigationItems;
|
|
98
|
+
#openSubmenuItem;
|
|
99
|
+
#parentConfig;
|
|
100
|
+
#popupService;
|
|
101
|
+
#submenuId;
|
|
102
|
+
#typeaheadKey$;
|
|
103
|
+
#childClose$;
|
|
104
|
+
#closing;
|
|
105
|
+
#hoverTimer;
|
|
106
|
+
constructor() {
|
|
107
|
+
this.#childCloseRequest$ = new Subject();
|
|
108
|
+
this.#destroyRef = inject(DestroyRef);
|
|
109
|
+
this.#direction = injectComponentDirection();
|
|
110
|
+
this.#document = inject(DOCUMENT);
|
|
111
|
+
this.#host = inject(ElementRef);
|
|
112
|
+
this.#navigationItems = computed(() => {
|
|
113
|
+
const items = this.#parentConfig.items();
|
|
114
|
+
return selectMany(items, (i) => i.items).where((i) => !i.separator).toImmutableSet();
|
|
115
|
+
}, ...ngDevMode ? [{ debugName: "#navigationItems" }] : /* istanbul ignore next */ []);
|
|
116
|
+
this.#openSubmenuItem = signal(null, ...ngDevMode ? [{ debugName: "#openSubmenuItem" }] : /* istanbul ignore next */ []);
|
|
117
|
+
this.#parentConfig = inject(PopupDataInjectionToken);
|
|
118
|
+
this.#popupService = inject(PopupService);
|
|
119
|
+
this.#submenuId = signal(null, ...ngDevMode ? [{ debugName: "#submenuId" }] : /* istanbul ignore next */ []);
|
|
120
|
+
this.#typeaheadKey$ = new Subject();
|
|
121
|
+
this.#childClose$ = null;
|
|
122
|
+
this.#closing = false;
|
|
123
|
+
this.activeMenuItem = signal(null, ...ngDevMode ? [{ debugName: "activeMenuItem" }] : /* istanbul ignore next */ []);
|
|
124
|
+
this.ariaLabel = this.#parentConfig.ariaLabel || null;
|
|
125
|
+
this.baseClasses = computed(() => {
|
|
126
|
+
const rounded = this.#parentConfig.rounded();
|
|
127
|
+
return popupMenuBaseThemeVariants({ rounded });
|
|
128
|
+
}, ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
|
|
129
|
+
this.containerClasses = computed(() => {
|
|
130
|
+
const rounded = this.#parentConfig.rounded();
|
|
131
|
+
return popupMenuContainerThemeVariants({ rounded });
|
|
132
|
+
}, ...ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []);
|
|
133
|
+
this.groupHeaderClasses = computed(() => {
|
|
134
|
+
const size = this.#parentConfig.size();
|
|
135
|
+
return popupMenuGroupHeaderThemeVariants({ size });
|
|
136
|
+
}, ...ngDevMode ? [{ debugName: "groupHeaderClasses" }] : /* istanbul ignore next */ []);
|
|
137
|
+
this.iconAreaVisible = computed(() => {
|
|
138
|
+
const items = this.#parentConfig.items();
|
|
139
|
+
return selectMany(items, (i) => i.items).any((i) => i.iconTemplate?.() != null || i.checkable === true || i.radio === true) || !!this.#parentConfig.popupIconTemplate?.();
|
|
140
|
+
}, ...ngDevMode ? [{ debugName: "iconAreaVisible" }] : /* istanbul ignore next */ []);
|
|
141
|
+
this.iconContainerClasses = computed(() => {
|
|
142
|
+
return popupMenuIconContainerThemeVariants();
|
|
143
|
+
}, ...ngDevMode ? [{ debugName: "iconContainerClasses" }] : /* istanbul ignore next */ []);
|
|
144
|
+
this.isRtl = computed(() => this.#direction() === "rtl", ...ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []);
|
|
145
|
+
this.labelledBy = this.ariaLabel ? null : this.#parentConfig.labelledBy;
|
|
146
|
+
this.linkContainerClasses = computed(() => {
|
|
147
|
+
return popupMenuLinkThemeVariants();
|
|
148
|
+
}, ...ngDevMode ? [{ debugName: "linkContainerClasses" }] : /* istanbul ignore next */ []);
|
|
149
|
+
this.menuId = computed(() => this.#parentConfig.menuId, ...ngDevMode ? [{ debugName: "menuId" }] : /* istanbul ignore next */ []);
|
|
150
|
+
this.menuItemClasses = computed(() => {
|
|
151
|
+
const rounded = this.#parentConfig.rounded();
|
|
152
|
+
const size = this.#parentConfig.size();
|
|
153
|
+
const hasIcon = this.iconAreaVisible();
|
|
154
|
+
const variantClasses = popupMenuItemThemeVariants({
|
|
155
|
+
rounded,
|
|
156
|
+
size
|
|
157
|
+
});
|
|
158
|
+
return twMerge(variantClasses, hasIcon ? "ps-8" : "ps-2");
|
|
159
|
+
}, ...ngDevMode ? [{ debugName: "menuItemClasses" }] : /* istanbul ignore next */ []);
|
|
160
|
+
this.menuItems = computed(() => this.#parentConfig.items(), ...ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []);
|
|
161
|
+
this.openSubmenuItem = this.#openSubmenuItem.asReadonly();
|
|
162
|
+
this.popupGroupTemplate = computed(() => this.#parentConfig.popupGroupTemplate?.() ?? null, ...ngDevMode ? [{ debugName: "popupGroupTemplate" }] : /* istanbul ignore next */ []);
|
|
163
|
+
this.popupIconTemplate = computed(() => this.#parentConfig.popupIconTemplate?.() ?? null, ...ngDevMode ? [{ debugName: "popupIconTemplate" }] : /* istanbul ignore next */ []);
|
|
164
|
+
this.popupShortcutTemplate = computed(() => this.#parentConfig.popupShortcutTemplate?.() ?? null, ...ngDevMode ? [{ debugName: "popupShortcutTemplate" }] : /* istanbul ignore next */ []);
|
|
165
|
+
this.popupTextTemplate = computed(() => this.#parentConfig.popupTextTemplate?.(), ...ngDevMode ? [{ debugName: "popupTextTemplate" }] : /* istanbul ignore next */ []);
|
|
166
|
+
this.submenuId = this.#submenuId.asReadonly();
|
|
167
|
+
this.popupRef = null;
|
|
168
|
+
afterNextRender({ write: () => {
|
|
169
|
+
const config = this.#parentConfig;
|
|
170
|
+
if (config.isRoot || config.viaKeyboardNavigation) this.#menuElement()?.focus();
|
|
171
|
+
if (config.isRoot && config.initialFocus) {
|
|
172
|
+
if (config.initialFocus === "last") this.handleEndKey();
|
|
173
|
+
else this.focusFirstItem();
|
|
174
|
+
} else if (!config.isRoot && config.viaKeyboardNavigation) {
|
|
175
|
+
const item = this.focusFirstItem();
|
|
176
|
+
const isRtl = this.isRtl();
|
|
177
|
+
this.notifyNavigation(item, isRtl ? "left" : "right");
|
|
178
|
+
}
|
|
179
|
+
} });
|
|
180
|
+
effect(() => {
|
|
181
|
+
const items = this.#navigationItems();
|
|
182
|
+
untracked(() => {
|
|
183
|
+
const active = this.activeMenuItem();
|
|
184
|
+
if (active && !items.any((i) => i === active)) this.activeMenuItem.set(items.firstOrDefault((i) => i.uid === active.uid) ?? null);
|
|
185
|
+
const open = this.#openSubmenuItem();
|
|
186
|
+
if (open && !items.any((i) => i === open)) {
|
|
187
|
+
const current = items.firstOrDefault((i) => i.uid === open.uid);
|
|
188
|
+
if (current && current.items.length > 0) this.#openSubmenuItem.set(current);
|
|
189
|
+
else this.closePopup();
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
this.#destroyRef.onDestroy(() => {
|
|
194
|
+
clearTimeout(this.#hoverTimer);
|
|
195
|
+
this.#closing = true;
|
|
196
|
+
this.closePopup();
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
ngOnInit() {
|
|
200
|
+
this.setSubscriptions();
|
|
201
|
+
}
|
|
202
|
+
#menuElement() {
|
|
203
|
+
return this.#host.nativeElement.firstElementChild;
|
|
204
|
+
}
|
|
205
|
+
asItems(items) {
|
|
206
|
+
return items;
|
|
207
|
+
}
|
|
208
|
+
onFocusOut(event) {
|
|
209
|
+
const next = event.relatedTarget;
|
|
210
|
+
if (next instanceof Element && !next.closest("mona-popup-menu-list")) this.#parentConfig.closeMenu({ focusLeftTo: next });
|
|
211
|
+
}
|
|
212
|
+
onHostPointerEnter() {
|
|
213
|
+
this.#parentConfig.submenuPointerEnter?.();
|
|
214
|
+
}
|
|
215
|
+
onItemClick(event, item) {
|
|
216
|
+
if (item.disabled) return;
|
|
217
|
+
if (item.items.length > 0) {
|
|
218
|
+
this.openSubmenuFromClick(item, event.currentTarget, event.detail === 0);
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const popupMenuItemClickEvent = new PopupMenuItemClickEvent$1(item, event);
|
|
222
|
+
item.click$?.next(popupMenuItemClickEvent);
|
|
223
|
+
if (popupMenuItemClickEvent.isDefaultPrevented()) return;
|
|
224
|
+
this.#parentConfig.menuItemClick$.next(popupMenuItemClickEvent);
|
|
225
|
+
}
|
|
226
|
+
onItemPointerEnter(event, item) {
|
|
227
|
+
clearTimeout(this.#hoverTimer);
|
|
228
|
+
const open = this.#openSubmenuItem();
|
|
229
|
+
if (open === item) {
|
|
230
|
+
this.activeMenuItem.set(item);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const target = event.currentTarget;
|
|
234
|
+
const hover = () => {
|
|
235
|
+
this.closePopup();
|
|
236
|
+
if (item.items.length > 0 && !item.disabled) {
|
|
237
|
+
this.activeMenuItem.set(item);
|
|
238
|
+
this.createSubmenu(target, false, item);
|
|
239
|
+
} else this.activeMenuItem.set(null);
|
|
240
|
+
};
|
|
241
|
+
if (open) this.#hoverTimer = setTimeout(hover, SUBMENU_SWITCH_DELAY);
|
|
242
|
+
else hover();
|
|
243
|
+
}
|
|
244
|
+
closePopup() {
|
|
245
|
+
const ref = this.popupRef;
|
|
246
|
+
this.popupRef = null;
|
|
247
|
+
this.#openSubmenuItem.set(null);
|
|
248
|
+
this.#submenuId.set(null);
|
|
249
|
+
const childClose$ = this.#childClose$;
|
|
250
|
+
this.#childClose$ = null;
|
|
251
|
+
childClose$?.next();
|
|
252
|
+
if (ref) {
|
|
253
|
+
this.reclaimFocus();
|
|
254
|
+
ref.close();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
closeSubmenu() {
|
|
258
|
+
this.#parentConfig.childCloseRequest$?.next();
|
|
259
|
+
}
|
|
260
|
+
createSubmenu(target, viaKeyboard, item) {
|
|
261
|
+
this.closePopup();
|
|
262
|
+
const uid = item.uid;
|
|
263
|
+
const close$ = new Subject();
|
|
264
|
+
const menuId = createElementControlId(this.#parentConfig.level + 1);
|
|
265
|
+
const data = {
|
|
266
|
+
childCloseRequest$: this.#childCloseRequest$,
|
|
267
|
+
closeMenu: this.#parentConfig.closeMenu,
|
|
268
|
+
isRoot: false,
|
|
269
|
+
items: computed(() => groupPopupMenuItems(this.findItem(uid)?.items ?? [])),
|
|
270
|
+
labelledBy: uid,
|
|
271
|
+
level: this.#parentConfig.level + 1,
|
|
272
|
+
menuId,
|
|
273
|
+
menuItemClick$: this.#parentConfig.menuItemClick$,
|
|
274
|
+
minWidth: this.#parentConfig.minWidth,
|
|
275
|
+
navigate$: this.#parentConfig.navigate$,
|
|
276
|
+
parentClose$: close$,
|
|
277
|
+
popupGroupTemplate: this.#parentConfig.popupGroupTemplate,
|
|
278
|
+
popupIconTemplate: this.#parentConfig.popupIconTemplate,
|
|
279
|
+
popupShortcutTemplate: this.#parentConfig.popupShortcutTemplate,
|
|
280
|
+
popupTextTemplate: this.#parentConfig.popupTextTemplate,
|
|
281
|
+
rounded: this.#parentConfig.rounded,
|
|
282
|
+
size: this.#parentConfig.size,
|
|
283
|
+
submenuPointerEnter: () => this.onSubmenuPointerEnter(),
|
|
284
|
+
viaKeyboardNavigation: viaKeyboard,
|
|
285
|
+
width: this.#parentConfig.width
|
|
286
|
+
};
|
|
287
|
+
const ref = this.#popupService.create({
|
|
288
|
+
anchor: target,
|
|
289
|
+
anchorConnectionPoint: "topright",
|
|
290
|
+
closeOnScroll: true,
|
|
291
|
+
content: PopupMenuListComponent,
|
|
292
|
+
data,
|
|
293
|
+
minWidth: this.#parentConfig.minWidth?.() ?? void 0,
|
|
294
|
+
popupConnectionPoint: "topleft",
|
|
295
|
+
restoreFocus: false,
|
|
296
|
+
width: this.#parentConfig.width?.() ?? void 0
|
|
297
|
+
});
|
|
298
|
+
this.popupRef = ref;
|
|
299
|
+
this.#childClose$ = close$;
|
|
300
|
+
this.#openSubmenuItem.set(item);
|
|
301
|
+
this.#submenuId.set(menuId);
|
|
302
|
+
ref.closed.pipe(take(1)).subscribe(() => {
|
|
303
|
+
close$.complete();
|
|
304
|
+
if (this.popupRef !== ref) return;
|
|
305
|
+
this.popupRef = null;
|
|
306
|
+
this.#childClose$ = null;
|
|
307
|
+
this.#openSubmenuItem.set(null);
|
|
308
|
+
this.#submenuId.set(null);
|
|
309
|
+
if (!this.#closing) this.#menuElement()?.focus();
|
|
310
|
+
if (!viaKeyboard) this.activeMenuItem.set(null);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
cycleThroughMatchedItems(buffer) {
|
|
314
|
+
const matchedItems = this.#navigationItems().where((i) => i.label.toLowerCase().startsWith(buffer)).toArray();
|
|
315
|
+
const activeMenuItem = this.activeMenuItem();
|
|
316
|
+
if (matchedItems.length === 0) return;
|
|
317
|
+
if (matchedItems.length === 1) {
|
|
318
|
+
this.activeMenuItem.set(matchedItems[0]);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (matchedItems.length > 1) {
|
|
322
|
+
const nextIndex = ((activeMenuItem ? matchedItems.indexOf(activeMenuItem) : -1) + 1) % matchedItems.length;
|
|
323
|
+
this.activeMenuItem.set(matchedItems[nextIndex]);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
findItem(uid) {
|
|
327
|
+
return this.#navigationItems().firstOrDefault((i) => i.uid === uid) ?? null;
|
|
328
|
+
}
|
|
329
|
+
focusFirstItem() {
|
|
330
|
+
const firstItem = this.#navigationItems().firstOrDefault();
|
|
331
|
+
if (firstItem) this.activeMenuItem.set(firstItem);
|
|
332
|
+
return firstItem;
|
|
333
|
+
}
|
|
334
|
+
handleArrowDownKey() {
|
|
335
|
+
if (!this.activeMenuItem()) {
|
|
336
|
+
const firstItem = this.#navigationItems().firstOrDefault();
|
|
337
|
+
if (firstItem) this.activeMenuItem.set(firstItem);
|
|
338
|
+
return firstItem;
|
|
339
|
+
}
|
|
340
|
+
const nextItem = this.#navigationItems().skipWhile((i) => i !== this.activeMenuItem()).skip(1).firstOrDefault();
|
|
341
|
+
if (nextItem) {
|
|
342
|
+
this.activeMenuItem.set(nextItem);
|
|
343
|
+
return nextItem;
|
|
344
|
+
}
|
|
345
|
+
const firstItem = this.#navigationItems().firstOrDefault();
|
|
346
|
+
if (firstItem) this.activeMenuItem.set(firstItem);
|
|
347
|
+
return firstItem;
|
|
348
|
+
}
|
|
349
|
+
handleArrowUpKey() {
|
|
350
|
+
if (!this.activeMenuItem()) {
|
|
351
|
+
const lastItem = this.#navigationItems().lastOrDefault();
|
|
352
|
+
if (lastItem) this.activeMenuItem.set(lastItem);
|
|
353
|
+
return lastItem;
|
|
354
|
+
}
|
|
355
|
+
const previousItem = this.#navigationItems().takeWhile((i) => i !== this.activeMenuItem()).lastOrDefault();
|
|
356
|
+
if (previousItem) {
|
|
357
|
+
this.activeMenuItem.set(previousItem);
|
|
358
|
+
return previousItem;
|
|
359
|
+
}
|
|
360
|
+
const lastItem = this.#navigationItems().lastOrDefault();
|
|
361
|
+
if (lastItem) this.activeMenuItem.set(lastItem);
|
|
362
|
+
return lastItem;
|
|
363
|
+
}
|
|
364
|
+
handleEndKey() {
|
|
365
|
+
const lastItem = this.#navigationItems().lastOrDefault();
|
|
366
|
+
if (lastItem) this.activeMenuItem.set(lastItem);
|
|
367
|
+
}
|
|
368
|
+
handleEnterKey() {
|
|
369
|
+
const activeItem = this.activeMenuItem();
|
|
370
|
+
if (activeItem?.disabled) return;
|
|
371
|
+
if (activeItem && activeItem.items.length > 0) {
|
|
372
|
+
const target = this.#host.nativeElement.querySelector("[data-active=\"true\"]");
|
|
373
|
+
if (target) this.createSubmenu(target, true, activeItem);
|
|
374
|
+
} else if (activeItem) {
|
|
375
|
+
const syntheticEvent = new MouseEvent("click", {
|
|
376
|
+
bubbles: true,
|
|
377
|
+
cancelable: true,
|
|
378
|
+
composed: true
|
|
379
|
+
});
|
|
380
|
+
this.onItemClick(syntheticEvent, activeItem);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
handleEscapeKey() {
|
|
384
|
+
this.closePopup();
|
|
385
|
+
}
|
|
386
|
+
handleHomeKey() {
|
|
387
|
+
const firstItem = this.#navigationItems().firstOrDefault();
|
|
388
|
+
if (firstItem) this.activeMenuItem.set(firstItem);
|
|
389
|
+
}
|
|
390
|
+
handleNavigationKey(event) {
|
|
391
|
+
const isRtl = this.isRtl();
|
|
392
|
+
const openKey = isRtl ? "ArrowLeft" : "ArrowRight";
|
|
393
|
+
const closeKey = isRtl ? "ArrowRight" : "ArrowLeft";
|
|
394
|
+
const forwardDir = isRtl ? "left" : "right";
|
|
395
|
+
const backwardDir = isRtl ? "right" : "left";
|
|
396
|
+
let item = null;
|
|
397
|
+
if (event.key === "ArrowDown") {
|
|
398
|
+
item = this.handleArrowDownKey();
|
|
399
|
+
this.notifyNavigation(item, "down");
|
|
400
|
+
} else if (event.key === closeKey) {
|
|
401
|
+
this.closeSubmenu();
|
|
402
|
+
if (this.#parentConfig.level === 0) this.notifyNavigation(null, backwardDir);
|
|
403
|
+
} else if (event.key === openKey) {
|
|
404
|
+
if (!this.openSubmenu().hasChild) this.notifyNavigation(item, forwardDir);
|
|
405
|
+
} else if (event.key === "ArrowUp") {
|
|
406
|
+
item = this.handleArrowUpKey();
|
|
407
|
+
this.notifyNavigation(item, "up");
|
|
408
|
+
} else if (event.key === "End") this.handleEndKey();
|
|
409
|
+
else if (event.key === "Enter" || event.key === " ") {
|
|
410
|
+
event.preventDefault();
|
|
411
|
+
this.handleEnterKey();
|
|
412
|
+
} else if (event.key === "Escape") this.handleEscapeKey();
|
|
413
|
+
else if (event.key === "Home") this.handleHomeKey();
|
|
414
|
+
}
|
|
415
|
+
handleTypeaheadKey(event) {
|
|
416
|
+
this.#typeaheadKey$.next(event.key);
|
|
417
|
+
}
|
|
418
|
+
notifyNavigation(item, direction) {
|
|
419
|
+
this.#parentConfig.navigate$.next({
|
|
420
|
+
direction,
|
|
421
|
+
item,
|
|
422
|
+
level: this.#parentConfig.level
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
onSubmenuPointerEnter() {
|
|
426
|
+
clearTimeout(this.#hoverTimer);
|
|
427
|
+
const open = this.#openSubmenuItem();
|
|
428
|
+
if (open) this.activeMenuItem.set(open);
|
|
429
|
+
}
|
|
430
|
+
openSubmenu() {
|
|
431
|
+
const activeItem = this.activeMenuItem();
|
|
432
|
+
if (!activeItem || activeItem.disabled) return {
|
|
433
|
+
item: null,
|
|
434
|
+
hasChild: false
|
|
435
|
+
};
|
|
436
|
+
const target = this.#host.nativeElement.querySelector("[data-active=\"true\"]");
|
|
437
|
+
if (target && activeItem.items.length > 0) {
|
|
438
|
+
this.createSubmenu(target, true, activeItem);
|
|
439
|
+
return {
|
|
440
|
+
item: activeItem,
|
|
441
|
+
hasChild: true
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
if (activeItem && activeItem.items.length > 0) return {
|
|
445
|
+
item: activeItem,
|
|
446
|
+
hasChild: true
|
|
447
|
+
};
|
|
448
|
+
return {
|
|
449
|
+
item: null,
|
|
450
|
+
hasChild: false
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
openSubmenuFromClick(item, target, viaKeyboard) {
|
|
454
|
+
if (!target || this.popupRef && this.#openSubmenuItem() === item) return;
|
|
455
|
+
this.activeMenuItem.set(item);
|
|
456
|
+
this.createSubmenu(target, viaKeyboard, item);
|
|
457
|
+
}
|
|
458
|
+
reclaimFocus() {
|
|
459
|
+
if (this.#closing) return;
|
|
460
|
+
const active = this.#document.activeElement;
|
|
461
|
+
if (active && !this.#host.nativeElement.contains(active) && active.closest("mona-popup-menu-list")) this.#menuElement()?.focus();
|
|
462
|
+
}
|
|
463
|
+
setKeyboardEvents() {
|
|
464
|
+
const element = this.#menuElement();
|
|
465
|
+
if (!element) return;
|
|
466
|
+
fromEvent(element, "keydown").pipe(takeUntilDestroyed(this.#destroyRef), tap((e) => {
|
|
467
|
+
if (e.key === "Tab") this.#parentConfig.closeMenu({ tab: true });
|
|
468
|
+
else if (isNavigationKey(e.key)) {
|
|
469
|
+
e.preventDefault();
|
|
470
|
+
this.#typeaheadKey$.next("");
|
|
471
|
+
this.handleNavigationKey(e);
|
|
472
|
+
} else if (isTypeaheadKey(e.key, e)) {
|
|
473
|
+
e.preventDefault();
|
|
474
|
+
this.handleTypeaheadKey(e);
|
|
475
|
+
}
|
|
476
|
+
})).subscribe();
|
|
477
|
+
}
|
|
478
|
+
setPopupCloseSubscription() {
|
|
479
|
+
this.#parentConfig.parentClose$.pipe(takeUntilDestroyed(this.#destroyRef), tap(() => {
|
|
480
|
+
this.#closing = true;
|
|
481
|
+
this.closePopup();
|
|
482
|
+
})).subscribe();
|
|
483
|
+
this.#childCloseRequest$.pipe(takeUntilDestroyed(this.#destroyRef), tap(() => {
|
|
484
|
+
const activeItem = this.activeMenuItem();
|
|
485
|
+
const isRtl = this.isRtl();
|
|
486
|
+
this.notifyNavigation(activeItem, isRtl ? "right" : "left");
|
|
487
|
+
this.closePopup();
|
|
488
|
+
})).subscribe();
|
|
489
|
+
}
|
|
490
|
+
setSubscriptions() {
|
|
491
|
+
this.setKeyboardEvents();
|
|
492
|
+
this.setPopupCloseSubscription();
|
|
493
|
+
this.setTypeaheadSubscription();
|
|
494
|
+
}
|
|
495
|
+
setTypeaheadSubscription() {
|
|
496
|
+
setupTypeahead(this.#typeaheadKey$).pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((buffer) => this.cycleThroughMatchedItems(buffer));
|
|
497
|
+
}
|
|
498
|
+
static {
|
|
499
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
500
|
+
minVersion: "12.0.0",
|
|
501
|
+
version: "22.2.6",
|
|
502
|
+
ngImport: i0,
|
|
503
|
+
type: PopupMenuListComponent,
|
|
504
|
+
deps: [],
|
|
505
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
static {
|
|
509
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
510
|
+
minVersion: "17.0.0",
|
|
511
|
+
version: "22.2.6",
|
|
512
|
+
type: PopupMenuListComponent,
|
|
513
|
+
isStandalone: true,
|
|
514
|
+
selector: "mona-popup-menu-list",
|
|
515
|
+
host: {
|
|
516
|
+
listeners: {
|
|
517
|
+
"focusout": "onFocusOut($event)",
|
|
518
|
+
"pointerenter": "onHostPointerEnter()"
|
|
519
|
+
},
|
|
520
|
+
properties: { "class": "baseClasses()" }
|
|
521
|
+
},
|
|
522
|
+
ngImport: i0,
|
|
523
|
+
template: "<div\n role=\"menu\"\n [attr.tabindex]=\"0\"\n [attr.aria-orientation]=\"'vertical'\"\n [attr.aria-activedescendant]=\"activeMenuItem()?.uid\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.id]=\"menuId()\"\n [class]=\"containerClasses()\">\n @for (group of menuItems(); track $index) {\n @if (group.title) {\n @let groupTemplate = group.items[0]?.groupTemplate?.() ?? popupGroupTemplate() ?? null;\n <div role=\"group\" [attr.aria-labelledby]=\"group.labelId\">\n <div [id]=\"group.labelId\" role=\"presentation\" [class]=\"groupHeaderClasses()\">\n @if (groupTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.title }\"></ng-container>\n } @else {\n <span>{{ group.title }}</span>\n }\n </div>\n <ng-container\n [ngTemplateOutlet]=\"itemsTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.items }\"></ng-container>\n </div>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"itemsTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.items }\"></ng-container>\n }\n }\n</div>\n\n<ng-template #itemsTemplate let-items>\n @for (item of asItems(items); track $index) {\n @if (item.separator) {\n <div role=\"separator\" class=\"bg-border my-1 h-px\"></div>\n } @else {\n @let iconTemplate = item.iconTemplate?.() ?? popupIconTemplate() ?? null;\n @let shortcutTemplate = item.shortcutTemplate?.() ?? popupShortcutTemplate() ?? null;\n @let textTemplate = item.textTemplate?.() ?? popupTextTemplate() ?? null;\n <div\n [attr.role]=\"item.checkable ? 'menuitemcheckbox' : item.radio ? 'menuitemradio' : 'menuitem'\"\n [attr.aria-checked]=\"item.checkable ? !!item.checked?.() : item.radio ? !!item.selected?.() : null\"\n [id]=\"item.uid\"\n (pointerenter)=\"onItemPointerEnter($event, item)\"\n (click)=\"onItemClick($event, item)\"\n [attr.data-active]=\"item === activeMenuItem()\"\n [attr.aria-disabled]=\"item.disabled\"\n [attr.aria-expanded]=\"item.items.length > 0 ? item === openSubmenuItem() : null\"\n [attr.aria-controls]=\"item === openSubmenuItem() ? submenuId() : null\"\n [attr.aria-haspopup]=\"item.items.length > 0 ? 'menu' : null\"\n [attr.aria-label]=\"textTemplate ? null : item.label || null\"\n [attr.data-disabled]=\"item.disabled\"\n [class]=\"menuItemClasses()\">\n @if (iconAreaVisible()) {\n <div [class]=\"iconContainerClasses()\">\n @if (!item.checkable && !item.radio) {\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n } @else if (item.checkable) {\n @if (item.checked?.()) {\n <svg lucideCheck [size]=\"14\"></svg>\n }\n } @else if (item.radio) {\n @if (item.selected?.()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-circle size-2 fill-current\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n </svg>\n }\n }\n </div>\n }\n <div class=\"flex-1\">\n @if (textTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"textTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n } @else {\n {{ item.label }}\n }\n </div>\n @if (item.items.length > 0) {\n @if (!item.checkable) {\n <div [class]=\"linkContainerClasses()\">\n <svg lucideChevronRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n </div>\n }\n } @else if (shortcutTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n }\n </div>\n }\n }\n</ng-template>\n",
|
|
524
|
+
dependencies: [
|
|
525
|
+
{
|
|
526
|
+
kind: "directive",
|
|
527
|
+
type: NgTemplateOutlet,
|
|
528
|
+
selector: "[ngTemplateOutlet]",
|
|
529
|
+
inputs: [
|
|
530
|
+
"ngTemplateOutletContext",
|
|
531
|
+
"ngTemplateOutlet",
|
|
532
|
+
"ngTemplateOutletInjector"
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
kind: "component",
|
|
537
|
+
type: LucideChevronRight,
|
|
538
|
+
selector: "svg[lucideChevronRight]"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
kind: "component",
|
|
542
|
+
type: LucideCheck,
|
|
543
|
+
selector: "svg[lucideCheck]"
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
550
|
+
minVersion: "12.0.0",
|
|
551
|
+
version: "22.2.6",
|
|
552
|
+
ngImport: i0,
|
|
553
|
+
type: PopupMenuListComponent,
|
|
554
|
+
decorators: [{
|
|
555
|
+
type: Component,
|
|
556
|
+
args: [{
|
|
557
|
+
selector: "mona-popup-menu-list",
|
|
558
|
+
imports: [
|
|
559
|
+
NgTemplateOutlet,
|
|
560
|
+
LucideChevronRight,
|
|
561
|
+
LucideCheck
|
|
562
|
+
],
|
|
563
|
+
host: {
|
|
564
|
+
"[class]": "baseClasses()",
|
|
565
|
+
"(focusout)": "onFocusOut($event)",
|
|
566
|
+
"(pointerenter)": "onHostPointerEnter()"
|
|
567
|
+
},
|
|
568
|
+
template: "<div\n role=\"menu\"\n [attr.tabindex]=\"0\"\n [attr.aria-orientation]=\"'vertical'\"\n [attr.aria-activedescendant]=\"activeMenuItem()?.uid\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.id]=\"menuId()\"\n [class]=\"containerClasses()\">\n @for (group of menuItems(); track $index) {\n @if (group.title) {\n @let groupTemplate = group.items[0]?.groupTemplate?.() ?? popupGroupTemplate() ?? null;\n <div role=\"group\" [attr.aria-labelledby]=\"group.labelId\">\n <div [id]=\"group.labelId\" role=\"presentation\" [class]=\"groupHeaderClasses()\">\n @if (groupTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.title }\"></ng-container>\n } @else {\n <span>{{ group.title }}</span>\n }\n </div>\n <ng-container\n [ngTemplateOutlet]=\"itemsTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.items }\"></ng-container>\n </div>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"itemsTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.items }\"></ng-container>\n }\n }\n</div>\n\n<ng-template #itemsTemplate let-items>\n @for (item of asItems(items); track $index) {\n @if (item.separator) {\n <div role=\"separator\" class=\"bg-border my-1 h-px\"></div>\n } @else {\n @let iconTemplate = item.iconTemplate?.() ?? popupIconTemplate() ?? null;\n @let shortcutTemplate = item.shortcutTemplate?.() ?? popupShortcutTemplate() ?? null;\n @let textTemplate = item.textTemplate?.() ?? popupTextTemplate() ?? null;\n <div\n [attr.role]=\"item.checkable ? 'menuitemcheckbox' : item.radio ? 'menuitemradio' : 'menuitem'\"\n [attr.aria-checked]=\"item.checkable ? !!item.checked?.() : item.radio ? !!item.selected?.() : null\"\n [id]=\"item.uid\"\n (pointerenter)=\"onItemPointerEnter($event, item)\"\n (click)=\"onItemClick($event, item)\"\n [attr.data-active]=\"item === activeMenuItem()\"\n [attr.aria-disabled]=\"item.disabled\"\n [attr.aria-expanded]=\"item.items.length > 0 ? item === openSubmenuItem() : null\"\n [attr.aria-controls]=\"item === openSubmenuItem() ? submenuId() : null\"\n [attr.aria-haspopup]=\"item.items.length > 0 ? 'menu' : null\"\n [attr.aria-label]=\"textTemplate ? null : item.label || null\"\n [attr.data-disabled]=\"item.disabled\"\n [class]=\"menuItemClasses()\">\n @if (iconAreaVisible()) {\n <div [class]=\"iconContainerClasses()\">\n @if (!item.checkable && !item.radio) {\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n } @else if (item.checkable) {\n @if (item.checked?.()) {\n <svg lucideCheck [size]=\"14\"></svg>\n }\n } @else if (item.radio) {\n @if (item.selected?.()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-circle size-2 fill-current\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n </svg>\n }\n }\n </div>\n }\n <div class=\"flex-1\">\n @if (textTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"textTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n } @else {\n {{ item.label }}\n }\n </div>\n @if (item.items.length > 0) {\n @if (!item.checkable) {\n <div [class]=\"linkContainerClasses()\">\n <svg lucideChevronRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n </div>\n }\n } @else if (shortcutTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n }\n </div>\n }\n }\n</ng-template>\n"
|
|
569
|
+
}]
|
|
570
|
+
}],
|
|
571
|
+
ctorParameters: () => []
|
|
572
|
+
});
|
|
573
|
+
const handledContextMenuEvents = /* @__PURE__ */ new WeakSet();
|
|
574
|
+
var PopupMenuComponent = class PopupMenuComponent {
|
|
575
|
+
#destroyRef;
|
|
576
|
+
#document;
|
|
577
|
+
#menuItemClick$;
|
|
578
|
+
#navigate$;
|
|
579
|
+
#popupService;
|
|
580
|
+
#destroyed;
|
|
581
|
+
#open;
|
|
582
|
+
#pendingInitialFocus;
|
|
583
|
+
#suppressNextTrustedContextMenu;
|
|
584
|
+
#triggerSubscription;
|
|
585
|
+
constructor() {
|
|
586
|
+
this.#destroyRef = inject(DestroyRef);
|
|
587
|
+
this.#document = inject(DOCUMENT);
|
|
588
|
+
this.#menuItemClick$ = new Subject();
|
|
589
|
+
this.#navigate$ = new Subject();
|
|
590
|
+
this.#popupService = inject(PopupService);
|
|
591
|
+
this.#destroyed = false;
|
|
592
|
+
this.#open = null;
|
|
593
|
+
this.#pendingInitialFocus = null;
|
|
594
|
+
this.#suppressNextTrustedContextMenu = false;
|
|
595
|
+
this.#triggerSubscription = null;
|
|
596
|
+
this.groupTemplateConfig = contentChild(PopupMenuGroupTemplateToken, {
|
|
597
|
+
...ngDevMode ? { debugName: "groupTemplateConfig" } : /* istanbul ignore next */ {},
|
|
598
|
+
descendants: false
|
|
599
|
+
});
|
|
600
|
+
this.iconTemplateConfig = contentChild(PopupMenuIconTemplateToken, {
|
|
601
|
+
...ngDevMode ? { debugName: "iconTemplateConfig" } : /* istanbul ignore next */ {},
|
|
602
|
+
descendants: false
|
|
603
|
+
});
|
|
604
|
+
this.nestedComponents = contentChildren(PopupMenuToken, {
|
|
605
|
+
...ngDevMode ? { debugName: "nestedComponents" } : /* istanbul ignore next */ {},
|
|
606
|
+
descendants: false
|
|
607
|
+
});
|
|
608
|
+
this.shortcutTemplateConfig = contentChild(PopupMenuShortcutTemplateToken, {
|
|
609
|
+
...ngDevMode ? { debugName: "shortcutTemplateConfig" } : /* istanbul ignore next */ {},
|
|
610
|
+
descendants: false
|
|
611
|
+
});
|
|
612
|
+
this.textTemplateConfig = contentChild(PopupMenuTextTemplateToken, {
|
|
613
|
+
...ngDevMode ? { debugName: "textTemplateConfig" } : /* istanbul ignore next */ {},
|
|
614
|
+
descendants: false
|
|
615
|
+
});
|
|
616
|
+
this.menuItems = computed(() => {
|
|
617
|
+
const inputItems = this.items();
|
|
618
|
+
if (any(inputItems)) {
|
|
619
|
+
const items = select(inputItems, (i) => Object.hasOwn(i, "uid") ? i : preparePopupMenuItems([i])[0]);
|
|
620
|
+
return groupPopupMenuItems(items);
|
|
621
|
+
}
|
|
622
|
+
const items = this.nestedComponents().flatMap((i) => i.getPopupMenuItem());
|
|
623
|
+
return groupPopupMenuItems(items);
|
|
624
|
+
}, ...ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []);
|
|
625
|
+
this.anchor = input(...ngDevMode ? [void 0, { debugName: "anchor" }] : /* istanbul ignore next */ []);
|
|
626
|
+
this.anchorConnectionPoint = input(...ngDevMode ? [void 0, { debugName: "anchorConnectionPoint" }] : /* istanbul ignore next */ []);
|
|
627
|
+
this.ariaLabel = input("", {
|
|
628
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
629
|
+
alias: "aria-label"
|
|
630
|
+
});
|
|
631
|
+
this.ariaLabelledBy = input("", {
|
|
632
|
+
...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
|
|
633
|
+
alias: "aria-labelledby"
|
|
634
|
+
});
|
|
635
|
+
this.close = output();
|
|
636
|
+
this.items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
637
|
+
this.menuClick = output();
|
|
638
|
+
this.menuId = input("", {
|
|
639
|
+
...ngDevMode ? { debugName: "menuId" } : /* istanbul ignore next */ {},
|
|
640
|
+
alias: "id"
|
|
641
|
+
});
|
|
642
|
+
this.minWidth = input(...ngDevMode ? [void 0, { debugName: "minWidth" }] : /* istanbul ignore next */ []);
|
|
643
|
+
this.navigate = output();
|
|
644
|
+
this.offset = input(...ngDevMode ? [void 0, { debugName: "offset" }] : /* istanbul ignore next */ []);
|
|
645
|
+
this.open = output();
|
|
646
|
+
this.openAtPointer = input(false, ...ngDevMode ? [{ debugName: "openAtPointer" }] : /* istanbul ignore next */ []);
|
|
647
|
+
this.popupConnectionPoint = input(...ngDevMode ? [void 0, { debugName: "popupConnectionPoint" }] : /* istanbul ignore next */ []);
|
|
648
|
+
this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
649
|
+
this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
650
|
+
this.target = input.required(...ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []);
|
|
651
|
+
this.trigger = input("click", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
652
|
+
this.userClass = input(void 0, {
|
|
653
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
654
|
+
alias: "class",
|
|
655
|
+
transform: (value) => classInputToClass(value)
|
|
656
|
+
});
|
|
657
|
+
this.width = input(...ngDevMode ? [void 0, { debugName: "width" }] : /* istanbul ignore next */ []);
|
|
658
|
+
this.setMenuItemClickSubscription();
|
|
659
|
+
this.setNavigationSubscription();
|
|
660
|
+
effect(() => {
|
|
661
|
+
const target = this.#element(this.target());
|
|
662
|
+
const trigger = this.trigger();
|
|
663
|
+
untracked(() => {
|
|
664
|
+
this.#triggerSubscription?.unsubscribe();
|
|
665
|
+
this.#triggerSubscription = target ? this.setTriggerSubscription(target, trigger) : null;
|
|
666
|
+
});
|
|
667
|
+
});
|
|
668
|
+
this.#destroyRef.onDestroy(() => {
|
|
669
|
+
this.#destroyed = true;
|
|
670
|
+
this.#triggerSubscription?.unsubscribe();
|
|
671
|
+
const open = this.#open;
|
|
672
|
+
if (open) {
|
|
673
|
+
open.restoreFocus = false;
|
|
674
|
+
open.ref?.close();
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
clearFocusRestoration() {
|
|
679
|
+
if (this.#open) this.#open.restoreFocus = false;
|
|
680
|
+
}
|
|
681
|
+
closeMenu() {
|
|
682
|
+
this.#open?.ref?.close();
|
|
683
|
+
}
|
|
684
|
+
openMenu(viaContextMenuKey = false) {
|
|
685
|
+
const targetElement = this.#element(this.target());
|
|
686
|
+
if (!targetElement) return;
|
|
687
|
+
const center = targetElement.getBoundingClientRect();
|
|
688
|
+
if (viaContextMenuKey) {
|
|
689
|
+
const contextMenuEvent = new MouseEvent("contextmenu", {
|
|
690
|
+
bubbles: true,
|
|
691
|
+
cancelable: true,
|
|
692
|
+
clientX: center.left + center.width / 2,
|
|
693
|
+
clientY: center.top + center.height / 2,
|
|
694
|
+
button: -1
|
|
695
|
+
});
|
|
696
|
+
const ownerDocument = targetElement.ownerDocument;
|
|
697
|
+
const suppressNativeContextMenu = (nativeEvent) => {
|
|
698
|
+
if (nativeEvent.isTrusted) {
|
|
699
|
+
nativeEvent.preventDefault();
|
|
700
|
+
ownerDocument.removeEventListener("contextmenu", suppressNativeContextMenu, { capture: true });
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
this.#suppressNextTrustedContextMenu = true;
|
|
704
|
+
ownerDocument.addEventListener("contextmenu", suppressNativeContextMenu, { capture: true });
|
|
705
|
+
targetElement.dispatchEvent(contextMenuEvent);
|
|
706
|
+
rxTimeout(this.#destroyRef, () => {
|
|
707
|
+
this.#suppressNextTrustedContextMenu = false;
|
|
708
|
+
ownerDocument.removeEventListener("contextmenu", suppressNativeContextMenu, { capture: true });
|
|
709
|
+
}, 500);
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
const event = new MouseEvent(this.trigger(), {
|
|
713
|
+
bubbles: true,
|
|
714
|
+
cancelable: true
|
|
715
|
+
});
|
|
716
|
+
targetElement.dispatchEvent(event);
|
|
717
|
+
}
|
|
718
|
+
openMenuViaKeyboard(viaContextMenuKey = false, focus = "first") {
|
|
719
|
+
this.#pendingInitialFocus = focus;
|
|
720
|
+
this.openMenu(viaContextMenuKey);
|
|
721
|
+
this.#pendingInitialFocus = null;
|
|
722
|
+
}
|
|
723
|
+
setRestoreFocusForKeyboard() {
|
|
724
|
+
if (this.#open) this.#open.restoreFocus = true;
|
|
725
|
+
}
|
|
726
|
+
#element(value) {
|
|
727
|
+
const element = value instanceof ElementRef ? value.nativeElement : value;
|
|
728
|
+
return element instanceof HTMLElement ? element : null;
|
|
729
|
+
}
|
|
730
|
+
closeFromList(state, options) {
|
|
731
|
+
if (this.#open !== state || !state.ref) return;
|
|
732
|
+
if (options.focusLeftTo) {
|
|
733
|
+
const target = this.#element(this.target());
|
|
734
|
+
const anchor = this.#element(this.anchor());
|
|
735
|
+
if (target?.contains(options.focusLeftTo) || anchor?.contains(options.focusLeftTo)) return;
|
|
736
|
+
state.restoreFocus = false;
|
|
737
|
+
}
|
|
738
|
+
if (options.tab) {
|
|
739
|
+
state.restoreFocus = false;
|
|
740
|
+
state.returnFocusTo?.focus();
|
|
741
|
+
}
|
|
742
|
+
state.ref.close();
|
|
743
|
+
}
|
|
744
|
+
createMenu(event, state) {
|
|
745
|
+
const anchor = this.getPopupAnchor(event);
|
|
746
|
+
const anchorConnectionPoint = this.openAtPointer() ? void 0 : this.anchorConnectionPoint();
|
|
747
|
+
const targetId = this.#element(this.target())?.id ?? "";
|
|
748
|
+
const data = {
|
|
749
|
+
ariaLabel: this.ariaLabel(),
|
|
750
|
+
closeMenu: (options) => this.closeFromList(state, options),
|
|
751
|
+
initialFocus: this.#pendingInitialFocus,
|
|
752
|
+
isRoot: true,
|
|
753
|
+
items: this.menuItems,
|
|
754
|
+
labelledBy: this.ariaLabelledBy() || targetId || null,
|
|
755
|
+
level: 0,
|
|
756
|
+
menuId: this.menuId(),
|
|
757
|
+
menuItemClick$: this.#menuItemClick$,
|
|
758
|
+
minWidth: computed(() => toCssValue(this.minWidth()) ?? null),
|
|
759
|
+
navigate$: this.#navigate$,
|
|
760
|
+
parentClose$: state.close$,
|
|
761
|
+
popupGroupTemplate: computed(() => this.groupTemplateConfig()?.template ?? null),
|
|
762
|
+
popupIconTemplate: computed(() => this.iconTemplateConfig()?.template ?? null),
|
|
763
|
+
popupShortcutTemplate: computed(() => this.shortcutTemplateConfig()?.template ?? null),
|
|
764
|
+
popupTextTemplate: computed(() => this.textTemplateConfig()?.template ?? null),
|
|
765
|
+
rounded: computed(() => this.rounded()),
|
|
766
|
+
size: computed(() => this.size()),
|
|
767
|
+
width: computed(() => toCssValue(this.width()) ?? null)
|
|
768
|
+
};
|
|
769
|
+
return this.#popupService.create({
|
|
770
|
+
anchor,
|
|
771
|
+
anchorConnectionPoint,
|
|
772
|
+
closeOnScroll: true,
|
|
773
|
+
content: PopupMenuListComponent,
|
|
774
|
+
data,
|
|
775
|
+
minWidth: toCssValue(this.minWidth()),
|
|
776
|
+
offset: this.offset(),
|
|
777
|
+
popupClass: this.userClass(),
|
|
778
|
+
popupConnectionPoint: this.openAtPointer() ? void 0 : this.popupConnectionPoint(),
|
|
779
|
+
restoreFocus: false,
|
|
780
|
+
width: toCssValue(this.width())
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
getPopupAnchor(event) {
|
|
784
|
+
const anchorElement = this.anchor();
|
|
785
|
+
const targetElement = this.target();
|
|
786
|
+
const targetInput = anchorElement ?? targetElement;
|
|
787
|
+
const atPointer = this.openAtPointer();
|
|
788
|
+
const actualTargetElement = targetInput instanceof ElementRef ? targetInput.nativeElement : targetInput;
|
|
789
|
+
let anchor;
|
|
790
|
+
if (atPointer) {
|
|
791
|
+
if (event.button < 0) {
|
|
792
|
+
const rect = actualTargetElement.getBoundingClientRect();
|
|
793
|
+
anchor = {
|
|
794
|
+
x: rect.left + rect.width / 2,
|
|
795
|
+
y: rect.top + rect.height / 2
|
|
796
|
+
};
|
|
797
|
+
} else anchor = {
|
|
798
|
+
x: event.x,
|
|
799
|
+
y: event.y
|
|
800
|
+
};
|
|
801
|
+
} else anchor = actualTargetElement;
|
|
802
|
+
return anchor;
|
|
803
|
+
}
|
|
804
|
+
openFor(event, targetElement) {
|
|
805
|
+
const opener = this.#document.activeElement;
|
|
806
|
+
const hasOpener = !!opener && opener !== this.#document.body;
|
|
807
|
+
const openerInMenu = hasOpener && !!opener.closest("mona-popup-menu-list");
|
|
808
|
+
const targetFocusable = targetElement.tabIndex >= 0 || openerInMenu && targetElement.hasAttribute("tabindex");
|
|
809
|
+
const viaKeyboard = this.#pendingInitialFocus !== null;
|
|
810
|
+
let returnFocusTo = null;
|
|
811
|
+
if (hasOpener && !openerInMenu && (viaKeyboard || targetElement.contains(opener))) returnFocusTo = opener;
|
|
812
|
+
else if (targetFocusable) returnFocusTo = targetElement;
|
|
813
|
+
else if (hasOpener && !openerInMenu) returnFocusTo = opener;
|
|
814
|
+
const state = {
|
|
815
|
+
close$: new Subject(),
|
|
816
|
+
ref: null,
|
|
817
|
+
restoreFocus: true,
|
|
818
|
+
returnFocusTo
|
|
819
|
+
};
|
|
820
|
+
const ref = this.createMenu(event, state);
|
|
821
|
+
state.ref = ref;
|
|
822
|
+
this.#open = state;
|
|
823
|
+
this.open.emit();
|
|
824
|
+
ref.beforeClose.pipe(takeUntil(ref.closed)).subscribe((e) => {
|
|
825
|
+
if (this.#destroyed) return;
|
|
826
|
+
const popupCloseEvent = e.result;
|
|
827
|
+
const closeEvent = new PopupMenuCloseEvent(popupCloseEvent);
|
|
828
|
+
this.close.emit(closeEvent);
|
|
829
|
+
if (closeEvent.isDefaultPrevented()) e.preventDefault();
|
|
830
|
+
});
|
|
831
|
+
ref.closeStart.pipe(take(1)).subscribe(() => {
|
|
832
|
+
state.close$.next();
|
|
833
|
+
if (this.#open === state) this.#open = null;
|
|
834
|
+
});
|
|
835
|
+
ref.closed.pipe(take(1)).subscribe(() => {
|
|
836
|
+
state.close$.complete();
|
|
837
|
+
if (this.#open === state) this.#open = null;
|
|
838
|
+
if (state.restoreFocus && this.#open === null) this.restoreFocus(state.returnFocusTo);
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
restoreFocus(element) {
|
|
842
|
+
if (!element || !element.isConnected) return;
|
|
843
|
+
const active = this.#document.activeElement;
|
|
844
|
+
if (active && active !== this.#document.body && !active.closest("mona-popup-menu-list")) return;
|
|
845
|
+
element.focus();
|
|
846
|
+
}
|
|
847
|
+
setMenuItemClickSubscription() {
|
|
848
|
+
this.#menuItemClick$.pipe(takeUntilDestroyed(this.#destroyRef), tap((event) => {
|
|
849
|
+
this.menuClick.emit(event);
|
|
850
|
+
if (event.isDefaultPrevented()) return;
|
|
851
|
+
const item = event.item;
|
|
852
|
+
if (isMenuOwnedCheckState(item)) item.checked.set(event.checked === true);
|
|
853
|
+
this.closeMenu();
|
|
854
|
+
})).subscribe();
|
|
855
|
+
}
|
|
856
|
+
setNavigationSubscription() {
|
|
857
|
+
this.#navigate$.pipe(takeUntilDestroyed(this.#destroyRef), tap((e) => this.navigate.emit(e))).subscribe();
|
|
858
|
+
}
|
|
859
|
+
setTriggerSubscription(targetElement, trigger) {
|
|
860
|
+
return fromEvent(targetElement, trigger).pipe(takeUntilDestroyed(this.#destroyRef), tap((e) => e.preventDefault())).subscribe((e) => {
|
|
861
|
+
if (e.isTrusted && this.#suppressNextTrustedContextMenu) {
|
|
862
|
+
this.#suppressNextTrustedContextMenu = false;
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
if (trigger === "contextmenu" && handledContextMenuEvents.has(e)) return;
|
|
866
|
+
const open = this.#open;
|
|
867
|
+
if (open) {
|
|
868
|
+
if (trigger !== "contextmenu" && !this.openAtPointer()) {
|
|
869
|
+
open.ref?.close();
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
open.restoreFocus = false;
|
|
873
|
+
open.ref?.close();
|
|
874
|
+
this.#open = null;
|
|
875
|
+
}
|
|
876
|
+
if (trigger === "contextmenu") handledContextMenuEvents.add(e);
|
|
877
|
+
this.openFor(e, targetElement);
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
static {
|
|
881
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
882
|
+
minVersion: "12.0.0",
|
|
883
|
+
version: "22.2.6",
|
|
884
|
+
ngImport: i0,
|
|
885
|
+
type: PopupMenuComponent,
|
|
886
|
+
deps: [],
|
|
887
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
static {
|
|
891
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
892
|
+
minVersion: "17.2.0",
|
|
893
|
+
version: "22.2.6",
|
|
894
|
+
type: PopupMenuComponent,
|
|
895
|
+
isStandalone: true,
|
|
896
|
+
selector: "mona-popup-menu",
|
|
897
|
+
inputs: {
|
|
898
|
+
anchor: {
|
|
899
|
+
classPropertyName: "anchor",
|
|
900
|
+
publicName: "anchor",
|
|
901
|
+
isSignal: true,
|
|
902
|
+
isRequired: false,
|
|
903
|
+
transformFunction: null
|
|
904
|
+
},
|
|
905
|
+
anchorConnectionPoint: {
|
|
906
|
+
classPropertyName: "anchorConnectionPoint",
|
|
907
|
+
publicName: "anchorConnectionPoint",
|
|
908
|
+
isSignal: true,
|
|
909
|
+
isRequired: false,
|
|
910
|
+
transformFunction: null
|
|
911
|
+
},
|
|
912
|
+
ariaLabel: {
|
|
913
|
+
classPropertyName: "ariaLabel",
|
|
914
|
+
publicName: "aria-label",
|
|
915
|
+
isSignal: true,
|
|
916
|
+
isRequired: false,
|
|
917
|
+
transformFunction: null
|
|
918
|
+
},
|
|
919
|
+
ariaLabelledBy: {
|
|
920
|
+
classPropertyName: "ariaLabelledBy",
|
|
921
|
+
publicName: "aria-labelledby",
|
|
922
|
+
isSignal: true,
|
|
923
|
+
isRequired: false,
|
|
924
|
+
transformFunction: null
|
|
925
|
+
},
|
|
926
|
+
items: {
|
|
927
|
+
classPropertyName: "items",
|
|
928
|
+
publicName: "items",
|
|
929
|
+
isSignal: true,
|
|
930
|
+
isRequired: false,
|
|
931
|
+
transformFunction: null
|
|
932
|
+
},
|
|
933
|
+
menuId: {
|
|
934
|
+
classPropertyName: "menuId",
|
|
935
|
+
publicName: "id",
|
|
936
|
+
isSignal: true,
|
|
937
|
+
isRequired: false,
|
|
938
|
+
transformFunction: null
|
|
939
|
+
},
|
|
940
|
+
minWidth: {
|
|
941
|
+
classPropertyName: "minWidth",
|
|
942
|
+
publicName: "minWidth",
|
|
943
|
+
isSignal: true,
|
|
944
|
+
isRequired: false,
|
|
945
|
+
transformFunction: null
|
|
946
|
+
},
|
|
947
|
+
offset: {
|
|
948
|
+
classPropertyName: "offset",
|
|
949
|
+
publicName: "offset",
|
|
950
|
+
isSignal: true,
|
|
951
|
+
isRequired: false,
|
|
952
|
+
transformFunction: null
|
|
953
|
+
},
|
|
954
|
+
openAtPointer: {
|
|
955
|
+
classPropertyName: "openAtPointer",
|
|
956
|
+
publicName: "openAtPointer",
|
|
957
|
+
isSignal: true,
|
|
958
|
+
isRequired: false,
|
|
959
|
+
transformFunction: null
|
|
960
|
+
},
|
|
961
|
+
popupConnectionPoint: {
|
|
962
|
+
classPropertyName: "popupConnectionPoint",
|
|
963
|
+
publicName: "popupConnectionPoint",
|
|
964
|
+
isSignal: true,
|
|
965
|
+
isRequired: false,
|
|
966
|
+
transformFunction: null
|
|
967
|
+
},
|
|
968
|
+
rounded: {
|
|
969
|
+
classPropertyName: "rounded",
|
|
970
|
+
publicName: "rounded",
|
|
971
|
+
isSignal: true,
|
|
972
|
+
isRequired: false,
|
|
973
|
+
transformFunction: null
|
|
974
|
+
},
|
|
975
|
+
size: {
|
|
976
|
+
classPropertyName: "size",
|
|
977
|
+
publicName: "size",
|
|
978
|
+
isSignal: true,
|
|
979
|
+
isRequired: false,
|
|
980
|
+
transformFunction: null
|
|
981
|
+
},
|
|
982
|
+
target: {
|
|
983
|
+
classPropertyName: "target",
|
|
984
|
+
publicName: "target",
|
|
985
|
+
isSignal: true,
|
|
986
|
+
isRequired: true,
|
|
987
|
+
transformFunction: null
|
|
988
|
+
},
|
|
989
|
+
trigger: {
|
|
990
|
+
classPropertyName: "trigger",
|
|
991
|
+
publicName: "trigger",
|
|
992
|
+
isSignal: true,
|
|
993
|
+
isRequired: false,
|
|
994
|
+
transformFunction: null
|
|
995
|
+
},
|
|
996
|
+
userClass: {
|
|
997
|
+
classPropertyName: "userClass",
|
|
998
|
+
publicName: "class",
|
|
999
|
+
isSignal: true,
|
|
1000
|
+
isRequired: false,
|
|
1001
|
+
transformFunction: null
|
|
1002
|
+
},
|
|
1003
|
+
width: {
|
|
1004
|
+
classPropertyName: "width",
|
|
1005
|
+
publicName: "width",
|
|
1006
|
+
isSignal: true,
|
|
1007
|
+
isRequired: false,
|
|
1008
|
+
transformFunction: null
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
outputs: {
|
|
1012
|
+
close: "close",
|
|
1013
|
+
menuClick: "menuClick",
|
|
1014
|
+
navigate: "navigate",
|
|
1015
|
+
open: "open"
|
|
1016
|
+
},
|
|
1017
|
+
host: { properties: {
|
|
1018
|
+
"attr.aria-label": "null",
|
|
1019
|
+
"attr.aria-labelledby": "null"
|
|
1020
|
+
} },
|
|
1021
|
+
queries: [
|
|
1022
|
+
{
|
|
1023
|
+
propertyName: "groupTemplateConfig",
|
|
1024
|
+
first: true,
|
|
1025
|
+
predicate: PopupMenuGroupTemplateToken,
|
|
1026
|
+
isSignal: true
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
propertyName: "iconTemplateConfig",
|
|
1030
|
+
first: true,
|
|
1031
|
+
predicate: PopupMenuIconTemplateToken,
|
|
1032
|
+
isSignal: true
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
propertyName: "nestedComponents",
|
|
1036
|
+
predicate: PopupMenuToken,
|
|
1037
|
+
isSignal: true
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
propertyName: "shortcutTemplateConfig",
|
|
1041
|
+
first: true,
|
|
1042
|
+
predicate: PopupMenuShortcutTemplateToken,
|
|
1043
|
+
isSignal: true
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
propertyName: "textTemplateConfig",
|
|
1047
|
+
first: true,
|
|
1048
|
+
predicate: PopupMenuTextTemplateToken,
|
|
1049
|
+
isSignal: true
|
|
1050
|
+
}
|
|
1051
|
+
],
|
|
1052
|
+
ngImport: i0,
|
|
1053
|
+
template: "",
|
|
1054
|
+
isInline: true
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1059
|
+
minVersion: "12.0.0",
|
|
1060
|
+
version: "22.2.6",
|
|
1061
|
+
ngImport: i0,
|
|
1062
|
+
type: PopupMenuComponent,
|
|
1063
|
+
decorators: [{
|
|
1064
|
+
type: Component,
|
|
1065
|
+
args: [{
|
|
1066
|
+
selector: "mona-popup-menu",
|
|
1067
|
+
template: "",
|
|
1068
|
+
host: {
|
|
1069
|
+
"[attr.aria-label]": "null",
|
|
1070
|
+
"[attr.aria-labelledby]": "null"
|
|
1071
|
+
}
|
|
1072
|
+
}]
|
|
1073
|
+
}],
|
|
1074
|
+
ctorParameters: () => [],
|
|
1075
|
+
propDecorators: {
|
|
1076
|
+
groupTemplateConfig: [{
|
|
1077
|
+
type: i0.ContentChild,
|
|
1078
|
+
args: [i0.forwardRef(() => PopupMenuGroupTemplateToken), {
|
|
1079
|
+
descendants: false,
|
|
1080
|
+
isSignal: true
|
|
1081
|
+
}]
|
|
1082
|
+
}],
|
|
1083
|
+
iconTemplateConfig: [{
|
|
1084
|
+
type: i0.ContentChild,
|
|
1085
|
+
args: [i0.forwardRef(() => PopupMenuIconTemplateToken), {
|
|
1086
|
+
descendants: false,
|
|
1087
|
+
isSignal: true
|
|
1088
|
+
}]
|
|
1089
|
+
}],
|
|
1090
|
+
nestedComponents: [{
|
|
1091
|
+
type: i0.ContentChildren,
|
|
1092
|
+
args: [i0.forwardRef(() => PopupMenuToken), {
|
|
1093
|
+
descendants: false,
|
|
1094
|
+
isSignal: true
|
|
1095
|
+
}]
|
|
1096
|
+
}],
|
|
1097
|
+
shortcutTemplateConfig: [{
|
|
1098
|
+
type: i0.ContentChild,
|
|
1099
|
+
args: [i0.forwardRef(() => PopupMenuShortcutTemplateToken), {
|
|
1100
|
+
descendants: false,
|
|
1101
|
+
isSignal: true
|
|
1102
|
+
}]
|
|
1103
|
+
}],
|
|
1104
|
+
textTemplateConfig: [{
|
|
1105
|
+
type: i0.ContentChild,
|
|
1106
|
+
args: [i0.forwardRef(() => PopupMenuTextTemplateToken), {
|
|
1107
|
+
descendants: false,
|
|
1108
|
+
isSignal: true
|
|
1109
|
+
}]
|
|
1110
|
+
}],
|
|
1111
|
+
anchor: [{
|
|
1112
|
+
type: i0.Input,
|
|
1113
|
+
args: [{
|
|
1114
|
+
isSignal: true,
|
|
1115
|
+
alias: "anchor",
|
|
1116
|
+
required: false
|
|
1117
|
+
}]
|
|
1118
|
+
}],
|
|
1119
|
+
anchorConnectionPoint: [{
|
|
1120
|
+
type: i0.Input,
|
|
1121
|
+
args: [{
|
|
1122
|
+
isSignal: true,
|
|
1123
|
+
alias: "anchorConnectionPoint",
|
|
1124
|
+
required: false
|
|
1125
|
+
}]
|
|
1126
|
+
}],
|
|
1127
|
+
ariaLabel: [{
|
|
1128
|
+
type: i0.Input,
|
|
1129
|
+
args: [{
|
|
1130
|
+
isSignal: true,
|
|
1131
|
+
alias: "aria-label",
|
|
1132
|
+
required: false
|
|
1133
|
+
}]
|
|
1134
|
+
}],
|
|
1135
|
+
ariaLabelledBy: [{
|
|
1136
|
+
type: i0.Input,
|
|
1137
|
+
args: [{
|
|
1138
|
+
isSignal: true,
|
|
1139
|
+
alias: "aria-labelledby",
|
|
1140
|
+
required: false
|
|
1141
|
+
}]
|
|
1142
|
+
}],
|
|
1143
|
+
close: [{
|
|
1144
|
+
type: i0.Output,
|
|
1145
|
+
args: ["close"]
|
|
1146
|
+
}],
|
|
1147
|
+
items: [{
|
|
1148
|
+
type: i0.Input,
|
|
1149
|
+
args: [{
|
|
1150
|
+
isSignal: true,
|
|
1151
|
+
alias: "items",
|
|
1152
|
+
required: false
|
|
1153
|
+
}]
|
|
1154
|
+
}],
|
|
1155
|
+
menuClick: [{
|
|
1156
|
+
type: i0.Output,
|
|
1157
|
+
args: ["menuClick"]
|
|
1158
|
+
}],
|
|
1159
|
+
menuId: [{
|
|
1160
|
+
type: i0.Input,
|
|
1161
|
+
args: [{
|
|
1162
|
+
isSignal: true,
|
|
1163
|
+
alias: "id",
|
|
1164
|
+
required: false
|
|
1165
|
+
}]
|
|
1166
|
+
}],
|
|
1167
|
+
minWidth: [{
|
|
1168
|
+
type: i0.Input,
|
|
1169
|
+
args: [{
|
|
1170
|
+
isSignal: true,
|
|
1171
|
+
alias: "minWidth",
|
|
1172
|
+
required: false
|
|
1173
|
+
}]
|
|
1174
|
+
}],
|
|
1175
|
+
navigate: [{
|
|
1176
|
+
type: i0.Output,
|
|
1177
|
+
args: ["navigate"]
|
|
1178
|
+
}],
|
|
1179
|
+
offset: [{
|
|
1180
|
+
type: i0.Input,
|
|
1181
|
+
args: [{
|
|
1182
|
+
isSignal: true,
|
|
1183
|
+
alias: "offset",
|
|
1184
|
+
required: false
|
|
1185
|
+
}]
|
|
1186
|
+
}],
|
|
1187
|
+
open: [{
|
|
1188
|
+
type: i0.Output,
|
|
1189
|
+
args: ["open"]
|
|
1190
|
+
}],
|
|
1191
|
+
openAtPointer: [{
|
|
1192
|
+
type: i0.Input,
|
|
1193
|
+
args: [{
|
|
1194
|
+
isSignal: true,
|
|
1195
|
+
alias: "openAtPointer",
|
|
1196
|
+
required: false
|
|
1197
|
+
}]
|
|
1198
|
+
}],
|
|
1199
|
+
popupConnectionPoint: [{
|
|
1200
|
+
type: i0.Input,
|
|
1201
|
+
args: [{
|
|
1202
|
+
isSignal: true,
|
|
1203
|
+
alias: "popupConnectionPoint",
|
|
1204
|
+
required: false
|
|
1205
|
+
}]
|
|
1206
|
+
}],
|
|
1207
|
+
rounded: [{
|
|
1208
|
+
type: i0.Input,
|
|
1209
|
+
args: [{
|
|
1210
|
+
isSignal: true,
|
|
1211
|
+
alias: "rounded",
|
|
1212
|
+
required: false
|
|
1213
|
+
}]
|
|
1214
|
+
}],
|
|
1215
|
+
size: [{
|
|
1216
|
+
type: i0.Input,
|
|
1217
|
+
args: [{
|
|
1218
|
+
isSignal: true,
|
|
1219
|
+
alias: "size",
|
|
1220
|
+
required: false
|
|
1221
|
+
}]
|
|
1222
|
+
}],
|
|
1223
|
+
target: [{
|
|
1224
|
+
type: i0.Input,
|
|
1225
|
+
args: [{
|
|
1226
|
+
isSignal: true,
|
|
1227
|
+
alias: "target",
|
|
1228
|
+
required: true
|
|
1229
|
+
}]
|
|
1230
|
+
}],
|
|
1231
|
+
trigger: [{
|
|
1232
|
+
type: i0.Input,
|
|
1233
|
+
args: [{
|
|
1234
|
+
isSignal: true,
|
|
1235
|
+
alias: "trigger",
|
|
1236
|
+
required: false
|
|
1237
|
+
}]
|
|
1238
|
+
}],
|
|
1239
|
+
userClass: [{
|
|
1240
|
+
type: i0.Input,
|
|
1241
|
+
args: [{
|
|
1242
|
+
isSignal: true,
|
|
1243
|
+
alias: "class",
|
|
1244
|
+
required: false
|
|
1245
|
+
}]
|
|
1246
|
+
}],
|
|
1247
|
+
width: [{
|
|
1248
|
+
type: i0.Input,
|
|
1249
|
+
args: [{
|
|
1250
|
+
isSignal: true,
|
|
1251
|
+
alias: "width",
|
|
1252
|
+
required: false
|
|
1253
|
+
}]
|
|
1254
|
+
}]
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
var PopupMenuCheckboxItemComponent = class PopupMenuCheckboxItemComponent {
|
|
1258
|
+
constructor() {
|
|
1259
|
+
this.#click$ = new Subject();
|
|
1260
|
+
this.#destroyRef = inject(DestroyRef);
|
|
1261
|
+
this.#uid = createElementControlId();
|
|
1262
|
+
this.shortcutTemplateConfig = contentChild(PopupMenuShortcutTemplateToken, {
|
|
1263
|
+
...ngDevMode ? { debugName: "shortcutTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1264
|
+
descendants: false
|
|
1265
|
+
});
|
|
1266
|
+
this.textTemplateConfig = contentChild(PopupMenuTextTemplateToken, {
|
|
1267
|
+
...ngDevMode ? { debugName: "textTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1268
|
+
descendants: false
|
|
1269
|
+
});
|
|
1270
|
+
this.checked = model(false, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
1271
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1272
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
1273
|
+
this.menuClick = output();
|
|
1274
|
+
this.origin = PopupMenuOrigin.Popup;
|
|
1275
|
+
this.type = PopupMenuItemType.CheckboxMenuItem;
|
|
1276
|
+
this.value = input(...ngDevMode ? [void 0, { debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1277
|
+
}
|
|
1278
|
+
#click$;
|
|
1279
|
+
#destroyRef;
|
|
1280
|
+
#uid;
|
|
1281
|
+
getPopupMenuItem() {
|
|
1282
|
+
return [{
|
|
1283
|
+
checkable: true,
|
|
1284
|
+
checked: computed(() => this.checked()),
|
|
1285
|
+
click$: this.#click$,
|
|
1286
|
+
disabled: this.disabled(),
|
|
1287
|
+
group: Symbol(),
|
|
1288
|
+
groupTemplate: null,
|
|
1289
|
+
iconTemplate: null,
|
|
1290
|
+
items: [],
|
|
1291
|
+
label: this.label(),
|
|
1292
|
+
shortcutTemplate: computed(() => this.shortcutTemplateConfig()?.template ?? null),
|
|
1293
|
+
textTemplate: computed(() => this.textTemplateConfig()?.template ?? null),
|
|
1294
|
+
uid: this.#uid,
|
|
1295
|
+
value: computed(() => this.value())
|
|
1296
|
+
}];
|
|
1297
|
+
}
|
|
1298
|
+
ngOnInit() {
|
|
1299
|
+
this.setSubscriptions();
|
|
1300
|
+
}
|
|
1301
|
+
setSubscriptions() {
|
|
1302
|
+
this.#click$.pipe(takeUntilDestroyed(this.#destroyRef), tap((e) => {
|
|
1303
|
+
this.menuClick.emit(e);
|
|
1304
|
+
if (!e.isDefaultPrevented()) this.checked.set(e.checked === true);
|
|
1305
|
+
})).subscribe();
|
|
1306
|
+
}
|
|
1307
|
+
static {
|
|
1308
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1309
|
+
minVersion: "12.0.0",
|
|
1310
|
+
version: "22.2.6",
|
|
1311
|
+
ngImport: i0,
|
|
1312
|
+
type: PopupMenuCheckboxItemComponent,
|
|
1313
|
+
deps: [],
|
|
1314
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
static {
|
|
1318
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1319
|
+
minVersion: "17.2.0",
|
|
1320
|
+
version: "22.2.6",
|
|
1321
|
+
type: PopupMenuCheckboxItemComponent,
|
|
1322
|
+
isStandalone: true,
|
|
1323
|
+
selector: "mona-popup-menu-checkbox-item",
|
|
1324
|
+
inputs: {
|
|
1325
|
+
checked: {
|
|
1326
|
+
classPropertyName: "checked",
|
|
1327
|
+
publicName: "checked",
|
|
1328
|
+
isSignal: true,
|
|
1329
|
+
isRequired: false,
|
|
1330
|
+
transformFunction: null
|
|
1331
|
+
},
|
|
1332
|
+
disabled: {
|
|
1333
|
+
classPropertyName: "disabled",
|
|
1334
|
+
publicName: "disabled",
|
|
1335
|
+
isSignal: true,
|
|
1336
|
+
isRequired: false,
|
|
1337
|
+
transformFunction: null
|
|
1338
|
+
},
|
|
1339
|
+
label: {
|
|
1340
|
+
classPropertyName: "label",
|
|
1341
|
+
publicName: "label",
|
|
1342
|
+
isSignal: true,
|
|
1343
|
+
isRequired: false,
|
|
1344
|
+
transformFunction: null
|
|
1345
|
+
},
|
|
1346
|
+
value: {
|
|
1347
|
+
classPropertyName: "value",
|
|
1348
|
+
publicName: "value",
|
|
1349
|
+
isSignal: true,
|
|
1350
|
+
isRequired: false,
|
|
1351
|
+
transformFunction: null
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
outputs: {
|
|
1355
|
+
checked: "checkedChange",
|
|
1356
|
+
menuClick: "menuClick"
|
|
1357
|
+
},
|
|
1358
|
+
providers: [{
|
|
1359
|
+
provide: PopupMenuToken,
|
|
1360
|
+
useExisting: forwardRef(() => PopupMenuCheckboxItemComponent)
|
|
1361
|
+
}],
|
|
1362
|
+
queries: [{
|
|
1363
|
+
propertyName: "shortcutTemplateConfig",
|
|
1364
|
+
first: true,
|
|
1365
|
+
predicate: PopupMenuShortcutTemplateToken,
|
|
1366
|
+
isSignal: true
|
|
1367
|
+
}, {
|
|
1368
|
+
propertyName: "textTemplateConfig",
|
|
1369
|
+
first: true,
|
|
1370
|
+
predicate: PopupMenuTextTemplateToken,
|
|
1371
|
+
isSignal: true
|
|
1372
|
+
}],
|
|
1373
|
+
ngImport: i0,
|
|
1374
|
+
template: "",
|
|
1375
|
+
isInline: true
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
};
|
|
1379
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1380
|
+
minVersion: "12.0.0",
|
|
1381
|
+
version: "22.2.6",
|
|
1382
|
+
ngImport: i0,
|
|
1383
|
+
type: PopupMenuCheckboxItemComponent,
|
|
1384
|
+
decorators: [{
|
|
1385
|
+
type: Component,
|
|
1386
|
+
args: [{
|
|
1387
|
+
selector: "mona-popup-menu-checkbox-item",
|
|
1388
|
+
template: "",
|
|
1389
|
+
providers: [{
|
|
1390
|
+
provide: PopupMenuToken,
|
|
1391
|
+
useExisting: forwardRef(() => PopupMenuCheckboxItemComponent)
|
|
1392
|
+
}]
|
|
1393
|
+
}]
|
|
1394
|
+
}],
|
|
1395
|
+
propDecorators: {
|
|
1396
|
+
shortcutTemplateConfig: [{
|
|
1397
|
+
type: i0.ContentChild,
|
|
1398
|
+
args: [i0.forwardRef(() => PopupMenuShortcutTemplateToken), {
|
|
1399
|
+
descendants: false,
|
|
1400
|
+
isSignal: true
|
|
1401
|
+
}]
|
|
1402
|
+
}],
|
|
1403
|
+
textTemplateConfig: [{
|
|
1404
|
+
type: i0.ContentChild,
|
|
1405
|
+
args: [i0.forwardRef(() => PopupMenuTextTemplateToken), {
|
|
1406
|
+
descendants: false,
|
|
1407
|
+
isSignal: true
|
|
1408
|
+
}]
|
|
1409
|
+
}],
|
|
1410
|
+
checked: [{
|
|
1411
|
+
type: i0.Input,
|
|
1412
|
+
args: [{
|
|
1413
|
+
isSignal: true,
|
|
1414
|
+
alias: "checked",
|
|
1415
|
+
required: false
|
|
1416
|
+
}]
|
|
1417
|
+
}, {
|
|
1418
|
+
type: i0.Output,
|
|
1419
|
+
args: ["checkedChange"]
|
|
1420
|
+
}],
|
|
1421
|
+
disabled: [{
|
|
1422
|
+
type: i0.Input,
|
|
1423
|
+
args: [{
|
|
1424
|
+
isSignal: true,
|
|
1425
|
+
alias: "disabled",
|
|
1426
|
+
required: false
|
|
1427
|
+
}]
|
|
1428
|
+
}],
|
|
1429
|
+
label: [{
|
|
1430
|
+
type: i0.Input,
|
|
1431
|
+
args: [{
|
|
1432
|
+
isSignal: true,
|
|
1433
|
+
alias: "label",
|
|
1434
|
+
required: false
|
|
1435
|
+
}]
|
|
1436
|
+
}],
|
|
1437
|
+
menuClick: [{
|
|
1438
|
+
type: i0.Output,
|
|
1439
|
+
args: ["menuClick"]
|
|
1440
|
+
}],
|
|
1441
|
+
value: [{
|
|
1442
|
+
type: i0.Input,
|
|
1443
|
+
args: [{
|
|
1444
|
+
isSignal: true,
|
|
1445
|
+
alias: "value",
|
|
1446
|
+
required: false
|
|
1447
|
+
}]
|
|
1448
|
+
}]
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
var PopupMenuItemComponent = class PopupMenuItemComponent {
|
|
1452
|
+
constructor() {
|
|
1453
|
+
this.#click$ = new Subject();
|
|
1454
|
+
this.#destroyRef = inject(DestroyRef);
|
|
1455
|
+
this.#uid = createElementControlId();
|
|
1456
|
+
this.iconTemplateConfig = contentChild(PopupMenuIconTemplateToken, {
|
|
1457
|
+
...ngDevMode ? { debugName: "iconTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1458
|
+
descendants: false
|
|
1459
|
+
});
|
|
1460
|
+
this.items = contentChildren(PopupMenuToken, {
|
|
1461
|
+
...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
|
|
1462
|
+
descendants: false
|
|
1463
|
+
});
|
|
1464
|
+
this.shortcutTemplateConfig = contentChild(PopupMenuShortcutTemplateToken, {
|
|
1465
|
+
...ngDevMode ? { debugName: "shortcutTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1466
|
+
descendants: false
|
|
1467
|
+
});
|
|
1468
|
+
this.textTemplateConfig = contentChild(PopupMenuTextTemplateToken, {
|
|
1469
|
+
...ngDevMode ? { debugName: "textTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1470
|
+
descendants: false
|
|
1471
|
+
});
|
|
1472
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1473
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
1474
|
+
this.menuClick = output();
|
|
1475
|
+
this.origin = PopupMenuOrigin.Popup;
|
|
1476
|
+
this.type = PopupMenuItemType.MenuItem;
|
|
1477
|
+
this.value = input(...ngDevMode ? [void 0, { debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1478
|
+
}
|
|
1479
|
+
#click$;
|
|
1480
|
+
#destroyRef;
|
|
1481
|
+
#uid;
|
|
1482
|
+
getPopupMenuItem() {
|
|
1483
|
+
return [{
|
|
1484
|
+
click$: this.#click$,
|
|
1485
|
+
disabled: this.disabled(),
|
|
1486
|
+
group: Symbol(),
|
|
1487
|
+
groupTemplate: null,
|
|
1488
|
+
iconTemplate: computed(() => this.iconTemplateConfig()?.template ?? null),
|
|
1489
|
+
items: selectMany(this.items().map((item) => item.getPopupMenuItem()), (i) => i).toArray(),
|
|
1490
|
+
label: this.label(),
|
|
1491
|
+
shortcutTemplate: computed(() => this.shortcutTemplateConfig()?.template ?? null),
|
|
1492
|
+
textTemplate: computed(() => this.textTemplateConfig()?.template ?? null),
|
|
1493
|
+
uid: this.#uid,
|
|
1494
|
+
value: computed(() => this.value())
|
|
1495
|
+
}];
|
|
1496
|
+
}
|
|
1497
|
+
ngOnInit() {
|
|
1498
|
+
this.setSubscriptions();
|
|
1499
|
+
}
|
|
1500
|
+
setSubscriptions() {
|
|
1501
|
+
this.#click$.pipe(takeUntilDestroyed(this.#destroyRef), tap((e) => this.menuClick.emit(e))).subscribe();
|
|
1502
|
+
}
|
|
1503
|
+
static {
|
|
1504
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1505
|
+
minVersion: "12.0.0",
|
|
1506
|
+
version: "22.2.6",
|
|
1507
|
+
ngImport: i0,
|
|
1508
|
+
type: PopupMenuItemComponent,
|
|
1509
|
+
deps: [],
|
|
1510
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1511
|
+
});
|
|
1512
|
+
}
|
|
1513
|
+
static {
|
|
1514
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1515
|
+
minVersion: "17.2.0",
|
|
1516
|
+
version: "22.2.6",
|
|
1517
|
+
type: PopupMenuItemComponent,
|
|
1518
|
+
isStandalone: true,
|
|
1519
|
+
selector: "mona-popup-menu-item",
|
|
1520
|
+
inputs: {
|
|
1521
|
+
disabled: {
|
|
1522
|
+
classPropertyName: "disabled",
|
|
1523
|
+
publicName: "disabled",
|
|
1524
|
+
isSignal: true,
|
|
1525
|
+
isRequired: false,
|
|
1526
|
+
transformFunction: null
|
|
1527
|
+
},
|
|
1528
|
+
label: {
|
|
1529
|
+
classPropertyName: "label",
|
|
1530
|
+
publicName: "label",
|
|
1531
|
+
isSignal: true,
|
|
1532
|
+
isRequired: false,
|
|
1533
|
+
transformFunction: null
|
|
1534
|
+
},
|
|
1535
|
+
value: {
|
|
1536
|
+
classPropertyName: "value",
|
|
1537
|
+
publicName: "value",
|
|
1538
|
+
isSignal: true,
|
|
1539
|
+
isRequired: false,
|
|
1540
|
+
transformFunction: null
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1543
|
+
outputs: { menuClick: "menuClick" },
|
|
1544
|
+
providers: [{
|
|
1545
|
+
provide: PopupMenuToken,
|
|
1546
|
+
useExisting: forwardRef(() => PopupMenuItemComponent)
|
|
1547
|
+
}],
|
|
1548
|
+
queries: [
|
|
1549
|
+
{
|
|
1550
|
+
propertyName: "iconTemplateConfig",
|
|
1551
|
+
first: true,
|
|
1552
|
+
predicate: PopupMenuIconTemplateToken,
|
|
1553
|
+
isSignal: true
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
propertyName: "items",
|
|
1557
|
+
predicate: PopupMenuToken,
|
|
1558
|
+
isSignal: true
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
propertyName: "shortcutTemplateConfig",
|
|
1562
|
+
first: true,
|
|
1563
|
+
predicate: PopupMenuShortcutTemplateToken,
|
|
1564
|
+
isSignal: true
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
propertyName: "textTemplateConfig",
|
|
1568
|
+
first: true,
|
|
1569
|
+
predicate: PopupMenuTextTemplateToken,
|
|
1570
|
+
isSignal: true
|
|
1571
|
+
}
|
|
1572
|
+
],
|
|
1573
|
+
ngImport: i0,
|
|
1574
|
+
template: "",
|
|
1575
|
+
isInline: true
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1579
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1580
|
+
minVersion: "12.0.0",
|
|
1581
|
+
version: "22.2.6",
|
|
1582
|
+
ngImport: i0,
|
|
1583
|
+
type: PopupMenuItemComponent,
|
|
1584
|
+
decorators: [{
|
|
1585
|
+
type: Component,
|
|
1586
|
+
args: [{
|
|
1587
|
+
selector: "mona-popup-menu-item",
|
|
1588
|
+
template: "",
|
|
1589
|
+
providers: [{
|
|
1590
|
+
provide: PopupMenuToken,
|
|
1591
|
+
useExisting: forwardRef(() => PopupMenuItemComponent)
|
|
1592
|
+
}]
|
|
1593
|
+
}]
|
|
1594
|
+
}],
|
|
1595
|
+
propDecorators: {
|
|
1596
|
+
iconTemplateConfig: [{
|
|
1597
|
+
type: i0.ContentChild,
|
|
1598
|
+
args: [i0.forwardRef(() => PopupMenuIconTemplateToken), {
|
|
1599
|
+
descendants: false,
|
|
1600
|
+
isSignal: true
|
|
1601
|
+
}]
|
|
1602
|
+
}],
|
|
1603
|
+
items: [{
|
|
1604
|
+
type: i0.ContentChildren,
|
|
1605
|
+
args: [i0.forwardRef(() => PopupMenuToken), {
|
|
1606
|
+
descendants: false,
|
|
1607
|
+
isSignal: true
|
|
1608
|
+
}]
|
|
1609
|
+
}],
|
|
1610
|
+
shortcutTemplateConfig: [{
|
|
1611
|
+
type: i0.ContentChild,
|
|
1612
|
+
args: [i0.forwardRef(() => PopupMenuShortcutTemplateToken), {
|
|
1613
|
+
descendants: false,
|
|
1614
|
+
isSignal: true
|
|
1615
|
+
}]
|
|
1616
|
+
}],
|
|
1617
|
+
textTemplateConfig: [{
|
|
1618
|
+
type: i0.ContentChild,
|
|
1619
|
+
args: [i0.forwardRef(() => PopupMenuTextTemplateToken), {
|
|
1620
|
+
descendants: false,
|
|
1621
|
+
isSignal: true
|
|
1622
|
+
}]
|
|
1623
|
+
}],
|
|
1624
|
+
disabled: [{
|
|
1625
|
+
type: i0.Input,
|
|
1626
|
+
args: [{
|
|
1627
|
+
isSignal: true,
|
|
1628
|
+
alias: "disabled",
|
|
1629
|
+
required: false
|
|
1630
|
+
}]
|
|
1631
|
+
}],
|
|
1632
|
+
label: [{
|
|
1633
|
+
type: i0.Input,
|
|
1634
|
+
args: [{
|
|
1635
|
+
isSignal: true,
|
|
1636
|
+
alias: "label",
|
|
1637
|
+
required: false
|
|
1638
|
+
}]
|
|
1639
|
+
}],
|
|
1640
|
+
menuClick: [{
|
|
1641
|
+
type: i0.Output,
|
|
1642
|
+
args: ["menuClick"]
|
|
1643
|
+
}],
|
|
1644
|
+
value: [{
|
|
1645
|
+
type: i0.Input,
|
|
1646
|
+
args: [{
|
|
1647
|
+
isSignal: true,
|
|
1648
|
+
alias: "value",
|
|
1649
|
+
required: false
|
|
1650
|
+
}]
|
|
1651
|
+
}]
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
var PopupMenuGroupComponent = class PopupMenuGroupComponent {
|
|
1655
|
+
constructor() {
|
|
1656
|
+
this.#groupKey = computed(() => Symbol(this.title() ?? ""), ...ngDevMode ? [{ debugName: "#groupKey" }] : /* istanbul ignore next */ []);
|
|
1657
|
+
this.groupTemplateConfig = contentChild(PopupMenuGroupTemplateToken, {
|
|
1658
|
+
...ngDevMode ? { debugName: "groupTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1659
|
+
descendants: false
|
|
1660
|
+
});
|
|
1661
|
+
this.items = contentChildren(PopupMenuToken, {
|
|
1662
|
+
...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
|
|
1663
|
+
descendants: false
|
|
1664
|
+
});
|
|
1665
|
+
this.origin = PopupMenuOrigin.Popup;
|
|
1666
|
+
this.title = input(...ngDevMode ? [void 0, { debugName: "title" }] : /* istanbul ignore next */ []);
|
|
1667
|
+
this.type = PopupMenuItemType.MenuGroup;
|
|
1668
|
+
}
|
|
1669
|
+
#groupKey;
|
|
1670
|
+
getPopupMenuItem() {
|
|
1671
|
+
const group = this.#groupKey();
|
|
1672
|
+
const menuItems = this.items().map((i) => i.getPopupMenuItem().map((item) => ({
|
|
1673
|
+
...item,
|
|
1674
|
+
group,
|
|
1675
|
+
groupTemplate: computed(() => this.groupTemplateConfig()?.template ?? null)
|
|
1676
|
+
})));
|
|
1677
|
+
return selectMany(menuItems, (i) => i).toArray();
|
|
1678
|
+
}
|
|
1679
|
+
static {
|
|
1680
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1681
|
+
minVersion: "12.0.0",
|
|
1682
|
+
version: "22.2.6",
|
|
1683
|
+
ngImport: i0,
|
|
1684
|
+
type: PopupMenuGroupComponent,
|
|
1685
|
+
deps: [],
|
|
1686
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1689
|
+
static {
|
|
1690
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1691
|
+
minVersion: "17.2.0",
|
|
1692
|
+
version: "22.2.6",
|
|
1693
|
+
type: PopupMenuGroupComponent,
|
|
1694
|
+
isStandalone: true,
|
|
1695
|
+
selector: "mona-popup-menu-group",
|
|
1696
|
+
inputs: { title: {
|
|
1697
|
+
classPropertyName: "title",
|
|
1698
|
+
publicName: "title",
|
|
1699
|
+
isSignal: true,
|
|
1700
|
+
isRequired: false,
|
|
1701
|
+
transformFunction: null
|
|
1702
|
+
} },
|
|
1703
|
+
providers: [{
|
|
1704
|
+
provide: PopupMenuToken,
|
|
1705
|
+
useExisting: forwardRef(() => PopupMenuGroupComponent)
|
|
1706
|
+
}],
|
|
1707
|
+
queries: [{
|
|
1708
|
+
propertyName: "groupTemplateConfig",
|
|
1709
|
+
first: true,
|
|
1710
|
+
predicate: PopupMenuGroupTemplateToken,
|
|
1711
|
+
isSignal: true
|
|
1712
|
+
}, {
|
|
1713
|
+
propertyName: "items",
|
|
1714
|
+
predicate: PopupMenuToken,
|
|
1715
|
+
isSignal: true
|
|
1716
|
+
}],
|
|
1717
|
+
ngImport: i0,
|
|
1718
|
+
template: ``,
|
|
1719
|
+
isInline: true
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
};
|
|
1723
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1724
|
+
minVersion: "12.0.0",
|
|
1725
|
+
version: "22.2.6",
|
|
1726
|
+
ngImport: i0,
|
|
1727
|
+
type: PopupMenuGroupComponent,
|
|
1728
|
+
decorators: [{
|
|
1729
|
+
type: Component,
|
|
1730
|
+
args: [{
|
|
1731
|
+
selector: "mona-popup-menu-group",
|
|
1732
|
+
template: ``,
|
|
1733
|
+
providers: [{
|
|
1734
|
+
provide: PopupMenuToken,
|
|
1735
|
+
useExisting: forwardRef(() => PopupMenuGroupComponent)
|
|
1736
|
+
}]
|
|
1737
|
+
}]
|
|
1738
|
+
}],
|
|
1739
|
+
propDecorators: {
|
|
1740
|
+
groupTemplateConfig: [{
|
|
1741
|
+
type: i0.ContentChild,
|
|
1742
|
+
args: [i0.forwardRef(() => PopupMenuGroupTemplateToken), {
|
|
1743
|
+
descendants: false,
|
|
1744
|
+
isSignal: true
|
|
1745
|
+
}]
|
|
1746
|
+
}],
|
|
1747
|
+
items: [{
|
|
1748
|
+
type: i0.ContentChildren,
|
|
1749
|
+
args: [i0.forwardRef(() => PopupMenuToken), {
|
|
1750
|
+
descendants: false,
|
|
1751
|
+
isSignal: true
|
|
1752
|
+
}]
|
|
1753
|
+
}],
|
|
1754
|
+
title: [{
|
|
1755
|
+
type: i0.Input,
|
|
1756
|
+
args: [{
|
|
1757
|
+
isSignal: true,
|
|
1758
|
+
alias: "title",
|
|
1759
|
+
required: false
|
|
1760
|
+
}]
|
|
1761
|
+
}]
|
|
1762
|
+
}
|
|
1763
|
+
});
|
|
1764
|
+
var PopupMenuRadioGroupComponent = class PopupMenuRadioGroupComponent {
|
|
1765
|
+
constructor() {
|
|
1766
|
+
this.#click$ = new Subject();
|
|
1767
|
+
this.#destroyRef = inject(DestroyRef);
|
|
1768
|
+
this.#groupKey = computed(() => Symbol(this.title()), ...ngDevMode ? [{ debugName: "#groupKey" }] : /* istanbul ignore next */ []);
|
|
1769
|
+
this.#itemClicks = /* @__PURE__ */ new WeakMap();
|
|
1770
|
+
this.groupTemplateConfig = contentChild(PopupMenuGroupTemplateToken, {
|
|
1771
|
+
...ngDevMode ? { debugName: "groupTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1772
|
+
descendants: false
|
|
1773
|
+
});
|
|
1774
|
+
this.items = contentChildren(PopupMenuRadioItemToken, {
|
|
1775
|
+
...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
|
|
1776
|
+
descendants: false
|
|
1777
|
+
});
|
|
1778
|
+
this.origin = PopupMenuOrigin.Popup;
|
|
1779
|
+
this.title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
1780
|
+
this.type = PopupMenuItemType.RadioGroup;
|
|
1781
|
+
this.value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1782
|
+
}
|
|
1783
|
+
#click$;
|
|
1784
|
+
#destroyRef;
|
|
1785
|
+
#groupKey;
|
|
1786
|
+
#itemClicks;
|
|
1787
|
+
getPopupMenuItem() {
|
|
1788
|
+
const group = this.#groupKey();
|
|
1789
|
+
const menuItems = this.items().map((i) => i.getPopupMenuItem().map((item) => {
|
|
1790
|
+
const groupItem = {
|
|
1791
|
+
...item,
|
|
1792
|
+
click$: this.#click$,
|
|
1793
|
+
group,
|
|
1794
|
+
groupTemplate: computed(() => this.groupTemplateConfig()?.template ?? null),
|
|
1795
|
+
radio: true,
|
|
1796
|
+
selected: computed(() => item.value?.() === this.value())
|
|
1797
|
+
};
|
|
1798
|
+
if (item.click$) this.#itemClicks.set(groupItem, item.click$);
|
|
1799
|
+
return groupItem;
|
|
1800
|
+
}));
|
|
1801
|
+
return selectMany(menuItems, (i) => i).toArray();
|
|
1802
|
+
}
|
|
1803
|
+
ngOnInit() {
|
|
1804
|
+
this.setSubscription();
|
|
1805
|
+
}
|
|
1806
|
+
setSubscription() {
|
|
1807
|
+
this.#click$.pipe(takeUntilDestroyed(this.#destroyRef), filter((e) => e.item.radio == true), tap((event) => {
|
|
1808
|
+
this.#itemClicks.get(event.item)?.next(event);
|
|
1809
|
+
if (event.isDefaultPrevented()) return;
|
|
1810
|
+
const value = event.item.value?.();
|
|
1811
|
+
if (typeof value === "string") this.value.set(value);
|
|
1812
|
+
})).subscribe();
|
|
1813
|
+
}
|
|
1814
|
+
static {
|
|
1815
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1816
|
+
minVersion: "12.0.0",
|
|
1817
|
+
version: "22.2.6",
|
|
1818
|
+
ngImport: i0,
|
|
1819
|
+
type: PopupMenuRadioGroupComponent,
|
|
1820
|
+
deps: [],
|
|
1821
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1822
|
+
});
|
|
1823
|
+
}
|
|
1824
|
+
static {
|
|
1825
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1826
|
+
minVersion: "17.2.0",
|
|
1827
|
+
version: "22.2.6",
|
|
1828
|
+
type: PopupMenuRadioGroupComponent,
|
|
1829
|
+
isStandalone: true,
|
|
1830
|
+
selector: "mona-popup-menu-radio-group",
|
|
1831
|
+
inputs: {
|
|
1832
|
+
title: {
|
|
1833
|
+
classPropertyName: "title",
|
|
1834
|
+
publicName: "title",
|
|
1835
|
+
isSignal: true,
|
|
1836
|
+
isRequired: false,
|
|
1837
|
+
transformFunction: null
|
|
1838
|
+
},
|
|
1839
|
+
value: {
|
|
1840
|
+
classPropertyName: "value",
|
|
1841
|
+
publicName: "value",
|
|
1842
|
+
isSignal: true,
|
|
1843
|
+
isRequired: false,
|
|
1844
|
+
transformFunction: null
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
outputs: { value: "valueChange" },
|
|
1848
|
+
providers: [{
|
|
1849
|
+
provide: PopupMenuToken,
|
|
1850
|
+
useExisting: forwardRef(() => PopupMenuRadioGroupComponent)
|
|
1851
|
+
}],
|
|
1852
|
+
queries: [{
|
|
1853
|
+
propertyName: "groupTemplateConfig",
|
|
1854
|
+
first: true,
|
|
1855
|
+
predicate: PopupMenuGroupTemplateToken,
|
|
1856
|
+
isSignal: true
|
|
1857
|
+
}, {
|
|
1858
|
+
propertyName: "items",
|
|
1859
|
+
predicate: PopupMenuRadioItemToken,
|
|
1860
|
+
isSignal: true
|
|
1861
|
+
}],
|
|
1862
|
+
ngImport: i0,
|
|
1863
|
+
template: "",
|
|
1864
|
+
isInline: true
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
};
|
|
1868
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1869
|
+
minVersion: "12.0.0",
|
|
1870
|
+
version: "22.2.6",
|
|
1871
|
+
ngImport: i0,
|
|
1872
|
+
type: PopupMenuRadioGroupComponent,
|
|
1873
|
+
decorators: [{
|
|
1874
|
+
type: Component,
|
|
1875
|
+
args: [{
|
|
1876
|
+
selector: "mona-popup-menu-radio-group",
|
|
1877
|
+
template: "",
|
|
1878
|
+
providers: [{
|
|
1879
|
+
provide: PopupMenuToken,
|
|
1880
|
+
useExisting: forwardRef(() => PopupMenuRadioGroupComponent)
|
|
1881
|
+
}]
|
|
1882
|
+
}]
|
|
1883
|
+
}],
|
|
1884
|
+
propDecorators: {
|
|
1885
|
+
groupTemplateConfig: [{
|
|
1886
|
+
type: i0.ContentChild,
|
|
1887
|
+
args: [i0.forwardRef(() => PopupMenuGroupTemplateToken), {
|
|
1888
|
+
descendants: false,
|
|
1889
|
+
isSignal: true
|
|
1890
|
+
}]
|
|
1891
|
+
}],
|
|
1892
|
+
items: [{
|
|
1893
|
+
type: i0.ContentChildren,
|
|
1894
|
+
args: [i0.forwardRef(() => PopupMenuRadioItemToken), {
|
|
1895
|
+
descendants: false,
|
|
1896
|
+
isSignal: true
|
|
1897
|
+
}]
|
|
1898
|
+
}],
|
|
1899
|
+
title: [{
|
|
1900
|
+
type: i0.Input,
|
|
1901
|
+
args: [{
|
|
1902
|
+
isSignal: true,
|
|
1903
|
+
alias: "title",
|
|
1904
|
+
required: false
|
|
1905
|
+
}]
|
|
1906
|
+
}],
|
|
1907
|
+
value: [{
|
|
1908
|
+
type: i0.Input,
|
|
1909
|
+
args: [{
|
|
1910
|
+
isSignal: true,
|
|
1911
|
+
alias: "value",
|
|
1912
|
+
required: false
|
|
1913
|
+
}]
|
|
1914
|
+
}, {
|
|
1915
|
+
type: i0.Output,
|
|
1916
|
+
args: ["valueChange"]
|
|
1917
|
+
}]
|
|
1918
|
+
}
|
|
1919
|
+
});
|
|
1920
|
+
var PopupMenuRadioItemComponent = class PopupMenuRadioItemComponent {
|
|
1921
|
+
constructor() {
|
|
1922
|
+
this.#click$ = new Subject();
|
|
1923
|
+
this.#destroyRef = inject(DestroyRef);
|
|
1924
|
+
this.#uid = createElementControlId();
|
|
1925
|
+
this.shortcutTemplateConfig = contentChild(PopupMenuShortcutTemplateToken, {
|
|
1926
|
+
...ngDevMode ? { debugName: "shortcutTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1927
|
+
descendants: false
|
|
1928
|
+
});
|
|
1929
|
+
this.textTemplateConfig = contentChild(PopupMenuTextTemplateToken, {
|
|
1930
|
+
...ngDevMode ? { debugName: "textTemplateConfig" } : /* istanbul ignore next */ {},
|
|
1931
|
+
descendants: false
|
|
1932
|
+
});
|
|
1933
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1934
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
1935
|
+
this.menuClick = output();
|
|
1936
|
+
this.origin = PopupMenuOrigin.Popup;
|
|
1937
|
+
this.type = PopupMenuItemType.RadioItem;
|
|
1938
|
+
this.value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
1939
|
+
}
|
|
1940
|
+
#click$;
|
|
1941
|
+
#destroyRef;
|
|
1942
|
+
#uid;
|
|
1943
|
+
getPopupMenuItem() {
|
|
1944
|
+
return [{
|
|
1945
|
+
click$: this.#click$,
|
|
1946
|
+
disabled: this.disabled(),
|
|
1947
|
+
group: Symbol(),
|
|
1948
|
+
groupTemplate: null,
|
|
1949
|
+
iconTemplate: null,
|
|
1950
|
+
items: [],
|
|
1951
|
+
label: this.label(),
|
|
1952
|
+
radio: true,
|
|
1953
|
+
shortcutTemplate: computed(() => this.shortcutTemplateConfig()?.template ?? null),
|
|
1954
|
+
textTemplate: computed(() => this.textTemplateConfig()?.template ?? null),
|
|
1955
|
+
uid: this.#uid,
|
|
1956
|
+
value: computed(() => this.value())
|
|
1957
|
+
}];
|
|
1958
|
+
}
|
|
1959
|
+
ngOnInit() {
|
|
1960
|
+
this.setSubscription();
|
|
1961
|
+
}
|
|
1962
|
+
setSubscription() {
|
|
1963
|
+
this.#click$.pipe(takeUntilDestroyed(this.#destroyRef), tap((e) => this.menuClick.emit(e))).subscribe();
|
|
1964
|
+
}
|
|
1965
|
+
static {
|
|
1966
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1967
|
+
minVersion: "12.0.0",
|
|
1968
|
+
version: "22.2.6",
|
|
1969
|
+
ngImport: i0,
|
|
1970
|
+
type: PopupMenuRadioItemComponent,
|
|
1971
|
+
deps: [],
|
|
1972
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
static {
|
|
1976
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1977
|
+
minVersion: "17.2.0",
|
|
1978
|
+
version: "22.2.6",
|
|
1979
|
+
type: PopupMenuRadioItemComponent,
|
|
1980
|
+
isStandalone: true,
|
|
1981
|
+
selector: "mona-popup-menu-radio-item",
|
|
1982
|
+
inputs: {
|
|
1983
|
+
disabled: {
|
|
1984
|
+
classPropertyName: "disabled",
|
|
1985
|
+
publicName: "disabled",
|
|
1986
|
+
isSignal: true,
|
|
1987
|
+
isRequired: false,
|
|
1988
|
+
transformFunction: null
|
|
1989
|
+
},
|
|
1990
|
+
label: {
|
|
1991
|
+
classPropertyName: "label",
|
|
1992
|
+
publicName: "label",
|
|
1993
|
+
isSignal: true,
|
|
1994
|
+
isRequired: false,
|
|
1995
|
+
transformFunction: null
|
|
1996
|
+
},
|
|
1997
|
+
value: {
|
|
1998
|
+
classPropertyName: "value",
|
|
1999
|
+
publicName: "value",
|
|
2000
|
+
isSignal: true,
|
|
2001
|
+
isRequired: true,
|
|
2002
|
+
transformFunction: null
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
outputs: { menuClick: "menuClick" },
|
|
2006
|
+
providers: [{
|
|
2007
|
+
provide: PopupMenuToken,
|
|
2008
|
+
useExisting: forwardRef(() => PopupMenuRadioItemComponent)
|
|
2009
|
+
}, {
|
|
2010
|
+
provide: PopupMenuRadioItemToken,
|
|
2011
|
+
useExisting: forwardRef(() => PopupMenuRadioItemComponent)
|
|
2012
|
+
}],
|
|
2013
|
+
queries: [{
|
|
2014
|
+
propertyName: "shortcutTemplateConfig",
|
|
2015
|
+
first: true,
|
|
2016
|
+
predicate: PopupMenuShortcutTemplateToken,
|
|
2017
|
+
isSignal: true
|
|
2018
|
+
}, {
|
|
2019
|
+
propertyName: "textTemplateConfig",
|
|
2020
|
+
first: true,
|
|
2021
|
+
predicate: PopupMenuTextTemplateToken,
|
|
2022
|
+
isSignal: true
|
|
2023
|
+
}],
|
|
2024
|
+
ngImport: i0,
|
|
2025
|
+
template: "",
|
|
2026
|
+
isInline: true
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
};
|
|
2030
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2031
|
+
minVersion: "12.0.0",
|
|
2032
|
+
version: "22.2.6",
|
|
2033
|
+
ngImport: i0,
|
|
2034
|
+
type: PopupMenuRadioItemComponent,
|
|
2035
|
+
decorators: [{
|
|
2036
|
+
type: Component,
|
|
2037
|
+
args: [{
|
|
2038
|
+
selector: "mona-popup-menu-radio-item",
|
|
2039
|
+
template: "",
|
|
2040
|
+
providers: [{
|
|
2041
|
+
provide: PopupMenuToken,
|
|
2042
|
+
useExisting: forwardRef(() => PopupMenuRadioItemComponent)
|
|
2043
|
+
}, {
|
|
2044
|
+
provide: PopupMenuRadioItemToken,
|
|
2045
|
+
useExisting: forwardRef(() => PopupMenuRadioItemComponent)
|
|
2046
|
+
}]
|
|
2047
|
+
}]
|
|
2048
|
+
}],
|
|
2049
|
+
propDecorators: {
|
|
2050
|
+
shortcutTemplateConfig: [{
|
|
2051
|
+
type: i0.ContentChild,
|
|
2052
|
+
args: [i0.forwardRef(() => PopupMenuShortcutTemplateToken), {
|
|
2053
|
+
descendants: false,
|
|
2054
|
+
isSignal: true
|
|
2055
|
+
}]
|
|
2056
|
+
}],
|
|
2057
|
+
textTemplateConfig: [{
|
|
2058
|
+
type: i0.ContentChild,
|
|
2059
|
+
args: [i0.forwardRef(() => PopupMenuTextTemplateToken), {
|
|
2060
|
+
descendants: false,
|
|
2061
|
+
isSignal: true
|
|
2062
|
+
}]
|
|
2063
|
+
}],
|
|
2064
|
+
disabled: [{
|
|
2065
|
+
type: i0.Input,
|
|
2066
|
+
args: [{
|
|
2067
|
+
isSignal: true,
|
|
2068
|
+
alias: "disabled",
|
|
2069
|
+
required: false
|
|
2070
|
+
}]
|
|
2071
|
+
}],
|
|
2072
|
+
label: [{
|
|
2073
|
+
type: i0.Input,
|
|
2074
|
+
args: [{
|
|
2075
|
+
isSignal: true,
|
|
2076
|
+
alias: "label",
|
|
2077
|
+
required: false
|
|
2078
|
+
}]
|
|
2079
|
+
}],
|
|
2080
|
+
menuClick: [{
|
|
2081
|
+
type: i0.Output,
|
|
2082
|
+
args: ["menuClick"]
|
|
2083
|
+
}],
|
|
2084
|
+
value: [{
|
|
2085
|
+
type: i0.Input,
|
|
2086
|
+
args: [{
|
|
2087
|
+
isSignal: true,
|
|
2088
|
+
alias: "value",
|
|
2089
|
+
required: true
|
|
2090
|
+
}]
|
|
2091
|
+
}]
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
var PopupMenuSeparatorComponent = class PopupMenuSeparatorComponent {
|
|
2095
|
+
constructor() {
|
|
2096
|
+
this.origin = PopupMenuOrigin.Popup;
|
|
2097
|
+
this.type = PopupMenuItemType.Separator;
|
|
2098
|
+
}
|
|
2099
|
+
getPopupMenuItem() {
|
|
2100
|
+
return [{
|
|
2101
|
+
disabled: true,
|
|
2102
|
+
group: Symbol(),
|
|
2103
|
+
groupTemplate: null,
|
|
2104
|
+
iconTemplate: null,
|
|
2105
|
+
items: [],
|
|
2106
|
+
label: "",
|
|
2107
|
+
separator: true,
|
|
2108
|
+
shortcutTemplate: null,
|
|
2109
|
+
textTemplate: null,
|
|
2110
|
+
uid: ""
|
|
2111
|
+
}];
|
|
2112
|
+
}
|
|
2113
|
+
static {
|
|
2114
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2115
|
+
minVersion: "12.0.0",
|
|
2116
|
+
version: "22.2.6",
|
|
2117
|
+
ngImport: i0,
|
|
2118
|
+
type: PopupMenuSeparatorComponent,
|
|
2119
|
+
deps: [],
|
|
2120
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
static {
|
|
2124
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2125
|
+
minVersion: "14.0.0",
|
|
2126
|
+
version: "22.2.6",
|
|
2127
|
+
type: PopupMenuSeparatorComponent,
|
|
2128
|
+
isStandalone: true,
|
|
2129
|
+
selector: "mona-popup-menu-separator",
|
|
2130
|
+
providers: [{
|
|
2131
|
+
provide: PopupMenuToken,
|
|
2132
|
+
useExisting: forwardRef(() => PopupMenuSeparatorComponent)
|
|
2133
|
+
}],
|
|
2134
|
+
ngImport: i0,
|
|
2135
|
+
template: "",
|
|
2136
|
+
isInline: true
|
|
2137
|
+
});
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2140
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2141
|
+
minVersion: "12.0.0",
|
|
2142
|
+
version: "22.2.6",
|
|
2143
|
+
ngImport: i0,
|
|
2144
|
+
type: PopupMenuSeparatorComponent,
|
|
2145
|
+
decorators: [{
|
|
2146
|
+
type: Component,
|
|
2147
|
+
args: [{
|
|
2148
|
+
selector: "mona-popup-menu-separator",
|
|
2149
|
+
template: "",
|
|
2150
|
+
providers: [{
|
|
2151
|
+
provide: PopupMenuToken,
|
|
2152
|
+
useExisting: forwardRef(() => PopupMenuSeparatorComponent)
|
|
2153
|
+
}]
|
|
2154
|
+
}]
|
|
2155
|
+
}]
|
|
2156
|
+
});
|
|
2157
|
+
var PopupMenuGroupTemplateDirective = class PopupMenuGroupTemplateDirective {
|
|
2158
|
+
constructor() {
|
|
2159
|
+
this.origin = PopupMenuTemplateOrigin.Popup;
|
|
2160
|
+
this.template = inject(TemplateRef);
|
|
2161
|
+
this.type = PopupMenuTemplateType.Group;
|
|
2162
|
+
}
|
|
2163
|
+
static {
|
|
2164
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2165
|
+
minVersion: "12.0.0",
|
|
2166
|
+
version: "22.2.6",
|
|
2167
|
+
ngImport: i0,
|
|
2168
|
+
type: PopupMenuGroupTemplateDirective,
|
|
2169
|
+
deps: [],
|
|
2170
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2171
|
+
});
|
|
2172
|
+
}
|
|
2173
|
+
static {
|
|
2174
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
2175
|
+
minVersion: "14.0.0",
|
|
2176
|
+
version: "22.2.6",
|
|
2177
|
+
type: PopupMenuGroupTemplateDirective,
|
|
2178
|
+
isStandalone: true,
|
|
2179
|
+
selector: "ng-template[monaPopupMenuGroupTemplate]",
|
|
2180
|
+
providers: [{
|
|
2181
|
+
provide: PopupMenuGroupTemplateToken,
|
|
2182
|
+
useExisting: forwardRef(() => PopupMenuGroupTemplateDirective)
|
|
2183
|
+
}],
|
|
2184
|
+
ngImport: i0
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
};
|
|
2188
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2189
|
+
minVersion: "12.0.0",
|
|
2190
|
+
version: "22.2.6",
|
|
2191
|
+
ngImport: i0,
|
|
2192
|
+
type: PopupMenuGroupTemplateDirective,
|
|
2193
|
+
decorators: [{
|
|
2194
|
+
type: Directive,
|
|
2195
|
+
args: [{
|
|
2196
|
+
selector: "ng-template[monaPopupMenuGroupTemplate]",
|
|
2197
|
+
providers: [{
|
|
2198
|
+
provide: PopupMenuGroupTemplateToken,
|
|
2199
|
+
useExisting: forwardRef(() => PopupMenuGroupTemplateDirective)
|
|
2200
|
+
}]
|
|
2201
|
+
}]
|
|
2202
|
+
}]
|
|
2203
|
+
});
|
|
2204
|
+
var PopupMenuIconTemplateDirective = class PopupMenuIconTemplateDirective {
|
|
2205
|
+
constructor() {
|
|
2206
|
+
this.origin = PopupMenuTemplateOrigin.Popup;
|
|
2207
|
+
this.template = inject(TemplateRef);
|
|
2208
|
+
this.type = PopupMenuTemplateType.Icon;
|
|
2209
|
+
}
|
|
2210
|
+
static {
|
|
2211
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2212
|
+
minVersion: "12.0.0",
|
|
2213
|
+
version: "22.2.6",
|
|
2214
|
+
ngImport: i0,
|
|
2215
|
+
type: PopupMenuIconTemplateDirective,
|
|
2216
|
+
deps: [],
|
|
2217
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2218
|
+
});
|
|
2219
|
+
}
|
|
2220
|
+
static {
|
|
2221
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
2222
|
+
minVersion: "14.0.0",
|
|
2223
|
+
version: "22.2.6",
|
|
2224
|
+
type: PopupMenuIconTemplateDirective,
|
|
2225
|
+
isStandalone: true,
|
|
2226
|
+
selector: "ng-template[monaPopupMenuIconTemplate]",
|
|
2227
|
+
providers: [{
|
|
2228
|
+
provide: PopupMenuIconTemplateToken,
|
|
2229
|
+
useExisting: forwardRef(() => PopupMenuIconTemplateDirective)
|
|
2230
|
+
}],
|
|
2231
|
+
ngImport: i0
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2236
|
+
minVersion: "12.0.0",
|
|
2237
|
+
version: "22.2.6",
|
|
2238
|
+
ngImport: i0,
|
|
2239
|
+
type: PopupMenuIconTemplateDirective,
|
|
2240
|
+
decorators: [{
|
|
2241
|
+
type: Directive,
|
|
2242
|
+
args: [{
|
|
2243
|
+
selector: "ng-template[monaPopupMenuIconTemplate]",
|
|
2244
|
+
providers: [{
|
|
2245
|
+
provide: PopupMenuIconTemplateToken,
|
|
2246
|
+
useExisting: forwardRef(() => PopupMenuIconTemplateDirective)
|
|
2247
|
+
}]
|
|
2248
|
+
}]
|
|
2249
|
+
}]
|
|
2250
|
+
});
|
|
2251
|
+
var PopupMenuShortcutTemplateDirective = class PopupMenuShortcutTemplateDirective {
|
|
2252
|
+
constructor() {
|
|
2253
|
+
this.origin = PopupMenuTemplateOrigin.Popup;
|
|
2254
|
+
this.template = inject(TemplateRef);
|
|
2255
|
+
this.type = PopupMenuTemplateType.Shortcut;
|
|
2256
|
+
}
|
|
2257
|
+
static {
|
|
2258
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2259
|
+
minVersion: "12.0.0",
|
|
2260
|
+
version: "22.2.6",
|
|
2261
|
+
ngImport: i0,
|
|
2262
|
+
type: PopupMenuShortcutTemplateDirective,
|
|
2263
|
+
deps: [],
|
|
2264
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
static {
|
|
2268
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
2269
|
+
minVersion: "14.0.0",
|
|
2270
|
+
version: "22.2.6",
|
|
2271
|
+
type: PopupMenuShortcutTemplateDirective,
|
|
2272
|
+
isStandalone: true,
|
|
2273
|
+
selector: "ng-template[monaPopupMenuShortcutTemplate]",
|
|
2274
|
+
providers: [{
|
|
2275
|
+
provide: PopupMenuShortcutTemplateToken,
|
|
2276
|
+
useExisting: forwardRef(() => PopupMenuShortcutTemplateDirective)
|
|
2277
|
+
}],
|
|
2278
|
+
ngImport: i0
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2283
|
+
minVersion: "12.0.0",
|
|
2284
|
+
version: "22.2.6",
|
|
2285
|
+
ngImport: i0,
|
|
2286
|
+
type: PopupMenuShortcutTemplateDirective,
|
|
2287
|
+
decorators: [{
|
|
2288
|
+
type: Directive,
|
|
2289
|
+
args: [{
|
|
2290
|
+
selector: "ng-template[monaPopupMenuShortcutTemplate]",
|
|
2291
|
+
providers: [{
|
|
2292
|
+
provide: PopupMenuShortcutTemplateToken,
|
|
2293
|
+
useExisting: forwardRef(() => PopupMenuShortcutTemplateDirective)
|
|
2294
|
+
}]
|
|
2295
|
+
}]
|
|
2296
|
+
}]
|
|
2297
|
+
});
|
|
2298
|
+
var PopupMenuTextTemplateDirective = class PopupMenuTextTemplateDirective {
|
|
2299
|
+
constructor() {
|
|
2300
|
+
this.origin = PopupMenuTemplateOrigin.Popup;
|
|
2301
|
+
this.template = inject(TemplateRef);
|
|
2302
|
+
this.type = PopupMenuTemplateType.Text;
|
|
2303
|
+
}
|
|
2304
|
+
static {
|
|
2305
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2306
|
+
minVersion: "12.0.0",
|
|
2307
|
+
version: "22.2.6",
|
|
2308
|
+
ngImport: i0,
|
|
2309
|
+
type: PopupMenuTextTemplateDirective,
|
|
2310
|
+
deps: [],
|
|
2311
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
2312
|
+
});
|
|
2313
|
+
}
|
|
2314
|
+
static {
|
|
2315
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
2316
|
+
minVersion: "14.0.0",
|
|
2317
|
+
version: "22.2.6",
|
|
2318
|
+
type: PopupMenuTextTemplateDirective,
|
|
2319
|
+
isStandalone: true,
|
|
2320
|
+
selector: "ng-template[monaPopupMenuTextTemplate]",
|
|
2321
|
+
providers: [{
|
|
2322
|
+
provide: PopupMenuTextTemplateToken,
|
|
2323
|
+
useExisting: forwardRef(() => PopupMenuTextTemplateDirective)
|
|
2324
|
+
}],
|
|
2325
|
+
ngImport: i0
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2329
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2330
|
+
minVersion: "12.0.0",
|
|
2331
|
+
version: "22.2.6",
|
|
2332
|
+
ngImport: i0,
|
|
2333
|
+
type: PopupMenuTextTemplateDirective,
|
|
2334
|
+
decorators: [{
|
|
2335
|
+
type: Directive,
|
|
2336
|
+
args: [{
|
|
2337
|
+
selector: "ng-template[monaPopupMenuTextTemplate]",
|
|
2338
|
+
providers: [{
|
|
2339
|
+
provide: PopupMenuTextTemplateToken,
|
|
2340
|
+
useExisting: forwardRef(() => PopupMenuTextTemplateDirective)
|
|
2341
|
+
}]
|
|
2342
|
+
}]
|
|
2343
|
+
}]
|
|
2344
|
+
});
|
|
2345
|
+
export { PopupMenuCheckboxItemComponent, PopupMenuCloseEvent, PopupMenuComponent, PopupMenuGroupComponent, PopupMenuGroupTemplateDirective, PopupMenuIconTemplateDirective, PopupMenuItemClickEvent, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective };
|
|
1716
2346
|
|
|
1717
|
-
|
|
1718
|
-
//# sourceMappingURL=nanahoshi-mona-ui-popup-menu.mjs.map
|
|
2347
|
+
//# sourceMappingURL=nanahoshi-mona-ui-popup-menu.mjs.map
|