@nanahoshi/mona-ui 0.25.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/command/package.json +4 -0
- package/docs/auto-complete.md +733 -0
- package/docs/avatar.md +220 -0
- package/docs/breadcrumb.md +320 -0
- package/docs/button-group.md +392 -0
- package/docs/button.md +256 -0
- package/docs/calendar.md +515 -0
- package/docs/card.md +292 -0
- package/docs/chart.md +4058 -0
- package/docs/checkbox.md +374 -0
- package/docs/chip.md +339 -0
- package/docs/circular-progress-bar.md +287 -0
- package/docs/collapsible.md +308 -0
- package/docs/color-gradient.md +336 -0
- package/docs/color-palette.md +317 -0
- package/docs/color-picker.md +387 -0
- package/docs/combo-box.md +764 -0
- package/docs/command.md +582 -0
- package/docs/contextmenu.md +530 -0
- package/docs/date-picker.md +251 -0
- package/docs/datetime-picker.md +284 -0
- package/docs/decimal-textbox.md +260 -0
- package/docs/dialog.md +822 -0
- package/docs/dropdown-button.md +507 -0
- package/docs/dropdown-list.md +779 -0
- package/docs/editor.md +374 -0
- package/docs/expansion-panel.md +348 -0
- package/docs/fieldset.md +217 -0
- package/docs/forms.md +162 -0
- package/docs/grid.md +2053 -0
- package/docs/input.md +197 -0
- package/docs/installation.md +54 -0
- package/docs/introduction.md +46 -0
- package/docs/label.md +340 -0
- package/docs/list-box.md +637 -0
- package/docs/list-view.md +584 -0
- package/docs/menubar.md +559 -0
- package/docs/multi-select.md +765 -0
- package/docs/notification.md +460 -0
- package/docs/numeric-textbox.md +301 -0
- package/docs/otp-input.md +539 -0
- package/docs/pager.md +513 -0
- package/docs/placeholder.md +176 -0
- package/docs/popover.md +423 -0
- package/docs/popup-menu.md +658 -0
- package/docs/popup.md +617 -0
- package/docs/progress-bar.md +368 -0
- package/docs/radio-button.md +451 -0
- package/docs/range-slider.md +367 -0
- package/docs/rating.md +518 -0
- package/docs/scroll-view.md +375 -0
- package/docs/segmented.md +434 -0
- package/docs/sheet.md +348 -0
- package/docs/sidebar.md +1126 -0
- package/docs/skeleton.md +181 -0
- package/docs/slider.md +423 -0
- package/docs/spinner.md +370 -0
- package/docs/split-button.md +522 -0
- package/docs/splitter.md +342 -0
- package/docs/stepper.md +539 -0
- package/docs/switch.md +340 -0
- package/docs/tabs.md +542 -0
- package/docs/textarea.md +196 -0
- package/docs/textbox.md +332 -0
- package/docs/theming.md +403 -0
- package/docs/time-picker.md +254 -0
- package/docs/tooltip-directive.md +340 -0
- package/docs/tooltip.md +321 -0
- package/docs/tree-view.md +1018 -0
- package/docs/window.md +663 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +8 -0
- package/fesm2022/nanahoshi-mona-ui-button.mjs +12 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +5 -2
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +86 -0
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +16 -2
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-command.mjs +924 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +10 -6
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +9 -5
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +9 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +55 -1
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +5 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs → nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs → nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs} +18 -35
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs} +4653 -4529
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +168 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +19 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +32 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +15 -8
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +8 -5
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +9 -0
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +5 -0
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +14 -6
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +48 -183
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +16 -0
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +7 -2
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +9 -6
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +18 -21
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +11 -8
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +9 -1
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +16 -5
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +13 -11
- package/fesm2022/nanahoshi-mona-ui-window.mjs +12 -5
- package/i18n/catalogs/en-US.messages.json +10 -0
- package/internal/popup-menu/package.json +4 -0
- package/llms.txt +123 -0
- package/locales/ar-sa/ar-sa.messages.json +10 -0
- package/locales/de-de/de-de.messages.json +10 -0
- package/locales/es-es/es-es.messages.json +10 -0
- package/locales/fr-fr/fr-fr.messages.json +10 -0
- package/locales/id-id/id-id.messages.json +10 -0
- package/locales/it-it/it-it.messages.json +10 -0
- package/locales/ja-jp/ja-jp.messages.json +10 -0
- package/locales/ko-kr/ko-kr.messages.json +10 -0
- package/locales/pt-br/pt-br.messages.json +10 -0
- package/locales/ru-ru/ru-ru.messages.json +10 -0
- package/locales/tr-tr/tr-tr.messages.json +10 -0
- package/locales/zh-cn/zh-cn.messages.json +10 -0
- package/locales/zh-tw/zh-tw.messages.json +10 -0
- package/package.json +9 -1
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -1
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +8 -0
- package/types/nanahoshi-mona-ui-button.d.ts +12 -0
- package/types/nanahoshi-mona-ui-calendar.d.ts +3 -0
- package/types/nanahoshi-mona-ui-chart.d.ts +200 -0
- package/types/nanahoshi-mona-ui-check-box.d.ts +4 -0
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +4 -0
- package/types/nanahoshi-mona-ui-collapsible.d.ts +10 -0
- package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -1
- package/types/nanahoshi-mona-ui-command.d.ts +253 -0
- package/types/nanahoshi-mona-ui-common.d.ts +17 -1
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -2
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-dialog.d.ts +58 -1
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +7 -3
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +55 -1
- package/types/nanahoshi-mona-ui-editor.d.ts +31 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +13 -0
- package/types/nanahoshi-mona-ui-fieldset.d.ts +5 -0
- package/types/nanahoshi-mona-ui-grid.d.ts +162 -35
- package/types/nanahoshi-mona-ui-i18n.d.ts +144 -1
- package/types/nanahoshi-mona-ui-internal-list.d.ts +16 -1
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +165 -0
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +21 -2
- package/types/nanahoshi-mona-ui-internal.d.ts +4 -5
- package/types/nanahoshi-mona-ui-label.d.ts +1 -0
- package/types/nanahoshi-mona-ui-list-box.d.ts +27 -4
- package/types/nanahoshi-mona-ui-list-view.d.ts +34 -1
- package/types/nanahoshi-mona-ui-list.d.ts +1 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +10 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +10 -3
- package/types/nanahoshi-mona-ui-multi-select.d.ts +3 -3
- package/types/nanahoshi-mona-ui-notification.d.ts +9 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -1
- package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
- package/types/nanahoshi-mona-ui-pager.d.ts +5 -1
- package/types/nanahoshi-mona-ui-popover.d.ts +9 -1
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +48 -161
- package/types/nanahoshi-mona-ui-popup.d.ts +16 -0
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +4 -0
- package/types/nanahoshi-mona-ui-rating.d.ts +2 -0
- package/types/nanahoshi-mona-ui-segmented.d.ts +1 -0
- package/types/nanahoshi-mona-ui-sheet.d.ts +1 -1
- package/types/nanahoshi-mona-ui-slider.d.ts +2 -0
- package/types/nanahoshi-mona-ui-spinner.d.ts +7 -0
- package/types/nanahoshi-mona-ui-split-button.d.ts +7 -4
- package/types/nanahoshi-mona-ui-stepper.d.ts +11 -2
- package/types/nanahoshi-mona-ui-tabs.d.ts +4 -1
- package/types/nanahoshi-mona-ui-text-box.d.ts +9 -1
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-tooltip.d.ts +10 -2
- package/types/nanahoshi-mona-ui-tree-view.d.ts +6 -5
- package/types/nanahoshi-mona-ui-window.d.ts +66 -1
|
@@ -10,15 +10,19 @@ class PreventableEvent {
|
|
|
10
10
|
this.#type = type;
|
|
11
11
|
this.#event = event;
|
|
12
12
|
}
|
|
13
|
+
/** Whether `preventDefault()` was called. */
|
|
13
14
|
isDefaultPrevented() {
|
|
14
15
|
return this.#defaultPrevented;
|
|
15
16
|
}
|
|
17
|
+
/** Cancels what the event announces, such as opening or closing a popup, or closing a dialog. */
|
|
16
18
|
preventDefault() {
|
|
17
19
|
this.#defaultPrevented = true;
|
|
18
20
|
}
|
|
21
|
+
/** The DOM event that caused this one, when there is one. */
|
|
19
22
|
get originalEvent() {
|
|
20
23
|
return this.#event;
|
|
21
24
|
}
|
|
25
|
+
/** A name for the kind of event, when the component that emits it sets one. */
|
|
22
26
|
get type() {
|
|
23
27
|
return this.#type;
|
|
24
28
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { forwardRef, Directive, signal, inject, DOCUMENT, contentChildren, contentChild, TemplateRef, computed, viewChild, input, output, effect, afterRenderEffect, ElementRef, untracked, Component } from '@angular/core';
|
|
4
|
-
import { PopupMenuGroupTemplateDirective,
|
|
4
|
+
import { PopupMenuGroupTemplateDirective, PopupMenuIconTemplateDirective, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective, PopupMenuComponent, PopupMenuGroupComponent, PopupMenuCheckboxItemComponent, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent } from '@nanahoshi/mona-ui/popup-menu';
|
|
5
|
+
import { PopupMenuTemplateOrigin, PopupMenuGroupTemplateToken, PopupMenuIconTemplateToken, PopupMenuShortcutTemplateToken, PopupMenuTextTemplateToken, PopupMenuItemType, PopupMenuTemplateType, ensurePopupComponentTypes, PopupMenuOrigin, ensurePopupTemplateTypes, PopupMenuToken, PopupMenuRadioItemToken } from '@nanahoshi/mona-ui/internal/popup-menu';
|
|
5
6
|
import { createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
6
7
|
import { any } from '@mirei/ts-collections';
|
|
7
8
|
|
|
9
|
+
/** Customizes a group header's content. */
|
|
8
10
|
class ContextMenuGroupTemplateDirective extends PopupMenuGroupTemplateDirective {
|
|
9
11
|
constructor() {
|
|
10
12
|
super(...arguments);
|
|
@@ -199,8 +201,7 @@ class ContextMenuComponent {
|
|
|
199
201
|
/**
|
|
200
202
|
* @description Accessible name for the menu. When empty, the menu is named by the target if it has an `id`.
|
|
201
203
|
*/
|
|
202
|
-
this.ariaLabel = input("", /*
|
|
203
|
-
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
204
|
+
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
204
205
|
/**
|
|
205
206
|
* @description The menu items to render. When provided, these take precedence over
|
|
206
207
|
* content-projected `mona-contextmenu-item` (and related) components.
|
|
@@ -323,7 +324,7 @@ class ContextMenuComponent {
|
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
326
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ContextMenuComponent, isStandalone: true, selector: "mona-contextmenu", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "
|
|
327
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ContextMenuComponent, isStandalone: true, selector: "mona-contextmenu", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuClick: "menuClick" }, host: { properties: { "attr.aria-label": "null" } }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ContextMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ContextMenuIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "shortcutTemplate", first: true, predicate: ContextMenuShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: ContextMenuTextTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-popup-menu\n [target]=\"target()\"\n [aria-label]=\"ariaLabel()\"\n [trigger]=\"'contextmenu'\"\n [items]=\"menuItems()\"\n [minWidth]=\"minWidth()\"\n [width]=\"width()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [openAtPointer]=\"true\"\n (menuClick)=\"menuClick.emit($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\n [id]=\"menuId\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n", dependencies: [{ kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "aria-label", "aria-labelledby", "items", "id", "minWidth", "offset", "openAtPointer", "popupConnectionPoint", "rounded", "size", "target", "trigger", "class", "width"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }] }); }
|
|
327
328
|
}
|
|
328
329
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
329
330
|
type: Component,
|
|
@@ -334,7 +335,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
334
335
|
PopupMenuIconTemplateDirective,
|
|
335
336
|
PopupMenuShortcutTemplateDirective,
|
|
336
337
|
PopupMenuGroupTemplateDirective
|
|
337
|
-
],
|
|
338
|
+
], host: {
|
|
339
|
+
"[attr.aria-label]": "null"
|
|
340
|
+
}, template: "<mona-popup-menu\n [target]=\"target()\"\n [aria-label]=\"ariaLabel()\"\n [trigger]=\"'contextmenu'\"\n [items]=\"menuItems()\"\n [minWidth]=\"minWidth()\"\n [width]=\"width()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [openAtPointer]=\"true\"\n (menuClick)=\"menuClick.emit($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\n [id]=\"menuId\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n" }]
|
|
338
341
|
}], ctorParameters: () => [], propDecorators: { menuItemComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PopupMenuToken), { ...{ descendants: false }, isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ContextMenuGroupTemplateDirective), { ...{
|
|
339
342
|
read: TemplateRef,
|
|
340
343
|
descendants: false
|
|
@@ -347,7 +350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
347
350
|
}, isSignal: true }] }], textTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ContextMenuTextTemplateDirective), { ...{
|
|
348
351
|
read: TemplateRef,
|
|
349
352
|
descendants: false
|
|
350
|
-
}, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "
|
|
353
|
+
}, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], menuClick: [{ type: i0.Output, args: ["menuClick"] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
|
|
351
354
|
|
|
352
355
|
class ContextMenuGroupComponent extends PopupMenuGroupComponent {
|
|
353
356
|
constructor() {
|
|
@@ -500,6 +503,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
500
503
|
}]
|
|
501
504
|
}], ctorParameters: () => [] });
|
|
502
505
|
|
|
506
|
+
/** Renders a horizontal visual divider between items. */
|
|
503
507
|
class ContextMenuSeparatorComponent extends PopupMenuSeparatorComponent {
|
|
504
508
|
constructor() {
|
|
505
509
|
super(...arguments);
|
|
@@ -146,7 +146,7 @@ class DatePickerComponent {
|
|
|
146
146
|
this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
|
|
147
147
|
/**
|
|
148
148
|
* @description Accessible name of the input. Prefer a visible label, linked through {@link inputId} or
|
|
149
|
-
*
|
|
149
|
+
* `aria-labelledby`; the placeholder is not a label.
|
|
150
150
|
* @default ""
|
|
151
151
|
*/
|
|
152
152
|
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
@@ -283,6 +283,7 @@ class DatePickerComponent {
|
|
|
283
283
|
* @default false
|
|
284
284
|
*/
|
|
285
285
|
this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
286
|
+
/** @description Extra classes for the input's container. */
|
|
286
287
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
287
288
|
/**
|
|
288
289
|
* @description Two-way bindable current date value. Typed text is written on Enter and when the input loses
|
|
@@ -226,7 +226,7 @@ class DateTimePickerComponent {
|
|
|
226
226
|
this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
|
|
227
227
|
/**
|
|
228
228
|
* @description Accessible name of the input. Prefer a visible label, linked through {@link inputId} or
|
|
229
|
-
*
|
|
229
|
+
* `aria-labelledby`; the placeholder is not a label.
|
|
230
230
|
* @default ""
|
|
231
231
|
*/
|
|
232
232
|
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
@@ -394,6 +394,7 @@ class DateTimePickerComponent {
|
|
|
394
394
|
* @default false
|
|
395
395
|
*/
|
|
396
396
|
this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
397
|
+
/** @description Extra classes for the input's container. */
|
|
397
398
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
398
399
|
/**
|
|
399
400
|
* @description Two-way bindable current date time value. Typed text is written on Enter and when the input loses
|
|
@@ -375,7 +375,7 @@ class DialogContentComponent {
|
|
|
375
375
|
if (this.hasTitle() || this.dialogData().ariaLabel) {
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
|
-
console.warn("[Mona Dialog] A dialog needs an accessible name. Set title,
|
|
378
|
+
console.warn("[Mona Dialog] A dialog needs an accessible name. Set a title, a title template or aria-label (ariaLabel in the service settings).", this.#hostElementRef.nativeElement);
|
|
379
379
|
}
|
|
380
380
|
focusElement() {
|
|
381
381
|
const element = this.dialogData().focusedElement;
|
|
@@ -473,12 +473,15 @@ class DialogRef {
|
|
|
473
473
|
get component() {
|
|
474
474
|
return this.#options.component;
|
|
475
475
|
}
|
|
476
|
+
/** The dialog's overlay element. */
|
|
476
477
|
get element() {
|
|
477
478
|
return this.#options.element;
|
|
478
479
|
}
|
|
480
|
+
/** The dialog's current rendered height, in pixels. */
|
|
479
481
|
get height() {
|
|
480
482
|
return this.#options.height;
|
|
481
483
|
}
|
|
484
|
+
/** The underlying `PopupRef`, for advanced overlay access. */
|
|
482
485
|
get popupRef() {
|
|
483
486
|
return this.#options.popupRef;
|
|
484
487
|
}
|
|
@@ -490,6 +493,7 @@ class DialogRef {
|
|
|
490
493
|
get result() {
|
|
491
494
|
return this.#options.result;
|
|
492
495
|
}
|
|
496
|
+
/** The dialog's current rendered width, in pixels. */
|
|
493
497
|
get width() {
|
|
494
498
|
return this.#options.width;
|
|
495
499
|
}
|
|
@@ -783,8 +787,7 @@ class DialogComponent {
|
|
|
783
787
|
/**
|
|
784
788
|
* @description Accessible name for the dialog when it has no `title` or title template.
|
|
785
789
|
*/
|
|
786
|
-
this.ariaLabel = input(/*
|
|
787
|
-
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
790
|
+
this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
788
791
|
/**
|
|
789
792
|
* @description Sets the visibility of the close button in the dialog header.
|
|
790
793
|
* @default true
|
|
@@ -964,7 +967,7 @@ class DialogComponent {
|
|
|
964
967
|
});
|
|
965
968
|
}
|
|
966
969
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
967
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: DialogComponent, isStandalone: true, selector: "mona-dialog", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, actionsLayout: { classPropertyName: "actionsLayout", publicName: "actionsLayout", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "
|
|
970
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: DialogComponent, isStandalone: true, selector: "mona-dialog", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, actionsLayout: { classPropertyName: "actionsLayout", publicName: "actionsLayout", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, focusedElement: { classPropertyName: "focusedElement", publicName: "focusedElement", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, left: { classPropertyName: "left", publicName: "left", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "top", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action", close: "close", closed: "closed" }, host: { properties: { "attr.aria-label": "null" }, classAttribute: "hidden" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: DialogContentTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "descriptionTemplate", first: true, predicate: DialogDescriptionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: DialogFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: DialogIconTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "titleTemplate", first: true, predicate: DialogTitleTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: ``, isInline: true }); }
|
|
968
971
|
}
|
|
969
972
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DialogComponent, decorators: [{
|
|
970
973
|
type: Component,
|
|
@@ -972,10 +975,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
972
975
|
selector: "mona-dialog",
|
|
973
976
|
template: ``,
|
|
974
977
|
host: {
|
|
978
|
+
"[attr.aria-label]": "null",
|
|
975
979
|
class: "hidden"
|
|
976
980
|
}
|
|
977
981
|
}]
|
|
978
|
-
}], ctorParameters: () => [], propDecorators: { contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogContentTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], descriptionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogDescriptionTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogIconTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], titleTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogTitleTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], action: [{ type: i0.Output, args: ["action"] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], actionsLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsLayout", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "
|
|
982
|
+
}], ctorParameters: () => [], propDecorators: { contentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogContentTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], descriptionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogDescriptionTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogIconTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], titleTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DialogTitleTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], action: [{ type: i0.Output, args: ["action"] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], actionsLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsLayout", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], focusedElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedElement", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], left: [{ type: i0.Input, args: [{ isSignal: true, alias: "left", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], top: [{ type: i0.Input, args: [{ isSignal: true, alias: "top", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
|
|
979
983
|
|
|
980
984
|
/*
|
|
981
985
|
* Public API Surface of @nanahoshi/mona-ui/dialog
|
|
@@ -5,7 +5,8 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
5
5
|
import { LucideChevronDown } from '@lucide/angular';
|
|
6
6
|
import { ButtonDirective, BUTTON_GROUP_MEMBER } from '@nanahoshi/mona-ui/button';
|
|
7
7
|
import { createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
8
|
-
import { PopupMenuGroupTemplateDirective,
|
|
8
|
+
import { PopupMenuGroupTemplateDirective, PopupMenuIconTemplateDirective, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective, PopupMenuComponent, PopupMenuCheckboxItemComponent, PopupMenuGroupComponent, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent } from '@nanahoshi/mona-ui/popup-menu';
|
|
9
|
+
import { PopupMenuTemplateOrigin, PopupMenuGroupTemplateToken, PopupMenuIconTemplateToken, PopupMenuShortcutTemplateToken, PopupMenuTextTemplateToken, PopupMenuItemType, PopupMenuTemplateType, ensurePopupComponentTypes, PopupMenuOrigin, ensurePopupTemplateTypes, PopupMenuToken, PopupMenuRadioItemToken } from '@nanahoshi/mona-ui/internal/popup-menu';
|
|
9
10
|
import { fromEvent } from 'rxjs';
|
|
10
11
|
|
|
11
12
|
class DropdownButtonMenuGroupTemplateDirective extends PopupMenuGroupTemplateDirective {
|
|
@@ -162,6 +163,8 @@ class DropdownButtonComponent {
|
|
|
162
163
|
this.#triggerWidth = signal(0, /* @ts-ignore */
|
|
163
164
|
...(ngDevMode ? [{ debugName: "#triggerWidth" }] : /* istanbul ignore next */ []));
|
|
164
165
|
this.menuItemComponents = contentChildren(PopupMenuToken, { ...(ngDevMode ? { debugName: "menuItemComponents" } : /* istanbul ignore next */ {}), descendants: false });
|
|
166
|
+
/** The menu is named by the element it opens from, through this id. */
|
|
167
|
+
this.buttonId = createElementControlId();
|
|
165
168
|
this.buttonRef = viewChild("dropdownButton", /* @ts-ignore */
|
|
166
169
|
...(ngDevMode ? [{ debugName: "buttonRef" }] : /* istanbul ignore next */ []));
|
|
167
170
|
this.groupTemplate = contentChild(DropdownButtonMenuGroupTemplateDirective, { ...(ngDevMode ? { debugName: "groupTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef,
|
|
@@ -202,7 +205,7 @@ class DropdownButtonComponent {
|
|
|
202
205
|
* Takes precedence over `aria-label` when both are set.
|
|
203
206
|
* @default ""
|
|
204
207
|
*/
|
|
205
|
-
this.
|
|
208
|
+
this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
|
|
206
209
|
/**
|
|
207
210
|
* @description Renders the button with reduced visual emphasis and removes pointer interaction. Disabling the
|
|
208
211
|
* button closes its open menu.
|
|
@@ -349,7 +352,7 @@ class DropdownButtonComponent {
|
|
|
349
352
|
});
|
|
350
353
|
}
|
|
351
354
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
352
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DropdownButtonComponent, isStandalone: true, selector: "mona-dropdown-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null },
|
|
355
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DropdownButtonComponent, isStandalone: true, selector: "mona-dropdown-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClick: "menuItemClick" }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "class": "userClass()" } }, providers: [{ provide: BUTTON_GROUP_MEMBER, useExisting: DropdownButtonComponent }], queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: DropdownButtonMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemIconTemplate", first: true, predicate: DropdownButtonMenuItemIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemShortcutTemplate", first: true, predicate: DropdownButtonMenuItemShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemTextTemplate", first: true, predicate: DropdownButtonMenuItemTextTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: DropdownButtonTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["dropdownButton"], descendants: true, isSignal: true }, { propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }, { propertyName: "groupButtons", predicate: ButtonDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<button\n monaButton\n [look]=\"look()\"\n [size]=\"size()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [rounded]=\"rounded()\"\n [disabled]=\"disabled()\"\n [toggleable]=\"false\"\n aria-haspopup=\"menu\"\n [id]=\"buttonId\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-expanded]=\"isMenuOpen()\"\n [attr.aria-controls]=\"isMenuOpen() ? menuId : null\"\n #dropdownButton>\n @if (textTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: text() }\"></ng-container>\n } @else {\n {{ text() }}\n }\n @if (showArrow() && !iconOnly()) {\n <svg lucideChevronDown [size]=\"16\" class=\"shrink-0\"></svg>\n }\n</button>\n\n<mona-popup-menu\n #popupMenu\n (close)=\"onMenuClose()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n [anchorConnectionPoint]=\"'bottomcenter'\"\n [id]=\"menuId\"\n [items]=\"menuItems()\"\n [minWidth]=\"popupMinWidth()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topcenter'\"\n [rounded]=\"popupMenuRounded()\"\n [size]=\"size()\"\n [target]=\"dropdownButton\"\n [trigger]=\"'click'\">\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (menuItemIconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemIconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemShortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemShortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemTextTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemTextTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "aria-label", "aria-labelledby", "items", "id", "minWidth", "offset", "openAtPointer", "popupConnectionPoint", "rounded", "size", "target", "trigger", "class", "width"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
353
356
|
}
|
|
354
357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownButtonComponent, decorators: [{
|
|
355
358
|
type: Component,
|
|
@@ -366,7 +369,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
366
369
|
PopupMenuShortcutTemplateDirective,
|
|
367
370
|
PopupMenuTextTemplateDirective,
|
|
368
371
|
NgTemplateOutlet
|
|
369
|
-
], template: "<button\n monaButton\n [look]=\"look()\"\n [size]=\"size()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [rounded]=\"rounded()\"\n [disabled]=\"disabled()\"\n [toggleable]=\"false\"\n aria-haspopup=\"menu\"\n [attr.aria-label]=\"
|
|
372
|
+
], template: "<button\n monaButton\n [look]=\"look()\"\n [size]=\"size()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [rounded]=\"rounded()\"\n [disabled]=\"disabled()\"\n [toggleable]=\"false\"\n aria-haspopup=\"menu\"\n [id]=\"buttonId\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-expanded]=\"isMenuOpen()\"\n [attr.aria-controls]=\"isMenuOpen() ? menuId : null\"\n #dropdownButton>\n @if (textTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: text() }\"></ng-container>\n } @else {\n {{ text() }}\n }\n @if (showArrow() && !iconOnly()) {\n <svg lucideChevronDown [size]=\"16\" class=\"shrink-0\"></svg>\n }\n</button>\n\n<mona-popup-menu\n #popupMenu\n (close)=\"onMenuClose()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n [anchorConnectionPoint]=\"'bottomcenter'\"\n [id]=\"menuId\"\n [items]=\"menuItems()\"\n [minWidth]=\"popupMinWidth()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topcenter'\"\n [rounded]=\"popupMenuRounded()\"\n [size]=\"size()\"\n [target]=\"dropdownButton\"\n [trigger]=\"'click'\">\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (menuItemIconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemIconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemShortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemShortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemTextTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemTextTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n" }]
|
|
370
373
|
}], ctorParameters: () => [], propDecorators: { menuItemComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PopupMenuToken), { ...{ descendants: false }, isSignal: true }] }], buttonRef: [{ type: i0.ViewChild, args: ["dropdownButton", { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownButtonMenuGroupTemplateDirective), { ...{
|
|
371
374
|
read: TemplateRef,
|
|
372
375
|
descendants: false
|
|
@@ -381,7 +384,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
381
384
|
descendants: false
|
|
382
385
|
}, isSignal: true }] }], popupMenuRef: [{ type: i0.ViewChild, args: ["popupMenu", { isSignal: true }] }], textTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownButtonTextTemplateDirective), { ...{
|
|
383
386
|
read: TemplateRef
|
|
384
|
-
}, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }],
|
|
387
|
+
}, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], groupButtons: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ButtonDirective), { isSignal: true }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], menuItemClick: [{ type: i0.Output, args: ["menuItemClick"] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "showArrow", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
385
388
|
|
|
386
389
|
class DropdownButtonCheckboxItemComponent extends PopupMenuCheckboxItemComponent {
|
|
387
390
|
constructor() {
|
|
@@ -534,6 +537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
534
537
|
}]
|
|
535
538
|
}], ctorParameters: () => [] });
|
|
536
539
|
|
|
540
|
+
/** Renders a horizontal visual divider between sections. */
|
|
537
541
|
class DropdownButtonSeparatorComponent extends PopupMenuSeparatorComponent {
|
|
538
542
|
constructor() {
|
|
539
543
|
super(...arguments);
|
|
@@ -33,11 +33,23 @@ class DropdownFilterableDirective {
|
|
|
33
33
|
};
|
|
34
34
|
this.#destroyRef = inject(DestroyRef);
|
|
35
35
|
this.#listService = inject(ListService);
|
|
36
|
+
/** @description Current filter text used to narrow the visible options. */
|
|
36
37
|
this.filter = input("", /* @ts-ignore */
|
|
37
38
|
...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
39
|
+
/** @description Emitted when the filter value changes. Cancelable. */
|
|
38
40
|
this.filterChange = output();
|
|
41
|
+
/**
|
|
42
|
+
* @description Placeholder text in the popup's filter row. Auto Complete has no filter row, since its own input is
|
|
43
|
+
* the filter, so it ignores this.
|
|
44
|
+
* @default ""
|
|
45
|
+
*/
|
|
39
46
|
this.filterPlaceholder = input("", /* @ts-ignore */
|
|
40
47
|
...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
|
|
48
|
+
/**
|
|
49
|
+
* @description Filter operator, case sensitivity, and debounce delay. An empty string enables filtering with
|
|
50
|
+
* default settings (`operator: "contains"`, `caseSensitive: false`, `debounce: 0`); pass an object to override any
|
|
51
|
+
* field.
|
|
52
|
+
*/
|
|
41
53
|
this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaDropDownFilterable" });
|
|
42
54
|
effect(() => {
|
|
43
55
|
const filter = this.filter();
|
|
@@ -129,8 +141,13 @@ class DropdownGroupableDirective {
|
|
|
129
141
|
headerOrder: "asc"
|
|
130
142
|
};
|
|
131
143
|
this.#listService = inject(ListService);
|
|
144
|
+
/** @description Property name, or accessor, used to derive an option's group. */
|
|
132
145
|
this.groupBy = input("", /* @ts-ignore */
|
|
133
146
|
...(ngDevMode ? [{ debugName: "groupBy" }] : /* istanbul ignore next */ []));
|
|
147
|
+
/**
|
|
148
|
+
* @description Group header order, and optional per-group item ordering. An empty string enables grouping with
|
|
149
|
+
* default settings (`headerOrder: "asc"`); pass an object to override any field.
|
|
150
|
+
*/
|
|
134
151
|
this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaDropDownGroupable" });
|
|
135
152
|
effect(() => {
|
|
136
153
|
const groupBy = this.groupBy() ?? "";
|
|
@@ -229,6 +246,10 @@ class DropdownVirtualScrollDirective {
|
|
|
229
246
|
height: 28
|
|
230
247
|
};
|
|
231
248
|
this.#listService = inject(ListService);
|
|
249
|
+
/**
|
|
250
|
+
* @description Whether virtual scrolling is enabled and the pixel height of a single option row. An empty string
|
|
251
|
+
* enables virtual scrolling with default settings (`height: 28`); pass an object to override either field.
|
|
252
|
+
*/
|
|
232
253
|
this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaDropDownVirtualScroll" });
|
|
233
254
|
effect(() => {
|
|
234
255
|
const options = this.options();
|
|
@@ -303,9 +324,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
303
324
|
type: Injectable
|
|
304
325
|
}] });
|
|
305
326
|
|
|
327
|
+
/**
|
|
328
|
+
* @hidden
|
|
329
|
+
* The state one dropdown shares with its popup handlers and live region. Each dropdown provides its own; the date and
|
|
330
|
+
* time pickers use it too, which is why it is exported. Applications don't need it.
|
|
331
|
+
*/
|
|
306
332
|
class DropdownService {
|
|
307
333
|
constructor() {
|
|
334
|
+
/**
|
|
335
|
+
* Every key the dropdown's host receives (outside IME composition), before the dropdown handles it. Call
|
|
336
|
+
* `preventDefault()` on the event to skip the built-in handling.
|
|
337
|
+
*/
|
|
308
338
|
this.beforeKeydown$ = new Subject();
|
|
339
|
+
/**
|
|
340
|
+
* ArrowDown or ArrowUp on the host, before the dropdown opens, closes or moves through the list. Call
|
|
341
|
+
* `preventDefault()` on the event to skip the built-in handling.
|
|
342
|
+
*/
|
|
309
343
|
this.beforeNavigate$ = new Subject();
|
|
310
344
|
/**
|
|
311
345
|
* Set when the popup finishes closing: whether focus may return to the dropdown. It is `false` when the user
|
|
@@ -314,18 +348,38 @@ class DropdownService {
|
|
|
314
348
|
*/
|
|
315
349
|
this.focusCanReturn = signal(true, /* @ts-ignore */
|
|
316
350
|
...(ngDevMode ? [{ debugName: "focusCanReturn" }] : /* istanbul ignore next */ []));
|
|
351
|
+
/**
|
|
352
|
+
* Keys the dropdown has no built-in handling for, and Enter before it toggles the popup. Calling `preventDefault()`
|
|
353
|
+
* on an Enter key stops the toggle.
|
|
354
|
+
*/
|
|
317
355
|
this.keydown$ = new Subject();
|
|
356
|
+
/**
|
|
357
|
+
* Emits when the popup has closed and its leave animation has finished, with the close event. By then
|
|
358
|
+
* `popupRef` is `null` and {@link focusCanReturn} is set.
|
|
359
|
+
*/
|
|
318
360
|
this.popupCloseComplete$ = new Subject();
|
|
361
|
+
/** Emits when the popup's close sequence starts, before its leave animation, with the close event. */
|
|
319
362
|
this.popupCloseStart$ = new Subject();
|
|
363
|
+
/** Emits on the next task after the popup is created, together with the host's `opened` event. */
|
|
320
364
|
this.popupOpenComplete$ = new Subject();
|
|
365
|
+
/** The open popup, or `null` while it is closed. */
|
|
321
366
|
this.popupRef = signal(null, /* @ts-ignore */
|
|
322
367
|
...(ngDevMode ? [{ debugName: "popupRef" }] : /* istanbul ignore next */ []));
|
|
368
|
+
/** The template rendered as the popup's content. Each dropdown component sets it to its own popup template. */
|
|
323
369
|
this.popupTemplate = signal(null, /* @ts-ignore */
|
|
324
370
|
...(ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []));
|
|
371
|
+
/**
|
|
372
|
+
* Whether focus returns to the dropdown when the popup closes, passed to the popup as its `restoreFocus` setting.
|
|
373
|
+
* The auto-complete sets it to `false`.
|
|
374
|
+
*/
|
|
325
375
|
this.restoreFocus = signal("auto", /* @ts-ignore */
|
|
326
376
|
...(ngDevMode ? [{ debugName: "restoreFocus" }] : /* istanbul ignore next */ []));
|
|
327
|
-
|
|
377
|
+
/**
|
|
378
|
+
* Opens the popup with the given settings when it is closed. Does nothing while the host is disabled or read-only,
|
|
379
|
+
* or when the `open` event is prevented.
|
|
380
|
+
*/
|
|
328
381
|
this.triggerPopupOpen$ = new Subject();
|
|
382
|
+
/** Closes the popup when it is open, and otherwise opens it as {@link triggerPopupOpen$} does. */
|
|
329
383
|
this.triggerPopupToggle$ = new Subject();
|
|
330
384
|
}
|
|
331
385
|
static getDefaultPositions() {
|
|
@@ -1386,7 +1386,7 @@ class EditorImageComponent {
|
|
|
1386
1386
|
.run();
|
|
1387
1387
|
}
|
|
1388
1388
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1389
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorImageComponent, isStandalone: true, selector: "mona-editor-image", ngImport: i0, template: "<button\n monaButton\n [size]=\"'small'\"\n aria-haspopup=\"dialog\"\n (click)=\"onDisplayInserterClick()\"\n [title]=\"messages().insertImage\">\n <i class=\"ri-image-add-line\"></i>\n</button>\n\n@if (inserterVisible()) {\n <mona-window\n [width]=\"400\"\n [modal]=\"true\"\n [title]=\"messages().insertImage\"\n [minimizable]=\"false\"\n [maximizable]=\"false\"\n (close)=\"onInserterClose()\">\n <ng-template monaWindowContentTemplate>\n <mona-editor-image-inserter\n (insert)=\"onImageInsert($event)\"\n (insertCancel)=\"onInsertCancel()\"></mona-editor-image-inserter>\n </ng-template>\n </mona-window>\n}\n", dependencies: [{ kind: "component", type: WindowComponent, selector: "mona-window", inputs: ["
|
|
1389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EditorImageComponent, isStandalone: true, selector: "mona-editor-image", ngImport: i0, template: "<button\n monaButton\n [size]=\"'small'\"\n aria-haspopup=\"dialog\"\n (click)=\"onDisplayInserterClick()\"\n [title]=\"messages().insertImage\">\n <i class=\"ri-image-add-line\"></i>\n</button>\n\n@if (inserterVisible()) {\n <mona-window\n [width]=\"400\"\n [modal]=\"true\"\n [title]=\"messages().insertImage\"\n [minimizable]=\"false\"\n [maximizable]=\"false\"\n (close)=\"onInserterClose()\">\n <ng-template monaWindowContentTemplate>\n <mona-editor-image-inserter\n (insert)=\"onImageInsert($event)\"\n (insertCancel)=\"onInsertCancel()\"></mona-editor-image-inserter>\n </ng-template>\n </mona-window>\n}\n", dependencies: [{ kind: "component", type: WindowComponent, selector: "mona-window", inputs: ["aria-label", "closable", "closeOnEscape", "draggable", "focusedElement", "height", "left", "look", "maxHeight", "maxWidth", "maximizable", "messages", "minHeight", "minWidth", "minimizable", "modal", "resizable", "rounded", "title", "top", "width"], outputs: ["close", "closed", "dragEnd", "dragStart", "heightChange", "leftChange", "topChange", "widthChange"] }, { kind: "component", type: EditorImageInserterComponent, selector: "mona-editor-image-inserter", outputs: ["insert", "insertCancel"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: WindowContentTemplateDirective, selector: "ng-template[monaWindowContentTemplate]" }] }); }
|
|
1390
1390
|
}
|
|
1391
1391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorImageComponent, decorators: [{
|
|
1392
1392
|
type: Component,
|
|
@@ -1850,7 +1850,7 @@ class EditorTableComponent {
|
|
|
1850
1850
|
this.#editorService.editor.chain().focus().toggleHeaderRow().run();
|
|
1851
1851
|
}
|
|
1852
1852
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1853
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: EditorTableComponent, isStandalone: true, selector: "mona-editor-table", viewQueries: [{ propertyName: "popover", first: true, predicate: ["popoverComponent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\" [aria-label]=\"messages().tableGroup\">\n <button monaButton [toggleable]=\"false\" [title]=\"messages().insertTable\" #insertTableButton>\n <i class=\"ri-grid-line\"></i>\n </button>\n <button\n monaButton\n [toggleable]=\"false\"\n [disabled]=\"addColumnBeforeDisabled()\"\n (click)=\"onAddColumnBeforeClick()\"\n [title]=\"messages().addColumnBefore\">\n <i class=\"ri-insert-column-left\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"addColumnAfterDisabled()\" (click)=\"onAddColumnAfterClick()\" [title]=\"messages().addColumnAfter\">\n <i class=\"ri-insert-column-right\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"addRowBeforeDisabled()\" (click)=\"onAddRowBeforeClick()\" [title]=\"messages().addRowBefore\">\n <i class=\"ri-insert-row-top\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"addRowAfterDisabled()\" (click)=\"onAddRowAfterClick()\" [title]=\"messages().addRowAfter\">\n <i class=\"ri-insert-row-bottom\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"deleteColumnDisabled()\" (click)=\"onDeleteColumnClick()\" [title]=\"messages().deleteColumn\">\n <i class=\"ri-delete-column\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"deleteRowDisabled()\" (click)=\"onDeleteRowClick()\" [title]=\"messages().deleteRow\">\n <i class=\"ri-delete-row\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"mergeCellsDisabled()\" (click)=\"onMergeCellsClick()\" [title]=\"messages().mergeCells\">\n <i class=\"ri-merge-cells-horizontal\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"splitCellDisabled()\" (click)=\"onSplitCellClick()\" [title]=\"messages().splitCell\">\n <i class=\"ri-split-cells-horizontal\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"toggleHeaderRowDisabled()\" (click)=\"onToggleHeaderRow()\" [title]=\"messages().toggleHeaderRow\">\n <i class=\"ri-table-line\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"deleteTableDisabled()\" (click)=\"onDeleteTableClick()\" [title]=\"messages().deleteTable\">\n <i class=\"ri-close-large-line\"></i>\n </button>\n</mona-button-group>\n\n<mona-popover [target]=\"insertTableButton\" position=\"bottom\" #popoverComponent>\n <mona-editor-table-creator (insert)=\"onTableInsert($event)\"></mona-editor-table-creator>\n</mona-popover>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "aria-labelledby", "disabled", "invalid", "look", "readonly", "rounded", "selection", "size", "touched", "class", "value"], outputs: ["buttonClick", "touch", "valueChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: PopoverComponent, selector: "mona-popover", inputs: ["
|
|
1853
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: EditorTableComponent, isStandalone: true, selector: "mona-editor-table", viewQueries: [{ propertyName: "popover", first: true, predicate: ["popoverComponent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-button-group selection=\"single\" [size]=\"'small'\" [aria-label]=\"messages().tableGroup\">\n <button monaButton [toggleable]=\"false\" [title]=\"messages().insertTable\" #insertTableButton>\n <i class=\"ri-grid-line\"></i>\n </button>\n <button\n monaButton\n [toggleable]=\"false\"\n [disabled]=\"addColumnBeforeDisabled()\"\n (click)=\"onAddColumnBeforeClick()\"\n [title]=\"messages().addColumnBefore\">\n <i class=\"ri-insert-column-left\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"addColumnAfterDisabled()\" (click)=\"onAddColumnAfterClick()\" [title]=\"messages().addColumnAfter\">\n <i class=\"ri-insert-column-right\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"addRowBeforeDisabled()\" (click)=\"onAddRowBeforeClick()\" [title]=\"messages().addRowBefore\">\n <i class=\"ri-insert-row-top\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"addRowAfterDisabled()\" (click)=\"onAddRowAfterClick()\" [title]=\"messages().addRowAfter\">\n <i class=\"ri-insert-row-bottom\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"deleteColumnDisabled()\" (click)=\"onDeleteColumnClick()\" [title]=\"messages().deleteColumn\">\n <i class=\"ri-delete-column\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"deleteRowDisabled()\" (click)=\"onDeleteRowClick()\" [title]=\"messages().deleteRow\">\n <i class=\"ri-delete-row\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"mergeCellsDisabled()\" (click)=\"onMergeCellsClick()\" [title]=\"messages().mergeCells\">\n <i class=\"ri-merge-cells-horizontal\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"splitCellDisabled()\" (click)=\"onSplitCellClick()\" [title]=\"messages().splitCell\">\n <i class=\"ri-split-cells-horizontal\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"toggleHeaderRowDisabled()\" (click)=\"onToggleHeaderRow()\" [title]=\"messages().toggleHeaderRow\">\n <i class=\"ri-table-line\"></i>\n </button>\n <button monaButton [toggleable]=\"false\" [disabled]=\"deleteTableDisabled()\" (click)=\"onDeleteTableClick()\" [title]=\"messages().deleteTable\">\n <i class=\"ri-close-large-line\"></i>\n </button>\n</mona-button-group>\n\n<mona-popover [target]=\"insertTableButton\" position=\"bottom\" #popoverComponent>\n <mona-editor-table-creator (insert)=\"onTableInsert($event)\"></mona-editor-table-creator>\n</mona-popover>\n", dependencies: [{ kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "aria-labelledby", "disabled", "invalid", "look", "readonly", "rounded", "selection", "size", "touched", "class", "value"], outputs: ["buttonClick", "touch", "valueChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: PopoverComponent, selector: "mona-popover", inputs: ["aria-label", "autoFocus", "closeOnEscape", "closeOnOutsideClick", "displayArrow", "position", "rounded", "target", "title", "trigger"], outputs: ["hidden", "hide", "show", "shown"], exportAs: ["monaPopover"] }, { kind: "component", type: EditorTableCreatorComponent, selector: "mona-editor-table-creator", outputs: ["insert"] }] }); }
|
|
1854
1854
|
}
|
|
1855
1855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EditorTableComponent, decorators: [{
|
|
1856
1856
|
type: Component,
|
|
@@ -2135,6 +2135,7 @@ class EditorComponent {
|
|
|
2135
2135
|
* outside.
|
|
2136
2136
|
*/
|
|
2137
2137
|
this.update = output();
|
|
2138
|
+
/** @description CSS classes applied to the host element. */
|
|
2138
2139
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
2139
2140
|
/**
|
|
2140
2141
|
* @description The content of the editor as HTML. An empty editor has the value `""`. Use `[(value)]`, or
|
|
@@ -102,6 +102,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
102
102
|
}]
|
|
103
103
|
}], ctorParameters: () => [], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }] } });
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Injects content beside the header's button, between the title and the toggle icon. Its controls are the application's
|
|
107
|
+
* own: their clicks and keys don't reach the button, and they need their own accessible names. The template has no
|
|
108
|
+
* context variables.
|
|
109
|
+
*/
|
|
105
110
|
class ExpansionPanelActionsTemplateDirective {
|
|
106
111
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelActionsTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
112
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ExpansionPanelActionsTemplateDirective, isStandalone: true, selector: "ng-template[monaExpansionPanelActionsTemplate]", ngImport: i0 }); }
|
|
@@ -113,6 +118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
113
118
|
}]
|
|
114
119
|
}] });
|
|
115
120
|
|
|
121
|
+
/** Replaces the default plus/minus toggle icon. */
|
|
116
122
|
class ExpansionPanelIconTemplateDirective {
|
|
117
123
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelIconTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
118
124
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ExpansionPanelIconTemplateDirective, isStandalone: true, selector: "ng-template[monaExpansionPanelIconTemplate]", ngImport: i0 }); }
|
|
@@ -124,6 +130,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
124
130
|
}]
|
|
125
131
|
}] });
|
|
126
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Replaces the string `title` in the header's button with projected content. It can't hold controls, since it's inside
|
|
135
|
+
* a button. The template has no context variables.
|
|
136
|
+
*/
|
|
127
137
|
class ExpansionPanelTitleTemplateDirective {
|
|
128
138
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelTitleTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
129
139
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ExpansionPanelTitleTemplateDirective, isStandalone: true, selector: "ng-template[monaExpansionPanelTitleTemplate]", ngImport: i0 }); }
|
|
@@ -318,6 +328,7 @@ class ExpansionPanelComponent {
|
|
|
318
328
|
});
|
|
319
329
|
}
|
|
320
330
|
}
|
|
331
|
+
/** Collapses the panel, even when `disabled`. */
|
|
321
332
|
collapse() {
|
|
322
333
|
this.expanded.set(false);
|
|
323
334
|
}
|
|
@@ -327,6 +338,7 @@ class ExpansionPanelComponent {
|
|
|
327
338
|
compareDocumentOrder(other) {
|
|
328
339
|
return this.#host.compareDocumentPosition(other.#host) & DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
329
340
|
}
|
|
341
|
+
/** Expands the panel, even when `disabled`. */
|
|
330
342
|
expand() {
|
|
331
343
|
this.expanded.set(true);
|
|
332
344
|
}
|
|
@@ -342,6 +354,7 @@ class ExpansionPanelComponent {
|
|
|
342
354
|
ownsTrigger(element) {
|
|
343
355
|
return this.triggerElement().nativeElement === element;
|
|
344
356
|
}
|
|
357
|
+
/** Toggles the panel, unless it's `disabled`. */
|
|
345
358
|
toggle() {
|
|
346
359
|
if (this.disabled()) {
|
|
347
360
|
return;
|
|
@@ -5,6 +5,11 @@ import { MONA_FIELDSET_DISABLED } from '@nanahoshi/mona-ui/internal';
|
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Replaces the string `legend` with projected content inside the `<legend>` element. When this template is present, no
|
|
10
|
+
* default legend styling is applied — the consumer is responsible for all visual treatment. The template has no context
|
|
11
|
+
* variables.
|
|
12
|
+
*/
|
|
8
13
|
class FieldsetLegendTemplateDirective {
|
|
9
14
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FieldsetLegendTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10
15
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: FieldsetLegendTemplateDirective, isStandalone: true, selector: "ng-template[monaFieldsetLegendTemplate]", ngImport: i0 }); }
|