@nanahoshi/mona-ui 0.40.0 → 0.42.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/auto-complete.md +2 -0
- package/docs/api/combo-box.md +2 -0
- package/docs/api/common.md +1 -1
- package/docs/api/dropdowns.md +3 -1
- package/docs/api/i18n.md +54 -0
- package/docs/api/kanban.md +222 -0
- package/docs/api/locales.md +14 -14
- package/docs/api/sortable.md +189 -0
- package/docs/api/sparkline.md +85 -0
- package/docs/api/tabs.md +20 -0
- package/docs/auto-complete.md +64 -0
- package/docs/combo-box.md +65 -0
- package/docs/kanban.md +293 -0
- package/docs/sortable.md +320 -0
- package/docs/sparkline.md +303 -0
- package/docs/tabs.md +59 -10
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +95 -30
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +58 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +64 -29
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +87 -0
- package/fesm2022/nanahoshi-mona-ui-kanban.mjs +660 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-sortable.mjs +733 -0
- package/fesm2022/nanahoshi-mona-ui-sparkline.mjs +573 -0
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +112 -5
- package/i18n/catalogs/en-US.messages.json +14 -0
- package/kanban/package.json +4 -0
- package/llms.txt +8 -2
- package/locales/ar-sa/ar-sa.messages.json +14 -0
- package/locales/de-de/de-de.messages.json +14 -0
- package/locales/es-es/es-es.messages.json +14 -0
- package/locales/fr-fr/fr-fr.messages.json +14 -0
- package/locales/id-id/id-id.messages.json +14 -0
- package/locales/it-it/it-it.messages.json +14 -0
- package/locales/ja-jp/ja-jp.messages.json +14 -0
- package/locales/ko-kr/ko-kr.messages.json +14 -0
- package/locales/pl-pl/pl-pl.messages.json +14 -0
- package/locales/pt-br/pt-br.messages.json +14 -0
- package/locales/ru-ru/ru-ru.messages.json +14 -0
- package/locales/tr-tr/tr-tr.messages.json +14 -0
- package/locales/zh-cn/zh-cn.messages.json +14 -0
- package/locales/zh-tw/zh-tw.messages.json +14 -0
- package/package.json +13 -1
- package/sortable/package.json +4 -0
- package/sparkline/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +42 -1
- package/types/nanahoshi-mona-ui-combo-box.d.ts +37 -1
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +54 -4
- package/types/nanahoshi-mona-ui-i18n.d.ts +31 -0
- package/types/nanahoshi-mona-ui-kanban.d.ts +270 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +14 -0
- package/types/nanahoshi-mona-ui-sortable.d.ts +245 -0
- package/types/nanahoshi-mona-ui-sparkline.d.ts +228 -0
- package/types/nanahoshi-mona-ui-tabs.d.ts +46 -0
|
@@ -6,7 +6,7 @@ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
|
6
6
|
import { MonaI18nService, formatNumber, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
|
|
7
7
|
import { PopupCloseEvent, PopupCloseSource, PopupDataInjectionToken, PopupRef, PopupService, dropdownPopupAnimation, slideFromBottomPopupAnimation } from "@nanahoshi/mona-ui/popup";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
|
-
import { focusCanReturn, setupTypeahead, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
9
|
+
import { createElementControlId, focusCanReturn, setupTypeahead, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
10
10
|
import { FilterInputComponent } from "@nanahoshi/mona-ui/internal/filter-input";
|
|
11
11
|
import { injectLiveAnnouncer } from "@nanahoshi/mona-ui/internal/live-announcer";
|
|
12
12
|
import { TREE_DEFAULT_MESSAGES, TreeComponent, TreeNodeTemplateDirective, TreeService, handleTreeNavigationKey } from "@nanahoshi/mona-ui/internal/tree";
|
|
@@ -29,12 +29,20 @@ const DROPDOWNS_DEFAULT_MESSAGES = {
|
|
|
29
29
|
resultsAvailable: (count) => count === 1 ? `${localizeNumber(count)} result available` : `${localizeNumber(count)} results available`
|
|
30
30
|
};
|
|
31
31
|
const dropdownSheetThemeVariants = cva(`
|
|
32
|
-
flex
|
|
32
|
+
flex max-h-[inherit] min-h-0 w-full flex-col overflow-clip
|
|
33
33
|
rounded-t-xl border-t border-border
|
|
34
34
|
pb-[env(safe-area-inset-bottom)] ps-[env(safe-area-inset-left)] pe-[env(safe-area-inset-right)]
|
|
35
35
|
rtl:ps-[env(safe-area-inset-right)] rtl:pe-[env(safe-area-inset-left)]
|
|
36
36
|
${themeOverlaySurfaceClasses} text-foreground shadow-(--shadow-overlay)
|
|
37
|
-
|
|
37
|
+
`, {
|
|
38
|
+
variants: { fillHeight: {
|
|
39
|
+
true: "h-dvh",
|
|
40
|
+
false: "h-full"
|
|
41
|
+
} },
|
|
42
|
+
defaultVariants: { fillHeight: false }
|
|
43
|
+
});
|
|
44
|
+
const dropdownSheetInputContainerClasses = "shrink-0 px-2 pt-1 pb-2";
|
|
45
|
+
const dropdownSheetInputClasses = "h-11 w-full text-base";
|
|
38
46
|
const dropdownSheetSurfaceClasses = `
|
|
39
47
|
h-full max-h-none flex-1 rounded-none border-0 shadow-none text-base
|
|
40
48
|
[&_[role=option]]:min-h-11 [&_mona-tree-node>div]:py-2.5
|
|
@@ -51,7 +59,7 @@ var DropdownSheetComponent = class DropdownSheetComponent {
|
|
|
51
59
|
this.content = viewChild.required("content", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
52
60
|
this.data = inject(PopupDataInjectionToken);
|
|
53
61
|
this.messages = inject(MonaI18nService).componentMessages("dropdowns", DROPDOWNS_DEFAULT_MESSAGES);
|
|
54
|
-
this.sheetClass = dropdownSheetThemeVariants();
|
|
62
|
+
this.sheetClass = dropdownSheetThemeVariants({ fillHeight: this.data.fillHeight });
|
|
55
63
|
}
|
|
56
64
|
#popupRef;
|
|
57
65
|
closeSheet() {
|
|
@@ -89,7 +97,7 @@ var DropdownSheetComponent = class DropdownSheetComponent {
|
|
|
89
97
|
isSignal: true
|
|
90
98
|
}],
|
|
91
99
|
ngImport: i0,
|
|
92
|
-
template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div #content class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n",
|
|
100
|
+
template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\" [id]=\"data.titleId\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div #content class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n",
|
|
93
101
|
dependencies: [
|
|
94
102
|
{
|
|
95
103
|
kind: "directive",
|
|
@@ -146,7 +154,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
146
154
|
NgTemplateOutlet
|
|
147
155
|
],
|
|
148
156
|
host: { class: "contents max-h-[inherit]" },
|
|
149
|
-
template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div #content class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n"
|
|
157
|
+
template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\" [id]=\"data.titleId\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div #content class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n"
|
|
150
158
|
}]
|
|
151
159
|
}],
|
|
152
160
|
propDecorators: { content: [{
|
|
@@ -1063,6 +1071,8 @@ var DropdownService = class DropdownService {
|
|
|
1063
1071
|
this.popupTemplate = signal(null, ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
|
|
1064
1072
|
this.restoreFocus = signal("auto", ...ngDevMode ? [{ debugName: "restoreFocus" }] : /* istanbul ignore next */ []);
|
|
1065
1073
|
this.sheet = signal(false, ...ngDevMode ? [{ debugName: "sheet" }] : /* istanbul ignore next */ []);
|
|
1074
|
+
this.sheetFillsHeight = signal(false, ...ngDevMode ? [{ debugName: "sheetFillsHeight" }] : /* istanbul ignore next */ []);
|
|
1075
|
+
this.sheetTitleId = signal(null, ...ngDevMode ? [{ debugName: "sheetTitleId" }] : /* istanbul ignore next */ []);
|
|
1066
1076
|
this.triggerPopupOpen$ = new Subject();
|
|
1067
1077
|
this.triggerPopupToggle$ = new Subject();
|
|
1068
1078
|
}
|
|
@@ -1108,6 +1118,19 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1108
1118
|
decorators: [{ type: Injectable }]
|
|
1109
1119
|
});
|
|
1110
1120
|
const SMALL_SCREEN_QUERY = "(max-width: 639.98px)";
|
|
1121
|
+
function matchesSmallScreen(document) {
|
|
1122
|
+
return document.defaultView?.matchMedia?.(SMALL_SCREEN_QUERY).matches ?? false;
|
|
1123
|
+
}
|
|
1124
|
+
function injectSmallScreen() {
|
|
1125
|
+
const query = inject(DOCUMENT).defaultView?.matchMedia?.(SMALL_SCREEN_QUERY);
|
|
1126
|
+
const matches = signal(query?.matches ?? false, ...ngDevMode ? [{ debugName: "matches" }] : /* istanbul ignore next */ []);
|
|
1127
|
+
if (query && typeof query.addEventListener === "function") {
|
|
1128
|
+
const onChange = (event) => matches.set(event.matches);
|
|
1129
|
+
query.addEventListener("change", onChange);
|
|
1130
|
+
inject(DestroyRef).onDestroy(() => query.removeEventListener("change", onChange));
|
|
1131
|
+
}
|
|
1132
|
+
return matches.asReadonly();
|
|
1133
|
+
}
|
|
1111
1134
|
const SHEET_MAX_HEIGHT_RATIO = .85;
|
|
1112
1135
|
var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
1113
1136
|
#destroyRef = inject(DestroyRef);
|
|
@@ -1167,9 +1190,13 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
1167
1190
|
});
|
|
1168
1191
|
}
|
|
1169
1192
|
createSheet(anchor, content, restoreFocus) {
|
|
1193
|
+
const titleId = createElementControlId();
|
|
1194
|
+
this.#dropdownService.sheetTitleId.set(titleId);
|
|
1170
1195
|
const data = {
|
|
1171
1196
|
content,
|
|
1172
|
-
|
|
1197
|
+
fillHeight: this.#dropdownService.sheetFillsHeight(),
|
|
1198
|
+
title: computed(() => this.sheetTitle()),
|
|
1199
|
+
titleId
|
|
1173
1200
|
};
|
|
1174
1201
|
const popupRef = this.#popupService.create({
|
|
1175
1202
|
anchor,
|
|
@@ -1199,6 +1226,12 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
1199
1226
|
this.followVisualViewport(popupRef);
|
|
1200
1227
|
return popupRef;
|
|
1201
1228
|
}
|
|
1229
|
+
focusSheetTextBox(popupRef) {
|
|
1230
|
+
const textBox = popupRef.overlayRef.overlayElement.querySelector("[data-mona-sheet-autofocus]");
|
|
1231
|
+
if (!textBox) return;
|
|
1232
|
+
textBox.focus({ preventScroll: true });
|
|
1233
|
+
if (textBox instanceof HTMLInputElement) textBox.setSelectionRange(textBox.value.length, textBox.value.length);
|
|
1234
|
+
}
|
|
1202
1235
|
followVisualViewport(popupRef) {
|
|
1203
1236
|
const strategy = popupRef.overlayRef.getConfig().positionStrategy;
|
|
1204
1237
|
if (typeof strategy?.bottom !== "function" || typeof strategy.left !== "function") return;
|
|
@@ -1253,6 +1286,7 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
1253
1286
|
popupRef = sheet ? this.createSheet(anchor, content, restoreFocus) : this.createPopup(anchor, content, settings);
|
|
1254
1287
|
this.#dropdownService.popupRef.set(popupRef);
|
|
1255
1288
|
this.setPopupCloseSubscriptions(popupRef);
|
|
1289
|
+
if (sheet) this.focusSheetTextBox(popupRef);
|
|
1256
1290
|
window.setTimeout(() => {
|
|
1257
1291
|
if (this.#hostDestroyed) return;
|
|
1258
1292
|
this.#dropdownService.popupOpenComplete$.next();
|
|
@@ -1261,7 +1295,7 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
1261
1295
|
}
|
|
1262
1296
|
opensAsSheet() {
|
|
1263
1297
|
if (this.#host.adaptiveMode?.() !== "auto") return false;
|
|
1264
|
-
return this.#document
|
|
1298
|
+
return matchesSmallScreen(this.#document);
|
|
1265
1299
|
}
|
|
1266
1300
|
setPopupCloseSubscriptions(popupRef) {
|
|
1267
1301
|
popupRef.beforeClose.pipe(takeUntil(popupRef.closed)).subscribe((event) => {
|
|
@@ -1274,6 +1308,7 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
|
|
|
1274
1308
|
this.#dropdownService.focusCanReturn.set(focusCanReturn(this.#document, this.#hostElementRef.nativeElement, popupRef.overlayRef.overlayElement));
|
|
1275
1309
|
this.#dropdownService.popupRef.set(null);
|
|
1276
1310
|
this.#dropdownService.sheet.set(false);
|
|
1311
|
+
this.#dropdownService.sheetTitleId.set(null);
|
|
1277
1312
|
this.#dropdownService.popupCloseComplete$.next(event);
|
|
1278
1313
|
if (!this.#hostDestroyed) this.#host.closed.emit();
|
|
1279
1314
|
});
|
|
@@ -1339,26 +1374,6 @@ var DropdownListPopupHandlerDirective = class DropdownListPopupHandlerDirective
|
|
|
1339
1374
|
this.#popupOpened$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => this.handleScrollOnPopupOpen());
|
|
1340
1375
|
} });
|
|
1341
1376
|
}
|
|
1342
|
-
closePopup() {
|
|
1343
|
-
this.#dropdownService.popupRef()?.close();
|
|
1344
|
-
}
|
|
1345
|
-
handleArrowKeys(event) {
|
|
1346
|
-
const navigateEvent = new PreventableEvent("beforeNavigate", event);
|
|
1347
|
-
this.#dropdownService.beforeNavigate$.next(navigateEvent);
|
|
1348
|
-
if (navigateEvent.isDefaultPrevented()) return;
|
|
1349
|
-
event.preventDefault();
|
|
1350
|
-
if (event.altKey) {
|
|
1351
|
-
if (event.key === "ArrowDown") this.#dropdownService.triggerPopupOpen$.next({});
|
|
1352
|
-
else this.closePopup();
|
|
1353
|
-
return;
|
|
1354
|
-
}
|
|
1355
|
-
const previousItem = this.#listService.selectedListItems().lastOrDefault();
|
|
1356
|
-
const direction = event.key === "ArrowDown" ? "next" : "previous";
|
|
1357
|
-
const mode = this.#listService.navigableOptions().mode;
|
|
1358
|
-
const item = this.#listService.navigate(direction, mode, false);
|
|
1359
|
-
if (!item || previousItem === item) return;
|
|
1360
|
-
this.#dropdownListService?.navigate$.next({ item });
|
|
1361
|
-
}
|
|
1362
1377
|
handleKeyDown(e) {
|
|
1363
1378
|
if (e.isComposing || e.keyCode === 229) return;
|
|
1364
1379
|
const event = new PreventableEvent("beforeKeydown", e);
|
|
@@ -1380,6 +1395,26 @@ var DropdownListPopupHandlerDirective = class DropdownListPopupHandlerDirective
|
|
|
1380
1395
|
this.#dropdownService.triggerPopupToggle$.next({});
|
|
1381
1396
|
} else this.#dropdownService.keydown$.next(e);
|
|
1382
1397
|
}
|
|
1398
|
+
closePopup() {
|
|
1399
|
+
this.#dropdownService.popupRef()?.close();
|
|
1400
|
+
}
|
|
1401
|
+
handleArrowKeys(event) {
|
|
1402
|
+
const navigateEvent = new PreventableEvent("beforeNavigate", event);
|
|
1403
|
+
this.#dropdownService.beforeNavigate$.next(navigateEvent);
|
|
1404
|
+
if (navigateEvent.isDefaultPrevented()) return;
|
|
1405
|
+
event.preventDefault();
|
|
1406
|
+
if (event.altKey) {
|
|
1407
|
+
if (event.key === "ArrowDown") this.#dropdownService.triggerPopupOpen$.next({});
|
|
1408
|
+
else this.closePopup();
|
|
1409
|
+
return;
|
|
1410
|
+
}
|
|
1411
|
+
const previousItem = this.#listService.selectedListItems().lastOrDefault();
|
|
1412
|
+
const direction = event.key === "ArrowDown" ? "next" : "previous";
|
|
1413
|
+
const mode = this.#listService.navigableOptions().mode;
|
|
1414
|
+
const item = this.#listService.navigate(direction, mode, false);
|
|
1415
|
+
if (!item || previousItem === item) return;
|
|
1416
|
+
this.#dropdownListService?.navigate$.next({ item });
|
|
1417
|
+
}
|
|
1383
1418
|
handleScrollOnPopupOpen() {
|
|
1384
1419
|
const selectedDataItem = this.#listService.selectedListItems().lastOrDefault();
|
|
1385
1420
|
const highlightedItem = this.#listService.highlightedItem();
|
|
@@ -1745,6 +1780,6 @@ function readDropdownField(item, field) {
|
|
|
1745
1780
|
if (typeof field === "string") return item?.[field];
|
|
1746
1781
|
return field(item);
|
|
1747
1782
|
}
|
|
1748
|
-
export { DROPDOWNS_DEFAULT_MESSAGES, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownDataInputToken, DropdownFilterableDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownGroupableDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPopupHandlerDirective, DropdownPrefixTemplateDirective, DropdownService, DropdownSheetComponent, DropdownSuffixTemplateDirective, DropdownTreePopupComponent, DropdownTreePopupHandlerDirective, DropdownVirtualScrollDirective, dropdownPopupThemeVariants, dropdownSheetPickerClasses, dropdownSheetSurfaceClasses, dropdownSheetThemeVariants, readDropdownField };
|
|
1783
|
+
export { DROPDOWNS_DEFAULT_MESSAGES, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownDataInputToken, DropdownFilterableDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownGroupableDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPopupHandlerDirective, DropdownPrefixTemplateDirective, DropdownService, DropdownSheetComponent, DropdownSuffixTemplateDirective, DropdownTreePopupComponent, DropdownTreePopupHandlerDirective, DropdownVirtualScrollDirective, dropdownPopupThemeVariants, dropdownSheetInputClasses, dropdownSheetInputContainerClasses, dropdownSheetPickerClasses, dropdownSheetSurfaceClasses, dropdownSheetThemeVariants, injectSmallScreen, matchesSmallScreen, readDropdownField };
|
|
1749
1784
|
|
|
1750
1785
|
//# sourceMappingURL=nanahoshi-mona-ui-dropdowns.mjs.map
|
|
@@ -912,6 +912,20 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
912
912
|
}],
|
|
913
913
|
toolbar: null
|
|
914
914
|
},
|
|
915
|
+
kanban: {
|
|
916
|
+
cardCount: [{
|
|
917
|
+
name: "count",
|
|
918
|
+
type: "number"
|
|
919
|
+
}],
|
|
920
|
+
cardCountWithLimit: [{
|
|
921
|
+
name: "count",
|
|
922
|
+
type: "number"
|
|
923
|
+
}, {
|
|
924
|
+
name: "limit",
|
|
925
|
+
type: "number"
|
|
926
|
+
}],
|
|
927
|
+
emptyColumn: null
|
|
928
|
+
},
|
|
915
929
|
label: { optional: null },
|
|
916
930
|
list: {
|
|
917
931
|
filterList: null,
|
|
@@ -1117,6 +1131,79 @@ const MONA_MESSAGE_PARAMETERS = {
|
|
|
1117
1131
|
minimumValue: null,
|
|
1118
1132
|
sliderValue: null
|
|
1119
1133
|
},
|
|
1134
|
+
sortable: {
|
|
1135
|
+
itemMoved: [
|
|
1136
|
+
{
|
|
1137
|
+
name: "item",
|
|
1138
|
+
type: "string"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
name: "position",
|
|
1142
|
+
type: "number"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
name: "total",
|
|
1146
|
+
type: "number"
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
itemMovedToList: [
|
|
1150
|
+
{
|
|
1151
|
+
name: "item",
|
|
1152
|
+
type: "string"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
name: "list",
|
|
1156
|
+
type: "string"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
name: "position",
|
|
1160
|
+
type: "number"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
name: "total",
|
|
1164
|
+
type: "number"
|
|
1165
|
+
}
|
|
1166
|
+
]
|
|
1167
|
+
},
|
|
1168
|
+
sparkline: {
|
|
1169
|
+
noData: null,
|
|
1170
|
+
summary: [
|
|
1171
|
+
{
|
|
1172
|
+
name: "count",
|
|
1173
|
+
type: "number"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
name: "first",
|
|
1177
|
+
type: "string"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
name: "last",
|
|
1181
|
+
type: "string"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
name: "min",
|
|
1185
|
+
type: "string"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
name: "max",
|
|
1189
|
+
type: "string"
|
|
1190
|
+
}
|
|
1191
|
+
],
|
|
1192
|
+
winLossSummary: [
|
|
1193
|
+
{
|
|
1194
|
+
name: "wins",
|
|
1195
|
+
type: "number"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
name: "losses",
|
|
1199
|
+
type: "number"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: "draws",
|
|
1203
|
+
type: "number"
|
|
1204
|
+
}
|
|
1205
|
+
]
|
|
1206
|
+
},
|
|
1120
1207
|
spinner: {
|
|
1121
1208
|
cancel: null,
|
|
1122
1209
|
loading: null
|