@linzjs/step-ag-grid 17.5.1 → 17.5.3

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.
@@ -201,12 +201,51 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
201
201
  background-color: transparent;
202
202
  }
203
203
 
204
- .ag-row-highlight-above::after{
204
+ .ag-row-highlight-above::after {
205
+ top:-3px; // moves the top highlight to the position of the bottom highlight
205
206
  border-top: 2px dashed lui.$andrea;
206
-
207
+ }
208
+
209
+ .ag-row-highlight-above:first-of-type::after {
210
+ top:0px; // the first row highlight needs to in the normal position otherwise it is cut off by the top of the table
207
211
  }
208
212
 
209
213
  .ag-row-highlight-below::after {
210
214
  border-bottom: 2px dashed lui.$andrea;
211
215
  }
216
+
217
+ // .ag-header .ag-pinned-left-header:after,
218
+ // .ag-body-viewport .ag-pinned-left-cols-container:after {
219
+ // content: " ";
220
+ // height: 100%;
221
+ // position: absolute;
222
+ // z-index: 1;
223
+ // top: 0;
224
+ // width: 15px;
225
+ // box-shadow: -4px 0px 15px -4px rgba(0, 0, 0, 0.1);
226
+ // right: -4px;
227
+ // }
228
+
229
+ // div:after {
230
+ // box-shadow: 15px 0 15px -15px inset;
231
+ // right: -15px;
232
+ // }
233
+ .ag-pinned-left-header,
234
+ .ag-pinned-right-header,
235
+ .ag-pinned-right-cols-container,
236
+ .ag-pinned-left-cols-container {
237
+ position: relative;
238
+ z-index: 1;
239
+ box-shadow: 0 0 8px 2px rgb(0 0 0 / 10%);
240
+ }
241
+
242
+ .ag-pinned-left-header,
243
+ .ag-pinned-left-cols-container {
244
+ clip-path: polygon(0% 0%, 120% 0%, 120% 100%, 0% 100%);
245
+ }
246
+
247
+ .ag-pinned-right-header,
248
+ .ag-pinned-right-cols-container {
249
+ clip-path: polygon(-20% 0%, 100% 0%, 100% 100%, -20% 100%);
250
+ }
212
251
  }
@@ -2765,8 +2765,17 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2765
2765
  clientSideRowModel.highlightRowAtPixel(null);
2766
2766
  }, []);
2767
2767
  const onRowDragMove = React.useCallback((event) => {
2768
- const clientSideRowModel = event.api.getModel();
2769
- clientSideRowModel.highlightRowAtPixel(event.node, event.y);
2768
+ if (event.overNode && event.node.rowIndex != null) {
2769
+ const clientSideRowModel = event.api.getModel();
2770
+ //position 0 means highlight above, 1 means below
2771
+ const position = clientSideRowModel.getHighlightPosition(event.y, event.overNode);
2772
+ //we don't want to show the row highlight if it wouldn't result in the row moving
2773
+ const targetIndex = event.overIndex + position - (event.node.rowIndex < event.overIndex ? 1 : 0);
2774
+ //console.log(targetIndex)
2775
+ if (event.node.rowIndex != targetIndex) {
2776
+ clientSideRowModel.highlightRowAtPixel(event.node, event.y);
2777
+ }
2778
+ }
2770
2779
  }, []);
2771
2780
  const onRowDragEnd = React.useCallback(async (event) => {
2772
2781
  const clientSideRowModel = event.api.getModel();