forty-cdk 0.45.0 → 0.46.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.
Files changed (39) hide show
  1. package/fesm2022/forty-cdk-avatar.mjs +6 -7
  2. package/fesm2022/forty-cdk-avatar.mjs.map +1 -1
  3. package/fesm2022/forty-cdk-combobox.mjs +6 -7
  4. package/fesm2022/forty-cdk-combobox.mjs.map +1 -1
  5. package/fesm2022/forty-cdk-core-anchored.mjs +12 -10
  6. package/fesm2022/forty-cdk-core-anchored.mjs.map +1 -1
  7. package/fesm2022/forty-cdk-core-overlay.mjs +60 -17
  8. package/fesm2022/forty-cdk-core-overlay.mjs.map +1 -1
  9. package/fesm2022/forty-cdk-core.mjs +99 -13
  10. package/fesm2022/forty-cdk-core.mjs.map +1 -1
  11. package/fesm2022/forty-cdk-drag-drop.mjs +5 -4
  12. package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -1
  13. package/fesm2022/forty-cdk-listbox.mjs +73 -22
  14. package/fesm2022/forty-cdk-listbox.mjs.map +1 -1
  15. package/fesm2022/forty-cdk-menubar.mjs +8 -6
  16. package/fesm2022/forty-cdk-menubar.mjs.map +1 -1
  17. package/fesm2022/forty-cdk-navigation-menu.mjs +18 -28
  18. package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -1
  19. package/fesm2022/forty-cdk-radio-group.mjs +7 -9
  20. package/fesm2022/forty-cdk-radio-group.mjs.map +1 -1
  21. package/fesm2022/forty-cdk-select.mjs +6 -7
  22. package/fesm2022/forty-cdk-select.mjs.map +1 -1
  23. package/fesm2022/forty-cdk-slider.mjs +3 -3
  24. package/fesm2022/forty-cdk-slider.mjs.map +1 -1
  25. package/fesm2022/forty-cdk-table.mjs +19 -15
  26. package/fesm2022/forty-cdk-table.mjs.map +1 -1
  27. package/fesm2022/forty-cdk-tabs.mjs +15 -20
  28. package/fesm2022/forty-cdk-tabs.mjs.map +1 -1
  29. package/fesm2022/forty-cdk-toggle.mjs +6 -10
  30. package/fesm2022/forty-cdk-toggle.mjs.map +1 -1
  31. package/fesm2022/forty-cdk-tree.mjs +35 -11
  32. package/fesm2022/forty-cdk-tree.mjs.map +1 -1
  33. package/listbox/README.md +22 -0
  34. package/package.json +1 -1
  35. package/types/forty-cdk-core-anchored.d.ts +21 -4
  36. package/types/forty-cdk-core-overlay.d.ts +33 -4
  37. package/types/forty-cdk-core.d.ts +48 -25
  38. package/types/forty-cdk-listbox.d.ts +19 -1
  39. package/types/forty-cdk-tabs.d.ts +4 -3
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { DOCUMENT, DestroyRef, Directive, ElementRef, InjectionToken, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChildren, effect, inject, input, model, output, signal } from "@angular/core";
3
3
  import { isPlatformBrowser } from "@angular/common";
4
- import { BOTH_DRAG_AXES, Collection, DragAnnouncer, LiveAnnouncer, NO_DRAG_AXES, PreviewController, RovingTabindex, assertInputBound, assertRootContext, awaitTransformTransition, clampDragIndex, clampPreviewPosition, composedParentElement, createPointerDragSession, createTemplatePreview, dragHandleTouchAction, dragSurfaceTouchAction, firstEnabledHost, focusWhenMounted, injectPrefersReducedMotion, injectReflectedDirection, injectRovingFocusRestore, injectTextDirection, isImeComposing, isUnset, markDragItemHost, moveIndex, navigateFromRovingItem, orphanContextError, registerHandle, resolveBoundaryElement, resolveDropTarget, resolveListNavigation, resolveText, stepDragTarget, unsetInput } from "forty-cdk/core";
4
+ import { BOTH_DRAG_AXES, Collection, DragAnnouncer, LiveAnnouncer, NO_DRAG_AXES, PreviewController, RovingTabindex, assertInputBound, assertRootContext, awaitTransformTransition, clampDragIndex, clampPreviewPosition, composedParentElement, createPointerDragSession, createTemplatePreview, dragHandleTouchAction, dragSurfaceTouchAction, findOwningHandle, firstEnabledHost, focusWhenMounted, injectPrefersReducedMotion, injectReflectedDirection, injectRovingFocusRestore, injectTextDirection, isImeComposing, isUnset, markDragItemHost, moveIndex, navigateFromRovingItem, orphanContextError, registerHandle, resolveBoundaryElement, resolveDropTarget, resolveListNavigation, resolveText, stepDragTarget, unsetInput } from "forty-cdk/core";
5
5
  import { FOR_DRAG_DROP_DEFAULTS, FOR_DRAG_DROP_DEFAULTS as FOR_DRAG_DROP_DEFAULTS$1, provideForDragDropDefaults } from "forty-cdk/defaults";
6
6
  const NO_VELOCITY = {
7
7
  x: 0,
@@ -1141,12 +1141,13 @@ i0.ɵɵngDeclareClassMetadata({
1141
1141
  function createPointerHandleGuard(disabled) {
1142
1142
  const handles = signal([], ...ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []);
1143
1143
  const nested = signal([], ...ngDevMode ? [{ debugName: "nested" }] : /* istanbul ignore next */ []);
1144
- const owns = (node) => !nested().some((host) => host.contains(node));
1144
+ const nestedIndex = computed(() => new Map(nested().map((host) => [host, host])), ...ngDevMode ? [{ debugName: "nestedIndex" }] : /* istanbul ignore next */ []);
1145
+ const handleIndex = computed(() => new Map(handles().map((handle) => [handle, handle])), ...ngDevMode ? [{ debugName: "handleIndex" }] : /* istanbul ignore next */ []);
1146
+ const owns = (node) => findOwningHandle(nestedIndex(), node, null, { includeSelf: true }) === void 0;
1145
1147
  const accepts = (eventTarget) => {
1146
1148
  const target = eventTarget;
1147
1149
  if (disabled() || target !== null && !owns(target)) return false;
1148
- const registered = handles();
1149
- return registered.length === 0 || target !== null && registered.some((handle) => handle.contains(target));
1150
+ return handles().length === 0 || target !== null && findOwningHandle(handleIndex(), target, null, { includeSelf: true }) !== void 0;
1150
1151
  };
1151
1152
  return {
1152
1153
  touchAction: computed(() => dragSurfaceTouchAction({