novo-elements 5.6.0 → 5.9.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.
- package/bundles/novo-elements.umd.js +312 -218
- package/bundles/novo-elements.umd.js.map +1 -1
- package/bundles/novo-elements.umd.min.js +2 -2
- package/bundles/novo-elements.umd.min.js.map +1 -1
- package/elements/chips/Chips.scss +6 -0
- package/elements/data-table/cell-headers/data-table-checkbox-header-cell.component.d.ts +5 -1
- package/elements/data-table/cells/data-table-checkbox-cell.component.d.ts +3 -0
- package/elements/data-table/data-table-clear-button.component.d.ts +2 -0
- package/elements/data-table/data-table.component.d.ts +3 -1
- package/elements/data-table/data-table.component.scss +3 -0
- package/elements/data-table/interfaces.d.ts +3 -0
- package/elements/data-table/state/data-table-state.service.d.ts +6 -2
- package/elements/form/FormInterfaces.d.ts +1 -0
- package/elements/picker/extras/entity-picker-results/EntityPickerResults.d.ts +1 -0
- package/esm2015/elements/data-table/cell-headers/data-table-checkbox-header-cell.component.js +26 -6
- package/esm2015/elements/data-table/cells/data-table-checkbox-cell.component.js +16 -5
- package/esm2015/elements/data-table/data-table-clear-button.component.js +9 -1
- package/esm2015/elements/data-table/data-table.component.js +8 -3
- package/esm2015/elements/data-table/data-table.source.js +5 -2
- package/esm2015/elements/data-table/interfaces.js +1 -1
- package/esm2015/elements/data-table/pagination/data-table-pagination.component.js +4 -1
- package/esm2015/elements/data-table/sort-filter/sort-filter.directive.js +3 -1
- package/esm2015/elements/data-table/state/data-table-state.service.js +31 -7
- package/esm2015/elements/expansion/expansion-panel.js +1 -1
- package/esm2015/elements/form/FormInterfaces.js +1 -1
- package/esm2015/elements/picker/extras/entity-picker-results/EntityPickerResults.js +31 -1
- package/esm2015/index.js +1 -1
- package/esm2015/services/novo-label-service.js +2 -1
- package/esm2015/utils/app-bridge/AppBridge.js +1 -1
- package/esm2015/utils/form-utils/FormUtils.js +3 -2
- package/fesm2015/novo-elements.js +323 -216
- package/fesm2015/novo-elements.js.map +1 -1
- package/index.d.ts +1 -1
- package/novo-elements.metadata.json +1 -1
- package/package.json +1 -1
- package/services/novo-label-service.d.ts +1 -0
- package/styles/global/variables.scss +4 -1
- package/utils/app-bridge/AppBridge.d.ts +1 -1
|
@@ -2971,6 +2971,7 @@ class NovoLabelService {
|
|
|
2971
2971
|
this.clearAllNormalCase = 'Clear All';
|
|
2972
2972
|
this.clearSort = 'Clear Sort';
|
|
2973
2973
|
this.clearFilter = 'Clear Filter';
|
|
2974
|
+
this.clearSelected = 'Clear Selected';
|
|
2974
2975
|
this.today = 'Today';
|
|
2975
2976
|
this.now = 'Now';
|
|
2976
2977
|
this.isRequired = 'is required';
|
|
@@ -5747,6 +5748,8 @@ class EntityPickerResult {
|
|
|
5747
5748
|
return 'user';
|
|
5748
5749
|
case 'CorporationDepartment':
|
|
5749
5750
|
return 'department';
|
|
5751
|
+
case 'JobShift':
|
|
5752
|
+
return 'timetable contract';
|
|
5750
5753
|
default:
|
|
5751
5754
|
return '';
|
|
5752
5755
|
}
|
|
@@ -5760,6 +5763,14 @@ class EntityPickerResult {
|
|
|
5760
5763
|
}
|
|
5761
5764
|
return timestamp;
|
|
5762
5765
|
}
|
|
5766
|
+
renderTimeNoOffset(dateStr) {
|
|
5767
|
+
let timestamp = '';
|
|
5768
|
+
if (dateStr) {
|
|
5769
|
+
dateStr = dateStr.slice(0, 19);
|
|
5770
|
+
timestamp = this.labels.formatTime(dateStr);
|
|
5771
|
+
}
|
|
5772
|
+
return timestamp;
|
|
5773
|
+
}
|
|
5763
5774
|
getNameForResult(result) {
|
|
5764
5775
|
if (result) {
|
|
5765
5776
|
switch (result.searchEntity) {
|
|
@@ -5828,6 +5839,26 @@ EntityPickerResult.decorators = [
|
|
|
5828
5839
|
<i class="bhi-calendar"></i>
|
|
5829
5840
|
<span [innerHtml]="renderTimestamp(match.data.dateBegin) + ' - ' + renderTimestamp(match.data.dateEnd)"></span>
|
|
5830
5841
|
</p>
|
|
5842
|
+
<!-- START Date -->
|
|
5843
|
+
<p class="start-date" *ngIf="match.data.startTime && match.data.searchEntity === 'JobShift'">
|
|
5844
|
+
<i class="bhi-calendar"></i>
|
|
5845
|
+
<span [innerHtml]="renderTimestamp(match.data.startTime)"></span>
|
|
5846
|
+
</p>
|
|
5847
|
+
<!-- START & END TIME -->
|
|
5848
|
+
<p class="start-time" *ngIf="match.data.startTime && match.data.searchEntity === 'JobShift'">
|
|
5849
|
+
<i class="bhi-clock"></i>
|
|
5850
|
+
<span [innerHtml]="renderTimeNoOffset(match.data.startTime) + ' - ' + renderTimeNoOffset(match.data.endTime)"></span>
|
|
5851
|
+
</p>
|
|
5852
|
+
<!-- JOBORDER -->
|
|
5853
|
+
<p class="job" *ngIf="match.data.jobOrder && match.data.searchEntity === 'JobShift'">
|
|
5854
|
+
<i class="bhi-job"></i>
|
|
5855
|
+
<span [innerHtml]="highlight(match.data.jobOrder.title, term)"></span>
|
|
5856
|
+
</p>
|
|
5857
|
+
<!-- OPENINGS -->
|
|
5858
|
+
<p class="openings" *ngIf="match.data.openings && match.data.searchEntity === 'JobShift'">
|
|
5859
|
+
<i class="bhi-candidate"></i>
|
|
5860
|
+
<span>{{ match.data.numAssigned }} / {{ match.data.openings }}</span>
|
|
5861
|
+
</p>
|
|
5831
5862
|
<!-- EMAIL -->
|
|
5832
5863
|
<p class="email" *ngIf="match.data.email">
|
|
5833
5864
|
<i class="bhi-email"></i> <span [innerHtml]="highlight(match.data.email, term)"></span>
|
|
@@ -7169,6 +7200,7 @@ class DataTableState {
|
|
|
7169
7200
|
this.expandedRows = new Set();
|
|
7170
7201
|
this.isForceRefresh = false;
|
|
7171
7202
|
this.updates = new EventEmitter();
|
|
7203
|
+
this.retainSelected = false;
|
|
7172
7204
|
}
|
|
7173
7205
|
get userFiltered() {
|
|
7174
7206
|
return !!(this.filter || this.sort || this.globalSearch || this.outsideFilter);
|
|
@@ -7186,9 +7218,12 @@ class DataTableState {
|
|
|
7186
7218
|
this.filter = undefined;
|
|
7187
7219
|
}
|
|
7188
7220
|
this.page = 0;
|
|
7189
|
-
this.
|
|
7190
|
-
|
|
7221
|
+
if (!this.retainSelected) {
|
|
7222
|
+
this.selectedRows.clear();
|
|
7223
|
+
this.resetSource.next();
|
|
7224
|
+
}
|
|
7191
7225
|
this.onSortFilterChange();
|
|
7226
|
+
this.retainSelected = false;
|
|
7192
7227
|
if (fireUpdate) {
|
|
7193
7228
|
this.updates.emit({
|
|
7194
7229
|
sort: this.sort,
|
|
@@ -7200,8 +7235,8 @@ class DataTableState {
|
|
|
7200
7235
|
clearSort(fireUpdate = true) {
|
|
7201
7236
|
this.sort = undefined;
|
|
7202
7237
|
this.page = 0;
|
|
7203
|
-
this.
|
|
7204
|
-
this.
|
|
7238
|
+
this.checkRetainment('sort');
|
|
7239
|
+
this.reset(fireUpdate, true);
|
|
7205
7240
|
this.onSortFilterChange();
|
|
7206
7241
|
if (fireUpdate) {
|
|
7207
7242
|
this.updates.emit({
|
|
@@ -7215,8 +7250,8 @@ class DataTableState {
|
|
|
7215
7250
|
this.filter = undefined;
|
|
7216
7251
|
this.globalSearch = undefined;
|
|
7217
7252
|
this.page = 0;
|
|
7218
|
-
this.
|
|
7219
|
-
this.
|
|
7253
|
+
this.checkRetainment('filter');
|
|
7254
|
+
this.reset(fireUpdate, true);
|
|
7220
7255
|
this.onSortFilterChange();
|
|
7221
7256
|
if (fireUpdate) {
|
|
7222
7257
|
this.updates.emit({
|
|
@@ -7226,6 +7261,19 @@ class DataTableState {
|
|
|
7226
7261
|
});
|
|
7227
7262
|
}
|
|
7228
7263
|
}
|
|
7264
|
+
clearSelected(fireUpdate = true) {
|
|
7265
|
+
this.globalSearch = undefined;
|
|
7266
|
+
this.page = 0;
|
|
7267
|
+
this.reset(fireUpdate, true);
|
|
7268
|
+
this.onSelectionChange();
|
|
7269
|
+
if (fireUpdate) {
|
|
7270
|
+
this.updates.emit({
|
|
7271
|
+
sort: this.sort,
|
|
7272
|
+
filter: this.filter,
|
|
7273
|
+
globalSearch: this.globalSearch,
|
|
7274
|
+
});
|
|
7275
|
+
}
|
|
7276
|
+
}
|
|
7229
7277
|
onSelectionChange() {
|
|
7230
7278
|
this.selectionSource.next();
|
|
7231
7279
|
}
|
|
@@ -7233,9 +7281,12 @@ class DataTableState {
|
|
|
7233
7281
|
this.expandSource.next(targetId);
|
|
7234
7282
|
}
|
|
7235
7283
|
onPaginationChange(isPageSizeChange, pageSize) {
|
|
7284
|
+
this.checkRetainment('page');
|
|
7236
7285
|
this.paginationSource.next({ isPageSizeChange, pageSize });
|
|
7237
7286
|
}
|
|
7238
7287
|
onSortFilterChange() {
|
|
7288
|
+
this.checkRetainment('sort');
|
|
7289
|
+
this.checkRetainment('filter');
|
|
7239
7290
|
this.sortFilterSource.next({
|
|
7240
7291
|
sort: this.sort,
|
|
7241
7292
|
filter: this.filter,
|
|
@@ -7259,6 +7310,10 @@ class DataTableState {
|
|
|
7259
7310
|
}
|
|
7260
7311
|
}
|
|
7261
7312
|
}
|
|
7313
|
+
checkRetainment(caller) {
|
|
7314
|
+
var _a;
|
|
7315
|
+
this.retainSelected = ((_a = this.selectionOptions) === null || _a === void 0 ? void 0 : _a.some(option => option.label === caller)) || this.retainSelected;
|
|
7316
|
+
}
|
|
7262
7317
|
}
|
|
7263
7318
|
DataTableState.decorators = [
|
|
7264
7319
|
{ type: Injectable }
|
|
@@ -7269,6 +7324,7 @@ class NovoDataTableClearButton {
|
|
|
7269
7324
|
this.state = state;
|
|
7270
7325
|
this.ref = ref;
|
|
7271
7326
|
this.labels = labels;
|
|
7327
|
+
this.selectedClear = new EventEmitter();
|
|
7272
7328
|
this.sortClear = new EventEmitter();
|
|
7273
7329
|
this.filterClear = new EventEmitter();
|
|
7274
7330
|
this.allClear = new EventEmitter();
|
|
@@ -7281,9 +7337,14 @@ class NovoDataTableClearButton {
|
|
|
7281
7337
|
this.state.clearFilter();
|
|
7282
7338
|
this.filterClear.emit(true);
|
|
7283
7339
|
}
|
|
7340
|
+
clearSelected() {
|
|
7341
|
+
this.state.clearSelected();
|
|
7342
|
+
this.selectedClear.emit(true);
|
|
7343
|
+
}
|
|
7284
7344
|
clearAll() {
|
|
7285
7345
|
this.state.reset();
|
|
7286
7346
|
this.allClear.emit(true);
|
|
7347
|
+
this.selectedClear.emit(true);
|
|
7287
7348
|
this.sortClear.emit(true);
|
|
7288
7349
|
this.filterClear.emit(true);
|
|
7289
7350
|
}
|
|
@@ -7295,6 +7356,7 @@ NovoDataTableClearButton.decorators = [
|
|
|
7295
7356
|
<novo-dropdown side="bottom-right" class="novo-data-table-clear-button" data-automation-id="novo-data-table-clear-dropdown">
|
|
7296
7357
|
<button type="button" theme="primary" color="negative" icon="collapse" data-automation-id="novo-data-table-clear-dropdown-btn">{{ labels.clear }}</button>
|
|
7297
7358
|
<list>
|
|
7359
|
+
<item *ngIf="state.selected.length > 0" (click)="clearSelected()" data-automation-id="novo-data-table-clear-dropdown-clear-selected">{{ labels.clearSelected }}</item>
|
|
7298
7360
|
<item *ngIf="state.sort" (click)="clearSort()" data-automation-id="novo-data-table-clear-dropdown-clear-sort">{{ labels.clearSort }}</item>
|
|
7299
7361
|
<item *ngIf="state.filter" (click)="clearFilter()" data-automation-id="novo-data-table-clear-dropdown-clear-filter">{{ labels.clearFilter }}</item>
|
|
7300
7362
|
<item *ngIf="state.sort && state.filter" (click)="clearAll()" data-automation-id="novo-data-table-clear-dropdown-clear-all">{{ labels.clearAllNormalCase }}</item>
|
|
@@ -7310,6 +7372,7 @@ NovoDataTableClearButton.ctorParameters = () => [
|
|
|
7310
7372
|
{ type: NovoLabelService }
|
|
7311
7373
|
];
|
|
7312
7374
|
NovoDataTableClearButton.propDecorators = {
|
|
7375
|
+
selectedClear: [{ type: Output }],
|
|
7313
7376
|
sortClear: [{ type: Output }],
|
|
7314
7377
|
filterClear: [{ type: Output }],
|
|
7315
7378
|
allClear: [{ type: Output }]
|
|
@@ -7353,7 +7416,10 @@ class DataTableSource extends DataSource {
|
|
|
7353
7416
|
this.current = data.results.length;
|
|
7354
7417
|
this.data = data.results;
|
|
7355
7418
|
// Clear selection
|
|
7356
|
-
this.state.
|
|
7419
|
+
if (!this.state.retainSelected) {
|
|
7420
|
+
this.state.selectedRows.clear();
|
|
7421
|
+
}
|
|
7422
|
+
this.state.retainSelected = false;
|
|
7357
7423
|
this.state.onSelectionChange();
|
|
7358
7424
|
// Mark changes
|
|
7359
7425
|
setTimeout(() => {
|
|
@@ -7716,6 +7782,7 @@ class NovoDataTableSortFilter {
|
|
|
7716
7782
|
}
|
|
7717
7783
|
}
|
|
7718
7784
|
this.state.filter = filter;
|
|
7785
|
+
this.state.checkRetainment('filter');
|
|
7719
7786
|
this.state.reset(false, true);
|
|
7720
7787
|
this.state.updates.next({ filter, sort: this.state.sort });
|
|
7721
7788
|
this.state.onSortFilterChange();
|
|
@@ -7723,6 +7790,7 @@ class NovoDataTableSortFilter {
|
|
|
7723
7790
|
sort(id, value, transform) {
|
|
7724
7791
|
const sort = { id, value, transform };
|
|
7725
7792
|
this.state.sort = sort;
|
|
7793
|
+
this.state.checkRetainment('sort');
|
|
7726
7794
|
this.state.reset(false, true);
|
|
7727
7795
|
this.state.updates.next({ sort, filter: this.state.filter });
|
|
7728
7796
|
this.state.onSortFilterChange();
|
|
@@ -8258,6 +8326,7 @@ class NovoDataTable {
|
|
|
8258
8326
|
this.trackByFn = (index, item) => item.id;
|
|
8259
8327
|
this.templates = {};
|
|
8260
8328
|
this.fixedHeader = false;
|
|
8329
|
+
this.maxSelected = undefined;
|
|
8261
8330
|
this._hideGlobalSearch = true;
|
|
8262
8331
|
this.preferencesChanged = new EventEmitter();
|
|
8263
8332
|
this.loading = true;
|
|
@@ -8429,6 +8498,7 @@ class NovoDataTable {
|
|
|
8429
8498
|
}
|
|
8430
8499
|
}
|
|
8431
8500
|
ngAfterContentInit() {
|
|
8501
|
+
var _a;
|
|
8432
8502
|
if (this.displayedColumns && this.displayedColumns.length) {
|
|
8433
8503
|
this.expandable = this.displayedColumns.includes('expand');
|
|
8434
8504
|
}
|
|
@@ -8458,6 +8528,7 @@ class NovoDataTable {
|
|
|
8458
8528
|
}
|
|
8459
8529
|
this.state.page = this.paginationOptions ? this.paginationOptions.page : undefined;
|
|
8460
8530
|
this.state.pageSize = this.paginationOptions ? this.paginationOptions.pageSize : undefined;
|
|
8531
|
+
this.state.selectionOptions = (_a = this.selectionOptions) !== null && _a !== void 0 ? _a : undefined;
|
|
8461
8532
|
// Scrolling inside table
|
|
8462
8533
|
this.novoDataTableContainer.nativeElement.addEventListener('scroll', this.scrollListenerHandler);
|
|
8463
8534
|
this.initialized = true;
|
|
@@ -8702,8 +8773,8 @@ NovoDataTable.decorators = [
|
|
|
8702
8773
|
[hidden]="dataSource?.totallyEmpty && !state.userFiltered"
|
|
8703
8774
|
>
|
|
8704
8775
|
<ng-container cdkColumnDef="selection">
|
|
8705
|
-
<novo-data-table-checkbox-header-cell *cdkHeaderCellDef></novo-data-table-checkbox-header-cell>
|
|
8706
|
-
<novo-data-table-checkbox-cell *cdkCellDef="let row; let i = index" [row]="row"></novo-data-table-checkbox-cell>
|
|
8776
|
+
<novo-data-table-checkbox-header-cell *cdkHeaderCellDef [maxSelected]="maxSelected"></novo-data-table-checkbox-header-cell>
|
|
8777
|
+
<novo-data-table-checkbox-cell *cdkCellDef="let row; let i = index" [row]="row" [maxSelected]="maxSelected"></novo-data-table-checkbox-cell>
|
|
8707
8778
|
</ng-container>
|
|
8708
8779
|
<ng-container cdkColumnDef="expand">
|
|
8709
8780
|
<novo-data-table-expand-header-cell *cdkHeaderCellDef></novo-data-table-expand-header-cell>
|
|
@@ -8874,6 +8945,7 @@ NovoDataTable.propDecorators = {
|
|
|
8874
8945
|
displayedColumns: [{ type: Input }],
|
|
8875
8946
|
paginationOptions: [{ type: Input }],
|
|
8876
8947
|
searchOptions: [{ type: Input }],
|
|
8948
|
+
selectionOptions: [{ type: Input }],
|
|
8877
8949
|
defaultSort: [{ type: Input }],
|
|
8878
8950
|
name: [{ type: Input }],
|
|
8879
8951
|
allowMultipleFilters: [{ type: Input }],
|
|
@@ -8883,6 +8955,7 @@ NovoDataTable.propDecorators = {
|
|
|
8883
8955
|
templates: [{ type: Input }],
|
|
8884
8956
|
fixedHeader: [{ type: Input }],
|
|
8885
8957
|
paginatorDataFeatureId: [{ type: Input }],
|
|
8958
|
+
maxSelected: [{ type: Input }],
|
|
8886
8959
|
dataTableService: [{ type: Input }],
|
|
8887
8960
|
rows: [{ type: Input }],
|
|
8888
8961
|
outsideFilter: [{ type: Input }],
|
|
@@ -29412,6 +29485,7 @@ class NovoDataTableCheckboxCell extends CdkCell {
|
|
|
29412
29485
|
this.dataTable = dataTable;
|
|
29413
29486
|
this.ref = ref;
|
|
29414
29487
|
this.role = 'gridcell';
|
|
29488
|
+
this.maxSelected = undefined;
|
|
29415
29489
|
this.checked = false;
|
|
29416
29490
|
renderer.setAttribute(elementRef.nativeElement, 'data-automation-id', `novo-checkbox-column-${columnDef.cssClassFriendlyName}`);
|
|
29417
29491
|
renderer.addClass(elementRef.nativeElement, `novo-checkbox-column-${columnDef.cssClassFriendlyName}`);
|
|
@@ -29425,11 +29499,19 @@ class NovoDataTableCheckboxCell extends CdkCell {
|
|
|
29425
29499
|
this.ref.markForCheck();
|
|
29426
29500
|
});
|
|
29427
29501
|
}
|
|
29502
|
+
get isAtLimit() {
|
|
29503
|
+
return this.maxSelected && this.dataTable.state.selectedRows.size >= this.maxSelected && !this.checked;
|
|
29504
|
+
}
|
|
29428
29505
|
ngOnInit() {
|
|
29429
29506
|
this.checked = this.dataTable.isSelected(this.row);
|
|
29430
29507
|
}
|
|
29431
29508
|
onClick() {
|
|
29432
|
-
|
|
29509
|
+
if (!this.isAtLimit) {
|
|
29510
|
+
this.dataTable.selectRow(this.row);
|
|
29511
|
+
}
|
|
29512
|
+
}
|
|
29513
|
+
getTooltip() {
|
|
29514
|
+
return (this.isAtLimit) ? 'More than ' + this.maxSelected + ' items are not able to be selected at one time' : '';
|
|
29433
29515
|
}
|
|
29434
29516
|
ngOnDestroy() {
|
|
29435
29517
|
if (this.selectionSubscription) {
|
|
@@ -29444,10 +29526,11 @@ NovoDataTableCheckboxCell.decorators = [
|
|
|
29444
29526
|
{ type: Component, args: [{
|
|
29445
29527
|
selector: 'novo-data-table-checkbox-cell',
|
|
29446
29528
|
template: `
|
|
29447
|
-
<div class="data-table-checkbox" (click)="onClick()">
|
|
29529
|
+
<div class="data-table-checkbox" (click)="onClick()" [tooltip]="getTooltip()" tooltipPosition="right">
|
|
29448
29530
|
<input type="checkbox" [checked]="checked">
|
|
29449
29531
|
<label>
|
|
29450
|
-
<i [class.bhi-checkbox-
|
|
29532
|
+
<i [class.bhi-checkbox-disabled]="isAtLimit"
|
|
29533
|
+
[class.bhi-checkbox-empty]="!checked"
|
|
29451
29534
|
[class.bhi-checkbox-filled]="checked"></i>
|
|
29452
29535
|
</label>
|
|
29453
29536
|
</div>
|
|
@@ -29464,7 +29547,8 @@ NovoDataTableCheckboxCell.ctorParameters = () => [
|
|
|
29464
29547
|
];
|
|
29465
29548
|
NovoDataTableCheckboxCell.propDecorators = {
|
|
29466
29549
|
role: [{ type: HostBinding, args: ['attr.role',] }],
|
|
29467
|
-
row: [{ type: Input }]
|
|
29550
|
+
row: [{ type: Input }],
|
|
29551
|
+
maxSelected: [{ type: Input }]
|
|
29468
29552
|
};
|
|
29469
29553
|
|
|
29470
29554
|
class NovoDataTableExpandCell extends CdkCell {
|
|
@@ -29602,12 +29686,211 @@ NovoDataTableExpandHeaderCell.propDecorators = {
|
|
|
29602
29686
|
role: [{ type: HostBinding, args: ['attr.role',] }]
|
|
29603
29687
|
};
|
|
29604
29688
|
|
|
29689
|
+
// NG2
|
|
29690
|
+
class NovoToastElement {
|
|
29691
|
+
constructor(sanitizer) {
|
|
29692
|
+
this.sanitizer = sanitizer;
|
|
29693
|
+
this.theme = 'danger';
|
|
29694
|
+
this.icon = 'caution';
|
|
29695
|
+
this.hasDialogue = false;
|
|
29696
|
+
this.isCloseable = false;
|
|
29697
|
+
this.closed = new EventEmitter();
|
|
29698
|
+
this.show = false;
|
|
29699
|
+
this.animate = false;
|
|
29700
|
+
this.parent = null;
|
|
29701
|
+
this.launched = false;
|
|
29702
|
+
}
|
|
29703
|
+
set message(m) {
|
|
29704
|
+
this._message = this.sanitizer.bypassSecurityTrustHtml(m);
|
|
29705
|
+
}
|
|
29706
|
+
ngOnInit() {
|
|
29707
|
+
if (!this.launched) {
|
|
29708
|
+
// clear position and time
|
|
29709
|
+
this.position = null;
|
|
29710
|
+
this.time = null;
|
|
29711
|
+
// set icon and styling
|
|
29712
|
+
this.iconClass = `bhi-${this.icon}`;
|
|
29713
|
+
this.alertTheme = `${this.theme} toast-container embedded`;
|
|
29714
|
+
if (this.hasDialogue) {
|
|
29715
|
+
this.alertTheme += ' dialogue';
|
|
29716
|
+
}
|
|
29717
|
+
}
|
|
29718
|
+
}
|
|
29719
|
+
ngOnChanges(changes) {
|
|
29720
|
+
// set icon and styling
|
|
29721
|
+
this.iconClass = `bhi-${this.icon}`;
|
|
29722
|
+
this.alertTheme = `${this.theme} toast-container embedded`;
|
|
29723
|
+
if (this.hasDialogue) {
|
|
29724
|
+
this.alertTheme += ' dialogue';
|
|
29725
|
+
}
|
|
29726
|
+
}
|
|
29727
|
+
clickHandler(event) {
|
|
29728
|
+
if (!this.isCloseable) {
|
|
29729
|
+
if (event) {
|
|
29730
|
+
event.stopPropagation();
|
|
29731
|
+
event.preventDefault();
|
|
29732
|
+
}
|
|
29733
|
+
if (this.parent) {
|
|
29734
|
+
this.parent.hide(this);
|
|
29735
|
+
}
|
|
29736
|
+
else {
|
|
29737
|
+
this.closed.emit({ closed: true });
|
|
29738
|
+
}
|
|
29739
|
+
}
|
|
29740
|
+
}
|
|
29741
|
+
close(event) {
|
|
29742
|
+
if (event) {
|
|
29743
|
+
event.stopPropagation();
|
|
29744
|
+
event.preventDefault();
|
|
29745
|
+
}
|
|
29746
|
+
if (this.parent) {
|
|
29747
|
+
this.parent.hide(this);
|
|
29748
|
+
}
|
|
29749
|
+
else {
|
|
29750
|
+
this.closed.emit({ closed: true });
|
|
29751
|
+
}
|
|
29752
|
+
}
|
|
29753
|
+
}
|
|
29754
|
+
NovoToastElement.decorators = [
|
|
29755
|
+
{ type: Component, args: [{
|
|
29756
|
+
selector: 'novo-toast',
|
|
29757
|
+
host: {
|
|
29758
|
+
'[class]': 'alertTheme',
|
|
29759
|
+
'[class.show]': 'show',
|
|
29760
|
+
'[class.animate]': 'animate',
|
|
29761
|
+
'[class.embedded]': 'embedded',
|
|
29762
|
+
'(click)': '!isCloseable && clickHandler($event)',
|
|
29763
|
+
},
|
|
29764
|
+
template: `
|
|
29765
|
+
<div class="toast-icon">
|
|
29766
|
+
<i [ngClass]="iconClass"></i>
|
|
29767
|
+
</div>
|
|
29768
|
+
<div class="toast-content">
|
|
29769
|
+
<h5 *ngIf="title">{{title}}</h5>
|
|
29770
|
+
<p *ngIf="_message" [class.message-only]="!title" [innerHtml]="_message"></p>
|
|
29771
|
+
<div *ngIf="link" class="link-generated">
|
|
29772
|
+
<input type="text" [value]="link" onfocus="this.select();"/>
|
|
29773
|
+
</div>
|
|
29774
|
+
<div class="dialogue">
|
|
29775
|
+
<ng-content></ng-content>
|
|
29776
|
+
</div>
|
|
29777
|
+
</div>
|
|
29778
|
+
<div class="close-icon" *ngIf="isCloseable" (click)="close($event)">
|
|
29779
|
+
<i class="bhi-times"></i>
|
|
29780
|
+
</div>
|
|
29781
|
+
`
|
|
29782
|
+
},] }
|
|
29783
|
+
];
|
|
29784
|
+
NovoToastElement.ctorParameters = () => [
|
|
29785
|
+
{ type: DomSanitizer }
|
|
29786
|
+
];
|
|
29787
|
+
NovoToastElement.propDecorators = {
|
|
29788
|
+
theme: [{ type: Input }],
|
|
29789
|
+
icon: [{ type: Input }],
|
|
29790
|
+
title: [{ type: Input }],
|
|
29791
|
+
hasDialogue: [{ type: Input }],
|
|
29792
|
+
link: [{ type: Input }],
|
|
29793
|
+
isCloseable: [{ type: Input }],
|
|
29794
|
+
message: [{ type: Input }],
|
|
29795
|
+
closed: [{ type: Output }]
|
|
29796
|
+
};
|
|
29797
|
+
|
|
29798
|
+
// NG2
|
|
29799
|
+
class NovoToastService {
|
|
29800
|
+
constructor(componentUtils) {
|
|
29801
|
+
this.componentUtils = componentUtils;
|
|
29802
|
+
this.references = [];
|
|
29803
|
+
this.icons = { default: 'bell', success: 'check', info: 'info', warning: 'warning', danger: 'remove' };
|
|
29804
|
+
this.defaults = { hideDelay: 3500, position: 'growlTopRight', theme: 'default' };
|
|
29805
|
+
}
|
|
29806
|
+
set parentViewContainer(view) {
|
|
29807
|
+
this._parentViewContainer = view;
|
|
29808
|
+
}
|
|
29809
|
+
alert(options, toastElement = NovoToastElement) {
|
|
29810
|
+
return new Promise((resolve) => {
|
|
29811
|
+
if (!this._parentViewContainer) {
|
|
29812
|
+
console.error('No parent view container specified for the ToastService. Set it inside your main application. \nthis.toastService.parentViewContainer = view (ViewContainerRef)');
|
|
29813
|
+
return;
|
|
29814
|
+
}
|
|
29815
|
+
const toast = this.componentUtils.append(toastElement, this._parentViewContainer);
|
|
29816
|
+
this.references.push(toast);
|
|
29817
|
+
this.handleAlert(toast.instance, options);
|
|
29818
|
+
resolve(toast);
|
|
29819
|
+
});
|
|
29820
|
+
}
|
|
29821
|
+
isVisible(toast) {
|
|
29822
|
+
return toast.show;
|
|
29823
|
+
}
|
|
29824
|
+
hide(toast) {
|
|
29825
|
+
toast.animate = false;
|
|
29826
|
+
setTimeout(() => {
|
|
29827
|
+
toast.show = false;
|
|
29828
|
+
const REF = this.references.filter((x) => x.instance === toast)[0];
|
|
29829
|
+
if (REF) {
|
|
29830
|
+
this.references.splice(this.references.indexOf(REF), 1);
|
|
29831
|
+
REF.destroy();
|
|
29832
|
+
}
|
|
29833
|
+
}, 300);
|
|
29834
|
+
}
|
|
29835
|
+
handleAlert(toast, options) {
|
|
29836
|
+
this.setToastOnSession(toast, options);
|
|
29837
|
+
setTimeout(() => {
|
|
29838
|
+
this.show(toast);
|
|
29839
|
+
}, 20);
|
|
29840
|
+
if (!toast.isCloseable) {
|
|
29841
|
+
this.toastTimer(toast);
|
|
29842
|
+
}
|
|
29843
|
+
}
|
|
29844
|
+
setToastOnSession(toast, opts) {
|
|
29845
|
+
const OPTIONS = typeof opts === 'object' ? opts : {};
|
|
29846
|
+
toast.parent = this;
|
|
29847
|
+
toast.title = OPTIONS.title || '';
|
|
29848
|
+
toast.message = OPTIONS.message || '';
|
|
29849
|
+
toast.hideDelay = OPTIONS.hideDelay || this.defaults.hideDelay;
|
|
29850
|
+
toast.link = OPTIONS.link || '';
|
|
29851
|
+
toast.isCloseable = OPTIONS.isCloseable || false;
|
|
29852
|
+
const CUSTOM_CLASS = OPTIONS.customClass || '';
|
|
29853
|
+
const ALERT_STYLE = OPTIONS.theme || this.defaults.theme;
|
|
29854
|
+
const ALERT_POSITION = OPTIONS.position || this.defaults.position;
|
|
29855
|
+
const ALERT_ICON = OPTIONS.icon || this.icons.default;
|
|
29856
|
+
toast.iconClass = `bhi-${ALERT_ICON}`;
|
|
29857
|
+
toast.launched = true;
|
|
29858
|
+
toast.alertTheme = `${ALERT_STYLE} ${ALERT_POSITION} ${CUSTOM_CLASS} toast-container launched`;
|
|
29859
|
+
}
|
|
29860
|
+
show(toast) {
|
|
29861
|
+
toast.show = true;
|
|
29862
|
+
setTimeout(addClass, 25);
|
|
29863
|
+
/**
|
|
29864
|
+
* Adds animate class to be called after a timeout
|
|
29865
|
+
**/
|
|
29866
|
+
function addClass() {
|
|
29867
|
+
toast.animate = true;
|
|
29868
|
+
}
|
|
29869
|
+
}
|
|
29870
|
+
toastTimer(toast) {
|
|
29871
|
+
if (toast.hideDelay < 0) {
|
|
29872
|
+
return;
|
|
29873
|
+
}
|
|
29874
|
+
setTimeout(() => {
|
|
29875
|
+
this.hide(toast);
|
|
29876
|
+
}, toast.hideDelay);
|
|
29877
|
+
}
|
|
29878
|
+
}
|
|
29879
|
+
NovoToastService.decorators = [
|
|
29880
|
+
{ type: Injectable }
|
|
29881
|
+
];
|
|
29882
|
+
NovoToastService.ctorParameters = () => [
|
|
29883
|
+
{ type: ComponentUtils }
|
|
29884
|
+
];
|
|
29885
|
+
|
|
29605
29886
|
class NovoDataTableCheckboxHeaderCell extends CdkHeaderCell {
|
|
29606
|
-
constructor(columnDef, elementRef, renderer, dataTable, ref) {
|
|
29887
|
+
constructor(columnDef, elementRef, renderer, dataTable, ref, toaster) {
|
|
29607
29888
|
super(columnDef, elementRef);
|
|
29608
29889
|
this.dataTable = dataTable;
|
|
29609
29890
|
this.ref = ref;
|
|
29891
|
+
this.toaster = toaster;
|
|
29610
29892
|
this.role = 'columnheader';
|
|
29893
|
+
this.maxSelected = undefined;
|
|
29611
29894
|
this.checked = false;
|
|
29612
29895
|
renderer.setAttribute(elementRef.nativeElement, 'data-automation-id', `novo-checkbox-column-header-${columnDef.cssClassFriendlyName}`);
|
|
29613
29896
|
renderer.addClass(elementRef.nativeElement, `novo-checkbox-column-${columnDef.cssClassFriendlyName}`);
|
|
@@ -29620,6 +29903,8 @@ class NovoDataTableCheckboxHeaderCell extends CdkHeaderCell {
|
|
|
29620
29903
|
if (event.isPageSizeChange) {
|
|
29621
29904
|
this.checked = false;
|
|
29622
29905
|
this.dataTable.selectRows(false);
|
|
29906
|
+
this.dataTable.state.checkRetainment('pageSize');
|
|
29907
|
+
this.dataTable.state.reset(false, true);
|
|
29623
29908
|
}
|
|
29624
29909
|
else {
|
|
29625
29910
|
this.checked = this.dataTable.allCurrentRowsSelected();
|
|
@@ -29631,6 +29916,9 @@ class NovoDataTableCheckboxHeaderCell extends CdkHeaderCell {
|
|
|
29631
29916
|
this.ref.markForCheck();
|
|
29632
29917
|
});
|
|
29633
29918
|
}
|
|
29919
|
+
get isAtLimit() {
|
|
29920
|
+
return this.maxSelected && this.dataTable.state.selectedRows.size + this.dataTable.dataSource.data.length > this.maxSelected && !this.checked;
|
|
29921
|
+
}
|
|
29634
29922
|
ngOnDestroy() {
|
|
29635
29923
|
if (this.selectionSubscription) {
|
|
29636
29924
|
this.selectionSubscription.unsubscribe();
|
|
@@ -29643,7 +29931,17 @@ class NovoDataTableCheckboxHeaderCell extends CdkHeaderCell {
|
|
|
29643
29931
|
}
|
|
29644
29932
|
}
|
|
29645
29933
|
onClick() {
|
|
29646
|
-
|
|
29934
|
+
if (this.isAtLimit) {
|
|
29935
|
+
this.toaster.alert({
|
|
29936
|
+
theme: 'danger',
|
|
29937
|
+
position: 'fixedTop',
|
|
29938
|
+
message: 'Error, more than 500 items are not able to be selected at one time',
|
|
29939
|
+
icon: 'caution',
|
|
29940
|
+
});
|
|
29941
|
+
}
|
|
29942
|
+
else {
|
|
29943
|
+
this.dataTable.selectRows(!this.checked);
|
|
29944
|
+
}
|
|
29647
29945
|
}
|
|
29648
29946
|
}
|
|
29649
29947
|
NovoDataTableCheckboxHeaderCell.decorators = [
|
|
@@ -29666,10 +29964,12 @@ NovoDataTableCheckboxHeaderCell.ctorParameters = () => [
|
|
|
29666
29964
|
{ type: ElementRef },
|
|
29667
29965
|
{ type: Renderer2 },
|
|
29668
29966
|
{ type: NovoDataTable },
|
|
29669
|
-
{ type: ChangeDetectorRef }
|
|
29967
|
+
{ type: ChangeDetectorRef },
|
|
29968
|
+
{ type: NovoToastService }
|
|
29670
29969
|
];
|
|
29671
29970
|
NovoDataTableCheckboxHeaderCell.propDecorators = {
|
|
29672
|
-
role: [{ type: HostBinding, args: ['attr.role',] }]
|
|
29971
|
+
role: [{ type: HostBinding, args: ['attr.role',] }],
|
|
29972
|
+
maxSelected: [{ type: Input }]
|
|
29673
29973
|
};
|
|
29674
29974
|
|
|
29675
29975
|
class NovoDataTableHeaderCell extends CdkHeaderCell {
|
|
@@ -29765,10 +30065,12 @@ class NovoDataTablePagination {
|
|
|
29765
30065
|
this.resetSubscription.unsubscribe();
|
|
29766
30066
|
}
|
|
29767
30067
|
selectPage(page) {
|
|
30068
|
+
this.state.checkRetainment('page');
|
|
29768
30069
|
this.page = page;
|
|
29769
30070
|
this.emitPageEvent();
|
|
29770
30071
|
}
|
|
29771
30072
|
nextPage() {
|
|
30073
|
+
this.state.checkRetainment('page');
|
|
29772
30074
|
if (!this.hasNextPage()) {
|
|
29773
30075
|
return;
|
|
29774
30076
|
}
|
|
@@ -29777,6 +30079,7 @@ class NovoDataTablePagination {
|
|
|
29777
30079
|
this.emitPageEvent();
|
|
29778
30080
|
}
|
|
29779
30081
|
previousPage() {
|
|
30082
|
+
this.state.checkRetainment('page');
|
|
29780
30083
|
if (!this.hasPreviousPage()) {
|
|
29781
30084
|
return;
|
|
29782
30085
|
}
|
|
@@ -31154,7 +31457,7 @@ NovoExpansionPanel.decorators = [
|
|
|
31154
31457
|
'[class.novo-expansion-panel-spacing]': '_hasSpacing()',
|
|
31155
31458
|
'[class.novo-expansion-panel-padding]': 'padding',
|
|
31156
31459
|
},
|
|
31157
|
-
styles: ["@-webkit-keyframes rotate{0%{transform:rotate(0deg)}75%{transform:rotate(200deg)}to{transform:rotate(180deg)}}@-webkit-keyframes half-rotate{0%{transform:rotate(45deg)}75%{transform:rotate(100deg)}to{transform:rotate(90deg)}}@-webkit-keyframes rotateBack{0%{transform:rotate(90deg)}to{transform:rotate(0deg)}}@-webkit-keyframes show{0%{opacity:0;transform:translateX(-100%)}75%{transform:translateX(0)}to{opacity:1;transform:translateX(0)}}@keyframes rotate{0%{transform:rotate(0deg)}75%{transform:rotate(200deg)}to{transform:rotate(180deg)}}@keyframes half-rotate{0%{transform:rotate(45deg)}75%{transform:rotate(100deg)}to{transform:rotate(90deg)}}@keyframes rotateBack{0%{transform:rotate(90deg)}to{transform:rotate(0deg)}}@keyframes show{0%{opacity:0;transform:translateX(-100%)}75%{transform:translateX(0)}to{opacity:1;transform:translateX(0)}}.novo-expansion-panel{background:#fff;color:#3d464d}.novo-action-row{border-top-color:#3d464d}.novo-expansion-panel:not(.novo-expanded) .novo-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.novo-expansion-panel:not(.novo-expanded) .novo-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused,.novo-expansion-panel:not(.novo-expanded) .novo-expansion-panel-header:not([aria-disabled=true]):hover{background:rgba(0,0,0,.04)}.novo-expansion-panel-header-title{color:#3d464d}.novo-expansion-indicator:after,.novo-expansion-panel-header-description{color:#999}.novo-expansion-panel-header[aria-disabled=true]{color:#999;pointer-events:none}.novo-expansion-panel-header[aria-disabled=true] .novo-expansion-panel-header-description,.novo-expansion-panel-header[aria-disabled=true] .novo-expansion-panel-header-title{color:inherit}.novo-expansion-panel.novo-expanded[theme=company]{border-top:3px solid #39d}.novo-expansion-panel.novo-expanded[theme=candidate]{border-top:3px solid #4b7}.novo-expansion-panel.novo-expanded[theme=navigation]{border-top:3px solid #2f384f}.novo-expansion-panel.novo-expanded[theme=lead]{border-top:3px solid #a69}.novo-expansion-panel.novo-expanded[theme=contact]{border-top:3px solid #fa4}.novo-expansion-panel.novo-expanded[theme=opportunity]{border-top:3px solid #625}.novo-expansion-panel.novo-expanded[theme=job]{border-top:3px solid #b56}.novo-expansion-panel.novo-expanded[theme=earnCode],.novo-expansion-panel.novo-expanded[theme=jobCode]{border-top:3px solid #696d79}.novo-expansion-panel.novo-expanded[theme=sendout]{border-top:3px solid #747884}.novo-expansion-panel.novo-expanded[theme=placement]{border-top:3px solid #0b344f}.novo-expansion-panel.novo-expanded[theme=corporateuser],.novo-expansion-panel.novo-expanded[theme=credential],.novo-expansion-panel.novo-expanded[theme=distributionList],.novo-expansion-panel.novo-expanded[theme=task],.novo-expansion-panel.novo-expanded[theme=user]{border-top:3px solid #4f5361}.novo-expansion-panel.novo-expanded[theme=aqua]{border-top:3px solid #3bafda}.novo-expansion-panel.novo-expanded[theme=ocean]{border-top:3px solid #4a89dc}.novo-expansion-panel.novo-expanded[theme=mint]{border-top:3px solid #37bc9b}.novo-expansion-panel.novo-expanded[theme=grass]{border-top:3px solid #8cc152}.novo-expansion-panel.novo-expanded[theme=sunflower]{border-top:3px solid #f6b042}.novo-expansion-panel.novo-expanded[theme=bittersweet]{border-top:3px solid #eb6845}.novo-expansion-panel.novo-expanded[theme=grapefruit]{border-top:3px solid #da4453}.novo-expansion-panel.novo-expanded[theme=carnation]{border-top:3px solid #d770ad}.novo-expansion-panel.novo-expanded[theme=lavender]{border-top:3px solid #967adc}.novo-expansion-panel.novo-expanded[theme=positive]{border-top:3px solid #4a89dc}.novo-expansion-panel.novo-expanded[theme=success]{border-top:3px solid #8cc152}.novo-expansion-panel.novo-expanded[theme=negative]{border-top:3px solid #da4453}.novo-expansion-panel.novo-expanded[theme=warning]{border-top:3px solid #f6b042}.novo-expansion-panel.novo-expanded[theme=black]{border-top:3px solid #000}.novo-expansion-panel.novo-expanded[theme=dark]{border-top:3px solid #3d464d}.novo-expansion-panel.novo-expanded[theme=pulse]{border-top:3px solid #3bafda}.novo-expansion-panel.novo-expanded[theme=neutral]{border-top:3px solid #4f5361}.novo-expansion-panel.novo-expanded[theme=navy]{border-top:3px solid #0d2d42}.novo-expansion-panel.novo-expanded[theme=contract]{border-top:3px solid #454ea0}.novo-expansion-panel.novo-expanded[theme=mountain]{border-top:3px solid #9678b6}.novo-expansion-panel.novo-expanded[theme=billableCharge],.novo-expansion-panel.novo-expanded[theme=invoiceStatement],.novo-expansion-panel.novo-expanded[theme=payableCharge]{border-top:3px solid #696d79}.novo-expansion-panel.novo-expanded[theme=submission]{border-top:3px solid #a9adbb}.novo-expansion-panel.novo-expanded[theme=note]{border-top:3px solid #747884}.novo-expansion-panel.novo-expanded[theme=ash]{border-top:3px solid #a0a0a0}.novo-expansion-panel.novo-expanded[theme=slate]{border-top:3px solid #707070}.novo-expansion-panel.novo-expanded[theme=charcoal]{border-top:3px solid #282828}.novo-expansion-panel.novo-expanded[theme=background]{border-top:3px solid #f4f4f4}.novo-expansion-panel.novo-expanded[theme=background-dark]{border-top:3px solid #e2e2e2}.novo-expansion-panel.novo-expanded[theme=white]{border-top:3px solid #fff}.novo-expansion-panel.novo-expanded[theme=grey]{border-top:3px solid #999}.novo-expansion-panel.novo-expanded[theme=off-white]{border-top:3px solid #f4f4f4}.novo-expansion-panel.novo-expanded[theme=light]{border-top:3px solid #d9dadc}.novo-expansion-panel.novo-expanded[theme=empty]{border-top:3px solid #cccdcc}.novo-expansion-panel.novo-expanded[theme=sand]{border-top:3px solid #f4f4f4}.novo-expansion-panel.novo-expanded[theme=silver]{border-top:3px solid #e2e2e2}.novo-expansion-panel.novo-expanded[theme=stone]{border-top:3px solid #bebebe}.novo-expansion-panel{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-sizing:content-box;display:block;margin:0 16px;transition:margin 225ms ease-in-out}.novo-expansion-panel.novo-expanded{margin:16px 4px}.novo-expansion-panel.novo-expanded:first-child{margin-top:0}.novo-expansion-panel.novo-expanded:last-child{margin-bottom:0}.novo-expansion-panel-content{overflow:hidden}.novo-expansion-panel-content.novo-expanded{overflow:visible}.novo-expansion-panel-padding .novo-expansion-panel-body{padding:0 24px 16px}.novo-accordion .novo-expansion-panel-spacing:first-child{margin-top:0}.novo-accordion .novo-expansion-panel-spacing:last-child{margin-bottom:0}.novo-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.novo-action-row button.novo-button{margin-left:8px}[dir=rtl] .novo-action-row button.novo-button{margin-left:0;margin-right:8px}"]
|
|
31460
|
+
styles: ["@-webkit-keyframes rotate{0%{transform:rotate(0deg)}75%{transform:rotate(200deg)}to{transform:rotate(180deg)}}@-webkit-keyframes half-rotate{0%{transform:rotate(45deg)}75%{transform:rotate(100deg)}to{transform:rotate(90deg)}}@-webkit-keyframes rotateBack{0%{transform:rotate(90deg)}to{transform:rotate(0deg)}}@-webkit-keyframes show{0%{opacity:0;transform:translateX(-100%)}75%{transform:translateX(0)}to{opacity:1;transform:translateX(0)}}@keyframes rotate{0%{transform:rotate(0deg)}75%{transform:rotate(200deg)}to{transform:rotate(180deg)}}@keyframes half-rotate{0%{transform:rotate(45deg)}75%{transform:rotate(100deg)}to{transform:rotate(90deg)}}@keyframes rotateBack{0%{transform:rotate(90deg)}to{transform:rotate(0deg)}}@keyframes show{0%{opacity:0;transform:translateX(-100%)}75%{transform:translateX(0)}to{opacity:1;transform:translateX(0)}}.novo-expansion-panel{background:#fff;color:#3d464d}.novo-action-row{border-top-color:#3d464d}.novo-expansion-panel:not(.novo-expanded) .novo-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.novo-expansion-panel:not(.novo-expanded) .novo-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused,.novo-expansion-panel:not(.novo-expanded) .novo-expansion-panel-header:not([aria-disabled=true]):hover{background:rgba(0,0,0,.04)}.novo-expansion-panel-header-title{color:#3d464d}.novo-expansion-indicator:after,.novo-expansion-panel-header-description{color:#999}.novo-expansion-panel-header[aria-disabled=true]{color:#999;pointer-events:none}.novo-expansion-panel-header[aria-disabled=true] .novo-expansion-panel-header-description,.novo-expansion-panel-header[aria-disabled=true] .novo-expansion-panel-header-title{color:inherit}.novo-expansion-panel.novo-expanded[theme=company]{border-top:3px solid #39d}.novo-expansion-panel.novo-expanded[theme=candidate]{border-top:3px solid #4b7}.novo-expansion-panel.novo-expanded[theme=navigation]{border-top:3px solid #2f384f}.novo-expansion-panel.novo-expanded[theme=lead]{border-top:3px solid #a69}.novo-expansion-panel.novo-expanded[theme=contact]{border-top:3px solid #fa4}.novo-expansion-panel.novo-expanded[theme=opportunity]{border-top:3px solid #625}.novo-expansion-panel.novo-expanded[theme=job]{border-top:3px solid #b56}.novo-expansion-panel.novo-expanded[theme=earnCode],.novo-expansion-panel.novo-expanded[theme=jobCode]{border-top:3px solid #696d79}.novo-expansion-panel.novo-expanded[theme=sendout]{border-top:3px solid #747884}.novo-expansion-panel.novo-expanded[theme=placement]{border-top:3px solid #0b344f}.novo-expansion-panel.novo-expanded[theme=corporateuser],.novo-expansion-panel.novo-expanded[theme=credential],.novo-expansion-panel.novo-expanded[theme=distributionList],.novo-expansion-panel.novo-expanded[theme=task],.novo-expansion-panel.novo-expanded[theme=user]{border-top:3px solid #4f5361}.novo-expansion-panel.novo-expanded[theme=aqua]{border-top:3px solid #3bafda}.novo-expansion-panel.novo-expanded[theme=ocean]{border-top:3px solid #4a89dc}.novo-expansion-panel.novo-expanded[theme=mint]{border-top:3px solid #37bc9b}.novo-expansion-panel.novo-expanded[theme=grass]{border-top:3px solid #8cc152}.novo-expansion-panel.novo-expanded[theme=sunflower]{border-top:3px solid #f6b042}.novo-expansion-panel.novo-expanded[theme=bittersweet]{border-top:3px solid #eb6845}.novo-expansion-panel.novo-expanded[theme=grapefruit]{border-top:3px solid #da4453}.novo-expansion-panel.novo-expanded[theme=carnation]{border-top:3px solid #d770ad}.novo-expansion-panel.novo-expanded[theme=lavender]{border-top:3px solid #967adc}.novo-expansion-panel.novo-expanded[theme=positive]{border-top:3px solid #4a89dc}.novo-expansion-panel.novo-expanded[theme=success]{border-top:3px solid #8cc152}.novo-expansion-panel.novo-expanded[theme=negative]{border-top:3px solid #da4453}.novo-expansion-panel.novo-expanded[theme=warning]{border-top:3px solid #f6b042}.novo-expansion-panel.novo-expanded[theme=black]{border-top:3px solid #000}.novo-expansion-panel.novo-expanded[theme=dark]{border-top:3px solid #3d464d}.novo-expansion-panel.novo-expanded[theme=pulse]{border-top:3px solid #3bafda}.novo-expansion-panel.novo-expanded[theme=neutral]{border-top:3px solid #4f5361}.novo-expansion-panel.novo-expanded[theme=navy]{border-top:3px solid #0d2d42}.novo-expansion-panel.novo-expanded[theme=contract]{border-top:3px solid #454ea0}.novo-expansion-panel.novo-expanded[theme=mountain]{border-top:3px solid #9678b6}.novo-expansion-panel.novo-expanded[theme=billableCharge],.novo-expansion-panel.novo-expanded[theme=invoiceStatement],.novo-expansion-panel.novo-expanded[theme=payableCharge]{border-top:3px solid #696d79}.novo-expansion-panel.novo-expanded[theme=submission]{border-top:3px solid #a9adbb}.novo-expansion-panel.novo-expanded[theme=note]{border-top:3px solid #747884}.novo-expansion-panel.novo-expanded[theme=ash]{border-top:3px solid #a0a0a0}.novo-expansion-panel.novo-expanded[theme=slate]{border-top:3px solid #707070}.novo-expansion-panel.novo-expanded[theme=charcoal]{border-top:3px solid #282828}.novo-expansion-panel.novo-expanded[theme=jobShift]{border-top:3px solid #454ea0}.novo-expansion-panel.novo-expanded[theme=background]{border-top:3px solid #f4f4f4}.novo-expansion-panel.novo-expanded[theme=background-dark]{border-top:3px solid #e2e2e2}.novo-expansion-panel.novo-expanded[theme=white]{border-top:3px solid #fff}.novo-expansion-panel.novo-expanded[theme=grey]{border-top:3px solid #999}.novo-expansion-panel.novo-expanded[theme=off-white]{border-top:3px solid #f4f4f4}.novo-expansion-panel.novo-expanded[theme=light]{border-top:3px solid #d9dadc}.novo-expansion-panel.novo-expanded[theme=empty]{border-top:3px solid #cccdcc}.novo-expansion-panel.novo-expanded[theme=sand]{border-top:3px solid #f4f4f4}.novo-expansion-panel.novo-expanded[theme=silver]{border-top:3px solid #e2e2e2}.novo-expansion-panel.novo-expanded[theme=stone]{border-top:3px solid #bebebe}.novo-expansion-panel{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-sizing:content-box;display:block;margin:0 16px;transition:margin 225ms ease-in-out}.novo-expansion-panel.novo-expanded{margin:16px 4px}.novo-expansion-panel.novo-expanded:first-child{margin-top:0}.novo-expansion-panel.novo-expanded:last-child{margin-bottom:0}.novo-expansion-panel-content{overflow:hidden}.novo-expansion-panel-content.novo-expanded{overflow:visible}.novo-expansion-panel-padding .novo-expansion-panel-body{padding:0 24px 16px}.novo-accordion .novo-expansion-panel-spacing:first-child{margin-top:0}.novo-accordion .novo-expansion-panel-spacing:last-child{margin-bottom:0}.novo-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.novo-action-row button.novo-button{margin-left:8px}[dir=rtl] .novo-action-row button.novo-button{margin-left:0;margin-right:8px}"]
|
|
31158
31461
|
},] }
|
|
31159
31462
|
];
|
|
31160
31463
|
NovoExpansionPanel.ctorParameters = () => [
|
|
@@ -32556,6 +32859,7 @@ class FormUtils {
|
|
|
32556
32859
|
})
|
|
32557
32860
|
: [];
|
|
32558
32861
|
let fields = meta.fields.map((field) => {
|
|
32862
|
+
field.parentEntity = meta.entity;
|
|
32559
32863
|
if (!field.hasOwnProperty('sortOrder')) {
|
|
32560
32864
|
field.sortOrder = Number.MAX_SAFE_INTEGER - 1;
|
|
32561
32865
|
}
|
|
@@ -32662,7 +32966,7 @@ class FormUtils {
|
|
|
32662
32966
|
let currentValue = null;
|
|
32663
32967
|
let currentWorkflowOption = 'initial';
|
|
32664
32968
|
if (fieldData === null || fieldData === void 0 ? void 0 : fieldData.id) {
|
|
32665
|
-
currentValue = { value: fieldData.id, label: fieldData.label
|
|
32969
|
+
currentValue = Object.assign(Object.assign({}, fieldData), { value: fieldData.id, label: fieldData.label || fieldData.id });
|
|
32666
32970
|
currentWorkflowOption = fieldData.id;
|
|
32667
32971
|
}
|
|
32668
32972
|
const updateWorkflowOptions = workflowOptions[currentWorkflowOption] || [];
|
|
@@ -32979,203 +33283,6 @@ NovoModalService.ctorParameters = () => [
|
|
|
32979
33283
|
{ type: ComponentUtils }
|
|
32980
33284
|
];
|
|
32981
33285
|
|
|
32982
|
-
// NG2
|
|
32983
|
-
class NovoToastElement {
|
|
32984
|
-
constructor(sanitizer) {
|
|
32985
|
-
this.sanitizer = sanitizer;
|
|
32986
|
-
this.theme = 'danger';
|
|
32987
|
-
this.icon = 'caution';
|
|
32988
|
-
this.hasDialogue = false;
|
|
32989
|
-
this.isCloseable = false;
|
|
32990
|
-
this.closed = new EventEmitter();
|
|
32991
|
-
this.show = false;
|
|
32992
|
-
this.animate = false;
|
|
32993
|
-
this.parent = null;
|
|
32994
|
-
this.launched = false;
|
|
32995
|
-
}
|
|
32996
|
-
set message(m) {
|
|
32997
|
-
this._message = this.sanitizer.bypassSecurityTrustHtml(m);
|
|
32998
|
-
}
|
|
32999
|
-
ngOnInit() {
|
|
33000
|
-
if (!this.launched) {
|
|
33001
|
-
// clear position and time
|
|
33002
|
-
this.position = null;
|
|
33003
|
-
this.time = null;
|
|
33004
|
-
// set icon and styling
|
|
33005
|
-
this.iconClass = `bhi-${this.icon}`;
|
|
33006
|
-
this.alertTheme = `${this.theme} toast-container embedded`;
|
|
33007
|
-
if (this.hasDialogue) {
|
|
33008
|
-
this.alertTheme += ' dialogue';
|
|
33009
|
-
}
|
|
33010
|
-
}
|
|
33011
|
-
}
|
|
33012
|
-
ngOnChanges(changes) {
|
|
33013
|
-
// set icon and styling
|
|
33014
|
-
this.iconClass = `bhi-${this.icon}`;
|
|
33015
|
-
this.alertTheme = `${this.theme} toast-container embedded`;
|
|
33016
|
-
if (this.hasDialogue) {
|
|
33017
|
-
this.alertTheme += ' dialogue';
|
|
33018
|
-
}
|
|
33019
|
-
}
|
|
33020
|
-
clickHandler(event) {
|
|
33021
|
-
if (!this.isCloseable) {
|
|
33022
|
-
if (event) {
|
|
33023
|
-
event.stopPropagation();
|
|
33024
|
-
event.preventDefault();
|
|
33025
|
-
}
|
|
33026
|
-
if (this.parent) {
|
|
33027
|
-
this.parent.hide(this);
|
|
33028
|
-
}
|
|
33029
|
-
else {
|
|
33030
|
-
this.closed.emit({ closed: true });
|
|
33031
|
-
}
|
|
33032
|
-
}
|
|
33033
|
-
}
|
|
33034
|
-
close(event) {
|
|
33035
|
-
if (event) {
|
|
33036
|
-
event.stopPropagation();
|
|
33037
|
-
event.preventDefault();
|
|
33038
|
-
}
|
|
33039
|
-
if (this.parent) {
|
|
33040
|
-
this.parent.hide(this);
|
|
33041
|
-
}
|
|
33042
|
-
else {
|
|
33043
|
-
this.closed.emit({ closed: true });
|
|
33044
|
-
}
|
|
33045
|
-
}
|
|
33046
|
-
}
|
|
33047
|
-
NovoToastElement.decorators = [
|
|
33048
|
-
{ type: Component, args: [{
|
|
33049
|
-
selector: 'novo-toast',
|
|
33050
|
-
host: {
|
|
33051
|
-
'[class]': 'alertTheme',
|
|
33052
|
-
'[class.show]': 'show',
|
|
33053
|
-
'[class.animate]': 'animate',
|
|
33054
|
-
'[class.embedded]': 'embedded',
|
|
33055
|
-
'(click)': '!isCloseable && clickHandler($event)',
|
|
33056
|
-
},
|
|
33057
|
-
template: `
|
|
33058
|
-
<div class="toast-icon">
|
|
33059
|
-
<i [ngClass]="iconClass"></i>
|
|
33060
|
-
</div>
|
|
33061
|
-
<div class="toast-content">
|
|
33062
|
-
<h5 *ngIf="title">{{title}}</h5>
|
|
33063
|
-
<p *ngIf="_message" [class.message-only]="!title" [innerHtml]="_message"></p>
|
|
33064
|
-
<div *ngIf="link" class="link-generated">
|
|
33065
|
-
<input type="text" [value]="link" onfocus="this.select();"/>
|
|
33066
|
-
</div>
|
|
33067
|
-
<div class="dialogue">
|
|
33068
|
-
<ng-content></ng-content>
|
|
33069
|
-
</div>
|
|
33070
|
-
</div>
|
|
33071
|
-
<div class="close-icon" *ngIf="isCloseable" (click)="close($event)">
|
|
33072
|
-
<i class="bhi-times"></i>
|
|
33073
|
-
</div>
|
|
33074
|
-
`
|
|
33075
|
-
},] }
|
|
33076
|
-
];
|
|
33077
|
-
NovoToastElement.ctorParameters = () => [
|
|
33078
|
-
{ type: DomSanitizer }
|
|
33079
|
-
];
|
|
33080
|
-
NovoToastElement.propDecorators = {
|
|
33081
|
-
theme: [{ type: Input }],
|
|
33082
|
-
icon: [{ type: Input }],
|
|
33083
|
-
title: [{ type: Input }],
|
|
33084
|
-
hasDialogue: [{ type: Input }],
|
|
33085
|
-
link: [{ type: Input }],
|
|
33086
|
-
isCloseable: [{ type: Input }],
|
|
33087
|
-
message: [{ type: Input }],
|
|
33088
|
-
closed: [{ type: Output }]
|
|
33089
|
-
};
|
|
33090
|
-
|
|
33091
|
-
// NG2
|
|
33092
|
-
class NovoToastService {
|
|
33093
|
-
constructor(componentUtils) {
|
|
33094
|
-
this.componentUtils = componentUtils;
|
|
33095
|
-
this.references = [];
|
|
33096
|
-
this.icons = { default: 'bell', success: 'check', info: 'info', warning: 'warning', danger: 'remove' };
|
|
33097
|
-
this.defaults = { hideDelay: 3500, position: 'growlTopRight', theme: 'default' };
|
|
33098
|
-
}
|
|
33099
|
-
set parentViewContainer(view) {
|
|
33100
|
-
this._parentViewContainer = view;
|
|
33101
|
-
}
|
|
33102
|
-
alert(options, toastElement = NovoToastElement) {
|
|
33103
|
-
return new Promise((resolve) => {
|
|
33104
|
-
if (!this._parentViewContainer) {
|
|
33105
|
-
console.error('No parent view container specified for the ToastService. Set it inside your main application. \nthis.toastService.parentViewContainer = view (ViewContainerRef)');
|
|
33106
|
-
return;
|
|
33107
|
-
}
|
|
33108
|
-
const toast = this.componentUtils.append(toastElement, this._parentViewContainer);
|
|
33109
|
-
this.references.push(toast);
|
|
33110
|
-
this.handleAlert(toast.instance, options);
|
|
33111
|
-
resolve(toast);
|
|
33112
|
-
});
|
|
33113
|
-
}
|
|
33114
|
-
isVisible(toast) {
|
|
33115
|
-
return toast.show;
|
|
33116
|
-
}
|
|
33117
|
-
hide(toast) {
|
|
33118
|
-
toast.animate = false;
|
|
33119
|
-
setTimeout(() => {
|
|
33120
|
-
toast.show = false;
|
|
33121
|
-
const REF = this.references.filter((x) => x.instance === toast)[0];
|
|
33122
|
-
if (REF) {
|
|
33123
|
-
this.references.splice(this.references.indexOf(REF), 1);
|
|
33124
|
-
REF.destroy();
|
|
33125
|
-
}
|
|
33126
|
-
}, 300);
|
|
33127
|
-
}
|
|
33128
|
-
handleAlert(toast, options) {
|
|
33129
|
-
this.setToastOnSession(toast, options);
|
|
33130
|
-
setTimeout(() => {
|
|
33131
|
-
this.show(toast);
|
|
33132
|
-
}, 20);
|
|
33133
|
-
if (!toast.isCloseable) {
|
|
33134
|
-
this.toastTimer(toast);
|
|
33135
|
-
}
|
|
33136
|
-
}
|
|
33137
|
-
setToastOnSession(toast, opts) {
|
|
33138
|
-
const OPTIONS = typeof opts === 'object' ? opts : {};
|
|
33139
|
-
toast.parent = this;
|
|
33140
|
-
toast.title = OPTIONS.title || '';
|
|
33141
|
-
toast.message = OPTIONS.message || '';
|
|
33142
|
-
toast.hideDelay = OPTIONS.hideDelay || this.defaults.hideDelay;
|
|
33143
|
-
toast.link = OPTIONS.link || '';
|
|
33144
|
-
toast.isCloseable = OPTIONS.isCloseable || false;
|
|
33145
|
-
const CUSTOM_CLASS = OPTIONS.customClass || '';
|
|
33146
|
-
const ALERT_STYLE = OPTIONS.theme || this.defaults.theme;
|
|
33147
|
-
const ALERT_POSITION = OPTIONS.position || this.defaults.position;
|
|
33148
|
-
const ALERT_ICON = OPTIONS.icon || this.icons.default;
|
|
33149
|
-
toast.iconClass = `bhi-${ALERT_ICON}`;
|
|
33150
|
-
toast.launched = true;
|
|
33151
|
-
toast.alertTheme = `${ALERT_STYLE} ${ALERT_POSITION} ${CUSTOM_CLASS} toast-container launched`;
|
|
33152
|
-
}
|
|
33153
|
-
show(toast) {
|
|
33154
|
-
toast.show = true;
|
|
33155
|
-
setTimeout(addClass, 25);
|
|
33156
|
-
/**
|
|
33157
|
-
* Adds animate class to be called after a timeout
|
|
33158
|
-
**/
|
|
33159
|
-
function addClass() {
|
|
33160
|
-
toast.animate = true;
|
|
33161
|
-
}
|
|
33162
|
-
}
|
|
33163
|
-
toastTimer(toast) {
|
|
33164
|
-
if (toast.hideDelay < 0) {
|
|
33165
|
-
return;
|
|
33166
|
-
}
|
|
33167
|
-
setTimeout(() => {
|
|
33168
|
-
this.hide(toast);
|
|
33169
|
-
}, toast.hideDelay);
|
|
33170
|
-
}
|
|
33171
|
-
}
|
|
33172
|
-
NovoToastService.decorators = [
|
|
33173
|
-
{ type: Injectable }
|
|
33174
|
-
];
|
|
33175
|
-
NovoToastService.ctorParameters = () => [
|
|
33176
|
-
{ type: ComponentUtils }
|
|
33177
|
-
];
|
|
33178
|
-
|
|
33179
33286
|
// NG2
|
|
33180
33287
|
class ControlConfirmModal {
|
|
33181
33288
|
constructor(modalRef, params, labels) {
|