Skip to content

Commit

Permalink
Change export statements
Browse files Browse the repository at this point in the history
  • Loading branch information
tsov committed Mar 2, 2018
1 parent c4bfb56 commit 3f8154c
Show file tree
Hide file tree
Showing 25 changed files with 84 additions and 115 deletions.
11 changes: 1 addition & 10 deletions src/Draggable/DragEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
export {
DragStartEvent,
DragMoveEvent,
DragOutContainerEvent,
DragOutEvent,
DragOverContainerEvent,
DragOverEvent,
DragStopEvent,
DragPressureEvent,
} from './DragEvent';
export * from './DragEvent';
5 changes: 1 addition & 4 deletions src/Draggable/DraggableEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export {
DraggableInitializedEvent,
DraggableDestroyEvent,
} from './DraggableEvent';
export * from './DraggableEvent';
8 changes: 1 addition & 7 deletions src/Draggable/MirrorEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
export {
MirrorCreateEvent,
MirrorCreatedEvent,
MirrorAttachedEvent,
MirrorMoveEvent,
MirrorDestroyEvent,
} from './MirrorEvent';
export * from './MirrorEvent';
4 changes: 1 addition & 3 deletions src/Draggable/Plugins/AutoScroll/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import AutoScroll, {defaultOptions} from './AutoScroll';

export default AutoScroll;
export {
defaultOptions as defaultAutoScrollOptions,
};
export {defaultOptions};
4 changes: 1 addition & 3 deletions src/Draggable/Plugins/Mirror/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Mirror, {defaultOptions} from './Mirror';

export default Mirror;
export {
defaultOptions as defaultMirrorOptions,
};
export {defaultOptions};
1 change: 1 addition & 0 deletions src/Draggable/Plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ These plugins are included by draggable by default

- (Accessibility)[Accessibility]
- (Mirror)[Mirror]
- (AutoScroll)[AutoScroll]
20 changes: 11 additions & 9 deletions src/Draggable/Plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Mirror, {defaultMirrorOptions} from './Mirror';
import AutoScroll, {defaultAutoScrollOptions} from './AutoScroll';
import Accessibility from './Accessibility';
export {
default as Mirror,
defaultOptions as defaultMirrorOptions,
} from './Mirror';

export {
default as AutoScroll,
defaultOptions as defaultAutoScrollOptions,
} from './AutoScroll';

export {
Mirror,
defaultMirrorOptions,
AutoScroll,
defaultAutoScrollOptions,
Accessibility,
};
default as Accessibility,
} from './Accessibility';
9 changes: 4 additions & 5 deletions src/Draggable/Sensors/ForceTouchSensor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ Detaches sensors to the DOM
**`delay {Number}`**
This value will delay force touch start

### Known issues

When used in Safari with force touch track pad, make sure to add visual guidelines
to the user to indicate that force needs to be used to start drag operation.

### Example

```js
Expand All @@ -43,3 +38,7 @@ const draggable = new Draggable(containers, {
sensors: [Sensors.ForceTouchSensor],
});
```

### Caveats

- When used in Safari with force touch track pad, make sure to add visual guidelines to the user to indicate that force needs to be used to start drag operation.
8 changes: 1 addition & 7 deletions src/Draggable/Sensors/SensorEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
export {
SensorEvent,
DragStartSensorEvent,
DragMoveSensorEvent,
DragStopSensorEvent,
DragPressureSensorEvent,
} from './SensorEvent';
export * from './SensorEvent';
18 changes: 5 additions & 13 deletions src/Draggable/Sensors/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import Sensor from './Sensor';
import MouseSensor from './MouseSensor';
import TouchSensor from './TouchSensor';
import DragSensor from './DragSensor';
import ForceTouchSensor from './ForceTouchSensor';
export {default as Sensor} from './Sensor';
export {default as MouseSensor} from './MouseSensor';
export {default as TouchSensor} from './TouchSensor';
export {default as DragSensor} from './DragSensor';
export {default as ForceTouchSensor} from './ForceTouchSensor';

export * from './SensorEvent';

export {
Sensor,
MouseSensor,
TouchSensor,
DragSensor,
ForceTouchSensor,
};
8 changes: 6 additions & 2 deletions src/Draggable/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Draggable from './Draggable';
import {Accessibility, Mirror} from './Plugins';

export {Accessibility, Mirror};
export default Draggable;

export * from './DragEvent';
export * from './DraggableEvent';
export * from './MirrorEvent';
export * from './Plugins';
export * from './Sensors';
5 changes: 1 addition & 4 deletions src/Droppable/DroppableEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export {
DroppableOverEvent,
DroppableOutEvent,
} from './DroppableEvent';
export * from './DroppableEvent';
1 change: 1 addition & 0 deletions src/Droppable/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Droppable from './Droppable';

export default Droppable;
export * from './DroppableEvent';
5 changes: 1 addition & 4 deletions src/Plugins/Collidable/CollidableEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export {
CollidableInEvent,
CollidableOutEvent,
} from './CollidableEvent';
export * from './CollidableEvent';
1 change: 1 addition & 0 deletions src/Plugins/Collidable/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Collidable from './Collidable';

export default Collidable;
export * from './CollidableEvent';
5 changes: 1 addition & 4 deletions src/Plugins/Snappable/SnappableEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export {
SnapInEvent,
SnapOutEvent,
} from './SnappableEvent';
export * from './SnappableEvent';
1 change: 1 addition & 0 deletions src/Plugins/Snappable/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Snappable from './Snappable';

export default Snappable;
export * from './SnappableEvent';
4 changes: 1 addition & 3 deletions src/Plugins/SwapAnimation/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import SwapAnimation, {defaultOptions} from './SwapAnimation';

export default SwapAnimation;
export {
defaultOptions as defaultSwapAnimationOptions,
};
export {defaultOptions};
17 changes: 10 additions & 7 deletions src/Plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import Collidable from './Collidable';
import Snappable from './Snappable';
import SwapAnimation from './SwapAnimation';
export {
default as Collidable,
} from './Collidable';

export {
default as Snappable,
} from './Snappable';

export {
Collidable,
Snappable,
SwapAnimation,
};
default as SwapAnimation,
defaultOptions as defaultSwapAnimationOptions,
} from './SwapAnimation';
7 changes: 1 addition & 6 deletions src/Sortable/SortableEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
export {
SortableStartEvent,
SortableSortEvent,
SortableSortedEvent,
SortableStopEvent,
} from './SortableEvent';
export * from './SortableEvent';
1 change: 1 addition & 0 deletions src/Sortable/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Sortable from './Sortable';

export default Sortable;
export * from './SortableEvent';
7 changes: 1 addition & 6 deletions src/Swappable/SwappableEvent/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
export {
SwappableStartEvent,
SwappableSwapEvent,
SwappableSwappedEvent,
SwappableStopEvent,
} from './SwappableEvent';
export * from './SwappableEvent';
1 change: 1 addition & 0 deletions src/Swappable/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Swappable from './Swappable';

export default Swappable;
export * from './SwappableEvent';
24 changes: 15 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ import AbstractPlugin from 'shared/AbstractPlugin';
import * as Sensors from './Draggable/Sensors';
import * as Plugins from './Plugins';

import Draggable from './Draggable';
import Droppable from './Droppable';
import Swappable from './Swappable';
import Sortable from './Sortable';
export {
default as Draggable,
} from './Draggable';

export {
default as Droppable,
} from './Droppable';

export {
default as Swappable,
} from './Swappable';

export {
default as Sortable,
} from './Sortable';

export {
AbstractEvent as BaseEvent,
AbstractPlugin as BasePlugin,
Sensors,
Plugins,

Draggable,
Droppable,
Swappable,
Sortable,
};
24 changes: 15 additions & 9 deletions src/index.legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ import AbstractPlugin from 'shared/AbstractPlugin';
import * as Sensors from './Draggable/Sensors';
import * as Plugins from './Plugins';

import Draggable from './Draggable';
import Droppable from './Droppable';
import Swappable from './Swappable';
import Sortable from './Sortable';
export {
default as Draggable,
} from './Draggable';

export {
default as Droppable,
} from './Droppable';

export {
default as Swappable,
} from './Swappable';

export {
default as Sortable,
} from './Sortable';

export {
AbstractEvent as BaseEvent,
AbstractPlugin as BasePlugin,
Sensors,
Plugins,

Draggable,
Droppable,
Swappable,
Sortable,
};

0 comments on commit 3f8154c

Please sign in to comment.