@get-set/gs-sortable 0.0.5 → 0.0.7

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.
@@ -1,39 +1,37 @@
1
1
  import { useEffect, useRef, useState } from 'react';
2
2
  import NewGuid from '../helpers/uihelpers';
3
3
  import getCurrentParams from '../actions/getCurrentParams';
4
- import init from './actions/init';
5
- import destroy from './actions/destroy';
4
+ import init from '../actions/init';
5
+ import destroy from '../actions/destroy';
6
6
  import PropTypes from 'prop-types';
7
7
  import defaultParams from '../constants/defaultParams';
8
- import initMouseMove from "./actions/initMouseMove";
9
- import initSortEnd from "./actions/initSortEnd";
10
- import initScroll from "./actions/initScroll";
8
+ import initMouseMove from "../actions/initMouseMove";
9
+ import initSortEnd from "../actions/initSortEnd";
10
+ import initScroll from "../actions/initScroll";
11
+ import types from '../constants/types';
11
12
 
12
13
  const params = {
13
14
  reference: PropTypes.string,
15
+ handler: PropTypes.string,
14
16
  gap: PropTypes.string,
17
+ allowOutOfBox: PropTypes.bool,
15
18
  count: PropTypes.number,
16
- resetSortHandler: PropTypes.number,
17
- resetFilterHandler: PropTypes.number,
19
+ type: types.column | types.row | types.grid,
18
20
  };
19
21
 
22
+
23
+
24
+
20
25
  /**
21
26
  * GSSortable component to display a customizable sortable.
22
27
  *
23
28
  * @component
24
29
  * @param {Object} props - The props object.
25
30
  * @param {string} props.gap - Allows set gap among elements.
31
+ * @param {string} props.handler - selector of target element to move.
26
32
  * @param {number} props.count - Shows items count per row.
27
- * @param {Object} props.resetSortHandler - This is the ref of that element which should reset order.
28
- * @param {Object} props.resetFilterHandler - This is the ref of that element which should reset filter.
29
- * @param {Array<Object>} [props.sortByOptions] - Array of sort options.
30
- * @param {number} props.sortByOptions[].handler - This is the ref of that element which should change order.
31
- * @param {string} props.sortByOptions[].prop - this is the name of data attribute of element like data-[prop].
32
- * @param {'number' | 'string'} props.sortByOptions[].type - this is the type of prop.
33
- * @param {Array<Object>} [props.filterByOptions] - Array of filter options.
34
- * @param {number} props.filterByOptions[].handler - This is the ref of that element which should change filter.
35
- * @param {string} props.filterByOptions[].prop - This is the name of data attribute of element like data-[prop].
36
- * @param {'number' | 'string'} props.filterByOptions[].value - This is the value of prop for element.
33
+ * @param {'row' | 'column' | 'grid'} props.type - this is the type of prop.
34
+ * @param {Array<Object>} [props.acceptFrom] - Array of that GSSortable references which can accept element from this.
37
35
  * @param {Array<Object>} [props.responsive] - Array of responsive configurations based on window size.
38
36
  * @param {number} props.responsive[].windowSize - Minimum window size for this configuration.
39
37
  * @param {Object} props.responsive[].params - The responsive configuration for the grid.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-set/gs-sortable",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Get-Set Sortable",
5
5
  "main": "index.js",
6
6
  "author": "Get-Set",