@get-set/gs-sortable 0.0.16 → 0.0.18

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.
@@ -13,6 +13,7 @@ import {
13
13
  NewGuid,
14
14
  convertScssToCss,
15
15
  injectCssToHead,
16
+ removeCssToHead,
16
17
  } from '../helpers/uihelpers';
17
18
 
18
19
  const params = {
@@ -142,14 +143,23 @@ const GSSortable = ({ children, ...rest }) => {
142
143
  }, [children]);
143
144
 
144
145
  return (
145
- <div
146
- className={`gs-sortable-instance gs-sortable-${params.type} ${rest.className}`}
147
- ref={gridRef}
148
- {...Object.fromEntries(
149
- Object.entries({ ...rest }).filter(([key]) => !(key in defaultParams)),
150
- )}>
151
- {children}
152
- </div>
146
+ <>
147
+ {componentKey != null ? (
148
+ <div
149
+ className={`gs-sortable-instance gs-sortable-${params.type} ${rest.className}`}
150
+ ref={gridRef}
151
+ data-key={componentKey}
152
+ {...Object.fromEntries(
153
+ Object.entries({ ...rest }).filter(
154
+ ([key]) => !(key in defaultParams),
155
+ ),
156
+ )}>
157
+ {children}
158
+ </div>
159
+ ) : (
160
+ <></>
161
+ )}
162
+ </>
153
163
  );
154
164
  };
155
165
 
@@ -1,39 +1,39 @@
1
- .gs-sortable-instance {
2
- box-sizing: border-box;
3
- -webkit-user-select: none !important;
4
- -moz-user-select: none !important;
5
- user-select: none !important;
6
- transition: 0.4s;
7
- z-index: 1;
8
- }
9
- .gs-sortable-instance.gs-sortable-active {
10
- z-index: 2;
11
- }
12
- .gs-sortable-instance * {
13
- -webkit-user-select: none !important;
14
- -moz-user-select: none !important;
15
- user-select: none !important;
16
- }
17
- .gs-sortable-instance .gs-sortable-placeholder {
18
- position: absolute;
19
- background-color: #f1f1f1;
20
- border: 1px solid;
21
- z-index: 1;
22
- }
23
- .gs-sortable-instance .gs-sortable-item {
24
- z-index: 2;
25
- }
26
- .gs-sortable-instance .gs-sortable-item.gs-sortable-item-active-parent {
27
- z-index: 3;
28
- }
29
- .gs-sortable-instance .gs-sortable-item-inmove {
30
- transition: none !important;
31
- z-index: 99999;
32
- }
33
- .gs-sortable-instance .gs-sortable-item-addjusting {
34
- z-index: 99999;
35
- }
36
- .gs-sortable-instance.gs-sortable-row .gs-sortable-item {
37
- width: -moz-max-content;
38
- width: max-content;
1
+ .gs-sortable-instance {
2
+ box-sizing: border-box;
3
+ -webkit-user-select: none !important;
4
+ -moz-user-select: none !important;
5
+ user-select: none !important;
6
+ transition: 0.4s;
7
+ z-index: 1;
8
+ }
9
+ .gs-sortable-instance.gs-sortable-active {
10
+ z-index: 2;
11
+ }
12
+ .gs-sortable-instance * {
13
+ -webkit-user-select: none !important;
14
+ -moz-user-select: none !important;
15
+ user-select: none !important;
16
+ }
17
+ .gs-sortable-instance .gs-sortable-placeholder {
18
+ position: absolute;
19
+ background-color: #f1f1f1;
20
+ border: 1px solid;
21
+ z-index: 1;
22
+ }
23
+ .gs-sortable-instance .gs-sortable-item {
24
+ z-index: 2;
25
+ }
26
+ .gs-sortable-instance .gs-sortable-item.gs-sortable-item-active-parent {
27
+ z-index: 3;
28
+ }
29
+ .gs-sortable-instance .gs-sortable-item-inmove {
30
+ transition: none !important;
31
+ z-index: 99999;
32
+ }
33
+ .gs-sortable-instance .gs-sortable-item-addjusting {
34
+ z-index: 99999;
35
+ }
36
+ .gs-sortable-instance.gs-sortable-row .gs-sortable-item {
37
+ width: -moz-max-content;
38
+ width: max-content;
39
39
  }/*# sourceMappingURL=GSSortable.css.map */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-set/gs-sortable",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Get-Set Sortable",
5
5
  "main": "index.js",
6
6
  "author": "Get-Set",