@synerise/ds-sortable 1.3.0 → 1.3.2
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/CHANGELOG.md +19 -19
- package/README.md +3 -1
- package/dist/Sortable.d.ts +1 -1
- package/dist/Sortable.js +2 -2
- package/dist/Sortable.styles.d.ts +2 -2
- package/dist/Sortable.types.d.ts +3 -3
- package/dist/SortableContainer.d.ts +1 -1
- package/dist/SortableContainer.js +5 -5
- package/dist/SortableItem.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,59 +3,59 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [1.3.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.3.1...@synerise/ds-sortable@1.3.2) (2025-07-04)
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
* **
|
|
11
|
+
* **sortable:** fix sorting ([bb697f5](https://github.com/Synerise/synerise-design/commit/bb697f5e1ca38db2ca7b5762e8ba9726c2521381))
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## [1.3.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.3.0...@synerise/ds-sortable@1.3.1) (2025-07-01)
|
|
18
18
|
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-sortable
|
|
19
20
|
|
|
20
|
-
### Features
|
|
21
21
|
|
|
22
|
-
* **column-manager:** removed unnecessary features ([152d3c0](https://github.com/Synerise/synerise-design/commit/152d3c0d87449977f8c4264bb7abd278210470e9))
|
|
23
|
-
* **filter:** change dnd lib and update ux ([f5a979e](https://github.com/Synerise/synerise-design/commit/f5a979e6c9e5d9c8251c3f57da8ce57c416dadab))
|
|
24
22
|
|
|
25
23
|
|
|
26
24
|
|
|
25
|
+
# [1.3.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.2.0...@synerise/ds-sortable@1.3.0) (2025-06-24)
|
|
27
26
|
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
### Features
|
|
30
29
|
|
|
31
|
-
**
|
|
30
|
+
* **condition:** sortable lib ([8cbc3f5](https://github.com/Synerise/synerise-design/commit/8cbc3f5956ce9138f1a6b0a5eb0e7cd85bb7f4e7))
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
# [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.1.3...@synerise/ds-sortable@1.2.0) (2025-06-05)
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
### Features
|
|
40
39
|
|
|
40
|
+
- **column-manager:** removed unnecessary features ([152d3c0](https://github.com/Synerise/synerise-design/commit/152d3c0d87449977f8c4264bb7abd278210470e9))
|
|
41
|
+
- **filter:** change dnd lib and update ux ([f5a979e](https://github.com/Synerise/synerise-design/commit/f5a979e6c9e5d9c8251c3f57da8ce57c416dadab))
|
|
41
42
|
|
|
43
|
+
## [1.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.1.2...@synerise/ds-sortable@1.1.3) (2025-05-26)
|
|
42
44
|
|
|
45
|
+
**Note:** Version bump only for package @synerise/ds-sortable
|
|
43
46
|
|
|
47
|
+
## [1.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.1.1...@synerise/ds-sortable@1.1.2) (2025-05-07)
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
**Note:** Version bump only for package @synerise/ds-sortable
|
|
46
50
|
|
|
51
|
+
## [1.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-sortable@1.1.0...@synerise/ds-sortable@1.1.1) (2025-04-24)
|
|
47
52
|
|
|
48
53
|
### Bug Fixes
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
- **icon:** new mimetype icons ([f8b50d1](https://github.com/Synerise/synerise-design/commit/f8b50d16287e747c7c72e4c4aea660d02d54fe99))
|
|
55
56
|
|
|
56
57
|
# 1.1.0 (2025-03-31)
|
|
57
58
|
|
|
58
|
-
|
|
59
59
|
### Features
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
- **sortable:** new component ([181e09f](https://github.com/Synerise/synerise-design/commit/181e09fab834c9964995d1abb81349a564e2c956))
|
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ title: Sortable
|
|
|
6
6
|
Sortable UI Component
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
|
+
|
|
9
10
|
```
|
|
10
11
|
npm i @synerise/ds-sortable
|
|
11
12
|
or
|
|
@@ -13,6 +14,7 @@ yarn add @synerise/ds-sortable
|
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
## Usage
|
|
17
|
+
|
|
16
18
|
```
|
|
17
19
|
import Sortable from '@synerise/ds-sortable'
|
|
18
20
|
|
|
@@ -27,4 +29,4 @@ import Sortable from '@synerise/ds-sortable'
|
|
|
27
29
|
## API
|
|
28
30
|
|
|
29
31
|
| Property | Description | Type | Default |
|
|
30
|
-
|
|
|
32
|
+
| -------- | ----------- | ---- | ------- |
|
package/dist/Sortable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type BaseItem, type SortableProps } from './Sortable.types';
|
|
3
3
|
export declare const Sortable: <ItemType extends BaseItem>({ items, onOrderChange, ItemComponent, axis, placeholderCss, }: SortableProps<ItemType>) => React.JSX.Element;
|
|
4
4
|
export default Sortable;
|
package/dist/Sortable.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
import React, { useMemo, useState
|
|
2
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
4
|
import { DragOverlay } from '@dnd-kit/core';
|
|
5
5
|
import { restrictToParentElement } from '@dnd-kit/modifiers';
|
|
6
|
-
import { SortableItem } from './SortableItem';
|
|
7
6
|
import { SortableContainer } from './SortableContainer';
|
|
7
|
+
import { SortableItem } from './SortableItem';
|
|
8
8
|
export var Sortable = function Sortable(_ref) {
|
|
9
9
|
var items = _ref.items,
|
|
10
10
|
onOrderChange = _ref.onOrderChange,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type Interpolation } from 'styled-components';
|
|
2
|
+
import { type ThemeProps } from '@synerise/ds-core';
|
|
3
3
|
export declare const SortableItemContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const SortableItemWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
5
5
|
isGrabbed: boolean;
|
package/dist/Sortable.types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DndContextProps, DraggableAttributes, DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
1
|
+
import type { ComponentType, ReactElement, ReactNode } from 'react';
|
|
3
2
|
import type { Interpolation } from 'styled-components';
|
|
4
|
-
import type {
|
|
3
|
+
import type { DndContextProps, DraggableAttributes, DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
5
4
|
import type { ThemeProps } from '@synerise/ds-core';
|
|
5
|
+
import type { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
6
6
|
export type DragHandlePropType = DraggableAttributes & DraggableSyntheticListeners;
|
|
7
7
|
export type RawBaseItem = {
|
|
8
8
|
id: string | number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RawBaseItem, SortableContainerProps } from './Sortable.types';
|
|
2
|
+
import { type RawBaseItem, type SortableContainerProps } from './Sortable.types';
|
|
3
3
|
export declare const SortableContainer: <ItemType extends RawBaseItem>({ items, onOrderChange, onDragStart, onDragEnd, axis, children, ...props }: SortableContainerProps<ItemType>) => React.JSX.Element;
|
|
4
4
|
export default SortableContainer;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var _excluded = ["items", "onOrderChange", "onDragStart", "onDragEnd", "axis", "children"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
-
import React, { useMemo, useState
|
|
5
|
-
import { DndContext,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
5
|
+
import { DndContext, KeyboardSensor, MouseSensor, PointerSensor, closestCenter, useSensor, useSensors } from '@dnd-kit/core';
|
|
6
|
+
import { restrictToHorizontalAxis, restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
7
|
+
import { SortableContext, arrayMove, horizontalListSortingStrategy, rectSortingStrategy, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
8
8
|
export var SortableContainer = function SortableContainer(_ref) {
|
|
9
9
|
var items = _ref.items,
|
|
10
10
|
onOrderChange = _ref.onOrderChange,
|
|
@@ -22,7 +22,7 @@ export var SortableContainer = function SortableContainer(_ref) {
|
|
|
22
22
|
var handleDragEnd = function handleDragEnd(event) {
|
|
23
23
|
var active = event.active,
|
|
24
24
|
over = event.over;
|
|
25
|
-
if (active.id !==
|
|
25
|
+
if (over && active.id !== over.id) {
|
|
26
26
|
var oldIndex = order.findIndex(function (item) {
|
|
27
27
|
return item.id === active.id;
|
|
28
28
|
});
|
package/dist/SortableItem.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type BaseItem, type SortableItemProps } from './Sortable.types';
|
|
3
3
|
export declare const SortableItem: <ItemType extends BaseItem>({ id, data, index, isDragged, component: Component, style, placeholderCss, ...htmlAttributes }: SortableItemProps<ItemType>) => React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { arrayMove, useSortable } from '@dnd-kit/sortable';
|
|
|
3
3
|
export { CSS } from '@dnd-kit/utilities';
|
|
4
4
|
export { default } from './Sortable';
|
|
5
5
|
export { SortableContainer } from './SortableContainer';
|
|
6
|
-
export type { DragHandlePropType, SortableItemProps, SortableProps, BaseItem, WithIndex } from './Sortable.types';
|
|
6
|
+
export type { DragHandlePropType, SortableItemProps, SortableProps, BaseItem, WithIndex, } from './Sortable.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-sortable",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Sortable UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
39
39
|
"@dnd-kit/sortable": "^8.0.0",
|
|
40
40
|
"@dnd-kit/utilities": "^3.2.2",
|
|
41
|
-
"@synerise/ds-utils": "^1.3.
|
|
41
|
+
"@synerise/ds-utils": "^1.3.1",
|
|
42
42
|
"uuid": "^8.3.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": ">=16.9.0 <= 18.3.1",
|
|
47
47
|
"styled-components": "^5.3.3"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "2161bdb04f3db0f79b7d0465ce6b41121f1543ef"
|
|
50
50
|
}
|