ngx-kit 9.2.3 → 9.2.4

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.
@@ -2804,6 +2804,7 @@ class NgxDraggable {
2804
2804
  * When `true`, presses on native interactive controls (`button, a, input, textarea, select`,
2805
2805
  * `[contenteditable]`) do not start a drag either. Off by default so that a page-builder canvas
2806
2806
  * block can be grabbed by its own button/link, which is exactly what you want while editing.
2807
+ * @default false
2807
2808
  */
2808
2809
  ignoreInteractive = input(false, /* @ts-ignore */
2809
2810
  ...(ngDevMode ? [{ debugName: "ignoreInteractive" }] : /* istanbul ignore next */ []));
@@ -2889,17 +2890,15 @@ class NgxDraggable {
2889
2890
  this._ref.dropList?.removeItem(this._ref);
2890
2891
  }
2891
2892
  pointerDown(e) {
2892
- if (this.disabled() ||
2893
- e.button !== 0 ||
2894
- this.isExcluded(e.target) ||
2895
- !this.isOnHandle(e.target))
2893
+ if (this.disabled() || e.button !== 0 || !this.isOnHandle(e.target))
2896
2894
  return;
2897
2895
  // Nested draggables: pointerdown bubbles, so without this an ancestor draggable would start
2898
2896
  // its own drag from the very same gesture. The innermost enabled draggable claims it.
2899
2897
  if (claimedPointerEvents.has(e))
2900
2898
  return;
2901
2899
  claimedPointerEvents.add(e);
2902
- e.preventDefault();
2900
+ if (this.ignoreInteractive())
2901
+ e.preventDefault();
2903
2902
  this.down = true;
2904
2903
  this.keyboardDrag = false;
2905
2904
  this.pointerId = e.pointerId;
@@ -3171,15 +3170,6 @@ class NgxDraggable {
3171
3170
  // TODO notsafe instanseof: node.nodeType === Node.ELEMENT_NODE
3172
3171
  return isElementTarget$1(target) && !!target.closest(this.dragHandle());
3173
3172
  }
3174
- /** Should a press on `target` be left alone (no drag)? */
3175
- isExcluded(target) {
3176
- if (!isElementTarget$1(target))
3177
- return false;
3178
- const selector = this.noDragSelector();
3179
- if (selector && target.closest(selector))
3180
- return true;
3181
- return this.ignoreInteractive() && isEditableOrInteractive(target);
3182
- }
3183
3173
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDraggable, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
3184
3174
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: NgxDraggable, isStandalone: true, selector: "[NgxDraggable],[ngxDraggable]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, boundary: { classPropertyName: "boundary", publicName: "boundary", isSignal: true, isRequired: false, transformFunction: null }, dragRootElement: { classPropertyName: "dragRootElement", publicName: "dragRootElement", isSignal: true, isRequired: false, transformFunction: null }, dragHandle: { classPropertyName: "dragHandle", publicName: "dragHandle", isSignal: true, isRequired: false, transformFunction: null }, lockAxis: { classPropertyName: "lockAxis", publicName: "lockAxis", isSignal: true, isRequired: false, transformFunction: null }, dragThreshold: { classPropertyName: "dragThreshold", publicName: "dragThreshold", isSignal: true, isRequired: false, transformFunction: null }, keyboardStep: { classPropertyName: "keyboardStep", publicName: "keyboardStep", isSignal: true, isRequired: false, transformFunction: null }, autoScroll: { classPropertyName: "autoScroll", publicName: "autoScroll", isSignal: true, isRequired: false, transformFunction: null }, noDragSelector: { classPropertyName: "noDragSelector", publicName: "noDragSelector", isSignal: true, isRequired: false, transformFunction: null }, ignoreInteractive: { classPropertyName: "ignoreInteractive", publicName: "ignoreInteractive", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", dragRootElement: "dragRootElementChange", dragHandle: "dragHandleChange", dragStart: "dragStart", dragMove: "dragMove", dragEnd: "dragEnd" }, host: { properties: { "style.touch-action": "\"none\"", "attr.tabindex": "disabled() ? null : 0", "attr.aria-grabbed": "dragging()", "class.disable-drag": "disabled()" }, classAttribute: "ngx-draggable" }, providers: [{ provide: NGX_DRAGGABLE, useExisting: NgxDraggable }], queries: [{ propertyName: "customPreview", first: true, predicate: NgxDragPreview, descendants: true }], ngImport: i0 });
3185
3175
  }
@@ -3203,9 +3193,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
3203
3193
  type: ContentChild,
3204
3194
  args: [NgxDragPreview]
3205
3195
  }], dragStart: [{ type: i0.Output, args: ["dragStart"] }], dragMove: [{ type: i0.Output, args: ["dragMove"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }] } });
3206
- function isEditableOrInteractive(el) {
3207
- return !!el.closest('button,a[href],input,textarea,select,[contenteditable]:not([contenteditable="false"])');
3208
- }
3209
3196
  function isEditableTarget(target) {
3210
3197
  if (!isElementTarget$1(target))
3211
3198
  return false;