forty-cdk 0.45.1 → 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.
- package/fesm2022/forty-cdk-core-anchored.mjs +3 -3
- package/fesm2022/forty-cdk-core-anchored.mjs.map +1 -1
- package/fesm2022/forty-cdk-core-overlay.mjs +60 -17
- package/fesm2022/forty-cdk-core-overlay.mjs.map +1 -1
- package/fesm2022/forty-cdk-core.mjs +66 -4
- package/fesm2022/forty-cdk-core.mjs.map +1 -1
- package/fesm2022/forty-cdk-drag-drop.mjs +5 -4
- package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +73 -22
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -1
- package/fesm2022/forty-cdk-menubar.mjs +8 -6
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -1
- package/fesm2022/forty-cdk-navigation-menu.mjs +18 -28
- package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-radio-group.mjs +7 -9
- package/fesm2022/forty-cdk-radio-group.mjs.map +1 -1
- package/fesm2022/forty-cdk-slider.mjs +3 -3
- package/fesm2022/forty-cdk-slider.mjs.map +1 -1
- package/fesm2022/forty-cdk-table.mjs +19 -15
- package/fesm2022/forty-cdk-table.mjs.map +1 -1
- package/fesm2022/forty-cdk-tabs.mjs +15 -20
- package/fesm2022/forty-cdk-tabs.mjs.map +1 -1
- package/fesm2022/forty-cdk-toggle.mjs +6 -10
- package/fesm2022/forty-cdk-toggle.mjs.map +1 -1
- package/fesm2022/forty-cdk-tree.mjs +35 -11
- package/fesm2022/forty-cdk-tree.mjs.map +1 -1
- package/listbox/README.md +22 -0
- package/package.json +1 -1
- package/types/forty-cdk-core-overlay.d.ts +33 -4
- package/types/forty-cdk-core.d.ts +42 -0
- package/types/forty-cdk-listbox.d.ts +19 -1
- 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
|
|
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
|
-
|
|
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({
|