reppners / ngx-drag-drop

Angular directives using the native HTML Drag And Drop API
https://reppners.github.io/ngx-drag-drop/
BSD 3-Clause "New" or "Revised" License
299 stars 117 forks source link

Angular 15 compatibility #166

Closed bohrasankalp closed 1 month ago

bohrasankalp commented 4 months ago

Describe the bug Importing DndModule simply ends with incompatibility with index signature.

Error: node_modules/ngx-drag-drop/lib/dnd-dropzone.directive.d.ts:54:90 - error
  Property '"dndDropzone"' is incompatible with index signature.
    Type '{ alias: "dndDropzone"; required: false; }' is not assignable to type 'string'.

Just added DndModule to the NgModule import section.

I'm using Angular 15+ version.

bohrasankalp commented 4 months ago

Any support please.

bohrasankalp commented 2 months ago

I am adding error logs,

Error: node_modules/ngx-drag-drop/lib/dnd-draggable.directive.d.ts:48:92 - error TS2344: Type '{ dndDraggable: { alias: "dndDraggable"; required: false; }; dndEffectAllowed: { alias: "dndEffectAllowed"; required: false; }; dndType: { alias: "dndType"; required
: false; }; dndDraggingClass: { ...; }; ... 4 more ...; dndDisableDragIf: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
  Property '"dndDraggable"' is incompatible with index signature.
    Type '{ alias: "dndDraggable"; required: false; }' is not assignable to type 'string'.

48     static ɵdir: i0.ɵɵDirectiveDeclaration<DndDraggableDirective, "[dndDraggable]", never, { "dndDraggable": { "alias": "dndDraggable"; "required": false; }; "dndEffectAllowed": { "alias": "dndEffectAllowed"; "required": false; }; "dndType": { "alias": "dnd
Type"; "required": false; }; "dndDraggingClass": { "alias": "dndDraggingClass"; "required": false; }; "dndDraggingSourceClass": { "alias": "dndDraggingSourceClass"; "required": false; }; "dndDraggableDisabledClass": { "alias": "dndDraggableDisabledClass"; "req
uired": false; }; "dndDragImageOffsetFunction": { "alias": "dndDragImageOffsetFunction"; "required": false; }; "dndDisableIf": { "alias": "dndDisableIf"; "required": false; }; "dndDisableDragIf": { "alias": "dndDisableDragIf"; "required": false; }; }, { "dndSt
art": "dndStart"; "dndDrag": "dndDrag"; "dndEnd": "dndEnd"; "dndMoved": "dndMoved"; "dndCopied": "dndCopied"; "dndLinked": "dndLinked"; "dndCanceled": "dndCanceled"; }, never, never, true, never>;
Error: node_modules/ngx-drag-drop/lib/dnd-dropzone.directive.d.ts:54:90 - error TS2344: Type '{ dndDropzone: { alias: "dndDropzone"; required: false; }; dndEffectAllowed: { alias: "dndEffectAllowed"; required: false; }; dndAllowExternal: { alias: "dndAllowExte
rnal"; required: false; }; ... 4 more ...; dndDisableDropIf: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
  Property '"dndDropzone"' is incompatible with index signature.
    Type '{ alias: "dndDropzone"; required: false; }' is not assignable to type 'string'.

54     static ɵdir: i0.ɵɵDirectiveDeclaration<DndDropzoneDirective, "[dndDropzone]", never, { "dndDropzone": { "alias": "dndDropzone"; "required": false; }; "dndEffectAllowed": { "alias": "dndEffectAllowed"; "required": false; }; "dndAllowExternal": { "alias":
 "dndAllowExternal"; "required": false; }; "dndHorizontal": { "alias": "dndHorizontal"; "required": false; }; "dndDragoverClass": { "alias": "dndDragoverClass"; "required": false; }; "dndDropzoneDisabledClass": { "alias": "dndDropzoneDisabledClass"; "required"
: false; }; "dndDisableIf": { "alias": "dndDisableIf"; "required": false; }; "dndDisableDropIf": { "alias": "dndDisableDropIf"; "required": false; }; }, { "dndDragover": "dndDragover"; "dndDrop": "dndDrop"; }, ["dndPlaceholderRef"], never, true, never>;
DanielDias2019 commented 1 month ago

Hello @bohrasankalp , you can solve this problem? I am the same problem :/

bohrasankalp commented 1 month ago

Downgrade version of this package. Anyways I am missing a lot of things like smoothness. Nested list is a lot problematic. Rendering same template in nested list recursively I don't like. I want to limit list to 2-3 level. More over separate space to recognise drag area.

Try material.

DanielDias2019 commented 1 month ago

okok thanks. Good work