@nanahoshi/mona-ui 0.35.0 → 0.36.1

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.
Files changed (64) hide show
  1. package/docs/api/common.md +1 -1
  2. package/docs/api/i18n.md +26 -5
  3. package/docs/api/locales.md +14 -14
  4. package/docs/api/masked-text-box.md +137 -0
  5. package/docs/api/multi-select.md +1 -0
  6. package/docs/api/popup.md +1 -1
  7. package/docs/masked-textbox.md +334 -0
  8. package/docs/multi-select.md +66 -0
  9. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -1
  10. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +54 -15
  11. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -1
  12. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -1
  13. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -1
  14. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -1
  15. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -1
  16. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -1
  17. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -1
  18. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -1
  19. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +10 -1
  20. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -1
  21. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -1
  22. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -1
  23. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -1
  24. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -1
  25. package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +1302 -0
  26. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +29 -1
  27. package/fesm2022/nanahoshi-mona-ui-popup.mjs +29 -8
  28. package/i18n/catalogs/en-US.messages.json +10 -1
  29. package/llms.txt +3 -1
  30. package/locales/ar-sa/ar-sa.messages.json +10 -1
  31. package/locales/de-de/de-de.messages.json +10 -1
  32. package/locales/es-es/es-es.messages.json +10 -1
  33. package/locales/fr-fr/fr-fr.messages.json +10 -1
  34. package/locales/id-id/id-id.messages.json +10 -1
  35. package/locales/it-it/it-it.messages.json +10 -1
  36. package/locales/ja-jp/ja-jp.messages.json +10 -1
  37. package/locales/ko-kr/ko-kr.messages.json +10 -1
  38. package/locales/pl-pl/pl-pl.messages.json +10 -1
  39. package/locales/pt-br/pt-br.messages.json +10 -1
  40. package/locales/ru-ru/ru-ru.messages.json +10 -1
  41. package/locales/tr-tr/tr-tr.messages.json +10 -1
  42. package/locales/zh-cn/zh-cn.messages.json +10 -1
  43. package/locales/zh-tw/zh-tw.messages.json +10 -1
  44. package/masked-text-box/package.json +4 -0
  45. package/package.json +5 -1
  46. package/types/nanahoshi-mona-ui-i18n.d.ts +20 -0
  47. package/types/nanahoshi-mona-ui-internal-list.d.ts +12 -0
  48. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +9 -0
  49. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +9 -0
  50. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +9 -0
  51. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +9 -0
  52. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +9 -0
  53. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +9 -0
  54. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +9 -0
  55. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +9 -0
  56. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +9 -0
  57. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +9 -0
  58. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +9 -0
  59. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +9 -0
  60. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +9 -0
  61. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +9 -0
  62. package/types/nanahoshi-mona-ui-masked-text-box.d.ts +391 -0
  63. package/types/nanahoshi-mona-ui-multi-select.d.ts +11 -0
  64. package/types/nanahoshi-mona-ui-popup.d.ts +3 -1
@@ -51,7 +51,8 @@ function localizeNumber(value, options) {
51
51
  const MULTI_SELECT_DEFAULT_MESSAGES = {
52
52
  clear: "Clear",
53
53
  itemsCount: (count) => count === 1 ? `+ ${localizeNumber(count)} item` : `+ ${localizeNumber(count)} items`,
54
- removeMoreItems: (count) => count === 1 ? `Remove ${localizeNumber(count)} more item` : `Remove ${localizeNumber(count)} more items`
54
+ removeMoreItems: (count) => count === 1 ? `Remove ${localizeNumber(count)} more item` : `Remove ${localizeNumber(count)} more items`,
55
+ selectAll: "Select all"
55
56
  };
56
57
  var MultiSelectService = class MultiSelectService {
57
58
  constructor() {
@@ -322,6 +323,10 @@ var MultiSelectComponent = class MultiSelectComponent {
322
323
  ...ngDevMode ? { debugName: "showClearButton" } : /* istanbul ignore next */ {},
323
324
  transform: booleanAttribute
324
325
  });
326
+ this.showSelectAll = input(false, {
327
+ ...ngDevMode ? { debugName: "showSelectAll" } : /* istanbul ignore next */ {},
328
+ transform: booleanAttribute
329
+ });
325
330
  this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
326
331
  this.textField = input(...ngDevMode ? [void 0, { debugName: "textField" }] : /* istanbul ignore next */ []);
327
332
  this.touch = output();
@@ -363,6 +368,14 @@ var MultiSelectComponent = class MultiSelectComponent {
363
368
  const checkboxVisible = this.checkboxes();
364
369
  untracked(() => this.#listService.setSelectableOptions({ checkboxes: checkboxVisible }));
365
370
  });
371
+ effect(() => {
372
+ const showSelectAll = this.showSelectAll();
373
+ const label = this.messages().selectAll;
374
+ untracked(() => {
375
+ this.#listService.selectAllEnabled.set(showSelectAll);
376
+ this.#listService.selectAllLabel.set(label);
377
+ });
378
+ });
366
379
  effect((onCleanup) => {
367
380
  const popupElement = this.#popupRef()?.overlayRef.overlayElement;
368
381
  if (popupElement == null) return;
@@ -687,6 +700,13 @@ var MultiSelectComponent = class MultiSelectComponent {
687
700
  isRequired: false,
688
701
  transformFunction: null
689
702
  },
703
+ showSelectAll: {
704
+ classPropertyName: "showSelectAll",
705
+ publicName: "showSelectAll",
706
+ isSignal: true,
707
+ isRequired: false,
708
+ transformFunction: null
709
+ },
690
710
  size: {
691
711
  classPropertyName: "size",
692
712
  publicName: "size",
@@ -1250,6 +1270,14 @@ i0.ɵɵngDeclareClassMetadata({
1250
1270
  required: false
1251
1271
  }]
1252
1272
  }],
1273
+ showSelectAll: [{
1274
+ type: i0.Input,
1275
+ args: [{
1276
+ isSignal: true,
1277
+ alias: "showSelectAll",
1278
+ required: false
1279
+ }]
1280
+ }],
1253
1281
  size: [{
1254
1282
  type: i0.Input,
1255
1283
  args: [{
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, DOCUMENT, DestroyRef, ElementRef, Injectable, InjectionToken, Injector, TemplateRef, ViewContainerRef, booleanAttribute, computed, effect, inject, input, output, signal, viewChild } from "@angular/core";
3
3
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
4
- import { ReplaySubject, Subject, Subscription, asapScheduler, asyncScheduler, fromEvent, merge, take, takeUntil } from "rxjs";
4
+ import { ReplaySubject, Subject, Subscription, asapScheduler, asyncScheduler, filter, fromEvent, merge, take, takeUntil } from "rxjs";
5
5
  import { PreventableEvent } from "@nanahoshi/mona-ui/common";
6
6
  import { Directionality } from "@angular/cdk/bidi";
7
7
  import { Overlay, OverlayConfig } from "@angular/cdk/overlay";
@@ -356,7 +356,7 @@ var PopupReference = class {
356
356
  return this.overlayReference;
357
357
  }
358
358
  };
359
- const connectionPosition = (anchorConnectionPoint, popupConnectionPoint) => {
359
+ const connectionPosition = (anchorConnectionPoint, popupConnectionPoint, offset) => {
360
360
  const originMap = {
361
361
  topleft: {
362
362
  originX: "start",
@@ -437,7 +437,15 @@ const connectionPosition = (anchorConnectionPoint, popupConnectionPoint) => {
437
437
  ...originMap[anchorConnectionPoint],
438
438
  ...overlayMap[popupConnectionPoint]
439
439
  };
440
- return [primaryPosition, ...generateFallbackPositions(primaryPosition)];
440
+ const positions = [primaryPosition, ...generateFallbackPositions(primaryPosition)];
441
+ if (!offset) return positions;
442
+ const horizontal = offset.horizontal ?? 0;
443
+ const vertical = offset.vertical ?? 0;
444
+ return positions.map((position) => ({
445
+ ...position,
446
+ offsetX: mirrorsX(primaryPosition, position) ? negate(horizontal) : horizontal,
447
+ offsetY: mirrorsY(primaryPosition, position) ? negate(vertical) : vertical
448
+ }));
441
449
  };
442
450
  const generateFallbackPositions = (primaryPosition) => {
443
451
  const { originX, originY, overlayX, overlayY } = primaryPosition;
@@ -583,6 +591,9 @@ const generateFallbackPositions = (primaryPosition) => {
583
591
  };
584
592
  const flipX = (value) => value === "start" ? "end" : value === "end" ? "start" : value;
585
593
  const flipY = (value) => value === "top" ? "bottom" : value === "bottom" ? "top" : value;
594
+ const mirrorsX = (primary, position) => (position.originX !== primary.originX || position.overlayX !== primary.overlayX) && position.originX === flipX(primary.originX) && position.overlayX === flipX(primary.overlayX);
595
+ const mirrorsY = (primary, position) => (position.originY !== primary.originY || position.overlayY !== primary.overlayY) && position.originY === flipY(primary.originY) && position.overlayY === flipY(primary.overlayY);
596
+ const negate = (value) => value === 0 ? 0 : -value;
586
597
  var PopupService = class PopupService {
587
598
  #destroyRef = inject(DestroyRef);
588
599
  #directionality = inject(Directionality, { optional: true });
@@ -683,7 +694,7 @@ var PopupService = class PopupService {
683
694
  createPositionStrategy(settings) {
684
695
  if (settings.positionStrategy === "global") return this.#overlay.position().global();
685
696
  const resolvedAnchor = this.resolveAnchor(settings.anchor);
686
- const position = settings.positions?.length ? settings.positions : this.getPosition(settings.anchorConnectionPoint, settings.popupConnectionPoint);
697
+ const position = settings.positions?.length ? settings.positions : this.getPosition(settings.anchorConnectionPoint, settings.popupConnectionPoint, settings.offset);
687
698
  const strategy = this.#overlay.position().flexibleConnectedTo(resolvedAnchor).withPositions(position).withDefaultOffsetX(settings.offset?.horizontal ?? 0).withDefaultOffsetY(settings.offset?.vertical ?? 0).withPush(settings.withPush ?? true);
688
699
  if (settings.withScrollTracking ?? true) {
689
700
  const scrollableContainers = this.getScrollableContainers(resolvedAnchor);
@@ -721,8 +732,8 @@ var PopupService = class PopupService {
721
732
  if (typeof anchor === "object" && "nativeElement" in anchor && anchor.nativeElement instanceof HTMLElement) return anchor.nativeElement;
722
733
  return null;
723
734
  }
724
- getPosition(anchorConnectionPoint, popupConnectionPoint) {
725
- return connectionPosition(anchorConnectionPoint ?? "bottomleft", popupConnectionPoint ?? "topleft");
735
+ getPosition(anchorConnectionPoint, popupConnectionPoint, offset) {
736
+ return connectionPosition(anchorConnectionPoint ?? "bottomleft", popupConnectionPoint ?? "topleft", offset);
726
737
  }
727
738
  getScrollableAncestorElements(anchorElement) {
728
739
  const scrollables = [];
@@ -939,12 +950,22 @@ var PopupService = class PopupService {
939
950
  popupReference.close(closeEvent, 0);
940
951
  };
941
952
  const win = this.#document.defaultView;
942
- const pageEvents = [fromEvent(win, "scroll", { passive: true }), fromEvent(this.#document, "scroll", { passive: true })];
953
+ const pageStart = {
954
+ left: win.scrollX,
955
+ top: win.scrollY
956
+ };
957
+ const pageMoved = () => win.scrollX !== pageStart.left || win.scrollY !== pageStart.top;
958
+ const pageEvents = [fromEvent(win, "scroll", { passive: true }).pipe(filter(pageMoved)), fromEvent(this.#document, "scroll", { passive: true }).pipe(filter(pageMoved))];
943
959
  if (scrollableContainers.length === 0) pageEvents.push(fromEvent(win, "resize", { passive: true }));
944
960
  const pageScrollSubscription = merge(...pageEvents).pipe(takeUntil(popupReference.closed), takeUntilDestroyed(this.#destroyRef)).subscribe((event) => handleScrollClose(event));
945
961
  subscriptions.push(pageScrollSubscription);
946
962
  scrollableContainers.forEach((scrollable) => {
947
- const containerScrollSubscription = scrollable.elementScrolled().pipe(takeUntil(popupReference.closed), takeUntilDestroyed(this.#destroyRef)).subscribe(() => handleScrollClose());
963
+ const element = scrollable.getElementRef().nativeElement;
964
+ const start = {
965
+ left: element.scrollLeft,
966
+ top: element.scrollTop
967
+ };
968
+ const containerScrollSubscription = scrollable.elementScrolled().pipe(filter(() => element.scrollLeft !== start.left || element.scrollTop !== start.top), takeUntil(popupReference.closed), takeUntilDestroyed(this.#destroyRef)).subscribe(() => handleScrollClose());
948
969
  subscriptions.push(containerScrollSubscription);
949
970
  });
950
971
  popupReference.closed.pipe(take(1)).subscribe(() => {
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Transfer to the other list",
446
446
  "transferToList": "Transfer to {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "That character doesn't fit here",
450
+ "clear": "Clear",
451
+ "digitOnly": "Only a digit fits here",
452
+ "digitOrSignOnly": "Only a digit, plus or minus fits here",
453
+ "letterOnly": "Only a letter fits here",
454
+ "letterOrDigitOnly": "Only a letter or a digit fits here"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Clear",
450
458
  "itemsCount": "{count, plural, =1 {+ # item} other {+ # items}}",
451
- "removeMoreItems": "{count, plural, =1 {Remove # more item} other {Remove # more items}}"
459
+ "removeMoreItems": "{count, plural, =1 {Remove # more item} other {Remove # more items}}",
460
+ "selectAll": "Select all"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Close",
package/llms.txt CHANGED
@@ -48,6 +48,7 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
48
48
  - [Form Field](docs/form-field.md): Labels one form control, describes it with a hint and shows its validation errors.
49
49
  - [Input](docs/input.md): Styles a native input element and keeps its browser behavior.
50
50
  - [Label](docs/label.md): Styled, accessible labels associated with form controls.
51
+ - [Masked Text Box](docs/masked-textbox.md): A text input for values in a fixed format, such as phone numbers, that fills in the format as you type.
51
52
  - [Numeric Text Box](docs/numeric-textbox.md): A number input with spinner buttons, bounds and decimal formatting.
52
53
  - [OTP Input](docs/otp-input.md): A segmented input for one-time passwords and verification codes.
53
54
  - [Text Area](docs/textarea.md): Styles a native textarea element and keeps its browser behavior.
@@ -195,12 +196,13 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
195
196
  - [`@nanahoshi/mona-ui/filter`](docs/api/filter.md): 7 exports, in full.
196
197
  - [`@nanahoshi/mona-ui/form-field`](docs/api/form-field.md): 6 exports, in full.
197
198
  - [`@nanahoshi/mona-ui/grid`](docs/api/grid.md): 87 exports, in full.
198
- - [`@nanahoshi/mona-ui/i18n`](docs/api/i18n.md): 115 exports, in full.
199
+ - [`@nanahoshi/mona-ui/i18n`](docs/api/i18n.md): 116 exports, in full.
199
200
  - [`@nanahoshi/mona-ui/label`](docs/api/label.md): 4 exports, in full.
200
201
  - [`@nanahoshi/mona-ui/list`](docs/api/list.md): 10 exports, in full.
201
202
  - [`@nanahoshi/mona-ui/list-box`](docs/api/list-box.md): 16 exports, in full.
202
203
  - [`@nanahoshi/mona-ui/list-view`](docs/api/list-view.md): 20 exports, in full.
203
204
  - [`@nanahoshi/mona-ui/locales`](docs/api/locales.md): 16 exports, in full.
205
+ - [`@nanahoshi/mona-ui/masked-text-box`](docs/api/masked-text-box.md): 8 exports, in full.
204
206
  - [`@nanahoshi/mona-ui/menubar`](docs/api/menubar.md): 15 exports, in full.
205
207
  - [`@nanahoshi/mona-ui/multi-select`](docs/api/multi-select.md): 5 exports, in full.
206
208
  - [`@nanahoshi/mona-ui/notification`](docs/api/notification.md): 12 exports, in full.
@@ -445,10 +445,19 @@
445
445
  "transferTo": "نقل إلى القائمة الأخرى",
446
446
  "transferToList": "نقل إلى {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "لا يمكن إدخال هذا الحرف هنا",
450
+ "clear": "مسح",
451
+ "digitOnly": "يمكن إدخال رقم فقط هنا",
452
+ "digitOrSignOnly": "يمكن إدخال رقم أو علامة زائد أو ناقص فقط هنا",
453
+ "letterOnly": "يمكن إدخال حرف فقط هنا",
454
+ "letterOrDigitOnly": "يمكن إدخال حرف أو رقم فقط هنا"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "مسح",
450
458
  "itemsCount": "+ {count}",
451
- "removeMoreItems": "حذف العناصر الإضافية ({count})"
459
+ "removeMoreItems": "حذف العناصر الإضافية ({count})",
460
+ "selectAll": "تحديد الكل"
452
461
  },
453
462
  "notification": {
454
463
  "close": "إغلاق",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "In die andere Liste übertragen",
446
446
  "transferToList": "In {list} übertragen"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Dieses Zeichen passt hier nicht",
450
+ "clear": "Leeren",
451
+ "digitOnly": "Hier passt nur eine Ziffer",
452
+ "digitOrSignOnly": "Hier passt nur eine Ziffer, Plus oder Minus",
453
+ "letterOnly": "Hier passt nur ein Buchstabe",
454
+ "letterOrDigitOnly": "Hier passt nur ein Buchstabe oder eine Ziffer"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Leeren",
450
458
  "itemsCount": "{count, plural, =1 {+ # Element} other {+ # Elemente}}",
451
- "removeMoreItems": "{count, plural, =1 {# weiteres Element entfernen} other {# weitere Elemente entfernen}}"
459
+ "removeMoreItems": "{count, plural, =1 {# weiteres Element entfernen} other {# weitere Elemente entfernen}}",
460
+ "selectAll": "Alle auswählen"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Schließen",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Transferir a la otra lista",
446
446
  "transferToList": "Transferir a {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Ese carácter no cabe aquí",
450
+ "clear": "Limpiar",
451
+ "digitOnly": "Aquí solo cabe un dígito",
452
+ "digitOrSignOnly": "Aquí solo cabe un dígito, más o menos",
453
+ "letterOnly": "Aquí solo cabe una letra",
454
+ "letterOrDigitOnly": "Aquí solo cabe una letra o un dígito"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Limpiar",
450
458
  "itemsCount": "{count, plural, =1 {+ # elemento} other {+ # elementos}}",
451
- "removeMoreItems": "{count, plural, =1 {Quitar # elemento más} other {Quitar # elementos más}}"
459
+ "removeMoreItems": "{count, plural, =1 {Quitar # elemento más} other {Quitar # elementos más}}",
460
+ "selectAll": "Seleccionar todo"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Cerrar",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Transférer vers l’autre liste",
446
446
  "transferToList": "Transférer vers {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Ce caractère n’est pas accepté ici",
450
+ "clear": "Effacer",
451
+ "digitOnly": "Seul un chiffre est accepté ici",
452
+ "digitOrSignOnly": "Seul un chiffre, plus ou moins est accepté ici",
453
+ "letterOnly": "Seule une lettre est acceptée ici",
454
+ "letterOrDigitOnly": "Seul un chiffre ou une lettre est accepté ici"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Effacer",
450
458
  "itemsCount": "{count, plural, =1 {+ # élément} other {+ # éléments}}",
451
- "removeMoreItems": "{count, plural, =1 {Retirer # autre élément} other {Retirer # autres éléments}}"
459
+ "removeMoreItems": "{count, plural, =1 {Retirer # autre élément} other {Retirer # autres éléments}}",
460
+ "selectAll": "Tout sélectionner"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Fermer",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Pindahkan ke daftar lain",
446
446
  "transferToList": "Pindahkan ke {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Karakter itu tidak bisa diisi di sini",
450
+ "clear": "Bersihkan",
451
+ "digitOnly": "Hanya angka yang bisa diisi di sini",
452
+ "digitOrSignOnly": "Hanya angka, plus, atau minus yang bisa diisi di sini",
453
+ "letterOnly": "Hanya huruf yang bisa diisi di sini",
454
+ "letterOrDigitOnly": "Hanya huruf atau angka yang bisa diisi di sini"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Bersihkan",
450
458
  "itemsCount": "+ {count} item",
451
- "removeMoreItems": "Hapus {count} item lainnya"
459
+ "removeMoreItems": "Hapus {count} item lainnya",
460
+ "selectAll": "Pilih semua"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Tutup",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Sposta nell'altro elenco",
446
446
  "transferToList": "Sposta in {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Questo carattere non va qui",
450
+ "clear": "Cancella",
451
+ "digitOnly": "Qui va solo una cifra",
452
+ "digitOrSignOnly": "Qui va solo una cifra, più o meno",
453
+ "letterOnly": "Qui va solo una lettera",
454
+ "letterOrDigitOnly": "Qui va solo una lettera o una cifra"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Cancella",
450
458
  "itemsCount": "{count, plural, =1 {+ 1 elemento} other {+ # elementi}}",
451
- "removeMoreItems": "{count, plural, =1 {Rimuovi un altro elemento} other {Rimuovi altri # elementi}}"
459
+ "removeMoreItems": "{count, plural, =1 {Rimuovi un altro elemento} other {Rimuovi altri # elementi}}",
460
+ "selectAll": "Seleziona tutto"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Chiudi",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "もう一方のリストへ移動",
446
446
  "transferToList": "{list}へ移動"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "この文字はここに入力できません",
450
+ "clear": "クリア",
451
+ "digitOnly": "ここには数字のみ入力できます",
452
+ "digitOrSignOnly": "ここには数字、プラス、マイナスのみ入力できます",
453
+ "letterOnly": "ここには文字のみ入力できます",
454
+ "letterOrDigitOnly": "ここには文字または数字のみ入力できます"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "クリア",
450
458
  "itemsCount": "+ {count}件",
451
- "removeMoreItems": "他の{count}件を削除"
459
+ "removeMoreItems": "他の{count}件を削除",
460
+ "selectAll": "すべて選択"
452
461
  },
453
462
  "notification": {
454
463
  "close": "閉じる",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "다른 목록으로 이동",
446
446
  "transferToList": "{list}(으)로 이동"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "이 문자는 여기에 입력할 수 없습니다",
450
+ "clear": "지우기",
451
+ "digitOnly": "여기에는 숫자만 입력할 수 있습니다",
452
+ "digitOrSignOnly": "여기에는 숫자, 더하기, 빼기 기호만 입력할 수 있습니다",
453
+ "letterOnly": "여기에는 문자만 입력할 수 있습니다",
454
+ "letterOrDigitOnly": "여기에는 문자나 숫자만 입력할 수 있습니다"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "지우기",
450
458
  "itemsCount": "+ {count}개",
451
- "removeMoreItems": "나머지 {count}개 삭제"
459
+ "removeMoreItems": "나머지 {count}개 삭제",
460
+ "selectAll": "모두 선택"
452
461
  },
453
462
  "notification": {
454
463
  "close": "닫기",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Przenieś do drugiej listy",
446
446
  "transferToList": "Przenieś do listy „{list}”"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Tego znaku nie można tu wpisać",
450
+ "clear": "Wyczyść",
451
+ "digitOnly": "Tu można wpisać tylko cyfrę",
452
+ "digitOrSignOnly": "Tu można wpisać tylko cyfrę, plus lub minus",
453
+ "letterOnly": "Tu można wpisać tylko literę",
454
+ "letterOrDigitOnly": "Tu można wpisać tylko literę lub cyfrę"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Wyczyść",
450
458
  "itemsCount": "+ {count, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}",
451
- "removeMoreItems": "Usuń jeszcze {count, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}"
459
+ "removeMoreItems": "Usuń jeszcze {count, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}",
460
+ "selectAll": "Zaznacz wszystko"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Zamknij",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Mover para a outra lista",
446
446
  "transferToList": "Mover para {list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Esse caractere não cabe aqui",
450
+ "clear": "Limpar",
451
+ "digitOnly": "Aqui só cabe um dígito",
452
+ "digitOrSignOnly": "Aqui só cabe um dígito, mais ou menos",
453
+ "letterOnly": "Aqui só cabe uma letra",
454
+ "letterOrDigitOnly": "Aqui só cabe uma letra ou um dígito"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Limpar",
450
458
  "itemsCount": "{count, plural, =1 {+ 1 item} other {+ # itens}}",
451
- "removeMoreItems": "{count, plural, =1 {Remover mais 1 item} other {Remover mais # itens}}"
459
+ "removeMoreItems": "{count, plural, =1 {Remover mais 1 item} other {Remover mais # itens}}",
460
+ "selectAll": "Selecionar tudo"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Fechar",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Перенести в другой список",
446
446
  "transferToList": "Перенести в список «{list}»"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Этот символ здесь не подходит",
450
+ "clear": "Очистить",
451
+ "digitOnly": "Здесь можно ввести только цифру",
452
+ "digitOrSignOnly": "Здесь можно ввести только цифру, плюс или минус",
453
+ "letterOnly": "Здесь можно ввести только букву",
454
+ "letterOrDigitOnly": "Здесь можно ввести только букву или цифру"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Очистить",
450
458
  "itemsCount": "+ {count, plural, one {# элемент} few {# элемента} many {# элементов} other {# элемента}}",
451
- "removeMoreItems": "Удалить ещё {count, plural, one {# элемент} few {# элемента} many {# элементов} other {# элемента}}"
459
+ "removeMoreItems": "Удалить ещё {count, plural, one {# элемент} few {# элемента} many {# элементов} other {# элемента}}",
460
+ "selectAll": "Выбрать все"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Закрыть",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "Diğer listeye taşı",
446
446
  "transferToList": "{list} listesine taşı"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "Bu karakter buraya girilemez",
450
+ "clear": "Temizle",
451
+ "digitOnly": "Buraya yalnızca rakam girilebilir",
452
+ "digitOrSignOnly": "Buraya yalnızca rakam, artı veya eksi girilebilir",
453
+ "letterOnly": "Buraya yalnızca harf girilebilir",
454
+ "letterOrDigitOnly": "Buraya yalnızca harf veya rakam girilebilir"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "Temizle",
450
458
  "itemsCount": "+ {count} öğe",
451
- "removeMoreItems": "Diğer {count} öğeyi kaldır"
459
+ "removeMoreItems": "Diğer {count} öğeyi kaldır",
460
+ "selectAll": "Tümünü seç"
452
461
  },
453
462
  "notification": {
454
463
  "close": "Kapat",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "移至另一列表",
446
446
  "transferToList": "移至{list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "此处不能输入该字符",
450
+ "clear": "清除",
451
+ "digitOnly": "此处只能输入数字",
452
+ "digitOrSignOnly": "此处只能输入数字、加号或减号",
453
+ "letterOnly": "此处只能输入字母",
454
+ "letterOrDigitOnly": "此处只能输入字母或数字"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "清除",
450
458
  "itemsCount": "+ {count} 项",
451
- "removeMoreItems": "删除其余 {count} 项"
459
+ "removeMoreItems": "删除其余 {count} 项",
460
+ "selectAll": "全选"
452
461
  },
453
462
  "notification": {
454
463
  "close": "关闭",
@@ -445,10 +445,19 @@
445
445
  "transferTo": "移至另一清單",
446
446
  "transferToList": "移至{list}"
447
447
  },
448
+ "maskedTextBox": {
449
+ "characterNotAllowed": "此處不能輸入該字元",
450
+ "clear": "清除",
451
+ "digitOnly": "此處只能輸入數字",
452
+ "digitOrSignOnly": "此處只能輸入數字、加號或減號",
453
+ "letterOnly": "此處只能輸入字母",
454
+ "letterOrDigitOnly": "此處只能輸入字母或數字"
455
+ },
448
456
  "multiSelect": {
449
457
  "clear": "清除",
450
458
  "itemsCount": "+ {count} 項",
451
- "removeMoreItems": "移除其餘 {count} 項"
459
+ "removeMoreItems": "移除其餘 {count} 項",
460
+ "selectAll": "全選"
452
461
  },
453
462
  "notification": {
454
463
  "close": "關閉",
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-masked-text-box.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-masked-text-box.d.ts"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.35.0",
3
+ "version": "0.36.1",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -274,6 +274,10 @@
274
274
  "types": "./types/nanahoshi-mona-ui-locales-zh-tw.d.ts",
275
275
  "default": "./fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs"
276
276
  },
277
+ "./masked-text-box": {
278
+ "types": "./types/nanahoshi-mona-ui-masked-text-box.d.ts",
279
+ "default": "./fesm2022/nanahoshi-mona-ui-masked-text-box.mjs"
280
+ },
277
281
  "./menubar": {
278
282
  "types": "./types/nanahoshi-mona-ui-menubar.d.ts",
279
283
  "default": "./fesm2022/nanahoshi-mona-ui-menubar.mjs"
@@ -702,10 +702,29 @@ export interface MonaListBoxMessages {
702
702
  /** Label of Transfer To, naming the connected list box. */
703
703
  transferToList(list: string): string;
704
704
  }
705
+ /**
706
+ * The masked text box's clear button, and what it says when a typed character doesn't fit the slot at the caret.
707
+ */
708
+ export interface MonaMaskedTextBoxMessages {
709
+ /** Read out when a character doesn't fit a slot that takes something else, such as one of a custom rule. */
710
+ readonly characterNotAllowed: string;
711
+ /** Name of the button that clears the value. */
712
+ readonly clear: string;
713
+ /** Read out when a character doesn't fit a slot that takes a digit. */
714
+ readonly digitOnly: string;
715
+ /** Read out when a character doesn't fit a slot that takes a digit, `+` or `-`. */
716
+ readonly digitOrSignOnly: string;
717
+ /** Read out when a character doesn't fit a slot that takes a letter. */
718
+ readonly letterOnly: string;
719
+ /** Read out when a character doesn't fit a slot that takes a letter or a digit. */
720
+ readonly letterOrDigitOnly: string;
721
+ }
705
722
  export interface MonaMultiSelectMessages {
706
723
  readonly clear: string;
707
724
  readonly itemsCount: (count: number) => string;
708
725
  readonly removeMoreItems: (count: number) => string;
726
+ /** The option at the top of the list that selects every item shown, or clears them when they're all selected. */
727
+ readonly selectAll: string;
709
728
  }
710
729
  export interface MonaNotificationMessages {
711
730
  readonly close: string;
@@ -948,6 +967,7 @@ export interface MonaLocaleMessages {
948
967
  label: MonaLabelMessages;
949
968
  list: MonaListMessages;
950
969
  listBox: MonaListBoxMessages;
970
+ maskedTextBox: MonaMaskedTextBoxMessages;
951
971
  multiSelect: MonaMultiSelectMessages;
952
972
  notification: MonaNotificationMessages;
953
973
  numericTextBox: MonaNumericTextBoxMessages;
@@ -163,6 +163,16 @@ export declare class ListService<TData> {
163
163
  item: ListItem<TData>;
164
164
  focus: boolean;
165
165
  }>;
166
+ /** Whether a multiple-selection list starts with a "Select all" option. */
167
+ readonly selectAllEnabled: import("@angular/core").WritableSignal<boolean>;
168
+ /**
169
+ * The option that selects every enabled option the filter leaves, or clears them when they're all selected. It has
170
+ * no data item: its text is the select-all label, and it's selected while every option it covers is.
171
+ */
172
+ readonly selectAllItem: ListItem<TData>;
173
+ readonly selectAllLabel: import("@angular/core").WritableSignal<string>;
174
+ /** How many of the options "Select all" covers are selected. */
175
+ readonly selectAllState: import("@angular/core").Signal<"some" | "all" | "none">;
166
176
  readonly selectableOptions: import("@angular/core").WritableSignal<SelectableOptions>;
167
177
  readonly selectedKeys: import("@angular/core").WritableSignal<ImmutableSet<unknown>>;
168
178
  readonly selectedKeysChange$: Subject<unknown[]>;
@@ -247,6 +257,8 @@ export declare class ListService<TData> {
247
257
  setTextField(textField: string | Selector<TData, string>): void;
248
258
  setValueField(valueField: string | Selector<TData, unknown>): void;
249
259
  setVirtualScrollOptions(options: VirtualScrollOptions): void;
260
+ /** Selects every option "Select all" covers, or deselects them when they're all selected already. */
261
+ toggleSelectAll(): void;
250
262
  private filterItem;
251
263
  /**
252
264
  * Returns the item when it is one of the navigable items, otherwise `null`.
@@ -448,10 +448,19 @@ export declare const MONA_AR_SA_LOCALE: {
448
448
  transferTo: string;
449
449
  transferToList: (list: string) => string;
450
450
  };
451
+ maskedTextBox: {
452
+ characterNotAllowed: string;
453
+ clear: string;
454
+ digitOnly: string;
455
+ digitOrSignOnly: string;
456
+ letterOnly: string;
457
+ letterOrDigitOnly: string;
458
+ };
451
459
  multiSelect: {
452
460
  clear: string;
453
461
  itemsCount: (count: number) => string;
454
462
  removeMoreItems: (count: number) => string;
463
+ selectAll: string;
455
464
  };
456
465
  notification: {
457
466
  close: string;
@@ -448,10 +448,19 @@ export declare const MONA_DE_DE_LOCALE: {
448
448
  transferTo: string;
449
449
  transferToList: (list: string) => string;
450
450
  };
451
+ maskedTextBox: {
452
+ characterNotAllowed: string;
453
+ clear: string;
454
+ digitOnly: string;
455
+ digitOrSignOnly: string;
456
+ letterOnly: string;
457
+ letterOrDigitOnly: string;
458
+ };
451
459
  multiSelect: {
452
460
  clear: string;
453
461
  itemsCount: (count: number) => string;
454
462
  removeMoreItems: (count: number) => string;
463
+ selectAll: string;
455
464
  };
456
465
  notification: {
457
466
  close: string;