@paperless/angular 0.1.0-alpha.443 → 0.1.0-alpha.444
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.
- package/esm2020/lib/modules/table/components/table-cell/table-cell.component.mjs +24 -10
- package/fesm2015/paperless-angular.mjs +23 -9
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +23 -9
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import { PlatformModule } from '@angular/cdk/platform';
|
|
|
13
13
|
import { PortalModule, CdkPortal, ComponentPortal } from '@angular/cdk/portal';
|
|
14
14
|
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
15
15
|
import { startWith, pairwise, map, filter, debounce } from 'rxjs/operators';
|
|
16
|
-
import { objectGetByPath } from '@paperless/core';
|
|
16
|
+
import { objectGetByPath, isTableColumnSizesKey } from '@paperless/core';
|
|
17
17
|
import { v4 } from 'uuid';
|
|
18
18
|
import * as i1$2 from '@angular/platform-browser';
|
|
19
19
|
|
|
@@ -2349,7 +2349,7 @@ class TableCell {
|
|
|
2349
2349
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
2350
2350
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
2351
2351
|
*/
|
|
2352
|
-
_getSizes({ sizes } /* Table Definition */) {
|
|
2352
|
+
_getSizes({ sizes, } /* Table Definition */) {
|
|
2353
2353
|
if (sizes === 'auto' || !sizes) {
|
|
2354
2354
|
return {
|
|
2355
2355
|
'w-auto': true,
|
|
@@ -2361,9 +2361,13 @@ class TableCell {
|
|
|
2361
2361
|
};
|
|
2362
2362
|
}
|
|
2363
2363
|
if (typeof sizes === 'object') {
|
|
2364
|
+
sizes = sizes;
|
|
2364
2365
|
const classes = {};
|
|
2365
|
-
let previousSize
|
|
2366
|
-
for (
|
|
2366
|
+
let previousSize;
|
|
2367
|
+
for (let size in sizes) {
|
|
2368
|
+
if (!isTableColumnSizesKey(sizes, size)) {
|
|
2369
|
+
continue;
|
|
2370
|
+
}
|
|
2367
2371
|
if (size === 'default') {
|
|
2368
2372
|
if (sizes.default === 'hidden') {
|
|
2369
2373
|
classes['hidden'] = true;
|
|
@@ -2374,21 +2378,31 @@ class TableCell {
|
|
|
2374
2378
|
previousSize = size;
|
|
2375
2379
|
continue;
|
|
2376
2380
|
}
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2381
|
+
const currentValue = sizes[size];
|
|
2382
|
+
const previousValue = previousSize ? sizes[previousSize] : null;
|
|
2383
|
+
if (currentValue !== 'hidden' &&
|
|
2384
|
+
previousValue &&
|
|
2385
|
+
previousValue === 'hidden') {
|
|
2380
2386
|
classes[`${size}:flex`] = true;
|
|
2381
2387
|
}
|
|
2382
|
-
if (
|
|
2388
|
+
if (currentValue === 'hidden') {
|
|
2383
2389
|
classes[`${size}:hidden`] = true;
|
|
2384
2390
|
previousSize = size;
|
|
2385
2391
|
continue;
|
|
2386
2392
|
}
|
|
2387
|
-
|
|
2393
|
+
if (currentValue === 12 || currentValue === 'full') {
|
|
2394
|
+
classes[`${size}:w-full`] = true;
|
|
2395
|
+
}
|
|
2396
|
+
classes[`${size}:w-${currentValue}/12`] = true;
|
|
2388
2397
|
previousSize = size;
|
|
2389
2398
|
}
|
|
2390
2399
|
return classes;
|
|
2391
2400
|
}
|
|
2401
|
+
if (sizes === 12 || sizes === 'full') {
|
|
2402
|
+
return {
|
|
2403
|
+
'w-full': true,
|
|
2404
|
+
};
|
|
2405
|
+
}
|
|
2392
2406
|
// is a number.
|
|
2393
2407
|
return {
|
|
2394
2408
|
[`w-${sizes}/12`]: true,
|