@bcgov/nr-ngx-component-lib 0.0.57 → 0.0.59
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/components/schedule/schedule.component.d.ts +4 -0
- package/directives/row-list.base.d.ts +2 -0
- package/esm2022/components/resource-schedule/resource-schedule.component.mjs +3 -3
- package/esm2022/components/schedule/schedule.component.mjs +19 -9
- package/esm2022/components/tabs/tab-group/tab-group.component.mjs +1 -2
- package/esm2022/directives/pagination.base.mjs +2 -1
- package/esm2022/directives/row-list.base.mjs +60 -13
- package/esm2022/utils/row-list.util.mjs +26 -1
- package/fesm2022/bcgov-nr-ngx-component-lib.mjs +106 -24
- package/fesm2022/bcgov-nr-ngx-component-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/utils/row-list.util.d.ts +9 -0
|
@@ -11,6 +11,7 @@ export class RowListBase extends PaginationBase {
|
|
|
11
11
|
this.isLoadingChange = new EventEmitter();
|
|
12
12
|
this._isLoading = false;
|
|
13
13
|
this._rows = [];
|
|
14
|
+
this._inProgress = new InProgress();
|
|
14
15
|
}
|
|
15
16
|
get isLoading() { return this._isLoading; }
|
|
16
17
|
set isLoading(v) {
|
|
@@ -21,15 +22,47 @@ export class RowListBase extends PaginationBase {
|
|
|
21
22
|
}
|
|
22
23
|
get rows() { return this._rows; }
|
|
23
24
|
ngAfterViewInit() {
|
|
25
|
+
// console.log('RowListBase.ngAfterViewInit')
|
|
24
26
|
super.ngAfterViewInit();
|
|
25
27
|
this.refreshRowList();
|
|
26
28
|
}
|
|
27
29
|
refreshRowList() {
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
loadRowList() {
|
|
30
|
+
// console.warn('RowListBase.refreshRowList')
|
|
31
31
|
this.isLoading = true;
|
|
32
32
|
this.changeDetectorRef.detectChanges();
|
|
33
|
+
if (!this._inProgress.isCompleted)
|
|
34
|
+
this._inProgress.cancel();
|
|
35
|
+
let inProgress = this._inProgress = new InProgress();
|
|
36
|
+
return Promise.resolve()
|
|
37
|
+
.then(() => {
|
|
38
|
+
return this.loadRowList();
|
|
39
|
+
})
|
|
40
|
+
.then((res) => {
|
|
41
|
+
if (!res)
|
|
42
|
+
return;
|
|
43
|
+
if (inProgress.isCancelled)
|
|
44
|
+
return;
|
|
45
|
+
return this.parseRowList(res);
|
|
46
|
+
})
|
|
47
|
+
.then(res => {
|
|
48
|
+
if (inProgress.isCancelled)
|
|
49
|
+
return;
|
|
50
|
+
return this.completedRowListPage();
|
|
51
|
+
})
|
|
52
|
+
.catch((err) => {
|
|
53
|
+
if (err instanceof Aborted)
|
|
54
|
+
return;
|
|
55
|
+
this.loadRowListPageFailed(err);
|
|
56
|
+
})
|
|
57
|
+
.finally(() => {
|
|
58
|
+
if (inProgress.isCancelled)
|
|
59
|
+
return;
|
|
60
|
+
inProgress.complete();
|
|
61
|
+
this.isLoading = false;
|
|
62
|
+
this.changeDetectorRef.detectChanges();
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
loadRowList() {
|
|
33
66
|
if (this._loadRowListRequest)
|
|
34
67
|
this._loadRowListRequest.abort();
|
|
35
68
|
this._loadRowListRequest = new ObservableAborter(() => {
|
|
@@ -42,15 +75,6 @@ export class RowListBase extends PaginationBase {
|
|
|
42
75
|
.then(res => {
|
|
43
76
|
this._totalRowCount = this.parseTotalRowCount(res);
|
|
44
77
|
this._rows = this.parseRows(res);
|
|
45
|
-
})
|
|
46
|
-
.catch((e) => {
|
|
47
|
-
if (e instanceof Aborted)
|
|
48
|
-
return;
|
|
49
|
-
this.loadRowListPageFailed(e);
|
|
50
|
-
})
|
|
51
|
-
.finally(() => {
|
|
52
|
-
this.isLoading = false;
|
|
53
|
-
this.changeDetectorRef.detectChanges();
|
|
54
78
|
});
|
|
55
79
|
}
|
|
56
80
|
parseTotalRowCount(res) {
|
|
@@ -58,6 +82,7 @@ export class RowListBase extends PaginationBase {
|
|
|
58
82
|
return res['totalRowCount'];
|
|
59
83
|
throw 'Missing res.totalRowCount, might need to override RowListBase.parseTotalRowCount';
|
|
60
84
|
}
|
|
85
|
+
completedRowListPage() { }
|
|
61
86
|
loadRowListPageFailed(error) {
|
|
62
87
|
console.warn(error);
|
|
63
88
|
this._rows = [];
|
|
@@ -78,4 +103,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
78
103
|
}], propDecorators: { isLoadingChange: [{
|
|
79
104
|
type: Output
|
|
80
105
|
}] } });
|
|
81
|
-
|
|
106
|
+
class InProgress {
|
|
107
|
+
constructor() {
|
|
108
|
+
this._completed = false;
|
|
109
|
+
this._cancelled = false;
|
|
110
|
+
}
|
|
111
|
+
complete() {
|
|
112
|
+
if (this.isCancelled)
|
|
113
|
+
return;
|
|
114
|
+
this._completed = true;
|
|
115
|
+
}
|
|
116
|
+
cancel() {
|
|
117
|
+
if (this.isCompleted)
|
|
118
|
+
return;
|
|
119
|
+
this._cancelled = true;
|
|
120
|
+
}
|
|
121
|
+
get isCompleted() {
|
|
122
|
+
return this._completed;
|
|
123
|
+
}
|
|
124
|
+
get isCancelled() {
|
|
125
|
+
return this._cancelled;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm93LWxpc3QuYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25yLW5neC1jb21wb25lbnQtbGliL3NyYy9kaXJlY3RpdmVzL3Jvdy1saXN0LmJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixpQkFBaUIsRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFMUcsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QU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IFByb21pc2UucmVzb2x2ZSgpXG4gICAgICAgICAgICAudGhlbiggKCkgPT4geyBcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5sb2FkUm93TGlzdCgpIFxuICAgICAgICAgICAgfSApXG4gICAgICAgICAgICAudGhlbiggKCByZXMgKSA9PiB7IFxuICAgICAgICAgICAgICAgIGlmICggIXJlcyApIHJldHVyblxuICAgICAgICAgICAgICAgIGlmICggaW5Qcm9ncmVzcy5pc0NhbmNlbGxlZCApIHJldHVyblxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyc2VSb3dMaXN0KCByZXMgKSBcbiAgICAgICAgICAgIH0gKVxuICAgICAgICAgICAgLnRoZW4oIHJlcyA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCBpblByb2dyZXNzLmlzQ2FuY2VsbGVkICkgcmV0dXJuXG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGxldGVkUm93TGlzdFBhZ2UoKVxuICAgICAgICAgICAgfSApXG4gICAgICAgICAgICAuY2F0Y2goICggZXJyICkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICggZXJyIGluc3RhbmNlb2YgQWJvcnRlZCApIHJldHVyblxuXG4gICAgICAgICAgICAgICAgdGhpcy5sb2FkUm93TGlzdFBhZ2VGYWlsZWQoIGVyciApXG4gICAgICAgICAgICB9IClcbiAgICAgICAgICAgIC5maW5hbGx5KCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKCBpblByb2dyZXNzLmlzQ2FuY2VsbGVkICkgcmV0dXJuXG4gICAgICAgICAgICAgICAgaW5Qcm9ncmVzcy5jb21wbGV0ZSgpXG5cbiAgICAgICAgICAgICAgICB0aGlzLmlzTG9hZGluZyA9IGZhbHNlXG4gICAgICAgICAgICAgICAgdGhpcy5jaGFuZ2VEZXRlY3RvclJlZi5kZXRlY3RDaGFuZ2VzKClcbiAgICAgICAgICAgIH0gKVxuICAgIH1cbl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Y2VsbGVkKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fY2FuY2VsbGVkXG4gICAgfVxufVxuIl19
|
|
@@ -41,4 +41,29 @@ export class ObservableAborter {
|
|
|
41
41
|
return this._promise;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
export class ObservableAborterGroup {
|
|
45
|
+
constructor(delay = 500) {
|
|
46
|
+
this.delay = delay;
|
|
47
|
+
this._group = [];
|
|
48
|
+
this._aborted = false;
|
|
49
|
+
}
|
|
50
|
+
add(observable) {
|
|
51
|
+
if (this._aborted)
|
|
52
|
+
throw Error('already aborted');
|
|
53
|
+
let oa = new ObservableAborter(observable, this.delay);
|
|
54
|
+
this._group.push(oa);
|
|
55
|
+
return oa.promise;
|
|
56
|
+
}
|
|
57
|
+
abort() {
|
|
58
|
+
if (this._aborted)
|
|
59
|
+
return;
|
|
60
|
+
this._group.forEach(oa => {
|
|
61
|
+
oa.abort();
|
|
62
|
+
});
|
|
63
|
+
this._aborted = true;
|
|
64
|
+
}
|
|
65
|
+
get allCompleted() {
|
|
66
|
+
return Promise.all(this._group.map(oa => oa.promise.then(res => { }, err => { }))).then(res => { });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm93LWxpc3QudXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25yLW5neC1jb21wb25lbnQtbGliL3NyYy91dGlscy9yb3ctbGlzdC51dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxPQUFPO0lBQ2hCLFlBQW9CLE1BQWM7UUFBZCxXQUFNLEdBQU4sTUFBTSxDQUFRO0lBQUksQ0FBQztDQUMxQztBQUVELE1BQU0sT0FBTyxpQkFBaUI7SUFLMUIsWUFDWSxVQUErQixFQUMvQixRQU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G5leHQ6IHJlcyxcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6IHJlalxuICAgICAgICAgICAgICAgIH0gKVxuXG4gICAgICAgICAgICAgICAgdGhpcy5fYWJvcnQgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHN1Yi51bnN1YnNjcmliZSgpXG4gICAgICAgICAgICAgICAgICAgIHJlaiggbmV3IEFib3J0ZWQoICdhYm9ydGVkIHJlcXVlc3QnICkgKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9hYm9ydCA9IG51bGxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCB0aGlzLmRlbGF5KTtcblxuICAgICAgICAgICAgdGhpcy5fYWJvcnQgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KCB0aW1lciApXG4gICAgICAgICAgICAgICAgcmVqKCBuZXcgQWJvcnRlZCggJ2Fib3J0ZWQgdGltZXInICkgKSBcbiAgICAgICAgICAgICAgICB0aGlzLl9hYm9ydCA9IG51bGxcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSApXG4gICAgfVxuXG4gICAgYWJvcnQoKSB7XG4gICAgICAgIGlmICggdGhpcy5fYWJvcnRlZCApIHJldHVyblxuICAgICAgICB0aGlzLl9hYm9ydGVkID0gdHJ1ZVxuICAgICAgICBpZiAoICF0aGlzLl9hYm9ydCApIHJldHVyblxuICAgICAgICB0aGlzLl9hYm9ydCgpXG4gICAgfVxuXG4gICAgZ2V0IGFib3J0ZWQoKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiB0aGlzLl9hYm9ydGVkXG4gICAgfVxuXG4gICAgZ2V0IHByb21pc2UoKTogUHJvbWlzZTxUPiB7XG4gICAgICAgIHJldHVybiB0aGlzLl9wcm9taXNlXG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgT2JzZXJ2YWJsZUFib3J0ZXJHcm91cDxUPiB7XG4gICAgcHJpdmF0ZSBfZ3JvdXA6IE9ic2VydmFibGVBYm9ydGVyPFQ+W10gPSBbXVxuICAgIHByaXZhdGUgX2Fib3J0ZWQgPSBmYWxzZVxuXG4gICAgY29uc3RydWN0b3IoIHByaXZhdGUgZGVsYXkgPSA1MDAgKSB7fVxuXG4gICAgYWRkKCBvYnNlcnZhYmxlOiAoKSA9PiBPYnNlcnZhYmxlPFQ+ICk6IFByb21pc2U8VD4ge1xuICAgICAgICBpZiAoIHRoaXMuX2Fib3J0ZWQgKSB0aHJvdyBFcnJvciggJ2FscmVhZHkgYWJvcnRlZCcgKVxuXG4gICAgICAgIGxldCBvYSA9IG5ldyBPYnNlcnZhYmxlQWJvcnRlcjxUPiggb2JzZXJ2YWJsZSwgdGhpcy5kZWxheSApXG4gICAgICAgIHRoaXMuX2dyb3VwLnB1c2goIG9hIClcblxuICAgICAgICByZXR1cm4gb2EucHJvbWlzZVxuICAgIH1cblxuICAgIGFib3J0KCkge1xuICAgICAgICBpZiAoIHRoaXMuX2Fib3J0ZWQgKSByZXR1cm4gXG4gICAgICAgIHRoaXMuX2dyb3VwLmZvckVhY2goIG9hID0+IHtcbiAgICAgICAgICAgIG9hLmFib3J0KClcbiAgICAgICAgfSApXG4gICAgICAgIHRoaXMuX2Fib3J0ZWQgPSB0cnVlXG4gICAgfVxuXG4gICAgZ2V0IGFsbENvbXBsZXRlZCgpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKCB0aGlzLl9ncm91cC5tYXAoIG9hID0+IG9hLnByb21pc2UudGhlbiggcmVzID0+IHt9LCBlcnIgPT4ge30gKSApICkudGhlbiggcmVzID0+IHt9IClcbiAgICB9XG59XG4iXX0=
|
|
@@ -1322,6 +1322,31 @@ class ObservableAborter {
|
|
|
1322
1322
|
return this._promise;
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
+
class ObservableAborterGroup {
|
|
1326
|
+
constructor(delay = 500) {
|
|
1327
|
+
this.delay = delay;
|
|
1328
|
+
this._group = [];
|
|
1329
|
+
this._aborted = false;
|
|
1330
|
+
}
|
|
1331
|
+
add(observable) {
|
|
1332
|
+
if (this._aborted)
|
|
1333
|
+
throw Error('already aborted');
|
|
1334
|
+
let oa = new ObservableAborter(observable, this.delay);
|
|
1335
|
+
this._group.push(oa);
|
|
1336
|
+
return oa.promise;
|
|
1337
|
+
}
|
|
1338
|
+
abort() {
|
|
1339
|
+
if (this._aborted)
|
|
1340
|
+
return;
|
|
1341
|
+
this._group.forEach(oa => {
|
|
1342
|
+
oa.abort();
|
|
1343
|
+
});
|
|
1344
|
+
this._aborted = true;
|
|
1345
|
+
}
|
|
1346
|
+
get allCompleted() {
|
|
1347
|
+
return Promise.all(this._group.map(oa => oa.promise.then(res => { }, err => { }))).then(res => { });
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1325
1350
|
|
|
1326
1351
|
class PaginationBase extends NrclBase {
|
|
1327
1352
|
constructor() {
|
|
@@ -1348,6 +1373,7 @@ class PaginationBase extends NrclBase {
|
|
|
1348
1373
|
this._filter = this.clone(f);
|
|
1349
1374
|
}
|
|
1350
1375
|
ngAfterViewInit() {
|
|
1376
|
+
// console.log('PaginationBase.ngAfterViewInit')
|
|
1351
1377
|
this.loadPageState();
|
|
1352
1378
|
}
|
|
1353
1379
|
clone(obj) {
|
|
@@ -1415,6 +1441,7 @@ class RowListBase extends PaginationBase {
|
|
|
1415
1441
|
this.isLoadingChange = new EventEmitter();
|
|
1416
1442
|
this._isLoading = false;
|
|
1417
1443
|
this._rows = [];
|
|
1444
|
+
this._inProgress = new InProgress();
|
|
1418
1445
|
}
|
|
1419
1446
|
get isLoading() { return this._isLoading; }
|
|
1420
1447
|
set isLoading(v) {
|
|
@@ -1425,15 +1452,47 @@ class RowListBase extends PaginationBase {
|
|
|
1425
1452
|
}
|
|
1426
1453
|
get rows() { return this._rows; }
|
|
1427
1454
|
ngAfterViewInit() {
|
|
1455
|
+
// console.log('RowListBase.ngAfterViewInit')
|
|
1428
1456
|
super.ngAfterViewInit();
|
|
1429
1457
|
this.refreshRowList();
|
|
1430
1458
|
}
|
|
1431
1459
|
refreshRowList() {
|
|
1432
|
-
|
|
1433
|
-
}
|
|
1434
|
-
loadRowList() {
|
|
1460
|
+
// console.warn('RowListBase.refreshRowList')
|
|
1435
1461
|
this.isLoading = true;
|
|
1436
1462
|
this.changeDetectorRef.detectChanges();
|
|
1463
|
+
if (!this._inProgress.isCompleted)
|
|
1464
|
+
this._inProgress.cancel();
|
|
1465
|
+
let inProgress = this._inProgress = new InProgress();
|
|
1466
|
+
return Promise.resolve()
|
|
1467
|
+
.then(() => {
|
|
1468
|
+
return this.loadRowList();
|
|
1469
|
+
})
|
|
1470
|
+
.then((res) => {
|
|
1471
|
+
if (!res)
|
|
1472
|
+
return;
|
|
1473
|
+
if (inProgress.isCancelled)
|
|
1474
|
+
return;
|
|
1475
|
+
return this.parseRowList(res);
|
|
1476
|
+
})
|
|
1477
|
+
.then(res => {
|
|
1478
|
+
if (inProgress.isCancelled)
|
|
1479
|
+
return;
|
|
1480
|
+
return this.completedRowListPage();
|
|
1481
|
+
})
|
|
1482
|
+
.catch((err) => {
|
|
1483
|
+
if (err instanceof Aborted)
|
|
1484
|
+
return;
|
|
1485
|
+
this.loadRowListPageFailed(err);
|
|
1486
|
+
})
|
|
1487
|
+
.finally(() => {
|
|
1488
|
+
if (inProgress.isCancelled)
|
|
1489
|
+
return;
|
|
1490
|
+
inProgress.complete();
|
|
1491
|
+
this.isLoading = false;
|
|
1492
|
+
this.changeDetectorRef.detectChanges();
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
loadRowList() {
|
|
1437
1496
|
if (this._loadRowListRequest)
|
|
1438
1497
|
this._loadRowListRequest.abort();
|
|
1439
1498
|
this._loadRowListRequest = new ObservableAborter(() => {
|
|
@@ -1446,15 +1505,6 @@ class RowListBase extends PaginationBase {
|
|
|
1446
1505
|
.then(res => {
|
|
1447
1506
|
this._totalRowCount = this.parseTotalRowCount(res);
|
|
1448
1507
|
this._rows = this.parseRows(res);
|
|
1449
|
-
})
|
|
1450
|
-
.catch((e) => {
|
|
1451
|
-
if (e instanceof Aborted)
|
|
1452
|
-
return;
|
|
1453
|
-
this.loadRowListPageFailed(e);
|
|
1454
|
-
})
|
|
1455
|
-
.finally(() => {
|
|
1456
|
-
this.isLoading = false;
|
|
1457
|
-
this.changeDetectorRef.detectChanges();
|
|
1458
1508
|
});
|
|
1459
1509
|
}
|
|
1460
1510
|
parseTotalRowCount(res) {
|
|
@@ -1462,6 +1512,7 @@ class RowListBase extends PaginationBase {
|
|
|
1462
1512
|
return res['totalRowCount'];
|
|
1463
1513
|
throw 'Missing res.totalRowCount, might need to override RowListBase.parseTotalRowCount';
|
|
1464
1514
|
}
|
|
1515
|
+
completedRowListPage() { }
|
|
1465
1516
|
loadRowListPageFailed(error) {
|
|
1466
1517
|
console.warn(error);
|
|
1467
1518
|
this._rows = [];
|
|
@@ -1482,6 +1533,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1482
1533
|
}], propDecorators: { isLoadingChange: [{
|
|
1483
1534
|
type: Output
|
|
1484
1535
|
}] } });
|
|
1536
|
+
class InProgress {
|
|
1537
|
+
constructor() {
|
|
1538
|
+
this._completed = false;
|
|
1539
|
+
this._cancelled = false;
|
|
1540
|
+
}
|
|
1541
|
+
complete() {
|
|
1542
|
+
if (this.isCancelled)
|
|
1543
|
+
return;
|
|
1544
|
+
this._completed = true;
|
|
1545
|
+
}
|
|
1546
|
+
cancel() {
|
|
1547
|
+
if (this.isCompleted)
|
|
1548
|
+
return;
|
|
1549
|
+
this._cancelled = true;
|
|
1550
|
+
}
|
|
1551
|
+
get isCompleted() {
|
|
1552
|
+
return this._completed;
|
|
1553
|
+
}
|
|
1554
|
+
get isCancelled() {
|
|
1555
|
+
return this._cancelled;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1485
1558
|
|
|
1486
1559
|
class RowListDesktopComponent extends NrclBase {
|
|
1487
1560
|
constructor() {
|
|
@@ -2210,7 +2283,6 @@ class TabGroupComponent extends NrclBase {
|
|
|
2210
2283
|
this.isClassic = false;
|
|
2211
2284
|
}
|
|
2212
2285
|
ngOnChanges(changes) {
|
|
2213
|
-
console.log(changes);
|
|
2214
2286
|
this.updateState();
|
|
2215
2287
|
}
|
|
2216
2288
|
ngAfterViewInit() {
|
|
@@ -2331,12 +2403,16 @@ class ScheduleComponent extends RowListBase {
|
|
|
2331
2403
|
this._templates = [];
|
|
2332
2404
|
}
|
|
2333
2405
|
ngOnChanges(changes) {
|
|
2334
|
-
this.refreshRowList()
|
|
2406
|
+
// this.refreshRowList()
|
|
2335
2407
|
}
|
|
2336
2408
|
ngAfterViewInit() {
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2409
|
+
// console.log('ScheduleComponent.ngAfterViewInit')
|
|
2410
|
+
super.ngAfterViewInit();
|
|
2411
|
+
}
|
|
2412
|
+
loadRowList() {
|
|
2413
|
+
if (!this.provider?.startloadSchedule)
|
|
2414
|
+
throw Error('ScheduleComponent.provider.startloadSchedule not set');
|
|
2415
|
+
return this.provider.startloadSchedule(super.loadRowList);
|
|
2340
2416
|
}
|
|
2341
2417
|
fetchRowListPage() {
|
|
2342
2418
|
if (!this.provider?.fetchSchedule)
|
|
@@ -2350,17 +2426,23 @@ class ScheduleComponent extends RowListBase {
|
|
|
2350
2426
|
}
|
|
2351
2427
|
parseRows(res) {
|
|
2352
2428
|
if (!this.provider?.parseSchedule)
|
|
2353
|
-
throw Error('
|
|
2429
|
+
throw Error('ScheduleComponent.provider.parseSchedule not set');
|
|
2354
2430
|
let rows = this.provider.parseSchedule(res);
|
|
2355
2431
|
return this.makeRows(rows);
|
|
2356
2432
|
}
|
|
2357
2433
|
getInitialPageState() {
|
|
2358
2434
|
if (!this.provider?.getInitialPageState)
|
|
2359
|
-
throw Error('
|
|
2435
|
+
throw Error('ScheduleComponent.provider.getInitialPageState not set');
|
|
2360
2436
|
return this.provider.getInitialPageState();
|
|
2361
2437
|
}
|
|
2438
|
+
completedRowListPage() {
|
|
2439
|
+
if (!this.provider?.completedLoadSchedule)
|
|
2440
|
+
throw Error('ScheduleComponent.provider.completedRowListPage not set');
|
|
2441
|
+
return this.provider.completedLoadSchedule(super.completedRowListPage);
|
|
2442
|
+
}
|
|
2362
2443
|
onSamePageFilterChange(ev) {
|
|
2363
2444
|
this.filter = ev;
|
|
2445
|
+
this.refreshRowList();
|
|
2364
2446
|
}
|
|
2365
2447
|
makeRows(schedule) {
|
|
2366
2448
|
let start = moment(this.startDate);
|
|
@@ -2420,13 +2502,13 @@ class ScheduleComponent extends RowListBase {
|
|
|
2420
2502
|
}) || [];
|
|
2421
2503
|
}
|
|
2422
2504
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScheduleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2423
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScheduleComponent, selector: "nrcl-schedule", inputs: { provider: "provider", startDate: "startDate", weekStart: ["weekStart", "weekStart", numberAttribute], dayCount: ["dayCount", "dayCount", numberAttribute], menu: "menu" }, host: { properties: { "style.--nrcl-schedule-day-count": "this.dayCount" } }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ScheduleRowHeadingDirective, descendants: true }, { propertyName: "itemTemplates", predicate: ScheduleItemDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"schedule\">\n <div class=\"upper-left\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"row weeks\">\n @for ( week of _weeks; track $index ) {\n @if ( week.span == 1 ) {\n <div class=\"week\">\n {{ week.start }}\n </div>\n }\n @else {\n <div class=\"week\" [style.grid-column]=\"'span ' + week.span\">\n {{ week.start }} - {{ week.end }}\n </div>\n }\n }\n </div>\n\n <div class=\"row days\"> \n @for ( day of _days; track $index ) {\n <div class=\"day\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.first]=\"day.isFirst\"\n >\n <div class=\"day-name\">{{ day.dayName }}</div>\n <div class=\"date\">{{ day.monthDay }}</div>\n </div>\n }\n </div>\n\n @for ( row of rows | paginate: paginateState( 'nrcl-schedule' ); track row.id; let rowIndex = $index ) {\n <div class=\"row items\">\n <div class=\"outer heading\">\n <div class=\"inner heading\">\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate?.template\" \n [ngTemplateOutletContext]=\"{ $implicit: row.heading }\" \n ></ng-container>\n </div>\n </div> \n\n @if ( row.items | async; as rowItems ) {\n @for ( item of rowItems; track item.id; let colIndex = $index ) {\n <div class=\"outer item\"\n [class.menu-open]=\"itemMenu.menuOpen\"\n >\n <div class=\"inner item\" #itemMenu=\"matMenuTrigger\"\n [class]=\"'item-' + item.name\" \n matRipple\n [matMenuTriggerFor]=\"menu\"\n [matMenuTriggerData]=\"{ $implicit: { item: item, heading: row.heading } }\"\n [matTooltip]=\"item?.tooltip?.()\"\n matTooltipClass=\"nrcl-schedule-multiline\"\n [class.travel]=\"item?.travel\"\n >\n <ng-container \n [ngTemplateOutlet]=\"_templates[ rowIndex ][ colIndex ] || empty\" \n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n \n @let icons = item?.icons?.();\n @if ( icons && icons.length > 0 ) {\n <div class=\"icons\">\n @for ( icon of icons; track icon ) {\n <nrcl-icon small>{{ icon }}</nrcl-icon>\n } \n </div>\n }\n </div>\n </div>\n }\n }\n @else {\n @for ( day of _days; track day ) {\n <div class=\"item item-loading\"></div>\n }\n }\n </div>\n }\n</div>\n\n<nrcl-gap/>\n\n<nrcl-row-list-pagination\n paginationId=\"nrcl-schedule\"\n [pageSize]=\"pageSize\"\n [pageNumber]=\"pageNumber\"\n [rowCount]=\"totalRowCount\"\n (pageNumberChange)=\"onPageNumberChange( $event )\"\n (pageSizeChange)=\"onPageSizeChange( $event )\"\n></nrcl-row-list-pagination>\n\n<ng-template #empty>\n <div class=\"empty\">(empty)</div>\n</ng-template>\n", styles: ["::ng-deep :root{--nrcl-schedule-border-color: #c6c8cb;--nrcl-schedule-background-color: white;--nrcl-schedule-alternate-background-color: #f2f2f2;--nrcl-schedule-hover-background-color: #d7d7d7;--nrcl-schedule-row-weeks-height: 30px;--nrcl-schedule-row-weeks-font-size: 15px;--nrcl-schedule-row-weeks-font-weight: bold;--nrcl-schedule-row-weeks-foreground-color: black;--nrcl-schedule-row-days-height: 45px;--nrcl-schedule-row-days-font-size: 15px;--nrcl-schedule-row-days-font-weight: normal;--nrcl-schedule-row-days-foreground-color: black;--nrcl-schedule-row-days-weekend-background-color: #e0f8fc;--nrcl-schedule-row-days-today-background-color: #fcf8d9;--nrcl-schedule-row-schedule-height: 70px;--nrcl-schedule-heading-width: 300px;--nrcl-schedule-item-width: 100px}:host{display:flex;flex-direction:column;font-family:var(--nrcl-font-family);height:100%}:host .schedule{display:grid;grid-template-columns:var(--nrcl-schedule-heading-width) repeat(var(--nrcl-schedule-day-count),var(--nrcl-schedule-item-width));overflow:auto;height:100%;flex-grow:1}:host .schedule .upper-left{grid-row:1/span 2;grid-column:1;border-right:1px solid var(--nrcl-schedule-border-color);border-bottom:1px solid var(--nrcl-schedule-border-color);position:sticky;top:0;left:0;z-index:2;background:var(--nrcl-schedule-background-color)}:host .schedule .row{display:contents}:host .schedule .row.weeks>*{height:var(--nrcl-schedule-row-weeks-height)}:host .schedule .row.days>*{height:var(--nrcl-schedule-row-days-height)}:host .schedule .row .outer.heading,:host .schedule .row .day,:host .schedule .row .week{border-right:1px solid var(--nrcl-schedule-border-color);border-bottom:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .outer.heading{border-left:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .outer.item:last-child{border-right:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row:last-child .outer.item{border-bottom:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .week{border-top:1px solid var(--nrcl-schedule-border-color);display:flex;justify-content:center;align-items:center;font-size:var(--nrcl-schedule-row-weeks-font-size);font-weight:var(--nrcl-schedule-row-weeks-font-weight);color:var(--nrcl-schedule-row-weeks-foreground-color);position:sticky;top:0;background-color:var(--nrcl-schedule-background-color);z-index:1}:host .schedule .row .day{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:var(--nrcl-schedule-row-days-font-size);font-weight:var(--nrcl-schedule-row-days-font-weight);color:var(--nrcl-schedule-row-days-foreground-color);position:sticky;top:calc(var(--nrcl-schedule-row-weeks-height) + 2px);background-color:var(--nrcl-schedule-background-color);z-index:1}:host .schedule .row .day .day-name{font-size:13px}:host .schedule .row .day.weekend{background-color:var(--nrcl-schedule-row-days-weekend-background-color)}:host .schedule .row .day.today{background-color:var(--nrcl-schedule-row-days-today-background-color)}:host .schedule .row .day.first:after{content:\"\";position:absolute;top:0;left:0;bottom:0;border-left:2px solid black}:host .schedule .row.items .outer.item{padding:2px;box-sizing:border-box;height:var(--nrcl-schedule-row-schedule-height);display:flex;flex-direction:column;justify-content:stretch;align-items:stretch}:host .schedule .row.items .outer.item.menu-open,:host .schedule .row.items .outer.item:hover{background-color:#000;border-radius:6px}:host .schedule .row.items .outer.item .item{flex-grow:1;cursor:pointer;border-radius:4px;position:relative;padding:4px 4px 8px}:host .schedule .row.items .outer.item .item .icons{position:absolute;right:2px;bottom:2px;display:flex;flex-direction:column;gap:2px;background-color:#f1ebe4;border-radius:4px;padding:3px}:host .schedule .row.items .outer.item .item.travel{position:relative}:host .schedule .row.items .outer.item .item.travel:after{content:\"\";position:absolute;inset:0 0 2px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAABAQMAAAD+YPzoAAAABlBMVEX///8AAABVwtN+AAAAAnRSTlP/AOW3MEoAAAAMSURBVHicY+BwEgAAALAAW97nJhUAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:calc(100% - 8px) 3px;background-position:bottom}:host .schedule .row.items .outer.item .item.travel:hover:after{filter:brightness(0)}:host .schedule .row.items .outer.heading{box-sizing:border-box;cursor:default;position:sticky;left:0;z-index:1;height:var(--nrcl-schedule-row-schedule-height)}:host .schedule .row.items .outer.heading .heading{flex-grow:1;cursor:default;height:100%}:host .schedule .row:nth-child(odd) .outer{background-color:var(--nrcl-schedule-background-color)}:host .schedule .row:nth-child(2n) .outer{background-color:var(--nrcl-schedule-alternate-background-color)}:host .schedule .row:hover .outer{background-color:var(--nrcl-schedule-hover-background-color)}.empty{height:100%;display:flex;justify-content:center;align-items:center;color:#aaa}\n"], dependencies: [{ kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$7.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i1$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: GapComponent, selector: "nrcl-gap", inputs: ["horizontal", "vertical", "divider"] }, { kind: "component", type: RowListPaginationComponent, selector: "nrcl-row-list-pagination", inputs: ["paginationId", "pageSizeOptions", "pageSize", "pageNumber", "rowCount", "showPageSize", "noRowsMessage"], outputs: ["pageSizeChange", "pageNumberChange"] }, { kind: "component", type: IconComponent, selector: "nrcl-icon", inputs: ["small", "large"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$6.PaginatePipe, name: "paginate" }] }); }
|
|
2505
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ScheduleComponent, selector: "nrcl-schedule", inputs: { provider: "provider", startDate: "startDate", weekStart: ["weekStart", "weekStart", numberAttribute], dayCount: ["dayCount", "dayCount", numberAttribute], menu: "menu" }, host: { properties: { "style.--nrcl-schedule-day-count": "this.dayCount" } }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ScheduleRowHeadingDirective, descendants: true }, { propertyName: "itemTemplates", predicate: ScheduleItemDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if ( rows?.length > 0 ) {\n <div class=\"schedule\">\n <div class=\"upper-left\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"row weeks\">\n @for ( week of _weeks; track $index ) {\n @if ( week.span == 1 ) {\n <div class=\"week\">\n {{ week.start }}\n </div>\n }\n @else {\n <div class=\"week\" [style.grid-column]=\"'span ' + week.span\">\n {{ week.start }} - {{ week.end }}\n </div>\n }\n }\n </div>\n\n <div class=\"row days\"> \n @for ( day of _days; track $index ) {\n <div class=\"day\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.first]=\"day.isFirst\"\n >\n <div class=\"day-name\">{{ day.dayName }}</div>\n <div class=\"date\">{{ day.monthDay }}</div>\n </div>\n }\n </div>\n\n @for ( row of rows | paginate: paginateState( 'nrcl-schedule' ); track row.id; let rowIndex = $index ) {\n <div class=\"row items\">\n <div class=\"outer heading\">\n <div class=\"inner heading\">\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate?.template\" \n [ngTemplateOutletContext]=\"{ $implicit: row.heading }\" \n ></ng-container>\n </div>\n </div> \n\n @if ( row.items | async; as rowItems ) {\n @for ( item of rowItems; track item.id; let colIndex = $index ) {\n <div class=\"outer item\"\n [class.menu-open]=\"itemMenu.menuOpen\"\n >\n <div class=\"inner item\" #itemMenu=\"matMenuTrigger\"\n [class]=\"'item-' + item.name\" \n matRipple\n [matMenuTriggerFor]=\"menu\"\n [matMenuTriggerData]=\"{ $implicit: { item: item, heading: row.heading } }\"\n [matTooltip]=\"item?.tooltip?.()\"\n matTooltipClass=\"nrcl-schedule-multiline\"\n [class.travel]=\"item?.travel\"\n >\n <ng-container \n [ngTemplateOutlet]=\"_templates[ rowIndex ][ colIndex ] || empty\" \n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n \n @let icons = item?.icons?.();\n @if ( icons && icons.length > 0 ) {\n <div class=\"icons\">\n @for ( icon of icons; track icon ) {\n <nrcl-icon small>{{ icon }}</nrcl-icon>\n } \n </div>\n }\n </div>\n </div>\n }\n }\n @else {\n @for ( day of _days; track day ) {\n <div class=\"item item-loading\"></div>\n }\n }\n </div>\n }\n </div>\n\n <nrcl-gap/>\n}\n\n<nrcl-row-list-pagination\n paginationId=\"nrcl-schedule\"\n [pageSize]=\"pageSize\"\n [pageNumber]=\"pageNumber\"\n [rowCount]=\"totalRowCount\"\n (pageNumberChange)=\"onPageNumberChange( $event )\"\n (pageSizeChange)=\"onPageSizeChange( $event )\"\n></nrcl-row-list-pagination>\n\n<ng-template #empty>\n <div class=\"empty\">(empty)</div>\n</ng-template>\n", styles: ["::ng-deep :root{--nrcl-schedule-border-color: #c6c8cb;--nrcl-schedule-background-color: white;--nrcl-schedule-alternate-background-color: #f2f2f2;--nrcl-schedule-hover-background-color: #d7d7d7;--nrcl-schedule-row-weeks-height: 30px;--nrcl-schedule-row-weeks-font-size: 15px;--nrcl-schedule-row-weeks-font-weight: bold;--nrcl-schedule-row-weeks-foreground-color: black;--nrcl-schedule-row-days-height: 45px;--nrcl-schedule-row-days-font-size: 15px;--nrcl-schedule-row-days-font-weight: normal;--nrcl-schedule-row-days-foreground-color: black;--nrcl-schedule-row-days-weekend-background-color: #e0f8fc;--nrcl-schedule-row-days-today-background-color: #fcf8d9;--nrcl-schedule-row-schedule-height: 70px;--nrcl-schedule-heading-width: 300px;--nrcl-schedule-item-width: 80px}:host{display:flex;flex-direction:column;font-family:var(--nrcl-font-family)}:host .schedule{display:grid;grid-template-columns:var(--nrcl-schedule-heading-width) repeat(var(--nrcl-schedule-day-count),var(--nrcl-schedule-item-width));overflow:auto;height:100%;flex-grow:1}:host .schedule .upper-left{grid-row:1/span 2;grid-column:1;border-right:1px solid var(--nrcl-schedule-border-color);border-bottom:1px solid var(--nrcl-schedule-border-color);position:sticky;top:0;left:0;z-index:2;background:var(--nrcl-schedule-background-color)}:host .schedule .row{display:contents}:host .schedule .row.weeks>*{height:var(--nrcl-schedule-row-weeks-height)}:host .schedule .row.days>*{height:var(--nrcl-schedule-row-days-height)}:host .schedule .row .outer.heading,:host .schedule .row .day,:host .schedule .row .week{border-right:1px solid var(--nrcl-schedule-border-color);border-bottom:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .outer.heading{border-left:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .outer.item:last-child{border-right:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row:last-child .outer.item{border-bottom:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .week{border-top:1px solid var(--nrcl-schedule-border-color);display:flex;justify-content:center;align-items:center;font-size:var(--nrcl-schedule-row-weeks-font-size);font-weight:var(--nrcl-schedule-row-weeks-font-weight);color:var(--nrcl-schedule-row-weeks-foreground-color);position:sticky;top:0;background-color:var(--nrcl-schedule-background-color);z-index:1}:host .schedule .row .day{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:var(--nrcl-schedule-row-days-font-size);font-weight:var(--nrcl-schedule-row-days-font-weight);color:var(--nrcl-schedule-row-days-foreground-color);position:sticky;top:calc(var(--nrcl-schedule-row-weeks-height) + 2px);background-color:var(--nrcl-schedule-background-color);z-index:1}:host .schedule .row .day .day-name{font-size:13px}:host .schedule .row .day.weekend{background-color:var(--nrcl-schedule-row-days-weekend-background-color)}:host .schedule .row .day.today{background-color:var(--nrcl-schedule-row-days-today-background-color)}:host .schedule .row .day.first:after{content:\"\";position:absolute;top:0;left:0;bottom:0;border-left:2px solid black}:host .schedule .row.items .outer.item{padding:2px;box-sizing:border-box;height:var(--nrcl-schedule-row-schedule-height);display:flex;flex-direction:column;justify-content:stretch;align-items:stretch}:host .schedule .row.items .outer.item.menu-open,:host .schedule .row.items .outer.item:hover{background-color:#000;border-radius:6px}:host .schedule .row.items .outer.item .item{flex-grow:1;cursor:pointer;border-radius:4px;position:relative;padding:4px 4px 8px}:host .schedule .row.items .outer.item .item .icons{position:absolute;right:2px;bottom:2px;display:flex;flex-direction:column;gap:2px;background-color:#f1ebe4;border-radius:4px;padding:3px}:host .schedule .row.items .outer.item .item.travel{position:relative}:host .schedule .row.items .outer.item .item.travel:after{content:\"\";position:absolute;inset:0 0 2px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAABAQMAAAD+YPzoAAAABlBMVEX///8AAABVwtN+AAAAAnRSTlP/AOW3MEoAAAAMSURBVHicY+BwEgAAALAAW97nJhUAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:calc(100% - 8px) 3px;background-position:bottom}:host .schedule .row.items .outer.item .item.travel:hover:after{filter:brightness(0)}:host .schedule .row.items .outer.heading{box-sizing:border-box;cursor:default;position:sticky;left:0;z-index:1;height:var(--nrcl-schedule-row-schedule-height)}:host .schedule .row.items .outer.heading .heading{flex-grow:1;cursor:default;height:100%}:host .schedule .row:nth-child(odd) .outer{background-color:var(--nrcl-schedule-background-color)}:host .schedule .row:nth-child(2n) .outer{background-color:var(--nrcl-schedule-alternate-background-color)}:host .schedule .row:hover .outer{background-color:var(--nrcl-schedule-hover-background-color)}.empty{height:100%;display:flex;justify-content:center;align-items:center;color:#aaa}\n"], dependencies: [{ kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$7.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i1$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: GapComponent, selector: "nrcl-gap", inputs: ["horizontal", "vertical", "divider"] }, { kind: "component", type: RowListPaginationComponent, selector: "nrcl-row-list-pagination", inputs: ["paginationId", "pageSizeOptions", "pageSize", "pageNumber", "rowCount", "showPageSize", "noRowsMessage"], outputs: ["pageSizeChange", "pageNumberChange"] }, { kind: "component", type: IconComponent, selector: "nrcl-icon", inputs: ["small", "large"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$6.PaginatePipe, name: "paginate" }] }); }
|
|
2424
2506
|
}
|
|
2425
2507
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScheduleComponent, decorators: [{
|
|
2426
2508
|
type: Component,
|
|
2427
2509
|
args: [{ selector: 'nrcl-schedule', host: {
|
|
2428
2510
|
'[style.--nrcl-schedule-day-count]': 'this.dayCount'
|
|
2429
|
-
}, template: "<div class=\"schedule\">\n
|
|
2511
|
+
}, template: "@if ( rows?.length > 0 ) {\n <div class=\"schedule\">\n <div class=\"upper-left\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"row weeks\">\n @for ( week of _weeks; track $index ) {\n @if ( week.span == 1 ) {\n <div class=\"week\">\n {{ week.start }}\n </div>\n }\n @else {\n <div class=\"week\" [style.grid-column]=\"'span ' + week.span\">\n {{ week.start }} - {{ week.end }}\n </div>\n }\n }\n </div>\n\n <div class=\"row days\"> \n @for ( day of _days; track $index ) {\n <div class=\"day\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.first]=\"day.isFirst\"\n >\n <div class=\"day-name\">{{ day.dayName }}</div>\n <div class=\"date\">{{ day.monthDay }}</div>\n </div>\n }\n </div>\n\n @for ( row of rows | paginate: paginateState( 'nrcl-schedule' ); track row.id; let rowIndex = $index ) {\n <div class=\"row items\">\n <div class=\"outer heading\">\n <div class=\"inner heading\">\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate?.template\" \n [ngTemplateOutletContext]=\"{ $implicit: row.heading }\" \n ></ng-container>\n </div>\n </div> \n\n @if ( row.items | async; as rowItems ) {\n @for ( item of rowItems; track item.id; let colIndex = $index ) {\n <div class=\"outer item\"\n [class.menu-open]=\"itemMenu.menuOpen\"\n >\n <div class=\"inner item\" #itemMenu=\"matMenuTrigger\"\n [class]=\"'item-' + item.name\" \n matRipple\n [matMenuTriggerFor]=\"menu\"\n [matMenuTriggerData]=\"{ $implicit: { item: item, heading: row.heading } }\"\n [matTooltip]=\"item?.tooltip?.()\"\n matTooltipClass=\"nrcl-schedule-multiline\"\n [class.travel]=\"item?.travel\"\n >\n <ng-container \n [ngTemplateOutlet]=\"_templates[ rowIndex ][ colIndex ] || empty\" \n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n \n @let icons = item?.icons?.();\n @if ( icons && icons.length > 0 ) {\n <div class=\"icons\">\n @for ( icon of icons; track icon ) {\n <nrcl-icon small>{{ icon }}</nrcl-icon>\n } \n </div>\n }\n </div>\n </div>\n }\n }\n @else {\n @for ( day of _days; track day ) {\n <div class=\"item item-loading\"></div>\n }\n }\n </div>\n }\n </div>\n\n <nrcl-gap/>\n}\n\n<nrcl-row-list-pagination\n paginationId=\"nrcl-schedule\"\n [pageSize]=\"pageSize\"\n [pageNumber]=\"pageNumber\"\n [rowCount]=\"totalRowCount\"\n (pageNumberChange)=\"onPageNumberChange( $event )\"\n (pageSizeChange)=\"onPageSizeChange( $event )\"\n></nrcl-row-list-pagination>\n\n<ng-template #empty>\n <div class=\"empty\">(empty)</div>\n</ng-template>\n", styles: ["::ng-deep :root{--nrcl-schedule-border-color: #c6c8cb;--nrcl-schedule-background-color: white;--nrcl-schedule-alternate-background-color: #f2f2f2;--nrcl-schedule-hover-background-color: #d7d7d7;--nrcl-schedule-row-weeks-height: 30px;--nrcl-schedule-row-weeks-font-size: 15px;--nrcl-schedule-row-weeks-font-weight: bold;--nrcl-schedule-row-weeks-foreground-color: black;--nrcl-schedule-row-days-height: 45px;--nrcl-schedule-row-days-font-size: 15px;--nrcl-schedule-row-days-font-weight: normal;--nrcl-schedule-row-days-foreground-color: black;--nrcl-schedule-row-days-weekend-background-color: #e0f8fc;--nrcl-schedule-row-days-today-background-color: #fcf8d9;--nrcl-schedule-row-schedule-height: 70px;--nrcl-schedule-heading-width: 300px;--nrcl-schedule-item-width: 80px}:host{display:flex;flex-direction:column;font-family:var(--nrcl-font-family)}:host .schedule{display:grid;grid-template-columns:var(--nrcl-schedule-heading-width) repeat(var(--nrcl-schedule-day-count),var(--nrcl-schedule-item-width));overflow:auto;height:100%;flex-grow:1}:host .schedule .upper-left{grid-row:1/span 2;grid-column:1;border-right:1px solid var(--nrcl-schedule-border-color);border-bottom:1px solid var(--nrcl-schedule-border-color);position:sticky;top:0;left:0;z-index:2;background:var(--nrcl-schedule-background-color)}:host .schedule .row{display:contents}:host .schedule .row.weeks>*{height:var(--nrcl-schedule-row-weeks-height)}:host .schedule .row.days>*{height:var(--nrcl-schedule-row-days-height)}:host .schedule .row .outer.heading,:host .schedule .row .day,:host .schedule .row .week{border-right:1px solid var(--nrcl-schedule-border-color);border-bottom:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .outer.heading{border-left:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .outer.item:last-child{border-right:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row:last-child .outer.item{border-bottom:1px solid var(--nrcl-schedule-border-color)}:host .schedule .row .week{border-top:1px solid var(--nrcl-schedule-border-color);display:flex;justify-content:center;align-items:center;font-size:var(--nrcl-schedule-row-weeks-font-size);font-weight:var(--nrcl-schedule-row-weeks-font-weight);color:var(--nrcl-schedule-row-weeks-foreground-color);position:sticky;top:0;background-color:var(--nrcl-schedule-background-color);z-index:1}:host .schedule .row .day{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:var(--nrcl-schedule-row-days-font-size);font-weight:var(--nrcl-schedule-row-days-font-weight);color:var(--nrcl-schedule-row-days-foreground-color);position:sticky;top:calc(var(--nrcl-schedule-row-weeks-height) + 2px);background-color:var(--nrcl-schedule-background-color);z-index:1}:host .schedule .row .day .day-name{font-size:13px}:host .schedule .row .day.weekend{background-color:var(--nrcl-schedule-row-days-weekend-background-color)}:host .schedule .row .day.today{background-color:var(--nrcl-schedule-row-days-today-background-color)}:host .schedule .row .day.first:after{content:\"\";position:absolute;top:0;left:0;bottom:0;border-left:2px solid black}:host .schedule .row.items .outer.item{padding:2px;box-sizing:border-box;height:var(--nrcl-schedule-row-schedule-height);display:flex;flex-direction:column;justify-content:stretch;align-items:stretch}:host .schedule .row.items .outer.item.menu-open,:host .schedule .row.items .outer.item:hover{background-color:#000;border-radius:6px}:host .schedule .row.items .outer.item .item{flex-grow:1;cursor:pointer;border-radius:4px;position:relative;padding:4px 4px 8px}:host .schedule .row.items .outer.item .item .icons{position:absolute;right:2px;bottom:2px;display:flex;flex-direction:column;gap:2px;background-color:#f1ebe4;border-radius:4px;padding:3px}:host .schedule .row.items .outer.item .item.travel{position:relative}:host .schedule .row.items .outer.item .item.travel:after{content:\"\";position:absolute;inset:0 0 2px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAABAQMAAAD+YPzoAAAABlBMVEX///8AAABVwtN+AAAAAnRSTlP/AOW3MEoAAAAMSURBVHicY+BwEgAAALAAW97nJhUAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:calc(100% - 8px) 3px;background-position:bottom}:host .schedule .row.items .outer.item .item.travel:hover:after{filter:brightness(0)}:host .schedule .row.items .outer.heading{box-sizing:border-box;cursor:default;position:sticky;left:0;z-index:1;height:var(--nrcl-schedule-row-schedule-height)}:host .schedule .row.items .outer.heading .heading{flex-grow:1;cursor:default;height:100%}:host .schedule .row:nth-child(odd) .outer{background-color:var(--nrcl-schedule-background-color)}:host .schedule .row:nth-child(2n) .outer{background-color:var(--nrcl-schedule-alternate-background-color)}:host .schedule .row:hover .outer{background-color:var(--nrcl-schedule-hover-background-color)}.empty{height:100%;display:flex;justify-content:center;align-items:center;color:#aaa}\n"] }]
|
|
2430
2512
|
}], propDecorators: { provider: [{
|
|
2431
2513
|
type: Input
|
|
2432
2514
|
}], startDate: [{
|
|
@@ -2465,11 +2547,11 @@ class ResourceScheduleComponent {
|
|
|
2465
2547
|
this.weekStart = 0;
|
|
2466
2548
|
}
|
|
2467
2549
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResourceScheduleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2468
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.14", type: ResourceScheduleComponent, selector: "nrcl-resource-schedule", inputs: { provider: "provider", startDate: "startDate", weekStart: "weekStart", dayCount: ["dayCount", "dayCount", numberAttribute], menu: "menu" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ResourceScheduleRowHeadingDirective, descendants: true }], viewQueries: [{ propertyName: "scheduleComponent", first: true, predicate: ScheduleComponent, descendants: true }], ngImport: i0, template: "<nrcl-schedule #schedule\n [provider]=\"provider\"\n [startDate]=\"startDate\"\n [weekStart]=\"weekStart\"\n [dayCount]=\"dayCount\"\n [menu]=\"menu\"\n>\n <ng-content></ng-content>\n\n <ng-template nrclScheduleRowHeading let-item>\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" \n ></ng-container>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"rostered\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"out-of-service\" let-data>\n <h1>
|
|
2550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.14", type: ResourceScheduleComponent, selector: "nrcl-resource-schedule", inputs: { provider: "provider", startDate: "startDate", weekStart: "weekStart", dayCount: ["dayCount", "dayCount", numberAttribute], menu: "menu" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ResourceScheduleRowHeadingDirective, descendants: true }], viewQueries: [{ propertyName: "scheduleComponent", first: true, predicate: ScheduleComponent, descendants: true }], ngImport: i0, template: "<nrcl-schedule #schedule\n [provider]=\"provider\"\n [startDate]=\"startDate\"\n [weekStart]=\"weekStart\"\n [dayCount]=\"dayCount\"\n [menu]=\"menu\"\n>\n <ng-content></ng-content>\n\n <ng-template nrclScheduleRowHeading let-item>\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" \n ></ng-container>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"rostered\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"out-of-service\" let-data>\n <h1>OOS</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-duty-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Duty Day</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-standby-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>STBY</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-off-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Day Off</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-regular-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Reg Day</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-duty-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Duty Day</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-standby-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>STBY</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-off-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Day Off</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-regular-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Reg Day</h3> -->\n </ng-template>\n</nrcl-schedule>\n\n", styles: ["::ng-deep :root{--nrcl-resource-schedule-item-foregroud-color: black;--nrcl-resource-schedule-item-text-shadow: 1px 0px 5px #ffffffa0, -1px 0px 5px #ffffffa0, 0px 1px 5px #ffffffa0, 0px -1px 5px #ffffffa0;--nrcl-resource-schedule-item-regular-day-background-color: #0AA647;--nrcl-resource-schedule-item-off-day-background-color: #d4d2d2;--nrcl-resource-schedule-item-duty-day-background-color: #2f9fe0;--nrcl-resource-schedule-item-standby-day-background-color: #f6cf43;--nrcl-resource-schedule-item-out-of-service-background-color: #f55353;--nrcl-resource-schedule-item-rostered-background-color: #ba9ef7}:host{height:100%;display:block}.nrcl-schedule ::ng-deep .inner.item{display:flex;flex-direction:column;justify-content:stretch;align-items:stretch;color:var(--nrcl-resource-schedule-item-foregroud-color)}.nrcl-schedule ::ng-deep .inner.item h1,.nrcl-schedule ::ng-deep .inner.item h2,.nrcl-schedule ::ng-deep .inner.item h3{padding:0;margin:0;font-weight:200}.nrcl-schedule ::ng-deep .inner.item h1{font-size:15px;line-height:15px;text-align:center}.nrcl-schedule ::ng-deep .inner.item h2{flex-grow:1;font-size:12px;line-height:13px;text-align:center;display:flex;justify-content:center;align-items:center}.nrcl-schedule ::ng-deep .inner.item h2.wrap{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;min-height:0;overflow:hidden}.nrcl-schedule ::ng-deep .inner.item h3{font-size:14px;line-height:14px;text-align:center}.nrcl-schedule ::ng-deep .inner.item.item-out-of-service{background-color:var(--nrcl-resource-schedule-item-out-of-service-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-rostered{background-color:var(--nrcl-resource-schedule-item-rostered-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-duty-day{background-color:var(--nrcl-resource-schedule-item-duty-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-standby-day{background-color:var(--nrcl-resource-schedule-item-standby-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-off-day{background-color:var(--nrcl-resource-schedule-item-off-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-regular-day{background-color:var(--nrcl-resource-schedule-item-regular-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-duty-day{background-color:var(--nrcl-resource-schedule-item-duty-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-standby-day{background-color:var(--nrcl-resource-schedule-item-standby-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-off-day{background-color:var(--nrcl-resource-schedule-item-off-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-regular-day{background-color:var(--nrcl-resource-schedule-item-regular-day-background-color)}\n"], dependencies: [{ kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScheduleComponent, selector: "nrcl-schedule", inputs: ["provider", "startDate", "weekStart", "dayCount", "menu"] }, { kind: "directive", type: ScheduleItemDirective, selector: "[nrclScheduleItem]", inputs: ["nrclScheduleItem"] }, { kind: "directive", type: ScheduleRowHeadingDirective, selector: "[nrclScheduleRowHeading]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2469
2551
|
}
|
|
2470
2552
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResourceScheduleComponent, decorators: [{
|
|
2471
2553
|
type: Component,
|
|
2472
|
-
args: [{ selector: "nrcl-resource-schedule", changeDetection: ChangeDetectionStrategy.OnPush, template: "<nrcl-schedule #schedule\n [provider]=\"provider\"\n [startDate]=\"startDate\"\n [weekStart]=\"weekStart\"\n [dayCount]=\"dayCount\"\n [menu]=\"menu\"\n>\n <ng-content></ng-content>\n\n <ng-template nrclScheduleRowHeading let-item>\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" \n ></ng-container>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"rostered\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"out-of-service\" let-data>\n <h1>
|
|
2554
|
+
args: [{ selector: "nrcl-resource-schedule", changeDetection: ChangeDetectionStrategy.OnPush, template: "<nrcl-schedule #schedule\n [provider]=\"provider\"\n [startDate]=\"startDate\"\n [weekStart]=\"weekStart\"\n [dayCount]=\"dayCount\"\n [menu]=\"menu\"\n>\n <ng-content></ng-content>\n\n <ng-template nrclScheduleRowHeading let-item>\n <ng-container \n [ngTemplateOutlet]=\"headerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\" \n ></ng-container>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"rostered\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"out-of-service\" let-data>\n <h1>OOS</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-duty-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Duty Day</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-standby-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>STBY</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-off-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Day Off</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"available-regular-day\" let-data>\n <h1>Available</h1>\n <h2>{{ data.allocationType }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Reg Day</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-duty-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Duty Day</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-standby-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>STBY</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-off-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Day Off</h3> -->\n </ng-template>\n\n <ng-template nrclScheduleItem=\"assigned-regular-day\" let-data>\n <!-- <h1></h1> -->\n <h2 class=\"wrap\">{{ data.assignmentName }}</h2>\n <h3>{{ data.shiftType }}</h3>\n <!-- <h3>Reg Day</h3> -->\n </ng-template>\n</nrcl-schedule>\n\n", styles: ["::ng-deep :root{--nrcl-resource-schedule-item-foregroud-color: black;--nrcl-resource-schedule-item-text-shadow: 1px 0px 5px #ffffffa0, -1px 0px 5px #ffffffa0, 0px 1px 5px #ffffffa0, 0px -1px 5px #ffffffa0;--nrcl-resource-schedule-item-regular-day-background-color: #0AA647;--nrcl-resource-schedule-item-off-day-background-color: #d4d2d2;--nrcl-resource-schedule-item-duty-day-background-color: #2f9fe0;--nrcl-resource-schedule-item-standby-day-background-color: #f6cf43;--nrcl-resource-schedule-item-out-of-service-background-color: #f55353;--nrcl-resource-schedule-item-rostered-background-color: #ba9ef7}:host{height:100%;display:block}.nrcl-schedule ::ng-deep .inner.item{display:flex;flex-direction:column;justify-content:stretch;align-items:stretch;color:var(--nrcl-resource-schedule-item-foregroud-color)}.nrcl-schedule ::ng-deep .inner.item h1,.nrcl-schedule ::ng-deep .inner.item h2,.nrcl-schedule ::ng-deep .inner.item h3{padding:0;margin:0;font-weight:200}.nrcl-schedule ::ng-deep .inner.item h1{font-size:15px;line-height:15px;text-align:center}.nrcl-schedule ::ng-deep .inner.item h2{flex-grow:1;font-size:12px;line-height:13px;text-align:center;display:flex;justify-content:center;align-items:center}.nrcl-schedule ::ng-deep .inner.item h2.wrap{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;min-height:0;overflow:hidden}.nrcl-schedule ::ng-deep .inner.item h3{font-size:14px;line-height:14px;text-align:center}.nrcl-schedule ::ng-deep .inner.item.item-out-of-service{background-color:var(--nrcl-resource-schedule-item-out-of-service-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-rostered{background-color:var(--nrcl-resource-schedule-item-rostered-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-duty-day{background-color:var(--nrcl-resource-schedule-item-duty-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-standby-day{background-color:var(--nrcl-resource-schedule-item-standby-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-off-day{background-color:var(--nrcl-resource-schedule-item-off-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-available-regular-day{background-color:var(--nrcl-resource-schedule-item-regular-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-duty-day{background-color:var(--nrcl-resource-schedule-item-duty-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-standby-day{background-color:var(--nrcl-resource-schedule-item-standby-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-off-day{background-color:var(--nrcl-resource-schedule-item-off-day-background-color)}.nrcl-schedule ::ng-deep .inner.item.item-assigned-regular-day{background-color:var(--nrcl-resource-schedule-item-regular-day-background-color)}\n"] }]
|
|
2473
2555
|
}], propDecorators: { provider: [{
|
|
2474
2556
|
type: Input
|
|
2475
2557
|
}], startDate: [{
|
|
@@ -2894,5 +2976,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2894
2976
|
* Generated bundle index. Do not edit.
|
|
2895
2977
|
*/
|
|
2896
2978
|
|
|
2897
|
-
export { Aborted, ButtonComponent, CellContentComponent, CodeTable, ConfigurationService, ConfigurationSubscriberBase, DATE_FORMATS, DesktopViewDirective, DeviceViewComponent, DialogBase, DialogComponent, DialogConfirmComponent, DialogService, ExpansionPanelComponent, ExpansionPanelFooterComponent, ExpansionPanelHeaderComponent, ExpansionPanelSectionComponent, FilterContainerComponent, FilterDateComponent, FilterSearchComponent, FilterSelectComponent, FiltersPanelComponent, FormFieldComponent, FormLayoutComponent, GapComponent, IconComponent, IndicatorComponent, IndicatorSelectComponent, ListAttachmentsComponent, ListEventHistoryComponent, ListSelectComponent, LoadingStatusComponent, MobileViewDirective, NrNgxComponentLibModule, NrclBase, ObservableAborter, PageContainerComponent, PageHeaderComponent, PageStateService, PaginationBase, ResourceScheduleComponent, ResourceScheduleRowHeadingDirective, RowListBase, RowListDesktopComponent, RowListMobileComponent, RowListPaginationComponent, RowListSortingComponent, ScheduleComponent, ScheduleItemDirective, ScheduleRowHeadingDirective, SnackbarComponent, SnackbarUtilService, TabComponent, TabContentDirective, TabGroupComponent, TabLabelDirective, TagListComponent, mapToCodeDescription, unwrapFilterValue, wrapFilterValue };
|
|
2979
|
+
export { Aborted, ButtonComponent, CellContentComponent, CodeTable, ConfigurationService, ConfigurationSubscriberBase, DATE_FORMATS, DesktopViewDirective, DeviceViewComponent, DialogBase, DialogComponent, DialogConfirmComponent, DialogService, ExpansionPanelComponent, ExpansionPanelFooterComponent, ExpansionPanelHeaderComponent, ExpansionPanelSectionComponent, FilterContainerComponent, FilterDateComponent, FilterSearchComponent, FilterSelectComponent, FiltersPanelComponent, FormFieldComponent, FormLayoutComponent, GapComponent, IconComponent, IndicatorComponent, IndicatorSelectComponent, ListAttachmentsComponent, ListEventHistoryComponent, ListSelectComponent, LoadingStatusComponent, MobileViewDirective, NrNgxComponentLibModule, NrclBase, ObservableAborter, ObservableAborterGroup, PageContainerComponent, PageHeaderComponent, PageStateService, PaginationBase, ResourceScheduleComponent, ResourceScheduleRowHeadingDirective, RowListBase, RowListDesktopComponent, RowListMobileComponent, RowListPaginationComponent, RowListSortingComponent, ScheduleComponent, ScheduleItemDirective, ScheduleRowHeadingDirective, SnackbarComponent, SnackbarUtilService, TabComponent, TabContentDirective, TabGroupComponent, TabLabelDirective, TagListComponent, mapToCodeDescription, unwrapFilterValue, wrapFilterValue };
|
|
2898
2980
|
//# sourceMappingURL=bcgov-nr-ngx-component-lib.mjs.map
|