@swimlane/ngx-datatable 23.0.1 → 24.0.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.
@@ -9,16 +9,20 @@
9
9
  $ngx-datatable-selected-active-background: yellow;
10
10
  $ngx-datatable-selected-active-background-hover: rgba(yellow, 0.2);
11
11
 
12
- @import '~@swimlane/ngx-datatable/index.css';
13
- @import '~@swimlane/ngx-datatable/themes/material.scss';
12
+ @use '~@swimlane/ngx-datatable/themes/material.scss';
14
13
  @import '~@swimlane/ngx-datatable/assets/icons.css';
15
14
 
16
15
  That's all.
17
16
  */
18
17
 
18
+ @use './ghost' as ghost;
19
+ @use './rows' as rows;
20
+
19
21
  // common datatable colors
20
22
  $ngx-datatable-background: #fff !default;
21
- $ngx-datatable-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),
23
+ $ngx-datatable-box-shadow:
24
+ 0 5px 5px -3px rgba(0, 0, 0, 0.2),
25
+ 0 8px 10px 1px rgba(0, 0, 0, 0.14),
22
26
  0 3px 14px 2px rgba(0, 0, 0, 0.12) !default;
23
27
  $ngx-datatable-row-odd-background: #eee !default;
24
28
 
@@ -46,6 +50,7 @@ $datatable-header-border-bottom-color: rgba(0, 0, 0, 0.12) !default;
46
50
  $datatable-header-resize-handle-color: #eee !default;
47
51
 
48
52
  // colors for table body elements
53
+ $datatable-disable-row-text-color: #83888e !default;
49
54
  $datatable-row-detail-background: #f5f5f5 !default;
50
55
  $datatable-body-cell-color: rgba(0, 0, 0, 0.87) !default;
51
56
  $datatable-group-header-background: #f5f5f5 !default;
@@ -56,7 +61,7 @@ $datatable-body-row-border-bottom-color: #d9d8d9 !default;
56
61
  // colors for footer elements
57
62
  $datatable-footer-cell-color: rgba(0, 0, 0, 0.54) !default;
58
63
  $datatable-footer-border-top-color: rgba(0, 0, 0, 0.12) !default;
59
- $datatable-pager-color: rgba(0, 0, 0, 0.54) !default;
64
+ $datatable-pager-color: rgba(0, 0, 0, 0.64) !default;
60
65
  $datatable-pager-color-hover: rgba(0, 0, 0, 0.75) !default;
61
66
  $datatable-pager-background-hover: rgba(158, 158, 158, 0.2) !default;
62
67
  $datatable-pager-disabled-color: rgba(0, 0, 0, 0.26) !default;
@@ -77,18 +82,25 @@ $datatable-ghost-cell-strip-background-image: linear-gradient(
77
82
  transparent
78
83
  ) !default;
79
84
  $datatable-ghost-cell-strip-radius: 0 !default;
80
- $datatble-ghost-cell-animation-duration: 10s;
81
-
82
- @import './ghost';
83
- @import './rows';
85
+ $datatable-ghost-cell-animation-duration: 10s;
84
86
 
85
87
  .ngx-datatable.material {
88
+ @include ghost.ghost-cell-styles(
89
+ $datatable-ghost-cell-container-background,
90
+ $datatable-ghost-cell-strip-background,
91
+ $datatable-ghost-cell-strip-background-image,
92
+ $datatable-ghost-cell-strip-radius,
93
+ $datatable-ghost-cell-animation-duration
94
+ );
95
+
96
+ @include rows.row-disabled-styles($datatable-disable-row-text-color);
97
+
86
98
  background: $ngx-datatable-background;
87
99
  box-shadow: $ngx-datatable-box-shadow;
88
100
 
89
101
  *,
90
- *:before,
91
- *:after {
102
+ *::before,
103
+ *::after {
92
104
  box-sizing: border-box;
93
105
  }
94
106
 
@@ -178,18 +190,20 @@ $datatble-ghost-cell-animation-duration: 10s;
178
190
  * Shared Styles
179
191
  */
180
192
  .empty-row {
181
- height: 50px;
182
- text-align: left;
183
- padding: 0.5rem 1.2rem;
193
+ block-size: 50px;
194
+ text-align: start;
195
+ padding-block: 0.5rem;
196
+ padding-inline: 1.2rem;
184
197
  vertical-align: top;
185
- border-top: 0;
198
+ border-block-start: 0;
186
199
  }
187
200
 
188
201
  .loading-row {
189
- text-align: left;
190
- padding: 0.5rem 1.2rem;
202
+ text-align: start;
203
+ padding-block: 0.5rem;
204
+ padding-inline: 1.2rem;
191
205
  vertical-align: top;
192
- border-top: 0;
206
+ border-block-start: 0;
193
207
  }
194
208
 
195
209
  /**
@@ -197,18 +211,20 @@ $datatble-ghost-cell-animation-duration: 10s;
197
211
  */
198
212
  .datatable-header,
199
213
  .datatable-body {
200
- .datatable-row-left {
201
- background-color: $ngx-datatable-background;
202
- background-position: 100% 0;
203
- background-repeat: repeat-y;
204
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==);
205
- }
214
+ .horizontal-overflow {
215
+ .datatable-row-left {
216
+ background-color: $ngx-datatable-background;
217
+ background-position: 100% 0;
218
+ background-repeat: repeat-y;
219
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==');
220
+ }
206
221
 
207
- .datatable-row-right {
208
- background-position: 0 0;
209
- background-color: $ngx-datatable-background;
210
- background-repeat: repeat-y;
211
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQI12PQkNdi1VTQ5gbSwkAsDQARLAIGtOSFUAAAAABJRU5ErkJggg==);
222
+ .datatable-row-right {
223
+ background-position: 0 0;
224
+ background-color: $ngx-datatable-background;
225
+ background-repeat: repeat-y;
226
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQI12PQkNdi1VTQ5gbSwkAsDQARLAIGtOSFUAAAAABJRU5ErkJggg==');
227
+ }
212
228
  }
213
229
  }
214
230
 
@@ -216,14 +232,19 @@ $datatble-ghost-cell-animation-duration: 10s;
216
232
  * Header Styles
217
233
  */
218
234
  .datatable-header {
219
- border-bottom: 1px solid $datatable-header-border-bottom-color;
235
+ border-block-end: 1px solid $datatable-header-border-bottom-color;
236
+
237
+ .datatable-row-left,
238
+ .datatable-row-right {
239
+ background-color: $datatable-header-cell-background;
240
+ }
220
241
 
221
242
  .datatable-header-cell {
222
243
  flex-shrink: 0;
223
- text-align: left;
224
- padding: 0.9rem 1.2rem;
244
+ text-align: start;
245
+ padding-block: 0.9rem;
246
+ padding-inline: 1.2rem;
225
247
  font-weight: 400;
226
- background-color: $datatable-header-cell-background;
227
248
  color: $datatable-header-cell-color;
228
249
  vertical-align: bottom;
229
250
  font-size: 12px;
@@ -235,7 +256,9 @@ $datatble-ghost-cell-animation-duration: 10s;
235
256
 
236
257
  &.longpress {
237
258
  .draggable::after {
238
- transition: transform 400ms ease, opacity 400ms ease;
259
+ transition:
260
+ transform 400ms ease,
261
+ opacity 400ms ease;
239
262
  opacity: 0.5;
240
263
  transform: scale(1);
241
264
  }
@@ -244,11 +267,12 @@ $datatble-ghost-cell-animation-duration: 10s;
244
267
  .draggable::after {
245
268
  content: ' ';
246
269
  position: absolute;
247
- top: 50%;
248
- left: 50%;
249
- margin: -30px 0 0 -30px;
250
- height: 60px;
251
- width: 60px;
270
+ inset-block-start: 50%;
271
+ inset-inline-start: 50%;
272
+ margin-block: -30px 0;
273
+ margin-inline: -30px 0;
274
+ block-size: 60px;
275
+ inline-size: 60px;
252
276
  background: #eee;
253
277
  border-radius: 100%;
254
278
  opacity: 1;
@@ -260,13 +284,13 @@ $datatble-ghost-cell-animation-duration: 10s;
260
284
 
261
285
  &.dragging {
262
286
  .resize-handle {
263
- border-right: none;
287
+ border-inline-end: none;
264
288
  }
265
289
  }
266
290
  }
267
291
 
268
292
  .resize-handle {
269
- border-right: solid 1px $datatable-header-resize-handle-color;
293
+ border-inline-end: solid 1px $datatable-header-resize-handle-color;
270
294
  }
271
295
  }
272
296
 
@@ -283,8 +307,8 @@ $datatble-ghost-cell-animation-duration: 10s;
283
307
 
284
308
  .datatable-group-header {
285
309
  background: $datatable-group-header-background;
286
- border-bottom: solid 1px $datatable-group-header-border-bottom-color;
287
- border-top: solid 1px $datatable-group-header-border-top-color;
310
+ border-block-end: solid 1px $datatable-group-header-border-bottom-color;
311
+ border-block-start: solid 1px $datatable-group-header-border-top-color;
288
312
 
289
313
  .datatable-group-cell {
290
314
  padding-inline-start: 1.2rem;
@@ -297,16 +321,17 @@ $datatble-ghost-cell-animation-duration: 10s;
297
321
  }
298
322
 
299
323
  .datatable-body-row {
300
- border-bottom: 1px solid $datatable-body-row-border-bottom-color;
324
+ border-block-end: 1px solid $datatable-body-row-border-bottom-color;
301
325
 
302
326
  .datatable-body-cell {
303
327
  flex-shrink: 0;
304
- text-align: left;
305
- padding: 0.9rem 1.2rem;
328
+ text-align: start;
329
+ padding-block: 0.9rem;
330
+ padding-inline: 1.2rem;
306
331
  vertical-align: top;
307
- border-top: 0;
332
+ border-block-start: 0;
308
333
  color: $datatable-body-cell-color;
309
- transition: width 0.3s ease;
334
+ transition: inline-size 0.3s ease;
310
335
  font-size: 14px;
311
336
  font-weight: 400;
312
337
 
@@ -320,19 +345,19 @@ $datatble-ghost-cell-animation-duration: 10s;
320
345
  .progress-linear {
321
346
  display: block;
322
347
  position: sticky;
323
- width: 100%;
324
- height: 0;
348
+ inline-size: 100%;
349
+ block-size: 0;
325
350
  z-index: 999;
326
351
  padding: 0;
327
352
  margin: 0;
328
- top: 0;
353
+ inset-block-start: 0;
329
354
 
330
355
  .container {
331
356
  display: block;
332
357
  position: relative;
333
358
  overflow: hidden;
334
- width: 100%;
335
- height: 5px;
359
+ inline-size: 100%;
360
+ block-size: 5px;
336
361
  transform: translate(0, 0) scale(1, 1);
337
362
  background-color: rgb(170, 209, 249);
338
363
 
@@ -345,22 +370,22 @@ $datatble-ghost-cell-animation-duration: 10s;
345
370
  background-color: rgb(16, 108, 200);
346
371
 
347
372
  position: absolute;
348
- left: 0;
349
- top: 0;
350
- bottom: 0;
351
- width: 100%;
352
- height: 5px;
373
+ inset-inline-start: 0;
374
+ inset-block: 0;
375
+ inline-size: 100%;
376
+ block-size: 5px;
353
377
  }
354
378
  }
355
379
  }
356
380
 
357
381
  .custom-loading-indicator-wrapper {
358
382
  position: sticky;
359
- top: 0;
360
- height: 0;
383
+ inset-block-start: 0;
384
+ block-size: 0;
361
385
  z-index: 999;
386
+
362
387
  .custom-loading-content {
363
- width: 100%;
388
+ inline-size: 100%;
364
389
  background-color: $ngx-datatable-default-background;
365
390
  }
366
391
  }
@@ -370,60 +395,62 @@ $datatble-ghost-cell-animation-duration: 10s;
370
395
  * Footer Styles
371
396
  */
372
397
  .datatable-footer {
373
- border-top: 1px solid $datatable-footer-border-top-color;
398
+ border-block-start: 1px solid $datatable-footer-border-top-color;
374
399
  font-size: 12px;
375
400
  font-weight: 400;
376
401
  color: $datatable-footer-cell-color;
377
402
 
378
403
  .page-count {
379
404
  line-height: 50px;
380
- height: 50px;
381
- padding: 0 1.2rem;
405
+ block-size: 50px;
406
+ padding-block: 0;
407
+ padding-inline: 1.2rem;
382
408
  }
383
409
 
384
410
  .datatable-pager {
385
- margin: 0 10px;
411
+ margin-block: 0;
412
+ margin-inline: 10px;
386
413
 
387
- li {
388
- vertical-align: middle;
389
-
390
- &.disabled a {
391
- color: $datatable-pager-disabled-color !important;
392
- background-color: $datatable-pager-disabled-background !important;
393
- }
394
-
395
- &.active a {
396
- background-color: $datatable-pager-active-background;
397
- font-weight: bold;
398
- }
399
- }
400
-
401
- a {
402
- height: 22px;
403
- min-width: 24px;
414
+ .page-button {
415
+ block-size: 22px;
416
+ min-inline-size: 24px;
404
417
  line-height: 22px;
405
- padding: 0 6px;
418
+ padding-block: 0;
419
+ padding-inline: 6px;
406
420
  border-radius: 3px;
407
- margin: 6px 3px;
421
+ margin-block: 6px;
422
+ margin-inline: 3px;
408
423
  text-align: center;
409
- vertical-align: top;
410
424
  color: $datatable-pager-color;
411
425
  text-decoration: none;
412
- vertical-align: bottom;
426
+ border: 0;
427
+ background: none;
413
428
 
414
429
  &:hover {
415
430
  color: $datatable-pager-color-hover;
416
431
  background-color: $datatable-pager-background-hover;
417
432
  }
433
+
434
+ &.active {
435
+ background-color: $datatable-pager-active-background;
436
+ font-weight: bold;
437
+ }
438
+
439
+ &:disabled {
440
+ color: $datatable-pager-disabled-color;
441
+ background-color: $datatable-pager-disabled-background;
442
+ }
418
443
  }
419
444
 
420
445
  .datatable-icon-left,
421
446
  .datatable-icon-skip,
422
447
  .datatable-icon-right,
423
448
  .datatable-icon-prev {
449
+ display: inline-block;
450
+ vertical-align: middle;
424
451
  font-size: 20px;
425
452
  line-height: 20px;
426
- padding: 0 3px;
453
+ padding-block: 0;
427
454
  }
428
455
  }
429
456
  }
@@ -458,36 +485,37 @@ $datatble-ghost-cell-animation-duration: 10s;
458
485
 
459
486
  input[type='checkbox'] {
460
487
  position: relative;
461
- margin: 0 1rem 0 0;
488
+ margin-block: 0;
489
+ margin-inline: 0 1rem;
462
490
  cursor: pointer;
463
491
  outline: none;
464
492
 
465
- &:before {
493
+ &::before {
466
494
  transition: all 0.3s ease-in-out;
467
495
  content: '';
468
496
  position: absolute;
469
- left: 0;
497
+ inset-inline-start: 0;
470
498
  z-index: 1;
471
- width: 1rem;
472
- height: 1rem;
499
+ inline-size: 1rem;
500
+ block-size: 1rem;
473
501
  border: 2px solid #f2f2f2;
474
502
  }
475
503
 
476
- &:checked:before {
504
+ &:checked::before {
477
505
  transform: rotate(-45deg);
478
- height: 0.5rem;
506
+ block-size: 0.5rem;
479
507
  border-color: #009688;
480
- border-top-style: none;
481
- border-right-style: none;
508
+ border-block-start-style: none;
509
+ border-inline-end-style: none;
482
510
  }
483
511
 
484
- &:after {
512
+ &::after {
485
513
  content: '';
486
514
  position: absolute;
487
- top: 0;
488
- left: 0;
489
- width: 1rem;
490
- height: 1rem;
515
+ inset-block-start: 0;
516
+ inset-inline-start: 0;
517
+ inline-size: 1rem;
518
+ block-size: 1rem;
491
519
  background: #fff;
492
520
  cursor: pointer;
493
521
  }