fluid-dnd 1.0.9-beta.0 → 1.1.1-beta.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/dist/{HandlerPublisher-DOxQ571w.cjs → HandlerPublisher-B4UrbCPW.cjs} +1 -1
- package/dist/{HandlerPublisher-BB9x-ZRw.js → HandlerPublisher-CCy7USuZ.js} +1 -1
- package/dist/core/index.d.ts +6 -0
- package/dist/core/utils/config.d.ts +3 -1
- package/dist/core/utils/droppableConfigurator.d.ts +13 -2
- package/dist/index/index.cjs +1 -1
- package/dist/index/index.mjs +1 -1
- package/dist/{index-yDxrxM5t.js → index-ANSOhcfo.js} +400 -379
- package/dist/index-BqVW-8HC.cjs +1 -0
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.mjs +2 -2
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.mjs +2 -2
- package/package.json +4 -5
- package/dist/index-8hgMEqsO.cjs +0 -1
@@ -1 +1 @@
|
|
1
|
-
"use strict";var d=Object.defineProperty;var n=(e,s,l)=>s in e?d(e,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[s]=l;var a=(e,s,l)=>n(e,typeof s!="symbol"?s+"":s,l);const r=require("./index-
|
1
|
+
"use strict";var d=Object.defineProperty;var n=(e,s,l)=>s in e?d(e,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[s]=l;var a=(e,s,l)=>n(e,typeof s!="symbol"?s+"":s,l);const r=require("./index-BqVW-8HC.cjs");class h{constructor(){a(this,"handlers");this.handlers=[]}addSubscriber(s){this.handlers.includes(s)||(this.handlers.push(s),r.addClass(s,r.GRAB_CLASS))}toggleGrabClass(s){for(const l of this.handlers)r.toggleClass(l,r.GRAB_CLASS,s)}}exports.HandlerPublisher=h;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
var d = Object.defineProperty;
|
2
2
|
var e = (a, s, l) => s in a ? d(a, s, { enumerable: !0, configurable: !0, writable: !0, value: l }) : a[s] = l;
|
3
3
|
var r = (a, s, l) => e(a, typeof s != "symbol" ? s + "" : s, l);
|
4
|
-
import { a as h, t as n, G as t } from "./index-
|
4
|
+
import { a as h, t as n, G as t } from "./index-ANSOhcfo.js";
|
5
5
|
class c {
|
6
6
|
constructor() {
|
7
7
|
r(this, "handlers");
|
package/dist/core/index.d.ts
CHANGED
@@ -11,6 +11,7 @@ export interface ListCondig<T> {
|
|
11
11
|
getValue: (index: number) => T;
|
12
12
|
insertToListEmpty: (config: CoreConfig<T>, index: number, value: T) => void;
|
13
13
|
}
|
14
|
+
export type MapFrom<T> = (object: T, droppable: Element) => unknown;
|
14
15
|
export interface DragStartEventData<T> {
|
15
16
|
index: number;
|
16
17
|
element: Element;
|
@@ -84,6 +85,10 @@ export interface Config<T> {
|
|
84
85
|
* The duration of the animations in milisecond.
|
85
86
|
*/
|
86
87
|
animationDuration?: number;
|
88
|
+
/**
|
89
|
+
* Map value when is passed from the current list to another.
|
90
|
+
*/
|
91
|
+
mapFrom?: MapFrom<T>;
|
87
92
|
}
|
88
93
|
/**
|
89
94
|
* onDrop event function.
|
@@ -151,4 +156,5 @@ export type CoreConfig<T> = {
|
|
151
156
|
onInsertEvent: OnInsertEvent<T>;
|
152
157
|
onGetLegth: OnGetLength;
|
153
158
|
onGetValue: OnGetValue<T>;
|
159
|
+
mapFrom: MapFrom<T>;
|
154
160
|
};
|
@@ -1,3 +1,5 @@
|
|
1
|
-
import { ListCondig } from "..";
|
1
|
+
import { ListCondig, MapFrom } from "..";
|
2
2
|
import { Config, CoreConfig } from "..";
|
3
|
+
import { DroppableConfig } from "../configHandler";
|
3
4
|
export declare const getConfig: <T>(listCondig: ListCondig<T>, config?: Config<T>) => CoreConfig<T>;
|
5
|
+
export declare const MapConfig: <T>(coreConfig: DroppableConfig<any>, mapFrom: MapFrom<T>) => CoreConfig<any>;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { DroppableConfig } from "../configHandler";
|
2
2
|
import { DragMouseTouchEvent } from "../../../index";
|
3
|
+
import { MapFrom } from "..";
|
3
4
|
export declare class DroppableConfigurator<T> {
|
4
5
|
initial: DroppableConfig<any> | undefined;
|
5
6
|
current: DroppableConfig<T> | undefined;
|
@@ -8,7 +9,8 @@ export declare class DroppableConfigurator<T> {
|
|
8
9
|
private groupClass;
|
9
10
|
private dragEvent;
|
10
11
|
private changeDroppable;
|
11
|
-
|
12
|
+
private mapFrom;
|
13
|
+
constructor(draggableElement: HTMLElement, droppableGroupClass: string | null, parent: HTMLElement, setTransformDragEvent: () => void, changeDroppable: (newdDroppableConfig: DroppableConfig<T> | undefined, oldDroppableConfig: DroppableConfig<T> | undefined) => void, mapFrom: MapFrom<T>);
|
12
14
|
private getDraggableAncestor;
|
13
15
|
private getElementBelow;
|
14
16
|
private getCurrent;
|
@@ -16,7 +18,16 @@ export declare class DroppableConfigurator<T> {
|
|
16
18
|
private isNotInsideAnotherDroppable;
|
17
19
|
private onScrollEvent;
|
18
20
|
private setOnScroll;
|
19
|
-
|
21
|
+
getConfigFrom(element: Element): {
|
22
|
+
config: import("..").CoreConfig<any>;
|
23
|
+
droppable: HTMLElement;
|
24
|
+
scroll: import("../../../index").ElementScroll;
|
25
|
+
} | undefined;
|
26
|
+
getCurrentConfig(event: DragMouseTouchEvent): DroppableConfig<T> | {
|
27
|
+
config: import("..").CoreConfig<any>;
|
28
|
+
droppable: HTMLElement;
|
29
|
+
scroll: import("../../../index").ElementScroll;
|
30
|
+
} | undefined;
|
20
31
|
updateConfig(event: DragMouseTouchEvent): void;
|
21
32
|
isOutside(event: DragMouseTouchEvent, hiddenDraggable?: boolean): boolean;
|
22
33
|
}
|
package/dist/index/index.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BqVW-8HC.cjs");exports.dragAndDrop=e.dragAndDrop;
|
package/dist/index/index.mjs
CHANGED