@nanahoshi/mona-ui 0.24.7 → 0.24.8

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 (67) hide show
  1. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
  2. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  3. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
  4. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-vXXNWmEN.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs} +2 -2
  5. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DDgNmgE0.mjs → nanahoshi-mona-ui-grid-grid-list.component-B6gq7Hu3.mjs} +4 -4
  6. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-Dzf6Vbs_.mjs → nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs} +2 -2
  7. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DAPNqnWV.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs} +4 -4
  8. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-B9rmDLq8.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs} +8 -8
  9. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  10. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +40 -3
  11. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +20 -4
  12. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +335 -45
  13. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +565 -197
  14. package/fesm2022/nanahoshi-mona-ui-internal.mjs +28 -2
  15. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +598 -208
  16. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +193 -71
  17. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +25 -3
  18. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +29 -3
  19. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +29 -3
  20. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +36 -3
  21. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +25 -3
  22. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +29 -3
  23. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +25 -3
  24. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +25 -3
  25. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +29 -3
  26. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +45 -3
  27. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +25 -3
  28. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +25 -3
  29. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +25 -3
  30. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1 -1
  31. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +205 -140
  32. package/i18n/catalogs/en-US.messages.json +28 -6
  33. package/locales/ar-sa/ar-sa.messages.json +25 -3
  34. package/locales/de-de/de-de.messages.json +25 -3
  35. package/locales/es-es/es-es.messages.json +25 -3
  36. package/locales/fr-fr/fr-fr.messages.json +25 -3
  37. package/locales/id-id/id-id.messages.json +25 -3
  38. package/locales/it-it/it-it.messages.json +25 -3
  39. package/locales/ja-jp/ja-jp.messages.json +25 -3
  40. package/locales/ko-kr/ko-kr.messages.json +25 -3
  41. package/locales/pt-br/pt-br.messages.json +25 -3
  42. package/locales/ru-ru/ru-ru.messages.json +25 -3
  43. package/locales/tr-tr/tr-tr.messages.json +25 -3
  44. package/locales/zh-cn/zh-cn.messages.json +25 -3
  45. package/locales/zh-tw/zh-tw.messages.json +25 -3
  46. package/package.json +1 -1
  47. package/types/nanahoshi-mona-ui-i18n.d.ts +50 -0
  48. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +14 -2
  49. package/types/nanahoshi-mona-ui-internal-list.d.ts +89 -10
  50. package/types/nanahoshi-mona-ui-internal-tree.d.ts +155 -40
  51. package/types/nanahoshi-mona-ui-internal.d.ts +10 -2
  52. package/types/nanahoshi-mona-ui-list-box.d.ts +148 -47
  53. package/types/nanahoshi-mona-ui-list-view.d.ts +112 -21
  54. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +22 -0
  55. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +22 -0
  56. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +22 -0
  57. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +22 -0
  58. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +22 -0
  59. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +22 -0
  60. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +22 -0
  61. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +22 -0
  62. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +22 -0
  63. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +22 -0
  64. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +22 -0
  65. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +22 -0
  66. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +22 -0
  67. package/types/nanahoshi-mona-ui-tree-view.d.ts +84 -40
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Renderer2, input, effect, Directive } from '@angular/core';
2
+ import { inject, ElementRef, Renderer2, input, effect, Directive, DOCUMENT, signal, afterEveryRender, untracked } from '@angular/core';
3
3
  import { forEach } from '@mirei/ts-collections';
4
4
  import { Observable, timer, take, debounceTime, map, merge, scan, filter } from 'rxjs';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -276,6 +276,32 @@ function focusElement(host, element) {
276
276
  }
277
277
  }
278
278
 
279
+ /**
280
+ * The text of the elements an `aria-labelledby` value points to, joined with spaces, for names built from a
281
+ * component's name ("Filter {name}"). It's read after every render, so it follows the labelling elements' text.
282
+ * Call it in an injection context.
283
+ * @param ids Returns the space-separated element ids.
284
+ */
285
+ function injectLabelledByText(ids) {
286
+ const document = inject(DOCUMENT);
287
+ const text = signal("", /* @ts-ignore */
288
+ ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
289
+ afterEveryRender({
290
+ read: () => {
291
+ const value = ids()
292
+ .split(/\s+/)
293
+ .filter(id => id.length > 0)
294
+ .map(id => document.getElementById(id)?.textContent?.replace(/\s+/g, " ").trim() ?? "")
295
+ .filter(part => part.length > 0)
296
+ .join(" ");
297
+ if (value !== untracked(text)) {
298
+ text.set(value);
299
+ }
300
+ }
301
+ });
302
+ return text.asReadonly();
303
+ }
304
+
279
305
  const rxFromResize = (target, options) => {
280
306
  return new Observable(observer => {
281
307
  const elements = target instanceof Element ? [target] : Array.from(target ?? []);
@@ -434,5 +460,5 @@ const setupTypeahead = (typeaheadKey$) => {
434
460
  * Generated bundle index. Do not edit.
435
461
  */
436
462
 
437
- export { AttributeBinderDirective, NavigationKeys, NavigationKeysList, TYPEAHEAD_RESET_DELAY, createElementControlId, focusCanReturn, focusElement, hex2rgba, hsla2hsva, hsva2rgba, isNavigationKey, isTypeaheadKey, isValidHex, isValidHsla, isValidRgb, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, rxFromResize, rxTimeout, setWindowStyles, setupTypeahead, string2Hsla, string2rgba, themeControlBackdropClasses, themeControlSurfaceClasses, themeOverlayBackdropClasses, themeOverlaySurfaceClasses, themeRaisedBackdropClasses, themeRaisedSurfaceClasses, toCssValue };
463
+ export { AttributeBinderDirective, NavigationKeys, NavigationKeysList, TYPEAHEAD_RESET_DELAY, createElementControlId, focusCanReturn, focusElement, hex2rgba, hsla2hsva, hsva2rgba, injectLabelledByText, isNavigationKey, isTypeaheadKey, isValidHex, isValidHsla, isValidRgb, restoreOverlayScroll, rgba2hex, rgba2hsla, rgba2hsva, rxFromResize, rxTimeout, setWindowStyles, setupTypeahead, string2Hsla, string2rgba, themeControlBackdropClasses, themeControlSurfaceClasses, themeOverlayBackdropClasses, themeOverlaySurfaceClasses, themeRaisedBackdropClasses, themeRaisedSurfaceClasses, toCssValue };
438
464
  //# sourceMappingURL=nanahoshi-mona-ui-internal.mjs.map