@one-grid-core/angular 0.1.0-beta.5 → 0.2.0

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.
Files changed (66) hide show
  1. package/README.md +49 -4
  2. package/esm2022/lib/components/one-grid/one-grid.component.mjs +67 -16
  3. package/esm2022/lib/components/one-grid-body/one-grid-body.component.mjs +282 -30
  4. package/esm2022/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.mjs +10 -7
  5. package/esm2022/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.mjs +60 -4
  6. package/esm2022/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.mjs +14 -5
  7. package/esm2022/lib/components/one-grid-header/one-grid-header.component.mjs +50 -13
  8. package/esm2022/lib/components/one-grid-pagination/one-grid-pagination.component.mjs +39 -15
  9. package/esm2022/lib/components/one-grid-row-action/one-grid-row-action.component.mjs +54 -8
  10. package/esm2022/lib/components/one-grid-row-drag-handle/one-grid-row-drag-handle.component.mjs +110 -0
  11. package/esm2022/lib/core/directives/one-cell-renderer-component.directive.mjs +9 -2
  12. package/esm2022/lib/core/directives/one-cell-text-expand.directive.mjs +33 -51
  13. package/esm2022/lib/core/instants/one-grid-api.class.mjs +429 -166
  14. package/esm2022/lib/core/instants/one-row-node.class.mjs +103 -37
  15. package/esm2022/lib/core/models/one-column-def-types.model.mjs +1 -1
  16. package/esm2022/lib/core/models/one-event-types.model.mjs +1 -1
  17. package/esm2022/lib/core/models/one-grid-types.model.mjs +1 -1
  18. package/esm2022/lib/core/models/one-row-drag.model.mjs +2 -0
  19. package/esm2022/lib/core/models/one-row.model.mjs +1 -1
  20. package/esm2022/lib/core/models/one-tree-data.model.mjs +1 -1
  21. package/esm2022/lib/core/models/one-validation.model.mjs +1 -1
  22. package/esm2022/lib/core/pipes/cell-field-value-empty.pipe.mjs +8 -3
  23. package/esm2022/lib/core/pipes/column-sort-state.pipe.mjs +3 -1
  24. package/esm2022/lib/core/services/og-column.service.mjs +120 -13
  25. package/esm2022/lib/core/services/one-grid-cell.service.mjs +123 -20
  26. package/esm2022/lib/core/services/one-grid-row-drag.service.mjs +351 -0
  27. package/esm2022/lib/core/services/one-grid-selection.service.mjs +19 -6
  28. package/esm2022/lib/helpers/one-column-def.helper.mjs +27 -2
  29. package/esm2022/lib/helpers/one-filter.helper.mjs +71 -12
  30. package/esm2022/lib/helpers/one-validation.helper.mjs +7 -2
  31. package/esm2022/lib/index.mjs +8 -1
  32. package/esm2022/lib/one-grid.module.mjs +7 -16
  33. package/fesm2022/one-grid-core-angular.mjs +2046 -503
  34. package/fesm2022/one-grid-core-angular.mjs.map +1 -1
  35. package/lib/components/one-grid/one-grid.component.d.ts +16 -1
  36. package/lib/components/one-grid-body/one-grid-body.component.d.ts +132 -5
  37. package/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.d.ts +6 -1
  38. package/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.d.ts +19 -2
  39. package/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.d.ts +5 -2
  40. package/lib/components/one-grid-header/one-grid-header.component.d.ts +15 -7
  41. package/lib/components/one-grid-pagination/one-grid-pagination.component.d.ts +24 -5
  42. package/lib/components/one-grid-row-action/one-grid-row-action.component.d.ts +44 -0
  43. package/lib/components/one-grid-row-drag-handle/one-grid-row-drag-handle.component.d.ts +39 -0
  44. package/lib/core/directives/one-cell-text-expand.directive.d.ts +21 -9
  45. package/lib/core/instants/one-grid-api.class.d.ts +212 -26
  46. package/lib/core/instants/one-row-node.class.d.ts +67 -14
  47. package/lib/core/models/one-column-def-types.model.d.ts +89 -15
  48. package/lib/core/models/one-event-types.model.d.ts +24 -1
  49. package/lib/core/models/one-grid-types.model.d.ts +36 -1
  50. package/lib/core/models/one-row-drag.model.d.ts +44 -0
  51. package/lib/core/models/one-row.model.d.ts +0 -5
  52. package/lib/core/models/one-tree-data.model.d.ts +13 -0
  53. package/lib/core/models/one-validation.model.d.ts +12 -2
  54. package/lib/core/pipes/column-sort-state.pipe.d.ts +1 -1
  55. package/lib/core/services/og-column.service.d.ts +44 -3
  56. package/lib/core/services/one-grid-cell.service.d.ts +52 -4
  57. package/lib/core/services/one-grid-row-drag.service.d.ts +113 -0
  58. package/lib/core/services/one-grid-selection.service.d.ts +9 -0
  59. package/lib/helpers/one-column-def.helper.d.ts +19 -1
  60. package/lib/helpers/one-filter.helper.d.ts +29 -4
  61. package/lib/index.d.ts +7 -0
  62. package/lib/one-grid.module.d.ts +17 -19
  63. package/package.json +1 -2
  64. package/scss/_one-grid.scss +389 -17
  65. package/esm2022/lib/core/pipes/cell-disable-resolver.pipe.mjs +0 -26
  66. package/lib/core/pipes/cell-disable-resolver.pipe.d.ts +0 -9
@@ -51,6 +51,16 @@ $row-even-bg: var(--#{$prefix}body-bg, #f8f9fa) !default;
51
51
  $row-action-btn-width-height: 20px !default;
52
52
  $row-action-btn-border-radius: 4px !default;
53
53
 
54
+ // Row drag & drop
55
+ $row-drag-handle-color: var(--#{$prefix}secondary-color, #6c757d) !default;
56
+ $row-drag-indicator-size: 2px !default;
57
+
58
+ // Master / detail
59
+ //
60
+ // The detail area is a continuation of the row that opened it, so it sits
61
+ // flush by default. Set this to inset it.
62
+ $detail-padding: 0 !default;
63
+
54
64
  // Cell
55
65
  $cell-height: 30px !default;
56
66
  $cell-line-height: 1.2 !default;
@@ -105,6 +115,9 @@ $_og-defaults: (
105
115
  cell-line-height: $cell-line-height,
106
116
  cell-item-space: $cell-item-space,
107
117
  cell-padding: $cell-padding,
118
+ detail-padding: $detail-padding,
119
+ row-drag-handle-color: $row-drag-handle-color,
120
+ row-drag-indicator-size: $row-drag-indicator-size,
108
121
  action-btn-size: $row-action-btn-width-height,
109
122
  action-btn-radius: $row-action-btn-border-radius,
110
123
  border-radius: $border-radius,
@@ -143,8 +156,47 @@ $_og-defaults: (
143
156
  @return var(--#{$og-prefix}#{$token}, #{map-get($_og-defaults, $token)});
144
157
  }
145
158
 
159
+ // ----------------------------------------------------------------------------
160
+ // Pinned columns
161
+ //
162
+ // The grid reorders pinned columns to their edge and publishes the distance
163
+ // from that edge as `_pinnedOffset`, which the templates bind to `left` /
164
+ // `right`. Sticky does the rest, against the body's virtual-scroll viewport and
165
+ // the header's own viewport.
166
+ //
167
+ // `background: inherit` rather than a fixed colour: a pinned body cell has to
168
+ // keep whatever the row is painted — striping, hover, selection — while still
169
+ // being opaque enough to hide the columns sliding underneath it.
170
+ // ----------------------------------------------------------------------------
171
+ @mixin one-pinned-column {
172
+ position: sticky;
173
+ // Colour is set per context and must always be opaque — see below. A sticky
174
+ // cell has the scrolling columns passing underneath it, so any transparency
175
+ // lets them read straight through.
176
+ }
177
+
178
+ // A shadow cast inwards, so it is obvious where the frozen region ends and the
179
+ // scrolling one begins. Only the innermost column of each band carries it.
180
+ @mixin one-pinned-edge($side) {
181
+ @if $side == left {
182
+ box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.18);
183
+ } @else {
184
+ box-shadow: -2px 0 4px -2px rgba(0, 0, 0, 0.18);
185
+ }
186
+ }
187
+
146
188
  // One Grid UI
147
189
  .one-grid {
190
+ // Declared, not inherited from the host. Row height has to be exact — the
191
+ // virtual scroller is configured with a fixed itemSize — and that arithmetic
192
+ // cannot depend on whether the consuming application ships a reset.
193
+ &,
194
+ *,
195
+ *::before,
196
+ *::after {
197
+ box-sizing: border-box;
198
+ }
199
+
148
200
  height: inherit;
149
201
  position: relative;
150
202
  overflow: hidden;
@@ -216,7 +268,13 @@ $_og-defaults: (
216
268
  .one-header-row {
217
269
  position: relative;
218
270
  display: flex;
219
- width: inherit;
271
+ // max-content plus flex: 0 0 auto, so the row keeps its natural
272
+ // width and the viewport above it genuinely overflows. The viewport
273
+ // is a flex container, so without this the row would shrink to fit
274
+ // and `scrollLeft` would clamp to zero. It used to be translated
275
+ // inside a clipped box, which needed no real overflow at all.
276
+ flex: 0 0 auto;
277
+ width: max-content;
220
278
  z-index: 10 !important;
221
279
 
222
280
  // One Grid Header Column UI
@@ -227,6 +285,22 @@ $_og-defaults: (
227
285
  max-width: inherit;
228
286
  background-color: og-var(header-bg);
229
287
 
288
+ &.one-column-pinned-left,
289
+ &.one-column-pinned-right {
290
+ @include one-pinned-column;
291
+ // Above the scrolling headers, below the resize handle.
292
+ z-index: 2;
293
+ background-color: og-var(header-bg);
294
+ }
295
+
296
+ &.one-column-pinned-left.one-column-pinned-edge {
297
+ @include one-pinned-edge(left);
298
+ }
299
+
300
+ &.one-column-pinned-right.one-column-pinned-edge {
301
+ @include one-pinned-edge(right);
302
+ }
303
+
230
304
  &::after {
231
305
  content: '';
232
306
  position: absolute;
@@ -315,6 +389,11 @@ $_og-defaults: (
315
389
  // One Grid Body UI
316
390
  .one-grid-body {
317
391
  height: 100%;
392
+ // A column stack: pinned top, the scrolling viewport, pinned bottom.
393
+ // With no pinned rows this is one flex child filling the box, which is
394
+ // what `height: 100%` on the viewport used to do on its own.
395
+ display: flex;
396
+ flex-direction: column;
318
397
  background-color: og-var(body-bg);
319
398
  user-select: none;
320
399
  -webkit-user-select: none;
@@ -324,13 +403,37 @@ $_og-defaults: (
324
403
 
325
404
  .one-grid-body-viewport {
326
405
  width: 100%;
327
- height: 100%;
406
+ flex: 1 1 auto;
407
+ min-height: 0;
408
+
409
+ // The viewport carries tabindex="0" so it can be scrolled from the
410
+ // keyboard. A tab stop nobody can see is worse than no tab stop, so
411
+ // it gets a ring; the offset keeps it inside the CDK's containment
412
+ // box, which would otherwise clip an outward outline.
413
+ &:focus-visible {
414
+ outline: 2px solid og-var(primary);
415
+ outline-offset: -2px;
416
+ }
328
417
 
418
+ // A detail row is a continuation of the master row above it, not a
419
+ // card floating inside the grid, so it sits flush: its left edge
420
+ // lines up with the master grid's and it occupies exactly the
421
+ // height the API reserved.
422
+ //
423
+ // That reserved height is the reason the default is 0 rather than
424
+ // a taste call. `node.detailRowHeight` is what the grid computes
425
+ // for an open row, and the body's virtual-scroll viewport is
426
+ // configured with a single fixed `itemSize` — any padding here is
427
+ // height the scroller cannot see, so it becomes scroll drift on
428
+ // top of the drift an expanded row already causes.
429
+ //
430
+ // `height: inherit` used to sit here. It resolved to `auto`, since
431
+ // that is the content wrapper's computed height, so it never did
432
+ // anything; had the wrapper ever carried a pixel height it would
433
+ // have clipped the detail grid instead. Gone rather than kept.
329
434
  .one-row-detail-container {
330
435
  width: 100%;
331
- height: inherit;
332
- padding: calc(#{og-var(cell-height)} / 2);
333
- border-radius: og-var(action-btn-radius);
436
+ padding: og-var(detail-padding);
334
437
  }
335
438
 
336
439
  &::-webkit-scrollbar-corner {
@@ -338,13 +441,142 @@ $_og-defaults: (
338
441
  }
339
442
  }
340
443
 
444
+ // Rows anchored to an edge of the body. They are scrolled horizontally
445
+ // in step with the viewport, and never scroll vertically.
446
+ .one-pinned-rows {
447
+ flex: 0 0 auto;
448
+ overflow: hidden;
449
+ background-color: og-var(body-bg);
450
+ // Above the scrolling rows, so a pinned column's shadow from the
451
+ // body cannot bleed over the summary.
452
+ position: relative;
453
+ z-index: 2;
454
+
455
+ &.one-pinned-rows-top {
456
+ border-bottom: 1px solid og-var(border-color);
457
+ }
458
+
459
+ &.one-pinned-rows-bottom {
460
+ border-top: 1px solid og-var(border-color);
461
+ }
462
+
463
+ // Specificity has to beat `.one-row:nth-child(odd)`, which would
464
+ // otherwise stripe the summary row like a data row.
465
+ .one-row.one-row-pinned {
466
+ width: max-content;
467
+ background-color: og-var(header-bg);
468
+ font-weight: 600;
469
+
470
+ .one-column-pinned-left,
471
+ .one-column-pinned-right {
472
+ background-color: og-var(header-bg);
473
+ background-image: none;
474
+ }
475
+ }
476
+ }
477
+
478
+ // ------------------------------------------------------------------
479
+ // Row drag & drop
480
+ // ------------------------------------------------------------------
481
+
482
+ // The grab handle. Dimmed until the row is hovered or the handle itself
483
+ // is focused, so a column of grips does not compete with the data for
484
+ // attention — but never hidden outright, because a control that only
485
+ // exists on hover cannot be found by touch and cannot be tabbed to.
486
+ .one-row-drag-handle {
487
+ display: inline-flex;
488
+ align-items: center;
489
+ justify-content: center;
490
+ flex: 0 0 auto;
491
+ width: og-var(action-btn-size);
492
+ height: og-var(action-btn-size);
493
+ margin-right: og-var(cell-item-space);
494
+ padding: 0;
495
+ border: 0;
496
+ border-radius: og-var(action-btn-radius);
497
+ background: transparent;
498
+ color: og-var(row-drag-handle-color);
499
+ opacity: 0.45;
500
+ cursor: grab;
501
+ touch-action: none; // the service owns the gesture; do not also pan
502
+ transition: opacity 120ms ease, background-color 120ms ease;
503
+
504
+ &:hover:not(:disabled) {
505
+ opacity: 1;
506
+ background-color: og-var(primary-subtle-bg);
507
+ }
508
+
509
+ // A visible focus ring is what makes the keyboard path discoverable.
510
+ &:focus-visible {
511
+ opacity: 1;
512
+ outline: 2px solid og-var(primary);
513
+ outline-offset: -1px;
514
+ }
515
+
516
+ &:active:not(:disabled),
517
+ &.one-row-drag-handle-grabbed {
518
+ cursor: grabbing;
519
+ opacity: 1;
520
+ background-color: og-var(primary-subtle-bg);
521
+ color: og-var(primary);
522
+ }
523
+
524
+ // Disabled rather than removed: the handle keeps its place in the
525
+ // layout and its tooltip says why reordering is unavailable, so the
526
+ // column does not reflow when a sort is applied.
527
+ &:disabled {
528
+ opacity: 0.25;
529
+ cursor: not-allowed;
530
+ }
531
+ }
532
+
533
+ .one-row:hover .one-row-drag-handle:not(:disabled) {
534
+ opacity: 1;
535
+ }
536
+
537
+ // The row being moved. Left in place and faded rather than lifted out:
538
+ // the viewport is virtualised at a fixed row height, so removing a row
539
+ // mid-drag would shift everything below it and fight the scroller.
540
+ .one-row-dragging {
541
+ opacity: 0.4;
542
+ }
543
+
544
+ // The insertion line. Sits above the rows and ignores the pointer, so
545
+ // it can never intercept the drag it is describing.
546
+ .one-row-drop-indicator {
547
+ position: absolute;
548
+ left: 0;
549
+ // Width is set inline from the row width less the horizontal
550
+ // scroll: rows are `fit-content`, so a full-bleed line would hang
551
+ // past the last column into empty space and read as part of the
552
+ // container rather than the rows.
553
+ height: og-var(row-drag-indicator-size);
554
+ margin-top: calc(#{og-var(row-drag-indicator-size)} / -2);
555
+ background-color: og-var(primary);
556
+ pointer-events: none;
557
+ z-index: 3;
558
+
559
+ // A cap at the leading edge, so the line reads as an insertion point
560
+ // rather than a row border at a glance.
561
+ &::before {
562
+ content: '';
563
+ position: absolute;
564
+ left: 0;
565
+ top: 50%;
566
+ width: 8px;
567
+ height: 8px;
568
+ margin-top: -4px;
569
+ border-radius: 50%;
570
+ background-color: og-var(primary);
571
+ }
572
+ }
573
+
341
574
  // One Grid Odd & Event Row UI
342
575
  .one-row {
343
576
  display: flex;
344
577
  flex-wrap: nowrap;
345
578
  width: fit-content;
346
579
  height: og-var(cell-height);
347
- border-bottom: 1px solid og-var(border-color);
348
580
  font-size: og-var(font-size);
349
581
 
350
582
  .one-column {
@@ -355,6 +587,39 @@ $_og-defaults: (
355
587
  margin: 0;
356
588
  padding: 0;
357
589
  height: og-var(cell-height);
590
+ // The row separator lives on the cell, not the row.
591
+ //
592
+ // It used to be `border-bottom` on `.one-row`, which reserved a
593
+ // pixel of the row's 30px box — while every cell was still a
594
+ // full 30px and so overhung it. Transparent cells let the line
595
+ // show through and nobody noticed; an opaque pinned cell
596
+ // covered it, and the frozen columns lost their row borders.
597
+ //
598
+ // Drawn per cell, the separator is part of what each cell
599
+ // paints, so nothing can sit on top of it. The row still
600
+ // measures exactly `cell-height`, which the virtual scroller
601
+ // depends on.
602
+ border-bottom: 1px solid og-var(border-color);
603
+
604
+ &.one-column-pinned-left,
605
+ &.one-column-pinned-right {
606
+ @include one-pinned-column;
607
+ z-index: 1;
608
+ // The opaque base. `background: inherit` was used here, and
609
+ // it worked until the row was hovered or selected: those
610
+ // colours are deliberately translucent so they tint the
611
+ // striping, and inheriting one made the frozen column
612
+ // see-through with the scrolling cells sliding under it.
613
+ background-color: og-var(row-odd-bg);
614
+ }
615
+
616
+ &.one-column-pinned-left.one-column-pinned-edge {
617
+ @include one-pinned-edge(left);
618
+ }
619
+
620
+ &.one-column-pinned-right.one-column-pinned-edge {
621
+ @include one-pinned-edge(right);
622
+ }
358
623
 
359
624
  .one-column-object-active {
360
625
  position: absolute;
@@ -389,13 +654,26 @@ $_og-defaults: (
389
654
  bottom: 100%;
390
655
  }
391
656
 
657
+ // Real <button>s now, for keyboard operability — so the
658
+ // button chrome has to be reset back to a menu row.
392
659
  .cell-option-menu-item {
393
660
  display: flex;
394
661
  align-items: center;
662
+ width: 100%;
395
663
  padding: 6px 12px;
396
664
  cursor: pointer;
665
+ text-align: left;
666
+ font: inherit;
667
+ color: inherit;
668
+ background: none;
669
+ border: 0;
397
670
  border-bottom: 1px solid og-var(border-color);
398
671
 
672
+ &:focus-visible {
673
+ outline: 2px solid og-var(primary);
674
+ outline-offset: -2px;
675
+ }
676
+
399
677
 
400
678
  &:last-child {
401
679
  border-bottom: none;
@@ -555,6 +833,26 @@ $_og-defaults: (
555
833
  height: og-var(cell-height);
556
834
  margin-right: og-var(cell-item-space);
557
835
 
836
+ // The expander is a <button>, so the UA styling has to
837
+ // be reset back to the bare glyph it was before.
838
+ .expansion-button {
839
+ display: flex;
840
+ align-items: center;
841
+ justify-content: center;
842
+ padding: 0;
843
+ border: 0;
844
+ background: none;
845
+ color: inherit;
846
+ font: inherit;
847
+ cursor: pointer;
848
+
849
+ &:focus-visible {
850
+ outline: 2px solid og-var(primary);
851
+ outline-offset: 1px;
852
+ border-radius: og-var(action-btn-radius);
853
+ }
854
+ }
855
+
558
856
  .expansion-icon {
559
857
  display: flex;
560
858
  justify-content: center;
@@ -563,9 +861,11 @@ $_og-defaults: (
563
861
  height: og-var(action-btn-size);
564
862
  border-radius: og-var(action-btn-radius);
565
863
  transition: transform 0.2s ease-in-out;
864
+ }
566
865
 
567
- &:hover {
568
- cursor: pointer;
866
+ @media (prefers-reduced-motion: reduce) {
867
+ .expansion-icon {
868
+ transition: none;
569
869
  }
570
870
  }
571
871
 
@@ -586,6 +886,24 @@ $_og-defaults: (
586
886
  &.one-cell-placeholder {
587
887
  opacity: .5 !important;
588
888
  }
889
+
890
+ // Applied by OneCellTextExpandDirective on hover.
891
+ // `position` is what makes `z-index` mean anything, and
892
+ // the background is what stops the revealed text from
893
+ // being read on top of the next column.
894
+ &.one-cell-text-expanded {
895
+ position: relative;
896
+ z-index: 3;
897
+ overflow: visible;
898
+ text-overflow: unset;
899
+ width: max-content;
900
+ max-width: 60ch;
901
+ white-space: normal;
902
+ padding: 4px 8px;
903
+ border-radius: og-var(action-btn-radius);
904
+ background: og-var(body-bg);
905
+ box-shadow: og-var(menu-shadow);
906
+ }
589
907
  }
590
908
  }
591
909
 
@@ -677,10 +995,29 @@ $_og-defaults: (
677
995
  &:nth-child(even) {
678
996
  background-color: og-var(row-even-bg);
679
997
  }
998
+
999
+ // Pinned cells cannot take the row's state colour directly, because
1000
+ // it is translucent. They keep an opaque base and receive the same
1001
+ // tint as a background-image layer, which composites over that base
1002
+ // instead of replacing it — visually identical, but opaque.
1003
+ &:nth-child(even) .one-column-pinned-left,
1004
+ &:nth-child(even) .one-column-pinned-right {
1005
+ background-color: og-var(row-even-bg);
1006
+ }
1007
+
1008
+ &:hover .one-column-pinned-left,
1009
+ &:hover .one-column-pinned-right {
1010
+ background-image: linear-gradient(og-var(hover-bg), og-var(hover-bg));
1011
+ }
680
1012
  }
681
1013
 
682
1014
  .one-row-selected {
683
1015
  background-color: og-var(selected-bg) !important;
1016
+
1017
+ .one-column-pinned-left,
1018
+ .one-column-pinned-right {
1019
+ background-image: linear-gradient(og-var(selected-bg), og-var(selected-bg));
1020
+ }
684
1021
  }
685
1022
  }
686
1023
 
@@ -707,6 +1044,27 @@ $_og-defaults: (
707
1044
  margin-left: 0 !important;
708
1045
  }
709
1046
 
1047
+ // These are real <button>s and now carry the real `disabled`
1048
+ // attribute, so they need a visible focus ring and their own
1049
+ // disabled look — a class alone left them tabbable and clickable.
1050
+ &:focus-visible {
1051
+ outline: 2px solid og-var(primary);
1052
+ outline-offset: 1px;
1053
+ }
1054
+
1055
+ &:disabled {
1056
+ cursor: not-allowed;
1057
+ opacity: .5;
1058
+ }
1059
+
1060
+ // The expander chevron: a button for keyboard reasons, but it
1061
+ // should not look like one.
1062
+ &.btn-action-plain {
1063
+ border: 0;
1064
+ color: inherit;
1065
+ background-color: transparent;
1066
+ }
1067
+
710
1068
  &.btn-action-primary {
711
1069
  color: og-var(primary);
712
1070
  border: 1px solid og-var(primary);
@@ -873,14 +1231,11 @@ $_og-defaults: (
873
1231
  }
874
1232
 
875
1233
  // Drag & Drop Feature
876
- .one-row-dragging {
877
- opacity: 0.6;
878
- /* fade */
879
- border: 1px dashed og-var(primary);
880
- border-radius: og-var(action-btn-radius);
881
- cursor: grabbing;
882
- }
883
-
1234
+ //
1235
+ // `.one-row-dragging` used to be defined here too, unused, from an earlier
1236
+ // unbuilt attempt at row dragging. It shadowed the real rule further up
1237
+ // with a dashed outline nothing asked for. The one definition that governs
1238
+ // a dragged row now lives with the rest of the row-drag styles.
884
1239
  .drop-valid {
885
1240
  border: 2px solid og-var(success);
886
1241
  background-color: og-var(drop-valid-bg);
@@ -892,6 +1247,23 @@ $_og-defaults: (
892
1247
  }
893
1248
 
894
1249
  // Utilities Class
1250
+
1251
+ // Screen-reader only. Clipped rather than `display: none`, which would take
1252
+ // the element out of the accessibility tree and silence it. At grid scope,
1253
+ // not body scope: the pagination bar is a sibling of the body and needs it
1254
+ // too.
1255
+ .one-grid-visually-hidden {
1256
+ position: absolute;
1257
+ width: 1px;
1258
+ height: 1px;
1259
+ margin: -1px;
1260
+ padding: 0;
1261
+ overflow: hidden;
1262
+ clip: rect(0, 0, 0, 0);
1263
+ white-space: nowrap;
1264
+ border: 0;
1265
+ }
1266
+
895
1267
  .hidden {
896
1268
  display: none;
897
1269
  }
@@ -966,7 +1338,7 @@ $_og-defaults: (
966
1338
  }
967
1339
  }
968
1340
 
969
- // Placeholder Disply Empty Rows Data Message
1341
+ // Placeholder Display Empty Rows Data Message
970
1342
  .one-grid-empty-message {
971
1343
  z-index: 10;
972
1344
  line-height: og-var(cell-line-height);
@@ -1,26 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import { resolveOneCellRendererParams } from '../../helpers/one-column-def.helper';
3
- import * as i0 from "@angular/core";
4
- export class CellDisableResolverPipe {
5
- transform(node, column, context, allowedEdit) {
6
- if (!column || !node)
7
- return false;
8
- return resolveOneCellRendererParams(column.disable, {
9
- node,
10
- data: node.data,
11
- columnDef: column,
12
- rowIndex: node.rowIndex,
13
- context
14
- }) || !allowedEdit;
15
- }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CellDisableResolverPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
17
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: CellDisableResolverPipe, name: "cellDisableResolver" }); }
18
- }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CellDisableResolverPipe, decorators: [{
20
- type: Pipe,
21
- args: [{
22
- standalone: false,
23
- name: 'cellDisableResolver'
24
- }]
25
- }] });
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VsbC1kaXNhYmxlLXJlc29sdmVyLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9vbmUtZ3JpZC9zcmMvbGliL2NvcmUvcGlwZXMvY2VsbC1kaXNhYmxlLXJlc29sdmVyLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFFcEQsT0FBTyxFQUFFLDRCQUE0QixFQUFFLE1BQU0scUNBQXFDLENBQUM7O0FBT25GLE1BQU0sT0FBTyx1QkFBdUI7SUFFbEMsU0FBUyxDQUFDLElBQWdCLEVBQUUsTUFBb0IsRUFBRSxPQUFZLEVBQUUsV0FBb0I7UUFFbEYsSUFBSSxDQUFDLE1BQU0sSUFBSSxDQUFDLElBQUk7WUFBRSxPQUFPLEtBQUssQ0FBQztRQUVuQyxPQUFPLDRCQUE0QixDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUU7WUFDbEQsSUFBSTtZQUNKLElBQUksRUFBRSxJQUFJLENBQUMsSUFBSTtZQUNmLFNBQVMsRUFBRSxNQUFNO1lBQ2pCLFFBQVEsRUFBRSxJQUFJLENBQUMsUUFBUTtZQUN2QixPQUFPO1NBQ1IsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO0lBQ3JCLENBQUM7K0dBYlUsdUJBQXVCOzZHQUF2Qix1QkFBdUI7OzRGQUF2Qix1QkFBdUI7a0JBSm5DLElBQUk7bUJBQUM7b0JBQ0osVUFBVSxFQUFFLEtBQUs7b0JBQ2pCLElBQUksRUFBRSxxQkFBcUI7aUJBQzVCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGlwZSwgUGlwZVRyYW5zZm9ybSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgT25lUm93Tm9kZSB9IGZyb20gJy4uL2luc3RhbnRzL29uZS1yb3ctbm9kZS5jbGFzcyc7XG5pbXBvcnQgeyByZXNvbHZlT25lQ2VsbFJlbmRlcmVyUGFyYW1zIH0gZnJvbSAnLi4vLi4vaGVscGVycy9vbmUtY29sdW1uLWRlZi5oZWxwZXInO1xuaW1wb3J0IHsgT25lQ29sdW1uRGVmIH0gZnJvbSAnLi4vbW9kZWxzL29uZS1jb2x1bW4tZGVmLXR5cGVzLm1vZGVsJztcblxuQFBpcGUoe1xuICBzdGFuZGFsb25lOiBmYWxzZSxcbiAgbmFtZTogJ2NlbGxEaXNhYmxlUmVzb2x2ZXInXG59KVxuZXhwb3J0IGNsYXNzIENlbGxEaXNhYmxlUmVzb2x2ZXJQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG5cbiAgdHJhbnNmb3JtKG5vZGU6IE9uZVJvd05vZGUsIGNvbHVtbjogT25lQ29sdW1uRGVmLCBjb250ZXh0OiBhbnksIGFsbG93ZWRFZGl0OiBib29sZWFuKTogYm9vbGVhbiB7XG5cbiAgICBpZiAoIWNvbHVtbiB8fCAhbm9kZSkgcmV0dXJuIGZhbHNlO1xuXG4gICAgcmV0dXJuIHJlc29sdmVPbmVDZWxsUmVuZGVyZXJQYXJhbXMoY29sdW1uLmRpc2FibGUsIHtcbiAgICAgIG5vZGUsXG4gICAgICBkYXRhOiBub2RlLmRhdGEsXG4gICAgICBjb2x1bW5EZWY6IGNvbHVtbixcbiAgICAgIHJvd0luZGV4OiBub2RlLnJvd0luZGV4LFxuICAgICAgY29udGV4dFxuICAgIH0pIHx8ICFhbGxvd2VkRWRpdDtcbiAgfVxuXG59XG4iXX0=
@@ -1,9 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- import { OneRowNode } from '../instants/one-row-node.class';
3
- import { OneColumnDef } from '../models/one-column-def-types.model';
4
- import * as i0 from "@angular/core";
5
- export declare class CellDisableResolverPipe implements PipeTransform {
6
- transform(node: OneRowNode, column: OneColumnDef, context: any, allowedEdit: boolean): boolean;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<CellDisableResolverPipe, never>;
8
- static ɵpipe: i0.ɵɵPipeDeclaration<CellDisableResolverPipe, "cellDisableResolver", false>;
9
- }